Page 1 of 1

CanBus to API

Posted: Tue Jan 06, 2026 4:16 pm
by ioioio
Hallo I am adapting my old code for Open Auto Pro to the Hudiy API.
This is a script that will read the canbus messages of the infotainment netwok, specifically the steeing wheel buttons, and pass the commands to the API.
https://pastebin.com/SAxuYfsx
I do get this error though

Code: Select all

Traceback (most recent call last):
  File "/home/io/Scripts/Canbus/hudiy-canbus.py", line 153, in <module>
    main()
    ~~~~^^
  File "/home/io/Scripts/Canbus/hudiy-canbus.py", line 140, in main
    client.connect('127.0.0.1', 44405)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/home/io/Scripts/Canbus/common/Client.py", line 114, in connect
    self._socket.connect((hostname, port))
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
ConnectionRefusedError: [Errno 111] Connection refused
SocketcanBus was not properly shut down

Re: CanBus to API

Posted: Tue Jan 06, 2026 5:01 pm
by hudiy
Is Hudiy running when you execute the script? The stack trace suggests that nothing is listening on port 44405 (Hudiy isn't running).

Re: CanBus to API

Posted: Tue Jan 06, 2026 7:56 pm
by ioioio
Ok that was dumb, got it now, I repost the script which had some errors, now it is fully working:
https://pastebin.com/fXfYNSTD

Re: CanBus to API

Posted: Tue Feb 24, 2026 7:58 pm
by charpeasy
what particular obd plug are you using if you don't mind me asking