gianfrdp / SDM120C

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

sdm120c 1.3.5.4 #13

Closed ghost closed 5 years ago

ghost commented 5 years ago

After a compleet new installation on Raspi 3B+ with Domoticz V4.97 there is no responds from the USB0 port.

This is my code: SERVER="http://192.168.178.31:8080/json.htm?type=command" #server location ID_01=121 #id of "Energie Solar" IDT=122 #id of "Energie Woning totaal" IDF=123 #id of "Energie Woning voor" IDB=124 #id of "Energie Woning achter"

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 -a 1 -d 1 -b 9600 -P N -S 1 -p -t -q -2 -x /dev/ttyUSB0 #p=power / t=total / q=short output echo "--------------------------------------------------" echo $VALUES #Debugging line echo "==================================================" done POWER=echo $VALUES | cut -d ' ' -f1 TOTAL=echo $VALUES | cut -d ' ' -f2

echo $POWER $TOTAL

update domoticz device with solar energy

curl -s $SERVER"&param=udevice&idx="$ID_01"&nvalue=0&svalue="$POWER";"$TOTAL  #send current to domoticz

This worked before 100%

sdm220.zip

output.txt

gianfrdp commented 5 years ago

Change from /home/pi/SDM120C/sdm120c -a 1 -d 1 -b 9600 -P N -S 1 -p -t -q -2 -x /dev/ttyUSB0 to /home/pi/SDM120C/sdm120c -a 1 -d -b 9600 -P N -S 1 -p -t -q -2 -x /dev/ttyUSB0

gianfrdp commented 5 years ago

I'm sorry, I was testing version 1.2.0.

gianfrdp commented 5 years ago

Please, pull new commit https://github.com/gianfrdp/SDM120C/commit/bf2b3faceeee474fae1a27046335251490d4194e

./sdm120c -a 1 -b 9600 -P N -S 1 -w 10 -j 2 -z 10 -W 10 -y 10 -t -p -q  /dev/ttyUSB0
166.90 9629987 OK
ghost commented 5 years ago

Thanks..

Everything is ok now.

Joop

Verstuurd vanaf mijn iPhone

Op 12 dec. 2018 om 03:18 heeft gianfrdp notifications@github.com<mailto:notifications@github.com> het volgende geschreven:

Closed #13https://github.com/gianfrdp/SDM120C/issues/13.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/gianfrdp/SDM120C/issues/13#event-2020367169, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfsMxWiMcRFTNhGumvfVFQiIvLcj4o-fks5u4GdggaJpZM4ZLvaC.