Whistle V3 API

Is anyone using this with another Whistle device other than the v3? I have a couple of Fits that I was thinking of trying this on and was curious if anyone else had any luck.

I would imagine that it would not work out of the box, but could be somewhat easily adapted by removing any expectation of getting GPS data from the API.

Now, question to everybody: my dog’s whistle v3 only holds a charge for about 1-2 days. Is this normal?
I should point out that my dog was copiously sprayed by skunks more than once and the whistle seems to be in a bad shape so this may explain the awful battery life.

Anyway, what are you getting?

Fusion-

The biggest variable relative to how long it will hold a charge is how often my dogs are out of their main home zone (which is using WIFI). For the average week, with the dogs getting at least 1 walk a day for about 30-45 minutes, their Whistle is lasting about a weeks time. I hope that helps you a bit.

Thanks, Michael. This is encouraging. In this case, I think I will upgrade to a newer Go Explore model, this will also allow me to make sure the integration works for these as well.

I think I’m almost there…but what the is the sensor syntax, really? On this page it’s “sensors:” (with an s) and in the readme it’s “sensor:” without an s, and neither is a complete example or gives context of where/how this config goes into configuration.yaml? This for example doesn’t work. device_tracker.whistle_minion does come up with data, but none of the “sensor(s)” show up?


device_tracker:
  - platform: whistle
    username: !secret whistle_username
    password: !secret whistle_password
    monitored_variables:
      - WHISTLE
  - platform: template
    sensors:
      minion_goal_minutes:
        friendly_name: "Activity Goal"
        icon_template: mdi:trophy-outline
        value_template: '{{ state_attr("device_tracker.whistle_minion", "activity_goal") }}'
        unit_of_measurement: "minutes"
..etc

Anyone able to update if this works with the Go or Go Explore?

I’ve been looking for a way to track our dog, and the Fitbark looked promising but doesn’t appear to expose GPS over the API. This has been the most promising lead I’ve seen so far other than buying a chinese tracker that Traccar supports, but I’d like to have access to the extra features of something like the Whistle or Fitbark.

Worst case, I’ll probably end up buying one so I can test it out. If nothing else, I can use it for Wi-fi presense detection and still have the tracker’s own location features.

Thanks for making this, Chris!

About a month ago, I was asking about the Whistle Go Explore. I ended up upgrading to it and am very pleased. 3 weeks going on a single charge!

Also, I have been monitoring that device’s charge level using Home Assistant because everything seems to still be working well so, yes, that device is supported, including latitude/longitude.

2 Likes

Byron,

I am sorry that this is a bit confusing: HA’s configuration syntax has been pretty fluid (well it seems to have somewhat stabilized as of late) and indeed a more up-to-date syntax would be:

sensor:
  - platform: template
    sensors:
      minion_goal_minutes:
        friendly_name: "Activity Goal"
        icon_template: mdi:trophy-outline
        value_template: '{{ state_attr("device_tracker.whistle_minion", "activity_goal") }}'
        unit_of_measurement: "minutes"

while the platform’s configuration itself remains under device_tracker:

device_tracker:
  - platform: whistle
    username: !secret whistle_username
    password: !secret whistle_password
    monitored_variables:
      - WHISTLE
1 Like

NB: You can also add some automations, if you have a BLE Tracker (like a ESP32), know the MAC addresses, you can tune that when the RSSI gets below a certain value to assume Not At Home. I’m tuning some, so i can have per room detection of my pets.

2 Likes

I’m tuning some, so i can have per room detection of my pets.

I love this idea! I’ve got some ESPs on the way for some other custom tasks, but if I can tack this on as well that’d be awesome. I’m also thinking I could add some around the yards to track inside vs out which would be handy when I automate closing the doggy door for the night so we don’t lock the dog outside.

One of my dogs has epilepsy, which typically causes her to have seizures, 3-4 times per year. Typically, the seizures last a few minutes and the after effects are not long lasting. Unfortunately, yesterday she had a very bad seizure, which lasted >45 minutes. We found her unresponsive, in a pool of blood and fluids. She’s been in the emergency hospital overnight and she hasn’t recovered. Had we known as he was seizing, we could have administered meds to help. We were within 100yards, but just didn’t know.

This morning, I recalled that the whistle app can tell if shes been ‘licking’, so I reviewed her activity and found it registered ‘Dani was walking at home’, during the time of her seizure. I found the same for other days that she had a seizure. There are also ‘walking at home’ instances recorded when she wasn’t having a seizure, but they are rare. Therefore, I’d like to try to use u our integration to get sms notifications when the system registers ‘walking at home’ events. I suspect, if I had access to the raw sensor data, I could detect seizure with high accuracy, but meanwhile, this seems like a near term solution. I hope that Dani recovers and I can monitor better in the future, but perhaps this would be helpful for others as well.

Hi @Glennperry sorry to read about Dani. Please keep us updated.

It seems like, provided we can retrieve the behavioral data, we could create automations to receive warnings. At this time, I am not seeing that data in the information I am retrieving. I suspect Whistle created a dedicated endpoint for that. I’m going to have to retrieve an old Android phone so that I can sniff the protocol again. (or maybe I can do this using the emulator… anyway thinking out loud, sorry)

I’m just getting started with Home Assistant and I’m thrilled to have this working! Thank you for creating this integration.

Is there a way to read the current location of my dog, assuming it is a known place in her Whistle account? Ideally, I’d like to be able to tell when she is “home” and use it like a presence detection for her, but also showing when she is at other known places could be helpful.

Thanks!

If you’re using the PyWhistle linked to in the first post here, then there’s a device tracker built into the component. In your device_tracker: section in your configuration.yaml file, add the following:

  - platform: whistle
    username: !secret whistle_username
    password: !secret whistle_password
    monitored_variables:
      - WHISTLE

The attributes of the resulting device tracker include:
Source type
Latitude
Longitude
Gps accuracy
Name
Battery level
Battery status
Pending locate
Activity streak
Activity minutes active
Activity minutes rest
Activity goal

Thanks for replying – yes, I was referring to using the device tracker.

I guess I’ll have to use the latitude and longitude if I want to make this work, though I was hoping it could be used to get the attributes of the “Safe Places” that Whistle uses if my dog is at one.

I noticed that there are some new requirements for all custom integrations. I am getting this warning in my logs…

No ‘version’ key in the manifest file for custom integration ‘whistle’. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of ‘whistle’

Who should be aware of this? Technically this integration will die next month per HA. I LOVE everything about this integration. I track my two Beagles pretty close, and I love the integration with tracking the battery and activity levels.

I’ll try to get around to updating the code soon. Apologies for the delay, I swear a have a doctor’s note though!

Chris - I actually figured out how easy it was to modify and add a version # to the manifest. I added Version 1.0.0 to my manifest file and it worked! Thanks again for this custom component. I use it all the time to help with my dogs.

M

Copied here are the new contents of my manifest.json file:

{
“domain”: “whistle”,
“name”: “Whistle GPS and Activity Tracker”,
“version”: “1.0.0”,
“documentation”: “pywhistle/examples/homeassistant at master · Fusion/pywhistle · GitHub”,
“dependencies”: [],
“codeowners”: ["@fusion"],
“requirements”: [“pywhistle==0.0.2”]
}

Anyone else experience all data stopped receiving? I had to use the service pretty heavily as my dog escaped up in the mountains, so I wondered if they have a maximum # of requests per account or something. Everything still shows up on the app, just not via the API.