Beiträge von hacesoft

    I already figured it out, I took the help of artificial intelligence, although it didn't tell me the exact code, it kept spinning in circles, but it managed to tell me where to go. I ended up compiling this code:

    Shelly.call("Sys.GetStatus",{},

    function(result, err_code, err_message, user_data) {

    if (err_code === 0) {

    // processing successful result

    console.log("Result:", result.time);

    } else {

    // error handling

    console.log("Error:", err_message);

    }

    },

    null);

    Which, after running, writes the current time in the device to the console. And as you can see, with the help of this construction, you can find out any value that is given on the link, see the contribution above....

    Hopefully this will help someone else in writing a script for SHELLY 4PM PRO.

    I have already realized that I have to grant it via the method:

    Sys.GetStatus and there is a time entry

    I just don't know how to write it in the code...

    this doesn't work for me:

    let rr = Sys.GetStatus.time;

    it says that SYS is not defined...

    what include files should I add to the code...

    I don't know mJS, but only C and ASM... so then I swim in programming.

    System | Shelly Technical Documentation
    The system component provides information about general device status, resource usage, availability of firmware updates, etc.
    shelly-api-docs.shelly.cloud

    Have a nice day,

    in the case of two Internet connections, it is necessary to change the metric from automatic and the specific value in the network card settings. The one that is the main one, give the bigger number.

    Otherwise, Shelly 4PM PRO does not have a very perfect implementation of SNTP, when I entered the IP address of my home sntp server, which I have masked via NAT, it does not work, the time only reads when I give the direct IP address of the home sntp server. Problems occur when I enter some regional smtp servers. Google smtp works reliably.

    It's not the site configuration, another bunch of devices with the same settings work great....