Astogems / Home-Assistant-S6E-Tuya-Smart-Panel-Relay-Controls

This repository will teach you how to get the relays of the S6E Tuya Smart working with Home Assistant.
11 stars 0 forks source link

Informational: S8E Relay GPIO Pins are different #1

Open burnsie-la opened 1 year ago

burnsie-la commented 1 year ago

First of all, thank you so much for this guide! I was able to use it to configure my S8E.
https://expo.tuya.com/product/1058107

For others looking to control the relays on their modified Tuya S8E, you need to follow the steps from this guide but I had to substitute GPIO pins 107 (for relay 1) and 108 (for relay 2)

I hope this helps!

DarrenJW2709 commented 1 year ago

Hi,

How did you find out what GPIO pins are? I changed mine to 107 / 108 repecfully but it still not working.

Thanks

burnsie-la commented 1 year ago

I ADB'd into the device, opened a shell and echo'd 1 and 0 into each of the GPIO pins until the relays turned on and off. I followed the instructions in the How It Works section of the readme in this repo https://github.com/Astogems/Home-Assistant-S6E-Tuya-Smart-Panel-Relay-Controls

Astogems commented 1 year ago

Thats great news! However, the easier way to do it would be exporting the test APK and decompiling it.

Tuya does a shitty job at code sanitisation hence you literally get the source code. From there, you can easily figure out the GPIO Pins. In fact the S8E might have a knob, it might be possible to reverse engineer that part as well.

Astogems commented 1 year ago

If you do manage to export the APK, attach it here and I might be able to take a look as well.

DarrenJW2709 commented 1 year ago

Thanks for this. Am newbie so may take me a little while to get this over!!!

rarroyo6 commented 9 months ago

For anyone interested, I de-compiled the test apk on my S8E and found the relays to be at: /sys/class/st_relay/relay1 and /sys/class/st_relay/relay2

Attached is my apk file, if anybody can help, I'm trying to find out how to use the knob and the small display. smatek_s8_23082317.zip

Thanks for everyone's help in finding this information.