Shelly 1 and AutoIt

  • I'm trying to control my IoT devices through http commands through an AutoIt script. The toggle command does work with devices with Tasmota fw but unfortunately it works only the first time I issue the command with shelly 1 devices (i.e. if the device is ON and I run the script though the gui the device goes OFF the first time, it stays in OFF state the following times). You find here the script.

    NB Given the differences with tasmota fw I believe it's a matter of devices and therefore this forum is the most appropriate to look for a solution

    #include <ButtonConstants.au3>

    #include <GUIConstantsEx.au3>

    #include <StaticConstants.au3>

    #include <WindowsConstants.au3>

    #Region ### START Koda GUI section ### Form=

    $Form1 = GUICreate("Form1", 615, 438, 192, 124)

    $Label1 = GUICtrlCreateLabel("Prova shelly", 271, 64, 73, 17)

    GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif")

    $Label2 = GUICtrlCreateLabel("Abatjour", 287, 152, 40, 17)

    $Button1 = GUICtrlCreateButton("Button1", 270, 176, 75, 25)

    GUISetState(@SW_SHOW)

    #EndRegion ### END Koda GUI section ###

    While 1

    $nMsg = GUIGetMsg()

    Switch $nMsg

    Case $GUI_EVENT_CLOSE

    Exit

    Case $Button1

    InetRead ( "http://192.168.0.33/relay/0?turn=toggle" )

    EndSwitch

    WEnd

  • Dieses Thema enthält 4 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind.