This will be easier for me, I'm going to create a Daily Review post each calendar day and throw most stuff in there. The post will be updated throughout the day as necessary, up until midnoght, when the next days post will be created as long as there is something to post about.
If something warrants its own topic, I'll create a new post for it. So on that note, here is today's review!
I initially set out to find the cause of the constant esp8266 reboots when I uploaded the same code that worked before I re-installed windows. There are a couple posts about this, the first one is here, and the solution here. Once I went back to the version of the MySql library that I was using before the re-install, I was back in business.
Then I got sidetracked again...
I just tried something to see if I could fix the issue I was having that caused me to add a database connection close after each access. That issue is first discussed here. I seemed to be able to read from the database up to the point where it reads the sensor config to send to the 2560 to scan the sensor, and then record the results to the database. It was able to read it the first time through, but not the second, There are about 30 or so fields it needs to read from the database, and this is too many for the connector to read, I believe he recommends 23 maximum. I broke it into two parts, the first one reads 14 fields, then a second read of 18 fields. The limit is really the total size of the data row returned, so I thought perhaps I was somehow over that limit? I do think it's a memory problem because of the weird data that was showing up. Well, tonight's I further broke it down to 4 database reads to load the sensor configuration data, it worked out to 7, 8, 9, and 10 fields read for each of the 4 calls. I tested that, it worked fine, so I removed the database close, and it failed again, so that isn't the solution. I put the database close back in. and I'll just continue on and come back to this another time.
So watch for updates to this post throughout the day...
Getting sidetracked is a habit now... I ended up transplanting a couple clones into bigger pots, then I needed to change the connectors on some soil moisture sensors so I could use them on the new plants, and have some ready. They are all converted to the new connector now except for 4 that I still have to find :)
Then for some reason, I decided to wash a bunch of dirty pots and trays, and now I'm considering either having a nap, or tearing out the Veg area and replacing the panda plastic, and then set it up again. I think perhaps breakfast then a nap. We have to go out for a few hours around noon, so I better do the nap thing...
Had some family commitments today, so not a lot done, but I'm back at my desk, and ready to rock!
After my nap this morning, and before we left, I did manage to tear down, and rebuild my cloning chamber. It sits in a shelving unit, and was on the second shelf, meaning I had to bend way over to work with it, and with my bad back, that was no good,. I decided I wanted to move it to the third shelf where it was a lot more comfortable to work. Because the shelving unit basically IS my cloning chamber, it took me a couple hours. You can read about that project here.
I've been running the new version of the Sensor Module Firmware on module 2 for the past week or so now, and it looks pretty good, so I think I may update it with the latest compile (after my issues with rebooting etc) now that everything seems stable again.
Then, I think I'll work on the Switch Sensor while it'snot being used to control the Clone Mister (I've got no cuttings to root at the moment, I'm at my legal limit for number of plants)
I want to change it so it works like the new sensor modules, the ESP8266 will be the main controller, and the Mega 2560 just the connection to the hardware (switches, lights, etc)
Then, I can hook up the high current relay (contactor) I bought, and try controlling the 600W HPS in the Flower Tent again. Last time I used a cheap relay, and it ended up fusing the contacts together due to arcing when it turns off, and the lights stayed on until I discovered it.
So, let me get some dinner, and get things sorted, and I'll be back for a night of excitement!
I installed the latest Sensor Module firmware onto module 2, and so far no issues. If it stays that way, I'll install it on module 1, and we'll be live with it.
I started reviewing the Switch Module code and it does something none of the other modules do, it caches various data that it requests, so if it cannot reach the database, it will read the cached copy and use it. I remember doing this, but now that I look at it, it was all a waste. I've changed the way I read data from the database, rather than clear out the old data and then do the read, I wait until I have read the whole record into temporary variables, then I copy it to the actual variables after clearing them out.