you would have all readings centrally under FHEM in view and could switch further events with status "finisch". e.g. switch off a Sonow POW (tasmato) and thus switch off the printer.
I have a running Home automation with OpenHab and using mosquitto to communicate between the Raspberrys and devices, i.e. to get energy consumption from smart sockets.
So I only want to send an "event" from the Repetier-Server (when print starts) via extcommands.xml to my existing mqqt broker, what package(s) have I to install?
I use an raspberry pi running repetier server and another one running openhab2 with mosquitto installed. Can anyone describe how to run this python-script on which of the both raspberries?
Or ist ther another way using the API to get state of printers?
I have not use the software for a long time, because I have start using webactions instead. I have check it today again but it seems to not work anymore, may a breaking change at python. Sadly I personal have no interest in dealing with this python issues.
How you can see at the git history, I have not write it by myself, I only have adjust it to my needs.
May I will write a completely new software one day.
At the current state the software fail at the import of paho.mqtt library.
``` repeqtt_1 | Traceback (most recent call last): repeqtt_1 | File "//repeqtt.py", line 20, in <module> repeqtt_1 | import paho.mqtt.publish as publish repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/publish.py", line 31, in <module> repeqtt_1 | from . import client as paho repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 18, in <module> repeqtt_1 | import logging repeqtt_1 | File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in <module> repeqtt_1 | _startTime = time.time() repeqtt_1 | PermissionError: [Errno 1] Operation not permitted repeqtt_1 | Traceback (most recent call last): repeqtt_1 | File "//repeqtt.py", line 20, in <module> repeqtt_1 | import paho.mqtt.publish as publish repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/publish.py", line 31, in <module> repeqtt_1 | from . import client as paho repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 18, in <module> repeqtt_1 | import logging repeqtt_1 | File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in <module> repeqtt_1 | _startTime = time.time() repeqtt_1 | PermissionError: [Errno 1] Operation not permitted repeqtt_1 | Traceback (most recent call last): repeqtt_1 | File "//repeqtt.py", line 20, in <module> repeqtt_1 | import paho.mqtt.publish as publish repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/publish.py", line 31, in <module> repeqtt_1 | from . import client as paho repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 18, in <module> repeqtt_1 | import logging repeqtt_1 | File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in <module> repeqtt_1 | _startTime = time.time() repeqtt_1 | PermissionError: [Errno 1] Operation not permitted mqttrepetierserver_repeqtt_1 exited with code 1 ```
Comments
Viele Grüße
Florian
File "repeqtt.py", line 94, in <module>
queryRepetier()
File "repeqtt.py", line 67, in queryRepetier
serverKey = srvdata['apikey']
KeyError: 'apikey'
I already tried to use add another user with all rights and easy non special characters password.
So I only want to send an "event" from the Repetier-Server (when print starts) via extcommands.xml to my existing mqqt broker, what package(s) have I to install?
Any hints? Thx!
i`m saerching also an solution for this.
I use an raspberry pi running repetier server and another one running openhab2 with mosquitto installed.
Can anyone describe how to run this python-script on which of the both raspberries?
Or ist ther another way using the API to get state of printers?
Regards
Jürgen
```yaml
services:
repeqtt:
build: .
volumes:
- './repeqtt.conf:/repeqtt.conf:ro'
user: 1000:1000
restart: unless-stopped
```
[repeqtt]
name=repeqtt
[server]
address =
port = 80
user =
secret =
[broker]
address =
port = 1833
user =
secret =
root_topic =
update_interval = 30
```
At the current state the software fail at the import of paho.mqtt library.
```
repeqtt_1 | Traceback (most recent call last):
repeqtt_1 | File "//repeqtt.py", line 20, in <module>
repeqtt_1 | import paho.mqtt.publish as publish
repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/publish.py", line 31, in <module>
repeqtt_1 | from . import client as paho
repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 18, in <module>
repeqtt_1 | import logging
repeqtt_1 | File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in <module>
repeqtt_1 | _startTime = time.time()
repeqtt_1 | PermissionError: [Errno 1] Operation not permitted
repeqtt_1 | Traceback (most recent call last):
repeqtt_1 | File "//repeqtt.py", line 20, in <module>
repeqtt_1 | import paho.mqtt.publish as publish
repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/publish.py", line 31, in <module>
repeqtt_1 | from . import client as paho
repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 18, in <module>
repeqtt_1 | import logging
repeqtt_1 | File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in <module>
repeqtt_1 | _startTime = time.time()
repeqtt_1 | PermissionError: [Errno 1] Operation not permitted
repeqtt_1 | Traceback (most recent call last):
repeqtt_1 | File "//repeqtt.py", line 20, in <module>
repeqtt_1 | import paho.mqtt.publish as publish
repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/publish.py", line 31, in <module>
repeqtt_1 | from . import client as paho
repeqtt_1 | File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 18, in <module>
repeqtt_1 | import logging
repeqtt_1 | File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in <module>
repeqtt_1 | _startTime = time.time()
repeqtt_1 | PermissionError: [Errno 1] Operation not permitted
mqttrepetierserver_repeqtt_1 exited with code 1
```