Open animaxcg opened 3 years ago
Hi, what results do you get when you run discover? Also can you look at mDNS output (i.e. use bonjour browser or similar application) and see what TH16 presents. Just looking at type field is normally "plug". I forked this project recently to pass outlet to the cli, as outlet is required for multi-gang wall switch (TX3C) which is "strip" type which luckily was handled by the code already, just not with the cli. I would guess the TH16 is different hence the error you get
you can see pull request here - someone has already put in on/off support for TH16 https://github.com/mattsaxon/pysonofflan/pull/151
Description
I know this is unsupported now but I am getting 422 when trying to set state
What I Did
looking at http://developers.sonoff.tech/sonoff-diy-mode-api-protocol.html I see that - 422: The operation failed and the request parameters are invalid. For example, the device does not support setting specific device information. this is a TH16 with firmware 3.4.1
I even modified the code to make sure the data was being sent correctly by passing the data from format_encryption_msg to decrypt and getting the unencrypted byte data that was passed into encrypt. Does this just mean that the TH16 on 3.4.1 isn't supported? Should I try to set up home assistant and sniff my traffic to see if it is the device or this api? That seems like a ton of work