Remove the comma behind the closing connection brace.
-
Hi @SaxnPaule, I have tried that but with no result. Did you mean to change it in this way? I have copied some more context of my config file. The comma seems to be needed.
"settings": { "httpServer": { "enabled": true, "port": 1946 }, "database": { "client": mysql, "connection": { "host": 192.168.1.3, "user" theBoss, "password": BruceS, "database": pimatic } "deviceAttributeLogging": [ { "deviceId": "*", "attributeName": "*", "type": "*", "interval": "0", "expire": "1y" }, { "deviceId": "*", "attributeName": "*", "type": "continuous", "interval": "5min", "expire": "1y" }, { "deviceId": "*", "attributeName": "temperature", "type": "number", "expire": "1y" }, { "deviceId": "*", "attributeName": "humidity", "type": "number", "expire": "1y" } ], "messageLogging": [ { "level": "*", "tags": [], "expire": "7d" }, { "level": "debug", "tags": [], "expire": "0" } ] }, "authentication": { "secret": "xxxxxxxxxx" }, "httpsServer": {}, "gui": {}, "cors": {} },
-
No, now your config is corrupt. Please verify your config here: http://jsonlint.com/
It needs to be a valid json. -
Just add quotation marks. And a comma before “deviceAttributeLogging”.
"database": { "client": "mysql", "connection": { "host": "192.168.1.3", "user": "theBoss", "password": "BruceS", "database": "pimatic" }, "deviceAttributeLogging": [
-
@fips21 said in mysql config:
“database”: {
“client”: “mysql”,
“connection”: {
“host”: “192.168.1.3”,
“user”: “theBoss”,
“password”: “BruceS”,
“database”: “pimatic”
},Thanks! That did the tric. It now connects and creates tables (4 tables) but it doesn’t populate them with data… Bit confused what whould be needed to also trigger that step… I have no errors related in any sense to mysql or database connections…
Regards,
Ruud
-
Sorry, I now have populated tables, but only after I have restarted pimatic. Does it only flush the values to mysql at shutdown and/or restart?
I have added this to my config to try and trigger more frequent database writes but with no succes…
"deleteExpiredInterval": "5min", "diskSyncInterval": "10min", [...]
Regards,
Ruud
-
And again, it works after I post a message on the forum…
@ruudvddries said in mysql config:
Sorry, I now have populated tables, but only after I have restarted pimatic. Does it only flush the values to mysql at shutdown and/or restart?
I have added this to my config to try and trigger more frequent database writes but with no succes…
"deleteExpiredInterval": "5min", "diskSyncInterval": "10min", [...]
Regards,
Ruud
-
@ruudvddries Looks like I have the same problems. Only after restarting there are entries in some tables. I will try your parameters to set the write intervals.
Regards
-
By the way, from where do you have these parameters?
“deleteExpiredInterval”
“diskSyncInterval”Regards
-
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@fips21 as @leader21 I have them from the how to. I now have it working with mySQL.
But with a big but! Being that all the line graphs in Pimatic don’t work. All data in the graphs is zero. Even after a period of flushing data to the tables.
When that could be resolved that would be great!
Regards,
Ruud
-
according to this post, the unit for minutes is ‘m’ in this case. I can confirm this.
I’ve had the same problem – the database was only populated on restart. The source of the error was very different: https://github.com/pimatic/pimatic/issues/1072#issuecomment-335953202