Snips Led Control

led
leds
respeaker
hack
respeaker-2

#62

is it possible to work around this error


#63

Maybe trying to update pip?


#64

python-pip is end version i have install python3-pip in more


#65

before new install i have update and upgrade raspdian and manually install python-pip and python3-pip but i have same problem with you’re installation


#66

If you update raspian you have to reinstall maxtrixvoice kernel you may need to do this :

sudo apt remove --purge matrixio-kernel-modules
sudo apt update
sudo apt upgrade

Look if all have been remove :

ls /lib/modules/4.14.30-v7+/kernel/drivers/mfd/ | grep matrixio

if here exists any file run:
sudo rm /lib/modules/4.14.30-v7+/kernel/drivers/mfd/matrixio*

ls /boot/overlays | grep matrixio

if here exists any file run:
sudo rm /boot/overlays/matrixio*

Then reboot your rasp

when it done

sudo apt install --reinstall raspberrypi-kernel-headers raspberrypi-kernel

Reboot again and then

sudo apt install matrixio-kernel-modules

Reboot, don’t forget to made a sam setup audio to select the matrix voice again


#67

A quick google gave me that:

pip --no-cache-dir install paho-mqtt. Edit the install.sh to that and try again


#68

even with paho i get this:

pi@snips-wohnzimmmer:~/snipsLedControl $ python main.py --hardware=respeaker4 --pattern=alexa --defaultBrightness=64
Traceback (most recent call last):
  File "main.py", line 19, in <module>
    rotatingHandler = logging.handlers.RotatingFileHandler(filename='./logs/{}-logs.log'.format(date), mode='a', maxBytes=100000, backupCount=5)
  File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 913, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 943, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: '/home/pi/snipsLedControl/logs/20181222-logs.log'

#69

The error is written… The log files are locked. Just sudo chown - R pi logs


#70

haha, i did “git clone”… instead of reading the wiki…

Installed it and it works great. Thanks a lot.

I have a satellite and a main snips. On the main snips it works great. On the satellite the LEDs stay turned on in idle.


#71

Did i do something wrong with my setup? Or is this normal?

Satellite is working perfectly but the LED are always all on.

In which mode is the satellite? Do i have to change the pattern for this pattern than?


#72

I don’t know what you use, how you start it, what argument, your setup. That’s why the github issue trackers asks for informations. It can be normal if you have idle turned on, it could be not normal if you haven’'t specified the correct mqtt server etc etc.


#73

Okay. I should have posted some more information. Sorry about that.

I installed snips the manual way. On my main snips its working perfectly fine with the alexa pattern.

I also installed a satellite Configuration B manually. Than I installed your Led Control.

All LEDs are always on. When I say “hey snips” the LED change. So i think mqtt should be setup fine but it does not see that it should change to idle.


#74

You do realize I don’t know what hardware you use, what pattern you want to use, what arguments you use etc etc


#75

I do.
I reinstalled Snips on my main Raspberry Pi now without SAM the manual way and now i do have the same problem on my main Pi.

If you need any further information please let me know and i will edit this here.

Hardware:

  1. I am Using a Raspberry Pi 3 B+ (main snips) and a Raspberry Pi 3 B (satellite snips).
  2. Both have a Respeaker 4-Mic Array on it
  3. I attached an USB + Headphonejack Speaker
  4. Original Raspberry PI Power Supply 2,5A

This is how i installed my main Pi.

Summary
sudo raspi-config
# changed location
# turned SPI on
# changed hostname to snips-wohnzimmer

# Install snips
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y dirmngr
sudo bash -c  'echo "deb https://raspbian.snips.ai/$(lsb_release -cs) stable main" > /etc/apt/sources.list.d/snips.list'
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D4F50CDCA10A2849
sudo apt-get update
sudo apt-get install -y snips-platform-voice

# Install soundcard
sudo apt-get install git
git clone https://github.com/respeaker/seeed-voicecard.git
cd seeed-voicecard
sudo ./install.sh
sudo reboot

