Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Automatic Water Meter Reading with a Webcam

Automatic Water Meter Reading with a Webcam

Scheduled Pinned Locked Moved My Project
15 Posts 9 Posters 24.5k Views 12 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Moshe LivneM Offline
    Moshe LivneM Offline
    Moshe Livne
    Hero Member
    wrote on last edited by
    #3

    cool project! why do you need to monitor the water meter?

    G 1 Reply Last reply
    0
    • G Offline
      G Offline
      gol
      wrote on last edited by
      #4

      I'm currently working on version 2.0 of the Water Meter Reader. The new version will be based on an OpenWrt device called Dragino and will have a nice looking web GUI for setup and maintenance.

      Of course can I share my Raspberry Pi code. Attached you will find a copy of it. It has dependencies to:

      • libsdl1.2-dev

      • libmosquitto-dev

      The sdl library can you install the ordinary way with apt-get. But libmosquitto you have to install following these steps:

      • wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key

      • sudo apt-key add mosquitto-repo.gpg.key

      • cd /etc/apt/sources.list.d/

      • sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list

      • apt-get update

      • apt-cache search mosquitto

      • apt-get install libmosquitto-dev

      It also has a dependency to an external MQTT-broker at 192.168.0.23. You probably have to adapt that to something else or remove it if you dont want to publish the values via MQTT.

      In the structure REGION the sizes and positions of the "Hit areas" are defined.

      water-meter.tar.gz

      T 1 Reply Last reply
      0
      • Moshe LivneM Moshe Livne

        cool project! why do you need to monitor the water meter?

        G Offline
        G Offline
        gol
        wrote on last edited by
        #5

        @Moshe-Livne
        Two main reasons to monitor the water meter

        1. Leakage monitoring. The system can detect very small leakages and send notifications to my mobile.
        2. I'm interested in my water consumption. The values are logged and displayed in my home automation system.
        Moshe LivneM 1 Reply Last reply
        0
        • G gol

          @Moshe-Livne
          Two main reasons to monitor the water meter

          1. Leakage monitoring. The system can detect very small leakages and send notifications to my mobile.
          2. I'm interested in my water consumption. The values are logged and displayed in my home automation system.
          Moshe LivneM Offline
          Moshe LivneM Offline
          Moshe Livne
          Hero Member
          wrote on last edited by
          #6

          @gol fair enough... Thanks!

          1 Reply Last reply
          0
          • G gol

            I'm currently working on version 2.0 of the Water Meter Reader. The new version will be based on an OpenWrt device called Dragino and will have a nice looking web GUI for setup and maintenance.

            Of course can I share my Raspberry Pi code. Attached you will find a copy of it. It has dependencies to:

            • libsdl1.2-dev

            • libmosquitto-dev

            The sdl library can you install the ordinary way with apt-get. But libmosquitto you have to install following these steps:

            • wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key

            • sudo apt-key add mosquitto-repo.gpg.key

            • cd /etc/apt/sources.list.d/

            • sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list

            • apt-get update

            • apt-cache search mosquitto

            • apt-get install libmosquitto-dev

            It also has a dependency to an external MQTT-broker at 192.168.0.23. You probably have to adapt that to something else or remove it if you dont want to publish the values via MQTT.

            In the structure REGION the sizes and positions of the "Hit areas" are defined.

            water-meter.tar.gz

            T Offline
            T Offline
            ThinkPad
            wrote on last edited by
            #7

            @gol Thanks. Sounds quite complicated, but i will have a look at it.
            As a home automation controller i use Domoticz so i will probably have to convert it to HTTP GET-requests (http://domoticz.com/wiki/Domoticz_API/JSON_URL's). I don't have any knowledge about MQTT haha.

            1 Reply Last reply
            0
            • JohnJ Offline
              JohnJ Offline
              John
              Plugin Developer
              wrote on last edited by
              #8

              Very nice! Gives a nice resolution in used water. I'm wondering in defining the leakage, are you measuring the time it takes to get from region to region?

              What software is used for the recognition? I'm currently busy with face recognition using opencv.

              My Domotica project: http://www.pidome.org

              G 1 Reply Last reply
              0
              • JohnJ John

                Very nice! Gives a nice resolution in used water. I'm wondering in defining the leakage, are you measuring the time it takes to get from region to region?

                What software is used for the recognition? I'm currently busy with face recognition using opencv.

                G Offline
                G Offline
                gol
                wrote on last edited by
                #9

                @John
                The output from the water meter reader, published in MQTT, are:

                1. Average flow last minute (liter/minute)
                2. Average flow last 10 minute (liter/10minutes)
                3. Consumption last drain (liter). The number of liters between the last two times with no consumption.
                4. Total consumption (liter)

                The leakage monitoring is very simple. It uses only value 1 and checks if the flow > 0 during a couple of minutes. The accepted duration is very low at night and when nobody is at home.

                All info about the used software you will find earlier in this thread.

                1 Reply Last reply
                0
                • JohnJ Offline
                  JohnJ Offline
                  John
                  Plugin Developer
                  wrote on last edited by
                  #10

                  @gol

                  Ahh clear. I know the dependencies mentioned. Will later take a look at the software, did not had enough time to download the package to take a look into it ;)

                  My Domotica project: http://www.pidome.org

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    pawwnu
                    wrote on last edited by pawwnu
                    #11

                    Hey
                    @gol

                    First of all, this is an excellent job. I love to see that kind of achivements. I am trying to use your code in my university project. I'm going to be analysing how exactly does my heat pump work. I always loved technology as such, however I'm not so good at programming. 😉

                    Here comes my question. Would you be so kind and give me some more info on how to setup Mosquitto broker to work with your code?

                    Thanks in advance and once again congratulations on your idea as well as execution.

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      fje
                      wrote on last edited by fje
                      #12

                      @gol

                      Hi!
                      Thanks for sharing! I managed to get your code running, altered it to log to a round robin database instead of through Mosquitto, and I am now graphing my water usage! :)

                      I have posted a description of my setup and code (Swedish I'm afraid, google translate is your friend - everyone except @gol ) to http://blog.m.nu/vattenmatning-med-raspberry-pi-och-webkamera/

                      Thanks and Regards,
                      Jim, Linköping

                      1 Reply Last reply
                      1
                      • Rasmus7700R Offline
                        Rasmus7700R Offline
                        Rasmus7700
                        wrote on last edited by
                        #13

                        Wow that project seems awesome - exactly what i need to my openHab installation :)
                        @gol could you please post some more information regarding the setup? :)

                        1 Reply Last reply
                        0
                        • ? Offline
                          ? Offline
                          A Former User
                          wrote on last edited by
                          #14

                          Hey @gol

                          I love this idea of this project. I wanted to see if you made any changes to your code since the last upload? I want to develop something like this for myself and I'm willing to contribute if you had the code uploaded to github or something like that.

                          Throdne

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            Matti Orrberg
                            wrote on last edited by Matti Orrberg
                            #15

                            There are several solutions for this kind of water reading but all are lacking something for my needs.

                            I've been seeking for a solution which would combine best parts of different projects:

                            1. https://github.com/ecsfang/WaterMeter
                            • accuracy of 0,125 litres by reading only 1 liter dial with 8 trigger points. Easy and this data would be sufficient combined with time stamps.
                            1. https://github.com/jomjol/water-meter-measurement-system
                            • ESP32-CAM as camera and server running the OCR would be a lot cheaper than raspberry system. Usually someone building these have the server and really I wouldn't have any other needs for the Raspberry.
                            • Also this could be integrated ESPHome etc.? So it would be out of the box type design for ie. Home Assistant...
                            1. https://olammi.iki.fi/sw/dialEye/
                            • Possibility to define any IP web camera as source

                            But I'm not any good at programming or coding... I'm not even sure if I describe my wishes correctly, please pardon me.

                            Would I find someone interested enough to combine these three solutions?

                            TL;DR water meter solution development request:

                            • 1 liter dial OCR with 8 trigger points
                            • ESP to server and server OCR software (prefer Ubuntu systems)
                            • MQTT publish and/or Home assistant compatibility via ESPhome or similar systems?

                            Willing to throw in a coffee/beer or two for this matter...

                            Regards, Matti

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            21

                            Online

                            11.7k

                            Users

                            11.2k

                            Topics

                            113.0k

                            Posts


                            Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • MySensors
                            • OpenHardware.io
                            • Categories
                            • Recent
                            • Tags
                            • Popular