We have moved at community.getvera.com

Author Topic: Which device triggered a Scene  (Read 777 times)

Offline jimmeyer

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Which device triggered a Scene
« on: September 05, 2015, 11:43:27 am »
Hi...

I have multiple devices that all trigger the same Scene...  In that Scene's Lua code is there a way to determine which device triggered that run?

Thanks

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Which device triggered a Scene
« Reply #1 on: September 05, 2015, 11:55:42 am »
Put code in the trigger to set a global variable which can be read by the scene.  This has been discussed quits bit in other threads.

-----

See, for example
http://forum.micasaverde.com/index.php/topic,10854.msg210229.html#msg210229
« Last Edit: September 05, 2015, 11:57:28 am 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.

Offline jimmeyer

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Which device triggered a Scene
« Reply #2 on: September 05, 2015, 12:07:55 pm »
akbooer...

Thanks for the quick reply....  I can do that but it sure would be nice if there was a Luua function that would return the ID of the device.


Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Which device triggered a Scene
« Reply #3 on: September 05, 2015, 12:24:03 pm »
Yes, all it would need is a parameter to the function call which is the trigger code - like other callbacks.  But it doesn't. So we have to live with it.
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.