Open philipparndt opened 1 year ago
Hi! I think there are many similar applications that can serve as an example, such as PS5-MQTT or Docker2MQTT.
I think this part of esphome Wiki can help you better understand MQTT message conversion.
I hope I can help you with this information, if you need anything else, let me know and I'll be happy to help you.
I show you an example of the information extracted from MQTT Explore
{"power":"AWAKE","device_status":"online","activity":"idle"}
{"availability":[{"topic":"ps5-mqtt/name_device","value_template":"{{ value_json.device_status }}"}],"unique_id":"name_device_activity_ps5mqtt","state_topic":"ps5-mqtt/id_device","name":"PS5 activity","device":{"manufacturer":"Sony","model":"Playstation 5","name":"PS5","identifiers":["id_device"],"connections":[["ip","192.168.0.xx"]],"sw_version":"xxxxxxx"},"enabled_by_default":true,"json_attributes_topic":"ps5-mqtt/xxxxxx","value_template":"{{ value_json.activity }}"}
0.02
{"availability_topic":"docker2mqtt/Docker2MQTT/MIELE-GW/lwt","device":{"identifiers":["docker_Docker2MQTT_MIELE-GW"],"manufacturer":"docker2mqtt","model":"docker","name":"docker_Docker2MQTT_MIELE-GW"},"name":"docker_Docker2MQTT_MIELE-GW_memory_usage","payload_available":"Online","payload_not_available":"Offline","platform":"mqtt","state_topic":"docker2mqtt/Docker2MQTT/MIELE-GW/memory_usage/state","unique_id":"docker_Docker2MQTT_MIELE-GW_memory_usage"}
Surely most are better suited to "Sensor" but they do not have to be all "Sensor".
@philipparndt Hi, any news? Do you need help with more examples or to prove something?
Hi @cvc90 I'm currently low on time to implement this but I think the examples should help ;)
Add MQTT auto discovery, so that Home Assistant can detect the devices.
See: https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery