HI ,
New to openHab i am using OpenHab on ubuntu (64bit) . I want to store some data in database . I tried with MySQL but i dont have any success .
-
I have installed Mysql server . and I have added org.openhab.persistence.mysql-1.7.0.jar to addons folder.
-
I added following configuration to openhab.cfg file :
############################ SQL Persistence Service ##################################
/# the database url like ‘jdbc:mysql://:/’ (without quotes)
mysql:url=jdbc:mysql://127.0.0.1:3306/openhab
/# the database user
mysql:user=openhab
/# the database password
mysql:password=password
/# the reconnection counter
/#mysql:reconnectCnt=
/# the connection timeout (in seconds)
/#mysql:waitTimeout=
3)I added mysql.persist file into openHab\configurations\persistence
// persistence strategies have a name and a definition and are referred to in the “Items” section
Strategies {
// if no strategy is specified for an item entry below, the default list will be used
default = everyChange
}
items {
// persist all items once a day and on every change and restore them from the db at startup
// careful, this might result in huge databases - that’s why it is in comment here ;
* : strategy = everyChange, everyDay, restoreOnStartup
// persist all temperature and weather values at every change and every hour
// * : strategy = everyChange, everyHour
}
This is from my log file :
10:39:58.791 [DEBUG] [sqlPersistenceServiceActivator:32 ] - mySQL persistence bundle has been started.
10:39:58.806 [DEBUG] [.p.internal.PersistenceManager:147 ] - Initializing mysql persistence service.
10:39:58.811 [DEBUG] [c.internal.ModelRepositoryImpl:64 ] - Configuration model ‘mysql.persist’ can not be found
10:39:58.812 [DEBUG] [.p.m.i.MysqlPersistenceService:462 ] - mySQL configuration starting
10:39:58.813 [DEBUG] [.p.m.i.MysqlPersistenceService:387 ] - mySQL: Attempting to connect to database jdbc:mysql://127.0.0.1:3306/openhab
10:39:59.408 [DEBUG] [.p.m.i.MysqlPersistenceService:390 ] - mySQL: Connected to database jdbc:mysql://127.0.0.1:3306/openhab
10:39:59.413 [DEBUG] [.p.m.i.MysqlPersistenceService:523 ] - mySQL configuration complete.
10:39:59.414 [DEBUG] [c.internal.ModelRepositoryImpl:64 ] - Configuration model ‘mysql.persist’ can not be found
10:40:02.417 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘home.sitemap’
10:40:02.763 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘mysql.persist’
10:40:02.890 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘home.rules’
10:40:03.292 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘home.items’
Idea for this problem???
Thanks