switchbot-mqtt

MQTT client controlling SwitchBot button automators & curtain motors, compatible with Home Assistant 🐳

GPL-3.0 License

Downloads
297
Stars
51
Committers
5

Bot releases are hidden (Show)

switchbot-mqtt - fix birth & last will topic Latest Release

Published by fphammerle about 2 years ago

Fixed

  • Publish birth and last will message on expected/documented topic
    homeassistant/switchbot-mqtt/status instead of topic
    homeassistant/switchbot_mqtt/status.
switchbot-mqtt - birth & last will

Published by fphammerle about 2 years ago

Added


Correction: Inadvertently publishing on homeassistant/switchbot_mqtt/status instead of documented homeassistant/switchbot-mqtt/status. Topic will be fixed in next release.

switchbot-mqtt - fix ipv6

Published by fphammerle over 2 years ago

Fixed

switchbot-mqtt - topic prefix

Published by fphammerle over 2 years ago

Added

  • command-line option --mqtt-topic-prefix
switchbot-mqtt - TLS

Published by fphammerle over 2 years ago

Added

  • command-line option --mqtt-enable-tls
  • command-line option --mqtt-disable-tls (enabled by default)

Deprecated

  • invocation with neither --mqtt-enable-tls nor --mqtt-disable-tls
switchbot-mqtt - set curtain position

Published by fphammerle over 2 years ago

Added

  • 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 and v0.12.0

Removed

  • compatibility with python3.6
  • no longer report button automator's battery percentage on deprecated topic homeassistant/cover/switchbot/+/battery-percentage
    (use homeassistant/switch/switchbot/+/battery-percentage instead, see v2.1.0)
switchbot-mqtt - device info request

Published by fphammerle almost 3 years ago

Added

  • MQTT messages on topic homeassistant/switch/switchbot/MAC_ADDRESS/request-device-info
    and homeassistant/cover/switchbot-curtain/MAC_ADDRESS/request-device-info trigger
    update and reporting of device information (battery level, and curtains' position).
    Requires --fetch-device-info.
switchbot-mqtt - fix battery topic

Published by fphammerle almost 3 years ago

Added

  • battery level of button automators will additionally be reported on topic
    homeassistant/switch/switchbot/MAC_ADDRESS/battery-percentage.
    old (misleading) topic kept for downward compatibility.
  • --fetch-device-info can alternatively be enabled by assigning a non-empty value
    to the environment variable FETCH_DEVICE_INFO
switchbot-mqtt - report battery level

Published by fphammerle about 3 years ago

Added

  • command-line option --fetch-device-info enables battery level reports on topics
    homeassistant/cover/{switchbot,switchbot-curtain}/MAC_ADDRESS/battery-percentage
    after every command.
  • option --debug to change log level to DEBUG

Changed

  • changed default log level from DEBUG to INFO
  • shortened log format (revert with --debug)

Removed

  • compatibility with python3.5
switchbot-mqtt - report position

Published by fphammerle about 3 years ago

Added

  • command-line option --fetch-device-info enables reporting of curtain motors'
    position on topic homeassistant/cover/switchbot-curtain/MAC_ADDRESS/position
    after sending stop command.
switchbot-mqtt - device passwords

Published by fphammerle about 3 years ago

Added

  • support for password-protected switchbot devices
    via optional command-line parameter --device-password-file
    (json file mapping mac addresses to the respective password)
switchbot-mqtt - retry

Published by fphammerle over 3 years ago

Added

  • Command-line parameter --retries to alter maximum number of attempts to send a command
    to a SwitchBot device (default unchanged)

Fixed

  • Dockerfile: split pipenv install into two stages to speed up image builds
  • Dockerfile: chmod files copied from host to no longer require o=rX perms on host
  • Dockerfile: add registry to base image specifier for podman build
  • Dockerfile: add --force flag to rm invocation to avoid interactive questions while running podman build
switchbot-mqtt - curtains

Published by fphammerle almost 4 years ago

Added

  • Control SwitchBot Curtain motors via OPEN, CLOSE, and STOP on topic homeassistant/cover/switchbot-curtain/aa:bb:cc:dd:ee:ff/set

Changed

switchbot-mqtt - docker env

Published by fphammerle almost 4 years ago

Added

  • Docker image: support parametrization via environment variables
    (MQTT_HOST, MQTT_PORT, MQTT_USERNAME & MQTT_PASSWORD)
switchbot-mqtt - python3.5 compatibility

Published by fphammerle over 4 years ago

Fixed

  • Compatibility with python3.5:
    • Replaced PEP526-style variable type hint with PEP484-compatible
    • Tests: Fixed AttributeError due to unavailable MagicMock.assert_called_once
switchbot-mqtt - mqtt password file

Published by fphammerle over 4 years ago

Added

  • Added command line parameter --mqtt-password-file

Fixed

  • Docker build: fix pipenv failing to create cache
switchbot-mqtt - publish state

Published by fphammerle over 4 years ago

Added

  • Publish new state to homeassistant/switch/switchbot/MAC_ADDRESS/state on success
switchbot-mqtt - authentication

Published by fphammerle over 4 years ago

Added

  • Added command line parameters --mqtt-username and --mqtt-password

Fixed

  • Fixed executable name in command line help
  • Docker: no longer require build arg SWITCHBOT_MQTT_VERSION
    (fixes auto build on hub.docker.com)
switchbot-mqtt - first draft

Published by fphammerle over 4 years ago