No announcement yet.

Script help for Raspberry Pi please

  • Filter
  • Time
  • Show
Clear All
new posts

  • Script help for Raspberry Pi please

    Hi, I'm trying to use HomeSeer for the first time, it's a test system on a Raspberry Pi 3. I have a USB serial adapter on ttyUSB0 which I'd like to use to control a projector lift via RS232 to see if HomeSeer will be suitable for my requirements. According to the manual I need to do the following:

    1. Com setting 8 data bits, 1 start bit, 1 stop bit, 2400 baud
    2. Directive for extending (I'm starting with only this command for now): 0xFF 0xEE 0xEE 0xEE 0xE9, send continually two times each time interval 200ms

    I'm not familiar with scripting in at all, I've tried the following which doesn't work so am hoping someone can help me please!

    Sub Main(parm as object)
    Dim PortNumber
    hs.OpenComPort PortNumber,"2400,N,8,1",1,"",""
    hs.SendToComPort PortNumber, chr(&HFF) & chr(&HEE) & chr(&HEE) & chr(&HEE) & chr(&HE9)
    hs.waitsecs 0.2
    hs.SendToComPort PortNumber, chr(&HFF) & chr(&HEE) & chr(&HEE) & chr(&HEE) & chr(&HE9)
    End Sub

    Can anyone assist with the correct Linux / RPi3 scripting so I can test this unit?

  • #2
    Looks like a lot of your syntax is VBScript, not Note that a lot of the examples in the help file are in VBScript syntax. Having said that, I have no idea if the com port scripting command work with the port numbers used in linux. I would email and ask them to confirm the correct syntax for those commands in linux, unless someone else here has experience wit those commands under linux. The help file indicates that the port number should be an integer (corresponding to the COM port number under Windows). Passing a string to it likely won't work.
    HS 1976 Devices 1156 Events
    Z-Wave 123 Nodes on one Z-Net