Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

...

Gliffy Diagram
2
nameArkitektur
pagePin3

MQTT

Home Assistant does not have a builtin MQTT Broker, so I have a docker for it: Adding Mosquitto (MQTT) to my Home Automation

Java Application as Bridge

...

Kodeblok
root@robin:~/production/zensehome/zensemqtt# java -Dfile.encoding=UTF-8 -classpath /home/bnp/production/zensehome:/home/bnp/production/zensehome/zensemqtt/mqtt-client-0.4.0.jar zensemqtt.ZenseMQTT
Jan 09, 2019 8:14:01 PM zensemqtt.Log logging
INFO: Starting ZenseHome MQTT listener

Setup a light source

My configuration.yaml has these parts:

Kodeblok
mqtt:
  broker: 10.0.0.150

light: !include light.yaml

My lights.yaml looks lige like this:

Kodeblok
- platform: mqtt
    name: "Kitchen Light"
    state_topic: "zense/execute/18324"
    command_topic: "zense/execute/18324"
    payload_on: "ON"
    payload_off: "OFF"

  - platform: mqtt
    name: "Office Light"
    state_topic: "zense/execute/10604"
    command_topic: "zense/execute/10604"
    payload_on: "ON"
    payload_off: "OFF"

  - platform: mqtt
    name: "Bedroom Light"
    state_topic: "zense/execute/58739"
    command_topic: "zense/execute/58739"
    payload_on: "ON"
    payload_off: "OFF"

....
....

With the Topics according to https://github.com/jobu279/zensehome. The Id can be found in the Zensehome Windows Application:

Tip

Adding as "Percentage value" instead of ON/OFF, gives a slider for the light

After the Save operation, the Channel has a unique id:

Image Removed

This is is used in Sitemaps and Item files .

Visible and testing in Paper UI - Controls

You should be able to see the Channels in Paper UI and test them:


After restarting Home Assistent, the lights will be entries:


Image AddedImage Removed

Installing as a service

...