Created At

Jun 04, 2022

Last Update

Jun 07, 2022


HC 3 Lite, HC 3





Type Quick App

P1 Smart gateway QuickApp



The WiFi P1 Smart Gateway ( can not be used by any of the sofar existing P1 interfaces on Marketplace. 

Hence I made this simple interface using the MQTT protocol. 


This is my third QuickApp, any suggestion to make it better highly appreciated. 



  • Tested on Fibaro Home Center HC3L, HC3 and Yubii Home with firmware 5.111.48

  • A P1 Smart Gateway ;-) 



  • MQTT configuration via User Variables
  • Total electricty usage in kWh
  • Current consumption in Watt
  • Hourly consumption in Watt
  • Gasmeter in m3
  • Firmware update status indicator



Please check Fibaro User Manual for QuickApps.

Upload file in the device section. 

In "general" settings, choose the P1 Smart Gateway as the main energy device



  • P1 Smart Gateway.fqa
  • Icon for gas meter



Permission to use, copy, modify and distribute this software and its documentation for educational, research, personal use and non-profit purposes, without fee and without a signed licensing agreement is hereby granted, provided that the copyright notice, with "Terms and conditions" and "Disclaimer" appear in all copies, modifications and distributions. It is strictly forbidden to sell, rent, lease and/or lend this software for profit without prior consent from the Author.



This software is provided by copyright owner "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author and distributor be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Fibar Group S.A. and their employees are not responsible for support of the ABC VD. 

4 Comments,  Want to add comment please login

Hi Thijs, Indeed you need a MQTT broker such as mosquito on the raspberry pi. You need this to make the smart gateway work i.e. connect to mqtt to do this you can find on the smart gateways website. The parameters for the Fivaro quick app are also for the broker, and need to be the same of course. The broker is the middle man so to speak.


I hope you can help me. I try to install this on fibaro, but what should I put in the variables about MQTT? Do I have to setup a separate MQTT broker or is the smartgateway a broker and what are the variables?


Hoi Geert, Difficult to judge what goes wrong. But my best guess is that Fibaro is trying to re-create the child devices. Could you check if the 2 child devices are created? (i.e. Consumption & Gas). If that is the case, you could comment out line 97 in the code with "--" It should then look like: -- self:setupChildDevices() -- Setup the Child Devices Alternatively, you could try to create a new QuickApp (type Energy meter) and copy/paste the full program text into it. This has given me different results in the past compared to uploading a QuickApp file. Let me know if this did something for me. PS. My watermeter sits outside the house - 20 m away - so I do not easily get a cable there. But if you have this one working, it should be easy to adapt. Some simple renaming and linking to the right MQTT topics should be enough. Let's first see if you get this one up and running.


Hello Jeroen, I'm trying to implement this but it has been a pain in the ***. :-) After several tries I get the following error: [15.07.2022] [17:59:01] [ERROR] [QUICKAPP35]: QuickApp crashed [15.07.2022] [17:59:01] [ERROR] [QUICKAPP35]: main.lua:239: attempt to call a nil value (field '?') It crashes on the code: local childObject = _G[className](child) -- Create child object from the constructor name Is there also a version for the water meter comming? :-D

Load more comments