# Changed the pcm.!default part to this:

pcm.!default {
    type asym
    playback.pcm {
        type plug
        slave.pcm "hw:0,0"
    }
    capture.pcm {
        type plug
        slave.pcm "hw:1,0"
    }
}

This is how i installed your LED Control

sudo wget https://gist.githubusercontent.com/Psychokiller1888/a9826f92c5a3c5d03f34d182fda1ce4c/raw/e24882e8997730dcf7a308e303b3b88001dbbfa1/slc_download.sh

sudo chmod +x slc_download.sh
sudo ./slc_download.sh


What device do you wish to control with SLC?
1) respeaker2                           5) neoPixelsWS2812RGB
2) respeaker4                           6) matrixvoice
3) respeakerMicArrayV2                  7) don't overwrite existing parameters
4) neoPixelsSK6812RGBW                  8) cancel
#? 2

What pattern do you want to use?
1) google
2) alexa
3) custom
4) cancel
#? 2

Do you need to install your respeaker4?
1) yes
2) no
3) cancel
#? 2

I also tried it with Do you need to install your respeaker4 with option 1) yes. both asound.conf files are working.

I will upload a video where you can see how the LEDs work.

My snips.toml looks like this

Summary
[snips-common]
# bus = "mqtt"
mqtt = "localhost:1883"
# audio = ["+@mqtt"]
# assistant = "/usr/share/snips/assistant"
# user_dir = "/var/lib/snips"

## MQTT authentication
# mqtt_username = ""
# mqtt_password = ""

## MQTT TLS configuration
# mqtt_tls_hostname = ""
# mqtt_tls_disable_root_store = false
# mqtt_tls_cafile = ""
# mqtt_tls_capath = ""
# mqtt_tls_client_cert = ""
# mqtt_tls_client_key = ""

[snips-analytics]

[snips-asr]
# no_fst_map = true
# beam_size = 8
# model = "/usr/share/snips/asr"
# audio = ["+@mqtt"]

[snips-asr-google]
# credentials = "/usr/share/snips/googlecredentials.json"
# audio = ["+@mqtt"]

[snips-audio-server]
# frame = 256
bind = "wohnzimmer@mqtt"
# mike = "Built-in Microphone"
# disable_playback = false

[snips-dialogue]
# resources = "/usr/share/snips/dialogue"
# session_timeout = 15
# lambda_timeout = 5
# retry_count = 3
# sound_feedback_disabled_default = false

[snips-hotword]
# model = "/usr/share/snips/hotword"
# hotword_id = "default"
sensitivity = "0.3"
audio = ["wohnzimmer@mqtt"]

[snips-injection]
#asr_model = "/usr/share/snips/asr"
#nlu_engine = "/usr/share/snips/nlu_engine"
#keep_nfirst = 3

[snips-nlu]

[snips-tts]
## Choose one tts provider (defaults to picotts)
# provider = "picotts"
# provider = "makerstts"
# provider = "customtts"
## customtts specific configuration (here configured to use picotts using the en-US language)
## available placeholder variables : %%OUTPUT_FILE%%, %%LANG%%, %%TEXT%%
# customtts = { command = ["pico2wave", "-w", "%%OUTPUT_FILE%%", "-l", "en-US", "%%TEXT%%"] }

My mosquitto.conf like that:

Summary
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /var/run/mosquitto.pid

persistence false
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

allow_anonymous true


#listener 1883 10.1.1.82
#listener 1883 127.0.0.1
connection_messages true
#log_type all
allow_anonymous true


connection snipsmqtt
address 10.1.1.85:1883
#remote_username HASS_MQTT_USER
#remote_password HASS_MQTT_PASSWORD
#remote_clientid snips
start_type automatic
topic hermes/dialogueManager/# in
topic hermes/asr/# in
topic hermes/hotword/# out

topic hermes/intent/# out
topic hermes/asr/# out
topic hermes/hotword/# out
topic hermes/nlu/# out

#76

Does SLC boot automatically? Are you sure you don’t have snips-respeaker-skill installed? Check if there’s any error in /var/log/syslog and check the information. Stop slc service

sudo systemctl stop snipsLedControl and manually start it with python main.py --hardware=respeaker4 --mqttServer=localhost --pattern=alexa and give me the output


#77

New update, version 1.6, fixing some led id out of range on Google pattern and added support for respeaker core v2


#78
  1. Does SLC boot automatically? - when i use ‘sudo reboot’ the leds work like in the video.

  2. How can i find out if snips-respeaker-skill is installed?

    pi@snips-wohnzimmer:~ snips-respeaker-skill -v -bash: snips-respeaker-skill: command not found pi@snips-wohnzimmer:~ snips-respeaker-skill --v
    -bash: snips-respeaker-skill: command not found

  3. Here is the last part of the log:

Summary
Dec 26 14:06:55 snips-wohnzimmer systemd[1]: snips-nlu.service: Unit entered failed state.
Dec 26 14:06:55 snips-wohnzimmer snips-audio-server[963]: ERROR:snips_audio_server: Could not start MQTT client on localhost:1883
Dec 26 14:06:55 snips-wohnzimmer snips-audio-server[963]:  -> caused by: Connection refused (os error 111)
Dec 26 14:06:55 snips-wohnzimmer systemd[1]: snips-nlu.service: Failed with result 'exit-code'.
Dec 26 14:06:55 snips-wohnzimmer systemd[1]: snips-audio-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:06:55 snips-wohnzimmer systemd[1]: snips-audio-server.service: Unit entered failed state.
Dec 26 14:06:55 snips-wohnzimmer systemd[1]: snips-audio-server.service: Failed with result 'exit-code'.
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: snips-asr.service: Service hold-off time over, scheduling restart.
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: Stopped Snips ASR.
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: Started Snips ASR.
Dec 26 14:06:56 snips-wohnzimmer snips-asr[974]: ERROR:snips_asr: Could not start MQTT client on localhost:1883
Dec 26 14:06:56 snips-wohnzimmer snips-asr[974]:  -> caused by: Connection refused (os error 111)
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: snips-asr.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: snips-asr.service: Unit entered failed state.
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: snips-asr.service: Failed with result 'exit-code'.
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Service hold-off time over, scheduling restart.
Dec 26 14:06:56 snips-wohnzimmer systemd[1]: Stopped Snips Led Control.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-tts.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-analytics.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-hotword.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-dialogue.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-nlu.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-audio-server.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Stopped Snips Audio Server.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Started Snips Audio Server.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Started Snips Led Control.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Stopped Snips NLU.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Started Snips NLU.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Stopped Snips Dialogue.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Started Snips Dialogue.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Stopped Snips Hotword.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Started Snips Hotword.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Stopped Snips Analytics.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Started Snips Analytics.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Stopped Snips TTS.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: Started Snips TTS.
Dec 26 14:07:00 snips-wohnzimmer snips-audio-server[983]: ERROR:snips_audio_server: Could not start MQTT client on localhost:1883
Dec 26 14:07:00 snips-wohnzimmer snips-audio-server[983]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:00 snips-wohnzimmer snips-dialogue[986]: ERROR:snips_dialogue: Could not start MQTT client on localhost:1883
Dec 26 14:07:00 snips-wohnzimmer snips-dialogue[986]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:00 snips-wohnzimmer snips-tts[989]: ERROR:snips_tts: Could not start MQTT client on localhost:1883
Dec 26 14:07:00 snips-wohnzimmer snips-tts[989]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:00 snips-wohnzimmer snips-analytics[988]: ERROR:snips_analytics: Could not start MQTT client on localhost:1883
Dec 26 14:07:00 snips-wohnzimmer snips-analytics[988]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-audio-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-audio-server.service: Unit entered failed state.
Dec 26 14:07:00 snips-wohnzimmer snips-nlu[985]: ERROR:snips_nlu: Could not start MQTT client on localhost:1883
Dec 26 14:07:00 snips-wohnzimmer snips-nlu[985]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-audio-server.service: Failed with result 'exit-code'.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-dialogue.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-dialogue.service: Unit entered failed state.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-dialogue.service: Failed with result 'exit-code'.
Dec 26 14:07:00 snips-wohnzimmer snips-hotword[987]: ERROR:snips_hotword: Could not start MQTT client on localhost:1883
Dec 26 14:07:00 snips-wohnzimmer snips-hotword[987]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-analytics.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-analytics.service: Unit entered failed state.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-analytics.service: Failed with result 'exit-code'.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-tts.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-tts.service: Unit entered failed state.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-tts.service: Failed with result 'exit-code'.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-nlu.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-nlu.service: Unit entered failed state.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-nlu.service: Failed with result 'exit-code'.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-hotword.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-hotword.service: Unit entered failed state.
Dec 26 14:07:00 snips-wohnzimmer systemd[1]: snips-hotword.service: Failed with result 'exit-code'.
Dec 26 14:07:00 snips-wohnzimmer python[984]: Starting Snips Led Control
Dec 26 14:07:00 snips-wohnzimmer python[984]: Initializing SnipsLedControl
Dec 26 14:07:00 snips-wohnzimmer python[984]: Loading configurations
Dec 26 14:07:00 snips-wohnzimmer python[984]: Loaded 8 hardware references
Dec 26 14:07:00 snips-wohnzimmer python[984]: - Mqtt server set to localhost
Dec 26 14:07:00 snips-wohnzimmer python[984]: - Mqtt port set to 1883
Dec 26 14:07:00 snips-wohnzimmer python[984]: - Client id set to wohnzimmer
Dec 26 14:07:00 snips-wohnzimmer python[984]: - Hardware set to ReSpeaker 4
Dec 26 14:07:00 snips-wohnzimmer python[984]: - Using alexa as pattern with 12 leds
Dec 26 14:07:00 snips-wohnzimmer python[984]: Initializing leds controller
Dec 26 14:07:08 snips-wohnzimmer systemd[922]: Time has been changed
Dec 26 14:07:08 snips-wohnzimmer systemd[1]: Time has been changed
Dec 26 14:07:08 snips-wohnzimmer systemd-timesyncd[257]: Synchronized to time server [2001:4ba0:ffa4:3d2:5:199:135:170]:123 (2.debian.pool.ntp.org).
Dec 26 14:07:08 snips-wohnzimmer systemd[1]: apt-daily-upgrade.timer: Adding 18min 12.183711s random time.
Dec 26 14:07:08 snips-wohnzimmer systemd[1]: apt-daily.timer: Adding 4h 27min 40.421410s random time.
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: snips-asr.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: Stopped Snips ASR.
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: Started Snips ASR.
Dec 26 14:07:09 snips-wohnzimmer snips-asr[1011]: ERROR:snips_asr: Could not start MQTT client on localhost:1883
Dec 26 14:07:09 snips-wohnzimmer snips-asr[1011]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: snips-asr.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: snips-asr.service: Unit entered failed state.
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: snips-asr.service: Failed with result 'exit-code'.
Dec 26 14:07:09 snips-wohnzimmer python[984]: Couldn't connect to mqtt, aborting
Dec 26 14:07:09 snips-wohnzimmer python[984]: Traceback (most recent call last):
Dec 26 14:07:09 snips-wohnzimmer python[984]:   File "main.py", line 113, in <module>
Dec 26 14:07:09 snips-wohnzimmer python[984]:     main()
Dec 26 14:07:09 snips-wohnzimmer python[984]:   File "main.py", line 99, in main
Dec 26 14:07:09 snips-wohnzimmer python[984]:     slc = SnipsLedControl(args)
Dec 26 14:07:09 snips-wohnzimmer python[984]:   File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 122, in __init__
Dec 26 14:07:09 snips-wohnzimmer python[984]:     self._mqttClient = self.connectMqtt()
Dec 26 14:07:09 snips-wohnzimmer python[984]:   File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 163, in connectMqtt
Dec 26 14:07:09 snips-wohnzimmer python[984]:     self.onStop()
Dec 26 14:07:09 snips-wohnzimmer python[984]:   File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 135, in onStop
Dec 26 14:07:09 snips-wohnzimmer python[984]:     self._ledsController.onStop()
Dec 26 14:07:09 snips-wohnzimmer python[984]:   File "/home/pi/snipsLedControl_v1.5/models/LedsController.py", line 409, in onStop
Dec 26 14:07:09 snips-wohnzimmer python[984]:     self._animationThread.join(timeout=2)
Dec 26 14:07:09 snips-wohnzimmer python[984]:   File "/usr/lib/python2.7/threading.py", line 929, in join
Dec 26 14:07:09 snips-wohnzimmer python[984]:     raise RuntimeError("cannot join thread before it is started")
Dec 26 14:07:09 snips-wohnzimmer python[984]: RuntimeError: cannot join thread before it is started
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Unit entered failed state.
Dec 26 14:07:09 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Failed with result 'exit-code'.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-audio-server.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-hotword.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-nlu.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-tts.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-analytics.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-dialogue.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Stopped Snips Dialogue.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Started Snips Dialogue.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Stopped Snips Analytics.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Started Snips Analytics.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Stopped Snips TTS.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Started Snips TTS.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Stopped Snips NLU.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Started Snips NLU.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Stopped Snips Hotword.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Started Snips Hotword.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Stopped Snips Audio Server.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: Started Snips Audio Server.
Dec 26 14:07:13 snips-wohnzimmer snips-analytics[1023]: ERROR:snips_analytics: Could not start MQTT client on localhost:1883
Dec 26 14:07:13 snips-wohnzimmer snips-analytics[1023]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:13 snips-wohnzimmer snips-dialogue[1022]: ERROR:snips_dialogue: Could not start MQTT client on localhost:1883
Dec 26 14:07:13 snips-wohnzimmer snips-dialogue[1022]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-analytics.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:13 snips-wohnzimmer snips-nlu[1025]: ERROR:snips_nlu: Could not start MQTT client on localhost:1883
Dec 26 14:07:13 snips-wohnzimmer snips-nlu[1025]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-analytics.service: Unit entered failed state.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-analytics.service: Failed with result 'exit-code'.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-dialogue.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-dialogue.service: Unit entered failed state.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-dialogue.service: Failed with result 'exit-code'.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-nlu.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-nlu.service: Unit entered failed state.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-nlu.service: Failed with result 'exit-code'.
Dec 26 14:07:13 snips-wohnzimmer snips-hotword[1026]: ERROR:snips_hotword: Could not start MQTT client on localhost:1883
Dec 26 14:07:13 snips-wohnzimmer snips-hotword[1026]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:13 snips-wohnzimmer snips-audio-server[1027]: ERROR:snips_audio_server: Could not start MQTT client on localhost:1883
Dec 26 14:07:13 snips-wohnzimmer snips-audio-server[1027]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-hotword.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-hotword.service: Unit entered failed state.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-hotword.service: Failed with result 'exit-code'.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-audio-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-audio-server.service: Unit entered failed state.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-audio-server.service: Failed with result 'exit-code'.
Dec 26 14:07:13 snips-wohnzimmer snips-tts[1024]: ERROR:snips_tts: Could not start MQTT client on localhost:1883
Dec 26 14:07:13 snips-wohnzimmer snips-tts[1024]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-tts.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-tts.service: Unit entered failed state.
Dec 26 14:07:13 snips-wohnzimmer systemd[1]: snips-tts.service: Failed with result 'exit-code'.
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: snips-asr.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: Stopped Snips ASR.
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: Started Snips ASR.
Dec 26 14:07:14 snips-wohnzimmer snips-asr[1040]: ERROR:snips_asr: Could not start MQTT client on localhost:1883
Dec 26 14:07:14 snips-wohnzimmer snips-asr[1040]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: snips-asr.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: snips-asr.service: Unit entered failed state.
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: snips-asr.service: Failed with result 'exit-code'.
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:14 snips-wohnzimmer systemd[1]: Stopped Snips Led Control.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-analytics.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-tts.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-audio-server.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-hotword.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-nlu.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-dialogue.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Stopped Snips Dialogue.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Started Snips Dialogue.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Stopped Snips NLU.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Started Snips NLU.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Stopped Snips Hotword.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Started Snips Hotword.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Stopped Snips Audio Server.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Started Snips Audio Server.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Started Snips Led Control.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Stopped Snips TTS.
Dec 26 14:07:18 snips-wohnzimmer snips-dialogue[1054]: ERROR:snips_dialogue: Could not start MQTT client on localhost:1883
Dec 26 14:07:18 snips-wohnzimmer snips-dialogue[1054]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Started Snips TTS.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Stopped Snips Analytics.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: Started Snips Analytics.
Dec 26 14:07:18 snips-wohnzimmer snips-nlu[1055]: ERROR:snips_nlu: Could not start MQTT client on localhost:1883
Dec 26 14:07:18 snips-wohnzimmer snips-nlu[1055]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-dialogue.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-dialogue.service: Unit entered failed state.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-dialogue.service: Failed with result 'exit-code'.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-nlu.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-nlu.service: Unit entered failed state.
Dec 26 14:07:18 snips-wohnzimmer snips-tts[1059]: ERROR:snips_tts: Could not start MQTT client on localhost:1883
Dec 26 14:07:18 snips-wohnzimmer snips-tts[1059]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-nlu.service: Failed with result 'exit-code'.
Dec 26 14:07:18 snips-wohnzimmer snips-analytics[1062]: ERROR:snips_analytics: Could not start MQTT client on localhost:1883
Dec 26 14:07:18 snips-wohnzimmer snips-analytics[1062]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-tts.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-tts.service: Unit entered failed state.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-tts.service: Failed with result 'exit-code'.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-analytics.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-analytics.service: Unit entered failed state.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-analytics.service: Failed with result 'exit-code'.
Dec 26 14:07:18 snips-wohnzimmer snips-hotword[1056]: ERROR:snips_hotword: Could not start MQTT client on localhost:1883
Dec 26 14:07:18 snips-wohnzimmer snips-hotword[1056]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-hotword.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:18 snips-wohnzimmer snips-audio-server[1057]: ERROR:snips_audio_server: Could not start MQTT client on localhost:1883
Dec 26 14:07:18 snips-wohnzimmer snips-audio-server[1057]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-hotword.service: Unit entered failed state.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-hotword.service: Failed with result 'exit-code'.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-audio-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-audio-server.service: Unit entered failed state.
Dec 26 14:07:18 snips-wohnzimmer systemd[1]: snips-audio-server.service: Failed with result 'exit-code'.
Dec 26 14:07:18 snips-wohnzimmer python[1058]: Starting Snips Led Control
Dec 26 14:07:18 snips-wohnzimmer python[1058]: Initializing SnipsLedControl
Dec 26 14:07:18 snips-wohnzimmer python[1058]: Loading configurations
Dec 26 14:07:18 snips-wohnzimmer python[1058]: Loaded 8 hardware references
Dec 26 14:07:18 snips-wohnzimmer python[1058]: - Mqtt server set to localhost
Dec 26 14:07:18 snips-wohnzimmer python[1058]: - Mqtt port set to 1883
Dec 26 14:07:18 snips-wohnzimmer python[1058]: - Client id set to wohnzimmer
Dec 26 14:07:18 snips-wohnzimmer python[1058]: - Hardware set to ReSpeaker 4
Dec 26 14:07:18 snips-wohnzimmer python[1058]: - Using alexa as pattern with 12 leds
Dec 26 14:07:18 snips-wohnzimmer python[1058]: Initializing leds controller
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: snips-asr.service: Service hold-off time over, scheduling restart.
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: Stopped Snips ASR.
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: Started Snips ASR.
Dec 26 14:07:19 snips-wohnzimmer snips-asr[1080]: ERROR:snips_asr: Could not start MQTT client on localhost:1883
Dec 26 14:07:19 snips-wohnzimmer snips-asr[1080]:  -> caused by: Connection refused (os error 111)
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: snips-asr.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: snips-asr.service: Unit entered failed state.
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: snips-asr.service: Failed with result 'exit-code'.
Dec 26 14:07:19 snips-wohnzimmer python[1058]: Couldn't connect to mqtt, aborting
Dec 26 14:07:19 snips-wohnzimmer python[1058]: Traceback (most recent call last):
Dec 26 14:07:19 snips-wohnzimmer python[1058]:   File "main.py", line 113, in <module>
Dec 26 14:07:19 snips-wohnzimmer python[1058]:     main()
Dec 26 14:07:19 snips-wohnzimmer python[1058]:   File "main.py", line 99, in main
Dec 26 14:07:19 snips-wohnzimmer python[1058]:     slc = SnipsLedControl(args)
Dec 26 14:07:19 snips-wohnzimmer python[1058]:   File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 122, in __init__
Dec 26 14:07:19 snips-wohnzimmer python[1058]:     self._mqttClient = self.connectMqtt()
Dec 26 14:07:19 snips-wohnzimmer python[1058]:   File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 163, in connectMqtt
Dec 26 14:07:19 snips-wohnzimmer python[1058]:     self.onStop()
Dec 26 14:07:19 snips-wohnzimmer python[1058]:   File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 135, in onStop
Dec 26 14:07:19 snips-wohnzimmer python[1058]:     self._ledsController.onStop()
Dec 26 14:07:19 snips-wohnzimmer python[1058]:   File "/home/pi/snipsLedControl_v1.5/models/LedsController.py", line 409, in onStop
Dec 26 14:07:19 snips-wohnzimmer python[1058]:     self._animationThread.join(timeout=2)
Dec 26 14:07:19 snips-wohnzimmer python[1058]:   File "/usr/lib/python2.7/threading.py", line 929, in join
Dec 26 14:07:19 snips-wohnzimmer python[1058]:     raise RuntimeError("cannot join thread before it is started")
Dec 26 14:07:19 snips-wohnzimmer python[1058]: RuntimeError: cannot join thread before it is started
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Main process exited, code=exited, status=1/FAILURE
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Unit entered failed state.
Dec 26 14:07:19 snips-wohnzimmer systemd[1]: snipsledcontrol.service: Failed with result 'exit-code'.
  1. pi@snips-wohnzimmer:~ $ sudo systemctl stop snipsLedControl
    Failed to stop snipsLedControl.service: Unit snipsLedControl.service not loaded.

  2. pi@snips-wohnzimmer:~ cd snipsLedControl_v1.5/ pi@snips-wohnzimmer:~/snipsLedControl_v1.5 python main.py --hardware=respeaker4 --mqttServer=localhost --pattern=alexa
    Traceback (most recent call last):
    File “main.py”, line 18, in
    handler = logging.FileHandler(filename=‘logs.log’, mode=‘w’)
    File “/usr/lib/python2.7/logging/init.py”, line 913, in init
    StreamHandler.init(self, self._open())
    File “/usr/lib/python2.7/logging/init.py”, line 943, in _open
    stream = open(self.baseFilename, self.mode)
    IOError: [Errno 13] Permission denied: ‘/home/pi/snipsLedControl_v1.5/logs.log’


the log in snips led control is showing this: looks like a mqtt problem as you said before?!

2018-12-26 14:13:48,129 [MainThread] - [CRITICAL] - Couldn't connect to mqtt, aborting
2018-12-26 14:13:57,713 [MainThread] - [INFO] - Starting Snips Led Control
2018-12-26 14:13:57,725 [MainThread] - [INFO] - Initializing SnipsLedControl
2018-12-26 14:13:57,726 [MainThread] - [INFO] - Loading configurations
2018-12-26 14:13:57,732 [MainThread] - [INFO] - Loaded 8 hardware references
2018-12-26 14:13:57,733 [MainThread] - [INFO] - - Mqtt server set to localhost
2018-12-26 14:13:57,734 [MainThread] - [INFO] - - Mqtt port set to 1883
2018-12-26 14:13:57,735 [MainThread] - [INFO] - - Client id set to wohnzimmer
2018-12-26 14:13:57,736 [MainThread] - [INFO] - - Hardware set to ReSpeaker 4
2018-12-26 14:13:57,737 [MainThread] - [INFO] - - Using alexa as pattern with 12 leds
2018-12-26 14:13:57,738 [MainThread] - [INFO] - Initializing leds controller
2018-12-26 14:13:58,618 [MainThread] - [CRITICAL] - Couldn't connect to mqtt, aborting
2018-12-26 14:14:08,218 [MainThread] - [INFO] - Starting Snips Led Control
2018-12-26 14:14:08,230 [MainThread] - [INFO] - Initializing SnipsLedControl
2018-12-26 14:14:08,231 [MainThread] - [INFO] - Loading configurations
2018-12-26 14:14:08,236 [MainThread] - [INFO] - Loaded 8 hardware references
2018-12-26 14:14:08,237 [MainThread] - [INFO] - - Mqtt server set to localhost
2018-12-26 14:14:08,238 [MainThread] - [INFO] - - Mqtt port set to 1883
2018-12-26 14:14:08,239 [MainThread] - [INFO] - - Client id set to wohnzimmer
2018-12-26 14:14:08,240 [MainThread] - [INFO] - - Hardware set to ReSpeaker 4
2018-12-26 14:14:08,241 [MainThread] - [INFO] - - Using alexa as pattern with 12 leds
2018-12-26 14:14:08,242 [MainThread] - [INFO] - Initializing leds controller
2018-12-26 14:14:09,149 [MainThread] - [CRITICAL] - Couldn't connect to mqtt, aborting

