Good morning,
I'm using scripts, and I wanted to know which array objects are implemented in the latest firmware version.
Good morning,
I'm using scripts, and I wanted to know which array objects are implemented in the latest firmware version.
Good morning,
Does anyone know the frequency of refreshing the values of the “power” variable?
I think it's about 2 times per second, but do you have more details.
Also, how do I know when this value has just been updated so I can read it right after.
Thank you in advance for your information
For example you can try that
Shelly.call("http.get", {url: "https://www.api-couleur-tempo.fr/api/jourTempo/today",timeout: 1,ssl_ca: "*"}, RpcBackLectureTempoJourJ);
The json answer: {"dateJour": "2023-12-01","codeJour": 0,"periode": "2023-2024"}
The function to read json answer
function RpcBackLectureTempoJourJ(resultat, error_code, error_message, userdata)
{
if (error_code === 0) //--- pas d'erreur de lecture
{
if (resultat)
{
if (resultat.body !== undefined)
{
// print(resultat.body);
let json = JSON.parse(resultat.body);
if (json )
{
CodeCouleurJourJ = json.codeJour;
if (CodeCouleurJourJ===0) CouleurJourJ="Inconnu";
else if (CodeCouleurJourJ===1) CouleurJourJ="BLEU";
else if (CodeCouleurJourJ===2) CouleurJourJ="BLANC";
else if (CodeCouleurJourJ===3) CouleurJourJ="ROUGE";
}
}
}
}
}
everything works correctly
You can use this URL to reduce your code lenght:
it's very efficient en reduce the code /3.
Good morning,
I use a shelly 1+ and a dimmer 2 to achieve my solar energy regulation.
In shelly1+ (firmware 0.14.1), I am running a script which size is 21k byte.
I wanted to test with firmware 1.0.0.beta5, but the limitation of the code size to 15k byte prevents me from doing it. For the moment I have to stay with version 0.14.1, otherwise my installation can no longer work.
If there is no development on this subject, I will have to change the module.