Homie MQTT OH3 and MQTTfx Trying to Understand homie convention

I’m just getting started using OpenHAB3 but I’ve been using openHAB for years now.
I’m trying to figure out how I can send commands to homie devices using MQTTfx.
I am seeing all the required messages for my nodes but I can’t figure out how I can publish a command to tell my relay to turn on.

I am attempting to follow the homie command docs but the examples they provide don’t seem to be helping.
https://homieiot.github.io/specification/#property-command-topic

Here is my best guess at sending a command using MQTT.fx can anyone tell me if I’m even close?

Why not command your openHAB Item linked to the discovered Switch, and use mqtt.fx to monitor what it does?

As per the doc you linked

homie / device ID / node ID / property ID / set

Topic = homie/ESP3812C3/Relay/power/set
Message = true

Hello @denominator
I did publish the topic as instructed and it was received by the Subscribe in MQTT.fx but the relay didn’t turn on.

Hi @rossko57
At this point I don’t actually have a openHAB Item linked to the discovered thing.
OH3 did discover 3 nodes and created channels for them as seen here.


But none of the channels have items linked.

The channel or node named SwitchIn is actually a physical pushbutton switch attached to GPIO13 and


the ESPEasy software has a Rule telling the relay to turn on when the Switch goes low.

I do this so the relay doesn’t require the broker to be controlled.

Normally before attempting to use the homie convention I would send a MQTT command from OH to the relay or GPIO Pin the relay is attached to, thus controlling the relay with OH as well as the ability to just press the button on the device it’s self.

I could test using MQTT.fx by publishing this and it would turn on the relay.
image

But now I don’t know what the payload should be.
As mentioned the Topic = homie/ESP3812C3/Relay/power/set
Payload Message = true
Doesn’t do anything.
image

I feel like I should give up on homie but I like the idea of devices being auto generated.

I like MQTT Explorer better - especially for Homie and HA MQTT devices. It allows inspection of the Homie device and all the settings and types for nodes and properties.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.