bmartin5692 / bumper

A standalone and self-hosted implementation of the central server used by Ecovacs vacuum robots.
GNU General Public License v3.0
302 stars 50 forks source link

Update EcoVacsHomeProducts list #131

Open jspayd opened 2 years ago

jspayd commented 2 years ago

See https://github.com/bmartin5692/bumper/issues/130

I was finally able to get a packet sniffing setup at least good enough to get an updated device list, so I've updated it myself (and my vacuum is indeed in the list!).

Testing

My vacuum is shown in the GetGlobalDeviceList response, which only includes vacuums in the EcoVacsHomeProducts list.

The diff provided by git is a bit hard to read, but I wrote a script to verify that no vacuums are removed. There are two existing vacs whose icons and iconUrls are changed, but otherwise this PR only adds vacuums to the list.

Script:

old_list = ...
new_list = ...

import pprint

for vac in old_list:
    if vac not in new_list:
        print(f"Vacuum {vac['classid']} differs in old and new lists:\n")
        print("Old entry:")
        pprint.pprint(vac)
        print("\nNew entry:")
        new_vac = [v for v in new_list if v["classid"] == vac["classid"]][0]
        pprint.pprint(new_vac)
        print()

Output:

Vacuum 02uwxm differs in old and new lists:

Old entry:
{'classid': '02uwxm',
 'product': {'UILogicId': 'D_OZMO_SLIM10',
             '_id': '5ae1481e7ccd1a0001e1f69e',
             'icon': '5b1dddc48bc45700014035a1',
             'iconUrl': 'https://portal-ww.ecouser.net/api/pim/file/get/5b1dddc48bc45700014035a1',
             'materialNo': '110-1715-0201',
             'model': 'SLIM10',
             'name': 'DEEBOT OZMO Slim10 Series',
             'ota': False,
             'supportType': {'alexa': True,
                             'assistant': True,
                             'share': True,
                             'tmjl': False}}}

New entry:
{'classid': '02uwxm',
 'product': {'UILogicId': 'D_OZMO_SLIM10',
             '_id': '5ae1481e7ccd1a0001e1f69e',
             'icon': '60810dddd18cbd0008e2fd27',
             'iconUrl': 'https://portal-ww.ecouser.net/api/pim/file/get/60810dddd18cbd0008e2fd27',
             'materialNo': '110-1715-0201',
             'model': 'SLIM10',
             'name': 'DEEBOT OZMO Slim10 Series',
             'ota': False,
             'supportType': {'alexa': True,
                             'assistant': True,
                             'share': True,
                             'tmjl': False}}}

Vacuum ifbw08 differs in old and new lists:

Old entry:
{'classid': 'ifbw08',
 'product': {'UILogicId': 'DT_8SE_G',
             '_id': '5fbc7e18c7260e0008585c8f',
             'icon': '5feaeb47d4cb3a0006679048',
             'iconUrl': 'https://portal-ww.ecouser.net/api/pim/file/get/5feaeb47d4cb3a0006679048',
             'materialNo': '110-2008-0901',
             'model': 'N8_PRO_PLUS_WHITE',
             'name': 'DEEBOT N8 PRO+',
             'ota': True,
             'supportType': {'alexa': True,
                             'assistant': True,
                             'share': True,
                             'tmjl': False}}}

New entry:
{'classid': 'ifbw08',
 'product': {'UILogicId': 'DT_8SE_G',
             '_id': '5fbc7e18c7260e0008585c8f',
             'icon': '61318e07e37c4686071aee67',
             'iconUrl': 'https://portal-ww.ecouser.net/api/pim/file/get/61318e07e37c4686071aee67',
             'materialNo': '110-2008-0901',
             'model': 'N8_PRO_PLUS_WHITE',
             'name': 'DEEBOT N8 PRO+',
             'ota': True,
             'supportType': {'alexa': True,
                             'assistant': True,
                             'share': True,
                             'tmjl': False}}}