- Hardware: x86/16GB RAM/240GB
- OS: Official 3.0.0 Docker image running in Ubuntu 20.04
- Java Runtime Environment: which java platform is used and what version
- openHAB version: 3.0.0
Issue of the topic: I have several Shellies in my apartment for switching lights / extractor fans. All Shellies are running the latest firmware. I use the Shelly binding to control them from openHAB, but because of my router (I think), the CoAP events aren’t arriving in real time, so I’m using MQTT to get the events.
I’m up and running now, so this is more of a curiosity than anything, but I think I encountered a bug when setting up the MQTT channels for the first time - MQTT events were not working until I edited (back to the same value) the ‘Custom on/open value’ and ‘Custom off/closed value’ in the channel configuration, and then saved the Thing.
- Create a fresh channel for an MQTT Thing, as an On/Off Switch.
- Set up MQTT State Topic - don’t touch anything else, the defaults look good
- Save Thing
- Test device - not updating in openHAB
- Verify device is broadcasting on that topic by checking Mosquitto - confirmed good
- Edit channel, delete and re-type 1 and 0 in ‘Custom On/Open Value’ and ‘Custom Off/Closed Value’
- Save Thing and test - working as expected!
Has anyone else seen this? Or is it just a weird quirk of my setup / I did something stupid?
I initially troubleshot it by creating another channel as plain text, to check openHAB was seeing the messages, which it was, which eventually led me to the fix. It’s a weird one, so hopefully this post helps someone with the workaround if nothing else…
P.S. If anyone has any tips about why the CoAP events aren’t arriving, I’m open to any suggestions (even how I can monitor / check where the issue lies).