I had an existing rule that turns on my Kitchen ceiling lights to 100% when motion is detected.
I want to make a change so that when Vera is in Night Mode the lights will instead turn on to 25% brightness.
I have added a Constraints Group in to the Set Reaction and set it to OR :
Is this likely to work or not ?
Or do I need two Constraints Groups within the Set Reaction ?
I can test it later on when its time to put Vera in to Night mode.
How are folks handling situations where they want to have Conditional Actions or Branching Logic in their Set Reactions for a rule? Are you creating Duplicating the same trigger and setting different conditions and Actions?
Is there an approach where you combine a main rule with your entity triggers with sub rules that trigger off Expressions? You then could write your conditions as Set Variable actions in the Main Rule for the Expressions that evaluate to true or false. Each sub rule would trigger based on the expression changing to true and then could also change it back to false after.
Not sure if that's worth the complexity for the reusability and control over duplicate triggers.
I am not a programmer, so I am picking this up piece by piece.
I would like to use a rule-based expression to store the current value of a dimmer, change the dimmer value, then change it back to the stored value.
I have a working global expression that I have used.getEntity( "VeraShop>device_24" ).attributes.dimming.level
I have a blank global expression ready to use in "set variable" that is available to set.
I am stuck with the formatting of the "set variable" field to set the variable. If I get pointed in the right direction, I am fairly confident I can get the rest going on my own. .
Thanks in advance
This was working and tested previously, but now doesn't seem to be.
I turned the heating on earlier, however I have since turned if off again. However the trigger in this rule still says the current set point value is 21. Its not its currently 10.
A window was just opened and a TTS heard, which drew my attention to this rule now as it should not of fired its actions.
Vera variable now:
Thermostat device information from the Entities:battery_power.level=0.49 battery_power.since=1620139135000 hvac_control.mode=null hvac_control.state=null hvac_heating_unit.setpoint=21 hvac_heating_unit.state=null hvac_heating_unit.units="c" power_switch.state=null value_sensor.units="c" value_sensor.value=18.1 x_vera_device.configured=true x_vera_device.device_number=189 x_vera_device.device_type="urn:schemas-upnp-org:device:Heater:1" x_vera_device.failed=false x_vera_device.mapped_by="*;device_type=urn:schemas-upnp-org:device:Heater:1" x_vera_device.mapped_class="heatonly_thermostat" x_vera_svc_micasaverde_com_HaDevice1.AutoConfigure="-1" x_vera_svc_micasaverde_com_HaDevice1.BatteryDate="1620139135" x_vera_svc_micasaverde_com_HaDevice1.BatteryLevel="49" x_vera_svc_micasaverde_com_HaDevice1.CommFailure="0" x_vera_svc_micasaverde_com_HaDevice1.CommFailureAlarm="1612455867,0" x_vera_svc_micasaverde_com_HaDevice1.CommFailureTime="0" x_vera_svc_micasaverde_com_HaDevice1.Commands="heater_setpoint" x_vera_svc_micasaverde_com_HaDevice1.Configured="1" x_vera_svc_micasaverde_com_HaDevice1.FirstConfigured="1485879775" x_vera_svc_micasaverde_com_HaDevice1.LastUpdate="1607103908" x_vera_svc_micasaverde_com_HaDevice1.ModeSetting="1:;2:H,10.0;3:H,10.0;4:H,10.0" x_vera_svc_micasaverde_com_HaDevice1.PollRatings="5.00" x_vera_svc_micasaverde_com_HaDevice1.WakeupRatings="5.00" x_vera_svc_micasaverde_com_HaDevice1.sl_BatteryAlarm="0" x_vera_svc_micasaverde_com_ZWaveDevice1.AssociationGet="2,190,;" x_vera_svc_micasaverde_com_ZWaveDevice1.AssociationNum="5" x_vera_svc_micasaverde_com_ZWaveDevice1.AssociationSet="2,190" x_vera_svc_micasaverde_com_ZWaveDevice1.Capabilities="18,150,0,1,8,0,B,|49:1,67,112,114,128,132:2,133,134," x_vera_svc_micasaverde_com_ZWaveDevice1.ConfiguredAssoc="2,190" x_vera_svc_micasaverde_com_ZWaveDevice1.ConfiguredName="" x_vera_svc_micasaverde_com_ZWaveDevice1.ConfiguredVariable="1-variable 1,1d,255,2-variable 2,1d,1,3-variable 3,1d,10" x_vera_svc_micasaverde_com_ZWaveDevice1.ConfiguredWakeupInterval="300" x_vera_svc_micasaverde_com_ZWaveDevice1.FirmwareInfo="" x_vera_svc_micasaverde_com_ZWaveDevice1.LastArr="1620138237,69" x_vera_svc_micasaverde_com_ZWaveDevice1.LastNnu="1620137632,69" x_vera_svc_micasaverde_com_ZWaveDevice1.LastReset="1485882104" x_vera_svc_micasaverde_com_ZWaveDevice1.LastRouteUpdate="1620109432" x_vera_svc_micasaverde_com_ZWaveDevice1.LastWakeup="1620152934" x_vera_svc_micasaverde_com_ZWaveDevice1.ManufacturerInfo="89,1,3" x_vera_svc_micasaverde_com_ZWaveDevice1.MeterScale="" x_vera_svc_micasaverde_com_ZWaveDevice1.MeterType="" x_vera_svc_micasaverde_com_ZWaveDevice1.MultiChCapabilities="" x_vera_svc_micasaverde_com_ZWaveDevice1.MultiChEndpoint="" x_vera_svc_micasaverde_com_ZWaveDevice1.NodeInfo="31,43,70,72,80,84,85,86," x_vera_svc_micasaverde_com_ZWaveDevice1.PollNoReply="378" x_vera_svc_micasaverde_com_ZWaveDevice1.PollOk="16295" x_vera_svc_micasaverde_com_ZWaveDevice1.PollSettings="10800" x_vera_svc_micasaverde_com_ZWaveDevice1.SensorBiType="" x_vera_svc_micasaverde_com_ZWaveDevice1.SensorMlScale="" x_vera_svc_micasaverde_com_ZWaveDevice1.SensorMlType="" x_vera_svc_micasaverde_com_ZWaveDevice1.SetPointInfo="H1," x_vera_svc_micasaverde_com_ZWaveDevice1.SubscribedAlarms="" x_vera_svc_micasaverde_com_ZWaveDevice1.TemperatureScale="1,0,2" x_vera_svc_micasaverde_com_ZWaveDevice1.VariablesGet="1,255,2,1,3,10," x_vera_svc_micasaverde_com_ZWaveDevice1.VariablesSet="1-variable 1,1d,255,2-variable 2,1d,1,3-variable 3,1d,10" x_vera_svc_micasaverde_com_ZWaveDevice1.VersionInfo="2,2,78,6,0" x_vera_svc_micasaverde_com_ZWaveDevice1.WakeupInterval="300" x_vera_svc_micasaverde_com_ZWaveNetwork1.ConsecutivePollFails="0" x_vera_svc_micasaverde_com_ZWaveNetwork1.LastPollSuccess="1620149034" x_vera_svc_upnp_org_Dimming1.LoadLevelTarget="58" x_vera_svc_upnp_org_HVAC_UserOperatingMode1.ModeStatus="HeatOn" x_vera_svc_upnp_org_SwitchPower1.Target="0" x_vera_svc_upnp_org_TemperatureSensor1.CurrentTemperature="18.10" x_vera_svc_upnp_org_TemperatureSetpoint1.AllSetpoints="10.00,0.00,5.00" x_vera_svc_upnp_org_TemperatureSetpoint1.CurrentSetpoint="10.00" x_vera_svc_upnp_org_TemperatureSetpoint1.NewCurrentSetpointC="23" x_vera_svc_upnp_org_TemperatureSetpoint1.NewCurrentSetpointF="73.4" x_vera_svc_upnp_org_TemperatureSetpoint1.Range="0,0/0,0;0,0/0,0;5,30/41,86" x_vera_svc_upnp_org_TemperatureSetpoint1.SetpointTarget="10.00" x_vera_svc_upnp_org_TemperatureSetpoint1_Heat.CurrentSetpoint="21.00" zwave_device.capabilities="18,150,0,1,8,0,B,|49:1,67,112,114,128,132:2,133,134," zwave_device.failed=false zwave_device.manufacturer_info="89,1,3" zwave_device.node_id=57 zwave_device.version_info="2,2,78,6,0" Capabilities: battery_power, hvac_control, hvac_heating_unit, power_switch, toggle, value_sensor, x_vera_device, x_vera_svc_micasaverde_com_HVAC_OperatingState1, x_vera_svc_micasaverde_com_HaDevice1, x_vera_svc_micasaverde_com_ZWaveDevice1, x_vera_svc_micasaverde_com_ZWaveNetwork1, x_vera_svc_upnp_org_Dimming1, x_vera_svc_upnp_org_HVAC_UserOperatingMode1, x_vera_svc_upnp_org_SwitchPower1, x_vera_svc_upnp_org_TemperatureSensor1, x_vera_svc_upnp_org_TemperatureSetpoint1, x_vera_svc_upnp_org_TemperatureSetpoint1_Heat, zwave_device Actions: hvac_control.set_mode, hvac_heating_unit.set_setpoint, power_switch.off, power_switch.on, toggle.toggle, x_vera_device.set_variable, x_vera_svc_micasaverde_com_HaDevice1.AllowPairing, x_vera_svc_micasaverde_com_HaDevice1.Poll, x_vera_svc_micasaverde_com_HaDevice1.Reconfigure, x_vera_svc_micasaverde_com_HaDevice1.Remove, x_vera_svc_micasaverde_com_HaDevice1.SetPollFrequency, x_vera_svc_micasaverde_com_HaDevice1.StressTest, x_vera_svc_micasaverde_com_HaDevice1.ToggleState, x_vera_svc_micasaverde_com_ZWaveNetwork1.AddNodes, x_vera_svc_micasaverde_com_ZWaveNetwork1.BackupDongle, x_vera_svc_micasaverde_com_ZWaveNetwork1.DownloadNetwork, x_vera_svc_micasaverde_com_ZWaveNetwork1.HealNetwork, x_vera_svc_micasaverde_com_ZWaveNetwork1.PollAllNodes, x_vera_svc_micasaverde_com_ZWaveNetwork1.PutByte, x_vera_svc_micasaverde_com_ZWaveNetwork1.ReconfigureAllNodes, x_vera_svc_micasaverde_com_ZWaveNetwork1.RemoveNodes, x_vera_svc_micasaverde_com_ZWaveNetwork1.ResetNetwork, x_vera_svc_micasaverde_com_ZWaveNetwork1.SendData, x_vera_svc_micasaverde_com_ZWaveNetwork1.SetPolling, x_vera_svc_micasaverde_com_ZWaveNetwork1.SimulateIncomingData, x_vera_svc_micasaverde_com_ZWaveNetwork1.UpdateNeighbors, x_vera_svc_micasaverde_com_ZWaveNetwork1.UpdateNetwork, x_vera_svc_upnp_org_Dimming1.PauseRamp, x_vera_svc_upnp_org_Dimming1.ResumeRamp, x_vera_svc_upnp_org_Dimming1.SetLoadLevelTarget, x_vera_svc_upnp_org_Dimming1.SetOnEffect, x_vera_svc_upnp_org_Dimming1.SetOnEffectLevel, x_vera_svc_upnp_org_Dimming1.SetRampRate, x_vera_svc_upnp_org_Dimming1.SetStepDelta, x_vera_svc_upnp_org_Dimming1.StartRampDown, x_vera_svc_upnp_org_Dimming1.StartRampToLevel, x_vera_svc_upnp_org_Dimming1.StartRampUp, x_vera_svc_upnp_org_Dimming1.StepDown, x_vera_svc_upnp_org_Dimming1.StepUp, x_vera_svc_upnp_org_Dimming1.StopRamp, x_vera_svc_upnp_org_HVAC_UserOperatingMode1.SetEnergyModeTarget, x_vera_svc_upnp_org_HVAC_UserOperatingMode1.SetModeTarget, x_vera_svc_upnp_org_HVAC_UserOperatingMode1.SetName, x_vera_svc_upnp_org_SwitchPower1.SetTarget, x_vera_svc_upnp_org_TemperatureSensor1.SetApplication, x_vera_svc_upnp_org_TemperatureSensor1.SetName, x_vera_svc_upnp_org_TemperatureSetpoint1.SetApplication, x_vera_svc_upnp_org_TemperatureSetpoint1.SetCurrentSetpoint, x_vera_svc_upnp_org_TemperatureSetpoint1.SetName, x_vera_svc_upnp_org_TemperatureSetpoint1_Heat.SetApplication, x_vera_svc_upnp_org_TemperatureSetpoint1_Heat.SetCurrentSetpoint, x_vera_svc_upnp_org_TemperatureSetpoint1_Heat.SetName, zwave_device.poll
In the rule if I change the trigger to use this Entity Attribute instead, then now its correctly showing 10 as the current set point.
In my Vera config I have two SiteSensors (one for Ambient Wx, one for OpenWxMap) that point to two unique Reactor devices for controlling HVAC in my home. This is done for redundancy - if the Ambient API drops it returns zero data which then triggers a standalone Master API Reactor device to flip on the OWM SiteSensor and corresponding HVAC Reactor device to continue controlling the house conditions.
Once the Ambient API returns to available the Master API Reactor device flips back to the Ambient SiteSensor and corresponding HVAC Reactor device, turning OFF the SiteSensor for OWM to save on API calls.
I've been able to duplicate one half of this, including the Master API role, in MSR. But... here's the tricky part... I can't turn "off" the MSR Rule Sets for the OWM version. As such, HVAC is sent conflicting data and doesn't know what to do.
Before I go alls deep into explaining how all of this currently works, am I missing something somewhere that would allow me to trigger the on/off of MSR Rule Sets?
Knowing that MSR Preview may not yet fully implement LuaXP (CORRECTION: MSR uses a different language lexpjs), I could not resist whipping up some text expressions for fun. Whereupon two things popped out at me:The new scaling (0.00 - 1.00) of Dimming Level will require a rewrite of certain Expressions that I use to balance my light levels. For example, it was my custom to monitor one lamp's brightness (0 - 100) with Reactor Luup, then set another lamp to 93% of that level, using this Expression: floor(getstate( 9, "urn:upnp-org:serviceId:Dimming1", "LoadLevelTarget" ) * 0.93)
Now, in MSR, it will become necessary to modify that to read:floor ((getEntity( "vera>device_9" ).attributes.dimming.level * 0.93)*100)/100
which effectively scales the value up x 100 (so that floor() can act upon it correctly), then downscale it / 100. Just an FYI to ponder.I'm noticing that every edit, however minor, of an Expression in MSR requires an immediate SAVE click before the 'Run' button will become active. That is to say, I cannot repeatedly evaluate the Expression during editing, without clicking SAVE first.
Only mentioning this latter behavior since it departs so dramatically from Reactor Luup's paradigm.
OK, people, here we go! At long last, Multi-System Reactor developer preview is available!
The package can be downloaded from the Reactor bug tracker, a MantisBT system (at https://reactor.toggledbits.com/mantisbt/). There is a download button in the left margin, as well as links to the documentation, which you will need for installation.
UPDATE 2021-02-24 -- To keep spammers off, I've locked down registration on the Bug Tracker. To get access to the Bug Tracker and preview downloads, please PM me (not reply here) your full name and email address and I will set up an account for you.
This version of MSR will run on Linux systems, including RPi's under Raspios Buster, running node.js version 12.10 or higher (v14.15.1). For RPi users, there is an installation script that will install a local copy of node.js (for the logged-in user).
Bugs reports will be handled through the bug tracker only. Discussion and questions in this forum are fine, though (if that leads to a bug report, we'll transition).
This version supports Vera (and openLuup to the degree it's compatible with Vera Luup), Hubitat, and Home Assistant. Some of the device support on the H platforms is still a bit basic, but it is largely controlled by configuration and progress can be made quickly.
The documentation beyond installation is a mess. Of course, I started with the existing documentation and have been massaging into MSR's particulars, but it still has a long way to go on the detail.
I know I don't have to say this, but I will anyway... let me know how it goes!
Inspired by my love for MSR as a logic engine, as well as my undying nostalgia for two early console games -- Merlin (1978) by Parker Brothers and Lights Out (1995) by Tiger -- I decided to try my hand at recreating "LIGHTS OUT" just using MSR.
After an evening of playing around with Expressions inside a single Rule, my gambit succeeded. The result is a 3x3 version of "Lights Out" that can be played on any suitably configured Dashboard (Home Remote, Imperihome, MSR's built-in, etc.), where multiple buttons can be arranged in a grid. To play without a Dashboard, one can advance play manually and monitor game status under Rule Sets.
Each button press must send an HTTP GET Request (examples to follow) to MSR. (Alternatively, game play could involve inputs from another Rule or even physical device.) In turn, MSR will toggle the virtual switch corresponding to that position on the grid along with those adjacent to it in the up/down/left/right directions. The objective is to turn all of the devices (e.g. lights) OFF.
NOTE: This on/off behavior (of devices) is not yet implemented, as it would require nine virtual or actual switches that I have not installed. (Suitable candidate: Multi-switch VS in Switchboard on Vera.) Instead, as a proof of concept, the 3x3 playing grid is -- for now at least -- represented internally by a 9-element array of 0's (Off) and 1's (On). A player 'wins' once the array contains all zeroes.
In the posts below, I present how I crafted "Lights Out" in MSR.
One of the things I really like about Home Assistant are these "input_boolean", "input_number", "input_text" and "input_select" components that serve as data containers. The "input_boolean" component, for example, functions in the same way as a virtual switch, holding a boolean state and allowing you to modify that state. The "input_select" holds a defined set of values, as opposed to "input_text" which just accepts anything. There's even an "input_datetime" object.
I can see these being far more useful than trying to shoehorn more flexible behavior into virtualized models of existing devices, so this is the direction I'm thinking of going for MSR. One thing I really like is that the flexibility of them is sufficient to eliminate the need for expressionless variables in many, if not most, cases.
I just added a GET for this as well just for simplicity/basic use only, to be in next build:
I updated and tried this:http://192.168.0.100:8111/api/v1/variable/run/set?value=123
"run" is the name of my Global Expression.
In the web browser I get this response:Cannot GET /api/v1/variable/run/set
I can't see anything related in the reactor log file.
I would like to replicate a burglar alarm setup I currently have configured with Vera scenes.
I need an entry timer of 60 seconds before the siren goes off.
So the door sensor is armed, I enter the house, this trips and starts a 60 second count down timer.
If within the 60 seconds I have disarm the house, then the siren does not sound and all the door / window contact sensors are disarmed etc and Vera put in to Home Mode.
If I do not disarm the house within the 60 seconds then the siren should sound etc.
Currently I am using three scenes in Vera and the Count Down Timer plugin to achieve this.
The first scene "Burglar Alarm" its triggers are that an armed door / window sensor is tripped. It then also starts the 60 second count down timer.
The second scene "Burglar Alarm Delayed" its trigger is that the count down timer completes. i.e. I have not disarmed the house within the 60 seconds count down, so this second scene would then sound the siren.
If I did disarm the house within the 60 seconds, which is the third scene "Home" which cancels the count down timer, then the second scene is not triggered and therefore the siren does not sound.
I am not sure what is the best way to handle this? or even how to do this count down timer in MSR ? A count down timer that I can stop when I disarm the house, so it does not complete or it does complete if I haven't disarmed the house in time.
This is all I have so far the triggers and the constraints that those door sensors must be in Armed state.
For those using the Home Remote dashboard app, this maybe of interest, Bill has just shown me how to more easily either create buttons on your own custom pages or "Scene" devices / tiles on Group pages, that when pressed will send out HTTP commands to MSR, to then run either a Global Reaction or a Rule Set that is triggered via a Global Expression value change.Apr 29 Feature Request - Make it easier to create button to send HTTP requests Feature Request - Make it easier to create button to send HTTP requests
I have managed to create two buttons that when pressed they send out a HTTP request. One button was an ON command and the other button was an OFF command. I followed the example here However for creating lots of buttons with this functionality I can see it being very difficult and a lot of hassle...
Been wanting to be able to do this for a while now.
This is a custom page with regular buttons, these two test buttons are initiating Global Reactions in MSR:
This is a GROUP page with "Scene" tiles, these are initiating Rule Sets in MSR:
Everyone: for some weeks now, I've buried myself in getting as much done on MSR as possible before this coming week. This is the week I had planned to put out the first developer preview of MSR, and it's looking good for that to happen.
The first previews will be for Linux-based systems only, and will not be docker containers, but stand-alone installs. You'll need to be running a fairly modern version of Ubuntu, Debian, etc. (so that includes RPi Raspios Buster).
What I really need at this early stage is people who will give me good, solid data on what doesn't go well. I really cannot, at this stage, spend time with anyone who isn't functionally fluent with Linux system administration. While I suspect most of the people here are already firmly in the former camp, I'm about to make a public announcement on the Vera forums that I suspect will drive a new cadre of people here, so the mix may change a bit. But it's simply a fact that the better the information I get up front, the faster I can fix things that have gone wrong, thus the more I can fix in any given period of time, and the sooner it will be that my time will be freed so I can start helping everyone.
I will be using this community as the focus of communication, as in, announcements and discussions. For issues, however, I have set up a MantisBT (Mantis Bug Tracker) server at https://reactor.toggledbits.com/mantisbt/ and I invite and encourage you to sign up. I will only address bugs opened in that tool. This is an administrative choice to keep me somewhat sane and not be overwhelmed by juggling feedback from however it might come at me. I'm pipelining the process.
There's still a lot to do. I've been running my own house on it, but as I've often said, that's me running it one way -- one data point. I'm sure there will be a lot to look at. There are still some functional gaps, and the documentation is a mess, but I think that's less of an issue for current Reactor users than it is for newcomers.
Stay tuned... more to follow....
I just tried editing an existing rule with quite a lot of actions in its Reaction, at the end of all these I added a new Constraints Group however I then cannot save the rule the save button is not selectable.
There is also a red line down the side of the Constraints Group what does this mean ?
Build 21117 for longer Comments and HTTP Requests you now cannot see the contents of those fields, you have to drag the box down to make it bigger each time:
After making the box bigger, I can then read the entire comment
And HTTP Requests now always look like this:
"This feature applies to rule-based reactions only; it is not a feature of global reactions (and for the removal of doubt, will not be in future)"
Good news about the option for additional further conditions within actions.
I have a few existing rules I can rebuild for this new feature.
Also If not with Global Reactions, will we at some point be able to initiate a rule sets actions via a http request sent in to MSR?
And have no other trigger on that rule set?
A manually triggered "scene" if you like.
I have a docker running smoothly now, thought i'd share it. (and BTW, it looks awesome, Patrick!)
So far i've only opened 8111, and /config as volume. Mabye the full /reactor folder should be exposed for easy updating?
docker compose:version: "3.9" services: MSR: container_name: MSR restart: always image: perhu/msr-alpine:latest ports: - "8111:8111" networks: HAnett: ipv4_address: 192.168.0.8 volumes: - type: bind source: /etc/localtime target: /etc/localtime - type: volume source: MSR-config target: /etc/reactor/config - type: volume source: MSR-storage target: /etc/reactor/storage logging: driver: "json-file" options: max-file: "5" max-size: 10m networks: HAnett: name: HAnett driver: bridge ipam: config: - subnet: 192.168.0.0/16 gateway: 192.168.0.254 volumes: MSR-config: name: MSR-config MSR-storage: name: MSR-storage
dockerfile for those who want to modify the image: (this works if you have unzipped MSR zip file to the same folder as the dockerfile)FROM alpine:latest COPY /reactor/. /etc/reactor/ RUN apk add --update nodejs npm && cd /etc/reactor \ && npm install --loglevel error --no-save \ && cp dist-config/* config/ VOLUME ["/etc/reactor/config"] VOLUME ["/etc/reactor/storage"] EXPOSE 8111 CMD ["/bin/sh"] WORKDIR /etc/reactor CMD ["node", "/etc/reactor/app.js"]
EDIT: 20210307 - updated with localtime bind
I have a rule that closes my curtains when I start my Xbox activity on the Harmony hub.
In the Contraints I have that it's day time.
In the Reset Reaction it opens the curtains when I end the Xbox activity etc.
Today it was day time and I started the Xbox activity and the curtains closed.
When I turned off the Xbox it was night time, however my curtains then opened.
I expected the curtains to remain closed as by then it was night time.
Not sure the best way to handle this? But I want a rule that closes the curtains if it's day time and I want to play on the Xbox. If it's still day time when I end that Harmony Activity then open the curtains again. Or if it's night time then keep the curtains closed.
I figure if I start playing the Xbox and it's already night time then the curtains would already be closed anyway via the sunset offset schedule that closes the curtains.
How does MSR keep in sync with devices and scenes on Vera?
cw-kid last edited by cw-kid
I've been having trouble again, with a Qubino DC Shutter module today. I actually deleted one and added a new one.
Now in MSR I have several instances of "Lounge Blind"
Device number 644 is the one that is on Vera.
If I search Vera for devices numbered - 638, 643 they don't exist on Vera.
Also there is one in MSR called "device_642" that device doesn't exist on Vera either.
Also the device named _Window Covering with ID 640 that doesn't exist on Vera now rither.
So when devices or scenes are added or removed on Vera how does MSR keep in sync is there something I have to do ?
Right now, the VeraController interface does not attempt to remove devices that are no longer listed, because the way the controller and the Vera talk is via an initial query for all data, followed by queries for changes, and Vera doesn't advertise device removals as a change, it just stops reporting them. Related to this is the fact that Vera reloads for every darned thing, even if you look at it the wrong way, but oddly it doesn't reload when you delete a device (whisky tango...?). Consistency will never be something for which they are known, under any name. Anyway, I have ideas, but as long as she doesn't reload on delete, even my imagined fix will not work.
So the short answer for you is just reload Reactor.
I am just spitballing here because I know very little about the situation, but would it even be conceivable that Reactor running natively on Vera could somehow monitor the device list for removals? And report same to MSR via a HTTP request, etc?
Absolutely possible, and in fact, I have several ideas on how a "leave-behind" Reactor on the Vera could get other things done. But for the most part, I've found better workarounds (handling house mode is one example). But it remains an option.
cw-kid last edited by
Just installed the latest version, so had to stop and start MSR and the devices that were removed on Vera have now also gone from MSR.
LibraSun last edited by LibraSun
I've been noticing a consistent 2-second delay* between device state changes on Vera (e.g. a light turning OFF) and the corresponding change appearing in MSR's Scopes > Trace feature. Is that to be expected? And do we attribute that to Vera's delay in reporting status via HTTP?
* Mostly with HUE bulbs, which my Vera Plus controls via AltHUE plug-in. The delay is far less with Z-Wave components!
PerH last edited by
Isn't the vera updates based on polling? if so, it will only be updated at that interval.. I think the approach used in domoticz bridge is better, with some script on the host (domoticz in that case) yelling to the bridge on changes..
MSR uses Vera's long-polling feature, which means MSR makes an HTTP request for device changes, and the Vera doesn't respond for up to 15 seconds. If any device changes during that time, the Vera immediately responds with those deltas, MSR processes them, and then starts another request for more changes. While not as effective as a WebSocket always-up connection, for example, it's not much less responsive. And there is no "interval" that limits the refresh rate.
My guess is that the delay you are seeing is caused by the additional device communications required with the Hue hub. That communication not only has to happen, but it occurs when the Vera allows the plugin to run, and with whatever method the plugin uses for communication. I have mostly ZWave devices, and as you've observed, they're quick.
LibraSun last edited by LibraSun
I'm at the point in my MSR experimentation where I'm wondering how users are intended to handle Vera events that cause [DEVICE] [STATE] to [UPDATE] rather than just [CHANGE] value.
I recognize that MSR may not (yet) have access to such subtleties, so the absence of this feature may be a show-stopper for certain routines I've enjoyed back on RFL (Reactor for Luup). Among the examples, I can cite are button presses on my Scene Controller remote, for which it's insufficient to know WHEN and WHICH button was pushed, but THAT it was pushed at all and whether it was pushed AGAIN during a given interval.
TIP: My current workaround involves creating a Virtual Switch (using @rigpapa's Switchboard App, assigning it an auto-reset time of 1 sec.), along with a Reactor routine that is triggered by the Scene Controller's fleeting update of its sl_CentralScene attribute whenever a button is pushed on the remote. Over on MSR, I included an Expression whose status goes TRUE when that Virtual Switch on Vera turns on, and invoke that as a Trigger in a Rule. Works great so far!
I know Patrick has a roadmap for this functionality IF IT'S POSSIBLE (Spoiler alert: It's not, see below), and now I'm all the more curious to know how he plans to resolve it. Because it's going to be awesome, no matter what!
This is an issue particular to Vera and cannot be handled over the request API that MSR must use to communicate with Vera. So my roadmap for this functionality as a matter of making it work like it does in Reactor for Vera is dirt road to a dead end.
My suggested workaround is to use the "x_vera_device.set_variable" action to reset
sl_CentralSceneto a nonsense value (I use 0) as part of your reaction to responding to a particular value.
I had recalled you suggesting the dummy value approach, but I got scared and didn't implement it. Now that I'm confident once more it has your blessings, I shall proceed with that.
I'd spent most of my time yesterday trying to workaround not having .SETPOINT available to my ecobee thermostat device, namely by setting both of the available COOL.SETPOINT and HEAT.SETPOINT values (I'm paraphrasing) in MSR, but that seems to be a wrong approach. Only one of them seems willing to accept the change at a time, perhaps due to API lag.
Once MSR can push values to .SETPOINT per the .JSON mapping file I submitted, I'll be golden. It's fun waiting for stuff like that!
That's probably not the right approach for the thermostat. The device info you sent me actually shows that its a dual-setpoint thermostat with separate heating and cooling setpoints commands. The fact it has a single command which, I assume sets the setpoint for whatever the current operating mode is, seems to be an overloaded kludge and actually, really dangerous. The data you sent me shows that your thermostat is in auto mode, meaning it could switch between heating and cooling operating modes at will, so having a generic command in an automation to set whatever setpoint is currently in effect isn't deterministic for you: you need to also look at the thermostat's operating state, or more correctly, its last operating state (because its current state could be idle and that doesn't tell you), to know which setpoint that action would set. You could easily set your heat setpoint to 81 without knowing it. So....
- I have a different mechanism as a work in progress for controller-native actions that are not supported by the standard entity capabilities;
- Regardless of #1, setting the generic setpoint seems like a really bad idea and the more specific commands are better/safer.
Agreed. I'll just add that my workflow back on RFL indeed used the "common" setpoint for my purposes and it has worked awesomely without a glitch. Subject to two caveats in my case: (1) I purposely limited the Temp values (using ecobee's own in-device Settings) to which the thermostat can be set; and, (2) I never leave it set to AUTO, so the thermostat is always deterministically set to either HEAT or COOL.button is INCREMENT or DECREMENT by 1 degree the prevailing setpoint. When I bifurcated this into setting both the HEAT and COOL, rest assured I based my calculation off of each independently, so no wild swings were ever going to happen (but you were right to be concerned on that point).
I'll spend today revising the MSR workflow to (a) detect mode, (b) handle each case independently, (c) remove the virtual switch kludge, and (d) use the "reset sl_ variables" trick you suggested. CHEERS!
If you hold off on (a) and (b), you'll have my #1 in a day or two. I'm done with the changes for Hubitat and Hass, and Vera is that last I'm working on and the most difficult. If it's acceptably safe in your use case to use the single command, that's fine, you'll have it.
Roger that. While sage advice, bear in mind that I do these exercises as much to keep my brain active as to hone my MSR chops. I literally have nothing else to keep me occupied, lol. So I'll go put the finishing touches on the intermediate workflow, check that it works (which I know it will), and then look forward to stringing it all back together more efficiently next week.