Nowadays automation is used heavily to optimize processes and facilitate labour-intensive tasks. One task that is not necessarily labour-intensive, but a task that has to be completed with humans in the loop is meter reading, especially of old electricity meters, present in most private households. Tenants and owners have options to submit their meter reading values by e. For convenience, semi- automated meter reading AMR is desirable even for older meters without digital interfaces.
In this post, we are going to lay out the difficulties encountered in the problem of meter reading, propose a domain-specific solution that works without a large dataset and discuss advanced solutions. This can be considered an exercise in analyzing a problem, possible solutions, rating advantages and disadvantages and finally deciding on a viable strategy. We will be using Python and leverage image processing capabilities from OpenCV to implement a prototype.
Here we focus on the submission method by taking a photograph, especially by using a smartphone. In the days of big data, document scans and photographs in general differentiate themselves from a regular database row entry in that they are missing a predefined structure. The information to be extracted is hidden in the pixels, captured by different cameras, surrounded by noise and taken in varying lighting conditions.Le fonti archivistiche catalogo delle guide e degli inventari editi
Of course, humans master each of these tasks with ease, but all computers are provided with pixel values of the human world.
These networks are trained on examples that are annotated with bounding boxes that cover the object. Depending on the architecture, this approach can require a lot of samples as well as training time. As is oftentimes the practice with image training data, the dataset can be enriched by augmenting existing samples, that is, applying rotation, zoom, scaling etc. Now that we sorted out the problem of localizing the digit bar, we want to automatically extract each and every digit to classify.
A seemingly trivial tasks for humans, but one that needs some thought put into it to be reliably accomplished by a computer. In the following we will use OpenCV in Python to preprocess our input image, a very important step to aid not only the process of digit recognition, but many computer vision tasks in general. As preprocessing is such a task that occurs repeatedly, it is useful to write convenience methods and classes for it.
OpenCV offers bindings to several languages including mobile supportwe make use of Python for its simplicity and capabilities to prototype quickly. Our preprocessing goal is to segment the image in such a way that digit structures become apparent and are isolated, so that we can extract them from the image.
All future steps assume a greyscale image. Applying filters to images is common procedure in most computer vision tasks. Usually, filters are applied by convolving the image with a so-called kernel or filter. This convolution operation is actually really relevant in state-of-the-art deep learning approaches as it is the central technique for Convolutional Neural Networks.
Certainly the most famous example for a kernel is the Gaussian Kernelwhich causes a blurring effect when applied to an image.
Blurring causes details to vanish, because high frequency information is removed by applying it. In that sense, slight blur removes small noise artifacts from our images which helps with the robustness of our approach. Another important filter is the Sobel Operatorwhich approximates the derivative of the image.
This means that at locations with a high rate of change, the derivative will be high. The effect will be that edges are emphasized by high values, while flat areas will have a gradient closer to 0. Working on the image derivative has the advantage of being more robust with respect to the global illumination of the image, which means the derivative of an overall lighter image will be comparable to an image taken in a darker setting.
Both mentioned filters are part of a classic computer vision algorithm, the Canny Edge Detection algorithm. In contrast to just using the Sobel filter, Canny produces sharp, more concise edges.
Finally, a Thresholding operator can be applied to the image to clearly set apart the digits from the background. Values above a certain threshold are set to 1, while the rest and thus hopefully the entire background, is set to 0. The presented operations are usually chained and the order depends on the input images and domain one is dealing with.Released: Jun 27, Client Library for retreiving smart meter data from an Eagle Energy Gateway.
OpenCV practice: OCR for the electricity meter
Please try enabling it if you encounter problems. Search PyPI Search. Latest version Released: Jun 27, Navigation Project description Release history Download files. Project links Homepage. Maintainers eman. Installation For example. There are two ways to retrieve instantaneous demand: 1.
This will return a nearly raw response from the gateway formatting is applied. This will post-process the response before displaying it. Project details Project links Homepage.
Release history Release notifications This version. Download files Download the file for your platform. Files for meter-reader, version 1.Based on a topic on the Domotiz forum and the new setup from my side regarding the readings from my new smart meter DSMR5 and a need to have solution too for the watermeter.
I want to get rid of the RFXmeter with infrared sensor, so this is a good opportunity for switching hardware. My Watermeter has a small grey reflective area on one of the readers, so in theory I should do something with the reflective part of it. The reflective part is showing for every 1 liter of water:. The NPN sensor operates normally between Volt, but for this purpose the 5Volt from the Pi is enough for unknown reason…. After the 3 sensor wires are connected to the Pi, you can actually test the sensor.
On the sensor there is red led next to the cable connection. If you hold a piece of metal knife, screwdriver within 4 mm of the blue top, the red led should be activated.
The Python script on the Pi will call this event to control the counter. This name could be different in your setup, but is necessary in the Python script later:. Test this url in your bowser to see if the createdevent is increasing the counter.The green mile detroit leafly
In case you want to store the Python script somwhere online, you can use the following command on the Pi to grab the file:. When you now hold a piece of metal within the 4mm sensor range, the led will activate, and in the console screen the following lines should be visible:.
So if we check the status of the watermeter counter, it should be increaed with Is the sensor working in first place? Is the script on the Pi triggered when there is a Pulse from the sensor? Can the raspberry allow a 5V in signal? Tnx for the positive feedback.Json performance
In case you need something new, you can always contact me. Besides this the values will be stored in MySQL each hour. By using this form you agree with the storage and handling of your data by this website.
Don't subscribe All Replies to my comments Notify me of followup comments via e-mail. You can also subscribe without commenting. Leave this field empty. Watermeter reading with a Raspberry Pi and inductive proximity sensor August 19, By Rutg3r. The reflective part is showing for every 1 liter of water: What do you need?
A working Raspberry Pi. In my case I use an older Pi 2B. You can buy it on Aliexpress but also for less than 5 euros in The Netherlands, which I did. So if we check the status of the watermeter counter, it should be increaed with 1: Which also means the event ran correctly as well. Rutg3r All author posts. Nancy jack. Prev Next.By martinmin Programmingmarch 15, Sometimes people ask us for help about programming applications involving our devices.
For instance, we have been asked for an application able to monitor mains voltage, with a variable sampling rate. Well, why not? It has been a while since we haven't shown how easy our API is. The problem The problem statement is quite simple: the customer wants to monitor the mains voltage and record it in a CSV file. Under normal circumstances the program will take a sample once every 10 seconds, but when a specific event occurs signaled by a closing contactthe sampling rate must speed up to 10 per second.
The hardware We need a Yocto-Volt for the mains voltage monitoring, and a Yocto-Knob to read the control switch. A Yocto-Volt and a Yocto-Knob. The customer wants the application to run on a Raspberry PI. We chose Python as programming language, as it is readily available with all Linux distributions. An important preparatory step is to configure the PI to make sure it will reasonably work with USB 1.Reading Meters Part 1
The wiring. Lets start with Yocto-Volt and Yocto-Knob configuration. We will use the Virtual Hub to give logical names to our devices functions. This step can be skipped, but the code would be more complex. To make the code more simpler, we give a logical name to the voltmeter AC input.
Programming Lets make sure the Yoctopuce python libraries have been downloaded and properly installed. Information on how to do that can be found in any Yoctopuce device documentation. Now, we need to start our program by including the required Yoctopuce libraries. For that we will use the logical names we defined with the virtual hub.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
If nothing happens, download GitHub Desktop and try again. If nothing happens, download Xcode and try again. If nothing happens, download the GitHub extension for Visual Studio and try again. It is highly recommended to use virtualenv for this. After having your virtualenv installed and activated run the following command to install the smeterd package directly from pypi using pip :. This will install the needed python libraries in this case only pyserial which are needed to start reading P1 packets.
If you don't want to install smeterd as a package you can run it directly from the root directory of the git repository using the following command but you are responsible for manually installing dependencies:. To make smeterd output more verbose use the -v option on any of the following commands.Redis cache java spring example
You can repeat the option to increase verbosity:. By default the read-meter commands spits out the current date, total kwh1, total kwh2, total gas amounts and current kWh tariff on multiple lines.
By piping the output of the read-meter --tsv command to a bash script you can fully customize what you want to do with the data:. Currently only kwh1, kwh2 and gas usage are read.
If you specify the --raw command line option you will see the raw packet from the smart meter:. If using smeterd as a cli application you will find that its functionality is quite limited. You can use the smeterd package as a regular python module so you can integrate the reading of P1 packets into your own solutions.
The SmartMeter. P1Packet class. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up. Read P1 smart meter packets in Python. Python Makefile Shell. Python Branch: master. Find file. Sign in Sign up.
Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. I am working on Data Logging Software using python. I can draw the graph based on the real time quantity but I want to create a Dial meter to show the real time values using Tkinter. Is it possible to create a dial meter and rotate the dial with respect to real time dynamic data? There are no dial widgets built into Tkinter. However, there is a canvas on which you can draw.
A dial isn't much more than a circle with an arrow pointing a particular direction. A little math is all you need to decide where to draw the dial. Learn more.
Voltage monitoring with Python
Dial Meter using Tkinter [closed] Ask Question. Asked 7 years, 3 months ago. Active 7 years, 3 months ago. Viewed 2k times. Active Oldest Votes. Bryan Oakley Bryan Oakley k 28 28 gold badges silver badges bronze badges. Thanks Bryan, I got the range of 0 to and want to divide it in the step of Could you tell me how will place those steps on semicircle and rotate the dial respectively.
The Overflow Blog. Socializing with co-workers while social distancing. Podcast Programming tutorials can be a real drag.
Featured on Meta. Community and Moderator guidelines for escalating issues via new response…. Feedback on Q2 Community Roadmap.
Triage needs to be fixed urgently, and users need to be notified upon…. Dark Mode Beta - help us root out low-contrast and un-converted bits. Technical site integration observational experiment live on Stack Overflow.
Related Released: Aug 8, View statistics for this project via Libraries. It is highly recommended to use virtualenv for this. After having your virtualenv installed and activated run the following command to install the smeterd package directly from pypi using pip :.
Alternatively you can manually clone smeterd and run setupttools setup. This will install the needed python libraries in this case only pyserial which are needed to start reading P1 packets.
To make smeterd output more verbose use the -v option on any of the following commands. You can repeat the option to increase verbosity:. To get help for a specific subcommand use the -h or —help after having typed the subcommand:. By default the read-meter commands spits out the current date, total kwh1, total kwh2, total gas amounts and current kWh tariff on multiple lines.
By piping the output of the read-meter —tsv command to a bash script you can fully customize what you want to do with the data:. Currently only kwh1, kwh2 and gas usage are read. If you specify the —raw command line option you will see the raw packet from the smart meter:.
If using smeterd as a cli application you will find that its functionality is quite limited. You can use the smeterd package as a regular python module so you can integrate the reading of P1 packets into your own solutions.
The SmartMeter. P1Packet class. Aug 8, Jun 2, Jan 21, Dec 12,
- Lycra syrup
- Leonardo sprout 058855 vaso 27 cm b000roggwu
- Motorcycle stator wiring diagram diagram base website wiring
- Regolamento per la concessione in uso delle seguenti sale
- Isp locked router
- Corey lal
- Fasting and hsv2
- Allegato n. 1 front office e servizi di e- government per
- Pepper spray guns for sale
- Gli array nei common blocks 2
- 7zip combine split files command line
- How to do sections in inventor
- Awae exam review
- Ideal male height
- 94 buick roadmaster fuse box diagram diagram base website
- Compressed air pressure drop calculator excel
- Slides cantieri x cdr 22gen2016.pptx
- U2 bootleg blogspot
- Ecdsa signature format
- Impedance conversion calculator
- Flowchart to convert fahrenheit to celsius
- Somali wasmo macaan 2013
- Dayz roadmap 2018
- Sum and difference of two numbers hackerrank solution