"Could not create channels for channel group" for homeassistant auto-discovered MQTT Thing

I’m trying to implement my first MQTT HomeAssistant Thing and have run into some issues.

I’m already using MQTT for other things, so the broker is setup and working.

I’ve created this mmWave sensor and it’s successfully pushing data to MQTT, both config and data topics.

The topics I can see for config are as follows:

  • homeassistant/binary_sensor/mmwave-esp8266/mmwave_sensor/config
  • homeassistant/button/mmwave-esp8266/factory_reset_mmwmcu_mmwave-esp8266/config
  • homeassistant/button/mmwave-esp8266/restart_esp_mmwave-esp8266/config
  • homeassistant/number/mmwave-esp8266/distance/config
  • homeassistant/number/mmwave-esp8266/latency/config
  • homeassistant/number/mmwave-esp8266/sensitivity/config
  • homeassistant/switch/mmwave-esp8266/led/config
  • homeassistant/switch/mmwave-esp8266/mmwave_sensor/config
  • homeassistant/switch/mmwave-esp8266/use_safe_mode/config

These appear correct to me and the reading of the spec I did.

But I get a bunch of auto-discovery errors:

  2023-02-12 17:28:38.490 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel 'ESPswitchmmwave_5Fsensor#switch', because channel type 'mqtt:ESPswitchmmwave_5Fsensor_switch' could not be found.  
  2023-02-12 17:28:38.491 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel 'ESPbinary_5Fsensormmwave_5Fsensor#sensor', because channel type 'mqtt:ESPbinary_5Fsensormmwave_5Fsensor_sensor' could not be found.  
  2023-02-12 17:28:38.492 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel 'ESPswitchled#switch', because channel type 'mqtt:ESPswitchled_switch' could not be found.  
  2023-02-12 17:28:38.492 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel 'ESPswitchuse_5Fsafe_5Fmode#switch', because channel type 'mqtt:ESPswitchuse_5Fsafe_5Fmode_switch' could not be found.  
  2023-02-12 17:28:38.492 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channels for channel group 'ESPswitchmmwave_5Fsensor' for thing type 'mqtt:homeassistant_c45bbe60df53:4d0a5b9184:c45bbe60df53', because channel group type 'mqtt:ESPswitchmmwave_5Fsensor' could not be found.  
  2023-02-12 17:28:38.492 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channels for channel group 'ESPbinary_5Fsensormmwave_5Fsensor' for thing type 'mqtt:homeassistant_c45bbe60df53:4d0a5b9184:c45bbe60df53', because channel group type 'mqtt:ESPbinary_5Fsensormmwave_5Fsensor' could not be found.  
  2023-02-12 17:28:38.493 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channels for channel group 'ESPswitchled' for thing type 'mqtt:homeassistant_c45bbe60df53:4d0a5b9184:c45bbe60df53', because channel group type 'mqtt:ESPswitchled' could not be found.  
  2023-02-12 17:28:38.493 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channels for channel group 'ESPswitchuse_5Fsafe_5Fmode' for thing type 'mqtt:homeassistant_c45bbe60df53:4d0a5b9184:c45bbe60df53', because channel group type 'mqtt:ESPswitchuse_5Fsafe_5Fmode' could not be found.  
  2023-02-12 17:28:38.504 [WARN ] [ssistant.internal.DiscoverComponents] - HomeAssistant discover error: thing factory_reset_mmwmcu_mmwave-esp8266 component type is unsupported: button  
  2023-02-12 17:28:38.506 [WARN ] [ssistant.internal.DiscoverComponents] - HomeAssistant discover error: thing sensitivity component type is unsupported: number  
  2023-02-12 17:28:38.507 [WARN ] [ssistant.internal.DiscoverComponents] - HomeAssistant discover error: thing restart_esp_mmwave-esp8266 component type is unsupported: button  
  2023-02-12 17:28:38.508 [WARN ] [ssistant.internal.DiscoverComponents] - HomeAssistant discover error: thing distance component type is unsupported: number  
  2023-02-12 17:28:38.508 [WARN ] [ssistant.internal.DiscoverComponents] - HomeAssistant discover error: thing latency component type is unsupported: number

and I don’t have Channels in the thing for Distance / Latency or Sensitivity (which would be nice).

Some discover message content for:

homeassistant/binary_sensor/mmwave-esp8266/mmwave_sensor/config

{“dev_cla”:“motion”,“name”:“mmWave Sensor”,“stat_t”:“mmwave-esp8266/binary_sensor/mmwave_sensor/state”,“avty_t”:“mmwave-esp8266/status”,“uniq_id”:“ESPbinary_sensormmwave_sensor”,“dev”:{“ids”:“c45bbe60df53”,“name”:“mmwave-esp8266”,“sw”:“esphome v2022.12.8 Feb 12 2023, 16:48:54”,“mdl”:“d1_mini”,“mf”:“espressif”}}

homeassistant/number/mmwave-esp8266/distance/config

{“min”:0.15,“max”:9.45,“step”:0.15,“unit_of_meas”:“M”,“mode”:“box”,“name”:“distance”,“entity_category”:“config”,“stat_t”:“mmwave-esp8266/number/distance/state”,“cmd_t”:“mmwave-esp8266/number/distance/command”,“avty_t”:“mmwave-esp8266/status”,“uniq_id”:“ESPnumberdistance”,“dev”:{“ids”:“c45bbe60df53”,“name”:“mmwave-esp8266”,“sw”:“esphome v2022.12.8 Feb 12 2023, 16:48:54”,“mdl”:“d1_mini”,“mf”:“espressif”}}

I have the required transformation bindings installed. I’m not sure where to go from here, can anyone point me in the right direction?

Giving this a bump. Does anyone have any suggestions here?

A ‘button’ type truly seems unsupported when I look at the Binding’s source. But ‘Number’ should work - I’m really not sure why it isn’t.

I’ve been considering building something like this, too, but there don’t seem to be any tutorials for integrating with OpenHab.
I run all my rules in nodeRED instead of natively in OpenHab. So I might just forgo connecting it to OH and use homeassistant’s nodeRED integration in parallel with OH. I don’t currently have HA set up, so it seems silly to set it up for one device, but I’m not good enough with software development to try creating a direct connection from these devices to OH.

If you can’t get the MQTT working the way you intended, and you want your rules to ask live in OH, you might consider a somewhat “hacky” workaround:
Set up nodeRED, if you don’t have it running already. Install the homeassistant nodes and the openhab nodes. Then you can set up a flow that gets triggered by the mmwave device in HA, and sends a command to a virtual switch or similar in OH.