Widget: IoTClient

Please post comments, problems, questions, and feature requests on the IoTClient ConnectIQ Widget in this thread.

https://apps.garmin.com/en-US/apps/da3db127-3938-4dac-bcf1-e30324fd0d20



  • Exactly the widget I was looking for to command my eedomus box from my F5x.
    Unfortunatly, if I configure it from Garmin Express (on my Mac), the settings are not saved after connecting the F5X (default settings are displayed). It's quite impossible to config it from the iPhone (many copy/paste to do with long URL strings...). Any idea ? Thx
  • Former Member
    Former Member over 7 years ago
    How do I switch between devices on with a Vivoactive HR?
  • Hello,

    I have a problem with the operation on my 735xt
    PUT works great, but GET does not work at all

    displays first "sending..." and later "?" or "FAILED: 300"

    Device 1 action 1 URL
    http://192.168.0.3:8080/json.htm?type=devices&rid=94
    Device 1 action 1 JParam
    Data

    if I select the first level field, eg "Sunrise" the value is returned correctly

    JSON response in the browser:
    {
    "ActTime" : 1521592125,
    "ServerTime" : "2018-03-21 01:28:45",
    "Sunrise" : "05:52",
    "Sunset" : "18:04",
    "result" : [
    {
    "AddjMulti" : 1.0,
    "AddjMulti2" : 1.0,
    "AddjValue" : 0.0,
    "AddjValue2" : 0.0,
    "BatteryLevel" : 255,
    "CustomImage" : 0,
    "Data" : "23.2 C, 28 %",
    "Description" : "",
    "DewPoint" : "3.68",
    "Favorite" : 1,
    "HardwareID" : 5,
    "HardwareName" : "ESPeasy",
    "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
    "HardwareTypeVal" : 15,
    "HaveTimeout" : false,
    "Humidity" : 28,
    "HumidityStatus" : "Dry",
    "ID" : "140AE",
    "LastUpdate" : "2018-03-21 01:28:33",
    "Name" : "Sypialnia",
    "Notifications" : "false",
    "PlanID" : "0",
    "PlanIDs" : [ 0 ],
    "Protected" : false,
    "ShowNotifications" : true,
    "SignalLevel" : "-",
    "SubType" : "THGN122/123, THGN132, THGR122/228/238/268",
    "Temp" : 23.199999999999999,
    "Timers" : "false",
    "Type" : "Temp + Humidity",
    "TypeImg" : "temperature",
    "Unit" : 1,
    "Used" : 1,
    "XOffset" : "0",
    "YOffset" : "0",
    "idx" : "94"
    }
    ],
    "status" : "OK",
    "title" : "Devices"
    }
  • Former Member
    Former Member over 7 years ago
    Hello,

    I have a problem with the operation on my 735xt
    PUT works great, but GET does not work at all

    displays first "sending..." and later "?" or "FAILED: 300"

    Device 1 action 1 URL
    http://192.168.0.3:8080/json.htm?type=devices&rid=94
    Device 1 action 1 JParam
    Data

    if I select the first level field, eg "Sunrise" the value is returned correctly

    JSON response in the browser:
    {
    "ActTime" : 1521592125,
    "ServerTime" : "2018-03-21 01:28:45",
    "Sunrise" : "05:52",
    "Sunset" : "18:04",
    "result" : [
    {
    "AddjMulti" : 1.0,
    "AddjMulti2" : 1.0,
    "AddjValue" : 0.0,
    "AddjValue2" : 0.0,
    "BatteryLevel" : 255,
    "CustomImage" : 0,
    "Data" : "23.2 C, 28 %",
    "Description" : "",
    "DewPoint" : "3.68",
    "Favorite" : 1,
    "HardwareID" : 5,
    "HardwareName" : "ESPeasy",
    "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
    "HardwareTypeVal" : 15,
    "HaveTimeout" : false,
    "Humidity" : 28,
    "HumidityStatus" : "Dry",
    "ID" : "140AE",
    "LastUpdate" : "2018-03-21 01:28:33",
    "Name" : "Sypialnia",
    "Notifications" : "false",
    "PlanID" : "0",
    "PlanIDs" : [ 0 ],
    "Protected" : false,
    "ShowNotifications" : true,
    "SignalLevel" : "-",
    "SubType" : "THGN122/123, THGN132, THGR122/228/238/268",
    "Temp" : 23.199999999999999,
    "Timers" : "false",
    "Type" : "Temp + Humidity",
    "TypeImg" : "temperature",
    "Unit" : 1,
    "Used" : 1,
    "XOffset" : "0",
    "YOffset" : "0",
    "idx" : "94"
    }
    ],
    "status" : "OK",
    "title" : "Devices"
    }




    Hello


    I think it might be a data length issue.
    I'm facing the same problem with a OpenHAB query.

    Mine has 297 bytes returned.

    Yours has over 1400 bytes returned.

    In case it helps the developer, my URL is: http://demo.openhab.org:8080/rest/it...rature_FF_Bath
    and the Jparam is: state

    json posted here for convenience:
    {"link":"demo.openhab.org:8080/.../Temperature_FF_Bath","state":"18.7","stateDescription":{"pattern":"%.1f °C","readOnly":false,"options":[]},"type":"Number","name":"Temperature_FF_Bath","label":"Temperature","category":"temperature","tag s" :[],"groupNames":["Temperature","FF_Bath"]}


    The following does however work just fine, but its a much shorter json: http://ip.jsontest.com/ JParam: ip

    Cheers Kurt
  • Hi,

    I really like the widget and it works great with domoticz. But....

    I can't seem to figure out how to switch devices on my Fenix 5. Holding the up button only brings up the widget menu. What am I missing?

    Regards,

    Hilko
  • Former Member
    Former Member over 6 years ago
    Hi, I am using this application, only for GET requests. Everything works regularly! I noticed two possibilities for improvement: - It is not possible to put the symbolic name but only the IP. - HTTPS requests do not work. The first point is not a big problem but implementing the HTTPS requests would be great! Good job! Thank you
  • Former Member
    Former Member over 6 years ago
    Hi - responses with a status code of 204 (No Content) are rendered as an error (although the http call works fine). Could you fix this bug please?

    Is there a github repo which I could submit a pull request to?

    Thanks!
  • Sorry, I did not answer for a while...

    Thank you for all your responses and suggestions!!

    One important thing for you more technical guys out there - a Garmin app does not do any requests on its own. The requests are done by your garmin connect app on your phone. That means, as a developer, one is miles away from direct access to an internet (TCP/HTTP) connection. Thats why it is difficult to say why a connection is working, why another is not working and why a connection works but a 204 is returned.


    JSON: parsing values works with flat Json responses only because the Garmin SDK does not come with a built in JSON parser. Writing a full blown JSON parser for a Garmin device is simply not what I wanted to do when I started IoTClient

    I'l try to reproduce and fix the https issue asap.
  • Hi,
    Let me get this straight. The IoTClient Widget does not work with Openhab2 for controlling switches. Is that correct?

    The reason is that the Openhab REST API uses the HTTP Data field for it's POST command which makes impossible to send a command via a single URL call. The data field needs to be set but it can't be set via a single URL call (that the IoTClient require) but It can be set by using cURL, jquery, python and so on.
    From the openhab documentation ( https://www.openhab.org/docs/configuration/restdocs.html ) the cURL example looks like this:
    curl --header "Content-Type: text/plain" --request POST --data "ON" http://192.168.100.21:8080/rest/items/MyLight
    So the --data "ON" is he problem with openhab rest API...or am I wrong here?
    (Some post suggested using classicui instead of rest but I don't have it enabled in my openhab system and don't understand if people got it working with that.)

    Thanks
  • Former Member
    Former Member over 6 years ago
    Hi,
    when I try to enter a URL and save, I get the attachted error message. I use a Forerunner 645 Music with Firmware 3.70.
    It seems happen only when i enter a url with ip adress lik http://192.168.2.33/addons/xmlapi/runprogram.cgi?program_id=6746
    If I replace the ip with a hostname i don't get this error. but my hardware is not reachable by hostname due to my router.

    Any hints?