Log data from modbus meter to Raspbery pi (SDM630)

Поділитися
Вставка
  • Опубліковано 8 лют 2025
  • How you can hook up your SDM630 modbus meter to raspbery pi and graf the data
    -- More information below! --
    More information and images can be found here:
    diytechandrepai...
    Stuff used bought from ebay:
    RS485 converter - goo.gl/mQ5zMf
    SDM630 energy meter - goo.gl/PAADyu
    End terminal resistors - goo.gl/wRJrZ9
    ----------------------------------------
    Do you want to contribute? Lets us make this channel the top channel on UA-cam!
    Patreon: / diytech
    paypal@romer.se / www.paypal.me/...
    By buying the stuff i link to will also yield some extra for me.
    --------------------------------------------------------------

КОМЕНТАРІ • 93

  • @TRS-Tech
    @TRS-Tech 5 років тому +1

    I think I misunderstood. You warned about not using as single phase meter but you are using it as a single phase meter. To answer the question you could use phase 1 for grid, phase 2 for mains out from inverter 1 and phase 3 on inverter 2. However you MUST have a configuration where the neutral is common to all mains devices. If there is any voltage when you measure from the grid neutral and the inverter neutral you MUST NOT USE IT IN THIS WAY.
    On grid meters the RS485 output is isolated so you could use 3 single phase meters if the neutral is not common.

  • @hakonmidthunkolst8706
    @hakonmidthunkolst8706 Рік тому

    Could you also read out the grid frequency using this setup?

  • @mansnilsson4382
    @mansnilsson4382 3 роки тому +2

    1. The polarity of a single phase connection is irrelevant. Try flipping the Schuko plug ;-)
    2. The RS485 cable must have 120Ω impedance, be shielded, and have the shield connected, both ends. An excellent cable is a pair from a normal Ethernet network cable. Cheap and easy to find.
    3. Termination being supplied in both ends is not optional. Fully agree on the need to check whether devices have built-in termination -- RTFM is essential.
    4. Make certain your Pi has a good ground connection, or there might be fire.

  • @MCsCreations
    @MCsCreations 7 років тому +1

    Really interesting! And great work, man!

  • @Maaniic
    @Maaniic 7 років тому +1

    There is no standard for the AB markings which can cause some confusion where you can have multiple devices on the same bus with different polarity on the AB terminals. You rarely have to terminate the rs485 unless you have more than a hundred meters of bus with a lot of devices or if you have some extreme interference nearby (rs485 is quite resilliant). Only thing you should keep in mind is the only god topology of the bus is to connect the devices in a daisy chain.

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      Maaniic i got 100meter and do need the end resistor. but yes normally not always needed. most devices have it built in.

  • @HBPowerwall
    @HBPowerwall 7 років тому +1

    great work mate..

  • @timrosede
    @timrosede 2 роки тому

    Doesn't the gateway (via USB) and the meter still have to be connected to ground?

  • @allantamm2185
    @allantamm2185 3 роки тому

    9:20 I need those undetectable lamps to lit my room

  • @sylgonstamatasstamata8228
    @sylgonstamatasstamata8228 6 років тому

    Small edit: (not a debian or python fun here)
    With my current version of your raspv8.rar (debian_version=8.0 & python:armhf/jessie 2.7.9-1) I needed to make a small change in mat.py:
    Replace
    endian=Endian.Big
    with
    byteorder=Endian.Big,wordorder=Endian.Big
    or an error for "unexpected argument 'endian' " is thrown
    Thank you, great video!

  • @plfodder
    @plfodder 6 років тому

    Great stuff, I'm currently looking for a way to read modbus over TCP IP for testing purposes. I currently use a PC and Windows, but I'm hoping it will be an easy enough job to use a Pie. Thanks again.

  • @pgastrom
    @pgastrom 5 років тому +1

    I have not succeeded in making it work. I read the posts that there is an ISO. Where can I download it?

  • @PhG1961
    @PhG1961 2 роки тому

    Nice video !

  • @ameyapawar7672
    @ameyapawar7672 3 роки тому

    hi , I am current working on the same . However I am not good in python programming can you give me some input point for it . So I can make my communication through.

  • @arapozor
    @arapozor 2 роки тому

    Can multiple devices be read from a single Modbus to USB converter?

    • @DIYTechRepairs
      @DIYTechRepairs  2 роки тому +1

      Yes

    • @arapozor
      @arapozor 2 роки тому

      @@DIYTechRepairsThanks for the reply, can you link me some documentation on how to connect and read them. First time learning about Modbus.

    • @DIYTechRepairs
      @DIYTechRepairs  2 роки тому

      @@arapozor its open on internet. Just google sdm630 modbus and you should find it :)

  • @AliG.G
    @AliG.G 6 років тому

    I am not sure if you could guide me with this or not. What is the difference between M-bus and Modbus? Is there any example on how to use mbus on raspberry pi? Thanks for the video anyway

    • @DIYTechRepairs
      @DIYTechRepairs  6 років тому +1

      You can read more about m-bus vs modbus here: meters.co.uk/m-bus-vs-modbus-difference/

    • @AliG.G
      @AliG.G 6 років тому

      DIY Tech & Repairs nice one. I have a Secure Liberty 100 meter installed at my property but I don't see any RJ11 or RJ45 or any sort of terminals to read it from. Have you ever come across it before?

  • @oldtimeengineer26
    @oldtimeengineer26 7 років тому +1

    Thanks for showing

  • @phizicks
    @phizicks 7 років тому +1

    I assume you''d be pushing this to influxdb or something. I would also put flask module so you can query it remotely if needed

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      Phizicks u can push it to whatever you want :) i run it in graphite and influx depending on system

  • @CanispaterChristmas
    @CanispaterChristmas 6 років тому

    I know this is off-topic, but have you been able to hook into the MPP Solar inverter serial port for monitoring with a Pi/MQTT? Wondering about the serial protocol and I'm a n00b at decoding those things. You seem like you've had some luck. :)

    • @DIYTechRepairs
      @DIYTechRepairs  6 років тому +1

      Yes. Check out My other videos and solar-sis

  • @MathWhiz.Workshop
    @MathWhiz.Workshop 3 роки тому

    Is it possible to use single phase energy meter?

  • @jonasbergkvist6381
    @jonasbergkvist6381 7 років тому +1

    Hi, great series. Checking through all your vids. Question, do you know how fast your modbus setup is polling your meter? I.e how many measurements do you get per given time unit?

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому +1

      Im polling 2 times a second. I can change it to whatever i want kind of. Depending on speed of bus and length. Some values on it is said to update every 6th second while others more often than 1 second. Im not sure how often though. 2times per second works for my purpose. Im avg those values so i do changes every 3 seconds based on it.

    • @synclaire7489
      @synclaire7489 4 роки тому

      @@DIYTechRepairs hi, can I have your email address, I need to ask you a couple of questions. Tnks.

    • @DIYTechRepairs
      @DIYTechRepairs  4 роки тому

      @@synclaire7489 Contact details can be found on My about page on youtube

  • @eugenexie7780
    @eugenexie7780 7 років тому

    You can plug this into a wall socket? Where did you get the plug? Also where did you get the lamp?
    Thanks for making this video :)

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      Eugene Xie this device for din mount in electrical central

  • @marcin7118
    @marcin7118 3 роки тому

    Someone have ISO immage for raspberry? the link in linked page doesn't work

  • @syedabrar3728
    @syedabrar3728 6 років тому

    nice video....Is it enough to run your code in the raspberry pi or should i import some other things too?

    • @DIYTechRepairs
      @DIYTechRepairs  6 років тому

      It is enough I think. If not you get errors stating whats missing :)

    • @syedabrar3728
      @syedabrar3728 6 років тому

      @@DIYTechRepairs how do I get in touch with you?...cause I'm pretty interested in this and am planning to set it up in my home.

    • @DIYTechRepairs
      @DIYTechRepairs  6 років тому

      @@syedabrar3728 Contact details on UA-cam about page.

  • @nithyaanand80
    @nithyaanand80 6 років тому

    Great Video. Is it possible to monitor a 3 phase supply using SDM530?

  • @RK-yx4xl
    @RK-yx4xl 5 років тому

    can we measure the "amperes data" by using this energy meter SDM630?

  • @CesarDanielLopez
    @CesarDanielLopez 6 років тому

    hi, can it be operated with the sdm230-modbus?

  • @나그네-k9d
    @나그네-k9d 7 років тому +2

    nice job!!!

  • @1587pratik
    @1587pratik 4 роки тому

    How to extract meter readings data into csv on raspberry pi local storage? please help me out..

    • @DIYTechRepairs
      @DIYTechRepairs  4 роки тому

      You need a script that polls the device and then write into a delimited file. You can find example code on internet for fetching the data. If any exist that do what you want i dont know

  • @Filip5025
    @Filip5025 7 років тому

    I have all the same hardware for this to work but I´m certatinly not a programmer so I would like a video that is a bit more easy on how to set things up so that it works, right now I just get a bunch of error messages when i try: cannot send to mqtt deamon, problem with graphite... Otherwise its fun to follow you videos! Thanks for putting them out!

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      Im not sure in what part you get errors? Are you using my Iso?

    • @Filip5025
      @Filip5025 7 років тому

      Yes I´m using your iso! It´s when I start the python mat.py, all the data from the sdm630 shows up on count 2 but it stops right away and says: cannot send to mqtt deamon and problem with graphite. Obviously I´m doing something wrong in the setup, but I can´t figure out what since I´m a complete noob!

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      Im not sure whats wrong. If you used the ISO it should work if the guide is followed. A new version will be released 22nd. With alot of improvments. You can also pm me if you want me to take a look at the script for ya

    • @Filip5025
      @Filip5025 7 років тому

      Now I have it running! I had by mistake typed a single s in the script where it should not be! Now it´s just the grafana part left to learn for me! Looking forward to see the new version, appreciate your work, thank you!

    • @SaeedAhmed-ix8nm
      @SaeedAhmed-ix8nm 7 років тому

      Filip5025 I am using standard ISO and using your code but when I use cd /energy-logger
      It is giving me error
      No such file or directory

  • @kovbohdan
    @kovbohdan 7 років тому

    You have lcd connected to RPi. What HW did you use for it?

  • @imrankhan0607
    @imrankhan0607 5 років тому

    there is error in the line 21 "SELIAL = 'dev/ttyUSB0' while my device connected with pi board and showing in the terminal. what will be reason ??

  • @Gartab
    @Gartab 5 років тому +5

    can u post the .py indented pls?

  • @YC-qy5lh
    @YC-qy5lh 7 років тому

    Question: is there a way to simulate a modbus signal? Thanks!!

  • @metachildhood
    @metachildhood 5 років тому

    i can pull voltage, current, power, etc from 3 phase power meter. but the data is different with the displayed data.
    anybody knows how to calculate exactly

    • @DIYTechRepairs
      @DIYTechRepairs  5 років тому

      Different in what way? Mine is the same....

  • @kittipobkomjaturut8797
    @kittipobkomjaturut8797 6 років тому

    Do I have to install a driver or something like that to use RS485-USB with Pi? If yes please suggest
    me ?

    • @DIYTechRepairs
      @DIYTechRepairs  6 років тому

      No driver since it just ends up as a usb unit.

  • @ashishsoni4210
    @ashishsoni4210 6 років тому +2

    Can you give the Python Code file .It will be very helpful fr me to learn the coding part.

  • @masbro-jk5bg
    @masbro-jk5bg 4 роки тому

    great great

  • @SaeedAhmed-ix8nm
    @SaeedAhmed-ix8nm 7 років тому

    nice video. can you give the python code with just print statement which can just print the result and save them in text or csv files?

  • @Zave_Craft
    @Zave_Craft 5 років тому

    can setup samline rate at 20kHz?

    • @DIYTechRepairs
      @DIYTechRepairs  5 років тому

      Doubt it. 20000 Times per second is Hard to do here but i Guess the datasheet Will tell.

  • @kitizaac076
    @kitizaac076 4 роки тому

    does this work for lattepanda?

    • @DIYTechRepairs
      @DIYTechRepairs  4 роки тому

      What is that?

    • @kitizaac076
      @kitizaac076 4 роки тому

      @@DIYTechRepairs cause im working on a project that I want to show the energy readings from Modbus rtu Iec62053-21on a GUI. its like a mini motherboard

  • @YC-qy5lh
    @YC-qy5lh 7 років тому

    Great Video. Is it possible to write it into a text/csv file? How can I buy your source code?

    • @ahmaduetian1695
      @ahmaduetian1695 5 років тому

      contact me, i will give you source code and can give you training.

  • @SaeedAhmed-ix8nm
    @SaeedAhmed-ix8nm 7 років тому

    i am coming across a problem. when i run command
    python mat.py
    it gives me following error
    file ''mat.py'' , line 7, in
    import paho.mqqt.cliet as mqqt
    please help me how to get it right.
    and also i cant connect to the wifi... :(

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      Yeah it is due to that the last ISO is missing that upgrade of some reason. Run this: sudo pip install paho-mqtt; sudo pip install pymodbus;

    • @SaeedAhmed-ix8nm
      @SaeedAhmed-ix8nm 7 років тому

      Thanks alot for your reply. But I cannot connect to wifi also . I dont know why. So if i dont have wifi how i can install it?

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      Using raspberry PI 3? Latest ISO? Have you wired connection and or a screen/keyboard and followed Raspberry PI normal setup procedure?

    • @SaeedAhmed-ix8nm
      @SaeedAhmed-ix8nm 7 років тому

      I am using ISO you provided on your website. I downloaded it from there. I am using Extra LCD screen and keyboard and mouse for the raspberry pi. I have raspberry pi model 3.

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      If you cant reach the Wireless im not sure whats wrong. It works fine for me and others. Did you follow the Video for it? And got latest version?

  • @hgravina
    @hgravina 6 років тому

    Hi, how much power could pass trhu this meter ?

    • @signoutdk
      @signoutdk 3 роки тому

      The limit for SDM630 is 100A per phase.

  • @OffGridAussiePrepper
    @OffGridAussiePrepper 7 років тому

    gday deromer, can u run the image file on orange pi zero h5?

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      OffGrid Aussie Prepper™ no. it wont work on orange pie. they use different stuff im afraid

    • @OffGridAussiePrepper
      @OffGridAussiePrepper 7 років тому

      yep thats what I thought, I cant even load up debian on the crap, it will only load android 5.1 molly from the onboard chip and ignores the op system on the sd card. It took me 3 hrs to change it from chinese to english and then I couldn't get into the settings again. Maybe I should sit a hammer next to it...lol

  • @ismaildoganw
    @ismaildoganw 7 років тому

    Translate?

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому

      İsmail DOĞAN what?

    • @ismaildoganw
      @ismaildoganw 7 років тому

      Hello there. There were subtitles in other videos, but these videos do not exist and I do not understand what they say. :)

    • @DIYTechRepairs
      @DIYTechRepairs  7 років тому +1

      I havent added subtitles to any video though :) I have enabled so users can add if they want. Not sure how UA-cam subtitles work...

    • @ismaildoganw
      @ismaildoganw 7 років тому

      I think auto subtitles are being added. I will wait and watch again.

  • @edcarlosmeirelesdeoliveira4941
    @edcarlosmeirelesdeoliveira4941 5 років тому

    please sketch em python