juham-watermeter 0.0.5__tar.gz → 0.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. juham_watermeter-0.0.6/PKG-INFO +131 -0
  2. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/README.rst +29 -28
  3. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter/__init__.py +2 -2
  4. juham_watermeter-0.0.6/juham_watermeter.egg-info/PKG-INFO +131 -0
  5. juham_watermeter-0.0.6/juham_watermeter.egg-info/SOURCES.txt +20 -0
  6. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter.egg-info/requires.txt +3 -3
  7. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/pyproject.toml +14 -10
  8. juham_watermeter-0.0.5/PKG-INFO +0 -27
  9. juham_watermeter-0.0.5/docs/build/html/.buildinfo +0 -4
  10. juham_watermeter-0.0.5/docs/build/html/.nojekyll +0 -0
  11. juham_watermeter-0.0.5/docs/build/html/_sources/index.rst.txt +0 -47
  12. juham_watermeter-0.0.5/docs/build/html/_sources/juham_watermeter/index.rst.txt +0 -11
  13. juham_watermeter-0.0.5/docs/build/html/_static/basic.css +0 -906
  14. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/css/bootstrap-responsive.css +0 -1109
  15. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/css/bootstrap-responsive.min.css +0 -9
  16. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/css/bootstrap.css +0 -6167
  17. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/css/bootstrap.min.css +0 -9
  18. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/img/glyphicons-halflings-white.png +0 -0
  19. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/img/glyphicons-halflings.png +0 -0
  20. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/js/bootstrap.js +0 -2287
  21. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-2.3.2/js/bootstrap.min.js +0 -6
  22. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap-theme.css +0 -587
  23. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap-theme.css.map +0 -1
  24. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap-theme.min.css +0 -6
  25. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap-theme.min.css.map +0 -1
  26. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap.css +0 -6834
  27. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap.css.map +0 -1
  28. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap.min.css +0 -6
  29. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/css/bootstrap.min.css.map +0 -1
  30. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.eot +0 -0
  31. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.svg +0 -288
  32. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.ttf +0 -0
  33. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.woff +0 -0
  34. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.woff2 +0 -0
  35. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/js/bootstrap.js +0 -2580
  36. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/js/bootstrap.min.js +0 -6
  37. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-3.4.1/js/npm.js +0 -13
  38. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-sphinx.css +0 -221
  39. juham_watermeter-0.0.5/docs/build/html/_static/bootstrap-sphinx.js +0 -175
  40. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/amelia/bootstrap.min.css +0 -9
  41. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/cerulean/bootstrap.min.css +0 -9
  42. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/cosmo/bootstrap.min.css +0 -9
  43. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/cyborg/bootstrap.min.css +0 -9
  44. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/flatly/bootstrap.min.css +0 -9
  45. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/img/glyphicons-halflings-white.png +0 -0
  46. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/img/glyphicons-halflings.png +0 -0
  47. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/journal/bootstrap.min.css +0 -9
  48. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/readable/bootstrap.min.css +0 -9
  49. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/simplex/bootstrap.min.css +0 -9
  50. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/slate/bootstrap.min.css +0 -9
  51. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/spacelab/bootstrap.min.css +0 -9
  52. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/spruce/bootstrap.min.css +0 -9
  53. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/superhero/bootstrap.min.css +0 -9
  54. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-2.3.2/united/bootstrap.min.css +0 -9
  55. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/cerulean/bootstrap.min.css +0 -11
  56. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/cosmo/bootstrap.min.css +0 -11
  57. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/cyborg/bootstrap.min.css +0 -11
  58. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/darkly/bootstrap.min.css +0 -11
  59. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/flatly/bootstrap.min.css +0 -11
  60. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/fonts/glyphicons-halflings-regular.eot +0 -0
  61. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/fonts/glyphicons-halflings-regular.svg +0 -288
  62. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/fonts/glyphicons-halflings-regular.ttf +0 -0
  63. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/fonts/glyphicons-halflings-regular.woff +0 -0
  64. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/fonts/glyphicons-halflings-regular.woff2 +0 -0
  65. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/journal/bootstrap.min.css +0 -11
  66. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/lumen/bootstrap.min.css +0 -11
  67. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/paper/bootstrap.min.css +0 -11
  68. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/readable/bootstrap.min.css +0 -11
  69. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/sandstone/bootstrap.min.css +0 -11
  70. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/simplex/bootstrap.min.css +0 -11
  71. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/slate/bootstrap.min.css +0 -11
  72. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/spacelab/bootstrap.min.css +0 -11
  73. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/superhero/bootstrap.min.css +0 -11
  74. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/united/bootstrap.min.css +0 -11
  75. juham_watermeter-0.0.5/docs/build/html/_static/bootswatch-3.4.1/yeti/bootstrap.min.css +0 -11
  76. juham_watermeter-0.0.5/docs/build/html/_static/doctools.js +0 -149
  77. juham_watermeter-0.0.5/docs/build/html/_static/documentation_options.js +0 -13
  78. juham_watermeter-0.0.5/docs/build/html/_static/file.png +0 -0
  79. juham_watermeter-0.0.5/docs/build/html/_static/graphviz.css +0 -12
  80. juham_watermeter-0.0.5/docs/build/html/_static/images/watermeter_diff.png +0 -0
  81. juham_watermeter-0.0.5/docs/build/html/_static/js/jquery-1.12.4.min.js +0 -5
  82. juham_watermeter-0.0.5/docs/build/html/_static/js/jquery-fix.js +0 -2
  83. juham_watermeter-0.0.5/docs/build/html/_static/juham.png +0 -0
  84. juham_watermeter-0.0.5/docs/build/html/_static/language_data.js +0 -192
  85. juham_watermeter-0.0.5/docs/build/html/_static/masterpiece.css +0 -64
  86. juham_watermeter-0.0.5/docs/build/html/_static/minus.png +0 -0
  87. juham_watermeter-0.0.5/docs/build/html/_static/plus.png +0 -0
  88. juham_watermeter-0.0.5/docs/build/html/_static/pygments.css +0 -75
  89. juham_watermeter-0.0.5/docs/build/html/_static/searchtools.js +0 -635
  90. juham_watermeter-0.0.5/docs/build/html/_static/sphinx_highlight.js +0 -154
  91. juham_watermeter-0.0.5/docs/build/html/genindex.html +0 -140
  92. juham_watermeter-0.0.5/docs/build/html/index.html +0 -314
  93. juham_watermeter-0.0.5/docs/build/html/juham_watermeter/index.html +0 -162
  94. juham_watermeter-0.0.5/docs/build/html/objects.inv +0 -0
  95. juham_watermeter-0.0.5/docs/build/html/search.html +0 -155
  96. juham_watermeter-0.0.5/docs/build/html/searchindex.js +0 -1
  97. juham_watermeter-0.0.5/juham_watermeter.egg-info/PKG-INFO +0 -27
  98. juham_watermeter-0.0.5/juham_watermeter.egg-info/SOURCES.txt +0 -108
  99. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/CHANGELOG.rst +0 -0
  100. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/LICENSE.rst +0 -0
  101. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/MANIFEST.in +0 -0
  102. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter/leakdetector.py +0 -0
  103. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter/py.typed +0 -0
  104. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter/watermeter_imgdiff.py +0 -0
  105. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter/watermeter_ocr.py +0 -0
  106. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter/watermeter_ts.py +0 -0
  107. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter/webcamera.py +0 -0
  108. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter.egg-info/dependency_links.txt +0 -0
  109. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter.egg-info/entry_points.txt +0 -0
  110. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/juham_watermeter.egg-info/top_level.txt +0 -0
  111. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/setup.cfg +0 -0
  112. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/tests/__init__.py +0 -0
  113. {juham_watermeter-0.0.5 → juham_watermeter-0.0.6}/tests/test_watermeter.py +0 -0
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.2
2
+ Name: juham-watermeter
3
+ Version: 0.0.6
4
+ Summary: Web-camera based watermeter for Juham
5
+ Author-email: J Meskanen <juham.api@gmail.com>
6
+ Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
7
+ License: MIT License
8
+ ===========
9
+
10
+ Copyright (c) 2024, Juha Meskanen
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+
29
+
30
+ Project-URL: Homepage, https://gitlab.com/juham/juham
31
+ Project-URL: Bug Reports, https://gitlab.com/juham/juham
32
+ Project-URL: Funding, https://meskanen.com
33
+ Project-URL: Say Thanks!, http://meskanen.com
34
+ Project-URL: Source, https://gitlab.com/juham/juham
35
+ Keywords: object-oriented,plugin,framework,watermeter,home automation
36
+ Classifier: Development Status :: 2 - Pre-Alpha
37
+ Classifier: Intended Audience :: Developers
38
+ Classifier: Topic :: Software Development
39
+ Classifier: License :: OSI Approved :: MIT License
40
+ Classifier: Programming Language :: Python :: 3.8
41
+ Requires-Python: >=3.8
42
+ Description-Content-Type: text/markdown
43
+ License-File: LICENSE.rst
44
+ Requires-Dist: juham-core>=0.1.1
45
+ Requires-Dist: numpy
46
+ Requires-Dist: Pillow>=10.4.0
47
+ Requires-Dist: opencv-python-headless>=4.10.0
48
+ Requires-Dist: pytesseract>=0.3.13
49
+ Provides-Extra: dev
50
+ Requires-Dist: check-manifest; extra == "dev"
51
+
52
+ Watermeter plugin for Juham™
53
+ =============================
54
+
55
+ Description
56
+ -----------
57
+
58
+ A web camera and AI-based water meter solution for Juham™ home automation.
59
+
60
+ This package includes two different water meter implementations:
61
+
62
+ * A simple class that compares subsequent images to measure differences. The greater the difference between images,
63
+ the more the arrows and digits on the water meter have changed, indicating water consumption.
64
+ This solution also uploads the images to a specified FTP site when water consumption is detected,
65
+ allowing homeowners to inspect the water meter visually. While this solution doesn’t provide exact water
66
+ consumption readings, it is highly reliable for detecting leaks. Just ensure that spiders or other potentially moving
67
+ objects don't obstruct the camera's view of the water meter.
68
+
69
+ * Tesseract OCR and OpenCV solution for reading and interpreting water meter digits.
70
+ This class requires further work to be truly useful. My Raspberry Pi didn't have enough disk
71
+ space, so I decided to set this aside for now.
72
+
73
+
74
+ .. image:: _static/images/watermeter_diff.png
75
+ :alt: Web camera based water meter leak detector based on comparison of subsequent images
76
+ :width: 640px
77
+ :align: center
78
+
79
+
80
+ Getting Started
81
+ ---------------
82
+
83
+ To install:
84
+
85
+ .. code-block:: bash
86
+
87
+ pip install juham-watermeter
88
+
89
+ Which installs everything needed for reading water meters with the simple image comparison based solution.
90
+
91
+
92
+ If you want to play with the Tesseract OCR and OpenCV solution for reading and interpreting water meter digits,
93
+ please read on.
94
+
95
+
96
+ Installing Tesseract OCR to read the digits:
97
+
98
+ .. code-block:: bash
99
+
100
+ sudo apt install tesseract-ocr
101
+
102
+ If you are on Windows, visit the Tesseract GitHub repository, or Download a precompiled Windows binary from UB Mannheim.
103
+
104
+ 2. Install
105
+
106
+ .. code-block:: bash
107
+
108
+ pip install juham-watermeter
109
+
110
+
111
+ 2. Configure
112
+
113
+ To adjust update interval and other attributes edit `WaterMeter.json` configuration file.
114
+
115
+
116
+ ### Note about OpenCV and contributors
117
+
118
+ The Python coverage failed with the No source for code: 'juham_watermeter\config-3.py'
119
+ error, when all the other Python projects with precisely identical structures worked fine.
120
+ Traced down the bug to opencv package, and added a .coveragerc file with the following content:
121
+
122
+ .. code-block:: bash
123
+
124
+ [run]
125
+ omit =
126
+ config.py
127
+ config-3.py
128
+
129
+ as a solution. This will of course blow up sooner or later, when some OpenCV developer decides
130
+ to rename those files.
131
+
@@ -8,10 +8,6 @@ A web camera and AI-based water meter solution for Juham™ home automation.
8
8
 
