Announcement

Collapse
No announcement yet.

Getting Power Info into Homeseer for not much money/free

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

    Getting Power Info into Homeseer for not much money/free

    All,

    I did a search and could'nt find anyone else thats done this so I thought I would share my idea and solution to you all in case anyone else would like a relatively quick, simple and cheap way of getting power info into homeseer, I've put this into the UK forum as the device I am using is generally sold in the UK but could probably be used in other countries.

    1) Get a Current Cost power meter (http://www.currentcost.co.uk/), my electricity company (Southern Electric) sent mine to me for free. Nice little devices, the clamp meter with radio transmitter attaches to the incoming power cables in the meter box. It then sends the info to the receiver in the house which displays current wattage, indoor temperature, cost for the day, total KWh for the month etc. You can buy them from here https://www.ecogadgetshop.co.uk/default.aspxhttp://www.flickr.com/photos/pixelfrenzy/2499443217/ for a guide on how to build the cable. NOTE: You might need to build a 3.3v - 5v converter to convert the signal into RS232 levels, you can do this with a MAX232/202 chip, a few capacitors and a power supply. If your current cost just inputs rubbish characters check your port settings, if they are correct chances are you will need to build the small circuit.

    3) Check with HyperTerminal to see that the device inputs the data correctly, port settings are 2400, N, 8, 1. Some models are 9600 baud so also check that. It should give you a string of XML characters every seven seconds or so.

    4) This is where the programming starts, I am not a programmer really but managed to work my way around this. I wrote a small VB6 program (I will share my code if you do want, if you don't laugh at it) that when data is received on the comm port it checks that I have the correct string starting with <MSG>. If I have that string then once I have the full string I stop, parse the XML data (currently I just read the Wattage and Temperature), write the data to an INI file saved in the homeseer config folder. I set the data to sample every three minutes and rewrite the INI file.

    5) Read the data in to Homeseer using a script that grabs the INI settings on a re-occuring event every 3 minutes. It then updates some virtual device strings I set up, what you want to do from there is up to you. I also calculate estimated total current draw by dividing the Wattage by 230volts. I also generate a four line text file from the script which then sends the information to MRTG (http://oss.oetiker.ch/mrtg/index.en.html
    Last edited by mrhappy; February 2, 2010, 03:30 PM. Reason: ...

    #2
    Thanks for the post MrHappy, sounds promising.

    I wonder if we can get our hands on more information on the interface to the device as at appears to have the capability to store upto 4 years of data, as they say "With the optional serial cable attached to the Current Cost display you can view historic data (up to 4 years) and view energy usage as it happens." It sounds like you can make requests to it for data then via the serial port.

    (Also found this in the FAQ "Software is being developed which will allow you to interrogate historic data, via your PC. You can view usage on the monitor for up to three months (90 days)"

    If this is the case, maybe retrieving the data once per day would be sufficient and reduce the overhead on the HomeSeer PC?

    Do you know what the range to the receiver is?

    Thanks.

    Comment


      #3
      FYI, I have just sent an email (currentcost) to them asking if they are willing to share information on the interface/protocol of the serial port (no harm in asking!) and informing them of interest from "Home Automaters".

      I will post back with the response.

      John

      Comment


        #4
        me again!...

        Just reading the FAQ some more and it states that the range is 30m in clear air, so walls/etc will affect this, so ignore my previous question.

        Comment


          #5
          I have already had a reply from Currentcost, so at least they are responsive.

          They informed me that their technical engineer is on holiday this week but has been asked to reply next week.

          John

          Comment


            #6
            Originally posted by TeleFragger
            while working with them... see if they have or in works on a us model... my house is the typical 2 phase... 240v setup.... so looks like i would need 2 of those.. but not sure how one would combine them.....
            Found this on their website FAQ:
            "Can I use it on my three phase supply?

            Yes, the Current Cost product will allow for up to three clamps, the total usage is displayed on the monitor, but can be viewed individually on a PC."

            Comment


              #7
              Did'nt quite expect anyone to actual use this so i'm impressed.

              Telefragger, Yeah it will work on three phase setups (or indeed if you wanted the read three different circuits/appliances), all you would need is three clamp meters and one receiver. Once you pair the meters with the receiver it populates the XML string with the wattage reading from all of them that are connected. I can't see a problem with it working on 120v/240v in any country or on any voltage, if I remember my Physics lessons correctly, doesent it all depend on cross sectional magnetic fields and not voltage?

              Jimbob, I've had it working through several brick walls and never lost any data. 30m sounds about right but I spose you could put the receiver somewhere hidden if you wanted and then run a longer network cable to your PC if you had an RS232 signal amplifier.

              The newer 9600 baud devices are the ones which store 4yrs worth of data and output it all in the string. I'm stuck with an older 2400 baud (well I can't complain for free really) model which only outputs current readings and nothing historic.

              There is some guidance re the XML output here (http://cumbers.wordpress.com/2008/05...st-xml-output/) but just to give you an idea, I get the following out of mine;

              < msg >< date >< dsb >00080< /dsb >< hr >13< /hr >< min >04< /min >< sec >07< /sec >< /date >< src >< nam
              e >CC02< /name >< id >01258< /id >< type >1< /type >< /src >< ch1 >< watts >02258< /watts >< /ch1 >< c
              h2 >< watts >00000< /watts >< /ch2 >< ch3 >< watts >00000< /watts >< /ch3 >< tmpr >22.1< /tmpr >< /m
              sg >

              (i've had to put spaces in the code above because the board keeps trying to parse it)

              Which is relatively self explanatory, time sampled, radio ID, the three wattage outputs and the temperature. It then repeats the output and gives new values every 7 seconds.

              And Gogs, yep i'm still on HS1.6 - i'd love to use HS2 but I don't have the money at the minute, i'll upgrade when i get richer (probably sometime in 2050) but 1.6 is'nt serving me too badly at the minute. If anyone has any ideas re parsing XML on a script in HS1.6 i'll gladly listen to them!

              Comment


                #8
                Wow, for $54 that's a pretty good deal!

                My only concern, is that not only is the UK on 230V, but I think they are on 50Hz...which if that's the case, these units might be useless. They probably won't read accurately due to aliasing the signals due to WHEN it will read the current from the transformer.

                My question (assuming the above is false), how much is it for extra current sensors (since the unit reads in up to 3??).

                --Dan
                Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                Comment


                  #9
                  Originally posted by drozwood90 View Post

                  My only concern, is that not only is the UK on 230V, but I think they are on 50Hz...which if that's the case, these units might be useless. They probably won't read accurately due to aliasing the signals due to WHEN it will read the current from the transformer.

                  --Dan
                  I believe your statement to be essentially false, since the current needs to be rectified and averaged (optionally Root Mean Square (RMS) averaged) when read, to provide useful readings.

                  Depending on the method used to convert the sinewave signal to RMS values, the frequency may be completely ruled out of the equation or have no significant bearing on the readings; but this remains to be confirmed.

                  Comment


                    #10
                    I presume i'm waiting for my other post to be approved so i'll put this one is aswell, this is the email I got today regarding the new software and data cable;

                    http://news.bbc.co.uk/1/hi/sci/tech/6550361.stm is why they have sent them out free), if either currentcost nor ecogadget shop won't ship to the USA, i'm sure people on here would help at least to see if it worked.



                    Regarding the 4 year historic data, that is only something you get if you get one of the newer 9600 baud models, because I have a slightly older one I only get current readings and then I plot the rest live so to speak, I end up getting monthly/yearly readings on the graphs that MRTG plots. A guide to understanding the XML it outputs is here http://cumbers.wordpress.com/2008/05...st-xml-output/



                    I just get the following out of it in an XML string;



                    < msg >< date >< dsb >00080< /dsb >< hr >13< /hr >< min >04< /min >< sec >07< /sec >< /date >< src >< name >CC02< /name >< id >01258< /id >< type >1< /type >< /src >< ch1 >< watts >02258< /watts >< /ch1 >< c
                    h2 >< watts >00000< /watts >< /ch2 >< ch3 >< watts >00000< /watts >< /ch3 >< tmpr >22.1< /tmpr >< /m
                    sg >



                    (spaces added due to the board trying to parse the string)



                    Most of it is relatively self explanatory, the ch1,2,3 are the clamp meters, I only have one connected so the others read 0, the temperature is measured on the device so mines in my mini Node0 so saves me having to buy some DS1820's. I've had the unit running through two thick brick walls without any issues so 30m sounds about right, although if you had a proper RS232 amp you could no doubt leave the receiver somewhere and just run the cable up to your server.



                    Let me know if i've missed anything....
                    Last edited by mrhappy; July 10, 2008, 09:05 AM.

                    Comment


                      #11
                      I'm impressed, did'nt think that many people would be interested in this one..

                      For whatever reason the post I posted last night dosent want to show up at all even after leaving it for 24hrs.

                      I've not seen anywhere yet that sell the spare clamp meters, you would just need two more clamp meters to connect to one receiver so need to combine them as such, just pair them with the meter. it would then just populate the XML string labelled <ch2> and <ch3>. CurrentCost themselves seem fairly approachable, I would'nt think they would have a problem sending them out at whatever price.

                      Quite as to whether it would work on 120v/60Hz I really don't know, I can't remember my enough of my physics lessons but I never thought voltage came into it, all about magnetic flux is'nt it? I shall try my best to think of something I know that runs on 120/60 and try it out.

                      Re getting them in the USA, you can bet any amount of money hundreds of these devices are sitting in homes up and down the UK either unused or still in their boxes, as I said my electricity company sent me mine for free, I know NPower started sending them out to people free aswell - maybe ebay might be the place to watch? (http://news.bbc.co.uk/1/hi/sci/tech/6550361.stm is why they have sent them out free), if either currentcost nor ecogadget shop won't ship to the USA, i'm sure people on here would help at least to see if it worked.

                      Regarding the 4 year historic data, that is only something you get if you get one of the newer 9600 baud models, because I have a slightly older one I only get current readings and then I plot the rest live so to speak, I end up getting monthly/yearly readings on the graphs that MRTG plots. A guide to understanding the XML it outputs is here http://cumbers.wordpress.com/2008/05...st-xml-output/

                      I just get the following out of it in an XML string;

                      < msg >< date >< dsb >00080< /dsb >< hr >13< /hr >< min >04< /min >< sec >07< /sec >< /date >< src >< name >CC02< /name >< id >01258< /id >< type >1< /type >< /src >< ch1 >< watts >02258< /watts >< /ch1 >< c
                      h2 >< watts >00000< /watts >< /ch2 >< ch3 >< watts >00000< /watts >< /ch3 >< tmpr >22.1< /tmpr >< /m
                      sg >

                      (spaces added due to the board trying to parse the string)

                      Most of it is relatively self explanatory, the ch1,2,3 are the clamp meters, I only have one connected so the others read 0, the temperature is measured on the device so mines in my mini Node0 so saves me having to buy some DS1820's. I've had the unit running through two thick brick walls without any issues so 30m sounds about right, although if you had a proper RS232 amp you could no doubt leave the receiver somewhere and just run the cable up to your server.

                      Let me know if i've missed anything...

                      Comment


                        #12
                        I am still awaiting a reply from their Lead Technical Engineer next week but I have received a lengthy reply, the salient points of which I have extracted below:
                        • Our policy has been to try to keep the cost of our monitor down to a minimum by selling direct to the utility companies with a view to persuading them to make the monitor available to customers free of charge on demand. This is in line with the government's Energy White Paper which, until recently, intended to persuade utility companies to do exactly that, so it has been a waiting game to see if the government will do what it said it would do. Clearly it has backpedalled in allowing the utilities to choose whether to make monitors available free of charge on demand or not.
                        • If you really want a monitor free right now, Scottish and Southern Energy have a promotion called Better Plan in which, if you sign up, you will be will sent a Current Cost Monitor (albeit with SSE logos on it) free of charge!
                        • Links for free monitors: http://www.southern-electric.co.uk/F...etterplan.aspx

                          http://www.hydro.co.uk/ForYourHome/E...etterplan.aspx

                          http://www.swalec.co.uk/ForYourHome/...etterplan.aspx


                        Whilst composing this post, I have received email notification of a post by Mrhappy (although doesn't appear onthe forum yet?) saying that he received an email reply from them stating that their software, when ready, can be downloaded for free. This sounds good. They may well publish the protocol for the serial port. Even if not, when the software is released it would be easy to capture the serial port traffic to reverse-engineer what is required to get at the historic data.

                        John

                        Comment


                          #13
                          ---------------------------------------------------http://weather.penicuik.org

                          Comment


                            #14
                            http://mashed08.backnetwork.com/feed...spx?postid=555
                            ---------------------------------------------------http://weather.penicuik.org

                            Comment


                              #15
                              http://cumbers.wordpress.com/2008/05...st-xml-output/


                              http://e.inste.in/2008/06/15/interfa...er-to-your-pc/


                              http://dalelane.co.uk/blog/?p=281
                              ---------------------------------------------------http://weather.penicuik.org

                              Comment

                              Working...
                              X