I/O URL Actions

  • Hi guy,
    I would like to create a datalogger for record the temperature and humidity data in file log or in a database mysql.
    I had thought about using Shelly HT and the Report URL feature in I / O URL Actions
    I wrote a script in php

    Code
    /* Example Report URL */
    
    http://mysite.com/action.php?tmp=tmp.value&hum=hum.value&bat=bat.value

    Unfortunately, ;(
    the log output recovers only the humidity data, while temperature and battery the variable via GET is not valued (tmp.value and bat.value)

    Code
    /* Example Output log*/
    
    2021-08-15 20:41:58 - temp: tmp.value | hum: 59 | bat: bat.value


    Can anyone help me please and explain me how to write URLs in actions,
    or if there is already a script to read the data stored in the cloud?


    Thanks Nic :thumbup:

    • Offizieller Beitrag

    Hi and welcome to the forum. :)

    Maybe, my coupling to Homematic is an inspiration for you!? :/

    The code is at the end of the thread. Perhaps you need a translater. The thread is written in German.

  • Hi Realpapla
    wonderfull, can you post here your file action.php?
    I don't undestand why my string it isn't good: http://myserver.com/action.php?tmp=tmp.value&hum=hum.value
    I don't send id=xxxx

    I actually got both temperature andhumudity in the GET message to the server so then I also removed the bat query

    http://myserver.com/action.php?tmp=tmp.value&hum=hum.value

    The response looks like this

    /action.php?tmp=tmp.value&hum=hum.value&hum=52&temp=25.38&id=shellyht-AC6147

    Now I'm testing other solution.
    This evening I'm writing the way by https://xxxx.shelly.cloud/device/xxxx

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