We have moved at community.getvera.com

Author Topic: creating scenes with remote device triggers  (Read 2595 times)

guest20975

  • Guest
creating scenes with remote device triggers
« on: November 27, 2015, 11:48:10 am »
Back again :'(. I'm trying to create a scene on openLuup using a Visiongarage door detector (basically a tilt switch which vera edge insists is a motion detector) on my vera edge to switch on garage hue light  native to openLuup when door opens, and then a scene to switch of light when door shuts. I seem to have no luck with creating scenes using triggers, any help appreciated. I can create scenes with timers and remote devices which work. ;) Edit found akbooers earlier post which said use "ALTUI device-variable triggers", but can't find any form of tutorial on these.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: creating scenes with remote device triggers
« Reply #1 on: November 27, 2015, 12:10:19 pm »
I seem to have no luck with creating scenes using triggers, any help appreciated. I can create scenes with timers and remote devices which work.

Quote from: openLuup User Guide, version 2015.11.17, p. 3
...supports scenes with timers and ALTUI-style triggers

openLuup doesn't use Vera-style triggers - it won't even store them if you try and use the AltUI interface to create them.  This is, perhaps, your difficulty.  The answer lies in the AltUI-style device-variable watch triggers described here http://forum.micasaverde.com/index.php/topic,33308.msg248521.html#msg248521 and modified/extended slightly in subsequent posts.

The key, then, is the +Watch button, instead of the +Trigger button in the scene editor.  Then pick your device and variable of interest from the menu, and either type in a condition (to evaluate to true if you want the trigger to run the scene.)  Or use the 'blockly' editor to construct the code.

This should get you on the way, but ask again if you need more.

« Last Edit: November 27, 2015, 12:19:12 pm by akbooer »
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

guest20975

  • Guest
Re: creating scenes with remote device triggers
« Reply #2 on: November 29, 2015, 06:39:20 am »
tried with the following; device is garage door detector, variable is tripped condition is (new=="1")
This is meant to switch on a light when the door opens. That doesn't happen (nor does the opposite scene of (new=="0") work when door shuts with light on), am I doing this all wrong?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: creating scenes with remote device triggers
« Reply #3 on: November 29, 2015, 08:40:25 am »
tried with the following; device is garage door detector, variable is tripped condition is (new=="1")
This is meant to switch on a light when the door opens. That doesn't happen (nor does the opposite scene of (new=="0") work when door shuts with light on), am I doing this all wrong?

Well, you might be... or I might have done something wrong.

  • You have actually saved the scene with the defined trigger?
  • You can see the variable on the AltUI devices variable "VariablesToWatch" ?
  • You don't see the scene trigger in the log /etc/cmh-ludl/LuaUPnP.log file?
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

guest20975

  • Guest
Re: creating scenes with remote device triggers
« Reply #4 on: November 29, 2015, 10:15:15 am »
1. scene saved with defined trigger yes
2.variables to watch "urn:micasaverde-com:serviceId:SecuritySensor1#Tripped#0-10167#1448703346#(new == '1')#<xml xmlns="http://www.w3.org/1999/xhtml"><block type="when" x="192" y="86"><value name="Condition"><block type="logic_compare"><field name="OP">EQ</field><value name="A"><block type="new_value"></block></value><value name="B"><block type="text"><field name="TEXT">1</field></block></value></block></value></block></xml>;urn:micasaverde-com:serviceId:SecuritySensor1#Tripped#0-10167#1448703553#(new == '0')#<xml xmlns="http://www.w3.org/1999/xhtml"><block type="when" x="-2" y="-18"><value name="Condition"><block type="logic_compare"><field name="OP">EQ</field><value name="A"><block type="new_value"></block></value><value name="B"><block type="text"><field name="TEXT">0</field></block></value></block></value></block></xml>"
3.No scene trigger  in /etc/cmh-ludl/LuaUPnP.log file, I always see scene runs where timer used.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: creating scenes with remote device triggers
« Reply #5 on: November 29, 2015, 10:40:53 am »
Does this work if you try the same process directly on Vera, rather than openLuup?

The blockly garbage is difficult to interpret, but as I understand it:
  • your device number is 10167
  • your trigger condition is (new == '1')
...but I am a bit distressed to see deeper the code "(new == '0')" there too.

Another thing to try would be simply to write the condition as true and see if it triggers both on open and close.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

guest20975

  • Guest
Re: creating scenes with remote device triggers
« Reply #6 on: November 29, 2015, 11:54:03 am »
It did work on the vera before I removed the Hue lights to openLuup. tried writing the condition as true (and "true") no success!!

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: creating scenes with remote device triggers
« Reply #7 on: November 29, 2015, 12:36:43 pm »
Back again :'(. I'm trying to create a scene on openLuup using a Visiongarage door detector (basically a tilt switch which vera edge insists is a motion detector) on my vera edge to switch on garage hue light  native to openLuup when door opens, and then a scene to switch of light when door shuts. I seem to have no luck with creating scenes using triggers, any help appreciated. I can create scenes with timers and remote devices which work. ;) Edit found akbooers earlier post which said use "ALTUI device-variable triggers", but can't find any form of tutorial on these.

Maybe off topic but you can change it from a motion sensor to a door sensor if you wish by going in the advanced tab of the vera an modify these:
category_num     4
subcategory_num    1
device_json   D_DoorSensor1_json
device file D_DoorSensor1.xml
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

guest20975

  • Guest
Re: creating scenes with remote device triggers
« Reply #8 on: December 13, 2015, 05:08:16 am »
problem solved although not sure why, used watched variable tripped (new=="1") for open door and (new=="0") for closed