All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- declare compatibility with
python3.11
- TLS now enabled by default (disable via
--mqtt-disable-tls
) - require
PySwitchbot>=0.14.0,<0.41
instead ofPySwitchbot>=0.10.0,<0.13
- switchbot-mqtt now requires access to the D-Bus' system socket
/var/run/dbus/system_bus_socket
asbleak
controls bluetooth via BlueZ over D-Bus. access to network namespace containing bluetooth interface is thus no longer required. --fetch-device-info
no longer requiresCAP_NET_ADMIN
(bluepy-helper replaced with bleak)- replaced paho-mqtt with its async wrapper aiomqtt
- container image: upgraded alpine base image from v3.13.1 to v3.18.4
- command-line option
--mqtt-enable-tls
(TLS now enabled by default) - compatibility with
python3.7
- compatibility with
python3.8
(pySwitchbot v0.17.2 added constraintbleak-retry-connector>=1.1.1
requiringpython>=3.9
)
3.3.1 - 2022-08-31
- Publish birth and last will message on expected/documented topic
homeassistant/switchbot-mqtt/status
instead of topichomeassistant/switchbot_mqtt/status
.
3.3.0 - 2022-08-30
- Birth ("online") and last will ("offline") message on topic
homeassistant/switchbot-mqtt/status
(@phbasler, #105)
3.2.1 - 2022-07-09
ValueError: too many values to unpack
when connecting to MQTT broker via IPv6 (#42)
3.2.0 - 2022-04-18
- command-line option
--mqtt-topic-prefix
3.1.0 - 2022-04-02
- command-line option
--mqtt-enable-tls
- command-line option
--mqtt-disable-tls
(enabled by default)
- invocation without
--mqtt-enable-tls
and--mqtt-disable-tls
3.0.0 - 2022-02-05
- MQTT messages on topic
homeassistant/cover/switchbot-curtain/MAC_ADDRESS/position/set-percent
trigger command to set curtain motors' position (payload: decimal integer in range[0, 100]
) - support
PySwitchbot
v0.11.0
andv0.12.0
- compatibility with
python3.6
- no longer report button automator's battery percentage on deprecated topic
homeassistant/cover/switchbot/+/battery-percentage
(usehomeassistant/switch/switchbot/+/battery-percentage
instead, seev2.1.0
)
2.2.0 - 2021-10-23
- MQTT messages on topic
homeassistant/switch/switchbot/MAC_ADDRESS/request-device-info
andhomeassistant/cover/switchbot-curtain/MAC_ADDRESS/request-device-info
trigger update and reporting of device information (battery level, and curtains' position). Requires--fetch-device-info
.
2.1.0 - 2021-10-19
--fetch-device-info
can alternatively be enabled by assigning a non-empty value to the environment variableFETCH_DEVICE_INFO
- battery level of button automators will additionally be reported on topic
homeassistant/switch/switchbot/MAC_ADDRESS/battery-percentage
(old topic kept for downward compatibility)
2.0.0 - 2021-10-16
- command-line option
--fetch-device-info
enables battery level reports on topicshomeassistant/cover/{switchbot,switchbot-curtain}/MAC_ADDRESS/battery-percentage
after every command. - option
--debug
to change log level toDEBUG
- changed default log level from
DEBUG
toINFO
- shortened log format (revert with
--debug
)
- compatibility with
python3.5
1.1.0 - 2021-10-06
- command-line option
--fetch-device-info
enables reporting of curtain motors' position on topichomeassistant/cover/switchbot-curtain/MAC_ADDRESS/position
after sending stop command.
1.0.0 - 2021-07-25
- support for password-protected switchbot devices
via optional command-line parameter
--device-password-file
(json file mapping mac addresses to the respective password)
0.7.0 - 2021-07-09
- command-line parameter
--retries
to alter maximum number of attempts to send a command to a SwitchBot device (default unchanged)
- dockerfile: split
pipenv install
into two stages to speed up image builds - dockerfile:
chmod
files copied from host to no longer requireo=rX
perms on host - dockerfile: add registry to base image specifier for
podman build
- dockerfile: add
--force
flag torm
invocation to avoid interactive questions while runningpodman build
0.6.0 - 2020-12-19
- Control SwitchBot Curtain motors
via
OPEN
,CLOSE
, andSTOP
on topichomeassistant/cover/switchbot-curtain/aa:bb:cc:dd:ee:ff/set
- Docker image:
- Upgrade
paho-mqtt
to no longer suppress exceptions occuring in mqtt callbacks ( https://github.com/eclipse/paho.mqtt.python/blob/v1.5.1/ChangeLog.txt#L4 ) - Build stage: revert user after applying
chown
workaround for inter-stage copy
- Upgrade
- Log format: added name of logger between level and message
0.5.0 - 2020-11-22
- Docker image: support parametrization via environment variables
(
MQTT_HOST
,MQTT_PORT
,MQTT_USERNAME
&MQTT_PASSWORD
)
0.4.1 - 2020-06-18
- Compatibility with python3.5:
0.4.0 - 2020-06-14
- Added command line parameter
--mqtt-password-file
- Docker build: fix
pipenv
failing to create cache
0.3.0 - 2020-05-08
- Publish new state to
homeassistant/switch/switchbot/MAC_ADDRESS/state
on success
0.2.0 - 2020-05-08
- Added command line parameters
--mqtt-username
and--mqtt-password
- Fixed executable name in command line help
- Docker: no longer require build arg
SWITCHBOT_MQTT_VERSION
(fixes auto build on hub.docker.com)
0.1.0 - 2020-05-08
- Subscribe to
homeassistant/switch/switchbot/+/set
. HandleON
andOFF
messages.