Pi-Weather | User space program for Web4Robot 's Raspberry Pi
kandi X-RAY | Pi-Weather Summary
kandi X-RAY | Pi-Weather Summary
This is a set of user space program for Web4Robot’s Raspberry Pi Weather Board. You can buy one of the expansion board at:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Pi-Weather
Pi-Weather Key Features
Pi-Weather Examples and Code Snippets
Community Discussions
Trending Discussions on Pi-Weather
QUESTION
I run domoticz on a PI3b with Raspbian, for better effiency the PI3b has now a 7" screen to show domotics behaviour + weather-station information + internet forecast... To show all of this I've coded a C++/WXWidget app with graphics for temp/pressure... Temp/pressures graphs are with Python3/matplotlib plotted, saved as 3 png files. The Python script read datas in files and plot/save the graphs.
It works good from terminal.... but no way to work with crontab, or with an "os.execute()" from events lua-scripts of domoticz...
I've pushed Up all permissions/access for scripts and png files (read/write)
One python script read data from bme280 sensor, crontab 2 minutes, no problem, it works from terminal, crontab, lua events...
Second script read datas, plot graphs and send http json command in order to update a device in domoticz. This works fine from terminal, but not from domoticz (lua os.execute()) or from crontab.
call in crontab: sudo /usr/bin/python3 /home/pi/Desktop/graph.py
call from domoticz lua script: os.execute('sudo /usr/bin/python3 /home/pi/Desktop/graph.py')
from terminal it works fine with python, /usr/bin/python, or /usr/bin/python3 (--> matplotlib)
python --version = 3.7.0
It looks like a problem beetween many python versions, the good one is not called from crontab and lua-scripts.... How to fix-it ?
default python version to 2.7.0, 3.0, 3.6, 3.7 tested to check problem with env/bin/path... only problem found with urllib.urlopen changed with "urlopen from urllib.request"
...ANSWER
Answered 2019-Jan-30 at 19:45Oky,
source: Generating a PNG with matplotlib when DISPLAY is undefined
that was a pb with matplotlib, the script runs fine in terminal but for others it needs more codes:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Pi-Weather
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page