Announcement

Collapse
No announcement yet.

Propane Monitoring

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

    #16
    Originally posted by vasrc
    Just create an Event that runs once a day (or as often as you want an update) and have it run this script. You'll need to create two HS3 devices. One for Tank Level (range 1-100, % suffix, 2 dec places) and one for Tank Status (0-Off/100-On).

    Enter the two HS3 virtual devices in the script along with the Tank Utility User and Password.

    Change TankUtility.txt to TankUtility.vb and place in your scripts directory.

    Z
    Thanks

    Comment


      #17
      Originally posted by vasrc
      Just create an Event that runs once a day (or as often as you want an update) and have it run this script. You'll need to create two HS3 devices. One for Tank Level (range 1-100, % suffix, 2 dec places) and one for Tank Status (0-Off/100-On).

      Enter the two HS3 virtual devices in the script along with the Tank Utility User and Password.

      Change TankUtility.txt to TankUtility.vb and place in your scripts directory.

      Z
      Having a compilation error and so far my google search skills aren't helping me:

      Code:
      Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
      
      Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Web.Extensions' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

      Comment


        #18
        Originally posted by macrho View Post
        Having a compilation error and so far my google search skills aren't helping me:

        Code:
        Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
        
        Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Web.Extensions' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
        Sorry abou that.

        Windows or Linux HS3 platform?

        You need System.Web.Extensions.dll in the bin/scripting directory.

        Z

        Comment


          #19
          I'm on Windows 7 embedded. This is in my settings.ini file:

          ScriptingReferences=System.Drawing;System.Drawing.dll;System .Web.Script.Serialization;System.Web.Extensions.dll

          I dropped the dll here: C:\Program Files\HomeSeer HS3\Bin and copied it from: C:\Windows\Microsoft.NET\Framework\v4.0.30319

          am still having errors:

          Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases

          I restarted HS3 too

          Comment


            #20
            Originally posted by macrho View Post
            I'm on Windows 7 embedded. This is in my settings.ini file:

            ScriptingReferences=System.Drawing;System.Drawing.dll;System .Web.Script.Serialization;System.Web.Extensions.dll

            I dropped the dll here: C:\Program Files\HomeSeer HS3\Bin and copied it from: C:\Windows\Microsoft.NET\Framework\v4.0.30319

            am still having errors:

            Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases

            I restarted HS3 too
            Here's my settings. ini
            ScriptingReferences=System.Web.Script;System.Web.Extensions. dll

            System.Web.Extensions.dll is located in:

            /bin/scripting/

            Z

            Comment


              #21
              Originally posted by vasrc View Post
              Here's my settings. ini
              ScriptingReferences=System.Web.Script;System.Web.Extensions. dll

              System.Web.Extensions.dll is located in:

              /bin/scripts

              Z
              make that:

              /bin/scripting/

              Comment


                #22
                Ok, I have now:

                ScriptingReferences=System.Drawing;System.Drawing.dll;System .Web.Script;System.Web.Extensions.dll

                System.Web.Extensions.dll located in: C:\Program Files\HomeSeer HS3\Bin\scripting

                I only edited the lines noted in your VB file and it still throws error after restarting hs3:

                Code:
                Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
                
                Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
                
                Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
                Dec-30 4:04:14 PM	 
                
                Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Web.Script.Serialization' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
                
                Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

                Comment


                  #23
                  Originally posted by macrho View Post
                  Ok, I have now:

                  ScriptingReferences=System.Drawing;System.Drawing.dll;System .Web.Script;System.Web.Extensions.dll

                  System.Web.Extensions.dll located in: C:\Program Files\HomeSeer HS3\Bin\scripting

                  I only edited the lines noted in your VB file and it still throws error after restarting hs3:

                  Code:
                  Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
                  
                  Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
                  
                  Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Type 'JavaScriptSerializer' is not defined.
                  Dec-30 4:04:14 PM	 
                  
                  Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Web.Script.Serialization' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
                  
                  Error Compiling script C:\Program Files\HomeSeer HS3\scripts\TankUtility.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
                  Put a comma in between the two entries:
                  ScriptingReferences=System.Drawing;System.Drawing.dll,System .Web.Script;System.Web.Extensions.dll

                  Comment


                    #24
                    Originally posted by vasrc View Post
                    Put a comma in between the two entries:
                    ScriptingReferences=System.Drawing;System.Drawing.dll,System .Web.Script;System.Web.Extensions.dll
                    bingo! that worked! but how on Earth did you know that? I'm not sure why I have the drawing reference... Off to see if I can find a decent graphic to mimic the TankUtility app -- battery percentage isn't clean enough

                    Happy New Year

                    Comment


                      #25
                      Interesting. I will post the one I wrote. I assumed the device and token won't change-- so mine makes the one JSON call to tank utility, but you have to get your token and device number.

                      The line below would need to be updated....

                      'Change 012345 with your device number
                      'Chance abcdef.ghijkl.mnop-qrst-uvwyz with your token
                      Dim Query As String = hs.GETURL("https://data.tankutility.com/api/devices/012345?token=abcdef.mnop.qrst-uvwyz","",False,80)

                      The procedure here would need to be followed to obtain the token and the device number...

                      http://apidocs.tankutility.com/#introduction

                      Mine will create the devices at the Room and device Letter..

                      It will also show you how much is in the tank and how many days you can expect to last using the same amount as the previous day... I will probably change that to use a moving average.

                      I posted a picture of the devices in the room it creates...

                      I'll have to try to load this other script....
                      Attached Files
                      HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

                      Plug-Ins Enabled:
                      Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
                      weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

                      Comment


                        #26
                        I'm trying to get your code to run but I keep getting an error:
                        Code:
                        Exception has been thrown by the target of an invocation.
                        Unexpected character encountered while parsing value: E. Path '', line 0, position 0.
                        I'm not sure what is going on here?

                        Comment


                          #27
                          Turns out that I was using the wrong device number, I was using the ID. Once I got a token, I was able to get my device number:

                          https://data.tankutility.com/api/dev...OUR_TOKEN_HERE

                          Jon00 has a device grouping utility so that all the fields can be grouped in one logical container

                          Comment


                            #28
                            Originally posted by wpiman View Post
                            Interesting. I will post the one I wrote. I assumed the device and token won't change-- so mine makes the one JSON call to tank utility, but you have to get your token and device number.

                            The line below would need to be updated....

                            'Change 012345 with your device number
                            'Chance abcdef.ghijkl.mnop-qrst-uvwyz with your token
                            Dim Query As String = hs.GETURL("https://data.tankutility.com/api/devices/012345?token=abcdef.mnop.qrst-uvwyz","",False,80)

                            The procedure here would need to be followed to obtain the token and the device number...

                            http://apidocs.tankutility.com/#introduction

                            Mine will create the devices at the Room and device Letter..

                            It will also show you how much is in the tank and how many days you can expect to last using the same amount as the previous day... I will probably change that to use a moving average.

                            I posted a picture of the devices in the room it creates...

                            I'll have to try to load this other script....

                            Nice work !

                            Z

                            Comment


                              #29
                              Wow I'm stoked this thread exists. We're changing propane providers in a couple weeks and I plan on using TankUtility. Nice to see some of you pioneers already went and did the hard work.

                              Comment


                                #30
                                I've been following this thread with keen interest also. I have a class A rv with a 32 gallon propane tank and I would like to adapt your work to it. Thanks!

                                Comment

                                Working...
                                X