Comments (6)
Tutto quello che hai detto e' corretto.
In SmartHome non ho mai usato la pubblicazione retained solo perche' non mi piace "sporcare" il broker MQTT, infatti tutti questi messaggi rimangono nel broker e si pubblicano in automatico ad ogni avvio, anche se il dispositivo non esiste piu' o e' stato programmato in modo diverso. La soluzione sarebbe eliminarli "a mano".
Tengo comunque in considerazione la tua proposta ;)
In Home Assistant ho visto anche io il problema del riavvio.
Puoi aggirare il problema creando un'automazione che all'avvio di Home Assistant pubblica sul topic "ack" il payload "ack". Questo, fa le veci del LWT Online retained in quanto ad ogni avvio di HA chiede e riceve l'ACK dei nodi SmatHome.
Ciao
from smarthome.
Discorso comprensibilissimo quello di non sporcare il broker ed ovviamente ok anche il discorso dell'automazione (che avevo già fatto) allo start di HA e che comunque andrebbe fatta a prescindere così come si fa per altri device configurati via MQTT (come Tasmota e Shelly). Non mi ero accorto che la pubblicazione del topic 'ack' pubblicava anche il LWT...
homeassistant/switch/807d3a3e1d5f_INT0/config {"name":"Interruttore/1","command_topic":"Interruttore/1","payload_on":"on","payload_off":"off","state_topic":"Interruttore/1/ack","state_on":"on","state_off":"off","value_template":"{{value_json.STATO}}","availability_topic":"smarthome-prova-lwt","payload_available":"online","payload_not_available":"offline","unique_id":"807d3a3e1d5f_INT0","device":{"identifiers":["807d3a3e1d5f_INT0"],"name":"Interruttore/1","model":"SmartHome","sw_version":"SmartHome V7.0beta2","manufacturer":"[email protected]"}}
ack {"MAC_address":"807d3a3e1d5f","NODO":"INT","Topic":"Interruttore/1","Topic_ACK":"Interruttore/1/ack","availability_topic":"smarthome-prova-lwt"}
smarthome-prova-lwt online
from smarthome.
Ciao,
anch'io ho lo stesso problema, all'avvio di Home Assistant tutti i dispositivi Smarthome risultano non disponibili.
Mi potresti spiegare meglio questa automazione.
Grazie in anticipo.
from smarthome.
Usa questa automazione...
- alias: 'Announce SmartHome'
trigger:
- platform: homeassistant
event: start
action:
- service: mqtt.pubblish
data:
topic: 'ack'
payload: 'ack'
allo start di homeassistant pubblica un topic 'ack' con payload 'ack' e forza tutti i device smarthome connessi al broker MQTT a pubblicare il proprio stato, incluso il topic LWT
from smarthome.
Usa questa automazione...
- alias: 'Announce SmartHome' trigger: - platform: homeassistant event: start action: - service: mqtt.pubblish data: topic: 'ack' payload: 'ack'
allo start di homeassistant pubblica un topic 'ack' con payload 'ack' e forza tutti i device smarthome connessi al broker MQTT a pubblicare il proprio stato, incluso il topic LWT
Perfetto, il problema nasce dal fatto che riavviando HA , non viene riavviato Mosquito.
Con l'automazione che ti hanno messo aggiri il problema 👍🏻
from smarthome.
ci sono riuscito!!!!!! grazie mille per la vostra disponibilità
from smarthome.
Related Issues (7)
- Restart dopo 24hh HOT 4
- Versione ethernet HOT 1
- controllo veneziane motorizzate HOT 2
- LongClick per Temporizzatori HOT 5
- Codice open source? HOT 2
- Problema con caratteri password WiFi HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smarthome.