[ANSWERED]: SQLogger Data Question

Posted on
Mon Dec 29, 2014 7:12 am
DaveL17 offline
User avatar
Posts: 6743
Joined: Aug 20, 2013
Location: Chicago, IL, USA

[ANSWERED]: SQLogger Data Question

Starting to work on converting some scripts to work with SQLogger data directly, and I'm seeing some data that I don't understand. The last 20 rows of a table for a light that switches on at sunset and off at sunrise:
Code: Select all
(604, u'2014-12-21 16:24:39', u'True')
(605, u'2014-12-22 07:13:19', u'False')
(606, u'2014-12-22 16:25:09', u'True')
(607, u'2014-12-23 07:13:49', u'False')
(608, u'2014-12-23 16:25:42', u'True')
(609, u'2014-12-24 07:14:14', u'False')
(610, u'2014-12-24 16:26:16', u'True')
(611, u'2014-12-25 07:14:39', u'False')
(612, u'2014-12-25 10:58:57', u'False')
(613, u'2014-12-25 16:26:52', u'True')
(614, u'2014-12-26 06:45:46', u'True')
(615, u'2014-12-26 07:15:01', u'False')
(616, u'2014-12-26 16:27:31', u'True')
(617, u'2014-12-27 07:15:21', u'False')
(618, u'2014-12-27 11:06:45', u'False')
(619, u'2014-12-27 16:28:12', u'True')
(620, u'2014-12-28 07:16:11', u'False')
(621, u'2014-12-28 08:06:13', u'False')
(622, u'2014-12-28 16:28:55', u'True')
(623, u'2014-12-29 05:29:20', u'True')
I see extra entries that (while true) seem unnecessary. For example,

2014-12-28 16:28:55 | True
2014-12-29 05:29:20 | True

It's true that the light is switched on at 16:28 and is still on at 05:29, but it's not clear to me why SQLogger is writing that second row. Shouldn't the plugin be waiting for the next state change?

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Dec 29, 2014 1:00 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: SQLogger Data Question

A couple of things can cause that: 1) a device that just sends out multiple updates 2) the intervening "False" didn't get back to Indigo. If it's an INSTEON device it could be signal noise for instance.

The logger just logs any change that Indigo sees and doesn't try to be smart about it...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Dec 29, 2014 1:07 pm
DaveL17 offline
User avatar
Posts: 6743
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: SQLogger Data Question

Thanks Jay - this is helpful. I'll include some logic to do some additional comparisons.

Dave
[In this case, the device in question is a Leviton Z-wave switch (VRS15-1LZ)]

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Dec 29, 2014 2:07 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: SQLogger Data Question

Actually, I think (and this is just a vague recollection at this point) the SQL Logger is smart about only writing changes to the database. There are exceptions to this though, including when Indigo Server first starts up. When that occurs it dumps all the current states to the database.

Image

Posted on
Mon Dec 29, 2014 2:48 pm
DaveL17 offline
User avatar
Posts: 6743
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: [ANSWERED]: SQLogger Data Question

Thanks Matt -- Looks like it might be a couple of different things.

2014-12-29 05:29:20 was a SQLogger database cleanup operation.
2014-12-28 08:06:13 there were no logged operations.
2014-12-27 11:06:45 there were no logged operations.
2014-12-26 06:45:46 was a server restart operation.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron