Skip to content

Added SystemD configuration file #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

seaniedan
Copy link

SystemD is already running on Raspberry Pi etc, so I include an example configuration file for that, and documented it, as an alternative to Supervisor (which required a download and I couldn't get to work on my Pi).

System.d service example file
Added documentation for SystemD configuration file.
confirmed change to working directory if using sudo when installing
Launcher daemon for MacOS. Needs to be copied to /Library/LaunchDaemons/com.jamiebegin.metrics2mqtt.service.plist
1. Replace xxx's with your hostname (see note below), broker, username and password
2. Make sure permissions are correct:
chmod 644 /Library/LaunchDaemons/com.jamiebegin.metrics2mqtt.service.plist
3. Test with:
sudo launchctl load /Library/LaunchDaemons/com.jamiebegin.metrics2mqtt.service.plist 
then test it's running:
sudo launchctl list | grep com.jamiebegin.metrics2mqtt.service
You should see something like:
1265	0	com.jamiebegin.metrics2mqtt.service
If not, debug with:
sudo tail -n 1000 /var/log/system.log|grep com.jamiebegin.metrics2mqtt.service
4. Load permanently with:
sudo launchctl load -w /Library/LaunchDaemons/com.jamiebegin.metrics2mqtt.service.plist

NOTE: homeassistant is picky about naming in sensors. If your machine has .local, apostrophes or hyphens in the name, it won't be discovered. Message Home Assistant if that's an issue for you!
removed quotes as plist doesn't like those - works now!
replace . in system name to prevent homeassistant error: [homeassistant.components.mqtt.discovery] Received message on illegal discovery topic 'homeassistant/sensor/macbook-pro.local/disk_usage__/config'. The **topic** contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant