S0PCM-5 setup

Moderator: leecollings

Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

S0PCM-5 setup

Post 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 ......
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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?
Last edited by Toulon7559 on Friday 26 December 2014 12:09, edited 1 time in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: S0PCM-5 setup

Post by gizmocuz »

Do you use the latest beta version? I think this device is seen as ttyACM0, that should work now
Quality outlives Quantity!
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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 ......
Last edited by Toulon7559 on Friday 26 December 2014 12:05, edited 2 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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?
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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]
Last edited by Toulon7559 on Wednesday 04 August 2021 9:42, edited 2 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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.
Last edited by Toulon7559 on Saturday 14 March 2015 14:44, edited 2 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post by Toulon7559 »

Deleted, because superceeded by later developments.
Last edited by Toulon7559 on Monday 18 May 2015 19:08, edited 5 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: S0PCM-5 setup

Post by ThinkPad »

"Good busy" as Van Gaal would say :P
I am not active on this forum anymore.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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'.
Last edited by Toulon7559 on Tuesday 31 May 2016 10:30, edited 3 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
brandie21474
Posts: 7
Joined: Tuesday 14 July 2015 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: ß
Location: everywhere
Contact:

Re: S0PCM-5 setup

Post 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.
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: S0PCM-5 setup

Post 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
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post by Toulon7559 »

Derik,

Is Domoticz' Hardware-plugin for S0PCM not 'underground' taking care of this aspect?
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
ravedave
Posts: 9
Joined: Friday 06 March 2020 12:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: S0PCM-5 setup

Post 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)
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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
Last edited by Toulon7559 on Friday 24 July 2020 18:39, edited 2 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
ravedave
Posts: 9
Joined: Friday 06 March 2020 12:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: S0PCM-5 setup

Post 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!
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: S0PCM-5 setup

Post 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 2568 times
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
ravedave
Posts: 9
Joined: Friday 06 March 2020 12:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: S0PCM-5 setup

Post 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
ravedave
Posts: 9
Joined: Friday 06 March 2020 12:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: S0PCM-5 setup

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest