OpenHAB 2.5.3 Release. running on XUbuntu installed on a 64 bit lappy
Installation via project clone, by the book. + Zulu 8
System MQTT, doing what it should.
Using Node Red to monitor/diagnose payload and check topic’s
Tasmota on sonoff basic, just the one for testing.
Binding, Thing & link added with Paper UI. Switch works.
Icon added to HabPanel… Again working, apparently. No site map.
BUT
After initial config the switch state wasn’t being returned.
IE. if the unit was switched externally, Tas interface / button / power on default, Openhab didn’t see the new state.
In addition I wanted to capture the MQTT log to ensure that after a system restart, either end, Openhab displayed the correct device state.
Whilst trying to get the log capture to work, not correctly as it happens, I set, and then removed, a custom On and Off state in the thing definition.
Following this the switch no longer functioned, sending an empty payload.
This however caused the state to respond as it should… CONFUSED I was!
I Added ON and OFF, as custom values, which fixed the switch and also fixed, or at least didn’t break, the status update.
Tested this by injecting stat/…/POWER messages from node red and found I could switch the Openhab state, and icon/text, without switching the device. Pointless but amusing none the less.
Have I found a bug? Or am I just a super-noob missing something obvious?
Ergo…
After replacing the default, empty, cmnd/state entries with ‘ON’ and ‘OFF’, which seems to be documented as the default anyway, status worked.
Conversely…
Removing the custom entry doesn’t seem to reinstate the default condition, breaking the switch because it then sends an empty payload.
I am now planning to use Node Red to split stat/…/LOGGING, which spits out a verbose comma separated payload, to identify periodic device state reports and then generate a, I was going to say ‘sudo’ but that would be confusing, new MQTT message with an apropriate stat/…/POWER topic to update Openhab, if it, or the device, has restarted.
I am sure I can get this to work but I have no idea if there is an easier/better way to go about.
Any advice, would be much appreciated.
I have searched, extensively, but to be honest a lack of knowledge is making a targeted search hard; and the relatively recent updates make many of the results I have got all but useless.
Sorry… Very new to this, Ubuntu and Openhab, and struggling to say the least.
It looks cool though, cant wait to get some sensible basic functionality in place and then play with it.
Can anyone recommend a Cheap android tab, 7", that will adequately run HabPanel…
I will need at least 4 so I would prefer not to go for high end stuff unless it is absolutely necessary.
BTW…
I build PLC code for a living and plan to use the Modbus, or possibly a raw TCP, connector to hook up a couple of Schneider PLC’s and a Victron inverter system.
I would be more than happy to share that code/config, and anything else I come up with, if it will help anyone.
Where would I do that? I don’t want to spam the main forums… That’s just rude!
Long first post I know, sorry.
Looking forward to engaging with the community.
Al