sander1988 / Indego

Home Assistant Custom Component for Bosch Indego Lawn Mower
Apache License 2.0
96 stars 29 forks source link

Alert Details unavailyble / not an entity there / since 5.7.0 #230

Closed user45876 closed 5 months ago

user45876 commented 5 months ago

Checklist

The problem

The Alert Details are no longer available. There used to be entities for it, but there are no longer. Only an 'there is an alert' entity is available, a binary sensor. I have also set the third checkmark in the configuration to have the alerts stored, however, there are no alert details or entities besides the binary sensor.

Expected behavior

Seeing alert details / corresponding entities, at least after setting the third checkmark in the integration config.

Steps to reproduce

For me: Delete Indego integration, reinstall, set up with the chrome auth helper plugin. Set it as mower and also check the alerts checkmark.

Environment

Logs

switched on debug logging on integration page, reloaded integration, switched off debug logging. This is the resulting log.

2024-06-16 02:04:05.244 DEBUG (MainThread) [custom_components.indego] Starting shutdown.
2024-06-16 02:04:05.248 DEBUG (MainThread) [pyIndego.indego_async_client] [5AECF9] Task cancelled by task runner
2024-06-16 02:04:05.248 DEBUG (MainThread) [custom_components.indego] Shutdown finished.
2024-06-16 02:04:05.722 DEBUG (MainThread) [pyIndego.indego_base_client] Default request headers updated: '{'Content-Type': 'application/json', 'User-Agent': 'BoschIndego'}'
2024-06-16 02:04:05.723 DEBUG (MainThread) [custom_components.indego] Getting generic data for device info.
2024-06-16 02:04:05.723 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:05.723 DEBUG (MainThread) [pyIndego.indego_async_client] [BB55C2] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:05.964 DEBUG (MainThread) [pyIndego.indego_async_client] [BB55C2] HTTP status code: 200
2024-06-16 02:04:05.964 DEBUG (MainThread) [pyIndego.indego_async_client] [BB55C2] Response (JSON): {'alm_sn': '222603480', 'service_counter': 41387, 'needs_service': False, 'alm_mode': 'smart', 'bareToolnumber': '3600HB0303', 'alm_firmware_version': '30068.01459', 'renew_date': '2029-04-22T13:57:57.028Z'}
2024-06-16 02:04:05.964 DEBUG (MainThread) [custom_components.indego] Creating entities
2024-06-16 02:04:05.964 DEBUG (MainThread) [custom_components.indego] Loading platforms
2024-06-16 02:04:05.969 DEBUG (MainThread) [custom_components.indego] Starting initial update.
2024-06-16 02:04:05.969 DEBUG (MainThread) [custom_components.indego] Set online state: False
2024-06-16 02:04:05.969 DEBUG (MainThread) [custom_components.indego] Refreshing state.
2024-06-16 02:04:05.969 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:05.969 DEBUG (MainThread) [pyIndego.indego_async_client] [C299FF] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/state?longpoll=true&timeout=230&last=0, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:05.971 DEBUG (MainThread) [custom_components.indego] Initializing mower service for config entry 'cfb8f0f1ad9b8c12eb0422ae69fc55e5'
2024-06-16 02:04:05.974 DEBUG (MainThread) [custom_components.indego] Refreshing 10m.
2024-06-16 02:04:05.974 DEBUG (MainThread) [custom_components.indego] Refreshing 24h.
2024-06-16 02:04:05.974 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:05.974 DEBUG (MainThread) [pyIndego.indego_async_client] [20D9C0] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:05.975 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:05.975 DEBUG (MainThread) [pyIndego.indego_async_client] [EE41CE] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alerts, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:05.976 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:05.976 DEBUG (MainThread) [pyIndego.indego_async_client] [5D7928] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/predictive/lastcutting, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:05.976 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:05.977 DEBUG (MainThread) [pyIndego.indego_async_client] [1D2854] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/predictive/nextcutting, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:06.159 DEBUG (MainThread) [pyIndego.indego_async_client] [C299FF] HTTP status code: 200
2024-06-16 02:04:06.160 DEBUG (MainThread) [pyIndego.indego_async_client] [C299FF] Response (JSON): {'state': 258, 'enabled': True, 'map_update_available': False, 'mowed': 95, 'mowmode': 3, 'xPos': 318, 'yPos': 86, 'runtime': {'total': {'operate': 52003, 'charge': 10616}, 'session': {'operate': 0, 'charge': 0}}, 'mapsvgcache_ts': 1718496246138, 'svg_xPos': 1120, 'svg_yPos': 712, 'config_change': False, 'mow_trig': False}
2024-06-16 02:04:06.160 DEBUG (MainThread) [custom_components.indego] Set online state: True
2024-06-16 02:04:06.162 DEBUG (MainThread) [custom_components.indego.lawn_mower] Mower state/activity updated to: docked
2024-06-16 02:04:06.163 DEBUG (MainThread) [custom_components.indego] Refreshing state.
2024-06-16 02:04:06.163 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:06.164 DEBUG (MainThread) [pyIndego.indego_async_client] [F698A1] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/state?longpoll=true&timeout=230&last=258, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:06.220 DEBUG (MainThread) [pyIndego.indego_async_client] [5D7928] HTTP status code: 200
2024-06-16 02:04:06.221 DEBUG (MainThread) [pyIndego.indego_async_client] [5D7928] Response (JSON): {'last_mowed': '2024-06-15T11:35:36.256+02:00'}
2024-06-16 02:04:06.231 DEBUG (MainThread) [pyIndego.indego_async_client] [1D2854] HTTP status code: 200
2024-06-16 02:04:06.231 DEBUG (MainThread) [pyIndego.indego_async_client] [1D2854] Response (JSON): {'mow_next': '2024-06-17T10:00:00+02:00'}
2024-06-16 02:04:06.241 DEBUG (MainThread) [pyIndego.indego_async_client] [20D9C0] HTTP status code: 200
2024-06-16 02:04:06.242 DEBUG (MainThread) [pyIndego.indego_async_client] [20D9C0] Response (JSON): {'alm_sn': '222603480', 'service_counter': 41387, 'needs_service': False, 'alm_mode': 'smart', 'bareToolnumber': '3600HB0303', 'alm_firmware_version': '30068.01459', 'renew_date': '2029-04-22T13:57:57.028Z'}
2024-06-16 02:04:06.252 DEBUG (MainThread) [pyIndego.indego_async_client] [EE41CE] HTTP status code: 200
2024-06-16 02:04:06.252 DEBUG (MainThread) [pyIndego.indego_async_client] [EE41CE] Response (JSON): []
2024-06-16 02:04:06.256 DEBUG (MainThread) [custom_components.indego] Refreshing initial operating data.
2024-06-16 02:04:06.256 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:06.256 DEBUG (MainThread) [pyIndego.indego_async_client] [4832A4] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/operatingData, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:07.909 DEBUG (MainThread) [pyIndego.indego_async_client] [F698A1] HTTP status code: 200
2024-06-16 02:04:07.909 DEBUG (MainThread) [pyIndego.indego_async_client] [F698A1] Response (JSON): {'state': 64513, 'map_update_available': False, 'charge': 0, 'operate': 0, 'mapsvgcache_ts': 1718496247890, 'svg_xPos': 1120, 'svg_yPos': 712}
2024-06-16 02:04:07.909 DEBUG (MainThread) [custom_components.indego] Set online state: True
2024-06-16 02:04:07.912 DEBUG (MainThread) [custom_components.indego] Refreshing state.
2024-06-16 02:04:07.912 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:07.912 DEBUG (MainThread) [pyIndego.indego_async_client] [8FD709] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/state?longpoll=true&timeout=230&last=64513, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:58.532 DEBUG (MainThread) [custom_components.indego] Starting shutdown.
2024-06-16 02:04:58.536 DEBUG (MainThread) [pyIndego.indego_async_client] [8FD709] Task cancelled by task runner
2024-06-16 02:04:58.536 DEBUG (MainThread) [custom_components.indego] Shutdown finished.
2024-06-16 02:04:58.537 DEBUG (MainThread) [pyIndego.indego_base_client] Default request headers updated: '{'Content-Type': 'application/json', 'User-Agent': 'BoschIndego'}'
2024-06-16 02:04:58.538 DEBUG (MainThread) [custom_components.indego] Getting generic data for device info.
2024-06-16 02:04:58.538 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:58.538 DEBUG (MainThread) [pyIndego.indego_async_client] [74824C] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:58.796 DEBUG (MainThread) [pyIndego.indego_async_client] [74824C] HTTP status code: 200
2024-06-16 02:04:58.797 DEBUG (MainThread) [pyIndego.indego_async_client] [74824C] Response (JSON): {'alm_sn': '222603480', 'service_counter': 41397, 'needs_service': False, 'alm_mode': 'smart', 'bareToolnumber': '3600HB0303', 'alm_firmware_version': '30068.01459', 'renew_date': '2029-04-22T13:57:57.028Z'}
2024-06-16 02:04:58.797 DEBUG (MainThread) [custom_components.indego] Creating entities
2024-06-16 02:04:58.797 DEBUG (MainThread) [custom_components.indego] Loading platforms
2024-06-16 02:04:58.824 DEBUG (MainThread) [custom_components.indego] Starting initial update.
2024-06-16 02:04:58.824 DEBUG (MainThread) [custom_components.indego] Set online state: False
2024-06-16 02:04:58.825 DEBUG (MainThread) [custom_components.indego] Refreshing state.
2024-06-16 02:04:58.825 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:58.825 DEBUG (MainThread) [pyIndego.indego_async_client] [5C4B29] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/state?longpoll=true&timeout=230&last=0, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:58.831 DEBUG (MainThread) [custom_components.indego] Initializing mower service for config entry 'cfb8f0f1ad9b8c12eb0422ae69fc55e5'
2024-06-16 02:04:58.839 DEBUG (MainThread) [custom_components.indego] Refreshing 10m.
2024-06-16 02:04:58.840 DEBUG (MainThread) [custom_components.indego] Refreshing 24h.
2024-06-16 02:04:58.840 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:58.841 DEBUG (MainThread) [pyIndego.indego_async_client] [C705C3] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:58.845 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:58.845 DEBUG (MainThread) [pyIndego.indego_async_client] [9766B5] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alerts, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:58.847 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:58.847 DEBUG (MainThread) [pyIndego.indego_async_client] [782B51] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/predictive/lastcutting, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:58.850 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:58.850 DEBUG (MainThread) [pyIndego.indego_async_client] [F4A4DF] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/predictive/nextcutting, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:59.070 DEBUG (MainThread) [pyIndego.indego_async_client] [C705C3] HTTP status code: 200
2024-06-16 02:04:59.071 DEBUG (MainThread) [pyIndego.indego_async_client] [C705C3] Response (JSON): {'alm_sn': '222603480', 'service_counter': 41397, 'needs_service': False, 'alm_mode': 'smart', 'bareToolnumber': '3600HB0303', 'alm_firmware_version': '30068.01459', 'renew_date': '2029-04-22T13:57:57.028Z'}
2024-06-16 02:04:59.094 DEBUG (MainThread) [pyIndego.indego_async_client] [F4A4DF] HTTP status code: 200
2024-06-16 02:04:59.094 DEBUG (MainThread) [pyIndego.indego_async_client] [F4A4DF] Response (JSON): {'mow_next': '2024-06-17T10:00:00+02:00'}
2024-06-16 02:04:59.104 DEBUG (MainThread) [pyIndego.indego_async_client] [782B51] HTTP status code: 200
2024-06-16 02:04:59.105 DEBUG (MainThread) [pyIndego.indego_async_client] [782B51] Response (JSON): {'last_mowed': '2024-06-15T11:35:36.256+02:00'}
2024-06-16 02:04:59.115 DEBUG (MainThread) [pyIndego.indego_async_client] [9766B5] HTTP status code: 200
2024-06-16 02:04:59.116 DEBUG (MainThread) [pyIndego.indego_async_client] [9766B5] Response (JSON): []
2024-06-16 02:04:59.120 DEBUG (MainThread) [custom_components.indego] Refreshing initial operating data.
2024-06-16 02:04:59.120 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:59.120 DEBUG (MainThread) [pyIndego.indego_async_client] [667AF6] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/operatingData, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 
2024-06-16 02:04:59.131 DEBUG (MainThread) [pyIndego.indego_async_client] [5C4B29] HTTP status code: 200
2024-06-16 02:04:59.132 DEBUG (MainThread) [pyIndego.indego_async_client] [5C4B29] Response (JSON): {'state': 64513, 'enabled': True, 'map_update_available': False, 'mowed': 95, 'mowmode': 3, 'xPos': 318, 'yPos': 86, 'runtime': {'total': {'operate': 52013, 'charge': 10616}, 'session': {'operate': 0, 'charge': 0}}, 'mapsvgcache_ts': 1718496299111, 'svg_xPos': 1120, 'svg_yPos': 712, 'config_change': False, 'mow_trig': False}
2024-06-16 02:04:59.132 DEBUG (MainThread) [custom_components.indego] Set online state: True
2024-06-16 02:04:59.136 DEBUG (MainThread) [custom_components.indego.lawn_mower] Mower state/activity updated to: docked
2024-06-16 02:04:59.136 DEBUG (MainThread) [custom_components.indego] Refreshing state.
2024-06-16 02:04:59.141 DEBUG (MainThread) [pyIndego.indego_async_client] Refreshing token
2024-06-16 02:04:59.142 DEBUG (MainThread) [pyIndego.indego_async_client] [CCBA96] GET call to API endpoint https://api.indego-cloud.iot.bosch-si.com/api/v1/alms/222603480/state?longpoll=true&timeout=230&last=64513, headers: {"Content-Type": "application/json", "User-Agent": "BoschIndego", "Authorization": "******"}, data: 

State of relevant entities

N/A

Additional information

This was available in 5.6.3 and now there is a possibly corresponding configuration option. I have switched that on but still can not see the alert details.

Hope, I got that right. Thank you so much for your great work!!!

kimzeuner commented 5 months ago

The Alert entities were deleted but they were added as attributes to the alert entity (the binary sensor). Are there also no attributes ?

user45876 commented 5 months ago

Unfortunately not, in my case at least. The entity "binary_sensor.indego_serial_alert" only has the number of alerts as attributes:

device_class: problem
friendly_name: Radio alert
alerts_count: 0

(For unknown reasons, indegos name is "Radio" ;) )

kimzeuner commented 5 months ago

Ok but do you have an active alert in your bosch app ? Because in the actual setting an alert is only added to the attributes when the alert count is > 0. When it is 0 then it looks like you have posted (only friendly name, device class and alert_count)

user45876 commented 5 months ago

No, I did not, as you said ;) Thanks for pointing this out, I was not aware of that. And yes, when there is an active alert, the attributes are there. => User error, works as designed. Sorry and thank a lot!

kimzeuner commented 5 months ago

No problem, you're welcome 😉