boneIO 0.1.0.dev17__tar.gz → 0.1.0.dev19__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.dev19}/PKG-INFO +2 -2
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/const.py +4 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/gpio.py +3 -1
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/stats.py +18 -5
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/oled.py +1 -1
- boneio-0.1.0.dev19/boneio/version.py +2 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/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.dev19}/MANIFEST.in +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/README.md +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/bonecli.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/fonts/danube__.ttf +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/exceptions.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/ha_discovery.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/mqtt.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/oled.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/helper/yaml.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/input/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/input/gpio.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/manager.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/mqtt_client.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/relay/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/relay/basic.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/relay/gpio.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/relay/mcp.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/schema.yaml +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/sensor/__init__.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/sensor/adc.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/sensor/gpio.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio/sensor/lm75.py +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio.egg-info/SOURCES.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio.egg-info/dependency_links.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio.egg-info/entry_points.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio.egg-info/requires.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/boneio.egg-info/top_level.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/requirements.txt +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/setup.cfg +0 -0
- {boneio-0.1.0.dev17 → boneio-0.1.0.dev19}/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.dev19
|
|
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.dev19.zip
|
|
8
8
|
Platform: UNKNOWN
|
|
9
9
|
Classifier: Programming Language :: Python
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.7
|
|
@@ -52,7 +52,9 @@ def read_input(pin: str, on_state: Gpio_States = LOW):
|
|
|
52
52
|
return GPIO.input(pin) is on_state
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
def edge_detect(
|
|
55
|
+
def edge_detect(
|
|
56
|
+
pin: str, callback: Callable, bounce: int = 0, edge: Gpio_Edges = FALLING
|
|
57
|
+
):
|
|
56
58
|
"""Add detection for RISING and FALLING events."""
|
|
57
59
|
try:
|
|
58
60
|
GPIO.add_event_detect(gpio=pin, edge=edge, callback=callback, bouncetime=bounce)
|
|
@@ -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,21 @@ 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
|
+
return out
|
|
57
|
+
|
|
42
58
|
while True:
|
|
43
|
-
|
|
44
|
-
host_data.write(
|
|
45
|
-
NETWORK,
|
|
46
|
-
{"ip": net[0].address, "mask": net[0].netmask, "mac": net[2].address},
|
|
47
|
-
)
|
|
59
|
+
data = retrieve_from_psutil()
|
|
60
|
+
host_data.write(NETWORK, data)
|
|
48
61
|
await asyncio.sleep(60)
|
|
49
62
|
|
|
50
63
|
|
|
@@ -45,7 +45,7 @@ class Oled:
|
|
|
45
45
|
self._host_data = host_data
|
|
46
46
|
configure_pin(OLED_PIN)
|
|
47
47
|
setup_input(OLED_PIN)
|
|
48
|
-
edge_detect(pin=OLED_PIN, callback=self._handle_press, bounce=
|
|
48
|
+
edge_detect(pin=OLED_PIN, callback=self._handle_press, bounce=80)
|
|
49
49
|
try:
|
|
50
50
|
serial = i2c(port=2, address=0x3C)
|
|
51
51
|
self._device = sh1106(serial)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: boneio
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev19
|
|
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.dev19.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
|