moat-kv-ow 0.9.5__tar.gz → 0.9.7__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.
- moat_kv_ow-0.9.7/Makefile +14 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7}/PKG-INFO +2 -2
- moat_kv_ow-0.9.7/TODO.rst +5 -0
- moat_kv_ow-0.9.7/USAGE.rst +100 -0
- moat_kv_ow-0.9.7/debian/.gitignore +8 -0
- moat_kv_ow-0.9.7/debian/changelog +215 -0
- moat_kv_ow-0.9.7/debian/control +24 -0
- moat_kv_ow-0.9.7/debian/rules +16 -0
- moat_kv_ow-0.9.7/debian/source/format +1 -0
- moat_kv_ow-0.9.7/debian/watch +4 -0
- moat_kv_ow-0.9.7/moat-kv-ow@.service +19 -0
- moat_kv_ow-0.9.7/pyproject.toml +37 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat/kv/ow/_main.py +2 -2
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat/kv/ow/mock.py +2 -3
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat/kv/ow/model.py +1 -1
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat/kv/ow/task.py +1 -1
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat_kv_ow.egg-info/PKG-INFO +2 -2
- moat_kv_ow-0.9.7/src/moat_kv_ow.egg-info/SOURCES.txt +27 -0
- moat_kv_ow-0.9.7/src/moat_kv_ow.egg-info/requires.txt +1 -0
- moat_kv_ow-0.9.7/systemd/moat-kv-ow@.service +19 -0
- moat_kv_ow-0.9.7/tools/update-0-4.py +24 -0
- moat_kv_ow-0.9.5/moat_kv_ow.egg-info/SOURCES.txt +0 -15
- moat_kv_ow-0.9.5/moat_kv_ow.egg-info/requires.txt +0 -1
- moat_kv_ow-0.9.5/pyproject.toml +0 -95
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7}/LICENSE.txt +0 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7}/README.rst +0 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7}/setup.cfg +0 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat/kv/ow/__init__.py +0 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat/kv/ow/_cfg.yaml +0 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat_kv_ow.egg-info/dependency_links.txt +0 -0
- {moat_kv_ow-0.9.5 → moat_kv_ow-0.9.7/src}/moat_kv_ow.egg-info/top_level.txt +0 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/make -f
|
2
|
+
|
3
|
+
PACKAGE = moat-kv-ow
|
4
|
+
MAKEINCL ?= $(shell python3 -mmoat src path)/make/py
|
5
|
+
|
6
|
+
ifneq ($(wildcard $(MAKEINCL)),)
|
7
|
+
include $(MAKEINCL)
|
8
|
+
# availabe via https://github.com/moat-src
|
9
|
+
|
10
|
+
else
|
11
|
+
%:
|
12
|
+
@echo "Please fix 'python3 -mmoat src path'."
|
13
|
+
@exit 1
|
14
|
+
endif
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: moat-kv-ow
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.7
|
4
4
|
Summary: 1wire connector for MoaT-KV
|
5
5
|
Author-email: Matthias Urlichs <matthias@urlichs.de>
|
6
6
|
Project-URL: homepage, https://m-o-a-t.org
|
@@ -14,7 +14,7 @@ Classifier: Topic :: Home Automation
|
|
14
14
|
Requires-Python: >=3.8
|
15
15
|
Description-Content-Type: text/x-rst
|
16
16
|
License-File: LICENSE.txt
|
17
|
-
Requires-Dist: moat-kv~=0.70.
|
17
|
+
Requires-Dist: moat-kv~=0.70.24
|
18
18
|
Dynamic: license-file
|
19
19
|
|
20
20
|
==========
|
@@ -0,0 +1,100 @@
|
|
1
|
+
==============
|
2
|
+
Using DistOWFS
|
3
|
+
==============
|
4
|
+
|
5
|
+
Run "moat kw ow monitor" to connect to the server on localhost.
|
6
|
+
|
7
|
+
See "moat dump cfg owfs" for configuration options. Specifically, use
|
8
|
+
this config snippet to connect to two external servers instead of localhost::
|
9
|
+
|
10
|
+
owfs:
|
11
|
+
server:
|
12
|
+
- host: one.example
|
13
|
+
- host: two.example
|
14
|
+
|
15
|
+
|
16
|
+
Command line
|
17
|
+
============
|
18
|
+
|
19
|
+
|
20
|
+
.. program:: moat kw ow
|
21
|
+
|
22
|
+
The main entry point for this extension.
|
23
|
+
|
24
|
+
|
25
|
+
.. program:: moat kw ow list
|
26
|
+
|
27
|
+
Print the current state of your 1wire devices.
|
28
|
+
|
29
|
+
This command does not access the device or show on which bus it is; this is
|
30
|
+
solely for displaying the configuration of its interaction with DistKV.
|
31
|
+
|
32
|
+
.. option:: family
|
33
|
+
|
34
|
+
You can limit the display to a family code.
|
35
|
+
|
36
|
+
.. option:: device
|
37
|
+
|
38
|
+
If you add the device ID, only that devices data is displayed.
|
39
|
+
|
40
|
+
Use '-' to show the data stored at the family entry.
|
41
|
+
|
42
|
+
|
43
|
+
.. program:: moat kw ow monitor
|
44
|
+
|
45
|
+
This is a stand-alone 1wire monitor. It connects to all configured servers
|
46
|
+
and runs polls and monitors.
|
47
|
+
|
48
|
+
No options yet.
|
49
|
+
|
50
|
+
|
51
|
+
.. program:: moat kw ow poll
|
52
|
+
|
53
|
+
Configure polling.
|
54
|
+
|
55
|
+
If the device (and the given attribute) supports simultaneous conversion,
|
56
|
+
this might cause results to be read more often than configured here.
|
57
|
+
|
58
|
+
.. option:: -f, --family <code>
|
59
|
+
|
60
|
+
Change the poll interval's default for this family code.
|
61
|
+
|
62
|
+
.. option:: -d, --device <family.device>
|
63
|
+
|
64
|
+
Change the poll interval for this device.
|
65
|
+
|
66
|
+
.. option:: <attribute>
|
67
|
+
|
68
|
+
Set the interval on this attribute. Use a ``/`` separator for sub-attributes.
|
69
|
+
|
70
|
+
.. option:: <interval>
|
71
|
+
|
72
|
+
The interval to poll at. Use ``-`` to disable polling.
|
73
|
+
|
74
|
+
|
75
|
+
.. program:: moat kw ow set
|
76
|
+
|
77
|
+
You can use this command to add arbitrary values to a device's entry. Use
|
78
|
+
this e.g. to add a note where the device is located, or to signal your own
|
79
|
+
code.
|
80
|
+
|
81
|
+
.. option:: -f, --family <code>
|
82
|
+
|
83
|
+
Change an attribute on this family code.
|
84
|
+
|
85
|
+
.. option:: -d, --device <family.device>
|
86
|
+
|
87
|
+
Change an attribute on this device.
|
88
|
+
|
89
|
+
.. option:: -v, --value
|
90
|
+
|
91
|
+
The value to set.
|
92
|
+
|
93
|
+
.. option:: -e, --eval
|
94
|
+
|
95
|
+
Flag that the value is a Python expression and should be evaluated.
|
96
|
+
|
97
|
+
.. option:: <name>…
|
98
|
+
|
99
|
+
The attribute name to set. Use more than once for accessing sub-dicts.
|
100
|
+
|
@@ -0,0 +1,215 @@
|
|
1
|
+
moat-kv-ow (0.9.7-1) unstable; urgency=medium
|
2
|
+
|
3
|
+
* New release for 25.1.24
|
4
|
+
|
5
|
+
-- Matthias Urlichs <matthias@urlichs.de> Tue, 06 May 2025 11:32:51 +0200
|
6
|
+
|
7
|
+
moat-kv-ow (0.9.6-5) unstable; urgency=medium
|
8
|
+
|
9
|
+
* New release for 25.1.13
|
10
|
+
|
11
|
+
-- Matthias Urlichs <matthias@urlichs.de> Tue, 06 May 2025 02:05:48 +0200
|
12
|
+
|
13
|
+
moat-kv-ow (0.9.6-4) unstable; urgency=medium
|
14
|
+
|
15
|
+
* New release for 25.1.10
|
16
|
+
|
17
|
+
-- Matthias Urlichs <matthias@urlichs.de> Mon, 05 May 2025 06:34:17 +0200
|
18
|
+
|
19
|
+
moat-kv-ow (0.9.6-2) unstable; urgency=medium
|
20
|
+
|
21
|
+
* New release for 25.1.8
|
22
|
+
|
23
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sun, 04 May 2025 19:50:13 +0200
|
24
|
+
|
25
|
+
moat-kv-ow (0.9.6-1) unstable; urgency=medium
|
26
|
+
|
27
|
+
* New release for 25.1.2
|
28
|
+
|
29
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sun, 04 May 2025 16:22:16 +0200
|
30
|
+
|
31
|
+
moat-kv-ow (0.9.5-1) unstable; urgency=medium
|
32
|
+
|
33
|
+
* New release for 25.0.2
|
34
|
+
|
35
|
+
-- Matthias Urlichs <matthias@urlichs.de> Fri, 21 Mar 2025 12:03:16 +0100
|
36
|
+
|
37
|
+
distkv-owfs (0.7.4-1) unstable; urgency=medium
|
38
|
+
|
39
|
+
* Merge
|
40
|
+
|
41
|
+
-- Matthias Urlichs <matthias@urlichs.de> Wed, 30 Nov 2022 16:44:36 +0100
|
42
|
+
|
43
|
+
distkv-owfs (0.7.3-1) unstable; urgency=medium
|
44
|
+
|
45
|
+
* Merge
|
46
|
+
|
47
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 19 Nov 2022 20:16:02 +0100
|
48
|
+
|
49
|
+
distkv-owfs (0.7.2-1) unstable; urgency=medium
|
50
|
+
|
51
|
+
* Merge
|
52
|
+
|
53
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 19 Nov 2022 15:39:03 +0100
|
54
|
+
|
55
|
+
distkv-owfs (0.7.1-1) unstable; urgency=medium
|
56
|
+
|
57
|
+
* Merge
|
58
|
+
|
59
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 19 Nov 2022 15:36:22 +0100
|
60
|
+
|
61
|
+
distkv-owfs (0.7.1-1) unstable; urgency=medium
|
62
|
+
|
63
|
+
* Merge
|
64
|
+
|
65
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 19 Nov 2022 15:35:41 +0100
|
66
|
+
|
67
|
+
distkv-owfs (0.7.0-1) unstable; urgency=medium
|
68
|
+
|
69
|
+
* Merge
|
70
|
+
|
71
|
+
-- Matthias Urlichs <matthias@urlichs.de> Fri, 04 Nov 2022 18:32:06 +0100
|
72
|
+
|
73
|
+
distkv-owfs (0.6.2-1) unstable; urgency=medium
|
74
|
+
|
75
|
+
* Merge
|
76
|
+
|
77
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 28 Aug 2021 14:04:01 +0200
|
78
|
+
|
79
|
+
distkv-owfs (0.6.0-1) unstable; urgency=medium
|
80
|
+
|
81
|
+
* Merge
|
82
|
+
|
83
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sun, 07 Feb 2021 18:55:25 +0100
|
84
|
+
|
85
|
+
distkv-owfs (0.6.0-1) unstable; urgency=medium
|
86
|
+
|
87
|
+
* Merge
|
88
|
+
|
89
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sun, 07 Feb 2021 18:53:09 +0100
|
90
|
+
|
91
|
+
distowfs (0.4.5-1) unstable; urgency=medium
|
92
|
+
|
93
|
+
* Merge
|
94
|
+
|
95
|
+
-- Matthias Urlichs <matthias@urlichs.de> Thu, 30 Jul 2020 03:02:26 +0200
|
96
|
+
|
97
|
+
distowfs (0.4.4-1) unstable; urgency=medium
|
98
|
+
|
99
|
+
* Merge
|
100
|
+
|
101
|
+
-- Matthias Urlichs <matthias@urlichs.de> Wed, 29 Jul 2020 16:30:23 +0200
|
102
|
+
|
103
|
+
distowfs (0.4.3-1) unstable; urgency=medium
|
104
|
+
|
105
|
+
* Merge
|
106
|
+
|
107
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 11 Jul 2020 13:10:18 +0200
|
108
|
+
|
109
|
+
distowfs (0.4.2-1) unstable; urgency=medium
|
110
|
+
|
111
|
+
* Merge
|
112
|
+
|
113
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 11 Jul 2020 11:46:35 +0200
|
114
|
+
|
115
|
+
distowfs (0.4.1-1) unstable; urgency=medium
|
116
|
+
|
117
|
+
* Merge
|
118
|
+
|
119
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 11 Jul 2020 10:14:52 +0200
|
120
|
+
|
121
|
+
distowfs (0.4.0-1) unstable; urgency=medium
|
122
|
+
|
123
|
+
* Merge
|
124
|
+
|
125
|
+
-- Matthias Urlichs <matthias@urlichs.de> Fri, 10 Jul 2020 19:28:29 +0200
|
126
|
+
|
127
|
+
distowfs (0.3.5-1) unstable; urgency=medium
|
128
|
+
|
129
|
+
* Merge
|
130
|
+
|
131
|
+
-- Matthias Urlichs <matthias@urlichs.de> Tue, 07 Jul 2020 19:03:43 +0200
|
132
|
+
|
133
|
+
distowfs (0.3.4-2) unstable; urgency=medium
|
134
|
+
|
135
|
+
* Tighten requirements
|
136
|
+
|
137
|
+
-- Matthias Urlichs <matthias@urlichs.de> Tue, 07 Jul 2020 13:54:22 +0200
|
138
|
+
|
139
|
+
distowfs (0.3.4-1) unstable; urgency=medium
|
140
|
+
|
141
|
+
* Merge
|
142
|
+
|
143
|
+
-- Matthias Urlichs <matthias@urlichs.de> Tue, 07 Jul 2020 13:52:39 +0200
|
144
|
+
|
145
|
+
distowfs (0.3.3-1) unstable; urgency=medium
|
146
|
+
|
147
|
+
* Merge
|
148
|
+
|
149
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sun, 05 Jul 2020 13:51:44 +0200
|
150
|
+
|
151
|
+
distowfs (0.3.2-1) unstable; urgency=medium
|
152
|
+
|
153
|
+
* Merge
|
154
|
+
|
155
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sun, 05 Jul 2020 12:09:18 +0200
|
156
|
+
|
157
|
+
distowfs (0.3.1-1) unstable; urgency=medium
|
158
|
+
|
159
|
+
* Merge
|
160
|
+
|
161
|
+
-- Matthias Urlichs <matthias@urlichs.de> Tue, 30 Jun 2020 18:11:13 +0200
|
162
|
+
|
163
|
+
distowfs (0.2.2-5) unstable; urgency=medium
|
164
|
+
|
165
|
+
* debian/compat, dammit
|
166
|
+
|
167
|
+
-- Matthias Urlichs <matthias@urlichs.de> Mon, 29 Jun 2020 14:24:53 +0200
|
168
|
+
|
169
|
+
distowfs (0.2.2-4) unstable; urgency=medium
|
170
|
+
|
171
|
+
* install service file
|
172
|
+
|
173
|
+
-- Matthias Urlichs <matthias@urlichs.de> Mon, 29 Jun 2020 14:09:54 +0200
|
174
|
+
|
175
|
+
distowfs (0.2.2-3) unstable; urgency=medium
|
176
|
+
|
177
|
+
* *sigh*
|
178
|
+
|
179
|
+
-- Matthias Urlichs <matthias@urlichs.de> Mon, 29 Jun 2020 13:46:23 +0200
|
180
|
+
|
181
|
+
distowfs (0.2.2-2) unstable; urgency=medium
|
182
|
+
|
183
|
+
* Stupidity
|
184
|
+
|
185
|
+
-- Matthias Urlichs <matthias@urlichs.de> Mon, 29 Jun 2020 12:46:52 +0200
|
186
|
+
|
187
|
+
distowfs (0.2.2-1) unstable; urgency=medium
|
188
|
+
|
189
|
+
* Merge
|
190
|
+
|
191
|
+
-- Matthias Urlichs <matthias@urlichs.de> Mon, 29 Jun 2020 12:45:52 +0200
|
192
|
+
|
193
|
+
distowfs (0.2.1-1) unstable; urgency=medium
|
194
|
+
|
195
|
+
* Merge 0.2.1
|
196
|
+
|
197
|
+
-- Matthias Urlichs <matthias@urlichs.de> Tue, 27 Aug 2019 13:41:06 +0200
|
198
|
+
|
199
|
+
distowfs (0.2.0-3) unstable; urgency=medium
|
200
|
+
|
201
|
+
* Rename binary package
|
202
|
+
|
203
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 10 Aug 2019 19:19:32 +0200
|
204
|
+
|
205
|
+
distowfs (0.2.0-2) unstable; urgency=medium
|
206
|
+
|
207
|
+
* Deps
|
208
|
+
|
209
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 10 Aug 2019 19:16:23 +0200
|
210
|
+
|
211
|
+
distowfs (0.2.0-1) unstable; urgency=low
|
212
|
+
|
213
|
+
* source package automatically created by stdeb 0.8.5
|
214
|
+
|
215
|
+
-- Matthias Urlichs <matthias@urlichs.de> Sat, 10 Aug 2019 19:10:20 +0200
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Source: moat-kv-ow
|
2
|
+
Maintainer: Matthias Urlichs <matthias@urlichs.de>
|
3
|
+
Section: python
|
4
|
+
Priority: optional
|
5
|
+
Build-Depends: dh-python, python3-all, debhelper (>= 13), debhelper-compat (= 13),
|
6
|
+
python3-setuptools,
|
7
|
+
python3-wheel,
|
8
|
+
Standards-Version: 3.9.6
|
9
|
+
Homepage: https://github.com/smurfix/distowfs
|
10
|
+
|
11
|
+
Package: moat-kv-ow
|
12
|
+
Architecture: all
|
13
|
+
Depends: ${misc:Depends}, ${python3:Depends},
|
14
|
+
moat-kv,
|
15
|
+
python3-asyncowfs (>= 0.12.0),
|
16
|
+
Replaces: python3-distowfs
|
17
|
+
Conflicts: python3-distowfs
|
18
|
+
Description: A distributed no-master key-value store
|
19
|
+
DistOWFS is a link between 1wire and DistKV.
|
20
|
+
.
|
21
|
+
It will add all discovered 1wire devices, poll these devices as specified,
|
22
|
+
write values that it reads from 1wire to some DistKV entry, monitor a DistKV
|
23
|
+
entry and write any updates to 1wire, and work with DistKV's runner system,
|
24
|
+
either centrally or distributed.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/make -f
|
2
|
+
|
3
|
+
# This file was automatically generated by stdeb 0.8.5 at
|
4
|
+
# Sat, 10 Aug 2019 19:10:20 +0200
|
5
|
+
export PYBUILD_NAME=moat-kv-ow
|
6
|
+
%:
|
7
|
+
dh $@ --with python3 --buildsystem=pybuild
|
8
|
+
|
9
|
+
debian/moat-kv-ow@.service: systemd/moat-kv-ow@.service
|
10
|
+
cp $< $@
|
11
|
+
|
12
|
+
override_dh_auto_install: debian/moat-kv-ow@.service
|
13
|
+
dh_auto_install
|
14
|
+
|
15
|
+
override_dh_auto_test:
|
16
|
+
: skip
|
@@ -0,0 +1 @@
|
|
1
|
+
3.0 (quilt)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
[Unit]
|
2
|
+
Description=Moat-KV OWFS server
|
3
|
+
After=moat-kv.service
|
4
|
+
Requires=moat-kv.service
|
5
|
+
|
6
|
+
ConditionFileNotEmpty=/etc/moat/moat.cfg
|
7
|
+
|
8
|
+
[Install]
|
9
|
+
WantedBy=multi-user.target
|
10
|
+
|
11
|
+
[Service]
|
12
|
+
Type=notify
|
13
|
+
ExecStart=/usr/bin/moat kv ow monitor %I
|
14
|
+
|
15
|
+
TimeoutSec=300
|
16
|
+
WatchdogSec=10
|
17
|
+
|
18
|
+
Restart=always
|
19
|
+
RestartSec=30
|
@@ -0,0 +1,37 @@
|
|
1
|
+
[build-system]
|
2
|
+
build-backend = "setuptools.build_meta"
|
3
|
+
requires = [ "setuptools", "wheel",]
|
4
|
+
|
5
|
+
[project]
|
6
|
+
classifiers = [
|
7
|
+
"Development Status :: 4 - Beta",
|
8
|
+
"Intended Audience :: Information Technology",
|
9
|
+
"Programming Language :: Python :: 3",
|
10
|
+
"Topic :: Database",
|
11
|
+
"Topic :: Home Automation",
|
12
|
+
]
|
13
|
+
dependencies = [
|
14
|
+
"moat-kv ~= 0.70.24",
|
15
|
+
]
|
16
|
+
version = "0.9.7"
|
17
|
+
keywords = [ "MoaT",]
|
18
|
+
requires-python = ">=3.8"
|
19
|
+
name = "moat-kv-ow"
|
20
|
+
description = "1wire connector for MoaT-KV"
|
21
|
+
readme = "README.rst"
|
22
|
+
|
23
|
+
[[project.authors]]
|
24
|
+
email = "matthias@urlichs.de"
|
25
|
+
name = "Matthias Urlichs"
|
26
|
+
|
27
|
+
[project.urls]
|
28
|
+
homepage = "https://m-o-a-t.org"
|
29
|
+
repository = "https://github.com/M-o-a-T/moat"
|
30
|
+
|
31
|
+
[tool.setuptools]
|
32
|
+
[tool.setuptools.packages.find]
|
33
|
+
where = ["src"]
|
34
|
+
|
35
|
+
[tool.setuptools.package-data]
|
36
|
+
"*" = ["*.yaml"]
|
37
|
+
|
@@ -47,7 +47,7 @@ async def list_(obj, device, family):
|
|
47
47
|
def pm(p):
|
48
48
|
if len(p) < 1:
|
49
49
|
return path
|
50
|
-
return Path("
|
50
|
+
return Path(f"{f:02x}.{p[0]:12x}", *p[1:])
|
51
51
|
|
52
52
|
elif device:
|
53
53
|
f, d = device.split(".", 2)[0:2]
|
@@ -67,7 +67,7 @@ async def list_(obj, device, family):
|
|
67
67
|
elif len(p) == 1:
|
68
68
|
return Path("%02x" % p[0])
|
69
69
|
else:
|
70
|
-
return Path("
|
70
|
+
return Path(f"{p[0]:02x}.{p[1]:12x}") + p[2:]
|
71
71
|
|
72
72
|
if obj.meta:
|
73
73
|
|
@@ -6,6 +6,7 @@ from asyncowfs.mock import some_server
|
|
6
6
|
from moat.util import ensure_cfg
|
7
7
|
|
8
8
|
from .task import task
|
9
|
+
import contextlib
|
9
10
|
|
10
11
|
PORT = ((os.getpid() + 101) % 9999) + 40000
|
11
12
|
|
@@ -19,10 +20,8 @@ async def server(client, tree={}, options={}, evt=None): # pylint: disable=dang
|
|
19
20
|
)
|
20
21
|
|
21
22
|
async def may_close():
|
22
|
-
|
23
|
+
with contextlib.suppress(anyio.ClosedResourceError, anyio.BrokenResourceError):
|
23
24
|
await listener.serve(partial(some_server, tree, options))
|
24
|
-
except (anyio.ClosedResourceError, anyio.BrokenResourceError):
|
25
|
-
pass
|
26
25
|
|
27
26
|
addr = listener.extra(anyio.abc.SocketAttribute.raw_socket).getsockname()
|
28
27
|
tg.start_soon(may_close)
|
@@ -74,7 +74,7 @@ async def task(client, cfg, server=None, evt=None):
|
|
74
74
|
async with OWFS() as ow:
|
75
75
|
hd = await OWFSroot.as_handler(client)
|
76
76
|
await ow.add_task(mon, ow, hd)
|
77
|
-
port = cfg.ow.port
|
77
|
+
port = cfg.kv.ow.port
|
78
78
|
if not server:
|
79
79
|
si = ((s._name, s) for s in hd.server)
|
80
80
|
elif isinstance(server, str):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: moat-kv-ow
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.7
|
4
4
|
Summary: 1wire connector for MoaT-KV
|
5
5
|
Author-email: Matthias Urlichs <matthias@urlichs.de>
|
6
6
|
Project-URL: homepage, https://m-o-a-t.org
|
@@ -14,7 +14,7 @@ Classifier: Topic :: Home Automation
|
|
14
14
|
Requires-Python: >=3.8
|
15
15
|
Description-Content-Type: text/x-rst
|
16
16
|
License-File: LICENSE.txt
|
17
|
-
Requires-Dist: moat-kv~=0.70.
|
17
|
+
Requires-Dist: moat-kv~=0.70.24
|
18
18
|
Dynamic: license-file
|
19
19
|
|
20
20
|
==========
|
@@ -0,0 +1,27 @@
|
|
1
|
+
LICENSE.txt
|
2
|
+
Makefile
|
3
|
+
README.rst
|
4
|
+
TODO.rst
|
5
|
+
USAGE.rst
|
6
|
+
moat-kv-ow@.service
|
7
|
+
pyproject.toml
|
8
|
+
setup.cfg
|
9
|
+
debian/.gitignore
|
10
|
+
debian/changelog
|
11
|
+
debian/control
|
12
|
+
debian/rules
|
13
|
+
debian/watch
|
14
|
+
debian/source/format
|
15
|
+
src/moat/kv/ow/__init__.py
|
16
|
+
src/moat/kv/ow/_cfg.yaml
|
17
|
+
src/moat/kv/ow/_main.py
|
18
|
+
src/moat/kv/ow/mock.py
|
19
|
+
src/moat/kv/ow/model.py
|
20
|
+
src/moat/kv/ow/task.py
|
21
|
+
src/moat_kv_ow.egg-info/PKG-INFO
|
22
|
+
src/moat_kv_ow.egg-info/SOURCES.txt
|
23
|
+
src/moat_kv_ow.egg-info/dependency_links.txt
|
24
|
+
src/moat_kv_ow.egg-info/requires.txt
|
25
|
+
src/moat_kv_ow.egg-info/top_level.txt
|
26
|
+
systemd/moat-kv-ow@.service
|
27
|
+
tools/update-0-4.py
|
@@ -0,0 +1 @@
|
|
1
|
+
moat-kv~=0.70.24
|
@@ -0,0 +1,19 @@
|
|
1
|
+
[Unit]
|
2
|
+
Description=Moat-KV OWFS server
|
3
|
+
After=moat-kv.service
|
4
|
+
Requires=moat-kv.service
|
5
|
+
|
6
|
+
ConditionFileNotEmpty=/etc/moat/moat.cfg
|
7
|
+
|
8
|
+
[Install]
|
9
|
+
WantedBy=multi-user.target
|
10
|
+
|
11
|
+
[Service]
|
12
|
+
Type=notify
|
13
|
+
ExecStart=/usr/bin/moat kv ow monitor %I
|
14
|
+
|
15
|
+
TimeoutSec=300
|
16
|
+
WatchdogSec=10
|
17
|
+
|
18
|
+
Restart=always
|
19
|
+
RestartSec=30
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/python3
|
2
|
+
|
3
|
+
import anyio
|
4
|
+
from moat.util import P
|
5
|
+
from moat.kv.client import open_client
|
6
|
+
|
7
|
+
|
8
|
+
async def mod_owfs():
|
9
|
+
async with open_client() as c:
|
10
|
+
async for r in c.get_tree(
|
11
|
+
P(":.distkv.onewire"), min_depth=2, max_depth=2, nchain=2
|
12
|
+
):
|
13
|
+
try:
|
14
|
+
at = r.value.pop("attr")
|
15
|
+
except KeyError:
|
16
|
+
continue
|
17
|
+
await c.set(P(":.distkv.onewire") + r.path, value=r.value, chain=r.chain)
|
18
|
+
|
19
|
+
|
20
|
+
# for k,v in at.items():
|
21
|
+
# print(r.path+P(k.replace('/',':')),v)
|
22
|
+
# await c.set(P(":.distkv.onewire")+r.path+P(k.replace('/',':')),value=v)
|
23
|
+
|
24
|
+
anyio.run(mod_owfs)
|
@@ -1,15 +0,0 @@
|
|
1
|
-
LICENSE.txt
|
2
|
-
README.rst
|
3
|
-
pyproject.toml
|
4
|
-
setup.cfg
|
5
|
-
moat/kv/ow/__init__.py
|
6
|
-
moat/kv/ow/_cfg.yaml
|
7
|
-
moat/kv/ow/_main.py
|
8
|
-
moat/kv/ow/mock.py
|
9
|
-
moat/kv/ow/model.py
|
10
|
-
moat/kv/ow/task.py
|
11
|
-
moat_kv_ow.egg-info/PKG-INFO
|
12
|
-
moat_kv_ow.egg-info/SOURCES.txt
|
13
|
-
moat_kv_ow.egg-info/dependency_links.txt
|
14
|
-
moat_kv_ow.egg-info/requires.txt
|
15
|
-
moat_kv_ow.egg-info/top_level.txt
|
@@ -1 +0,0 @@
|
|
1
|
-
moat-kv~=0.70.23
|
moat_kv_ow-0.9.5/pyproject.toml
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
[build-system]
|
2
|
-
build-backend = "setuptools.build_meta"
|
3
|
-
requires = [ "setuptools", "wheel",]
|
4
|
-
|
5
|
-
[project]
|
6
|
-
classifiers = [
|
7
|
-
"Development Status :: 4 - Beta",
|
8
|
-
"Intended Audience :: Information Technology",
|
9
|
-
"Programming Language :: Python :: 3",
|
10
|
-
"Topic :: Database",
|
11
|
-
"Topic :: Home Automation",
|
12
|
-
]
|
13
|
-
dependencies = [
|
14
|
-
"moat-kv ~= 0.70.23",
|
15
|
-
]
|
16
|
-
version = "0.9.5"
|
17
|
-
keywords = [ "MoaT",]
|
18
|
-
requires-python = ">=3.8"
|
19
|
-
name = "moat-kv-ow"
|
20
|
-
description = "1wire connector for MoaT-KV"
|
21
|
-
readme = "README.rst"
|
22
|
-
license-files = ["LICENSE.txt"]
|
23
|
-
|
24
|
-
[[project.authors]]
|
25
|
-
email = "matthias@urlichs.de"
|
26
|
-
name = "Matthias Urlichs"
|
27
|
-
|
28
|
-
[project.urls]
|
29
|
-
homepage = "https://m-o-a-t.org"
|
30
|
-
repository = "https://github.com/M-o-a-T/moat"
|
31
|
-
|
32
|
-
[tool.flake8]
|
33
|
-
max-line-length = 99
|
34
|
-
ignore = [ "F841", "F401", "E731", "E502", "E402", "E127", "E123", "W503", "E231", "E203", "E501" ]
|
35
|
-
|
36
|
-
[tool.isort]
|
37
|
-
line_length = 99
|
38
|
-
multi_line_output = 3
|
39
|
-
profile = "black"
|
40
|
-
|
41
|
-
[tool.setuptools]
|
42
|
-
packages = [ "moat.kv.ow",]
|
43
|
-
[tool.setuptools.package-data]
|
44
|
-
"*" = ["*.yaml"]
|
45
|
-
|
46
|
-
[tool.setuptools_scm]
|
47
|
-
|
48
|
-
[tool.black]
|
49
|
-
line-length = 99
|
50
|
-
|
51
|
-
[tool.tox]
|
52
|
-
legacy_tox_ini = """
|
53
|
-
[tox]
|
54
|
-
isolated_build = True
|
55
|
-
envlist = py310,check
|
56
|
-
|
57
|
-
[testenv]
|
58
|
-
setenv =
|
59
|
-
PYTHONPATH = {env:PYTHONPATH}{:}{toxinidir}
|
60
|
-
deps =
|
61
|
-
anyio
|
62
|
-
asyncwebsockets
|
63
|
-
asyncclick
|
64
|
-
asyncscope
|
65
|
-
trio
|
66
|
-
pytest
|
67
|
-
commands =
|
68
|
-
python3 -mpytest tests/
|
69
|
-
|
70
|
-
[testenv:check]
|
71
|
-
commands =
|
72
|
-
pylint moat tests
|
73
|
-
flake8p moat tests
|
74
|
-
black --check moat tests
|
75
|
-
deps =
|
76
|
-
pytest
|
77
|
-
pylint
|
78
|
-
black
|
79
|
-
flake8-pyproject
|
80
|
-
flake8
|
81
|
-
|
82
|
-
"""
|
83
|
-
|
84
|
-
[tool.pytest]
|
85
|
-
filterwarnings = [
|
86
|
-
"error",
|
87
|
-
"ignore:unclosed:ResourceWarning",
|
88
|
-
]
|
89
|
-
addopts = "--verbose"
|
90
|
-
|
91
|
-
[tool.pylint]
|
92
|
-
[tool.pylint.messages_control]
|
93
|
-
disable = "wrong-import-order,ungrouped-imports,too-many-nested-blocks,use-dict-literal,unspecified-encoding,too-many-statements,too-many-return-statements,too-many-locals,too-many-instance-attributes,too-many-branches,too-many-arguments,too-few-public-methods,superfluous-parens,no-else-return,no-else-continue,invalid-name,fixme"
|
94
|
-
|
95
|
-
[tool.moat]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|