boneIO 0.11.3__tar.gz → 0.12.0.dev1__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.11.3 → boneio-0.12.0.dev1}/PKG-INFO +1 -1
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/const.py +5 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/24x16/event.yaml +21 -22
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/32x10/binary_sensor.yaml +10 -9
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/32x10/event.yaml +21 -21
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/config.py +6 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/events.py +7 -3
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/filter.py +2 -1
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/ha_discovery.py +80 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/util.py +9 -2
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/manager.py +13 -5
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/client.py +60 -1
- boneio-0.12.0.dev1/boneio/modbus/coordinator.py +608 -0
- boneio-0.12.0.dev1/boneio/modbus/derived/__init__.py +11 -0
- boneio-0.12.0.dev1/boneio/modbus/derived/numeric.py +80 -0
- boneio-0.12.0.dev1/boneio/modbus/derived/select.py +93 -0
- boneio-0.12.0.dev1/boneio/modbus/derived/switch.py +102 -0
- boneio-0.12.0.dev1/boneio/modbus/derived/text.py +78 -0
- boneio-0.12.0.dev1/boneio/modbus/fujitsu-ac.json +157 -0
- boneio-0.12.0.dev1/boneio/modbus/sensor/__init__.py +5 -0
- boneio-0.11.3/boneio/modbus/single_sensor.py → boneio-0.12.0.dev1/boneio/modbus/sensor/base.py +92 -100
- boneio-0.12.0.dev1/boneio/modbus/sensor/binary.py +47 -0
- boneio-0.12.0.dev1/boneio/modbus/sensor/numeric.py +66 -0
- boneio-0.12.0.dev1/boneio/modbus/sensor/text.py +99 -0
- boneio-0.12.0.dev1/boneio/modbus/thessla.json +190 -0
- boneio-0.12.0.dev1/boneio/modbus/ventclear.json +227 -0
- boneio-0.12.0.dev1/boneio/modbus/writeable/__init__.py +3 -0
- boneio-0.12.0.dev1/boneio/modbus/writeable/binary.py +57 -0
- boneio-0.12.0.dev1/boneio/modbus/writeable/numeric.py +85 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/models/__init__.py +1 -1
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/oled.py +1 -1
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/relay/basic.py +14 -12
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/runner.py +1 -1
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/schema.yaml +3 -1
- boneio-0.12.0.dev1/boneio/version.py +2 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/app.py +11 -11
- boneio-0.11.3/boneio/webui/frontend-dist/assets/cssMode-Bjd2cBFW.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/cssMode-DJ-w1wQ_.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/freemarker2-DWq6P_mH.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/freemarker2-BvGDq3Vb.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/handlebars-DR8eGTFH.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/handlebars-cWEntp3o.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/html-BeWiDcEq.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/html-BaI4o9eH.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/htmlMode-CJQehcar.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/htmlMode-DC3UiglP.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/index-Z076W5N4.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/index-BHcurHQx.js +74 -74
- boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/index-Do1QR2cE.css +1 -0
- boneio-0.11.3/boneio/webui/frontend-dist/assets/javascript-BprTxZq5.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/javascript-BBsk_Scp.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/jsonMode-DwDKJQ5I.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/jsonMode-Cm90tqtB.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/liquid-BhOpNuSu.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/liquid-C_Qg2XEe.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/mdx-DsXC39I8.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/mdx-BBbxndTk.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/python-paNTzQM2.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/python-ClQ3TDOx.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/razor-Bq0mS1aI.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/razor-bPNgmESS.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/tsMode-D-YFJesK.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/tsMode-DwaObZuA.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/typescript-FUV5590r.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/typescript-BrLXtS1z.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/xml-B3MZDDls.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/xml-BRkAzKUE.js +1 -1
- boneio-0.11.3/boneio/webui/frontend-dist/assets/yaml-CQ5-4YGR.js → boneio-0.12.0.dev1/boneio/webui/frontend-dist/assets/yaml-CDQ40CuG.js +1 -1
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/index.html +2 -2
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/config.schema.json +5 -3
- boneio-0.12.0.dev1/boneio/webui/schema/modbus_devices.schema.json +160 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/modbus_sensors.schema.json +2 -2
- {boneio-0.11.3 → boneio-0.12.0.dev1}/pyproject.toml +21 -21
- boneio-0.11.3/boneio/modbus/coordinator.py +0 -337
- boneio-0.11.3/boneio/version.py +0 -2
- boneio-0.11.3/boneio/webui/frontend-dist/assets/index-DjobvRUe.css +0 -1
- {boneio-0.11.3 → boneio-0.12.0.dev1}/LICENSE +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/README.md +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.7/input.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.7/output_24_16.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.7/output_32_10.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.7/output_cover.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.7/output_cover_mix.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.8/input.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.8/output_24_16.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.8/output_32_10.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.8/output_cover.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/boards/0.8/output_cover_mix.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/bonecli.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/cover/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/cover/cover.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/cover/previous.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/cover/time_based.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/cover/venetian.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/24x16/adc.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/24x16/binary_sensor.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/24x16/config.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/24x16/mqtt.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/24x16/output24x16A.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/32x10/adc.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/32x10/config.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/32x10/mqtt.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/32x10/output32x10A.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover/adc.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover/binary_sensor.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover/config.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover/cover.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover/event.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover/mqtt.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover/outputCover.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover_mix/adc.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover_mix/binary_sensor.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover_mix/config.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover_mix/cover.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover_mix/event.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover_mix/mqtt.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/cover_mix/outputCoverMix.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/adc.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/all_binary_sensor.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/binary_sensor.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/binary_sensor_v_0_7.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/config_24_16.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/event_all.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/event_v_0_7.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/led32x4A.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/output24x16A.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/output24x16A_v0.3.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/output32x10A.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/example_config/different_configs/output32x5A.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/fonts/danube__.ttf +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/group/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/group/output.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/async_updater.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/click_timer.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/exceptions.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/gpio.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/gpiod.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/interlock.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/loader.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/logger.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/mqtt.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/oled.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/onewire/W1ThermSensor.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/onewire/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/onewire/ds2482.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/onewire/onewire.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/pcf8575.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/queue.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/schema_converter.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/sensor/ina_219_smbus.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/state_manager.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/stats.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/timeperiod.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/helper/yaml_util.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/input/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/input/gpio.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/input/gpio_new.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/message_bus/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/message_bus/basic.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/message_bus/local.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/message_bus/mqtt.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/cwt.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/dts1964_3f.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/liquid-sensor.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/modbuscli.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/orno-or-we-517.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/pt100.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/r4dcb08.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/sdm120.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/sdm630.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/sht20.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/sht30.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/socomec_e03.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/socomec_e23.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/sofar.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/modbus/utils.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/models/files.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/models/logs.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/relay/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/relay/gpio.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/relay/mcp.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/relay/pca.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/relay/pcf.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/actions.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/actions_sensor.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/actions_switch.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/filters.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/filters_adc.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/id.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/temp_unit.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/schema/update_interval.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/adc.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/gpio.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/gpio_new.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/ina219.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/serial_number.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/temp/__init__.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/temp/dallas.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/temp/lm75.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/sensor/temp/mcp9808.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/abap-BrgZPUOV.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/apex-DyP6w7ZV.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/azcli-BaLxmfj-.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/bat-CFOPXBzS.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/bicep-BfEKNvv3.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/cameligo-BFG1Mk7z.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/clojure-DTECt2xU.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/codicon-DCmgc-ay.ttf +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/coffee-CDGzqUPQ.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/cpp-CLLBncYj.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/csharp-dUCx_-0o.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/csp-5Rap-vPy.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/css-D3h14YRZ.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/cypher-DrQuvNYM.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/dart-CFKIUWau.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/dockerfile-Zznr-cwX.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/ecl-Ce3n6wWz.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/editor.worker-oRlJJsnX.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/elixir-deUWdS0T.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/flow9-i9-g7ZhI.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/fsharp-CzKuDChf.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/go-Cphgjts3.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/graphql-Cg7bfA9N.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/hcl-0cvrggvQ.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/ini-Drc7WvVn.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/java-B_fMsGYe.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/json.worker-BnUULff4.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/julia-Bqgm2twL.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/kotlin-BSkB5QuD.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/less-BsTHnhdd.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/lexon-YWi4-JPR.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/lua-nf6ki56Z.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/m3-Cpb6xl2v.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/markdown-DSZPf7rp.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/mips-B_c3zf-v.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/msdax-rUNN04Wq.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/mysql-DDwshQtU.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/objective-c-B5zXfXm9.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/pascal-CXOwvkN_.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/pascaligo-Bc-ZgV77.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/perl-CwNk8-XU.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/pgsql-tGk8EFnU.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/php-CpIb_Oan.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/pla-B03wrqEc.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/postiats-BKlk5iyT.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/powerquery-Bhzvs7bI.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/powershell-Dd3NCNK9.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/protobuf-COyEY5Pt.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/pug-BaJupSGV.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/qsharp-DXyYeYxl.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/r-CdQndTaG.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/redis-CVwtpugi.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/redshift-25W9uPmb.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/restructuredtext-DfzH4Xui.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/ruby-Cp1zYvxS.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/rust-D5C2fndG.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/sb-CDntyWJ8.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/scala-BoFRg7Ot.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/scheme-Bio4gycK.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/scss-4Ik7cdeQ.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/shell-CX-rkNHf.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/solidity-Tw7wswEv.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/sophia-C5WLch3f.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/sparql-DHaeiCBh.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/sql-CCSDG5nI.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/st-pnP8ivHi.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/swift-DwJ7jVG9.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/systemverilog-B9Xyijhd.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/tcl-DnHyzjbg.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/twig-CPajHgWi.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/typespec-D-MeaMDU.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/vb-DgyLZaXg.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/wgsl-BIv9DU6q.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/assets/yaml.worker-CooL0-c7.js +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/boneio.svg +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/frontend-dist/boneio_fav.svg +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/adc.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/binary_sensor.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/boneio.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/cover.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/dallas.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/ds2482.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/event.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/ina219.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/lm75.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/logger.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/mcp23017.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/mcp9808.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/modbus.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/mqtt.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/oled.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/output.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/output_group.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/pca9685.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/pcf8575.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/sensor.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/schema/web.schema.json +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/web_server.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/boneio/webui/websocket_manager.py +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/tests/32_5_config.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/tests/bandit.yaml +0 -0
- {boneio-0.11.3 → boneio-0.12.0.dev1}/tests/relay_32_5.py +0 -0
|
@@ -47,6 +47,7 @@ MAC = "mac"
|
|
|
47
47
|
NONE = "none"
|
|
48
48
|
MODBUS = "modbus"
|
|
49
49
|
MODBUS_SENSOR = "modbus_sensor"
|
|
50
|
+
MODBUS_DEVICE = "modbus_device"
|
|
50
51
|
UART = "uart"
|
|
51
52
|
RX = "rx"
|
|
52
53
|
TX = "tx"
|
|
@@ -126,6 +127,10 @@ OUTPUT_GROUP = "output_group"
|
|
|
126
127
|
TEMPERATURE = "temperature"
|
|
127
128
|
EVENT_ENTITY = "event"
|
|
128
129
|
SENSOR = "sensor"
|
|
130
|
+
TEXT_SENSOR = "text_sensor"
|
|
131
|
+
SELECT = "select"
|
|
132
|
+
CLIMATE = "climate"
|
|
133
|
+
NUMERIC = "number"
|
|
129
134
|
BINARY_SENSOR = "binary_sensor"
|
|
130
135
|
LM75 = "lm75"
|
|
131
136
|
MCP_TEMP_9808 = "mcp9808"
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
# PINs are shared between event.yaml and binary_sensor.yaml.
|
|
4
4
|
# Don't duplicate PINs.
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
# IN_48 and IN_49 are enabled in binary_sensor.yaml by default.
|
|
7
|
+
- id: IN_01
|
|
8
|
+
boneio_input: IN_01
|
|
9
|
+
actions:
|
|
10
|
+
single:
|
|
11
|
+
- action: output
|
|
12
|
+
pin: OUT_01
|
|
13
|
+
double:
|
|
14
|
+
- action: output
|
|
15
|
+
pin: OUT_01
|
|
16
|
+
- id: IN_02
|
|
17
|
+
boneio_input: IN_02
|
|
18
|
+
actions:
|
|
19
|
+
single:
|
|
20
|
+
- action: output
|
|
21
|
+
pin: OUT_01
|
|
22
|
+
double:
|
|
23
|
+
- action: output
|
|
24
|
+
pin: OUT_01
|
|
25
25
|
- id: IN_03
|
|
26
26
|
boneio_input: IN_03
|
|
27
27
|
actions:
|
|
@@ -191,7 +191,6 @@
|
|
|
191
191
|
boneio_input: IN_38
|
|
192
192
|
- id: IN_39
|
|
193
193
|
boneio_input: IN_39
|
|
194
|
-
|
|
195
194
|
- id: IN_40
|
|
196
195
|
boneio_input: IN_40
|
|
197
196
|
- id: IN_41
|
|
@@ -206,8 +205,8 @@
|
|
|
206
205
|
boneio_input: IN_45
|
|
207
206
|
- id: IN_46
|
|
208
207
|
boneio_input: IN_46
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
- id: IN_47
|
|
209
|
+
boneio_input: IN_47
|
|
211
210
|
# - id: IN_48
|
|
212
211
|
# boneio_input: IN_48
|
|
213
212
|
# - id: IN_49
|
|
@@ -3,18 +3,23 @@
|
|
|
3
3
|
# PINs are shared between event.yaml and binary_sensor.yaml.
|
|
4
4
|
# Don't duplicate PINs.
|
|
5
5
|
|
|
6
|
-
- id:
|
|
7
|
-
boneio_input:
|
|
6
|
+
- id: IN_48
|
|
7
|
+
boneio_input: IN_48
|
|
8
8
|
actions:
|
|
9
9
|
pressed:
|
|
10
10
|
- action: output
|
|
11
11
|
pin: OUT_01
|
|
12
|
-
- id:
|
|
13
|
-
boneio_input:
|
|
12
|
+
- id: IN_49
|
|
13
|
+
boneio_input: IN_49
|
|
14
14
|
actions:
|
|
15
15
|
pressed:
|
|
16
16
|
- action: output
|
|
17
17
|
pin: OUT_02
|
|
18
|
+
|
|
19
|
+
# - id: IN_01
|
|
20
|
+
# boneio_input: IN_01
|
|
21
|
+
# - id: IN_02
|
|
22
|
+
# boneio_input: IN_02
|
|
18
23
|
# - id: IN_03
|
|
19
24
|
# boneio_input: IN_03
|
|
20
25
|
# - id: IN_04
|
|
@@ -104,8 +109,4 @@
|
|
|
104
109
|
# - id: IN_46
|
|
105
110
|
# boneio_input: IN_46
|
|
106
111
|
# - id: IN_47
|
|
107
|
-
# boneio_input: IN_47
|
|
108
|
-
# - id: IN_48
|
|
109
|
-
# boneio_input: IN_48
|
|
110
|
-
# - id: IN_49
|
|
111
|
-
# boneio_input: IN_49
|
|
112
|
+
# boneio_input: IN_47
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
# PINs are shared between event.yaml and binary_sensor.yaml.
|
|
4
4
|
# Don't duplicate PINs.
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
# IN_48 and IN_49 are enabled in binary_sensor.yaml by default.
|
|
7
|
+
- id: IN_01
|
|
8
|
+
boneio_input: IN_01
|
|
9
|
+
actions:
|
|
10
|
+
single:
|
|
11
|
+
- action: output
|
|
12
|
+
pin: OUT_01
|
|
13
|
+
double:
|
|
14
|
+
- action: output
|
|
15
|
+
pin: OUT_01
|
|
16
|
+
- id: IN_02
|
|
17
|
+
boneio_input: IN_02
|
|
18
|
+
actions:
|
|
19
|
+
single:
|
|
20
|
+
- action: output
|
|
21
|
+
pin: OUT_01
|
|
22
|
+
double:
|
|
23
|
+
- action: output
|
|
24
|
+
pin: OUT_01
|
|
25
25
|
- id: IN_03
|
|
26
26
|
boneio_input: IN_03
|
|
27
27
|
actions:
|
|
@@ -239,8 +239,8 @@
|
|
|
239
239
|
boneio_input: IN_45
|
|
240
240
|
- id: IN_46
|
|
241
241
|
boneio_input: IN_46
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
- id: IN_47
|
|
243
|
+
boneio_input: IN_47
|
|
244
244
|
# - id: IN_48
|
|
245
245
|
# boneio_input: IN_48
|
|
246
246
|
# - id: IN_49
|
|
@@ -15,8 +15,11 @@ from boneio.const import (
|
|
|
15
15
|
EVENT_ENTITY,
|
|
16
16
|
HOMEASSISTANT,
|
|
17
17
|
LIGHT,
|
|
18
|
+
NUMERIC,
|
|
19
|
+
SELECT,
|
|
18
20
|
SENSOR,
|
|
19
21
|
SWITCH,
|
|
22
|
+
TEXT_SENSOR,
|
|
20
23
|
VALVE,
|
|
21
24
|
)
|
|
22
25
|
from boneio.helper.util import sanitize_mqtt_topic
|
|
@@ -51,6 +54,9 @@ class ConfigHelper:
|
|
|
51
54
|
BUTTON: {},
|
|
52
55
|
EVENT_ENTITY: {},
|
|
53
56
|
VALVE: {},
|
|
57
|
+
TEXT_SENSOR: {},
|
|
58
|
+
SELECT: {},
|
|
59
|
+
NUMERIC: {},
|
|
54
60
|
}
|
|
55
61
|
self.manager_ready: bool = False
|
|
56
62
|
self._network_info = network_info
|
|
@@ -327,8 +327,9 @@ def as_utc(dattim: dt.datetime) -> dt.datetime:
|
|
|
327
327
|
@callback
|
|
328
328
|
def async_track_point_in_time(
|
|
329
329
|
loop: asyncio.AbstractEventLoop,
|
|
330
|
-
|
|
330
|
+
job,
|
|
331
331
|
point_in_time: datetime,
|
|
332
|
+
**kwargs
|
|
332
333
|
) -> CALLBACK_TYPE:
|
|
333
334
|
"""Add a listener that fires once after a specific point in UTC time."""
|
|
334
335
|
# Ensure point_in_time is UTC
|
|
@@ -356,10 +357,13 @@ def async_track_point_in_time(
|
|
|
356
357
|
cancel_callback = loop.call_later(delta, run_action, job)
|
|
357
358
|
return
|
|
358
359
|
|
|
359
|
-
|
|
360
|
+
if asyncio.iscoroutinefunction(job):
|
|
361
|
+
loop.create_task(job(utc_point_in_time, **kwargs))
|
|
362
|
+
else:
|
|
363
|
+
loop.call_soon(job, utc_point_in_time, **kwargs)
|
|
360
364
|
|
|
361
365
|
delta = expected_fire_timestamp - time.time()
|
|
362
|
-
cancel_callback = loop.call_later(delta, run_action,
|
|
366
|
+
cancel_callback = loop.call_later(delta, run_action, job)
|
|
363
367
|
|
|
364
368
|
@callback
|
|
365
369
|
def unsub_point_in_time_listener() -> None:
|
|
@@ -14,7 +14,8 @@ FILTERS = {
|
|
|
14
14
|
"multiply": lambda x, y: x * y if x else x,
|
|
15
15
|
"filter_out": lambda x, y: None if x == y else x,
|
|
16
16
|
"filter_out_greater": lambda x, y: None if x > y else x,
|
|
17
|
-
"filter_out_lower": lambda x, y: None if x < y else x
|
|
17
|
+
"filter_out_lower": lambda x, y: None if x < y else x,
|
|
18
|
+
"encode_temperature": lambda x, y: (int(x * y) << 1) | 1,
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
|
|
@@ -9,11 +9,13 @@ from boneio.const import (
|
|
|
9
9
|
INPUT,
|
|
10
10
|
INPUT_SENSOR,
|
|
11
11
|
LONG,
|
|
12
|
+
NUMERIC,
|
|
12
13
|
OFF,
|
|
13
14
|
ON,
|
|
14
15
|
OPEN,
|
|
15
16
|
OPENING,
|
|
16
17
|
RELAY,
|
|
18
|
+
SELECT,
|
|
17
19
|
SENSOR,
|
|
18
20
|
SINGLE,
|
|
19
21
|
STATE,
|
|
@@ -215,6 +217,31 @@ def ha_sensor_temp_availabilty_message(
|
|
|
215
217
|
**kwargs,
|
|
216
218
|
}
|
|
217
219
|
|
|
220
|
+
def modbus_availabilty_message(
|
|
221
|
+
id: str,
|
|
222
|
+
entity_id: str,
|
|
223
|
+
name: str,
|
|
224
|
+
state_topic_base: str,
|
|
225
|
+
topic: str,
|
|
226
|
+
model: str,
|
|
227
|
+
device_type: str = SENSOR,
|
|
228
|
+
**kwargs,
|
|
229
|
+
):
|
|
230
|
+
"""Create Modbus availability topic for HA."""
|
|
231
|
+
return {
|
|
232
|
+
"availability": [{"topic": f"{topic}/{id}/{STATE}"}],
|
|
233
|
+
"device": {
|
|
234
|
+
"identifiers": [id],
|
|
235
|
+
"manufacturer": "boneIO",
|
|
236
|
+
"model": model,
|
|
237
|
+
"name": name,
|
|
238
|
+
"sw_version": __version__,
|
|
239
|
+
},
|
|
240
|
+
"name": entity_id,
|
|
241
|
+
"state_topic": f"{topic}/{device_type}/{id}/{state_topic_base}",
|
|
242
|
+
"unique_id": f"{topic}{entity_id.replace('_', '').lower()}{name.lower()}",
|
|
243
|
+
**kwargs,
|
|
244
|
+
}
|
|
218
245
|
|
|
219
246
|
def modbus_sensor_availabilty_message(
|
|
220
247
|
id: str,
|
|
@@ -242,6 +269,59 @@ def modbus_sensor_availabilty_message(
|
|
|
242
269
|
**kwargs,
|
|
243
270
|
}
|
|
244
271
|
|
|
272
|
+
def modbus_select_availabilty_message(
|
|
273
|
+
id: str,
|
|
274
|
+
entity_id: str,
|
|
275
|
+
name: str,
|
|
276
|
+
state_topic_base: str,
|
|
277
|
+
topic: str,
|
|
278
|
+
model: str,
|
|
279
|
+
device_type: str = SELECT,
|
|
280
|
+
**kwargs,
|
|
281
|
+
):
|
|
282
|
+
"""Create Modbus Select availability topic for HA."""
|
|
283
|
+
return {
|
|
284
|
+
"availability": [{"topic": f"{topic}/{id}/{STATE}"}],
|
|
285
|
+
"device": {
|
|
286
|
+
"identifiers": [id],
|
|
287
|
+
"manufacturer": "boneIO",
|
|
288
|
+
"model": model,
|
|
289
|
+
"name": name,
|
|
290
|
+
"sw_version": __version__,
|
|
291
|
+
},
|
|
292
|
+
"name": entity_id,
|
|
293
|
+
"state_topic": f"{topic}/{device_type}/{id}/{state_topic_base}",
|
|
294
|
+
"unique_id": f"{topic}{entity_id.replace('_', '').lower()}{name.lower()}",
|
|
295
|
+
**kwargs,
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def modbus_numeric_availabilty_message(
|
|
300
|
+
id: str,
|
|
301
|
+
entity_id: str,
|
|
302
|
+
name: str,
|
|
303
|
+
state_topic_base: str,
|
|
304
|
+
topic: str,
|
|
305
|
+
model: str,
|
|
306
|
+
device_type: str = NUMERIC,
|
|
307
|
+
**kwargs,
|
|
308
|
+
):
|
|
309
|
+
"""Create Modbus Numeric availability topic for HA."""
|
|
310
|
+
return {
|
|
311
|
+
"availability": [{"topic": f"{topic}/{id}/{STATE}"}],
|
|
312
|
+
"device": {
|
|
313
|
+
"identifiers": [id],
|
|
314
|
+
"manufacturer": "boneIO",
|
|
315
|
+
"model": model,
|
|
316
|
+
"name": name,
|
|
317
|
+
"sw_version": __version__,
|
|
318
|
+
},
|
|
319
|
+
"name": entity_id,
|
|
320
|
+
"state_topic": f"{topic}/{device_type}/{id}/{state_topic_base}",
|
|
321
|
+
"unique_id": f"{topic}{entity_id.replace('_', '').lower()}{name.lower()}",
|
|
322
|
+
**kwargs,
|
|
323
|
+
}
|
|
324
|
+
|
|
245
325
|
|
|
246
326
|
def ha_cover_availabilty_message(
|
|
247
327
|
id: str, name: str, device_class: str, topic: str = "boneIO", model: str = "boneIO Relay Board", **kwargs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import unicodedata
|
|
2
|
-
import os
|
|
3
1
|
import json
|
|
2
|
+
import os
|
|
3
|
+
import unicodedata
|
|
4
4
|
from typing import Any, Callable, TypeVar
|
|
5
5
|
|
|
6
6
|
CALLABLE_T = TypeVar("CALLABLE_T", bound=Callable[..., Any])
|
|
@@ -39,6 +39,7 @@ def sanitize_mqtt_topic(name: str) -> str:
|
|
|
39
39
|
str: Sanitized string
|
|
40
40
|
"""
|
|
41
41
|
import re
|
|
42
|
+
|
|
42
43
|
from .logger import _LOGGER
|
|
43
44
|
|
|
44
45
|
original = name
|
|
@@ -58,3 +59,9 @@ def open_json(path: str, model: str) -> dict:
|
|
|
58
59
|
with open(file, "r") as db_file:
|
|
59
60
|
datastore = json.load(db_file)
|
|
60
61
|
return datastore
|
|
62
|
+
|
|
63
|
+
def find_key_by_value(d, value):
|
|
64
|
+
for k, v in d.items():
|
|
65
|
+
if v == value:
|
|
66
|
+
return k
|
|
67
|
+
return None
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
|
+
import json
|
|
4
5
|
import logging
|
|
5
6
|
from collections import deque
|
|
6
7
|
from typing import Callable, Coroutine, List, Optional, Set, Tuple
|
|
@@ -28,7 +29,6 @@ from boneio.const import (
|
|
|
28
29
|
LM75,
|
|
29
30
|
MCP,
|
|
30
31
|
MCP_TEMP_9808,
|
|
31
|
-
MODBUS,
|
|
32
32
|
MQTT,
|
|
33
33
|
NONE,
|
|
34
34
|
ON,
|
|
@@ -118,6 +118,7 @@ class Manager:
|
|
|
118
118
|
output_group: List = [],
|
|
119
119
|
sensors: dict = {},
|
|
120
120
|
modbus: dict = {},
|
|
121
|
+
modbus_devices: dict = {},
|
|
121
122
|
pca9685: list = [],
|
|
122
123
|
mcp23017: list = [],
|
|
123
124
|
pcf8575: list = [],
|
|
@@ -252,7 +253,7 @@ class Manager:
|
|
|
252
253
|
message_bus=self._message_bus,
|
|
253
254
|
topic_prefix=self._config_helper.topic_prefix,
|
|
254
255
|
)
|
|
255
|
-
self._modbus_coordinators = self._configure_modbus_coordinators(
|
|
256
|
+
self._modbus_coordinators = self._configure_modbus_coordinators(devices=modbus_devices)
|
|
256
257
|
|
|
257
258
|
if oled.get("enabled", False):
|
|
258
259
|
from boneio.oled import Oled
|
|
@@ -628,15 +629,15 @@ class Manager:
|
|
|
628
629
|
if ina219:
|
|
629
630
|
self._ina219_sensors.append(ina219)
|
|
630
631
|
|
|
631
|
-
def _configure_modbus_coordinators(self,
|
|
632
|
-
if
|
|
632
|
+
def _configure_modbus_coordinators(self, devices: dict) -> dict:
|
|
633
|
+
if devices and self._modbus:
|
|
633
634
|
from boneio.helper.loader import create_modbus_coordinators
|
|
634
635
|
|
|
635
636
|
return create_modbus_coordinators(
|
|
636
637
|
manager=self,
|
|
637
638
|
message_bus=self._message_bus,
|
|
638
639
|
event_bus=self._event_bus,
|
|
639
|
-
entries=
|
|
640
|
+
entries=devices,
|
|
640
641
|
modbus=self._modbus,
|
|
641
642
|
config_helper=self._config_helper,
|
|
642
643
|
)
|
|
@@ -947,6 +948,13 @@ class Manager:
|
|
|
947
948
|
elif device_id == "cover_reload" and message == "cover_reload":
|
|
948
949
|
_LOGGER.info("Reloading covers actions")
|
|
949
950
|
self._configure_covers(reload_config=True)
|
|
951
|
+
elif msg_type == "modbus" and command == "set":
|
|
952
|
+
target_device = self._modbus_coordinators.get(device_id)
|
|
953
|
+
if target_device:
|
|
954
|
+
if isinstance(message, str):
|
|
955
|
+
message = json.loads(message)
|
|
956
|
+
if "device" in message and "value" in message:
|
|
957
|
+
await target_device.write_register(value=message["value"], entity=message["device"])
|
|
950
958
|
|
|
951
959
|
async def restart_request(self) -> None:
|
|
952
960
|
_LOGGER.info("Restarting process. Systemd should restart it soon.")
|
|
@@ -7,6 +7,11 @@ import time
|
|
|
7
7
|
from concurrent.futures import ThreadPoolExecutor
|
|
8
8
|
from typing import Any
|
|
9
9
|
|
|
10
|
+
from pymodbus.client.common import (
|
|
11
|
+
ReadCoilsResponse,
|
|
12
|
+
ReadHoldingRegistersResponse,
|
|
13
|
+
WriteSingleRegisterResponse,
|
|
14
|
+
)
|
|
10
15
|
from pymodbus.client.sync import BaseModbusClient, ModbusSerialClient
|
|
11
16
|
from pymodbus.constants import Endian
|
|
12
17
|
from pymodbus.exceptions import ModbusException
|
|
@@ -127,6 +132,7 @@ class Modbus:
|
|
|
127
132
|
self._read_methods = {
|
|
128
133
|
"input": self._client.read_input_registers,
|
|
129
134
|
"holding": self._client.read_holding_registers,
|
|
135
|
+
"coil": self._client.read_coils,
|
|
130
136
|
}
|
|
131
137
|
except ModbusException as exception_error:
|
|
132
138
|
_LOGGER.error(exception_error)
|
|
@@ -202,7 +208,7 @@ class Modbus:
|
|
|
202
208
|
)
|
|
203
209
|
|
|
204
210
|
# Run the read operation in the executor
|
|
205
|
-
result: ReadInputRegistersResponse = read_method(address, **kwargs)
|
|
211
|
+
result: ReadInputRegistersResponse | ReadHoldingRegistersResponse | ReadCoilsResponse = read_method(address, **kwargs)
|
|
206
212
|
|
|
207
213
|
if not hasattr(result, REGISTERS):
|
|
208
214
|
_LOGGER.error("No result from read: %s", str(result))
|
|
@@ -232,6 +238,54 @@ class Modbus:
|
|
|
232
238
|
)
|
|
233
239
|
return result
|
|
234
240
|
|
|
241
|
+
def write_register_blocking(self, unit: int | str, address: int, value: int | float) -> ModbusResponse:
|
|
242
|
+
"""Call async pymodbus."""
|
|
243
|
+
start_time = time.perf_counter()
|
|
244
|
+
result = None
|
|
245
|
+
try:
|
|
246
|
+
# Run connection in the executor
|
|
247
|
+
connected = self._pymodbus_connect()
|
|
248
|
+
if not connected:
|
|
249
|
+
_LOGGER.error("Can't connect to Modbus.")
|
|
250
|
+
return None
|
|
251
|
+
|
|
252
|
+
_LOGGER.debug(
|
|
253
|
+
"Writing register %s with value %s to device %s.",
|
|
254
|
+
address,
|
|
255
|
+
value,
|
|
256
|
+
unit,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
# Run the read operation in the executor
|
|
260
|
+
result: WriteSingleRegisterResponse = self._client.write_register(address=address, value=value, unit=unit)
|
|
261
|
+
|
|
262
|
+
if result.isError():
|
|
263
|
+
_LOGGER.error("Operation failed.")
|
|
264
|
+
result = None
|
|
265
|
+
|
|
266
|
+
except ValueError as exception_error:
|
|
267
|
+
_LOGGER.error("ValueError: Error writing registers: %s", exception_error)
|
|
268
|
+
pass
|
|
269
|
+
except (ModbusException, struct.error) as exception_error:
|
|
270
|
+
_LOGGER.error("ModbusException: Error writing registers: %s", exception_error)
|
|
271
|
+
pass
|
|
272
|
+
except asyncio.TimeoutError:
|
|
273
|
+
_LOGGER.error("Timeout writing registers to device %s", unit)
|
|
274
|
+
pass
|
|
275
|
+
except asyncio.CancelledError as err:
|
|
276
|
+
_LOGGER.error("Operation cancelled writing registers to device %s with error %s", unit, err)
|
|
277
|
+
pass
|
|
278
|
+
except Exception as e:
|
|
279
|
+
_LOGGER.error(f"Unexpected error writing registers: {type(e).__name__} - {e}")
|
|
280
|
+
pass
|
|
281
|
+
finally:
|
|
282
|
+
end_time = time.perf_counter()
|
|
283
|
+
_LOGGER.debug(
|
|
284
|
+
"Write completed in %.3f seconds.",
|
|
285
|
+
end_time - start_time,
|
|
286
|
+
)
|
|
287
|
+
return result
|
|
288
|
+
|
|
235
289
|
async def read_registers(
|
|
236
290
|
self,
|
|
237
291
|
unit: int | str, # device address
|
|
@@ -251,3 +305,8 @@ class Modbus:
|
|
|
251
305
|
)
|
|
252
306
|
value = getattr(decoder, _payload_type["f"])()
|
|
253
307
|
return value
|
|
308
|
+
|
|
309
|
+
async def write_register(self, unit: int | str, address: int, value: int | float) -> ModbusResponse:
|
|
310
|
+
"""Call async pymodbus."""
|
|
311
|
+
async with self._lock:
|
|
312
|
+
return await self._loop.run_in_executor(self._executor, self.write_register_blocking, unit, address, value)
|