Skip to content
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

It appears that the serial driver is not being installed in the standard gem installation #41

Closed
phdweather opened this issue Aug 1, 2023 · 16 comments

Comments

@phdweather
Copy link

Here is the error:

sudo /usr/local/bin/aurora_mqtt_bridge /dev/ttyUSB0 mqtt://localhost/
[WARNING] Install ccutrer-serialport gem for use RTU protocols

I had this running fine for about six months before my PI died. I replaced it and using the same steps as before, there is no data being published on the MQTT Explorer now because there is no working driver for the USB to serial installed according to the error code above. Maybe it got dropped off in the update 2 months ago.

Let me know what you think.

Thanks for all the work on this software. It is the best.

@ccutrer
Copy link
Owner

ccutrer commented Aug 1, 2023

What's the output of gem list? I ask, because ccutrer-serialport is clearly a runtime dependency of the latest release: https://rubygems.org/gems/waterfurnace_aurora/versions/1.4.6

@phdweather
Copy link
Author

phdweather commented Aug 1, 2023 via email

@ccutrer
Copy link
Owner

ccutrer commented Aug 1, 2023

Hmm... but you're not getting any other errors? That warning doesn't necessarily mean it failed to talk to the serial port. It just means when the rmodbus gem loaded, the serial port gem wasn't yet available (since it's a soft dependency, this is allowed). But it should give an error later and immediately fail with something like uninitialized constant CCutrer (NameError) if it wasn't available when it actually tried to use it. When you run the bridge, does it just hang with no output? Does it give a stack trace when you ctrl-C it?

@phdweather
Copy link
Author

phdweather commented Aug 1, 2023 via email

@ccutrer
Copy link
Owner

ccutrer commented Aug 1, 2023

Oh you’re going through an AWL? First try cutting that out of the loop. AWLs are known to die (mine has been dead for quite some time), and bypassing it would be much easier to test than waiting for a fresh USB serial adapter. You can also use the aurora_fetch command to test basic communication with your heat pump without any complexity of connecting to MQTT.

@phdweather
Copy link
Author

phdweather commented Aug 2, 2023 via email

@phdweather
Copy link
Author

phdweather commented Aug 3, 2023 via email

@phdweather
Copy link
Author

phdweather commented Aug 3, 2023 via email

@ccutrer
Copy link
Owner

ccutrer commented Aug 3, 2023

I tried the new USB adapter and it is still not working. I think you are correct in that the AWL may have had that AID port go out on it. Currently the other port on the AWL is hooked into my WF Sereies 7 and data is flowing onto the WF website. Should I just use a straight-through RJ45 coupler to connect to the RJ45 coming from the USB adapter to bypass the AWL? Since it is a straight-through coupler, the pins should match on both sides. Thanks for your help.

Yes, you just unplug from the AID tool port on the AWL, unplug the AWL from the WF, then plug the USB adapter into the AID tool port on the WF. If your setup is such that that's not convenient, you can use a straight through double-RJ45 jack coupler to bypass the AWL.

Looks like this is the error... cannot load such file --
2.7/ffi_c (LoadError)

Whoa, that's... unexpected. That would point to either an issue with the FFI gem, or a problem with the Ruby installation. ffi/ffi#1016 looks like the underlying issue. So try the suggested workaround: gem install ffi -- --enable-system-libffi.

@phdweather
Copy link
Author

phdweather commented Aug 3, 2023 via email

@phdweather
Copy link
Author

phdweather commented Aug 8, 2023 via email

@ccutrer
Copy link
Owner

ccutrer commented Aug 8, 2023

You should post in the FFI issue saying that you're still having problems, even using the system libffi.

@phdweather
Copy link
Author

phdweather commented Aug 14, 2023 via email

@ccutrer
Copy link
Owner

ccutrer commented Oct 7, 2024

I believe newer Raspberry Pi OS and Ruby version should work now.

@ccutrer
Copy link
Owner

ccutrer commented Dec 28, 2024

Latest Ruby/Raspberry Pid OS as well as docker images no longer have an FFI issue.

@ccutrer ccutrer closed this as completed Dec 28, 2024
@phdweather
Copy link
Author

phdweather commented Dec 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants