RaspberryNtpServer icon indicating copy to clipboard operation
RaspberryNtpServer copied to clipboard

Process: 1242 ExecStart=/opt/chronotron/chronotron.py (code=exited, status=1/FAILURE)

Open APT256 opened this issue 9 months ago • 1 comments

I just finished installing RaspberryNtpServer on a Raspberry PI 4. The s/w and GPS are working fine and chrony is synched and running. I just added a 4 line lcd display and ran through the setup in "Simple 4x20 LCD display for Raspberry Pi NTP Server". However, there is nothing being displayed and when I check the status of the service, I get this error:

jon@time:~/RaspberryNtpServer/src $ sudo systemctl status chronotron x chronotron.service - Display chrony statistics on 4x20 LCD Loaded: loaded (/etc/systemd/system/chronotron.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Wed 2025-03-05 07:43:12 CST; 8s ago Duration: 155ms Process: 1242 ExecStart=/opt/chronotron/chronotron.py (code=exited, status=1/FAILURE) Main PID: 1242 (code=exited, status=1/FAILURE) CPU: 156ms

Mar 05 07:43:12 time chronotron.py[1242]: lcd = LcdDisplay(sm_bus=1, i2c_addr=0x27, cols=20, rows=4) Mar 05 07:43:12 time chronotron.py[1242]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 05 07:43:12 time chronotron.py[1242]: File "/opt/chronotron/i2c_lcd.py", line 30, in init Mar 05 07:43:12 time chronotron.py[1242]: self.write(0x33, self.type_command) # init sequence: 0x03, 0x03 Mar 05 07:43:12 time chronotron.py[1242]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Mar 05 07:43:12 time chronotron.py[1242]: File "/opt/chronotron/i2c_lcd.py", line 60, in write Mar 05 07:43:12 time chronotron.py[1242]: self.bus.write_byte(self.i2c_addr, hi_byte) Mar 05 07:43:12 time chronotron.py[1242]: OSError: [Errno 5] Input/output error Mar 05 07:43:12 time systemd[1]: chronotron.service: Main process exited, code=exited, status=1/FAILURE Mar 05 07:43:12 time systemd[1]: chronotron.service: Failed with result 'exit-code'.

I am setting up without Python virtual environments as this is a dedicated NTP server. My cabling is as follows:

DISPLAY Pi GND GND ACC 5V SDA SDA1 SCL SCL1

I think this is all correct, so I am not sure what the issue might be?

APT256 avatar Mar 05 '25 13:03 APT256

did you try to run python chronotron.py from terminal to check without systemd services? And: did you enable i2c and check with ic2detect that the display is visible on the i2c bus? (see adafruit help )

domschl avatar Mar 05 '25 17:03 domschl