Comments (11)
Yes, will do this
from zigbee2mqtt.
I'm wondering why there should be a configuration option for the dbPath
. Can't this be done by mounting the /app/data
volume to the persistent hassio folder? (the same as where the zigbee2mqtt configuration.yaml
will be)
from zigbee2mqtt.
@Koenkk i think it should be the users choice to point to the DB file.
I vote up for the dbpath inside the configuration file.
from zigbee2mqtt.
@Koenkk The current approach we're taking in the add-on doesn't mount configuration.yaml
into a persistent Hass.io volume, but instead writes the options (from the Hass.io UI) to configuration.yaml
in-place within the container on startup. Hass.io allows the add-on to specify certain volumes (such as /share
) that can be mounted within an add-on container, so if we could specify the DB location, we could save to one of these persistent volumes.
The problem with the current approach is that the location is hard-coded, and essentially "within" a bunch of things that we would not want to persist between builds/versions. In addition to making it possible to persist the data, breaking out the dbPath
as a config option would make things less rigid in this sense.
from zigbee2mqtt.
Also the log file should remain in a separate directory.
I think /data is overly used for static stuff
from zigbee2mqtt.
@danielwelch this sounds like a good approach, however how would you handle the devices being automatically added to configuration.yaml
? In order for a device to work it has to be there.
from zigbee2mqtt.
Sounds like configuration.yaml
needs to be persisted too for this to work properly since device data is persisted there (not just the DB), right?
If that's the case, I think the easiest thing would be to allow the user to specify a path for this file as well via the Hass.io add-on, just like we're requesting for the db. This would let us store configuration.yaml
in /share
, and the user could edit it directly.
I understand these are big requests, sorry!
from zigbee2mqtt.
Yes that is the case, wouldn't is be easier to symlink /app/data to /share?
from zigbee2mqtt.
I am far from a Docker expert, but my understanding is that symlinking into and out of docker containers leads to problems and is generally not a good idea.
Since the major motivation for this change is the add-on, I'd be happy to work on a solution and make a PR. I'll focus on making this backward-compatible for current users.
from zigbee2mqtt.
Both dbPath
and panId
are configurable now, can this be closed?
from zigbee2mqtt.
I'd say so, thanks!
from zigbee2mqtt.
Related Issues (20)
- Zemismart ZM25RX-08/30 doesn't control motor - reports state only
- Device quirk handling HOT 3
- [Wrong device]: Ledvance Smart+ Classic Dimmable A60 9W E27 / 4058075208377 / AC33897 / A60 DIM Z3 wrongly identified as a Ledvance SMART+ candle E14 dimmable white / 405807520842
- Change parameters for reporting will fail on Xiaomi's GZCGQ01LM HOT 5
- My Zigbee network stopped working HOT 1
- LEDVANCE 4058075729247 SMART+ Filament Globe125 52 E27 Amber dimmable OTA update failed with size mismatch HOT 2
- Tuya ZY-M100-24GV2 _TZE204_7gclukjs Incorrect Sensitivity Values and Errors After Update
- Self-test not working on smoke detector Aqara JTYJ-GD-01LM/BW HOT 1
- TypeError: object of type 'float' has no len() after upgrade from 1.39.0-1 to 1.40.0-1 HOT 1
- [New device support]: WKD-M8 Pro
- Enocean PTM 215Z Greenpower not working after upgrade 1.36.1=> 1.37 or later HOT 49
- No units defined for TS0207 / RB-SRAIN01 Tuya rain sensor leading to wrong(?) presentation in Home Assistant HOT 4
- FW upgrade breaks Z2M (SONOFF DONGLE P) HOT 5
- Routers based on Texas Instrument eg CC2652 Constantly Going Offline HOT 3
- [Wrong device]: Elivco LSPA9 wrongly detected as Tuya BSD29_1
- "Last Seen" is broken in several ways
- EventBus error 'Publish/mqttMessage': Cannot read properties of undefined (reading 'some') HOT 5
- Awox bulbs getting constantly disconnected after the Sonoff Dongle P update to 20240710 + Z2M update to 1.40 HOT 3
- IKEA lamps turn off always with default transition in Z2M 1.40.0 HOT 14
- [New device support]: 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 zigbee2mqtt.