devWaves / SwitchBot-MQTT-BLE-ESP32

Allows for multiple SwitchBot bots and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Temperature, Motion, Contact sensors
MIT License
549 stars 68 forks source link

Show states after HA restart and other small enhancements #11

Closed HardcoreWR closed 3 years ago

HardcoreWR commented 3 years ago
Changed lastwill to lowercase offline and publish online on boot
Added lastwill topic as availability_topic for MQTT configuration
Added hostname to web interface
Changed root web interface to also show the upload page
Modified the upload page a little bit, showing a table (from the login page) and a fancy progressbar for the upload
Added the esp hostname in the main ESPMQTTTopic
Retain state and mqtt config messages

Feel free to revert the changes for the login page. I "disabled" that and just put the upload page in its place because I never use it anyway.

devWaves commented 3 years ago

I removed mqtt_client_name since host is a unique name for the ESP32. We only need one of them I noticed my router was finding the mqtt_client_name as the host value. The MQTT library must set the host value also

I also gave the option if people want a login page, it is disabled by default