Hi,
I am running OpenHab on a RPi3+ with the standard Openhabian setup.
I tried setting up python script to execute on a cron task every minute to fetch data from a 3rd party API (Sense Energy Monitor).
For some reason, the script errors out when run as the openhab user but works like a charm when run with openhabian. Here is the output I get when running it as openhab :
sudo -u openhab python sense_data.py
Traceback (most recent call last):
File “sense_data.py”, line 5, in
openhab = openhab.OpenHAB(base_url)
AttributeError: ‘module’ object has no attribute ‘OpenHAB’
I am using the python-openhab library to import the results into Openhab and this works fine with Openhabian. Any ideas which files/directories need permissions adjusted ?