-
Notifications
You must be signed in to change notification settings - Fork 10
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
seaniedan
wants to merge
10
commits into
jamiebegin:master
Choose a base branch
from
seaniedan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!
backwards compatible with mqtt API v1 https://stackoverflow.com/questions/77984857/paho-mqtt-unsupported-callback-api-version-error
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
Update base.py
Update metrics.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).