RobertD502 / cowayaio

A asynchronous python library for the IoCare API utilized by Coway air purifiers
MIT License
4 stars 1 forks source link

250s: "This device has not been registered by the member." #8

Closed kenblu24 closed 7 months ago

kenblu24 commented 7 months ago
MCU_VERSION = "CWIG0615"
CowayClient._post_endpoint(MCU_VERSION, {"deviceId": '41102F9R21C220xxxx'})

returns {'header': {'result': False, 'error_code': 'CWIG0615CWIDP0014', 'error_text': '해당 회원이 등록하지 않은 기기 입니다.', 'info_text': '', 'message_version': '', 'login_session_id': '', 'trcode': 'CWIG0615', 'accessToken': _, 'refreshToken': _}

For reference, async_get_purifiers() returns:

{
    "body": {
        "deviceInfos": [
            {
                "dvcAuthCd": "",
                "rq_stat_cd": "",
                "dvcRegStatCd": "1",
                "dvcModel": "AIRMEGA 250S",
                "ordNo": "ORD4x0nAqPEe",
                "dvcTypeCd": "004",
                "mbrDvcSeq": 528191,
                "regDttm": "1671642614458",
                "releaseDttm": "1532131200000",
                "prodType": "02F9R",
                "selfManageYn": "N",
                "dvcSeq": 728626,
                "comType": "WIFI",
                "dvcBrandCd": "MG",
                "dvcAuthReasonCd": "0",
                "guideTypeCd": "N",
                "instYn": "Y",
                "sellTypeCd": "1",
                "stationCd": "US",
                "admdongCd": "US",
                "membershipYn": "N",
                "registUserCount": 0,
                "installAddr": "",
                "netStatus": False,
                "pairingDttm": "1714399167700",
                "iotYn": "Y",
                "isGubun": "1",
                "prodNameFull": "COLUMBIA",
                "buyerMbrSeq": "434956",
                "roomPos": "",
                "rqDttm": "",
                "prodCd": "113103",
                "salesCntryId": "US",
                "userGradeCd": "1",
                "unreadYN": "N",
                "prodName": "COLUMBIA",
                "heartsvcDttm": "",
                "userTypeCd": "1",
                "wifiType": "M",
                "sort": 1,
                "dvcNick": "AIRMEGA 250S",
                "resetDttm": "",
                "instDttm": "",
                "barcode": "41102F9R21C220xxxx",
                "gpsLat": "",
                "gpsLng": "",
                "gpsNationCd": "",
                "userGrade": "0",
                "managerYn": "Y",
                "eUseTp": "1",
            }
        ],
        "totalPages": 1,
        "reqPageSize": 100,
        "reqPageIndex": 0,
        "numberOfElements": 1,
        "last": True,
        "first": True,
        "totalElements": 1,
    },
    "header": {
        "accessToken": _,
        "error_code": "",
        "error_text": "",
        "info_text": "",
        "login_session_id": "",
        "message_version": "",
        "refreshToken": _,
        "result": True,
        "trcode": "CWIG0304",
    },
}

worth noting I'm not experienced with async stuff; I did this in a python -m asyncio instance which doesn't seem 100% stable

I removed/added the purifier to my account again this morning to try troubleshooting your new update, but got "Coway API error: Coway server failed to return purifier MCU version." Not sure why it says the device hasn't been registered, but I can see the purifier in the IOCare app just fine and as you can see it shows up in the API...

I can provide account credentials for debugging/dev purposes.

Thanks for your time :)

RobertD502 commented 7 months ago

It was caused by them killing off yet another old API endpoint. To get ahead of this, I've gone ahead and replaced all the endpoints that are used to fetch info about purifiers with the new API.

The error they were returning had nothing to do with the actual issue at hand.