Originally posted by keithj69
View Post
Announcement
Collapse
No announcement yet.
Help with open/closed statuses and speak results only if open
Collapse
X
-
Since moving to windows 10 I am getting the following errors in the logs trying to run this vb. Any ideas what is going on with this? I am clueless.
Code:[TABLE="class: log_table_row, cellspacing: 0"] [TR] [TD="class: LogDateLong LogDateTime1, colspan: 1, align: left"][COLOR=#FF0000]May-16 10:24:39 AM [/COLOR][/TD] [TD="class: LogPri1, colspan: 1, align: left"][COLOR=#FF0000] [/COLOR][/TD] [TD="class: LogType1, colspan: 3, align: left"][COLOR=#FF0000]Error [/COLOR][/TD] [TD="class: LogEntry1, colspan: 8, align: left"][COLOR=#FF0000]Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\doors_windows.vb: Expression expected. [/COLOR][/TD] [/TR] [/TABLE] [TABLE="class: log_table_row, cellspacing: 0"] [TR] [TD="class: LogDateLong LogDateTime0, colspan: 1, align: left"][COLOR=#FF0000]May-16 10:24:39 AM [/COLOR][/TD] [TD="class: LogPri0, colspan: 1, align: left"][COLOR=#FF0000] [/COLOR][/TD] [TD="class: LogType0, colspan: 3, align: left"][COLOR=#FF0000]Error [/COLOR][/TD] [TD="class: LogEntry0, colspan: 8, align: left"][COLOR=#FF0000]Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\doors_windows.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. [/COLOR][/TD] [/TR] [/TABLE]
Comment
-
Daveyboy keithj69
Still having these issues? I came across your posts when looking into an issue with the same script for another user. I posted an update to the script here: https://forums.homeseer.com/forum/de...61#post1337461HS 4.2.8.0: 2134 Devices 1252 Events
Z-Wave 3.0.10.0: 133 Nodes on one Z-Net
Comment
-
Originally posted by randy View PostAlso check your door and window sensors for their open and closed values. They must use 0 and 1 for closed and open. If they use 0 and 100, the script will need to be modified.
I tried changing the statement "if hs.DeviceValue(devw) = 1 then" to use "if hs.DeviceValue(devw) <> 0 then" and it does give the correct amount of open windows or doors in my log (yes, I know this will include unreachable stuff as well but figured it was a workaround) but it's not giving the name of the open windows or doors. It correctly turns on the virtual device and shows in status "Door Sensor," and that's it.
Not very good at scripting. I found the not equal <> vbscript using Google but that's about the extent of my scripting knowledge.
All I am seeing in my log is:
Code:[LEFT][FONT=B612 Mono][COLOR=#000000][FONT=Roboto][SIZE=16px]3/5/2022 7:19:02 PM[/SIZE][/FONT][/COLOR][/FONT][/LEFT] [FONT=B612 Mono][COLOR=#000000]Script[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]DoorWindow[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]Window Count: 1[/COLOR][/FONT] [LEFT][FONT=B612 Mono][COLOR=#000000][FONT=Roboto][SIZE=16px]3/5/2022 7:19:02 PM[/SIZE][/FONT][/COLOR][/FONT][/LEFT] [FONT=B612 Mono][COLOR=#000000]Script[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]DoorWindow[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]Door Sensor Open[/COLOR][/FONT] [LEFT][FONT=B612 Mono][COLOR=#000000][FONT=Roboto][SIZE=16px]3/5/2022 7:19:02 PM[/SIZE][/FONT][/COLOR][/FONT][/LEFT] [FONT=B612 Mono][COLOR=#000000]HomeSeer[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]Event[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]Running script in background (DoorWindow Script): doors_windows.vb("windows")[/COLOR][/FONT] [LEFT][FONT=B612 Mono][COLOR=#000000][FONT=Roboto][SIZE=16px]3/5/2022 7:19:02 PM[/SIZE][/FONT][/COLOR][/FONT][/LEFT] [FONT=B612 Mono][COLOR=#000000]HomeSeer[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]Event[/COLOR][/FONT] [FONT=B612 Mono][COLOR=#000000]Event Trigger "Door/Window Sensor DoorWindow Script"[/COLOR][/FONT]
Comment
Comment