for my automation I use a Beckhoff PLC. I’ve been writing blocks and code to have my PLC implement the homie protocol for easy discovery and implementation on the OH3 side.
OH3 is finding my PLC and all of my nodes and properties. Some of which have $settable = true. However when clicking a switch inside OH, no /set message is being sent to my device. The /set topic is working on my PLC because if i send it manually using a MQTT client the device responds correctly. Also the $datatype seems to be ignored and blank inside the OH UI.
EDIT: Just to make sure I made all nodes and properties lowercase and use hyphens instead of underscores, as this is what the homie spec requires. But no change.
Please show us the item definition.
EDIT: Ugh, after manually selecting the data type I never clicked done/save. Having now done so I can finally see the light status and even turning the lights on and off is working. I’m guessing the only question that remains then is why it won’t take over the datatype value from the homie definition?
So here’s an updated image from Mqtt Explorer:
So this is what my plc ‘thing’ channels look liike:
And here’s the channel details. The green marked thing i had to set manually. By default it’s blank.
Then i go to the model builder, select my location, then do ‘create equipment from thing’. The green marked things are things i need to change:
And this is what the created item looks like:
[See edit above, no longer valid] -But its not working. The status is wrong and i can’t change it.-
EDIT: Issue was found. My device was sending '$datatype ’ with an added space at the end as topic.