Supla integracja z Home Asistants

User avatar
pzygmunt
Posts: 19102
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków

Post

Ja nie bardzo wiem jak Ci pomóc jeśli nie piszesz na czym dokładnie utknąłeś.
User avatar
klew
Posts: 9413
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

kisupla wrote: Thu May 26, 2022 11:17 am Po długich walkach supla wygrała i niestety nie dała się prawidłowo podłączyć pod HA. Zostaje się dalej męczyć z kilkoma aplikacjami do sterowania, no chyba że @klew jako jasnowidz czeka do końca i napisze rozwiązanie ;)
Moja kryształowa kula jest akurat w naprawie :P
Kiedy będzie Supla Offline Party / SOP#2025 ?
User avatar
makrz
Posts: 396
Joined: Tue Nov 27, 2018 1:43 pm
Location: Opole

Post

Witam
Próbuję połączyć swoją instalację lokalną supli z homeassistant i nie daję rady.
Supla jest pod 192.168.0.10 a homeassistant z mosquitto 192.168.0.20
Zrzut ekranu 2022-09-05 112326.jpg
plik .env

Code: Select all

# MQTT Broker settings (you have to run the broker yourself)
MQTT_BROKER_ENABLED=true
MQTT_BROKER_HOST=192.168.0.20
MQTT_BROKER_PORT=1883
MQTT_BROKER_TLS=false
MQTT_BROKER_USERNAME=janek
MQTT_BROKER_PASSWORD=kukuryku
MQTT_BROKER_CLIENT_ID=supla
plik bridge.conf

Code: Select all

connection bridge-kdjshdj4f7

address 192.168.0.20:1883
topic supla/# in
topic homeassistant/# in
topic supla/+/devices/+/channels/+/execute_action out
topic supla/+/devices/+/channels/+/set/+ out
remote_username janek
remote_password kukuryku
bridge_capath /etc/ssl/certs
logi z mosquitto

Code: Select all

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[11:29:01] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[11:29:03] INFO: Starting NGINX for authentication handling...
[11:29:03] INFO: Starting mosquitto MQTT broker...
1662370143: Loading config file /share/mosquitto/bridge.conf
2022-09-05 11:29:03: Warning: Mosquitto should not be run as root/administrator.
[11:29:06] INFO: Successfully send discovery information to Home Assistant.
[11:29:07] INFO: Successfully send service information to the Supervisor.
2022-09-05 11:29:03: mosquitto version 2.0.11 starting
2022-09-05 11:29:03: Config loaded from /etc/mosquitto/mosquitto.conf.
2022-09-05 11:29:03: Loading plugin: /usr/share/mosquitto/go-auth.so
2022-09-05 11:29:03:  ├── Username/password checking enabled.
2022-09-05 11:29:03:  ├── TLS-PSK checking enabled.
2022-09-05 11:29:03:  └── Extended authentication not enabled.
2022-09-05 11:29:03: Opening ipv4 listen socket on port 1883.
2022-09-05 11:29:03: Opening ipv6 listen socket on port 1883.
2022-09-05 11:29:03: Opening websockets listen socket on port 1884.
2022-09-05 11:29:03: Connecting bridge (step 1) bridge-kdi34jd9r3 (192.168.0.20:1883)
2022-09-05 11:29:03: mosquitto version 2.0.11 running
2022-09-05 11:29:04: Connecting bridge (step 2) bridge-kdi34jd9r3 (192.168.0.20:1883)
2022-09-05 11:29:04: New connection from 172.30.32.1:43226 on port 1883.
2022-09-05 11:29:04: Client <unknown> disconnected due to protocol error.
2022-09-05 11:29:04: Client local.core-mosquitto.bridge-kdi34jd9r3 disconnected: Protocol error.
2022-09-05 11:29:04: New connection from 127.0.0.1:55250 on port 1883.
2022-09-05 11:29:04: Client <unknown> closed its connection.
2022-09-05 11:29:06: New connection from 192.168.0.10:45230 on port 1883.
2022-09-05 11:29:06: New connection from 192.168.0.10:45228 on port 1883.
2022-09-05 11:29:06: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:06: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:07: New connection from 192.168.0.10:45234 on port 1883.
2022-09-05 11:29:07: New connection from 172.30.32.1:57765 on port 1883.
2022-09-05 11:29:07: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:07: New client connected from 172.30.32.1:57765 as 2SRZHFcfbE89WYOyMIaL2x (p2, c1, k60, u'homeassistant').
2022-09-05 11:29:10: Connecting bridge (step 1) bridge-kdi34jd9r3 (192.168.0.20:1883)
2022-09-05 11:29:10: Connecting bridge (step 2) bridge-kdi34jd9r3 (192.168.0.20:1883)
2022-09-05 11:29:10: New connection from 172.30.32.1:43228 on port 1883.
2022-09-05 11:29:10: Client <unknown> disconnected due to protocol error.
2022-09-05 11:29:10: Client local.core-mosquitto.bridge-kdi34jd9r3 disconnected: Protocol error.
2022-09-05 11:29:12: New connection from 192.168.0.10:45252 on port 1883.
2022-09-05 11:29:12: New connection from 192.168.0.10:45250 on port 1883.
2022-09-05 11:29:12: New connection from 192.168.0.10:45254 on port 1883.
2022-09-05 11:29:12: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:12: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:12: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:16: Connecting bridge (step 1) bridge-kdi34jd9r3 (192.168.0.20:1883)
2022-09-05 11:29:16: Connecting bridge (step 2) bridge-kdi34jd9r3 (192.168.0.20:1883)
2022-09-05 11:29:16: New connection from 172.30.32.1:43230 on port 1883.
2022-09-05 11:29:16: Client <unknown> disconnected due to protocol error.
2022-09-05 11:29:16: Client local.core-mosquitto.bridge-kdi34jd9r3 disconnected: Protocol error.
2022-09-05 11:29:17: New connection from 192.168.0.10:45268 on port 1883.
2022-09-05 11:29:17: New connection from 192.168.0.10:45270 on port 1883.
2022-09-05 11:29:17: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:17: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:17: New connection from 192.168.0.10:45272 on port 1883.
2022-09-05 11:29:17: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:22: New connection from 192.168.0.10:45288 on port 1883.
2022-09-05 11:29:22: New connection from 192.168.0.10:45290 on port 1883.
2022-09-05 11:29:22: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:22: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:22: New connection from 192.168.0.10:45292 on port 1883.
2022-09-05 11:29:22: Client <unknown> disconnected, not authorised.
2022-09-05 11:29:27: Connecting bridge (step 1) bridge-kdi34jd9r3 (192.168.0.20:1883)
2022-09-05 11:29:27: Connecting bridge (step 2) bridge-kdi34jd9r3 (192.168.0.20:1883)
Co jest nie tak? Proszę o pomoc
You do not have the required permissions to view the files attached to this post.
User avatar
mario026
Posts: 86
Joined: Mon Jan 11, 2021 9:27 pm
Location: Ostrów wlkp.

Post

MQTT_BROKER_PASSWORD= hasło z MQTT to co masz w pliku konfiguracyjnym w HA
MQTT_BROKER_USERNAME= z MQTT to co masz w pliku konfiguracyjnym w HA
Wszyscy mają prawo do szczęścia, ale nie wszyscy mają szczęście do prawa :D
User avatar
makrz
Posts: 396
Joined: Tue Nov 27, 2018 1:43 pm
Location: Opole

Post

mario026 wrote: Mon Sep 05, 2022 9:39 am MQTT_BROKER_PASSWORD= hasło z MQTT to co masz w pliku konfiguracyjnym w HA
MQTT_BROKER_USERNAME= z MQTT to co masz w pliku konfiguracyjnym w HA
Dzięki wielkie, działa choć nie wszystko.

Mam bramkę na RPI Zero do tego 8 czujników temperatury i wilgotności. Do HA importuje tylko jeden. Jakieś sugestie?
Pozdrawiam
User avatar
mario026
Posts: 86
Joined: Mon Jan 11, 2021 9:27 pm
Location: Ostrów wlkp.

Post

A masz włączone dodawanie nowych encji w MQTT?
Wszyscy mają prawo do szczęścia, ale nie wszyscy mają szczęście do prawa :D
User avatar
makrz
Posts: 396
Joined: Tue Nov 27, 2018 1:43 pm
Location: Opole

Post

mario026 wrote: Mon Sep 05, 2022 11:02 am A masz włączone dodawanie nowych encji w MQTT?
tak, włączone automatyczne dodawanie.
User avatar
mario026
Posts: 86
Joined: Mon Jan 11, 2021 9:27 pm
Location: Ostrów wlkp.

Post

Dobrze rozumiem, te czujniki masz w supli? I w HM widzisz tylko jeden?
Wszyscy mają prawo do szczęścia, ale nie wszyscy mają szczęście do prawa :D
User avatar
makrz
Posts: 396
Joined: Tue Nov 27, 2018 1:43 pm
Location: Opole

Post

mario026 wrote: Mon Sep 05, 2022 11:43 am Dobrze rozumiem, te czujniki masz w supli? I w HM widzisz tylko jeden?
dokładnie tak
User avatar
mario026
Posts: 86
Joined: Mon Jan 11, 2021 9:27 pm
Location: Ostrów wlkp.

Post

Zrób restart supli i HM
Wszyscy mają prawo do szczęścia, ale nie wszyscy mają szczęście do prawa :D

Return to “MQTT”