-
Been trying to call the service automation:trigger to trigger an automation on my HA. Below is the screenshot of the reaction but every time I hit the play button to test it nothing happens. I called the service locally on HA and it worked fine. MSR latest-22203-d7cd6357 and HA 2022.8.3. No errors in HASS logs or Reactor logs. 715cd920-effd-4d31-8ac3-ba34ef29185c-image.png
-
Hi!
In Home Assistant I sometimes uses the TTS, either to my Sonos or Google speakers. With reactor in Vera I also use TTS.
But in MSR I can't select the TTS-service. It's simply not there. Am I missing something, or is this the case, so far?
Thanks!
/Fanan -
I have the following rule:
Screenshot 2022-08-09 at 17.33.39.png
Use this to detect errors in Nibe uplink service, and every time updated data is fetched, a timestamp is stored. This triggered already yesterday, but re-triggered as I tried to manually recover this rule with a reset (hence there's no original "true as of xxx" time).
So as a clarification, service works now and timestamps are updated, but this rule does not "recover" (stays triggered / SET). Did also restart MSR during this situation, though it was not related to this.
The condition where there was no change (and rule was working correctly) lasted over 24 hours.
Running MSR 22179 on Synology Docker. Can PM relevant logs if needed.
-
I'd like to extract a specific part of a response to http request, in this case of link https://www.nibeuplink.com/Welcome#service_message. If there's something in "service_message" I'd store it & send using Telegram.
I reckon I'd have to use something similar as in this thread?
-
Deleted some entities from HA and added some new ones but MSR is still showing the old ones and not all of the new ones. I restarted MSR and it hasn't changed, is there anyway to manually discover new entities and delete the old ones? Most of the new entities have shown up but a few haven't, however none of the deleted entities were removed from MSR.
I checked the core.entity_registry in HA and none of the entities that are shown in MSR are there.
Edit: I see the delete option under the entities tab in MSR, is that the only way to delete them?
-
Successfully got MSR to run on a VM running Ubuntu 22.04 but am running into an issue with getting to run MSR as a service. Here is what my reactor.service file looks like below.
However when I go to run the service I see this error: reactor.service: Failed at step CHDIR spawning /usr/bin/node: No such file or directory. Checked and the node file exists in this directory. Kinda stuck at this point, probably a simple fix but I am way in over my head 😰
[Service] Type=simple User=armans2 WorkingDirectory=/home/reactor Environment=/home/reactor ExecStart=/usr/bin/node app -p Restart=on-failure RestartSec=5s -
Hey crew,
I'm running into an issue where MSR's reactions aren't successfully running, and I can't figure out what's gone wrong.Backstory-- we had a big thunderstorm roll through the other day, we lost internet and the storm got bad so I unplugged most items in my homelab, including the Pi that's running MSR.
Now that everything is powered back up, the reactions aren't running correctly. Most of my MSR automations are to use motion sensors to turn lights on/off, and I immediately noticed that even when a motion sensor is tripped, the light doesn't turn on like it's supposed to.
I've tested a bunch of things to see what's broken, here's what I've observed:
-I can successfully flip lights on/off manually within Vera
-I can successfully flip lights on/off manually within MSR's Entities section
-the motion motion sensors are correctly reporting to Vera and MSR (I can see when they're sensing motion)
-the rules within MSR are working correctly, I can see when they flip to 'true' when I walk by a motion sensor
-I can successfully run the Reaction within MSR (by hitting the 'play' button)But for whatever reason, when everything needs to work together, it doesn't successfully run the action. IE: the motion sensor trips, reports it to MSR, I can see MSR going "true" but the light does not turn on. Open to any suggestions, thank you!
SYSTEM
Vera has all my devices
MSR is running bare metal on Rpi "Reactor (Multi-hub) stable-22004-6d6c6b7" -
Apologies in advance, I expect I am going to make a total pig's ear of explaining, so please bear with me....
(and if it's in the manual, just tell me to read the manual)Going back to my heating scenario:
We have an alarm clock that goes off at a variable time.
We want the heating to go off at a time before that (1 hour)
so we have created the rule set as below:
Screenshot 2022-07-28 at 16.40.13.pngSo if current time is >= to the HeatTime, the first condition goes true.
The second condition is to ensure that nothing (tries to) turn(s) the heating off during that 1 hour window
The interval is there because in Reactor there was precisely that to (from memory) 'make sure the variables updated'
In the current state it kind of works. There is no Reset action, so the heat goes on once every 15 minutes during that hour.
In Reactor I didn't have to include the interval in the rule set. It was a stand alone rule as here:
Screenshot 2022-07-28 at 16.47.23.pngIf I move the Interval condition out of the rule set in MSR, things do not update as time changes (and the rule never sets)
So I guess the question I'm trying to ask it 'what causes expressions like
time() >= HeatTimeTo be evaluated, and is there a better way than I've done here?
Apologies again 😞
C
-
I've been running into an issue with a couple APIs wherein they return the error FetchError: network timeout....
A retry resolves but my ask here is around how I can monitor within MSR and trigger (at least) a notification if not a retry after a short delay.
-
Hi All -
I'm currently working through a slow migration from Vera to Home Assistant with MSR being a pivotal piece of the equation.
I have begun the effort of moving some ZWave devices as well (from Vera to HA). Unlike others that use Vera for the ZWave radio, I'm looking to completely remove it from my ecosystem, eventually.
My issue is I have some Vera Scenes that are designed to be manually executed by the Vera Mobile app. Examples: "Go to Sleep", "Panic - Lights On", etc (Wife Acceptance Factor)
I think MSR is the right place for any new "Scene" (including manual scenes); and from my reading, a Global Reaction makes sense.
Question 1: Can anyone recommend a way to execute a Global Reaction from a Vera scene? I've seen some examples of HTTP calls to MSR so I assume this is it (perhaps custom Luup which I know very little about).
Question 2: How can I (manually) execute this Reaction from Home Assistant? I'm slowly building out my custom Dashboard using "Mushroom".
Or, maybe there's a better way. Always open to constructive criticism.
Thanks.
-
I would like to extract the daily gas price from my fuel supplier's API. The http call is as follows: https://octopus.energy/api/v1/tracker/G-1R-SILVER-2017-1-M/daily/past/90/1/
I need to pick the current (i.e. today's) gas price. If I search through the text manually I can find today's data, in this case 2022-07-20.
Can I set MSR up to do a http request and then extract the "unit_rate" into a variable so that I can set another rule up to determine if it would be cheaper to heat my hot water using the immersion heater or gas (FYI my off peak electricity price is £0.075 per kwh). Any help or guidance as always is much appreciated.
I'm running MSR on raspberry PI 4 in docker version 22168
Thanks.
{ "date": "2022-07-20", "market_index": 62.8463, "cost": 15.094631164947945, "standing_charge": 15.0885, "unit_rate": 8.211, "usage": 0.0007467013698630137, "unit_charge": 0.0061311649479452055, "breakdown": { "unit_charge": { "Wholesale cost": 6.28463, "Environmental & social obligations": 0.0, "Delivery & networks": 0.9681, "100% green": 0.0, "Administration, financing & margin": 0.56727, "VAT": 0.391 },` -
Build 21228 has been released. Docker images available from DockerHub as usual, and bare-metal packages here.
Home Assistant up to version 2021.8.6 supported; the online version of the manual will now state the current supported versions; Fix an error in OWMWeatherController that could cause it to stop updating; Unify the approach to entity filtering on all hub interface classes (controllers); this works for device entities only; it may be extended to other entities later; Improve error detail in messages for EzloController during auth phase; Add isRuleSet() and isRuleEnabled() functions to expressions extensions; Implement set action for lock and passage capabilities (makes them more easily scriptable in some cases); Fix a place in the UI where 24-hour time was not being displayed. -
Well the use of expressions in my Idiot Question over there has opened many new and exciting doors which I am itching to run through. This one has slammed in myu face 😞
So in reactor we have an expression:
getstate( 46, "urn:upnp-org:serviceId:VClock1", "AlarmTime" )
which returns
Last result: "05:15:00"
Then we convert this to time one hour earlier:
time(AlarmTime) - 3600
which returns
Last result: 1658373300Cool!
In MSR:
getstate is not supported
getEntity("vera>AlarmClock").attributes.x_vera_svc_upnp_org_VClock1.AlarmTime
Returns:
Last value: (string) "05:15:00"
Marvellous!
time (AlarmTime)
Returns
Last value: (null) nullBoo! Hiss!
OK seriously, is there a reference I've missed or somewhere I can look at this stuff. time() in Lua returns the epoch time which is fab, but what's my equivalent to the time usage in Reactor?
TIA
C -
Starting to (very slowly) migrate and improve some of my automation from Reactor to the fabulous MSR. Couple of questions which are probably really obvious but, well, you know me 😞
Is it possible to repeat an action from a set rule? i.e. if the rule remains triggered for an hour, re-run the set reaction. And to continue re-running that every hour until the rule is reset?
Sorry if it's really stupid.
C
-
Hi, I have a rule that I have been using in the Vera version of Reactor for a number of years and I am trying to recreate it in MSR and need some advice. The rule monitors the state of our garage door and sends a regular alert if the door has been open for a period of time. The alert contains a variable/expression that provides the duration in minutes the door has been open - eg the end notification looks like this: "The door has been open for X minutes"
I have everything working OK in MSR except for constructing the expression to provide the duration the door has been open. In Reactor I was using the 'getstate' function in an expression to get the runtime of the rule and then converting that to minutes and passing it to the notify action.
In MSR I can't work out how to get any info from a rule within an expression.
The trigger is a simple pulse every X minutes so I was hoping it would be possible to just get the duration of either the rule or the time the door has been open. In the documentation there is a lot of info on getting details of entities, but I couldn't find anything on getting the status of the rules within MSR as it doesn't look like they show up as entities? I hope I didn't miss that part of the doco.
I did a bit of searching but couldn't find any discussion on getting this type of info so I'm hoping someone will be able to point me in the right direction.
I'm using build 22179 on Docker and the devices are currently in Vera but I am likely to move them to HASS at some point.
-
EDIT: 2022.07.01
So I will try to remake this thread to some kind of guide for future use, or in worst case a documentation of my failure. At least that could also be useful for letting someone know what didn't work...
I have zero knowledge of programming, so every time I need to edit a config file in HomeAssistant or similar it requires a good portion of googletime and read, re-reading instructions.
Also is english not my native language, so bear with me.Two goals!
1: Get MSR to take notice (and then actions of course) of pressed buttons on remotes.
2: Document what I do in hope I can help someone else in the future.I will use a Fibaro Keyfob as described below, but what I understand from Togglebits answers most type of remotes should work in similar ways.
Original thread:
Fibaro Keyfob support in MSR? (thru Hassio & Z-wave JS)
HiI just bought a Fibaro Keyfob FGKF-601 and plan to give this to my son so he can control some stuff in his own room. Primary some lightning and Sonos, maybe blinds in the future.
As the noob I am it will, of course, not work as I expected.👶🏻
The remote handle 1x, 2x, 3x clicks per button (six of them) and "release button"
I thought that it would appear like some "scene controller" in HA and that I could make Rules in MSR depending on what scene-entety that was triggered.
So is not the case, and if that is because of HA, Z-wave JS or MSR I have no idea.
I found a HA Blueprint that works in HA, but of course I would prefer to keep all automation in MSR.
I guess a workaround could be using HA virtual switches "Helpers" that I suppose will come up as an on/off trigger in MSR, but before going this way I would like to check with the wisdom of your guys if there is a better way of doing this.I am using:
MSR 22168 on windows.
Home Assistant Core 2022.6.7
Home Assistant Supervisor 2022.05.3
Home Assistant OS 7.6
Z-Wave JS version: 0.1.64 -
Need to ask, have thougth about this since the move from Rector to MSR I think.
What is the difference between putting constraints under trigger groups, like this
23b4a249-3292-41cd-9927-7f49c9bf1d07-image.pngCompared to this similar rule, but the time limits is under contraints instead?
ee596c9f-f52b-4a39-9605-f5932f3d9ed5-image.pngI think the Constraints parts in manual is still to be done because I can only find in the chapter menu, but it is not mentioned anywhere else.
-
-
Running MSR 22123 in Docker container and trying to use "condition must occur after" option. Will update to the latest build and log a PR if needed, but wanted to poll first if anyone is using this option successfully?
I have the following rules:
Screenshot 2022-06-28 at 15.18.50.png
Notification activity connected to "Alarm disabled" rule did not trigger. I also did another test with quite simple rules and that didn't work either (FWIIW - when observing that test in "real-time", I didn't see any timer running on the second rule while the first rule was true).
As said, before going further with debug/logs, nice to know if someone is using this option/restriction (successfully).
"Plugins"/firm-coded rulesets in MSR?
-
I know I have mentioned this before somewhere, but i simply can't find the thread..
Plugins like Auto Virtual Thermostat and Delaylight from Vera/openLuup are functions that whould be lovely to have in MSR - is there any possibility to implement these in some way?
I could offcourse program them myself and copy them to where i want to use them, but if i'm not wrong that would be a fairly advanced ruleset that in any case would be beneficial to share with the community in some way when they are made and done.
-
No comments leads me to belive there is no plans for this.
Anyone else using MSR for temperature control? If so, can you share control expressions?
-
Yep. I've moved my rules to MSR, but a couple are still on luup, waiting to be migrated.
What do you need, in particular?
I'm using a couple of rules to balance between solar and pellet stove, and to automatically start the electric heating when there's solar production going on for X hours.
I'm basing the logic on a couple of global expressions here:
The two variables heating_pellet and heating_prefersolar are two options we could switch to indicate we want to use solar or pellett (or not) to manually override the selection.
This is the main logic taking actions:
And I have others taking similar actions, to set the thermostat on when solar is producing a lot, etc. Termo richiesta is linked to thermostats, while Pompa di Calore drives our electric heater. The reset actions is turning the relays off.
-
@PerH , @therealdb gives a good example. I've implemented a four zone alarm with away, stay and home modes and entry delay in both R4V and MSR. Even in R4V I did a video showing how you can implement most of the functionality of DelayLight (the most common 80% of it that people use) easily. So I think you can do fairly complex and involved things with the tools that are present as yet, but I'm open to more... More... MORE!
If you are literally proposing plugins for Reactor, the question is... what should it look like? How would it work? Are you proposing that you literally write code for it, and if so, in what language? How/why is that different from using the current APIs? More is needed, for sure, but what do you think those things are? I've got enough other things I'm working on for Reactor right now that I don't really have mindshare for this depth of research in the near term, so I'd like to propose that you and any others that want to contribute formulate a proposal that covers these things, and how it would be integrated with the rest of the product, what it would look like (UI), and what additional tools you may need (debug?).
-
@toggledbits as I've already said via other routes, I'd like the ability to have an expression console, in order to better debug them.
My other requests at the moment are related to define virtual devices (or, if you like it more, persistent expressions) and functions (in order to define an action - let's say publish via mqtt or call an HTTP endpoint or whatever, and pass parameters - probably tied to the first part of this request, after all). I'm not sure plugins are necessary at this point, but I'm a programmer and I'm using MSR when I don't want to write code, or I want to tweak things visually. I'll further complicate things in the upcoming days, since I'll add solar prediction to the mix. -
@therealdb said in "Plugins"/firm-coded rulesets in MSR?:
I'd like the ability to have an expression console, in order to better debug them.
OK. Let's talk about this for a minute. How do you envision that working? If you are working on an expression for a Rule, how would it establish context? Do you work from inside the rule, and if so, what is needed that is not currently provided? Same for global expressions... how would this operate differently from the global expression editor? Is it really necessary to create a separate facility, or would changes to the current expression editors somehow suffice?
@therealdb said in "Plugins"/firm-coded rulesets in MSR?:
functions (in order to define an action - let's say publish via mqtt or call an HTTP endpoint or whatever
Curious about this. In the MQTT example, there is a
perform()
function that can be used to run an action from an expression, and you can publish anything you want (usingx_mqtt.publish
), so I assume you are talking about something else. On HTTP, are you suggesting/imagining a function to perform an HTTP request and return the response as the function value? -
@toggledbits said in "Plugins"/firm-coded rulesets in MSR?:
OK. Let's talk about this for a minute. How do you envision that working? If you are working on an expression for a Rule, how would it establish context? Do you work from inside the rule, and if so, what is needed that is not currently provided? Same for global expressions... how would this operate differently from the global expression editor? Is it really necessary to create a separate facility, or would changes to the current expression editors somehow suffice?
I usually open two windows, and I'm working on a (disabled) test rule where I test things, and then copy it over to the final rule. The problem is that sometimes I don't want to mess existing expressions, or the expressions require values that are not evaluated until I save the rule - and then scrolling up and down. I just want a way to quickly test expressions without messing with existing expressions. Sometimes you're just testing new expressions, sometimes you're trying to tweak things. A debug tool is a better way to test, imho, since I don't need to persist the status.
Curious about this. In the MQTT example, there is a
perform()
function that can be used to run an action from an expression, and you can publish anything you want (usingx_mqtt.publish
), so I assume you are talking about something else. On HTTP, are you suggesting/imagining a function to perform an HTTP request and return the response as the function value?The message could be complex, like
text: "ABC", priority: 1, silent: true icon: "icon" }
and I want to pass parameters instead of trying to compose every time dynamically.
I'd like to invoke a function, instead, and be free to change the format in the future in a single place - or define defaults if necessary. I usually have functions for things like notifications (and I'm using the same payload to decide if I want to deliver it to TVs or PCs as well), TTS (where I pass volume, if it's emergency notification, etc) or to invoke an enpoint to get cams screenshot. Right now I'm still invoking luup endpoints that translate them via UDP/MQTT, but I want to remove this depedency on luup and invoke my own HTTP endpoints - or compose an MQTT message, based on the same placeholder (my system accepts the same message via MQTT or HTTP - for the same action).
So, I just want the ability to define a function like this (pseudo code):
function sendAlert(what, silent, sendToTv, chatid, localEmoji) { chatid = chatid or chats.group; silent = silent or false; sendToTv = sendToTv or false; publishMqtt("dbdomoticz/cmd/notification", { text = what, emoji = localEmoji, chatid = chatid, silent = silent } ); if (sendToTv) sendAlertToLGTV(what); }
And then have an action in the GUI, where placeholders are the parameters I have in the function.
-
I really like the function idea!
-
@toggledbits said in "Plugins"/firm-coded rulesets in MSR?:
If you are literally proposing plugins for Reactor, the question is... what should it look like? How would it work? Are you proposing that you literally write code for it, and if so, in what language?
All good questions, let me explain my use profile:
I use wall plugs to control ovens in 5 rooms, and use AVT to do it by looking at two temp sensors per room. AVT gives me a "rule set" that takes into account heating time, cooling time, evaluating wether sensor data is valid, can run a fan to cool the room (no AC).. AVT also gives me the "Comfort"/"Eco" switch to enable lowering at night or when at work..
This is a very quick thermostat to install, and it gives me the thermostat appearance on my control panels in the house.
(the use profile of my co-inhabitants includes changing the thermostat setpoints fairly often!)In my head - with no experience with the MSR framework - this could be a type of rule in a rule set that looks a bit different than the usual ones (selected from a "Cusom rule" or "Prefab Rule" dialogue. It takes a set of defined inputs/controllers (sensors and actuators), and has its own "settings" tab for timers and other parameters for tuning.
This would then show up as a thermostat in the MSR panel GUI, similar to what AVT presents in imperihome or whatever.
Delaylight or other defined use cases could also be added to the custom rule list, and could lower the bar for having fairly complex automation quickly without thinking out an automation scheme for these functions.
@therealdb is obviously fluent in expression use, and this may perhaps be a way to open for some of that complexity for (us,) the non-coder-genius bunch?I'm getting better at the expressions use though, so all good examples are appreciated!
-
@perh I've been using MSR for my HVAC since the beginning. I use what I've dubbed "Arm For" rulesets.
These "control" nothing. The individual rulesets referencing these do that.
As the Ambient API will sometimes drop I have a backup source thru OpenWeatherMap, hence the trigger re the Ambient being
null
.Is there a better way? Probably. This has worked wonderfully for years (starting with RFV and moving to MSR.)