Beiträge von garsy020

    Hi,

    I restart to dev my Shelly script to manage my pool pump with new version of firmware 1.0.3.

    I wouldike know how the MQTT queue is managed because I don't have some information on my mqtt broker ( mosquito) without stop/crash of the script and have many log with :

    Code
    shos_mqtt_conn.c:872 MQTT0 queue overflow!

    I make some test with MQTT.publish, and it seems that the limit is 20 in loop "for" before MQTT queue overflow log.

    Do you have some informations about that ?

    I don't use 20 MQTT.publish on my script, so i imagine that the queue is related to anything ? number of call ? size of the call ? ...

    The MQTT queue managment has changed since firmware 0.14 ?

    Hi, I used shelly script to control my pool pump with temperature.

    I started to make this script with 0.12 firmware version and not i'm with 0.14.

    With new version 1.0.3, the script must be less than 15000 bits !!! can you update this limit ?, my script is 30kbit.

    I would like update my script in order to use shelly addon to plu température sensor, but i can't improve or just commit my script with this limit.

    GitHub - sylvaing/shelly-pool-pump: automatic schedule of you pool pump with temperature and freeze mode
    automatic schedule of you pool pump with temperature and freeze mode - GitHub - sylvaing/shelly-pool-pump: automatic schedule of you pool pump with temperature…
    github.com

    Hi,

    I have a big script, which run correctly one shelly is booted.

    But I Tested the script on reboot and it craches.

    After some investigation it seems, tha is sntp.

    I use Shelly.getComponentStatus("sys"); and return me an null on boot:

    Code
    2022-09-13,09:32:35,Notice,pc-149.home,user,shellyplus1-441793a56dd4,110 2.323 2 0|Subscription callback error: type error
    2022-09-13,09:32:35,Notice,pc-149.home,user,shellyplus1-441793a56dd4,109 2.318 2 0|  at script_3.js:225
    2022-09-13,09:32:35,Notice,pc-149.home,user,shellyplus1-441793a56dd4,108 2.314 2 0|  at script_3.js:774
    2022-09-13,09:32:35,Notice,pc-149.home,user,shellyplus1-441793a56dd4,107 2.311 2 0|  at script_3.js:802
    2022-09-13,09:32:35,Notice,pc-149.home,user,shellyplus1-441793a56dd4,106 2.303 1 0|[POOL_] get_current_time() time: null

    And hi see after that the shelly sync with SNTP server, but it should do this before:

    Code
    2022-09-13,09:32:36,Notice,pc-149.home,user,shellyplus1-441793a56dd4,"120 3.073 2 2|mgos_sntp.c:64          SNTP reply from 192.168.1.101: time 1663054356.152770, local 3.151209, delta 1663054353.001561"

    Here is part of my script that is very simple:

    Code
    let result = Shelly.getComponentStatus("sys"); 
     print("[POOL_] get_current_time() time:", result.time);
     
     let time = result.time; // "HH:MM"
    // compute current time in float format (12h45 -> 12.75)
     let t = JSON.parse(time.slice(0,2)) + JSON.parse(time.slice(3,5)) / 60;

    This call isn't the first in my script, there is many others call before, and perhaps the shelly is busy to make own call on init.

    So I don't know if it's a shelly bug, or find an other solution and perhaps catch this "null" return ?

    extract of complete log:


    Can I have the screenshot?

    this is my test script ( with fake token of course :) )

    And this, the log of shelly:

    Hi,

    I try to make an HTTP.Request on my Home Assistant server, but after some times, I found my problem:

    Invalid argument 'headers': length should be less than 128!

    Because the generate token is very long !

    token.length ==>> 191

    Do you see a solution for this ? because I think that other application can have very long token.

    Thankyou

    Ok thanks for your reply, I understand the need about async result.

    I will think about it, because timer seems to be a "crapy fix". perhaps move the code into response, but I wouldlike get the value to use it into another function.. so I will think about.

    if a function require many KVS values, is very complicated to make clean code into response function....

    there is a solution to be notify when response is done ?

    Hi,

    I test the last beta (0.11beta3) on shelly 1 plus.

    For one of my project I test the new KVS and I don't understand why my var "out_the_call" is undefined in my log:

    My code:

    If you have one idea please :)

    Thank you.