Page 1 of 1

Domoticz Offline after sending request over python

Posted: Wednesday 29 June 2016 9:42
by zefranc
Hello guys

Yesterday I was trying to send a command over a python request like this :
domoticzrequest("http://" + domoticzserver + "/json.htm?type=command&param=udevice&idx=" + sensor_idx + "&nvalue=0&svalue="+ sensor_idx +";" + sensor_idx + "")

Something went wrong and after that my domoticz is always showing Offline.
I restarted the service and nothing.
When I check the status it shows as not started.
I upgraded domotics... still nothing

When I run ./domoticz iit shows me a Segmentation Fault
2016-06-29 07:40:08.711 EventSystem: reset all events...
2016-06-29 07:40:08.718 EventSystem: reset all device statuses...
2016-06-29 07:40:08.720 Wunderground: Worker started...
2016-06-29 07:40:08.721 PiFace: Worker started...
2016-06-29 07:40:08.733 EventSystem: Started
Segmentation fault


If I run as sudo ./domoticz it doesn't send any segmentation fault, but it stays in Offline.

Can anyone help me bring online Domoticz ?

Re: Domoticz Offline after sending request over python

Posted: Wednesday 29 June 2016 11:22
by jannl
I had some start problems with Domoticz a few weeks ago. i did an updaterelease (I run the stable) in the Domoticz dir, that solved it for me.

Re: Domoticz Offline after sending request over python

Posted: Wednesday 29 June 2016 13:35
by zefranc
I did also upgraded the release and nothing.

Today I copied a backup db from the backup folder and it is now showing as online... but I lost all the previous configurations.

Anyone knows what is the structure of the backup folder in order to retrieve a backup from 3 days ago ?

Thanks

Re: Domoticz Offline after sending request over python

Posted: Wednesday 29 June 2016 13:55
by jannl
I copy the backup every night to my NAS automatically. Script is in the wiki.

No answer to your question unfortunately

Re: Domoticz Offline after sending request over python

Posted: Wednesday 29 June 2016 19:50
by zefranc
great !!! I manage to retrieve the backup...

did an "ls -al" and it showed me when the files were backed up :)



-rw-r----- 1 root root 425984 Jun 10 00:00 backup-day-10.db
-rw-r----- 1 root root 430080 Jun 11 00:00 backup-day-11.db
-rw-r----- 1 root root 430080 Jun 12 00:00 backup-day-12.db
-rw-r----- 1 root root 429056 Jun 13 00:00 backup-day-13.db
-rw-r----- 1 root root 434176 Jun 14 00:00 backup-day-14.db
-rw-r----- 1 root root 432128 Jun 15 00:00 backup-day-15.db
-rw-r----- 1 root root 421888 Jun 16 00:00 backup-day-16.db
-rw-r----- 1 root root 421888 Jun 17 00:00 backup-day-17.db
-rw-r----- 1 root root 422912 Jun 18 00:00 backup-day-18.db
-rw-r----- 1 root root 411648 Jun 19 00:00 backup-day-19.db
-rw-r----- 1 root root 428032 Jun 1 00:00 backup-day-1.db
-rw-r----- 1 root root 400384 Jun 20 00:00 backup-day-20.db
-rw-r----- 1 root root 395264 Jun 21 00:00 backup-day-21.db
-rw-r----- 1 root root 395264 Jun 22 00:00 backup-day-22.db
-rw-r----- 1 root root 409600 Jun 23 00:00 backup-day-23.db
-rw-r----- 1 root root 420864 Jun 24 00:00 backup-day-24.db
-rw-r----- 1 root root 424960 Jun 25 00:00 backup-day-25.db
-rw-r----- 1 root root 411648 Jun 26 00:00 backup-day-26.db
-rw-r----- 1 root root 399360 Jun 27 00:00 backup-day-27.db
-rw-r----- 1 root root 397312 Jun 28 00:00 backup-day-28.db
-rw-r----- 1 root root 430080 May 29 00:00 backup-day-29.db
-rw-r----- 1 root root 409600 Jun 2 00:00 backup-day-2.db
-rw-r----- 1 root root 431104 May 30 00:00 backup-day-30.db
-rw-r----- 1 root root 432128 May 31 00:00 backup-day-31.db
-rw-r----- 1 root root 409600 Jun 3 00:00 backup-day-3.db
-rw-r----- 1 root root 434176 Jun 4 00:00 backup-day-4.db
-rw-r----- 1 root root 431104 Jun 5 00:00 backup-day-5.db
-rw-r----- 1 root root 433152 Jun 6 00:00 backup-day-6.db
-rw-r----- 1 root root 431104 Jun 7 00:00 backup-day-7.db
-rw-r----- 1 root root 408576 Jun 8 00:00 backup-day-8.db
-rw-r----- 1 root root 406528 Jun 9 00:00 backup-day-9.db


then I just replaced domoticz.db per one of the files I knew that should be OK :D

Hope this will help other users.