Announcement

Collapse
No announcement yet.

HS out of sync when PC improperly shuts down

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HS out of sync when PC improperly shuts down

    I have a day/night device that triggers sunrise/sunset events. Everytime my PC crashes or if it was improperly shut down, the day/night device goes out of sync. I'd have to trigger the device back and forth and things works again.

    Similarly, there's a garage/gate status device that controls the gate and garage. It would sometime get out of sync if the above happens.

    Is there a way to make sure that all the devices are in sync all the time?

    #2
    I'm a newb, but I saw that you can update the startup.vb script to run events when HomeSeer starts. Like initialization commands. Maybe reset that device off/on or on/off at each start.

    Comment


      #3
      Originally posted by dannieboiz View Post
      Is there a way to make sure that all the devices are in sync all the time?
      It will depend on the nature of the device.

      Day/night is fairly easy. An event can check the current time against sunrise and sunset and update the device.

      A gate or a garage door may be more difficult. Do they have a sensor of any kind or do you assume that every time they are activated the state switches between open and closed?
      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


        #4
        Originally posted by Uncle Michael View Post
        It will depend on the nature of the device.

        Day/night is fairly easy. An event can check the current time against sunrise and sunset and update the device.

        A gate or a garage door may be more difficult. Do they have a sensor of any kind or do you assume that every time they are activated the state switches between open and closed?
        Can you please elaborate on the day/night resolution?

        The gate and garage both have sensors. Both uses dry contact switches, I have an event that turn them off after 1 second if its status changes to on. Which leads me to another question... occassionally, I find that they are stuck in the on position, rendering my ability to use it until I go into homeseer to turn it off manually. Any resolution to ensure that it's always in the off position? I thought about having an "off" event repeating every second (not sure if it's even an option) but I think it'll will kill my system.

        The actual device that I use to control them are virtual devices that update its status based on the sensor condition to have an open/close status and will activate the physical switch switch to on when pressing open or close.

        Comment


          #5
          Originally posted by dannieboiz View Post
          Can you please elaborate on the day/night resolution?
          Okay. How do you define day and night? Do you use the built-in daytime/nighttime?

          The gate and garage both have sensors. Both uses dry contact switches, I have an event that turn them off after 1 second if its status changes to on.
          Why is this necessary? Why not just use the state of the sensors to determine open/close?
          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


            #6
            Originally posted by Uncle Michael View Post
            Okay. How do you define day and night? Do you use the built-in daytime/nighttime?

            Why is this necessary? Why not just use the state of the sensors to determine open/close?
            I have a virtual device that changes between day/night - off/on based on an event that triggers it dependent on HS sunrise/sunset. This also allows me to trigger it day/night for various reason.

            My setup is based on this..


            That what was shown to me so I followed it and it seems to work fine.

            Comment


              #7
              Originally posted by dannieboiz View Post
              I have a day/night device that triggers sunrise/sunset events. Everytime my PC crashes or if it was improperly shut down, the day/night device goes out of sync. I'd have to trigger the device back and forth and things works again.

              Similarly, there's a garage/gate status device that controls the gate and garage. It would sometime get out of sync if the above happens.

              Is there a way to make sure that all the devices are in sync all the time?
              This was normal in my case too. The problem is homeseer is not doing regular internal backups. Its not only day and night or only virtual switches its all sensors and switches. you should notice when this happens the last changed time is probley some very old date.

              See this post here on how to run an backup in an event every hour or half hour or so. This way after a crash you can never be more then 1 hour or 30 min old.

              https://forums.homeseer.com/showpost...66&postcount=9

              Comment


                #8
                Originally posted by dannieboiz View Post
                I have a virtual device that changes between day/night - off/on based on an event that triggers it dependent on HS sunrise/sunset. This also allows me to trigger it day/night for various reason.
                Would something like this do what you want? If you change the trigger on the 'Status Sync' event to recurring, you could have HS check periodically. Alternatively, you could add a line in your Startup.vb script to run the event whenever HS starts to be sure the device is in sync.

                I'm still unclear about what you are doing for the gate and garage door. Why don't you use the status of the dry contact sensors to tell HS their state?
                Attached Files
                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


                  #9
                  Ultimately HS should have device state back automatically... I did not know it didn't. Seems like a basic thing... Write states when they change.

                  As UM pointed out, fixing Day/Night should be easy but when sensors are out of sync that is a different issue.

                  I haven't seen this problem so I haven't looked at it but if the devices are wire powered full time, then maybe you can force Homeseer to query the status? This wouldn't work for battery powered but you could setup battery devices to wake more frequently.

                  Alternatively, if they are critical, there is a script somewhere that stores device states that you can use to save and import upon first starting HS

                  Sent from my SM-G950U using Tapatalk

                  Comment


                    #10
                    Originally posted by Ltek View Post
                    Ultimately HS should have device state back automatically... I did not know it didn't. Seems like a basic thing... Write states when they change.
                    AFAIK, it does. At least it seems to in my setup.
                    I haven't seen this problem so I haven't looked at it
                    I haven't seen it either, so I'm having trouble faulting HS. I can think of at least a couple of possible causes. One is that if the change happens while HS is restarting, the state change can be missed. The other is that the DB is getting corrupted.

                    I'm still not clear on how the OP has his system set up, but part of the problem may also be that the process used to track the status of the gate and garage door seems surprisingly complex (based on the link he provided).
                    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


                      #11
                      Maybe this would help... The "Gate Access Controll Notification is a physical door sensor.

                      if the sensor is open, the actual button that I would press to close the gate is "close" vice versa... it would trigger the "gate Opener" which I use a dry contact relay for.



                      This is what updates the status of the Virtual Switch (Gate Controller above)


                      Ignore the gate auto close bypass but the other 3 devices here are all for controlling the gate

                      Gate Opener = Physical Dry contact relay
                      Gate Controller = Virtual device I use on the tablets and phones
                      Gate Access Control Notification = the door sensor


                      When the "sensor" is in the open position as the above photo, clicking "open" does nothing, I'd be forced to click on close to turn on the switch. Likewise if it was in the close position, I'd have to click open in order for it to do anything...

                      This also allow me to issue GH commands to either Open or Close, Lock or Unlock the gate etc... I know I can probably do away with all the above and just say turn on and off the gate or simply say open or close and it would simply activate the switch. Also, if I wasn't home and I needed the gate or garage to close or open, this ensure that the command issued is exactly what the gate and garage is doing. Telling it to close but instead it opens is the last thing I need half way across the country. This setup just makes the system "smarter" I think.

                      Back to the topic...
                      Sometime, not all the time, although the gate is open, the gate controller would be in the off position. A simple fix for this is just to turn on the physical switch let the gate run, once the sensor is tripped things will be back to normal.

                      Not the end of the world, but since I have homeseer on a wemo switch and a computer that pings it and automatically power cycle the wemo to bring HomeSeer back online, a few times I come to the beginning of the block and issue the "open the gate" command only to come home with a closed gate. Then I'd have to fiddle through the phone, open app and switch on the gate opener.


                      Similar issue with the day/night virtual switch, I have events that toggle it between day/night. This also allows me to disable/enable the motion activated switches that relies on it to activate when need be.

                      Comment


                        #12
                        That helps - I think.

                        It appears that you have a sensor called 'Gate Access Control Notification' that indicates whether the gate is open or closed. Does that give you an unambiguous reading of the position of the gate. Or is that what is unreliable? Or am I misunderstanding its function? Why do you have an additional device called 'Gate Controller'?

                        You also have an actuator called 'gate opener' that, when activated, will open the gate if it is closed or close the gate if it is open. Is that correct?

                        Regarding the day/night toggle: I would recommend that you not treat it as a toggle, but rather, set it explicitly. Even better, have a separate device that you use to inactivate events manually, one that is independent of your day/night device.
                        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


                          #13
                          Originally posted by Uncle Michael View Post
                          That helps - I think.

                          It appears that you have a sensor called 'Gate Access Control Notification' that indicates whether the gate is open or closed. Does that give you an unambiguous reading of the position of the gate. Or is that what is unreliable? Or am I misunderstanding its function? Why do you have an additional device called 'Gate Controller'?
                          This is just a zwave door sensor that I put inside a weatherproof box mounted one the post with the magnet mounted on the gate. It's either open or close. Just think of it as a simple door that open/closes.

                          The "Gate Controller" is the Virtual device that's configured in "Control Use" as "Door Lock" and "Door Unlock" This was necessary so that I can use either "lock/close" or "unlock/open" to activate the gate. This device wasn't necessary but it makes voice command smarter and the controlling of the device smarter as well.

                          You also have an actuator called 'gate opener' that, when activated, will open the gate if it is closed or close the gate if it is open. Is that correct?
                          The "gate opener" IS the physical Zwave contact device FS20Z-1. It's a ZWave relay, but instead of feeding it power, I feed the dry contact from the gate operator board. Similar to your wall mounted garage opener. You short the two wires, the garage open. in fact, my garage is this exact setup, it will respond to the "Gate controller" to the "on" position when the Gate controller is activated to either open/close by utilizing the event as seen here.



                          Regarding the day/night toggle: I would recommend that you not treat it as a toggle, but rather, set it explicitly. Even better, have a separate device that you use to inactivate events manually, one that is independent of your day/night device.
                          This isn't a bad idea, I can set the events sunrise/sunset within the event and turn this day/night into a "Disable/Enable" device that would enable/disable the events.

                          Comment


                            #14
                            Originally posted by dannieboiz View Post
                            This is just a zwave door sensor that I put inside a weatherproof box mounted one the post with the magnet mounted on the gate. It's either open or close. Just think of it as a simple door that open/closes.

                            The "Gate Controller" is the Virtual device that's configured in "Control Use" as "Door Lock" and "Door Unlock" This was necessary so that I can use either "lock/close" or "unlock/open" to activate the gate. This device wasn't necessary but it makes voice command smarter and the controlling of the device smarter as well.
                            I think I'm beginning to get my head around what you are doing. Thank you for the detail.

                            If I understand correctly, it's the synchronization between the state of the door sensor and and the 'Gate Controller' that is unreliable. Is that correct?

                            Is there any reason you could not run a sequence of events at startup that check the state of the z-wave door sensors on your gate and garage door and set the virtual devices appropriately?
                            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


                              #15
                              Originally posted by Uncle Michael View Post
                              I think I'm beginning to get my head around what you are doing. Thank you for the detail.

                              If I understand correctly, it's the synchronization between the state of the door sensor and and the 'Gate Controller' that is unreliable. Is that correct?

                              Is there any reason you could not run a sequence of events at startup that check the state of the z-wave door sensors on your gate and garage door and set the virtual devices appropriately?
                              Exactly. Just make sure you disable the any related events before you sync the device states. This way nothing is triggered during the initial syncing.

                              Sent from my SM-G950U using Tapatalk

                              Comment

                              Working...
                              X