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


  • 0

SmartHomeEddy

Question


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
Link to comment
Share on other sites

Recommended Posts

  • 0
  • Inquirer
  • The above two "d'énergie" options are for the Energy Panel in terms of kWh. I only have one for each option, the P1 Monitor "Todays consumption" and for the second option the P1 Monitor "Todays Production" child devices. 

     

    The lower two "d'énergie instantanée" options are for the Energy Panel (and Yubii app on top of the screen) in terms of power consumption Watt. I don't have any option selected over there, but I only enabled the instantaneous power option in the device advanced settings for two devices, the P1 Monitor "Consumption" and the P1 Monitor "Production" child devices. 

    Link to comment
    Share on other sites

    • 0

    Ok,

    I canceled the choice of the 2 lower boxes, and left checked the box "enabled the instantaneous power option" in the device advanced settings for two devices.
    The display in yubii remains correct.

     

    But I still have a question about the choice of the 2 upper boxes: seeing "total consumption" in the window, I thought it was the total on the meter?
    (it would be more precise to have a title like "total daily consumption" to avoid misinterpretations ;-))

    but apparently according to your explanation, it would be the consumption of the day?


    Hence my error in indicating the 2 totalizer indexes of the counter ?
    In fact I have to select "daily consumption" (and "daily production") ? Is it correct ?

     

    image.png.b3c99dbd7449f330bfea82239b50d9b7.png

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • The energy panel calculates with the difference between the prevouis values and current value. So you could use a total value. The value doesn’t have to be zero at midnight. 
     

    So you also could use the total consumption high combined with the total consumption low and for production the total production high and total production low. 
     

    The todays values of the P1 Monitor reset at midnight. The energy panel can handle that. So the devices for the energy panel don’t have to be daily values. 
     

    (Some more background. In the Tibber Monitor QuickApp I had to make a workaround for zero values. If a QuickApp suddenly reports a zero value to the energy panel en the next value is a correct value, then the energy panel could calculate the energy usage from zero to that new value. That would cause higher figures in the energy panel. There is however a treshold where above that difference old and new value the energy panel ignores the calculation. Zero values could seriously damage your energy usage panel calculations.)


     

     

    Link to comment
    Share on other sites

    • 0

    Ok thanks 👍, I understand better now.

    I restore the high and low consumption/production.

     

    About erasing incorrect past data, it must be possible with this function, right?

    Example : from January 1, 2022 to December 31, 2022

     

    Please login or register to see this image.

    /monthly_2023_03/image.png.e5e477df0935e25212b1daff5abc3f85.png" />

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Yes, haven't used that function, but it should erase the values. I think it will do both kWh as Watt, but don't know for sure. 

    Link to comment
    Share on other sites

    • 0

    yes 👍, it works perfectly and solves the bad data problem that I had previously. In addition, you can ask before erasing to take this into account in the calculations with "compensate for historical data"

    now I don't have astronomical totals anymore 😄

     

    Link to comment
    Share on other sites

    • 0

    Hi,

    I just noticed an anomaly if there is no selection for "instant energy", the result in yubii is doubled.
    so i checked "instantaneous consumption", and now the value displayed in yubii is correct. ;-)
    The same goes for instantaneous energy production.

    image.png.b1f4d5d8068bcfd59c5c17f9f006caed.png

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 9 hours ago, JLT007 said:

    if there is no selection for "instant energy", the result in yubii is doubled

     

    I think the settings in the panel override the settings of the individual devices. So I think there are two devices with the instant energy option enabled. 

    Link to comment
    Share on other sites

    • 0
    5 hours ago, SmartHomeEddy said:

     

    I think the settings in the panel override the settings of the individual devices. So I think there are two devices with the instant energy option enabled. 

     

    Yes 👍, thanks,

     

    Devices "P1 Monitor" and "instant consumption" had the "instant energy" option activated !


    If I deactivate that of the "instantaneous consumption" device or that of the "P1 Monitor", leaving the other active, effectively, if nothing is chosen in "instantaneous electricity consumption meter", the display of the instantaneous consumption in yubii is correct 👍 !

     

    But question: is it valid to check only in the "Instantaneous consumption" and "Instantaneous production" devices, and not only in "P1 Monitor"?

    (Since in P1 Monitor, "Consumption" is selected, and not "Production")

     

    Ex. for "instantaneous consumption" device and for "Instantaneous production" device :

    Please login or register to see this image.

    /monthly_2023_03/image.png.5121c680baf94c0b79ee76724a392599.png" /> image.png.6d630c99435b0f5dea1b55898715b987.png

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • The P1 Monitor value can be positive or negative, depending on the amount of sun :-)  

     

    So that (main) device is not the device you want to select for instantaneous power.  

    Only use the (child) devices "consumption" and "production". 

    • Like 1
    Link to comment
    Share on other sites

    • 0

    After rebooting my HC3, it looses the setting to save the statistics to the energy database. Are more people experiencing this ? (it's on the advanced tab of the device)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 21 hours ago, GeeMoney said:

    After rebooting my HC3, it looses the setting to save the statistics to the energy database. Are more people experiencing this ? (it's on the advanced tab of the device)


    Never experienced that in the P1 Monitor QuickApp (or any other). 
     

    Does it also happens when you restart the QuickApp?

    Link to comment
    Share on other sites

    • 0

    Hi, I use P1 Smile from Plugwise. I want to use this to see my total consumption. How can I set up Plugwise P1 meter in Fibaro?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 52 minutes ago, Molla said:

    Hi, I use P1 Smile from Plugwise. I want to use this to see my total consumption. How can I set up Plugwise P1 meter in Fibaro?


    Hi Molla, I actally have no idea. I don’t know the P1 Smile. 

    Link to comment
    Share on other sites

    • 0
    On 4/4/2023 at 8:15 PM, SmartHomeEddy said:


    Hi Molla, I actally have no idea. I don’t know the P1 Smile. 

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0

    Hi,

    I see a strange situation with "balance"
    The value of "Balance" displayed in the "Energy - General" window does not correspond to that given by the "Balance" ("Equilibre" in french) object for creating a scenario (value which is always higher).

    Please login or register to see this image.

    /monthly_2023_05/image.png.e4084937728acf2ccf6e55bbce01647d.png" />

    Do you have any idea about the reason ?

    Thanks

    JL

    Edited by JLT007
    Link to comment
    Share on other sites

    • 0

    mmm, maybe a translation error on my part ?

    the scenario I created :

    Please login or register to see this image.

    /monthly_2023_05/image.png.ff421fbd1bb6c9571aa48fdf54ada968.png" />

     

    When the value exceeds 15 kWh, I receive the following message :

     

    image.png.8bc36f96128ad75399c22c256d67c81a.png

     

    BUT it is incorrect compared to the value displayed in the "Energy" page (Balance : 10,61 kWh) :

     

    Please login or register to see this attachment.

     

    And this error grows with each alert of more than 5kWh (I made copies of the 15kWh scenario for 20, 25, 30, 35...)

    These alerts are scheduled daily

     

    I don't know if there is a link but we can't find in the devices the source for "Balance/Equilibre":

    "Injection" seems to correspond to "Production".
    It's a word comprehension problem I guess.
    Production is what is injected into the network.
    The confusion comes from the table in "Energy" which says "Prodution" - "Consumption" - "Balance"

     

    "Balance" being a virtual data because the "Production" (smart meter) is the 281/282
    and the "Consumption" is 181/182
    "Balance" being only a fictitious subtraction between "Production" and "Consumption" because with smart meters we pay what we consume (unlike old meters which turn upside down in case of production)    

    But all this does not explain the big difference in value.
    I will modify the scenarios by using "Production" instead of "Balance"

     

    Thanks

     

     

     

    Edited by JLT007
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Maybe a strange translation, you have a block scene in English. But my French isn’t good enough to understand your conditions. Maybe set the language to English to have a better understanding?
     

     

    Link to comment
    Share on other sites

    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...