I used AI to help with my Home Automation Project

ERD50

Give me a museum and I'll fill it. (Picasso) Give me a forum ...
Joined
Sep 13, 2005
Messages
27,956
Location
Northern IL
I used Google's Gemini AI to help design my latest Home Automation Project.

Bottom line, AI was extremely helpful for this project, and the more I used it the more I saw ways to use it to fine tune the project. It really became like working with a team of engineers, it would respond with suggestions that would open up new ideas to me, and vice-versa. I am very pleased with its assistance, but was also surprised at some of the stupid mistakes it would make. You need to keep a close watch on it, to get the results you want! I would have run out of patience to make all the changes and refinements as the project developed, and would have just had a far less polished, bare-bones implementation. It was a lot of effort just testing each code release, and figuring out what a 'fix' should look like, and what features should be added/removed. Doing the all that coding would have worn me out, but Gemini spits it out a major revision in a minute or two.

Background (Optional/skip): I've done a few home automation projects with these little Arduino compatible boards. In my previous home, I used one to report on the run time of our private well, as I once had an underground leak that went undetected until it got so bad the pump was running 24/7 and my water pressure dropped off (this was 10 years ago, using MicroPython). My current home has a finished basement, so I have one monitoring the sump pumps, emailing me a status report 3x a day (so I know it's 'alive'), and emailing me on the hour when active, or immediately if certain “out of normal” conditions occur (long/short run times). For these I used the NodeMCU, which has built in WiFi (so I can email the reports over my local WiFi network).


I've also done a few other projects with the ProMicro, which has 9 analog inputs, which I needed for some projects, but no WiFi.

https://www.amazon.com/dp/B08BJNV1J3?th=1 Each of these are ~ $6 each.

// End of “Background info ^^^^^^^^^^^^^^^^^


This Project: I run a dehumidifier (DH) in our basement in the summer months, to keep the humidity below 60% for comfort and to avoid musty/moldy smells in things we store there. The problem I have is if I use the 'Auto' setting on the DH, it cycles ON/OFF every 3 or 4 minutes once it is near its set-point. This is apparently a common issue due to the RH sensor being contained inside the unit, so it senses the drier air nearby. Gemini estimated the short cycles were reducing efficiency by about 40~50% compared to a 2x/day cycle, plus the start-up stresses that could affect the life of the DH. Rewiring for a remote sensor could be tricky (and warranty voiding) since it is all self contained.

My simple solution was to run it on continuous mode, with a mechanical timer that can be set by the hour. I'd set it to run starting at 7AM and 7PM, and adjust the hours after that to keep the humidity in a ~55~58 average. Typically, I'd set the 2x/day “ON” hours for 2 hours in drier periods, to about 6 hours during more humid periods. But this meant checking and manually adjusting every few days.

My Arduino based idea: Use one of the readily available, inexpensive, temperature/humidity sensors, and an Arduino compatible controller (MCU) to keep the humidity below a maximum defined level, with minimums set for the ON/OFF times to avoid short cycling. I'd remote the sensor on a long enough cord so it would sense the room humidity, not the direct dry air from the DH. And send a few email reports each day for humidity and run times for each hour, for the past 24 hours.

Additional Peak Hour Rate feature: Last November, I switched to our electrical supplier's (ComEd) Hourly Rate plan (it's dynamic, rates updated every hour). According to their data, with no changes at all to my usage patterns, I would have saved $150 last year. So I figured why not, and since the DH is something I could shift to the typical lower rate hours (late morning to mid day, and midnight to early AM), I could get some additional savings there. While I could poll ComEd for current rates, and adjust the run times dynamically, there are some complications to that, and it seemed to offer little benefit over just blocking the DH from running based on the typical lower rate hours. So I decided to keep it simple, for now. My DH uses ~ 330 watts in the continuous, 'Turbo' mode.

I'll put the next in a follow up post to keep this from getting too long....
 
My start with AI (part 2): I haven't really used AI very much, but have found it helpful with some things. I decided to ask it to help with hardware selection for this project, as the WiFi capable boards I've used in the past were old designs (I started using the NodeMCU listed above in 2016), surely these boards have come a long way in 10 years. But the choices are overwhelming. So I used Google's Gemini AI to help sort it out.

