Skip to content

Commit 1291c90

Browse files
committed
Rebuild repo
Signed-off-by: matchews <[email protected]>
1 parent 9544767 commit 1291c90

31 files changed

+2410
-1
lines changed

bom/openhab-addons/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,11 @@
842842
<version>${project.version}</version>
843843
</dependency>
844844
<dependency>
845+
<dependency>
846+
<groupId>org.openhab.addons.bundles</groupId>
847+
<artifactId>org.openhab.binding.intellifire</artifactId>
848+
<version>${project.version}</version>
849+
</dependency>
845850
<groupId>org.openhab.addons.bundles</groupId>
846851
<artifactId>org.openhab.binding.intesis</artifactId>
847852
<version>${project.version}</version>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
This content is produced and maintained by the openHAB project.
2+
3+
* Project home: https://www.openhab.org
4+
5+
== Declared Project Licenses
6+
7+
This program and the accompanying materials are made available under the terms
8+
of the Eclipse Public License 2.0 which is available at
9+
https://www.eclipse.org/legal/epl-2.0/.
10+
11+
== Source Code
12+
13+
https://github.com/openhab/openhab-addons
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# intellifire Binding
2+
3+
_Give some details about what this binding is meant for - a protocol, system, specific device._
4+
5+
_If possible, provide some resources like pictures (only PNG is supported currently), a video, etc. to give an impression of what can be done with this binding._
6+
_You can place such resources into a `doc` folder next to this README.md._
7+
8+
_Put each sentence in a separate line to improve readability of diffs._
9+
10+
## Supported Things
11+
12+
_Please describe the different supported things / devices including their ThingTypeUID within this section._
13+
_Which different types are supported, which models were tested etc.?_
14+
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._
15+
16+
- `bridge`: Short description of the Bridge, if any
17+
- `sample`: Short description of the Thing with the ThingTypeUID `sample`
18+
19+
## Discovery
20+
21+
_Describe the available auto-discovery features here._
22+
_Mention for what it works and what needs to be kept in mind when using it._
23+
24+
## Binding Configuration
25+
26+
_If your binding requires or supports general configuration settings, please create a folder ```cfg``` and place the configuration file ```<bindingId>.cfg``` inside it._
27+
_In this section, you should link to this file and provide some information about the options._
28+
_The file could e.g. look like:_
29+
30+
```
31+
# Configuration for the intellifire Binding
32+
#
33+
# Default secret key for the pairing of the intellifire Thing.
34+
# It has to be between 10-40 (alphanumeric) characters.
35+
# This may be changed by the user for security reasons.
36+
secret=openHABSecret
37+
```
38+
39+
_Note that it is planned to generate some part of this based on the information that is available within ```src/main/resources/OH-INF/binding``` of your binding._
40+
41+
_If your binding does not offer any generic configurations, you can remove this section completely._
42+
43+
## Thing Configuration
44+
45+
_Describe what is needed to manually configure a thing, either through the UI or via a thing-file._
46+
_This should be mainly about its mandatory and optional configuration parameters._
47+
48+
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._
49+
50+
### `sample` Thing Configuration
51+
52+
| Name | Type | Description | Default | Required | Advanced |
53+
|-----------------|---------|---------------------------------------|---------|----------|----------|
54+
| hostname | text | Hostname or IP address of the device | N/A | yes | no |
55+
| password | text | Password to access the device | N/A | yes | no |
56+
| refreshInterval | integer | Interval the device is polled in sec. | 600 | no | yes |
57+
58+
## Channels
59+
60+
_Here you should provide information about available channel types, what their meaning is and how they can be used._
61+
62+
_Note that it is planned to generate some part of this based on the XML files within ```src/main/resources/OH-INF/thing``` of your binding._
63+
64+
| Channel | Type | Read/Write | Description |
65+
|---------|--------|------------|-----------------------------|
66+
| control | Switch | RW | This is the control channel |
67+
68+
## Full Example
69+
70+
_Provide a full usage example based on textual configuration files._
71+
_*.things, *.items examples are mandatory as textual configuration is well used by many users._
72+
_*.sitemap examples are optional._
73+
74+
### Thing Configuration
75+
76+
```java
77+
Example thing configuration goes here.
78+
```
79+
### Item Configuration
80+
81+
```java
82+
Example item configuration goes here.
83+
```
84+
85+
### Sitemap Configuration
86+
87+
```perl
88+
Optional Sitemap configuration goes here.
89+
Remove this section, if not needed.
90+
```
91+
92+
## Any custom content here!
93+
94+
_Feel free to add additional sections for whatever you think should also be mentioned about your binding!_
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
Things online before succesful local poll?
3+
4+
Combine light and fan into fireplace thing? (light:light, fan:fan)
5+
6+
Dimmer light icon brightness doesn't work with 0-3
7+
Flame height not working in homekit
8+
9+
http vs https
10+
verify SSL certificate
11+
12+
13+
Send Command failure causes thing offline. Recovery?
14+
15+
******
16+
Test local IP address change.
17+
IP Address successfully updates on initialization.
18+
What to do if localPolling fails?
19+
Try cloudPolling
20+
Or retry out and re-initialize?
21+
22+
23+
Initialize (including one cloud poll)
24+
Local Poll
25+
Retry local 2-3 times
26+
Retry cloud 2-3 times (if this succeeds, go back to local polling?)
27+
Initialize
28+
29+
30+
31+
HttpResponse error messages need to differentiate between internet connection and local connection.
32+
Might need a config option to select local, cloud, or both?
33+
******
34+
35+
getusername used in python code?
36+
37+
38+
Limit outgoing command frequency so we don't overload the server
39+
40+
Logging
41+
ReadMe
42+
Timer must have unit metatadata set to minutes
43+
44+
45+
2024-04-16 06:37:23.379 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: __ob__
46+
2024-04-16 06:37:23.379 [WARN ] [e.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: __v_isRef
47+
48+
204 Success – command accepted
49+
403 Not authorized (bad email address or authorization cookie)
50+
404 Fireplace not found (bad serial number)
51+
422 Invalid Parameter (invalid command id or command value)
52+
53+
54+
55+
**Why use this when using local polling
56+
Long Poll
57+
long_poll_url = f"{self.prefix}://iftapi.net/a/{self._serial}/applongpoll"
58+
Set timeout to 60 seconds
59+
No change = 408 after 47 seconds - Repeat long poll
60+
Change = 200 with APPoll Data + Etag header
61+
62+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>org.openhab.addons.bundles</groupId>
9+
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
10+
<version>4.3.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>org.openhab.binding.intellifire</artifactId>
14+
15+
<name>openHAB Add-ons :: Bundles :: intellifire Binding</name>
16+
17+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<features name="org.openhab.binding.intellifire-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
3+
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
4+
5+
<feature name="openhab-binding-intellifire" description="intellifire Binding" version="${project.version}">
6+
<feature>openhab-runtime-base</feature>
7+
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.intellifire/${project.version}</bundle>
8+
</feature>
9+
</features>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/**
2+
* Copyright (c) 2010-2024 Contributors to the openHAB project
3+
*
4+
* See the NOTICE file(s) distributed with this work for additional
5+
* information.
6+
*
7+
* This program and the accompanying materials are made available under the
8+
* terms of the Eclipse Public License 2.0 which is available at
9+
* http://www.eclipse.org/legal/epl-2.0
10+
*
11+
* SPDX-License-Identifier: EPL-2.0
12+
*/
13+
package org.openhab.binding.intellifire.internal;
14+
15+
import java.util.ArrayList;
16+
import java.util.List;
17+
18+
import org.eclipse.jdt.annotation.NonNullByDefault;
19+
import org.eclipse.jdt.annotation.Nullable;
20+
21+
import com.google.gson.annotations.SerializedName;
22+
23+
/**
24+
*
25+
* @author Matt Myers - Initial contribution
26+
*/
27+
@NonNullByDefault
28+
public class IntellifireAccount {
29+
public static class Location {
30+
@SerializedName(value = "location_id")
31+
public String locationId = "";
32+
@SerializedName(value = "location_name")
33+
public String locationName = "";
34+
@SerializedName(value = "wifi_essid")
35+
public String wifiEssid = "";
36+
@SerializedName(value = "wifi_password")
37+
public String wifiPassword = "";
38+
@SerializedName(value = "postal_code")
39+
public String postalCode = "";
40+
@SerializedName(value = "user_class")
41+
public String userClass = "";
42+
public IntellifireLocation fireplaces = new IntellifireLocation();
43+
}
44+
45+
public List<Location> locations = new ArrayList<>();
46+
@SerializedName(value = "email_notifications_enabled")
47+
public int emailNotificationsEnabled = 0;
48+
public String userName = "";
49+
50+
public @Nullable IntellifirePollData getPollData(String serialNumber) {
51+
for (int i = 0; i < this.locations.size(); i++) {
52+
for (int j = 0; j < this.locations.get(i).fireplaces.fireplaces.size(); j++) {
53+
if (serialNumber.equals(this.locations.get(i).fireplaces.fireplaces.get(j).serial)) {
54+
return this.locations.get(i).fireplaces.fireplaces.get(j).pollData;
55+
}
56+
}
57+
}
58+
return null;
59+
}
60+
61+
public String getIPAddress(String serialNumber) {
62+
for (int i = 0; i < this.locations.size(); i++) {
63+
for (int j = 0; j < this.locations.get(i).fireplaces.fireplaces.size(); j++) {
64+
if (serialNumber.equals(this.locations.get(i).fireplaces.fireplaces.get(j).serial)) {
65+
return this.locations.get(i).fireplaces.fireplaces.get(j).pollData.ipv4Address;
66+
}
67+
}
68+
}
69+
return "";
70+
}
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/**
2+
* Copyright (c) 2010-2024 Contributors to the openHAB project
3+
*
4+
* See the NOTICE file(s) distributed with this work for additional
5+
* information.
6+
*
7+
* This program and the accompanying materials are made available under the
8+
* terms of the Eclipse Public License 2.0 which is available at
9+
* http://www.eclipse.org/legal/epl-2.0
10+
*
11+
* SPDX-License-Identifier: EPL-2.0
12+
*/
13+
package org.openhab.binding.intellifire.internal;
14+
15+
import java.net.URI;
16+
import java.util.Set;
17+
18+
import org.eclipse.jdt.annotation.NonNullByDefault;
19+
import org.openhab.core.thing.ThingTypeUID;
20+
21+
/**
22+
* The {@link IntellifireBindingConstants} class defines common constants, which are
23+
* used across the whole binding.
24+
*
25+
* @author Matt Myers - Initial contribution
26+
*/
27+
@NonNullByDefault
28+
public class IntellifireBindingConstants {
29+
30+
private static final String BINDING_ID = "intellifire";
31+
32+
// List of all Thing Type UIDs
33+
public static final ThingTypeUID THING_TYPE_ACCOUNT_BRIDGE = new ThingTypeUID(BINDING_ID, "account");
34+
public static final ThingTypeUID THING_TYPE_FAN = new ThingTypeUID(BINDING_ID, "fan");
35+
public static final ThingTypeUID THING_TYPE_FIREPLACE = new ThingTypeUID(BINDING_ID, "fireplace");
36+
public static final ThingTypeUID THING_TYPE_LIGHT = new ThingTypeUID(BINDING_ID, "light");
37+
public static final ThingTypeUID THING_TYPE_REMOTE = new ThingTypeUID(BINDING_ID, "remote");
38+
39+
public static final Set<ThingTypeUID> BRIDGE_THING_TYPES_UIDS = Set.of(THING_TYPE_ACCOUNT_BRIDGE);
40+
41+
public static final Set<ThingTypeUID> THING_TYPES_UIDS = Set.of(IntellifireBindingConstants.THING_TYPE_FAN,
42+
IntellifireBindingConstants.THING_TYPE_FIREPLACE, IntellifireBindingConstants.THING_TYPE_LIGHT,
43+
IntellifireBindingConstants.THING_TYPE_REMOTE);
44+
45+
// List of all Channel ids
46+
public static final String CHANNEL_FAN = "fan";
47+
public static final String CHANNEL_FIREPLACE_POWER = "power";
48+
public static final String CHANNEL_FIREPLACE_BATTERY = "battery";
49+
public static final String CHANNEL_FIREPLACE_ECMLATENCY = "ecmLatency";
50+
public static final String CHANNEL_FIREPLACE_ERRORS = "errors";
51+
public static final String CHANNEL_FIREPLACE_FLAMEHEIGHT = "flameHeight";
52+
public static final String CHANNEL_FIREPLACE_HOT = "hot";
53+
public static final String CHANNEL_FIREPLACE_COLDCLIMATEPILOT = "coldClimatePilot";
54+
public static final String CHANNEL_FIREPLACE_PREPURGE = "prePurge";
55+
public static final String CHANNEL_LIGHT = "light";
56+
public static final String CHANNEL_REMOTE_CONNECTIONQUALITY = "remoteConnectionQuality";
57+
public static final String CHANNEL_REMOTE_DOWNTIME = "remoteDowntime";
58+
public static final String CHANNEL_REMOTE_ENABLE = "thermostatEnable";
59+
public static final String CHANNEL_REMOTE_SETPOINT = "thermostatSetpoint";
60+
public static final String CHANNEL_REMOTE_TEMPERATURE = "roomTemperature";
61+
public static final String CHANNEL_REMOTE_TIMERENABLE = "timerEnable";
62+
public static final String CHANNEL_REMOTE_TIMER = "timer";
63+
public static final String CHANNEL_REMOTE_UPTIME = "remoteUptime";
64+
65+
// Properties
66+
public static final String PROPERTY_APIKEY = "API Key";
67+
public static final String PROPERTY_IPADDRESS = "IP Address";
68+
public static final String PROPERTY_LOCATIONID = "Location ID";
69+
public static final String PROPERTY_SERIALNUMBER = "Serial Number";
70+
public static final String PROPERTY_UNIQUEID = "Unique ID";
71+
public static final String PROPERTY_FIREPLACE_BRAND = "Brand";
72+
public static final String PROPERTY_FIREPLACE_FIRMWAREVERSION = "Firmware Version";
73+
public static final String PROPERTY_FIREPLACE_MODEL = "Model";
74+
public static final String PROPERTY_FIREPLACE_NAME = "Name";
75+
76+
// http Connection
77+
public static final String HTTP_HEADERS_ACCEPT = "*/*";
78+
public static final String HTTP_HEADERS_ACCEPTENCODING = "gzip, deflate";
79+
public static final String HTTP_HEADERS_CONNECTION = "keep-alive";
80+
public static final String HTTP_HEADERS_CONTENTTYPEURLENCODED = "application/x-www-form-urlencoded";
81+
public static final String HTTP_HEADERS_CONTENTTYPETEXT = "text/plain;charset=UTF-8";
82+
public static final String HTTP_HEADERS_HOST = "iftapi.net";
83+
public static final String HTTP_HEADERS_LANGUAGE = "en-US,en;q=0.9";
84+
public static final String URL_LOGIN = "http://iftapi.net/a/login";
85+
public static final String URL_ENUMLOCATIONS = "http://iftapi.net/a/enumlocations";
86+
public static final String URL_GETUSERNAME = "http://iftapi.net/a/getusername";
87+
public static final URI URI_COOKIE = URI.create("http://iftapi.net");
88+
89+
// polling
90+
public static final boolean CLOUD_POLLING = true;
91+
public static final boolean LOCAL_POLLING = false;
92+
}

0 commit comments

Comments
 (0)