eifinger / hass-fressnapf-tracker

Homeassistant Custom Component for Fressnapf Trackers
MIT License
8 stars 2 forks source link

Deep Sleep / LED not syncing #65

Open saschaspeidel opened 1 month ago

saschaspeidel commented 1 month ago

Hi there,

thanks for the great integration! I noticed that the deep sleep status and the deep sleep switch seem to not update. If I enable deep sleep via HA - nothing happens in the app and vice versa. Also if i enable LED via HA - nothing happens.

The location and battery works flawless. :)

eifinger commented 1 month ago

Mhhh. Which version is displayed for your device? I just used the LED last night and it worked for me

saschaspeidel commented 1 month ago

It shows version 2.1 for the tracker.

eifinger commented 3 weeks ago

Could you please enable debug logging and send me a sample response? It should be preceded by Result from fressnapf_tracker:

saschaspeidel commented 3 weeks ago

Everything looks fine for me on that side.

Zeile 47660: 2024-08-20 09:14:44.524 DEBUG (MainThread) [custom_components.fressnapf_tracker.client] Result from fressnapf_tracker: {'name': 'DOGGO', 'serialnumber': '23171xxx', 'additional_parameters': '{"breed":["Deutscher Schäferhund","Australian Shepherd"],"isHybrid":true,"specialFoods":[],"isShowSpecialFood":false,"isShowInfoText":true,"isSpayed":true,"birthday":"25-10-2022","idfindefix":"","weight":"17.5 kg","activeGender":"female","activeFeed":["dry"],"idealWeight":null,"weightList":[{"weight":"17.5 kg","date":1723195719493}]}', 'icon': None, 'last_position_accuracy': 8, 'last_position_timestamp': '2024-08-20T08:37:08.000+02:00', 'last_seen_timestamp': '2024-08-20T08:37:08.000+02:00', 'inside_geofence': False, 'last_seen': '38 Minuten', 'last_position': '38 Minuten', 'battery': 75, 'charging': False, 'tracker_settings': {'generation': '2.1', 'type': 'dog', 'features': {'flash_light': True, 'sleep_mode': True, 'energy_saving_mode': True, 'geofence': False}, 'sales_channel': None}, 'led_brightness': {'status': 'ok', 'value': 0}, 'deep_sleep': {'status': 'ok', 'value': 1}, 'energy_saving': {'status': 'ok', 'value': 0}, 'led_activatable': {'has_led': True, 'seen_recently': False, 'nonempty_battery': True, 'not_charging': True, 'overall': False}, 'servicebooking': {'has_current_servicebooking': True, 'servicebooking_until': '2026-08-09T00:00:00.000+02:00', 'days_until_servicebooking_ends': 718}, 'position': {'lat': '48.xxx', 'lng': '9.232xxxxxxxxxxxx', 'created_at': '2024-08-20T08:37:08.000+02:00', 'sampled_at': '2024-08-20T08:37:08.000+02:00', 'accuracy': 8}} Zeile 47662: 2024-08-20 09:14:54.718 DEBUG (MainThread) [custom_components.fressnapf_tracker.client] Result from fressnapf_tracker: {'name': 'DOGGO', 'serialnumber': '23171xxx', 'additional_parameters': '{"breed":["Deutscher Schäferhund","Australian Shepherd"],"isHybrid":true,"specialFoods":[],"isShowSpecialFood":false,"isShowInfoText":true,"isSpayed":true,"birthday":"25-10-2022","idfindefix":"","weight":"17.5 kg","activeGender":"female","activeFeed":["dry"],"idealWeight":null,"weightList":[{"weight":"17.5 kg","date":1723195719493}]}', 'icon': None, 'last_position_accuracy': 8, 'last_position_timestamp': '2024-08-20T08:37:08.000+02:00', 'last_seen_timestamp': '2024-08-20T08:37:08.000+02:00', 'inside_geofence': False, 'last_seen': '38 Minuten', 'last_position': '38 Minuten', 'battery': 75, 'charging': False, 'tracker_settings': {'generation': '2.1', 'type': 'dog', 'features': {'flash_light': True, 'sleep_mode': True, 'energy_saving_mode': True, 'geofence': False}, 'sales_channel': None}, 'led_brightness': {'status': 'ok', 'value': 0}, 'deep_sleep': {'status': 'ok', 'value': 0}, 'energy_saving': {'status': 'ok', 'value': 0}, 'led_activatable': {'has_led': True, 'seen_recently': False, 'nonempty_battery': True, 'not_charging': True, 'overall': False}, 'servicebooking': {'has_current_servicebooking': True, 'servicebooking_until': '2026-08-09T00:00:00.000+02:00', 'days_until_servicebooking_ends': 718}, 'position': {'lat': '48.xxx', 'lng': '9.232xxxxxxxxxxxx', 'created_at': '2024-08-20T08:37:08.000+02:00', 'sampled_at': '2024-08-20T08:37:08.000+02:00', 'accuracy': 8}} Zeile 47664: 2024-08-20 09:15:24.481 DEBUG (MainThread) [custom_components.fressnapf_tracker.client] Result from fressnapf_tracker: {'name': 'DOGGO', 'serialnumber': '23171xxx', 'additional_parameters': '{"breed":["Deutscher Schäferhund","Australian Shepherd"],"isHybrid":true,"specialFoods":[],"isShowSpecialFood":false,"isShowInfoText":true,"isSpayed":true,"birthday":"25-10-2022","idfindefix":"","weight":"17.5 kg","activeGender":"female","activeFeed":["dry"],"idealWeight":null,"weightList":[{"weight":"17.5 kg","date":1723195719493}]}', 'icon': None, 'last_position_accuracy': 8, 'last_position_timestamp': '2024-08-20T08:37:08.000+02:00', 'last_seen_timestamp': '2024-08-20T08:37:08.000+02:00', 'inside_geofence': False, 'last_seen': '38 Minuten', 'last_position': '38 Minuten', 'battery': 75, 'charging': False, 'tracker_settings': {'generation': '2.1', 'type': 'dog', 'features': {'flash_light': True, 'sleep_mode': True, 'energy_saving_mode': True, 'geofence': False}, 'sales_channel': None}, 'led_brightness': {'status': 'ok', 'value': 0}, 'deep_sleep': {'status': 'ok', 'value': 0}, 'energy_saving': {'status': 'ok', 'value': 0}, 'led_activatable': {'has_led': True, 'seen_recently': False, 'nonempty_battery': True, 'not_charging': True, 'overall': False}, 'servicebooking': {'has_current_servicebooking': True, 'servicebooking_until': '2026-08-09T00:00:00.000+02:00', 'days_until_servicebooking_ends': 718}, 'position': {'lat': '48.xxx', 'lng': '9.232xxxxxxxxxxxx', 'created_at': '2024-08-20T08:37:08.000+02:00', 'sampled_at': '2024-08-20T08:37:08.000+02:00', 'accuracy': 8}} Zeile 47666: 2024-08-20 09:15:38.057 DEBUG (MainThread) [custom_components.fressnapf_tracker.client] Result from fressnapf_tracker: {'name': 'DOGGO', 'serialnumber': '23171xxx', 'additional_parameters': '{"breed":["Deutscher Schäferhund","Australian Shepherd"],"isHybrid":true,"specialFoods":[],"isShowSpecialFood":false,"isShowInfoText":true,"isSpayed":true,"birthday":"25-10-2022","idfindefix":"","weight":"17.5 kg","activeGender":"female","activeFeed":["dry"],"idealWeight":null,"weightList":[{"weight":"17.5 kg","date":1723195719493}]}', 'icon': None, 'last_position_accuracy': 8, 'last_position_timestamp': '2024-08-20T08:37:08.000+02:00', 'last_seen_timestamp': '2024-08-20T08:37:08.000+02:00', 'inside_geofence': False, 'last_seen': '38 Minuten', 'last_position': '38 Minuten', 'battery': 75, 'charging': False, 'tracker_settings': {'generation': '2.1', 'type': 'dog', 'features': {'flash_light': True, 'sleep_mode': True, 'energy_saving_mode': True, 'geofence': False}, 'sales_channel': None}, 'led_brightness': {'status': 'ok', 'value': 0}, 'deep_sleep': {'status': 'ok', 'value': 1}, 'energy_saving': {'status': 'ok', 'value': 0}, 'led_activatable': {'has_led': True, 'seen_recently': False, 'nonempty_battery': True, 'not_charging': True, 'overall': False}, 'servicebooking': {'has_current_servicebooking': True, 'servicebooking_until': '2026-08-09T00:00:00.000+02:00', 'days_until_servicebooking_ends': 718}, 'position': {'lat': '48.xxx', 'lng': '9.232xxxxxxxxxxxx', 'created_at': '2024-08-20T08:37:08.000+02:00', 'sampled_at': '2024-08-20T08:37:08.000+02:00', 'accuracy': 8}} Zeile 47668: 2024-08-20 09:15:57.036 DEBUG (MainThread) [custom_components.fressnapf_tracker.client] Result from fressnapf_tracker: {'name': 'DOGGO', 'serialnumber': '23171xxx', 'additional_parameters': '{"breed":["Deutscher Schäferhund","Australian Shepherd"],"isHybrid":true,"specialFoods":[],"isShowSpecialFood":false,"isShowInfoText":true,"isSpayed":true,"birthday":"25-10-2022","idfindefix":"","weight":"17.5 kg","activeGender":"female","activeFeed":["dry"],"idealWeight":null,"weightList":[{"weight":"17.5 kg","date":1723195719493}]}', 'icon': None, 'last_position_accuracy': 8, 'last_position_timestamp': '2024-08-20T08:37:08.000+02:00', 'last_seen_timestamp': '2024-08-20T08:37:08.000+02:00', 'inside_geofence': False, 'last_seen': '39 Minuten', 'last_position': '39 Minuten', 'battery': 75, 'charging': False, 'tracker_settings': {'generation': '2.1', 'type': 'dog', 'features': {'flash_light': True, 'sleep_mode': True, 'energy_saving_mode': True, 'geofence': False}, 'sales_channel': None}, 'led_brightness': {'status': 'ok', 'value': 0}, 'deep_sleep': {'status': 'ok', 'value': 0}, 'energy_saving': {'status': 'ok', 'value': 0}, 'led_activatable': {'has_led': True, 'seen_recently': False, 'nonempty_battery': True, 'not_charging': True, 'overall': False}, 'servicebooking': {'has_current_servicebooking': True, 'servicebooking_until': '2026-08-09T00:00:00.000+02:00', 'days_until_servicebooking_ends': 718}, 'position': {'lat': '48.xxx', 'lng': '9.232xxxxxxxxxxxx', 'created_at': '2024-08-20T08:37:08.000+02:00', 'sampled_at': '2024-08-20T08:37:08.000+02:00', 'accuracy': 8}}

eifinger commented 3 weeks ago

Yep looks good.

Does this never work? Or only sometimes not?

Really confused because I don't encounter any issues myself 😓

saschaspeidel commented 2 weeks ago

Sorry for the late response. I figured out LED is only available when the tracker is moving - so no issue with the LED. But deepsleep current state sensor and the switch are not working. I think it never worked yet.

Enabling deepsleep via HA - no effect. Enabling deepsleep via App - works fine, but no state change in HA.

Any idea how we can debug that? ^^

saschaspeidel commented 2 weeks ago

Quick update: I realized, that deepsleep set from HA IS infact working BUT not showing in the original App. So it looks like HA acts as kind of "master" while the slave (app) is not getting/reading the status correct. So that seems to be a bug in the Fressnapf Tracker App not the HASS Integration.

Can anybody confirm that?