Skip to content

Use charger mah value to determine if charging animation should be pulsing#106

Open
gb0101010101 wants to merge 4 commits into
vacuula:mainfrom
gb0101010101:charging_animation
Open

Use charger mah value to determine if charging animation should be pulsing#106
gb0101010101 wants to merge 4 commits into
vacuula:mainfrom
gb0101010101:charging_animation

Conversation

@gb0101010101

Copy link
Copy Markdown

Currently the charging animation on the HA Card will always be pulsing, even when the battery is 100%, because binary_sensor.<vacuum_name>_charging_active is always on when the vacuum is docked and has power from base station.

IMHO the UI should not have animations if nothing is actually happening. The code already provides sensor.<vacuum_name>_charger_mah value which is a much better basis to determine if the charging animation should be pulsing.

This changes the animation to not pulsing when sensor.<vacuum_name>_charger_mah is 0.0

Change charging indicator to use charger_mah so that animation is not always flashing when vacuum is docked but not charging.
Change charging indicator to use charger_mah so that animation is not always flashing when vacuum is docked but not charging.
@pnugent1980

Copy link
Copy Markdown

Mine cycles on and off hourly when on the dock already
image

@Philip2809

Copy link
Copy Markdown
Member

Mine also turns on/off depending on how its charging
image
Can you please provide how the charging active boolean sensor looks for you @gb0101010101 ?

@gb0101010101

Copy link
Copy Markdown
Author

Huh, that is interesting. I have D4 and D7 and both show that charging_active is always on when docked. I have not run the vacuums in the past 5 days so there was minimal charging.

Home_Assistant-Neato_Charging_History

Here is the output of GetCharger command being sent to the D4:

[10:32:50.796][I][uart_parser:234]: COMMAND: GetCharger
[10:32:50.813][D][uart_debug:157]: <<< "GetCharger"
[10:32:50.818][D][uart_debug:157]: <<< "Label,Value"
[10:32:50.834][D][uart_debug:157]: <<< "FuelPercent,98"
[10:32:50.847][D][uart_debug:157]: <<< "BatteryOverTemp,0"
[10:32:50.863][D][uart_debug:157]: <<< "ChargingActive,1"
[10:32:50.878][D][uart_debug:157]: <<< "ChargingEnabled,1"
[10:32:50.895][D][uart_debug:157]: <<< "ConfidentOnFuel,0"
[10:32:50.909][D][uart_debug:157]: <<< "OnReservedFuel,0"
[10:32:50.925][D][uart_debug:157]: <<< "EmptyFuel,0"
[10:32:50.939][D][uart_debug:157]: <<< "BatteryFailure,0"
[10:32:50.954][D][uart_debug:157]: <<< "ExtPwrPresent,1"
[10:32:50.969][D][uart_debug:157]: <<< "ThermistorPresent,1"
[10:32:50.984][D][uart_debug:157]: <<< "BattTempCAvg,21"
[10:32:50.999][D][uart_debug:157]: <<< "VBattV,16.75"
[10:32:51.015][D][uart_debug:157]: <<< "VExtV,19.02"
[10:32:51.029][D][uart_debug:157]: <<< "Charger_mAH,0"
[10:32:51.044][D][uart_debug:157]: <<< "Discharge_mAH,0"
[10:32:51.058][D][uart_debug:157]: <<< "\x1A"
[10:32:51.072][I][charger:286]: Parsed: key='FuelPercent' value='98'
[10:32:51.079][D][sensor:129]: 'Fuel Percent' >> 98.0 %
[10:32:51.091][I][charger:286]: Parsed: key='BatteryOverTemp' value='0'
[10:32:51.097][I][charger:286]: Parsed: key='ChargingActive' value='1'
[10:32:51.103][I][charger:286]: Parsed: key='ChargingEnabled' value='1'
[10:32:51.110][I][charger:286]: Parsed: key='ConfidentOnFuel' value='0'
[10:32:51.113][I][charger:286]: Parsed: key='OnReservedFuel' value='0'
[10:32:51.119][I][charger:286]: Parsed: key='EmptyFuel' value='0'
[10:32:51.127][I][charger:286]: Parsed: key='BatteryFailure' value='0'
[10:32:51.131][I][charger:286]: Parsed: key='ExtPwrPresent' value='1'
[10:32:51.137][I][charger:286]: Parsed: key='ThermistorPresent' value='1'
[10:32:51.142][I][charger:286]: Parsed: key='BattTempCAvg' value='21'
[10:32:51.150][D][sensor:129]: 'Battery Temp C Avg' >> 21.0 °C
[10:32:51.161][I][charger:286]: Parsed: key='VBattV' value='16.75'
[10:32:51.168][D][sensor:129]: 'Battery Voltage V' >> 16.8 V
[10:32:51.178][I][charger:286]: Parsed: key='VExtV' value='19.02'
[10:32:51.184][D][sensor:129]: 'External Voltage V' >> 19.0 V
[10:32:51.196][I][charger:286]: Parsed: key='Charger_mAH' value='0'
[10:32:51.203][D][sensor:129]: 'Charger mAh' >> 0.0 mAh
[10:32:51.212][I][charger:286]: Parsed: key='Discharge_mAH' value='0'
[10:32:51.219][D][sensor:129]: 'Discharge mAh' >> 0.0 mAh
[10:32:51.804][D][sensor:129]: 'WiFi Signal' >> -27 dBm

And GetVersion command:

[10:38:12.486][I][uart_parser:234]: COMMAND: GetVersion
[10:38:12.494][D][uart_debug:157]: <<< "GetVersion"
[10:38:12.509][D][uart_debug:157]: <<< "Component,Major,Minor,Build,Aux"
[10:38:12.525][D][uart_debug:157]: <<< "BaseID,0.0,0.0,0,0,"
[10:38:12.542][D][uart_debug:157]: <<< "Beehive URL, beehive.neatocloud.com,"
[10:38:12.560][D][uart_debug:157]: <<< "BlowerType,1,BLOWER_ORIG,"
[10:38:12.576][D][uart_debug:157]: <<< "Bootloader Version,90c973a5,,"
[10:38:12.591][D][uart_debug:157]: <<< "BrushMotorResistorPowerRating,500,,"
[10:38:12.606][D][uart_debug:157]: <<< "BrushMotorResistorResistance,100,,"
[10:38:12.623][D][uart_debug:157]: <<< "BrushMotorType,1,BRUSH_MOTOR_ORIG,"
[10:38:12.640][D][uart_debug:157]: <<< "BrushSpeed,1200,,"
[10:38:12.657][D][uart_debug:157]: <<< "BrushSpeedEco,1200,,"
[10:38:12.674][D][uart_debug:157]: <<< "ChassisRev,1,,"
[10:38:12.695][D][uart_debug:157]: <<< "DropSensorType,1,DROP_SENSOR_ORIG,"
[10:38:12.710][D][uart_debug:157]: <<< "LCD Panel,0,0,0,"
[10:38:12.725][D][uart_debug:157]: <<< "LDS CPU,F2802x/c001,,"
[10:38:12.742][D][uart_debug:157]: <<< "LDS Serial,GPC<<REDACTED>>"
[10:38:12.759][D][uart_debug:157]: <<< "LDS Software,V2.7.4,0000000000,"
[10:38:12.775][D][uart_debug:157]: <<< "LDSMotorType,2,LDS_MOTOR_MABUCHI,"
[10:38:12.792][D][uart_debug:157]: <<< "Locale,1,LOCALE_USA,"
[10:38:12.809][D][uart_debug:157]: <<< "MagSensorType,1,MAG_SENSOR_ORIG,"
[10:38:12.826][D][uart_debug:157]: <<< "MainBoard Serial Number,GPC<<REDACTED>>"
[10:38:12.843][D][uart_debug:157]: <<< "MainBoard Version,4,,"
[10:38:12.860][D][uart_debug:157]: <<< "Model,BotVacD4Connected,905-0499,"
[10:38:12.877][D][uart_debug:157]: <<< "NTP URL, pool.ntp.org,"
[10:38:12.894][D][uart_debug:157]: <<< "Nucleo URL, nucleo.neatocloud.com,"
[10:38:12.911][D][uart_debug:157]: <<< "QAState,QA_STATE_APPROVED"
[10:38:12.928][D][uart_debug:157]: <<< "Serial Number,GPC<<REDACTED>>"
[10:38:12.946][D][uart_debug:157]: <<< "SideBrushPower,1500,,"
[10:38:12.963][D][uart_debug:157]: <<< "SideBrushType,1,SIDE_BRUSH_NONE,"
[10:38:12.980][D][uart_debug:157]: <<< "SmartBatt Authorization,1"
[10:38:12.997][D][uart_debug:157]: <<< "SmartBatt Data Version,512"
[10:38:13.014][D][uart_debug:157]: <<< "SmartBatt Device Chemistry,LION1"
[10:38:13.031][D][uart_debug:157]: <<< "SmartBatt Device Name,F164A10288"
[10:38:13.049][D][uart_debug:157]: <<< "SmartBatt Manufacturer Name,Panasonic"
[10:38:13.064][D][uart_debug:157]: <<< "SmartBatt Mfg Year/Month/Day,2041,9,26"
[10:38:13.083][D][uart_debug:157]: <<< "SmartBatt Serial Number,23"
[10:38:13.095][D][uart_debug:157]: <<< "SmartBatt Software Version,2048"
[10:38:13.112][D][uart_debug:157]: <<< "Software Git SHA,14f004c"
[10:38:13.128][D][uart_debug:157]: <<< "Software,4,5,3,189,0"
[10:38:13.145][D][uart_debug:157]: <<< "Time Local,Fri Mar 13 10:38:43 2026"
[10:38:13.160][D][uart_debug:157]: <<< "Time UTC,Fri Mar 13 17:38:43 2026"
[10:38:13.177][D][uart_debug:157]: <<< "UI Board Hardware,0,0,"
[10:38:13.194][D][uart_debug:157]: <<< "UI Board Software,0,0,"
[10:38:13.210][D][uart_debug:157]: <<< "UI Name,NONE"
[10:38:13.228][D][uart_debug:157]: <<< "UI Version,NONE"
[10:38:13.244][D][uart_debug:157]: <<< "VacuumPwr,65,,"
[10:38:13.262][D][uart_debug:157]: <<< "VacuumPwrEco,55,,"
[10:38:13.278][D][uart_debug:157]: <<< "WallSensorType,1,WALL_SENSOR_ORIG,"
[10:38:13.295][D][uart_debug:157]: <<< "WheelPodType,1,WHEEL_POD_ORIG,"
[10:38:13.313][D][uart_debug:157]: <<< "\x1A"
[10:38:13.331][D][text_sensor:119]: 'MainBoard Serial Number' >> 'GPC<<REDACTED>>'
[10:38:13.347][D][text_sensor:119]: 'MainBoard Version' >> '4,,'
[10:38:13.354][D][text_sensor:119]: 'Model' >> 'BotVacD4Connected,905-0499,'
[10:38:13.359][D][text_sensor:119]: 'Serial Number' >> 'GPC<<REDACTED>>''
[10:38:13.375][D][text_sensor:119]: 'Time Local' >> 'Fri Mar 13 10:38:43 2026'
[10:38:13.384][D][text_sensor:119]: 'Time UTC' >> 'Fri Mar 13 17:38:43 2026'

@Philip2809

Copy link
Copy Markdown
Member

That is very weird, I mean in that case, charging mAh should be used so that it works for as many as possible. Making a small patch today or tomorrow with some things, will include this one with that in that case

@gb0101010101

Copy link
Copy Markdown
Author

Just to add more info:

  • My charger_mah values are normally under 1000, reducing as charging progresses (which would make sense), and I have no idea why my HA history shows 15000 mah spikes, which would be impossible.
  • When I notice the charging animation, I check the charging mah, and they always looks within reasonable values.
  • Both vacuums typically fall to about 93% battery SOC before charging up again, which happens every 1-2 days, and certainly not multiple times a day as @pnugent1980 and @Philip2809 have shown.
  • Both have aftermarket batteries, marked as Li-ion 20 and apparently same spec as OEM, since I could not buy new batteries from Neato anymore. https://www.amazon.com/dp/B0D2SY35WQ
  • I am currently using the ESPHome YAML v 1.1.1, from before this project was renamed neato-brainslug, and only changed setting in esp32: section to match pins and timing of boards.
  • D4 is using az-delivery-devkit-v4.
  • D7 is using heltec_wifi_kit_32.
  • I am using matching v1.1.1 HA card YAML

BTW love the new name; Futurama reference right? Very apt.

@Philip2809

Copy link
Copy Markdown
Member

Very interesting, this is how fuel % looks for me and from little I have seen, most other people.
image
A full cycle: 100 --> 95 --> 100 taking 1h 45min for me. The big dip is a cleaning.

The spikes are very interesting, I wonder what makes the robot report that, you are on the same version as me and most others, so find this weird.

While it should have no difference since that did not change, could you try the latest 1.2 version? Its also more nice since it has some other improvements.

Yes, the name is a Futurama reference, a user in the discord, mikeyp, came up with it and made the logo, I really liked it so adopted it fully.

@pnugent1980

Copy link
Copy Markdown

Regarding the charging behaviour, the BMS is in the battery I'm still using OEM in mine if you are too, Philip the differences in charging behaviour may be related to it.

…rger_mah is not available or 0

Added check to make sure animation does not trigger when charger_mah is not available.
…rger_mah is not available or 0

Added check to make sure animation does not trigger when charger_mah is not available.
@gb0101010101

Copy link
Copy Markdown
Author

I updated to v1.2 and everything is still the same with charging_active always on when connected to base even though charger_mah drops to 0. As you can see in the screenshot my batteries do not cycle the same way and seem to stay at 100% for much longer (9 hours so far). The first battery drain is from having the vacuum on my desk during upgrade and testing and the second is a stop clean.

Home_Assistant-Neato_Charging_History_v1 2

Also added check to make sure animation does not trigger when charger_mah is not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants