I am running HS4 in case this makes a difference. I want to write to the log file. So I started out simple, hs.writelog ("temp= "). I does not work. My goal is to print out the actual device temp as well. Any suggestions?
Announcement
Collapse
No announcement yet.
Write to Log File
Collapse
X
-
The WriteLog function requires two string parameters:
Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
-
Originally posted by donstephens View PostYou might run into problems if you follow the example if using vb scripts. You will fare better with
hs.WriteLog("Error","An error has occurred in my script!")
Any suggestions? It would be a highly useful feature for my needs.
-steve
Comment
-
Guest
Originally posted by Otto-mation View Post
I am using a Hometroller Zee S2 and just tried your example verbatim but it doesn't appear in my HS log window.
Any suggestions? It would be a highly useful feature for my needs.
-steve
If the script is an immediate script, then you would want to precede the hs.Writelog with a "&n". Example:
Code:&nhs.WriteLog("Error", "Error message goes here")
Comment
-
Originally posted by aa6vh View Post
How are you specifying your WriteLog? Part of a script file? If so, can you show us the complete script?
If the script is an immediate script, then you would want to precede the hs.Writelog with a "&n". Example:
Code:&nhs.WriteLog("Error", "Error message goes here")
Comment
-
Does the event itself show in the log?
If there are no error messages, I wonder if there is a filter being applied to your log. (Try resetting the log to be sure no filters are active.)
This is what I see in the log when I try a test event to write to the log (last entry is at the top):
Aug-19 8:55:22 AM Test vbs test
Aug-19 8:55:22 AM Event Running script statement immediately: &hs.WriteLog "Test", "vbs test"
Aug-19 8:55:22 AM Event Event Trigger "Test Immediate script"
Aug-19 8:55:22 AM Event Event Test Immediate script triggered by the event page 'Run' button.Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
Guest
Interesting. Just for giggles, try temporarily removing the Speak command and then re-run the event. Maybe the Speak is causing some sort of problem?
Comment
-
Originally posted by Otto-mation View PostWOW!!! You score!!!
I removed the speak command
SOLVED!
I'm ecstatic and grateful for your suggestion and help!
WOOHOOOO!!!
HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)
Plug-Ins Enabled:
Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:
Comment
Comment