Snips Led Control

led
leds
respeaker
hack
respeaker-2

#102

You are talking about sam. I know for a fact that sam does install the snips-respeaker-skill. SLC installer proposes to uninstall it if you choose to install your hardware. Maybe it’s that?


#103

It was not installed. I did it and its not working either.

Taskmanager in sam:

Taskmanager manual install


#104

still, try to cut the skill server sudo systemctl stop snips-skill-server


#105

Do you mean on the device installed with sam?


#106

On the devices that have problems with the leds, to see what is controlling your leds beside SLC


#107

Okay, going to try it. What do you think of killing services on the sam device … than we can see when it stops working :wink:


#108

When you are manually starting SLC, you are killing the service before right? Or you end up having it running twice… sudo systemctl stop snipsledcontrol


#109

Thank you for mentioning. YEs i do that


#110

You don’t happen to be on Discord, would be much better?..


#111

Just a second. I think i have an account.


#112

@Psycho It seems that “self._controller.clearLeds()” is not clearing the LEDStrip for me like before (pre 1.0 release). How would I disable all LEDs while in idle()? Could you point me in the rigth direction?
BTW, it works great with the respeak 2 mics pi hat :+1:


#113

Mmmh, on what hardware? On the respeaker 2? What version are you using? Are you on the master or on the released 1.6.1?


#114

I’m using the respeaker 2 mics-pi-hat on version 1.6.1.
It’s working on my respeaker mic array v2 though…

this is the idle () function I use:

	def idle(self):
		self._controller.clearLeds()

Update: I had to set the brightness to zero, to switch off the LEDs

self._controller.setLed(i, 0, 255, 0,0)


#115

Hi Psycho,

installed SLC on new Raspi3 with matrix Voice. Seems to Work first time, but it exits many times. In the log ist LED count error. Even when set the Ledcount to 18 in the service.

But really great job. I love it. Hope get it working. Here the log:

raspberrypi:/home/pi/snipsLedControl_v1.6.1# cat logs.log

2019-01-14 19:23:30,749 [MainThread] - [INFO] - Starting Snips Led Control v. 1.6.1
2019-01-14 19:23:30,764 [MainThread] - [INFO] - Initializing SnipsLedControl
2019-01-14 19:23:30,765 [MainThread] - [INFO] - Loading configurations
2019-01-14 19:23:30,772 [MainThread] - [INFO] - Loaded 9 hardware references
2019-01-14 19:23:30,773 [MainThread] - [INFO] - - Mqtt server set to localhost
2019-01-14 19:23:30,774 [MainThread] - [INFO] - - Mqtt port set to 1883
2019-01-14 19:23:30,775 [MainThread] - [INFO] - - Client id set to default
2019-01-14 19:23:30,776 [MainThread] - [INFO] - - Hardware set to Matrix Voice
2019-01-14 19:23:30,778 [MainThread] - [INFO] - - Using alexa as pattern with 18 leds
2019-01-14 19:23:30,779 [MainThread] - [INFO] - Initializing leds controller
2019-01-14 19:23:32,160 [MainThread] - [INFO] - Connected to data publisher with port 20024
2019-01-14 19:23:32,201 [MainThread] - [INFO] - Counted 18 leds on device
2019-01-14 19:23:32,202 [MainThread] - [INFO] - LED count obtained. Disconnecting from data publisher 20024
2019-01-14 19:23:32,218 [MainThread] - [INFO] - Snips Led Control started
2019-01-14 19:23:32,718 [Thread-1] - [WARNING] - Led number missmatch (18/18), aborting
2019-01-14 19:23:32,767 [Thread-1] - [WARNING] - Led number missmatch (18/18), aborting
2019-01-14 19:23:33,462 [Thread-1] - [WARNING] - Led number missmatch (18/18), aborting
2019-01-14 19:24:02,073 [Thread-1] - [WARNING] - Led number missmatch (18/18), aborting
2019-01-14 19:24:02,122 [Thread-1] - [WARNING] - Led number missmatch (18/18), aborting
2019-01-14 19:24:15,624 [Thread-1] - [WARNING] - Led number missmatch (18/18), aborting


#116

Funny, works for you and not others. We need to get in touch: https://github.com/Psychokiller1888/snipsLedControl/issues/22

Concerning the error, I think I know what it is, i’ll fix asap


#117

Hi totlino,

I’ve solve the mqtt connection issue in the control.service file.

ExecStart=/usr/bin/python main.py --mqttServer=127.0.0.1
I assume on my system it was related to IPV6


#118

I’ve installed latest version on a pi3+ with Respeaker4. Tried alexa, google and custom pattern. For some reason after starting the snipsledcontrol service the leds turn on, but it doesn’t react when using the hotword.

With the configuration below 1 led white is active and a 2nd led in blue, too. Does it mean that something else is controlling the board, too?

I wasn’t sure how to uninstall the respeaker skill, so I stopt the skill service, deleted the respeaker skill and restarted the service.

Jan 18 00:19:27 AUTOVOICE-1 python[9174]: Initializing SnipsLedControl
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: Loading configurations
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: Loaded 9 hardware references
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: - Mqtt server set to 127.0.0.1
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: - Mqtt port set to 1885
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: - Client id set to 0
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: - Hardware set to ReSpeaker 4
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: - Using alexa as pattern with 1 leds
Jan 18 00:19:27 AUTOVOICE-1 python[9174]: Initializing leds controller
Jan 18 00:19:28 AUTOVOICE-1 python[9174]: Snips Led Control started


#119

Can you stop the service and manually start it with debug info please? Client id set to 0 doesn’t sound good btw. Did you configure your snips.toml to that?

sudo systemctl stop snipsledcontrol
cd snipsLedControl_v1.6.1
sudo chown -R pi logs
python main.py --mqttServer=127.0.0.1 --hardware=respeaker4 --pattern=google --debug=True

#120

switched to Client ID: default, didn’t find a setting for it in the snips.toml.
workin! :grinning: tnx!
It seems the client ID was the issue!

log:

2019-01-18 13:02:44,208 [MainThread] - [INFO] - Starting Snips Led Control v. 1.6.1
2019-01-18 13:02:44,222 [MainThread] - [INFO] - Initializing SnipsLedControl
2019-01-18 13:02:44,223 [MainThread] - [INFO] - Loading configurations
2019-01-18 13:02:44,229 [MainThread] - [INFO] - Loaded 9 hardware references
2019-01-18 13:02:44,230 [MainThread] - [INFO] - - Mqtt server set to 127.0.0.1
2019-01-18 13:02:44,231 [MainThread] - [INFO] - - Mqtt port set to 1885
2019-01-18 13:02:44,231 [MainThread] - [INFO] - - Client id set to default
2019-01-18 13:02:44,232 [MainThread] - [INFO] - - Hardware set to ReSpeaker 4
2019-01-18 13:02:44,233 [MainThread] - [INFO] - - Using google as pattern with 12 leds
2019-01-18 13:02:44,234 [MainThread] - [INFO] - Initializing leds controller
2019-01-18 13:02:45,402 [MainThread] - [INFO] - Snips Led Control started
2019-01-18 13:03:02,343 [Thread-2] - [DEBUG] - On hotword triggered
2019-01-18 13:03:02,390 [Thread-2] - [DEBUG] - On listen triggered
2019-01-18 13:03:07,084 [Thread-2] - [DEBUG] - On think triggered
2019-01-18 13:03:07,087 [Thread-2] - [DEBUG] - On hotword toggle on triggered
2019-01-18 13:03:10,290 [Thread-2] - [DEBUG] - On hotword triggered
2019-01-18 13:03:10,293 [Thread-2] - [DEBUG] - On listen triggered
2019-01-18 13:03:15,002 [Thread-2] - [DEBUG] - On think triggered
2019-01-18 13:03:15,005 [Thread-2] - [DEBUG] - On hotword toggle on triggered


#121

The leds behaving correctly?