Author Topic: Scenes - missing AND, need help for a solution  (Read 2577 times)

Offline ryvaenge

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Scenes - missing AND, need help for a solution
« on: October 28, 2018, 06:58:30 pm »
New user and disappointed already by the missing AND logic? see post years ago about the same.

Anyone who could help me out with a solution? lua? for this boiler control for underfloor heating.

Boiler ON: any of 3 relays is on, boiler is ON. (this is ok, this can be done in the UI)

Boiler OFF: all of 3 relays is off, boiler is OFF.



Offline Cristina

  • Support
  • Sr. Newbie
  • *****
  • Posts: 37
  • Karma: +6/-0
Re: Scenes - missing AND, need help for a solution
« Reply #1 on: October 29, 2018, 12:26:54 pm »
Hello,

For your scenario you can install the plugin Reactor ( Apps>Install apps ).  I would recommend you to check the following thread about this plugin:

http://forum.micasaverde.com/index.php?topic=87484.60

You can also see some examples about conditional scene, here:

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

Offline ryvaenge

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Scenes - missing AND, need help for a solution
« Reply #2 on: October 31, 2018, 06:08:08 pm »
I could really need some help to get started to understand this coding if anyone could please help. :o

Offline jvanhambelgium

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +2/-0
Re: Scenes - missing AND, need help for a solution
« Reply #3 on: November 01, 2018, 09:56:13 am »
I could really need some help to get started to understand this coding if anyone could please help. :o

REACTOR should be pretty easy to work with.
On the top you have "Conditions" and also "Activities"
Start populating your "Conditions" box/group with the items you need, within a box/group it is "AND" and multiple such boxes/groups are evaluated "OR" style.
So simply select the 3 "relays".

A switch,relay is under the "Service/Variable" , so select this, then the next drop-down box you can scroll and find those 3 "relays" that need to be "ON" in order to make this "True"
The "status" of such relay is probably called "Target" and value you put "1" (=on) or "0" (=off)

Eg. in my case I have a switch I check like this.

Service/Variable / #3452 My Lamp / Target / Not Equals / 1

So reactor will evaluate this as TRUE IF my lamp is currently NOT active.

Then go to "Activities" en simple select the "Scene" you can to run when the status become TRUE and another scene if FALSE (so the "tripping" and "un-tripping")
You cannot select a "device" , but you must make 2 new scenes, "Manual" trigger. So no schedule, no LUA-code, nothing fancy.

BOILER_ON , a "Manual Triggered" scene and simply select the relay/device that drives your boiler and enable it
BOILER_OFF , a "Manual Triggered" scene and simply select the relay/device that drives your boiler and disable it

Then in REACTOR you associate them : TRIP_SCENE = BOILER_OFF , UNTRIP_SCENE = BOILER_ON

So basically if ANY of the 3 relays are NOT "OFF" then the BOILER_ON is "triggered"




Offline ryvaenge

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Scenes - missing AND, need help for a solution
« Reply #4 on: November 02, 2018, 11:35:32 am »
Thank you jvanha, I will give it a try.

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 161
  • Karma: +3/-1
Re: Scenes - missing AND, need help for a solution
« Reply #5 on: November 02, 2018, 09:34:59 pm »
What happend if lua crash with reactor?

Offline ryvaenge

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Scenes - missing AND, need help for a solution
« Reply #6 on: November 05, 2018, 05:05:42 pm »
Thank you jvanhambelgium, that was easy explained, and worked.



This is off topic, but my whole project with my existing parts stops of the missing opportunity to selct secure or non secure.

Where can I se if an added device is added as secure non secure?

Same problem with smartthings, testing out on both hubs.

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1382
  • Karma: +36/-35
Re: Scenes - missing AND, need help for a solution
« Reply #7 on: November 12, 2018, 07:10:51 pm »
What happend if lua crash with reactor?


My understanding, like PLEG, Reactor will pick up where it left off.
Vera 3, 1.7.1030, CT101, Everspring motion sensor, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb, Hue, Alexa

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 161
  • Karma: +3/-1
Re: Scenes - missing AND, need help for a solution
« Reply #8 on: November 12, 2018, 08:07:28 pm »
What happend if lua crash with reactor?


My understanding, like PLEG, Reactor will pick up where it left off.

Those it mean no more : Error in lua for scenes and events  ?

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1382
  • Karma: +36/-35
Re: Scenes - missing AND, need help for a solution
« Reply #9 on: November 12, 2018, 08:28:41 pm »
What happend if lua crash with reactor?


My understanding, like PLEG, Reactor will pick up where it left off.

Those it mean no more : Error in lua for scenes and events  ?


I would guess. I have not seen that kinda of error in a number of years.  I have been using PLEG for a couple of years and even when I have a LUUP restart in the middle of logic, it just continues.

As an example, at 530 am, my bedroom ceiling fan turns off and 2 nightstands ramp up to full brightness in about 60 seconds. There have been times when the lights stop ramping up, for like a minute, and then continue ramping.  My Pushover notifications indicate there was a LUUP restart at 5:30, which interrupted the ramp up, but PLEG continued it once Vera was back up and running.
Vera 3, 1.7.1030, CT101, Everspring motion sensor, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb, Hue, Alexa