fermentrack
fermentrack copied to clipboard
Tilt disconnects
Every since the most recent large update my tilt disconnects regularly. A restart of my pi resolves this. No docker container in use yet.
I rebuilt this system using a brand new Raspbian instance and fresh docker install. The issue persists.
To summarize what I found. On a fresh raspian install with a auto install docker and fermentrack I loose my tilt my tilt every few days.
I found something interesting while looking at becon filtering.
On the host pi if I run: Bluetoothctl Scan on Scan off
The docker container stops receiving data. If I don't run scan off and quote bluetoothctl same thing occurs.
Only way to fix is restart the docker container. My guess is a process is shutting off the scan at the host layer. I found a way to enable bluetooth in the kernel and plan to try that later.
Another note start scan makes it work again, haven't confirmed that with the natural bug yet just when I was playing.
Further updates. The above didn't seem to be related and when the issue occur doesn't solve it. I found this in the logs:
Sorry for the long run of items. Hoping @thorrak can jump in here.
I have confirmed I am having issues with the PID files existing when it tries to scan. Three issues I have noticed:
- The exception being thrown by pid library is not the one being caught in the code. https://github.com/thorrak/fermentrack/blob/d347b623b367b304c9c880b35d05ed5af1bad363/gravity/tilt/tilt_monitor_utils.py#L87-L92
- Not sure why the pid isn't being released.
- I am seeing this same behavior when I restart docker on the primary controller. The script keeps not connecting. Multiple docker restarts and this solves itself. Or I delete the file and I am up and running. I don't know the code well enough to see why this is the case.
This has been rock solid after manually deleting the pid files. Odd.
I don’t my way around the Pi/files/folders well enough to test this out, but I’m having a similar issue with the Tilt disconnecting. Once I reboot the Pi (fresh docker install as of today), everything works as it should again.
Additionally, I’m seeing an issue with the Pi/Fermentrack becoming unresponsive to the point it won’t load the web interface shortly after the Tilt disconnects.
Apologies for missing this issue for so long. I’m drilling into this currently and am looking at breaking the tilt support out in order to hopefully make it more robust. This won’t be released with #724 , but should be the next release thereafter.
Sounds good! Happy to test this out. I will switch back to the dev branch as well for next brew.
No rush on switching - the main change will be to break the Tilt interface into its own docker image and then make the interface with Fermentrack take place via a REST(ish) interface. This will require more then the standard “click upgrade”, so I want to try to bundle it with #722
I spoke too soon - This is probably going to end up bundled with #724 after all.
As I mentioned, I'm rebuilding the daemon to be completely standalone, and live inside its own docker container. For now, I'm naming it "TiltBridge Junior" and tracking it here. I'll drop a note here once it's ready for testing/use.
Alrighty! It should now be released.
To upgrade, log into your Raspberry Pi via SSH, and run the following commands:
-
cd fermentrack-tools
-
git fetch
-
git pull
-
./install.sh