Hi all,
I’m new to OH and to this forum, thanks in advance for any help you can offer.
This issue has been bugging me for quite a long time now. I’ve read many of the good articles here, but none of them have fixed the issue for me.
I’m running OH 2.5.2 on a RPi 3. Whether relevant or not - I also have a zwave board attached.
Essentially, I change the switch item, the rule fires and I see the USB device TX light flash. I’ve connected my laptop and using realterm I see info arrive. However, the HEX string that arrives is not the sequence I’m expecting from the set below.
If I connect my laptop to the projector screen and send the HEX codes, it works fine, so I’m happy I’ve got the right pin-outs etc.
I’m guessing it’s something to do with encoding. I’ve tried loading the ISO-8859-1 coding in openhabian-config, i’ve tried setting BASE64, i’ve tried using a BASE64 encoded string, and all of the permutations I can think of…
I’ll kick myself if it’s something obvious, but at this stage I really don’t care if it is
Any pointers or suggestions gratefully received!
I have followed this article:
My configuration looks like this:
/etc/udev/rules.d/99-usb-serial.rules
SUBSYSTEM==“tty”, ATTRS{idVendor}==“0403”, ATTRS{idProduct}==“6001”, SYMLINK+=“ttyUSB-rs485”, GROUP=“dialout”, MODE=“0666”
/etc/default/openhab2
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB-rs485"
/items/projectorscreen.items
Switch ProjectorScreen “Projector Screen”
String ProjectorScreenRS485 “Projector Screen Control” { serial="/dev/ttyUSB-rs485@2400,CHARSET(ISO-8859-1),BASE64" }
/rules/projectorscreen.rules
rule “Screen_Down”
when
Item ProjectorScreen changed from OFF to ON
then
sendCommand(ProjectorScreenRS485,’\u00FF\u00EE\u00EE\u00EE\u00EE’)
logInfo(“ProjectorScreen”, “Projector Screen Down”)
end
rule “Screen_Up”
when
Item ProjectorScreen changed from ON to OFF
then
sendCommand(ProjectorScreenRS485,’\u00EE\u00EE\u00EE\u00EE\u00DD’)
logInfo(“ProjectorScreen”, “Projector Screen Up”)
end