Author Topic: How to: activate scene per click type for roller shutter device  (Read 675 times)

Offline toffi77

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
How to: activate scene per click type for roller shutter device
« on: February 08, 2017, 09:50:27 am »
I am a newcomer to ZWAVE and VERA. Just installed my first module yesterday which is the Fibaro roller shutter FGR-222
I would like to configure my system so that the shutter switch (3 state momentary : up/idle/down) will do this:
  • Single click up : open blind all the way
  • Single click down : close the blind all the way
  • Double click up : open blind to mid position of 20%
  • Double click down : close the blind to mid position of 20%

Can this be done?
Do I need to install and use PLEG and PLC for this?
I have 14 shutters in the house and would like to have this set separately for each shutter control device - will I need more than 1 license of these APPs?

and the big question:
Can someone give me a step-by-step explanation of how to do this? or does this info already exist anywhere?

Offline toffi77

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: How to: activate scene per click type for roller shutter device
« Reply #1 on: February 08, 2017, 10:00:04 am »
I have the VERA PLUS with UI7 installed

Offline toffi77

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: How to: activate scene per click type for roller shutter device
« Reply #2 on: February 08, 2017, 03:59:48 pm »
found this post in the forum:
http://forum.micasaverde.com/index.php/topic,32811.0.html

I added this code in "APPS-->Develop apps-->edit startup LUA":
Code: [Select]
function dispatch_roller_shutter(dev_id, service, variable, old_val, new_val)

  -- retrieve LastSceneID from the device
  new_scene = luup.variable_get(service, "LastSceneID", dev_id)
  new_scene = tonumber(new_scene)
  luup.log("dispatcher - roller shutter")

  -- trigger the related scene
  if (new_scene==14) then
    luup.log("double click up")
    luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum="5" }, 0)
--  elseif (new_scene==15) then
--    luup.log("triple click up")
--    luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum="3" }, 0)
--    luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum="4" }, 0)
  elseif (new_scene==24) then
    luup.log("double click down")
    luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum="4" }, 0)
--  elseif (new_scene==25) then
--    luup.log("triple click down")
--    luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum="2" }, 0)
--    luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{ SceneNum="5" }, 0)
  end
  return true
end


luup.variable_watch("dispatch_roller_shutter", "urn:micasaverde-com:serviceId:SceneController1","LastSceneTime", 006)

I marked out the lines which have to do with "triple click" since I do not need it right now.

but still did no tmanage to get the switch to react to the double click.

What might I be missing or doing wrong?

Offline zedrally

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +0/-0
  • Black Cat Controllers & Control Systems
    • Black Cat Control Systems
Re: How to: activate scene per click type for roller shutter device
« Reply #3 on: February 08, 2017, 04:15:06 pm »
I'd use PLEG and the count function.
Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, then some  Black Cat Cat's Eye PIR's & Door-Window Sensors plus a Z-UNO or 2.

Offline toffi77

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: How to: activate scene per click type for roller shutter device
« Reply #4 on: February 08, 2017, 05:13:28 pm »
I'd use PLEG and the count function.
Could you elaborate please?

Offline zedrally

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +0/-0
  • Black Cat Controllers & Control Systems
    • Black Cat Control Systems
Re: How to: activate scene per click type for roller shutter device
« Reply #5 on: February 08, 2017, 07:31:59 pm »
my bad, I meant multi trigger.


It's all in PLEG Basics


http://forum.micasaverde.com/index.php/topic,21603.0.html


RTS makes it easy with the editor. You can;t help but get the syntex correct.





Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, then some  Black Cat Cat's Eye PIR's & Door-Window Sensors plus a Z-UNO or 2.

Offline Gabriel

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +2/-0
Re: How to: activate scene per click type for roller shutter device
« Reply #6 on: April 12, 2017, 05:49:53 am »
I marked out the lines which have to do with "triple click" since I do not need it right now.

but still did no tmanage to get the switch to react to the double click.

What might I be missing or doing wrong?
In case you are still looking for a solution:
  • Have you enabled the scene controller mode of your Fibaro module (param 50 for FGRM-222)? Out of the box it is not enabled.
  • I'm not sure if your device number should be "006" or just "6"