Here’s what I’m thinking. It might be possible to use NodeMCU to listen to what the remotes are sending over 2.4GHz and send it via UDP to Home Assistant, right? Has anyone thought about that? I think that would be amazing!
The only thing I’m curious about is how would I receive the UDP packets in Home Assistant and set the lights status?
I do know the RF-link component (also adruino + NRF24L01+ ) should be able to do this, and already picks up on the remote!!! Same costs, same effort, more functionality… it seems to me…
Unfortunately i lack the knowledge to implement it… Still hoping someone will get to it. Looks so close…
What you’re suggesting is certainly possible in theory, but not a feature of the current firmware.
re: rflink, it’s possible they’ve gotten around to implementing it, but I think I was the first to reverse the RF protocol for newer devices (there was some pretty heavy scrambling involved that took quite a bit of effort to crack), and I’m not sure others have gotten around to implementing it yet.
Do you think it would be possible to implement it in a future release? Just reversing the signal, picking up the signal from the remotes and sending it to HA via UDP or RestAPI.
It’d take a fair amount of work, but certainly possible. The signal can already be received and viewed, it’s just sort of a side-feature right now used to sniff remote IDs.
I have been happily using your project to emulate bridges and connect all my bulbs, having the status paired between Hass and my milight remotes would be great
Ah, sorry if I made it sound like I had active plans for an update. I think it’d be a nice new feature, and it’s definitely on the todo list, but I’m pretty distracted with other projects at the moment.
There’s a bit of work to do before HASS can boot with the correct state:
Support for retained MQTT messages
Stateful state aggregation. Currently MQTT updates are just forwarding parsed versions of 2.4 GHz packets. In order to give a subscribe a full idea of the state of the bulb (e.g., “on, white mode, brightness 50%, color temp 153 mireds”), it needs to aggregate these command packets into an overall state.
Also noticed the lights wont go out if being used only by MQTT and Hass reboot!
I’m not sure I’m following what you mean by this. Do you mean you can’t turn off lights from HASS after rebooting it?
Nothing like that, with the normal limitlessled component if the lights are on after Hass reboots they will turn out automatically as stated in the component page
INITIALIZATION & SYNCHRONIZATION
When starting Home Assistant, your LimitlessLED bulbs will be set to known default values. This ensures a consistent user interface and uninterrupted turning on/off. If you control your LimitlessLED lights via the MiLight mobile application or other means while Home Assistant is running, Home Assistant can not track those changes and you may observe unexpected behavior. This is due to a LimitlessLED limitation.
And using only MQTT it doesn’t happen anymore! life saver for when I’m playing around at night with wife around
Looking better then ever now!
RFLink Gateway was a nice was to fix for the state of the lights, it can read the remote signals but isnt able to control them and I had to create 4 automations per light to keep the state really sync
I’ve been using this for over a month and everything seems to be working perfectly, I can controll my bulbs through UDP packets, as a regular MiLight Bridge, that’s been working great, I can control my bulbs through MQTT as well… But it doesn’t update the state of the bulbs.
I flashed the latest firmware, 1.4.1. When I click the buton on the remote I can see the NodeMCU blink, so I guess the flashing went OK. But the GUI of the server stays the same… I looked through the Wiki page on GitHub.
I have no “listen_repeats” in the settings… And no “mqtt_update_topic_pattern”… I tried clicking the update Web UI button in the check for updates section, but this is what I get in the serial monitor:
EDIT:
I’ve read the blog post again. I’ve forgotten to update the index.html file. I’m having some trouble with using curl on Windows… But that should be OK. It’s still a bit surprising that I have to do this even though I uploaded the firmware with Atom and PlatformUI…? Strange.
Note: Unnecessary use of -X or --request, POST is already inferred.
Trying 192.168.43.139…
TCP_NODELAY set
Connected to 192.168.43.139 (192.168.43.139) port 80 (#0)
POST /data/web HTTP/1.1
Host: 192.168.43.139
User-Agent: curl/7.54.1
Accept: /
Content-Length: 32905
Expect: 100-continue
Content-Type: multipart/form-data; boundary=------------------------a4c961417c3b1154
Done waiting for 100-continue
< HTTP/1.1 404 Not Found
< Content-Type: text/plain
< Content-Length: 20
< Connection: close
< Access-Control-Allow-Origin: *
<
Not found: /data/web* Closing connection 0
Is there a way to check if it’s a problem with my curl or the NodeMCU?
@arielpod - the exception you’re seeing is because it’s trying to do some SSL stuff when there’s not enough RAM and it’s crapping out when the heap overshoots the stack.
I removed the GitHub/SSL dependency in 1.5.0-dev1. Instead of putting the webpage on SPIFFS, it’s built into a C++ byte array and compiled as part of the firmware. Makes it so you can’t update the webpage without updating the firmware, but I think this is a good tradeoff. Means UI will always be in sync with the firmware, and you won’t ever have to worry about uploading it.
I little bit of help please, I just finished building the HUB, I have a led strip connected to the remote channel 2. When I run the sniffer in the GUI I see device ID 128A, I go to the top of the GUI and I ADD 0x128A and pick channel 2 but it’s not doing anything, I see the esp controller flashes blue but that about it. it’s not controlling the strip, everything works with the remote.
Hi
Need a little help to get this to work.
I have tried both the image and building from source with the same output.
I can´t get pass this:
“Connect the device to your WiFi. Once it’s booted, you should be able to see an unsecured WiFi network named “ESPXXXXXX”, where XXXXXX is a random identifier. Connect to this network and follow the configuration wizard that should come up.”
After connecting to my ESP AP I have nothing… nothing is popping up so I can´t configure it for my WIFI.
I´m using a NodeMCU v3
Any ideas?
EDIT: Finally got the page to appear using my Samsung S7