My new automation system.

Yeah, I agree. Lots of good ideas on here. Re the SM hat I ended up using the relay only board and am using a different hat for the sensors. The SM ADC only takes voltages up to 3.3v and most sensors are 5v. So you have to include voltage dividers or use a board that can handle 5v sensors.
 
I'm finding the nodejs-poolController very frustrating. I am unable to get any serial signal. Is there something that needs to be changed in the json file to allow it to control a standalone pump? Maybe I'm missing something in the documentation, but a tutorial or walkthrough would be amazing!
 
I was wondering how that was going! Welcome to open source software!

Here's the things I'd check:

Simple stuff:
1. config.json file

Since you're pump only, try turning off the Intellitouch mode:

"intellitouch": {
"installed": 0,

And for good measure, hard code these.

"virtual": {
"pumpController": "default", <- Change this to always
"chlorinatorController": "default" <- Change to never


In the weeds/hard stuff:
1. Make sure power is switched off to Intelliflo before connecting. Check wiring and make sure polarity is correct

2. Remove the Intellitouch fr2. Make sure /dev/ttyUSB0 is the right name and matches what's in config.json ("rs485Port": "/dev/ttyUSB0",)
pi@pool:~/nodejs-poolController $ dmesg | grep USB0 <- Type the red part
[ 3.185650] usb 1-1.1.3: ch341-uart converter now attached to ttyUSB0 <- Should get this output

3. What user are you running under? Does it have permission to access the device?

crw-rw---- 1 root dialout 188, 0 Aug 30 15:39 /dev/ttyUSB0

The default permissions for the device require the user to either be root or part of the dialout group. I just checked and the user pi is that way on mine. But you can also change the permissions to remove all doubt by typing 'sudo chmod 777 /dev/ttyUSB0'

4. Replace the adapter and see if that makes a difference. It is cheap parts from overseas after all.

Really wish I had one of these pumps now! Also, the guys who write the software hang out over at Gitter they may have some ideas as well.
 
I was wondering how that was going! Welcome to open source software!

Really wish I had one of these pumps now! Also, the guys who write the software hang out over at Gitter they may have some ideas as well.
Thank you for the detailed reply. I feel like I've done most of this...I can't seem to get any data from the serial connection on my pi or even on my Mac, hence ordering a second adapter. I'll mess with the cabling a bit and see if it's something simple before I move on to the json file.

When you say "make sure power is turned off" before connecting, does that mean just shut down the pump (which puts it into manual mode) or completely power it down via the breaker?
 
Thank you for the detailed reply. I feel like I've done most of this...I can't seem to get any data from the serial connection on my pi or even on my Mac, hence ordering a second adapter. I'll mess with the cabling a bit and see if it's something simple before I move on to the json file.

When you say "make sure power is turned off" before connecting, does that mean just shut down the pump (which puts it into manual mode) or completely power it down via the breaker?
I’d hit the breaker. Start up routines that’d enable rs-485 probably only run once
 
Thank you for the detailed reply. I feel like I've done most of this...I can't seem to get any data from the serial connection on my pi or even on my Mac, hence ordering a second adapter. I'll mess with the cabling a bit and see if it's something simple before I move on to the json file.

When you say "make sure power is turned off" before connecting, does that mean just shut down the pump (which puts it into manual mode) or completely power it down via the breaker?
Found this on the gitter from the programmer.
"The pumps don't talk unless they are being controlled remotely. If you set the intellicom:0 and intellitouch:0 in your config.json than the virtual pump controller will start automatically. Then you should see the pump responding to the commands."

Definitely looks like you'll want to set both of those to 0 so the virtual pump controller starts. The pump is apparently not very chatty and basically only responds to commands.
 
[...]
4. I decided that despite my children being complete and utter turds sometimes, I love them. I recently read a news story (WARNING! SAD!) about a girl who got electrocuted by pool lights. So I decided I'd add a GFCI to the circuit that goes to my lights to protect my cute little investments. (Seriously, they're gonna grow up and support me, since my first two didn't...). It was a major PITA to find a 240v DIN rail GFCI circuit breaker but I managed to do so. It's not the same style (UL439 vs UL1077) as the rest of my breakers though. To maintain the busbar system, I will have to replace them all and UL439 breakers are double the cost of UL1077 breakers but I'll do it because they're worth it.
[...]
Hello cmc0619
First of all, congratulations for your great project (I think I loose it when reading the forum...)

I want to post about the GFCI for human protection. I think I am protected by the house main GFCI, as all power for the pool goes from them.
In fact, I really have 2 GFCI in serial (that I think is not a very good idea): one for general house, and other for kitchen and outside (garden, pool, etc.)
Time ago when I have troubles with ground of a 40 years old pump, the GFCIs (both rated at same 30mA) cut the power in a unpredectible behaviour: sometimes the main of house, sometimes the secondary of the kitchen, sometimes both...
Do you think you need aditional GFCI if you have one before the circuit? I think only GFCI "in-parallel configuration" can have some advantage because a problem in the pool can make cut only this circuit and not all the electricity of the house (i.e. think about the fridge at holidays)
 
Hello cmc0619
First of all, congratulations for your great project (I think I loose it when reading the forum...)

I want to post about the GFCI for human protection. I think I am protected by the house main GFCI, as all power for the pool goes from them.
In fact, I really have 2 GFCI in serial (that I think is not a very good idea): one for general house, and other for kitchen and outside (garden, pool, etc.)
Time ago when I have troubles with ground of a 40 years old pump, the GFCIs (both rated at same 30mA) cut the power in a unpredectible behaviour: sometimes the main of house, sometimes the secondary of the kitchen, sometimes both...
Do you think you need aditional GFCI if you have one before the circuit? I think only GFCI "in-parallel configuration" can have some advantage because a problem in the pool can make cut only this circuit and not all the electricity of the house (i.e. think about the fridge at holidays)
Thanks! I'm liking your project as well. My water manifold is on order so I can do ORP, temp, and pH readings like you described.

I'm not an expert BUT I did stay at a holiday inn and it's my understanding that you aren't supposed to have multiple GFCIs in series. The first one messes with the voltage level for the 2nd one and, as you described, they become unreliable.

On my home I didn't have any GFCI on my pool circuit, it wasn't code back in 2006 when my pool was built, and I'm not aware of homes in the US having GFCI for the whole house, although apparently there is a push to make all breakers GFCI by our regulatory body. The only GFCI outlets I have in my home are in wet places like bathrooms and kitchen, and they're built into the outlets.

I would've liked to have had a master GFCI that protected the whole pool controller load center but 30amp 2 pole GFCIs in a DIN Rail footprint cost $400 dollars! So I just put one on the 120v circuit since that was easily and economically sourced.
 
Seems electricity stuff in US is absolutly diferent from Spain... Here 99% of houses are 230V~ monophasic and probably more than 90% are protected with GFCI (I suppose GFCI are the same as "diferencial"). Here, "diferenciales" are very common, and you can get one for less than 15€ everywhere

Usually are rated to 40A or more, but the overload its not the function but the leaks to ground. For this, is more important the sensibility: 30mA with response less than 0.1s. Thats mean, if the power entering in the house and exiting from the house (two cables in alternate current) has a diference of only 30 milliampers it will break all the circuit in less tha 100 milliseconds, because supposedly there is a leak and electricity is devouring somewhere.
This is protecting people be electrocuted and the ultra-importance of GFCI.
I will try to explain....
If you get the two cables of a 230V each with one hand, you will be crossed by the current, but surely you will release them immediately, and maybe nothing happens. If you get only one cable with one hand and you are barefoot on a puddle, the same current will be crossing you (entering from one cable and outputing by the ground to the water), but probably may be harder for you to let go and can be electrocuted. With the GFCI this never happen, because break the circuit as soon as power is in one cable and not exactly the same in the other.
The serial connection of GFCIs is not problematic for protection, but redundant. Its like put in serial two 10A circuit breaker: you are well-protected for overload, but you dont know which one is going to break (or even the two).
I am very surprised how diferent things are in US and ES. i.e. in Spain, Variable Speed Pumps are uncommon and very very expensive, and in US seems to be the rule. The same with the manifold you post: I think here is impossible to get (thats the reason of my bypass proposal for sensor connections)
 
Thanks! I'm liking your project as well. My water manifold is on order so I can do ORP, temp, and pH readings like you described.

I'm not an expert BUT I did stay at a holiday inn and it's my understanding that you aren't supposed to have multiple GFCIs in series. The first one messes with the voltage level for the 2nd one and, as you described, they become unreliable.

On my home I didn't have any GFCI on my pool circuit, it wasn't code back in 2006 when my pool was built, and I'm not aware of homes in the US having GFCI for the whole house, although apparently there is a push to make all breakers GFCI by our regulatory body. The only GFCI outlets I have in my home are in wet places like bathrooms and kitchen, and they're built into the outlets.

I would've liked to have had a master GFCI that protected the whole pool controller load center but 30amp 2 pole GFCIs in a DIN Rail footprint cost $400 dollars! So I just put one on the 120v circuit since that was easily and economically sourced.

Have you had any luck with the chemical readings? Curious to see that manifold in action.
 

Enjoying this content?

Support TFP with a donation.

Give Support
Sadly the pool is closed until May 2020. I’m going to redo all the PVC, adding the actuators and manifolds before I open next year. It’s time to hibernate until then
 
I’m a retired programmer and have 6 raspberry pi’s scattered around our property monitoring or controlling various systems. None are ”mission critical” in that they actually must be functioning for the underlying system to work; they are add on controllers or monitors. I’ve considered building a pool controller (and an irrigation controller) but have hesitated for two reasons.

First, the uptime of the pi is impressive (better than windows) but I have seen a couple glitches where they didn’t come back fully after a power outage. We were in the northern CA PGE shutoff for 5 days: sufficiently long to deplete battery backups. Two of my systems were not fully functional when power came back and they needed a clean reboot. If we were away (all these systems are in a second house), having a non-functional pool controller could be a real problem. I can access every system remotely but in the power outage case, even SSH wasn’t functional.

The other problem is maintenance. If your wife and kids weren’t interested, what happens if it malfunctions or needs an upgrade and you aren’t available? That is the main reason I don’t make my system “mission critical”. Everything I do is “documented” and in github but none of my family could handle node-red let alone python.
 
I solved one stability problem on the pi by just having a cron process that rebooted everyday at midnight. There was evidently some piece of software that crapped out over time; a daily reboot was sufficient to solve the problem. The power outage problem was different and I have no idea what the underlying issue was; I couldn’t even get in by SSH and the logs weren’t useful. After yanking the power and rebooting, they came up perfectly.

I’ve also seen that if WiFi isn’t available when the pi boots, it isn’t guaranteed that it will connect after it is available. This is a problem in a power outage since the pi is most likely up and running before WiFi is running. With 6 pi’s handling various systems, it isn’t uncommon for me to have to reboot at least one manually after a power outage.

Note that the pi hardware is probably just fine; it is probably some piece of software deep in the kernel that isn’t quite right. A nightly reboot might fix this problem also since presumably the WiFi would be available at that time.

The watchdog hardware looks interesting but I wonder how they determine “software lockup”? It would be relatively easy to build in an “I’m alive” flag that would be monitored by an independent process. If it finds the “I’m alive” flag missing, it would reboot.
 
I’m a retired programmer and have 6 raspberry pi’s scattered around our property monitoring or controlling various systems. None are ”mission critical” in that they actually must be functioning for the underlying system to work; they are add on controllers or monitors. I’ve considered building a pool controller (and an irrigation controller) but have hesitated for two reasons.

First, the uptime of the pi is impressive (better than windows) but I have seen a couple glitches where they didn’t come back fully after a power outage. We were in the northern CA PGE shutoff for 5 days: sufficiently long to deplete battery backups. Two of my systems were not fully functional when power came back and they needed a clean reboot. If we were away (all these systems are in a second house), having a non-functional pool controller could be a real problem. I can access every system remotely but in the power outage case, even SSH wasn’t functional.

The other problem is maintenance. If your wife and kids weren’t interested, what happens if it malfunctions or needs an upgrade and you aren’t available? That is the main reason I don’t make my system “mission critical”. Everything I do is “documented” and in github but none of my family could handle node-red let alone python.

Cool! you’re from my old neck of the woods! I was born and raised down the freeway in union city.

I guess I don’t really consider my pool mission critical. Armed with the power of my TFP knowledge my pool going green doesn’t scare me. Also, consider this... My pool robot died and I had to take it in for repairs. That thing was out of service for 3 weeks until the pool store got it back to me. Now let’s say I had a commercial automation unit from Pentair or Hayward. The situation would probably be the same if something were to fry. All the components in my box either have spares in my basement or are 1-2 days away via Amazon prime. So my downtime would be a lot less than going commercial. I also work from home. I can go a week without leaving the house. It’s just not a concern for me. On the off chance that I’m out of town for business I run zeronet on my Pi so I can typically access it remotely. All that being said, I haven’t had any problems with the Pi and we get way too many power outages around here. I’m considering a whole home generator because it’s that annoying.
 
So here in South Florida the most prolonged outages are hurricane based. When that happens I have other issues to deal with. But we do get a lot of brownouts, less now since FPL just replaced all the poles and wires going into my neighborhood. But I think I can work to mitigate most of the issues you mentioned.

The watchdog has a battery backup that should help the Pi stay running (that is probably a good $25 to spend). Also the WiFi router it is connected to is also on a UPS. I also can add a breaker to the power going to the Pi that I can have my wife reset when I am out of town.

Like Cliff all my parts are user serviceable by me and cheap and readily available. If we have a lightning strike that fries anything I can get back up and running pretty quick.
 
Now that we're back into pool season, I finally have nodejs-poolController working and am working on getting it integrated with my node-red setup. The advice here has been very valuable.

@cmc0619, I'm curious if you're able to parse the status info from the intellflo to give you any useful information? I see it pulling everything in the payload, I'm just a little unsure how to extract the data I would want.
 
@cmc0619 any updates this spring? Is your system still running well?

I realize it's a lot to ask, but do you happen to have a BOM for your build? I like your layout and it's similar to what I've got cooking. I really like all the DIN mount stuff, but worried about how proprietary it is vs off the shelf components from HomeDepot, etc.
 
Today is the first day I've even looked at my pool. It's still got the cover on but NJ is warming up nicely so I'm slowly getting my act together. This is my 3rd season in this house and I decided with the pandemic it was going to be hard to find Chlorine at least in the early months. So I took the plunge and got a Circupool Edge40, will probably move the Stenner to MA dispensing. MPV replacement is long overdue (was leaking towards the end of last season), so I picked up a new one of those, and I bought 3 actuators to complete the final piece of automation which is the spa/pool mode valve movements. All of this stuff and a ton of PVC fittings to tie it all together are still in the mail and should be arriving this week. I also picked up the new model of Sequent Microsystems 8 relay board that now comes with removable wire ports, so I can wire it all up and then just connect it to the board which is nice because I have big hands and indelicate fingers. Will make it easier to wire up. All that to say I'm excited for this season and I think the controller, which worked great up until I pulled it off to put it in the basement for Winter, is going to be even better. I'm still very happy I made the switch.

Early after closing last year, I bought new components for a lot of the system to give it GFCI and reduce the wiring(busbars). I kept track of the parts I bought and put them in an Excel spreadsheet. Hopefully, this pastes correctly...

DescriptionPart #QtyUnit CostTotal Cost
Altelix 16x16x9 Windows CaseDiscontinued
1​
99​
99​
Busbar 2P2P16UL3/6
1​
8​
8​
Busbar 3P3P16UL3/6
1​
10​
10​
Busbar power feed lugsP50ULB
3​
6​
18​
GFCI 120vGFL2C160102
1​
63​
63​
GFCI 240vGFL2C20010S
1​
72​
72​
15amp breaker1CU*L (Altech * = Amps)
1​
15​
15​
240v breaker2CU*L (Altech)
2​
30​
60​
120v -> 24v AC xformerRS 797-5948
1​
68​
68​
Raspberry Pi
1​
35​
35​
DIN rail adapter for PiMaticBox
1​
10​
10​
8 relay HATSequentMS
1​
25​
25​
MCP3208 12bit-8channel HATtindie.com
1​
14​
14​
Meanwell PS 24vDCMDR-60-24
1​
19​
19​
Meanwell PS 5vDCMDR-60-5
1​
19​
19​
2 pole relay782-2C-24A
2​
6​
12​
2 pole socket782-2C-SKT
2​
4​
8​
MOV (box of 5)AD-BSMM-24
1​
8.5​
8.5​
1 pole relayWago 788-506
4​
13​
52​
4 way busbarWago 788-115
1​
2​
2​
2 way busbarWago 788-113
2​
1​
2​
Pressure TransducerAmazon
1​
20​
20​
Cable glandsAmazon
1​
17​
17​
Dinkle terminal blocksAmazonAppx
50​
Sensor blocksAmazonGuess
20​
WiringAmazonAppx
50​
776.5​

Sequent Microsystems is coming out with a new board soon that supports sensors up to 10volts and thermistors on board so I'll be picking that up as well when it's released for my sensor block I'm installing in the piping. The breakers are more expensive than the ones I initially used from automationdirect.com because they fit flush with the GFCI breakers (Altech is the only maker of DIN rail GFCI breakers) which is part of my plan to have a plexiglass panel that sits over them to keep wet fingers out, so if you don't care about that stuff you could shave a lot of cost off this by going the AD route. I think my V1 was more in the $600 range. Also, my V1 didn't have GFCI breakers so that's a large chunk of cost right there as well.

DIN Rail isn't proprietary. It's used all over the US in industrial plants and I think Europe uses them as their main breaker box layouts for residential. You can even pick them up at Home Depot! Although Amazon is cheaper and faster, and places like automation direct are cheaper still (and almost as fast in shipping) I guess you could say they're off the virtual/mail-order shelf parts! :D It's only been one season which in NJ is only a few months (man I wish I was back in AZ!), but the system hasn't had a single hiccup or glitch or failure of any kind. I feel pretty confident that it'll last me many years before I have to replace a component *knock on wood*
 
Now that we're back into pool season, I finally have nodejs-poolController working and am working on getting it integrated with my node-red setup. The advice here has been very valuable.

@cmc0619, I'm curious if you're able to parse the status info from the intellflo to give you any useful information? I see it pulling everything in the payload, I'm just a little unsure how to extract the data I would want.
That's awesome! I still haven't gotten an Intelliflow so I'll be asking you for advice. I've been following along though... It looks like he re-wrote the code and is now on v6.0. I'd done some basic mockups of what it'd look like for 5.2. When I get my pi back online I'll pop in to node-red and take a look. I think I was just using WebSockets to make calls to the APIs and using the value it returned but give me a week or two and I should be able to confirm.
 

Enjoying this content?

Support TFP with a donation.

Give Support
Thread Status
Hello , This thread has been inactive for over 60 days. New postings here are unlikely to be seen or responded to by other members. For better visibility, consider Starting A New Thread.