Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAN control of TH10 #1363

Open
jkoornneef opened this issue Mar 20, 2024 · 0 comments
Open

LAN control of TH10 #1363

jkoornneef opened this issue Mar 20, 2024 · 0 comments
Labels
question Further information is requested

Comments

@jkoornneef
Copy link

Hi, Hoping someone can help. I'm trying to control a TH10 over LAN from a simple app. I can successfully control a Basic (change state and decode updates) and I can see and decode changes FROM a TH10, including temp and humidity. However, I cannot change the relay state using the same (reencrypted) message/code as the Basic. I get 400 errors, so I'm missing or misconfiguring something in the message.

http://192.168.1.xxx:8081/zeroconf/switch

{"sequence":"638465458922","deviceid":"10002xxxxx","selfApikey":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","iv":"xxxxx","encrypt":true,"data":"sXErEgwQxD8n8mZtf3ZqRg=="}

where data is: {"mainSwitch":"on", "switch":"on"} or {"switch":"on"} , although I have also tried 'fan', 'light', and 'switches'

Sending properly encrypted above to the Basic device switched the relay correctly.

I'm sure I have the encryption key correct for the TH10, since I decode updates such as:
Received: {"mainSwitch":"on","deviceType":"normal","switch":"on","startup":"off","pulse":"off","pulseWidth":500,"sledOnline":"on","sensorType":"AM2301","currentHumidity":"37","currentTemperature":"21.4","ssid":"xxxxxxx","bssid":"xx:xx:xx:x:xx:xx"}

I'm sure I'm missing something simple here.
Thanks

@AlexxIT AlexxIT added the question Further information is requested label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants