Skip to content

Inconsistent command processing with MQTT #891

@wawa79

Description

@wawa79

Hi,
I am troubleshooting inconsistent command processing on my ESP8266 (nodemcuV3)+nRF24L01 when sending commands to grouped devices using MQTT (from openHAB).
When sending a command to one group using MQTT, only some of the bulbs paired process the command properly. I need to send the command 3 to 5 times for all bulbs of the group to be in-sync.
My radio settings have been "optimized" (I went through the troubleshooting guide). The issue barely never happens when controlling the lightbulbs and groups from the web UI : all is reliable and reactive. So it does not seem to be a radio-related issue (at least not directly)

I have 7 devices arranged in groups :
1 floor lighting group using 3 milight RGB-CCT LED-strips controllers,
2 ceiling lighting group using 2 milight RGB-CCT LED-strips controllers and 1 milight RGB-CCT spotlight (that are also controlled independently)
1 RGB-CCT milight LED-strip controller for spotlights of upper furnitures

All devices are paired and grouped on relevant channels with aliases (but using the raw Ids in my commands).

I troubleshooted MQTT traffic with a MQTT sniffer as I suspected openHAB or my complex control logic to flood the device asynchroneously with multiple irrelevant MQTT commands.
But I could check that this is not the case: when sending one command to the openhab device referring to floor lighting group, one single MQTT message is sent to the channel Id of that group.
I tried various settings for parameters "MQTT state rate limit" and "MQTT debounce delay" without improvement.
Last I sent direct MQTT packets from a simple MQTT CLI and got the same erratic light behavior.

Do you have any idea of the reason of the issue and how to fix this? Feel free to suggest some additional testing, I will do it.

Thank you in advance!
Yann

/about

{"firmware":"milight-hub","version":"1.11.2","ip_address":"192.168.0.201","reset_reason":"Software/System restart","variant":"nodemcuv2","free_heap":18072,"arduino_version":"3.1.2","free_stack":912,"flash_used":48192,"flash_total":957314,"flash_pct_free":94,"queue_stats":{"length":0,"dropped_packets":0}}

/settings

{"admin_username":"","admin_password":"","ce_pin":4,"csn_pin":15,"reset_pin":0,"led_pin":-2,"radio_interface_type":"nRF24","packet_repeats":16,"http_repeat_factor":1,"auto_restart_period":0,"mqtt_server":"192.168.XXX.XXX:XXXX","mqtt_username":"XXXXX","mqtt_password":"XXXXX","mqtt_topic_pattern":"milight/commands/: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":"milight/client_status","simple_mqtt_client_status":true,"discovery_port":48899,"listen_repeats":3,"state_flush_interval":10000,"mqtt_state_rate_limit":1,"mqtt_debounce_delay":0,"mqtt_retain":false,"packet_repeat_throttle_sensitivity":0,"packet_repeat_throttle_threshold":0,"packet_repeat_minimum":8,"enable_automatic_mode_switching":false,"led_mode_wifi_config":"Fast toggle","led_mode_wifi_failed":"Fast blip","led_mode_operating":"Off","led_mode_packet":"Flicker","led_mode_packet_count":3,"hostname":"milight-hub","rf24_power_level":"LOW","rf24_listen_channel":"HIGH","wifi_static_ip":"192.168.0.201","wifi_static_ip_gateway":"192.168.0.10","wifi_static_ip_netmask":"255.255.255.0","packet_repeats_per_loop":4,"home_assistant_discovery_prefix":"","wifi_mode":"n","default_transition_period":500,"rf24_channels":["MID","HIGH"],"device_ids":[1,2,3,4,5,6,7,8,9,10,11],"gateway_configs":[],"group_state_fields":["state","level","hue","saturation","mode","color_temp","bulb_mode"]}```

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions