RealZimboGuy / ewelink-api-java

Java Api for the Sonoff ewelink
http://ewelink-api-java.co.zw/
15 stars 5 forks source link

Is it possible to switch family? #8

Closed kun3ar closed 7 months ago

kun3ar commented 8 months ago

Hi. Will it be possible to switch family? Currently when program log in, it fetches data for the current family only.

RealZimboGuy commented 8 months ago

it was my understanding when the hompage endpoint is called you get a list of Family and the list of things, hence why to return the things it uses "getHomePage().getData().getThingInfo().getThingList()"

if you enable debug logging you should see the object come back 09:54:40.445 [main] DEBUG com.github.realzimboguy.ewelink.api.EweLink - getHome Response Raw:

ive looked in my android app, how do you change family ?

kun3ar commented 8 months ago

HiI have multiple families and in my app I am able to switch families. Families are called Homes in my app. See attached I have debugged the data. The homepage returns 1. List of families 2. Current Selected Family (the selected family was what I selected in app)3. Things belonging to current selected family only there is no function to pass on the family id parameter or switch family. KunwarSent from my iPhoneOn 5 Feb 2024, at 07:58, RealZimboGuy @.***> wrote: it was my understanding when the hompage endpoint is called you get a list of Family and the list of things, hence why to return the things it uses "getHomePage().getData().getThingInfo().getThingList()" if you enable debug logging you should see the object come back 09:54:40.445 [main] DEBUG com.github.realzimboguy.ewelink.api.EweLink - getHome Response Raw: ive looked in my android app, how do you change family ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

RealZimboGuy commented 8 months ago

github seems to strip attachments in email replies

kun3ar commented 8 months ago

Sent from my iPhoneOn 5 Feb 2024, at 12:01, RealZimboGuy @.***> wrote: github seems to strip attachments in email replies

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

kun3ar commented 8 months ago

0147B61D-A30E-4D13-9379-2A2754AA101D 01359341-2AE2-4827-9CB3-A3F3871B0386

RealZimboGuy commented 7 months ago

Ive found an endpoint that should solve your issue, the code is comitted "3.2.0-RELEASE" but there seems issues publishing to maven at the moment, you will need to pull/download the code and run a local maven install. let me know if it works

public List<Thing> getThings(String familyId) throws Exception 
kun3ar commented 7 months ago

Hi. It worked fine.

Thank you for the fix.

Best of luck

On Tue, 6 Feb 2024 at 06:51, RealZimboGuy @.***> wrote:

Ive found an endpoint that should solve your issue, the code is comitted "3.2.0-RELEASE" but there seems issues publishing to maven at the moment, you will need to pull/download the code and run a local maven install. let me know if it works

public List getThings(String familyId) throws Exception

— Reply to this email directly, view it on GitHub https://github.com/RealZimboGuy/ewelink-api-java/issues/8#issuecomment-1928887136, or unsubscribe https://github.com/notifications/unsubscribe-auth/BF3XL3ESSWEA4TNEIE5VF3LYSHHHZAVCNFSM6AAAAABCY27JW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRYHA4DOMJTGY . You are receiving this because you authored the thread.Message ID: @.***>

RealZimboGuy commented 7 months ago

great