Announcement

Collapse
No announcement yet.

FitbitSeer, a Fitbit plugin for HS3 - Need beta testers

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

    Hmmm! I have a hard time wrapping my head around this. It's hard to debug when I can't replicate an error.

    I might have to release a new update with more debug logging so that we can trace it.


    To stop the plugin, it's easiest to disable the plugin, and then kill the process HSPI_FitbitSeer.exe (e.g. using Task Manager). Then re-enable the plugin.


    Can you reach www.fitbit.com from the HS3 server?
    HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
    Running on Windows 10 (64) virtualized
    on ESXi (Fujitsu Primergy TX150 S8).
    WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

    Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

    Comment


      HSPI_MoskusSample is released. Get it here: http://board.homeseer.com/showthread.php?p=1204795
      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
      Running on Windows 10 (64) virtualized
      on ESXi (Fujitsu Primergy TX150 S8).
      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

      Comment


        Originally posted by Moskus View Post
        Hmmm! I have a hard time wrapping my head around this. It's hard to debug when I can't replicate an error.

        I might have to release a new update with more debug logging so that we can trace it.


        To stop the plugin, it's easiest to disable the plugin, and then kill the process HSPI_FitbitSeer.exe (e.g. using Task Manager). Then re-enable the plugin.


        Can you reach www.fitbit.com from the HS3 server?
        Yep, I know it's next to impossible to fix if you can't reproduce it. I was just hoping the fact it occurred on the hour may give you an idea, if it's something you initiate on the hour.

        I can reach fitbit.com from my HS3 box.

        Comment


          ... and it crashes when you hit the Update button too (it should!).

          Can you try to add another account (re-authenticate your account)? It seems like the authentication data is messed up somehow, but I thought that should give an error in the log.

          I could be that the data stored in the Root device has been corrupted somehow. It shouldn't but that means the database could have a problem. (Or at least, my objects in the database. ).
          HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
          Running on Windows 10 (64) virtualized
          on ESXi (Fujitsu Primergy TX150 S8).
          WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

          Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

          Comment


            Do you mean the "Refresh Now" button?

            Just hit it and the data refreshed ok and the plugin stayed running, no crash.

            Comment


              Originally posted by JimBob View Post
              Do you mean the "Refresh Now" button?

              Just hit it and the data refreshed ok and the plugin stayed running, no crash.
              ... really? How is that possible (I wonder)?!

              Are the device values also updated?


              I'm not doing anything "every hour", I'm only doing something every 5 minutes (or at the refresh interval you have selected yourself, if you have overridden the setting). Is this with HS3 version .208? (I don't know if that matters, I've been running it on two different computers myself for weeks without issues, and I've kept upgrading HS3 too).
              HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
              Running on Windows 10 (64) virtualized
              on ESXi (Fujitsu Primergy TX150 S8).
              WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

              Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

              Comment


                Originally posted by Moskus View Post
                ... really? How is that possible (I wonder)?!

                Are the device values also updated?


                I'm not doing anything "every hour", I'm only doing something every 5 minutes (or at the refresh interval you have selected yourself, if you have overridden the setting). Is this with HS3 version .208? (I don't know if that matters, I've been running it on two different computers myself for weeks without issues, and I've kept upgrading HS3 too).
                Yep, values updated ok.

                I'm on .197

                Comment


                  Okay, I'm officially lost.

                  Your first error points to that there's an unhandled error in my sub for getting updated values from the Fitbit database (here: HSPI_FitbitSeer.FitbitSetup.UpdateData() ). However, as a manual refresh works, this can't be the case.

                  ... and agan, I thought I had handled all possible errors. Apparently not, but I'll check again to see if I have missed something. The NullReferenceException could point to that there's could be some data missing, perhaps a Fitbit API issue. I'll dig a little more.
                  HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                  Running on Windows 10 (64) virtualized
                  on ESXi (Fujitsu Primergy TX150 S8).
                  WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                  Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                  Comment


                    Weird. I wonder if they've changed the API for certain locales?

                    Anyway, it's not an urgent issue for me as my values are still getting updated. It's just the errors every hour cluttering the log and the worry that it may stop altogether if I restart HS, like dcdelong had.

                    Comment


                      Originally posted by JimBob View Post
                      Weird. I wonder if they've changed the API for certain locales?

                      Anyway, it's not an urgent issue for me as my values are still getting updated. It's just the errors every hour cluttering the log and the worry that it may stop altogether if I restart HS, like dcdelong had.
                      That's really the thing: It's the SAME function being called when you hit the "Refresh now" button as when the plugin does on it's own.


                      ... but come to think of it, this COULD point to something weird in the database. This is the UpdateData's signature:
                      Code:
                      Public Sub UpdateData(ByVal root As Integer)
                      I see now that the plugin could potentially crash if it can't find "root device" (if the device reference ID of the root is 0 or a ref ID that does not longer exist is passed).

                      For each "automatic" refresh the plugin does, the plugin scans for all root devices belonging to the plugin (e.g. my wife and I both have our accounts tied into HS3). But it shouldn't find a device a device that doesn't exist unless there's something fishy in the HS3 database...
                      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                      Running on Windows 10 (64) virtualized
                      on ESXi (Fujitsu Primergy TX150 S8).
                      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                      Comment


                        But the plugin updates every 5 minutes so you would expect it to crash every 5 mins if it was a hard fault. Something is different on the hour? I'll change my refresh period to 15 minutes as a test and see if the frequency/timing of the crashes changes.
                        Last edited by JimBob; October 20, 2015, 03:53 PM.

                        Comment


                          Originally posted by JimBob View Post
                          Something is different on the hour?
                          No, not to this plugin. There's just one timer, which triggers every 5 minutes (or whatever you set it to). It doesn't even round to the nearest "whole" minute, like the next (unreleased) version does.

                          Could it be something else? I have a hard time seeing what could be, but still... If you watch the process in Task Manager while refreshing, does it use a lot of resources?
                          HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                          Running on Windows 10 (64) virtualized
                          on ESXi (Fujitsu Primergy TX150 S8).
                          WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                          Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                          Comment


                            Yes, I didn't necessarily mean it was the plugin doing smoething on the hour. More than it could be HS/fitbit s/w?

                            Since I changed the refresh period to 15 minutes last night, the frequency of the crashes has remained hourly but now it is at 11-13 minutes past the hour (I changed the period at about 21:00).



                            So I have just changed the period to 30 minutes and we'll see how that behaves.

                            Memory usage for the plugin looks steady at about 5.6 MB, 0 for cpu, disk, network.

                            Comment


                              It seems like it is crashing the first time it is triggered after a new hour. It really shouldn't do that.
                              HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                              Running on Windows 10 (64) virtualized
                              on ESXi (Fujitsu Primergy TX150 S8).
                              WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                              Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                              Comment


                                The timings hasn't really changed much since I moved the period to 30 minute intervals. It is still crashing about 15 mins past the hour.
                                Weird how it was ok for a couple of weeks before this started.

                                Comment

                                Working...
                                X