Hello friends
Since i already read much about node-red i am confident enough to start my project.
To formulate it simple: I want to read and control 2 of my dosing pumps via a webserver. They can be fired via modbus tcp. A friend of mine wants to join my project to sharpen his web-dev-skills.
We are now planing our project but we are not quiet sure about the architecture.
Out theoretical plan so far:
-
Read the data via modbus from the pumps, convert them into json file and send them to the webserver.
-
there my buddy will get the json data and implement them into a dashboard.
-
to control the pump, we are not quiet sure how to work with that. Is a good way to create a json file on the webserver (with the changes that were made) and make a http get reqest in node-red to get this json file. After that write the new info via modbus to the pump?
So i am talking about a loop of to 2 flows, where 2 jsonfiles will be send: What i mean:
Flow1: reads data from pump -> makes json1 file - sends json1 file to webserver.
Flow 2: gets jsonfile2 from webserver -> make data to work out of this jsonfile2 -> send (if there were changes) data to pump
Flow1: : reads data from pump -> makes…
Flow2:…..
Flow1:….
And so on
Is this „the way to go“? Or is there a better way?
Thank you and i am looking forward to discuss with you my project
Not sure what you value you think you are gettng from the webserver in the middle ?
What i would do (and do - but without the use of modbus)
- Read the current PH/ORP/Salinity of your pool - presumably you do this through modbus from your chlorinator/control centre - do you have the modbus map for this device ? i.e. you need to know what registers present what information and the format it is in
1)a) How do you interface Modbus into your proposed system - usually modbus is presented over RS485 (sometimes Ethernet) but unlikely in the case of a pool control system - therefore out near your pool housing you will need a device to interface from RS485 into either WIFI or Ethernet - many people use a Raspberry pi or an esp8266 for this depending on your overall goals and architecture
- Once you have the readings and knwo what you need to dose (acid/chlorine etc) you then need to dribble the required chemical in - most of these dosing pumps are peristaltic and deliver small amounts per revolution of the pump - the idea is "slow and steady wins the race" so you would record (lets say) todays PH level, run the acid dosing pump for an hour whilst your filter pump was running and then check tomorrow if the PH has come down if it has come down too far then you back off the acid dosing until the following day - measure again and run the acid pump for a shorter time
All of mine is done through automatic control (i do have a NR interface to allow me to over ride some settings)
In my case my dosing pumps are 240v and have a small knob on the front to control how much they does (how fast the motor spins) - so i leave this set in the mid range and then use a Sonoff POWr2 (flashed with Tasmota) to power the actual pump to control its on and off cycle times
Craig
Thank you for the input.
I know that there are much more andvanced pumps and probably "smarter" ways. But my main goal is to learn as much as i can so i try to do it "my way"
In the last couple of days my project got a bit more specified.
- I have a dosing pump. This dosing pump is connected to a modbus device (called "CIM)
- I read the modbus data with node-red from the CIM-module
3)I want to send this data as a json file and wihtout a local network to my own webserver
4)I want to control my dosing-pump via my own webserver
Open question:
A) find the right module where i can node-red and send via 4g or narrowband IOT. Ideas?
B) How can i push my data to a extern webserver? Still confused if websocket or http commands is the way to go
C)Controlling my pump. Can someone sketch whats the right way to send data from the webserver to node red? I am somehow confused how. creating a json file with the updated values and send them to node-red, so node-red can update the values?
Thank you