Announcement
Collapse
No announcement yet.
First script on Linux
Collapse
X
-
Progress! Thanks!
Looks like i can't access the open comport method. How do i do that? Is that even a vb.net function? The scripting guide lists it: https://homeseer.com/support/homesee...lp/default.htm
I am working towards a script that will receive data from a serial connected arduino, and eventually send data back to it.
For now i have
IMPORTS System.IO
IMPORTS System.Net
Sub Main(ByVal parm as Object)
err = OpenComPort(1, "9600,N,8,1", 1, "comdatareceived.vb", "callback")
hs.writeLog("msg", err)
End Sub
So that should open a com port (i need to figure out the port number, for now i put 1 in there till i get syntax correct), and call function callback in script comdatareceived.vb when data arrives.
I get these errors:
Compiling script /usr/local/HomeSeer/scripts/gettemps.vb: 'OpenComPort' is not declared. It may be inaccessible due to its protection level.
Compiling script /usr/local/HomeSeer/scripts/gettemps.vb: The import 'System.Core' could not be found.
Comment
-
In Linux, a COM port is not a number, but rather a device. You'll have to use something along the lines of: /dev/ttyUSB0 or wherever you have your serial connection.
You'd probably be better off using the Arduino plugin for HS.HS4Pro on a Raspberry Pi4
54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI
HSTouch Clients: 1 Android
Comment
Comment