#79

I think the logs are pretty clear? Couldn’t connect to mqtt…

You can’t start manually because the logs are not writable by default. you can sudo chown -R pi logsin the SLC directory before starting SLC via command line again


#80

Do i have to edit my mosquitto config? Or where can i solve the mqtt error?

I had to use

sudo chown -R pi logs.log

Than i get this:

pi@snips-wohnzimmer:~/snipsLedControl_v1.5 $ python main.py --hardware=respeaker4 --mqttServer=localhost --pattern=alexa
Starting Snips Led Control
Initializing SnipsLedControl
Loading configurations
Loaded 8 hardware references
- Mqtt server set to localhost
- Mqtt port set to 1883
- Client id set to wohnzimmer
- Hardware set to ReSpeaker 4
- Using alexa as pattern with 12 leds
Initializing leds controller
Couldn't connect to mqtt, aborting
Traceback (most recent call last):
  File "main.py", line 113, in <module>
    main()
  File "main.py", line 99, in main
    slc = SnipsLedControl(args)
  File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 122, in __init__
    self._mqttClient = self.connectMqtt()
  File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 163, in connectMqtt
    self.onStop()
  File "/home/pi/snipsLedControl_v1.5/models/SnipsLedControl.py", line 135, in onStop
    self._ledsController.onStop()
  File "/home/pi/snipsLedControl_v1.5/models/LedsController.py", line 409, in onStop
    self._animationThread.join(timeout=2)
  File "/usr/lib/python2.7/threading.py", line 929, in join
    raise RuntimeError("cannot join thread before it is started")
RuntimeError: cannot join thread before it is started
pi@snips-wohnzimmer:~/snipsLedControl_v1.5 $

#81

You have to check your mqtt option, or server, because it clearly says it can’t connect to mqtt