Announcement

Collapse
No announcement yet.

Jon00 Cumulative Uptime Monitor For Homeseer Devices

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

    #31
    No, the device value and device string will only update together when the script is run.

    Here is something to think about. Why not write the cost data directly to my ini file using the TextAfterValue= entry.

    Run my script then run your script and then mine again. You will then see it in the virtual device as up-to-date data. Remember to use a <br> tag first to show your data on a new line in the virtual device.

    i.e.

    hs.SaveIniSetting ("Device1","TextAfterValue","<br>" & costdata,"Jon00Uptime.ini")
    Jon

    Comment


      #32
      That's a great idea! That will work!

      EDIT: And of course it does! Great!

      Just one thing, I'd like to set the AfterString to " - 34,43 kr" but the first space is ignored...
      Last edited by Moskus; February 10, 2010, 03:33 PM.
      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


        #33
        Rather than a space, use &nbsp; (html for a no break space)
        Jon

        Comment


          #34
          Of course!

          Although that was harder to do than it should be. Edit field in Chrome turned &nbsp; into a space instantly.
          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


            #35
            Just another question:
            If I have read the documentation correctly (and that's a big if) the ("Main","2;$DS:C6") command is supposed to track the status of C6 automaticly.

            And if that's the case I can't get it to work. The workaround for me is to create two events that run ("Main","1;1") and ("Main","1;0") dependant if the monitored device is turned on or off...

            It's not a big issue, I just check if I understood the documentation.



            I think I'm long overdue on buying you a couple of beers or coffees.
            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


              #36
              It should be working.

              From your example, you are reading from device 2

              ("Main","2;$DS:C6")

              whereas you second example, device 1

              ("Main","1;1") and ("Main","1;0")

              Could that be the issue?
              Jon

              Comment


                #37
                I forgot to mention, you still need to run the script from an event using a trigger of device status 'changed to any status' using the same device defined as the script parameter. (I hope that makes sense!)

                This would require only one event to change the on/off status for you.
                Jon

                Comment


                  #38
                  Originally posted by jon00 View Post
                  (I hope that makes sense!)
                  Yeah it does, thank you!
                  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


                    #39
                    example to get me started?

                    I have 1.7 running on another machine. I installed HS2 demo to try to get this to work. Ultimately, I want to monitor my 2 stage gas furnace to know how long it spends on each stage. Can you give me an example of just monitoring the A1 lamp that's in the HS2 demo? My scripting abilities are limited, but I can follow an example. What does this mean?

                    To call [Device1], the following optional script parameters would be used:
                    ("Main","1")

                    Where does it go?

                    Thanks for any help.

                    Comment


                      #40
                      Originally posted by Isk82 View Post
                      I have 1.7 running on another machine. I installed HS2 demo to try to get this to work. Ultimately, I want to monitor my 2 stage gas furnace to know how long it spends on each stage. Can you give me an example of just monitoring the A1 lamp that's in the HS2 demo? My scripting abilities are limited, but I can follow an example. What does this mean?

                      To call [Device1], the following optional script parameters would be used:
                      ("Main","1")

                      Where does it go?

                      Thanks for any help.
                      In HS1 I have not got a clue, too long ago; however, in HS2 in event actions, switch to advanced view, if not already open, and it goes in the box........

                      Optional parameters (function,param)
                      ie: ("main","lights")


                      Third box from the top, just under Existing or new script name:,Works a treat.
                      sigpic
                      A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                      Comment


                        #41
                        I'm not sure how far you have got but you need to create event(s) to start, stop or just update homeseer with the current uptime.

                        From the events page, click on the add event button.

                        You will see the green name tab. In the Name field add something like 'Furnace on'

                        Now click on the action tab which should turn green.

                        In the add action drop-down, select run script.

                        In the existing script drop-down box add Jon00Uptime.vben

                        Click on the pink 'Switch to advanced view' button.

                        Under the Optional parameters box add:

                        ("Main","1;1")

                        Click on the update button then the save button.

                        This event, when run will start the timer defined under [Device1] in the ini file.

                        Repeat this with another event called 'Furnace off' with optional parameters ("Main","1;0")

                        The Housecode defined under the [Device1] is not the housecode you are monitoring, rather a new virtual device to show the status of the furnace.

                        To trigger each event, go back to the trigger tab for the 'on' event and select device status change from the drop down. Select the device related to A1 and then change the status box to 'Changed to on' and then save.

                        Repeat with the 'off' event but with the status box selected to 'changed to off'
                        Jon

                        Comment


                          #42
                          Gogs, thank you for the reply. I am using HS and if I can get this to work will probably update from 1.7.

                          I am now getting this error:


                          8/19/2010 1:41:21 PM Event Running script in background: Jon00Uptime.vben("main","lights")

                          8/19/2010 1:41:21 PM Error 3 Running script Jon00Uptime.vben :method not found

                          Any ideas?

                          Comment


                            #43
                            Gogs was just giving a random example for optional parameters. Please read my post to assist you.
                            Jon

                            Comment


                              #44
                              Jon, thank you for the step by step tutorial. I did what you describe and it works when I trigger it manually, but I put a trigger condition to trigger it when a device status changes, it doesn't trigger it for some reason. I'll keep working on it, but thanks and it's a good script that will do exactly what I want. Any other input is welcome.

                              Comment


                                #45
                                Originally posted by jon00 View Post

                                The Housecode defined under the [Device1] is not the housecode you are monitoring, rather a new virtual device to show the status of the furnace.

                                To trigger each event, go back to the trigger tab for the 'on' event and select device status change from the drop down. Select the device related to A1 and then change the status box to 'Changed to on' and then save.

                                Repeat with the 'off' event but with the status box selected to 'changed to off'
                                Works when I trigger manually, but not by a device status change. What am I missing?

                                Comment

                                Working...
                                X