boneIO 0.3.0.dev7__tar.gz → 0.3.0.dev8__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.3.0.dev7/boneio.egg-info → boneio-0.3.0.dev8}/PKG-INFO +2 -2
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/const.py +4 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/exceptions.py +4 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/loader.py +0 -1
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/manager.py +9 -1
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/modbus.py +7 -2
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/schema/schema.yaml +1 -0
- boneio-0.3.0.dev8/boneio/version.py +2 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8/boneio.egg-info}/PKG-INFO +2 -2
- boneio-0.3.0.dev7/boneio/version.py +0 -2
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/LICENSE +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/MANIFEST.in +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/README.md +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/bonecli.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/cover.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/example_config/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/example_config/adc.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/example_config/config.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/example_config/cover.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/example_config/input.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/example_config/output24x16A.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/example_config/output32x5A.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/fonts/danube__.ttf +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/config.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/ds2482/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/ds2482/ds2482.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/ds2482/onewire.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/events.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/gpio.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/ha_discovery.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/logger.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/mqtt.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/oled.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/queue.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/state_manager.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/stats.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/timeperiod.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/util.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/helper/yaml_util.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/input/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/input/gpio.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/mqtt_client.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/oled.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/relay/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/relay/basic.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/relay/gpio.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/relay/mcp.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/runner.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/schema/actions.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/schema/actions_sensor.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/schema/actions_switch.yaml +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/adc.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/gpio.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/modbus/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/modbus/sdm120.json +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/modbus/sdm630.json +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/modbus/sofar.json +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/temp/__init__.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/temp/dallas.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/temp/lm75.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio/sensor/temp/mcp9808.py +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio.egg-info/SOURCES.txt +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio.egg-info/dependency_links.txt +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio.egg-info/entry_points.txt +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio.egg-info/requires.txt +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/boneio.egg-info/top_level.txt +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/requirements.txt +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/setup.cfg +0 -0
- {boneio-0.3.0.dev7 → boneio-0.3.0.dev8}/setup.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: boneio
|
|
3
|
-
Version: 0.3.0.
|
|
3
|
+
Version: 0.3.0.dev8
|
|
4
4
|
Summary: Python App for BoneIO
|
|
5
5
|
Home-page: https://github.com/boneIO-eu/app_bbb
|
|
6
|
-
Download-URL: https://github.com/boneIO-eu/app_bbb/archive/0.3.0.
|
|
6
|
+
Download-URL: https://github.com/boneIO-eu/app_bbb/archive/0.3.0.dev8.zip
|
|
7
7
|
License: GNU General Public License v3.0
|
|
8
8
|
Platform: UNKNOWN
|
|
9
9
|
Classifier: Programming Language :: Python
|
|
@@ -48,9 +48,13 @@ RESTORE_STATE = "restore_state"
|
|
|
48
48
|
MODEL = "model"
|
|
49
49
|
UARTS = {
|
|
50
50
|
"uart1": {ID: "/dev/ttyS1", TX: "P9.24", RX: "P9.26"},
|
|
51
|
+
"uart2": {ID: "/dev/ttyS2", TX: "P9.21", RX: "P9.22"},
|
|
52
|
+
"uart3": {ID: "/dev/ttyS3", TX: "P9.42", RX: None},
|
|
51
53
|
"uart4": {ID: "/dev/ttyS4", TX: "P9.13", RX: "P9.11"},
|
|
54
|
+
"uart5": {ID: "/dev/ttyS5", TX: "P8.37", RX: "P8.38"},
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
|
|
54
58
|
# HA CONSTS
|
|
55
59
|
HOMEASSISTANT = "homeassistant"
|
|
56
60
|
HA_DISCOVERY = "ha_discovery"
|
|
@@ -127,7 +127,6 @@ def create_temp_sensor(
|
|
|
127
127
|
ha_type=SENSOR,
|
|
128
128
|
availability_msg_func=ha_sensor_temp_availabilty_message,
|
|
129
129
|
)
|
|
130
|
-
manager.append_task(asyncio.create_task(temp_sensor.send_state()))
|
|
131
130
|
return temp_sensor
|
|
132
131
|
except I2CError as err:
|
|
133
132
|
_LOGGER.error("Can't configure Temp sensor. %s", err)
|
|
@@ -46,6 +46,7 @@ from boneio.helper import (
|
|
|
46
46
|
|
|
47
47
|
from boneio.helper.config import ConfigHelper
|
|
48
48
|
from boneio.helper.events import EventBus
|
|
49
|
+
from boneio.helper.exceptions import ModbusUartException
|
|
49
50
|
from boneio.helper.loader import (
|
|
50
51
|
configure_cover,
|
|
51
52
|
configure_input,
|
|
@@ -107,7 +108,14 @@ class Manager:
|
|
|
107
108
|
self._temp_sensors = []
|
|
108
109
|
self._modbus = None
|
|
109
110
|
if modbus and modbus.get(UART) in UARTS:
|
|
110
|
-
|
|
111
|
+
try:
|
|
112
|
+
self._modbus = Modbus(UARTS[modbus.get(UART)])
|
|
113
|
+
except ModbusUartException:
|
|
114
|
+
_LOGGER.error(
|
|
115
|
+
"This UART %s can't be used for modbus communication.",
|
|
116
|
+
modbus.get(UART),
|
|
117
|
+
)
|
|
118
|
+
self._modbus = None
|
|
111
119
|
|
|
112
120
|
for sensor_type in (LM75, MCP_TEMP_9808):
|
|
113
121
|
if sensors.get(sensor_type):
|
|
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import asyncio
|
|
4
4
|
import logging
|
|
5
5
|
from boneio.helper import configure_pin
|
|
6
|
+
from boneio.helper.exceptions import ModbusUartException
|
|
6
7
|
from boneio.const import ID, RX, TX, UART, REGISTERS
|
|
7
8
|
from pymodbus.client.sync import (
|
|
8
9
|
BaseModbusClient,
|
|
@@ -23,9 +24,13 @@ class Modbus:
|
|
|
23
24
|
|
|
24
25
|
def __init__(self, uart: dict[str, Any]) -> None:
|
|
25
26
|
"""Initialize the Modbus hub."""
|
|
27
|
+
rx = uart.get(RX)
|
|
28
|
+
tx = uart.get(TX)
|
|
29
|
+
if not tx or not rx:
|
|
30
|
+
raise ModbusUartException
|
|
26
31
|
|
|
27
|
-
configure_pin(pin=
|
|
28
|
-
configure_pin(pin=
|
|
32
|
+
configure_pin(pin=rx, mode=UART)
|
|
33
|
+
configure_pin(pin=tx, mode=UART)
|
|
29
34
|
self._uart = uart
|
|
30
35
|
|
|
31
36
|
# generic configuration
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: boneio
|
|
3
|
-
Version: 0.3.0.
|
|
3
|
+
Version: 0.3.0.dev8
|
|
4
4
|
Summary: Python App for BoneIO
|
|
5
5
|
Home-page: https://github.com/boneIO-eu/app_bbb
|
|
6
|
-
Download-URL: https://github.com/boneIO-eu/app_bbb/archive/0.3.0.
|
|
6
|
+
Download-URL: https://github.com/boneIO-eu/app_bbb/archive/0.3.0.dev8.zip
|
|
7
7
|
License: GNU General Public License v3.0
|
|
8
8
|
Platform: UNKNOWN
|
|
9
9
|
Classifier: Programming Language :: Python
|
|
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
|
|
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
|