-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
json for multiple outlets in one power strip #697
Comments
It’s the JSON for Power Strip SA-P402A. You must change gpio’s to the correct for your power strip. |
Thank you! that works completely. Only one thing. The USB outlets will turn ON when I turn them OFF in Homekit, and they will turn OFF when I turn them ON in Homekit.... I am not good at reading Json, but I guess it is just something that needs to be exchanged somewhere right!? |
And one more thing. The "button"... the physical button on the power strip does not work, and does not show in Homekit. Would that maybe be possible to add in the Json? |
What type of power strip do you have? |
I have a Tuya smart power strip with four regular EU outlets and 4 USB plugs (only one connector for the 4 USBs) |
I am not sure, but i think that the physical button in your power strip is connected to GPIO 2. Try to change the GPIO from "g":1 to "g":2 in the sections button. |
I am very new to this. So I am not completely sure I understand. I changed as per below, and updated the json to the strip. I do not see any changes, and the physical buttons is still not working. Did I do something wrong? {"c":{"l":3,"i":1,"b":[{"g":0,"t":5}]},"a":[{"t":2,"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":1**-CHANGED TO 2**}]},{"t":2,"0":{"r":[{"g":14}]},"1":{"r":[{"g":14,"v":1}]},"b":[{"g":1**-CHANGED TO 2**,"t":2}]},{"t":2,"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]},"b":[{"g":1**-CHANGED TO 2**,"t":3}]},{"t":2,"0":{"r":[{"g":13}]},"1":{"r":[{"g":13,"v":1}]},"b":[{"g":1**-CHANGED TO 2**,"t":4}]},{"t":2,"0":{"r":[{"g":5}]},"1":{"r":[{"g":5,"v":1}]},"b":[{"g":1**-CHANGED TO 2**,"t":5}]}]} |
Maybe I should add... there is only 1 button on the power strip. |
No, don’t change GPIO. It seems that configuration is correct. I have updated my power strip to 0.9.2 version and it still works fine. {"c":{"l":3,"i":1,"b":[{"g":0,"t":5}]},"a":[{"t":2,"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":1}]},{"t":2,"0":{"r":[{"g":14}]},"1":{"r":[{"g":14,"v":1}]},"b":[{"g":1,"t":2}]},{"t":2,"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]},"b":[{"g":1,"t":3}]},{"t":2,"0":{"r":[{"g":13}]},"1":{"r":[{"g":13,"v":1}]},"b":[{"g":1,"t":4}]},{"t":2,"0":{"r":[{"g":5}]},"1":{"r":[{"g":5,"v":1}]},"b":[{"g":1,"t":5}]}]} What exactly is your power strip. Send me the link. |
it is this one... TYPE-E (second picture) |
Since this is my first time ever flashing and working with json I have been trying a lot of stuff to see what works. I changed my json to What I expected it to do did NOT work... surprise... well I have to try things to learn I guess.... BUT the worst part is, now I cannot enter the setup-mode again. To enter the setup-mode I need to toggle one of the outlets on/off several times (I did that from Homekit before), but since my new json doesn't allow me to toggle any of the outlets, then I cannot enter setup-mode to change the json. |
You can to reflash it. |
In order to flash it, I still need to access the setup mode. |
That is really cool with the setup mode button! How did you do that? Is it part of the json? |
I found correct GPIO for this strip {"c":{"l":1,"i":1,"b":[{"g":3,"t":5}]},"a":[{"0":{"r":[{"g":5}]},"1":{"r":[{"g":5,"v":1}]},"t":2,"b":[{"g":3,"t":2}]},{"0":{"r":[{"g":4}]},"1":{"r":[{"g":4,"v":1}]},"t":2,"b":[{"g":3,"t":2}]},{"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"t":2,"b":[{"g":3,"t":2}]},{"0":{"r":[{"g":13}]},"1":{"r":[{"g":13,"v":1}]},"t":2,"b":[{"g":3,"t":2}]},{"0":{"r":[{"g":14}]},"1":{"r":[{"g":14,"v":1}]},"t":2,"b":[{"g":3,"t":2}]}]} |
I need to change my json to have more than one outlet within the same json. I have 4 outlets, plus a USB outlet. My json looks like this, and will only allow one outlet to be handled from homekit...
{"c":{"l":4,"b":[{"g":13,"t":5}]},"a":[{"t":2,"0":{"r":[{"g":5}]},"1":{"r":[{"g":5,"v":1}]},"b":[{"g":13}]}]}
The text was updated successfully, but these errors were encountered: