moat-kv 0.70.24__py3-none-any.whl → 0.71.0__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.
- build/lib/moat/kv/_cfg.yaml +2 -6
- build/lib/moat/kv/backend/mqtt.py +0 -3
- ci/rtd-requirements.txt +4 -0
- ci/test-requirements.txt +7 -0
- ci/travis.sh +96 -0
- debian/.gitignore +7 -0
- debian/changelog +1435 -0
- debian/control +43 -0
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/_cfg.yaml +2 -6
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/backend/mqtt.py +0 -3
- debian/moat-kv.postinst +3 -0
- debian/rules +20 -0
- debian/source/format +1 -0
- debian/watch +4 -0
- docs/Makefile +20 -0
- docs/make.bat +36 -0
- docs/source/TODO.rst +61 -0
- docs/source/_static/.gitkeep +0 -0
- docs/source/acls.rst +80 -0
- docs/source/auth.rst +84 -0
- docs/source/client_protocol.rst +456 -0
- docs/source/code.rst +341 -0
- docs/source/command_line.rst +1187 -0
- docs/source/common_protocol.rst +47 -0
- docs/source/debugging.rst +70 -0
- docs/source/extend.rst +37 -0
- docs/source/history.rst +36 -0
- docs/source/index.rst +75 -0
- docs/source/model.rst +54 -0
- docs/source/overview.rst +83 -0
- docs/source/related.rst +89 -0
- docs/source/server_protocol.rst +450 -0
- docs/source/startup.rst +31 -0
- docs/source/translator.rst +244 -0
- docs/source/tutorial.rst +711 -0
- docs/source/v3.rst +168 -0
- examples/code/transform.scale.yml +21 -0
- examples/code/transform.switch.yml +82 -0
- examples/code/transform.timeslot.yml +63 -0
- moat/kv/_cfg.yaml +2 -6
- moat/kv/backend/mqtt.py +0 -3
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/METADATA +2 -5
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/RECORD +68 -17
- scripts/current +15 -0
- scripts/env +8 -0
- scripts/init +39 -0
- scripts/recover +17 -0
- scripts/rotate +33 -0
- scripts/run +29 -0
- scripts/run-all +10 -0
- scripts/run-any +10 -0
- scripts/run-single +15 -0
- scripts/success +4 -0
- systemd/moat-kv-recover.service +21 -0
- systemd/moat-kv-rotate.service +20 -0
- systemd/moat-kv-rotate.timer +10 -0
- systemd/moat-kv-run-all.service +26 -0
- systemd/moat-kv-run-all@.service +25 -0
- systemd/moat-kv-run-any.service +26 -0
- systemd/moat-kv-run-any@.service +25 -0
- systemd/moat-kv-run-single.service +26 -0
- systemd/moat-kv-run-single@.service +25 -0
- systemd/moat-kv.service +27 -0
- systemd/postinst +7 -0
- systemd/sysusers +3 -0
- build/lib/moat/kv/backend/serf.py +0 -45
- build/lib/moat/kv/mock/serf.py +0 -250
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/backend/serf.py +0 -45
- debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/mock/serf.py +0 -250
- moat/kv/backend/serf.py +0 -45
- moat/kv/mock/serf.py +0 -250
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/WHEEL +0 -0
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/licenses/LICENSE.txt +0 -0
- {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
=================
|
2
|
+
MoaT-KV's protocol
|
3
|
+
=================
|
4
|
+
|
5
|
+
MoaT-KV's native protocol (both client/server and server/server) is based on
|
6
|
+
MsgPack. Strings must be valid UTF-8 and are distinct from binary buffers.
|
7
|
+
|
8
|
+
++++++++++++++++++
|
9
|
+
MsgPack Extensions
|
10
|
+
++++++++++++++++++
|
11
|
+
|
12
|
+
MoaT-KV is expected to be a transparent protocol. Unknown extensions
|
13
|
+
must not cause the reader to crash, and should be round-trip-safe: a client
|
14
|
+
which reads an object and modifies attribute A should not modify attribute
|
15
|
+
B even if B contains an element with an unknown extension.
|
16
|
+
|
17
|
+
This should, but currently does not, apply to extensions 2 and 3.
|
18
|
+
|
19
|
+
--------
|
20
|
+
DateTime
|
21
|
+
--------
|
22
|
+
|
23
|
+
A client must support MsgPack's Timestamp extension.
|
24
|
+
|
25
|
+
------
|
26
|
+
Bignum
|
27
|
+
------
|
28
|
+
|
29
|
+
Extension 2 is used for unsigned arbitrary-sized integers.
|
30
|
+
|
31
|
+
-----
|
32
|
+
Paths
|
33
|
+
-----
|
34
|
+
|
35
|
+
Extension 3 packages a MsgPack path.
|
36
|
+
|
37
|
+
MoaT-KV uses Path objects to refer to its nodes. Paths are lists which may
|
38
|
+
contain arbitrary msgpack data structures but should be limited to UTF-8
|
39
|
+
strings and non-negative integers.
|
40
|
+
|
41
|
+
A client must support both Path objects and plain lists when reading. It
|
42
|
+
should send Path elements. Using plain lists instead is supported but
|
43
|
+
not recommended.
|
44
|
+
|
45
|
+
In this documentation's protocol examples, Paths are shown as ``P('some.string')``
|
46
|
+
for readability.
|
47
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
==============================
|
2
|
+
Fixing MoaT-KV network problems
|
3
|
+
==============================
|
4
|
+
|
5
|
+
As the MoaT-KV network is fully asynchronous, there's no way to avoid
|
6
|
+
getting into trouble – there's no arbitration of inconsistent data.
|
7
|
+
|
8
|
+
This document explains how to get back out, if necessary.
|
9
|
+
|
10
|
+
Missing data
|
11
|
+
============
|
12
|
+
|
13
|
+
See the `Server protocol <server_protocol>` for details on how MoaT-KV
|
14
|
+
works. From that document it's obvious that when a node increments its
|
15
|
+
``tick`` but the associated data gets lost (e.g. if the node or its Serf
|
16
|
+
agent crashes), you have a problem.
|
17
|
+
|
18
|
+
Worse: a server will not start if the "missing" list is non-empty. The
|
19
|
+
problem is that stale data causes difficult-to-resolve inconsistencies
|
20
|
+
when written to. TODO: allow the server to be in maintainer-only mode when
|
21
|
+
that happens.
|
22
|
+
|
23
|
+
First, run ``moat kv internal state -ndmrk``. Your output will look
|
24
|
+
somewhat like this::
|
25
|
+
|
26
|
+
deleted: # Ticks known to be deleted
|
27
|
+
test1:
|
28
|
+
- 12
|
29
|
+
known: # Ticks known to be superseded
|
30
|
+
test1:
|
31
|
+
- 1
|
32
|
+
- - 3
|
33
|
+
- 10
|
34
|
+
test2:
|
35
|
+
- 1
|
36
|
+
missing: # Ticks we need to worry about
|
37
|
+
test1:
|
38
|
+
- 2
|
39
|
+
node: test1 # the server we just asked
|
40
|
+
nodes: # all known nodes and their ticks
|
41
|
+
test1: 12
|
42
|
+
test2: 1
|
43
|
+
remote_missing: {} # used in recovery
|
44
|
+
tock: 82 # MoaT-KV's global event counter
|
45
|
+
|
46
|
+
This is not healthy: The ``missing`` element contains data. You can
|
47
|
+
manually mark the offending data as stale::
|
48
|
+
|
49
|
+
one $ moat kv internal mark test1 2
|
50
|
+
known:
|
51
|
+
test1:
|
52
|
+
- - 1
|
53
|
+
- 11
|
54
|
+
test2:
|
55
|
+
- 1
|
56
|
+
node: test1
|
57
|
+
tock: 92 # If this is not higher than before, clean your glasses ;-)
|
58
|
+
one $
|
59
|
+
|
60
|
+
This shows that the offending ``tick`` has been successfully added to the
|
61
|
+
``known`` list. Calling ``moat kv internal state -m`` verifies that
|
62
|
+
the list is now empty.
|
63
|
+
|
64
|
+
Use the ``--broadcast`` flag to send this message to all MoaT-KV servers,
|
65
|
+
not just the one you're a client of.
|
66
|
+
|
67
|
+
This action will allow the bad record to re-surface when the node that has
|
68
|
+
the record reconnects, assuming that there is one. You can use the ``mark``
|
69
|
+
command's ``--deleted`` flag to ensure that it will be discarded instead.
|
70
|
+
|
docs/source/extend.rst
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
================
|
2
|
+
Extending MoaT-KV
|
3
|
+
================
|
4
|
+
|
5
|
+
MoaT-KV comes with a built-in extension mechanism for its command line,
|
6
|
+
based on Python namespaces and import hackery.
|
7
|
+
|
8
|
+
Yor extension needs to ship a ``moat.kv.NAME`` module, with a
|
9
|
+
``_main.py`` file that exports a ``cli`` command (usually used as an
|
10
|
+
`asyncclick.group`). This adds the subcommand ``NAME`` to ``moat kv``.
|
11
|
+
|
12
|
+
Command line helper
|
13
|
+
===================
|
14
|
+
|
15
|
+
MoaT-KV commands follow a standard scheme (TODO some don't yet):
|
16
|
+
|
17
|
+
* what kind of object do you want to affect
|
18
|
+
* the name of the object to affect (or create)
|
19
|
+
* [ maybe start over with a sub-object ]
|
20
|
+
* the action you want to take
|
21
|
+
* some options affecting the action, and/or
|
22
|
+
* the generic set of parameter+value options (``-v``/``-e``/``-p``)
|
23
|
+
|
24
|
+
In order to simplify implementing that, there's a couple of helper methods.
|
25
|
+
|
26
|
+
`moat.kv.obj.command.std_command` takes a ``click.Group`` command and
|
27
|
+
attaches a subgroup with standard add/set/delete commands to it. The
|
28
|
+
new group is returned so you can attach more commands to it if you want.
|
29
|
+
|
30
|
+
`moat.util.attr_args` attaches MoaT-KV's generic parameter+value options.
|
31
|
+
|
32
|
+
`moat.util.process_args` takes a dict (usually) and the generic options'
|
33
|
+
variables (``set_``, ``vars_``, ``eval_``, ``path_``, ``proxy_``)
|
34
|
+
and applies them.
|
35
|
+
|
36
|
+
It's the caller's job to verify that the result is sane. TODO: support
|
37
|
+
using a validation library (probably jsonschema).
|
docs/source/history.rst
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
Release history
|
2
|
+
===============
|
3
|
+
|
4
|
+
.. currentmodule:: moat.kv
|
5
|
+
|
6
|
+
.. towncrier release notes start
|
7
|
+
|
8
|
+
Migration from DistKV
|
9
|
+
=====================
|
10
|
+
|
11
|
+
As of 2023-05, the protocol is unchanged.
|
12
|
+
|
13
|
+
To re-use the DistKV data as-is, copy ``/etc/distkv.cfg`` to
|
14
|
+
``/etc/moat/moat.cfg``. Then edit ``moat.cfg``:
|
15
|
+
|
16
|
+
* Move the ``logging:`` entry to the bottom if it isn't there already
|
17
|
+
* Indent everything above that entry two spaces
|
18
|
+
* Insert a line ``kv:`` as the first line of the file (not indented!)
|
19
|
+
|
20
|
+
Then, add these items as appropriate::
|
21
|
+
|
22
|
+
kv:
|
23
|
+
inv:
|
24
|
+
prefix: !P :.distkv.inventory
|
25
|
+
config:
|
26
|
+
prefix: !P :.distkv.config
|
27
|
+
errors:
|
28
|
+
prefix: !P :.distkv.errors
|
29
|
+
codes:
|
30
|
+
prefix: !P :.distkv.code.proc
|
31
|
+
modules:
|
32
|
+
prefix: !P :.distkv.code.module
|
33
|
+
runner:
|
34
|
+
prefix: !P :.distkv.run
|
35
|
+
state: !P :.distkv.state
|
36
|
+
|
docs/source/index.rst
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
.. documentation master file, created by
|
2
|
+
sphinx-quickstart on Sat Jan 21 19:11:14 2017.
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
4
|
+
contain the root `toctree` directive.
|
5
|
+
|
6
|
+
|
7
|
+
===============================================
|
8
|
+
MoaT-KV: A distributed no-master key-value store
|
9
|
+
===============================================
|
10
|
+
|
11
|
+
Rationale
|
12
|
+
=========
|
13
|
+
|
14
|
+
Any kind of distributed storage is subject to the CAP theorem (also called
|
15
|
+
"Brewer's theorem"): you can't get all of (global) Consistency,
|
16
|
+
Availability, and Partition tolerance. The problem is that you do want all
|
17
|
+
three of these.
|
18
|
+
|
19
|
+
One way around this problem is to recognize that on most KV storage
|
20
|
+
systems, any given record is rarely (if ever) changed by more than one
|
21
|
+
entity at the same time. Thus, a simple gossip protocol is sufficient
|
22
|
+
for distributing data.
|
23
|
+
|
24
|
+
MoaT-KV is intended to be used in a mostly-RAM architecture. There is no
|
25
|
+
disk-based storage backend; snapshots and event logs are used to restore a
|
26
|
+
system, if necessary.
|
27
|
+
|
28
|
+
See `Protocol Overview <overview.html>` for details about MoaT-KV's
|
29
|
+
choices.
|
30
|
+
|
31
|
+
API
|
32
|
+
===
|
33
|
+
|
34
|
+
MoaT-KV offers an efficient interface to access and change data.
|
35
|
+
|
36
|
+
|
37
|
+
Status
|
38
|
+
======
|
39
|
+
|
40
|
+
MoaT-KV is in production use as the backbone of the author's home and office
|
41
|
+
automation setup.
|
42
|
+
|
43
|
+
Note that as of MoaT-KV 0.30, multi-word paths were replaced with dotted
|
44
|
+
strings. Some pieces of documentation might still reflect the old style.
|
45
|
+
|
46
|
+
.. toctree::
|
47
|
+
:maxdepth: 2
|
48
|
+
|
49
|
+
overview.rst
|
50
|
+
tutorial.rst
|
51
|
+
startup.rst
|
52
|
+
command_line.rst
|
53
|
+
common_protocol.rst
|
54
|
+
client_protocol.rst
|
55
|
+
server_protocol.rst
|
56
|
+
auth.rst
|
57
|
+
acls.rst
|
58
|
+
code.rst
|
59
|
+
model.rst
|
60
|
+
translator.rst
|
61
|
+
debugging.rst
|
62
|
+
extend.rst
|
63
|
+
related.rst
|
64
|
+
|
65
|
+
TODO.rst
|
66
|
+
history.rst
|
67
|
+
|
68
|
+
====================
|
69
|
+
Indices and tables
|
70
|
+
====================
|
71
|
+
|
72
|
+
* :ref:`genindex`
|
73
|
+
* :ref:`modindex`
|
74
|
+
* :ref:`search`
|
75
|
+
* :ref:`glossary`
|
docs/source/model.rst
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
==========
|
2
|
+
Data Model
|
3
|
+
==========
|
4
|
+
|
5
|
+
This section documents some of MoaT-KV's server-internal classes.
|
6
|
+
|
7
|
+
|
8
|
+
.. automodule:: moat.kv.model
|
9
|
+
:members:
|
10
|
+
|
11
|
+
ACLs
|
12
|
+
----
|
13
|
+
|
14
|
+
ACL checks are performed by :class:`~moat.kv.types.ACLFinder`. This class
|
15
|
+
collects all relevant ACL entries for any given (sub)path, sorted by
|
16
|
+
depth-first specificty. This basically means that you collect all ACLs
|
17
|
+
that could possibly match a path and sort them; the ``+`` and ``#``
|
18
|
+
wildcards get sorted last. Then the system picks the first entry that
|
19
|
+
actually has a value.
|
20
|
+
|
21
|
+
This basically means that if you have a path ``a b c d e f g`` and ACLs ``a
|
22
|
+
b # g`` and ``a # d e f g``, the first ACL will match because ``b`` is
|
23
|
+
more specific than ``#``, even though the second ACL is longer and thus
|
24
|
+
could be regarded as being more specific. However, the current rule is more
|
25
|
+
stable when used with complex ACLs and thus more secure.
|
26
|
+
|
27
|
+
.. autoclass:: moat.kv.types.ACLFinder
|
28
|
+
:members:
|
29
|
+
|
30
|
+
Helper methods and classes
|
31
|
+
--------------------------
|
32
|
+
|
33
|
+
.. autoclass:: moat.kv.util.MsgWriter
|
34
|
+
:members:
|
35
|
+
|
36
|
+
.. automodule:: moat.kv.util
|
37
|
+
:members:
|
38
|
+
|
39
|
+
.. py:data:: moat.kv.util.NotGiven
|
40
|
+
|
41
|
+
This object marks the absence of information where simply not using the
|
42
|
+
data element or keyword at all would be inconvenient.
|
43
|
+
|
44
|
+
For instance, in ``def fn(value=NotGiven, **kw)`` you'd need to test
|
45
|
+
``'value' in kw``, or use an exception. The problem is that this would
|
46
|
+
not show up in the function's signature.
|
47
|
+
|
48
|
+
With ``NotGiven`` you can simply test ``value is`` (or ``is not``) ``NotGiven``.
|
49
|
+
|
50
|
+
.. automodule:: moat.kv.runner
|
51
|
+
:members:
|
52
|
+
|
53
|
+
.. automodule:: moat.kv.actor
|
54
|
+
:members:
|
docs/source/overview.rst
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
=======================
|
2
|
+
Principles of operation
|
3
|
+
=======================
|
4
|
+
|
5
|
+
MoaT-KV relies on the fact that on most KV storage systems, any given record
|
6
|
+
is rarely (if ever) changed by more than one entity at the same time. Thus,
|
7
|
+
a simple gossip protocol is sufficient for distributing data.
|
8
|
+
|
9
|
+
To recover from missed changes, each node in a MoaT-KV network maintains a
|
10
|
+
change counter ("tick"). All data records (:class:`moat.kv.model.Entry`) are
|
11
|
+
tagged with a chain of events (:class:`moat.kv.model.NodeEvent`), consisting
|
12
|
+
of the ``n`` most recent ``(node, tick)`` values which changed this
|
13
|
+
entry. Nodes do not appear in a chain more than once. Dropped ticks
|
14
|
+
are added to a per-node list of "known"(-to-have-been-superseded) counter
|
15
|
+
values.
|
16
|
+
|
17
|
+
The maximum chain length is determined by the number of partitions a MoaT-KV
|
18
|
+
network might split into. Thus the network guarantees that it is possible
|
19
|
+
which side of a split modified a record when the split is healed.
|
20
|
+
|
21
|
+
If both sides did, the conflict is resolved deterministically.
|
22
|
+
TODO: when this happens, send a notification to clients.
|
23
|
+
|
24
|
+
After a network split, a four-step protocol re-synchronizes the
|
25
|
+
participants:
|
26
|
+
|
27
|
+
* broadcast the current counters
|
28
|
+
|
29
|
+
* broadcast known-value and known-deleted lists
|
30
|
+
|
31
|
+
* broadcast a list of missing node events
|
32
|
+
|
33
|
+
* broadcast the missed data
|
34
|
+
|
35
|
+
MoaT-KV does not have a master node, much less a consensus-based election
|
36
|
+
system (Raft, Paxos, …). Instead, MoaT-KV uses an `asyncactor.Actor` to
|
37
|
+
compile a short list of available servers that's broadcast every few
|
38
|
+
seconds.
|
39
|
+
|
40
|
+
When a partitioned network is re-joined, the current housekeepers are
|
41
|
+
responsible for driving and monitoring the re-sync protocol.
|
42
|
+
|
43
|
+
|
44
|
+
Storage
|
45
|
+
=======
|
46
|
+
|
47
|
+
MoaT-KV is intended to be used in a mostly-RAM architecture. There is no
|
48
|
+
disk-based storage backend; snapshots and event logs are used to restore a
|
49
|
+
system, if necessary. Feeding old snapshots to a running system is mostly
|
50
|
+
benign, but see below.
|
51
|
+
|
52
|
+
MoaT-KV runs on top of MQTT.
|
53
|
+
It supports all data types that can be transmitted by
|
54
|
+
`MsgPack <https://github.com/msgpack/msgpack/blob/master/spec.md>`.
|
55
|
+
|
56
|
+
TODO: MsgPack has extension types, so constructing Python objects is possible.
|
57
|
+
|
58
|
+
Record Deletion
|
59
|
+
===============
|
60
|
+
|
61
|
+
Deleting data records is when MoaT-KV's synchronization protocol breaks
|
62
|
+
down, because MoaT-KV can't attach chains to records which no longer exist.
|
63
|
+
|
64
|
+
MoaT-KV fixes this by keeping a separate record of deleted entries, or
|
65
|
+
rather their chain links. This works well for mostly-static storages but
|
66
|
+
becomes a problem on more dynamic systems.
|
67
|
+
|
68
|
+
Thus, periodic clean-up is required. This is achieved by creating a
|
69
|
+
separate "Delete" Actor group which contains every system with persistent
|
70
|
+
storage plus one system per network that's not already covered.
|
71
|
+
|
72
|
+
When every node of this group is online, they periodically broadcast a
|
73
|
+
tuple of ``tock`` values: one which signals that deletions with earlier
|
74
|
+
``tock``\s may safely be flushed, and a high-water limit for the next
|
75
|
+
round.
|
76
|
+
|
77
|
+
A node that receives this tuple compares the received first value with the
|
78
|
+
last transmission's second. If it's higher, deletions may have been missed,
|
79
|
+
most likely due to a network outage between that node and the closest Delete
|
80
|
+
member. Since the records are now gone, the node will connect to one of the
|
81
|
+
Delete group members and send a list of each entry's last-change chain links.
|
82
|
+
The recipient will re-broadcast any misses as "new" deletions.
|
83
|
+
|
docs/source/related.rst
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
============================
|
2
|
+
Plugins and related software
|
3
|
+
============================
|
4
|
+
|
5
|
+
Additions to this list will be appreciated!
|
6
|
+
|
7
|
+
|
8
|
+
Home Assistant
|
9
|
+
==============
|
10
|
+
|
11
|
+
`Home Assistant`__ is a front-end for home automation. (Actually it's more
|
12
|
+
than that, but ``moat.kv`` uses it as a front-end and prefers to do the
|
13
|
+
automation part itself.)
|
14
|
+
|
15
|
+
`moat.kv-hass <https://github.com/M-o-a-T/disthass>`__ documents how to
|
16
|
+
connect Home Assistant to the ``moat.kv`` system and helps with creating the
|
17
|
+
data structures that teach Home Assistant about moat.kv-controlled sensors
|
18
|
+
and actors.
|
19
|
+
|
20
|
+
|
21
|
+
KNX
|
22
|
+
===
|
23
|
+
|
24
|
+
KNX is a serial bus for building control.
|
25
|
+
|
26
|
+
`knxd <https://github.com/knxd/knxd/>`__ is a server commonly used to talk to KNX interfaces.
|
27
|
+
|
28
|
+
`xknx <https://github.com/XKNX/xknx>`__ is a Python package you can use to talk to ``knxd``.
|
29
|
+
|
30
|
+
`moat.kv-knx <https://github.com/M-o-a-T/distknx>`__ connects values stored
|
31
|
+
in moat.kv to devices on the KNX bus.
|
32
|
+
|
33
|
+
|
34
|
+
1wire
|
35
|
+
=====
|
36
|
+
|
37
|
+
`1wire <https://en.wikipedia.org/wiki/1-Wire>`__ is a two- or three-wire
|
38
|
+
bus (one signal wire, somewhat-optional 5V power, ground) that is
|
39
|
+
frequently used to connect inexpensive sensors and actors to a computer.
|
40
|
+
|
41
|
+
`OWFS <https://www.owfs.org/>`__ is the server commonly used on Linux
|
42
|
+
systems to talk to 1wire.
|
43
|
+
|
44
|
+
`asyncowfs <https://github.com/M-o-a-T/asyncowfs>`__ is a Python package
|
45
|
+
that provides a high-level object-oriented async interface to OWFS.
|
46
|
+
|
47
|
+
`moat-kv-owfs <https://github.com/M-o-a-T/distknx>`__ uses ``asyncowfs`` to
|
48
|
+
connect values stored in ``moat.kv`` to attributes if 1wire devices.
|
49
|
+
|
50
|
+
|
51
|
+
Inventory Management
|
52
|
+
====================
|
53
|
+
|
54
|
+
`moat-kv-inv <https://github.com/M-o-a-T/moat-kv-inv>`__ is a command-line
|
55
|
+
extension that stores of hosts, networks and cables. It contains templating
|
56
|
+
code so you can auto-create the configuration for your router (if it's text
|
57
|
+
instead of some binary format).
|
58
|
+
|
59
|
+
|
60
|
+
Akumuli
|
61
|
+
=======
|
62
|
+
|
63
|
+
`Akumuli <https://akumuli.org/>`__ is a time series database.
|
64
|
+
|
65
|
+
`asyncakumuli <https://github.com/M-o-a-T/asyncakumuli>`__ is a Python package
|
66
|
+
that provides an async interface to Akumuli.
|
67
|
+
|
68
|
+
`moat.kv-akumuli <https://github.com/M-o-a-T/distakumuli>`__ implements a
|
69
|
+
background task that monitors values stored in ``moat.kv`` and mirrors them
|
70
|
+
into Akumuli, thus saving their history.
|
71
|
+
|
72
|
+
|
73
|
+
Binary I/O
|
74
|
+
==========
|
75
|
+
|
76
|
+
`asyncgpio <https://github.com/M-o-a-T/asyncgpio>`__ is a Python package
|
77
|
+
that provides structured access to your computer's I/O ports.
|
78
|
+
|
79
|
+
`moat.kv-gpio <https://github.com/M-o-a-T/distgpio>`__ contains code that
|
80
|
+
mirrors a binary value stored in ``moat.kv`` to a GPIO pin and vice versa.
|
81
|
+
|
82
|
+
|
83
|
+
Wago I/O controllers
|
84
|
+
====================
|
85
|
+
|
86
|
+
The German company `WAGO Kontakttechnik <https://www.wago.com>`__ makes the
|
87
|
+
``750-*`` line of extensible rugged controllers with various modules.
|
88
|
+
|
89
|
+
|