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

ESP32-S2 with complex MEPLHAA script no longer working in Apple Home after 12.13.2 update #2289

Closed Tellicious closed 2 months ago

Tellicious commented 2 months ago

Hello José,

I started updating some devices to 12.13.2 (both ESP32-S2 and ESP8266) and while I had no issues with ESP8266 and with 1 ESP32-S2, 2 other ESP32-S2 were no longer visibile in Apple Home.

It was possible to enter setup mode and all the functions were working properly, however it seemed like HomeKit connection was broken. I tried resetting HomeKit ID and rebooting several times with no luck. Rolling back to 12.13.1 made them working again without any change.

The 2 non-working devices have the very same script and it is much more complex than the one running on the working ESP32-S2 but the boards are the very same.

This is the script of the non-working ones (new lines and spaces are removed on the device):

{"c":{"io":[[[1,2,6,7,12,13,14,16,17,18,21,33,34,35,36,37,38,39,40],0],[[15],2],[[0],6,1],[[3],6]],"l":15,"i":0,"ic":[[9,8,100],[11,10,20,1,1]],"r":[{"n":10,"s":9600,"l":[15,20],"g":[5,4]}],"v":2,"o":0,"b":[[0,5]],"n":"HAA-AirQualitySoggiorno","ntp":"ntp1.inrim.it","tz":"CET-1CEST-2,M3.5.0/2,M10.5.0/3"},
"a":[
    {"t":15,"dt":[4,6],"es":[  
        {"t":10,"dt":1,"i":65},
        {"t":24},
        {"t":50,"n":2,"cd":3,"f":2.2,"dt":[0,35],"j":10},
        {"t":12,"i":10,"f1":[[3,1]]},
        {"t":95,"h":[2,1,10],"j":900,"x":1},
        {"t":95,"h":[3,0,10],"j":900,"x":1},
        {"t":95,"h":[3,1,10],"j":900,"x":1}
    ]},
    {"t":15,"h":0,"dt":[1,2,3,4]},
    {"t":80,"h":0,"n":21,"cd":6,"j":60,"tg":[2,1],"ic":[0,98],"in":[[0,33,177]],"it":[0.01,0,236,5],"dt":[2,0],"l":[400,5000],"y0":[{"v":0,"0":{"m":[[9,30001]]}},{"v":1000,"r":1,"0":{"m":[[2,1],[2,-1],[9,30003]]}},{"v":2000,"r":1,"0":{"m":[[2,1],[2,-1],[9,30005]]}}]},
    {"t":80,"h":0,"n":21,"cd":6,"j":60,"tg":[3,0],"ic":[0,98],"it":[0.01,0,236,5],"io":3,"dt":[2,0],"ff":0.00267033,"fo":-46,"l":[-10,60]},
    {"t":80,"h":0,"n":21,"cd":0.01,"j":60,"tg":[3,1],"ic":[0,98],"it":[0.01,0,236,5],"io":6,"dt":[2,0],"ff":0.0015259},
    {"t":80,"h":0,"n":24,"cd":0.01,"tg":[1,1],"pt":[["16110B",2]],"dt":[2,0],"l":[0,1000],"y0":[{"v":0,"0":{"m":[[9,10001]]}},{"v":13,"0":{"m":[[9,10002]]}},{"v":36,"0":{"m":[[9,10003]]}},{"v":86,"0":{"m":[[9,10004]]}},{"v":151,"0":{"m":[[9,10005]]}}]},
    {"t":80,"h":0,"n":20,"cd":0.01,"j":60,"tg":[1,2],"ic":[1,26,0],"io":1,"dt":[3,0],"ff":4.57,"y0":[{"v":0,"0":{"m":[[9,20001]]}},{"v":300,"0":{"m":[[9,20002]]}},{"v":650,"0":{"m":[[9,20003]]}},{"v":1000,"0":{"m":[[9,20004]]}},{"v":2000,"0":{"m":[[9,20005]]}}]},
    {"t":80,"h":0,"n":5,"cd":0.01,"dt":[0,9,1,2,9,2],"j":5,"y0":[{"v":-1000,"r":1,"0":{"c":[[9,2,9,4],[9,2,1,0]]}},{"v":0,"r":1,"0":{"c":[[9,1,9,4],[9,1,1,0]]}}]},
    {"t":80,"h":0,"n":5,"cd":0.01,"dt":[0,9,4,2,9,3],"j":5,"y0":[{"v":-1000,"r":1,"0":{"c":[[9,3,9,0]]}},{"v":0,"r":1,"0":{"c":[[9,4,9,0]]}}]},
    {"t":80,"h":0,"n":5,"cd":0.01,"dt":[0,9,0],"j":5,"y0":[{"v":0,"r":1,"0":{"u":[{"n":0,"v":"16110b000000070000036b000000120200000b3a"}]}},{"v":3,"r":1,"0":{"u":[{"n":0,"v":"16110b00000040000003ef0000003d010000005e"}]}},{"v":4,"r":1,"0":{"u":[{"n":0,"v":"16110b0000027700000a6200000259010000008d"}]}}]}
    ]
}
RavenSystem commented 2 months ago

Replace {"t":24} with {"t":24,"n":0} because default is "n":2, and you want a virtual temperature sensor.