with reference to my previous post (almost solved )
I cannot still do a straightforward configuration of my door/window sensors. The following warning is visible in the log
2021-01-24 20:53:58.606 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'CLOSED' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.CLOSED
And when I look to the channel list of my (autodiscovered sensor hub) I see all opening are classified as âswitchâ instead of âcontactâ
If you read my previous post, I had to change topic value âon-the-flyâ (from ON/OFF to OPEN/CLOSED), but since then I have already deleted the thing twice, unlinked/relinked channels, etcâŠ
Is there anything else I have to do to clean the past mistakes, or a way to force OH to classify those channels as contacts instead of switches? I cannot see any place in the UI where MQTT channles type can be changed.
No, you cannot change the Channel type on an automatically discovered MQTT Thing. But it should be choosing a Contact as the type anyway so either there is a bug in the MQTT binding that failed to detect that this is a Contact and not a Switch, or there is a bug in the device where it failed to report the correct information for the binding to correctly identify the Channel type. I donât know that much about Homie so beyond that I canât say.
I am going to file an issue for this, I think the device is OK, since I programmed it
Seriously, the only unknown in the homie specs is the sensor node attribute. There is no list of possible types, but I am wondering if the Autodiscovery infers the âOH-typeâ out of the type attribute. I quickly tried âcontactâ as sensor type but nothing changed.
Is the Homie binding maintainer around so he/she can shed some light on this issue?