Just getting started with openHAB. Very cool stuff !
I have digialdan’s binding working with my Omni IIe but encountered a problem that I haven’t been able to solve: Outdoor temperature won’t update. The correct reading is populated when I start the server but it doesn’t change after that. Tried restarting the browser and updating the items and sitemap file live. The only way I can get this to update is by restarting the openHAB server. Other items like fan status, lights, zones, etc update just fine. It’s only aux that I’m seeing the problem. I stripped the items and site files down to the bare minimum but the problem persists. Here’s my config:
Windows 10 64bit
Java: java version “1.8.0_91”
openHAB: 1.8.3
omnilink binding from distributions-1.8.3-addons.zip
Omni IIe f/w: 3.5
items:
Group All
Number Aux_Temp "Outside Temperature [%d °F]" (All) {omnilink="aux_current:15"}
sitemap:
sitemap mysite label="Home" {
Group item=All
}
No Rules, Persistence, or Scripts
Here’s a snip from the console in debug mode after startup and after I confirmed on the wall thermostat the outside temp had changed:
This really has me scratching my head since there must be other omnilink binding users with outside temp sensors. I think the is setup in my Omni is correct since Snaplink mobile and the thermostat both display outside temp correctly.
Lastly, I noticed the aux items are not generated when set omnilink:generateItems=true. Looking at the OmnilinkTimesGenerator.java, I don’t see any references to aux. Not a big deal, just thought I should mention it.
Hoping @digitaldan still monitors the forum, even though he doesn’t have an omni anymore
hmm, I’m not sure why its not updating when other items are. The binding does not poll (except for some audio data), it depends on the omni unit to notify it when a value changes, I had a few temp/humid sensors which worked, so I’m not sure why its not working in your case. As you mentioned I don’t have the hardware and have not touched that code in a very long time.
I have jOmnilinkII Main example running now and can see Aux changing value in RX (0x65 to 0x66 in this case) . Can you think of any reason this won’t propagate up through the openhab binding, or perhaps where I can look?
readBytesEncrypted2: Omni message Length 9
readBytesEncrypted2: Additional bytes to read 0
RX: 0x21 0x09 0x3b 0x08 0x06 0x00 0x0f 0x00 0x65 0x2e 0x00 0xc9 0x06 0x00 0x00 0x00
readBytesEncrypted2: Data still available after read 0
run: NOTIFICATION: Added message with type 32
readBytesEncrypted2: Bytes available for reading: 0
STATUS_AUX changed
ObjectStatus ( )
readBytesEncrypted2: Omni message Length 9
readBytesEncrypted2: Additional bytes to read 0
RX: 0x21 0x09 0x3b 0x08 0x06 0x00 0x0f 0x00 0x66 0x2e 0x00 0x39 0x06 0x00 0x00 0x00
readBytesEncrypted2: Data still available after read 0
run: NOTIFICATION: Added message with type 32
readBytesEncrypted2: Bytes available for reading: 0
STATUS_AUX changed
ObjectStatus ( )
Ok, Aux is now updating successfully with some changes. Disclaimer: I don’t know Java, Eclipse, Git, or Maven but I managed to follow some good instructions on this site to pull in the source, add some code and and build a jar from the 1.9.0-SNAPSHOT. I simply noticed there wasn’t any code to update status for Aux so I added it by following the format of the code around it. Fortunately, @digitaldan is very consistent with his naming convention. I have no idea if this is right, wrong, or a hack, but it works. It would be awesome if Dan had a look. Here’s what I added to OmniLinkBinding.java:
* Update a device based on a status message from the system
*
* @param status
*/
protected void updateDeviceStatus(Status status) {
logger.debug("updateDeviceStatus {} {}", status.getNumber(), status.getClass());
Integer number = new Integer(status.getNumber());
if (status instanceof UnitStatus && unitMap.containsKey(number)) {
Unit unit = unitMap.get(number);
unit.getProperties().updateUnit((UnitStatus) status);
updateItemsForDevice(unit);
} else if (status instanceof ThermostatStatus && thermostatMap.containsKey(number)) {
logger.debug("Updating thermo " + number);
Thermostat thermo = thermostatMap.get(number);
thermo.getProperties().updateThermostat((ThermostatStatus) status);
updateItemsForDevice(thermo);
// smk start
** } else if (status instanceof AuxSensorStatus && auxMap.containsKey(number)) {
** logger.debug("Updating aux " + number);
** Auxiliary aux = auxMap.get(number);
** aux.getProperties().updateAuxSensor((AuxSensorStatus) status);
** updateItemsForDevice(aux);
** // smk end
} else if (status instanceof AudioZoneStatus && audioZoneMap.containsKey(number)) {
logger.debug("Updating audioZone " + number);
AudioZone az = audioZoneMap.get(number);
az.getProperties().updateAudioZone((AudioZoneStatus) status);
updateItemsForDevice(az);
} else if (status instanceof AreaStatus && areaMap.containsKey(number)) {
logger.debug("Updating area " + number);
Area area = areaMap.get(number);
area.getProperties().updateArea((AreaStatus) status);
updateItemsForDevice(area);
} else if (status instanceof ZoneStatus && zoneMap.containsKey(number)) {
logger.debug("Updating zone " + number);
Zone zone = zoneMap.get(number);
zone.getProperties().updateZone((ZoneStatus) status);
updateItemsForDevice(zone);
}
}
That looks right, Dan. I’ve had this code running for about five days now under Openhab2 without any issues. Once you have the new version in the repo, I’ll pull it down and put some run-time on it. Thanks for taking care of this.
@digitaldan, let me preface this question with the fact that I can mechanically put most anything together but I am not a programmer in any shape or form…but I can poke around in code and kind of figure out what is going on.
So, with that said, apologize in advance if this is a dumb question.
I am still exploring my options for obtaining current thermostat system status and lock/unlock status from the omnipro. I have a copy of the HAI Omnilink API and I was bouncing the information from that document against your omnilink binding work. Great work, by the way!
The HAI API document shows the heating/cooling values as part of the “Extended Thermostat Status” values, specifically “Data 16” for thermostat 1 and “Data 30” for thermostat 2. Your API also seems to be able to capture the “Access Control Lock Status” (Data 4 for lock 1, Data 9 for lock 2) as well. It looks like the API you built is capable of capturing the data from the board but I’m not sure if it’s retrievable from the OH binding.
Do you know if those messages are currently available to the omnilink binding, and if so how difficult would it be to capture that information?
I went back and looked, and yes the library supports this partially, while it can understand the extended message type for therms, the thermo property class does not know how to update its structure from them, so this would need to be done first (I think). The binding is not currently requesting the extended status, it would need to be modified to do so and then understand the extended thermostat bit, the boiler plate code is all there as a template once the library can expose this.
Locks also look to be partially implemented, we know how to read the raw message type but there is no lock property class to do anything with it, this would need to be implemented in the library first, then added to the binding.