Hey guys,
My usb died and now I’m trying to set up my system again. I have latest 2.5 release and I’m trying to set up roomba trough MQTT (2). Brooker works fine, I’m receiving wifi status messages and also some state of robot. But I’m not able to start any command. I receiving this message in console:
[WARN ] [nhab.binding.mqtt.action.MQTTActions] - MQTT publish to cmd failed!
Things:
Bridge mqtt:broker:roomba “Roomba” [ clientID=“XXX”, host=“10.1.0.9”, port=8883, secure=true, username=“XXX”, password=“XXX”, certificatepin=true, publickeypin=true ]
{
Thing topic state “Roomba state” {
Channels:
Type string : wifistat “WiFi” [ stateTopic=“wifistat” ]
Type string : shadow “Status” [ stateTopic=“$aws/things/CLIENTID/shadow/#”]
}
}
Items:
String Roomba_command “Roomba command” (gRoomba)
String Roomba_Wifi “Roomba Wifi [%d dB]” (gRoomba)
String Roomba_Battery “Roomba Battery [%d %%]” (gRoomba)
…
Rules:
…
val RuleRoombaActions = getActions(“mqtt”,“mqtt:broker:roomba”)
val GetCommandJSON = [ String command | String::format(“{“command”:”%s",“time”:%d,“initiator”:“localApp”}“, command, now.millis / 1000) ]
val GetSettingJSON = [ String command | String::format(”{“state”:“%s”}") ]
…
rule “Roomba command”
when
Item Roomba_command received command
then
if (Roomba_command.state == “start”){
RuleRoombaActions.publishMQTT(“cmd”, GetCommandJSON.apply(“start”))
}else if(Roomba_command.state == “stop”){
RuleRoombaActions.publishMQTT(“cmd”, GetCommandJSON.apply(“stop”))
}
…
Can somebody please help me?
Thanks