Page 1 of 1

Domoticz on openwrt: setup gets deleted after restarts

Posted: Tuesday 18 June 2019 3:13
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

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Friday 21 June 2019 2:55
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

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Friday 21 June 2019 8:59
by poudenes
Is there any reason why you want run Domoticz on a Router?

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Friday 21 June 2019 10:46
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.

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Friday 21 June 2019 11:02
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....

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Friday 21 June 2019 11:25
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.

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Friday 21 June 2019 11:58
by emme
why don't you evaluate a Raspberry or a NUC?
low prices (35~60€) and great effort and reliability!

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Friday 21 June 2019 13:07
by szakaria
sure, Raspi is worth a try.

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Monday 16 December 2019 18:45
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.

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Saturday 29 May 2021 7:07
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?

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Sunday 30 May 2021 16:32
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)?

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Monday 31 May 2021 7:39
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?

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Monday 31 May 2021 10:04
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.

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Monday 31 May 2021 14:50
by spot320
do not understand what you mean? latitude and longitude are correct but sunrise and sunset are not in local time.

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Monday 31 May 2021 21:48
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.

Re: Domoticz on openwrt: setup gets deleted after restarts

Posted: Tuesday 01 June 2021 14:57
by spot320
thanks you were right