ReadOnly Items -- what does the Wiki mean by that?


So reading over the OpenHAB MiOS Binding Wiki page, it says all items are, by default, read only (data flows only from Vera -> OH).

Does that means you have to specially modify the items in order to turn lights on/off (as an example) from an OH rule?

I could have sworn that most of my stuff like .sendCommand(ON) is working fine, but I don’t have any of the “command:” stuff the wiki mentions in my items.

So wanted to ask for clarity – are there certain items types that are ‘bi-directional’, or is it a matter of “commands” not being part of the “read only” aspect (i.e. changing item.state won’t flow back to Vera, but sendCommand() will)?

I think I know the answer, but reading it over again left me with some doubts.



The core-engine of the MiOS Binding will bring data from Vera to openHAB.

In order for data to flow in the opposite direction, the core-engine has to be taught how to make that happen. For Vera, Device data changes are made via UPnP [like] Action calls. openHAB needs to know about these, and provides the “[tt]command=[/tt]” parameter on the Item’s MiOS Binding definition to let users specify the form of those UPnP Action calls (they’re custom by Device/ServiceId/Action combo).

For many common devices, like MiOS Switches, Dimmers, Thermostats (etc) there are a set of internal default values for this “[tt]command=[/tt]” parameter (etc) so these components work out of the box (and aren’t read-only)

When you come across a component not listed in the MiOS Binding doc, it’ll be read-only until you provide the [tt]command=[/tt] mapping.

[tt]sendCommand()[/tt] calls will invoke the internal handler in the MiOS Binding, which looks up the value in the [tt]command=[/tt] parameter of the corresponding Item Binding.

If it’s blank, it’ll lookup the internal default. If that’s blank, then the Command is ignored.

The MiOS Binding only reacts to openHAB Commands, not Item changes/updates. Control points, like the Classic UI, throw Commands when changes are made to the widgets so this is what the binding is listening for.

[tt]sendMiosAction()[/tt] calls bypass all that, and allow you complete control over what is sent, but it uses the same underlying URL-building logic to actually call the MiOS UPnP Action on Vera.