boneIO 0.1.0.dev17__tar.gz → 0.1.0.dev18__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.
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/PKG-INFO +2 -2
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/const.py +4 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/stats.py +16 -5
- boneio-0.1.0.dev18/boneio/version.py +2 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio.egg-info/PKG-INFO +2 -2
- boneio-0.1.0.dev17/boneio/version.py +0 -2
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/MANIFEST.in +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/README.md +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/bonecli.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/fonts/danube__.ttf +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/exceptions.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/gpio.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/ha_discovery.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/mqtt.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/oled.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/helper/yaml.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/input/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/input/gpio.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/manager.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/mqtt_client.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/oled.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/relay/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/relay/basic.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/relay/gpio.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/relay/mcp.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/schema.yaml +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/sensor/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/sensor/adc.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/sensor/gpio.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio/sensor/lm75.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio.egg-info/SOURCES.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio.egg-info/dependency_links.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio.egg-info/entry_points.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio.egg-info/requires.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/boneio.egg-info/top_level.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/requirements.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/setup.cfg +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev18}/setup.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: boneio
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev18
|
|
4
4
|
Summary: Python Helper for BoneIO
|
|
5
5
|
Home-page: https://github.com/maciejk1984/boneIO
|
|
6
6
|
License: GNU General Public License v3.0
|
|
7
|
-
Download-URL: https://github.com/maciejk1984/boneIO/archive/0.1.0.
|
|
7
|
+
Download-URL: https://github.com/maciejk1984/boneIO/archive/0.1.0.dev18.zip
|
|
8
8
|
Platform: UNKNOWN
|
|
9
9
|
Classifier: Programming Language :: Python
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.7
|
|
@@ -17,6 +17,10 @@ from boneio.const import (
|
|
|
17
17
|
NETWORK,
|
|
18
18
|
SWAP,
|
|
19
19
|
UPTIME,
|
|
20
|
+
IP,
|
|
21
|
+
MASK,
|
|
22
|
+
MAC,
|
|
23
|
+
NONE,
|
|
20
24
|
)
|
|
21
25
|
from boneio.sensor import LM75Sensor
|
|
22
26
|
|
|
@@ -39,12 +43,19 @@ def display_time(seconds):
|
|
|
39
43
|
|
|
40
44
|
async def get_network_info(host_data):
|
|
41
45
|
"""Fetch network info."""
|
|
46
|
+
|
|
47
|
+
def retrieve_from_psutil():
|
|
48
|
+
addrs = psutil.net_if_addrs()["eth0"]
|
|
49
|
+
out = {IP: NONE, MASK: NONE, MAC: NONE}
|
|
50
|
+
for addr in addrs:
|
|
51
|
+
if addr.family == socket.AF_INET:
|
|
52
|
+
out["ip"] = addr.address
|
|
53
|
+
out["mask"] = addr.netmask
|
|
54
|
+
elif addr.family == psutil.AF_LINK:
|
|
55
|
+
out["mac"] = addr.address
|
|
56
|
+
|
|
42
57
|
while True:
|
|
43
|
-
|
|
44
|
-
host_data.write(
|
|
45
|
-
NETWORK,
|
|
46
|
-
{"ip": net[0].address, "mask": net[0].netmask, "mac": net[2].address},
|
|
47
|
-
)
|
|
58
|
+
host_data.write(NETWORK, retrieve_from_psutil())
|
|
48
59
|
await asyncio.sleep(60)
|
|
49
60
|
|
|
50
61
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: boneio
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev18
|
|
4
4
|
Summary: Python Helper for BoneIO
|
|
5
5
|
Home-page: https://github.com/maciejk1984/boneIO
|
|
6
6
|
License: GNU General Public License v3.0
|
|
7
|
-
Download-URL: https://github.com/maciejk1984/boneIO/archive/0.1.0.
|
|
7
|
+
Download-URL: https://github.com/maciejk1984/boneIO/archive/0.1.0.dev18.zip
|
|
8
8
|
Platform: UNKNOWN
|
|
9
9
|
Classifier: Programming Language :: Python
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.7
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|