Hi guys,
I really need your help configuring a KMTronic USB Relay Controller (USB Relay Controller - Eight Channel with clips for DIN mount rail) with OpenHAB Serial Binding.
My platform is:
- Ubuntu 22.04.2 LTS
- openHAB 3.4.2
The controller is connected via the /dev/ttyKMT port and running the commands from Bash:
echo -e "\xff\x01\x01" > /dev/ttyKMT
or
echo -e "\xff\x01\x00" > /dev/ttyKMT
I’m able to turn on or turn off the first switch on the relay controller, even without “sudo”.
The linux user used for launching the Bash commands is member of “tty” and “dialout” group, like the “openhab” user.
I configured the openHAB Serial Bridge and Serial Device in a serial.thing file:
Bridge serial:serialBridge:sensors [serialPort="/dev/ttyKMT", baudRate=9600] {
Thing serialDevice usbrelay [patternMatch=".*"] {
Channels:
Type switch : r1 [onValue="\\xff\\x01\\x01", offValue="\\xff\\x01\\x00"]
}
}
But… firing the switch linked to r1 doesn’t work!
The led on the serial controller flashes but nothing happens, so I guess I’m sending a wrong command.
I’ve also tried with (for ON command):
- “ff 01 01”
- “255 1 1”
Do you have any suggestions?
Any help is appreciated!