Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Question

Posted (edited)


This Quickapp retrieves energy consumption, energy production, gas and water usage from the (P1 Monitor) energy, gas and water meter. 
This Quickapp uses the software of ztatz.nl to get the values from your smart energymeter. 
The ztatz plug-and-play software can run on a Raspberry Pi or in a Docker container. 

 

The Energy consumption and energy production are added to the HC3 energy panel. 
Use the child devices Todays Consumption and Todays Production to store energy data (kWh) in the Energy Panel. 
And use the child devices Consumption and Production for instantaneous power (Watt) in the Energy Panel calculations. 

 

 

Please login or register to see this attachment.

 

Child Devices for:

  • Consumption (Watt) (input for instantaneous power in Energy Panel calculations)
  • Production (Watt) (input for instantaneous power in Energy Panel calculations)
  • Todays Consumption (kWh) (input for energy panel)
  • Todays Production (kWh) (input for energy panel)
  • Waterflow (Liter)
  • Consumption High (kWh)
  • Consumption Low (kWh)
  • Production High (kWh)
  • Production Low (kWh)
  • Consumption L1 (Watt)
  • Consumption L2 (Watt)
  • Consumption L3 (Watt)
  • Production L1 (Watt)
  • Production L2 (Watt)
  • Production L3 (Watt)
  • Ampere L1 (Amp)
  • Ampere L2 (Amp)
  • Ampere L3 (Amp)
  • Voltage L1 (Volt)
  • Voltage L2 (Volt)
  • Voltage L3 (Volt)
  • Total Gas (m³)
  • Total Waterflow (m³)

 

Please login or register to see this image.

/monthly_2021_08/P1-monitor-1.png.98df79a87caffc2b6a1bc8e44bc86bf1.png" />   

 

Please login or register to see this attachment.


 

 

Interval: 
It is possible to process messages from the smart meter every second. Of course, this is only possible if the smart meter actually sends a message every second. This can be turned on via the ztatz software P1 port configuration page via the "maximum processing speed" option. Note that this gives a higher load on the Rpi (or Docker). It has been tested on the Rpi3/Rpi4 and works well on it. Older or other RPIs have not been tested.

The P1 Monitor QuickApp uses 2 API calls each cycle, and if you also use Waterflow, 3 API calls each cycle. With an interval setting of 10 seconds there is an API call every 5 seconds (and with Waterflow enabled, every 3.33 seconds). So the fastest interval setting will probably be 3 seconds with Waterflow and 2 seconds without Waterflow. 

 

Ztatz software:

Please login or register to see this link.

Docker container based on the ztatz.nl software: The container version has the same functionality as the full version for the Raspberry Pi. Docker container:

Please login or register to see this link.

 

I use a Raspberry Pi Smart Meter Cable Starter Kit

  • Raspberry Pi 4 Model B Rev 1.1 2GB
  • 32GB Micro SDHC
  • Smart Meter cable 
  • P1 Monitor software from: 

    Please login or register to see this link.

     
  • Water Flow Sensor (M18 8mm sensing DC 5V NPN NO LJ18A3-8-Z/BX-5V cylinder inductive proximity sensor switch work voltage 5VDC special for MCU)

 

 

 

903B0D58-BD03-487D-B599-093590680363.jpeg.4c5501ca5fafa28892e0ac7c64e2c722.jpeg             waterflow-sensor.png.c6d38b52168dc6cd5e9aa0f0add2893f.png

 

Version 2.0 (8th January 2023)

  • Changed child device types for optimal support of the Energy Panel: 
    •   kWh -> com.fibaro.energyMeter
    •   ampere/voltage -> com.fibaro.electricMeter
    •   Watt -> com.fibaro.powerMeter
    •   gas -> com.fibaro.gasMeter
    •   water -> com.fibaro.waterMeter
  • Removed Power device calculation
  • Removed child devices for gross consumption and device consumption
  • Changed code to multi file
  • Added for translations for English, French, Polish and Dutch

 

Version 1.6 (8th January 2022)

  • Changed the waterflow algoritme to show more stable and more acurate measurements
  • Small change in the code for checking existance of waterflow sensor
  • Changed the Waterflow unit from Liter to L/min
  • Added experimental net consumption to power 
  • Added Lasthour gas to labels
  • Changed the API request for status to json output


Version 1.5 (4th September 2021)

  • Support of new Energy Panel: 
    • Changed Child device Net Consumption to Main device with type com.fibaro.powerSensor (value can be positive or negative)
    • Added Child device Todays Consumption to show the daily energy consumption in kWh
    • Added Child device Todays Production to show the daily energy production in kWh
    • Changed Child device Consumption High and Low to com.fibaro.energyMeter (kWh in property "value"; "rateType" = consumption). These values will be shown in the new energy panel. 
    • Changed Child device Production High and Low to com.fibaro.energyMeter (kWh in property "value"; "rateType" = production). These values will be shown in the new energy panel. 
    • Added automaticaly change rateType interface of Child device Consumption High and Low to "consumption" and Production High and Low to "production
    • Changed Child device Consumption and Production to type com.fibaro.powerSensor (Watt) to show power graphs
    • Changed Child device Consumption L1, L2 and L3 and Production L1, L2 and L3 to type com.fibaro.powerSensor (Watt) to show power graphs
  • Additional changes:
    • Added todays Maximum consumption and todays Maximum production and timestamp to the label text and Child device log text
    • Added todays Maximum consumption and todays Maximum production automatic format measurement to W, Kw, MW or GW
    • Added todays Consumption low and high (kWh) and todays Production low and high (kWh) to the label text and Child devices log text
    • Added todays Consumption of gas in the label text and Child device log text
    • Added Timestamp in format dd-mm-yyyy hh:mm:ss to log of Main device and labels
    • Placed production below consumption in the labels
    • Solved bug when Production is higher than Consumption with calculation of Gross Consumption (Gross Consumption = Net Consumption minus or plus Device Consumption)

 

Version 1.4 (11th April 2021)

  • Added Child Devices Waterflow and Total Waterflow

 

Version 1.3 (13th February 2021)

  • Added Child Devices for Voltage L1 L2 L3

 

Version 1.2 (6th February 2021)

  • Added a lot of Child Device

 

Version 1.1 (18th January 2021)

  • Solved a bug when powerID = 0

 

Version 1.0 (15th Januari 2021)

  • Changed routine te get Energy Device ID's fast (no more maxNodeID needed)
  • Added "Update Devicelist" button to update the Energy devicelist
  • Added Tarifcode High and Low (and empty for flat fee)
  • Rounded Consumption and Production to zero digits Watt
  • Added Quickapp variable for debug level (1=some, 2=few, 3=all). Recommended default value is 1. 
  • Re-aranged the labels
  • Cleaned up some code

 

Version 0.3 (16th August 2020)

  • Added Quickapp variables for easy configuration
  • Added Power Production
  • Changed method of adding QuickApp variables, so they can be edited


Tested on

  • P1 Monitor version: 20221105 V2.1.0
  • Raspberry Pi model: Raspberry Pi 4 Model B Rev 1.1
  • Linux-5.15.74-v7l+-armv7l-with-glibc2.31
  • Python version: 3.9.2

 

QuickApp variables (mandatory, they will be automatically added with the default values):

  • IPaddress = IP address of your P1 monitor
  • interval = Number in seconds, the P1 Monitor normally is updated every 10 seconds, sometimes even faster
  • debugLevel = Number (1=some, 2=few, 3=all) (default = 1)
  • waterMeter = Existance of watermeter true or false (default = false)
  • language = Preferred language (default = en) (supported languages are Engish (en), French (fr), Polish (pl) and Dutch (nl))

 

Download the QuickApp here (download the file and un-zip):

Please login or register to see this link.

or Fibaro Marketplace: 

Please login or register to see this link.

 

P1-monitor-logo.png.c3a78cf6227528f64f6a2aa204b1e5c9.png

 

How to install: 

  1. Open the Configuration Interface
  2. Go to Settings > Devices
  3. Click  +
  4. Choose Other Device
  5. Choose Upload File
  6. Choose file from your computer with .fqa

 

 

 

 

 

Edited by SmartHomeEddy
  • Like 3

Recommended Posts

  • 0
  • Inquirer
  • Posted (edited)

    A new version of the P1 Monitor QuickApp is available. No need to install a new QuickApp, you can copy-paste the main code. 

     

    Version 1.6 (8th January 2022)

    • Changed the waterflow algoritme to show more stable and more acurate measurements
    • Small change in the code for checking existance of waterflow sensor
    • Changed the Waterflow unit from Liter to L/min
    • Added experimental net consumption to power 
    • Added Lasthour gas to labels
    • Changed the API request for status to json output

    Enjoy !!!

    Edited by SmartHomeEddy
    • 0
    Posted
    17 hours ago, SmartHomeEddy said:

    Version 1.6 (8th January 2022)

    No problems, here

    Thanks for the good work. ??

    • Thanks 1
    • 0
    Posted

    Hey guys, i'd like to know. How does the gas flow perform from the p1 port.

     

    I use a rooted toon, but it seems the data for gas flow seems to stall or is

    sometimes about up to 1 hour slow in updating.  So kind off useless.

    • 0
  • Inquirer
  • Posted

    Although it depends on how Toon calculates the gas usage (the P1 Monitor uses the ztatz.nl software) the Gasmeter sends once every 5 minutes up to once an hour. That depends on your Smartmeter and Gasmeter. 

     

    • 0
    Posted
    4 minutes ago, SmartHomeEddy said:

    Although it depends on how Toon calculates the gas usage (the P1 Monitor uses the ztatz.nl software) the Gasmeter sends once every 5 minutes up to once an hour. That depends on your Smartmeter and Gasmeter. 

     

     

    Aha, oke. The strange thing is that sometimes Toon gives almost directly the

    correct number. And your Toon quicapp picks that up instantly. But sometimes,

    it takes almost an hour to refresh the data from the gasmeter. 

     

    So it looks like the CV burner is constant working, but it isnt :)

    • 0
  • Inquirer
  • Posted (edited)

    The communications between the Gasmeter and the Smartmeter isn't reliable in case of the interval. It is reliable for the amount of gas.

     

    I also tried with the P1 Monitor to get the actual gas usage at this moment, but that wasn't possible. 

     

     

     

    However, there is a solution for you, get a CV burner on electricity (just kidding) 

     

     

     

     

    Edited by SmartHomeEddy
    • 0
    Posted (edited)

    Gas is updated every time there is a read out.

    In use ztatz on a raspberry and the QA, P1 Monitor

     

    Have an Enexis ZIV electricity and Honeywell Gas meter

    Edited by Flash
    • 0
    Posted
    21 minutes ago, SmartHomeEddy said:

    However, there is a solution for you, get a CV burner on electricity (just kidding) 

     

     

    Well, I had to make a choice. Either charge the 3 teslas or get off the gas. I chose a Renault.

     

     

    14 minutes ago, Flash said:

    Gas is updated every time there is a read out.

    In use ztatz on a raspberry and the QA, P1 Monitor

     

    Not sure if "every time there is a read out" is fast enought for my likings.

     

    But then again, i just might need to try that ztatz software soon, just to see

    how it performs compared to the Toon/p1 readout.

    • 0
  • Inquirer
  • Posted
    34 minutes ago, Flash said:

    Gas is updated every time there is a read out.

    In use ztatz on a raspberry and the QA, P1 Monitor


    The P1 monitor reads out every second, but the Smartmeter isn’t updated from the Gasmeter with that read out.  

    • 0
    Posted
    1 hour ago, SmartHomeEddy said:


    The P1 monitor reads out every second, but the Smartmeter isn’t updated from the Gasmeter with that read out

     

    You're correct.

    Did a stopwatch metering. Looks like the electricity is updated every 10 seconds, and the gas boiler ever 5 min. (made sure the boiler was on)

    This was just a short try for fun. no scientific set-up. ?

    Did the test for approx. 30 minutes. Now its very hot in the bathroom. ?

    • Like 1
    • 0
  • Inquirer
  • Posted (edited)

    👍👍👍

     

     

    Edited by SmartHomeEddy
    • 0
  • Inquirer
  • Posted (edited)

    (Tested with the latest software from Ztatz version 20220920 V2.0.0)

     

     

    Edited by SmartHomeEddy
    • 0
  • Inquirer
  • Posted

    I am working on an update of the P1 Monitor quickapp. 

     

    The new version includes translations for different languages. If you want your language included, please let me know. 

    • 0
  • Inquirer
  • Posted (edited)

    A new version of the P1 Monitor quickapp is available.

     

    Version 2.0 (8th January 2023)

    • Changed child device types for optimal support of the Energy Panel: 
      •   kWh -> com.fibaro.energyMeter
      •   ampere/voltage -> com.fibaro.electricMeter
      •   Watt -> com.fibaro.powerMeter
      •   gas -> com.fibaro.gasMeter
      •   water -> com.fibaro.waterMeter
    • Removed Power device calculation
    • Removed child devices for gross consumption and device consumption
    • Changed code to multi file
    • Added for translations for English, French, Polish and Dutch

     

    The child devices changed, so you need to replace your current quickapp with a new one. 

     

    Please login or register to see this attachment.

     

    (And after install, don't forget your Energy panel setup of the child devices)

     

     

    Edited by SmartHomeEddy
    • 0
    Posted

    Hi

    @SmartHomeEddy

    It's a very good QA, thanks !

     

    But there is a strange situation that I don't understand. On the energy panel, for consumption, the total is not real because it is very different from reality.
    When I turn on the electric oven which consumes 2000w, the display suddenly rises to more than 6000 w
    I attach 3 screenshots, 1 of the measurement with the E4U module from Noks, 1 of the P1 monitor app, and 1 of the P1 with Yubii (your QA)
    The info in on PC with Home Center of the HC3 is correct and corresponds to reality.
    Any idea on the reason for this big difference?

     

    E4U (Noks) :

    Please login or register to see this image.

    /monthly_2023_02/image.png.38d43c3eea407be9b34cd4d96e3a0d30.png" />

     

    P1 Monitor app :

    Please login or register to see this attachment.

     

    Home Center HC3 (on PC) :

    image.png.cb0db80ac51fc897b1fa9cef6eeeffdb.png

     

    Your QA with Yubii app :

    image.png.cd89f0d6007bfb6cce67cfbc5058526f.png

    • 0
    Posted

    Hi,

    now with the new version of yubii 1.18.1, the current power data displayed is correct and same as P1 monitor app and E4U. So, I suppose, the problem was with the old yubii app ;-)

    • 0
  • Inquirer
  • Posted

    Could be the Yubii app.
     

    But it could also be the settings of the “Use instantaneous power in Energy Panel calculations”. All devices with the power (Watt not kWh) option have this setting.

     

    It is important to check all your power devices for this setting. The power (Watt) consumption can be measured by more than one device, like a child device of the P1 QuickApp and a wall plug. You should only set ONEUse instantaneous power in Energy Panel calculations”, otherwise the power (Watt) consumption counts double or even triple. 

    • 0
    Posted

    Thank you for the details. I didn't change anything in the QA when the display became correct again with the new version of yubii.

    So I think the new version of yubii has corrected something at this level
    Last year I actually had several items that had the box checked for: "Use instantaneous power in Energy Panel calculations"
    And the data was obviously completely wrong!
    Since the beginning of this year I fixed this and as you suggested, there is only one QA device (P1 Monitor) which has the box checked.
    In this regard, I would have liked to be able to erase the erroneous data for the past year so that the totals are correct, but I have not found a way to do this. An idea ?

     

    Please login or register to see this image.

    /monthly_2023_03/image.png.5a05da98595fd892ebc8b4d4d23fd63b.png" />

    • 0
  • Inquirer
  • Posted (edited)

    Maybe the newer HC3 formware solved your problem.

     

    Please login or register to see this image.

    /monthly_2023_03/image.png.0b42ec44e371c1c286b99ba3282c2fc4.png" />

     

    You can select the device(s) for power consumption and production (Watt). 
     

    I haven’t found a way to delete only the power values. You can clear all energy values of devices in the panel settings, but then all energy values will be gone. 
     

     

    Edited by SmartHomeEddy
    • 0
    Posted

    Ok, if there is no way to erase just one year, then I leave the file as it is.

    I made the selection as shown below, is that correct?

    The numbers correspond to the index of the smart meter
    181 and 182 for consumption, and 281 and 282 for injection

     

    Please login or register to see this image.

    /monthly_2023_03/image.png.7d602167e77ee63031031d021a3aefd2.png" />

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...