Snips Led Control

led
leds
hack
respeaker
respeaker-2

#1

An easy way to get any leds working on your satellites or main units

Snips Led Control

This project started as a simple support for respeakers on raspberry, an easy way where nothing was needed to have your respeaker leds shine when Snips was interacting. No settings needed, everything was loading by itself and it would simply work

Today, it’s still as simple as before but goes way behond! It is built so that support for other hardware can easily be implemented. Its full list of arguments makes it fully customisable by user even without knowledge. And for more advanced users, a custom led template is at disposal to give life to your dream light shows!

Release v1.7.1 - Devil’s around the corner


Flash Led Matrix
#2

Just installed on a pi3B+, doesn’t work at all, absolutly no led, nothing.
Snips respeaker at least had the leds sometimes, and testing with the skill python script leds actually works.
Have rebooted, tried:

sudo systemctl daemon-reload
sudo systemctl start snipsledcontrol

But nothing


#3

service log:

oct. 16 22:05:04 salle python[480]: Starting Snips Led Control
oct. 16 22:05:04 salle python[480]: Initializing SnipsLedControl
oct. 16 22:05:04 salle python[480]: Loading configurations
oct. 16 22:05:04 salle python[480]: Mqtt server set to localhost
oct. 16 22:05:04 salle python[480]: ClientId set to default@mqtt
oct. 16 22:05:04 salle python[480]: Snips Led Control started

But my master (I have satellite) is not default.

I edited models/SnipsLedControl.py accordingly(self._mqttServer / self._me) but still nothing (journal now ok)


#4

There’s nothing to edit, except for the service itself. Did you enable SPI interface?


#5

your python script didn’t find the right params for my master. So I add to edit the py file. After that the snipsledcontrol log was ok, but still no Leds.

Yes spi enabled, as said leds works with other python scripts to test


#6

Ok, after some discussions on discord and a few commits later:

Snips Master (Rpi3B+ / respeaker 2 mic pi Hat) : works like a charm !
Snips Satellite (Rpi0WH / respeaker 2 mic pi Hat) : works like a charm !

when iddle, all leds are off.
ideally I would like a small center fixed blue as iddle, and the possibility to turn iddle=all off at night and back iddle=middle fixed blue at day. Which would need two commandes, to be run via ssh by jeedom.

Great works, so simple to install, and works !

:smiley::wink:


#7

:slight_smile:

For the idle it’s possible. You’d just need to adapt the custom pattern to your needs :slight_smile:


#8

Just added idle to the repo


#9

Strange is that it’s not always off. Actually it is center blue with little animation like a smooth respiration. Nice !


#10

ahah, didn’t found the iddle state !! Now it is !


#11

Would that help you? :slight_smile:


#12

isn’t custompattern file enough ?

Or we should restart the service with different pattern ? to get nightMode / DayMode ?


#13

of course it’s enough, but this gives you a possibility to override only one pattern by argument. Night/Day mode is something you’d need to add, as this is jsut reading the snips mqtt messages. Restarting the service with different pattern setting or individual settings would do a good day/night mode, yes


#14

Not sure patterns in command are necessary.

Thinking about it, I can simply stop the service in the evening, and restart it in the morning. Easy enough.

Will try to modify google pattern to get a slow smooth middle blue led animation like a respiration when iddle (doing nothing, waiting for hotword)
Even if I don’t really see how animation are done, passing which numpy for which led etc.


#15

Don’t mod google, use custom, it’s a copy of the google one, so you have a working backup ^^


#16

Yes sure, but I have no clue how to define which led, color, brightness …


#17

Still, much cleaner now, and actually fixed… It wasn’t working properly :slight_smile:

How to set the leds… Well, numpy is pretty hard


#18

Great project, thanks for sharing.
Do you have any plans on supporting the USB Respeaker Microfon Arary V2?


#19

Thanks!

I can support whatever, the only thing is, I don’t have your Respeaker. Contact me on discord so we can see


#20

Hi,

I have a matrix voice, do you think your app could work with it ? For the moment i use this https://github.com/Romkabouter/matrix_hotword but it light all the led and it’s not enough customisable… for me :stuck_out_tongue: