Custom Integration weenect

Hi!

I own a dog tracker from weenect so in case my dog goes missing I know where to find her.
I wanted to adjust the reporting interval of the tracker based on the location so I created a integration for homeassistant for it.

You can find all the information and the code itself here:

GitHub Release

GitHub Activity

hacs_badge

License

Project Maintenance

BuyMeCoffee

Community Forum

Homeassistant Custom Component for https://my.weenect.com/.

This component will set up the following platforms.

Platform | Description

– | –

binary_sensor | Adds sensors to show the connection status of your trackers.

device_tracker | Adds your trackers as device_trackers so they appear on the map.

sensor | Adds sensors like signal and battery strength of your trackers.

example

Services

weeenct.set_update_interval

Set the tracker update interval.

Name | Description | Example

– | – | –

tracker_id | The tracker id. | 10000

update_interval | The update interval. Possible values are 30S 1M 5M 10M 30M 1H. | 30M

weeenct.activate_super_live

Activate the super live mode.

Name | Description | Example

– | – | –

tracker_id | The tracker id. | 10000

weeenct.refresh_location

Request a location update.

Name | Description | Example

– | – | –

tracker_id | The tracker id. | 10000

Installation

HACS

The easiest way to add this to your Homeassistant installation is using HACS. And then follow the instructions under Configuration below.

Manual

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).

  2. If you do not have a custom_components directory (folder) there, you need to create it.

  3. In the custom_components directory (folder) create a new folder called weenect.

  4. Download all the files from the custom_components/weenect/ directory (folder) in this repository.

  5. Place the files you downloaded in the new directory (folder) you created.

  6. Restart Home Assistant

  7. In the HA UI go to “Configuration” → “Integrations” click “+” and search for “Blueprint”

Using your HA configuration directory (folder) as a starting point you should now also have this:


custom_components/weenect/__init__.py

custom_components/weenect/binary_sensor.py

custom_components/weenect/config_flow.py

custom_components/weenect/const.py

custom_components/weenect/device_tracker.py

custom_components/weenect/entity.py

custom_components/weenect/manifest.json

custom_components/weenect/sensor.py

custom_components/weenect/services.py

custom_components/weenect/services.yaml

custom_components/weenect/translations/en.sjon

Buy Me A Coffee

3 Likes

Hi !
I might be looking in a wrong place, but where can I find the documentation related to the configuration.

Thank you !

What kind of configuration are you looking for?
If you mean something you would put into configuration.yaml, this is not needed for this integration. You can set it up via the UI

I was indeed looking for a login/password to type in configuration.yaml in order to link my cat to my dashboard.
I found now the correct way to do it, thank you for the integration and your quick reply !

My only issue with this integration is about battery level. As a matter of fact I noticed that while it was perfectly working till version 2.0.3 (I’m running HA 2012.12.7), starting from 2.0.4 and now 2.05 the returned value is “unknown”. Reverting to 2.0.3 everything is fine again. What am I missing? Any similar behaviour out there?
Thanks!
Franco

Thank you for reporting the issue. I just realized it behaves the same in my installation. I will try to find out what happens!

Well that’s what you get for don’t unit testing “standard things that will surely work”.

Release v2.0.7 is ready for download.

@fmanzolini thank you for raising the issue!

Thanks a lot for the new versions. And last update is quite brilliant, great job! Franco

1 Like

Fabulous Job !
I use it now and reduce the battery consumption by changing the frequency update the night.

Hi.

Thank you very much for this excellent integration.
I was wondering about the super_live functionnality. I tried it and it works.
However, the map doesn 't refresh as often as the data is sent, so I still see GPS updates every 5 minutes or so in HASS.
It works in the app, however, but that kind of beats the idea of having everything in HASS.
Is it possible to change the integration’s update frequency to reflect the status of super_live? Any way I can work around this?

Once again, thanks.

I once thought about dynamically changing the update rate when super_live is used but it wasn’t straightforward and I am not using the tracker anymore.

You can try to combine it with dynamic polling like this: Google Maps Travel Time - Home Assistant

Hi :slight_smile: Erstmal Danke für’s erstellen!! Kannst du mir sagen wie ich die Integration konfiguriere? Ich hab Username und Password in der const.py angepasst, weil ich in der UI einfach nix gefunden habe. Leider lädt es auf meinem Dashboard aber nicht.

You should not (actually must not) alter anything in the sourcecode. Can you please provide screenshots of the UI setup where things go wrong?

Thank you very much for your answer.
It gave me some ideas. I left the automatic polling as is, but added an automation that loops for 2 minutes (super_live default duration I believe) and polls the entity every 2 seconds.
I haven’t tried it out yet, but I suppose it should work?

I think this should work