Announcement

Collapse
No announcement yet.

Is there a way to track incomplete events?

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

    Is there a way to track incomplete events?

    Periodically I come across an event that is no longer functioning. This is usually due to a device having disappeared - sometimes my fault of course, sometimes they just disappear. Either way the events stop working irrespective of whether it's used in a trigger, condition or action.

    The most recent one for me, was my HSM200 suddenly decided to drop off the Z-Wave network. A bunch of events stopped working, which I didn't realise for 2 days. I wasn't able to recreate it from a re-scan, so had to exclude and re-include it, then modify all the events to use the new devices.

    It would be great to be able to report on incomplete events and even better still to leave some sort of text reference to the device that has disappeared, to make fixing it up easier.

    On the flip side, I also find that the 'Referencing Devices' selector in the Events screen, often produces spurious results. I think it's only extra results where the device isn't referenced, vs missing ones where it is, but it makes manually fixing events when you are consciously deleting or replacing a device more work than it should be.

    Show me ideas if I've missed something here.

    Cheers
    James
    cheeryfool

    #2
    Originally posted by cheeryfool View Post
    Periodically I come across an event that is no longer functioning. This is usually due to a device having disappeared - sometimes my fault of course, sometimes they just disappear. Either way the events stop working irrespective of whether it's used in a trigger, condition or action.

    The most recent one for me, was my HSM200 suddenly decided to drop off the Z-Wave network. A bunch of events stopped working, which I didn't realise for 2 days. I wasn't able to recreate it from a re-scan, so had to exclude and re-include it, then modify all the events to use the new devices.

    It would be great to be able to report on incomplete events and even better still to leave some sort of text reference to the device that has disappeared, to make fixing it up easier.

    On the flip side, I also find that the 'Referencing Devices' selector in the Events screen, often produces spurious results. I think it's only extra results where the device isn't referenced, vs missing ones where it is, but it makes manually fixing events when you are consciously deleting or replacing a device more work than it should be.

    Show me ideas if I've missed something here.

    Cheers
    James
    You haven't missed anything. Several of us have requested a means of identifying "broken" events, but so far there have been no solutions.

    Comment


      #3
      I'm not seeing anything like hs.LastTriggerTimeByName so what I would do is at the beginning of an event I would turn a virtual device on and then off. Then periodically you can run a script and see when the last time that virtual device changed.

      last_change = hs.DeviceLastChange("Virtual_Flag")


      ~Bill

      Comment


        #4
        Originally posted by Bill Brower View Post
        I'm not seeing anything like hs.LastTriggerTimeByName so what I would do is at the beginning of an event I would turn a virtual device on and then off. Then periodically you can run a script and see when the last time that virtual device changed.

        last_change = hs.DeviceLastChange("Virtual_Flag")
        In my case that would require manually editing over 1200 events and creating an equal number of virtual devices.

        There ought to be a way within HomeSeer to filter all events that reference a device that no longer exists. If a device disappears or is deleted, any event that uses it as a trigger or condition will no longer run. If the device is the subject of an action that action will not occur.

        Comment


          #5
          In HS2 there was a pretty useful search function that found devices and events with the search term in them. It's not in HS3 (yet), but I would guess it's on Rich's list. If he every gets the most nastiest bugs swatted, maybe he'll get a chance to address some of the nice-to-have / really useful functions that are still missing from HS3.
          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
            In HS2 there was a pretty useful search function that found devices and events with the search term in them. It's not in HS3 (yet), but I would guess it's on Rich's list. If he every gets the most nastiest bugs swatted, maybe he'll get a chance to address some of the nice-to-have / really useful functions that are still missing from HS3.
            There is a filter function in HS3 that will find events containing any device in the system. There is no way to filter events that have a missing device.

            Was there a way in HS2 to search for an event that should have a device, but the device was no longer in the system?

            The problem I have encountered is that on a number of occasions HS3 has just lost a Z-Wave device. Last year I had an Aeotec Multi-sensor just drop out of the network. This year a light switch and a pair of Aeotec smart strips just disappeared. A user can also do something foolish like replace a Z-Wave device or delete a virtual device. In all of those cases, you will be left with events that no longer reference a device. Unless you have a good enough memory to recall every event that uses each device you are a little screwed.
            Attached Files

            Comment


              #7
              The problem of Events referencing devices by the devref number has always puzzled me. If you have to reinstall a plugin, chances are that all events referencing the plugin devices will be toast.

              I asked a while back how people were referencing devices in their scripts, by device name or reference number, and almost everyone (that responded) uses device ref.

              I have always used device name in my scripts in that it makes them more readable and hence easier to debug, but most importantly, they are not broken when a device is redefined with a different devref.

              Seems to me that events are defined using the device name, but then stored using the devref, thus causing all of these problems.

              tenholde
              tenholde

              Comment


                #8
                Originally posted by tenholde View Post
                The problem of Events referencing devices by the devref number has always puzzled me. If you have to reinstall a plugin, chances are that all events referencing the plugin devices will be toast.

                I asked a while back how people were referencing devices in their scripts, by device name or reference number, and almost everyone (that responded) uses device ref.

                I have always used device name in my scripts in that it makes them more readable and hence easier to debug, but most importantly, they are not broken when a device is redefined with a different devref.

                Seems to me that events are defined using the device name, but then stored using the devref, thus causing all of these problems.

                tenholde
                The event database does store devices by their RefID. I can see the rationale for using the device RefID. It avoids any issues with duplicate names and keeps events from being broken if the name or location is changed. If you use the name in the event it must be unique and cannot be changed. Using the name plus location to reference devices in an event or a script prevents you from ever changing either without breaking all events or scripts that refer to the device.

                I have one plug-in that uses the locations assigned in the plug-in config page. It quits working if you change the location in the device itself, rather than editing it within the plug-in config page.

                Events are also referred to by a hidden record ID. This allows you to change the name of an event without breaking any other events that call it.

                Comment


                  #9
                  Originally posted by tenholde View Post
                  The problem of Events referencing devices by the devref number has always puzzled me. If you have to reinstall a plugin, chances are that all events referencing the plugin devices will be toast.

                  I asked a while back how people were referencing devices in their scripts, by device name or reference number, and almost everyone (that responded) uses device ref.

                  I have always used device name in my scripts in that it makes them more readable and hence easier to debug, but most importantly, they are not broken when a device is redefined with a different devref.

                  Seems to me that events are defined using the device name, but then stored using the devref, thus causing all of these problems.

                  tenholde
                  I think the advantage though of using ref numbers is they never change if the user decides to modify the device name in the Device Manager. I guess if you remain disciplined about picking a name carefully and leaving it unchanged after creating the device, then using names in scripts avoids the problems described in this thread. I personally changed my mind a few times naming devices, particularly when I started using Echo and renaming things to be easiest and most natural in voice commands.

                  Comment


                    #10
                    Originally posted by rprade View Post
                    Was there a way in HS2 to search for an event that should have a device, but the device was no longer in the system?
                    Unfortunately, no. If you delete a device in HS2 it just disappears from any event that it was in without a trace. So a condition containing the device just vanishes from the event, for example.

                    I am hoping that in HS3 there will be a way to search for events with a missing device condition or action, though. It looks like it should be possible since the event list appears to reflect the missing 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

                    Working...
                    X