Persistance stops when i use Habmin to create graphs

Hi All

I have a mysql.persistance which logs all changes to a database. There are graphs on my sitemap for temp, light and motion.

When i go to Habmin charts and graphs and select items to view data, MySql no longer has ans changes logged. the graphs on my sitemap flatline and dont return to normal until i remove all of the files and changes that Habmin creates.

Its a shame because the graphs from habmin are much more preferable.

Any ideas please?

HABmin uses the same functions to access the persistence store as the standard chart does - it all goes through the persistence manager. So, HABmin should run exactly the same as other chart sources and I would expect the same problem there?

I would look in the debug log for starters to see if there’s anything logged as to why the persistence is no longer working.

Ive combed through the logs and there doesnt seem to be any clue.

As soon as i create a chart in Habmin and habmin requests the data from the mysql database, then openhab stops inserting things into it.

stumped :disappointed:

Are all the persistence messages still being logged after the event? What messages are logged?

Does the same thing happen when you use normal charts? I guess so, but it’s worth checking (although I don’t know if it helps narrow down the problem).

When normal charts are being used there is no problem. They work fine and data is inserted no problem.

you can see bellow that after 11:58:34.693 there are no more INSERT INTO actions recorded.

If i delete the graphs and persistanc bak, and restart OH everything is cool

EDIT: i actually have to reboot my Pi2 sort this out.

I also noticed something strange on node red which may be a clue. The serial and mqtt nodes which talk to OH are rapidly flickering between connected and disconected when i use habmin chart. This also goes away after the reboot

:55’ ORDER BY Time ASC
11:56:56.324 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item4 WHERE TIME>‘2016-04-03 11:56:55’ AND TIME<‘2016-04-04 11:56:55’ ORDER BY Time ASC
11:56:56.558 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 292 rows in 248ms
11:56:56.597 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 182 rows in 293ms
11:56:57.075 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 2055 rows in 759ms
11:57:03.017 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 7 to topic 'home/openhab/state/Node01Motion/state’
11:57:03.041 DEBUG o.o.p.m.i.MysqlPersistenceService[:412]- mySQL: Stored item ‘Node01Motion’ as ‘1’[1] in SQL database at Mon Apr 04 11:57:03 BST 2016.
11:57:03.044 DEBUG o.o.p.m.i.MysqlPersistenceService[:414]- mySQL: query: INSERT INTO Item4 (TIME, VALUE) VALUES(NOW(),?) ON DUPLICATE KEY UPDATE VALUE=?;
11:57:03.052 DEBUG o.o.m.r.i.engine.RuleEngine[:305]- Executing rule 'bedtime mode’
11:57:05.957 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 8 to topic 'home/openhab/state/Node01Motion/state’
11:57:05.980 DEBUG o.o.p.m.i.MysqlPersistenceService[:412]- mySQL: Stored item ‘Node01Motion’ as ‘0’[0] in SQL database at Mon Apr 04 11:57:05 BST 2016.
11:57:05.982 DEBUG o.o.p.m.i.MysqlPersistenceService[:414]- mySQL: query: INSERT INTO Item4 (TIME, VALUE) VALUES(NOW(),?) ON DUPLICATE KEY UPDATE VALUE=?;
11:57:05.985 DEBUG o.o.m.r.i.engine.RuleEngine[:305]- Executing rule 'bedtime mode’
11:57:59.757 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 9 to topic 'home/openhab/state/Node01Motion/state’
11:58:32.392 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 10 to topic 'home/openhab/state/Node01Light/state’
11:58:34.665 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 11 to topic 'home/openhab/state/Node01Temperature/state’
11:58:34.691 DEBUG o.o.p.m.i.MysqlPersistenceService[:412]- mySQL: Stored item ‘Node01Temperature’ as ‘20.12292178496324’[20.12292178496324] in SQL database at Mon Apr 04 11:58:34 BST 2016.
11:58:34.693 DEBUG o.o.p.m.i.MysqlPersistenceService[:414]- mySQL: query: INSERT INTO Item3 (TIME, VALUE) VALUES(NOW(),?) ON DUPLICATE KEY UPDATE VALUE=?;
11:58:52.733 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 12 to topic 'home/openhab/state/Node01Motion/state’
11:59:07.401 DEBUG o.o.i.h.s.c.PersistenceResource[:767]- Charts loaded in 1018ms.
11:59:08.010 DEBUG o.o.i.h.s.c.PersistenceResource[:767]- Charts loaded in 60ms.
11:59:08.269 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Temperature
11:59:08.280 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Light
11:59:08.284 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item2 WHERE TIME<‘2016-04-02 11:59:10’ ORDER BY Time DESC LIMIT 0,1
11:59:08.295 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Motion
11:59:08.298 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item3 WHERE TIME<‘2016-04-02 11:59:10’ ORDER BY Time DESC LIMIT 0,1
11:59:08.328 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 1 rows in 48ms
11:59:08.332 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 1 rows in 49ms
11:59:08.329 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item4 WHERE TIME<‘2016-04-02 11:59:10’ ORDER BY Time DESC LIMIT 0,1
11:59:08.355 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 1 rows in 32ms
11:59:08.416 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Light
11:59:08.427 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Motion
11:59:08.416 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Temperature
11:59:08.469 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Temperature
11:59:08.474 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item3 WHERE TIME<‘2016-04-02 11:59:10’ ORDER BY Time DESC LIMIT 0,1
11:59:08.494 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Motion
11:59:08.498 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item4 WHERE TIME<‘2016-04-02 11:59:10’ ORDER BY Time DESC LIMIT 0,1
11:59:08.502 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 1 rows in 29ms
11:59:08.502 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item3 WHERE TIME>‘2016-04-02 11:59:10’ AND TIME<‘2016-04-04 11:59:10’ ORDER BY Time ASC
11:59:08.499 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item4 WHERE TIME>‘2016-04-02 11:59:10’ AND TIME<‘2016-04-04 11:59:10’ ORDER BY Time ASC
11:59:08.500 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item2 WHERE TIME>‘2016-04-02 11:59:10’ AND TIME<‘2016-04-04 11:59:10’ ORDER BY Time ASC
11:59:08.531 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Temperature
11:59:08.535 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item3 WHERE TIME>‘2016-04-02 11:59:10’ AND TIME<‘2016-04-04 11:59:10’ ORDER BY Time ASC
11:59:08.664 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 1 rows in 166ms
11:59:08.669 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Motion
11:59:08.673 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item4 WHERE TIME>‘2016-04-02 11:59:10’ AND TIME<‘2016-04-04 11:59:10’ ORDER BY Time ASC
11:59:08.693 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Light
11:59:08.696 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item2 WHERE TIME<‘2016-04-02 11:59:10’ ORDER BY Time DESC LIMIT 0,1
11:59:08.790 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 1 rows in 94ms
11:59:08.820 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Light
11:59:08.825 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item2 WHERE TIME>‘2016-04-02 11:59:10’ AND TIME<‘2016-04-04 11:59:10’ ORDER BY Time ASC
11:59:09.061 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 349 rows in 526ms
11:59:09.066 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 349 rows in 613ms
11:59:09.137 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 570 rows in 314ms
11:59:09.141 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 570 rows in 692ms
11:59:09.187 DEBUG o.o.i.h.s.c.PersistenceResource[:465]- CHART: returned 572 rows in 922ms
11:59:09.208 DEBUG o.o.i.h.s.c.PersistenceResource[:465]- CHART: returned 572 rows in 571ms
11:59:09.317 DEBUG o.o.i.h.s.c.PersistenceResource[:465]- CHART: returned 351 rows in 880ms
11:59:09.423 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 3660 rows in 970ms
11:59:09.426 DEBUG o.o.i.h.s.c.PersistenceResource[:465]- CHART: returned 351 rows in 1177ms
11:59:09.511 DEBUG o.o.i.h.s.c.PersistenceResource[:465]- CHART: returned 3662 rows in 1253ms
11:59:09.569 DEBUG o.o.p.m.i.MysqlPersistenceService[:665]- mySQL: query returned 3660 rows in 895ms
11:59:09.626 DEBUG o.o.i.h.s.c.PersistenceResource[:465]- CHART: returned 3662 rows in 1184ms
11:59:18.292 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 13 to topic 'home/openhab/state/Node01Temperature/state’
11:59:33.153 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 14 to topic 'home/openhab/state/Node01Light/state’
12:00:15.513 DEBUG o.o.i.t.m.i.MqttBrokerConnection[:437]- Publishing message 15 to topic 'home/openhab/state/Node01Motion/state’
12:00:17.088 DEBUG o.o.i.h.s.c.PersistenceResource[:767]- Charts loaded in 62ms.
12:00:17.623 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Motion
12:00:17.630 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Light
12:00:17.650 DEBUG o.o.p.m.i.MysqlPersistenceService[:565]- mySQL query: item is Node01Temperature
12:00:17.652 DEBUG o.o.p.m.i.MysqlPersistenceService[:625]- mySQL: query:SELECT Time, Value FROM Item2 WHERE TIME<‘2016-04-02 12:00:19’ ORDER BY Time DESC LIMIT 0,1

Are you requesting a chart with multiple items? If so, does the issue also appear if you request a single item chart?

it happens with single items too.

Sorry - I’m all out of ideas…

No worries Chris. Cheers for taking a look. If/when i sort it out i’ll post how :slight_smile: