Watermeter lezen met raspberry en Inductieve NPN sensor Topic is solved
Moderators: leecollings, remb0
-
- Posts: 337
- Joined: Friday 17 August 2018 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Hi,
If you installed the plugin in the plugins directory, after a reboot you should be able to select the plugin on the hardware page, just like any other hardware, see screenshot: if you scroll down on this page, you can configure the plugin…
if you have trouble installing the plugin, please check the wiki on plugins (https://www.domoticz.com/wiki/Using_Python_plugins)
If you installed the plugin in the plugins directory, after a reboot you should be able to select the plugin on the hardware page, just like any other hardware, see screenshot: if you scroll down on this page, you can configure the plugin…
if you have trouble installing the plugin, please check the wiki on plugins (https://www.domoticz.com/wiki/Using_Python_plugins)
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Seems I had to install de python DEV part......
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Ok, hardware can be found now in the list. But after the add and the message, device added, there is NO new device!
Any idea?
Any idea?
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Yes. Earlier I added my smart meter, so that should work.
I see the hardware is added to the list, but no new device
I see the hardware is added to the list, but no new device
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
2019-12-18 22:23:10.717 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:23:24.720 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:23:29.986 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-18 22:23:29.986 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-18 22:23:29.986 Error: (Watermeter) Module Import failed: ' Name: RPi'
2019-12-18 22:23:29.986 Error: (Watermeter) Error Line details not available.
2019-12-18 22:24:34.732 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:24:48.735 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:02.863 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:16.866 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:30.869 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:44.872 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:58.874 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:12.877 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:26.880 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:40.883 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:54.885 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:08.888 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:22.891 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:36.894 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:50.897 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:04.900 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:18.903 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:32.905 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:46.908 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:29:00.911 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:29:14.914 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:29:28.975 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-18 22:29:28.975 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-18 22:29:28.975 Error: (Watermeter) Module Import failed: ' Name: RPi'
2019-12-18 22:29:28.975 Error: (Watermeter) Error Line details not available.
2019-12-18 22:29:51.367 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-18 22:29:51.367 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-18 22:29:51.367 Error: (Watermeter) Module Import failed: ' Name: RPi'
Hmmmmmm And now?
2019-12-18 22:23:24.720 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:23:29.986 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-18 22:23:29.986 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-18 22:23:29.986 Error: (Watermeter) Module Import failed: ' Name: RPi'
2019-12-18 22:23:29.986 Error: (Watermeter) Error Line details not available.
2019-12-18 22:24:34.732 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:24:48.735 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:02.863 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:16.866 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:30.869 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:44.872 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:25:58.874 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:12.877 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:26.880 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:40.883 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:26:54.885 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:08.888 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:22.891 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:36.894 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:27:50.897 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:04.900 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:18.903 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:32.905 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:28:46.908 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:29:00.911 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:29:14.914 Error: Watermeter hardware (6) thread seems to have ended unexpectedly
2019-12-18 22:29:28.975 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-18 22:29:28.975 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-18 22:29:28.975 Error: (Watermeter) Module Import failed: ' Name: RPi'
2019-12-18 22:29:28.975 Error: (Watermeter) Error Line details not available.
2019-12-18 22:29:51.367 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-18 22:29:51.367 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-18 22:29:51.367 Error: (Watermeter) Module Import failed: ' Name: RPi'
Hmmmmmm And now?
-
- Posts: 337
- Joined: Friday 17 August 2018 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
hmmmm… this error is not generated by the plugin itself.
I just tested by adding the plugin to another domoticz instance, works perfectly on my system.
What are your system details (hardware, os version, python version, etc...)?
I just tested by adding the plugin to another domoticz instance, works perfectly on my system.
What are your system details (hardware, os version, python version, etc...)?
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Pi 3
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
Python 3.5
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
Python 3.5
-
- Posts: 337
- Joined: Friday 17 August 2018 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
What 's your domoticz version?
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Version: 4.10717
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
-
- Posts: 337
- Joined: Friday 17 August 2018 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
I am also on raspbian stretch, and tried to reproduce your issue by installing the latest stable, so I now have exactly the same software as you:
Code: Select all
Version: 4.10717
Build Hash: b38b49e5
Compile Date: 2019-05-09 13:04:08
dzVents Version: 2.4.19
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
few things i can think of:
1. Can you try to install other plugins (e.g. you could try the buienradar plugin) to find out this issue is specific for the watermeter plugin?
2. Did you already try to make the plugin.py exeutable (chmod +x plugin.py)
3. Did you check if you have this issue? https://www.domoticz.com/wiki/Linux#Pro ... ing_Python
4. Did you check the troubleshooting section in the domoticz wiki for plugins ? (https://www.domoticz.com/wiki/Using_Python_plugins)
PS In the test above i found another small issue which i fixed, so i suggest you reinstall the plugin. This this will not fix this problem, but another one after you fixed the library issue.
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Thanks, reinstalled the plugin.
few things i can think of:
1. Can you try to install other plugins (e.g. you could try the buienradar plugin) to find out this issue is specific for the watermeter plugin?
Installed buienrader, works 100%.
2. Did you already try to make the plugin.py exeutable (chmod +x plugin.py)
Yes, did that the very first time.
3. Did you check if you have this issue? https://www.domoticz.com/wiki/Linux#Pro ... ing_Python
Well not page, but via wiki, I found the issue about installing the dev stuff.
4. Did you check the troubleshooting section in the domoticz wiki for plugins ? (https://www.domoticz.com/wiki/Using_Python_plugins)
Yes, that where the dev is mentioned.
Looking at the logs:
2019-12-19 19:58:48.456 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-19 19:58:48.456 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-19 19:58:48.456 Error: (Watermeter) Module Import failed: ' Name: RPi'
2019-12-19 19:58:48.457 Error: (Watermeter) Error Line details not available.
2019-12-19 19:59:54.925 Error: Watermeter hardware (5) thread seems to have ended unexpectedly
To me it looks like in import error with RPi, but why?
few things i can think of:
1. Can you try to install other plugins (e.g. you could try the buienradar plugin) to find out this issue is specific for the watermeter plugin?
Installed buienrader, works 100%.
2. Did you already try to make the plugin.py exeutable (chmod +x plugin.py)
Yes, did that the very first time.
3. Did you check if you have this issue? https://www.domoticz.com/wiki/Linux#Pro ... ing_Python
Well not page, but via wiki, I found the issue about installing the dev stuff.
4. Did you check the troubleshooting section in the domoticz wiki for plugins ? (https://www.domoticz.com/wiki/Using_Python_plugins)
Yes, that where the dev is mentioned.
Looking at the logs:
2019-12-19 19:58:48.456 Error: (WMPS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-watermeter/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-12-19 19:58:48.456 Error: (Watermeter) Module Import failed, exception: 'ImportError'
2019-12-19 19:58:48.456 Error: (Watermeter) Module Import failed: ' Name: RPi'
2019-12-19 19:58:48.457 Error: (Watermeter) Error Line details not available.
2019-12-19 19:59:54.925 Error: Watermeter hardware (5) thread seems to have ended unexpectedly
To me it looks like in import error with RPi, but why?
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
SOLVED!
If you are using Raspbian Stretch, RPi.GPIO is NOT included in Python 3.5 by default.
sudo apt-get install python3-rpi.gpio
After that.... I have a new device Watermeter.
TESTPULSE option seems to work. So now the real work, get the NPN connected and working.
EDIT1: did you use the script by WillyWong1?
EDIT2: it seems the file meterstand.txt is ignored. Doesn't pick up the value I set in it. A service restart, also did'nt create it.
If you are using Raspbian Stretch, RPi.GPIO is NOT included in Python 3.5 by default.
sudo apt-get install python3-rpi.gpio
After that.... I have a new device Watermeter.
TESTPULSE option seems to work. So now the real work, get the NPN connected and working.
EDIT1: did you use the script by WillyWong1?
EDIT2: it seems the file meterstand.txt is ignored. Doesn't pick up the value I set in it. A service restart, also did'nt create it.
-
- Posts: 337
- Joined: Friday 17 August 2018 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Good to know, i will add that to the readme
I used the script on this site as a base https://ehoco.nl/watermeter-uitlezen-in ... on-script/
few thoughts:
- I fixed a bug yesterday, which might which might cause this. Did you reinstall the plugin after yesterday? if not, this might fix
- are looking at the right spot? If you use the default settings, the meterstand.txt should be placed in the domoticz directory
- The meterstand.txt is only used when there is a pulse. so if you did not connect the NPN sensor, don't expect updates to the virutal sensor in domoticz. (You can test the working of the script with an undocumented feature . If you create a file named "TESTPULSE in the directory of the waterpmeter plugin directory and restart, it will simulate a pulse every 10 seconds for testing purposes.)
- if this all does not help, please turn on debug logging by creating a file named "DEBUG" (contents don't matter) in the directory of the plugin, restart and send me the output..
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Started from scratch. Removed all and used your latest version 1.01
Placed an empty TESTPULSE and didn't connect a PNP yet. Set it to GPIO21 with resistor NULL
But then I get this error and NO device is created:
2019-12-20 21:35:53.458 Error: (Watermeter) 'onStart' failed 'AttributeError':'module 'RPi.GPIO' has no attribute 'PUD_NONE''.
2019-12-20 21:35:53.458 Error: (Watermeter) ----> Line 235 in '/home/pi/domoticz/plugins/domoticz-watermeter/plugin.py', function onStart
2019-12-20 21:35:53.458 Error: (Watermeter) ----> Line 159 in '/home/pi/domoticz/plugins/domoticz-watermeter/plugin.py', function onStart
I did the same yesterday, and I guess that was with the other version and then I didn't had the error with resistor Null.
If I change it to pullup, the device is created. And every 10 seconds it counts 1 liter. Total is higer in number, is there something in the database from yesterday?
BTW found the meterstand.txt file. looked at the wrong location indeed.
Placed an empty TESTPULSE and didn't connect a PNP yet. Set it to GPIO21 with resistor NULL
But then I get this error and NO device is created:
2019-12-20 21:35:53.458 Error: (Watermeter) 'onStart' failed 'AttributeError':'module 'RPi.GPIO' has no attribute 'PUD_NONE''.
2019-12-20 21:35:53.458 Error: (Watermeter) ----> Line 235 in '/home/pi/domoticz/plugins/domoticz-watermeter/plugin.py', function onStart
2019-12-20 21:35:53.458 Error: (Watermeter) ----> Line 159 in '/home/pi/domoticz/plugins/domoticz-watermeter/plugin.py', function onStart
I did the same yesterday, and I guess that was with the other version and then I didn't had the error with resistor Null.
If I change it to pullup, the device is created. And every 10 seconds it counts 1 liter. Total is higer in number, is there something in the database from yesterday?
BTW found the meterstand.txt file. looked at the wrong location indeed.
-
- Posts: 337
- Joined: Friday 17 August 2018 14:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
aha.. i never tested without configuring pullup or pulldown… this was a bug and is fixed now, tx for spotting this. You could get the new one from github, but looking at you config you need to configure a pull up resistor anyway (see below)JeeGee wrote: ↑Friday 20 December 2019 21:50 But then I get this error and NO device is created:
2019-12-20 21:35:53.458 Error: (Watermeter) 'onStart' failed 'AttributeError':'module 'RPi.GPIO' has no attribute 'PUD_NONE''.
2019-12-20 21:35:53.458 Error: (Watermeter) ----> Line 235 in '/home/pi/domoticz/plugins/domoticz-watermeter/plugin.py', function onStart
2019-12-20 21:35:53.458 Error: (Watermeter) ----> Line 159 in '/home/pi/domoticz/plugins/domoticz-watermeter/plugin.py', function onStart
Yes this can very well be the case. If you want to change the number, just change the meterstand file
I also saw your direct messages, please reply in the forum (you can quote me and i will get a notification as well) in which you ask wheter or not to connect directly to the pi.
I am not an electronics expert, but of a lot of this has already been said in this forum. I understand if you connect directly it is not 100% compliant with the specs (you get a bit more than 3.3V on the pins) . So it is not recommended by several members on the forum. On the other hand there are a lot of users connecting it directly (you have to configure a pull up resistor btw, otherwise this will not work!) like myself without problems.
Mine works also fine directly connected. Not at once however. I had to try several NPN sensors, because not all sensors worked fine.
This is the one which fixed my problems https://nl.aliexpress.com/item/32826250 ... 4c4dmnYJqX
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Ok, will stick to the forum then.
Welcome, happy to make your plugin working 100%.
I think I need a bit more explanation about the pull-up resistor.... sorry.
So, long story short, this has to be used to make it work? You said: "Mine works also fine directly connected. Not at once however. I had to try several NPN sensors, because not all sensors worked fine."
So you don't use any resistors at all?
Welcome, happy to make your plugin working 100%.
I think I need a bit more explanation about the pull-up resistor.... sorry.
So, long story short, this has to be used to make it work? You said: "Mine works also fine directly connected. Not at once however. I had to try several NPN sensors, because not all sensors worked fine."
So you don't use any resistors at all?
-
- Posts: 22
- Joined: Sunday 25 August 2019 13:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Watermeter lezen met raspberry en Inductieve NPN sensor
Hmmm I connected my NPN as the scheme above. Took 3 resistors (1k), as you need 2k, I soldered them after each other to make it 2k.
Connected it to my Pi 3 model b at the pins shown above. But it doesn't count. If I use metal in front of the NPN I see the led turing on.
I ordered one from Ali: LJ12A3-4-Z/BX
Could it be because og the way connected at the moment or do I need an other NPN?
Are there commandline options to see if there is data on GPIO21?
Thanks
Connected it to my Pi 3 model b at the pins shown above. But it doesn't count. If I use metal in front of the NPN I see the led turing on.
I ordered one from Ali: LJ12A3-4-Z/BX
Could it be because og the way connected at the moment or do I need an other NPN?
Are there commandline options to see if there is data on GPIO21?
Thanks
Who is online
Users browsing this forum: Bing [Bot] and 1 guest