-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control with arduino #6
Comments
well, start of by checking that you have indeed the proper wiring setup. After which, don't fiddle around on the Serial Monitor. if this works, than reverse engineer the Python script, as it mangles the UDP packages, prior to sending it to the aruino/msp430. The script will explain how to write the bytes into the serial buffer. You might like to improve the arduino side of things, to directly parse the packages (in which case, please share your modifications with the community! |
@VincentGijsen: Thanks you a lot for answering! I am sure that my wireing is right (I also wrote a simple "chat program" between my two nRF24L01 modules to check if they can communicate and they do). Sadly I'm not familiar with python (and I am using Win7). I installed Python 3.5.1 on windows and run cmd after this. ....\host\openmilid.py", line 109 So I dont know how to execute the python script neither how to point it to the serial port of my arduino (COM 2). You see I am already lost at the basics. I thank you a lot! |
Hi, Googleing, the first hit on This means your are using python 3 instead of two. which is basally ok, although Just modify the line I guess, after fixing this (and possibly other print statements), you may get an new exception that serial is unavailable. You first need to install after which you may execute in your cmd box: please note, i'm no python programmer whatsoever, google is occasionally my best friend |
Also if you are not a python programmer - your knowledge is far beyond mine :-) Traceback (most recent call last): The only thing I see here is wrong is the port direction as it is linux like as /dev/.. and should be something like this: import serial But as you see... I am completely lost with this... |
Hi Phil, when you look at the last lines of the Host app:
You will notice that this is a parser for the command line options. When you run the script with `--serial ``, it will try to connect to the port. The default is /dev/ttyUSB0, which refers to the first USB serial adapter in linux, for Windows, however you'll need to substitute this for COM1 / COM3, or whatever. Just consult your Device manager in Windows to check on with port your Arduino or serial adapter is registered. Probably you could try to use the same port the Arduino IDE uses. Also ensure that the `baudrate`` (which defaults to 115200) is the same, both for arduino, as for the python app. Should this still not work, you may uninstall Python 3, and install Python 2.7. Than install pip, and try the unmodified version of the python app (so revert any changes for the print statements) |
Hi, I know I'm replying to an age-old Issue, but it's still open and I was hoping to find an answer here as well. I just started out, got 2 Arduino's to message each other with RF24L01+ modules to verify I got the wiring right, and now I'm trying to get some packets on the screen - without any luck so far. The sketch is running on Arduino, the openmilid.py script is running and shows
And now I don't know what I'm supposed to do. Nothing I do with my lamps or controller shows any feedback on the screen. I installed some Milight apps, pointed them at my computer and started pressing and swiping some colors. The most I got there was:
Even if they did show something, I wouldn't know how to use that information to control my lights from a script. I would have thought I would be able to see messages my controller was sending so I could imitate them... Perhaps I misunderstood how this library is supposed to work, but I can't get it from the readmes or code. Are there perhaps any sort of "Hello World" instructions that get you to your very first command-line light switch? |
If I recall correctly, you have to pair each bulb to the address
configured. And your sync word (from recollection) cannot be everything.
Withe any byte value.
Was there also a sniffer example? Otherwise you can use your remote to
receive it's messages. The bulbs only listen , and don't send anything.
…On Wed, Oct 16, 2019, 00:05 Remi ***@***.***> wrote:
Hi, I know I'm replying to an age-old Issue, but it's still open and I was
hoping to find an answer here as well.
I just started out, got 2 Arduino's to message each other with RF24L01+
modules to verify I got the wiring right, and now I'm trying to get some
packets on the screen - without any luck so far. The sketch is running on
Arduino, the openmilid.py script is running and shows
# OpenMiLight Receiver/Transmitter starting
And now I don't know what I'm supposed to do. Nothing I do with my lamps
or controller shows any feedback on the screen. I installed some Milight
apps, pointed them at my computer and started pressing and swiping some
colors. The most I got there was:
# Error: outgoing packet complete. Press enter to send.
# Error: outgoing packet complete. Press enter to send.
Even if they did show something, I wouldn't know how to use that
information to control my lights from a script. Probably I misunderstood
how this library is supposed to work, but I can't get it from the readmes
or code. Are there perhaps any sort of "Hello World" instructions that get
you to your very first command-line light switch?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6?email_source=notifications&email_token=AAFQIY7I5BJFQIDGK4RYPJDQOY5EJA5CNFSM4BVBS23KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBKMAXA#issuecomment-542425180>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFQIYYQX2EHMTZERIHYHN3QOY5EJANCNFSM4BVBS23A>
.
|
Part of the problem is I don't know how to pair the bulbs to the address. I would have thought I would be able to sniff the controller signals and mimick them directly, pretending to be that controller, but that was the other problem - I was unable to read any signals. I had some progress though. Since I'm using a RGBW+CCT controller, I used the code from this pull request: #9. Now I can use Arduino's Serial Monitor to send The signals are quite random. Pressing Group 1 'on' several times results in this:
I tried copy-pasting one of the signals back in the Serial Monitor so it would send it, but the bulb doesn't respond to that. I tried sending it 3 times in a row after the unpaired bulb powered on but it did not pair. Also if I use 2 Arduinos with the same code in listening mode, one does pick up anything I paste in the Serial Monitor of the other. I also tried using this code: http://arduino-projects4u.com/milight-new-protocol/ in combination with the pull request from sgentle which is able to decode the packets into less random signals:
But I don't know how to use this information either. |
Could someone please tell me how I could control the bulbs with an Arduino and a nRF24L01 module?
I can only see this on every start of the arduino:
"# OpenMiLight Receiver/Transmitter starting"
How could I for example pair the "arduino remote" with the bulb as group2 ?
I think I have to send some thing like this:
B0 F2 EA 7D B0 15 F0
But how do I enter it correctly in the SerialMonitor to send it?
Any help is highly appreciated!
I cant also receive anything as I am using the bulb with my original remote.
I can switch to
"# Escaped to extended commands: r - Toggle receiver; Press enter to return to normal mode."
"# Now receiving"
But after this nothing happens if I press buttons on my remote.
Hope you have any ideas.
Thanks a lot!
The text was updated successfully, but these errors were encountered: