-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Bang-Bang controller hangs randomly. Can not acquire a measurement, but all inputs and calculation Functions are working with no errors. #1359
Comments
You're likely running into system resource allocation issues from so many things running (judging by your number of inputs (29+) and functions (27+) in the screenshot). Have you considered consolidating, such as using the Equation Input Action instead of an entire Function to modify the value? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is part of the ongoing problem I have been having for the past 8 months with Mycodo hanging or becoming un-responsive.
I just upgraded to Mycodo 8.15.13 6 days ago.
Running on a Pi 3B+ - 64-bit Bullseye OS - InfluxDB v2
I am still seeing my VPD humidistat Bang-Bang Function hanging or becoming un-responsive.
For no apparent reason, this controller will suddenly stop working and I get the following errors in the log...
2024-01-01 15:55:55,626 - ERROR - mycodo.function.bang_bang_3397e924 - Could not acquire a measurement
2024-01-01 15:56:02,448 - ERROR - mycodo.function.bang_bang_3397e924 - Could not acquire a measurement
2024-01-01 15:56:09,470 - ERROR - mycodo.function.bang_bang_3397e924 - Could not acquire a measurement
2024-01-01 15:56:17,174 - ERROR - mycodo.function.bang_bang_3397e924 - Could not acquire a measurement
2024-01-01 15:56:24,335 - ERROR - mycodo.function.bang_bang_3397e924 - Could not acquire a measurement
I don't understand why it can't acquire a measurement, all of my Inputs and calculation Functions are working fine and not throwing any errors in the logs.
The process I'm using to get the measurement for that bang-bang controller is as follows...
Input - SHTC3 temp/humidity sensor - working fine, acquiring temp and humidity measurements and giving no errors in the log.
I then take that air Temperature reading and perform an Equation: Single-Measure Function to subtract 5 degrees F. This adjusted temperature is now the approximate average leaf temperature. (I am getting no errors in the log from this Function).
Next, I take that approximate leaf temperature, and the relative humidity reading from the SHTC3 Input, and perform a VPD Function calculation to get the approximate actual leaf VPD. Again, I am getting no errors in the log from this Function, and the live page and dashboards show this measurement with no problems.
The Leaf VPD calculated from the previous function is what the humidistat bang-bang is using to control VPD in the grow space... so somewhere in between the VPD calculation function and the Bang Bang controller, Mycodo seems to be 'dropping the ball' in keeping track of this measurement, for reasons I still can not determine.
The only way I know the Bang-Bang controller has actually failed is because of the Conditional Controller I have running that makes an LED blink on the status board I built. I programmed it to blink blue if for some reason the Bang Bang had no measurement....
This is the Conditional code...
blinks=8
measurement = self.condition("1c8c49f3") #VPD [Function24] Status LED Conditional
if measurement is not None: # If a measurement exists
if measurement < 0.8: # led is dark blue
self.run_action("1a811689", value={"payload": "0,0,2"})
elif measurement >= 0.8 and measurement < 1.3: # led is green
self.run_action("1a811689", value={"payload": "0,1,0"})
elif measurement >= 1.3 and measurement < 1.45: # led is yellow
self.run_action("1a811689", value={"payload": "1,1,0"})
elif measurement >= 1.45: # led is bright red
self.run_action("1a811689", value={"payload": "2,0,0"})
else: # If no measurement exists led is flashing bright blue
for _ in range(blinks):
self.run_action("1a811689", value={"payload": "0,0,10"})
sleep(.75)
self.run_action("1a811689", value={"payload": "0,0,0"})
sleep(.75)
If I see my status board LED blinking blue, and I catch it in time, I can open the web-gui and restart the VPD humidistat Bang-Bang, which seems to temporarily resolve the error. However, if I let the error state run too long, the system will eventually become un-responsive and I lose any access to the GUI or even an SSH session and the system requires a hard reboot to fix this problem.... but again it is only temporary... this error keeps happening randomly every few days.
The text was updated successfully, but these errors were encountered: