Skip to content

Home Assistant Custom Component - send Syslog message to remote server.

License

Notifications You must be signed in to change notification settings

TheByteStuff/RemoteSyslog_Service

Repository files navigation

Log to Remote Syslog Server

Type hacs_badge

Send log messages from an event to a Syslog Server using UDP or TCP protocol. (This service does not interface with HA logging.)

Messages are delivered in in BSD (legacy Syslog) format. User may select Facility, Log Level, program.

Set up/Test from Developer Tools: Automation Service Call Screenshot

Example of use in an Automation which logs when a garage door has been open for an hour: Garage Door Open Example

What?

This repository contains multiple files, here is a overview:

File Purpose
.github/ISSUE_TEMPLATE/feature_request.md Template for Feature Requests
.github/ISSUE_TEMPLATE/issue.md Template for issues
custom_components/remote_syslog/__init__.py The component file for the integration.
custom_components/remote_syslog/manifest.json A manifest file for Home Assistant.
custom_components/remote_syslog/services.yaml Service definitions.
custom_components/remote_syslog/syslogger_tcp.py A file to hold the class for the TCP logging.
custom_components/remote_syslog/syslogger_udp.py A file to hold the class for the UDP logging.
custom_components/remote_syslog/sysloggercommon.py A file to hold shared classes for the entire integration.
tests/__init__.py Makes the tests folder a module.
tests/test_common.py Tests for custom_components/remote_syslog/sysloggercommon.py.
tests/test_syslogger_tcp.py Tests for custom_components/remote_syslog/syslogger_tcp.py.
tests/test_syslogger_udp.py Tests for custom_components/remote_syslog/syslogger_udp.py.
CONTRIBUTING.md Guidelines on how to contribute.
AutomationsExample.png Screenshot from Automations 'Call Service'.
LICENSE The license file for the project.
info.md Information file displayed in HACS.
README.md The file you are reading now.
requirements.txt Python packages used by this integration.
requirements_dev.txt Python packages used to provide IntelliSense/code hints during development of this integration, typically includes packages in requirements.txt but may include additional packages

Installation (manual)

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called remote_syslog.
  4. Download all the files from the custom_components/remote_syslog/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Add "remote_syslog:" to configuration.yaml.
  7. Restart Home Assistant
  8. In the HA UI go to "Configuration" -> "Automations", create a new automation and review service options for Actions.

Using your HA configuration directory (folder) as a starting point you should now also have this:

custom_components/remote_syslog/__init__.py
custom_components/remote_syslog/manifest.json
custom_components/remote_syslog/services.yaml
custom_components/remote_syslog/syslogger_tcp.py
custom_components/remote_syslog/syslogger_udp.py
custom_components/remote_syslog/sysloggercommon.py

Installation (HACS)

  1. Add the "remote_syslog" repository from the HACS/Integrations/"Explore & Add Repositories" button.
  2. Add "remote_syslog:" to configuration.yaml.
  3. Restart Home Assistant
  4. In the HA UI go to "Configuration" -> "Automations", create a new automation and review service options for Actions.

Usage

Configuration is done in the UI

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines