Author Topic: New Plugin: Reactor  (Read 3702 times)

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +66/-0
Re: New Plugin: Reactor
« Reply #60 on: July 12, 2018, 09:15:02 am »
I discovered a typo in the UI for service conditions--the menu subkey for the "not equals" condition was "><" instead of "<>". @Nameless, this is surely why your not equals condition is not working as expected.

This will be fixed when 1.3 is released, but I have no plan to do that for a couple of weeks (I'm going on a short vacation in the interim). To get a patched file that you can upload to fix this issue now, please download the stable branch version of J_ReactorSensor_UI7.js (right-click this link and choose Save link as..., or your browser's equivalent). Then use the uploader at Apps > Develop apps > Luup files to send the file up to your Vera.

Then, go into the conditions editor, and select "equals", hit Save, then re-select "not equals" and hit save. This will update your config to store the correct subkey, and you should be good to go.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline dJOS

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #61 on: July 13, 2018, 01:11:03 am »
I've found a bug in 1.2 that wasn't present in 1.1 (afaik) - I'm getting a generic notification from one of my "Sensors" instead of the configured notification (was working until the 1.2 update):

HAC: Vera Plus | Voice Control: Amazon echo's | Z-Wave Devices: Aeotec Smart Switches & Garage Door Opener | Thermostats: nest's

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +66/-0
Re: New Plugin: Reactor
« Reply #62 on: July 13, 2018, 10:42:20 am »
I've found a bug in 1.2 that wasn't present in 1.1 (afaik) - I'm getting a generic notification from one of my "Sensors" instead of the configured notification (was working until the 1.2 update):

I'm not sure I can actually have any influence over that. The notification mechanism are pretty much up to Luup and user configuration. I used to get a lot of the generic notifications, but got most of them to stop. Go to the "Dashboard" and click the arrow to the right of "My Modes" (above the Home house mode icon). That's where you change how Vera changes the arming state of sensors in various house modes, and who gets notified with those generic notifications when sensors trip.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline dJOS

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #63 on: July 13, 2018, 11:30:15 pm »
I've found a bug in 1.2 that wasn't present in 1.1 (afaik) - I'm getting a generic notification from one of my "Sensors" instead of the configured notification (was working until the 1.2 update):

I'm not sure I can actually have any influence over that. The notification mechanism are pretty much up to Luup and user configuration. I used to get a lot of the generic notifications, but got most of them to stop. Go to the "Dashboard" and click the arrow to the right of "My Modes" (above the Home house mode icon). That's where you change how Vera changes the arming state of sensors in various house modes, and who gets notified with those generic notifications when sensors trip.

Yeah you are correct, it's a Vera stuff-up, I checked my email logs and the notification is ok there.
« Last Edit: July 13, 2018, 11:33:01 pm by dJOS »
HAC: Vera Plus | Voice Control: Amazon echo's | Z-Wave Devices: Aeotec Smart Switches & Garage Door Opener | Thermostats: nest's

Offline xo

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #64 on: July 18, 2018, 04:28:25 pm »
Hi that plug in looks great. How can i make a Trigger for this case:

2 Fibaro Dimmer 2 one of the is in the wall and one is in the cabinet lights. The last one is wired with an hardware motion-sensor that is acting like an switch. I want to create something like if motion is detected turn on the cabinet lights and if the light is not enough then ramp up the main light. That is the other Dimmer. Also i want to create an smart off scene, not just off when motion is done. How can i trigger it to switch of when there is no motion but do not switch of if the light is turn on manually by the wall-switch? 

Offline bRock

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #65 on: July 19, 2018, 08:32:23 am »
Hi rigpapa, I just wanted to thank you for putting together such a great app.
This fills so many holes and there is nothing I cannot achieve by using this app.
So great work and I felt dutifully obligated to tip a little into your hat. 

It is very logical, easy to use with fantastic trouble shooting capability, leaps and bounds above everything else!
I've managed to reduce complicated PLEG programming down to simple logical packets all controlled by your Reactor app.

I just wanted to second the idea quoted below, if you could possibly wrap up control of devices within one 'switch', that would make vera the complete unit.
Currently with the complex automation I've put in place, I need 1x reactor to turn on a light, 1x reactor to turn off the same light, then a subsequent scene for each reactor. If this could all be done in 1x reactor switch that would make my life complete. If it was possible for you to have the same simple UI to build a scene like control of devices, and even add option for LUA programming, there would be nothing your app couldn't do in my humble opinion.

Btw, have you thought about making the sensors fully self contained? You could then have full if then else scenes?

Yes, I'm thinking about what can be done better. I don't just want to duplicate the function of scenes just to have it integrated. That would just trade away its current light weight for a little convenience, which I don't see as a good trade. All ideas are welcome.

Again, thank you for sharing such a great app and keep up the great work!!

Offline dJOS

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #66 on: July 20, 2018, 07:08:21 am »

Currently with the complex automation I've put in place, I need 1x reactor to turn on a light, 1x reactor to turn off the same light, then a subsequent scene for each reactor. If this could all be done in 1x reactor switch that would make my life complete. If it was possible for you to have the same simple UI to build a scene like control of devices, and even add option for LUA programming, there would be nothing your app couldn't do in my humble opinion.

Btw, have you thought about making the sensors fully self contained? You could then have full if then else scenes?

Yes, I'm thinking about what can be done better. I don't just want to duplicate the function of scenes just to have it integrated. That would just trade away its current light weight for a little convenience, which I don't see as a good trade. All ideas are welcome.

Again, thank you for sharing such a great app and keep up the great work!!

That's exactly what I'm doing too, and i'd love to bypass vera scene's entirely - I still find I have to rely on them for certain things and they are never reliable!
HAC: Vera Plus | Voice Control: Amazon echo's | Z-Wave Devices: Aeotec Smart Switches & Garage Door Opener | Thermostats: nest's

Offline dJOS

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #67 on: July 20, 2018, 07:21:18 am »
I've found a bug in 1.2 that wasn't present in 1.1 (afaik) - I'm getting a generic notification from one of my "Sensors" instead of the configured notification (was working until the 1.2 update):

I'm not sure I can actually have any influence over that. The notification mechanism are pretty much up to Luup and user configuration. I used to get a lot of the generic notifications, but got most of them to stop. Go to the "Dashboard" and click the arrow to the right of "My Modes" (above the Home house mode icon). That's where you change how Vera changes the arming state of sensors in various house modes, and who gets notified with those generic notifications when sensors trip.

Yeah you are correct, it's a Vera stuff-up, I checked my email logs and the notification is ok there.

Ok so Im not having any issues with notifications from anything else but this one logic sensor and only since the upgrade to 1.2.

I've deleted the notification and re-created it, deleted the entire logic sensor and re-created it but the problem persists. It worked for quite a few days perfectly, on v1.1, but on 1.2 the push notification is garbled.

Im not sure when the upgrade happened, but even the email notifications changed their format sometime after July 9th (Aus time)

From this:

Code: [Select]
Event "Garage Door has been open for more than 30 minutes" was triggered by device "Garage Door Open" in room "_Logic Sensors".
to this:

Code: [Select]
A door/window was opened at 2018-07-11 11:49:08. Reported by Kilsyth Villa serial #50106742 device #89 "Garage Door has been open for more than 30 minutes" in "_Logic Sensors". Alert ID #16896357131
any ideas, was this a Vera Change or Reactor?  The latter seems more likely atm as the FW hadnt been updated until mid this week - prior to that was May iirc.
HAC: Vera Plus | Voice Control: Amazon echo's | Z-Wave Devices: Aeotec Smart Switches & Garage Door Opener | Thermostats: nest's

Offline xo

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #68 on: July 21, 2018, 06:46:15 am »
can somebody take a look to the reactor logic?

The plan is to make a smart floor light. Involved are 2 Fibaro Motion-sensors they have to ramp up the light when motion is detected an light lvl is below x.

I'm not sure that i have understand the conditions right. Is there an Howto or something like this? I'm a bit flashed from the options.

Edit: What for a service variable is for the doubble-click by the fibaro dimmers?
« Last Edit: July 21, 2018, 07:48:04 am by xo »

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +66/-0
Re: New Plugin: Reactor
« Reply #69 on: July 21, 2018, 09:06:29 pm »
can somebody take a look to the reactor logic?

The plan is to make a smart floor light. Involved are 2 Fibaro Motion-sensors they have to ramp up the light when motion is detected an light lvl is below x.

I'm not sure that i have understand the conditions right. Is there an Howto or something like this? I'm a bit flashed from the options.

Edit: What for a service variable is for the doubble-click by the fibaro dimmers?

You should probably be using the "Tripped" variable for the motion sensors. Otherwise you are on the right track in general.

As for the double-click... no clue. I don't have any Fibaro devices in my network, so I don't know how they behave. Anyone?
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline 5boysretreat

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #70 on: July 22, 2018, 10:25:59 am »
Is there a way to set a condition for the sensor which compares 2 system variables?  I want to know if the thermostat set point is below the ambient room temperature (the thermostat sensor value)

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +66/-0
Re: New Plugin: Reactor
« Reply #71 on: July 22, 2018, 10:47:41 am »
Is there a way to set a condition for the sensor which compares 2 system variables?  I want to know if the thermostat set point is below the ambient room temperature (the thermostat sensor value)

