SDM120C modbus not worrking

Post Reply
HilverinkJ
Posts: 5
Joined: Friday 06 October 2017 15:36
Target OS: Raspberry Pi
Domoticz version: 3.97
Location: Netherlands
Contact:

SDM120C modbus not worrking

Post by HilverinkJ » Thursday 06 December 2018 12:01

Hi all,

After a compleet new installation of Domoticx on raspi 3b+ and installation of my scripts SDM220C that works before perfectly there is no communication.

Code: Select all

# AESTRON SDM220C Solar Energy Production ..........
VALUES=NOK		# if Not Oké
echo $VALUES 	#Debugging line
while [ "$VALUES" = "NOK" ]
do		# reading from meter sdm220 modbus device nr 1 option -a 1
		VALUES=`/home/pi/SDM120C/sdm120c /dev/ttyUSB0 -b 9600 -P N -S 1 -a 1 -p -t -q -2` #p=power / t=total / q=short output
		echo $VALUES #Debugging line
done

		POWER=`echo $VALUES | cut -d ' ' -f1`
        TOTAL=`echo $VALUES | cut -d ' ' -f2`
		echo $POWER $TOTAL

# update domoticz device for solar energy
curl -s {$SERVER"/json.htm?type=command&param=udevice&idx="$IDS"&nvalue=0&svalue="$POWER";"$TOTAL""}  #send current to domoticz
Executing this script returns the text below.
sdm120c 1.3.5.4: ModBus RTU client to read EASTRON SDM120C smart mini power meter registers Copyright (C) 2015 Gianfranco Di Prinzio <gianfrdp@inwind.it> Complied with libmodbus 3.0.6 Usage: /home/pi/SDM120C/sdm120c [-a address] ………………………
and much more.

Is there anyone that can help me out.

Joop

gianfrdp
Posts: 10
Joined: Sunday 10 January 2016 4:22
Target OS: Linux
Domoticz version: 3.8805
Contact:

Re: SDM120C modbus not worrking

Post by gianfrdp » Wednesday 12 December 2018 4:22


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests