There are a number of things I like to check if the HS3 CPU reboots. What trigger can I use to notify me when HS3 restarts (loads)?
Announcement
Collapse
No announcement yet.
HS start up trigger
Collapse
X
-
There is a script (startup.vb) in your scripts folder that HS runs when it starts. You can add a line to trigger an event that will allow you to set a device or whatever you want to happen.
Code:' You may add your own commands to this script. ' See the scripting section of the HomeSeer help system for more information. ' You may access help by going to your HomeSeer website and clicking the HELP button, ' or by pointing your browser to the /help page of your HomeSeer system. hs.OpenComPortTerm(21, "9600,N,8,1", 1, "Data_GetSG_ASCII.vb", "Main", "$") hs.TriggerEvent("Startup Stuff")
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
-
I have a line at the end of my startup.vb
hs.triggerevent("Reboot Occurred")
Within that event I take care of any housekeeping I need after boot up. It is easy to add actions, other events with conditions honored, timer controls, counter controls, etc. I send myself a Pushover message telling me HomeSeer restarted and at what time, restart an uptime counter, get my lights synchronized with the time of day, poll a couple of critical devices to make sure they didn't change state while HomeSeer was down, etc. It is a one stop repository for startup events.
I ended up putting the delay in to give HomeSeer a chance to settle down before proceeding with cleanup.
HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Thank you, that did it.
Sent from my iPhone using TapatalkHS4Pro on Windows 10
One install with 2 Ethernet Z-nets
2nd install with 1 Ethernet Z-net
300 devices, 250 events, 8 scripts
6 CT-100 tstats
Serial IT-100 interface to DSC Panel with 8 wired zones
18 Fortrezz water sensors & two valve controls
Comment
-
Randy, could expand on z-net power on. Is this just a restart of the z-net.
Also I see the Cleanup Events Day/Night...
How are exactly are you synchronizing lights to time of day.
Sent from my iPhoneTom
baby steps...starting again with HS3
HS3Pro: Z-NET & 80 Z wave Devices,
HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
System: XP on Fanless Mini-ITX w/ SSD
Comment
-
Originally posted by TomTom View PostRandy, could expand on z-net power on. Is this just a restart of the z-net.
Also I see the Cleanup Events Day/Night...
How are exactly are you synchronizing lights to time of day.
Sent from my iPhone
Restarting the Z-Net by brute force has not been a problem, but it is not an ideal solution. I intend a weekend project to be to change the relay to have its N.O. contacts wired to the Pi 2's run pins which when shorted will reset the Z-Net.
I asked Rich to provide a "Restart controller" as an event action. He wasn't wanting to do that and he said he thought there was a JSON command to restart it, but that was the last I heard of it. The reset button would probably be a better solution in case the Z-Net quits communicating over Ethernet, which happens to be the only problem I have ever had. It happened twice in two weeks last September, never before and not since. I cannot be sure if it was a network problem or a Z-Net problem, but restarting it cured it both times. Now I trap log entries that indicate that the Z-Net is not communicating and if 10 occur within 2 minutes, I get a Pushover message allowing me to restart the controller by an acknowledgement. If I get 25 of the errors in a 5 minute period, HomeSeer restarts the Z-Net automatically.
Hopefully all this makes sense.
.Last edited by randy; March 9, 2016, 11:33 PM.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Originally posted by TomTom View PostRandy, could expand on z-net power on. Is this just a restart of the z-net.
Also I see the Cleanup Events Day/Night...
How are exactly are you synchronizing lights to time of day.
Sent from my iPhone
If HomeSeer is shut down at noon and restarted at 8:00 PM these events will turn the appropriate lights on.
These devices are set to turn on before, at or after sunset and off at a certain time. If I have an event to turn a light or virtual device on at sunset via that trigger, I also put nighttime in as a condition. When HomeSeer is running normally, it triggers at sunset and the condition would understandably be true.
When a restart of HomeSeer occurs, my Reboot Occurred event calls the Day/Night lighting cleanup event, which in turn calls the device control events with the conditions respected. Since triggers are ignored calling the event skips the sunset trigger but will still respect the nighttime condition.
For example my front porch light comes on at sunset and is turned off at 1:00 AM. The two events are:
IF the time is 1m, 0s after sunset
AND IF the time is after sunset but before 12;00 AM
AND IF the front porch light is OFF
OR IF this event is manually triggered
AND IF the time is before 1:00 AM
AND IF the front porch light is OFF
THEN Turn the Front Porch Light ON
IF the time is 1:00:01 AM
AND IF the time is before sunset but after 1:00 AM
AND IF the front porch light is ON
THEN Turn the Front Porch Light OFF
Both of those events can run with their primary trigger or be called from another event that respects their conditions.
I never found powerfail recovery to work predictably or reliably, so this structure allows me to keep time controlled devices in sync, no matter how long HomeSeer might have been shut down.Last edited by randy; March 9, 2016, 11:28 PM.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Thanks Randy. VERY VERY useful(as always). Thank you !Tom
baby steps...starting again with HS3
HS3Pro: Z-NET & 80 Z wave Devices,
HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
System: XP on Fanless Mini-ITX w/ SSD
Comment
-
Originally posted by rprade View PostOn the day night cleanup events, I have a couple of virtual devices that enable/disable motion controlled lighting based upon time of day. One is for the basement and the other for upstairs. I also look at about 10 key lights or lighting groups that are controlled by the time of day - outside lights, stair lights, living area lights, bathroom night lights and kitchen cabinet accent lights.
If HomeSeer is shut down at noon and restarted at 8:00 PM these events will turn the appropriate lights on.
These devices are set to turn on before, at or after sunset and off at a certain time. If I have an event to turn a light or virtual device on at sunset via that trigger, I also put nighttime in as a condition. When HomeSeer is running normally, it triggers at sunset and the condition would understandably be true.
When a restart of HomeSeer occurs, my Reboot Occurred event calls the Day/Night lighting cleanup event, which in turn calls the device control events with the conditions respected. Since triggers are ignored calling the event skips the sunset trigger but will still respect the nighttime condition.
For example my front porch light comes on at sunset and is turned off at 1:00 AM. The two events are:
IF the time is 1m, 0s after sunset
AND IF the time is after sunset but before 12;00 AM
AND IF the front porch light is OFF
OR IF this event is manually triggered
AND IF the time is before 1:00 AM
AND IF the front porch light is OFF
THEN Turn the Front Porch Light ON
IF the time is 1:00:01 AM
AND IF the time is before sunset but after 1:00 AM
AND IF the front porch light is ON
THEN Turn the Front Porch Light OFF
Both of those events can run with their primary trigger or be called from another event that respects their conditions.
I never found powerfail recovery to work predictably or reliably, so this structure allows me to keep time controlled devices in sync, no matter how long HomeSeer might have been shut down.Computer: CUK Intel NUC7i7BNH
Op System: Windows10 Pro - Work Station
HS Version: HS4 Pro Edition 4.2.19.0
Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.
Comment
-
Originally posted by MNB View PostRandy, firstly thanks for posting you solution. I would have thought that system reboot would have been built-in, but this works also and I've adapted to my situation. Is it possible for you to post examples (screen shots) of your; Restart cleanup events for both z-wave and Night/Day events? A picture is worth a thousand words... MikeMichael
Comment
-
Originally posted by MNB View PostRandy, firstly thanks for posting you solution. I would have thought that system reboot would have been built-in, but this works also and I've adapted to my situation. Is it possible for you to post examples (screen shots) of your; Restart cleanup events for both z-wave and Night/Day events? A picture is worth a thousand words... MikeHS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Originally posted by rprade View PostI just got home from 8 hours of driving in the Colorado mountains. I will try to post tomorrow.Computer: CUK Intel NUC7i7BNH
Op System: Windows10 Pro - Work Station
HS Version: HS4 Pro Edition 4.2.19.0
Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.
Comment
-
Originally posted by MNB View PostRandy, many Thanxs, will be waiting with baited breath ;-) Trust you went somewhere nice (pleasure or business)? MikeHS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
OK Here goes. This is my primary cleanup event. It is triggered from my startup script. The purpose is to get everything in the correct state after startup, whether HomeSeer was down for minutes, hours or days.
First I make sure a virtual device that resets Z-Nets is off. In some cases there will be a trigger of this device prior to a restart. Then I start my uptime timer. I use this to stop certain automatic actions from starting until HS has been running for at least 2 minutes. Then I turn off a virtual device that might indicate the system was waiting for an acknowledgement from a Pushover emergency message. Then I send a Pushover message that HomeSeer was restarted. Then I put in a Wait for 1 minute to let HS settle after a startup. I do not load plug-ins in the background. If I did, the Wait would need to be 3 minutes.
After the wait, these are the steps- Turn announcements off in one room so that it doesn't disturb my wife when she is working from home
- Announce that HS was restarted. Since I use the Sonos plug-in the announcements are all handled with a script
- Then I poll any critical devices to make sure they were not manually operated while HomeSeer was down
- Then I run an event that restarts Arduino board monitoring and testing. My 3 critical Arduinos have watchdog reset boards attached. These boards need to see an output toggle at least once every 4 minutes and if not they perform a hard reset on the board. The Arduinos are very reliable, this is just a layer to make them almost bulletproof
- Then I cleanup my day and night lighting. This runs an event that goes through all of our automatic lights and sets then according to their schedules
- Then a bunch more odds and ends making sure everything in in the proper state at startup, followed by a Pushover message telling me cleanup is complete
Here is the Polling Event which makes sure HomeSeer knows the status of boiler power and my network power switches
Here is the Event that calls all of my lighting cleanup Events
A typical lighting cleanup event. It is normally triggered by entry into a Easy Trigger Schedule, but the schedule is also a condition so that it can be run manually. This Event turns on all of the living end entry area lighting. There is another to turn them off and a third to put them in nightlight mode. There are others for outside and for specialty lighting.
This process sure has grown since I posted above about 2 years ago. Hopefully this makes sense. If you have questions I will try to answer them.Last edited by randy; February 23, 2018, 06:31 PM.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
Comment