Ok...data is being read, shows up. It jumps to insert_data(cursor, data) and nothing happens...no error codes. I check the table in PHPMyAdmin and nothing is being inserted. I thought maybe I needed to add the customary (?, ?, ?, ?, ?, ?, ?, ?, ?) after VALUES and before ({placeholders}) but that caused an error so I took them out.Bring up Copilot (or other AI things)
Copy the code in, then say you got this error (copy error in) see what it says.
Add () after keys
so data.keys()
Also, after it reads the data, I get Json errors where it's empty. I tried a time.sleep(29) to pause the pi and allow the arduino to cycle every 30 sec (current settings...would like to switch to 10 minutes later so my table isn't full of data for every second of every day) but to no avail.
In the cursor.execute line...where does list(data.values()) come from? Is that the command to write the strings to the table (which I also had to modify my table to VARCHAR as well...getting rid of the FLOAT and INT's...no biggie)?
I double checked my terms...temp, humid, bar, etc...that's not causing the misfire
Statistics: Posted by Osprey72 — Tue Apr 15, 2025 10:56 pm