Comments (3)
When JSON configuration is published as retain
, all works as expected (wifi-presence
reads configuration from the retain on the MQTT broker, when OpenWrt starts).
So to keep this solution persistent, it is necessary to publish JSON with a retain
parameter every time the MQTT broker is rebooted.
I have MQTT broker and Node-Red server outside the Home Assistant and I can write simple flow using NodeRed for this purpose.
Is this possible to do something similar within the Home Assistant (without the need to install NodeRed and MQTT broker there)?
I am just curious how to keep the solution consistent.
Is there an other approach how to achieve persistence?
from wifi-presence.
Thank you @PetrJakes for the report.
As you've described, the configuration in MQTT must be published with retain
in order for it to persist. I will improve the README to make this more apparent.
It sounds as if your MQTT broker does not persist messages after restarts. Maybe there's a configuration setting to change this?
I use mosquitto MQTT broker and have these two lines in my config:
persistence true
persistence_location /mnt/mosquitto/data/
And since I run mosquitto as a Docker container, I mount the persistence_location to my local host:
docker run \
--rm \
-v /etc/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf \
-v /mnt/mosquitto:/mnt/mosquitto \
eclipse-mosquitto
from wifi-presence.
I have Mosquitto MQTT broker as well.
I have checked mosquitto.conf
and persistence is set to the true
by default, so no further action is required if the JSON configuration is published as retain
.
Thank you for your help.
from wifi-presence.
Related Issues (15)
- daemon.err wifi-presence[6693]: Error: unable to connect to hostapd control socket "/var/run/hostapd/wlan0": ping error: read error from "PING" command: read unixgram /tmp/wp.wlan0->/var/run/hostapd/wlan0: i/o timeout HOT 7
- Support for newer version of hostapd in OpenWrt master HOT 3
- __nanosleep_time64: symbol not found HOT 2
- Ability to publish status for all devices HOT 1
- opkg version outdated HOT 1
- MQTT entity name starts with the device name HOT 2
- Roaming between multiple APs HOT 2
- Conflict with wpad-basic-mbedtls HOT 1
- Support for MQTT over TLS (MQTTS)?
- Needs to be started as network user/group in openwrt HOT 14
- Error in wifi-presence: EventUnrecognized HOT 4
- OpenWrt Boot racecondition HOT 2
- SSID with mixed UTF-8 and ASCII characters cannot be handled correctly HOT 3
- Doesn't work after update to 22.03.0 HOT 2
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 wifi-presence.