Hi all, off on an ambitious project. I have an older hottub that is great condition but the controller is past its prime. Had a brain cramp one day to use a pi to control it. That led me on hours of reading! Others have accomplished. But then another brain cramp - why not use openHAB! I found this great article from Hackster.iousing the photon control with MQTT. So incorporated that into the attached drawing. But I want to make sure I am thinking through this correctly…
So in the drawing I have the pi running openHAB that in my setup can just run somewhere in the house. That will be great to keep it out of the weather.
In the tub itself is the breadboard that will have a Photon on it. The board will connect to the relays that power the pumps, blower, heater, and light. The board will also connect to the temp monitor.
There will be another control board mounted beside the tub in a weather proof box. It will look something like this: from the raspberry pi hobbiest. It will have the physical controls and temp display for the tub.
So my thought is to have the the photon on the IN tub board connect to openHAB, setup items and sitemap that I can then control and monitor from phone, tablet, etc. That seems pretty straight forward.
The photon on the OUTSIDE tub controller would be setup in openHAB but, when you press a button to turn on the pump on the box it would send a command to the other photon to execute the command? That’s the part that part that I am not clear on.
I think openHAB is a great platform to do something like this. The ideas are endless. Tying in a PH monitor, weather monitor, music, lighting, etc. I want to start simple and then grow it from there. Someone may have already done this and not posted it. Or i just missed it.
Thanks for the help!
Also, if you have some electrical chops and could help answer a few questions on the 220 issues that would be great. I would rather pm that. Electrical conversations tend to get very personal on boards.
I’m not convinced that openhab is the ideal solution to this.
I’d be more inclined to use a mini-plc. For a start, a mains driven one will already include relays suitable for lighter 220 loads like lights, ozone and blower. One with analog inputs will easily interface with any cheap resistive temperature sensor. Built-in timers, calendar, daylight saving, PID control… And the tub will still work autonomously if your openhab falls over.
Use a plc with a modbus capability, and that’s your door to openhab.
Siemens Logo or Crouzet Millenium probably the initial choice, but beware of software licensing costs. Personally, I’d look at the chinese clones from xLogic - mains or 24v, analog inputs, rtc, display, free simple graphical software with simulation, even wireless!
Source: I’ve rescued four tubs ~ two with obsolete controls, one smoke damaged and one tickled by lightning. Also converted a good domestic tub into ‘public use’ - giving just on/off and temperature controls, and better control over cleaning cycles than the OEM controller.
Essentially it is just inputs and outputs with a bit of logic in the middle. A PLC could certainly do the job but it is so limiting as a solution, I have used these products extensively for years, for commercial HVAC jobs. You can use the free block diagram software to program them up. Something similar would do the job but you could do so much more with openHab!
If I were you I would have a go with openHab, mosquitto, and mysensors.org stuff (sensors for everything you need and relays). I would use the arduino relays to switch contactors that turn on/off the mains power to the pump, heater and the like. If you think appropriate you could just wire up some manual override switches for redundancy.
If you decide to go down that path perhaps the best place to start is to write up a points list and functional description and go from there. If you are not an electrician I would suggest you get one for the mains power work.
thanks carl! the plc sounds interesting. dont think i knew they existed. i did some googling and could not find them for sale other than through non-us sources. maybe just missing it. what i did find looked like they were rather pricey? love that your saving hottubs. my brother-in-law has done the same. he got one superhigh end unit and called it his 88 cent hottub. that was what he figured the cost of the sandpaper he used to clean out the heater core and get it running again! lol…
he posted code out there too. i guess i still need the arduino. but the “logic” code would not run on the arduino but rather be setup in openHAB. The arduino just provides the connection points.
in any case, more reading to to this week! if you think of anything else let me know. and yes, i am working to get an electrician in to scope out a few things. the tub is already wired up with 220 which is work i did. its getting into the distribution across the components IN the tub that gets tricky.