boneIO 0.10.1.dev1__tar.gz → 0.11.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.
Files changed (269) hide show
  1. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/PKG-INFO +1 -1
  2. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/const.py +1 -0
  3. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/cover.py +3 -9
  4. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/config.py +9 -1
  5. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/ha_discovery.py +31 -11
  6. boneio-0.11.0.dev1/boneio/helper/interlock.py +17 -0
  7. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/loader.py +6 -0
  8. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/stats.py +2 -1
  9. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/manager.py +33 -8
  10. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/relay/basic.py +23 -1
  11. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/relay/mcp.py +14 -1
  12. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/runner.py +15 -2
  13. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/schema.yaml +11 -1
  14. boneio-0.11.0.dev1/boneio/version.py +2 -0
  15. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/app.py +2 -2
  16. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/cssMode-DfMvbHS1.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/cssMode-CPtUBbXr.js +1 -1
  17. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/freemarker2-COsx9Kxx.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/freemarker2-CPgeQoo4.js +1 -1
  18. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/handlebars-DLSBoYNU.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/handlebars-D4w1NJY3.js +1 -1
  19. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/html-BMDnVWJE.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/html-q2N35pO2.js +1 -1
  20. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/htmlMode-BnEwlO6V.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/htmlMode-CBQmLUN4.js +1 -1
  21. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/index-DF-wGFj8.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/index-B-45AWN4.js +140 -140
  22. boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/index-DBEImLlU.css +1 -0
  23. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/javascript-CiOEfIZl.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/javascript-CioA1Jb_.js +1 -1
  24. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/jsonMode-YFANd4YE.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/jsonMode-TOkZpB8m.js +1 -1
  25. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/liquid-zmwisPnH.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/liquid-CYRp4pyl.js +1 -1
  26. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/mdx-DyTtu2Si.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/mdx-4I3a0Isw.js +1 -1
  27. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/python-pTO_Vlnu.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/python-BptvsYcm.js +1 -1
  28. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/razor-BFdtnr9-.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/razor-Dntpj5pP.js +1 -1
  29. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/tsMode-znXRVK4x.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/tsMode-j3NmDdpB.js +1 -1
  30. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/typescript-B0vdxoMh.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/typescript-DmOKbKIi.js +1 -1
  31. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/xml-x0PGJg-4.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/xml-XMPwvR_s.js +1 -1
  32. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/yaml-CZu_RZwp.js → boneio-0.11.0.dev1/boneio/webui/frontend-dist/assets/yaml-DCMTp8U1.js +1 -1
  33. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/index.html +2 -2
  34. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/config.schema.json +10 -2
  35. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/output.schema.json +10 -2
  36. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/pyproject.toml +1 -1
  37. boneio-0.10.1.dev1/boneio/version.py +0 -2
  38. boneio-0.10.1.dev1/boneio/webui/frontend-dist/assets/index-CY-57mMi.css +0 -1
  39. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/LICENSE +0 -0
  40. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/README.md +0 -0
  41. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/__init__.py +0 -0
  42. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.7/input.yaml +0 -0
  43. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.7/output_24_16.yaml +0 -0
  44. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.7/output_32_10.yaml +0 -0
  45. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.7/output_cover.yaml +0 -0
  46. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.7/output_cover_mix.yaml +0 -0
  47. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.8/input.yaml +0 -0
  48. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.8/output_24_16.yaml +0 -0
  49. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.8/output_32_10.yaml +0 -0
  50. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.8/output_cover.yaml +0 -0
  51. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/boards/0.8/output_cover_mix.yaml +0 -0
  52. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/bonecli.py +0 -0
  53. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/24x16/adc.yaml +0 -0
  54. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/24x16/binary_sensor.yaml +0 -0
  55. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/24x16/config.yaml +0 -0
  56. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/24x16/event.yaml +0 -0
  57. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/24x16/mqtt.yaml +0 -0
  58. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/24x16/output24x16A.yaml +0 -0
  59. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/32x10/adc.yaml +0 -0
  60. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/32x10/binary_sensor.yaml +0 -0
  61. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/32x10/config.yaml +0 -0
  62. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/32x10/event.yaml +0 -0
  63. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/32x10/mqtt.yaml +0 -0
  64. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/32x10/output32x10A.yaml +0 -0
  65. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/__init__.py +0 -0
  66. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover/adc.yaml +0 -0
  67. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover/binary_sensor.yaml +0 -0
  68. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover/config.yaml +0 -0
  69. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover/cover.yaml +0 -0
  70. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover/event.yaml +0 -0
  71. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover/mqtt.yaml +0 -0
  72. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover/outputCover.yaml +0 -0
  73. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover_mix/adc.yaml +0 -0
  74. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover_mix/binary_sensor.yaml +0 -0
  75. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover_mix/config.yaml +0 -0
  76. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover_mix/cover.yaml +0 -0
  77. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover_mix/event.yaml +0 -0
  78. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover_mix/mqtt.yaml +0 -0
  79. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/cover_mix/outputCoverMix.yaml +0 -0
  80. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/adc.yaml +0 -0
  81. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/all_binary_sensor.yaml +0 -0
  82. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/binary_sensor.yaml +0 -0
  83. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/binary_sensor_v_0_7.yaml +0 -0
  84. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/config_24_16.yaml +0 -0
  85. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/event_all.yaml +0 -0
  86. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/event_v_0_7.yaml +0 -0
  87. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/led32x4A.yaml +0 -0
  88. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/output24x16A.yaml +0 -0
  89. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/output24x16A_v0.3.yaml +0 -0
  90. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/output32x10A.yaml +0 -0
  91. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/example_config/different_configs/output32x5A.yaml +0 -0
  92. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/fonts/danube__.ttf +0 -0
  93. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/group/__init__.py +0 -0
  94. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/group/output.py +0 -0
  95. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/__init__.py +0 -0
  96. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/async_updater.py +0 -0
  97. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/click_timer.py +0 -0
  98. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/events.py +0 -0
  99. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/exceptions.py +0 -0
  100. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/filter.py +0 -0
  101. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/gpio.py +0 -0
  102. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/gpiod.py +0 -0
  103. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/logger.py +0 -0
  104. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/message_bus.py +0 -0
  105. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/mqtt.py +0 -0
  106. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/oled.py +0 -0
  107. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/onewire/W1ThermSensor.py +0 -0
  108. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/onewire/__init__.py +0 -0
  109. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/onewire/ds2482.py +0 -0
  110. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/onewire/onewire.py +0 -0
  111. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/pcf8575.py +0 -0
  112. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/queue.py +0 -0
  113. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/schema_converter.py +0 -0
  114. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/sensor/ina_219_smbus.py +0 -0
  115. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/state_manager.py +0 -0
  116. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/timeperiod.py +0 -0
  117. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/util.py +0 -0
  118. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/helper/yaml_util.py +0 -0
  119. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/input/__init__.py +0 -0
  120. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/input/gpio.py +0 -0
  121. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/input/gpio_new.py +0 -0
  122. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/__init__.py +0 -0
  123. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/client.py +0 -0
  124. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/cwt.json +0 -0
  125. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/dts1964_3f.json +0 -0
  126. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/liquid-sensor.json +0 -0
  127. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/modbuscli.py +0 -0
  128. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/orno-or-we-517.json +0 -0
  129. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/pt100.json +0 -0
  130. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/r4dcb08.json +0 -0
  131. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/sdm120.json +0 -0
  132. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/sdm630.json +0 -0
  133. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/sensor.py +0 -0
  134. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/sht20.json +0 -0
  135. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/sht30.json +0 -0
  136. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/single_sensor.py +0 -0
  137. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/socomec_e03.json +0 -0
  138. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/socomec_e23.json +0 -0
  139. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/sofar.json +0 -0
  140. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/modbus/utils.py +0 -0
  141. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/models/__init__.py +0 -0
  142. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/models/files.py +0 -0
  143. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/models/logs.py +0 -0
  144. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/mqtt_client.py +0 -0
  145. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/oled.py +0 -0
  146. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/relay/__init__.py +0 -0
  147. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/relay/gpio.py +0 -0
  148. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/relay/pca.py +0 -0
  149. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/relay/pcf.py +0 -0
  150. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/actions.yaml +0 -0
  151. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/actions_sensor.yaml +0 -0
  152. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/actions_switch.yaml +0 -0
  153. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/filters.yaml +0 -0
  154. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/filters_adc.yaml +0 -0
  155. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/id.yaml +0 -0
  156. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/temp_unit.yaml +0 -0
  157. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/schema/update_interval.yaml +0 -0
  158. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/__init__.py +0 -0
  159. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/adc.py +0 -0
  160. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/gpio.py +0 -0
  161. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/gpio_new.py +0 -0
  162. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/ina219.py +0 -0
  163. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/serial_number.py +0 -0
  164. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/temp/__init__.py +0 -0
  165. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/temp/dallas.py +0 -0
  166. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/temp/lm75.py +0 -0
  167. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/sensor/temp/mcp9808.py +0 -0
  168. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/abap-BrgZPUOV.js +0 -0
  169. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/apex-DyP6w7ZV.js +0 -0
  170. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/azcli-BaLxmfj-.js +0 -0
  171. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/bat-CFOPXBzS.js +0 -0
  172. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/bicep-BfEKNvv3.js +0 -0
  173. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/cameligo-BFG1Mk7z.js +0 -0
  174. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/clojure-DTECt2xU.js +0 -0
  175. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/codicon-DCmgc-ay.ttf +0 -0
  176. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/coffee-CDGzqUPQ.js +0 -0
  177. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/cpp-CLLBncYj.js +0 -0
  178. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/csharp-dUCx_-0o.js +0 -0
  179. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/csp-5Rap-vPy.js +0 -0
  180. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/css-D3h14YRZ.js +0 -0
  181. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/cypher-DrQuvNYM.js +0 -0
  182. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/dart-CFKIUWau.js +0 -0
  183. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/dockerfile-Zznr-cwX.js +0 -0
  184. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/ecl-Ce3n6wWz.js +0 -0
  185. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/editor.worker-D5ngByhL.js +0 -0
  186. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/elixir-deUWdS0T.js +0 -0
  187. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/flow9-i9-g7ZhI.js +0 -0
  188. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/fsharp-CzKuDChf.js +0 -0
  189. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/go-Cphgjts3.js +0 -0
  190. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/graphql-Cg7bfA9N.js +0 -0
  191. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/hcl-0cvrggvQ.js +0 -0
  192. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/ini-Drc7WvVn.js +0 -0
  193. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/java-B_fMsGYe.js +0 -0
  194. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/json.worker-F0ZGA5Zk.js +0 -0
  195. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/julia-Bqgm2twL.js +0 -0
  196. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/kotlin-BSkB5QuD.js +0 -0
  197. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/less-BsTHnhdd.js +0 -0
  198. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/lexon-YWi4-JPR.js +0 -0
  199. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/lua-nf6ki56Z.js +0 -0
  200. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/m3-Cpb6xl2v.js +0 -0
  201. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/markdown-DSZPf7rp.js +0 -0
  202. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/mips-B_c3zf-v.js +0 -0
  203. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/msdax-rUNN04Wq.js +0 -0
  204. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/mysql-DDwshQtU.js +0 -0
  205. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/objective-c-B5zXfXm9.js +0 -0
  206. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/pascal-CXOwvkN_.js +0 -0
  207. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/pascaligo-Bc-ZgV77.js +0 -0
  208. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/perl-CwNk8-XU.js +0 -0
  209. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/pgsql-tGk8EFnU.js +0 -0
  210. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/php-CpIb_Oan.js +0 -0
  211. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/pla-B03wrqEc.js +0 -0
  212. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/postiats-BKlk5iyT.js +0 -0
  213. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/powerquery-Bhzvs7bI.js +0 -0
  214. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/powershell-Dd3NCNK9.js +0 -0
  215. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/protobuf-COyEY5Pt.js +0 -0
  216. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/pug-BaJupSGV.js +0 -0
  217. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/qsharp-DXyYeYxl.js +0 -0
  218. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/r-CdQndTaG.js +0 -0
  219. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/redis-CVwtpugi.js +0 -0
  220. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/redshift-25W9uPmb.js +0 -0
  221. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/restructuredtext-DfzH4Xui.js +0 -0
  222. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/ruby-Cp1zYvxS.js +0 -0
  223. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/rust-D5C2fndG.js +0 -0
  224. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/sb-CDntyWJ8.js +0 -0
  225. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/scala-BoFRg7Ot.js +0 -0
  226. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/scheme-Bio4gycK.js +0 -0
  227. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/scss-4Ik7cdeQ.js +0 -0
  228. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/shell-CX-rkNHf.js +0 -0
  229. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/solidity-Tw7wswEv.js +0 -0
  230. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/sophia-C5WLch3f.js +0 -0
  231. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/sparql-DHaeiCBh.js +0 -0
  232. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/sql-CCSDG5nI.js +0 -0
  233. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/st-pnP8ivHi.js +0 -0
  234. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/swift-DwJ7jVG9.js +0 -0
  235. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/systemverilog-B9Xyijhd.js +0 -0
  236. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/tcl-DnHyzjbg.js +0 -0
  237. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/twig-CPajHgWi.js +0 -0
  238. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/typespec-D-MeaMDU.js +0 -0
  239. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/vb-DgyLZaXg.js +0 -0
  240. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/wgsl-BIv9DU6q.js +0 -0
  241. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/assets/yaml.worker-C2uymlqn.js +0 -0
  242. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/boneio.svg +0 -0
  243. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/frontend-dist/boneio_fav.svg +0 -0
  244. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/adc.schema.json +0 -0
  245. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/binary_sensor.schema.json +0 -0
  246. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/boneio.schema.json +0 -0
  247. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/cover.schema.json +0 -0
  248. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/dallas.schema.json +0 -0
  249. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/ds2482.schema.json +0 -0
  250. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/event.schema.json +0 -0
  251. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/ina219.schema.json +0 -0
  252. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/lm75.schema.json +0 -0
  253. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/logger.schema.json +0 -0
  254. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/mcp23017.schema.json +0 -0
  255. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/mcp9808.schema.json +0 -0
  256. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/modbus.schema.json +0 -0
  257. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/modbus_sensors.schema.json +0 -0
  258. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/mqtt.schema.json +0 -0
  259. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/oled.schema.json +0 -0
  260. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/output_group.schema.json +0 -0
  261. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/pca9685.schema.json +0 -0
  262. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/pcf8575.schema.json +0 -0
  263. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/sensor.schema.json +0 -0
  264. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/schema/web.schema.json +0 -0
  265. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/web_server.py +0 -0
  266. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/boneio/webui/websocket_manager.py +0 -0
  267. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/tests/32_5_config.yaml +0 -0
  268. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/tests/bandit.yaml +0 -0
  269. {boneio-0.10.1.dev1 → boneio-0.11.0.dev1}/tests/relay_32_5.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boneio
3
- Version: 0.10.1.dev1
3
+ Version: 0.11.0.dev1
4
4
  Summary: Python App for BoneIO
5
5
  License: GNU General Public License v3.0
6
6
  Author-email: Paweł Szafer <pszafer@gmail.com>
@@ -35,6 +35,7 @@ ACTION = "action"
35
35
  SWITCH = "switch"
36
36
  LIGHT = "light"
37
37
  BUTTON = "button"
38
+ VALVE = "valve"
38
39
  CONFIG_PIN = "/usr/bin/config-pin"
39
40
  UPDATE_INTERVAL = "update_interval"
40
41
  ADC = "adc"
@@ -127,13 +127,7 @@ class Cover(BasicMqtt):
127
127
  """Current state of cover."""
128
128
  return CLOSED if self._closed else OPEN
129
129
 
130
- def stop(self) -> None:
131
- """Public Stop cover graceful."""
132
- _LOGGER.info("Stopping cover %s.", self._id)
133
- if self._current_operation != IDLE:
134
- self._stop_cover(on_exit=False)
135
-
136
- async def async_stop(self) -> None:
130
+ async def stop(self) -> None:
137
131
  """Public Stop cover graceful."""
138
132
  _LOGGER.info("Stopping cover %s.", self._id)
139
133
  if self._current_operation != IDLE:
@@ -291,14 +285,14 @@ class Cover(BasicMqtt):
291
285
  async def toggle_open(self) -> None:
292
286
  _LOGGER.debug("Toggle open cover %s from input.", self._id)
293
287
  if self._current_operation != IDLE:
294
- await self.async_stop()
288
+ await self.stop()
295
289
  else:
296
290
  await self.open()
297
291
 
298
292
  async def toggle_close(self) -> None:
299
293
  _LOGGER.debug("Toggle close cover %s from input.", self._id)
300
294
  if self._current_operation != IDLE:
301
- await self.async_stop()
295
+ await self.stop()
302
296
  else:
303
297
  await self.close()
304
298
 
@@ -16,6 +16,7 @@ from boneio.const import (
16
16
  LIGHT,
17
17
  SENSOR,
18
18
  SWITCH,
19
+ VALVE,
19
20
  )
20
21
 
21
22
 
@@ -24,6 +25,7 @@ class ConfigHelper:
24
25
  self,
25
26
  topic_prefix: str,
26
27
  name: str = BONEIO,
28
+ device_type: str = "boneIO Black",
27
29
  ha_discovery: bool = True,
28
30
  ha_discovery_prefix: str = HOMEASSISTANT,
29
31
  ):
@@ -31,6 +33,7 @@ class ConfigHelper:
31
33
  self._topic_prefix = topic_prefix if topic_prefix else name
