nocmt / ewelink-api-next

CoolKit v2 API Official Library
MIT License
22 stars 5 forks source link

device.getAllThings() and device.getAllThingsAllPages() does not return all devices #10

Closed geniqtech closed 4 months ago

geniqtech commented 1 year ago

I have 8 Sonoff devices and methods device.getAllThings() and device.getAllThingsAllPages() only returns 6 out of 8 devices.

However when I use device.getThings() with the missing deviceId, the device is returned without issues.

It seems that specified to Sonoff S20 Smart Wall Plugs devices.

geniqtech commented 1 year ago

FYI here's the device details "extra": { "model": "PSA-B01-GL", "ui": "单通道插座", "uiid": 1, "description": "WO1863", "manufacturer": "深圳创易智能系统有限公司", "mac": "d0:27:00:90:e1:8e", "apmac": "d0:27:00:90:e1:8f", "modelInfo": "56567f2493991b740423d34e", "brandId": "5611402280a0e2630f7b102d", "staMac": "B4:E6:2D:3A:99:4D", "chipid": "003A994D" },

geniqtech commented 1 year ago

Any updates regarding this issue?

nocmt commented 1 year ago

The reason is that the device of this brand is not actually within the scope of free authorization. In principle, you cannot obtain data from any interface for this device, but we have not strictly blocked it.

Our free authorized brands: sonoff、SONOFF、coolkit

geniqtech commented 1 year ago

This device is actually SONOFF S20 smart plug. So you mean it's not supported?

nocmt commented 1 year ago

This device is actually SONOFF S20 smart plug. So you mean it's not supported?

Yes, it is not supported. It belongs to an early product and is actually associated with another brand.

Kiogora commented 1 year ago

How about the Sonoff POW Elite?

adeleon-nerd commented 1 year ago

@coolkit-carl @nocmt would you guys be able to check the following devices SONOFF 4chpro and basic. Everything was working fine till yesterday afternoon that my api calls started coming back empty.

{ "status": 200, "error": 0, "msg": "", "data": { "thingList": [], "total": 0 } }

ghost commented 1 year ago

@coolkit-carl @nocmt would you guys be able to check the following devices SONOFF 4chpro and basic. Everything was working fine till yesterday afternoon that my api calls started coming back empty.

{ "status": 200, "error": 0, "msg": "", "data": { "thingList": [], "total": 0 } }

The total is 0, indicating that the number of devices in your current designated home is 0. You can switch to a home with a device or specify a home ID, and then request to try again.

adeleon-nerd commented 1 year ago

@coolkit-carl @nocmt would you guys be able to check the following devices SONOFF 4chpro and basic. Everything was working fine till yesterday afternoon that my api calls started coming back empty. { "status": 200, "error": 0, "msg": "", "data": { "thingList": [], "total": 0 } }

The total is 0, indicating that the number of devices in your current designated home is 0. You can switch to a home with a device or specify a home ID, and then request to try again.

Thank you for the quick reply and if not too much to ask how can I switch home? would you point me in the right direction?

ghost commented 1 year ago

Thank you for the quick reply and if not too much to ask how can I switch home? would you point me in the right direction?

The interface for obtaining family list information can obtain a family ID, or you can switch to a family in the upper left corner of the eWeLink App homepage.

adeleon-nerd commented 1 year ago

Thank you for the quick reply and if not too much to ask how can I switch home? would you point me in the right direction?

The interface for obtaining family list information can obtain a family ID, or you can switch to a family in the upper left corner of the eWeLink App homepage.

@coolkit-carl really appreciate your help. I was able to figure out what was wrong, for some reason after refreshing the token.json this part was missing on the new token "region":"us" and was logged in/looking at eu region by default.

nocmt commented 11 months ago

Thank you for the quick reply and if not too much to ask how can I switch home? would you point me in the right direction?

The interface for obtaining family list information can obtain a family ID, or you can switch to a family in the upper left corner of the eWeLink App homepage.

@coolkit-carl really appreciate your help. I was able to figure out what was wrong, for some reason after refreshing the token.json this part was missing on the new token "region":"us" and was logged in/looking at eu region by default.

Yes, this parameter will not be returned on certain interfaces, so you need to consider adding it yourself.