Replacing SiteSensor Plugin (Vera) with MSR
-
It's moments like this that I'm grateful for online Forums where the open exchange of ideas and experience works to everyone's advantage, without fear of reprisal from those "in charge".
-
Just testing some different online API's see what's possible.
If your in the UK the National Grid have a Carbon Intensity online API here. This is for my region / area.
The data also breaks down by percent the types of generation used, Wind, Solar, Nuclear, Coal etc but not added that as yet.
Vera:
Home Remote:
Need to play about with the tiles and add an icon and reposition some items yet.
-
I've tried the Vera Multi-String plugin, it looks just like the type of plugin I was needing and looking for.
You can have up to five variables on a device.
You can then have your rule in MSR send the data to each variable etc.
The Multi-String plugin devices data is also outputted in the Vera SDATA stream so these device will also work with the Home Remote dashboard app.
{ "name": "Covid-19 Stats", "altid": "", "id": 133, "category": 0, "subcategory": -1, "room": 0, "parent": 0, "variablename1": "Confirmed", "variable1": "4329180", "variablename2": "Recovered", "variable2": "3787312", "variablename3": "Critical", "variable3": "615", "variablename4": "Deaths", "variable4": "126573", "variablename5": "", "variable5": "", "options": "", "configured": "0" },
So I recommend using the Multi-String plugin rather than trying to create your own modified Generic IO devices as I was doing.
-
This post is deleted!
-
@cw-kid if one wanted to set all 5 parameter values at the same time, using an HTTP call to Vera, could that be done? (If so, I'd need to see a working example of a GET Request that does this.) Or would I have to issue 5 distinct calls to set those variables?
P.S. I see from this old post that I'm not the first one to wonder.
-
It’s so trivial to make a custom request handler in Luup... really it’s one of its best feature. So, in this case, indeed, “roll your own” and simply set the required variables per the content of the request.
-
@cw-kid said in Replacing SiteSensor Plugin (Vera) with MSR:
I am doing a different http request to Vera to set each variable not one request that set them all.
Yeah, something tells me setting more than one at a time isn't possible, anyway. Just thought I'd ask the pros.
Thanks!
-
@librasun Reviving this a bit because this right here is where I think I'm failing spectacularly.
I'm working with the Ambient API for my weather station via Site Sensor in Vera. This thread has been fantastic at guiding me toward migrating the Site Sensor into MSR. Here's where I'm falling down:
The GET returns expected results. However, I believe I've messed up in creating the expressions for temp, wind speed, wind gust, and solar radiation.
I've entered
response[1].lastData.tempf
into the ambient_temp field and it returnsLast value:(error) Invalid reference to member 1 of null
. This is taken right from the Site Sensor recipe where it's working wonderfully so I know I'm probably close. I know the expression logic in MSR is slightly different than that of the Vera Reactor plugin - combined with my almost total befuddlement of proper expressions go isn't helpingAppreciate any guidance!
-
should that be
response[0].lastData.tempinf
-
I thought the same but, after editing, it returned the same error just with
...member 0 of null
instead. -
so to set temp expression should be
ambient_api[0].lastData.tempinf
-
This post is deleted!
-
@toggledbits QQ on the OWM built-in: is there a means by which to render it inactive until I need to call it? The way I work my Site Sensors is the one for OWM stays deactivated until the one for Ambient throws
null
at which point the OWM turns on, carrying the load until Ambient throws real data back out there again (at which time OWM shuts back off.)This saves wasted calls to the API for OWM.
-
@tunnus That would work if I were creating the OWM like I've created the Ambient expressions and ruleset. But @toggledbits has OWM built-in, controlled by reactor.yaml config file. The frequency of calls to the API is configured there in minutes and it creates an entity in the Entities list. As I understand it, the entity is always refreshed data-wise by the frequency of the calls set in reactor.yaml.
-
@gwp1 said in Replacing SiteSensor Plugin (Vera) with MSR:
@toggledbits QQ on the OWM built-in: is there a means by which to render it inactive until I need to call it?
No. Controllers can only be switched on and off via configuration.