Skip to main content

Service Update Helper

This is a collection of scripts that help update and install services on linux machines which are autodiscovered by Home Assistant. It can be easily expanded for other platforms and supports configuration for each of them.

Currently supported:

  • AgentDVR
  • Zigbee2mqtt
  • Plex
  • Homeassistant
  • PiHole
  • Bazarr
  • Radarr
  • Sonarr

Setup

The configuration is done by the config.yaml file which contains the provider name as the file name on the providers folder. Some services need configuration so it can be written there. If the service is not in this config, then it will be ignored.

This is an example:

mqtt:
  identifier: service_updater
  server: 192.168.1.1
  port: 1883
  auth:
    user: user
    pass: pass
update_interval: 21600
providers:
  plex:
  pihole:
  zigbee2mqtt:
    install_dir: "/opt/zigbee2mqtt"
  homeassistant:
    config_path: "/etc/homeassistant"
  agentdvr:
    install_dir: "/opt/agentdvr"
  bazarr:
    url: "http://localhost:6767"
    api: <key>
  sonarr:
    url: "http://localhost:8989"
    api: <key>
  radarr:
    url: "http://localhost:7878"
    api: <key>

Some prerequirements are required which can be installed using the pip command:

sudo pip3 install service-updater

Run

Once the setup is done, run the script as super user sudo service_updater.

Development

The contribution to this repository is really easy. Create a new file on the providers folder with the name of the service and follow this template:

class Updater():
    service = 'NewService'
    image = "https://example.com/icon.png"

    def __init__(self, config=None):
        self.config = config
        self.latest_version = None
        self.current_version = None

    async def get_current_version(self):
        return self.current_version

    async def get_latest_version(self):
        return self.latest_version

    def install(self):
        pass

Most services are based on web scrapping, so it is very likely that they will stop working, so please create an issue. Any help is more than welcome.

Metadata

Release files for service-updater 2022.11.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for service-updater 2022.11.4
File Size Uploaded Provenance Actions
service_updater-2022.11.4.tar.gz 9.9 kB Without provenance Details for service_updater-2022.11.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for service-updater 2022.11.4
File Interpreter ABI Platform Actions
service_updater-2022.11.4-py3-none-any.whl Python 3 none any Details for service_updater-2022.11.4-py3-none-any.whl

Total release size: 25.0 kB

Release files / service_updater-2022.11.4.tar.gz

Download URL service_updater-2022.11.4.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6a18b7a93ff3f3c99180402a5936ff973fe3edc209cbeb7190e9d59b78a2a608
BLAKE2b-256 checksum
How to use checksums
249fc107d4602dba20c06c91654237d5fc550a6bc20204e0e1223e79eedbf560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / service_updater-2022.11.4-py3-none-any.whl

Download URL service_updater-2022.11.4-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a13748983479a41d3624f2f8c32fe8ce70cf4910b29e2974f8c3f188d8e5440
BLAKE2b-256 checksum
How to use checksums
bfe92945f5a3cc3b6d6449ea7ec189d28040e3d81cf2823856a7005de2b7f0e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Security for service-updater 2022.11.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page