Thanks. The ability to log sensor data to an external server is very handy. I will take another look at it. Did you get the DateTime fields working?dvrhax wrote: ↑Sat Mar 02, 2019 2:44 amI've only recently picked this back up and I'm really only using it for logging functionality so basic inserts myself. I have gone back and shrunk the size considerably and also worked through some more kinks including some with regards to "errno" so If you do pick up the project again make sure to use the updated code.
Good luck
uPyMySQL
Re: uPyMySQL
Re: uPyMySQL
The datetime stuff is a bit of a kludge so you'd probably have to see how it fit within your use case. I generally set up the table with a timestamp field that way I don't have to worry about it on the board. Plus my boards don't have RTC so it's easiest just not to have to deal with it.
In fact that was a big reason I went with MySQL a) the server is done and b) the timestamping.
Good luck. Let me know if you find any bugs.
Code: Select all
create table Doors ( id int NOT NULL AUTO_INCREMENT,
recorded DATETIME DEFAULT CURRENT_TIMESTAMP,
door CHAR(5) NOT NULL,
state TINYINT(1) NOT NULL,
PRIMARY KEY (id)
);
Good luck. Let me know if you find any bugs.