One2Track integration

I haven’t been very active with the development lately since it’s works pretty good.

The following feature requests are here:

  • Force update (location) button
  • Force shutdown button
  • Send message (through Home Assistant notify)
  • Set Signal strength sensor to show graph instead of numeric
  • Set Satellite count sensor to show graph instead of numeric
  • Set Altitude sensor to show graph instead of numeric
  • Set logo’s
  • Set Dutch and English language files (base work done)
  • Optimise naming of sensors

I’m also thinking about changing the polling from 30 seconds to 60 seconds. Or even better; set it at a PUSH update rate (need to get in contact with one2track developers for this). Also every entity gets updated at the same time. Would be better to only update an entity if the state has changed.

@EarlGrey Keep in mind that polling in HomeAssistant is draining resources from the One2track server API, not from the watch. It’s the On2track server that does the actual information push/pulling from the watch.

The idea of automatic shutdown after an hour connected to WiFi would cause a lot of false-positives because it uses Google Geo information (with WiFi SSID mapping) next to actual GPS. It could be that your kid is going to a zoo “Blijdorp” for example and the watch is using the GoogleGeo on WiFi. Then the entity “sensor.xxx_watch_location_type” in HomeAssistant will set it at WIFI.

In short; The watches actually do not use WiFi for connection, but only for Geo location.

@ErikSteiner You are correct. The gathered information is coming from the One2track servers. It can only get information from that source unless information polling directly from the watch is possible (which it is not at this time unless the source code/firmware of the watch is available/editable).

In short; The One2track servers provide the information via their API delayed, that is presented in HomeAssistant.

2 Likes

v1.2.4

  • Added function to update location and turn the device off. (tested and working fine)

Note 1:
When the integration is added for the first time, Home Assistant marks the buttons as potentially dangerous. As a safety measure, the device needs to be disabled and then re-enabled once. This only needs to be done the first time (not after an integration update). I tried to force-enable it from within the integration, but was unsuccessful in implementing that.

Note 2:
Using the Update Location button should only be pressed once max every 2 minutes. It can take up to 1 or 2 minutes (just like in the official app) to have the information forcefully refreshed.

Note 3:
API calls are changed from 30 second polling to 60 second polling. This is done to not overload the One2track servers.

1 Like

@renedis Thank you very much for the update. I already set a notification, when my child arrives at school. Unfortunately in that time, the watch didn’t update their location properly, and so I get the notification with a delay of hours. Now, I can create a automation that pulls the location every view minutes (I am thinking of 5 minutes) in a specific time window, until it arrived at school.

Wouldn’t it be better to set it to 500 second? The smallest update rate on the watch for the location is five minutes.

NVM saw the latest commit! Great!

Imagine the utopia, a watch that allows direct information extraction from the watch it self…a cloudfree watch… That would be an instant shut up and take my money :wink:

And yeah, in the meantime I figured out that the watch is not connecting to a wifi network in a traditional sense. Also it would never work in my/this case. I have bought the watches now and due to the provider used (Vodafone) I don’t have any cellulair coverage within my house. Also the BSSIDs in and around my are apparently not recorded in their DB sources. This means I cannot shutdown the watches remotely and when my kids are entering home + there is not a location update right before entering, they will be displayed as being in the playground until they go out the next day.

And I figured out that it is not possible within Home Assistant to manually override a modern device tracker. Only with legacy device trackers. This could have been a workaround for the location. Or adding my own BSSID location to the source they are using …

Hey @renedis, is there anything we can do about the session timeout. I need to remove and add the account from time to time, when the watch becomes unavailable. I bound the watch to some automation, and that is some kind of annoying.