-
Hello, I'm trying to use the hs.serial module to control a Extron matrix in RS232. ConnectionToExtron = hs.serial.newFromPath("/dev/cu.usbserial-BG009E7G") ConnectionToExtron:sendData("1!") It swiches on the input 1 then 2 as it is supposed to do. But my problem is that I need to send it commands (for other fonctionnality) that starts with "Escape" and end with "Returns" ConnectionToExtron:sendData(hs.eventtap.keyStroke({}, "escape")) But it doesn't work, the console gives that error : 2025-03-21 15:27:46: 15:27:46 ERROR: LuaSkin: hs.hotkey callback: /Users/badsheep/.hammerspoon/extron.lua:18: ERROR: incorrect type 'no value' for argument 2 (expected string) Could anybody help ? Badsheep |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To anyone interested I found the solution : ConnectionToExtron:sendData("\x1B") |
Beta Was this translation helpful? Give feedback.
To anyone interested I found the solution :
ConnectionToExtron:sendData("\x1B")
ConnectionToExtron:sendData("500VCTR")
ConnectionToExtron:sendData("\r")