I gave it my requirements in terms of I/O, networking, etc, and it led me to two 'families' of boards, one with the large number of I/O I requested, and one to match my 'dialed-down' request, for times when small physical size is more important. Within that family, we narrowed it down to specific suppliers. Same for the RH sensor. 'We' (it has become a collaborative effort by this point!) settled on:

HiLetgo SHT31-D Temp/Humidity Sensor Module IIC I2C Interface 3.3V GY-SHT31-D for Arduino www.amazon.com/dp/B07ZSZW92J

Waveshare ESP32-S3 Mini Dev Brd, Based On ESP32-S3FH4R2 www.amazon.com/dp/B0CR2RH7PS

This MCU is less than 3/4” x 1”, with WiFi, Bluetooth, built in antenna, 240 MHz 32-bit dual-core processor, 13 configurable I/O pins that come to 0.1” headers (plus more I/O on pads), and a built-in RGB LED. And only ~ $8 each. I was impressed! This would have taken me much longer to sort through on my own, so AI was a big win here. And it was very interactive, telling me the pros/cons of the various choices, which got me thinking about what was really important to me, and not just spitting out an 'answer'.

At this point, I was impressed enough with Gemini to see how it could handle some of the code generation. I put in some of the requirements, and in less than a minute it spit out some code that looked pretty good. But as good as the code seemed, it had weird errors, like not matching up the keywords and pass parameters from the code to the libraries it used. I'm confused how it would mess that up, since it is all available to it. At times, I had to point to the working examples, or point out that it was using code for an old library, not the one the program specified. Seemed like weird mistakes that I had to deal with, considering how much complex stuff it did get right.

At that point I realized, I should let it try to write *all* the code, because that would force me to write detailed requirements/specifications, which is really the right way to go about it. When I do it myself, I tend to keep those things in my head, or if I write some of them up, I don't update them, they aren't complete, etc. But if I'm telling it what to do, it needs complete, currents specs. So this enforces good practices for me. Something I hadn't anticipated when I started, so a pleasant surprise.
 
The Complete Program (part 3): I've got what appears to be a working program now, I'm going through tests with it actually controlling the DH, and it's looking good. Some of the steps to get here:

I kept updating the Requirements doc as I went through this, and had Gemini clean it up. We reviewed the pros/cons of methods to get it initialized on first boot. It would need my WiFi SSID-name/PW), plus the email address to send reports to, a 'from' address (it's recommended to have devices like this use a unique email address - not you own personal address), the times to send the reports, which hours should be 'blocked' from running the DH, and some other configuration data. I didn't want to hard code this, any changes would mean hooking it back up the computer to load new code. And even though this will likely be just for me, I like to set it up so that I could hand it over to someone, and they could update those parameters w/o needing to code anything.

We settled on using a web 'portal' for configuration. I've seen this on lots of things, like a modem/router for home internet/WiFi - when it powers up, if it doesn't have data, it puts up it's own WiFi network for you to sign into, and a web page url for you to access with a browser, which has fields and dialog boxes for the info it needs. I had tried to do something like this years before, and got lost in the details, but Gemini gave me the code for it, and it was working with little effort on my part, looking very 'professional'. That initial web portal is then duplicated and made available on my WiFi network, so I can acess and change settings from my browser from any device on my local network, w/o needing to get into any special 'config' mode. Makes it very easy. I've got that web page configured now with buttons to get a live update of the RH% and temperature, over-ride settings for X hours, all sorts of flexibility.

As we got things working, and I did a little 'bench testing', I could see what refinements I needed. For some ideas, I just didn't know if there was a manageable way to implement them, but Gemini was able to evaluate some approaches and give me pros/cons. In one case, I wanted to know how it would handle the hour shifts for DST, it basically said, no problem - in the 24 hour report (one text line per hour), you'll see an hour appear twice in the Fall, and an hour skipped in the Spring. Nothing would error out. But then I said I'm interested in collecting cumulative data, and would jumping back an hour mess that up? It said it would not error, but the data for the day would be messed up somewhat. It said it would take a fundamental restructuring of the underlying code to keep all the cumulative data 100% correct over these time shifts, but it is absolutely do-able. So I said - do it! It only takes a minute for it to do a complete re-write, so why not do it right?

Some of the refinements during testing were to provide more feedback on the web page, and the report. If I changed a setting during the hour, say set the RH MAX from 59% to 55%, then later back to 59%, there would be no evidence of that - you'd see 59% on the previous report, and then 59% on the next report. So we added a log to the report, any changes are listed chronologically, and the DH ON/OFF events are logged as well. There's a lot of details, a 15 minute 'compressor safety' timer, so nothing causes short-cycling of the compressor. This has a 'look-ahead' lockout - if we are within 15 minutes of the start of a “blocked” hour”, it won't turn the DH ON, as it would be turned off after less than 15 minutes, and we don't want to enter a 'blocked' hour. BTW, I added the term 'blocked' to make it clear that someone might want to just use it to program run times to not interfere with sleeping hours, or whatever.

I'll leave some details about the ComEd pricing, and some false starts for a future post.... (assuming anyone is interested - heck, I'll probably do it anyway, it's good mental review for myself).
 
Screenshot of the web page it puts up. I can get current data, request an email report be sent now, etc... (edit pdf easier to read?)
 

Attachments

  • DH_RH Dashboard.png
    DH_RH Dashboard.png
    110.7 KB · Views: 29
  • DH_RH Dashboard_X_.pdf
    121.7 KB · Views: 12
And a sample report (not a full 24 hours yet...) - the alignment is better in the email, the forum sw or web stuff shifts things, even with a fixed text,

GENERATED: 2026-06-07 15:08:00

UPTIME SINCE: 2026-06-06 16:46:40 0D:22H:21M

WiFi RSSI/IP/URL: -63dBm / 192.168.68.58 / http://hg-bsmnt.local/
DH WATTS: 330

TEMPERATURE: 68.2 F / 20.1 C
CURRENT RH-: 57.5%
RH MAX SETTING: 59% [INITIALIZED AT BOOT]

REPORT SCHED: 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22

BLOCKED/PEAK HRS(*): 5,6,7,14,15,16,17,18,19,20,21,22
--------------------------------------------------------------
24 HR REPORT:, MAX, ---, DH, -, AVG, ------, READS
-------------, LMT, AVG, ON, -, kWh, RUN, TOTAL
YYYY-MM-DD-HH, SET, RH-, mm, *, COST, COST, /FAIL
-------------, ---, -----, --, -, ------, ------, -----
2026-06-07-14, 59%, 57.2%, 00, *, 5.0, 0.0, 60/00
2026-06-07-13, 59%, 56.8%, 00, , 3.9, 0.0, 60/00
2026-06-07-12, 59%, 55.7%, 00, , 3.2, 0.0, 60/00
2026-06-07-11, 59%, 53.2%, 41, , 2.0, 0.5, 60/00
2026-06-07-10, 59%, 54.4%, 60, , 2.4, 0.8, 60/00
2026-06-07-09, 59%, 58.1%, 19, , 2.6, 0.3, 60/00
2026-06-07-08, 59%, 58.4%, 00, , 2.2, 0.0, 60/00
2026-06-07-07, 59%, 58.3%, 00, *, 1.8, 0.0, 60/00
2026-06-07-06, 59%, 58.2%, 00, *, 1.7, 0.0, 60/00
2026-06-07-05, 59%, 58.2%, 00, *, 1.7, 0.0, 60/00
2026-06-07-04, 59%, 58.1%, 00, , 1.9, 0.0, 60/00
2026-06-07-03, 59%, 58.0%, 00, , 1.9, 0.0, 60/00
2026-06-07-02, 59%, 57.8%, 00, , 2.0, 0.0, 60/00
2026-06-07-01, 59%, 57.7%, 00, , 1.6, 0.0, 60/00
2026-06-07-00, 59%, 57.5%, 00, , 1.3, 0.0, 60/00
2026-06-06-23, 59%, 57.4%, 00, , 2.4, 0.0, 60/00
2026-06-06-22, 59%, 57.2%, 00, *, 2.9, 0.0, 60/00
2026-06-06-21, 59%, 57.1%, 00, *, 3.6, 0.0, 60/00
2026-06-06-20, 59%, 57.0%, 00, *, 3.6, 0.0, 60/00
2026-06-06-19, 59%, 56.8%, 00, *, 3.9, 0.0, 60/00
2026-06-06-18, 59%, 56.8%, 00, *, 3.5, 0.0, 60/00
2026-06-06-17, 59%, 56.5%, 00, *, 4.1, 0.0, 60/00
2026-06-06-16, 59%, 56.4%, 00, *, 7.6, 0.0, 20/00
--------------------------------------------------------------

24H AVG/MIN/MAX RH: 57.1% / 52.5% / 58.7%

24H TOTAL RUN HH:MM: 02:00
24H Total kWh USED: 0.66
24H TOTAL kWh COST: $0.02
24H kWh SAVINGS: $0.00

24H PEAK/NON-PEAK HRS AVG kWh COST DELTA: 1.3


CUML SINCE DATA RESET
------------------------------------------------------
CUML DAYS, HRS : 0000, 22 2026-06-06 16:50:42
CUML ON TIME: 0000, 02
CUML BLOCKED ON TIME: 0000, 00

CUML kWh COST: $0.02 kWh cost is supply charge only
CUML kWh SAVINGS: $0.00

24H ON/OFF TIMES:
------------------------
2026-06-07 11:41:00 OFF OFF RH<SET
2026-06-07 09:41:59 ON REMOTE OVERRIDE ACTIVE ON

CONTROL CHANGES:
------------------------------
2026-06-07 11:52:39 EMAIL REPORT NOW REQUESTED; REMOTE
2026-06-07 09:42:22 EMAIL REPORT NOW REQUESTED; REMOTE
2026-06-07 09:41:58 REMOTE FORCED ON set for 2 HOURS
2026-06-06 16:50:42 CUMULATIVE DATA CLEARED
2026-06-06 16:50:18 EMAIL REPORT NOW REQUESTED; REMOTE
 
Thanks for the thread. It gives me motivation to try my hand at using AI to do some real programming.

As mentioned in the other thread, my solar power project is a distributed system with several nodes. They communicate via a 2.4GHz link using the Nordic nRF24 chip, using my own protocol. Each node has a specific function. For example, I have several lithium batteries (6 so far) wired in parallel to a big bus. Each of these batteries have lithium cells wired in parallel/series. Each will be monitored by a battery monitor (BM) node, which measures the current flow, and the voltage of each cell to ensure balancing. The BMs then report to a master control unit (MC), which will monitor and log the battery data.

The MC will send control signals to shut off the chargers and inverters as necessary. Now, the chargers and inverters are already internally programmed for safe operating limits of the lithium batteries, but this is another level of safety redundancy. The control signals are also sent via the Nordic link to actuator nodes which turn on/off relays or contactors to engage/disengage the 8 chargers, and 6 inverters.

The MC will also send me an email alarm via a WiFi link for abnormal conditions. And I was looking into using an Android app on my phone as a control head.

I also have display modules (DM), which will display a summary status of the batteries. They have interface to a small TFT display, and get the battery data by eavesdropping on the wireless messages sent between the BMs and the MC. The DMs are placed inside the home, mounted on the wall. The BMs are of course in the garden shed in the backyard, mounted with the associated batteries. The MC is also inside the shed, although it can be inside the home as all the links are wireless. There may be problems with the wireless range though. I already have provisions for a repeater node.

I have designed, laid out and have PCB made for the BM and the DM. They were working when I put the project in hiatus to do other things. The BMs and DMs fit inside the case of discarded Ring camera battery (I have yet to get on the 3D printing trend - too many things to do!).

The BM and DM use Arduino ProMini boards. The firmware barely fits inside the chips.

For the MC which has more complex firmware, I am using the more powerful Blue Pill and its bigger brothers. I have used ARM chips before, using STM32CubeIDE, and am happy with its JTAG debugging tool.

I just started to do the prerequisite reading on using Gemini Code Assist with STM32CubeIDE, either in VS Code or Eclipse versions. It will be interesting to learn how I can guide Gemini to add to the code that I have written.

I am also looking at doing panel nodes to monitor each solar panel string for instrumentation. Each node is just a few cu.in., and all fit inside discarded Ring battery cases (of which I have a few hundred).

There's still a lot of work left. It looks like AI can help with this, but any tool requires learning. So many things to do!
 
Last edited:
Very interesting and well beyond my capabilities. I did buy a module that shows me the activity for my sump pump. I really appreciate that. It shows all activity and the duration of each pump as well as the interval between pumps. Your post makes me want to pay better attention to my dehumidifier. I know it's keeping my basement at the level I want, but I like that you figured out that it was short cycling. I also like the idea of taking the humidity reading away from the DH. I also run a fan in my basement to circulate the air better. All of that could be better automated but unfortunately, not by me.

First thing I'm going to try is to put the sump pump module on the DH. It's just something you plug into the electrical socket and then plug the sum pump it the module. I suspect it would show the DH activity just like it does the sump pump. Only problem may be that since the DH runs way longer than a sump pump ever should, it may error out or send me some type of alert.

This is the sump pump module I bought.

 
... I know it's keeping my basement at the level I want, but I like that you figured out that it was short cycling. I also like the idea of taking the humidity reading away from the DH. I also run a fan in my basement to circulate the air better. All of that could be better automated but unfortunately, not by me.
I realized the DH was short cycling just by listening to it. Once it had run long enough to bring the RH down to the point that it shoudl cycle on/off to maintain the set RH, I had noticed the compressor sound was only 3~5 minutes long, then the fan ran for a few minutes, then the compressor would kick back on.

Having a fan run near it should help, I considered using one of those 'smart' power strips, where an outlet would turn on when the DH (plugged into the 'control' outlet of the strip) cycled on. So the fan would run only when the DH would run. I never did try that, probably should have. But it's nice to get all the feedback I get with this set up.
First thing I'm going to try is to put the sump pump module on the DH. It's just something you plug into the electrical socket and then plug the sum pump it the module. I suspect it would show the DH activity just like it does the sump pump. Only problem may be that since the DH runs way longer than a sump pump ever should, it may error out or send me some type of alert.

This is the sump pump module I bought.

You might try contacting the company, one of the reviews said he got great help from them in what he had to do to get this to run on a 220V pump.
You're right, DH cycles will be much longer than typical sump pump cycles, but maybe their program allows for that? Could be worth a shot. It will give you feedback, but won't really help with the short cycling. Looks like a nice unit.

I know my posts were long, so I'll repeat/emphasize here - AI estimated the short cycling was having a big effect on efficiency, losing 40~50%. It's hard to verify that, I don't have anyway to really control conditions, but it makes sense.
 
.... There's still a lot of work left. It looks like AI can help with this, but any tool requires learning. So many things to do!
You've got a lot going on there, lots of moving pieces!

Give AI a shot at coding some limited functions for you that you might want to add/modify. See if it's worthwhile. Like I said, the value to me was maybe more in forcing me to have clear requirements, that's 90% of the battle, the code is the 'grunt work', in a sense.

Kinda funny, as I explained this to my wife, she said "but I thought the coding was part of the 'fun'/challenge'". Hmmm, made me think. I got a little philosophical - typically, when we code, we bring in libraries pre-built for much of the job. The interface to the humidity sensor is a library, the I2C communication is a library, the email routines are a library. I'm not coding those, I just learn what I need to use them. I view this the same way - I need to know what I want to get done, and I use AI to create that 'library'. Anyway, I'm no software engineer, I did programming as part of my job, but in a very different environment - I had little experience with C, and since these projects are sometimes a year or more apart, I just don't recall all the syntax, so it's pretty tedious for me to do that much coding. I'm far more effective in using my time to define what I want, test it, evaluate how it can be refined or simplified, than to be coding and putting a "," where a ";" was needed.

It's been a while since I looked at much of the code at all. A while back, I was looking through it, and found something strange to my eyes. In a function, the first thing done was to make a local copy of a pass parameter - OK, if the function had to modify the value, and later needed to also use the original value, that makes sense. But it never touched the original value! So I asked why it did this, and it figured out that was a 'leftover' from an earlier version of the code, and a later mod removed the need for the copy, but never 'cleaned up'. I'm tempted to ask it to go through and do a clean up pass, but testing takes some effort/time, what is there to gain, as long as I have plenty of memory and cycles (I do).
 
And a quick explanation of the "READS TOTAL/FAIL" column.

I wanted to remote the RH/Temp sensor, and it communicates over I2C (Power, ground, a Clock and a Data line). I2C is typically limited to ~ 1 Meter length, and I wanted to go much further, maybe 10 M. I forget now if it was me, AI, or a collaborative effort to consider the option of running the I2C bus much slower that the default 100 KHz rate. The main problem with line length is capacitance (rise/fall times) and cross coupling, and going slow makes that less of an issue. There's no need for speed here, we can wait minutes between readings , and AI said that technically, I2C should work down at single Hz rates. But some libraries may have time outs which limits how slow you can go. I had AI write some test code that I defined, running in loops and reporting failures, and it showed that with 25' of thermostat wire (18-5), I was good right up to ~ 300 KHz, even running a hair dryer nearby (my low tech RFI/EMI test! :) ), which surprised me. So 10 KHz gave a ton of margin.

