jubepue / homebridge-petkit-platform

MIT License
14 stars 6 forks source link

Doesn't show up in HomeKit #8

Open smorello87 opened 1 year ago

smorello87 commented 1 year ago

I set up, I think correctly, the plugin and the logs show my devices correctly, but I see nothing in my room on HomeKit. See log below.

PetkitOpenAPI response: {"result":{"id":100045896,"mac":"ec626010d16c","sn":"20230317L12478","secret":"627d01beef160433","createdAt":"2023-07-12T23:38:20.460+0000","name":"PURA MAX","hardware":1,"firmware":"1.456","firmwareDetails":[{"module":"userbin","version":2310010},{"module":"pics","version":2220001},{"module":"lans","version":2245001}],"timezone":-4,"signupAt":"2023-07-13T12:31:56.412+0000","locale":"America/New_York","user":{"id":"100603015","nick":"veritas44","gender":1,"avatar":"http://sandbox.img5.petkit.cn/banner/2022/10/13/6347d7c8a344e5000b575c02PxkreS7Kl","point":{"honour":"LV0","rank":0,"growth":15,"icon":"http://img5-us.petkit.cn/misc/point/n0","icon2":"http://img5-us.petkit.cn/misc/point/l0","startGrowth":0,"endGrowth":50}},"shareOpen":0,"relation":{"userId":"100603015"},"withK3":0,"btMac":"ec626010d16e","settings":{"litterFullNotify":1,"lackSandNotify":1,"workNotify":1,"petInNotify":1,"lackLiquidNotify":1,"deodorantNotify":1,"sandType":1,"manualLock":0,"lightMode":1,"lightRange":[0,1440],"autoWork":1,"fixedTimeClear":0,"downpos":1,"deepRefresh":0,"weightPopup":1,"autoIntervalMin":0,"stillTime":60,"unit":0,"language":"en_US","languageFollow":0,"softMode":0,"avoidRepeat":1,"underweight":0,"kitten":0,"kittenTipsTime":0,"stopTime":600,"languages":["zh_CN","zh_TW","en_US","es_ES","ko_KR","it_IT","ja_JP","pt_PT","de_DE","fr_FR","ru_RU"],"kittenPercent":0.8,"dumpSwitch":1,"disturbMode":0,"disturbRange":[1340,380],"relateK3Switch":1,"lightest":2960,"deepClean":0,"lightConfig":1,"bury":0,"lightMultiRange":[],"disturbConfig":2,"distrubMultiRange":[[1340,380]]},"petOutTip":1,"multiConfig":true,"state":{"wifi":{"ssid":"heartofdarkness","bssid":"0025bc8a6891","rsq":-55},"pim":1,"ota":0,"overall":1,"sandCorrect":0,"liquidReset":0,"sandWeight":6535,"sandPercent":95,"usedTimes":0,"sandType":1,"sandStatus":1,"box":0,"petInTime":0,"power":1,"petError":false,"deodorantLeftDays":29,"liquidLack":false,"boxFull":false,"liquidEmpty":false,"sandLack":false,"lowPower":false},"lastOutTime":61,"petOutRecords":[[73189,61]],"inTimes":1,"totalTime":420,"maintenanceTime":0,"petInTipLimit":15}} path = /t4/device_detail Adding: PURA MAX (T4 / 100045896) PetkitOpenAPI request: method = post, endpoint = http://api.petkt.com/latest, path = /user/login, params = null, body = {"username":"veritas44@gmail.com","password":"REDACTED","encrypt":"1","timezoneId":"Europe/Madrid","timezone":"2.0","locale":"es_ES"}, headers = {"X-Client":"ios(15.5;iPhone12,3)","Accept":"/","X-Timezone":"2.0","Accept-Language":"es-ES;q=1","Accept-Encoding":"gzip, deflate","X-Api-Version":"8.17.1","Content-Type":"application/x-www-form-urlencoded","User-Agent":"PETKIT/8.17.1 (iPhone; iOS 15.5; Scale/3.00)","X-TimezoneId":"Europe/Madrid","X-Locale":"es_ES","X-Session":"314cde825f6a48858d1dcac8806b348aDlp7rOhWtIaFh2mwWViU"} PetkitOpenAPI response: {"result":{"settings":{"bannerPermission":1,"chatPermission":0,"feederChart":1,"language":"en_US","locationPrivacy":1,"productsPermission":1,"receiveFollowMessage":1,"recommendPermission":1,"subscribe":-1,"tempUnit":0,"timeFormat":12,"unit":0},"mods":["cs"],"noPassword":false,"imserver":{"host":"im2.petkit.com","port":5222},"session":{"createdAt":"2023-07-14T02:34:55.444Z","expiresIn":1440,"id":"31b8ad4c23c5444982ef82ac874703d1IKlyk4TT96lxlp1onICL","userId":"100603015"},"newUser":false,"imservers":[{"host":"pim.petkt.com","port":10001,"ssl":1},{"host":"pim.petkt.com","port":443,"ssl":1},{"host":"pim.petkt.com","port":10000,"ssl":0}],"apiServers":["https://api.petkt.com/6/"],"user":{"account":{"email":"veritas44@gmail.com","node":"US","region":"US","userId":"100603015"},"avatar":"http://sandbox.img5.petkit.cn/banner/2022/10/13/6347d7c8a344e5000b575c02PxkreS7Kl","birth":19871117,"birthLabel":"Escorpio","deviceCount":0,"dogs":[{"activeDegree":0,"avatar":"http://img5-us.petkit.cn/uavatar/2023/7/13/64af39ea7465de000cc091b8usMuBm9gc","birth":"2022-08-01","category":{"avatar":"http://img5-us.petkit.cn/dogavatar/2017/8/10/598c150b98953a0fc0b2ad7eDHh42Ty1z","id":10063,"name":"European Shorthair"},"createdAt":"2023-07-12T23:45:37.000Z","deviceCount":0,"emotion":0,"familyId":300052463,"femaleState":2,"gender":2,"id":"100839907","isRoyalCaninPet":0,"maleState":0,"name":"Nori","size":{"id":1,"name":"Estándar"},"states":[],"type":{"id":2,"name":"Gato"},"updatedAt":"2023-07-12T23:45:37.000Z","weight":3.7,"weightControl":3,"weightControlTips":{"disable":[2],"tip":"Su mascota está ligeramente delgada. Le sugerimos que no baje el peso de su mascota."},"weightLabel":"Delgado"}],"gender":1,"id":"100603015","locality":"United States","nick":"veritas44","petCount":0,"point":{"endGrowth":50,"growth":15,"honour":"LV0","icon":"http://img5-us.petkit.cn/misc/point/n0","icon2":"http://img5-us.petkit.cn/misc/point/l0","rank":0,"startGrowth":0},"userCount":0},"imserver2":{"host":"pim.petkt.com","port":10000,"ssl":0}}} path = /user/login PetkitOpenAPI request: method = post, endpoint = http://api.petkt.com/latest, path = /discovery/device_roster, params = null, body = null, headers = {"X-Client":"ios(15.5;iPhone12,3)","Accept":"/","X-Timezone":"2.0","Accept-Language":"es-ES;q=1","Accept-Encoding":"gzip, deflate","X-Api-Version":"8.17.1","Content-Type":"application/x-www-form-urlencoded","User-Agent":"PETKIT/8.17.1 (iPhone; iOS 15.5; Scale/3.00)","X-TimezoneId":"Europe/Madrid","X-Locale":"es_ES","X-Session":"31b8ad4c23c5444982ef82ac874703d1IKlyk4TT96lxlp1onICL"} PetkitOpenAPI response: {"result":{"p3d":{"enable":1},"t4":{"enable":1},"r2":{"enable":1},"p3c":{"enable":1},"aqr":{"enable":1},"p3":{"enable":1},"w5c":{"enable":1},"cozy":{"gearsTotal":6,"enable":1,"tempunit":0,"sTempMin":10,"isShowDeviceSafetyClause":0,"gearsOffset":3,"sTempMax":42},"feeder":{"isShowDeviceSafetyClause":0},"h2":{"enable":0},"tools":[{"type":"walkpet","data":{}},{"type":"weight"},{"type":"remind","data":{}}],"d3":{"enable":1},"d4":{"enable":1},"w5n":{"enable":1},"aqh1":{"enable":0},"cat":{"days":30},"w5":{"enable":1},"devices":[{"data":{"createdAt":"2023-07-12T23:38:20.460+0000","name":"PURA MAX","id":100045896,"state":1,"firmware":"1.456","relation":{"userId":"100603015"},"status":{"wifi":{"ssid":"heartofdarkness","bssid":"0025bc8a6891","rsq":-55},"pim":1,"ota":0,"overall":1,"sandCorrect":0,"liquidReset":0,"sandWeight":6535,"sandPercent":95,"usedTimes":0,"sandType":1,"sandStatus":1,"box":0,"petInTime":0,"power":1,"petError":false,"deodorantLeftDays":29,"liquidLack":false,"boxFull":false,"liquidEmpty":false,"sandLack":false,"lowPower":false},"hardware":1,"desc":"Último uso: 08:20 p.m."},"type":"T4"}],"k2":{"enable":1},"go":{"hasMarks":0,"maxMarksPerRoute":30,"markEnabled":1},"k3":{"enable":1},"aq":{"enable":1},"hasRelay":true,"feedermini":{"isShowDeviceSafetyClause":0},"w4x":{"enable":1},"appbanner":[],"t3":{"enable":1},"aq1s":{"enable":1}}} path = /discovery/device_roster PetkitOpenAPI request: method = post, endpoint = http://api.petkt.com/latest, path = /t4/device_detail, params = null, body = {"id":100045896}, headers = {"X-Client":"ios(15.5;iPhone12,3)","Accept":"/","X-Timezone":"2.0","Accept-Language":"es-ES;q=1","Accept-Encoding":"gzip, deflate","X-Api-Version":"8.17.1","Content-Type":"application/x-www-form-urlencoded","User-Agent":"PETKIT/8.17.1 (iPhone; iOS 15.5; Scale/3.00)","X-TimezoneId":"Europe/Madrid","X-Locale":"es_ES","X-Session":"31b8ad4c23c5444982ef82ac874703d1IKlyk4TT96lxlp1onICL"} PetkitOpenAPI response: {"result":{"id":100045896,"mac":"ec626010d16c","sn":"20230317L12478","secret":"627d01beef160433","createdAt":"2023-07-12T23:38:20.460+0000","name":"PURA MAX","hardware":1,"firmware":"1.456","firmwareDetails":[{"module":"userbin","version":2310010},{"module":"pics","version":2220001},{"module":"lans","version":2245001}],"timezone":-4,"signupAt":"2023-07-13T12:31:56.412+0000","locale":"America/New_York","user":{"id":"100603015","nick":"veritas44","gender":1,"avatar":"http://sandbox.img5.petkit.cn/banner/2022/10/13/6347d7c8a344e5000b575c02PxkreS7Kl","point":{"honour":"LV0","rank":0,"growth":15,"icon":"http://img5-us.petkit.cn/misc/point/n0","icon2":"http://img5-us.petkit.cn/misc/point/l0","startGrowth":0,"endGrowth":50}},"shareOpen":0,"relation":{"userId":"100603015"},"withK3":0,"btMac":"ec626010d16e","settings":{"litterFullNotify":1,"lackSandNotify":1,"workNotify":1,"petInNotify":1,"lackLiquidNotify":1,"deodorantNotify":1,"sandType":1,"manualLock":0,"lightMode":1,"lightRange":[0,1440],"autoWork":1,"fixedTimeClear":0,"downpos":1,"deepRefresh":0,"weightPopup":1,"autoIntervalMin":0,"stillTime":60,"unit":0,"language":"en_US","languageFollow":0,"softMode":0,"avoidRepeat":1,"underweight":0,"kitten":0,"kittenTipsTime":0,"stopTime":600,"languages":["zh_CN","zh_TW","en_US","es_ES","ko_KR","it_IT","ja_JP","pt_PT","de_DE","fr_FR","ru_RU"],"kittenPercent":0.8,"dumpSwitch":1,"disturbMode":0,"disturbRange":[1340,380],"relateK3Switch":1,"lightest":2960,"deepClean":0,"lightConfig":1,"bury":0,"lightMultiRange":[],"disturbConfig":2,"distrubMultiRange":[[1340,380]]},"petOutTip":1,"multiConfig":true,"state":{"wifi":{"ssid":"heartofdarkness","bssid":"0025bc8a6891","rsq":-55},"pim":1,"ota":0,"overall":1,"sandCorrect":0,"liquidReset":0,"sandWeight":6535,"sandPercent":95,"usedTimes":0,"sandType":1,"sandStatus":1,"box":0,"petInTime":0,"power":1,"petError":false,"deodorantLeftDays":29,"liquidLack":false,"boxFull":false,"liquidEmpty":false,"sandLack":false,"lowPower":false},"lastOutTime":61,"petOutRecords":[[73189,61]],"inTimes":1,"totalTime":420,"maintenanceTime":0,"petInTipLimit":15}} path = /t4/device_detail Adding: PURA MAX (T4 / 100045896)

pomidorum1989 commented 1 year ago

Experience the same issue with Petkit Solo and EverSweet fountain. 1-st it didn't work with Asian region account (was telling that credentials are incorrect) then I moved all devices to EU and login was successful but devices was not added to the homedridge.

PetkitOpenAPI response: {
    "result": {
        "settings": {
            "bannerPermission": 1,
            "chatPermission": 0,
            "feederChart": 1,
            "language": "en_US",
            "locationPrivacy": 1,
            "productsPermission": 1,
            "receiveFollowMessage": 1,
            "recommendPermission": 1,
            "subscribe": -1,
            "tempUnit": 0,
            "timeFormat": 24,
            "unit": 0
        },
        "mods": [
            "petcare",
            "banner",
            "topic",
            "cs"
        ],
        "noPassword": false,
        "imserver": {
            "host": "im2.petkit.com",
            "port": 5222
        },
        "session": {
            "createdAt": "2023-07-25T07:39:53.390Z",
            "expiresIn": 1440,
            "id": "42b656f1bb504729b28ef410b6547d90NuJyc7jjGMcbtwrLKuK4",
            "userId": "100610994"
        },
        "newUser": false,
        "imservers": [
            {
                "host": "pim.petkt.com",
                "port": 10001,
                "ssl": 1
            },
            {
                "host": "pim.petkt.com",
                "port": 443,
                "ssl": 1
            },
            {
                "host": "pim.petkt.com",
                "port": 10000,
                "ssl": 0
            }
        ],
        "apiServers": [
            "https://api.petkt.com/6/"
        ],
        "user": {
            "account": {
                "email": "******",
                "node": "US",
                "region": "ES",
                "userId": "100610994"
            },
            "avatar": "http://sandbox.img5.petkit.cn/banner/2022/10/13/6347d75a44ad08000b011e7dDzwc693i5",
            "deviceCount": 0,
            "dogs": [],
            "gender": 3,
            "genderCustom": "",
            "id": "100610994",
            "locality": "Spain",
            "nick": "****",
            "petCount": 0,
            "point": {
                "endGrowth": 50,
                "growth": 15,
                "honour": "LV0",
                "icon": "http://img5-us.petkit.cn/misc/point/n0",
                "icon2": "http://img5-us.petkit.cn/misc/point/l0",
                "rank": 0,
                "startGrowth": 0
            },
            "userCount": 0
        },
        "imserver2": {
            "host": "pim.petkt.com",
            "port": 10000,
            "ssl": 0
        }
    }
} path = /user/login
PetkitOpenAPI request: method = post, endpoint = http: //api.petkt.com/latest, path = /discovery/device_roster, params = null, body = null, headers = {"X-Client":"ios(15.5;iPhone12,3)","Accept":"*/*","X-Timezone":"2.0","Accept-Language":"es-ES;q=1","Accept-Encoding":"gzip, deflate","X-Api-Version":"8.17.1","Content-Type":"application/x-www-form-urlencoded","User-Agent":"PETKIT/8.17.1 (iPhone; iOS 15.5; Scale/3.00)","X-TimezoneId":"Europe/Madrid","X-Locale":"es_ES","X-Session":"42b656f1bb504729b28ef410b6547d90NuJyc7jjGMcbtwrLKuK4"}
PetkitOpenAPI response: {
    "result": {
        "p3d": {
            "enable": 1
        },
        "t4": {
            "enable": 1
        },
        "r2": {
            "enable": 1
        },
        "p3c": {
            "enable": 1
        },
        "aqr": {
            "enable": 1
        },
        "p3": {
            "enable": 1
        },
        "w5c": {
            "enable": 1
        },
        "cozy": {
            "gearsTotal": 6,
            "enable": 1,
            "tempunit": 0,
            "sTempMin": 10,
            "isShowDeviceSafetyClause": 0,
            "gearsOffset": 3,
            "sTempMax": 42
        },
        "feeder": {
            "isShowDeviceSafetyClause": 0
        },
        "h2": {
            "enable": 0
        },
        "tools": [
            {
                "type": "walkpet",
                "data": {}
            },
            {
                "type": "weight"
            },
            {
                "type": "remind",
                "data": {}
            }
        ],
        "d3": {
            "enable": 1
        },
        "d4": {
            "enable": 1
        },
        "w5n": {
            "enable": 1
        },
        "aqh1": {
            "enable": 0
        },
        "cat": {
            "days": 30
        },
        "w5": {
            "enable": 1
        },
        "devices": [
            {
                "type": "W5",
                "data": {
                    "mode": 1,
                    "createdAt": "2023-01-02T14:51:03.000Z",
                    "settings": {
                        "colorSetting": 0,
                        "disturbConfig": 2,
                        "disturbMultiTime": [
                            {
                                "repeats": "1",
                                "time": [
                                    1320,
                                    360
                                ]
                            }
                        ],
                        "lampRingBrightness": 1,
                        "lampRingGoOutTime": 1440,
                        "lampRingLightUpTime": 0,
                        "lampRingSwitch": 1,
                        "lightConfig": 2,
                        "lightMultiTime": [
                            {
                                "repeats": "1",
                                "time": [
                                    960,
                                    120
                                ]
                            }
                        ],
                        "noDisturbingEndTime": 360,
                        "noDisturbingStartTime": 1320,
                        "noDisturbingSwitch": 0,
                        "smartSleepTime": 3,
                        "smartWorkingTime": 3
                    },
                    "name": "EVERSWEET WIRELESS(SUS304)",
                    "id": 100033466,
                    "filterWarning": 0,
                    "lackWarning": 0,
                    "runStatus": 1,
                    "relation": {
                        "userId": "100610994"
                    },
                    "typeCode": 4
                }
            },
            {
                "data": {
                    "createdAt": "2023-07-21T14:16:21.728+0000",
                    "dailyFeed": {
                        "items": [],
                        "day": 20230725,
                        "planAmount": 30,
                        "addAmount": 0,
                        "realAmount": 10,
                        "deviceId": 0,
                        "amount": 30,
                        "times": 1
                    },
                    "name": "FRESH ELEMENT SOLO",
                    "id": 100003881,
                    "state": 1,
                    "factor": 10,
                    "relation": {
                        "userId": "100610994"
                    },
                    "status": {
                        "wifi": {
                            "ssid": "*****",
                            "bssid": "00bb1c232354",
                            "rsq": -48
                        },
                        "pim": 1,
                        "ota": 0,
                        "overall": 1,
                        "batteryStatus": 0,
                        "runtime": 0,
                        "batteryPower": 0,
                        "food": 1,
                        "desiccantLeftDays": 26,
                        "door": 0,
                        "feeding": 0,
                        "desiccantTime": 0
                    },
                    "typeCode": 1,
                    "desc": "Próxima alimentación: 13:00"
                },
                "type": "D4"
            }
        ],
        "k2": {
            "enable": 1
        },
        "go": {
            "hasMarks": 0,
            "maxMarksPerRoute": 30,
            "markEnabled": 1
        },
        "k3": {
            "enable": 1
        },
        "aq": {
            "enable": 1
        },
        "hasRelay": true,
        "feedermini": {
            "isShowDeviceSafetyClause": 0
        },
        "w4x": {
            "enable": 1
        },
        "appbanner": [],
        "t3": {
            "enable": 1
        },
        "aq1s": {
            "enable": 1
        }
    }
} path = /discovery/device_roster
PetkitOpenAPI request: method = post, endpoint = http: //api.petkt.com/latest, path = /w5/device_detail, params = null, body = {"id":100033466}, headers = {"X-Client":"ios(15.5;iPhone12,3)","Accept":"*/*","X-Timezone":"2.0","Accept-Language":"es-ES;q=1","Accept-Encoding":"gzip, deflate","X-Api-Version":"8.17.1","Content-Type":"application/x-www-form-urlencoded","User-Agent":"PETKIT/8.17.1 (iPhone; iOS 15.5; Scale/3.00)","X-TimezoneId":"Europe/Madrid","X-Locale":"es_ES","X-Session":"42b656f1bb504729b28ef410b6547d90NuJyc7jjGMcbtwrLKuK4"}
Failed to get device information. Please check if the config.json is correct.