![]() |
|
Periodic Signal K sensor freeze - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: Bug Reports (https://forum.openmarine.net/forumdisplay.php?fid=4) +--- Thread: Periodic Signal K sensor freeze (/showthread.php?tid=6913) |
Periodic Signal K sensor freeze - Spark - 2026-05-12 I reinstalled the entire system from scratch to solve a periodic freeze issue that previously affected both BME280 and ICM-20948 data streams. However, the issue is still present even on a completely minimal setup. System:
The BME280 data periodically freezes for ~30 seconds and then resumes automatically. The freeze repeats continuously with a very regular pattern. During the freeze:
I enabled debug mode, opened a terminal and manually started `openplotter-i2c-read`. But it crashes with an `IndexError` because it expects `sys.argv[1]`. Tried running openplotter-i2c-read 0 - no output. Any suggestion or help would be greatly appreciated. RE: Periodic Signal K sensor freeze - Spark - 2026-05-13 Update on the periodic Signal K / openplotter-i2c freeze issue. After many tests on a minimal clean installation (only BME280 enabled), I found a reproducible workaround with the help of ChatGPT analysis. This below is the analysis prepared by ChatGPT ---- Symptoms:
Important finding: openplotter-i2c-read opens a websocket to Signal K and continuously sends updates, but never reads from the websocket (recv() is never called). The hypothesis was:
Workaround: after each ws.send(...), drain pending websocket frames with a short non-blocking recv() loop. Patched file: /usr/lib/python3/dist-packages/openplotterI2c/openplotterI2cRead.py Added immediately after ws.send(...): try: ws.settimeout(0.01) while True: ws.recv() except Exception: pass finally: try: ws.settimeout(None) except Exception: pass Results so far:
I do not fully understand the internal websocket logic, so this may not be the cleanest fix, but the workaround appears effective and reproducible. I hope this may help someone else investigating similar random freezes/issues. RE: Periodic Signal K sensor freeze - kevin@stlaurent.us - 2026-06-05 I am also having issues with the periodic Freeze. Working with Chat GPT, here is as summary of what was found: OpenPlotter / pypilot Attitude Data Freezing Every ~90 Seconds System • Raspberry Pi 5 8GB • OpenPlotter 5.14.1 • openplotter-pypilot 4.0.11-beta • pypilot 0.56 • Signal K running locally on port 3000 • BMP280 I2C sensor installed • Simrad GO9 and NMEA2000 network connected Problem The vessel attitude data (roll, pitch, yaw/heading) would update normally for approximately 55 seconds and then freeze for approximately 35 seconds. This cycle repeated consistently. Symptoms included: • Signal K dashboards freezing. • KIP dashboards freezing. • Course-up displays becoming unusable due to periodic attitude loss. • Signal K attitude timestamps stopping during the freeze. • Data would resume immediately after restarting the OpenPlotter pypilot bridge service. Findings pypilot IMU continued running normally During the freeze, pypilot_client continued to show live updates: • Heading changing normally. • Roll and pitch changing normally. • IMU frequency remained around 20 Hz. • No IMU warnings or errors. This indicates the IMU and pypilot itself were not freezing. Signal K attitude timestamps froze During the freeze: curl -s localhost:3000/signalk/v1/api/vessels/self/navigation/attitude returned the same timestamp repeatedly. Example: { "$source":"pypilot", "timestamp":"2026-06-04T15:40:05.268Z" } Repeated queries during the freeze returned the identical timestamp. This showed that Signal K was no longer receiving fresh updates from the pypilot bridge. Restarting the bridge immediately fixed the problem Running: sudo systemctl restart openplotter-pypilot-read immediately restored live attitude updates. No restart of Signal K, pypilot, or the Raspberry Pi was required. Signal K itself remained healthy GPS and other Signal K services continued operating during the freeze. The issue appeared isolated to the data path between pypilot and Signal K. Conclusion The evidence suggests that the openplotter-pypilot-read bridge process enters a stalled state where it stops forwarding updates from pypilot to Signal K. The IMU continues operating, pypilot continues operating, and Signal K remains running, but attitude updates stop until the bridge service is restarted. Temporary Workaround A watchdog script was implemented to monitor: /signalk/v1/api/vessels/self/navigation/attitude and automatically restart: sudo systemctl restart openplotter-pypilot-read whenever the attitude timestamp stops advancing. The watchdog runs every 2 seconds and restores updates automatically, preventing long freezes while underway. Additional Notes An unrelated issue was also discovered where openplotter-i2c-read had entered a restart loop due to a Python syntax error introduced during troubleshooting. That issue was separate from the pypilot attitude freeze and did not appear to be the root cause of the attitude-data problem. I am posting this in case other users of OpenPlotter 5.14.1, openplotter-pypilot 4.0.11-beta, and pypilot 0.56 observe similar periodic attitude freezes. RE: Periodic Signal K sensor freeze - kevin@stlaurent.us - 2026-06-07 Update – Additional Findings After further troubleshooting, I believe there are actually two separate issues involved. Issue #1 – Pypilot data freeze (still present) The original problem remains:
Code: sudo systemctl restart openplotter-pypilot-readimmediately restores data As a temporary workaround I implemented a watchdog that automatically restarts the service when the freeze is detected. Issue #2 – I2C/BMP280 sensor stopped working While troubleshooting, I discovered the BMP280 sensor was no longer publishing data to Signal K. Initial symptoms:
Code: python3failed with: Code: AttributeError:The system is: Code: Raspberry Pi 5 Model B Rev 1.0The installed Adafruit libraries appear to be inconsistent: Code: Adafruit-Blinka 9.1.0but the PlatformDetect package did not contain the Code: RP2350After repairing the Adafruit packages: Code: hasattr(chips, "RP2350")changed from: Code: Falseto: Code: Trueand direct BMP280 testing now works: Code: OK INITCurrent status
System information Code: Raspberry Pi 5 Model B Rev 1.0At this point I am looking for guidance from the developers regarding:
That update is concise, factual, includes the Pi 5 information (which is important), and clearly separates the pypilot freeze from the BMP280 problem so developers don't chase the wrong issue. Update – Additional Findings (Raspberry Pi 5 / OpenPlotter 4) I've done some additional troubleshooting and have isolated two separate issues: 1. Signal K / Pypilot Data Freeze The original symptom remains:
2. I²C Bus Failure After Several Hours A separate issue appears to affect the Raspberry Pi 5 I²C subsystem. System:
Code: sudo i2cdetect -y 1shows: Code: 68and both sensors function normally. After several hours of operation: Code: sudo i2cdetect -y 1shows no devices at all. Direct reads fail: Code: sudo i2cget -y 1 0x68 0x75Kernel log repeatedly reports: Code: i2c_designware 1f00074000.i2c:Recovery Attempts Tested None of the following restore the sensors: Code: systemctl restart openplotter-i2c-readCode: modprobe -r i2c_devCode: rmmod i2c_designware_platformAfter these actions: Code: i2cdetect -y 1still shows no devices. GPIO State During Failure During the failure: Code: pinctrl get 2Both lines remain high, suggesting the bus is not being physically held low by a device. Only Recovery Found The only successful recovery method is a complete cold power cycle of the Raspberry Pi. After a cold power cycle: Code: sudo i2cdetect -y 1again shows: Code: 68and sensor communication returns. Additional Notes The BMP280 hardware itself appears functional: Code: import boardreturns valid readings. The BMP280 was also temporarily affected by an Adafruit Blinka / PlatformDetect incompatibility on the Pi 5, which was corrected by updating the Adafruit packages. Current Conclusion At this point the evidence suggests:
|