GithubHelp home page GithubHelp logo

tediore / audioflow2mqtt-addon Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 66 KB

Audioflow to MQTT Gateway (Home Assistant add-on version)

License: GNU General Public License v3.0

Dockerfile 0.87% Python 99.13%

audioflow2mqtt-addon's Introduction

Audioflow to MQTT Gateway

This is the Home Assistant add-on version of audioflow2mqtt. audioflow2mqtt enables local control of your Audioflow speaker switch(es) via MQTT. It supports Home Assistant MQTT discovery for easy integration.


Adding to Home Assistant

  1. Go to the add-on store in Home Assistant.
  2. Click the three dots in the upper right.
  3. Click Repositories.
  4. Paste in https://github.com/Tediore/audioflow2mqtt-addon and click ADD.
  5. Click CLOSE and refresh the page; the add-on should now be visible.

Configuration

Variable Default Description
MQTT host core-mosquitto IP address or hostname of the MQTT broker to connect to.
MQTT port 1883 The port the MQTT broker is bound to.
MQTT username None The user to send to the MQTT broker.
MQTT password None The password to send to the MQTT broker.
MQTT base topic audioflow2mqtt The topic prefix to use for all payloads.
Devices None IP address(es) or hostname(s) of your Audioflow device(s).
Log level info Minimum log level.

Home Assistant

audioflow2mqtt supports Home Assistant MQTT discovery which creates a Device for the Audioflow switch with the following:

  • Switch entities for each zone
  • Button entities to turn all zones on/off
  • Sensors for SSID, RSSI (signal strength), and Wi-Fi channel

Home Assistant Device screenshot


MQTT topic structure and examples

The command topic syntax is BASE_TOPIC/serial_number/command/zone_number where BASE_TOPIC is the base topic you define, serial_number is the device serial number (found on the sticker on the bottom of the device), command is one of the below commands, and zone_number is the zone you want to control (zone A on the switch is zone number 1, zone B is zone number 2, and so on).

Valid commands are set_zone_state and set_zone_enable. The examples below assume the base topic is the default (audioflow2mqtt) and the serial number is 0123456789.

Turn zone B (zone number 2) on or off, or toggle between states

Topic: audioflow2mqtt/0123456789/set_zone_state/2

Valid payloads: on, off, toggle

Turn all zones on or off

Topic: audioflow2mqtt/0123456789/set_zone_state (note the lack of a zone number at the end of the topic)

Valid payloads: on, off

Enable or disable zone A (zone number 1) This might not really be something you would need, but I figured I'd add it anyway

Topic: audioflow2mqtt/0123456789/set_zone_enable/1

Valid payloads: 1 for enabled, 0 for disabled


When the zone state or enabled/disabled status is changed, audioflow2mqtt publishes the result to the following topics:

Zone state: audioflow2mqtt/0123456789/zone_state/ZONE

Zone enabled/disabled: audioflow2mqtt/0123456789/zone_enabled/ZONE


Network info is published to the following topics:

SSID: audioflow2mqtt/0123456789/network_info/ssid

Wi-fi channel: audioflow2mqtt/0123456789/network_info/channel

RSSI: audioflow2mqtt/0123456789/network_info/rssi


Buy Me A Coffee

audioflow2mqtt-addon's People

Contributors

tediore avatar

Stargazers

 avatar

Watchers

 avatar

audioflow2mqtt-addon's Issues

No device discovered

Firstly thanks for putting this together.

I've installed the hacs add on and configured it with required device ip and mqtt user.

Logs show a successful startup, and I can see my zone switches in the entities list. However I'm not finding a device entry under mqtt integration.

Any ideas on how to debug?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.