Skip to content

Commit

Permalink
Update to 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
krkeegan committed Jan 17, 2025
2 parents b336c36 + 419ab62 commit d0098df
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.3.0
current_version = 1.3.1
commit = True
tag = False

Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Revision Change History

## [1.3.1]

- Also update scenes pathname on migration
- Update changelog, oops

## [1.3.0] - Potential Breaking Change for Home Assistant Users

This release migrates the configuration files from the global `/config` directory to an addon specific `/config` directory. The migration script will attempt to update your log file and storage directories, but it may not work. Please check the log files after installing this update and specifically check the values of:

```
logging:
file: <<check this value>>
insteon:
storage: <<check this value>>
```

Within the addon the config files are located at `/config` which was previously `/config/insteon-mqtt`. Within the VSCode addon, addon config directories are mounted under `/addons_configs` and the InsteonMQTT config file can be found at `/83fc19e1_insteon-mqtt/config.yaml`

The benefit of this change, is that your config files will now be backed up with the addon.

### Fixes for other Home Assistant Deprecations

Home Assistant continues to evolve and some of the prior ways of doing things have been deprecated or entirely removed. This release contains a number of fixes that may have prevented users from installing the InsteonMQTT addon.

### New Home Assistant Config Buttons in Device Config

This release adds a number of configuration buttons to each entity that allow the user to perform many common tasks as shown in this screenshot:

![image](https://github.com/user-attachments/assets/ac8423f7-f4ad-4d6e-a706-643ca7315ea6)

### What's Changed
* Don't prune blank entity names in overridden discovery data by @tstabrawa in https://github.com/TD22057/insteon-mqtt/pull/523
* If not all DB records are received, try one-by-one by @tstabrawa in https://github.com/TD22057/insteon-mqtt/pull/531
* Allow Installation of Insteon_MQTT Module via Pip in Addon by @krkeegan in https://github.com/TD22057/insteon-mqtt/pull/537
* Migrate to Paho API Version 2 by @krkeegan in https://github.com/TD22057/insteon-mqtt/pull/538
* Enable Optional Encryption Without CA_Cert by @krkeegan in https://github.com/TD22057/insteon-mqtt/pull/539
* Remove Battery Devices from *_All Commands by @krkeegan in https://github.com/TD22057/insteon-mqtt/pull/540
* Migrate HomeAssistant Config Files Location by @krkeegan in https://github.com/TD22057/insteon-mqtt/pull/541
* Add MQTT Discovery Entities for Config Buttons in Home Assistant by @krkeegan in https://github.com/TD22057/insteon-mqtt/pull/542

## [1.2.0]

### Fixes
Expand Down
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ integrated into and controlled from anything that can use MQTT.

This package works well with HomeAssistant and can be easily [installed as an addon](docs/HA_Addon_Instructions.md) using the HomeAssistant Supervisor.

Version: 1.3.0 ([History](CHANGELOG.md))
Version: 1.3.1 ([History](CHANGELOG.md))

### Recent Breaking Changes

- 0.9.1 - A Yaml validation routine was added. If you have an error in your
config.yaml file, you will get an error on startup.
- 1.3.0 - The config files moved locations, see [notes](CHANGELOG.md#130).

# Quickstart

Expand Down Expand Up @@ -111,18 +110,4 @@ future enhancements:
Thanks to [Insteon terminal](https://github.com/pfrommerd/insteon-terminal),
without the work that went into that repo, it would have taken me
forever to get this to work. I learned all of the command protocols
and database managemenet commands from inspecting that code.

# Old Breaking Changes

- 0.8.3 - HomeAssistant version 2021.4.0 now only supports percentages for fan
speeds. This means any fan entities in HomeAssistant that were configured
to use "low", "medium", and "high" for the fan speed will no longer work.
See [config-example.yaml](https://github.com/TD22057/insteon-mqtt/blob/master/config-example.yaml)
under the `mqtt -> fan` section for a suggest configuration in
HomeAssistant. __Users not using HomeAssistant are unaffected.__
- 0.7.4 - IOLinc, the scene_topic has been elimited, please see the documentation
for the replaces functionality.
- 0.7.2 - KeypadLinc now supports both dimmer and on/off device types. This required
changing the KeypadLinc inputs in the MQTT portion of the config.yaml file.
See the file in the repository for the new input fields. ([Issue #33][I33]).
and database management commands from inspecting that code.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Insteon MQTT",
"description": "Creates an MQTT interface to the Insteon protocol.",
"slug": "insteon-mqtt",
"version": "1.3.0",
"version": "1.3.1",
"startup": "services",
"arch": ["amd64","armhf","aarch64","i386"],
"boot": "auto",
Expand Down
4 changes: 2 additions & 2 deletions docs/HA_Addon_Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ These instructions assume that you:
7. Click __Install__
8. Click __Start__ to start the Add-on, this will create your initial config
files.
9. Edit `/config/config.yaml` (which can be found at '/addons_configs/83fc19e1_insteon-mqtt/config.yaml' within VSCode or SSH Addon) as appropriate. See [configuration](configuration.md) for detailed instructions.
9. Edit `/config/config.yaml` (which can be found at '/addon_configs/83fc19e1_insteon-mqtt/config.yaml' within VSCode or SSH Addon) as appropriate. See [configuration](configuration.md) for detailed instructions.
10. Enable the [Discovery Platform](discovery.md)

> Alternatively, if you choose to define your entities in Home Assistant
Expand All @@ -52,7 +52,7 @@ The default settings in the config.yaml file will save all user data to the
of the Insteon-MQTT add-on. This directory may also contain a log file if
you have enabled logging, be careful, this can get quite large.

You can also access this directory '/addons_configs/83fc19e1_insteon-mqtt/'
You can also access this directory '/addon_configs/83fc19e1_insteon-mqtt/'
within VSCode or SSH Addon.

## Updating
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The following is the bare minimum of changes to the `config.yaml` file that are necessary to get Insteon-MQTT started.

> For HomeAssistant Addon users, the `config.yaml` file is stored at `/config/config.yaml` within the addon
> and can be found at at '/addons_configs/83fc19e1_insteon-mqtt/' within VSCode or SSH Addon.
> and can be found at at '/addon_configs/83fc19e1_insteon-mqtt/' within VSCode or SSH Addon.
1. __Configure Modem__ Set the Insteon port as `port` under the `insteon` section to be the USB port or address of the PLM modem on your system. If using an Insteon Hub, see [Hub Instructions](hub.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/hassio_development.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Testing Unreleased Versions in Home Assistant Supervisor
The Home Assistant Supervisor system makes most things pretty simple. Testing development releases or your own code fixes is mildly more difficult. The following instructions should help.

1. Uninstall the Insteon-MQTT addon. Your config files for the repository installed addon are saved in `/config/` (which can be found at '/addons_configs/83fc19e1_insteon-mqtt/' within VSCode or SSH Addon). If you install the addon locally, as described below, the configs for the locally installed addon will be at:
1. Uninstall the Insteon-MQTT addon. Your config files for the repository installed addon are saved in `/config/` (which can be found at '/addon_configs/83fc19e1_insteon-mqtt/' within VSCode or SSH Addon). If you install the addon locally, as described below, the configs for the locally installed addon will be at:
`/addons_configs/local_insteon-mqtt/` within VSCode or SSH Addon).
2. SSH into Home Assistant using the SSH addon
3. cd to `/addons`
Expand Down
2 changes: 1 addition & 1 deletion hassio/CONFIG-MOVED.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Config files can now be found at:

WITHIN Visual Code Addon or SSH Addon:

/addons_configs/83fc19e1_insteon-mqtt
/addon_configs/83fc19e1_insteon-mqtt

WITHIN InsteonMQTT Addon:

Expand Down
6 changes: 4 additions & 2 deletions hassio/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ if [ ! -f /config/config.yaml ] && [ -f /homeassistant/insteon-mqtt/config.yaml
mv /homeassistant/insteon-mqtt/* /config/ || \
{ echo "Failed to migrate InsteonMQTT configuration"; exit 1; }
# If user was using default data and log locations, edit them to match the new location
sed -i "s|storage: '\{0,1\}\"\{0,1\}/config/insteon-mqtt/data'\{0,1\}\"\{0,1\}|storage: /config/data|" /config/config.yaml
sed -i "s|storage: ['\"]\?/config/insteon-mqtt/data['\"]\?|storage: /config/data|" /config/config.yaml
sed -i "s|file: /config/insteon-mqtt/insteon_mqtt.log|file: /config/insteon_mqtt.log|" /config/config.yaml
#Scenes are not used by default, but attempt to move if user had them stored in old config
sed -i "s|scenes: ['\"]\?/config/insteon-mqtt/\([^ '\"]*\)['\"]\?|scenes: /config/\1|" /config/config.yaml
/bin/cp /opt/insteon-mqtt/hassio/CONFIG-MOVED.txt /homeassistant/insteon-mqtt/CONFIG-MOVED.txt
sed -i "s/<<MIGRATION_DATE>>/$(date)/g" /homeassistant/insteon-mqtt/CONFIG-MOVED.txt
echo "InsteonMQTT configuration successfully migrated from /config/insteon-mqtt."
Expand All @@ -27,7 +29,7 @@ if [ ! -f /config/config.yaml ]; then
sed -i "s|storage: 'data'|storage: /config/data|" /config/config.yaml
sed -i "s|#file: /var/log/insteon_mqtt.log|file: /config/insteon_mqtt.log|" /config/config.yaml
echo "Please define the required settings in the file /config/config.yaml"
echo "(which can be found at '/addons_configs/83fc19e1_insteon-mqtt/config.yaml'"
echo "(which can be found at '/addon_configs/83fc19e1_insteon-mqtt/config.yaml'"
echo "within VSCode or SSH Addon)."
echo "Then you can start InsteonMQTT."
else
Expand Down
2 changes: 1 addition & 1 deletion insteon_mqtt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
variable throughout the code without causing a cyclic import
"""

__version__ = "1.3.0"
__version__ = "1.3.1"

#===========================================================================
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name = 'insteon-mqtt',
version = '1.3.0',
version = '1.3.1',
description = "Insteon <-> MQTT bridge server",
long_description = readme,
author = "Ted Drain",
Expand Down

0 comments on commit d0098df

Please sign in to comment.