Hi everyone, Have been puzzling for a while and can’t figure it out. What I would like is to add my Milight lamps to HA. This via an esp8266 board. It works perfectly via the ip address in the web browsers but cannot get it done in HA.
Can someone explain to me how I apply a REST API and what it looks like?
What I have done so far: added lamps with a Mi-Boxer, if I put this ip address in HA in light.yaml as below it works fine, I can control the lamp.
In order to use the Limitless component with ESPMH you need to define an UDP gateway and used that port in HA configuration. For Group number you need to use 1 to 4 (for FUT092) or 1 to 8 (for FUT089), not the device ID.
@Petrica, thank you for your reply.
I followed chris description but can’t get the lights to work via mqtt. As I understand it now you use either the UDP settings or the MQTT. Can you leave the fields of UDP empty? @sidoh , Chris thanks you for your replay on GitHub. I asked you to help me through teamviewer but that is actually not wanted on a forum. The power of a community is that everyone can learn from it. I apologize.
my question remains ‘open’. what I have now achieved is that I see the lamp in HA, I can even adjust the colours . But unfortunately the lamp does not respond to these commands. I can see in the log of the MQTT add-on (
what i have don this far, this is my lights.yaml
I can’t really much help you with autodiscovery as I set all my lights manually, however there are a few problems with your setup:
discovery_prefix in ESPMH should be homeassistent not homeassistant (if you set it correctly in HA, I don’t know if it is correct in German )
with manual settings command_topic in HA should be milight/0x22B/rgb_cct/1 (there is no “commands” in ESPMH topic and type should be rgb_cct not rgbw_cct).
One more thing: since you named both lights (the autoconfigured one and the manual light) as “testlamp”, can you check the Developer menu for all lights case they got renamed?
Sorry, but at this time I can only advice naming your manual light to something different from what you have at the moment. Unless you made changes that you did not posted, check the following and name it to something very different:
name: "testlamp"
Then check again that you did not entered any illegal characters.
You said manually and automatically. Does it helps if I delete the automatic one?
So I delete in configuration yaml:
discovery: true
discovery_prefix: homeassistent
And in the espMH
‘homeassistent’ at discovery_prefix