juham-watermeter 0.0.7__py3-none-any.whl → 0.0.9__py3-none-any.whl
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.
- juham_watermeter/watermeter_imgdiff.py +1 -5
- juham_watermeter/webcamera.py +1 -6
- {juham_watermeter-0.0.7.dist-info → juham_watermeter-0.0.9.dist-info}/METADATA +5 -27
- juham_watermeter-0.0.9.dist-info/RECORD +13 -0
- {juham_watermeter-0.0.7.dist-info → juham_watermeter-0.0.9.dist-info}/WHEEL +1 -1
- juham_watermeter-0.0.7.dist-info/RECORD +0 -13
- {juham_watermeter-0.0.7.dist-info → juham_watermeter-0.0.9.dist-info}/entry_points.txt +0 -0
- {juham_watermeter-0.0.7.dist-info → juham_watermeter-0.0.9.dist-info/licenses}/LICENSE.rst +0 -0
- {juham_watermeter-0.0.7.dist-info → juham_watermeter-0.0.9.dist-info}/top_level.txt +0 -0
@@ -143,10 +143,6 @@ class WaterMeterThreadImgDiff(WebCameraThread):
|
|
143
143
|
# Return a value between 0.0 (identical) and 1.0 (maximally different)
|
144
144
|
return min(max(change_area, 0.0), 1.0)
|
145
145
|
|
146
|
-
@override
|
147
|
-
def update_interval(self) -> float:
|
148
|
-
return self._interval
|
149
|
-
|
150
146
|
def upload_file(self, filename: str) -> None:
|
151
147
|
"""Upload the given filename to the ftp server, if the server is configured.
|
152
148
|
|
@@ -256,7 +252,7 @@ class WaterMeterImgDiff(WebCamera):
|
|
256
252
|
]
|
257
253
|
|
258
254
|
_workerThreadId: str = WaterMeterThreadImgDiff.get_class_id()
|
259
|
-
update_interval: float =
|
255
|
+
update_interval: float = 60 * 10 # 10 minutes
|
260
256
|
topic = "watermeter"
|
261
257
|
location = "home"
|
262
258
|
camera: int = 0
|
juham_watermeter/webcamera.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
"""Web camera with basic image processing features.
|
2
|
-
|
3
|
-
"""
|
1
|
+
"""Web camera with basic image processing features."""
|
4
2
|
|
5
3
|
import cv2
|
6
4
|
import numpy as np
|
@@ -64,7 +62,6 @@ class WebCameraThread(MasterPieceThread):
|
|
64
62
|
|
65
63
|
# Check if the webcam is opened correctly
|
66
64
|
if not cap.isOpened():
|
67
|
-
print("CANNOT ACCESS THE CAMERA")
|
68
65
|
self.error(f"Could not access the camera {self._camera}.")
|
69
66
|
return np.zeros(
|
70
67
|
(1, 1, 3), dtype=np.uint8
|
@@ -74,7 +71,6 @@ class WebCameraThread(MasterPieceThread):
|
|
74
71
|
try:
|
75
72
|
ret, frame = cap.read()
|
76
73
|
if not ret:
|
77
|
-
print("WTF, Camera failed")
|
78
74
|
self.error("Could not capture image.")
|
79
75
|
frame = np.zeros(
|
80
76
|
(1, 1, 3), dtype=np.uint8
|
@@ -142,7 +138,6 @@ class WebCamera(JuhamThread):
|
|
142
138
|
_WEBCAMERA_ATTRS: list[str] = ["location", "camera"]
|
143
139
|
|
144
140
|
_workerThreadId: str = WebCameraThread.get_class_id()
|
145
|
-
update_interval: float = 60
|
146
141
|
location = "home"
|
147
142
|
camera: int = 0
|
148
143
|
|
@@ -1,32 +1,10 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: juham-watermeter
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.9
|
4
4
|
Summary: Web-camera based watermeter for Juham
|
5
5
|
Author-email: J Meskanen <juham.api@gmail.com>
|
6
6
|
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
|
7
|
-
License: MIT
|
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
|
-
|
7
|
+
License-Expression: MIT
|
30
8
|
Project-URL: Homepage, https://gitlab.com/juham/juham
|
31
9
|
Project-URL: Bug Reports, https://gitlab.com/juham/juham
|
32
10
|
Project-URL: Funding, https://meskanen.com
|
@@ -36,18 +14,18 @@ Keywords: object-oriented,plugin,framework,watermeter,home automation
|
|
36
14
|
Classifier: Development Status :: 2 - Pre-Alpha
|
37
15
|
Classifier: Intended Audience :: Developers
|
38
16
|
Classifier: Topic :: Software Development
|
39
|
-
Classifier: License :: OSI Approved :: MIT License
|
40
17
|
Classifier: Programming Language :: Python :: 3.8
|
41
18
|
Requires-Python: >=3.8
|
42
19
|
Description-Content-Type: text/markdown
|
43
20
|
License-File: LICENSE.rst
|
44
|
-
Requires-Dist: juham-core>=0.1.
|
21
|
+
Requires-Dist: juham-core>=0.1.5
|
45
22
|
Requires-Dist: numpy
|
46
23
|
Requires-Dist: Pillow>=10.4.0
|
47
24
|
Requires-Dist: opencv-python-headless>=4.10.0
|
48
25
|
Requires-Dist: pytesseract>=0.3.13
|
49
26
|
Provides-Extra: dev
|
50
27
|
Requires-Dist: check-manifest; extra == "dev"
|
28
|
+
Dynamic: license-file
|
51
29
|
|
52
30
|
Watermeter plugin for Juham™
|
53
31
|
=============================
|
@@ -0,0 +1,13 @@
|
|
1
|
+
juham_watermeter/__init__.py,sha256=kFVTpeSgFaXsJJ-uxxYf656Os-zVVVriEx5yAjY1XhE,412
|
2
|
+
juham_watermeter/leakdetector.py,sha256=IOTlvsRQ7N6zC2kADMr2XjrPMBGFnSBac-PpqixiyZE,6369
|
3
|
+
juham_watermeter/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
4
|
+
juham_watermeter/watermeter_imgdiff.py,sha256=OD8Wc6VVeJteuWgYsbbjwbeWnRywHkin9vBzXnMP5aQ,12071
|
5
|
+
juham_watermeter/watermeter_ocr.py,sha256=b9DS_7tPPDS_BHrS34x0Rfh3kTotJVMZ9tmtdz8OWz4,9105
|
6
|
+
juham_watermeter/watermeter_ts.py,sha256=T4nKoVNpgU53CDvSIRgEbm4oy1UiqET7xfRcg_OtoPI,3246
|
7
|
+
juham_watermeter/webcamera.py,sha256=ogmF6AKgqR3XmmZdlst46ElKb6LAHNhc77983fKTptk,5724
|
8
|
+
juham_watermeter-0.0.9.dist-info/licenses/LICENSE.rst,sha256=xCUTZIYDotncT_ibKn8nNVkUGiK05hJyOWypG8G7Evk,1074
|
9
|
+
juham_watermeter-0.0.9.dist-info/METADATA,sha256=7v8APM-30gJFB4vyGW1-9wockQ0r9i4sYANQtQl__LU,3600
|
10
|
+
juham_watermeter-0.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
11
|
+
juham_watermeter-0.0.9.dist-info/entry_points.txt,sha256=4KQZ-XUjd026JX-9dLAvw6e5XE6kdshWYE4pqDgeYtE,252
|
12
|
+
juham_watermeter-0.0.9.dist-info/top_level.txt,sha256=kvbS5ION4k6uJwlJuWRNHIKPrOvpVldiWeNLWbqH2X0,17
|
13
|
+
juham_watermeter-0.0.9.dist-info/RECORD,,
|
@@ -1,13 +0,0 @@
|
|
1
|
-
juham_watermeter/__init__.py,sha256=kFVTpeSgFaXsJJ-uxxYf656Os-zVVVriEx5yAjY1XhE,412
|
2
|
-
juham_watermeter/leakdetector.py,sha256=IOTlvsRQ7N6zC2kADMr2XjrPMBGFnSBac-PpqixiyZE,6369
|
3
|
-
juham_watermeter/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
4
|
-
juham_watermeter/watermeter_imgdiff.py,sha256=njBhUJpAK5YH5Ob3HpHyqVCikIFtRB8mZ-lTAOObECg,12138
|
5
|
-
juham_watermeter/watermeter_ocr.py,sha256=b9DS_7tPPDS_BHrS34x0Rfh3kTotJVMZ9tmtdz8OWz4,9105
|
6
|
-
juham_watermeter/watermeter_ts.py,sha256=T4nKoVNpgU53CDvSIRgEbm4oy1UiqET7xfRcg_OtoPI,3246
|
7
|
-
juham_watermeter/webcamera.py,sha256=Z7Yk_XcHC6-qk6uMVlUCFwhnRzII0la7QFCkyuFlTTI,5848
|
8
|
-
juham_watermeter-0.0.7.dist-info/LICENSE.rst,sha256=xCUTZIYDotncT_ibKn8nNVkUGiK05hJyOWypG8G7Evk,1074
|
9
|
-
juham_watermeter-0.0.7.dist-info/METADATA,sha256=tUds1LkMKcZcrKdmx9nw4dFb0tzD7vL7bl6CY7swsI8,4865
|
10
|
-
juham_watermeter-0.0.7.dist-info/WHEEL,sha256=EaM1zKIUYa7rQnxGiOCGhzJABRwy4WO57rWMR3_tj4I,91
|
11
|
-
juham_watermeter-0.0.7.dist-info/entry_points.txt,sha256=4KQZ-XUjd026JX-9dLAvw6e5XE6kdshWYE4pqDgeYtE,252
|
12
|
-
juham_watermeter-0.0.7.dist-info/top_level.txt,sha256=kvbS5ION4k6uJwlJuWRNHIKPrOvpVldiWeNLWbqH2X0,17
|
13
|
-
juham_watermeter-0.0.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|