gianfrdp / SDM120C

sdm120c ModBus Mini Smart Meter
GNU General Public License v2.0
73 stars 37 forks source link

sdm120D support #15

Closed pasqd closed 5 years ago

pasqd commented 5 years ago

Hi, I dont know if sdm120D is supported but 120C is not available anywhere :( This is the debug log from my raspberry root@raspberrypi:/home/pi/SDM120C# sdm120c /dev/ttyUSB0 -d 1 -j 500 20190116-14:28:05.524938: sdm120c(20895) debug_flag = 1 20190116-14:28:05.529160: sdm120c(20895) optind = 6, argc = 6, c = j, optarg = 500 20190116-14:28:05.536952: sdm120c(20895) resp_timeout = 500, count_param = 0 20190116-14:28:05.539022: sdm120c(20895) cmdline="sdm120c /dev/ttyUSB0 -d 1 -j 500" 20190116-14:28:05.541396: sdm120c(20895) szttyDevice: /dev/ttyUSB0 20190116-14:28:05.542654: sdm120c(20895) devLCKfile: </var/lock/LCK..ttyUSB0> 20190116-14:28:05.543008: sdm120c(20895) devLCKfileNew: </var/lock/LCK..ttyUSB0.20895> 20190116-14:28:05.544290: sdm120c(20895) PID: 20895 20190116-14:28:05.545681: sdm120c(20895) Attempting to get lock on Serial Port /dev/ttyUSB0... 20190116-14:28:05.546192: sdm120c(20895) Acquiring shared lock on /var/lock/LCK..ttyUSB0... 20190116-14:28:05.550263: sdm120c(20895) Shared lock on /var/lock/LCK..ttyUSB0 acquired... 20190116-14:28:05.551869: sdm120c(20895) Checking for lock 20190116-14:28:05.553679: sdm120c(20895) errno=0, bRead=2 PID=20895 LckPID=20895 20190116-14:28:05.555865: sdm120c(20895) Checking process 20895 (sdm120c) for lock 20190116-14:28:05.556422: sdm120c(20895) PID: 20895 COMMAND: "sdm120c" LckPID: 20895 LckCOMMAND: "sdm120c" LckPIDcommand "sdm120c" = me 20190116-14:28:05.559713: sdm120c(20895) Appears we got the lock. 20190116-14:28:05.564560: sdm120c(20895) resp_timeout=50000000us 20190116-14:28:05.565931: sdm120c(20895) Libmodbus context open (2400E1) 20190116-14:28:05.567201: sdm120c(20895) Byte timeout disabled. 20190116-14:28:05.567618: sdm120c(20895) New response timeout: 0s, 50000000us 20190116-14:28:05.573172: sdm120c(20895) 1/1. Register Address 30001 [0000] 20190116-14:28:55.626041: sdm120c(20895) ERROR (110) Connection timed out, 1/1, Address 30001 [0000] 20190116-14:28:55.626406: sdm120c(20895) Response timeout gave up after 50050776us 20190116-14:28:55.629282: sdm120c(20895) devLCKfile: </var/lock/LCK..ttyUSB0> 20190116-14:28:55.631655: sdm120c(20895) devLCKfileNew: </var/lock/LCK..ttyUSB0.20895> 20190116-14:28:55.632706: sdm120c(20895) Clearing Serial Port Lock (20895)... 20190116-14:28:55.633129: sdm120c(20895) Acquiring exclusive lock on /var/lock/LCK..ttyUSB0... 20190116-14:28:55.634936: sdm120c(20895) Exclusive lock on /var/lock/LCK..ttyUSB0 acquired (0) Success... 20190116-14:28:55.635587: sdm120c(20895) cmdLen=7 20190116-14:28:55.635930: sdm120c(20895) cmdLen=7 COMMAND is not null 20190116-14:28:55.637315: sdm120c(20895) errno=0, bRead=2 LckPID=20895 PID=20895 COMMAND='sdm120c' 20190116-14:28:55.638663: sdm120c(20895) errno=0, bRead=-1 LckPID=20895 PID=0 COMMAND='' 20190116-14:28:55.639235: sdm120c(20895) Clearing Serial Port Lock done NOK 20190116-14:28:55.641725: sdm120c(20895) NOK

How to check if the device (sdm120D) is valid?

gianfrdp commented 5 years ago

I don't know model 120D. Are you sure it has rs485 connections? Have you some pictures?

pasqd commented 5 years ago

Hello, Sorry for the late reply, i bought the wrong model becouse 120D is has no modbus :) I had a trouble with buying sdm120C in Poland but i found out a nice replacement. Orno or-we 504 has almost the same price with modbus included.

gianfrdp commented 5 years ago

There is model SDM120-Modbus http://www.eastrongroup.com/productsview/14.html, compatible with SDM120C