Ok, this took me a lot of time in the meanwhile. I'm so happy if it's going to work. I got a almost running situation, but just not that last step.
What worked was entering presets from command line terminal. Works fine! What doesn't work is entering this script in a switch in domoticz. Somehow I understood, while browsing the forum, that Domoticz is using Python3 instead of Python2. (not sure if this is correct but I needed to continue testing)
So here is what I did:
- Python2 bose.py 2 = WORKING from commandline, NOT in domoticz.
- Python3 bose.py 3 = NOT working from commandline
- Translated script to Python3 script with
http://www.pythonconverter.com/
- Python3 bose.py 3 = NOT working from commandline gives error for soundtouch libs.
- Installed pip3
- Loaded soundtouch libs in pip3
- Python3 bose.py 3 = WORKING from commandline
- So with this working Python3 situation, I returned to Domoticz, almost sure that this was the solution.
- BUT back in Domoticz NOT working, giving 256 error in the log.
So for Python2 AND for Python3 it works from my commandline, but not from Domoticz
Used notation in Domoticz:
script:///home/pi/domoticz/scripts/python/bose.py 1
and
script://python/bose.py 6
Script is owned by pi and chmod with +x
Result in log:
Error: Error executing script command (/home/pi/domoticz/scripts/python/bose.py). returned: 256
Thanks for thinking along! Hope someone has a solution!