maximkulkin / esp-homekit-demo

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

Restarting the service from the program #422

Open pr200sd opened 3 years ago

pr200sd commented 3 years ago

Good day.

Is it possible to orbinize the restart of the service, without restarting esp32, for example, after erasing the data, I want to be able to pair with the phone again, now I am doing a power reset for this.

maximkulkin commented 3 years ago

No, it is not possible at the moment. Implementation is not hard, but I couldn't find any practical use case for this.

pr200sd commented 3 years ago

Got it, thanks for the answer. My use case is as follows: after removing the accessory on the phone and erasing the data in esp32, a new device cannot be added without restarting esp32.

maximkulkin commented 3 years ago

Then restart the device.

pr200sd commented 3 years ago

There are no problems to reboot the device, but my esp is used as a gateway for a multichannel relay and controls channels via modbus, https://youtu.be/7YfrBtO3Dos?t=144 and in some cases information will be lost and the relay will be reset. In principle, I have already taken into account this point and now all states are remembered before rebooting, so there are no problems.