A lightweight script for updating custom components for Home Assistant

Related tags

HardwareUpdater
Overview

Updater for Home Assistant

Donate Donate

This is a lightweight script for updating custom components for Home Assistant. If for some reason you do not want to use HACS or cannot install it.

Pros:

  • Instant ready to use, no need to install or Hass reboot
  • No need GitHub account and token
  • Support update to latest release or latest defaul branch, even if it's not a "master"
  • Support update to specific branch or tag (version), even if the tag is not a release

Cons:

  • There is no GUI
  • Frontend integrations are not supported

Setup

  1. Add to your configuration.yaml:
switch:
  - platform: command_line
    switches:
      updater:
        friendly_name: Updater
        command_on: python updater.py update  # run updates process
        command_off: python updater.py        # force reload witout timeout
        command_state: |
          python -B -c "exec('''try: import updater\nexcept ModuleNotFoundError: from urllib.request import urlretrieve; urlretrieve('https://raw.github.com/AlexxIT/Updater/master/updater.py', 'updater.py'); import updater'''); updater.run(interval=3600)"
        command_timeout: 60  # this is timeout, not update interval!
  1. Go to Configuration > Server Controls > Reload: Command line entities

  2. Wait 30 seconds (default delay from the moment the switch is added)

  3. Edit file updater.txt in your config folder:

By default, updates to the latest release version or default branch. But you can point to any branch or any tag (version), even if the tag is not a release. Remember, some developers use the letter v in version name, some don't.

https://github.com/AlexxIT/SonoffLAN             # latest release or default branch
https://github.com/AlexxIT/Dataplicity mater     # master branch
https://github.com/AlexxIT/XiaomiGateway3 async  # custom branch
https://github.com/AlexxIT/WebRTC v2.0.1         # custom tag (version)
# https://github.com/hacs/integration            # any comments

Using

You should wait 30 seconds after Home Assistant starts for first update check.

If switch is ON - all componenst is up-to-date. You can turn it OFF to force an update check.

If switch OFF - you have an update. Turn it ON for the update.

You can delete custom_components/NAME/version.txt to force update on same version.

You can delete updater.py to update this script when the new version comes out.

You can delete updater.json to force an update check. The command line switch updates the data once an hour and caches the response in this file. To minimize the number of requests to the Internet.

You can comment line in updater.txt file to disable component update.

You can use script from command line:

python updater.py update AlexxIT/SonoffLAN AlexxIT/[email protected] AlexxIT/[email protected]
python updater.py -i 3600 json AlexxIT/SonoffLAN

Also, you can create sensor if you want. The sensor value can be updated with a delay up to 60 seconds.

sensor:
  - platform: command_line
    name: Updater
    command: python updater.py -i 3600 json
    value_template: '{{ value_json.repositories|length }}'
    unit_of_measurement: updates
    json_attributes:
      - repositories

PS: working directory should point to the Hass configuration folder. This works by default for most users.

Owner
Alex X
Lok’tar Ogar
Alex X
Home Assistant custom components MPK-Lodz

MPK Łódź sensor This sensor uses unofficial API provided by MPK Łódź. Configuration options Key Type Required Default Description name string False MP

Piotr Machowski 3 Nov 01, 2022
Robot Framework keyword library wrapper for atlassian-python-api

Robot Framework keyword library wrapper for atlassian-python-api

Marcin Koperski 3 Jul 29, 2022
A simple non-official manager interface I'm using for my Raspberry Pis.

