Spring / Summer 2018 and onwards software
Re: Spring / Summer 2018 and onwards software
Hello
I won't be around for the next couple of days so I can't be there to help, good luck.
Hwyl
Penri
I won't be around for the next couple of days so I can't be there to help, good luck.
Hwyl
Penri
Re: Spring / Summer 2018 and onwards software
Hello,
I came in and fixed the issue today. It was nothing major. Here's a description of the problem (excerpt from the email):
Everything else seems to be working well, so all is good .
Hamish
I came in and fixed the issue today. It was nothing major. Here's a description of the problem (excerpt from the email):
I will now commit the fix to our code repository, to avoid this issue in future. The issue is still present on the buttspi side, but it won't be a problem because of the way the software starts:The issue was an accidental delay I introduced a long time ago when queuing readings from the sump probe, but it only became an issue as of yesterday, because of changes to the software's internals to enable future works.
- On buttspi the software starts and connects to sumppi when/if it can.
- On sumppi, because of temporary changes, the software will now wait for buttspi before it starts to do anything.
- ^ I will revert this back to the old behaviour of starting anyway when possible. For now it will be fine - our network connection between pis seems just fine.
Everything else seems to be working well, so all is good .
Hamish
Last edited by hamishmb on 11/07/2018, 11:06, edited 1 time in total.
Hamish
Re: Spring / Summer 2018 and onwards software
To clarify, the software would eventually have reacted, but just several minutes late, which isn't much use.
NB: Terry, DHCP on your router works fine, I realised I configured a static IP for the ethernet port on my laptop
NB: Terry, DHCP on your router works fine, I realised I configured a static IP for the ethernet port on my laptop
Hamish
Re: Spring / Summer 2018 and onwards software
UPDATE:
Several more changes have been made. Mostly these are more enabling works for the future, notably:
There is a fair bit of refactoring being done here, as our design needed to change, but we're getting pretty high levels of flexibility now. Yay for real-world software development XD. Thanks for being patient waiting for the new features to roll in
Hamish
Several more changes have been made. Mostly these are more enabling works for the future, notably:
- All config for all sites is now stored in config.py (previously called universal_standalone_monitor_config.py).
- Hence, there are no longer any commandline options for main.py.
- There will ideally be just one commandline option for universal_monitor.py (--site).
- ^ Currently, we still have -n to specify the number of readings to take (usually unspecified to run forever).
- The -t, --type, option has been removed, because config.py now contains this info.
- More refactoring has been done between the two scripts to make them as flexible as possible from a monitoring point of view.
- ^ This is now largely complete, and will make it easy to implement the overall site log.
- The logic for controlling gate valves will probably be in core tools, in case we want a remote pi to handle that.
There is a fair bit of refactoring being done here, as our design needed to change, but we're getting pretty high levels of flexibility now. Yay for real-world software development XD. Thanks for being patient waiting for the new features to roll in
Hamish
Hamish
Re: Spring / Summer 2018 and onwards software
As noted elsewhere, I have reverted the readings file format to make it easier to plot results on a graph and do other analysis.
Some other changes are in the pipeline to help add support for multiple pis - more centralised config in config.py.
Some other changes are in the pipeline to help add support for multiple pis - more centralised config in config.py.
Hamish
Re: Spring / Summer 2018 and onwards software
The software has been updated.
Summary of changes:
Hamish
Summary of changes:
- The readings file format was reverted to make charts easier to produce / allow easier analysis.
- Multiple sockets can now be created at the master pi end using the configuration in config.py.
- This is (I think) that last thing that was stopping us from adding more pis to the system with relative ease.
- Each remote pi will communicate over its own dedicated socket to the master pi, counting up from port no. 30000.
- ^ eg 30000 - buttspi, 30001 - stagepi, 30002 - railwaypi etc.
- Probe objects now have an id attribute instead of a name one.
- This makes it easier for us to identify different probes at different sites for making decisions.
Hamish
Hamish
Re: Spring / Summer 2018 and onwards software
I fixed a few issues with the new software today:
The circulation pump was configured for pin 5 for some reason - now pin 18 as specified.
A software mechanism I used at home for looping over a dictionary didn't work at WMT. I will investigate on my pi, but it's weird because I already tested it...
If we run out of stuff to do on Thursday (if I make it in), I'll have a look then, or I'll come in at some weird time when I'm free to have a look.
Also:
I have edited the .bashrc files on the pis:
The circulation pump was configured for pin 5 for some reason - now pin 18 as specified.
A software mechanism I used at home for looping over a dictionary didn't work at WMT. I will investigate on my pi, but it's weird because I already tested it...
If we run out of stuff to do on Thursday (if I make it in), I'll have a look then, or I'll come in at some weird time when I'm free to have a look.
Also:
I have edited the .bashrc files on the pis:
- Sumppi's script now takes no options - "python3 main.py".
- Buttspi's script now only takes one option - "python3 universal_monitor.py --id "G4".
Hamish
Re: Spring / Summer 2018 and onwards software
I updated the software again and updated the pis today:
- Magnetic probe levels can now be logged immediately when a level change is detected, but before the reading interval has elapsed.
- This is a convenience feature so we can check the probes are working more easily.
- Currently disabled: needs debugging log mode enabled to prevent huge file sizes.
- Remove dot in filenames to making charting w/ libreoffice easier.
- Remove old config in config.py (new format).
- Make the main files executable for convenience (been meaning to do this for months).
- Update docs for config.py
Hamish