Pinetime / Infinitime / GadgetBrdige support

I have a Pinetime running InfiniTime. On my phone I have GadgetBridge.

Everything works remarkably well (notifications, music control, it even gives time :slight_smile:), pretty amazing for a 30$, full open-source watch.

I obviously tried to connect it to home assistant.

Inspired by this post :

  • I made an app on the watch.
  • It sends Bluetooth frame to GadgetBridge
  • That in turn sends an Android broadcast message (for instance nodomain.freeyourgadget.gadgetbridge.btn1).
  • I configured hass Android App “last update trigger” to catch this broadcast message.
  • On server side I have this kind of automation :
- alias: pinetime btn1
  trigger:
    - platform: state
      entity_id: sensor.ben_last_update_trigger
      to: nodomain.freeyourgadget.gadgetbridge.btn1
  action:
    - service: switch.turn_on
      entity_id: switch.portail_pieton

And finally I can open my gate from my watch (most of the time it works).
I know Home assistant Wear OS app exists, but not applicable here.

I have some questions :

  • Is there any plan to integrate such device in Hass ?
  • Is there any plan to integrate GadgetBridge ? It should be easier than directly integrate Pinetime and it could benefit from all the watches supported by GadgetBridge ?
  • Is there a simpler/cleaner way to communicate from the watch to the server ? Or at least from the watch to Hass Android app ?
  • Is anyone interested to help me on this project ? See here and here (first time coding on Android and FreeRTOS, so don’t expect too much)

Very interesting your post and curious about the PineTime (I’m a long time user of Mi band products with Gadgetbridge).
For integration, I was thinking to setup the automatic export in Gadgetbridge and then use my Nextcloud sync to transfer the export file of GB into HA. Then it would need a module/integration whatever to read the file and extract datas but that part is out of my reach so far as I’m a noob in Python programming :frowning:
Regarding the PineTime it works well with GB ? report of steps are accurate ? and autonomy is not too bad ? Thanks :wink:

I have a pinetime. It works well with GB, the steps it reports is in line with, although consistantly higher than, my other step counter I use. Interested in this project but I know even less about the codebase than the OP.

@vincen : Good idea to integrate gadgetbridge in HA. Maybe I should open a feature request for GadgetBridge and one for Pinetime.
Not sure to be able to know how to implement this by myself.

I’m also happy with this watch :

  • Some issues with notification (French characters not properly displayed)
  • Not really interested in step counter
  • Music control is great
  • Object quality itself is pretty good for the price
  • Autonomy is about 5-7 days

@Baggypants If you know how to compile Infinitime and GB you can try my code.
I will post here if I improve this attempt of Pinetime → GB → HA integration. Maybe someday propose this to Infinitime and GB

2 Likes

Nice. I’m extremely interested in this project. I’m going to try and compile your code later today and get it uploaded to my dev pinetime device. I’d love to try and get something similar working on WaspOS.

When I try and compile the firmware in the InfiniSim it get an error stating “<host.ble_gap.h>” is not found. I’m not sure why that is because the other files that include that don’t have any issue.