32
34
  self._ha_discovery = ha_discovery
33
35
  self._ha_discovery_prefix = ha_discovery_prefix
36
+ self._device_type = device_type
34
37
  self._fetch_old_discovery = None
35
38
  self._autodiscovery_messages = {
36
39
  SWITCH: {},
@@ -39,7 +42,8 @@ class ConfigHelper:
39
42
  SENSOR: {},
40
43
  COVER: {},
41
44
  BUTTON: {},
42
- EVENT_ENTITY: {}
45
+ EVENT_ENTITY: {},
46
+ VALVE: {},
43
47
  }
44
48
  self.manager_ready: bool = False
45
49
 
@@ -59,6 +63,10 @@ class ConfigHelper:
59
63
  def ha_discovery_prefix(self) -> str:
60
64
  return self._ha_discovery_prefix
61
65
 
66
+ @property
67
+ def device_type(self) -> str:
68
+ return self._device_type
69
+
62
70
  @property
63
71
  def cmd_topic_prefix(self) -> str:
64
72
  return f"{self.topic_prefix}/cmd/"
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  from boneio.const import (
2
4
  CLOSE,
3
5
  CLOSED,
@@ -26,17 +28,23 @@ def ha_availabilty_message(
26
28
  topic: str = "boneIO",
27
29
  device_type: str = INPUT,
28
30
  model: str = "boneIO Relay Board",
31
+ web_url: str | None = None,
29
32
  **kwargs,
30
33
  ):
31
34
  """Create availability topic for HA."""
35
+ web_url = {
36
+ "configuration_url": web_url
37
+ } if web_url else {}
32
38
  return {
33
39
  "availability": [{"topic": f"{topic}/{STATE}"}],
40
+ "optimistic": False,
34
41
  "device": {
35
42
  "identifiers": [topic],
36
43
  "manufacturer": "boneIO",
37
44
  "model": model,
38
45
  "name": f"boneIO {topic}",
39
46
  "sw_version": __version__,
47
+ **web_url
40
48
  },
41
49
  "name": name,
42
50
  "state_topic": f"{topic}/{device_type}/{id}",
@@ -55,7 +63,7 @@ def ha_light_availabilty_message(id: str, topic: str = "boneIO", device_type: st
55
63
  return msg
56
64
 
57
65
 
58
- def ha_led_availabilty_message(id: str, topic: str = "boneIO", **kwargs):
66
+ def ha_led_availabilty_message(id: str, topic: str = "boneIO", **kwargs):
59
67
  """Create LED availability topic for HA."""
60
68
  msg = ha_availabilty_message(device_type=RELAY, topic=topic, id=id, **kwargs)
61
69
  msg["command_topic"] = f"{topic}/cmd/{RELAY}/{id}/set"
@@ -88,6 +96,18 @@ def ha_switch_availabilty_message(id: str, topic: str = "boneIO", device_type: s
88
96
  msg["value_template"] = "{{ value_json.state }}"
89
97
  return msg
90
98
 
99
+ def ha_valve_availabilty_message(id: str, topic: str = "boneIO", device_type: str = RELAY, **kwargs):
100
+ """Create Valve availability topic for HA."""
101
+ msg = ha_availabilty_message(device_type=device_type, topic=topic, id=id, **kwargs)
102
+ msg["command_topic"] = f"{topic}/cmd/{device_type}/{id}/set"
103
+ msg["payload_close"] = OFF
104
+ msg["payload_open"] = ON
105
+ msg["state_open"] = ON
106
+ msg["state_closed"] = OFF
107
+ msg["reports_position"] = False
108
+ msg["value_template"] = "{{ value_json.state }}"
109
+ return msg
110
+
91
111
 
92
112
  def ha_event_availabilty_message(**kwargs):
93
113
  msg = ha_availabilty_message(device_type=INPUT, **kwargs)
@@ -110,16 +130,16 @@ def ha_sensor_availabilty_message(unit_of_measurement: str = None, **kwargs):
110
130
  return msg
111
131
 
112
132
 
113
- def ha_binary_sensor_availabilty_message(id: str, name: str, device_class: str, topic: str = "boneIO"):
133
+ def ha_binary_sensor_availabilty_message(id: str, name: str, device_class: str, topic: str = "boneIO", model: str = "boneIO Relay Board", **kwargs):
114
134
  """Create availability topic for HA."""
115
- kwargs = {"device_class": device_class} if device_class else {}
135
+ kwargs = {"device_class": device_class, **kwargs} if device_class else {**kwargs}
116
136
  return {
117
137
  **kwargs,
118
138
  "availability": [{"topic": f"{topic}/{STATE}"}],
119
139
  "device": {
120
140
  "identifiers": [topic],
121
141
  "manufacturer": "boneIO",
122
- "model": "boneIO Relay Board",
142
+ "model": model,
123
143
  "name": f"boneIO {topic}",
124
144
  "sw_version": __version__,
125
145
  },
@@ -132,7 +152,7 @@ def ha_binary_sensor_availabilty_message(id: str, name: str, device_class: str,
132
152
 
133
153
 
134
154
  def ha_sensor_ina_availabilty_message(
135
- id: str, name: str, topic: str = "boneIO", **kwargs
155
+ id: str, name: str, topic: str = "boneIO", model: str = "boneIO Relay Board", **kwargs
136
156
  ):
137
157
  """Create availability topic for HA."""
138
158
  return {
@@ -140,7 +160,7 @@ def ha_sensor_ina_availabilty_message(
140
160
  "device": {
141
161
  "identifiers": [topic],
142
162
  "manufacturer": "boneIO",
143
- "model": "boneIO Relay Board",
163
+ "model": model,
144
164
  "name": f"boneIO {topic}",
145
165
  "sw_version": __version__,
146
166
  },
@@ -154,7 +174,7 @@ def ha_sensor_ina_availabilty_message(
154
174
 
155
175
 
156
176
  def ha_sensor_temp_availabilty_message(
157
- id: str, name: str, topic: str = "boneIO", **kwargs
177
+ id: str, name: str, topic: str = "boneIO", model: str = "boneIO Relay Board", **kwargs
158
178
  ):
159
179
  """Create availability topic for HA."""
160
180
  return {
@@ -162,7 +182,7 @@ def ha_sensor_temp_availabilty_message(
162
182
  "device": {
163
183
  "identifiers": [topic],
164
184
  "manufacturer": "boneIO",
165
- "model": "boneIO Relay Board",
185
+ "model": model,
166
186
  "name": f"boneIO {topic}",
167
187
  "sw_version": __version__,
168
188
  },
@@ -204,12 +224,12 @@ def modbus_sensor_availabilty_message(
204
224
 
205
225
 
206
226
  def ha_cover_availabilty_message(
207
- id: str, name: str, device_class: str, topic: str = "boneIO"
227
+ id: str, name: str, device_class: str, topic: str = "boneIO", model: str = "boneIO Relay Board", **kwargs
208
228
  ):
209
229
  """Create Cover availability topic for HA."""
210
- kwargs = {"device_class": device_class} if device_class else {}
230
+ kwargs = {"device_class": device_class, **kwargs} if device_class else { **kwargs }
211
231
  msg = ha_availabilty_message(
212
- device_type=COVER, topic=topic, id=id, name=name, **kwargs
232
+ device_type=COVER, topic=topic, id=id, name=name, model=model, **kwargs
213
233
  )
214
234
 
215
235
  return {
@@ -0,0 +1,17 @@
1
+ from boneio.const import ON
2
+
3
+
4
+ class SoftwareInterlockManager:
5
+ def __init__(self):
6
+ self.groups = {} # group_name: set(relay_instances)
7
+
8
+ def register(self, relay, group_names):
9
+ for group in group_names:
10
+ self.groups.setdefault(group, set()).add(relay)
11
+
12
+ def can_turn_on(self, relay, group_names):
13
+ for group in group_names:
14
+ for other_relay in self.groups.get(group, []):
15
+ if other_relay is not relay and getattr(other_relay, "state", None) == ON:
16
+ return False
17
+ return True
@@ -372,18 +372,24 @@ def configure_relay(
372
372
  # event=event,
373
373
  # restore_state=False if output_type == NONE else restore_state,
374
374
  # )
375
+ interlock_groups = config.get("interlock_group", [])
376
+ if isinstance(interlock_groups, str):
377
+ interlock_groups = [interlock_groups]
375
378
 
376
379
  relay = getattr(output, "OutputClass")(
377
380
  send_message=manager.send_message,
378
381
  topic_prefix=topic_prefix,
379
382
  id=relay_id,
380
383
  restored_state=restored_state,
384
+ interlock_manager=manager._interlock_manager,
385
+ interlock_groups=interlock_groups,
381
386
  name=name,
382
387
  **config,
383
388
  **kwargs,
384
389
  **extra_args,
385
390
  # callback=relay_callback_wrapper,
386
391
  )
392
+ manager._interlock_manager.register(relay, interlock_groups)
387
393
  manager.grouped_outputs[expander_id][relay_id] = relay
388
394
  return relay
389
395
 
@@ -315,6 +315,7 @@ class HostData:
315
315
  }
316
316
  self._loop = asyncio.get_running_loop()
317
317
 
318
+ @property
318
319
  def web_url(self) -> str | None:
319
320
  if not self._manager.is_web_on:
320
321
  return None
@@ -330,7 +331,7 @@ class HostData:
330
331
  if type in self._inputs:
331
332
  return self._get_input(type)
332
333
  if type == "web":
333
- return self.web_url()
334
+ return self.web_url
334
335
  return self._data[type].state
335
336
 
336
337
  def _get_output(self, type: str) -> dict:
@@ -21,6 +21,7 @@ from boneio.const import (
21
21
  ID,
22
22
  INA219,
23
23
  INPUT,
24
+ IP,
24
25
  LED,
25
26
  LIGHT,
26
27
  LM75,
@@ -42,13 +43,16 @@ from boneio.const import (
42
43
  SET_BRIGHTNESS,
43
44
  STATE,
44
45
  STOP,
46
+ SWITCH,
45
47
  TOPIC,
46
48
  UART,
47
49
  UARTS,
50
+ VALVE,
48
51
  ClickTypes,
49
52
  cover_actions,
50
53
  relay_actions,
51
54
  )
55
+ from boneio.cover import Cover
52
56
  from boneio.helper import (
53
57
  GPIOInputException,
54
58
  HostData,
@@ -63,6 +67,8 @@ from boneio.helper.config import ConfigHelper
63
67
  from boneio.helper.events import EventBus
64
68
  from boneio.helper.exceptions import ModbusUartException
65
69
  from boneio.helper.gpio import GpioBaseClass
70
+ from boneio.helper.ha_discovery import ha_valve_availabilty_message
71
+ from boneio.helper.interlock import SoftwareInterlockManager
66
72
  from boneio.helper.loader import (
67
73
  configure_binary_sensor,
68
74
  configure_cover,
@@ -86,6 +92,9 @@ _LOGGER = logging.getLogger(__name__)
86
92
  AVAILABILITY_FUNCTION_CHOOSER = {
87
93
  LIGHT: ha_light_availabilty_message,
88
94
  LED: ha_led_availabilty_message,
95
+ SWITCH: ha_switch_availabilty_message,
96
+ VALVE: ha_valve_availabilty_message,
97
+
89
98
  }
90
99
 
91
100
 
@@ -114,19 +123,23 @@ class Manager:
114
123
  oled: dict = {},
115
124
  adc: Optional[List] = None,
116
125
  cover: list = [],
126
+ web_active: bool = False,
127
+ web_port: int = 8090,
128
+ network_state: Optional[dict] = None,
117
129
  ) -> None:
118
130
  """Initialize the manager."""
119
131
  _LOGGER.info("Initializing manager module.")
120
132
 
121
133
  self._loop = asyncio.get_event_loop()
122
134
 
123
- self._config_helper = config_helper
135
+ self._config_helper: ConfigHelper = config_helper
124
136
  self._host_data = None
125
137
  self._config_file_path = config_file_path
126
138
  self._state_manager = state_manager
127
139
  self._event_bus = event_bus
128
- self._is_web_on = False
129
- self._web_bind_port = None
140
+ self._is_web_on = web_active
141
+ self._web_bind_port = web_port
142
+ self._network_info = network_state
130
143
 
131
144
  self.send_message = send_message
132
145
  self._mqtt_state = mqtt_state
@@ -139,9 +152,11 @@ class Manager:
139
152
  self._pca = {}
140
153
  self._outputs = {}
141
154
  self._configured_output_groups = {}
155
+ self._interlock_manager = SoftwareInterlockManager()
156
+
142
157
  self._oled = None
143
158
  self._tasks: List[asyncio.Task] = []
144
- self._covers = {}
159
+ self._covers: dict[str, Cover] = {}
145
160
  self._temp_sensors: List[TempSensor] = []
146
161
  self._ina219_sensors = []
147
162
  self._modbus_sensors = {}
@@ -770,14 +785,17 @@ class Manager:
770
785
  self._loop.call_later, 0.2, self.send_message, topic, ""
771
786
  )
772
787
 
773
- async def toggle_output(self, output_id: str) -> bool:
788
+ async def toggle_output(self, output_id: str) -> str:
774
789
  """Toggle output state."""
775
790
  output = self._outputs.get(output_id)
776
791
  if output:
777
792
  if output.output_type == NONE or output.output_type == COVER:
778
- return False
793
+ return "not_allowed"
794
+ if not output.check_interlock():
795
+ return "interlock"
779
796
  await output.async_toggle()
780
- return True
797
+ return "success"
798
+ return "not_found"
781
799
 
782
800
 
783
801
  async def receive_message(self, topic: str, message: str) -> None:
@@ -937,8 +955,15 @@ class Manager:
937
955
  if not self._config_helper.ha_discovery:
938
956
  return
939
957
  topic_prefix = topic_prefix or self._config_helper.topic_prefix
958
+ if self._host_data:
959
+ web_url = self._host_data.web_url
960
+ else:
961
+ if self._network_info and IP in self._network_info:
962
+ web_url = f"http://{self._network_info[IP]}:{self._web_bind_port}"
963
+ else:
964
+ web_url = None
940
965
  payload = availability_msg_func(
941
- topic=topic_prefix, id=id, name=name, **kwargs
966
+ topic=topic_prefix, id=id, name=name, model=self._config_helper.device_type.title(), web_url=web_url, **kwargs
942
967
  )
943
968
  topic = f"{self._config_helper.ha_discovery_prefix}/{ha_type}/{topic_prefix}/{id}/config"
944
969
  _LOGGER.debug("Sending HA discovery for %s entity, %s.", ha_type, name)
@@ -8,6 +8,7 @@ import time
8
8
  from boneio.const import COVER, LIGHT, NONE, OFF, ON, RELAY, STATE, SWITCH
9
9
  from boneio.helper import BasicMqtt
10
10
  from boneio.helper.events import EventBus, async_track_point_in_time, utcnow
11
+ from boneio.helper.interlock import SoftwareInterlockManager
11
12
  from boneio.helper.util import callback
12
13
  from boneio.models import OutputState
13
14
 
@@ -26,6 +27,8 @@ class BasicRelay(BasicMqtt):
26
27
  output_type=SWITCH,
27
28
  restored_state: bool = False,
28
29
  topic_type: str = RELAY,
30
+ interlock_manager: SoftwareInterlockManager | None = None,
31
+ interlock_groups: list[str] = [],
29
32
  **kwargs,
30
33
  ) -> None:
31
34
  """Initialize Basic relay."""
@@ -34,6 +37,8 @@ class BasicRelay(BasicMqtt):
34
37
  super().__init__(id=id, name=name or id, topic_type=topic_type, **kwargs)
35
38
  self._output_type = output_type
36
39
  self._event_bus = event_bus
40
+ self._interlock_manager = interlock_manager
41
+ self._interlock_groups = interlock_groups
37
42
  if output_type == COVER:
38
43
  self._momentary_turn_on = None
39
44
  self._momentary_turn_off = None
@@ -43,6 +48,11 @@ class BasicRelay(BasicMqtt):
43
48
  self._last_timestamp = 0.0
44
49
  self._loop = asyncio.get_running_loop()
45
50
 
51
+ def set_interlock(self, interlock_manager: SoftwareInterlockManager, interlock_groups: list[str]):
52
+ self._interlock_manager = interlock_manager
53
+ self._interlock_groups = interlock_groups
54
+
55
+
46
56
  @property
47
57
  def is_mcp_type(self) -> bool:
48
58
  """Check if relay is mcp type."""
@@ -107,8 +117,20 @@ class BasicRelay(BasicMqtt):
107
117
  await self._event_bus.async_trigger_output_event(output_id=self.id, event=event)
108
118
  await self._event_bus.async_trigger_event(event_type="output", entity_id=self.id, event=event)
109
119
 
120
+ def check_interlock(self) -> bool:
121
+ if getattr(self, "_interlock_manager", None) and getattr(self, "_interlock_groups", None):
122
+ return self._interlock_manager.can_turn_on(self, self._interlock_groups)
123
+ return True
124
+
110
125
  async def async_turn_on(self) -> None:
111
- self.turn_on()
126
+ """Turn on the relay asynchronously."""
127
+ can_turn_on = self.check_interlock()
128
+ if can_turn_on:
129
+ self.turn_on()
130
+ else:
131
+ _LOGGER.warning(f"Interlock active: cannot turn on {self.id}.")
132
+ #Workaround for HA is sendind state ON/OFF without physically changing the relay.
133
+ asyncio.create_task(self.async_send_state(optimized_value=ON))
112
134
  asyncio.create_task(self.async_send_state())
113
135
 
114
136
  async def async_turn_off(self) -> None:
@@ -27,15 +27,28 @@ class MCPRelay(BasicRelay):
27
27
  if output_type == COVER:
28
28
  """Just in case to not restore state of covers etc."""
29
29
  restored_state = False
30
- self._pin.switch_to_output(value=restored_state)
31
30
  super().__init__(
32
31
  **kwargs, output_type=output_type, restored_state=restored_state
33
32
  )
33
+ self.init_with_check_if_can_restore_state(restored_state=restored_state)
34
34
  self._pin_id = pin
35
35
  self._expander_id = mcp_id
36
36
 
37
37
  _LOGGER.debug("Setup MCP with pin %s", self._pin_id)
38
38
 
39
+ def init_with_check_if_can_restore_state(self, restored_state: bool) -> None:
40
+ if restored_state:
41
+ interlock_manager = getattr(self, "_interlock_manager", None)
42
+ interlock_groups = getattr(self, "_interlock_groups", None)
43
+ if self._interlock_manager and self._interlock_groups:
44
+ if not interlock_manager.can_turn_on(self, interlock_groups):
45
+ _LOGGER.warning(
46
+ f"Interlock active: cannot restore ON state for {self._pin_id} at startup"
47
+ )
48
+ restored_state = False
49
+ self._pin.switch_to_output(value=restored_state)
50
+
51
+
39
52
  @property
40
53
  def expander_type(self) -> str:
41
54
  """Check expander type."""
@@ -43,6 +43,7 @@ from boneio.helper import StateManager
43
43
  from boneio.helper.config import ConfigHelper
44
44
  from boneio.helper.events import EventBus, GracefulExit
45
45
  from boneio.helper.exceptions import RestartRequestException
46
+ from boneio.helper.stats import get_network_info
46
47
  from boneio.manager import Manager
47
48
  from boneio.mqtt_client import MQTTClient
48
49
  from boneio.webui.web_server import WebServer
@@ -96,6 +97,7 @@ async def async_run(
96
97
  main_config = config.get(BONEIO, {})
97
98
  _config_helper = ConfigHelper(
98
99
  name=main_config.get(NAME, BONEIO),
100
+ device_type=main_config.get("device_type", "boneIO Black"),
99
101
  topic_prefix=config.get(MQTT, {}).get(TOPIC_PREFIX, None),
100
102
  ha_discovery=config.get(MQTT, {}).get(HA_DISCOVERY, {}).get(ENABLED, False),
101
103
  ha_discovery_prefix=config.get(MQTT, {}).get(HA_DISCOVERY, {}).get(TOPIC_PREFIX, "homeassistant"),
@@ -120,6 +122,15 @@ async def async_run(
120
122
  for item in config_modules
121
123
  }
122
124
 
125
+ if "web" in config:
126
+ web_active = True
127
+ web_config = config.get("web") or {}
128
+ network_state = get_network_info()
129
+ else:
130
+ web_active = False
131
+ network_state = None
132
+ web_config = {}
133
+
123
134
  manager = Manager(
124
135
  send_message=message_bus.send_message,
125
136
  event_bus=event_bus,
@@ -139,6 +150,9 @@ async def async_run(
139
150
  MODBUS: config.get("modbus_sensors"),
140
151
  ONEWIRE: config.get(SENSOR, []),
141
152
  },
153
+ web_active=web_active,
154
+ web_port=web_config.get("port", 8090),
155
+ network_state=network_state,
142
156
  **manager_kwargs,
143
157
  )
144
158
  # Convert coroutines to Tasks
@@ -153,8 +167,7 @@ async def async_run(
153
167
  message_bus_task.add_done_callback(tasks.discard)
154
168
 
155
169
  # Start web server if configured
156
- if "web" in config:
157
- web_config = config.get("web") or {}
170
+ if web_active:
158
171
  _LOGGER.info("Starting Web server.")
159
172
  web_server = WebServer(
160
173
  config_file=config_file,
@@ -495,6 +495,16 @@ output:
495
495
  type: boolean
496
496
  required: True
497
497
  default: True
498
+ interlock_group:
499
+ type:
500
+ - string
501
+ - list
502
+ required: False
503
+ meta:
504
+ label: Interlock group name or list
505
+ description: |
506
+ Assigns this output to a software interlock group (or groups). Outputs with the same group name cannot be active at the same time.
507
+ You can provide a single group name (string) or a list of names (if the output should belong to multiple groups).
498
508
  meta:
499
509
  label: Restore saved state of boneio. Not used for "none" and output_type!
500
510
  percentage_default_brightness:
@@ -505,7 +515,7 @@ output:
505
515
  output_type:
506
516
  type: string
507
517
  required: True
508
- allowed: ['switch', 'light', 'cover', 'none']
518
+ allowed: ['switch', 'light', 'cover', 'valve', 'none']
509
519
  coerce: lower
510
520
  meta:
511
521
  label: If HA discovery is used device if relay is light or switch. Cover if this output will be used for cover. If None is declared then any state is not published to MQTT (used for cover).
@@ -0,0 +1,2 @@
1
+ # flake8: noqa
2
+ __version__ = "0.11.0dev1"
@@ -472,7 +472,7 @@ async def toggle_output(output_id: str, manager: Manager = Depends(get_manager))
472
472
  raise HTTPException(status_code=404, detail="Output not found")
473
473
  status = await manager.toggle_output(output_id=output_id)
474
474
  if status:
475
- return {"status": "success"}
475
+ return {"status": status}
476
476
  else:
477
477
  return {"status": "error"}
478
478
 
@@ -492,7 +492,7 @@ async def cover_action(cover_id: str, action_data: CoverAction, manager: Manager
492
492
  elif action == "close":
493
493
  await cover.close()
494
494
  elif action == "stop":
495
- await cover.async_stop()
495
+ await cover.stop()
496
496
 
497
497
  return {"status": "success"}
498
498
 
@@ -1,4 +1,4 @@
1
- import{m as et}from"./index-DF-wGFj8.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-B-45AWN4.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as f}from"./index-DF-wGFj8.js";/*!-----------------------------------------------------------------------------
1
+ import{m as f}from"./index-B-45AWN4.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as l}from"./index-DF-wGFj8.js";/*!-----------------------------------------------------------------------------
1
+ import{m as l}from"./index-B-45AWN4.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as s}from"./index-DF-wGFj8.js";/*!-----------------------------------------------------------------------------
1
+ import{m as s}from"./index-B-45AWN4.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as lt}from"./index-DF-wGFj8.js";/*!-----------------------------------------------------------------------------
1
+ import{m as lt}from"./index-B-45AWN4.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license