-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Can't run CUL Transport Binding with Baudrate of 38400 #3910
Comments
I'm in the same boat as you (nanoCul). I refactored the code in that area and have it fixed that it's possible to configure the baud rate for any cul binding. See #3885 |
Glad to hear that! I'm looking forward for the 1.9 milestone. |
If I understood it right this will be the switch to openhab2 as a base. If you want I can provide the two jars, they work with 1.8.1 |
Once the mentioned PR is merged you'll find the binaries also in the nightly snapshot build |
Yes but as the pr has not yet merged I would need to upload my jars with the merged fix |
Ignore my last comment |
I made a release here: https://github.com/tarioch/openhab/releases/tag/untagged-bac31677f9265162782d Configure it like this: culintertechno:baudrate=38400 |
@tarioch Link calls a 404 ;) Nevertheless I will definitely give it a try sometime within this week after fixing. |
@tarioch As I mentioned before the Link answers with a 404 Just need a source for testing otherwise I'm not very sure in which repo your changes are already made (not THAT expert in Github logics ^^ ) |
Hm, link works fine for me. Otherwise go to |
sorry figured it out https://github.com/tarioch/openhab/releases/tag/v1.9.0-pre1 |
@Gugiman did the link work and did you have time to test? |
I've tried but got another error. The configuration in openhab.cfg is like you mentioned.
These are my /dev permissions after manually chmod and chown: When I run I can switch my device from ON and OFF by typing:
But after starting openhab this error appears:
Is it my fault or what might be the Problem? |
Hm, that's strange. Can you make sure there is no additional character after serial:/dev/ttyUSB0 |
There are no additional characters... But the after inserting the additional loggers I got the following:
|
Can you try to add |
Forgot to mention. In /etc/init.d/openhab Sure it's the bindings fault? Maybe it's in my (arduino-compatible) Board... I'm using the a-culfw firmware (https://github.com/heliflieger/a-culfw) Maybe the Problem is somewhere else...? |
I'm using the same firmware with my homebuilt nanocul and it works fine. I don't specify any arguments for openhab, maybe you ca try removing it as well. |
Try leaving away both the library path and the serial port define. |
Unfortunately nothing changed... Got the "Invalid Parameter" Error again. Am I thinking the right when |
Yes, looks that way. Now let's try to narrow this down (as it works fine for me). Which version of java are you using? Is it openjdk or sun/oracle? What's the platform you're trying to run this? Normal pc or raspberry or something like that? My (working) setup is currently like this: |
Alright here are my specs (as much as I think to be relevant):
shows:
I'm using openhab 1.8.1 from Repository on a Raspberry rev1 B with Raspbian Wheezy and Kernel 4.1.13+ #826 Installed bindings are intertechno and CUL (from your Test Release) and serial binding from repo.
The /etc/init.d/openhab script is now free of any selfmade changes.
openhab user is member of the dialout group
shows
As I can see, openhab is able to create a LOCK file for ttyUSB0 In I got the Arduino-Compatible Board from here and build it like this tutorial here with the a-culfw firmware (nanoCUL) from here |
UPDATE: I installed openhab on my Linux Mint Desktop Laptop (don't know why I didn't come up with this idea earlier) and everything works like a charm! So there is an error on Openhab on Raspberry (Core or bindings idk) |
Can you check if on your raspy librxtx-java is NOT installed? I think that could make problems. |
It's definitly installed. APT sais so. Interesting: On my Desktop librxtx-java is NOT installed and it works... |
Yes, that's what I am hoping. Please uninstall it and try again. |
Unfortunately no change on raspberry... |
Next step is to reinstall raspbian os and try exactly the same as on my laptop. |
Ok so I installed fresh Raspbian Jessie on Rpi Installed Java Add openhab to dialout group and installed your two bindings with the openhab.cfg changes. Still got the "Invalid Parameter" error |
I think you're not alone and it's not related to my changes: https://community.openhab.org/t/replace-nrjavaserial-with-rxtxcomm/5867/4 |
So I think that issue you're having on your raspberry is the same as #3257 and actual the root issue being NeuronRobotics/nrjavaserial#60 |
Hi Guys,
I'm having some trouble configuring my nanoCUL to send Intertechno Codes.
As I read in other forums, changing the hardcoded baudrate and parity fixes the problem.
But after change the baudrate to 38400 in /bundles/io/org.openhab.io.transport.cul/src/main/java/org/openhab/io/transport/cul/internal/CULSerialHandlerImpl.java like this:
//private Integer baudRate = 9600; private Integer baudRate = 38400; //private Integer parityMode = SerialPort.PARITY_EVEN; private Integer parityMode = SerialPort.PARITY_NONE;
My openhab.log sais:
2016-01-28 19:13:12.519 [ERROR] [.o.b.i.i.CULIntertechnoBinding] - Can't open CUL org.openhab.io.transport.cul.CULDeviceException: gnu.io.UnsupportedCommOperationException: Invalid Parameter at org.openhab.io.transport.cul.internal.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:269) ~[na:na] at org.openhab.io.transport.cul.internal.AbstractCULHandler.open(AbstractCULHandler.java:152) ~[na:na] at org.openhab.io.transport.cul.CULManager.createNewHandler(CULManager.java:171) ~[bundlefile:na] at org.openhab.io.transport.cul.CULManager.getOpenCULHandler(CULManager.java:88) ~[bundlefile:na] at org.openhab.io.transport.cul.CULManager.getOpenCULHandler(CULManager.java:52) ~[bundlefile:na] at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.bindCULHandler(CULIntertechnoBinding.java:99) [bundlefile:na] at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.setNewDeviceName(CULIntertechnoBinding.java:92) [bundlefile:na] at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.updated(CULIntertechnoBinding.java:201) [bundlefile:na] at org.eclipse.equinox.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:183) [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na] at org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na] Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:212) ~[na:na] at org.openhab.io.transport.cul.internal.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:252) ~[na:na] ... 9 common frames omitte
The text was updated successfully, but these errors were encountered: