All in One NPN Watermeter and P1 Smartmeter

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
sincze
Normal user
Posts: 23
Joined: 15 Jul 2016, 12:54

All in One NPN Watermeter and P1 Smartmeter

#1 Post by sincze » 19 Aug 2018, 13:53

A friend of mine created this nice little board.
ESP_AIO.jpg
1
ESP_AIO.jpg (182.25 KiB) Viewed 643 times

It deals with a (NPN) pulse counter for watermeter and deals with the P1 port of my Smartmeter. The advantage is.. It is now wirelessly accessible. :D


The board was designed to use MySensors, but as this is an ESPEasy forum... I wanted to give it a try.

Main idea is to setup a ser2net server to pass the P1 data on to Domoticz for calculation.

And setup a pulse counter to read my watermeter.

It has the following rules.
Workings:
It just counts every pulse from the watermeter and stores that value in a dummy counter. Every minute the dummy counter data is send to Domoticz. In this way you have flow (amount of liters / minute) as well in domoticz.

Code: Select all

//------------ INITIAL RELEASE
On System#Boot do     							// When the ESP boots, do
   TaskValueSet 4,1,0							// TaskValueSet TASKnr,VARnr,Value, Reset the Liters counter to 0
   TimerSet,1,60      								// Set Timer 1 for the next event in 60 seconds
EndOn
 
On Watermeter#Count do						// When Pulse is detected
	if [Watermeter#Count] > 0
		TaskValueSet 4,1,[Watermeter#Count]		// Set the Pulse to the Liters dummy sensor
	endif
EndOn

on Rules#Timer=1 do  								// When Timer 1 expires, do
	if [Liters#Liters] > 0							// Only send value if amount of Liters > 0 else 'keep the change ;-)'
		SendToHTTP 192.168.2.89,8080,/json.htm?type=command&param=udevice&idx=<youridx>&nvalue=0&svalue=[Liters#Liters]
		TaskValueSet 4,1,0						// TaskValueSet TASKnr,VARnr,Value, Reset submitted Liters counter to 0
	endif
	TimerSet,1,60      							// Set Timer 1 for the next event in 60 seconds
endon
I've setup a pdf with the instructions. But seem unable to add it to this post. If people are interested I can share it.

MaikelK
Normal user
Posts: 10
Joined: 20 Jun 2017, 19:56

Re: All in One NPN Watermeter and P1 Smartmeter

#2 Post by MaikelK » 20 Aug 2018, 18:37

Yes, highly interested!

sincze
Normal user
Posts: 23
Joined: 15 Jul 2016, 12:54

Re: All in One NPN Watermeter and P1 Smartmeter

#3 Post by sincze » 20 Aug 2018, 19:14

MaikelK wrote:
20 Aug 2018, 18:37
Yes, highly interested!
No problem
Can you send me a PM with your mail. :D
I'll attach it to the email as it seems I am unable upload the document as .pdf unfortunately.

Jazzle
Normal user
Posts: 21
Joined: 07 Mar 2017, 11:12

Re: All in One NPN Watermeter and P1 Smartmeter

#4 Post by Jazzle » 20 Aug 2018, 19:54

Nice, interested too!
Domoticz @ Raspberry Pi 3 - RFXcom @ 433MHz - RFLink @ 868MHZ - ESP8266

sincze
Normal user
Posts: 23
Joined: 15 Jul 2016, 12:54

Re: All in One NPN Watermeter and P1 Smartmeter

#5 Post by sincze » 20 Aug 2018, 20:07

Jazzle wrote:
20 Aug 2018, 19:54
Nice, interested too!
No problem
Can you send me a PM with your mail. :D
I'll attach it to the email as it seems I am unable upload the document as .pdf unfortunately.

TD-er
Normal user
Posts: 1154
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: All in One NPN Watermeter and P1 Smartmeter

#6 Post by TD-er » 21 Aug 2018, 08:12

If you like, I can also add it to the wiki as an example project.

Jazzle
Normal user
Posts: 21
Joined: 07 Mar 2017, 11:12

Re: All in One NPN Watermeter and P1 Smartmeter

#7 Post by Jazzle » 21 Aug 2018, 08:18

sincze wrote:
20 Aug 2018, 20:07
Jazzle wrote:
20 Aug 2018, 19:54
Nice, interested too!
No problem
Can you send me a PM with your mail. :D
I'll attach it to the email as it seems I am unable upload the document as .pdf unfortunately.
Sorry, did send a pm directly after my post. Now i see it is still in my outbox

my mail address is dijkstra underscore jasper at outlook dot com
Last edited by Jazzle on 21 Aug 2018, 12:05, edited 1 time in total.
Domoticz @ Raspberry Pi 3 - RFXcom @ 433MHz - RFLink @ 868MHZ - ESP8266

MaikelK
Normal user
Posts: 10
Joined: 20 Jun 2017, 19:56

Re: All in One NPN Watermeter and P1 Smartmeter

#8 Post by MaikelK » 21 Aug 2018, 11:53

My Pm is also hanging in the outbox.
If you could send it to maikel underscore Kooij at hotmail dot com that would be nice!

andreo
Normal user
Posts: 8
Joined: 22 Sep 2015, 23:56

Re: All in One NPN Watermeter and P1 Smartmeter

#9 Post by andreo » 15 Sep 2018, 23:48

Please send me a copy of your pdf, send you a PM
Last edited by andreo on 01 Oct 2018, 21:34, edited 1 time in total.

User avatar
grovkillen
Normal user
Posts: 2240
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: All in One NPN Watermeter and P1 Smartmeter

#10 Post by grovkillen » 16 Sep 2018, 07:34

andreo wrote:
15 Sep 2018, 23:48
My PM is also hanging in the outbox.
Please send me a copy of your pdf to oerlemans dot andre AT gmail dot com
They will "hang" there until the recipient has open it. Not logical I know but that's phpBB for ya :)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests