MiOS Action - sprehn/openhab GitHub Wiki
Documentation for the MiOS Action Binding.
This binding exposes openHAB Rule extensions to be used with the MiOS Bridge Binding.
It exposes the ability to do the following things in the MiOS HA Controller from within openHAB Rules:
-
Device Actions
- Asynchronously invoke MiOS Device Actions involving 0, 1 or more parameters. -
Scenes Invocation
- Asynchronously invoke MiOS Scenes
The MiOS Action Binding depends upon the installation of the MiOS Bridge Binding, and need only be installed if the target deployment uses MiOS Action extensions in it's Rules.
- 1.7.0 - First release
The MiOS Action Binding relies upon the MiOS Bridge Binding being installed and configured, and the installation of the MiOS Action Binding Bundle (JAR) file. Once these are done, you're ready to use the Rule extensions this bundle provides.
Add-on Actions - MiOS Action
-
sendMiosAction(Item item, String action)
- requests the parameterless Device Action, specified throughaction
, be invoked on the MiOS Device bound toitem
. -
sendMiosAction(Item item, String action, List<<String,Object>> params)
- as above, but for parameterized Device Actions. -
sendMiosScene(Item scene)
- requests the scene associated with thescene
parameter be invoked on the MiOS Unit.
The action
string, of the sendMiosAction
extension, is a string of the form:
<ServiceURN>/<ServiceAction>
or
<ServiceAlias>/<ServiceAction>
where ServiceURN, ServiceAlias and ServiceAction have the same form as described in MiOS Bridge Binding commands.
You can use the MiOS invoke
URL to discover the Actions, and Action-parameters, your particular MiOS Device supports:
http://<mios:host>:3480/data_request?id=invoke
The available ServiceAction's are described in the MiOS Luup UPnP Variables and Actions documentation.
- Invoking a Device Action and calling a Scene to turn off the AV.
rule "Test action rules Off"
when
Time cron "0 45 23 * * ?"
then
sendMiosAction(FamilyMainLightsId, "Dimmer/SetLoadLevelTarget", newArrayList('newLoadlevelTarget' -> 0))
sendMiosScene(SceneGoodNight)
end
- Invoking a Sonos Device on MiOS to say something
rule "Test action say"
when
Item HallGarageDoorZoneTripped changed to OPEN
then
sendMiosAction(OfficeSonosId, "Sonos/Say", newArrayList('Text' -> 'Warning! Garage door opened', 'Volume' -> 50))
end