Using the native Home Assistant integration sometimes misses a command and I’d like to hear whether somebody knows whether using MQTT is a more stable experience.
Sometimes I need to send the power off (or on) command twice to actually turn off/on the lights and home assistant will still wrongly show it as on/off.
I’ve had a similar experience. (wemos d1 r2) Not turning on or off, commands not being accepted, strip dimming randomly, esp device resetting randomly, state being displayed incorrectly in HA, etc. For me the issue seemed to be induced interference from a high voltage power cable being too close to data line. Maybe. When I isolated my esp device, led strip and power supply from any and all other cables lying close by the problem seemed to disappear. In future, for permanent installations at least, I think I’ll be using shielded cable and grounding the shielding.
Sorry, I don’t know if using mqtt will help. I use service calls in HA to control almost all attributes of wled integration and I have not had any issues yet, aside from the interference issue.
Haven’t tried mqtt yet. I will probably do so soon though as I cannot set secondary or tertiary colors, or toggle either mirror effect or preset cycle/playlist via service calls. I know secondary and tertiary colors can be controlled using mqtt but I’m not sure about mirror effect and preset cycle/playlist. When I do try mqtt though I will try and see whether there is a difference.
Regarding the Wifi, my connection to wled device is not particularly great but it still works without issue.
Even the sync function between wled devices works correctly and they both have a fairly weak signal.
Your wemos d1 mini is very close to router so the cause shouldn’t be a bad Wifi connection. So maybe the problem is something completely different. Have you checked the HA log for any error messages after seeing the unexpected behavior? If there are that may give a clue as to what the issue is. Maybe try removing and re-adding the wled device on integrations page. Could be the DHCP on your router keeps issuing different IP addresses to the device for some reason. You can set a static IP in wled web ui. Or, if you prefer, set a reserved address for the device on the router itself.
Sorry for the late reply and thanks for your input. Please let me know when you tried mqtt (and how you set it up would be great too ).
I gave the wemos a static IP. I think your initial idea that it was power was very good because I have two smart plugs very close to the wemos and these plugs already gave me issue with some other devices (a radio chip that had power issues for 10 min once in a while when I switched power via the smart plugs.). I’ll have a look into that, thanks!