Busy again with MQTT-Auto Discovery. This time the source is https://github.com/tillsteinbach/CarCon ... eassistant. CarConnectivity is a solution to integrate car brands like VW, Skoda and more into a home automation system, it supports MQTT as well as MQTT-AD. I cannot get the Auto Discovery part to work with Domoticz. Here is an example of a Auto Discovery config message:
Code: Select all
Topic name: mqttad_id3/device/carconnectivity-carconnectivity-0/config
Payload:
{
"device": {
"ids": "carconnectivity-0",
"name": "CarConnectivity",
"mf": "Till Steinbach and the CarConnectivity Community",
"sw": "0.7"
},
"origin": {
"name": "CarConnectivity",
"sw": "0.4",
"url": "https://github.com/tillsteinbach/CarConnectivity"
},
"cmps": {
"carconnectivity-0_volkswagen_healthy": {
"p": "binary_sensor",
"device_class": "running",
"name": "Volkswagen Connector Healthy",
"icon": "mdi:check",
"state_topic": "carconnectivity/0/connectors/volkswagen/healthy",
"payload_off": "False",
"payload_on": "True",
"unique_id": "carconnectivity-0_volkswagen_healthy",
"availability": [
{
"topic": "carconnectivity/0/plugins/mqtt/connection_state",
"payload_not_available": "disconnected",
"payload_available": "connected"
}
]
},
"carconnectivity-0_volkswagen_connection_state": {
"p": "sensor",
"device_class": "enum",
"name": "Volkswagen Connector Connection State",
"icon": "mdi:lan-connect",
"state_topic": "carconnectivity/0/connectors/volkswagen/connection_state",
"payload_off": "False",
"payload_on": "True",
"unique_id": "carconnectivity-0_volkswagen_connection_state",
"options": [
"disconnected",
"connecting",
"connected",
"disconnecting",
"error",
"unknown connection state"
],
"availability": [
{
"topic": "carconnectivity/0/plugins/mqtt/connection_state",
"payload_not_available": "disconnected",
"payload_available": "connected"
}
]
},
"carconnectivity-0_mqtt_healthy": {
"p": "binary_sensor",
"device_class": "running",
"name": "MQTT Plugin Healthy",
"icon": "mdi:check",
"state_topic": "carconnectivity/0/plugins/mqtt/healthy",
"payload_off": "False",
"payload_on": "True",
"unique_id": "carconnectivity-0_mqtt_healthy",
"availability": [
{
"topic": "carconnectivity/0/plugins/mqtt/connection_state",
"payload_not_available": "disconnected",
"payload_available": "connected"
}
]
},
"carconnectivity-0_mqtt_connection_state": {
"p": "sensor",
"device_class": "enum",
"name": "MQTT Plugin Connected",
"icon": "mdi:lan-connect",
"state_topic": "carconnectivity/0/plugins/mqtt/connection_state",
"payload_off": "False",
"payload_on": "True",
"unique_id": "carconnectivity-0_mqtt_connection_state",
"options": [
"disconnected",
"connecting",
"connected",
"disconnecting",
"error",
"unknown connection state"
],
"availability": [
{
"topic": "carconnectivity/0/plugins/mqtt/connection_state",
"payload_not_available": "disconnected",
"payload_available": "connected"
}
]
},
"carconnectivity-0_mqtt_homeassistant_healthy": {
"p": "binary_sensor",
"device_class": "running",
"name": "MQTT Home Assistant Plugin Healthy",
"icon": "mdi:check",
"state_topic": "carconnectivity/0/plugins/mqtt_homeassistant/healthy",
"payload_off": "False",
"payload_on": "True",
"unique_id": "carconnectivity-0_mqtt_homeassistant_healthy",
"availability": [
{
"topic": "carconnectivity/0/plugins/mqtt/connection_state",
"payload_not_available": "disconnected",
"payload_available": "connected"
}
]
},
"carconnectivity-0_webui_healthy": {
"p": "binary_sensor",
"device_class": "running",
"name": "WebUI Plugin Healthy",
"icon": "mdi:check",
"state_topic": "carconnectivity/0/plugins/webui/healthy",
"payload_off": "False",
"payload_on": "True",
"unique_id": "carconnectivity-0_webui_healthy",
"availability": [
{
"topic": "carconnectivity/0/plugins/mqtt/connection_state",
"payload_not_available": "disconnected",
"payload_available": "connected"
}
]
}
}
}
I tried both publishing this message with retained on and off, neither works.
I would expect some notification in the Domoticz log, and ultimately the created devices.
So far, no response seen in the log
However, if I change the component type in the topic name from 'device' to 'binary_sensor' (this is a random choice), there is a reaction visible in the log. No devices are created, but that is likely due to the fact that the payload does not properly reflect 'binary_sensor'.
Yet before digging further my ask:
As I understood (I could be wrong...) component type 'device' in the config message topic-name is used for config messages dealing with multiple device definitions in one config message. This seems allowed as per the Home Assistant MQTT-AD documentation . CoPilot however tells me this is not (yet?) supported by the Domoticz MQTT-AD client. If so, I will abandon this track using MQTT-AD and instead use 'normal' MQTT and something like MQTT-Mapper or NodeRed to translate the CarConnectivity MQTT messages to a format suitable for Domoticz (and manually create the devices)
Anyone have more details on this?