EASTRON SDM120C - RS485 Modbus meter

poc
Posts: 6
Joined: Mon Nov 02, 2015 9:00 pm

Re: EASTRON SDM120C - RS485 Modbus meter

Post by poc » Mon Nov 02, 2015 9:14 pm

Hello , maybe someone can help me.
i am trying to get readings from an sdm120c meter ,and with the "sdm120c /dev/ttyUSB0" command in putty i get correct readings :D ,sofar so good.
Used the guide from gianfrdp to set up meterN ,and can access it from my computer and fill in the values etc , but when i want to start meterN it stays off ,stays red and won't turn green.
Has anybody an solution for this ? can't test further of it won't start :(

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: EASTRON SDM120C - RS485 Modbus meter

Post by jeanmarc » Mon Nov 02, 2015 9:36 pm

enable debug and return the error log

poc
Posts: 6
Joined: Mon Nov 02, 2015 9:00 pm

Re: EASTRON SDM120C - RS485 Modbus meter

Post by poc » Tue Nov 03, 2015 4:10 pm

Thanks for the tip ,with debugger enabled i found an syntac error in config_deamon.php.
MeterN starts now :D , but no readings yet .
I get other faults as well ,i will look into them and probably report back ;)

poc
Posts: 6
Joined: Mon Nov 02, 2015 9:00 pm

Re: EASTRON SDM120C - RS485 Modbus meter

Post by poc » Thu Nov 12, 2015 2:02 pm

Hello ,still cant get it to run :( .
I get an error "cat: /run/shm/metern2.txt: No such file or directory"
searched for it on my raspberry but cant find it.
I am using the guide from Anesi Flavio ,didnt change the id and baudrate ,these are still ID 1 and baudrate 2400.
So every hint would be appreciated :D .

flane
Posts: 89
Joined: Mon Aug 11, 2014 7:22 am

Re: EASTRON SDM120C - RS485 Modbus meter

Post by flane » Thu Nov 12, 2015 3:22 pm

config_daemon.php probably will not start the pooler485

edit config_daemon.php :

Code: Select all

<?php
if (isset($_SERVER['REMOTE_ADDR'])) {
    die('Direct access not permitted');
}
// Startup of the com apps daemon as 'http' user if needed
$output = shell_exec('pkill -f pooler485 > /dev/null 2>&1');
sleep(1);
$output = shell_exec('pooler485 2 9600 /dev/ttyUSB0 > /dev/null 2>/dev/null &');

//$output = shell_exec('/usr/bin/curl http://192.168.1.12/startsdm.php');
//$output = shell_exec("/srv/http/metern/comapps/poolmeters.py live > /dev/null 2>&1 &");
?>

poc
Posts: 6
Joined: Mon Nov 02, 2015 9:00 pm

Re: EASTRON SDM120C - RS485 Modbus meter

Post by poc » Thu Nov 12, 2015 8:29 pm

Thanks for your reply.
I have the same daemon.php file as you described ,the only difference is the meter ID 1 and baud rate 2400 ,as my meter is configured that way.
If i look up the file in run/shm/ it is empty ,no metern2.txt in there.
Is this text file supposed to created by installing metern , or do i need to download this file from some where ?

artattack
Posts: 6
Joined: Wed Oct 21, 2015 1:13 pm

Re: EASTRON SDM120C - RS485 Modbus meter

Post by artattack » Fri Nov 13, 2015 8:58 am

/run/shm/ is probably a root directory.
try to add sudo command before pooler or for test launch the command from prompt with root user..

poc
Posts: 6
Joined: Mon Nov 02, 2015 9:00 pm

Re: EASTRON SDM120C - RS485 Modbus meter

Post by poc » Wed Nov 18, 2015 8:15 pm

Hello ,again .
I finally got some time to progress on my project,and finally got readings in the metern2 txt file.
These values are also in the metern dashboards for voltage,ampere and qos and are changing ,so where almost there :D .
Of Course there is the problem of "communication lost" every 2 seconds or so.I think when i have communication it updates the dashboards. We obviously want communication constantanious ,but what can be the problem ? Maybe a problem with the LCK file ?
Any help would be appreciated being so close to the final product.

poc
Posts: 6
Joined: Mon Nov 02, 2015 9:00 pm

Re: EASTRON SDM120C - RS485 Modbus meter

Post by poc » Thu Nov 19, 2015 6:47 pm

Got it working :D :D
I mistakenly filled out the same ID for all the different meter/sensor.

hryst
Posts: 3
Joined: Mon Sep 07, 2015 10:56 am

Re: EASTRON SDM120C - RS485 Modbus meter

Post by hryst » Wed Nov 25, 2015 7:22 pm

Hello
how to turn off the message "OK" at the end of a query result
sdm120c -p -q /dev/ttyUSB0
286.70 OK

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest