rszimm / sprinklers_pi

Sprinkling System Control Program for the Raspberry Pi
GNU General Public License v2.0
310 stars 100 forks source link

Reset Watering Logfile #87

Closed FrancoisRabe closed 7 years ago

FrancoisRabe commented 7 years ago

I have done a lot of testing on this project and now would like to clean up the log file, so it starts as if new. How can one reset the log file?

nhorvath commented 7 years ago
  1. Stop sprinklerspi from running
  2. Rename /usr/local/etc/sprinklers_pi/db.sql to db.sql.bak
  3. Start sprinkerspi

Alternatively you can use an sqlite editor to empty the zonelog table in that file. That can be done while it is still running.

On Mon, Apr 24, 2017 at 6:54 AM, FrancoisRabe notifications@github.com wrote:

I have done a lot of testing on this project and now would like to clean up the log file, so it starts as if new. How can one reset the log file?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/87, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3CcLXme9V_6T-fh8DozDmDyc3t-rks5rzH9qgaJpZM4NF_-H .

FrancoisRabe commented 7 years ago

Hi

Thanks for the reply, but it says I do not have permissions to rename the file and I cannot set them either?

From: Nick Horvath [mailto:notifications@github.com] Sent: 24 April 2017 15:12 To: rszimm/sprinklers_pi sprinklers_pi@noreply.github.com Cc: FrancoisRabe francois.rabe@outlook.com; Author author@noreply.github.com Subject: Re: [rszimm/sprinklers_pi] Reset Watering Logfile (#87)

  1. Stop sprinklerspi from running
  2. Rename /usr/local/etc/sprinklers_pi/db.sql to db.sql.bak
  3. Start sprinkerspi

Alternatively you can use an sqlite editor to empty the zonelog table in that file. That can be done while it is still running.

On Mon, Apr 24, 2017 at 6:54 AM, FrancoisRabe notifications@github.com wrote:

I have done a lot of testing on this project and now would like to clean up the log file, so it starts as if new. How can one reset the log file?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/87, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3CcLXme9V_6T-fh8DozDmDyc3t-rks5rzH9qgaJpZM4NF_-H .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rszimm/sprinklers_pi/issues/87#issuecomment-296662811, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AaqKO9-uqu1k8RXbx0cDWl_UFoHD6aSZks5rzJ-ggaJpZM4NF_-H.

nhorvath commented 7 years ago

Run with sudo

On Apr 25, 2017 8:33 AM, "FrancoisRabe" notifications@github.com wrote:

Hi

Thanks for the reply, but it says I do not have permissions to rename the file and I cannot set them either?

From: Nick Horvath [mailto:notifications@github.com] Sent: 24 April 2017 15:12 To: rszimm/sprinklers_pi sprinklers_pi@noreply.github.com Cc: FrancoisRabe francois.rabe@outlook.com; Author < author@noreply.github.com> Subject: Re: [rszimm/sprinklers_pi] Reset Watering Logfile (#87)

  1. Stop sprinklerspi from running
  2. Rename /usr/local/etc/sprinklers_pi/db.sql to db.sql.bak
  3. Start sprinkerspi

Alternatively you can use an sqlite editor to empty the zonelog table in that file. That can be done while it is still running.

On Mon, Apr 24, 2017 at 6:54 AM, FrancoisRabe notifications@github.com wrote:

I have done a lot of testing on this project and now would like to clean up the log file, so it starts as if new. How can one reset the log file?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/87, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3CcLXme9V_6T- fh8DozDmDyc3t-rks5rzH9qgaJpZM4NF_-H .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ rszimm/sprinklers_pi/issues/87#issuecomment-296662811, or mute the threadhttps://github.com/notifications/unsubscribe- auth/AaqKO9-uqu1k8RXbx0cDWl_UFoHD6aSZks5rzJ-ggaJpZM4NF_-H.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/87#issuecomment-297015414, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3ITAK41qx45buT9dY0t6q_FWwMswks5rzegFgaJpZM4NF_-H .

FrancoisRabe commented 7 years ago

Great I got it working...now another question...how do I change the Units from Deg F to Deg C? Or Metric Units?

nhorvath commented 7 years ago

Sorry, there is currently no metric support.

On Tue, Apr 25, 2017 at 10:19 AM, FrancoisRabe notifications@github.com wrote:

Great I got it working...now another question...how do I change the Units from Deg F to Deg C? Or Metric Units?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/87#issuecomment-297045166, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3EMvTwydHfjDlUxsUJRrEiBKHhMbks5rzgDqgaJpZM4NF_-H .

alessandro-dallatorre commented 7 years ago

Hi Francois, I patched some files in the past to have the Metric Units shown in the interface. I can attach them this evening when back home. If I'm not mistaken, I mainly changed file web.cpp.

FrancoisRabe commented 7 years ago

Hmmm, OK. Thanks for all the help so far. This is a super project and really works so well. Thanks!!

alessandro-dallatorre commented 7 years ago

There you go, you just need to replace the tag with the following excerpt in the file web/WCheck.htm:

` `

FrancoisRabe commented 7 years ago

Hi there

Many many thanks….

From: alex.tower [mailto:notifications@github.com] Sent: 25 April 2017 18:26 To: rszimm/sprinklers_pi sprinklers_pi@noreply.github.com Cc: FrancoisRabe francois.rabe@outlook.com; Author author@noreply.github.com Subject: Re: [rszimm/sprinklers_pi] Reset Watering Logfile (#87)

There you go, you just need to replace the tag with the following excerpt in the file web/WCheck.htm:

` `

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rszimm/sprinklers_pi/issues/87#issuecomment-297085920, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AaqKO-puGYidPBM7_sCP7b6GX35G5YJXks5rzh6NgaJpZM4NF_-H.

alessandro-dallatorre commented 7 years ago

Glad to have been helpful! I love this project, many thanks to the author!

FrancoisRabe commented 7 years ago

Hi

I have tried the below, but it still shows Deg F. I have attached my file – maybe I did something wrong? Maybe attach your file that works?

Regards

From: alex.tower [mailto:notifications@github.com] Sent: 25 April 2017 18:26 To: rszimm/sprinklers_pi sprinklers_pi@noreply.github.com Cc: FrancoisRabe francois.rabe@outlook.com; Author author@noreply.github.com Subject: Re: [rszimm/sprinklers_pi] Reset Watering Logfile (#87)

There you go, you just need to replace the tag with the following excerpt in the file web/WCheck.htm:

` `

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rszimm/sprinklers_pi/issues/87#issuecomment-297085920, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AaqKO-puGYidPBM7_sCP7b6GX35G5YJXks5rzh6NgaJpZM4NF_-H.

alessandro-dallatorre commented 7 years ago

Hi François,

You might want to double check with the author, but I guess you need to run a make install command in order to have your html file copied to the correct web folder used by the application.

See file https://github.com/rszimm/sprinklers_pi/blob/master/Makefile

`install: all ifneq ($(IUSER),root) $(error You are not ROOT. Rerun with sudo) endif @cp -f $(LIBNAME) /usr/local/sbin mkdir -p /web *-@cp -rf web/ /web/** cp -f sprinklers_init.d.sh /etc/init.d/sprinklers_pi chmod a+x /etc/init.d/sprinklers_pi mkdir -p /usr/local mkdir -p /usr/local/etc mkdir -p /usr/local/etc/sprinklers_pi update-rc.d sprinklers_pi defaults

@echo "done"`

nhorvath commented 7 years ago

You should treat it like an upgrade except skip steps 3 and 4. https://github.com/rszimm/sprinklers_pi/wiki/Upgrading

On Wed, Apr 26, 2017 at 4:18 AM, alex.tower notifications@github.com wrote:

Hi François,

You might want to double check with the author, but I guess you need to run a make install command in order to have your html file copied to the correct web folder used by the application.

See file https://github.com/rszimm/sprinklers_pi/blob/master/Makefile

`install: all ifneq ($(IUSER),root) $(error You are not ROOT. Rerun with sudo) endif @cp https://github.com/cp -f $(LIBNAME) /usr/local/sbin mkdir -p /web *-@cp https://github.com/cp -rf web/ /web/** cp -f sprinklers_init.d.sh /etc/init.d/sprinklers_pi chmod a+x /etc/init.d/sprinklers_pi mkdir -p /usr/local mkdir -p /usr/local/etc mkdir -p /usr/local/etc/sprinklers_pi update-rc.d sprinklers_pi defaults

@echo https://github.com/echo "done"`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/87#issuecomment-297285336, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3DARiGnLxAfNuO590m5hxYGZjO9qks5rzv3mgaJpZM4NF_-H .