Open gimmel opened 4 months 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 it possible to install the old HACS version again?
Yes, that's possible, but we don't give support for custom components and we not recommend them.
To your bugs: The flipping switch should be gone in ha 2024.5.0. But there shouldn't be commands send automatically. Can you try again after upgrading to ha 2024.5.0 (after released) and send the debug log including the error message, if it happens again?
Also the device and config entry diagnostics would be helpful.
As mentioned in #116280 the flipping problem still exists in 2024.5.0 but I'm able now to send commands like setting the light.
Thanks Thomas, I updated HA to version 2024.5.0 now, but I still can’t start the mower. If I press „Start mowing“, nothing happens at first, but then the schedule button activates automatically and some time later I get „Fehler beim Aufrufen des Diensts lawn_mower/start_mowing. Command couldn't be sent to the command queue: Error from API: 404: Not Found“.
https://github.com/home-assistant/core/assets/135626/8a713a7d-7bd7-4aad-bd69-1f9dd5efaf07
home-assistant_husqvarna_automower_2024-05-03T09-39-49.719Z.log
husqvarna_automower-4c3c56dee42c2ece46582f70a90186c5-Sprout-8aa689a45e73ba81655d5b2aab061b6a.json
For me the first part looks alright. If you click "Mähen beginnen", then the same command will be sent, like when you click "Zeitplan aktivieren". The command is called "ResumeSchedule", like mentions in the docs. This is because the API can't force the mower to just start, expect if we would force it to mow for a given duration. As the entity model of HA and the API of Husqvarna don't fit 100%, it unfortunately like this. Regarding the 404 error: I'm not sure, where this is coming from. Maybe, the config entry diagnostics could be helpful. You send the device diagnostics.
I'm still getting the issue where enable schedule turns itself back on right after turning it off. Running 2024.5.0. Logs attached.
home-assistant_husqvarna_automower_2024-05-03T13-47-48.367Z.log
I'm still getting the issue where enable schedule turns itself back on right after turning it off. Running 2024.5.0. Logs attached.
home-assistant_husqvarna_automower_2024-05-03T13-47-48.367Z.log
But as I can see in the logs, the mower received the command ParkUntilFurtherNotice
and then started to go home. After the mower went home, was the switch in the right position?
Maybe it would help to understand better what the Enable Schedule switch is equivalent to with the Automower? Is it Parked? When flipped do I also need to tell it to return to dock? If flipped and returning to dock and I want to cancel, do I just flip it again or need to tell it to start mowing too?
I think we have a big misunderstanding here. I thought the service "lawn_mower.start_moving" would start the mowing process. But apparently the Husqvarna mower can only follow the schedule and the integration can only switch the schedule on and off. Could it be that the play and pause buttons only switch on and off the schedule? So perhaps the integration works as expected and my expectations are wrong?
In the Husqvarna app, I press the play button and then tap "Schedule off - 3 hours" to start the mower directly. But it also took me a long time to understand Husqvarna's operating strategy in the app. Husqvarna has a strange usage strategy ;-)
So Here the explanation:
If you turn the schedule on, the command resume schedule is sent to the mower. It's the same command like you send with the start button. After turning this on the switch should flip instantly and stay there
If you turn the schedule off, the command park until further notice
is sent. If the mower is already in the dock, than the switch should instantly flip to off and stay there.
If the mower is not in the dock, and you turn the schedule off, then the switch should also go off instantly, but flips back to on after a while. When the mower arrived in the dock, then the switch should go off again.
Is the problem with sending commands not possible finally solved?
Does that mean, that there is no way to start the mower manually from HA?
Is the problem with sending commands not possible finally solved?
That’s hard to say, because we don’t exactly know what the intended functionality is. If I understand you right, the button „Start mowing“ does not start mowing, but just activates the schedule? And all buttons (play, pause) have just the function to start and pause the schedule? Is that right?
'Start mowing' and the play button is the same. No idea, why HA makes two buttons there. Enable schedule is also the same. Pause just pauses the mower. Example: mower is mowing and you press pause, than the mower makes a break. If you click on the dock button, then the mower parks until the next schedule.
I think that is the main problem. People expect the mower to start mowing if they press „start mowing“. But what it does is „enable schedule“.
But there is an Husqvarna API command for „Start“. That should be used instead of „ResumeSchedule“.
Button Start Mowing/Play -> API Start Button Pause -> API Pause Button Dock -> API ParkUntilNextSchedule or ParkUntilFurtherNotice (depending on Enable Schedule) Switch Enable Schedule -> API ParkUntilFurtherNotice/ResumeSchedule
That is the only way we can actively control the mower.
What "start moving" is doing now:
What "start moving" should do:
But there is always a duration required for start. So if this time is over, the people wonder, why it stopped.
There is also another way, how you can actively control the mower: when you have a schedule enabled 24/7. And than say: Resume schedule, then the mower starts. And if you disable the schedule, the mower parks until further notice....
There is also another way, how you can actively control the mower: when you have a schedule enabled 24/7. And than say: Resume schedule, then the mower starts. And if you disable the schedule, the mower parks until further notice....
Yes, but who wants a workaround to make a new integration work like expected? Schedule and manual control are different things and should be treated as that. The mower documentation clearly says what the functions should do. It says "Start or resume a mowing task", not „Enable schedule“.
But there is always a duration required for start. So if this time is over, the people wonder, why it stopped.
You could define an input field for that or simply set the value to 24 hours.
You are right it's not 100% correct.
But for me it seems better to return the schedule. Maybe another user wants to start the mower for 25h or forever, than her would open an issue for that.
To be 100% correct, than the lawn mower entity should only have the pause button. The other commands have to be done over buttons and services.
Btw. I've opened a pull request for the star for
command as a service. If everything works, then it will be in the next release.
My problem is that I can't get the mower to resume mowing.
I have an automation that parks the mower at its base when rain starts and resumes mowing 3 hours after rain ends.
When rain starts, I turn off the "Enable Schedule" switch. This sends it home.
When rain ends, I have tried both turning back on Enable Schedule as well as Starting the mower, but no matter what it stays parked until further notice
Logs attached.
home-assistant_husqvarna_automower_2024-05-14T16-51-23.360Z.log .
You are right it's not 100% correct. But for me it seems better to return the schedule.
Come on, your integration is now an official part of Homeassistant and uses the internal mower implementation. Imagine if every integration used the light implementation differently, or switches or media players. You would have to search for a long time to find out how this one integration works. That's why there are global integrations like mowers and lights: you only control one device abstraction and this then controls the device via an integration. This is one of the many advantages of Homeassistant. For example, I can replace my mower with another model and everything continues to work as before. However, this does not work if each integration follows a different strategy.
To be 100% correct, than the lawn mower entity should only have the pause button.
No, the other way around: the mower abstraction has this buttons with a reason. You need them for automations, you need them to control the mower. If you just want to use the Husqvarna schedule, you don’t need a Homeassistant integration at all.
Maybe another user wants to start the mower for 25h or forever.
The play button should simply start the mower - without a time limit. That's what the dock button is made for. This can all be controlled wonderfully via automations. If a user wants to run the mower for 25 hours, his automation sends a play and 25 hours later a dock. Why not setting the Husqvarna API Start duration to 20 years? It’s an unsigned int64. You can set it even to 18,446,744,073,709,551,615 minutes. These are 35 Trillion years. The sun will have gone out by then. And Husqvarna, too. 😉
When rain starts, I turn off the "Enable Schedule" switch. This sends it home.
When rain ends, I have tried both turning back on Enable Schedule as well as Starting the mower, but no matter what it stays parked until further notice
I think your schedule is over after 3 hours. This integration can’t start your mower. It only enables and disables the schedule.
My problem is that I can't get the mower to resume mowing.
I have an automation that parks the mower at its base when rain starts and resumes mowing 3 hours after rain ends.
When rain starts, I turn off the "Enable Schedule" switch. This sends it home.
When rain ends, I have tried both turning back on Enable Schedule as well as Starting the mower, but no matter what it stays parked until further notice
Logs attached.
home-assistant_husqvarna_automower_2024-05-14T16-51-23.360Z.log .
with the old unofficial version, I had about the same automaticity, depending on how much it rained I sent a "return to base" command for N minutes. with this new official version it is no longer possible to do so.
I think your schedule is over after 3 hours. This integration can’t start your mower. It only enables and disables the schedule.
logically I also tried to set "disable schedule" and after N hours "enable schedule", but it doesn't work, how can you reproduce this automation?
When rain starts, I turn off the "Enable Schedule" switch. This sends it home. When rain ends, I have tried both turning back on Enable Schedule as well as Starting the mower, but no matter what it stays parked until further notice
I think your schedule is over after 3 hours. This integration can’t start your mower. It only enables and disables the schedule.
My schedule in the app is set to 24x7 effectively.
+1 to returning it to the way the old HACS integration worked. Sending the automower to the base and starting again used to work great, doesn't work now. Pausing for rain and starting after a set time doesn't work now either.
I get wanting the simplicity of just enabling and disabling the schedule, but for the most part you've got slightly more advanced users who want some additional control over things.
While I'm glad this is officially integrated into HA and I'm incredibly grateful for your work, making a lot of changes to how it functions at the same time it was integrated into HA wasn't quite the best choice.
Anyways, hope you can return it to the previous way it worked. At the moment I'll be rolling back to the HACS integration, unfortunately.
+1 to make the integration work like described in the Lawn mower documentation: https://www.home-assistant.io/integrations/lawn_mower/ which seems to be the behavior of the old HACS implementation.
START_MOWING: Start or resume a mowing task. PAUSE: Pause a mowing task. DOCK: Tell the lawn_mower to return to dock.
That should be completely independent from the schedule of the Husqvarna app, which is another way to start the mower that has nothing to do with the HomeAssistant implementation. (I would like to have the possibilty to set the Husqvarna schedule to twice a week and additionally activate the mower Immediately via a HomeAssistant button if necessary.)
The Husqvarna API has commands for exactly that:
Start - Start the mower for a period of minutes (could be set to a high value, because START_MOVING contains no stop) Pause - Pause the mower ParkUntilNextSchedule or ParkUntilFurtherNotice (should depend on schedule on/off setting)
The schedule can be activated again if switch changes from off to on: ResumeSchedule - Removes any override on the Planner and let the mower resume to the schedule set by the Calendar
Already told my wife and neighbors how smart I will be with my new 450x Nero with satellite positioning - and all words spread to them with my really pro attitude... Now I just feel like a stupid nerd that can flash them with some home assistant stuff that can only do... well nothing...
I can use my Husquarna app of course, but that's not why we are in here... And like @gimmel has already argumentet, not the functionality as it is now, we wold expect from an integration to HA
@Thomas55555 is there any news on the ability to start the mower as I read in your post above?
@Thomas55555 I too am hoping for the functionality that @gimmel has described.
Already told my wife and neighbors how smart I will be with my new 450x Nero with satellite positioning - and all words spread to them with my really pro attitude... Now I just feel like a stupid nerd that can flash them with some home assistant stuff that can only do... well nothing...
I can use my Husquarna app of course, but that's not why we are in here... And like @gimmel has already argumentet, not the functionality as it is now, we wold expect from an integration to HA
@Thomas55555 is there any news on the ability to start the mower as I read in your post above?
Yes, since HA 2024.7.0 It's described here: https://www.home-assistant.io/integrations/husqvarna_automower/#actions The action (formerly known as service) is called override schedule. You can just make a button which triggers the action.
Already told my wife and neighbors how smart I will be with my new 450x Nero with satellite positioning - and all words spread to them with my really pro attitude... Now I just feel like a stupid nerd that can flash them with some home assistant stuff that can only do... well nothing... I can use my Husquarna app of course, but that's not why we are in here... And like @gimmel has already argumentet, not the functionality as it is now, we wold expect from an integration to HA @Thomas55555 is there any news on the ability to start the mower as I read in your post above?
Yes, since HA 2024.7.0 It's described here: https://www.home-assistant.io/integrations/husqvarna_automower/#actions The action (formerly known as service) is called override schedule. You can just make a button which triggers the action.
But that's not what we want. With the integration I had before it was an official integration, home assistant controlled my mower completely based on things that I wanted. Odd days only because the hose is out watering my veggies on even days. If it rained 5 inches (which it did today), I don't want the mower to run because of standing water. I have sensors that controlled all of this and it was perfect. I want to be able to tell the mower when to start and when to stop. I don't want to have to tell it how long to do so each time. I don't want to override the schedule. Why can't it just work the way it did before? It's useless to me the way it is now. I've also noticed it is sooooo slow at updating status. It used to be nearly instantaneous. Now it's upwards of 10 minutes.
Already told my wife and neighbors how smart I will be with my new 450x Nero with satellite positioning - and all words spread to them with my really pro attitude... Now I just feel like a stupid nerd that can flash them with some home assistant stuff that can only do... well nothing... I can use my Husquarna app of course, but that's not why we are in here... And like @gimmel has already argumentet, not the functionality as it is now, we wold expect from an integration to HA @Thomas55555 is there any news on the ability to start the mower as I read in your post above?
Yes, since HA 2024.7.0 It's described here: https://www.home-assistant.io/integrations/husqvarna_automower/#actions The action (formerly known as service) is called override schedule. You can just make a button which triggers the action.
But that's not what we want. With the integration I had before it was an official integration, home assistant controlled my mower completely based on things that I wanted. Odd days only because the hose is out watering my veggies on even days. If it rained 5 inches (which it did today), I don't want the mower to run because of standing water. I have sensors that controlled all of this and it was perfect. I want to be able to tell the mower when to start and when to stop. I don't want to have to tell it how long to do so each time. I don't want to override the schedule. Why can't it just work the way it did before? It's useless to me the way it is now. I've also noticed it is sooooo slow at updating status. It used to be nearly instantaneous. Now it's upwards of 10 minutes.
But that's what @sinumsen asked.
Sorry, I don't understand what you want. The function is the same like it was it in the custom component. It just changed from vacuum to lawn mower.
The problem
I used the Husqvarna HACS integration before and switched to the core implementation now.
I can see all sensors and diagnose data, but I can’t start and stop the mower. That makes it quite unusable for me. After pressing „Mähen beginnen“ (don’t know the english original text, „Start mowing“ perhaps) after some time I get an overlay with „Fehler beim Aufrufen des Diensts lawn_mower/start_mowing. Command couldn't be sent to the command queue: Error from API: 404: Not Found“ Doesn't matter if I use the integration UI or the services.
I already deleted the old app on Husqvarna developer page, generated a new one, deleted the integration from Homeassistant and added it again, nothing helps.
What version of Home Assistant Core has the issue?
core-2024.4.3
What was the last working version of Home Assistant Core?
No response
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
The error log says this:
And I have noticed that the schedule button often jumps back to on automatically after setting it to off. I found this in the log, without pressing the schedule button at all. Because this is the reason?
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response