OH3: karaf not updating contact

  • openHABian 3/3/0 p rPi4 with 4GB

I tried updating a contact in the karaf console to no avail:

openhab> openhab:send Shed_Mezzanine_Window_East CLOSED
Error: Command 'CLOSED' is not valid for item 'Shed_Mezzanine_Window_East'
Valid command types are:
  RefreshType: REFRESH 

I also tried 0, OFF, Off, closed, close; neither works.

What am I missing?

A contact Item can not be used to send a command, other than REFRESH. If the linked Channel is capable to do this, it will then refresh the status

If you want to set the status of the Item, use openhab:update instead.
The difference is: openhab:send will send a command through the Item to the Channel(s) bound to the Items, while openhab:update will change the status of the Item itself.

3 Likes