Home Assistant interface for Garmin's Connect IQ platform

This is a simple Connect IQ widget for Garmin devices that lets me toggle devices or trigger automations. It’s pretty basic but so far its been really handy to not have to pull out my phone if I want to do something.

The source is here if anyone is interested: https://github.com/alanfischer/hassiq


This is pretty cool. Do you have more information on this? Is it a custom component you have running within HASS? Or is it a sideloaded app on the watch? I’m not too familiar with the Garmin watches. Are you able to pull any data from the watch like steps, activity, or sleep?

It doesn’t require any HASS changes; it’s a sideloaded app on the watch which talks to HASS via the web api. Any Garmin device which supports “Connect IQ” apps should be able to run it.

It doesn’t pull any activity data from the watch yet, but that’s a good idea, and certainly possible. I’ll see if I can add it in.

I’ll give this a shot. I noticed a widget in the IQ app store that would do json requests, so was thinking of trying ot use it with the HASS RestAPI. I’ll need to look into how to sideload the app though.

Can you post the binaries to side-load?

Unfortunately side-loaded app’s properties don’t function correctly, which means there isn’t an easy way to set your HASS ip. If I put the app in the store that would solve it, or if you build it yourself and change the host in the source. (Right now it just points to http://home:8123) Building connect IQ apps isn’t too bad if you download the sdk, but I could change it to your HASS host if you want to let me know what it is and I could make a quick build for you.

Wow, super cool!!!

I’m new to HA and have been wondering about whether HA could know whether I’m traveling by bicycle or car and was thinking of trying to use email via LiveTrack Autostart. I hadn’t thought about someone adding something to Connect IQ. Perhaps it could be a data screen in the bike app.

Does your IQ app rely on your phone being connected to your home network? I assume the watch communicates to the Connect app on your phone which sends something to HA instead of opening a WIFI each time. (Hope you don’t mind the novice question)

Thanks! Currently the HassIQ project is a widget, which is allowed to do network communication. Unfortunately, I don’t believe a Data Field is allowed to make web requests. So there would have to be a more full featured Connect IQ App which would track your biking data and also notify Hass.

It doesn’t require that the phone be on the home network. If you had your Hass setup to allow external connections, then you could use the app from anywhere as long as you still had your phone with you. I looked at the WiFi on the device but it appears that is only for syncing activities, and not for Connect IQ to use. I hope the change that in the future, it would be handy to be able to skip the phone and still make web requests if you had an open wifi hotspot.

1 Like

this looks rad. i can see the small changes i would have to make to “host” in the git code. to make it work for me. might try this.

This is fantastic @alanf ! I will try to build in the connectIQ sdk changing to the “host” in your code this weekend. I’m definitely not a coder, but I might be able to figure out how to build yours!

For anyone interested the HassIQ app has had several updates, and now should support more Garmin devices as well as password authentication. It also allows you to specify a specific subset of entities to allow interaction with on your device.

I plan to get it on the store at some point here once I’m satisfied with the interface.

1 Like

so I had forgotten about this ad thought to finally try it out

now I have never ever built an app before… so I made the edits to the HassIQApp.mc
then I got to
“Build HassIQ.prg and copy to the Apps directory on your Garmin.”

and I went…huh? so I downloaded eclipse, installed garmin sdk, started a new project, called it HassIQ. > WatchApp >sdk 1.2.x
then I click the green play button it builds, launches the virtual watch I click the HA icon and
then I get this

Failed to load
Error: -1001
Failed invoking
Unexpected Type Error
in onMenu (/Users/lappy/Downloads/hassiq/./source/HassIQDelegate.mc:53)
in onSelect (/Users/lappy/Downloads/hassiq/./source/HassIQDelegate.mc:63)
in handleEvent (/private/var/jenkins/workspace/Tech-CIQ-Rel-Mac/mbsimulator/submodules/technology/monkeybrains/virtual-machine/api/WatchUi.mb:827)

Hi Dominic, thanks for the input. I did push a tiny change to the github project to catch the error you saw.

However the real cause to your problem is that by default the simulators won’t allow http connections. To fix this, once in your simulator window, go to Settings -> Use Device HTTPS Requirements and make sure it is unchecked, then run the project again.

If your hass instance is indeed behind https instead of http you will want to edit HassIQState.mc line 72, and change that to https.

Hopefully this resolves your issues.

gday I have now got

Received data:[{attributes=>{friendly_name=>grannyflat, supported_features=>115}, entity_id=>light.grannyflat, last_updated=>2018-01-11T17:27:31.811602+00:00, state=>off, last_changed=>2018-01-11T17:27:31.811602+00:00}, {attributes=>{friendly_name=>kitchen mid, supported_features=>115}, entity_id=>light.kitchen_mid, last_updated=>2018-01-12T11:36:28.426107+00:00, state=>off, last_changed=>2018-01-12T11:36:28.426107+00:00}, {attributes=>{friendly_name=>yeelight_rgb_34ce0084cb9f, icon=>lightbulb, supported_features=>127}, entity_id=>light.yeelight_rgb_34ce0084cb9f, last_updated=>2018-01-12T12:12:17.275978+00:00, state=>off, last_changed=>2018-01-12T12:12:17.275978+00:00}, {attributes=>{friendly_name=>SenseHAT, assumed_state=>true, supported_features=>17}, entity_id=>light.sensehat, last_updated=>2018-01-11T13:16:30.325587+00:00, state=>off, last_changed=>2018-01-11T13:16:30.325587+00:00}, {attributes=>{friendly_name=>Spare}, entity_id=>switch.spare, last_updated=>2018-01-11T13:16:02.180414+00:00, state=>off, last_changed=>2018-01-11T13:16:02.180414+00:00}, {attributes=>{friendly_name=>kitchen left, supported_features=>115}, entity_id=>light.kitchen_left, last_updated=>2018-01-12T11:36:28.390322+00:00, state=>off, last_changed=>2018-01-12T11:36:28.390322+00:00}, {attributes=>{friendly_name=>yeelight_rgb_34ce0084e61f, icon=>lightbulb, supported_features=>127}, entity_id=>light.yeelight_rgb_34ce0084e61f, last_updated=>2018-01-12T12:12:17.318130+00:00, state=>off, last_changed=>2018-01-12T12:12:17.318130+00:00}, {attributes=>{friendly_name=>Apple TV}, entity_id=>remote.apple_tv, last_updated=>2018-01-11T13:16:52.479999+00:00, state=>on, last_changed=>2018-01-11T13:16:52.479999+00:00}, {attributes=>{friendly_name=>bedroom 1, supported_features=>115}, entity_id=>light.bedroom_1, last_updated=>2018-01-12T14:06:09.206580+00:00, state=>off, last_changed=>2018-01-12T14:06:09.206580+00:00}, {attributes=>{friendly_name=>kitchen right, supported_features=>115}, entity_id=>light.kitchen_right, last_updated=>2018-01-12T11:36:28.360729+00:00, state=>off, last_changed=>2018-01-12T11:36:28.360729+00:00}, {attributes=>{friendly_name=>Loungeroom, supported_features=>115}, entity_id=>light.loungeroom, last_updated=>2018-01-12T10:07:37.468331+00:00, state=>off, last_changed=>2018-01-12T10:07:37.468331+00:00}, {attributes=>{friendly_name=>kitchen}, entity_id=>switch.kitchen, last_updated=>2018-01-12T14:06:13.497213+00:00, state=>off, last_changed=>2018-01-12T14:06:13.497213+00:00}, {attributes=>{friendly_name=>bedroom 2, supported_features=>115}, entity_id=>light.bedroom_2, last_updated=>2018-01-12T14:06:09.235575+00:00, state=>off, last_changed=>2018-01-12T14:06:09.235575+00:00}, {attributes=>{current_activity=>PowerOff, friendly_name=>Harmony Hub}, entity_id=>remote.harmony_hub, last_updated=>2018-01-11T13:17:14.690232+00:00, state=>off, last_changed=>2018-01-11T13:17:14.690232+00:00}, {attributes=>{friendly_name=>mancave left, supported_features=>115}, entity_id=>light.mancave_left, last_updated=>2018-01-12T14:06:09.268551+00:00, state=>off, last_changed=>2018-01-12T14:06:09.268551+00:00}, {attributes=>{state_detail=>standby, on_today_time=>00d 00h 00m 00s, on_total_time=>00d 00h 00m 00s, power_threshold_w=>8.000000, friendly_name=>LAUNDRY Insight, current_power_w=>0.395000, on_latest_time=>00d 01h 08m 45s}, entity_id=>switch.laundry_insight, last_updated=>2018-01-12T14:47:49.317765+00:00, state=>on, last_changed=>2018-01-11T17:27:31.773150+00:00}, {attributes=>{on_today_time=>00d 00h 47m 48s, on_latest_time=>05d 00h 44m 56s, on_total_time=>00d 00h 46m 43s, power_threshold_w=>8.000000, current_power_w=>64.320000, today_energy_kwh=>0.050000, friendly_name=>loungeroom Insight, state_detail=>on}, entity_id=>switch.loungeroom_insight, last_updated=>2018-01-12T14:47:49.382209+00:00, state=>on, last_changed=>2018-01-11T17:27:31.610433+00:00}, {attributes=>{friendly_name=>lamp}, entity_id=>switch.lamp, last_updated=>2018-01-11T17:32:43.602109+00:00, state=>on, last_changed=>2018-01-11T17:32:43.602109+00:00}, {attributes=>{friendly_name=>yeelight_rgb_34ce0084b6e2, icon=>lightbulb, supported_features=>127}, entity_id=>light.yeelight_rgb_34ce0084b6e2, last_updated=>2018-01-12T12:12:17.304015+00:00, state=>off, last_changed=>2018-01-12T12:12:17.304015+00:00}, {attributes=>{friendly_name=>loungeroom fan, supported_features=>115}, entity_id=>light.loungeroom_fan, last_updated=>2018-01-12T10:07:37.457454+00:00, state=>off, last_changed=>2018-01-12T10:07:37.457454+00:00}]
Failed invoking
Array Out Of Bounds Error
in onMenu (/Users/lappy/Downloads/hassiq/./source/HassIQDelegate.mc:55)
in onSelect (/Users/lappy/Downloads/hassiq/./source/HassIQDelegate.mc:63)
in handleEvent (/private/var/jenkins/workspace/Tech-CIQ-Rel-Mac/mbsimulator/submodules/technology/monkeybrains/virtual-machine/api/WatchUi.mb:827)

this is when I click the icon this time how ever I did get to see a list of entities on the virtual watchface…but not the groups I listed in the hassiq group. I wonder if it didnt like me adding groups to this list and if just wants individual items. I basically created a group of groups.

Thanks for the update @Dominic, and sorry for the delay. HassIQ doesn’t currently support groups in the group.hassiq, but I’ll look at adding support for that. I did push an update to resolve the crash you got too, just resulting from too many items being in the menu.

If you want to make a group with just entities in it instead of groups, that would fix your issue for now and I can update once I’ve added group support.

you rock. :slight_smile:

This is great! It took me a minute to figure out the build process, but now it’s working!

Is there a reason you’re doing the filtering on the client side? I wanted to be able to run a script, but as soon as I added that domain into the restrict list, the app ran out of memory (I have a lot of scripts). Instead, I modified api.py take in a limit_group parameter, and the watch app to send it in, and made the server only return the entities in the group (as well as the group, because I didn’t take the filtering code out of the watch app).

I also had to modify the watch app to be able to call a script, but that was pretty simple.

I can see about getting changes into a GitHub fork if you’re interested (I’m a software engineer, but I mostly leave it at work. We don’t use git, so I’ll have to figure that out).

Glad it works for you, I’d love any pull requests that address the memory issue!

Finally got that pull request submitted. I kept it to just the memory fix, but if you’d also like the change to call a script, let me know.

Whenever you do publish this to the store, can you turn on support for the Vivoactive 3?


Hi @natabat I saw the pull request this morning but didn’t get a chance to get things merged but now it looks closed. Any reason you changed your mind?