Skip to content

Commit 25a60f3

Browse files
authored
Merge pull request #2 from DiUS/add-zeroconf-event-stream
Added ZeroConf driven unified event stream
2 parents 6130941 + 06d906c commit 25a60f3

7 files changed

Lines changed: 716 additions & 126 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ relies on the PlugApi as well.
1818

1919
There are also some small utilities included,`ps-plugevents` and `ps-rawplug`
2020
showcasing the use of the first interface approach, and `ps-events` the latter.
21-
.
22-
The `ps-events` is effectively a consumer of the the PowersensorDevices event
21+
22+
The `ps-events` is effectively a consumer of the PowersensorDevices event
2323
stream and dumps all events to standard out. Similary, `ps-plugevents` shows
2424
the event stream from a single plug (plus whatever it might be relaying for),
2525
and `ps-rawplug` shows the raw event stream from the plug. Note that the format

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@ Issues = "https://github.com/DiUS/python-powersensor_local/issues"
2525
ps-events = "powersensor_local.events:app"
2626
ps-rawplug = "powersensor_local.rawplug:app"
2727
ps-plugevents = "powersensor_local.plugevents:app"
28+
ps-zcevents = "powersensor_local.zc_events:app"
2829

2930
[build-system]
3031
requires = [ "hatchling" ]
3132
build-backend = "hatchling.build"
3233

3334
[project.optional-dependencies]
35+
zeroconf = [
36+
"zeroconf>=0.38.0",
37+
]
3438
docs = [
3539
"sphinx>=7.0.0",
3640
"sphinx-rtd-theme>=1.3.0",

requirements.test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
mypy
22
pytest
33
pytest-coverage
4+
zeroconf

src/powersensor_local/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,16 @@
3939
'PlugApi',
4040
'__version__',
4141
'PlugListenerTcp',
42-
'PlugListenerUdp'
42+
'PlugListenerUdp',
43+
'PowersensorDevices',
44+
'PowersensorLegacyDevices',
45+
'PowersensorZeroconfDevices',
4346
]
44-
__version__ = "2.1.2"
45-
from .devices import PowersensorDevices
47+
__version__ = "2.1.3"
48+
from .devices import PowersensorDevices, PowersensorLegacyDevices
4649
from .legacy_discovery import LegacyDiscovery
4750
from .plug_api import PlugApi
4851
from .plug_listener_tcp import PlugListenerTcp
4952
from .plug_listener_udp import PlugListenerUdp
5053
from .virtual_household import VirtualHousehold
54+
from .zeroconf_devices import PowersensorZeroconfDevices

0 commit comments

Comments
 (0)