But I still wanted to know if things ever degraded, I told it that for each reading at 5 minute intervals, actually take 5 readings, and use the median value. That's just the kind of stuff we did in our instrumentation measurement code, so it's habit. But I also wanted to know if there any dropped readings, so the 60/00 you see if the group of five readings, every five minutes for an hour. I just like that confirmation that everything is acting as expected.

I like to bullet proof this stuff as much as possible. The ESP32 controller pins can safely sink ~ 20 mA, so I used 330R in series with its I2C lines (I2C uses 10K pullups, and the devices on each end can pull the lines low). The RH sensor is limited to 10mA so I use 1K Rs on its lines. At 3.3V that keeps it at 10 mA and 3.3 mA if a line shorted to the 3.3V power line. And with 10K pullups, the low voltage from that divider is still well within spec.
 
Thanks for posting. I recently built a boat dock from parts whose manufacturer recommends not leaving in a frozen lake. Instead of pulling the dock out in winter, I’m installing a bubbler to keep the lake from freezing.

I want the bubbler to run intermittently to keep electricity cost down and to allow the lake to freeze a few feet from the dock.

And I’d like to install a sensor to record lake levels. And send the data to me over WiFi.

I’m looking into an arduino or raspberry pi to implement this. I may need some AI help to get this done.
 
