I was following your video to set up an SDM120 (firmware v0202.04) and found while trying to get in into set mode (long press on the button) that the Id Digits started to flash and a short press increased the value while a long press moves to the next digit. I managed to change Modbus ID, Data Rate and Parity to work with the rest of my system (2x SDM630s). If you need to change other settings then you will need to go through this video in full and work out the register addresses etc. Nevertheless I found this video to be the most useful out of all the ones i tried so well done and thank you.
Thanks for taking the time to explain all this in layman's terms. I'm a beginner with Raspberry Pi and node red so it's a bit of a learning curve for me. But your videos are very helpful so thanks for that. Much appreciated!
I'm trying to do exactly what you are showing, changing the baud rate, but I can't see what you are doing. Can you please give a test explanation of the steps after connection to the unit?
WOW, fantastic tutorial! Thanks for sharing. Thumb up and subscribed! Just a question: how much is the minimum current that the SMD120 is able to detect?
It does not say. I think under 10W is goes not really detect anything, or unreliable. It has a 45A limit, and assuming a 12bit DAC that is 40mA resolution.
I just got a node-red flow with a sonoff basic running tasmota with win10 and mosquitto as the mqtt broker/server. Was struggling for ages before realising two things one, my mqtt server was on a work computer with locked down firewall settings which prevented the sonoff talking to the mqtt server. when i moved the server to another (non work) win 10 box i still have the same error MQT: Connect failed to 192.168.1.***:1883, rc -2. Retry in 10 sec. This was because in the mqtt configuration on the sonoff tamota webpage i had put http:\\ in front of the ip which it didn't like. Anyway i have that working so now i can hopefully move onto getting my sdm120ct working on my main power of my house to measure the export of the solar and turn on the car charger and other loads when there is a big surplus. Wanted to say thanks for the video & the attached flow. very very helpful.
Internally, it may be using that, but I am not sure. The unit has a live in and live out terminals, so there is no external CT required. It has to be wired into circuit.
To change baud rate to what I want, I tried to long press to enter setup mode, what I got is only to setup CT number. By the way I did not connect to anything yet, just standalone SDM120. Once I can set baud rate to 2400, I will hook up to EW11 (TCP RS485). What's wrong?
You can set the BAUD rate as well. Check the documentation, holding register 21 is the ID, and holding register 29 is the Baud rate. But 2400 is the default.
excellent work! Everything is working fine also with a SDM230. But I have big troubles to save the data of the modbus in a csv file. Can you help me there? or show me a video where I can orientate? Best regards
In the documentation it was mentioned that it is IEEE float value (or something similar). I just Googled it and fortunately found a javascript example how to convert it :)
@@csongorvarga thx! my son suggested I should ask chatGTP what the code does, and I kid you not, it was actually helpful. I did not know that the low and high values are 2 16bit integers that have to be converted to a single 32 bit float. now it makes much more sense. :)
@@ChristianHolzer-l3p Oh yes. These are the two examples I have seen so far: 2 16 bit registers used to represent a float number, or the actual number is multiplied by 10 to 100 to represent a float number with 1 or 2 decimal places.
HI there, I do Click by Click from your example, but there is no ModBUS output, (on windows all si OK), but on Node-Red Modbus connect and poll at 5 sec and read but don`t have any output. I Have a SMD120M EASTRON (ID30/9600) to TTL to RS485 HW0519 to CP2102 USB to RPi3+ Please advise what to do next or were to look TNX
tnx anyway, i found a simple way for me >> SMD120 < ID1/9600> +TTL to RS485+ ESP8266 (D1mini) with Tasmota Version 6.4.0(sensors) to mqtt BUT YOUR VIDEO IS THE BEST TO SET UP SMD120
Sorry for not seeing this before. Sometimes I also have similar issues with the modbus component in Node Red. What I have found that sometimes I need to change the modbus configuration for example set to buffered and back and re-deploy the flow and it starts working. I am not sure if this is an issue with the modbus or the serial node. But I did not know that Tasmota works with SDM120. That is very good to know!!!
Great tutorial. I have purchased two of these also. Can you show how you connected the modbus wiring? Did you add your own 120ohm resistor to terminate the bus? I have not heard you mentioning this in your video?
@@csongorvarga Ok, will try that. Perhaps the length of the bus connection does make me need to use a terminator resistor (at the last device of the bus). I'm planning to connect more Modbus enabled devices to the same bus with up to 50 meters of total bus length which makes the influence of reflections larger. This is probably not an issue with a desk setup.
I was trying to reset myself, but did not find that function either. So I am pretty sure you cannot set initial. Although it would be great when swapping meters.
I just found out that the new SDM120M meters that i bought with software version 202.04 can be editted on the device itself. For example: to change the slave id: hold the set button, go to the ID field, and hold again. The ID field can now be adjusted.
Very useful video! I'm starting my own project for displaying the active power generated by my PV. But I'm wondering what's the accuracy of the Energy data. Is it 1Wh accurate, or 10Wh? I searched the internet (not entirely off course) , but could not find the answer... The voltage looks very accurate (more than 5 decimals).
Csongor Varga Thanks, but that was not what I meant. What I meant was the 'Long' value of Energy, how many decimals does it have? Meaning accurate in 0,001Wh or 0,01Wh or 0,1Wh?
Excellent video. Watched it several times. Every time i notice something I've missed. I have set your flow up for 2 devices. SDM120 and SDM230. It's was working but I was getting 'FSM Reset On State INIT' and 'FSM Reset On State QUEUEING' in the debug pane on all Modbus Read Nodes all the time. I have set the poll rate to 15s. Sometimes , after making some modifications, it just refuses to kick off. The Modbus Read Nodes cycle 'Initialize - Reconnecting' over and over. When I click any one of these nodes I get 'FSM Not Ready To Read On State INIT' What am I missing?
I also get this from time to time. Seems like the modbus modul cannot initialize itself after certain changes. Try making some changes in the serial configuration. Change RTU to RTU-BUFFERED or back and deploy again. This is the only way I managed to get it working. Otherwise find this contrib-modbus on githuf and raise an issue there. I got a response within a few days when I initially had modbus issues in Node Red.
Following your video, I have tried to set my SDM120 to another meter ID to allow for more than 1 meter on the bus. I now get ID 000 on the display and am unable to talk to the unit. Any ideas to reset the meter ID to factory (or any other ID) when it says ID 000 ?
First you need put one SDM120 on the modbus line and change the slave ID. You do this one by one. Set one of your SDM120 to slave 10 and the other to for example 11. I have covered this in the video. I was changing the slave ID around. Once you have both of them on a separate ID you can talk to them on the same bus.
Once the ID of the SDM120 is 0 (due to input or comms error) the Modbus poll cannot communicate with it anymore as the software refuses ID 000 as a valid modbus ID. I had to download "Simply Modbus Master" tool - this tool will actually talk to any ID and I was able to reset the meter to another ID. But now everything is up & running. Thanks
Great video! Could you explain how you connect sdm120 to raspberry pi. Did you use some converter? Which device from right side of sdm120? I try to connect sdm220 to raspberry pi which runs openhab by using of rs485 to usb converter from ali. So far no success.
I have a USB to RS485 converter. I did not have an issue with it. I plugged it into the RPi, I could see the device in the usb device list. I got it ages ago, and quite frankly I forgot where I bought it. When i run "lsusb" on the PI I can see it as a USB device. Maybe yours is using a FTDI chip which does not have a driver preinstalled in linux? Sorry I am just guessing here.
thank you for your respond maybe this could help! drive.google.com/file/d/0BxcP44hsRbQiVDZPa1BUNi1zVUE/view?usp=sharing drive.google.com/file/d/0BxcP44hsRbQiVVFtU3dsQ0VsdWs/view?usp=sharing
HI, thanks a lot for this amazing video It has helped me a lot for making troublee shooting app in node red. But I have little trouble. When I am sending this data to azure Iot hub and stream analytics, it says some data format error. Can you update your flow and show us how online streaming works with azure stream analytics? Thanks in advance.
Is it possible to reset to zero total consumption (kWh) ? Trying to find any 18mm wide meter which can be reset. 36mm - can be reset. How about this one?
Hello if it is a MID meter it is not possible to change due to billing legalisation - Please visit our Eastron Europe Sales Office - www.eastroneurope.com/ or for prices please email josh.pereira@eastroneurope.com
I don't think these units can be set to zero. They start counting the consumption and those counters are not resettable. You can connect to your laptop using a USB to RS485 converter.
Hello, I'm trying to connect with a sdm120ct through the computer but when I do poll I got no responses. I'm using a MAX485 connected to the sdm120ct (B-9, A-10, GND-GND) and the max485 connected to the pc as well using a USB-TTL converter (DI of max485 to the TXD of the converter, and the DE and RE of max485 connected to VCC). Thats the way you did it? I'll be pleased if you can left some comments on this. Thank u.
I used a USB-RS485 converter, so I did not have to deal with TTL-Max485 connection. My only issues is if I mix the A, B lines, so if it does not work, I swap them around. But I would not be able to tell if you have wired the MAX485 incorrectly.
Yes, I missed that. But it is really simple. You connect mains power live and neutral. The power supply is inside. There is a neutral connection and a live in and live out. That's all. And that you have two separate wires for modbus.
Csongor Varga thanks, I have seen other applications and figured it out. I am curious about what socket #5/6/7 connect to. I have ordered two for myself. The sales told it should work with a transformer. I wonder maybe it is #5/6/7 all about. I have read through the manual. It mentions pulse 1 and 2 stuff. I do not know what it means and how it work. Maybe another usage case for the transformer too.
Yes, those are for pulse 1 and 2 (plus common ground). Pulse 2 is fixed to give a pulse for every total KWh, pulse 1 can be configured for KWh or KVarh and 1, 0.1, 0.01 or 0.001 units.
Thank you. So #5/6/7 are pulse 1/2 and can output its data in an old way. I see what my problem is. There are two models of sdm120. one can connect to core directly: detail.1688.com/offer/40026832563.html one works with a transformer detail.1688.com/offer/40012049159.html the transformer looks like: www.eastron.com.cn/product/60465050756-218696762/EASTRON_ESCT_TU36_Split_Coil_Current_Transformer_20A_600A_Input_333mV_and_100mV_Output.html?spm=a2700.8304367.prewdfa4cf.103.6961ddf1IXxQzv I think what i need is the direct one. But maybe I just ordered the first one shown up. And the sales issued a double check.
@@aguegu314 Hello we have a CT version of this Please visit our Eastron Europe Sales Office - www.eastroneurope.com/ or for prices please email josh.pereira@eastroneurope.com
When you add a new UI element on the dashboard you specify the group the element goes into. The group than refers to the tab on which it appears. Just make sure the group points to the same tab and they will appear on the same page.
Sorry, I don't know. If the DS1820 are also modbus, you need yet another Modbus Read node to read the DS1820 sensor. I am assuming you have set them to different station ID. Just read it with another modbus read node.
There is one show at 45:12 min on your video. DS1820 temperature sensors uses 1-Wire protocol and have own unique ID number (that must be found out). I'm not sure if I could connect them directly on to Raspberry Pi I/O bus ? datasheets.maximintegrated.com/en/ds/DS18S20.pdf
If you are using raspberry pi you must have the Raspberry PI node group in your node red. In that group, there is a "rpi ds18b20" node. That node will give you all your DS18B20 sensor values in an array. Just use one of the guides on the internet how to wire them to the pi.
Hello bro thanks for your video, it was very very helpful to me, thank you so much, i'm actually working on a similar project and i have a small problem as u know the energy is accumulated in a single register and i want to specify how much energy is consumed in a spécifique day, i wish if you could help me with this please !!
Well, you can't do it on the device. You can build a flow in node-red to store the consumption at midnight and that calculate the difference with each update.
@@csongorvarga thank you sir for your precious information, but i'm just a beginner with node red and i don't know how to work with time conditions I've spent about 2 weeks looking for a way to do that, i don't know if you can an exemple of this function please !