-
Notifications
You must be signed in to change notification settings - Fork 397
workaround for hanging rig-pump communication (with WW pump) #445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
and improve logging, more robust killing of reset.py if it hangs
bin/oref0-radio-reboot.sh
Outdated
# Note that this is a workaround, until we found the root cause of why the rig pump communication fails | ||
# Note that there is one known false positive for the second issue. It will reboot if the port/device and/or radio_type have been misconfigured | ||
|
||
radio_errors=`tail --lines=20 /var/log/openaps/pump-loop.log | egrep "spidev5.1 already in use|mmeowlink.exceptions.CommsException: Could not get subg_rfspy state or version|retry 0|TimeoutExpired. Killing process"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen Could not get subg_rfspy state or version
lots of times and it never requires a reboot for me: a simple mmtune (with its radio reset) will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. This might be the trigger for the hanging reset.py for WW pump users (in tonights log), but it will probably not hang on the rig. So I won't trigger a reboot on mmeowlink.exceptions.CommsException: Could not get subg_rfspy state or version
bin/oref0_init_pump_comms.py
Outdated
logging.debug("spi_serial not installed. Assuming not using spidev") | ||
except Exception as ex: | ||
logging.error("Exception in oref0-init-pump-comms spi_serial: %s" % ex) | ||
logging.exception("spi_serial not installed. Assuming not using spidev") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should this be an exception and not a debug warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, refactored too much. rolled back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks like it's ready for testing.
This code runs on my rig now. Installs fine and I did some tests that the scripts work. Feel free to test and improve. I will report later if there are no downsides, so that it can be merged to dev. |
@PieterGit here the pump log you requested:
is that the log part you mean? |
here with error:
|
Fixed the merge conflict. Is this ready to merge to dev and be tested by more folks? |
yes, it's ready to go to dev. i have been running for more than a week on this branch |
This will reboot the rig if hanging rig-pump communication is detected.
This pull request also improves logging, has more robust killing of reset.py if it hangs.
The root cause of this issue is discussed here oskarpearson/mmeowlink#60