esp8266_milight_hub: MQTT not working in HomeAssistant

I can’t get the MQTT working with Home Assistant. I get the following error in the HomeAssistant logs. This happens when I add new alias in the milight interface.

Home Assistant log output:

Logger: homeassistant.components.mqtt.discovery
Source: components/mqtt/discovery.py:201
Integration: MQTT (documentation, issues)
First occurred: October 2, 2023 at 23:29:03 (74 occurrences)
Last logged: October 3, 2023 at 07:16:45

Unable to parse origin information from discovery message, got {'support_url': 'http://10.10.10.213'}

Setup information

HomeAssistant

Home Assistant 2023.9.3
Supervisor 2023.09.2
Operating System 10.5
Frontend 20230911.0 - latest

MQTT broker: Mosquitto broker (default settings, but created a user for it)

Current version: 6.3.1

Firmware version

1.11.0, didn’t try another firmware

Output of http://milight-hub.local/about

{
    "firmware": "milight-hub",
    "version": "1.11.0",
    "ip_address": "10.10.10.213",
    "reset_reason": "Power On",
    "variant": "nodemcuv2",
    "free_heap": 19584,
    "arduino_version": "3.1.2",
    "free_stack": 912,
    "flash_used": 10291,
    "flash_total": 957314,
    "flash_pct_free": 98,
    "queue_stats": {
        "length": 0,
        "dropped_packets": 0
    }
}

Output of http://milight-hub.local/settings

{
    "admin_username": "--------------",
    "admin_password": "--------------",
    "ce_pin": 4,
    "csn_pin": 15,
    "reset_pin": 0,
    "led_pin": -2,
    "radio_interface_type": "nRF24",
    "packet_repeats": 50,
    "http_repeat_factor": 1,
    "auto_restart_period": 0,
    "mqtt_server": "--------------:1883",
    "mqtt_username": "--------------",
    "mqtt_password": "--------------",
    "mqtt_topic_pattern": "milight/:device_id/:device_type/:group_id",
    "mqtt_update_topic_pattern": "",
    "mqtt_state_topic_pattern": "milight/states/:device_id/:device_type/:group_id",
    "mqtt_client_status_topic": "",
    "simple_mqtt_client_status": true,
    "discovery_port": 48899,
    "listen_repeats": 3,
    "state_flush_interval": 10000,
    "mqtt_state_rate_limit": 500,
    "mqtt_debounce_delay": 500,
    "mqtt_retain": true,
    "packet_repeat_throttle_sensitivity": 0,
    "packet_repeat_throttle_threshold": 200,
    "packet_repeat_minimum": 3,
    "enable_automatic_mode_switching": false,
    "led_mode_wifi_config": "Fast toggle",
    "led_mode_wifi_failed": "On",
    "led_mode_operating": "Slow blip",
    "led_mode_packet": "Flicker",
    "led_mode_packet_count": 3,
    "hostname": "milight-hub",
    "rf24_power_level": "MAX",
    "rf24_listen_channel": "HIGH",
    "wifi_static_ip": "",
    "wifi_static_ip_gateway": "",
    "wifi_static_ip_netmask": "",
    "packet_repeats_per_loop": 10,
    "home_assistant_discovery_prefix": "homeassistant",
    "wifi_mode": "n",
    "default_transition_period": 500,
    "rf24_channels": [
        "LOW",
        "MID",
        "HIGH"
    ],
    "device_ids": [
        4434
    ],
    "gateway_configs": [],
    "group_state_fields": [
        "state",
        "brightness",
        "color_temp",
        "bulb_mode",
        "computed_color",
        "effect",
        "device_id",
        "group_id",
        "color_mode"
    ]
}

Additional context

First time using this and it would be great if I get it working (if I find some time I will provide some updates to the wiki)

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 1
  • Comments: 28 (11 by maintainers)

Most upvoted comments

Gotcha. That’s likely the cause. Will try to reproduce and get back to you guys.

I believe this guy will fix the problem: https://github.com/sidoh/esp8266_milight_hub/pull/805

I tagged a beta release. Will publish that when the build finishes for you guys to try out.