RFXCOM Power, Water and Gas data collection tool

Forum regarding Windows Software and Home Automation Domotica.

RFXCOM Power, Water and Gas data collection tool

Postby Digit » Sun Nov 18, 2007 9:45 pm

Hi all,

I'm thinking of making a data collection tool by means of RFXCOM products, specifically aimed at collecting data for Power, Water and Gas usage.
Well, i already decided to make this tool anyway, but i think this tool could be of interest to more than just those who it's being made for initially.
So, based on the response i get on this topic, maybe i'll add extra 'features' to it make it useable to a larger userbase. So, if you're interested, just reply here.

The tool is planned to be able to do the following:

- Receiving data coming from RFXPower/RFXMeter either by TCP/IP or COMport;
- Storing the measured values in several common formats (CSV, MS SQL Server (MSDE), Access, PCX)

For now, this tool is aimed at users who have a Windows PC running 24/7.

Although this looks very limited, i get the impression more than once that even this is too big of a step for those not familiar with programming, or just don't want to buy software for a complete Home Automation solution, while all that's needed is collecting Power, Water and Gas data...

So, anyone interested? Any questions? (small) Wish-list? Just let me know. My own HA-application has just been started to set a new up-time record, so i have some time the next few weeks...ehhmm..[:D]

Robert.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

RFXCOM Power, Water and Gas data collection tool

Postby Niknik » Mon Nov 19, 2007 7:00 pm

I'm interested! :)
I'm still using a "hacked" version of RFXcom that logs the data to a MySQL DB.
(And then have a "client" program that shows the data from the DB into graphic format)
Niknik
Member
Member
 
Posts: 255
Joined: April 2006
Location: Portugal

RFXCOM Power, Water and Gas data collection tool

Postby Digit » Mon Jan 14, 2008 11:57 pm

It has been quiet for some time due to all kinds of other things that have kept me busy, but here's a little update.

Currently in the process of testing/evaluating version 0.9 at 1 site.
Supports TCPIP or serial communication in combination with MSSQL 2000/2005. MSDE should work also.

Any option or enhancement can be developed on demand.

Image

Image
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

RFXCOM Power, Water and Gas data collection tool

Postby Niknik » Tue Jan 15, 2008 9:50 am

Does the MS SQL 2000 mode work with MySQL DBs?
Niknik
Member
Member
 
Posts: 255
Joined: April 2006
Location: Portugal

RFXCOM Power, Water and Gas data collection tool

Postby Digit » Tue Jan 15, 2008 10:11 pm

Currently not. I'll need MySQL drivers i guess. I do have a MySQL server up and running here somewhere, but never done anything with it myself. But shouldn't be to hard, only thing is i don't know if EXISTS works the same in MSSQL and MySQL. I'll look into that.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

RFXCOM Power, Water and Gas data collection tool

Postby proohu01 » Tue Feb 24, 2009 9:43 pm

Hello Digit,

I was wondering if the program you were developing is availible for download?

I bought mij own set of rfxcom hardware so I can start monitoring gas, water and energy usage.

The things I want to do, and the way I want it to work, seem to be to difficult for myself right now. You could say I am stuck. I went for the xpl-perl (xpl-rfxcom) version and wanted to inject the results from that to MySQL. From there, I want Cacti (great software for creating <u>any</u> graphs) to get the information from MySQL and create nice graphs from it.

I managed to get xpl-rfxcom working but I have not mastered the injecting into MySQL part. Too bad!

I had a look at a lot of topics in this forum and did not get it working yet. I feel that a couple of toppics might be outdated...?

Anyway, any help from anybody is much appreciated.

I am using:
SLES 10, Apache, PHP5, Perl, MySQL, RFXcom, xpl-rfxcom, Cacti....

.....but I am willing to give it a try on Windows so if you've got that software you were talking about ;-)

Hugo
proohu01
Starting Member
Starting Member
 
Posts: 7
Joined: February 2009
Location: Netherlands

RFXCOM Power, Water and Gas data collection tool

Postby Digit » Wed Feb 25, 2009 1:17 am

Hi Hugo,

It's still around somewhere on my disk :-)
I haven't done much work on this lately, other then trying to convert it to a service running on Windows a few weeks ago, which left me with a memory leak that i haven't been able to solve yet. MySQL is something i have to look into in the near future. Or maybe some other forum members can help you getting the MySQL part working in combination with xpl-rfxcom? Maybe that would be better, considering what you're using. Either way, give me some time (talking about 2-3 weeks) and i'll get back to you.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

RFXCOM Power, Water and Gas data collection tool

