Skip to content
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

Execution problems #13

Open
john1158way opened this issue Nov 24, 2019 · 4 comments
Open

Execution problems #13

john1158way opened this issue Nov 24, 2019 · 4 comments

Comments

@john1158way
Copy link

So far I have:

Connected Arduino to an nRF24L01+ and validated the connectivity using the helpful information and code in the link below.

Re: Simple nRF24L01+ 2.4GHz transceiver demo
https://forum.arduino.cc/index.php?topic=421081.15

I then installed the Arduino code and added the libraries required by the sketch. note:downloading all the files into a folder named openmili is a requirement

I changed pins for CE and CSN definition to 9 and 10 respectively as that was the proven combination from the nRF24L01 tutorials referenced above

I ran the python script and found the error serial not defined and resolved that by installing pyserial. note:the script runs in python 2 and you have to install pyserial for your python 2 install as the defaults are now all to python3. if you need to run python 3 other issues will point you to some required changes to the python code

I started the arduino and checked the serial monitor showed the program starting
I started python and it said the serial port was busy so had to exit the serial monitor
I restarted the python script and it showed the start up message

I am stuck. I did not buy a remote or a bridge and I need to pair the light with the emulator and do not know process

@john1158way
Copy link
Author

I have also loaded the gateway code that utilizes Henryk's code but has everything in an all Arduino sketch that does not require the python code it is at https://github.com/madnerdorg/openlight
I ran it on two arduino's and if i force some sends into one they register on the other so communication is ok via radios really think i am down to figuring out the paring command to get the bulb communicating. if anyone has a pointer to good documentation on this it would be great

@john1158way
Copy link
Author

still struggling to pair. I have now started to analyze the code in an ESP8266 implementation of the hub to work out paring found here https://github.com/sidoh/esp8266_milight_hub/wiki/Pairing-new-bulbs

Instructions
Choose a Device ID arbitrarily and pair your device with it following these instructions:

Power off the bulb or lighting device. If it's a bulb, it's best to remove it from the socket entirely.
Enter your chosen Device ID into the "Device ID" field in the UI.
Choose a Group ID to pair with.
Supply power to the bulb or lighting device.
Within five seconds, click on the "Pair" button in the UI.
The light should flash on and off a few times to indicate success.
Appendix: Directionality
Except for some corner cases that can mostly be ignored (see #91), bulbs never communicate back to the hub. Pairing can therefore be thought of as assigning a Device ID to a lighting device, rather than a two-way handshake.

@john1158way
Copy link
Author

john1158way commented Dec 1, 2019

I do not have access to my hardware this weekend so continuing research into other arduino milight solutions and came across this site that claims to have used Henryk's work to create beginner friendly clode. http://fablab.ruc.dk/controlling-the-mi-light-from-arduino/

among other informaiton It included a reference to a raspberry pi implementation https://www.torsten-traenkner.de/wissen/smarthome/openmilight.php it made the point more clear about the need to repeat the command to get any reliablity with 30 times being the default number In my earlier experiments with having 2 arduinos on the commands were only being sent once.

@john1158way
Copy link
Author

well I was looking at the milight gateway project by Chris Mullins https://blog.christophermullins.com/2017/02/11/milight-wifi-gateway-emulator-on-an-esp8266/ the project sent me on detour to use platformio instead of Arduino IDE and I haven't really moved on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant