We have moved at community.getvera.com

Author Topic: Window Coverings / Devices by düwi and Merten  (Read 4686 times)

Offline huwu

  • Full Member
  • ***
  • Posts: 233
  • Karma: +0/-1
Window Coverings / Devices by düwi and Merten
« on: April 26, 2010, 04:12:21 am »
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:
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","","")


  • 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.
  • 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".
  • 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.

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:
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","","")


« Last Edit: April 26, 2010, 05:12:30 am by huwu »
My Z-Wave:Vera3, VeraEdge, 4*Dimmer, 14*RollerShutter, 4*PlugIn,9*Binary, 8*SmokeSensor, 2*Remote, 1*Siren, 1*RangeExtender, 1*Sensor, 1*BatterySwitch. Devices from:Duewi, Merten, HomePro, Trickle, Everspring, Fibaro, Aeon, Vision and MiCasa Verde

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: Window Coverings / Devices by düwi and Merten
« Reply #1 on: April 26, 2010, 07:49:17 am »
Thanks for sharing your Lua scripts.

Just a word of caution:

If luup.call_timer("SunCoverDiningRoomStop", 1 , "19","","") fails and you are outside your home,
you may lock yourself out of your home ...

If this danger applies to you, you should adjust the running time of the window/door covering by setting the manufacturer specific Z-Wave parameters (and check that the reconfiguration of your device was successful ...).

merten:
http://forum.micasaverde.com/index.php?topic=1937.msg7147#msg7147

düwi:
http://forum.micasaverde.com/index.php?topic=3359.msg16142#msg16142
« Last Edit: April 26, 2010, 09:19:49 am by Ap15e »

Offline huwu

  • Full Member
  • ***
  • Posts: 233
  • Karma: +0/-1
Re: Window Coverings / Devices by düwi and Merten
« Reply #2 on: April 29, 2010, 03:15:00 am »
Thanks for the links and your concerns.

I have two other not Vera controlled doors. So being locked out is not really an issue.

Rgds,
My Z-Wave:Vera3, VeraEdge, 4*Dimmer, 14*RollerShutter, 4*PlugIn,9*Binary, 8*SmokeSensor, 2*Remote, 1*Siren, 1*RangeExtender, 1*Sensor, 1*BatterySwitch. Devices from:Duewi, Merten, HomePro, Trickle, Everspring, Fibaro, Aeon, Vision and MiCasa Verde