cannot save report url

  • Hi everyone,

    For the non-German speakers, I'll also post my request in English.

    On my Shelly H&T, saving a report URL does not work. I can access the actions and enter a URL, either via the cloud interface or the app, but when I click on "ADD" or "SAVE" nothing happens.

    Has anyone else observed this behavior and might know of a solution or workaround?

    Unfortunately, I cannot access my Shelly on the local network, because it's in our holiday house (and I'm not...).

    Thanks for any help!

    Beat

  • To answer my own question, YES, it is possible to remotely set an Action Report URL on the Shelly HT. This is relevant if you cannot connect to your Shelly device via the local network (because, for example, it's in a holiday house, and you're not there). Prerequisite is that the device is connected to the shelly cloud.

    You can enable actions and set the report URL with a HTTP POST command to the cloud API, using e.g. curl. (I was not able to do it directly via the browser.) You will need your device id, shelly cloud authorization key and shelly cloud server name (which can all be looked up on the cloud WebUI: https://my.shelly.cloud).

    curl -d "id=<your device id>&auth_key=<your cloud authorization key>&type=report_url&enabled=true&urls[]=http://your.own.server/your.own.script.php" -X POST "https://<your shelly cloud server>.shelly.cloud/device/settings/actions_urls"

    You should get an acknowledgement message in the form of:

    {"isok":true,"data":{"device_id":"<your device id>"}}

    When you request the device settings, you should see "_pending_cmds":1, meaning that the cloud has received your command and will send it to the device on wakeup. After the wakeup, you should see "_pending_cmds":0. If you see "_pending_cmds":-1, something went wrong. For me, the settings only took effect after the second wakeup of the device.

    (To request the settings, you can send an API command via the browser: "https://<your shelly cloud server>.shelly.cloud/device/settings?id=<your device id>&auth_key=<your cloud authorization key>")

    If everything worked out, the shelly device will from now on send an HTTP GET request to the URL you specified, appending "?hum=<humidity value>&temp=<temperature value>"

    For me, it only sends the data on every 3rd or 4th wakeup, no idea why.

    As an alternative, you can always query humidity and temperature data via a status request to the cloud API:

    "https://<your shelly cloud server>.shelly.cloud/device/status?id=<your device id>&auth_key=<your cloud authorization key>"

    If you're interested in other commands, also for Shelly switches and the like, open the WebUI and look at the code of api_request.js for the URIs and simple_cloud_control.js for the parameters.

    Good luck!

    Beat

    PS: I'm using firmware 1.8.0

    Einmal editiert, zuletzt von obeat (22. Oktober 2020 um 15:09)

  • Hi obeat ,

    I'm trying to get data from my HT sensors via telegraf to include in an influx database. I'm struggling with the method of using the "report_url" and have a listener plugin of telegraf to listen whenever the HT wakes to report a reading.

    A better (and more simple to me) idea is what you suggest: query the cloud API for the latest temperature and humidity values stored there. I tried what you suggest

    Zitat

    As an alternative, you can always query humidity and temperature data via a status request to the cloud API:

    "https://<your shelly cloud server>.shelly.cloud/device/status?id=<your device id>&auth_key=<your cloud authorization key>"

    but couldn't get this to work... can you help me out with a more specific example? I'm used to retrieve the results from querying directly other Shellies, like the EM, which send a string upon http://192.168.1.xx/emeter/0 for example.

  • Dieses Thema enthält 2 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.