Unfortunately Vera does not support the Multilevel Motor Class. If you want to close a shutter partially you need a workaround. This workaround is depending on the manufacturer of the device.
Example code:
[i][size=9pt]function SunCoverDiningRoomDown()
luup.call_action(“urn:upnp-org:serviceId:WindowCovering1”,“Down”,{ },32)
end
function SunCoverDiningRoomStop()
luup.call_action(“urn:upnp-org:serviceId:WindowCovering1”,“Stop”,{ },32)
end
function SunCoverUtilityRoomDoor()
luup.call_action(“urn:upnp-org:serviceId:Dimming1”,“SetLoadLevelTarget”,{ newLoadlevelTarget=“88” },35)
end
luup.call_timer(“SunCoverDiningRoomDown”, 1 , “5”,“”,“”)
luup.call_timer(“SunCoverDiningRoomStop”, 1 , “19”,“”,“”)
luup.call_timer(“SunCoverUtilityRoomDoor”, 1 , “35”,“”,“”)
[/size][/i]
[ul][li]The Merten device (32) closes the dining room window shutter. The Motor needs to be stopped after some seconds. So that is why we need a timer. In my case 14 seconds is what I need for a partly covered window.[/li]
[li]The düwi device reacts (for what reason ever) on the dimmer command. So we set the value of the utility room door (device 35) to “88”.[/li]
[li]The second timer ensures a delay of 30 seconds after starting to close the dining room shutter. That look’s a bit more natural when you are not at home.[/li][/ul]
To open the shutters it’s again a bit tricky. Using the dimmer command will not open the shutter to the end position but close to that. So that is why we use the window cover command class. Problem here is that düwi inverts the commands up=down and down=up.
Example code:
[i][size=9pt]function SunCoverDiningRoomEnd()
luup.call_action(“urn:upnp-org:serviceId:WindowCovering1”,“Up”,{ },32)
end
function SunCoverUtilityRoomEnd()
luup.call_action(“urn:upnp-org:serviceId:WindowCovering1”,“Down”,{ },35)
end
luup.call_timer(“SunCoverDiningRoomEnd”, 1 , “5”,“”,“”)
luup.call_timer(“SunCoverUtilityRoomEnd”, 1 , “35”,“”,“”)[/size][/i]