Domoticz on openwrt: setup gets deleted after restarts Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
szakaria
Posts: 6
Joined: Tuesday 18 June 2019 0:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Domoticz on openwrt: setup gets deleted after restarts

Post by szakaria »

Hello,
I am a newbie. I installed domoticz on openWRT (in a TP-Link C7 V5 wifi router) using the command : opkg install domoticz. Any inserted setup (using the GUI) gets deleted after router restart. Where shall I dig? Thank you very much.
Regards
Zak
szakaria
Posts: 6
Joined: Tuesday 18 June 2019 0:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by szakaria »

I finally solved this issue as follows:
1- I created a RAM disk as /var/log
2- I created the following links in /tmp/lib/domoticz/ :
domoticz.db-wal -> /tmp/log/domoticz.db-wal
domoticz.db-shm -> /tmp/log/domoticz.db-shm

By doing this, my statistics data are no lost after the router restart.

3- after each configuration, I manually backup domoticz.db file.
4- added a script that executes at boot and restores the backed-up domoticz.db file to /tmp/lib/domoticz/domoticz.db
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by poudenes »

Is there any reason why you want run Domoticz on a Router?
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
szakaria
Posts: 6
Joined: Tuesday 18 June 2019 0:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by szakaria »

The reasons:
1) I don't have a raspi where I can install domoticz.
2) I already have the wifi router at home with openWRT and running few services.
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by emme »

what hardware the openwrt is running on?

Domoticz uses a lot of resources.... it could be quite a bad idea to do so....
The most dangerous phrase in any language is:
"We always done this way"
szakaria
Posts: 6
Joined: Tuesday 18 June 2019 0:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by szakaria »

The hardware is: TP-Link C7 V5 wifi router.
You are right for the resources usage.
I have the following services running: nginx (to host my web page), ddns (to make my router reachable from the internet with a fixed hostname), dhcp server, openvpn server, and domoticz.
Untill now, there is no issue related to resources utilization. Let's see what may happen when the load on the nginx and domoticz increases.
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by emme »

why don't you evaluate a Raspberry or a NUC?
low prices (35~60€) and great effort and reliability!
The most dangerous phrase in any language is:
"We always done this way"
szakaria
Posts: 6
Joined: Tuesday 18 June 2019 0:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by szakaria »

sure, Raspi is worth a try.
RRRomzes
Posts: 1
Joined: Monday 16 December 2019 18:32
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by RRRomzes »

Today I installed Domotiсz on an OpenWRT Router and ran into the same problem.
The folder /var is overwritten after each reboot.
Therefore, I edit the path in the file /etc/config/domotics
from /var/lib/domoticz/ to any other folder outside /var and /tmp.
For example /home/domoticz and copy the contents of the folder there.
spot320
Posts: 4
Joined: Sunday 23 May 2021 5:55
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by spot320 »

Hello, I configured domoticz on the router, everything works fine, but when I enter my location coordinates, the present time of sunrise and sunset does not show correctly as well. what could be the problem?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by waaren »

spot320 wrote: Saturday 29 May 2021 7:07 what could be the problem?
Switched lat /lon ?

What did you set for lat / lon and what are the sunrise / sunset times (and where do you see them)?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
spot320
Posts: 4
Joined: Sunday 23 May 2021 5:55
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by spot320 »

the actual coordinates of my city latitude 42.488304 longitude 132.524088 sunrise 05:33 sunset 20:39. In home automation, the coordinates are as written above, but sunrise and sunset 19:36, sunset 10:40. what could be the problem?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by waaren »

spot320 wrote: Monday 31 May 2021 7:39 the actual coordinates of my city latitude 42.488304 longitude 132.524088 sunrise 05:33 sunset 20:39. In home automation, the coordinates are as written above, but sunrise and sunset 19:36, sunset 10:40. what could be the problem?
One is dispayed as UTC and the other as local time.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
spot320
Posts: 4
Joined: Sunday 23 May 2021 5:55
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by spot320 »

do not understand what you mean? latitude and longitude are correct but sunrise and sunset are not in local time.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by waltervl »

To what time zone is your Openwrt system set?
As it looks like it is in a different time zone as your location. They should be the same.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
spot320
Posts: 4
Joined: Sunday 23 May 2021 5:55
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz on openwrt: setup gets deleted after restarts

Post by spot320 »

thanks you were right
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests