P1 Smart Meter USB - Gas won't parse

Moderator: leecollings

Post Reply
User avatar
sunflare
Posts: 3
Joined: Saturday 18 July 2020 10:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

P1 Smart Meter USB - Gas won't parse

Post by sunflare »

Hi guys

I have this issue with the 'gas' metric of the P1 Smart Meter.

The Domoticz logs say that the clock is ahead (notice that it's a negative value)
Image

When I check minicom, it does actually provide the gas data:
Image

In the highlighted line, the format appears to be: YYMMDDHHmmss[literal "S"]
My theory is that, the timestamp adds an 'S' for 'Savings' or 'Summer' and this messes up the interpreter within the P1 Smart Meter USB module.

Also, I know that the gas meter DID work during the winter. (So when there was no DST-- Daylights Savings, a.k.a. Winter Time)

I tested this on my own Smart Meter and my friend's, both on Domoticz Stable and on Domoticz Beta. Same results.

Is there anything I can do, or is this a bug?
User avatar
FireWizard
Posts: 1905
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: P1 Smart Meter USB - Gas won't parse

Post by FireWizard »

Hi

@sunflare

Your P1 telegram is correct.
Your timestamp is also correct and a S has been added as an indicator for Summer time, so will be during wintertime a W be added.

What you didn't tell, is this time correct?

Did you check your time on the Raspberry?

See: https://www.raspberrypi.org/forums/view ... p?t=178834

Regards
User avatar
sunflare
Posts: 3
Joined: Saturday 18 July 2020 10:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: P1 Smart Meter USB - Gas won't parse

Post by sunflare »

Yes, time is synced on daily reboot (NTP) and timezone is set to UTC:

Code: Select all

$ date
Sun Jul 19 11:24:22 UTC 2020
Image

So the Smart Meter time is behind by 4 minutes compared to the Pi time, and the Smart Meter provides a CEST timezone rather than UTC.
User avatar
FireWizard
Posts: 1905
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: P1 Smart Meter USB - Gas won't parse

Post by FireWizard »

HI,

@sunflare

You wrote:
Yes, time is synced on daily reboot (NTP) and timezone is set to UTC:
This is not correct, your clock on the Raspberry PI should run UTC time, but your TimeZone should be CEST, as you live in The Netherlands.
pi@RPi1:~ $ date
Sun 19 Jul 2020 04:35:56 PM CEST
If you issue the command:

Code: Select all

sudo timedatectl
you should see something like:
Local time: Sun 2020-07-19 16:39:07 CEST
Universal time: Sun 2020-07-19 14:39:07 UTC
RTC time: n/a
Time zone: Europe/Amsterdam (CEST, +0200)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
So, what to do?

1. Set you time to the UTC time, which is currently 2 hours behind CEST (local) time.
2. Set Time Zone to CEST (Amsterdam)
You can do that easily with:

Code: Select all

sudo raspi-config
Goto 4 (Localisation Options) , followed by I2 Change Time Zone, followed by Europe and Amsterdam.

Regards
User avatar
sunflare
Posts: 3
Joined: Saturday 18 July 2020 10:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: P1 Smart Meter USB - Gas won't parse

Post by sunflare »

Thank you, FireWizard. This works!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest