Widget
APICall
By CoCoTTe42 · v1.7.2
Rating
4.6
Reviews
114
downloads
1,000
Price
Free
Description
╭─── ≡ General description ╰─ APICall is a widget for calling HTTP URLs throught Bluetooth via Smartphone or directly with WiFi/LTE for compatible devices. Typical usage is for calling REST API of IOT devices, home automation boxes - domotics (Fibaro, eedomus, jeedom, zipa, vera, ...) or others things via ifttt.com, zapier ... If you like it, give me a beer here ;o) → https://paypal.me/apicall → Bitcoin : bc1quuyugk3czzpp4zcr2j9kln4ju6hd9z27ef3y09 Garmin limits this description to 4 000 chars, the complete documentation is here : https://apicall.dumesnil.net ╭─── ≡ Usage ╰─ When you launch widget, press START or MENU. Select a device then an action, then press START button to launch. "OK" or "KO" with the HTML error code is displayed. Press MENU to select a new device/action. Note : ‣ "START" can be START button and/or a "tap" on screen for touch watches. ‣ "MENU" can be a long press on UP button, on bottom right button (Vivoactive 4), on the screen (touch watches)… ╭─── ≡ Configuration ╰─ ⤇ The configuration is done in settings menu in Garmin ConnectIQ application. There is 36 lines that have to be set as a JSON string like : » Example (basic) : {deviceName:"Gate", actionName:"Open", url:"http://my.url?to=open"} » Example (with icons and autonext) : {deviceName:"Cinema", deviceIcon:7, autonext:true, actionName:"TV", actionIcon:11, url:"http://my.url?tv=on"} • deviceName [mandatory] : ‣ Type : string ‣ Description : Set the name of the device to which the action belongs. It permit to group some actions under a same device. • deviceIcon [optionnal] : ‣ Type : integer ‣ Default : 1 ‣ Description : Icon to be displayed next to the name of the device. • autonext [optionnal] : ‣ Type : boolean [true|false] ‣ Default : false ‣ Description : When launching an action, the next action of the device is automatically selected. • actionName [mandatory] : ‣ Type : string ‣ Description : Name of the action • actionIcon [optionnal] : ‣ Type : integer ‣ Default : 2 ‣ Description : Icon to be displayed next to the name of the action. • url [mandatory] : ‣ Type : string ‣ Description : URL to be launched • autolaunch [optionnal] : ‣ Type : boolean [true|false] ‣ Default : false ‣ Description : Applies to the action. The action is launched immediatly after selection. Can work with autonext. • method [optionnal] : ‣ Type : string ‣ Default : "GET" ‣ Description : ["GET"|"POST"|"PUT"], set the HTTP request type. • POSTcontent [optionnal] : ‣ Type : string ‣ Default : "" ‣ Description : Send as request content with all method (GET, POST and PUT). It must contain a JSON type string. Be carreful to escape the " in the content if necessary. Exemple to send {"args":["3"]} : {POSTcontent:"{"args":["3"]}"}. • resDisplay [optionnal] : ‣ Type : string ‣ Default : "" ‣ Description : Put a JSON path to fetch the element to display. If not defined, only the message OK or KO + error code is displayed as return. If "text", the response is displayed as it is (pay attention to the length of the response…) Ex : if result is {"myres":"xxx"}, xxx is displayed with resDisplay:"myres". Ex : if result is {"myres":["id":"xxx", "id":"yyy"]}, xxx is displayed with resDisplay:"myres[0].id". • media [optionnal] : ‣ Type : string ‣ Default : "" ‣ Description : ["BT"|"WIFI-LTE"], force to launch the request through a specific media. If not set, default behavior is BT if connected, else Wifi/LTE. • headers [optionnal] : ‣ Type : string ‣ Default : "{}" ‣ Description : This option permit to set custom http headers. The main usage is to set the "Content-Type" and "Authorization" headers. Garmin do some checks that prevent to send everything you want, and these checks are unfortunately not documentated... To use the option, you need to configure a json with pairs of "name of the headers":"content of the header". See web site for more examples.
What's New
╭─── ≡ Note ╰─ You can find the complete documentation and manual here : https://apicall.dumesnil.net ⊕⊕⊕ WARNING ⊕⊕⊕ Several users report me some issues when configuring or upgrading from garminExpress. Please prefer use connectIQ. For supported watches which only have 60kb of memory, namely : ‣ fenix5, quatix5, fenix5s, fenixChronos ‣ forerunner245, forerunner645, forerunner935 ‣ venu ‣ vivoactive3 Note: "music" versions are not affected. You can configure about 8 to 15 actions on these watches depending on their complexity, then memory is full. If a reverse bleu triangle appears, try to limit the number of configured actions. ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ╭─────────────── 1.7.2 : Add support of Egde 550, 850 & MTB, fenix8pro, venu4 & 1x ╭─────────────── 1.7.1 : Add support of Forerunner® 570 and 970 ╭─────────────── 1.7.0 : Change SDK major release. From 7.3 to 8.1 Bug fix when using more than 10 devices or 10 actions on a same device. Add support of Descent™ G2, Mk1, Instinct® 3 Amoled (45 and 50mm), Vìvoactive® 6, Approach® S50 ╭─────────────── 1.6.0 : Change SDK major release from 6.4 to 7.3. ╭─────────────── 1.5.2 : Add support of Fēnix® 7pro-nonwifi) , 7Xpro-nonwifi, Forerunner® 165, 165m, Descent™ Mk3 1.5.1 : Fix an issue with the headers option, "Content-type" was not correctly handled. Add vivoactive5. 1.5.0 : Change SDK major release from 4.2 to 6.4. Add Venu® 3/3S support. ╭─────────────── Older version release notes are avalaible on the web site.
Review
Review article coming soon.