boneIO 0.8.0.dev2__tar.gz → 0.8.0.dev3__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.8.0.dev2 → boneIO-0.8.0.dev3}/PKG-INFO +1 -1
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/bonecli.py +31 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/modbuscli.py +18 -6
- boneIO-0.8.0.dev3/boneio/version.py +2 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/pyproject.toml +1 -1
- boneIO-0.8.0.dev2/boneio/version.py +0 -2
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/LICENSE +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/README.md +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/const.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/cover.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/adc.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/binary_sensor.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/config.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/cover.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/event.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/event_all.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/led32x4A.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/output24x16A.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/output24x16A_v0.3.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/example_config/output32x5A.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/fonts/danube__.ttf +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/group/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/group/output.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/async_updater.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/click_timer.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/config.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/events.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/exceptions.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/filter.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/gpio.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/ha_discovery.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/loader.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/logger.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/mqtt.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/oled.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/onewire/W1ThermSensor.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/onewire/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/onewire/ds2482.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/onewire/onewire.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/pcf8575.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/queue.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/sensor/ina_219_smbus.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/state_manager.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/stats.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/timeperiod.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/util.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/helper/yaml_util.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/input/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/input/gpio.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/input/gpio_new.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/manager.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/client.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/cwt.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/dts1964_3f.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/orno-or-we-517.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/pt100.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/r4dcb08.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/sdm120.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/sdm630.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/sensor.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/socomec_e23.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/sofar.json +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/modbus/utils.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/mqtt_client.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/oled.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/relay/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/relay/basic.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/relay/gpio.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/relay/mcp.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/relay/pca.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/relay/pcf.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/runner.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/actions.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/actions_sensor.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/actions_switch.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/filters.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/filters_adc.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/id.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/schema.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/temp_unit.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/schema/update_interval.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/adc.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/gpio.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/gpio_new.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/ina219.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/temp/__init__.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/temp/dallas.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/temp/lm75.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/boneio/sensor/temp/mcp9808.py +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/tests/32_5_config.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/tests/bandit.yaml +0 -0
- {boneIO-0.8.0.dev2 → boneIO-0.8.0.dev3}/tests/relay_32_5.py +0 -0
|
@@ -110,6 +110,31 @@ def get_arguments() -> argparse.Namespace:
|
|
|
110
110
|
help="Current baudrate",
|
|
111
111
|
)
|
|
112
112
|
|
|
113
|
+
modbus_parser.add_argument(
|
|
114
|
+
"--bytesize",
|
|
115
|
+
type=int,
|
|
116
|
+
required=True,
|
|
117
|
+
default=8,
|
|
118
|
+
help="Bytesize",
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
modbus_parser.add_argument(
|
|
122
|
+
"--stopbits",
|
|
123
|
+
type=int,
|
|
124
|
+
required=True,
|
|
125
|
+
default=1,
|
|
126
|
+
help="stopbits",
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
modbus_parser.add_argument(
|
|
130
|
+
"--parity",
|
|
131
|
+
type=str,
|
|
132
|
+
choices=["P", "E", "N"],
|
|
133
|
+
default="N",
|
|
134
|
+
required=True,
|
|
135
|
+
help="Parity",
|
|
136
|
+
)
|
|
137
|
+
|
|
113
138
|
modbus_sub_parser = modbus_parser.add_subparsers(
|
|
114
139
|
dest="modbus_action", required=True
|
|
115
140
|
)
|
|
@@ -205,6 +230,9 @@ def run_modbus_command(
|
|
|
205
230
|
uart=args.uart,
|
|
206
231
|
address=args.address,
|
|
207
232
|
baudrate=args.baudrate,
|
|
233
|
+
parity=args.parity,
|
|
234
|
+
bytesize=args.bytesize,
|
|
235
|
+
stopbits=args.stopbits,
|
|
208
236
|
new_baudrate=args.new_baudrate,
|
|
209
237
|
new_address=args.new_address,
|
|
210
238
|
),
|
|
@@ -217,6 +245,9 @@ def run_modbus_command(
|
|
|
217
245
|
baudrate=args.baudrate,
|
|
218
246
|
register_address=args.register_address,
|
|
219
247
|
register_type=args.register_type,
|
|
248
|
+
parity=args.parity,
|
|
249
|
+
bytesize=args.bytesize,
|
|
250
|
+
stopbits=args.stopbits,
|
|
220
251
|
value_type=args.value_type,
|
|
221
252
|
),
|
|
222
253
|
)
|
|
@@ -26,14 +26,17 @@ class ModbusHelper:
|
|
|
26
26
|
model: dict,
|
|
27
27
|
check_record: dict,
|
|
28
28
|
check_record_method: str,
|
|
29
|
+
stopbits: int = 1,
|
|
30
|
+
bytesize: int = 8,
|
|
31
|
+
parity: str = "N",
|
|
29
32
|
) -> None:
|
|
30
33
|
"""Initialize Modbus Helper."""
|
|
31
34
|
self._modbus = Modbus(
|
|
32
35
|
uart=UARTS[uart],
|
|
33
36
|
baudrate=baudrate,
|
|
34
|
-
stopbits=
|
|
35
|
-
bytesize=
|
|
36
|
-
parity=
|
|
37
|
+
stopbits=stopbits,
|
|
38
|
+
bytesize=bytesize,
|
|
39
|
+
parity=parity,
|
|
37
40
|
)
|
|
38
41
|
self._model = model
|
|
39
42
|
self._device = device
|
|
@@ -112,6 +115,9 @@ async def async_run_modbus_set(
|
|
|
112
115
|
baudrate: int,
|
|
113
116
|
new_baudrate: int,
|
|
114
117
|
new_address: int,
|
|
118
|
+
stopbits: int = 1,
|
|
119
|
+
bytesize: int = 8,
|
|
120
|
+
parity: str = "N",
|
|
115
121
|
):
|
|
116
122
|
"""Run Modbus Set Function."""
|
|
117
123
|
if new_address and new_baudrate:
|
|
@@ -130,6 +136,9 @@ async def async_run_modbus_set(
|
|
|
130
136
|
model=set_base,
|
|
131
137
|
check_record=first_record,
|
|
132
138
|
check_record_method=first_reg_base.get("register_type", "input"),
|
|
139
|
+
stopbits=stopbits,
|
|
140
|
+
bytesize=bytesize,
|
|
141
|
+
parity=parity,
|
|
133
142
|
)
|
|
134
143
|
if not await modbus_helper.check_connection():
|
|
135
144
|
_LOGGER.error("Can't connect with sensor. Exiting")
|
|
@@ -150,14 +159,17 @@ async def async_run_modbus_get(
|
|
|
150
159
|
register_type: str,
|
|
151
160
|
baudrate: int,
|
|
152
161
|
value_type: str,
|
|
162
|
+
stopbits: int = 1,
|
|
163
|
+
bytesize: int = 8,
|
|
164
|
+
parity: str = "N",
|
|
153
165
|
):
|
|
154
166
|
"""Run Modbus Get Function."""
|
|
155
167
|
_modbus = Modbus(
|
|
156
168
|
uart=UARTS[uart],
|
|
157
169
|
baudrate=baudrate,
|
|
158
|
-
stopbits=
|
|
159
|
-
bytesize=
|
|
160
|
-
parity=
|
|
170
|
+
stopbits=stopbits,
|
|
171
|
+
bytesize=bytesize,
|
|
172
|
+
parity=parity,
|
|
161
173
|
)
|
|
162
174
|
count = 1 if value_type == "S_WORD" or value_type == "U_WORD" else 2
|
|
163
175
|
value = await _modbus.read_multiple_registers(
|
|
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
|
|
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
|