Watermeter lezen met raspberry en Inductieve NPN sensor Topic is solved
Moderators: leecollings, remb0
-
- Posts: 111
- Joined: Thursday 08 December 2016 9:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Hi,
I have the water meter working, great instruction, thanks for this.
I was now wondering if I could use the same instruction to do the gasmeter.
Use of course different GPIO pins to read the values.
I found this piece of hardware:
https://www.tinytronics.nl/shop/nl/sens ... sor-module
And should work with Raspberry PI. As I am a complete nobe on reading pins, programing etc. I was thinking to hook it up and use the same scripts etc. as for the water meter.
Anyone any thoughts on this? Otherwise I will just go for it and try.
Bernard
I have the water meter working, great instruction, thanks for this.
I was now wondering if I could use the same instruction to do the gasmeter.
Use of course different GPIO pins to read the values.
I found this piece of hardware:
https://www.tinytronics.nl/shop/nl/sens ... sor-module
And should work with Raspberry PI. As I am a complete nobe on reading pins, programing etc. I was thinking to hook it up and use the same scripts etc. as for the water meter.
Anyone any thoughts on this? Otherwise I will just go for it and try.
Bernard
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
I use a this on my watermeter (as can be seen earlier in this topic, I could not get the iduction-sensor to work with the disc on the meter).
It works well, and the RPi has no problem with it whatsoever. I do have additional reading every now and then, one thing to be very carefull about using this is the shielding of the led's. Since this just measures if the sensor (one of the 2 little balls) receives light from the led (the other little ball), the "leaking" of this light is something that it is sensitive for.
I don't know if you have a smart meter, but if you do chances are you can read your gas-meter with a P1-cable from that. That would be much more reliable.
It works well, and the RPi has no problem with it whatsoever. I do have additional reading every now and then, one thing to be very carefull about using this is the shielding of the led's. Since this just measures if the sensor (one of the 2 little balls) receives light from the led (the other little ball), the "leaking" of this light is something that it is sensitive for.
I don't know if you have a smart meter, but if you do chances are you can read your gas-meter with a P1-cable from that. That would be much more reliable.
-
- Posts: 204
- Joined: Monday 08 May 2017 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Belgium
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Bernard, my father in law is running the same setup with that TCRT5000 sensor on a Belgian gasmeter from Schlumberger. It's working great. The sensor works the same. it gives 0s and 1s.Benneton wrote: ↑Sunday 10 December 2017 14:22 Hi,
I have the water meter working, great instruction, thanks for this.
I was now wondering if I could use the same instruction to do the gasmeter.
Use of course different GPIO pins to read the values.
I found this piece of hardware:
https://www.tinytronics.nl/shop/nl/sens ... sor-module
And should work with Raspberry PI. As I am a complete nobe on reading pins, programing etc. I was thinking to hook it up and use the same scripts etc. as for the water meter.
Anyone any thoughts on this? Otherwise I will just go for it and try.
Bernard
-
- Posts: 111
- Joined: Thursday 08 December 2016 9:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Hi Sammyke,
Thanks I will order and try to get it working if these scripts do not do the trick.
Will keep you all posted.
Bernard
Thanks I will order and try to get it working if these scripts do not do the trick.
Will keep you all posted.
Bernard
-
- Posts: 111
- Joined: Thursday 08 December 2016 9:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Hi Hobby Bob,
No I do not have smart meter for gas, water & electric.
For electric I use the youless, device, works very simple out of the box.
For gas I could not find similar, so I will count the silver dot on the 6 in my meter.
Thanks for the idea.
Bernard
No I do not have smart meter for gas, water & electric.
For electric I use the youless, device, works very simple out of the box.
For gas I could not find similar, so I will count the silver dot on the 6 in my meter.
Thanks for the idea.
Bernard
-
- Posts: 111
- Joined: Thursday 08 December 2016 9:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
All,
Ordered the TCRT5000 module and installed it today.
Did follow same process as installing the watermeter sensor.
Changed ofcourse the GPOI pins, file names and counter name.
Up until now it works, need to check how stable/precise it will be.
Bernard
Ordered the TCRT5000 module and installed it today.
Did follow same process as installing the watermeter sensor.
Changed ofcourse the GPOI pins, file names and counter name.
Up until now it works, need to check how stable/precise it will be.
Bernard
-
- Posts: 8
- Joined: Friday 06 January 2017 21:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Hi all,
No really an expert in all this, but managed to get my watermeter working with the python script and this https://www.kiwi-electronics.nl/inducti ... anel-mount sensor.
All setup on a spare / test raspberry pi, when all works well the sensor will be connected to my slave pi in the metercabinet.
But now i am looking for a good way too get my reading from the slave pi to the master pi.
Anyone managed to get this working?
No really an expert in all this, but managed to get my watermeter working with the python script and this https://www.kiwi-electronics.nl/inducti ... anel-mount sensor.
All setup on a spare / test raspberry pi, when all works well the sensor will be connected to my slave pi in the metercabinet.
But now i am looking for a good way too get my reading from the slave pi to the master pi.
Anyone managed to get this working?
-
- Posts: 80
- Joined: Saturday 19 March 2016 21:12
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Look, this is a nice addon for my installation and not expensive.
I have only a couple of issues. My watermeter is on the other side of the house inside the basement, approx 7 meters from my 'meterkast', inside the meterkast i have my synology with domoticz on it. Anyone any idea if i can extend the cable from the watermeter for 7 meters and ig still can read the data?
I have a raspberry pi as printserver and could connect to it, but can i transfer the data? I can install another domoticz installation on it but how can i sync this. Hope anyone has a situation like this and solved it.
Edit: the second question seems to be answered.
https://www.domoticz.com/wiki/Setting_up_Device_sharing
Now the first one about the length.
I have only a couple of issues. My watermeter is on the other side of the house inside the basement, approx 7 meters from my 'meterkast', inside the meterkast i have my synology with domoticz on it. Anyone any idea if i can extend the cable from the watermeter for 7 meters and ig still can read the data?
I have a raspberry pi as printserver and could connect to it, but can i transfer the data? I can install another domoticz installation on it but how can i sync this. Hope anyone has a situation like this and solved it.
Edit: the second question seems to be answered.
https://www.domoticz.com/wiki/Setting_up_Device_sharing
Now the first one about the length.
- bbqkees
- Posts: 407
- Joined: Sunday 17 August 2014 21:01
- Target OS: Linux
- Domoticz version: 4.1x
- Location: The Netherlands
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
7m might work. But make sure you provide enough voltage for the sensor.clubeddie wrote: ↑Monday 05 February 2018 23:46 Look, this is a nice addon for my installation and not expensive.
I have only a couple of issues. My watermeter is on the other side of the house inside the basement, approx 7 meters from my 'meterkast', inside the meterkast i have my synology with domoticz on it. Anyone any idea if i can extend the cable from the watermeter for 7 meters and ig still can read the data?
I have a raspberry pi as printserver and could connect to it, but can i transfer the data? I can install another domoticz installation on it but how can i sync this. Hope anyone has a situation like this and solved it.
Edit: the second question seems to be answered.
https://www.domoticz.com/wiki/Setting_up_Device_sharing
Now the first one about the length.
Using another Domoticz install just for one sensor is a bit overkill.
Another perhaps simpler option would be to use a ESP8266 or NodeMCU with ESPEasy firmware.
Just connect the sensor to that one and set it up as a counter in the firmware.
Very easy to do. The ESP will send the data to your Domoticz.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
No need for Domoticz on the secondary pi connected to the watermeter. The python script that reads the meter value updates Domoticz via http/json and the Domoticz instance does not have to be on the same machine. The syntax in the script is like this:
url = 'http://192.168.1.2:8080/json.htm?type=c ... r(Counter)
request = urllib2.Request(url)
so whatever url your main domoticz instance has is where the data will go, even if on a remote machine !
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 80
- Joined: Saturday 19 March 2016 21:12
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Okay, that i a new technique i am not familiar with. I just checked some info about the ESP. I see that this has a wifi module. So that can solve a couple of things. But in short, i connect the pulse meter with the esp. Get some power trough something and program a little bit, then it should be working.bbqkees wrote: ↑Tuesday 06 February 2018 9:45
7m might work. But make sure you provide enough voltage for the sensor.
Using another Domoticz install just for one sensor is a bit overkill.
Another perhaps simpler option would be to use a ESP8266 or NodeMCU with ESPEasy firmware.
Just connect the sensor to that one and set it up as a counter in the firmware.
Very easy to do. The ESP will send the data to your Domoticz.
Okay, where can i find the intel on this?
- bbqkees
- Posts: 407
- Joined: Sunday 17 August 2014 21:01
- Target OS: Linux
- Domoticz version: 4.1x
- Location: The Netherlands
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Please see https://www.letscontrolit.com/wiki/index.php/ESPEasy
In your case you could use a NodeMCU.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
-
- Posts: 8
- Joined: Friday 06 January 2017 21:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Managed to get the info from the slave to the master rapsberry with a script from an other topic viewtopic.php?f=6&t=7303&start=20#p58622rleunk wrote: ↑Monday 05 February 2018 22:57 Hi all,
No really an expert in all this, but managed to get my watermeter working with the python script and this https://www.kiwi-electronics.nl/inducti ... anel-mount sensor.
All setup on a spare / test raspberry pi, when all works well the sensor will be connected to my slave pi in the metercabinet.
But now i am looking for a good way too get my reading from the slave pi to the master pi.
Anyone managed to get this working?
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Why do you even need a slave Domoticz to do this? As I explained a few posts back, it's overkill and a second pi will happily update Domoticz on a first pi just through http/json. No magic needed - this is how the basic Python script for this watermeter project already works !Managed to get the info from the slave to the master rapsberry with a script from an other topic viewtopic.php?f=6&t=7303&start=20#p58622
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 8
- Joined: Friday 06 January 2017 21:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Thnx philchillbill, I will give it a try for sure, the slave domoticz isn't only for my watermeter it connects to my smart meter aswell for gas and electric. It works for now. Next i will try it as you discribed.philchillbill wrote: ↑Wednesday 07 February 2018 18:49Why do you even need a slave Domoticz to do this? As I explained a few posts back, it's overkill and a second pi will happily update Domoticz on a first pi just through http/json. No magic needed - this is how the basic Python script for this watermeter project already works !Managed to get the info from the slave to the master rapsberry with a script from an other topic viewtopic.php?f=6&t=7303&start=20#p58622
-
- Posts: 80
- Joined: Saturday 19 March 2016 21:12
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
bbqkees wrote: ↑Tuesday 06 February 2018 9:45 7m might work. But make sure you provide enough voltage for the sensor.
Using another Domoticz install just for one sensor is a bit overkill.
Another perhaps simpler option would be to use a ESP8266 or NodeMCU with ESPEasy firmware.
Just connect the sensor to that one and set it up as a counter in the firmware.
Very easy to do. The ESP will send the data to your Domoticz.
Okay, it is not my knowledge but after looking for some info i think it is possible if i do the next steps.
Hardware needed
https://nl.aliexpress.com/item/1PCS-Wir ... autifyAB=01PCS Wireless module CH340 NodeMcu V3 Lua WIFI Internet of Things development board based ESP8266
https://nl.aliexpress.com/item/THGS-DC6 ... 0.0.vezpIz4mm Tubular Inductieve Proximity Sensor Switch LJ12A3-4-Z-BX
https://nl.aliexpress.com/item/MB102-So ... 0.0.vezpIz
Breadboard power module + MB-102 830 punten Solderless
And some kind of usb power adapter 5V, 1A.
I flash de NodeMCU ESP8266 with ESPEasy, configure this and wire the hardware together. I connect the sensor to the hardware and my watermeter.
After i flashed ESP board, i can config it to connect it through my wifi network so it can send the data directly to my domoticz configuration.
In basic lines? Is this what it is?
Is it save to buy the hardware from aliexpress? Hope someone can help me with these questions, it is not my knowledge but i think with the right info i can build this.
- bbqkees
- Posts: 407
- Joined: Sunday 17 August 2014 21:01
- Target OS: Linux
- Domoticz version: 4.1x
- Location: The Netherlands
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Yes Aliexpress is usually safe.
Here is one usable circuit for the ESP: https://www.letscontrolit.com/wiki/index.php/LJ12A3
But of course there are numerous ways to connect it.
This is ok too but you need to change the resistor values to your microcontroller:
https://i.imgur.com/TyU1xMk.jpg
I had to use 12V otherwise the sensor did not detect the meter.
Here is one usable circuit for the ESP: https://www.letscontrolit.com/wiki/index.php/LJ12A3
But of course there are numerous ways to connect it.
This is ok too but you need to change the resistor values to your microcontroller:
https://i.imgur.com/TyU1xMk.jpg
I had to use 12V otherwise the sensor did not detect the meter.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Given than an RPi-zero-W costs about EUR 11 and runs Python so the script can run unmodified, I'd just use a pi if I were you and if you buy it locally you won't have to wait 3 weeks for the stuff to arrive from China. Nothing unsafe about AliExpress, it's just slower than local webshops and not really worth it to save a few Euro's on a 20-Euro project. Just saying...
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 80
- Joined: Saturday 19 March 2016 21:12
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
If that is possible then it is a good idea. But can you tell me if i can connect the sensor right on it and if i need power adjustment 5v/12v?philchillbill wrote: ↑Wednesday 14 February 2018 18:15 Given than an RPi-zero-W costs about EUR 11 and runs Python so the script can run unmodified, I'd just use a pi if I were you and if you buy it locally you won't have to wait 3 weeks for the stuff to arrive from China. Nothing unsafe about AliExpress, it's just slower than local webshops and not really worth it to save a few Euro's on a 20-Euro project. Just saying...
And how to build this?
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
See Hobbybob's post long ago in this thread - that schematic should do it for you. There are also posts that show using zener diodes to make sure the pi GPIOs never see more than 3v3 despite a 5v or 12v supply to the inductive sensor. Just search earlier topics in this thread.
EDIT: I have subsequently posted a schematic using a FET which I think is actually better from an electronic engineering perspective.
viewtopic.php?f=28&t=17123&start=222
EDIT: I have subsequently posted a schematic using a FET which I think is actually better from an electronic engineering perspective.
viewtopic.php?f=28&t=17123&start=222
Last edited by philchillbill on Tuesday 27 February 2018 10:20, edited 3 times in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
Who is online
Users browsing this forum: No registered users and 1 guest