Plugin: Multi Provider Weather Station

Hi @retireditguy

  1. You ask and we listen, as of now you can use humidity and wind speed from opeanweather and in Ezloweather.

can you please help us identify the problem in this case. A screenshot from Vera mobile app showing PAASAuthentication and script objects. those should not be displayed at all.

Again can you please give more information on how you see the device options in meshbots in ezlogic in your account. Because in ezlogic, there is no obligation for device state changes.

However , due to the nature of the “trigger” meaning, an event is required from a datasource. So if you want to start a chain of events according to some device state(current state) , how would the computer know, when to start the events ? As long as the device state does not change, it is impossible. So, naturally, meshbots (or any logic which require a “start” event, would base on some event triggered from a data source. That can be a temperature sensor broadcasting its current temperature. Even in that case, the “trigger” is based on that event and compares the data coming from the device with another data source (or static data)
So it does not make sense to “start/trigger” meshbots based on current status of anything. You can however, “after” starting the meshbot, make comparisons of current states of device states with some other data source. we call them “exceptions”. And you can use them only for comparison purposes and not to trigger the meshbots.
Hope the explanation helps.

1 Like

Hi,

Had a look at the openweather.org site and it seems they have a new API version. Now 3.0. Not sure that is why it is not working for a new install. I am still running it on openLuup and that still updates. Once all other dust in my house settles I may look into this, but don’t have the time now.

Cheers Rene

1 Like

Here are the two requested screenshots.


Osman -
Relative to triggers and state changes, my question was specific to Vera/Ezlo scene scripting, not Ezlogic. It has been a long time since a created a native Vera scene script as I switched to Reactor several years ago. I now find that at some point after I began using Reactor, Ezlo/Vera changed the browser-based screens for Vera/Ezlo scene script creation to follow the same trigger based paradigm you noted. As such, scene scripting and Ezlogic are consistent, so I retract my concern/question.

Lastly, thanks for the quick turnaround on the Weather meshbot. Now I need to get busy learning how to use meshbots. Something to keep me busy and out of trouble.

Thanks for your attention and assistance.

3 Likes

Hello Rene
Finally realized my 10:30am Sonos weather reports via Dark Sky are inacuurate because Dark Sky was sold!
So I found your new opitions and with your excellent directions loaded Open Weather into my Vera Plus.
Loaded in and is showing weather in app but I think I need help updating my Sonos TTS call.
The command says success but I don’t hear anything! All other tts commands are functioning.
Here is the previous tts.
url = require(“socket.url”)
local AV_DEV = 298
local LS_SID = “urn:micasaverde-com:serviceId:Sonos1”
local TEMP_SID =“urn:micasaverde-com:serviceId:Weather:1”
local OwTempTodayHigh= luup.variable_get(TEMP_SID, “TodayHighTemp”, 733)
local OwTempTodayLow= luup.variable_get(TEMP_SID, “TodayLowTemp”, 733)
local currentCondition= luup.variable_get(TEMP_SID, “TodayConditions”, 733)
local tomorrowCondition = luup.variable_get(“urn:micasaverde-com:serviceId:Weather:1”,
“TomorrowConditions”, 733)
local OwTempTomorrowHigh= luup.variable_get(TEMP_SID, “TomorrowHighTemp”, 733)
local OwTempTomorrowLow= luup.variable_get(TEMP_SID, “TomorrowLowTemp”, 733)

luup.call_action(LS_SID, “Say”, {Text = string.format("Todays high temperature will be %s Todays low temperature will be %s
 Current conditions are %s
 tomorrows is %s with a high temp of %s and a low of %s " , OwTempTodayHigh , OwTempTodayLow, currentCondition, tomorrowCondition, OwTempTomorrowHigh, OwTempTomorrowLow) ,Volume=60, UseCache=0}, AV_DEV)
Hope you or anyone can help!
Cheers
Wilbur

Hi Wilbur,

To start you have to change local TEMP_SID to urn:schemas-rboer-com:device:Weather:1. Them check that every variable you use is indeed existing for your weather device 733. The plugin is not a 1 for 1 replacement as different weather providers provide different data items.

Cheers Rene

Hi Rene
Glad you are still around to help us old timers

:slight_smile:
So I changed local TEMP_SID to urn:schemas-rboer-com:device:Weather:1.
It appeared twice in the code above.
Still No Sonos TTS even though Scene runs as success.
All I would like is code that would say the “weather for the Day” high -low temps and rain or sunny and same forcast for tomorow.
If some kind soul has a working code and would share it

I did play around with this one some more:
Looked over variables available on devise 733.
It has all data I asked for available via the adavanced-Variables tab

To be more simple I then chose just 1 data that appeared on the Settings page.
Here is what my Settings page shows:
broken clouds
Current Temperature: 69.9
Apparent temperature :
68.4
Wind Speed :
3
Wind gust speed :
9
Wind Bearing :
301
Conditions :
broken clouds
Plugin Version :
1.1
Here’s my new “Simple” try but still no success.

url = require(“socket.url”)
local AV_DEV = 298
local LS_SID = “urn:micasaverde-com:serviceId:Sonos1”
local TEMP_SID =“urn:schemas-rboer-com:device:Weather:1”
local TodayCondition= luup.variable_get(TEMP_SID, “TodayConditions”, 733)

luup.call_action(LS_SID, “Say”, {Text = string.format(“Current conditions are %s” , TodayCondition),Volume=60, UseCache=0}, AV_DEV)
Thanks again for your time.
Wilbur

I have not looked on the weather data for some time now and I realize that DSW is not providing the right data and probably it’s out. Was happy to install the MSW App - kudos and may thanks @reneboer!

I have installed the 1.1 Ver. and selected OpenWeather as a provider and obtained a key. Also set units as “Metric”. Also set at this stage only two Childs: Temperature ; Apparent Temperature.

At this point there is no data showing up - it says:

Waiting for Luup reload
No data

Will greatly appreciate any support


Hi @Bobhaskils ,

I just tried a fresh install on a Vera Edge and it is working. Can you set the Log Level to Debug and look in the Vera log file for a possible hint why it is not for you?

Cheers Rene

Hi @lakewoodjazz

My error, Vera development is getting a tad rusty as my stuff either works, or moves.

Try TEMP_SID = “urn:upnp-rboer-com:serviceId:Weather1”

Cheers Rene

Hi Rene
Made the change but still no TTS responce even though scene says success when run.
Do I need a child device with this App for each Condition I request?
Here is the latest lua TTS I am using:
Thanks for checking back in on my project.

url = require(“socket.url”)
local AV_DEV = 298
local LS_SID = “urn:micasaverde-com:serviceId:Sonos1”
local TEMP_SID =“urn:upnp-rboer-com:serviceld:Weather1”
local TodayCondition= luup.variable_get(TEMP_SID, “TodayConditions”, 733)

luup.call_action(LS_SID, “Say”, {Text = string.format(“Current conditions are %s” , TodayCondition),Volume=60, UseCache=0}, AV_DEV)

Hi @lakewoodjazz

Have you tried the Say command without a variable?
Or try like this:
luup.call_action(LS_SID, "Say", {Text = string.format("Current conditions are %s" , TodayCondition or "Unknown"),Volume=60, UseCache=0}, AV_DEV)
and make sure the text quotes are the correct type especially if you copied off this forum.

Cheers Rene

Many thanks for responding!
Im running this on VeraSecure with the latest firmware 1.7.5187 (7.31).
Unfortunately I’m not that technical - could you please instruct me what setting is required - I’m attaching current status - and how to download whatever log file which is required, so I can share it.
Again, many thanks.

Hi @Bobhaskils

You have to set the log level in the settings page of the plugin. The same page you entered your OpenWeather API key.

Then on your Vera the log file is /tmp/log/cmh/LuaUPnP.log

Look for lines looking like this. This is an example of a successful update. 34 is the plugin number and will be different on your Vera.
luup_log:34: Multi Weather Station_debug: calling OpenWeather API with url = https://api.openweathermap.org/data/2.5/onecall?....
luup_log:34: Multi Weather Station_debug: {"lat":52.xxx,"lon":4.xxxx,"timezone":"Europe/Amsterdam","timezone_offset":7200,"current":{"dt":1683122460,"sunrise"

Cheers Rene

Hi
The Say command is working in the Scene now BUT
the responce is “Unknown”

Seems the luup call is not coming from the Multi Weather Station installed App.
Although the installed Devise #733 is showing Current Conditions.
On the Settings page should I be selecting a Child Device?


If possible would like the lua code to read Todays Hi Low Temp, Todays Forcast and Tomorrows forcast. Do I need to check off the child devices for each ask?

Getting closer I think!
Thanks

Many thanks, have set log to debug. Sorry for being a nudge but where is the Vera log file stored? I have a USB for backup on Vera - is it there? should I remove it from Vera and look for the requested file on my PC? or there is some access via the Vera portal ?

Hi @lakewoodjazz

So for some reason the value of TodayCondition stays empty. Please make sure all quotes in your code are correct and that in device 733 there is the variable of TodayConditions. No need to add a child device.

Cheers Rene

Hi @Bobhaskils
The vera log file is /tmp/log/cmh/LuaUPnP.log.
You can pull it with http://[vera ip]/cgi-bin/cmh/log.sh?Device=LuaUPnP

Cheers Rene

OK. Have managed to retrieve something but not sure what it means (I have no understanding in these issues - my maximus skills in Vera are Reactor and PLEG - never looked into any coding
) I’m attaching the file. I’m not sure if it is even related to this plugin and for what time window (seems static - if I try to review again after some time it looks the same
)
I highly appreciate your efforts in educating me on all this and instructing me as needed


Hi,

Best would be to do a Luup reload and then after five minutes get the log file. Best to copy and paste in a text document and send me a message with that rather than posting on the forum.