[solved] Robonect - Unable to change mode in rule

Hi all,

I am using the robonect binding to integrate my Gardena Sileno City 250 in my openHAB setup.

Now I was trying to change the mode of the mower from auto to home and vice versa. But that doesn’t work. What am I doing wrong?

rule "Mähpause bei Regen"
when

Item NetatmoRegen_Rain1h changed 

then

if (NetatmoRegen_Rain1h.state > 0|"mm") {
    logInfo("Regelwerk", "Es hat geregnet in der letzten Stunde. Kein Mähen eingestellt!")
    Shawn_MowerStatus.sendCommand(1) //home
} else {
    logInfo("Regelwerk", "Es hat nicht geregnet in der letzten Stunde. Shawn darf raus!")
    Shawn_MowerStatus.sendCommand(4) //auto
}

end

Any help would be great!

Thank you.

Cheers Roman

When I use the following (witch was my first guess)

Shawn_MowerStatus.sendCommand("HOME")

I get the following error message

2020-08-30 16:53:14.865 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert 'home' to a command type which item 'Shawn_MowerStatus' accepts: [DecimalType, QuantityType, RefreshType].

Hi guys,

just take a break for a few minutes. That usually helps. I took the wrong channel. Of course it must be the mode and not the status…

Now it looks like this and it works!

rule "Mähpause bei Regen"
when

Item NetatmoRegen_Rain24h changed 

then

if (NetatmoRegen_Rain24h.state > 0|"mm") {
    logInfo("Regelwerk", "Es hat geregnet in den letzten 24 Stunden. Kein Mähen eingestellt!")
    Shawn_MowerMode.sendCommand("HOME")
} else {
    logInfo("Regelwerk", "Es hat nicht geregnet in den letzten 24 Stunden. Shawn darf raus!")
    Shawn_MowerMode.sendCommand("AUTO")
}

end