danipolak
Posts: 2
Joined: Fri Jan 29, 2016 8:43 am

Help w. Blink(1) & udev rules

Fri Jan 29, 2016 8:47 am

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

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

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

Fri Jan 29, 2016 12:49 pm

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

danipolak
Posts: 2
Joined: Fri Jan 29, 2016 8:43 am

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

Fri Jan 29, 2016 12:54 pm

Thanks for the reply!
I literally did what that said, but unfortunately 'sudo cp 51-blink1.rules /etc/udev/rules.d/' isn't working... :(

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

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

Fri Jan 29, 2016 1:35 pm

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?

todbot
Posts: 2
Joined: Fri May 10, 2013 10:40 pm

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

Fri Jan 29, 2016 7:34 pm

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

Return to “Beginners”