Open Kfrard opened 1 month ago
Hey there @thomas55555, mind taking a look at this issue as it has been labeled with an integration (husqvarna_automower
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
husqvarna_automower documentation husqvarna_automower source (message by IssueLinks)
Is is for all the entities the same? Can you share the device diagnostics from the moment the entity is not available?
Is is for all the entities the same? Can you share the device diagnostics from the moment the entity is not available?
Occurs for: lawn_mower.mower select.mower_headlight_mode sensor.mower_next_launch sensor.mower_restricted_reason switch.mower_enable_schedule
Sent diagnostic data when entities are unavailable. config_entry-husqvarna_automower.json
This is the config entry diagnostics. Please send the device diagnostics.
What was the screenshot above? Looked like a binary sensor.
This is the config entry diagnostics. Please send the device diagnostics.
Can you suggest how to do this?
What was the screenshot above? Looked like a binary sensor.
switch.mower_enable_schedule
I downloaded the diagnostics from here, I don't know any other method.
The given page (that I saw) doesn't tell me anything else :(.
You must click on the device first
In fact, I checked the beginning of the file earlier and it looked the same. I am attaching it. husqvarna_automower.json
As you can see in the file the state of the metadata connected
is false. This value comes directly from API, so that's the reason for the non availability.
The integration has no influence on that. What's your Husqvarna android/iOS app showing?
As you can see in the file the state of the metadata
connected
is false. This value comes directly from API, so that's the reason for the non availability. The integration has no influence on that. What's your Husqvarna android/iOS app showing?
[The entity was unavailable, I opened the Automower application, it took longer than usual to load and at the same moment it loaded, the entities were available in HA.] It was an isolated case. I made several attempts later and the situation did not repeat. The application works all the time, in HA only 5 entities are unavailable.
The error suggests a problem with code changes, the log indicates that it appeared immediately after the HA Core update.
The status timestamp in the file is from yesterday morning.... That's strange. Have you restarted ha since the update? And can you do it?
I restarted HA today, now I restarted the server. The issue still exists. Why strange?
Because it should be more recent. Can you send the current device diagnostics?
Strange, I restarted HA several times yesterday and today. I have now restarted the entire Proxmox. I am attaching the logs AFTER the restart, I see that due to the lack of availability, the datetime (by the way, with a typo) remained at the time of the HA update. husqvarna_automower-available.json husqvarna_automower-unavailable.json
Additionally, when the entities are available, the data is also correct, but when _switch.mower_enableschedule is switched, an error appears.
404_switch_logs.txt
core-2024.7.2 the problem does not occur
The problem is back :(
Can you run debug logging for a while ( ~20min) and post the results here?
I will add that during debugging, I did not make any changes or actions. I have noticed that sometimes the mower's status is incorrectly displayed as "error" (for a while).
2024-07-17 17:23:13.380 DEBUG (MainThread) [aioautomower.session] Got positions-event, data: {'id': 'REDACTED', 'type': 'positions-event', 'attributes': {'positions': [{'latitude': REDACTED, 'longitude': REDACTED}]}}
2024-07-17 17:23:13.381 DEBUG (MainThread) [aioautomower.session] Got status-event, data: {'id': 'REDACTED', 'type': 'status-event', 'attributes': {'battery': {'batteryPercent': 99}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'NOT_APPLICABLE', 'state': 'OFF', 'inactiveReason': 'NONE', 'errorCode': 0, 'errorCodeTimestamp': 0}, 'planner': {'nextStartTimestamp': 0, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'NOT_APPLICABLE'}, 'metadata': {'connected': True, 'statusTimestamp': 1721229793280}}}
2024-07-17 17:23:13.381 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
2024-07-17 17:23:13.383 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
2024-07-17 17:23:23.212 DEBUG (MainThread) [aioautomower.session] Got status-event, data: {'id': 'REDACTED', 'type': 'status-event', 'attributes': {'battery': {'batteryPercent': 99}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'NOT_APPLICABLE', 'state': 'OFF', 'inactiveReason': 'NONE', 'errorCode': 0, 'errorCodeTimestamp': 0}, 'planner': {'nextStartTimestamp': 0, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'NOT_APPLICABLE'}, 'metadata': {'connected': True, 'statusTimestamp': 1721229803055}}}
2024-07-17 17:23:23.212 DEBUG (MainThread) [aioautomower.session] Got positions-event, data: {'id': 'REDACTED', 'type': 'positions-event', 'attributes': {'positions': [{'latitude': REDACTED, 'longitude': REDACTED}]}}
2024-07-17 17:23:23.213 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
2024-07-17 17:23:23.215 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
2024-07-17 17:23:32.531 DEBUG (MainThread) [aioautomower.session] Got status-event, data: {'id': 'REDACTED', 'type': 'status-event', 'attributes': {'battery': {'batteryPercent': 68}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'PARKED_IN_CS', 'state': 'RESTRICTED', 'inactiveReason': 'NONE', 'errorCode': 0, 'errorCodeTimestamp': 0}, 'planner': {'nextStartTimestamp': 1721286000000, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'WEEK_SCHEDULE'}, 'metadata': {'connected': True, 'statusTimestamp': 1721229812428}}}
2024-07-17 17:23:32.532 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
2024-07-17 17:23:32.572 DEBUG (MainThread) [aioautomower.session] Got positions-event, data: {'id': 'REDACTED', 'type': 'positions-event', 'attributes': {'positions': [{'latitude': REDACTED, 'longitude': REDACTED}]}}
2024-07-17 17:23:32.573 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
2024-07-17 17:31:32.163 DEBUG (MainThread) [aioautomower.auth] request[get]=https://api.amc.husqvarna.dev/v1/mowers/ None
2024-07-17 17:31:32.822 DEBUG (MainThread) [aioautomower.auth] response={'data': [{'type': 'mower', 'id': 'REDACTED', 'attributes': {'system': {'name': 'REDACTED', 'model': 'Husqvarna Automower', 'serialNumber': REDACTED}, 'battery': {'batteryPercent': 99}, 'capabilities': {'headlights': True, 'workAreas': False, 'position': True, 'stayOutZones': False}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'NOT_APPLICABLE', 'inactiveReason': 'NONE', 'state': 'OFF', 'errorCode': 0, 'errorCodeTimestamp': 0, 'isErrorConfirmable': False}, 'calendar': {'tasks': [{'start': 360, 'duration': 900, 'monday': True, 'tuesday': True, 'wednesday': True, 'thursday': True, 'friday': True, 'saturday': True, 'sunday': True}]}, 'planner': {'nextStartTimestamp': 0, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'NOT_APPLICABLE'}, 'metadata': {'connected': False, 'statusTimestamp': 1721230251998}, 'positions': [{'latitude': REDACTED, 'longitude': REDACTED}, the deleted data is the correct statistics}}}]}
2024-07-17 17:31:32.823 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Finished fetching husqvarna_automower data in 0.660 seconds (success: True)
2024-07-17 17:37:32.473 DEBUG (MainThread) [aioautomower.session] Got status-event, data: {'id': 'REDACTED', 'type': 'status-event', 'attributes': {'battery': {'batteryPercent': 87}, 'mower': {'mode': 'MAIN_AREA', 'activity': 'PARKED_IN_CS', 'state': 'RESTRICTED', 'inactiveReason': 'NONE', 'errorCode': 0, 'errorCodeTimestamp': 0}, 'planner': {'nextStartTimestamp': 1721286000000, 'override': {'action': 'NOT_ACTIVE'}, 'restrictedReason': 'WEEK_SCHEDULE'}, 'metadata': {'connected': True, 'statusTimestamp': 1721230652381}}}
2024-07-17 17:37:32.474 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
2024-07-17 17:37:32.542 DEBUG (MainThread) [aioautomower.session] Got positions-event, data: {'id': 'REDACTED', 'type': 'positions-event', 'attributes': {'positions': [{'latitude': REDACTED, 'longitude': REDACTED}]}}
2024-07-17 17:37:32.543 DEBUG (MainThread) [homeassistant.components.husqvarna_automower.coordinator] Manually updated husqvarna_automower data
After updating to core-2021.7.3, I see false data. There is no error in the mower, nor in the Automower app.
@Thomas55555 Do you have any idea why this might be happening?
I have an idea why this is happening: I think the problem is, that when polling the API, you get different results like with getting push updates from the API. But I can't explain why and I also don't have a solution. And it seems like you are the only one with the problem. Maybe you should contact Husqvarna of they can find the problem. You can find a email address in the Husqvarna developers portal. They are very helpful there.
Please let me know, what they say.
The problem
After updating to 2024.7.1, the connection to the mower is interrupted. Each entity is up/down/up/down, status changes every few minutes. The arrow indicates when the HA update occurs.![obraz](https://github.com/home-assistant/core/assets/52238753/f5c61765-f959-4274-9827-bc93e73f8859)
What version of Home Assistant Core has the issue?
core-2024.7.1/2/3
What was the last working version of Home Assistant Core?
core-2024.6.0
What type of installation are you running?
Home Assistant OS
Integration causing the issue
husqvarna_automower
Link to integration documentation on our website
https://www.home-assistant.io/integrations/husqvarna_automower/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response