Repository navigation
Commanding
Commands can be sent using different mechanisms. One way is to send commands with rules. An example rule that triggers on motion detection and turns on the screen could look like this:
rule "HABPanelViewer Screen"
when
Item Motion_Contact changed from OPEN to CLOSED
then
Tablet_Command.sendCommand("SCREEN_ON");
end
This assumes that there is a contact item named Motion_Contact (that is configured as motion contact in HPV) and that the command item is named Tablet_Command.
Things to check in case HPV does not receive commands:
- Make sure you have the server URL (without path) in the Server URL preference, e.g. https://openhabserver:443
- Make sure this URL is shown in the menu (instead of "not connected")
If both of these are okay, the next thing to check is whether HPV can get updates from the server:
- Open the following URL in chrome on your device:
server URL/rest/events?topics=smarthome/items/name of command item/command
(make sure you replace server URL and name of command item with correct values)
This should look as if the page is loading. If you now send a command to the command item with openHAB, you should see the command in the browser. Use a rule and sendCommand in order to send a command (not postUpdate!). If this does not work, check if your firewall allows your devices to communicate in the network.