River System Control Software (2017)

Sub-forum for general software improvements threads
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: River System Control Software

Post by hamishmb »

Hi.

Hmm, that's very annoying after we tested it for 4 hours yesterday! I'm supposing the software crashed at some point, and that was the state the system was in at that time, so it just kept pumping. That's a scenario I hadn't thought of, I'll have to write some backup code to handle that in case this happens again.

When I come in next Monday, I'll come a bit early so I can fix this and we can test it again while we have lunch :)

Hamish
Hamish
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: River System Control Software

Post by Penri »

Hello

If I switch the Pi off then on will the system re-boot to normal operation?

Penri
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: River System Control Software

Post by hamishmb »

Hi,

Perhaps. But it will likely go wrong again. Shall I just come in now for a few minutes and fix it? It'll probably not take long.

Hamish
Hamish
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: River System Control Software

Post by Penri »

Hamish

If you can spare the time, then yes please.

Hwyl

Penri
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: River System Control Software

Post by hamishmb »

Okay, see you in a few minutes :)

Hamish
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: River System Control Software

Post by hamishmb »

UPDATE:

The system has been patched to make it work while I fix the problem "properly" XD The patch was committed to github if you're interested in seeing it.

Penri, I just realised I left the butts valve all the way open, so it would be a good idea to close it a bit :)

Our system is now back up and running.

Hamish
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: River System Control Software

Post by hamishmb »

The next version of the river system control software was deployed today, complete with CSV readings file format on a per-site basis. I stayed in till lunch to check it was working correctly, and it all seems fine.

Note: the rdate command needs to be moved to /etc/rc.local on the Pis - only root has sufficient permissions to make it work. For some reason, it was still working on buttspi - perhaps we put it in rc.local already, who knows.

Hamish
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: River System Control Software

Post by hamishmb »

I have updated the control software and made numerous changes and improvements. Some of these mean the pis will need reconfiguring, so I'll note what I need to do here.

Summary:
  • References to water wheel flow direction detection have been removed - dropped requirement.
  • Directories for logs and readings were created (/logs, /readings).
  • Monitors now write the .CSV readings files on a per-device basis.
    • These are stored in /readings.
    • Naming scheme: /readings/<system-id>:<probe:id>.csv.
    • Example: /readings/G4:M0.csv.
    • These are fully de-duplicated now.
  • The old site-based monitoring code has been removed.
    • This includes the -f, and --file options on the commandline - need to change pi config.
    • The interactive readings file selector has also been removed.
  • NOTE: Currently buttspi readings are not logged at sumppi anymore - need to implement overarching site logging first.
  • ^ But the readings are still sent to the standard output.
  • Logs are now stored in /logs to keep things tidy.
We can also rotate readings files now, probably. It's easier because the Monitors keep track of them. Thoughts?

Before I make too many more changes, I'll deploy this next Tuesday for a more thorough test.

Hamish
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: River System Control Software

Post by hamishmb »

Note: It might also be nice to make a script to rotate the logs and reboot the pis for us in the short term, before we do proper log rotation without requiring a reboot.

Hamish
Hamish
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: River System Control Software

Post by Penri »

Hello

Can you reduce the levels at which the circulation pump switches on and off, I’m in this morning and the systems stopped with around 400mm in the sump. Off at 200 on at 300 should work for us.

Penri
Post Reply