one of my projects is actuating and automating the cupola windows.
I ran 2x cat5 and an 18/5 for power to each cupola. I can link the two sliding windows and use a single actuator.
One Cat5 is for a POE cam and the other can be used for control/sensing.
PXL_20260422_215040834-1.jpg


They are a high point in each respective roof and the hope is to get some chimney effect, allowing cool air in through a north basement window and letting the hot out passively.
 
That is really cool and I appreciate you sharing the details. I have done some basic Arduino stuff but nothing this polished.

The short cycling issue with dehumidifiers is so real and it drives me crazy. Mine does the same thing where it just clicks on and off every few minutes once it gets close. I never thought to just run it continuous and let a controller handle the timing.

What sensor did you end up using for the remote humidity reading? And did you have any trouble with the WiFi dropping out in the basement? Mine is spotty down there and I always worry about losing the email alerts.

Also curious if you ever checked the power draw difference between your controlled cycling and letting the dehumidifier manage itself. Would be interesting to see the actual savings.
 
I use AI all the time art work for website, creating spread sheets I don't even think anymore.
one thing I found get a plan together early building upon each step seem to break things, but it fixes it just takes more steps, graphics it just goes south and never gets fixed.

I had a dehumidifier in my crawl space that constantly short cycled I made an " exhaust" for it to keep the air away from the unit, free box some tape and 6 ft of duct work
 
