DIY: SDM630 Smart Meter Interface

Any news? Is it working now with the resistors?

Unfortunately not. Currently i am testing it with raspberry and another software (nettemp.pl) and working flawlessly from 2 months so i am sure that connection problems are caused by author’s script. I am going to use python script from nettemp.pl software to gather information from sdm630 and use it in openhab .

Hello Gonium. I need help. I have a project to create an RS485 interface on meters without this jack.
the aim is to link each meter through a parallel connection to a Concentrator for communication of power consumption. The meters dont have an RS485 jack. how do i achieve this please?

I finally had some time to work on the SDM630 interface again - and I have a new shiny test environment:

As for the communication problem: I finally managed to track it down. In my previous environments the software worked as expected, but it turns out that the MODBUS library I use had a subtle bug that could lead to sporadic timeouts. I suspect that some of you experienced exactly this - I’m sorry! In my new test environment the bug was reproducible, and the new release should now do a better job.

In addition you can now specify more than one MODBUS device to be queried. Please check the README on github:

https://github.com/gonium/gosdm630/README.md

I will receive a shipment of various Eastron MODBUS devices this week, and I intend to support more than just the SDM630.

-Mathias

1 Like

@sirLeone: I was finally able to reproduce your problem, sorry that it took so long - see my last post in this thread. The problem was a timing issue in the MODBUS library I was using. I understand that you found another software that solved the issue. Would you test the new release of my software with your setup? I’m curious whether it now works for you as well.

Thanks,
-Mathias

In order to make things easier I just created and uploaded ready-to-use binaries on github:

Release 0.2.0, now with binaries

There is also a version for the Raspberry Pi, please use the “Linux/ARM” build. Please let me know whether this works for you.

-Mathias

1 Like

Is this something we ought to be aware of for the Openhab general Modbus binding? Sorry I do not know what library that derives from !

@rossko57: I’m referring to this issue:

If you’re not using this modbus library it should not affect you - which I assume for OpenHAB.

-Mathias

Thankyou. I suspect little in common, but will ask @ssalonen to cast an eye over it just to be sure.

1 Like

Hi,

I just uploaded a new release - you can get the binaries (Linux/Mac/Win, for different architectures) here:

Github release page

There are two big changes for this release:

  1. The software is now tested with a variety of Eastron SDM* smart meters, they all work more or less the same.
  2. I implemented a streaming API. It is based on HTTP long polling and allows a client to receive the stream of measurements as soon as they occur on the MODBUS. This is handy if you need to react to events of the smart meter or if you want to record what is going on with high resolution. The repository now contains a sdm630_monitor binary which uses the streaming API to monitor the power of one device. This code can serve as a template for your own experiments.

Please have a look at the REAMDE for more.

-Mathias

I have a question concerning the Interface.

As far as I understand it has to be local (USB) on the Openhab computer?

What would be my possibillities if the OpenHab computer is far away from my power cabinet?

thanks
Daniel

1 Like

Hi @Daniel_Hermann1,

you’re right in that you need a computer with a RS485 interface - today, these are mostly USB dongles, but you can still find other interface types. But this computer does not need to be the same as the one running OpenHAB - in fact, this is why I wrote this software :wink:

Here’s my setup: I have an SDM630 in my distribution cabinet in the hallway. There is a Raspberry Pi tucked in a cupboard close to the distribution cabinet. It uses an RS485 USB dongle to read the measurements from the SDM630 and serves the measurements using my software. Another Raspberry Pi on my LAN runs OpenHAB and retrieves the values from the first one.

So, in essence: You could run both the SDM630 interface software and OpenHAB on the same computer, but you don’t need to. You could also extend the RS485 cable quite a bit - Maxim’s Application Note 763 lists 1000 meters as the maximum RS485 bus length.

Hope this helps you,
-Mathias

1 Like

That’s exactly what RS485 is for, long runs in an electrically noisy environment. Always use twisted pair though, Cat5 cable will do nicely.

here firmware to push data from sdm630 to mqtt broker

Version 0.4.0: Realtime web interface

I just released version 0.4.0. The main features are:

  • A new realtime web interface
  • A tool to discover SDM smart meters connected to the bus.

and various bug fixes. The web interface looks like this:

You can get the release and read the release notes here:

What is the benefit of this? I can also use openhab modbus binding without any additional software to read out the power meter.

Please can you tell me, if i will have any advantage with your software?

And can i install the SDM630 directly after my main power meter - without any additional fuses or something else?

I want to install it before the power distribution - so i can measure the power consumtion of my whole house. So i only have the fuse before the main power meter. All other fuses will be after the sdm630.

Anybode knows a cheap way to get the sdm630 v2 modbus? The price has raised - now it costs about 150 Euro in germany…

You can use the modbus binding. I am using GoSDM630 in different installations that do not have an OpenHAB instance. Another advantage is that you get realtime (<1s) measurements. But if the OpenHAB binding works for you: Great!

This is exactly how you typically install these smart meters. Mine is directly behind my old Ferraris meter and in front of the RCD.

They are not as cheap as they have been any more :frowning: But you could think about installing three SDM120C devices. They’re available for around 30 Euro each, so for a three-phase installation you would spend 90 Euro. I’m not sure however if they can count infeed and consumption at the same time, so be carefull and check the datasheet.

-Mathias

Just downloaded latest binaries, set up together with OH2 and its workin like a charm. Great work and thanks.

Thanks for reporting back! Glad it works for you. Just out of curiosity: Which platform are you using? Raspberry Pi?

No, i am using custom NAS based on intel atom d2800.
Now i am fighting with rule to compute total energy usage per day/month/year with prediction with energy cost :slight_smile: