New value item logger implementation!

Functionality and usage of the OpenNethome Server
Don MC
Posts: 31
Joined: Mon Nov 16, 2015 7:40 am

Re: New value item logger implementation!

Post by Don MC »

Step by step instructions on how to set this up would be great. My thermometers are set up to log individual text logs (like for my bedroom thermometer: /var/log/nethome/t_bedroom.log).
The graphs do load quite slowly and I'd like to speed that up a little bit, but I can't understand the instructions in this thread.
My NetHome runs on a Raspberry Pi.
SourceCodeSourcerer
Posts: 10
Joined: Mon Mar 02, 2015 9:58 pm

Re: New value item logger implementation!

Post by SourceCodeSourcerer »

Hi Don MC!

I've added documentation that integrates with NetHomeServer.

You reach it from the View online documentation link from the Create new Item page from within your running NetHomeServer.
Or, you can also reach it from a created H2DatabaseTCPServer home item. It's the link named [H2DatabaseTCPServer] below the home item name.

In any case, the link refers to the following page: http://wiki.nethome.nu/doku.php/h2databasetcpserver.

Hopefully the Configure global logging to the database boils down the steps needed to enable the database logging. It's not much to it. However, we would love to hear (positive :D ) feedback and suggestions for improvements.

Thanks for your input!

/Peter
Don MC
Posts: 31
Joined: Mon Nov 16, 2015 7:40 am

Re: New value item logger implementation!

Post by Don MC »

Wow, thanks! Now I understand it much better. Will try it out ASAP and will provide feedback as soon as I have it up and running.
Don MC
Posts: 31
Joined: Mon Nov 16, 2015 7:40 am

Re: New value item logger implementation!

Post by Don MC »

I got it working by following the wiki. Moving the old logs from text files on my R-Pi2 took less than 10 mins, resulting in a db of >70MB. I've got around 10 thermometers and 10 hygrometers with accumulated data from around 2 years back (760 days).

The graphs load fast now. But I'd like to be able to "fast jump" to any given month/date instead of clicking them backwards or forwards one at a time. For example, if I want to see the temperature for June 15th 2015, I have to first open the current month and then step back one month at a time until I get to June 2015. Only then can I drill down to the date I want.
Is there any shortcut to this?

E: Will it still be logging into those text files as well?
SourceCodeSourcerer
Posts: 10
Joined: Mon Mar 02, 2015 9:58 pm

Re: New value item logger implementation!

Post by SourceCodeSourcerer »

Hi Don,

Yes, as long as the pathnames are still defined for each home item in the LogFile field, the text logs will still be written to.

About "fast jump" to a month/date, this is one of several things one would want to do with graphs like these, I agree. I don't think Stefan has the time to do this right now, and I'm also busy elsewhere.

Anyone wanting to step up and improve the charts, or create new implementations are welcome to contribute.

We would surely want to add this to the backlog thought.

Thanks for your feedback!

/Peter
perjarle
Posts: 32
Joined: Wed Aug 03, 2016 8:08 am

Re: New value item logger implementation!

Post by perjarle »

Is there any way to make the db file go to a spesific location?

I have mounted a nas folder to /var/log/nethome to minimize writing operations on the rpi sd card.

But the db files are created in /home/pi/nethome.
How can I make the db files go to /var/log/nethome?

Br
Per
SourceCodeSourcerer
Posts: 10
Joined: Mon Mar 02, 2015 9:58 pm

Re: New value item logger implementation!

Post by SourceCodeSourcerer »

Hi perjarle!

You should be able to change the DatabasePath, please see the Settings documentation at http://wiki.nethome.nu/doku.php/h2databasetcpserver.

/Peter
Post Reply