9
9
  This package includes two different water meter implementations:
10
10
 
11
- * Tesseract OCR and OpenCV solution for reading and interpreting water meter digits.
12
- This class requires further work to be truly useful. My Raspberry Pi didn't have enough disk
13
- space, so I decided to set this aside for now.
14
-
15
11
  * A simple class that compares subsequent images to measure differences. The greater the difference between images,
16
12
  the more the arrows and digits on the water meter have changed, indicating water consumption.
17
13
  This solution also uploads the images to a specified FTP site when water consumption is detected,
@@ -19,6 +15,10 @@ This package includes two different water meter implementations:
19
15
  consumption readings, it is highly reliable for detecting leaks. Just ensure that spiders or other potentially moving
20
16
  objects don't obstruct the camera's view of the water meter.
21
17
 
18
+ * Tesseract OCR and OpenCV solution for reading and interpreting water meter digits.
19
+ This class requires further work to be truly useful. My Raspberry Pi didn't have enough disk
20
+ space, so I decided to set this aside for now.
21
+
22
22
 
23
23
  .. image:: _static/images/watermeter_diff.png
24
24
  :alt: Web camera based water meter leak detector based on comparison of subsequent images
@@ -29,36 +29,20 @@ This package includes two different water meter implementations:
29
29
  Getting Started
30
30
  ---------------
31
31
 
32
- ### Note about Python - a Professional Ecosystem
33
-
34
- I'm affraid I have wasted more time solving all sorts of build, documentation, testing, and god-knows-what
35
- issues with Python ecosystem than I’ve spent actually writing Python code. Most recently,
36
- I wasted an entire day trying to figure out why coverage failed with the following error:
37
-
38
- .. code-block:: bash
39
-
40
- 'No source for code: 'juham_watermeter\config-3.py'.
41
-
42
- error, when all the other Python projects with precisely identical structures worked fine.
43
- The solution was to add a .coveragerc file with the following content:
44
-
45
- .. code-block:: bash
46
-
47
- [run]
48
- omit =
49
- config.py
50
- config-3.py
32
+ To install:
51
33
 
52
- This will of course blow up sooner or later, when some Python developer decides to rename those files.
34
+ .. code-block:: bash
53
35
 
36
+ pip install juham-watermeter
54
37
 
38
+ Which installs everything needed for reading water meters with the simple image comparison based solution.
55
39
 
56
40
 
57
- ### Installation
41
+ If you want to play with the Tesseract OCR and OpenCV solution for reading and interpreting water meter digits,
42
+ please read on.
58
43
 
59
- 1. Prerequisities
60
44
 
61
- In order to use the first solution you need Tesseract OCR to read the digits. To install Tesseract:
45
+ Installing Tesseract OCR to read the digits:
62
46
 
63
47
  .. code-block:: bash
64
48
 
@@ -70,10 +54,27 @@ If you are on Windows, visit the Tesseract GitHub repository, or Download a prec
70
54
 
71
55
  .. code-block:: bash
72
56
 
73
- pip install juham_watermeter
57
+ pip install juham-watermeter
74
58
 
75
59
 
76
60
  2. Configure
77
61
 
78
62
  To adjust update interval and other attributes edit `WaterMeter.json` configuration file.
79
63
 
64
+
65
+ ### Note about OpenCV and contributors
66
+
67
+ The Python coverage failed with the No source for code: 'juham_watermeter\config-3.py'
68
+ error, when all the other Python projects with precisely identical structures worked fine.
69
+ Traced down the bug to opencv package, and added a .coveragerc file with the following content:
70
+
71
+ .. code-block:: bash
72
+
73
+ [run]
74
+ omit =
75
+ config.py
76
+ config-3.py
77
+
78
+ as a solution. This will of course blow up sooner or later, when some OpenCV developer decides
79
+ to rename those files.
80
+
@@ -7,14 +7,14 @@ Web-camera based watermeter classes with leak detector
7
7
  """
8
8
 
9
9
  from .webcamera import WebCamera
10
- from .watermeter_ocr import WaterMeterOCR
10
+ #from .watermeter_ocr import WaterMeterOCR
11
11
  from .watermeter_imgdiff import WaterMeterImgDiff
12
12
  from .watermeter_ts import WaterMeterTs
13
13
  from .leakdetector import LeakDetector
14
14
 
15
15
  __all__ = [
16
16
  "WebCamera",
17
- "WaterMeterOCR",
17
+ # "WaterMeterOCR",
18
18
  "WaterMeterImgDiff",
19
19
  "WaterMeterTs",
20
20
  "LeakDetector",
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.2
2
+ Name: juham-watermeter
3
+ Version: 0.0.6
4
+ Summary: Web-camera based watermeter for Juham
5
+ Author-email: J Meskanen <juham.api@gmail.com>
6
+ Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
7
+ License: MIT License
8
+ ===========
9
+
10
+ Copyright (c) 2024, Juha Meskanen
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+
29
+
30
+ Project-URL: Homepage, https://gitlab.com/juham/juham
31
+ Project-URL: Bug Reports, https://gitlab.com/juham/juham
32
+ Project-URL: Funding, https://meskanen.com
33
+ Project-URL: Say Thanks!, http://meskanen.com
34
+ Project-URL: Source, https://gitlab.com/juham/juham
35
+ Keywords: object-oriented,plugin,framework,watermeter,home automation
36
+ Classifier: Development Status :: 2 - Pre-Alpha
37
+ Classifier: Intended Audience :: Developers
38
+ Classifier: Topic :: Software Development
39
+ Classifier: License :: OSI Approved :: MIT License
40
+ Classifier: Programming Language :: Python :: 3.8
41
+ Requires-Python: >=3.8
42
+ Description-Content-Type: text/markdown
43
+ License-File: LICENSE.rst
44
+ Requires-Dist: juham-core>=0.1.1
45
+ Requires-Dist: numpy
46
+ Requires-Dist: Pillow>=10.4.0
47
+ Requires-Dist: opencv-python-headless>=4.10.0
48
+ Requires-Dist: pytesseract>=0.3.13
49
+ Provides-Extra: dev
50
+ Requires-Dist: check-manifest; extra == "dev"
51
+
52
+ Watermeter plugin for Juham™
53
+ =============================
54
+
55
+ Description
56
+ -----------
57
+
58
+ A web camera and AI-based water meter solution for Juham™ home automation.
59
+
60
+ This package includes two different water meter implementations:
61
+
62
+ * A simple class that compares subsequent images to measure differences. The greater the difference between images,
63
+ the more the arrows and digits on the water meter have changed, indicating water consumption.
64
+ This solution also uploads the images to a specified FTP site when water consumption is detected,
65
+ allowing homeowners to inspect the water meter visually. While this solution doesn’t provide exact water
66
+ consumption readings, it is highly reliable for detecting leaks. Just ensure that spiders or other potentially moving
67
+ objects don't obstruct the camera's view of the water meter.
68
+
69
+ * Tesseract OCR and OpenCV solution for reading and interpreting water meter digits.
70
+ This class requires further work to be truly useful. My Raspberry Pi didn't have enough disk
71
+ space, so I decided to set this aside for now.
72
+
73
+
74
+ .. image:: _static/images/watermeter_diff.png
75
+ :alt: Web camera based water meter leak detector based on comparison of subsequent images
76
+ :width: 640px
77
+ :align: center
78
+
79
+
80
+ Getting Started
81
+ ---------------
82
+
83
+ To install:
84
+
85
+ .. code-block:: bash
86
+
87
+ pip install juham-watermeter
88
+
89
+ Which installs everything needed for reading water meters with the simple image comparison based solution.
90
+
91
+
92
+ If you want to play with the Tesseract OCR and OpenCV solution for reading and interpreting water meter digits,
93
+ please read on.
94
+
95
+
96
+ Installing Tesseract OCR to read the digits:
97
+
98
+ .. code-block:: bash
99
+
100
+ sudo apt install tesseract-ocr
101
+
102
+ If you are on Windows, visit the Tesseract GitHub repository, or Download a precompiled Windows binary from UB Mannheim.
103
+
104
+ 2. Install
105
+
106
+ .. code-block:: bash
107
+
108
+ pip install juham-watermeter
109
+
110
+
111
+ 2. Configure
112
+
113
+ To adjust update interval and other attributes edit `WaterMeter.json` configuration file.
114
+
115
+
116
+ ### Note about OpenCV and contributors
117
+
118
+ The Python coverage failed with the No source for code: 'juham_watermeter\config-3.py'
119
+ error, when all the other Python projects with precisely identical structures worked fine.
120
+ Traced down the bug to opencv package, and added a .coveragerc file with the following content:
121
+
122
+ .. code-block:: bash
123
+
124
+ [run]
125
+ omit =
126
+ config.py
127
+ config-3.py
128
+
129
+ as a solution. This will of course blow up sooner or later, when some OpenCV developer decides
130
+ to rename those files.
131
+
@@ -0,0 +1,20 @@
1
+ CHANGELOG.rst
2
+ LICENSE.rst
3
+ MANIFEST.in
4
+ README.rst
5
+ pyproject.toml
6
+ juham_watermeter/__init__.py
7
+ juham_watermeter/leakdetector.py
8
+ juham_watermeter/py.typed
9
+ juham_watermeter/watermeter_imgdiff.py
10
+ juham_watermeter/watermeter_ocr.py
11
+ juham_watermeter/watermeter_ts.py
12
+ juham_watermeter/webcamera.py
13
+ juham_watermeter.egg-info/PKG-INFO
14
+ juham_watermeter.egg-info/SOURCES.txt
15
+ juham_watermeter.egg-info/dependency_links.txt
16
+ juham_watermeter.egg-info/entry_points.txt
17
+ juham_watermeter.egg-info/requires.txt
18
+ juham_watermeter.egg-info/top_level.txt
19
+ tests/__init__.py
20
+ tests/test_watermeter.py
@@ -1,8 +1,8 @@
1
- juham-automation>=0.0.2
2
- opencv-python-headless>=4.10.0
1
+ juham-core>=0.1.1
3
2
  numpy
4
- pytesseract>=0.3.13
5
3
  Pillow>=10.4.0
4
+ opencv-python-headless>=4.10.0
5
+ pytesseract>=0.3.13
6
6
 
7
7
  [dev]
8
8
  check-manifest
@@ -3,14 +3,18 @@
3
3
  requires = ["setuptools"]
4
4
  build-backend = "setuptools.build_meta"
5
5
 
6
+ [tool.setuptools]
7
+ include-package-data = true
8
+ packages = ["juham_watermeter"]
9
+
6
10
 
7
11
  [project]
8
12
  name = "juham-watermeter"
9
- version = "0.0.5"
10
- description = "Built-in Test plugin"
11
- readme = {file = "docs/source/README.rst", content-type = "text/markdown"}
13
+ version = "0.0.6"
14
+ description = "Web-camera based watermeter for Juham"
15
+ readme = {file = "README.rst", content-type = "text/markdown"}
12
16
  requires-python = ">=3.8"
13
- license = {file = "docs/source/LICENSE.rst", content-type = "text/markdown"}
17
+ license = {file = "LICENSE.rst", content-type = "text/markdown"}
14
18
  keywords = ["object-oriented", "plugin", "framework", "watermeter", "home automation"]
15
19
  authors = [
16
20
  {name = "J Meskanen", email = "juham.api@gmail.com" }
@@ -28,11 +32,11 @@ classifiers = [
28
32
  ]
29
33
 
30
34
  dependencies = [
31
- "juham-automation >= 0.0.2",
32
- "opencv-python-headless >= 4.10.0",
35
+ "juham-core >= 0.1.1",
33
36
  "numpy",
37
+ "Pillow >= 10.4.0",
38
+ "opencv-python-headless >= 4.10.0",
34
39
  "pytesseract >= 0.3.13",
35
- "Pillow >= 10.4.0"
36
40
  ]
37
41
 
38
42
  [project.optional-dependencies]
@@ -49,11 +53,11 @@ leakdetector_plugin = "juham_watermeter:LeakDetector"
49
53
 
50
54
 
51
55
  [project.urls]
52
- "Homepage" = "https://meskanen.com"
53
- "Bug Reports" = "https://meskanen.com"
56
+ "Homepage" = "https://gitlab.com/juham/juham"
57
+ "Bug Reports" = "https://gitlab.com/juham/juham"
54
58
  "Funding" = "https://meskanen.com"
55
59
  "Say Thanks!" = "http://meskanen.com"
56
- "Source" = "https://meskanen.com"
60
+ "Source" = "https://gitlab.com/juham/juham"
57
61
 
58
62
 
59
63
 
@@ -1,27 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: juham-watermeter
3
- Version: 0.0.5
4
- Summary: Built-in Test plugin
5
- Author-email: J Meskanen <juham.api@gmail.com>
6
- Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
7
- Project-URL: Homepage, https://meskanen.com
8
- Project-URL: Bug Reports, https://meskanen.com
9
- Project-URL: Funding, https://meskanen.com
10
- Project-URL: Say Thanks!, http://meskanen.com
11
- Project-URL: Source, https://meskanen.com
12
- Keywords: object-oriented,plugin,framework,watermeter,home automation
13
- Classifier: Development Status :: 2 - Pre-Alpha
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Topic :: Software Development
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: Programming Language :: Python :: 3.8
18
- Requires-Python: >=3.8
19
- Description-Content-Type: text/markdown
20
- License-File: LICENSE.rst
21
- Requires-Dist: juham-automation>=0.0.2
22
- Requires-Dist: opencv-python-headless>=4.10.0
23
- Requires-Dist: numpy
24
- Requires-Dist: pytesseract>=0.3.13
25
- Requires-Dist: Pillow>=10.4.0
26
- Provides-Extra: dev
27
- Requires-Dist: check-manifest; extra == "dev"
@@ -1,4 +0,0 @@
1
- # Sphinx build info version 1
2
- # This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3
- config: c5f6fb335ec5ac3ac8ac7f5ce8d6088b
4
- tags: 645f666f9bcd5a90fca523b33c5a78b7
File without changes
@@ -1,47 +0,0 @@
1
- Watermeter plugin for Juham
2
- ===========================
3
-
4
- .. image:: _static/juham.png
5
- :alt: Juham - Juha's Ultimate Home Automation Masterpiece
6
- :width: 400px
7
- :height: 300px
8
-
9
- .. toctree::
10
- :maxdepth: 2
11
- :caption: Contents:
12
-
13
- juham_watermeter/index
14
-
15
- .. include:: ../../README.rst
16
-
17
- .. include:: ../../LICENSE.rst
18
-
19
- .. include:: ../../CHANGELOG.rst
20
-
21
-
22
-
23
- Classes
24
- -------
25
-
26
- .. inheritance-diagram::
27
- juham_watermeter.WaterMeterImgDiff
28
- juham_watermeter.WaterMeterOCR
29
- juham_watermeter.WebCamera
30
- juham_watermeter.LeakDetector
31
- juham_core.Juham
32
- masterpiece.composite.Composite
33
- masterpiece.application.Application
34
- masterpiece.plugin.Plugin
35
- masterpiece.plugmaster.PlugMaster
36
- masterpiece.argmaestro.ArgMaestro
37
- masterpiece.log.Log
38
- :parts: 1
39
-
40
-
41
-
42
- Index
43
- =====
44
-
45
- * :ref:`genindex`
46
- * :ref:`modindex`
47
- * :ref:`search`
@@ -1,11 +0,0 @@
1
- Juham Watermeter
2
- ================
3
-
4
- Adds watermeter capability to Juham applications
5
-
6
- .. automodule:: juham_watermeter
7
- :members:
8
- :inherited-members:
9
- :undoc-members:
10
- :show-inheritance:
11
-