Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Dutch Smart meter and S0 meter logging


  • Please log in to reply
14 replies to this topic

#1 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 17 December 2012 - 04:03 PM

On the 16th of December we released the V1.0.1 version of our project.
Posted Image
The project is build around the Netduino Plus (V1) and reads the P1 port on the Dutch Smart meter (electricity and gas), counts pulses on a S0 port for produced power and shows the temperature of the solar panels.


All this is shown in realtime or near realtime on a website. Data can be send to several online data logging services and gets written to the SD card on the Netduino Plus.

Posted Image

 

Posted Image
 

Many kudos to JoopC for coding!

http://p1netduinoplu...ases/view/97554

Any feedback is welcome! Posted Image


  • zonnenbaas likes this

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 17 December 2012 - 11:49 PM

Hi c70070540, This sounds very interesting. Do you have an article about it or blog post where we can see it in action or learn more about it? We've love to share it with others, and show them when you've built! Chris

#3 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 18 December 2012 - 01:09 AM

Hi c70070540,

This sounds very interesting. Do you have an article about it or blog post where we can see it in action or learn more about it? We've love to share it with others, and show them when you've built!

Chris

No blogpost or video but the manual is very extensive.
At http://p1netduino.azurewebsites.net/ you can see it in action.
Next week and the week after that I might write a blogpost somewhere or make a video.

#4 piwi

piwi

    Advanced Member

  • Members
  • PipPipPip
  • 114 posts
  • LocationGermany

Posted 19 December 2012 - 07:56 PM

No blogpost or video but the manual is very extensive.
At http://p1netduino.azurewebsites.net/ you can see it in action.
Next week and the week after that I might write a blogpost somewhere or make a video.


The web site is quit nice .... I already kind of realized this (only the solar part) but using the full fx, sql to log data and a little asp.net web site showing some info when looking at it (all private, nothing cloud or public, but the idea tickels).

While looking for a possibility to show this all with a kind of wlan display and got no real answer so stopped the whole thing especially after my hd got kind of knowlegde of earth's gravity in a bad way .... and all protocol details and sources got lost along ... so far for IT and having backups ... sometimes it does make sense ...

What type of inverters do you use by the way. Mine are networked and easy to do socket stuff, once you get the protocol to know. We can exchange some intel on this, if you like.

Groetjes

Peter.

#5 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 19 December 2012 - 08:37 PM

Hi c70070540, Nice invention, from my home country. Cool to see! :D Question, if I want to apply something simular at home, I probably have to replace my (very old) gas and electrics meters?
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#6 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 19 December 2012 - 10:06 PM

Hi c70070540,

Nice invention, from my home country. Cool to see! :D

Question, if I want to apply something simular at home, I probably have to replace my (very old) gas and electrics meters?

Thanks ;)
The old type of meters will not work. You need the so called "Smart meter"

New topic on Tweakers.net (Dutch Language): http://gathering.twe...essages/1530176

#7 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 19 December 2012 - 10:26 PM

The web site is quit nice .... I already kind of realized this (only the solar part) but using the full fx, sql to log data and a little asp.net web site showing some info when looking at it (all private, nothing cloud or public, but the idea tickels).

While looking for a possibility to show this all with a kind of wlan display and got no real answer so stopped the whole thing especially after my hd got kind of knowlegde of earth's gravity in a bad way .... and all protocol details and sources got lost along ... so far for IT and having backups ... sometimes it does make sense ...

What type of inverters do you use by the way. Mine are networked and easy to do socket stuff, once you get the protocol to know. We can exchange some intel on this, if you like.

Groetjes

Peter.

I am very interesses in your database logging code. Can you please share with us?

#8 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 19 December 2012 - 10:35 PM

Hi c70070540,

This sounds very interesting. Do you have an article about it or blog post where we can see it in action or learn more about it? We've love to share it with others, and show them when you've built!

Chris

Promo movie will be ready in a few days 😉 is being made by JoopC
I keep you posted.

#9 piwi

piwi

    Advanced Member

  • Members
  • PipPipPip
  • 114 posts
  • LocationGermany

Posted 20 December 2012 - 11:47 AM

I am very interesses in your database logging code. Can you please share with us?


Hi c70070540,

the code is very simple. this is how i did it.

1. Create a table with a site id, time stamp, an inverter nummer, and all the measurement values you may have.
2. Create a stored procedure with the the values as parameters.
3. Think of some time loop to get the values from the inverter socket, connect to sql and call the stored procedure with parms filled. Quit easy and simple to me, figuring out the inverters protocol (sniffer) is a different ball game ...

This can all be done using the free express version for SQL, C#, or VB, or whatever is out there and you prefer to use.

This is all done using the full fx, as already said, no netduino or any mcu used .... except the one in a very small pc with only 6Watt of power consumption running WindowsServer

For the code after some preps in the end it is quit simple


        static void StoreValues(string[] Values)
        {
            SqlConnection conn = new SqlConnection();

            try
            {
                // Get DB open
                conn.ConnectionString = "Server=<your-server>\\<your-instance>;Database=<your-db>;User=<your-user>;";
                conn.Open();

                // Fixed for now
                string mClient = "AK16";
                string mDate = DateTime.Now.ToString("yyyy-MM-dd");
                string mTime = DateTime.Now.ToString("HH:mm:ss");

                // Build command
                SqlCommand cmd = new SqlCommand("spSputnikInverterValuesUpdateInsert", conn);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                SqlParameter prmClient = cmd.Parameters.Add("@mClient", System.Data.SqlDbType.NVarChar);
                prmClient.Direction = System.Data.ParameterDirection.Input;
                prmClient.Value = mClient;
                SqlParameter prmDate = cmd.Parameters.Add("@mDate", System.Data.SqlDbType.NVarChar);
                prmDate.Direction = System.Data.ParameterDirection.Input;
                prmDate.Value = mDate;
                SqlParameter prmTime = cmd.Parameters.Add("@mTime", System.Data.SqlDbType.NVarChar);
                prmTime.Direction = System.Data.ParameterDirection.Input;
                prmTime.Value = mTime;
                SqlParameter prmAdr = cmd.Parameters.Add("@ADR", System.Data.SqlDbType.NVarChar);
                prmAdr.Direction = System.Data.ParameterDirection.Input;
                prmAdr.Value = Values[0].Substring(Values[0].IndexOf("=") + 1);
                SqlParameter prmTyp = cmd.Parameters.Add("@TYP", System.Data.SqlDbType.NVarChar);
                prmTyp.Direction = System.Data.ParameterDirection.Input;
                prmTyp.Value = Values[1].Substring(Values[1].IndexOf("=") + 1);
                SqlParameter prmPAC = cmd.Parameters.Add("@PAC", System.Data.SqlDbType.NVarChar);
                prmPAC.Direction = System.Data.ParameterDirection.Input;
                prmPAC.Value = Values[2].Substring(Values[2].IndexOf("=") + 1);
                SqlParameter prmTKK = cmd.Parameters.Add("@TKK", System.Data.SqlDbType.NVarChar);
                prmTKK.Direction = System.Data.ParameterDirection.Input;
                prmTKK.Value = Values[3].Substring(Values[3].IndexOf("=") + 1);
                SqlParameter prmPRL = cmd.Parameters.Add("@PRL", System.Data.SqlDbType.NVarChar);
                prmPRL.Direction = System.Data.ParameterDirection.Input;
                prmPRL.Value = Values[4].Substring(Values[4].IndexOf("=") + 1);
                SqlParameter prmKHR = cmd.Parameters.Add("@KHR", System.Data.SqlDbType.NVarChar);
                prmKHR.Direction = System.Data.ParameterDirection.Input;
                prmKHR.Value = Values[5].Substring(Values[5].IndexOf("=") + 1);
                SqlParameter prmPDC = cmd.Parameters.Add("@PDC", System.Data.SqlDbType.NVarChar);
                prmPDC.Direction = System.Data.ParameterDirection.Input;
                prmPDC.Value = Values[6].Substring(Values[6].IndexOf("=") + 1);
                SqlParameter prmUDC = cmd.Parameters.Add("@UDC", System.Data.SqlDbType.NVarChar);
                prmUDC.Direction = System.Data.ParameterDirection.Input;
                prmUDC.Value = Values[7].Substring(Values[7].IndexOf("=") + 1);
                SqlParameter prmIDC = cmd.Parameters.Add("@IDC", System.Data.SqlDbType.NVarChar);
                prmIDC.Direction = System.Data.ParameterDirection.Input;
                prmIDC.Value = Values[8].Substring(Values[8].IndexOf("=") + 1);
                SqlParameter prmKDY = cmd.Parameters.Add("@KDY", System.Data.SqlDbType.NVarChar);
                prmKDY.Direction = System.Data.ParameterDirection.Input;
                prmKDY.Value = Values[9].Substring(Values[9].IndexOf("=") + 1);
                SqlParameter prmKMT = cmd.Parameters.Add("@KMT", System.Data.SqlDbType.NVarChar);
                prmKMT.Direction = System.Data.ParameterDirection.Input;
                prmKMT.Value = Values[10].Substring(Values[10].IndexOf("=") + 1);
                SqlParameter prmKYR = cmd.Parameters.Add("@KYR", System.Data.SqlDbType.NVarChar);
                prmKYR.Direction = System.Data.ParameterDirection.Input;
                prmKYR.Value = Values[11].Substring(Values[11].IndexOf("=") + 1);
                SqlParameter prmKTO = cmd.Parameters.Add("@KTO", System.Data.SqlDbType.NVarChar);
                prmKTO.Direction = System.Data.ParameterDirection.Input;
                prmKTO.Value = Values[12].Substring(Values[12].IndexOf("=") + 1);
                //
                cmd.ExecuteNonQuery();

            }
            catch (Exception)
            {
                ;
            }
            finally
            {
                if (conn.State != ConnectionState.Closed)
                {
                    conn.Close();
                    conn.Dispose();
                }
            }
        }

And some results:

For day April 3rd, 2012
Posted Image

For March 2012
Posted Image

And some other graphs
Posted Image
Posted Image


Have fun with it ...

Groetjes,

Peter.

#10 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 20 December 2012 - 02:02 PM

Video is added to the startpost. And thanks Peter!

#11 piwi

piwi

    Advanced Member

  • Members
  • PipPipPip
  • 114 posts
  • LocationGermany

Posted 21 December 2012 - 09:19 AM

Video is added to the startpost.

And thanks Peter!


Graag gedaan (You're welcome)

#12 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 22 December 2012 - 05:02 PM

What type of inverters do you use by the way. Mine are networked and easy to do socket stuff, once you get the protocol to know. We can exchange some intel on this, if you like.

I use the Steca 2010+ inverter. It is quite irrelevant on wich inverter I use, cause the solution is not depending on any type of inverter. It depends on a electricity meter with a S0 pulse signal port. So when my inverter gets switched for whatever reason, the solution keeps working. :)

#13 firestar

firestar

    Member

  • Members
  • PipPip
  • 15 posts

Posted 27 December 2012 - 10:18 AM

Very nice!

I'm doing something similar (in C# though). I'm using a FET as inverter for the RX signal. Hopefully I can test my setup in the coming days to see if it all works, I have completed most code so its a matter of debugging :-)

 

Now I just need to find a suitable home automation system to log the data too :-) Too bad there arent any big open source projects on .NET going on for this :-(



#14 Bert Plus

Bert Plus

    New Member

  • Members
  • Pip
  • 2 posts

Posted 13 March 2013 - 09:17 AM

Thanks GeBrander and JoopC I managed to build my NetDuino Plus based smart meter monitor and it's working just fine.

As this was my first ever Netduino project you can image how happy I am.

Thanks for your excelent manual!

 

I have solar panels installed at home but no separate meter so I am looking for a different way to monitor the solar power as a next project.

That involves communicating over RS485 with the Aurora Power-One inverter so may take a while.



#15 GeBrander

GeBrander

    Member

  • Members
  • PipPip
  • 29 posts

Posted 20 March 2013 - 08:57 AM

Good job Bert Plus!

 

Nice to see so many people using our solution.

 

New version (not yet released) promo movie made by JoopC:

And






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.