I'm attempting to write a script for my RPi2/HS3 system to read a two-line csv file from Weather Display, grab the second line, and parse out the values.
The code below is one of many I've tried - this has thrown the fewest errors. lol
The errors I'm getting are:
Compiling script /home/pi/HomeSeer/scripts/HS3weatherdisplay.vb: Cannot convert from 'String' to 'System.String[]'.
Jul-20 10:59:07 AM Error Compiling script /home/pi/HomeSeer/scripts/HS3weatherdisplay.vb: The import 'System.Core' could not be found.
Would anybody be willing to help me through this?
P.S. I know that Jon00 offers a script to do just this (with the clientraw file) but I'm not able to get his script to work on my system. I also figured this would give me an opportunity to learn some new skills as I continue to move my HS2 system to HS3.
The code below is one of many I've tried - this has thrown the fewest errors. lol
The errors I'm getting are:
Compiling script /home/pi/HomeSeer/scripts/HS3weatherdisplay.vb: Cannot convert from 'String' to 'System.String[]'.
Jul-20 10:59:07 AM Error Compiling script /home/pi/HomeSeer/scripts/HS3weatherdisplay.vb: The import 'System.Core' could not be found.
Would anybody be willing to help me through this?
Code:
Imports System.IO Sub Main(ByVal Parm As Object) Dim SplitStr() As String Dim Counter As String = System.IO.File.ReadAllLines("././././mnt/logfiles/scriptlog.txt") (1) SplitStr = Counter SplitStr = Split(Parm, ",") hs.writelog("0", SplitStr(0)) 'year hs.writelog("1", SplitStr(1)) 'month hs.writelog("2", SplitStr(2)) 'day hs.writelog("3", SplitStr(3)) 'hour hs.writelog("4", SplitStr(4)) 'minute hs.writelog("5", SplitStr(5)) 'wind hs.writelog("6", SplitStr(6)) 'gust End sub
Comment