This will handle the 2nd update from the #18. With this change, the expander module will be able to detect a crash within the expander esp32. It will then unready itself until the expander esp32 is responding again.
Also, the handling of proxies is changed. Proxy initialization is tied to the expander module's state, and the proxy itself will update its ready flag based on the expander.
[x] added heartbeat handling
[x] possible to change is_ready on esp crash (expander & proxy)
Core has an "is_alive" call, that can be used to ping it
Expander logic on how proxies are initialized is changed: If a proxy is added, it switches to a "proxy adding" state, since it is not ready anymore.
If no proxy is active, the expander module will ask the expander esp every 10 seconds if it is still alive. If it is not answering in a 5-second window, it will switch into restarting state.
This will also unset all proxies.
The proxy module now directly uses the is_ready state of the corresponding expander module, to set its readiness.
This will handle the 2nd update from the #18. With this change, the expander module will be able to detect a crash within the expander esp32. It will then unready itself until the expander esp32 is responding again. Also, the handling of proxies is changed. Proxy initialization is tied to the expander module's state, and the proxy itself will update its ready flag based on the expander.