Another thing I’d like to do. My shoreline is becoming a goose habitat. I’d like to have motion sensors that trigger my sprinkling system whenever geese swim up to my shore and begin walking and deficating through my back yard. The sprinklers scare the geese enough to leave.
 
Another thing I’d like to do. My shoreline is becoming a goose habitat. I’d like to have motion sensors that trigger my sprinkling system whenever geese swim up to my shore and begin walking and deficating through my back yard. The sprinklers scare the geese enough to leave.
Not to derail the thread but try a green laser as well. They go crazy and run from it.
 
.... What sensor did you end up using for the remote humidity reading? And did you have any trouble with the WiFi dropping out in the basement? Mine is spotty down there and I always worry about losing the email alerts.

Also curious if you ever checked the power draw difference between your controlled cycling and letting the dehumidifier manage itself. Would be interesting to see the actual savings.
Sensor is listed in post #2 (based on some of my research, plus AI input, these are common in Arduino world), ~ $8 each:

HiLetgo SHT31-D Temp/Humidity Sensor Module IIC I2C Interface 3.3V GY-SHT31-D for Arduino www.amazon.com/dp/B07ZSZW92J

... building upon each step seem to break things, but it fixes it just takes more steps, ...

I had a dehumidifier in my crawl space that constantly short cycled I made an " exhaust" for it to keep the air away from the unit, free box some tape and 6 ft of duct work
Yeah, I may post some details later, but I have had it break things in very weird ways when updating something unrelated. It deleted some of my comment lines that I told several times to leave in, I felt like I was scolding it, I had to make a point "We added those comments to the Requirements document, right? So follow the document, and leave those comments in!". If it was one of my engineers, we would have a had a little sit-down talk! It gets a little weird.

I may look into that exhaust duct idea again. It might not be practical for where I have the unit placed, but it could make sense in continuous mode - if the drier/warmer air is mixing in with the intake air, the cold coils won't pull as much moisture out. I should try some incense stick smoke tests.

General FYI: Anyone considering any sort of timed control of a dehumidifier(or other device) - make sure that when power is interrupted, that the unit returns to its previous state (ON-Continuous, for this use). My unit (Pelonis brand) actually mentioned this feature in the manual. Many electronic button controls will just reset to off if it loses power, that wouldn't work with a timer.
 
... And did you have any trouble with the WiFi dropping out in the basement? Mine is spotty down there and I always worry about losing the email alerts.

Also curious if you ever checked the power draw difference between your controlled cycling and letting the dehumidifier manage itself. Would be interesting to see the actual savings.
Forgot to answer this section:

I've got a mesh unit just about 25' from the unit, direct line of site, so I'm getting ~ 58~68 RSSI reading from the device (I include that in the report, and live update web page button so I can test it if I move anything around). It was a concern, this particular Waveshare version if the ESP32-S3 uses a surface mount antenna, only ~ 3/16" long (looks like a SMD inductor). There are other versions with a connector for an external antenna, but with my mesh units, no problem.

I haven't thought of a good way to test cycled versus continuous efficiency. Humidity levels can vary day-to-day, and throughout the day. Maybe my best shot would be to see how long it takes to collect a liter of water (it's rated 22 Pints a day - what a weird measure! converts to ~ 0.43 L/Hour, or 2.31 Hr/L), and try for times with about the same ambient RH. AI estimates a 40% loss, so even with not so controlled conditions, seems I should see something significant?

BTW, I asked AI about this, because I had read up on the Energy Star testing, and they run the DH in continuous mode to get the watt use and 'pints per day' data, with a constant 60% RH input at constant (68F?) temperature, to simulate a basement. But they don't test it cycling on/off. AI said it was being considered, but hasn't moved out of committee, or something like that. AI said that the A/C Energy Star ratings (SEER and others) do take cycling into account, so this isn't an 'out there' idea.
 
Last edited:
Not to derail the thread but try a green laser as well. They go crazy and run from it.
I almost got a green laser a few years ago, we had so many geese messing up our yard. But not so many the past few years, I think that bird flu took its toll?

Anyway, not too thread-drifty - I could see controlling a sprinkler with an MCU, but a laser could be a problem - wouldn't want to burn anyone's eyes out! Bst to keep that under direct supervision.

But maybe the green laser is so effective, that once you've used it manually for a while, the geese actually learn to stay away? I dunno, all these animals that become pests seem very, very persistent.
 
I now wish my basement was humid so I could embark on such a cool project :)
 
I almost got a green laser a few years ago, we had so many geese messing up our yard. But not so many the past few years, I think that bird flu took its toll?

Anyway, not too thread-drifty - I could see controlling a sprinkler with an MCU, but a laser could be a problem - wouldn't want to burn anyone's eyes out! Bst to keep that under direct supervision.

But maybe the green laser is so effective, that once you've used it manually for a while, the geese actually learn to stay away? I dunno, all these animals that become pests seem very, very persistent.

I think I'm going to start with a handheld green laser for a while to see if that convinces the geese to stay away.

As to your AI assisted dehumidifier, I may try the same thing in my workshop. I have a dehumidifier in there (detached 2 car garage). Lately humidity has sneaked up to 60% per my Ambient weather station. I want it at 50%. I've got a summer's full of projects going on now, but I'll try to give the humidifier project a whirl when I have time.
 
