Comments (11)
maybe because running in python2 ?
try:
sudo python3 /home/pi/domoticz/scripts/python/AOK-AM43.py
from a-ok-am43-blinds-drive.
from a-ok-am43-blinds-drive.
To be sure, that means the "/A-OK_AM43_Blind_Drive/" folder is in the root of the pi, on the same level as the "home" folder for example? If yes, I already did that but gives the same error.
The service is running but is that needed for the script?
from a-ok-am43-blinds-drive.
yes - this solved the problem for me :-)
from a-ok-am43-blinds-drive.
Adjusted the readme and explained it to prevent this. I cannot program it because it is failing at pre-compiling within Python.
from a-ok-am43-blinds-drive.
Funny that this issue is closed because someone says it solved his issue while the topic starter didn't even test it yet.
from a-ok-am43-blinds-drive.
from a-ok-am43-blinds-drive.
When I run
sudo python3 /home/pi/domoticz/scripts/python/AOK-AM43.py
I get te following
` * Serving Flask app "AOK-AM43" (lazy loading)
- Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead. - Debug mode: off
Traceback (most recent call last):
File "/home/pi/domoticz/scripts/python/AOK-AM43.py", line 252, in
app.run(host='0.0.0.0') #Listen to all interfaces #,debug=True
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 990, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 1052, in run_simple
inner()
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 1005, in inner
fd=fd,
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 848, in make_server
host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 740, in init
HTTPServer.init(self, server_address, handler)
File "/usr/lib/python3.7/socketserver.py", line 452, in init
self.server_bind()
File "/usr/lib/python3.7/http/server.py", line 137, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
`
from a-ok-am43-blinds-drive.
Is another server is still running?
try:
ps -fA | grep python
and post the result
from a-ok-am43-blinds-drive.
root 26673 1 21 20:43 ? 00:00:09 /usr/bin/python3 /home/pi/domoticz/scripts/python/AOK-AM43.py
So indeed you get this traceback if it is already running.
I've managed to get it working now and am trying to control it by Domoticz. I've got a question, is the service started up at a reboot or do I need to add a start command somewhere the service is started at boot.
from a-ok-am43-blinds-drive.
you need to start it
e.g. by cron:
sudo crontab -e
#add this:
@reboot /usr/bin/python3 /home/pi/domoticz/scripts/python/AOK-AM43.py > /dev/null 2>&1 &
or add this to /etc/rc.local before exit 0:
/usr/bin/python3 /home/pi/domoticz/scripts/python/AOK-AM43.py > /dev/null 2>&1 &
from a-ok-am43-blinds-drive.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from a-ok-am43-blinds-drive.