Hello.
Could anyone help me?
I started exploring OpenHab with the windows version. As a result, I managed to achieve the work with a pulse counter connected via RS485-USB (virtual COM port). I managed to send requests to him and receive it, as well as process the answers. But not everything was good in the beginning. And in the beginning I could only send requests. The counter did not answer.
The problem was solved by adding the Windows environment variable:
JAVA_TOOL_OPTIONS = -Dfile.encoding = ISO-8859-1
I debugged the code and decided to move it to RPi2 (Openhabian).
I found the port I needed:
Dmesg | Grep tty
it is cdc_acm 1-1.2: 1.0: ttyACM0: USB ACM device
But whatever I do, I never got a response from the counter. In the logs only send the request.
And I tried this:
- https://github.com/openhab/openhabian/issues/33#issuecomment-266593473
- sudo /usr/sbin/locale-gen en_US.ISO-8859-1
sudo /usr/sbin/update-locale LANG=en_US.ISO-8859-1 - /etc/default/openhab2:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
Nothing…
What did I miss? Help me please…