Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

partial dps decode removed #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tixi
Copy link
Contributor

@tixi tixi commented Oct 26, 2018

In status function when the payload is encrypted, only a partial dps is present in the decrypted payload. This is a source of bug in case of multiplug or bulb. I just put comments for that part.

@clach04
Copy link
Owner

clach04 commented Nov 13, 2018

Can you describe this a little more? I thought I remember seeing crypted packets that had status information and it was complete json. complete.

What bug does this change address? For some of the devices I have it would regress (albeit not on each call, not all status results are returned encrypted).

@tixi
Copy link
Contributor Author

tixi commented Nov 15, 2018

What I observe with my different devices is that when the payload is encrypted the json is valid but the state is not fully present. I got something similar to what you have in comment:
{"devId":"ID","dps":{"1":true,"2":0},"t":EPOCH_SECS,"s":3_DIGIT_NUM}
Except that the dps only contains the first entry (i.e. "1":true).
Returning that state is valid only for devices where we care only about the first entry mostly single socket outlet. For bulb, or multi socket outlet this is a source of bug since we may want for instance the mode of a bulb or the state of the second socket.
BTW, i also observe that this encrypted payload is what the device reply to a set command.

@BillSobel
Copy link

BillSobel commented Nov 15, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants