Updates for EZLogic - 1.24.1 (Ezlo Hubs only)
Link: https://ezlogic.mios.com
Previous: 1.23.1
1. NuCAL. Integration with EzloWeather parject
We are glad to announce EzloWeather parject! It provides ability to get current temperature by city name.
No token required!
NOTE: we call services as parjects: EzloWeather parject, Google Sheets parject etc.
To create an account:
- Go to NuCAL page
- Click on “Add NuCAL Integration”
- Click on EzloWeather parject
- Confirm the enrollment
- See notification
- Then you will see it in the list of integrations
One more way, you can use NuCAL in Actions.
- Go to MeshBot page
- Select NuCAL → EzloWeather → Select Account
- Click on ‘Add Account’ button
- Confirm the enrollment
Then, you can try this service:
- Fill the fields
- Press ‘Test’ button
- See the output:
2. Local MeshBot. Actions. Storage in NuCAL
As you know it was possible to save parject output to Local Variable.
Now, you can process and save the output to Cloud Variable.
To create Cloud Variable:
- Click on “Save output to cloud variable”.
- Provide variable name.
- Select the function, you want to apply to the response.
For the example, we will use “get String from json path”. It will be useful for the case, if the response comes in JSON format and you want to extract nested property. - Provide the argument(s).
For this example, we want to extract the temperature value. We have to provide path to this property. The path should start from the root of the response. For our case it will be
.data.body.data.temperature
- You can test your variable and function.
WARNING: We will send the real request to the service. You could lose your data if you setup delete/edit actions. For example, delete Google Spreadsheet etc. - See the result.
If you want to customize variable processing you could use Advanced tab.
Basically, we use JavaScript function to do variable processing.
A few comments:
-
As an argument to the function you will get the parject response.
You can refer to this agrument asraw_json
variable in the code. -
To describe the variable you have to provide 4 parameters:
- variable name
- capability name (by default “variable”, you could always use “variable” word)
- value, which will be assigned to the variable (e.g. 7.85)
- value type
-
We use “state” to store the variables.
To save/update the state by MeshBot execution, you should return the object with the following structure.
State - it is the object, that contains the array of variables. In case of single variable, you should return an array that contains another array with variable description.
var output = {state: [["Sydney temp","variable",raw_json.data.body.data.temperature,"string"]]};
output;
NOTE: no return word, just write new state variable name in the end.
It is possible to describe multiple variables. Each varialbe will be represented by additional array.
Simple:
Advanced:
NOTE: Try to create multiple variables using Simple tab and then switch to Advanced tab to see the result.
In further releases, we will provide ability to use Variables in Trigger section.
3. Device settings. RTSP URL property
We exposed RTSP URL on Device settings page.
Camera stream urls will be displayed in the Dialog.
You could copy a value by “Copy” button:
Fixes and Improvements
- Fixed max length for expressions and variables names. It must less than or equal to 29 symbols.
- Fixed max length for MeshBot name. It must be less than or equal to 128 symbols.
- Fixed automatic auth data regeneration.
Thanks!