-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better error handling and map behaviour, more robot info #24
base: master
Are you sure you want to change the base?
Conversation
DEVICE_BUSY is reported at least when there is a new map. Expose the message's request code as device property 'attention_request_code'.
- ping regularly, regardless of replies - count the number of replies between pings - reconnect if zero replies - both SMSG_PING and SMSG_DEVICE_STATUS count as replies - request map info on the first SMSG_PING.
They replace the status_type, status_code and attention_request_code state attributes. Textual representation is used if available.
Hi @zzarne, thanks for the changes. Is this ready to be merged? |
Well while I think that my pull request is fine (I could merge it myself, btw), I'm seeing the strangest of things in my logs and I wanted to get to the bottom of this before merging. The device status is fine for hours. Then it begins to alternate between 2021-09-20 11:10:51 DEBUG (Thread-100125) [custom_components.badconga.app.client] [SMSG_DEVICE_STATUS] {'mapHeadId': 1631806440, 'areaCleanFlag': 1, 'workMode': 0, 'battery': 200, 'chargeStatus': True, 'type': 3, 'faultCode': 2105, 'cleanPreference': 1, 'repeatClean': 0, 'cleanTime': 0, 'cleanSize': 0, 'waterLevel': 11, 'dustBoxType': 1, 'mopType': False}
2021-09-20 11:10:56 DEBUG (Thread-100127) [custom_components.badconga.app.client] [SMSG_DEVICE_STATUS] {'mapHeadId': 1581865008, 'areaCleanFlag': 1, 'workMode': 0, 'battery': 139, 'chargeStatus': False, 'type': 0, 'faultCode': 0, 'cleanPreference': 3, 'repeatClean': 0, 'cleanTime': 0, 'cleanSize': 0, 'waterLevel': 12, 'dustBoxType': 3, 'mopType': False}
2021-09-20 11:10:57 DEBUG (Thread-100129) [custom_components.badconga.app.client] [SMSG_DEVICE_STATUS] {'mapHeadId': 1631806440, 'areaCleanFlag': 1, 'workMode': 0, 'battery': 200, 'chargeStatus': True, 'type': 3, 'faultCode': 2105, 'cleanPreference': 1, 'repeatClean': 0, 'cleanTime': 0, 'cleanSize': 0, 'waterLevel': 11, 'dustBoxType': 1, 'mopType': False} and so on for hours. Note how the mapHeadId changes, as well as chargeStatus/battery. The latter leads to the homeassistant entity to change it's state every few seconds. With this mapHeadId being a timestamp, note that the lower one is before I bought my robot. My conclusion is that the server mixes reports from different robots belonging to different people. I haven't seen other people's maps yet, but I wouldn't be surprised. I should probably report this as a security or privacy issue, but I wouldn't know how and where. While already being off-topic: how's the Valetudo integration coming along? When I last tried it last november, I had to hack it a bit for my 5090, had minor stability issues and preferred the simplicity of badconga's map integration into homeassistant. |
Hi @zzarne, I wouldn't be surprised if you were getting reports of other people. Never seen anything like that before. We're almost done with Valetudo's integration. Check it out. It is pretty straight forward to configure. |
"Formatting a regular string which could be a f-string"
More or less a false positive. Change the property order to avoid. We don't want to disable this check.
My robot was fine for a few months. When I was about to merge these changes, it started acting up again. mapHeadId and cleanPreference were toggling again, CMSG_PING not being answered and so on. A reboot of the robot fixed it, so next time I checked the free memory and indeed, the RobotApp was leaking memory until none was left. The robot was still being able to start cleaning, but stopped after a minute or so. I looked around a bit and found typos in the logs, ini-files, method name and so on. It's amazing that these robots work at all. Now I think that it's not other people's reports I was seeing, but just half-dead processes zombieing around. Apart from a reboot Since many of the changes in this pull request work around robot issues that can not be mitigated by us, I'll remove those changes as they only mask the real issue. If I find a way to reliably detect the issue I'll implement an attribute which tells the user to reboot the robot. |
No description provided.