maximkulkin / esp-homekit-demo

Demo of Apple HomeKit accessory server library
MIT License
809 stars 233 forks source link

Buttons #255

Closed Kristian8606 closed 4 years ago

Kristian8606 commented 4 years ago

hello I built two thermostats with a display and three buttons from the examples of Maxim When I plug a device into the socket, one thermostat resets my configuration and I have to add it from the beginning. If I add buttons via three tasks, I have no reset, but I have too many tasks and I cannot connect every time.

AchimPieters commented 4 years ago

Did you made two identical thermostats? I believe that you need to make them unique.

Kristian8606 commented 4 years ago

I set the GPIO_INTTYPE_EDGE_NEG interruptions and the restart is gone and the thermostats are stable for now

67122458-86f59100-f1f6-11e9-829b-fd31034779b0

maximkulkin commented 4 years ago

You probably have your buttons active state different from what was set up in the code.

Kristian8606 commented 4 years ago

I use this connection scheme with your own example

ZirYP

Kristian8606 commented 4 years ago

previously i used your example for buttons with the same connection scheme but i got strange esp behavior and reset. am i doing something wrong?

AchimPieters commented 4 years ago

@Kristian8606 look at this: https://github.com/maximkulkin/esp-button

maximkulkin commented 4 years ago

Yeah, look at that. Obviously your case is “active low”, but that example was designed for “active high” case.