RavenSystem / esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)
Other
2.72k stars 357 forks source link

Help with HAA json and shelly 1 #1196

Closed Alex-gpio closed 3 years ago

Alex-gpio commented 3 years ago

Please I need help

I've this json string

lock mechanism with external push button (default closed)

{"a":[{"t":4,"i":3,"1":{"r":[{"g":4}]},"0":{"r":[{"g":4,"v":1,"i":0.5}]},"b":[{"g":5,"p":0,"i":1,"t":0}]}]}

but i'need that the lock mechanism works to inverse mode (default open) I need that the mechanism must be in opened state by default (not closed as the code I gave) for the rest of code as inching time 3 sec is correct. moreover I need that when it has a power loss it restart unlocked or to previous state

Thanx a lot to everybody

gerarddvb commented 3 years ago

{"a":[{"0":{"r":[{"g":4,"v":1,"i":0.5}]},"1":{"r":[{"g":4}]},"t":4,"i":3,"b":[{"g":5,"p":0,"i":1,"t":0}],"s":0}]} This should make it when power is lost it boots to unlocked.

{"a":[{"0":{"r":[{"g":4,"v":1,"i":0.5}]},"1":{"r":[{"g":4}]},"t":4,"i":3,"b":[{"g":5,"p":0,"i":1,"t":0}],"s":5}]} This should make it when power is lost it boots to previous state.

Hope this helps. You can paste your json lint on the bottom of this site and start changing; https://glumb.github.io/haa-configurator/

Alex-gpio commented 3 years ago

Thanx Gerarddvd!!

I tried your json code, unfortunately it doesn’t work on shelly v1. The device boots correctly and it connects to my wifi, but homekit doesn’t find it, so is not possible to add the device in the apple home app.

I’m using the latest HAA firmware.

gerarddvb commented 3 years ago

Did you reset the Homekit ID in setup?

The json is the same as you made it. I only added s":0 / s":5 to define default state

Alex-gpio commented 3 years ago

Of course!

gerarddvb commented 3 years ago

I have this problem too. Sometimes homekit doesnt want to reconise it. Restarting router fixes it for me

Alex-gpio commented 3 years ago

Good idea I’ll try this solution

Alex-gpio commented 3 years ago

Nothing, it doesn’t work

Alex-gpio commented 3 years ago

It works! I don’t know why. But leaving the device connected after 3 hours it become discoverable by homekit.

But now I need some help.

1) I need that the lock would be in opened state by default and non closed.

2) When it goes in lock mode it should be close the 0-1 contacts in the shelly. we can leave the inching time of the json to 3 sec. So after that time it can returns to default Mode (opened)

This is the json I used, how can I set it for showing the lock opened in homekit by default?

{"a":[{"0":{"r":[{"g":4,"v":1,"i":0.5}]},"1":{"r":[{"g":4}]},"t":4,"i":3,"b":[{"g":5,"p":0,"i":1,"t":0}],"s":5}]}

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.