My Raspberry Pi Manager Overview I have two Raspberry Pi 4 Model B devices that I hooked up to my two TVs (one in my bedroom and the other in my new g

Christian Deacon 21 Jan 04, 2023
Minimal and clean dashboard to visualize some stats of Pi-Hole with an E-Ink display attached to your Raspberry Pi

Clean Dashboard for Pi-Hole Minimal and clean dashboard to visualize some stats of Pi-Hole with an E-Ink display attached to your Raspberry Pi.

Alessio Santoru 104 Dec 14, 2022
This Home Assistant custom component adding support for controlling Midea dehumidifiers on local network.

This custom component for Home assistant adds support for Midea dehumidifier appliances via the local area network. homeassistant-midea-dehumidifier-l

Nenad Bogojevic 91 Dec 28, 2022
Programmable Rainbow Redstone Computer

Programmable Rainbow Redstone Computer Table of contents What is it? Program flasher How to use it What is it? PRRC is Programmable Rainbow Redstone C

Fern H 2 Jun 07, 2022
Volkswagen ID component for Home Assistant

Volkswagen ID component for Home Assistant This folder contains both a generic Python 3 library for the Volkswagen ID API and a component for Home Ass

55 Jan 07, 2023
Raspberry Pi Pico support for VS Code

Pico-Go VS Code Extension Pico-Go provides code auto-completion and allows you to communicate with your Raspberry Pi Pico board using the built-in REP

Chris Wood 114 Dec 28, 2022
An alternative to Demise-Assistant-Batch made entirely in Python for more capabilities.

Demise-Assistant-Python An alternative to Demise-Assistant-Batch made entirely in Python for more capabilities. IMPORTANT NOTE Demise-Assistant-Batch

SkelOrganisation 1 Nov 24, 2021
Windhager myComfort custom component for Home Assistant

Windhager myComfort custom component for Home Assistant

5 Apr 27, 2022
PlatformIO development platform for GSM modules

PlatformIO development platform for GSM modules Supported Modules Quectel M66 OpenCPU Arduino - TODO other - in progress... Supported Boards Comet M66

Georgi Angelov 5 Aug 06, 2022
A low power 1U Raspberry Pi cluster server for inexpensive colocation.

Raspberry Pi 1U Server There are server colocation providers that allow hosting a 1U server for as low as $30/month, but there's a catch: There are re

Paul Brown 627 Dec 31, 2022
Example for Calculating Robot Dynamics Using Pinocchio Library

A Example for Calculating Robot Dynamics Using Pinocchio Library Developed by: Xinyang Tian. Platform: Linux + Pinocchio. In this work, i use Pinocchi

Rot_Tianers 33 Dec 28, 2022
Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner and yi-hack-Allwinner-v2

yi-hack Home Assistant integration Overview yi-hack Home Assistant is a custom integration for Yi cameras (or Sonoff camera) with one of the following

roleo 131 Jan 03, 2023
Custom component for interacting with Octopus Energy

Home Assistant Octopus Energy ** WARNING: This component is currently a work in progress ** Custom component built from the ground up to bring your Oc

David Kendall 116 Jan 02, 2023
Projet d'integration SRI 3A ROS

projet-integration-sri-2021-2022 Projet d'intégration ROS SRI 2021 2022 Organization: Planification de tâches Perception Saisie: Cédérick Mouliets Sim

AIP Primeca Occitanie 3 Jan 07, 2022
Implementation of Forwards Kinematics, Inverse Kinematics, Point to Point Movement and Synchronous movement for Kuka KR 120 R2700-2.

I made this project for my university course in robotics. I rarely found any information regarding the implementation of mathematics in code. So I decided to make this repo in order to help others :)

2 Dec 27, 2022
A script and GUI for controlling stepper motors from an arduino

A script and GUI for controlling stepper motors from an arduino (nema 23 in my case but should work for others in general)

Pip 2 Aug 01, 2022
Mini Pupper - Open-Source,ROS Robot Dog Kit

Mini Pupper - Open-Source,ROS Robot Dog Kit

MangDang 747 Dec 28, 2022
🎃 Some spooky code samples to hack yourself a pumpkin 👻

🎃 Tech Or Treat 👻 It's spooky season for those who celebrate Halloween, and to get in the spirit (spirit - get it? 👻 ) we thought it would be fun t

Jim Bennett 5 Feb 07, 2022