Snips Led Control

led
leds
respeaker
hack
respeaker-2

#122

To be honest I do not understand all of the python syntax. So I’ve built some on simple control and changed just the color for the different methods. As far as I can tell this is working as expected.
But in Idle mode I think the snips respeaker-skil is still active. Also the brightness of the leds seems to be conrolled by the respeaker-skil settings.

after deploying the assistant I stopped the skill service, renamed the respeaker-skill folder and restarted the service. Then restarted snipsledcontrol service,
Is there a way to disable the respeaker-skill?
In /skills/snips-skill-respeaker/config.ini maybe:

on_idle=false
on_listen=false
on_speak=false
to_mute=false
to_unmute=false

#!/usr/bin/env python

-- coding: utf-8 --

from models.LedPattern import LedPattern
import time
import threading

class CustomLedPattern(LedPattern):
def init(self, controller):
super(CustomLedPattern, self).init(controller)

	self._colors = {
		'blank' 	: (0, 0, 0),
		'blue'		: (0, 0, 255),
		'red'		: (60, 0, 0),
		'yellow'	: (255, 255, 0),
		'white'		: (255, 255, 255),
		'green'		: (0, 100, 0)

	}


def wakeup(self, direction=0):
	for i in range(self._numLeds):
		self._controller.setLedRGB(i, self._colors['blue'], brightness=1)
		self._controller.show()


def listen(self):
	pass


def think(self):
	for i in range(self._numLeds):
		self._controller.setLedRGB(i, self._colors['green'],  brightness=1)
		self._controller.show()


def speak(self):
	pass

def idle(self, *args):
	pass

def onError(self, *args):
	for i in range(self._numLeds):
		self._controller.setLedRGB(i, self._colors['red'],  brightness=1)
		self._controller.show()
	
def onSuccess(self, *args):
	for i in range(self._numLeds):
		self._controller.setLedRGB(i, self._colors['green'],  brightness=1)
		self._controller.show()


def off(self, *args):
	pass

def onButton1(self, *args):
	# When mic mute button pressed
	for i in range(self._numLeds):
		self._controller.setLed(i, 0, 0, 255, brightness=1)
	self._controller.show()


def onStart(self, *args):
	self._controller.wakeup()

#123

When installing SLC, did you install your hardware? It removes snips-respeaker-skill


#124

Version 1.7 is out


#126

@psycho: What can i do to get SLC running? Any hints?


#127

Open a bug report on my git repo to leave this topic clean please


#128

Ok. Thanks for your reply. Opened a issue on github.


#129
  • Respeaker Core V2 is now totally working, including auto install
  • Respeaker Mic array gets setVolume and setVADLed
  • Core V2 missing hex and vid parameters
  • Fixed Alexa pattern out of range led error
  • Subscribing to some missing events
  • Kiboost pattern in installer
  • Not refering to pi anymore in the installer but the logged in user
  • Hidding mqtt password in console
  • Fixed wrong core V2 interface
  • endFrame is configurable through arguments
  • Google AIY uses pin 25 by default
  • Added Matrix Creator