Page 1 of 2

S0PCM-5 setup

Posted: Friday 28 November 2014 9:03
by Toulon7559
Have purchased and connected to my RPI&Domoticz an S0PCM-5 for readout of max. 5 S0-interfaces.
Setup in 'Hardware' for 2 ports at 9600bps and 1000 pulses per hour [?].
But now stuck, because after that setup the S0PCM does not show under 'Devices'.
Any hints from other users how to proceed towards 'visibility' op de device S0PCM-5, and how to readout&application of the readout?

Because in 'Hardware' I only see /dev/ttyUSB0 as possible interfaceport-selection (same as RFXCom), I suspect that 'something' has to be done in that area, but what?
Like here? http://www.domoticz.com/wiki/PersistentUSBDevices
Prefer to hear from earlier, practical experience ......

Re: S0PCM-5 setup

Posted: Monday 08 December 2014 18:16
by Toulon7559
After login with the combination of DHCP&Https looking today in the event-log I see the following reporting:

2014-12-08 18:00:31 RFXCOM: Using serial port: /dev/ttyUSB0
2014-12-08 18:00:42 Error: S0 Meter: Invalid Data received!

2014-12-08 18:00:13 (Wunderground_PWS_Info) Rain (WU Neerslag)
2014-12-08 18:01:19 Error: S0 Meter: Invalid Data received!
2014-12-08 18:01:33 Error: EventSystem thread seems to have ended unexpectedly
2014-12-08 18:01:33 Error: Wunderground_PWS_Info hardware (3) thread seems to have ended unexpectedly
2014-12-08 18:01:33 Error: PVOutput hardware (6) thread seems to have ended unexpectedly[/color]

Although not visible in Dashboard/Devices apparently the SOPCM is seen by Domoticz.
Have red-marked the lines which make me feel uncomfortable, because not seen before the connecting of the S0PCM.
Although I do not see strange readouts for Wunderground and for PVOutput, the combination of RFXCom and S0PCM seems to have negative effects on the general operation of Domoticz.
Time to dig deeper in those USB-settings?
And no other way to apply the S0PCM-info then by a lua-script?
Anybody have ideas and/or practical experience?

Re: S0PCM-5 setup

Posted: Thursday 18 December 2014 8:28
by gizmocuz
Do you use the latest beta version? I think this device is seen as ttyACM0, that should work now

Re: S0PCM-5 setup

Posted: Saturday 20 December 2014 18:46
by Toulon7559
@gizmocuz
Will check as soon as I have solved the 'certificate'-problem which (apparently) presently generates the response 502BadGateway when https-calling to Domoticz@RPI via my LAN:
after a '502'-response :-( no further access is possible to the web-display ......

Re: S0PCM-5 setup

Posted: Tuesday 23 December 2014 13:18
by Toulon7559
After repeated setting of a new SD-image, loading latest beta-release and setup for 'Hardware' and 'Devices' (and in the latest round the setting of the IP-address to a fixed value), it seems that my configuration is now stable (again). Based on this experience my (personal) opinion: fixed IP-address and Http-call to be preferred over DHCP in combination with Https-call. (In hindsight) http is sufficient for application on LAN, while Https may be safer for remote access from internet. The combination of Fixed IP-adress & Http is visibly faster, less prone to error.
Under 'Hardware' the serial port for S0PCM now set to ttyACM0, but under 'Devices' still I do not see a sign of S0PCM.
Neither do I see in the log something looking like a link to S0PCM.

Wiki and Manual do not give guidance beyond the first steps of S0PCM-installation in 'Hardware'.
Therefore assistance requested from earlier S0PCM-users: how to proceed? Examples?
Or has somebody found/described a thread with a solution elsewhere in this forum?

Re: S0PCM-5 setup

Posted: Tuesday 30 December 2014 10:31
by Toulon7559
:oops: After some more discussion with gizmocuz it proved to be a very small detail which caused my problem:
if no operational S0-interface is connected to the S0PCM, it does not show as device, because Domoticz lacks an active input .......

[In hindsight, the Log-listing with an error-report for S0 in a previous message has put me on the wrong leg:
it already showed a response as if the S0-interface was operational, making me wonder where the other interface-functions would be within Domoticz (but not considering that the 'problem' could be outside Domoticz at the S0-interface) ........
And (biased for application for my PV-system), I tested without a connected S0-interface under the assumption "at night PV-output = 0 => testing without S0-interface is equivalent and will be OK => as result of S0PCM-messages with 0-content Domoticz should correctly show a device with 0-value".
:cry: The combination of those 2 misunderstandings was fatal for my progress]

Re: S0PCM-5 setup

Posted: Monday 12 January 2015 16:12
by Toulon7559
Suggested text for the related page in wiki.

"This cable supports up to 5 counters.
For further selection & activation in Domoticz, it is required that at least one operational S0-interface is connected to the S0PCM.
Then the S0PCM-application gets input for starting, for the operational S0-interface(s) you will see the active counter(s) of the S0PCM under 'Devices' and counter(s) can be selected for application.
Without an input through an active S0-interface, the counters do not appear."

Although the Manual for such aspects refers to the Wiki, obviously such amendment is also meaningful for the Domoticz Manual.

Re: S0PCM-5 setup

Posted: Thursday 15 January 2015 12:11
by Toulon7559
Deleted, because superceeded by later developments.

Re: S0PCM-5 setup

Posted: Thursday 15 January 2015 12:13
by ThinkPad
"Good busy" as Van Gaal would say :P

Re: S0PCM-5 setup

Posted: Friday 16 January 2015 12:56
by Toulon7559
The 'general' version of that script is now available at http://www.domoticz.com/forum/viewtopic.php?f=23&t=5006
In a parallel testrun my PVLogger uploaded the basic picture for PV-production and for temperature, but only if PV-production available.
Domoticz continously uploaded consumption-info as measured by S0PCM-counter2 as well as its own measured temperature.
PVOutput combines the 2 uploadstreams in 1 picture (but :-( not always uninterrupted).
Leaving it to PVOutput to sort out conflicts between 2 uploadstreams is not very kind and can have unexpected results e.g. showing as interrupts and as delay in display of the 'consumption-line'.

Re: S0PCM-5 setup

Posted: Wednesday 25 March 2015 18:23
by Toulon7559
Practical experience with S0PCM-application:
sometimes the addition of a small 'debounce'-capacitor between signal-interface and ground helps to reduce the amount of 'fake' pulses received by the S0PCM-counter.

Addition 150617: some further experience desribed under http://www.domoticz.com/forum/viewtopic ... 006#p46162
Conclusion: take care that the cabling between S0-interface and S0PCM is of good quality

Re: S0PCM-5 setup

Posted: Thursday 26 November 2015 11:18
by brandie21474
hello

I use the s0 meter usb to measure the results of my pv system. Can anyone tell me what the "actual" in scenes means. I would like to use this valua to switch an actuator.

Re: S0PCM-5 setup

Posted: Monday 14 January 2019 14:37
by Derik
Dear all...
I do have a 5 ports S0 counter also...

Only is there someone that have this usb device "fixed" Like:
https://www.domoticz.com/wiki/PersistentUSBDevices

Or does anyone have a "the" name from the s0 counter..
So i can fix the usb port tot the counter.
When i have the name, i will update the wiki.
Or perhaps someone else can do this?


THANKS

Re: S0PCM-5 setup

Posted: Wednesday 16 January 2019 17:48
by Toulon7559
Derik,

Is Domoticz' Hardware-plugin for S0PCM not 'underground' taking care of this aspect?

Re: S0PCM-5 setup

Posted: Friday 06 March 2020 13:29
by ravedave
Old topic, maybe contributors to this topic can help me as well?
I have installed a S0PCM-2 to count pulses from the kwh meter that is connected to my solar panels, but the counter does not appear in counters.

What have I done sofar:
-Connect S0PCM-3 to free USB port in my RPI3
-Connected using ±80cm telephone cable (not twisted, using 2 of 4 leads) the kwh meter + en - to the 1 and G connections on the S0PCM
-Kwh meter registers (display) and led blinks regularly
-Added S0 meter USB as hardware in Domoticz
-Set mode to ' Energy', port to ttyUSB2, 1000 pulses per kwh

Then nothing happens...I expected that after the first pulse a device would be added, but that doesn't happen. I will add the log, where it is clear that the hardware is recognized.

Any suggestions how to solve this issue? Thanks!

Dave
Spoiler: show

Code: Select all

2020-03-06 08:09:46.919 Status: Domoticz V4.10717 (c)2012-2019 GizMoCuz
2020-03-06 08:09:46.924 Status: Build Hash: b38b49e5, Date: 2019-05-09 13:04:08
2020-03-06 08:09:46.924 Status: Startup Path: /home/pi/domoticz/
2020-03-06 08:09:47.257 Status: PluginSystem: Started, Python version '3.7.3'.
2020-03-06 08:09:47.284 Status: WebServer(HTTP) started on address: :: with port 8080
2020-03-06 08:09:47.346 Status: WebServer(SSL) started on address: :: with port 443
2020-03-06 08:09:47.360 Status: RxQueue: queue worker started...
2020-03-06 08:09:47.360 Error: Exception starting shared server: bind: Address already in use
2020-03-06 08:09:49.361 Status: RFXCOM: Worker started...
2020-03-06 08:09:49.361 Status: P1 Smart Meter: Using serial port: /dev/ttyUSB1
2020-03-06 08:09:49.366 Status: P1 Smart Meter: Worker started...
[size=200]2020-03-06 08:09:49.366 Status: S0 Meter: Using serial port: /dev/ttyUSB2
2020-03-06 08:09:49.370 Status: S0 Meter: Worker started...[/size]
2020-03-06 08:09:49.370 Status: EventSystem: reset all events...
2020-03-06 08:09:49.379 Status: EventSystem: reset all device statuses...
2020-03-06 08:09:49.510 Status: Python EventSystem: Initalizing event module.
2020-03-06 08:09:49.511 Status: EventSystem: Started
2020-03-06 08:09:49.511 Status: EventSystem: Queue thread started...
2020-03-06 08:09:49.540 Status: PluginSystem: Entering work loop.
2020-03-06 08:09:50.365 Status: RFXCOM: Using serial port: /dev/ttyUSB0
2020-03-06 08:09:51.072 Status: P1 Smart Meter: Found gas meter on M-Bus channel 1
2020-03-06 08:09:51.136 Status: P1 Smart Meter: Meter is pre DSMR 4.0 and does not send a CRC checksum - using DSMR 2.2 compatibility
[size=200]2020-03-06 08:10:01.895 Status: S0 Meter: ID: 1921, Version: S0 Pulse Counter V0.6 - 30/30ms[/size]
2020-03-06 08:11:03.959 Status: Incoming connection from: 10.0.1.41
2020-03-06 08:14:53.496 Status: Incoming connection from: 10.0.1.18
2020-03-06 08:46:03.966 Status: Incoming connection from: 10.0.1.41
2020-03-06 09:00:00.178 Status: Starting automatic database backup procedure...
2020-03-06 09:00:00.466 Status: Ending automatic database backup procedure...
2020-03-06 09:05:32.872 Status: Incoming connection from: 10.0.1.41
2020-03-06 09:24:54.000 Status: Incoming connection from: 10.0.1.18
2020-03-06 10:00:00.666 Status: Starting automatic database backup procedure...
2020-03-06 10:00:00.931 Status: Ending automatic database backup procedure...
2020-03-06 11:00:00.141 Status: Starting automatic database backup procedure...
2020-03-06 11:00:00.397 Status: Ending automatic database backup procedure...
2020-03-06 12:00:00.709 Status: Starting automatic database backup procedure...
2020-03-06 12:00:00.971 Status: Ending automatic database backup procedure...
2020-03-06 12:00:01.972 Status: Schedule item started! Name: Espresso, Type: On Time, DevID: 3, Time: 2020-03-06 12:00:01
2020-03-06 13:00:00.176 Status: Starting automatic database backup procedure...
2020-03-06 13:00:00.430 Status: Ending automatic database backup procedure...
2020-03-06 13:10:18.735 (Slimme meter) P1 Smart Meter (Electriciteit)
2020-03-06 13:10:22.465 (RFXCOM) Temp + Humidity (Huiskamer)

Re: S0PCM-5 setup

Posted: Saturday 07 March 2020 12:11
by Toulon7559
The hardware-menu of Domoticz suggests /dev/ttyUSB0, but seeing that in your configuration occupied by RFXCOM, obvious why you shift to other USB-port.
See the earlier messages in this thread, dealing with the same problem.

What happens if you apply the alternative setting for S0PCM's USB-port?
/dev/ttyACM0

Re: S0PCM-5 setup

Posted: Sunday 08 March 2020 16:30
by ravedave
I did look at the previous messages, but my conclusion was that although the symptoms are similar (counter not added), the proposed solution is not applicable in my case: I made sure that pulses are generated, connected the kwh meter etc.

I tried to 'cat' /dev/ttyUSB2 and do get readings every 10 seconds or so that are likely pulses from the device:
pi@raspberrypi:~/domoticz $ cat /dev/ttyUSB2
ID:1921:I:10:M1:1:109:M2:0:0
ID:1921:I:10:M1:0:109:M2:0:0
ID:1921:I:10:M1:0:109:M2:0:0
ID:1921:I:10:M1:1:110:M2:0:0
^C

How could I apply this alternative setting?

Thanks!

Re: S0PCM-5 setup

Posted: Monday 09 March 2020 8:51
by Toulon7559
For change of port-settings for S0PCM interface
1) click tab 'Instellingen' ( ~Setup)
2) select Hardware
3) click the line for S0PCM => picture below
4) then go to menu at bottom
5) scroll for required interface type for serial port
6) click 'Aanpassen', or equivalent button in the menu
Setup for S0PCM
Setup for S0PCM
Screenshot_2020-03-09 Domoticz1.png (53.11 KiB) Viewed 2569 times

Re: S0PCM-5 setup

Posted: Monday 09 March 2020 15:27
by ravedave
Hey, thanks for the explanation. I can only choose for USB1, USB2 or USB0. I have chosen for /dev/ttyUSB2.

Any conclusions because of the output of the readings I get? The serial port seems to function?

Thanks again for helping

Re: S0PCM-5 setup

Posted: Wednesday 11 March 2020 20:53
by ravedave
I was wrong. There is a long list of available ports. I choose AMAO. See the log for the error. It is dark, so no pulse received, but I don’t think it will work.

2020-03-11 20:46:57.045 Status: S0 Meter: Worker stopped...
2020-03-11 20:46:57.046 Status: S0 Meter: Using serial port: /dev/ttyAMA0
2020-03-11 20:46:57.047 Status: S0 Meter: Worker started...
2020-03-11 20:46:57.047 Error: Serial Port closed!... Error: End of file