HI,
Ive been playing around with the zoning in Hassio, and wanted to create a new zone in my Zone-dir. I take an old one, change it and save in with another name. So far so good, until today, when a file got saved with a db name:

Ive seen these before, mostly in the /config folder, below the actual db. I take it to be a temporary file, waiting for the final state and name? It now gives errors at startup, stating Zoning cant be configured (the file is incorrect, thats for sure), but i cant get rid of it. When i try to move or delete it several error message warn it isn’t possible.
Now how the delete these, and get Zoning back on track?
Also, how to best create new entries in include_dir directories?Edit from within the directory, or create a new one first and then copy to this directory?
Cheers,
Marius
a db-wal file is a temporary file used by SQLite. If your Home Assistant is running, you cannot delete this file.
I don’t see how this file is causing issues with your zoning, are you sure it isn’t a configuration issue?
thanks, i don’t think its a configuration file issue, though that points to 2 _dir directories i setup, for cameras and for zones. In both these database files are created when changing something to that directory. That is, creating a new file. That doesn’t end well, and leave me with the db-wal files i cant delete, and end up erroring on the configuration.
Ive hassio homeassistant stop
at the shh prompt in hope the system would release these files, but it won’t. Previously i was able to move them to an unused directory, but from there i cant delete them either…
Should there be an ssh command to delete these files?
Chers,
Marius
There should not be any db files created in sub directories. You have a configuration problem if it is creating db files in those directories.
ok then i have, cause it it doing so in various directories right now…
driving me absolutely crazy.
can i disable the db ?
I don’t think you can disable it, but why not figure out what the issue is? You have a misconfigured system. Fix it rather than trying to get around the real problem
–edit–
i noticed i had not setup recorder in my config file (thought it to be of no use as of yet) so just for the sake of it edited and added that.
et voila: rebooted and first couple of lines in the log:
2017-11-21 19:16:50 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=17 from 2017-11-21 16:24:02.457156)
2017-11-21 19:16:50 DEBUG (Recorder) [homeassistant.components.recorder] Connected to recorder database
that is exactly what i suspected the files to be, unfinished business. They are all gone now, had quite a few of them in nested _dir folders. And miraculously the filenames have changed into what they were supposed to be: cameras and zones 
Next investigation will be how to best add new files in those _dir folders, and, just as important, how to have those db files write to an attached usb thumb drive and thus prolonging the life of my SD card, safeguarding it from the many and frequent writes of the logs and db files.
Might you have suggestions for that too please?
And: Thanks for grabbing me by the hair.
Cheers,
Marius
sure, i totally agree, and looking for a solution. Already had a thorough look at that documentation, but would not know what causes the errant behavior.
Maybe you can spot the issue in my configuration file. This is my config file, beats me completely:
##########################################################################################
# Base configuration
##########################################################################################
homeassistant:
name: Home
latitude: !secret latitude
longitude: !secret longitude
elevation: !secret elevation
unit_system: metric
time_zone: !secret time_zone
customize: !include customize.yaml
config:
conversation:
discovery:
frontend: !include frontend.yaml
history:
http: !include http.yaml
introduction:
map:
notify:
shopping_list:
sun:
updater:
# include_used_components: true
zeroconf:
panel_iframe:
configurator:
title: Hassio Configurator
icon: mdi:wrench
url: !secret configurator_url
ios:
upnp:
port_mapping: false
logbook:
logger:
# Possible log severities are: critical, fatal, error, warning, warn, info, debug, notset
default: error
logs:
# homeassistant.components.device_tracker: error
homeassistant.components.mqtt: warn
# homeassistant.components.logbook: error
# homeassistant.components.nmap_tracker: error
# homeassistant.helpers.entity: critical
# homeassistant.setup: debug
# homeassistant.helpers.condition: critical
##########################################################################################
# Accounts
##########################################################################################
tts:
- platform: google
language: 'nl'
- platform: microsoft
api_key: !secret bing_speechapi_key
# language: nl-NL
# gender: female
# type: HannaRUS
google:
client_id: !secret google_client_id
client_secret: !secret google_client_secret
track_new_calendar: true
ifttt:
key: !secret ifttt_key
##########################################################################################
# Mqtt & Z-Wave
##########################################################################################
mqtt: !include mqtt.yaml
# mqtt_eventstream: !include mqtt_eventstreams.yaml
# mqtt_statestream: !include mqtt_statestreams.yaml
# zwave:
# config_path: !secret zwave_ip
# debug: true
##########################################################################################
# Include files
##########################################################################################
automation: !include automations.yaml
camera: !include_dir_list cameras
device_tracker: !include device_tracker.yaml
group: !include groups.yaml
# input: !include input.yaml
# input_select: !include input_select.yaml
media_player: !include media_player.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
switch: !include switches.yaml
script: !include scripts.yaml
weblink: !include weblinks.yaml
zone: !include_dir_list zone
you just add .yaml files in there
personally I prefer logging to be sent to an actual database elsewhere on my network.
That would be even better! Have my synology waiting for that.
- do you use the standard sql-lite, or some other db like the MariaDB add-on?
- second, how to point these to an external database.
(btw, finally found the way and made it to quote… :duh. been a useful day)
Marius
I use postresql running in Docker. The MariaDB add-on merely adds a docker container that runs on your Pi just like HASS.IO does.
It’s all on the ‘Recorder’ component page that I linked to.
cool, ill re-recheck.
Many thanks!