Page 1 of 1

Help w. Blink(1) & udev rules

Posted: Fri Jan 29, 2016 8:47 am
by danipolak
Hi there!
I’m pretty new with Raspberry Pi. I have some coding experience, but not much. I’m a fast learner though :)

Here’s my problem: I bought a ThingM Blink(1) USB light and I want it to work with IFTTT. But I can’t seem to make it work :(
I installed everything properly as described here ((https://github.com/todbot/blink1/wiki/R ... d-blink(1)) and I can make the Blink(1) work through the command line (https://github.com/todbot/blink1/wiki/C ... k1-tool%22). I set up multiple IFTTT rules (via my Mac) and imported this Python script (https://github.com/todbot/blink1/blob/m ... -simple.py) that is needed.

But here is where I run out of knowledge. It says I need to install udev rules (https://github.com/todbot/blink1/blob/m ... ink1.rules) in the comment on line six. But I have no clue on what this is, or how to do this. Could someone please tell me how to do this?!

I really hope someone can help me out! Thanks in advance!

Cheers, Dani

Re: Help w. Blink(1) & udev rules

Posted: Fri Jan 29, 2016 12:49 pm
by DirkS
danipolak wrote:But here is where I run out of knowledge. It says I need to install udev rules (https://github.com/todbot/blink1/blob/m ... ink1.rules) in the comment on line six. But I have no clue on what this is, or how to do this. Could someone please tell me how to do this?!
If you follow that lnk then you'll see instructions on how to do that.
I don't think you need to edit it, so you can skip the second line in that file

Re: Help w. Blink(1) & udev rules

Posted: Fri Jan 29, 2016 12:54 pm
by danipolak
Thanks for the reply!
I literally did what that said, but unfortunately 'sudo cp 51-blink1.rules /etc/udev/rules.d/' isn't working... :(

Re: Help w. Blink(1) & udev rules

Posted: Fri Jan 29, 2016 1:35 pm
by DirkS
danipolak wrote:Thanks for the reply!
I literally did what that said, but unfortunately 'sudo cp 51-blink1.rules /etc/udev/rules.d/' isn't working... :(
What do you mean by that? It's just a simple copy action.
Do you get an error message?

Re: Help w. Blink(1) & udev rules

Posted: Fri Jan 29, 2016 7:34 pm
by todbot
Hi, I belatedly sent this to Dani via email, but I figured it might be useful here for others. I suspect what is happening is either 'udevadm --reload-rules' isn't being run or the blink(1) device isn't being unplugged/replugged in to let Linux re-run its rules (since that only happens on device insertion).

I just tried out the below on a fresh checkout and build of the 'blink1' repository:

Code: Select all

$ cd blink1/linux
$ sudo cp 51-blink1.rules /etc/udev/rules.d/
$ sudo udevadm control --reload-rules
[unplug blink(1), plug it back in]
$ blink1-tool --green
$ blink1-tool --rgb FF00FF