Announcement

Collapse
No announcement yet.

the Current Cost plug-in is available here

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

  • the Current Cost plug-in is available here

    You can install the plug-in from the HomeSeer updater, so please run that to get the latest version.

    This post is updated as of release 1.0.0.31.


    This is version 1.0.0.31

    Features:

    * HomeSeer devices are created that monitor key energy stats. Stats are updated once every 6 seconds.
    * A graphs page is available with various graphs such as current day usage, today vs yesterday, and this month vs last month.
    * Graphs may be displayed in HSTouch (see the config link on the interfaces page for help information).

    Changes in 1.0.0.31:
    History logging was inadvertently turned off in 1.0.0.30 - this release fixes that.

    Changes in 1.0.0.30:

    If you used a previous beta version of the plug-in, please note that there is a one-time conversion of your existing history data to the new database format - this is a VERY time consuming process (depending upon PC hardware) that WILL delay the startup of your HomeSeer system the first time this new version is run. Please plan accordingly!!

    * THESE CHANGES ARE NOT ALL DOCUMENTED YET
    * REDO your rate configuration if you used any of the previous beta versions! New Rate capabilities include now having named rate tables containing rates for all 24 hours for all days of the week. Rate tables can have ranges of rate values inserted allowing you to create a new table with a default value, and then edit specific ranges to create a final table with all of the rates desired.
    * Actions now allow an over-ride rate to be set and enabled, disabled, or for the current rate table to be used to be set.
    * All Sensors now have their own set of devices tracking usage and cost information. If there are "Sensors To Add" to total in use, then another set of devices reflecting the total will be created as well. Each set of devices for each sensor and the total are placed in their own HomeSeer location.
    * All built-in graphs have been updated to reflect the true total if there are "Sensors To Add" configured.
    * All sensors now display the individual channel (CT) data as well as the total.
    * History is now logged to an SQLite database, including the rate in effect at the time the history value was logged.
    * When requesting the History graphs, add: ?sensor=# to the end of the URL, where # is the number of a specific sensor (0 to 9) to get the data for just that sensor. Default for all history graphs is now to specify "sensor=10" which means "Total", and automatically sums sensor 0 with any sensors configured as "Sensors To Add"
    * Display unit time is now used when logging sensor data and is shown in its own device, so you can see at what time the data was last updated from.
    * Sensor ID number is now displayed in a device so you can match sensors installed to their data reading.

    The devices created in the test releases prior to 1.0.0.30 should be deleted as they are no longer used. The new devices created in 1.0.0.30 or later have many the same names, but these new devices can be renamed or moved, and the plug-in will still find them for updating.
    Last edited by Rick Tinker; July 21, 2010, 11:14 PM.
    website | buy now | support | youtube

  • #2
    Really Nice, does it need any special hardware or could it read HS units that's already counts every watts from 1wire?
    Please excuse any spelling and grammatical errors I may make.
    --
    Tasker Plugin / Speech Droid
    Tonlof | Sweden

    Comment


    • #3
      Actually, you might be able to use it for other hardware, I will make a change that will allow it to continue to update if the comport is 0. Also, I will add an API call that will allow you to log the data. You can also log the data yourself (if you need to do it from a seperate app or plugin). Just append data to the currentcosthistory.txt file in the HS config folder, add a line like:

      6/19/2010 5:10:12 PM,0,5712

      The format is:

      Date Time,sensor,watts

      Originally posted by tonlof View Post
      Really Nice, does it need any special hardware or could it read HS units that's already counts every watts from 1wire?
      website | buy now | support | youtube

      Comment


      • #4
        Originally posted by rjh View Post
        Actually, you might be able to use it for other hardware, I will make a change that will allow it to continue to update if the comport is 0. Also, I will add an API call that will allow you to log the data. You can also log the data yourself (if you need to do it from a seperate app or plugin). Just append data to the currentcosthistory.txt file in the HS config folder, add a line like:

        6/19/2010 5:10:12 PM,0,5712

        The format is:

        Date Time,sensor,watts
        Thanks, I now running it in my application
        hs.RunEx "Current_Cost.vb", "Main","now|0|" & watt
        PHP Code:
            Public Sub Main(ByVal Parms As Object)
                
        Dim str_Time As String hs.StringItem(Parms.ToString1"|")
                
        Dim str_Unit As String hs.StringItem(Parms.ToString2"|")
                
        Dim str_Watt As String hs.StringItem(Parms.ToString3"|")
                If 
        LCase(str_Time.Trim) = "now" Then str_Time Now()
                
        Dim CC As IO.TextWriter
                CC 
        IO.File.AppendText(hs.GetAppPath "\config\currentcosthistory.txt")
                
        CC.WriteLine(str_Time "," str_Unit "," str_Watt)
                
        CC.Flush()
                
        CC.Close()
            
        End Sub 
        Please excuse any spelling and grammatical errors I may make.
        --
        Tasker Plugin / Speech Droid
        Tonlof | Sweden

        Comment


        • #5
          Current Cost Classic Monitor

          I have the plugin and a Classic monitor installed but I am not receiving any data.
          The Classic runs at 2400 baud, does the plugin support this?
          thanks
          JWW

          Comment


          • #6
            The Com port has to be greater than 0 or HS will not init the plugin. So set it to 1 even if you are using your own data.

            As you found out, you really need to call the API to add data otherwise the HS devices will not update.

            Right now the plugin opens the com port at 9600, I'll have to add an option for 2400.

            The date formats are hard coded right now for the US format, I'll see if I can just use the format as set in the PC.
            website | buy now | support | youtube

            Comment


            • #7
              Graphs don't work on iphone

              The graphs from the Current Cost plugin (as suggested on the interfaces tab) work on the windows client, both in the designer and the client (where I test before deploying to the iphone).

              However, when deployed to the iphone, I don't get the graphs. I get a url that begins:

              http://chart.apis.google.com/chart? followed by the actual data.

              Can we expect the charts to ever work on the iphone?

              Thanks,

              Comment


              • #8
                To get the graphs working you need designer 1.0.0.44 (just run your designer to get the update), and the latest Server plugin 1.0.0.21 which is here:

                ftp://ftp.homeseer.com/pub/HomeSeerP...h_1_0_0_21.msi

                You then need the version 1.11 of the iphone client.
                website | buy now | support | youtube

                Comment


                • #9
                  It's nice to see finally this unit being supported via a plugin, I know it's early days but as an early adopter, I would like to make a request...

                  I'm running 6 mini transmitters in addition to the main transmitter, could I request graphing for all sensors, as with Adams excellent script inc. yearly & weekly.

                  I have found that monitoring and tracking the sub circuits a lot more useful than the overall house consumption, and as such control of appliances / circuits would be more intelligent.

                  Steve
                  Last edited by stevepyle; July 3, 2010, 11:18 AM.

                  Comment


                  • #10
                    API update issue with immediate script

                    Hi Rich,

                    I get the following in my HSlog for HSPRo 2.4.0.46 when I call the API for the current cost plugin.

                    In this case I am updateing every 30 seconds by calling with a HS device code parameter which represents the current in amps (from a cent-a-meter)and multiplying by 240V.

                    No matter what interval I use for the event (30 secs in this example) every second call to the API has a script init error. I don't know if that value is entered or not.

                    Also, several times a day the plugin "loses" the cost/kwh value (in my case 0-23hrs at .19945 AUD) and all the plugin devices relying on it show 000 as the value. Graphing still seems to continue ok. If I look in the interface orange config button my rate1 does not display. If I look in currentcost.ini myrate is still in the file. If I disable and re-enable the plugin the rate does not return. If I restart HSpro then the rate DOES return and all works again for a while.

                    Hope you can assist with these two issues. I seem to have a few with the CC plugin right now. It is going to prove useful, thanks for the continued effort.

                    Regards,
                    Phil

                    9/07/2010 11:57:19 PM - Elk-M1 Probe - Probe Temp $ 5=29
                    9/07/2010 11:57:30 PM - Event - Event Trigger "CC-Manual Update"
                    9/07/2010 11:57:30 PM - Event - Running script statement immediately: &hs.plugin("Current Cost").UpdateSensor 0, (hs.DeviceValue("_14")*240)
                    9/07/2010 11:57:44 PM - Event - Event Trigger "Power - 3 Phase updater"
                    9/07/2010 11:57:44 PM - Event - Running script in background: PAK_electrisave.vb
                    9/07/2010 11:58:00 PM - Event - Event Trigger "CC-Manual Update"
                    9/07/2010 11:58:00 PM - Event - Running script statement immediately: &hs.plugin("Current Cost").UpdateSensor 0, (hs.DeviceValue("_14")*240)
                    9/07/2010 11:58:00 PM - Error - Running script, init error: Syntax error
                    9/07/2010 11:58:00 PM - Event - Event Trigger "x-EBAY - Auction Sentry Alert Updater"
                    9/07/2010 11:58:00 PM - Event - Running script in background: PAK-ebayalert.vb("main","normal")

                    Comment


                    • #11
                      I had to buy a second transmitter because I have two panels in my home. How do I view usage from the second panel?

                      Also Is there a way to sum the usage of of both so that I can see the actual usage that I am using?

                      Comment


                      • #12
                        Originally posted by hgupta View Post
                        I had to buy a second transmitter because I have two panels in my home. How do I view usage from the second panel?

                        Also Is there a way to sum the usage of of both so that I can see the actual usage that I am using?
                        Have you loaded the latest plugin posted today?
                        -Rupp
                        sigpic

                        Comment


                        • #13
                          FYI... If you downloaded the setup installer MSI file for 1.0.0.30 before the time of this post, please do it again - I accidentally removed the line that logs the data to the history database, so you get no history with that version! The file was updated to 1.0.0.31 and fixes this.
                          Regards,

                          Rick Tinker (a.k.a. "Tink")

                          Comment


                          • #14
                            Originally posted by Rick Tinker View Post
                            FYI... If you downloaded the setup installer MSI file for 1.0.0.30 before the time of this post, please do it again - I accidentally removed the line that logs the data to the history database, so you get no history with that version! The file was updated to 1.0.0.31 and fixes this.
                            Thanks Rick, I am using the API update method and was beginning to wonder why the new realtime devices were correct but the graphs did not update.

                            Working very well for me so far using 30 second updates via the API from a HS virtual device which gets amps from a cent-a-meter (three phases summed as received by ACRF2). I multiply this by 240 volts (no measurment of voltage so a fixed number) and feed into CC API.

                            Great work Rich/Rick, many thanks.
                            Phil

                            Comment


                            • #15
                              Several of the devices and most of the graphs would be wrong in .30 because there is no data being logged to retrieve in calculating many of those values. Once you go to .31 it should be OK.

                              Also, I have the plug-in in the updater now, so I will be removing the installer from this thread soon.
                              Regards,

                              Rick Tinker (a.k.a. "Tink")

                              Comment

                              Working...
                              X