Closed mstenta closed 9 years ago
Thank you for your quick response. Yes, I've the addresses of my sensors. I will manually put them into the database and I'll let you know if that solves the problem.
I did: sqlite3
Jan,
I had to do this as well yesterday and it worked:
CREATE TABLE Devices(DeviceID INTEGER PRIMARY KEY, Type TEXT, SerialID TEXT, Label TEXT); INSERT INTO Devices (DeviceID, Type, SerialID, Label) VALUES (NULL, 'ds18b20', '28-000005e4d76b', 'radiator aanvoer'); INSERT INTO Devices (DeviceID, Type, SerialID, Label) VALUES (NULL, 'ds18b20', '28-000005e4f2fd', 'radiator retour'); ...
Hmm, it definitely sounds like the table is NOT created @janvdbeek ... what happens when you run the following:
.tables
.tables gives nothing. I tried that already and I was very surprised. I have a log.db in the /home/pi/atmospi directory and when I open the database with SQLite Epert Personal 3 I can see all the tables and indexes. But maybe I've to create it again and immediately insert the sensor addresses as ot3 mentioned in his post above.
Hmm weird. Yea, if you don't have any data to lose I would recommend deleting log.db and setting it up again manually (step 6 in the readme). Hope that helps!
I'll try to set up the database manually (again :-) ). Thanks so far.
OK, I deleted the existing database and set up a new database. I also inserted the sensor addresses into the Devices table. I checked the contents of the table and the sensor addresses are there. I ran the file measure-ds18b20.py manually and no errors occured this time :-) So, I checked the webpage and I've a graph and measurement data!
Thanks a lot for your help.
That's great! Welcome to the atmospi club! ;-)
I'm going to assume that the error was with the database file, and not the code... closing this issue.
Yes, the error was with the database and not with the code.
Reopening this issue because someone else reported the same thing. I'm guessing that the auto-device-detection code doesn't work right, so it's only working if you manually add the device to the Devices table (per ot3's comment above).
Probably not too hard to fix... just need to debug it.
Fixed!
Originally reported by @janvdbeek in #11 - the following error occurs: