Skip to content

Commit

Permalink
Release 0.4.1 / 0.7.0 #166
Browse files Browse the repository at this point in the history
  • Loading branch information
deviantintegral authored Oct 28, 2023
2 parents f57dec5 + 8f2d666 commit a86cc43
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 49 deletions.
58 changes: 29 additions & 29 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<!-- Thank you for your contribution to this addon! -->

<!-- rtl_433_mqtt_autodiscovery/rtl_433_mqtt_hass.py is maintained upstream at
merbanan/rtl_433. In general, changes to that file should be filed as a
pull request there first.
-->

<!-- Please open normal feature and bug fix requests against the "next" branch.
This allows us to merge changes without immediately sending the change to
addon users.
-->

## Summary

<!-- Write a summary of what you're trying to solve, with links to any relevant
issues, and how this PR solves it.
-->

## Alternatives Considered

<!-- Are there other ways to add the feature or solve the bug you considered?
Why didn't you pursue them further?
-->

## Testing Steps

1. First...
2. Then...
3. You should see... (screenshots or console text are helpful)
<!-- Thank you for your contribution to this addon! -->

<!-- rtl_433_mqtt_autodiscovery/rtl_433_mqtt_hass.py is maintained upstream at
merbanan/rtl_433. In general, changes to that file should be filed as a
pull request there first.
-->

<!-- Please open normal feature and bug fix requests against the "next" branch.
This allows us to merge changes without immediately sending the change to
addon users.
-->

## Summary

<!-- Write a summary of what you're trying to solve, with links to any relevant
issues, and how this PR solves it.
-->

## Alternatives Considered

<!-- Are there other ways to add the feature or solve the bug you considered?
Why didn't you pursue them further?
-->

## Testing Steps

1. First...
2. Then...
3. You should see... (screenshots or console text are helpful)
10 changes: 5 additions & 5 deletions rtl_433-next/build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"build_from": {
"aarch64": "homeassistant/aarch64-base:3.16",
"amd64": "homeassistant/amd64-base:3.16",
"armhf": "homeassistant/armhf-base:3.16",
"armv7": "homeassistant/armv7-base:3.16",
"i386": "homeassistant/i386-base:3.16"
"aarch64": "homeassistant/aarch64-base:3.18",
"amd64": "homeassistant/amd64-base:3.18",
"armhf": "homeassistant/armhf-base:3.18",
"armv7": "homeassistant/armv7-base:3.18",
"i386": "homeassistant/i386-base:3.18"
},
"args": {
"rtl433GitRevision": "master"
Expand Down
4 changes: 4 additions & 0 deletions rtl_433/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.4.1] - 2023-10-27

* Fix wrong retain value when setting in mqtt connection string #149 by @cserem

## [0.4.0] - 2023-02-08

* Update rtl_433 to the 22.11 release.
Expand Down
2 changes: 1 addition & 1 deletion rtl_433/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.16
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.18
FROM $BUILD_FROM as builder
MAINTAINER [email protected]

Expand Down
2 changes: 1 addition & 1 deletion rtl_433/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rtl_433",
"image": "ghcr.io/pbkhrv/rtl_433-hass-addons-rtl_433-{arch}",
"version": "0.4.0",
"version": "0.4.1",
"slug": "rtl433",
"description": "Receive wireless sensor data via an SDR dongle and rtl_433",
"url": "https://github.com/pbkhrv/rtl_433-hass-addons/tree/main/rtl_433",
Expand Down
3 changes: 3 additions & 0 deletions rtl_433/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ if bashio::services.available "mqtt"; then
port=$(bashio::services "mqtt" "port")
username=$(bashio::services "mqtt" "username")
retain=$(bashio::config "retain")
if [ "$retain" = "true" ] ; then
retain=1
fi
else
bashio::log.info "The mqtt addon is not available."
bashio::log.info "Manually update the output line in the configuration file with mqtt connection settings, and restart the addon."
Expand Down
10 changes: 5 additions & 5 deletions rtl_433_mqtt_autodiscovery-next/build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"build_from": {
"aarch64": "homeassistant/aarch64-base-python:3.9-alpine3.16",
"amd64": "homeassistant/amd64-base-python:3.9-alpine3.16",
"armhf": "homeassistant/armhf-base-python:3.9-alpine3.16",
"armv7": "homeassistant/armv7-base-python:3.9-alpine3.16",
"i386": "homeassistant/i386-base-python:3.9-alpine3.16"
"aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.12-alpine3.18",
"amd64": "ghcr.io/home-assistant/amd64-base-python:3.12-alpine3.18",
"armhf": "ghcr.io/home-assistant/armhf-base-python:3.12-alpine3.18",
"armv7": "ghcr.io/home-assistant/armv7-base-python:3.12-alpine3.18",
"i386": "ghcr.io/home-assistant/i386-base-python:3.12-alpine3.18"
},
"args": {
"rtl433GitRevision": "master"
Expand Down
4 changes: 3 additions & 1 deletion rtl_433_mqtt_autodiscovery-next/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rtl_433 MQTT Auto Discovery (next)",
"image": "ghcr.io/pbkhrv/rtl_433-hass-addons-rtl_433_mqtt_autodiscovery-{arch}",
"image": "ghcr.io/pbkhrv/rtl_433-hass-addons-rtl_433_mqtt_autodiscovery-next-{arch}",
"version": "next",
"slug": "rtl433mqttautodiscovery-next",
"description": "Automatic discovery of rtl_433 device information via MQTT",
Expand All @@ -17,6 +17,7 @@
"mqtt_password": "",
"mqtt_retain": false,
"rtl_topic": "rtl_433/+/events",
"device_topic_suffix": "",
"discovery_prefix": "homeassistant",
"discovery_interval": 600,
"force_update": false,
Expand All @@ -30,6 +31,7 @@
"mqtt_password": "str?",
"mqtt_retain": "bool",
"rtl_topic": "str",
"device_topic_suffix": "str?",
"discovery_prefix": "str",
"discovery_interval": "int",
"force_update": "bool",
Expand Down
5 changes: 5 additions & 0 deletions rtl_433_mqtt_autodiscovery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.7.0] - 2023-10-27

* `device_topic_suffix` support added by @unverbraucht #144
* Fix pointing the next version of the addon to the stable version #164

## [0.6.0] - 2023-02-08

* Update rtl_433 to the 22.11 release.
Expand Down
2 changes: 1 addition & 1 deletion rtl_433_mqtt_autodiscovery/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_FROM=homeassistant/amd64-base-python:3.9-alpine3.16
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base-python:3.12-alpine3.18
FROM ${BUILD_FROM} as builder

ARG rtl433GitRevision=22.11
Expand Down
1 change: 1 addition & 0 deletions rtl_433_mqtt_autodiscovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ The following options apply to all broker configurations:

* `mqtt_retain`: MQTT broker will retain configuration topics between restarts if this is set to true. Default is `false`.
* `rtl_topic`: MQTT topic where rtl_433 is publishing its output. Default is "rtl_433".
* `device_topic_suffix`: The device topic suffix, which can be helpful for keeping device topics stable if they change device ID when swapping batteries. To use this, set a devices line like `devices=rtl_433/localhost/devices[/type][/model][/subtype]/C[channel:0],events=rtl_433/localhost/events` in your rtl\_433 configuration, and then set this value to match the devices part (such as `devices[/type][/model][/subtype]/C[channel:0]`). Please keep in mind that this is a suffix - the part `rtl_433/localhost` will be taken from the MQTT event topic.
* `discovery_prefix`: MQTT topic prefix where Home Assistant is [looking for discovery information](https://www.home-assistant.io/docs/mqtt/discovery/#discovery_prefix). Default is "homeassistant".
* `discovery_interval`: how often to publish discovery information, in seconds. Default is 600.
* `force_update`: Use `force_update` flag in discovery configuration. See details [here](https://www.home-assistant.io/integrations/sensor.mqtt/#force_update).
Expand Down
10 changes: 5 additions & 5 deletions rtl_433_mqtt_autodiscovery/build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"build_from": {
"aarch64": "homeassistant/aarch64-base-python:3.9-alpine3.16",
"amd64": "homeassistant/amd64-base-python:3.9-alpine3.16",
"armhf": "homeassistant/armhf-base-python:3.9-alpine3.16",
"armv7": "homeassistant/armv7-base-python:3.9-alpine3.16",
"i386": "homeassistant/i386-base-python:3.9-alpine3.16"
"aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.12-alpine3.18",
"amd64": "ghcr.io/home-assistant/amd64-base-python:3.12-alpine3.18",
"armhf": "ghcr.io/home-assistant/armhf-base-python:3.12-alpine3.18",
"armv7": "ghcr.io/home-assistant/armv7-base-python:3.12-alpine3.18",
"i386": "ghcr.io/home-assistant/i386-base-python:3.12-alpine3.18"
}
}
4 changes: 3 additions & 1 deletion rtl_433_mqtt_autodiscovery/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rtl_433 MQTT Auto Discovery",
"image": "ghcr.io/pbkhrv/rtl_433-hass-addons-rtl_433_mqtt_autodiscovery-{arch}",
"version": "0.6.0",
"version": "0.7.0",
"slug": "rtl433mqttautodiscovery",
"description": "Automatic discovery of rtl_433 device information via MQTT",
"url": "https://github.com/pbkhrv/rtl_433-hass-addons/tree/main/rtl_433_mqtt_autodiscovery",
Expand All @@ -16,6 +16,7 @@
"mqtt_password": "",
"mqtt_retain": false,
"rtl_topic": "rtl_433/+/events",
"device_topic_suffix": "",
"discovery_prefix": "homeassistant",
"discovery_interval": 600,
"force_update": false,
Expand All @@ -28,6 +29,7 @@
"mqtt_password": "str?",
"mqtt_retain": "bool",
"rtl_topic": "str",
"device_topic_suffix": "str?",
"discovery_prefix": "str",
"discovery_interval": "int",
"force_update": "bool",
Expand Down
10 changes: 10 additions & 0 deletions rtl_433_mqtt_autodiscovery/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ else
if bashio::config.true "force_update"; then
OTHER_ARGS="${OTHER_ARGS} --force_update"
fi
# This is an optional parameter and we don't want to overwrite the defaults
DEVICE_TOPIC_SUFFIX=$(bashio::config "device_topic_suffix")
if [ ! -z $DEVICE_TOPIC_SUFFIX ]; then
OTHER_ARGS="${OTHER_ARGS} -T ${DEVICE_TOPIC_SUFFIX}"
fi

LOG_LEVEL=$(bashio::config "log_level")
if [[ $LOG_LEVEL == "quiet" ]]; then
Expand All @@ -51,5 +56,10 @@ else
fi
fi

# Set a default port for when the container is being run directly.
if [ ! -z ${MQTT_PORT+x} ]; then
MQTT_PORT="1883"
fi

echo "Starting rtl_433_mqtt_hass.py..."
python3 -u /rtl_433_mqtt_hass.py -H $MQTT_HOST -p $MQTT_PORT -R "$RTL_TOPIC" -D "$DISCOVERY_PREFIX" -i $DISCOVERY_INTERVAL $OTHER_ARGS

0 comments on commit a86cc43

Please sign in to comment.