DeebotUniverse / client.py

Deebot client library in python
https://deebot.readthedocs.io
GNU General Public License v3.0
28 stars 41 forks source link

Update Deebot X2 Omni to use version 2 map commands #477

Closed Ulfmerbold2000 closed 4 months ago

Ulfmerbold2000 commented 4 months ago

Since my X2 still wont show the map and rooms, i'll set it to Version 2 as a try

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.93%. Comparing base (3c596e8) to head (e550b87). Report is 3 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #477 +/- ## ======================================= Coverage 84.93% 84.93% ======================================= Files 85 85 Lines 3186 3186 Branches 527 527 ======================================= Hits 2706 2706 Misses 429 429 Partials 51 51 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

edenhaus commented 4 months ago

@Ulfmerbold2000 Did you successfully test it? Is the map now working?

edenhaus commented 4 months ago

pre-commit.ci autofix

Ulfmerbold2000 commented 4 months ago

With 7.0.0 under Home Assistant there are MAP Events, but NO Picture in Entity. The proxy adress is updated but no file is given out, tried to access the picture directly gives me an error 500(but this can be an security feature because i try to open up from an different client and not directly from HA)

Rooms same, i see my configured Rooms in Debug, but no Rooms will build up into entity of the bot.(Which depends on the working map generation i've learned)

The Version 2 setting is my last hope, since the bot is a newer one Type and i have'nt seen any errors pointing to the map generation.-->normally it should work with V1 map from "missing errors" point of view but the robot is fairly new engineered, so an V2 Map gen Test could be successful

I would be happy to test it BEFORE, but i have'nt found a way into the home assistant container which holds the python directory. You are right its try and error method atm, but i just have an single installation on an intel nuc and no real clue to log into this container...there is an ssh "way" but if this gives me root where i need it?

Btw, i DID uninstall and reinstall the whole bot integration after the deebot-client update from HA, just to be sure there are no hidden flaws under the hood...same negative result

Ulfmerbold2000 commented 4 months ago

FYI Part of the log after HA/deebot-client Update to 7.0.0 (NOT anonymized) There is an errormessage "Could not handle getMapSet message: {'count': 0, 'mid': '1803816505', 'subsets': [], 'type': 'mw'}" But my setup just have AR Type Rooms in my opinion, i have just setup room, no virtual walls and no "no go zones"

2024-05-02 11:43:15.054 DEBUG (MainThread) [deebot_client.authentication] Success calling api url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSet', 'payload': {'header': {'pri': '1', 'ts': 1714642992.738202, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'type': 'ar'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}, response={'ret': 'ok', 'resp': {'header': {'pri': 1, 'tzm': 120, 'ts': '1714642992731', 'ver': '0.0.1', 'fwVer': '1.76.0', 'hwVer': '0.1.1', 'wkVer': '0.1.54'}, 'body': {'code': 0, 'data': {'count': 11, 'mid': '1803816505', 'msid': '458159959', 'subsets': [{'mssid': '0', 'name': '', 'totalCount': 12}, {'mssid': '3', 'name': '', 'totalCount': 12}, {'mssid': '4', 'name': 'Schlafzimmer', 'totalCount': 35}, {'mssid': '5', 'name': 'Flur', 'totalCount': 82}, {'mssid': '6', 'name': 'Wohnbereich', 'totalCount': 45}, {'mssid': '7', 'name': 'Badezimmer', 'totalCount': 6}, {'mssid': '9', 'name': '', 'totalCount': 11}, {'mssid': '10', 'name': 'Arbeitszimmer Michael', 'totalCount': 26}, {'mssid': '11', 'name': 'Arbeitszimmer', 'totalCount': 19}, {'mssid': '12', 'name': 'Tatami', 'totalCount': 22}, {'mssid': '13', 'name': 'Wohnzimmer Julius', 'totalCount': 4}], 'type': 'ar'}, 'msg': 'ok'}}, 'id': '3KAg', 'payloadType': 'j'}
2024-05-02 11:43:15.056 DEBUG (MainThread) [deebot_client.event_bus] Notify subscribers with MapSetEvent(type=<MapSetType.ROOMS: 'ar'>, subsets=[0, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13])
2024-05-02 11:43:15.056 DEBUG (MainThread) [deebot_client.authentication] Success calling api url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSet', 'payload': {'header': {'pri': '1', 'ts': 1714642992.742865, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'type': 'mw'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}, response={'ret': 'ok', 'resp': {'header': {'pri': 1, 'tzm': 120, 'ts': '1714642992792', 'ver': '0.0.1', 'fwVer': '1.76.0', 'hwVer': '0.1.1', 'wkVer': '0.1.54'}, 'body': {'code': 0, 'data': {'count': 0, 'mid': '1803816505', 'subsets': [], 'type': 'mw'}, 'msg': 'ok'}}, 'id': 'ORKT', 'payloadType': 'j'}
2024-05-02 11:43:15.056 DEBUG (MainThread) [deebot_client.message] Could not handle getMapSet message: {'count': 0, 'mid': '1803816505', 'subsets': [], 'type': 'mw'}
2024-05-02 11:43:15.057 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.057218, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '0'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.058 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.057982, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '3'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.058 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.058665, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '4'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.059 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.059576, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '5'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.061 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.061018, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '6'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.062 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.062213, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '7'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.062 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.062867, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '9'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.063 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.063685, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '10'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.065 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.065003, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '11'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.066 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.065909, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '12'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.066 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getMapSubSet', 'payload': {'header': {'pri': '1', 'ts': 1714642995.066806, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'mid': '1803816505', 'msid': '458159959', 'type': 'ar', 'mssid': '13'}}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}
2024-05-02 11:43:15.131 DEBUG (MainThread) [deebot_client.authentication] Success calling api url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'td': 'q', 'u': 'idqmao8ec939fa29', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'getBattery', 'payload': {'header': {'pri': '1', 'ts': 1714642992.849875, 'tzm': 480, 'ver': '0.0.50'}}, 'payloadType': 'j', 'td': 'q', 'toId': '310b014d-e138-4268-b4f2-eea7bc4bebfa', 'toRes': 'hOdT', 'toType': 'lf3bn4'}, response={'ret': 'ok', 'resp': {'header': {'pri': 1, 'tzm': 120, 'ts': '1714642992864', 'ver': '0.0.1', 'fwVer': '1.76.0', 'hwVer': '0.1.1', 'wkVer': '0.1.54'}, 'body': {'code': 0, 'data': {'isLow': 0, 'value': 100}, 'msg': 'ok'}}, 'id': 'WoQr', 'payloadType': 'j'}
Ulfmerbold2000 commented 4 months ago

With update from 2024-05-11 it run the map smoothly without "version-2" setting, so i close this here