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.76k stars 361 forks source link

Sonoff 4ch #512

Closed lfiocco closed 5 years ago

lfiocco commented 5 years ago

Sonoff 4ch, under ios13, everything appears as one device . Same is true for temp+switch. Can we split this up?

mafyata commented 5 years ago

It is same with th10/16(device type 6).

KevinMiddleton commented 5 years ago

You have to use the HAA firmware to get around this right now. My JSON for Sonoff 4CH R2 is:

{ "c":{ "l":13, "i":1 }, "a":[ {"0":{"r":[{"g":12,"v":0}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":0 ,"p":0},{"g": 0,"t":1}]}, {"0":{"r":[{"g":5, "v":0}]},"1":{"r":[{"g":5 ,"v":1}]},"b":[{"g":9 ,"p":0},{"g": 9,"t":1}]}, {"0":{"r":[{"g":4, "v":0}]},"1":{"r":[{"g":4 ,"v":1}]},"b":[{"g":10,"p":0},{"g":10,"t":1}]}, {"0":{"r":[{"g":15,"v":0}]},"1":{"r":[{"g":15,"v":1}]},"b":[{"g":14,"p":0},{"g":14,"t":1}]} ] }

lfiocco commented 5 years ago

I have not used HAA, can I install it on an a th16? Can it show temp?

RavenSystem commented 5 years ago

Improved Sonoff 4CH JSON: https://github.com/RavenSystem/esp-homekit-devices/wiki/HAA-Templates#sonoff-4ch-it-creates4-homekit-switches-and-gpio-0-button-can-be-used-to-enter-in-setup-mode-when-you-press-it-and-hold-more-that-10-seconds-for-the-first-30-seconds-since-boot

Partizan7676 commented 5 years ago

Try latest template for 4CH Pro rev2 - not work, template from KevinMiddleton - device works, but can not add it to home - nothing to add Home app - nothing appear when i try to add accessory.

KevinMiddleton commented 5 years ago

I have used the template with two 4CH R2 devices with complete success. The devices need to be on the same network as the home app to be found.

You may also need to reset the device under the JSON box if they were joined to something previously.

Partizan7676 commented 5 years ago

I know that. Thanks for your comment, but at this moment with your template device begin works and Home app cannot see it :( with RavenCore - works fine. BTW How with your template enter to Setup Mode ?

KevinMiddleton commented 5 years ago

I believe it is the standard - press L1 (button0) 10 times or more in the first 30 seconds after boot.

Not 100% sure why RavenCore works but HAA isn't working for you.

Partizan7676 commented 5 years ago

Already done. With 10 time press, also reset HomeKit ID - still device doesnt appear in HomeApp

KevinMiddleton commented 5 years ago

what if you install RavenCore, use EVE (setup section for device) to push the HAA via OTA? I did that for at least one of my devices as a test.

I also tested off mains with serial connection to make sure all was working before hooking up power / things to switch on and off.

Partizan7676 commented 5 years ago

Exactly do that like you, but result is same.

KevinMiddleton commented 5 years ago

apparently in iOS 13.2, there will be an option to split the device so it should appear as 4 again using RavenCore (saw this info on https://www.reddit.com/r/HomeKit/comments/dceaqd/it_worked_apple_finally_listened_to_us_and/)

lfiocco commented 5 years ago

Ya, saw that. It’s really messing up my camera setup. I have a fix now. Might keep it.

Thanks for your help