Announcement

Collapse
No announcement yet.

Some trouble with current cost!

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

    #16
    Did open the history db. file in sqLite database browser.
    I can see any spikes there :

    Comment


      #17
      Can you run this command (I hope the syntax is correct, I am getting it from another post):

      hs.writelog("", hs.plugin("Current Cost").ChartLastHourUrl(0,500,100))

      and then copy exactly what is printed to the log into this thread please

      Comment


        #18
        Originally posted by mrhappy View Post
        If you go to the Current Cost website there is an application called C2 terminal that you can use for this.
        Im testing that now, so far it seems ok.
        Gonna post the results here.

        I use Optismart for my envir, should that cause any problem?

        Comment


          #19
          Originally posted by Mrtiger View Post
          Im testing that now, so far it seems ok.
          Gonna post the results here.

          I use Optismart for my envir, should that cause any problem?
          The optismart sensor should link two channels to your meter, one is a data channel and has a pulse count on it and the other is a psuedo channel in the same format as the conventional current clamps. This last channel should be in the same format and present itself to the plugin the same, from looking at your database the data is being stored correctly and even with the . as a data seperator. If the data is storing in the monthly cost history table correctly then I would not think it is a problem with the data, more a problem with the charting.

          Comment


            #20
            Originally posted by mrhappy View Post
            Can you run this command (I hope the syntax is correct, I am getting it from another post):

            hs.writelog("", hs.plugin("Current Cost").ChartLastHourUrl(0,500,100))

            and then copy exactly what is printed to the log into this thread please
            This what come up in the log when i run the command:

            08.05.2012 17:39:36 - System - Control Panel Immediate Script: &hs.writelog("", hs.plugin("Current Cost").ChartLastHourUrl(0,500,100))
            08.05.2012 17:39:36 - - http://chart.apis.google.com/chart?c...033&chxl=0:|41| | |43| | |45| | |47| | |49| | |51| | |53| | |55| | |57| | |59| | |1| | |3| | |5| | |7| | |9| | |11| | |13| | |15| | |17| | |19| | |1:|0|1,837|3,675|2:|KWH Last Hour|3:|KWH|&chxp=2,1,837|3,1,837&chdlp=b&chls=2|2&chxs=0,00 0000,11.5,0,lt,676767|1,000000,11.5,0,lt,676767

            Comment


              #21
              If you copy that into your browser you will get the chart showing up incorrectly, whereas if you copy this it will show correctly;

              http://chart.apis.google.com/chart?c...33&chxl=0:|41| | |43| | |45| | |47| | |49| | |51| | |53| | |55| | |57| | |59| | |1| | |3| | |5| | |7| | |9| | |11| | |13| | |15| | |17| | |19| | |1:|0|1,837|3,675|2:|KWH Last Hour|3:|KWH|&chxp=2,1.837|3,1.837&chdlp=b&chls=2|2&chxs=0,00 0000,11.5,0,lt,676767|1,000000,11.5,0,lt,676767

              The bug is in the fact you use a comma as a decimal seperator in the &chxp parameter, in your setup it will show as &chxp=2,1,837 whereas it should be &chxp=2,1.837 . When it uses the comma it will cause all sorts of problems as it is a character in the charts API that does other things.

              I imagine it is a similar if not the same problem in all of the other charts, I know I had to use a replace function myself to cope with it and it worked OK.

              I am not sure how you record bugs now, Rupp will need to answer that one.

              Comment


                #22
                Originally posted by mrhappy View Post
                If you copy that into your browser you will get the chart showing up incorrectly, whereas if you copy this it will show correctly;

                http://chart.apis.google.com/chart?c...33&chxl=0:|41| | |43| | |45| | |47| | |49| | |51| | |53| | |55| | |57| | |59| | |1| | |3| | |5| | |7| | |9| | |11| | |13| | |15| | |17| | |19| | |1:|0|1,837|3,675|2:|KWH Last Hour|3:|KWH|&chxp=2,1.837|3,1.837&chdlp=b&chls=2|2&chxs=0,00 0000,11.5,0,lt,676767|1,000000,11.5,0,lt,676767

                The bug is in the fact you use a comma as a decimal seperator in the &chxp parameter, in your setup it will show as &chxp=2,1,837 whereas it should be &chxp=2,1.837 . When it uses the comma it will cause all sorts of problems as it is a character in the charts API that does other things.

                I imagine it is a similar if not the same problem in all of the other charts, I know I had to use a replace function myself to cope with it and it worked OK.

                I am not sure how you record bugs now, Rupp will need to answer that one.
                ok, thank you for the help.

                Did report this for some days ago, but i havent got any answer.
                Then dont answer at mail neder so i dont know what else i can do.

                Comment


                  #23
                  They did answer me now.
                  But, it was not quite the answer I hoped for

                  Comment


                    #24
                    it's ok... for now

                    I don't have a envi device but i use the plugin tot keep track of my energy usage of my kamstrup smart meter (reading a p1 port). I make use of this line to capture data to the currentcost database.
                    &hs.plugin("Current Cost").UpdateSensor 1,(hs.DeviceValue("r8")).

                    I think that the problem is caused bij too many entries in the database while the device r8, is updated every 10 seconds by the kamstrup electricity meter, and not every minute. I renamed the database and scheduled the task once every minute and the graph looks ok for now... hope it still does tomorrow...

                    Comment


                      #25
                      Guys,
                      Try this version and see if it helps. If not report the issue here:
                      http://board.homeseer.com/showthread.php?t=154075
                      -Rupp
                      sigpic

                      Comment


                        #26
                        Originally posted by Rupp View Post
                        Guys,
                        Try this version and see if it helps. If not report the issue here:
                        http://board.homeseer.com/showthread.php?t=154075
                        Gonna try that version when i come home from job.
                        But, i did make the plugin too work yesterday.
                        What i did was change (,) too (.) in my Regional and Language Options.
                        Look at the picture and see what i did, I changed the (,) too(.) for number as well.

                        So, i think the problem is somthing withe the (,) and (.)

                        As i said i gonna switch back to (,) and see if the new version works better.

                        Comment


                          #27
                          Originally posted by Rupp View Post
                          Guys,
                          Try this version and see if it helps. If not report the issue here:
                          http://board.homeseer.com/showthread.php?t=154075
                          that version did not help me.
                          It dont update the last hour graf and the today VS yesterday graf yust go crazy...As the picture earlier.

                          Comment


                            #28
                            Crap, now is my cumulus plugin f..k`t up too, because i changed , and .

                            Comment


                              #29
                              I did get a answer from the helpdesk again today.
                              They did say this:

                              " Looks like the charts will not work for you then as we use Google charting:
                              http://chart.apis.google.com/chart

                              The values we pass are seperated by commas, and since your numbers use commas, it messes up the formatting."


                              Does that mean that they can`t fix it?
                              MrHappy you use google charting in some of your plugin and they works for me...

                              Comment


                                #30
                                Originally posted by Mrtiger View Post
                                I did get a answer from the helpdesk again today.
                                They did say this:

                                " Looks like the charts will not work for you then as we use Google charting:
                                http://chart.apis.google.com/chart

                                The values we pass are seperated by commas, and since your numbers use commas, it messes up the formatting."


                                Does that mean that they can`t fix it?
                                MrHappy you use google charting in some of your plugin and they works for me...
                                Yes I do because I test the Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSepa rator setting and then change the charting string based on what this is set to on your PC. I just forgot to fully test it (on my list of things to sort out today)...obviously I can't answer why HS can't fix it but it should be possible.

                                Comment

                                Working...
                                X