Announcement

Collapse
No announcement yet.

Zigbee event logging in the HS4 log

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

    Zigbee event logging in the HS4 log

    Hi, I was wondering why regular events that occur on zigbee devices don't show up in the HS4 log?

    For example, motion detected, door opened, button pressed, temperature changed, etc.?

    I know there's a way to log zigbee to a file but I tried several log levels and the data that's saved is more "under the hood" not plain English like "Bedroom 1 window opened".


    I'm comparing this to z-wave events that occur frequently in the HS4 log.

    #2
    Just a bump on this -- seems like a simple question. I would guess it's something like "it's easy to do but hasn't been implemented yet" or something else.

    Just curious why it's not important to folks - I like having a log of events like doors & windows being opened or a motion detector detecting motion.

    Comment


      #3
      Logging is set on your device. Do you have do not log checked on the device?
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4

        Here's where it doesn't seem to work. I have logging enabled but nothing shows up in the Homeseer log when anything happens with zigbee devices.

        Click image for larger version

Name:	2021-08-23_21h07_48.jpg
Views:	202
Size:	70.5 KB
ID:	1491091

        AND

        Click image for larger version

Name:	2021-08-23_21h09_00.jpg
Views:	180
Size:	64.3 KB
ID:	1491090
        Attached Files

        Comment


          #5
          Also, not sure if it's important but the zigbee log level (in the plugin settings) is set to INFO.


          This is what I was hoping the zigbee plugin would log (example from a z-wave motion detector):

          Click image for larger version

Name:	2021-08-23_21h16_52.jpg
Views:	190
Size:	29.5 KB
ID:	1491093

          Comment


            #6
            It seems it should be logging. I'll defer to Spud on this one as he's the plugin author on this plugin.
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #7
              device/feature changes are not logged by the Zigbee plugin
              I'm going to create a feature request for this, but it sounds to me that this is something that would be better done at HS4 level, so that any devices/features changes are always log the same way whatever the owning plugin is.

              Comment


                #8
                Spud, thanks for the reply and I do see your point -- the HS4 device dashboard sees changes right away -- if I simply watch it live I see zigbee devices change. Of course events trigger as well so HS4 is aware of the status changes.

                Thanks for your help and let me know if you think I need to open a ticket on the HS4 homefront or if that's something you're planning on doing.

                Dennis

                Comment


                  #9
                  Well for lack of any progress on sorting this out I created my own workaround.

                  I run linux webservers in my home and was able to create a nice way to track zigbee device changes. I created HS4 events that run http GET events on a script on my webserver to log specific events with timestamps. I also wrote a reporting web page that pulls from that database to show the events. This seems to work out for me. It's unfortunate that I have to use basically an external logging setup but for my needs it'll suffice.


                  An example script from an event:

                  (some zigbee trigger happens, in this example device ID 1181 - a window - gets closed)

                  Execute the command: &hs.URLAction("http://internalsite.com/zigbee_log_event.py?event=Window closed&device_id=1181", "GET", "", "")

                  Comment


                    #10
                    Or use direct script command like &hs.writelogex("change occurred", "mydevice X has changed","")? This comes in your hs log where you would want this?
                    -- Wim

                    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                    1210 devices/features ---- 392 events ----- 40 scripts

                    Comment


                      #11
                      Wim, thanks for that post! I appreciate it and it works to log events for zigbee devices that change like door sensors and motion sensors. I created events for those changes.

                      Do you happen to know how to grab a device value and include that in the log write script command?

                      For example, I have a temperature sensor that has humidity, temp., etc. that I can possibly query in a script, but I'm not sure how that's done.

                      Do you have any examples of this? Then I can log temperature changes using an event that runs a script (either on an interval or by a "device value has just changed" trigger.


                      Thank you

                      Comment


                        #12
                        Man, I'm really close. This script logs just the temperature into the HS4 log:

                        &nhs.writelog("Zigbee",hs.devicevaluebyname("MBR_Temperature "))

                        However, I am not familiar with how basic syntax works here as I'd like the log entry to be "Master Bedroom Temperature is xx" instead of just "83" showing up in the log.


                        Is it easy to add some text here and reference the variable to write to the log?

                        Comment


                          #13
                          OK, a google search for "VB string concat" gave me the ampersand, and this works:

                          &nhs.writelog("Zigbee","Master bedroom temperature is " & hs.devicevaluebyname("MBR_Temperature"))


                          Sorry for all the noise on this thread; hopefully someone else might find it useful!


                          Click image for larger version

Name:	2021-08-31_19h55_51.jpg
Views:	165
Size:	8.0 KB
ID:	1492895

                          Comment


                            #14
                            Glad I could put you on track
                            -- Wim

                            Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                            1210 devices/features ---- 392 events ----- 40 scripts

                            Comment

                            Working...
                            X