Beiträge von markok

    Thank you for your help, but still I have something what I can't understand. I tried it code like below, but seems that it can't get apower status.

    Code
    Shelly.call('http.get',{url:'http://192.168.1.137/rpc/switch.getstatus?id=0'},
        function(response) {
            let power = response.apower;
            function (response, error_code, error_message, ud) {
    print(JSON.stringify(response));
        }
        }
    );

    Is it possible read other Shelly's status? If it is possible is there differece depending gen1 or gen2 products? I have code like below which work local devices, but I don't know how I can include other Shelly's IP address to this code.

    Code
    function Loop(){
      try{
          let power = Shelly.getComponentStatus('Switch', 0).apower;
               
          print(power);
      }catch(e){print(e);}
    }
    Timer.set(2000,true,Loop);

    I have Alliance-Apps OpenDTU and it support cURL command. I hope that I can control this product using Shelly script. How I can send cURL command usingShelly script?

    Command what I want use is:

    Code
    curl --user "user:pwd" http://192.168.x.x/api/limit/config --request POST --data "data={'serial':'1144xxxxxxxx', 'limit_type':1, 'limit_value':50}"

    I tried use code like below with my own setups, but it not work and I don't know what I must to do, Can somebody help me how to do that?

    I tried use Shelly Add-On voltmeter option, but it doesn't work correctly. I tried measure 4 VDC supply and wires was connected to Add-On analog input and GND connections. Shelly app shows voltage changing between 3,1 - 4.6V althought supply voltage doesn't change. What could be wrong? I have connected to same Add-On five ds18b20 temperature sensors.

    My English is not very good, but I try explain what is the project goal. I have air heat pump, which defrosting logic is very poor. It make several defrosting without any reason. I try make better logic with two temperature sensor. One sensor measure outside temperature and other one heat exchanger temperature. When difference between these sensors are two Celsius degree, defrosting start. This part work now pretty good, but I have still couple of problems.

    When defrosting start, I want that code running stop 15-20 minutes. If it not stop, relay status can change when defrosting is running and I don't want it.

    Other problem is defrosting fail safe mode. I want that defrosting happens once in six hours althought temperature sensors not get correct value.

    Hopefully you understand what I mean. I have tried many way resolve this problem, but I can't done it yet.

    Thank you very much about this advise. I can now read all data what I need, but I have still one problem. I have to pause code execution if one "else" is true. I tried put there a new timer, but I got message that I use too many timers. How I can do that at correct way? My code is below and there is text PAUSE where I want the pause. I want that relay not turn ON before than set time has gone out.