Two problems I have got:
a) the stateTopic mower/stopped has value true (if stopped) and false (when mower running). I tried to inverse this, so switch should be ON when state publishes false and OFF when state publishes true
b) In documentation of robonect I found, the control receives start, mower will start, with stop will stop. (https://forum.robonect.de/viewtopic.php?t=3930
But with the defined channel, I cannot see any MQTT control (checked with MQTTAnalyzer App)
Anyone more familiar with mqtt has got an idea? Or already got Robonect working mqtt only?
There is only one on and off parameter for a Channel which does the translation for both the stateTopic and the commandTopic. Given that each topic uses different values for ON/OFF you’ll have to use a rule or separate Items for this.
You might be able to set up two Channels, one for the state and another one for the command and link both to the same Item.
Note, for the commandTopic wouldn’t you really want R2D2/mower/control?
Yes, bindings like zwave or weather can “know” exactly what a channel represents, and suggest options for Item. It’s like force-feeding metadata to the linked Item.
Generic MQTT could reprsent anything.
It’s not user-adjustable at the channel point, because you should be doing your “presentation” settings in the Item metadata.
Could you tell me the reason why you changed to MQTT?
I struggled a little at the beginning with my robonect cause the channels are a bit weird but with two rules (still DSL) handling the status and start/stop-channels I’m now quite happy with the functionality.
rule "Bewaesserung Command"
Member of BewaesserungG received command
if ( receivedCommand == ON )
sendCommand(triggeringItemName + "_start", "ON")
else if ( receivedCommand == OFF )
sendCommand(triggeringItemName + "_stop", "ON")
rule "Bewaesserung Change"
Member of BewaesserungG changed
if ( newState == "CLOSED" )
until yet I didn’t changed, but testing with MQTT.
Well, because the robonect binding sometimes not really work well in my case (with rain, the wlan connection is at the limit), I have got a mix of http things via API for commands and some status informations, robonect-Binding, a self written API the mower sends new status to and so on.
Especially status changes via robonect sometimes needs some minutes before openHAB shows via binding.
To simplify I now test with mqtt, furthermore mqtt gives some more interesting informations, like substatus, blades etc. my hope is to use mqtt and http for commands so much less code and complexity
yes, you might get some additional status information via mqtt (but that doesn’t solve the wifi-problem. You considered a repeater…?). I have good wifi in my garden, so status change is really accurate.
I would be interested if you are able to grab something useful via mqtt, so maybe you could report in this thread?