Comments (3)
I am wondering if you are bumping into a permissions issue. One thing to try would be using the --config option to expressly set out the full path to your options file.
On a side note, native support for Airthings devices using the new bluetooth integration is being added to Home Assistant Core so you may not need this script in the future. I believe it was merged into the dev branch yesterday but missed the beta window for version 2022.10 so it is now slated for version 2022.11. The native support will provide a much nicer user experience, including auto-discovery of devices.
from airthings-mqtt-ha.
Using the --config options and setting the output path made it run like expected, I am not sure the reason why Environment path does not work, some assumptions may be wrong on my end.
I prefer using only MQTT discovery so your project works perfect for me, what I would like however would be a way to upload the measurements to the airthings cloud without using my phone manually, but that's beside the point in this issue :)
Thanks
from airthings-mqtt-ha.
Sorry for the too late comment but I think I can clarify the confusion.
The script loads ./options.json
if no config file is specified. This file is taken from the current directory of the python process running the script. The current directory is not where the script lies. If you expect this to work you have to change the service file to something like this:
[Unit]
Description=Airthings to Home Assistant via MQTT
After=network-online.target
[Service]
User=hass
Group=hass
Environment="PATH=/usr/local/bin:/usr/bin:/bin"
ExecStart=python ./airthings-mqtt-ha.py
WorkingDirectory=/usr/local/src/airthings-mqtt/src
Restart=always
RestartSec=2s
from airthings-mqtt-ha.
Related Issues (8)
- Request - Docker HOT 2
- TypeError: type str doesn't define __round__ method HOT 1
- Multiple devices HOT 11
- Improve install options HOT 3
- No module named 'paho' HOT 4
- Multiple Devices - 5 HOT 9
- Battery sensor
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 airthings-mqtt-ha.