UPDATE - “Cloud Variables” are currently String variable type only.
So some logic operators may not work as you might think or give you unexpected results.
Probably better to follow this newer guide here, where we use “Local Variables” and an integer variable instead.
‐--------------
I decided to look in to this as another user asked the question on the forum and I wanted to see if it was possible.
He wanted Cloud cover data from OpenWeather service and use that as a trigger in a Meshbot rule.
So how can we do this? By using the “Nucal” OpenWeather cloud service integration.
First we need to setup the Ezlo / OpenWeather connection.
In the Ezlogic web UI here on the menu on the left go to “Integrations” → “Cloud Services”
Note - My interface might look slightly different green vs blue as I have customized mine.
Click the “Add Cloud Service Integration” button.
Select OpenWeather from the list
Note - Or you can try using the Ezlo Weather one instead. I am using OpenWeather as that was the original question raised.
You will then see this popup with the instructions on how to get your Free OpenWeather API key. You need to do that and get your key so it can authenticate etc.
Click the Yes button
This is the URL - https://home.openweathermap.org/api_keys
On this screen paste in your OpenWeather API key
It should then say Successful
In your “My Cloud Services Integration” area you should then see your new OpenWeather service.
OK now we need to create our first Meshbot rule to pull down the weather data. In this example we are interested in Cloud Coverage information.
So on the menu on the left go to “Automation” → “Meshbots” then click the button to create a new Meshbot.
I don’t think it matters? If you select “Cloud” or “Local” here for the type of Meshbot rule, I selected “Local”
Give your new rule a name and add a new Action, select “Cloud Services” then “OpenWeather” then “OpenWeather Token ***” then “Get Current Weather by City Name”
Type in the name of your city in the field below and then select Celsius or Fahrenheit
Now click the “Test” button
You should now see some Weather data coming in, if you expand the “Data” node
Next select “Save Output to Cloud Variable”
You will then see a “Data Structure” on the left hand side, select and drag and drop the item you are interested in to the box on the right hand side.
I selected “clouds_all” in this example.
Now click the “Test your Variable” button.
I then saw this pop up which was working as I could see there was a value of “75”
Now you probably want to add a Trigger on your Meshbot rule, something like a time interval so it runs every hour or whatever to get fresh weather data etc.
Now Save your Meshbot rule.
So this is the first rule that obtains our Cloud Coverage data.
You can then create further Meshbot rules and use the new “Cloud Variable” as a trigger for those rules.
For example say I have an outdoor awning, I want to retract when cloud cover is above 70%
I can now create a rule to do that.
So I create a second Meshbot rule with the trigger and action shown in the screen shot below. My Virtual Switch pretending to be a motorized awning device etc.
That’s it let me know if it works for you or not ?