Unfortunately I can’t get it to work. If I just add the host address in the mqttany.yml it seems to run:
[20:37:31] openhabian@openhab:/opt/mqttany$ python3 mqttany/mqttany.py
2020-03-12 20:37:35,445 [INFO ] [mqttany ] MQTTany 0.10.2 starting
2020-03-12 20:37:35,593 [INFO ] [mqttany ] Process started successfully for module ‘mqtt’
2020-03-12 20:37:35,607 [INFO ] [mqttany.mqtt ] Connected to broker ‘192.168.175.98:1883’
^C
2020-03-12 20:38:39,108 [INFO ] [mqttany ] Module ‘mqtt’ unloaded
2020-03-12 20:38:39,109 [INFO ] [mqttany ] MQTTany stopped
But as soon as I try to activate the LED section I get errors I don’t understand:
[20:43:12] openhabian@openhab:/opt/mqttany$ python3 mqttany/mqttany.py
2020-03-12 20:43:24,183 [INFO ] [mqttany ] MQTTany 0.10.2 starting
2020-03-12 20:43:24,212 [ERROR] [mqttany ] Config file contains errors
2020-03-12 20:43:24,212 [ERROR] [mqttany ] Traceback (most recent call last):
2020-03-12 20:43:24,213 [ERROR] [mqttany ]
2020-03-12 20:43:24,213 [ERROR] [mqttany ] yaml.parser.ParserError: while parsing a block mapping
2020-03-12 20:43:24,213 [ERROR] [mqttany ] in “/etc/mqttany/mqttany.yml”, line 229, column 3
2020-03-12 20:43:24,214 [ERROR] [mqttany ] expected , but found ‘’
2020-03-12 20:43:24,214 [ERROR] [mqttany ] in “/etc/mqttany/mqttany.yml”, line 250, column 5
2020-03-12 20:43:24,214 [ERROR] [mqttany ]
######## LED Module ########
led:
### Module Topic
topic: '{module_name}'
### Animation Directory
# A directory or list of directories to look for additional animations in
#anim dir: []
### Startup Animation
# Animation to play when MQTTany loads
anim startup: 'test.array'
### Animation Frame Rate
# Frame rate for animations, you may need to decrease this for
# longer arrays or certain interface types.
#anim fps: 60
### Array Configuration
array_name: 'testarray'
### Output
# The interface to use for outputting data
# Available options are 'rpi' or 'sacn'
output: 'rpi'
### Array Topic
# Additional Substitutions:
# - {array_name} = will be replaced with the array definition section name
#topic: '{array_name}'
### Pixel Count
# The number of pixels in your array (not necessarily LEDs, see next option)
count: 71
### LEDs per Pixel
# Allows you to have more than one LED handled as a single pixel.
# Ex. A bulb with 3 LEDs in it can be treated as a single pixel in the array.
# Total number of LEDs in the array should be 'count' x 'leds per pixel'
#leds per pixel: 1
### Initial Brightness
# The initial brightness of the array, can be 0-255
#brightness: 255
### Color Order
# The byte order for the color data sent to the LEDs.
# See the 'test.order' animation for how to determine this
#color order: '{default}'
### Interface Specific Options
# Each interface may have some options specific to it
# consult the wiki page for the interface for details.
Trying to start it as a service doesn’t work as well, even with the LED module deactivated:
[20:52:10] openhabian@openhab:/opt/mqttany$ sudo systemctl daemon-reload
[20:52:24] openhabian@openhab:/opt/mqttany$ sudo systemctl enable mqttany
Created symlink /etc/systemd/system/multi-user.target.wants/mqttany.service → /etc/systemd/system/mqttany.service.
[20:52:34] openhabian@openhab:/opt/mqttany$ sudo systemctl start mqttany
[20:52:55] openhabian@openhab:/opt/mqttany$ sudo systemctl status mqttany
● mqttany.service - MQTTany connects things to MQTT
Loaded: loaded (/etc/systemd/system/mqttany.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2020-03-12 20:52:55 GMT; 7s ago
Process: 3426 ExecStart=/usr/bin/python3 mqttany.py (code=exited, status=1/FAILURE)
Main PID: 3426 (code=exited, status=1/FAILURE)
Thanks in advance,
Christian