You've got a lot going on there, lots of moving pieces!

Give AI a shot at coding some limited functions for you that you might want to add/modify. See if it's worthwhile. Like I said, the value to me was maybe more in forcing me to have clear requirements, that's 90% of the battle, the code is the 'grunt work', in a sense.
...
It is not as complicated as it looks on the paper. Once I figure out the way I want to partition the tasks done by each node (divide and conquer), what each node has to do is not complex, except for the MC (Master Control node).

The MC has the most complicated software, while the slave nodes have more hardware. For example, the BM (Battery Monitor) nodes have analog differential amplifiers to sense individual cell voltages and to accept the output of a Hall effect sensor for current measurement. And there's a multiplexing circuit as the MPU ran out of analog input pins.

I happened to get a bunch of nice expensive industrial Hall effect sensors from the used market, and they are way nicer than using shunt resistors for current sensing. The Arduino Promini A/D converter are lousy 10-bit, not 12-bit, but I wrote interrupt-driven code to oversample each voltage input by 10,000x, and get to milliVolt resolution to measure each cell voltage accurately. Low bandwidth, but cell voltages don't change that fast. And yes, there's a stored look-up table on each node to correct for scaling and offset errors of the analog circuitry, by manual calibration against a DVM.

Using mixed through-hole and SMD components, I was able to design and have manufactured a PCB small enough to fit inside a Ring battery case. Next time, I will be using all SMD to make it easier to fit parts. And placing SMDs then solder them using a hot plate + a hot-air iron is a lot of fun.

Anyway, the software task that gave me the most trouble and is most time consuming is the software to drive the nRF24 wireless chip. The doggone thing was erratic like heck, and also very sensitive to timing between commands sent from the MPU. There's nothing in the specs about this. I spent 100 of hours experimenting to get it to work. On the Web, some said the problems were with fake chips, and genuine chips did not have problems. I guess I need to get some from places like Digikey to be sure of getting genuine parts. AI would not help me with this crappy part of work.
 
Forgot to answer this section:

I've got a mesh unit just about 25' from the unit, direct line of site, so I'm getting ~ 58~68 RSSI reading from the device (I include that in the report, and live update web page button so I can test it if I move anything around). It was a concern, this particular Waveshare version if the ESP32-S3 uses a surface mount antenna, only ~ 3/16" long (looks like a SMD inductor). There are other versions with a connector for an external antenna, but with my mesh units, no problem.

I haven't thought of a good way to test cycled versus continuous efficiency. Humidity levels can vary day-to-day, and throughout the day. Maybe my best shot would be to see how long it takes to collect a liter of water (it's rated 22 Pints a day - what a weird measure! converts to ~ 0.43 L/Hour, or 2.31 Hr/L), and try for times with about the same ambient RH. AI estimates a 40% loss, so even with not so controlled conditions, seems I should see something significant?

BTW, I asked AI about this, because I had read up on the Energy Star testing, and they run the DH in continuous mode to get the watt use and 'pints per day' data, with a constant 60% RH input at constant (68F?) temperature, to simulate a basement. But they don't test it cycling on/off. AI said it was being considered, but hasn't moved out of committee, or something like that. AI said that the A/C Energy Star ratings (SEER and others) do take cycling into account, so this isn't an 'out there' idea.
This is all great stuff and is inspiring me to do something similar once our remodel finishes in a year or so. I may have missed it but I view it as the elephant in the room.

Once you have agentic actions happening, even simple ones like reporting, a great deal of time and effort is expended, trying this and trying that, at least for the way I work. Do you have everything version controlled and backed up offsite in Github or other facility in case of disaster?

I am just now creating a new Github infrastructure that is totally separated from my legacy professional projects and it is proving to be a bit of a hassle (starting with key management) but I want everything I do post-retirement to have no connections, no dependencies and no knowledge of my previous life when I was still working.

We will be putting in a Franklin system (I don't trust Tesla and Musk, to be perfectly honest) with ~24kW, 5 batteries, generator and I want some automation and reporting.

BTW, if you're using E-Mail notification, what gateway are you using? Just an aside but I find that to be a little perplexing to make it durable and hack-proof.
 
Back
Top Bottom