We have moved at community.getvera.com

Author Topic: PLEG triggered by scene  (Read 1149 times)

Offline Duncank

  • Sr. Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
PLEG triggered by scene
« on: September 25, 2013, 08:41:39 am »
I'm very new to this and did some researching on this today but I can't seem to find a working way to do this.

I've created a scene (#3) that switches all the audio/video appliances in my living room on. But I want it to check if it is night, and then turn on a light behind my couch as well.

I've installed PLEG, armed it, installed day or night plugin, and added 2 triggers to pleg. "livingroom_on_trigger", which should run when scene number 3 is activated, and "night" which is true when the Day or Night-plugin says it is night now. But in the log-list for the PLEG-device only "night" shows as true, and the scene trigger never is true, so the light won't turn on.


I've also tried adding this to the scene manually with Luup, that worked already (turns out I was using wrong device id's in the beginning). But I still want to know if I can make use of a scene as a trigger for PLEG-commands.

Does somebody know what I'm doing wrong?
« Last Edit: September 25, 2013, 10:22:28 am by Duncank »

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: PLEG triggered by scene
« Reply #1 on: September 25, 2013, 11:28:07 am »
Quote
But I still want to know if I can make use of a scene as a trigger for PLEG-commands.
NO!

But you can have a Scene turn on a Virtual Switch that triggers PLEG.

But if you do that .. then use the Virtual Switch as the User Interface and dump the scene ... Put all the actions in PLEG.

Offline Duncank

  • Sr. Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
Re: PLEG triggered by scene
« Reply #2 on: September 25, 2013, 04:58:52 pm »
Okay thanks! Something like that crossed my mind earlier, but I focussed more on the scenes. I'm going to try your way now, it's looking good so far!

Offline Duncank

  • Sr. Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
Re: PLEG triggered by scene
« Reply #3 on: September 26, 2013, 06:26:54 pm »
New developments:

Creating this with a virtual switch and PLEG worked! Thanks for your help!
But I've got one extra question about virtual switches:

I've got a Master Switch for my living room. which turns three lights on and off, but there is some PLEG-scripts involved for deciding if it is night or day.

But if I turn on one or two lights manually, it would be nice to still be able to switch the Master Switch off again (it wasn't turned on in this case, but the off button is always visible), to shut off all the lights in the living room. But if the state of the master switch doesn't change, it seems PLEG doesn't do anything. In one way that is ofcourse suspected behaviour, because I'm changing the switch from "off" to "off", but isn't their an option for me to add this functionality?

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: PLEG triggered by scene
« Reply #4 on: September 27, 2013, 06:11:39 am »
It's hard for me to understand your requirements. Please send a Status report ... then describe your problem in terms of the actual triggers and conditions.