mikey0000 / Mammotion-HA

Home Assistant integration for Luba, Luba 2 and Yuka (Mammotion) lawn mowers
145 stars 20 forks source link

Switch Integration off or on via Automation #142

Open Wolfi311 opened 2 weeks ago

Wolfi311 commented 2 weeks ago

The problem

It should be possible to deactivate or activate the integration via automation. Reason: I switch off charging at night power consumption standby 20W! But the integration then drains the battery 15% per hour. Without active integration 10% per 12 hours! Is there a possibility? Greetings Wolfgang

What Mammotion mower are you using?

Luba 2

What version of the Mammotion intergration are you using?

0.1.39

What version of Home Assistant Core are you running?

2024.9.2

mikey0000 commented 2 weeks ago

Are you using Bluetooth or WiFi?

But in short yes I can add something for you.

22/09/2024 1:20:55 am Wolfgang @.***>:

The problem

It should be possible to deactivate or activate the integration via automation. Reason: I switch off charging at night power consumption standby 20W! But the integration then drains the battery 15% per hour. Without active integration 10% per 12 hours! Is there a possibility? Greetings Wolfgang

What Mammotion mower are you using?

Luba 2

What version of the Mammotion intergration are you using?

0.1.39

What version of Home Assistant Core are you running?

2024.9.2

— Reply to this email directly, view it on GitHub[https://github.com/mikey0000/Mammotion-HA/issues/142], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AALDOPJGDUOCUOEY474GBN3ZXVXCRAVCNFSM6AAAAABOTS4VCWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DAMRVG44DSOA]. You are receiving this because you are subscribed to this thread. [Tracking image][https://github.com/notifications/beacon/AALDOPM7GWYLIT3ROUBRAHTZXVXCRA5CNFSM6AAAAABOTS4VCWWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJO2KCNI.gif]

Wolfi311 commented 2 weeks ago

Wifi It would be great if you could start and stop the integration via automation.

Greetings

elmr91 commented 2 weeks ago

I have exactly same use case: My Yuka is powered off between mowing sessions (remotely controlled power switch) Yuka is shutting down itself when idle with no power from station. Yuka is booting again as soon as power is restored on the charging station. It worked perfectly this way from weeks.

I tried this integration (Wifi), it works very well but keeps Yuka awake: I can confirm 15% battery drain within 2 hours. It could very useful to be able to pause integration polling by automation.

scenario example:

mikey0000 commented 1 week ago

Problem here is, if its pollong it doesn't turn off, turn on however is possible. Anyway button or switch coming

kingunlim commented 1 week ago

i have the same problem.... is there already a solution for this?

best regards and thx for this beautiful integration!

mikey0000 commented 3 days ago

Please try with the switch in 0.1.58

elmr91 commented 3 days ago

I'm running version 0.1.59 I'm trying to test switch: switch.yuka_xxxxxxxxx_turn_updates_on_off

When switch is off, most of entities seem frozen (as expected) Looking at some "dynamic" entities like L1 or L2 satellites, effect of switch is visible (values frozen) image

But strangely, I received some events in the logs while update switch was on off position: image

It seems robot polling is still occurring some way because robot is not going to sleep when swicth is off.

How can I help providing some useful debug logs ?

Wolfi311 commented 2 days ago

That doesn't seem to be working yet. Battery consumption from 100% to 75% in 2 hours, i.e. 25%! With Power off and Turn Updates off V 0.1.59

mikey0000 commented 2 days ago

OK I'll make it disconnect from MQTT as well, that will definitely stop it.

elmr91 commented 1 day ago

I upgraded to V 0.1.66 this morning. I tested to switch off updates. Robot goes to sleep after 10 mn as usual. I think polling does not occur any more, Idle power consumption should be normal again. Thanks @mikey0000

elmr91 commented 1 day ago

Switching updates off is now correctly stopping any polling/activity towards robot. But switching updates back on does not resume correctly. Values are not updated anymore after switch off then switch on again. I guess the integration does not reconnect correctly.

Wolfi311 commented 21 hours ago

@mikey0000 @elmr91

I can confirm elmr91's statement. I come to the same conclusion

Greetings Wolfgang

mikey0000 commented 19 hours ago

I'll see if I have some time to look into it. I'm overseas for a couple weeks.