Integrating the Stage and Lady Hanham Butts Devices into the System

Sub-forum to hold jobs lists
Post Reply
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Integrating the Stage and Lady Hanham Butts Devices into the System

Post by TerryJC »

Now that the VPN Server is up and running, we can begin to integrate the already installed but currently not running devices into the system. I have proposed a Plan to do this below. If the work is completed in the order given, then any dependencies should be taken care of. Any departure from the proposed plan would need to be considered carefully to ensure that all dependencies can be met. The current situation is as follows:
  • The Sump SAC (sumppi), the Wendy Butts SAC (wbuttspi and the Wendy Butts Gate Valve (g4gatepi) are all running fairly well. There are some outstanding changes needed to the sumppi software to improve the hysteresis of the control algorithm, but the system is working quite well providing that water levels remain within nominal limits.
  • The Stage Butts SAC (sbuttspi) is physically installed. It was running earlier this year (in monitoring mode only) but was shutdown when the Platform for the butts showed signs of collapsing. The platform was replaced, but the SAC has remained un-powered ever since because of the lockdown.
  • The Stage Butts Gate Valve (g6gatepi) is physically installed but has remained un-powered awaiting the completion of the Stage Butts Control algorithm.
  • The Lady Hanham Butts SAC (lhbuttspi) is physically installed but has remained un-powered because of the lockdown.
  • The Lady Hanham Gate Valves (g1gatepi, g2gatepi and g3gatepi) are physically installed but have remained un-powered because of the lockdown. The SD Cards in the installed Pis almost certainly are all identical, so they need to be removed to update their hostnames and IP Addresses, unless a way to do this via the VPN can be devised (such as shutting down all othe Gate Valves in the system while these are updated one at a time).
Work will be carried out in the order given below:
  1. Power up the Stage Butts SAC, download and delete all historical logs and readings and update the OS. Ensure that it is included in config.py. Complete - 2020-08-13.
  2. Power up the Lady Hanham Butts SAC and update the OS. Ensure that it is included in config.py. Complete - 2020-08-13.
  3. Iteratively update the software on sumppi, g4gatepi, wbuttspi. sbuttspi and lhbuttspi until they are all running the current code in master. Complete - 2020-08-13.
  4. Deploy the NAS Box on site and check it is operating correctly. (At this stage without any interaction with the system devices.) Complete - 2020-08-19.
  5. Update the Sump SAC software to interact with the NAS Box, store results in the database and the control the Wendy Gate Valve. Complete - 2020-09-01.
  6. Update the Wendy Butts SAC software to interact with the NAS Box and store results in the database. Complete - 2020-09-01.
  7. Update the Wendy Gate Valve software to interact with the NAS Box and store values in the database. Complete - 2020-09-01.
  8. Update the Stage Butts SAC software to interact with the NAS Box and store results in the database. Complete - 2020-09-03.
  9. Update the Lady Hanham Butts SAC software to interact with the NAS Box and store results in the database. Complete - 2020-09-03.
  10. Power up the Lady Hanham Butts Gate Valves, one at a time, to ensure that they are not causing any network conflicts, etc. Ensure that they are included in config.py. Complete - 2020-08-13.
  11. Update the Lady Hanham Butts SAC software with an algorithm to read the level of water in the Wendy Butts Group G4 and control Gate Valves G1, G2 and G3 to keep the G4 level within limits plus manage the Solenoid Valve.
  12. Update the Stage Butts SAC software with an algorithm to read the level of water in the Wendy Butts Group G4 and control Gate Valve G6 to keep the G4 level within limits. Moved to viewtopic.php?f=43&t=272 - 2020-10-13.
  13. Power up the Stage Butts Gate Valve and update the OS. Ensure that it is included in config.py. Complete - 2020-09-10.
  14. Improve the algorithmic approach to overcome the 'binary' control currently exhibited by the Sump SAC when the water levels are at extremes. Also improve the algorithm at startup to overcome anomalies when the float is between sensors or at the bottom or top. Apply these changes to the other control algorithms if applicable.
  15. Fully integrate the system as a whole to ensure that the Wendy Butts are not repeatedly being emptied and filled due to conflicts between the algorithms of sumppi, wbuttspi, sbuttspi and lhbuttspi.
Notes:
  1. Once the NAS Box is deployed then time synchronisation can be switched over from the Real Time Clock Module attached to SumpPi to the NAS. The NAS Box will therefore have to be tested, prior to deployment, to ensure that:
    1. It can synchronise its own clock to the Internet.
    2. Accept rdate requests from River System Pis.
  2. Once the above is installed and tested, then the small Real Time Clock module attached to pins 1-6 of SumpPi should be removed.
Last edited by TerryJC on 14/10/2020, 10:00, edited 21 times in total.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by TerryJC »

If there are any comments, errors or omissions in the above, please post them here.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by hamishmb »

Hmm, I feel like getting the pis we currently have running to work with the NAS box should be done before adding new pis and devices to the system. This would mean merging use-database with master soonish, but that's okay. Is there a good reason to do this in a different order? This also makes no note of integrating sump pi and butts pi with the database.

Before we do that, even, I think we'll want to gradually update sumppi and wbuttspi to the latest version of the code on the master branch (sockets improvements and various small fixes). So I would add the following to the beginning:

1. Iteratively update the software on sumppi and buttspi until they are both running the current code in master.

I think progressively powering on gate valves would probably be a good way to do things.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by hamishmb »

NB: If we need a stand-in before Patrick's code is ready, I can probably throw together some very simplistic control algorithms very quickly.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by hamishmb »

The main thing I want to avoid is switching everything over to the database in one big go - I feel like if we slowly add devices then it gives me a chance to spot any load issues/anything else and fix them before it's a big problem.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by TerryJC »

hamishmb wrote: 27/07/2020, 11:52 Hmm, I feel like getting the pis we currently have running to work with the NAS box should be done before adding new pis and devices to the system. This would mean merging use-database with master soonish, but that's okay. Is there a good reason to do this in a different order? This also makes no note of integrating sump pi and butts pi with the database.
This was to comply with Penri's request to get the monitoring going as soon as possible. If that is likely to be easier using the NAS Box, then so be it, but my belief was that the monitoring would 'just work' if the devices were included in config,py.
hamishmb wrote: 27/07/2020, 11:52Before we do that, even, I think we'll want to gradually update sumppi and wbuttspi to the latest version of the code on the master branch (sockets improvements and various small fixes). So I would add the following to the beginning:

1. Iteratively update the software on sumppi and buttspi until they are both running the current code in master.

I think progressively powering on gate valves would probably be a good way to do things.
See above. Does this code include the NAS Box support?
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by hamishmb »

Ah I see. Yes the monitoring should "just work" that way. It won't be as easy without the engineer gui, but it should work the same we it has been with the readings files.

No, that code doesn't include NAS box support, but brings some small improvements to the code that are worth testing out before merging the code and deploying the NAS box.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by TerryJC »

In that case, I would suggest that we proceed with steps 1. and 2. and then insert your proposed step 'Iteratively update the software on sumppi and buttspi until they are both running the current code in master.' at step 3. BTW. That step should include g3gatepi, I feel.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by hamishmb »

Sounds good to me. I'm not sure which one that is, but yes I think it should include anything that's powered on - having everything running the same version of the software seems like a sensible idea to me.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Integrating the Stage and Lady Hanham Butts Devices into the System

Post by TerryJC »

Actually, that's a typo, it should have been g4gatepi and it's the Wendy Street Gate Valve.

I'll update the Plan.
Terry
Post Reply