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
Unofficial Playdate reverse-engineering notes/tools - covers file formats, server API and USB commands

Unofficial Playdate reverse-engineering notes/tools - covers file formats, server API and USB commands ⚠️ This documentation is unofficial and is not

James 106 Dec 31, 2022
Count the number of people around you 👨‍👨‍👦 by monitoring wifi signals 📡 .

howmanypeoplearearound Count the number of people around you 👨‍👨‍👦 by monitoring wifi signals 📡 . howmanypeoplearearound calculates the number of

Zack 6.7k Jan 07, 2023
What if home automation was homoiconic? Just transformations of data? No more YAML!

radiale what if home-automation was also homoiconic? The upper or proximal row contains three bones, to which Gegenbaur has applied the terms radiale,

Felix Barbalet 21 Mar 26, 2022
Python Keylogger for Linux

A keylogger is a program that records your keystrokes, this program saves them in a .txt file on your local computer and, after 30 seconds (or as long as you want), it will close the .txt file and se

Darío Mazzitelli 4 Jul 31, 2021
A flexible data historian based on InfluxDB, Grafana, MQTT and more. Free, open, simple.

Kotori Telemetry data acquisition and sensor networks for humans. Documentation: https://getkotori.org/ Source Code: https://github.com/daq-tools/koto

83 Nov 26, 2022
A Fast, Easy, and User Friendly way to control Robotics Actuators.

T-Motor Controller A Fast, Easy, and User Friendly way to control Robotics Actuators. View Demo · Report Bug · Request Feature Table of Contents About

26 Aug 23, 2022
Code for the paper "Planning with Diffusion for Flexible Behavior Synthesis"

Planning with Diffusion Training and visualizing of diffusion models from Planning with Diffusion for Flexible Behavior Synthesis. Guided sampling cod

Michael Janner 310 Jan 07, 2023
Pylorawan is a Micropython wrapper for lorawan devices from RAK Wireless.

pylorawan Pylorawan is a Micropython wrapper for lorawan devices from RAK Wireless. Tested on a Raspberry PI Pico with a RAK4200(H) Evaluation Board (

Peter Houghton 3 Nov 04, 2022
ROS2 nodes for Waveshare Alphabot2-Pi mobile robot.

ROS2 for Waveshare Alphabot2-Pi This repo contains ROS2 packages for the Waveshare Alphabot2-Pi mobile robot: alphabot2: it contains the nodes used to

Michele Rizzo 2 Oct 11, 2022
A python script for Homeassistant that counts down the days to birthdays, anniversaries etc

Date Countdown A python script for Homeassistant that counts down the days to birthdays, anniversaries etc Important note I no longer use homeassistan

Marc Forth 21 Mar 12, 2022
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
A python project based on a TV show Wheel of Fortune

Wheel-of-Fortune-using-Python Wheel of Fortune in python this game is the hands-on project in Python 3 Programming Specialization offered By Universit

Eszter Pai 1 Jan 03, 2022
Jarvis: a personal assistant which can help you to manage your system

Jarvis Jarvis is personal AI based assistant which can help you to manage stuff in your computer. This is demo but I decided to make it more better so

2 Jun 02, 2022
A lightweight script for updating custom components for Home Assistant

Updater for Home Assistant This is a lightweight script for updating custom components for Home Assistant. If for some reason you do not want to use H

Alex X 12 Sep 21, 2022
AERO 421: Spacecraft Attitude, Dynamics, and Control Final Project.

AERO - 421 Final Project Redevelopment Spacecraft Attitude, Dynamics, and Control: Simulation to determine and control a satellite's attitude in LEO.

Gagandeep Thapar 3 Dec 16, 2022
Designed and coded a password manager in Python with Arduino integration

Designed and coded a password manager in Python with Arduino integration. The Program uses a master user to login, and stores account data such as usernames and passwords to the master user. While lo

Noah Colbourne 1 Jan 16, 2022
Pinion — Nice-looking interactive diagrams for KiCAD PCBs

Pinion — Nice-looking interactive diagrams for KiCAD PCBs Pinion is a simple tool that allows you to make a nice-looking pinout diagrams for your PCBs

Jan Mrázek 297 Jan 06, 2023
LedFx is a network based LED effect controller with support for advanced real-time audio effects

Welcome to LedFx ✨ -Making music come alive! LedFx website: https://ledfx.app/ What is LedFx? What LedFx offers is the ability to take audio input, an

786 Jan 02, 2023
Ingeniamotion is a library that works over ingenialink and aims to simplify the interaction with Ingenia's drives.

Ingeniamotion Ingeniamotion is a library that works over ingenialink and aims to simplify the interaction with Ingenia's drives. Requirements Python 3

Ingenia Motion Control 7 Dec 15, 2022
A ESP32 project template with a web interface built in React

ESP AP Webserver demo.mp4 This is my experiment with "mobile app development" for the ESP32. The project consists of two parts, the ESP32 code and the

8 Dec 15, 2022