Postby proohu01 » Wed Feb 25, 2009 9:51 am

Thnx for the reply!

I will keep trying in Linux than.
proohu01
Starting Member
Starting Member
 
Posts: 7
Joined: February 2009
Location: Netherlands

RFXCOM Power, Water and Gas data collection tool

Postby ddgiel » Wed Feb 25, 2009 10:22 pm

I'm interested too! :)
I would prefer on Linux if possible, otherwise a virtual machine can be a solution. Data collecting can be done on Windows while MySQL can run under Linux.
ddgiel
Starting Member
Starting Member
 
Posts: 25
Joined: December 2008
Location: Belgium

RFXCOM Power, Water and Gas data collection tool

Postby lapa78 » Fri Dec 11, 2009 11:44 am

Hi did you finished your tool for data collection under the windows.
lapa78
Starting Member
Starting Member
 
Posts: 2
Joined: December 2009
Location: Poland

RFXCOM Power, Water and Gas data collection tool

Postby Digit » Sat Dec 12, 2009 10:48 pm

Nope...
Although the start of this topic is only 2 years ago, to me it seems like much longer ago; and a lot has changed since then, one of those things is having less time to work on this. Sorry, but that's just the way it is. And there are alternative ways to accomplish the same, so...

<hr noshade size="1"><font size="1">Robert
http://www.hekkers.net <i>Digit's Online Home.</i></font id="size1">
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

RFXCOM Power, Water and Gas data collection tool

Postby Niknik » Sun Dec 13, 2009 3:18 pm

Just curious, what setup (software) are you currently using? :)

I've inquired Google to know if they plan to open their PowerMeter for private use... they say they'll eventually do it, but can't say "when".

So, I'm still stuck using my own custom software, but I'd prefer using an open-source solution with continued support, more features, etc.
Niknik
Member
Member
 
Posts: 255
Joined: April 2006
Location: Portugal

RFXCOM Power, Water and Gas data collection tool

Postby lapa78 » Sun Dec 13, 2009 5:24 pm

Can you share a little bit of your custom software, becouse pay for rfxcom vb.net is not fair for me. I bought hardware and also I have to pay for software 38 euro. I need only put data in mysql thats All. please :-(.
lapa78
Starting Member
Starting Member
 
Posts: 2
Joined: December 2009
Location: Poland

Re: RFXCOM Power, Water and Gas data collection tool

Postby Digit » Sat Dec 19, 2009 11:19 pm

Hmm, i seem to be missing posts... sorry for the late response.

@niknik:
All software for operating my domotica system is made by myself, from RFXCOM/PLCBUS to Touch screen.
Read more here: http://www.hekkers.net/domotica/DomoticaSoftware.aspx

@lapa78:
The RFXMeter data format is freely available. If you can't produce your own software based on that, you won't have any benefit from looking at my RFXMeter code, since the database part is not even in there. And parts of the RFXMeter code are mixed with other RFXCOM code based on confidential material. That would mean i would have to start writing new code that i don't use muself. I stopped doing that, unless it concerns a HS Plugin.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Re: RFXCOM Power, Water and Gas data collection tool

Postby b_weijenberg » Sun Dec 20, 2009 1:30 pm

The RFXMeter software is open and Dec 4th I have sent the message below, with the RFXMeter decoding part of the RFreceiver program, to Piotr and I've received a read response so I don't understand the message above.
The RFreceiver doesn't write data to a SQL db so if that coding part was needed the RFreceiver source would not give any additional information.

The RFXMeter protocol is open and is described in chapter 11 http://www.rfxcom.com/documents/RFXMeter.pdf
So if this is the only device you like to sample to the sql it must be possible for you to write your decoding program.

Code: Select all
                If recbits = 48 Then 'check if RFXMeter or RFXPower
                    parity = Not ((recbuf(0) >> 4) + (recbuf(0) And &HF) _
                    + (recbuf(1) >> 4) + (recbuf(1) And &HF) _
                    + (recbuf(2) >> 4) + (recbuf(2) And &HF) _
                    + (recbuf(3) >> 4) + (recbuf(3) And &HF) _
                    + (recbuf(4) >> 4) + (recbuf(4) And &HF) _
                    + (recbuf(5) >> 4)) And &HF
                    If (parity = (recbuf(5) And &HF)) And (recbuf(0) + (recbuf(1) Xor &HF) = &HFF) Then
                        processrfxmeter()
                    End If
                End If


    Sub processrfxmeter()
        Dim measured_value As Single

        WriteMessage("           RFXMeter[" & (recbuf(0) * 256 + recbuf(1)).ToString & "]M", False)
        WriteMessage(" RFXMeter addr:" & VB.Right("0" & Hex(recbuf(0)), 2), False)
        WriteMessage(VB.Right("0" & Hex(recbuf(1)), 2), False)
        WriteMessage(" ID:" & Convert.ToString(recbuf(1) + (recbuf(0) * 256)) & " ", False)
        Select Case recbuf(5) And &HF0
            Case &H0
                measured_value = ((recbuf(4) * 65536) + (recbuf(2) * 256) + recbuf(3))
                WriteMessage("RFXMeter: " & Convert.ToString(measured_value), False)
                WriteMessage(";  RFXPower: " & Convert.ToString(measured_value / 100) & " kWh", False)
                WriteMessage(";  RFXPwr-Module: " & Convert.ToString(measured_value / 1000) & " kWh", False)
            Case &H10
                WriteMessage("Interval: ", False)
                Select Case recbuf(2)
                    Case &H1
                        WriteMessage("30 sec.", False)
                    Case &H2
                        WriteMessage("1 min.", False)
                    Case &H4
                        WriteMessage("6 (old=5) min.", False)
                    Case &H8
                        WriteMessage("12 (old=10) min.", False)
                    Case &H10
                        WriteMessage("15 min.", False)
                    Case &H20
                        WriteMessage("30 min.", False)
                    Case &H40
                        WriteMessage("45 min.", False)
                    Case &H80
                        WriteMessage("60 min.", False)
                    Case Else
                        WriteMessage("illegal value", False)
                End Select
            Case &H20
                Select Case (recbuf(4) And &HC0)
                    Case &H0
                        WriteMessage("Input-0 ", False)
                    Case &H40
                        WriteMessage("Input-1 ", False)
                    Case &H80
                        WriteMessage("Input-2 ", False)
                    Case Else
                        WriteMessage("Error, unknown input ", False)
                End Select
                measured_value = (((recbuf(4) And &H3F) * 65536) + (recbuf(2) * 256) + recbuf(3)) / 1000
                WriteMessage("Calibration: " & Convert.ToString(measured_value) & "msec ", False)
                If measured_value <> 0 Then
                    WriteMessage("RFXPower= " & Convert.ToString(Round(1 / ((16 * measured_value) / (3600000 / 100)), 3)) & "kW", False)
                    WriteMessage(" RFXPwr= " & Convert.ToString(Round(1 / ((16 * measured_value) / (3600000 / 62.5)), 3)) & "|" & Convert.ToString(Round((1 / ((16 * measured_value) / (3600000 / 62.5))) * 1.917, 3)) & "kW", False)
                End If
            Case &H30
                WriteMessage("New address set", False)
            Case &H40
                Select Case (recbuf(4) And &HC0)
                    Case &H0
                        WriteMessage("Counter for Input-0 will be set to zero within 5 seconds OR push MODE button for next command.", False)
                    Case &H40
                        WriteMessage("Counter for Input-1 will be set to zero within 5 seconds OR push MODE button for next command.", False)
                    Case &H80
                        WriteMessage("Counter for Input-2 will be set to zero within 5 seconds OR push MODE button for next command.", False)
                    Case Else
                        WriteMessage("Error, unknown input ", False)
                End Select
            Case &H50
                WriteMessage("Push MODE push button within 5 seconds to increment the 1st digit.", False)
                measured_value = (recbuf(2) >> 4) * 100000 + (recbuf(2) And &HF) * 10000 + (recbuf(3) >> 4) _
                * 1000 + (recbuf(3) And &HF) * 100 + (recbuf(4) >> 4) * 10 + (recbuf(4) And &HF)
                WriteMessage("Counter value = " & VB.Right("00000" & Convert.ToString(measured_value), 6), False)
            Case &H60
                WriteMessage("Push MODE push button within 5 seconds to increment the 2nd digit.", False)
                measured_value = (recbuf(2) >> 4) * 100000 + (recbuf(2) And &HF) * 10000 + (recbuf(3) >> 4) _
                * 1000 + (recbuf(3) And &HF) * 100 + (recbuf(4) >> 4) * 10 + (recbuf(4) And &HF)
                WriteMessage("Counter value = " & VB.Right("00000" & Convert.ToString(measured_value), 6), False)
            Case &H70
                WriteMessage("Push MODE push button within 5 seconds to increment the 3rd digit.", False)
                measured_value = (recbuf(2) >> 4) * 100000 + (recbuf(2) And &HF) * 10000 + (recbuf(3) >> 4) _
                * 1000 + (recbuf(3) And &HF) * 100 + (recbuf(4) >> 4) * 10 + (recbuf(4) And &HF)
                WriteMessage("Counter value = " & VB.Right("00000" & Convert.ToString(measured_value), 6), False)
            Case &H80
                WriteMessage("Push MODE push button within 5 seconds to increment the 4th digit.", False)
                measured_value = (recbuf(2) >> 4) * 100000 + (recbuf(2) And &HF) * 10000 + (recbuf(3) >> 4) _
                * 1000 + (recbuf(3) And &HF) * 100 + (recbuf(4) >> 4) * 10 + (recbuf(4) And &HF)
                WriteMessage("Counter value = " & VB.Right("00000" & Convert.ToString(measured_value), 6), False)
            Case &H90
                WriteMessage("Push MODE push button within 5 seconds to increment the 5th digit.", False)
                measured_value = (recbuf(2) >> 4) * 100000 + (recbuf(2) And &HF) * 10000 + (recbuf(3) >> 4) _
                * 1000 + (recbuf(3) And &HF) * 100 + (recbuf(4) >> 4) * 10 + (recbuf(4) And &HF)
                WriteMessage("Counter value = " & VB.Right("00000" & Convert.ToString(measured_value), 6), False)
            Case &HA0
                WriteMessage("Push MODE push button within 5 seconds to increment the 6th digit.", False)
                measured_value = (recbuf(2) >> 4) * 100000 + (recbuf(2) And &HF) * 10000 + (recbuf(3) >> 4) _
                * 1000 + (recbuf(3) And &HF) * 100 + (recbuf(4) >> 4) * 10 + (recbuf(4) And &HF)
                WriteMessage("Counter value = " & VB.Right("00000" & Convert.ToString(measured_value), 6), False)
            Case &HB0
                Select Case recbuf(4)
                    Case &H0
                        WriteMessage("Counter for Input-0 reset to zero.", False)
                    Case &H40
                        WriteMessage("Counter for Input-1 reset to zero.", False)
                    Case &H80
                        WriteMessage("Counter for Input-2 reset to zero.", False)
                    Case Else
                        WriteMessage("protocol error.", False)
                End Select
            Case &HC0
                WriteMessage("Enter SET INTERVAL RATE mode within 5 seconds OR push MODE button for next command.", False)
            Case &HD0
                Select Case (recbuf(4) And &HC0)
                    Case &H0
                        WriteMessage("Enter CALIBRATION mode for Input-0 within 5 seconds OR push MODE button for next command.", False)
                    Case &H40
                        WriteMessage("Enter CALIBRATION mode for Input-1 within 5 seconds OR push MODE button for next command.", False)
                    Case &H80
                        WriteMessage("Enter CALIBRATION mode for Input-2 within 5 seconds OR push MODE button for next command.", False)
                    Case Else
                        WriteMessage("Error, unknown input ", False)
                End Select
            Case &HE0
                WriteMessage("Enter SET ADDRESS mode within 5 seconds OR push MODE button for next command.", False)
            Case &HF0
                If recbuf(2) < &H40 Then
                    WriteMessage("RFXPower Identification,", False)
                ElseIf recbuf(2) < &H80 Then
                    WriteMessage("RFXWater Identification,", False)
                ElseIf recbuf(2) < &HC0 Then
                    WriteMessage("RFXGas Identification,", False)
                Else
                    WriteMessage("RFXMeter Identification,", False)
                End If
                WriteMessage(" Firmware Version: " & VB.Right("0" & Hex(recbuf(2)), 2), False)
                WriteMessage(", Interval rate: ", False)
                Select Case recbuf(3)
                    Case &H1
                        WriteMessage("30 seconds", False)
                    Case &H2
                        WriteMessage("1 minute", False)
                    Case &H4
                        WriteMessage("6 minutes", False)
                    Case &H8
                        WriteMessage("12 minutes", False)
                    Case &H10
                        WriteMessage("15 minutes", False)
                    Case &H20
                        WriteMessage("30 minutes", False)
                    Case &H40
                        WriteMessage("45 minutes", False)
                    Case &H80
                        WriteMessage("60 minutes", False)
                    Case Else
                        WriteMessage("illegal value", False)
                End Select
            Case Else
                WriteMessage("illegal packet type", False)
        End Select
    End Sub


Bert
User avatar
b_weijenberg
Forum Moderator
Forum Moderator
 
Posts: 1731
Joined: May 2006
Location: Netherlands

Next

Return to Windows Forum

Who is online

Users browsing this forum: No registered users and 1 guest