Not in the current version, but that is under development.
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline xo

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: New Plugin: Reactor
« Reply #72 on: July 22, 2018, 03:34:25 pm »
Well i'm try with something easier to start.

An entry light just with one sensor. It has to switch the lamp on when it is Motion detected and the light lvl is under x. This creates an Rector sensor witch is tripes if the conditions are true. So i have to create an
"Normal" Scene where i put the lamp on with the reactor sensor as trigger. So i'm also need an OFF scene where i have create another reactor sensor with an timer for 30 sec after the last motion. Is the Reactor Senor automatically lose his tripped status?

Please take a look that i have make it right.

I'm not really familiar with this conditions, maybe somebody can me point in the right direction? In the Manual from Fibaro is nothing to find about this conditions.
« Last Edit: July 22, 2018, 03:39:33 pm by xo »

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 467
  • Karma: +66/-0
Re: New Plugin: Reactor
« Reply #73 on: July 22, 2018, 04:16:02 pm »
Well i'm try with something easier to start.

An entry light just with one sensor. It has to switch the lamp on when it is Motion detected and the light lvl is under x. This creates an Rector sensor witch is tripes if the conditions are true. So i have to create an
"Normal" Scene where i put the lamp on with the reactor sensor as trigger. So i'm also need an OFF scene where i have create another reactor sensor with an timer for 30 sec after the last motion. Is the Reactor Senor automatically lose his tripped status?

Please take a look that i have make it right.

I'm not really familiar with this conditions, maybe somebody can me point in the right direction? In the Manual from Fibaro is nothing to find about this conditions.

1. The screen shot with conditions for Bejarat_Motion and Bejarat_Light... this condition will be met when the motion sensor is tripped AND the light level is less than or equal to 2. That seems to match your general description for that goal.

2.  The screen shot with condition for Bejerat_Motion only... this ReactorSensor will become tripped 30 second after the motion sensor has signalled that it has not sensed motion. I emphasize signalled there because it depends on when the motion sensor itself resets its tripped state. Most motion sensors have some kind of timing period, sometimes a few seconds, but many several minutes by default, where it will not issue repeated motion events after detecting the first. This is often called the reset period. It prevents the sensors from rapidly reporting motion-no motion-motion-no motion-motion-no motion-motion-no motion when you walk through a room, for example. You will need to look at your motion sensor's hardware/firmware documentation, and find this timing setting and how to set it, and set it to a value that makes sense for you. Since these sensors are often battery powered, short values are generally not recommended, as this can cause a lot of report in busy rooms, and thus a big increase in battery consumption of the device. But, if you were to set the motion sensor up for a 60-second reset period, it means the motion sensor would not tell Vera that there is no motion until 60 seconds after it (the motion sensor itself) does not sense any motion, then Vera gets the reset signal and will set Tripped=0 for the motion sensor, which starts the ReactorSensor "sustained for" timing. That is, your ReactorSensor won't start timing until that change at the Vera, 60 seconds after motion stopped, and that time in combination with your ReactorSensor setting (sustained for 30 seconds) means the light would not be signalled to turn off for up to 90 seconds (60+30). It may be that you don't need to use the "sustained for" option in Reactor at all. If you can set your motion sensor for a 30-second reset period, it will automatically provide you the delay effect you want, without further work on the part of Reactor. But this is entirely dependent on your motion sensor and what it can do for configuration. I have a couple of sensors that use a single jumper-plug inside on the board for this timing, so my choices are either 4 seconds (jumper on) or 4 minutes (240 seconds, jumper removed). To get a 30-second off delay, I would have to set my sensor's jumper for the 4-second timing, and then use a 26-second "sustained for" in my ReactorSensor.

I would also recommend that this "off" ReactorSensor look at the "on" ReactorSensor to make sure it's tripped. The motion sensor alone will trip and untrip regardless of the light level, so during the day, your simple "off" ReactorSensor as you currently have it will fire every time the motion sensor resets, but you really only want it to run the off scene after the "on" sensor has tripped and the "on" scene has run. So make your "off" ReactorSensor look at both the motion sensor (Tripped=0) and "on" ReactorSensor (Tripped=1).

3. Your scene trigger to turn the light on looks correct.

4. You didn't show a scene trigger for turning the light off. You need one of those, too, triggered by the ReactorSensor in #2.
« Last Edit: July 22, 2018, 04:17:44 pm by rigpapa »
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.