New to WSL, seek help for S0 KWh monitoring

99 views
Skip to first unread message

Ronald Jochems

unread,
Dec 16, 2014, 5:04:13 PM12/16/14
to webso...@googlegroups.com
Hi All,

I have set myself a new challenge, and i believe WSL can help me with that (hopefully) !
I purchased a Rpi B+, and installed Raspbian, and also the WSL software succesfully.

I am seeking for a replacement of my current devices : Solarlog200 (solarpanels), Xanura HCB (domotica) and S0 power consumption metering.

I want to start with the last one, getting my power consumption working, as i believe i do not need external interfaces/converters for this purpose.

However, i wonder if nobody else wanted to integrate the S0 pulse meterings with WSL ? 
Looking at the code of the above URL, i believe the device/GPIO paths are not entirely correct ? 
It is mentioned : i=`cat /sys/class/gpio/gpio2/value`
But my path looks like : 
root@raspberrypi:/sys/class/gpio# ls -alR /sys/class/gpio/
/sys/class/gpio/:
total 0
drwxrwx---  2 root gpio    0 Jan  1  1970 .
drwxr-xr-x 39 root root    0 Dec 16 21:13 ..
-rwxrwx---  1 root gpio 4096 Jan  1  1970 export
lrwxrwxrwx  1 root gpio    0 Jan  1  1970 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0
-rwxrwx---  1 root gpio 4096 Jan  1  1970 unexport
root@raspberrypi:/sys/class/gpio#



Any help would be greatly appreciated !

Ron


Ronald Jochems

unread,
Dec 16, 2014, 5:54:28 PM12/16/14
to webso...@googlegroups.com
I found a interesting article : http://gathering.tweakers.net/forum/list_messages/1607839

Could it be as simple ?

Ronald Jochems

unread,
Dec 17, 2014, 5:05:01 PM12/17/14
to webso...@googlegroups.com
All,

With the RPi.GPIO library, and the python script i can now read out the GPI port where my S0 Kwh meter is connected.

The result at this moment is a little file (on tmpfs filesystem) whereby each pulse is counted, and written in a temp file :

root@raspberrypi:/mnt/data_tmpfs# ps -ef|grep gpio
root      2277     1  0 18:15 ?        00:00:04 python /root/GPIO-counter/gpio-counter.py 23 /mnt/data_tmpfs/gpio23-counter.log


root@raspberrypi:/mnt/data_tmpfs# cat gpio23-counter.log
1980
2014-12-17 22:01:36.108448



Now my challenge is, how to convert this into a nice little graph, just like the other smart-meter functions ?

Many thanks in advance !


George Drak

unread,
Nov 13, 2015, 7:41:01 AM11/13/15
to WebSolarLog
Hello

I am interested in a similar solution..you have done something in it ??

Thank you
George
Reply all
Reply to author
Forward
0 new messages