├── .github └── FUNDING.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── docs ├── .buildinfo ├── .nojekyll ├── _images │ ├── library-search.png │ └── manage-libraries.png ├── _static │ ├── basic.css │ ├── custom.css │ ├── custom.js │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── sphinx_press_theme.css │ ├── theme.css │ ├── theme.js │ ├── underscore-1.13.1.js │ └── underscore.js ├── documents │ ├── api │ │ ├── core │ │ │ ├── ha-device.html │ │ │ ├── ha-mqtt.html │ │ │ └── index.html │ │ ├── device-types │ │ │ ├── ha-base-device-type.html │ │ │ ├── ha-binary-sensor.html │ │ │ ├── ha-button.html │ │ │ ├── ha-camera.html │ │ │ ├── ha-cover.html │ │ │ ├── ha-device-tracker.html │ │ │ ├── ha-device-trigger.html │ │ │ ├── ha-fan.html │ │ │ ├── ha-hvac.html │ │ │ ├── ha-light.html │ │ │ ├── ha-lock.html │ │ │ ├── ha-number.html │ │ │ ├── ha-scene.html │ │ │ ├── ha-select.html │ │ │ ├── ha-sensor-number.html │ │ │ ├── ha-sensor.html │ │ │ ├── ha-switch.html │ │ │ ├── ha-tag-scanner.html │ │ │ └── index.html │ │ ├── index.html │ │ └── utils │ │ │ ├── ha-numeric.html │ │ │ ├── ha-serializer-array.html │ │ │ ├── ha-serializer.html │ │ │ ├── ha-utils.html │ │ │ └── index.html │ ├── getting-started │ │ ├── compatible-hardware.html │ │ ├── examples.html │ │ ├── index.html │ │ ├── installation.html │ │ └── prerequisites.html │ └── library │ │ ├── availability-reporting.html │ │ ├── compiler-macros.html │ │ ├── connection-params.html │ │ ├── device-configuration.html │ │ ├── device-types.html │ │ ├── discovery.html │ │ ├── index.html │ │ ├── introduction.html │ │ ├── mqtt-advanced.html │ │ └── mqtt-security.html ├── genindex.html ├── index.html ├── objects.inv ├── search.html └── searchindex.js ├── docsrc ├── Makefile ├── Pipfile ├── Pipfile.lock ├── README.md ├── make.bat └── source │ ├── Doxyfile │ ├── conf.py │ ├── documents │ ├── api │ │ ├── core │ │ │ ├── ha-device.rst │ │ │ ├── ha-mqtt.rst │ │ │ └── index.rst │ │ ├── device-types │ │ │ ├── ha-base-device-type.rst │ │ │ ├── ha-binary-sensor.rst │ │ │ ├── ha-button.rst │ │ │ ├── ha-camera.rst │ │ │ ├── ha-cover.rst │ │ │ ├── ha-device-tracker.rst │ │ │ ├── ha-device-trigger.rst │ │ │ ├── ha-fan.rst │ │ │ ├── ha-hvac.rst │ │ │ ├── ha-light.rst │ │ │ ├── ha-lock.rst │ │ │ ├── ha-number.rst │ │ │ ├── ha-scene.rst │ │ │ ├── ha-select.rst │ │ │ ├── ha-sensor-number.rst │ │ │ ├── ha-sensor.rst │ │ │ ├── ha-switch.rst │ │ │ ├── ha-tag-scanner.rst │ │ │ └── index.rst │ │ ├── index.rst │ │ └── utils │ │ │ ├── ha-numeric.rst │ │ │ ├── ha-serializer-array.rst │ │ │ ├── ha-serializer.rst │ │ │ ├── ha-utils.rst │ │ │ └── index.rst │ ├── getting-started │ │ ├── compatible-hardware.rst │ │ ├── examples.rst │ │ ├── images │ │ │ ├── library-search.png │ │ │ └── manage-libraries.png │ │ ├── index.rst │ │ ├── installation.rst │ │ └── prerequisites.rst │ └── library │ │ ├── availability-reporting.rst │ │ ├── compiler-macros.rst │ │ ├── connection-params.rst │ │ ├── device-configuration.rst │ │ ├── device-types.rst │ │ ├── discovery.rst │ │ ├── index.rst │ │ ├── introduction.rst │ │ ├── mqtt-advanced.rst │ │ └── mqtt-security.rst │ ├── index.rst │ ├── static │ ├── custom.css │ └── custom.js │ └── themes │ └── press-ext │ ├── layout.html │ ├── sidetoc.html │ └── theme.conf ├── examples ├── advanced-availability │ └── advanced-availability.ino ├── availability │ └── availability.ino ├── binary-sensor │ └── binary-sensor.ino ├── button │ └── button.ino ├── cover │ └── cover.ino ├── esp32-cam │ ├── app_httpd.cpp │ ├── camera_index.h │ ├── camera_pins.h │ ├── esp32-cam.ino │ └── partitions.csv ├── fan │ └── fan.ino ├── hvac │ └── hvac.ino ├── led-switch │ └── led-switch.ino ├── light │ └── light.ino ├── lock │ └── lock.ino ├── mdns │ └── mdns.ino ├── mqtt-advanced │ └── mqtt-advanced.ino ├── mqtt-with-credentials │ └── mqtt-with-credentials.ino ├── multi-state-button │ └── multi-state-button.ino ├── multi-switch │ └── multi-switch.ino ├── nano33iot │ └── nano33iot.ino ├── nodemcu │ └── nodemcu.ino ├── number │ └── number.ino ├── scene │ └── scene.ino ├── select │ └── select.ino ├── sensor-analog │ └── sensor-analog.ino ├── sensor-integer │ └── sensor-integer.ino ├── sensor │ └── sensor.ino └── tag-scanner │ └── tag-scanner.ino ├── library.properties ├── src ├── ArduinoHA.h ├── ArduinoHADefines.h ├── HADevice.cpp ├── HADevice.h ├── HAMqtt.cpp ├── HAMqtt.h ├── device-types │ ├── HABaseDeviceType.cpp │ ├── HABaseDeviceType.h │ ├── HABinarySensor.cpp │ ├── HABinarySensor.h │ ├── HAButton.cpp │ ├── HAButton.h │ ├── HACamera.cpp │ ├── HACamera.h │ ├── HACover.cpp │ ├── HACover.h │ ├── HADeviceTracker.cpp │ ├── HADeviceTracker.h │ ├── HADeviceTrigger.cpp │ ├── HADeviceTrigger.h │ ├── HAFan.cpp │ ├── HAFan.h │ ├── HAHVAC.cpp │ ├── HAHVAC.h │ ├── HALight.cpp │ ├── HALight.h │ ├── HALock.cpp │ ├── HALock.h │ ├── HANumber.cpp │ ├── HANumber.h │ ├── HAScene.cpp │ ├── HAScene.h │ ├── HASelect.cpp │ ├── HASelect.h │ ├── HASensor.cpp │ ├── HASensor.h │ ├── HASensorNumber.cpp │ ├── HASensorNumber.h │ ├── HASwitch.cpp │ ├── HASwitch.h │ ├── HATagScanner.cpp │ └── HATagScanner.h ├── mocks │ ├── AUnitHelpers.h │ ├── PubSubClientMock.cpp │ └── PubSubClientMock.h └── utils │ ├── HADictionary.cpp │ ├── HADictionary.h │ ├── HANumeric.cpp │ ├── HANumeric.h │ ├── HASerializer.cpp │ ├── HASerializer.h │ ├── HASerializerArray.cpp │ ├── HASerializerArray.h │ ├── HAUtils.cpp │ └── HAUtils.h └── tests ├── BaseDeviceTypeTest ├── BaseDeviceTypeTest.ino └── Makefile ├── BinarySensorTest ├── BinarySensorTest.ino └── Makefile ├── ButtonTest ├── ButtonTest.ino └── Makefile ├── CameraTest ├── CameraTest.ino └── Makefile ├── CoverTest ├── CoverTest.ino └── Makefile ├── DeviceTest ├── DeviceTest.ino └── Makefile ├── DeviceTrackerTest ├── DeviceTrackerTest.ino └── Makefile ├── DeviceTriggerTest ├── DeviceTriggerTest.ino └── Makefile ├── FanTest ├── FanTest.ino └── Makefile ├── HVACTest ├── HVACTest.ino └── Makefile ├── LightTest ├── LightTest.ino └── Makefile ├── LockTest ├── LockTest.ino └── Makefile ├── Makefile ├── MqttTest ├── Makefile └── MqttTest.ino ├── NumberTest ├── Makefile └── NumberTest.ino ├── NumericTest ├── Makefile └── NumericTest.ino ├── README.md ├── SceneTest ├── Makefile └── SceneTest.ino ├── SelectTest ├── Makefile └── SelectTest.ino ├── SensorTest ├── Makefile └── SensorTest.ino ├── SerializerArrayTest ├── Makefile └── SerializerArrayTest.ino ├── SerializerTest ├── Makefile └── SerializerTest.ino ├── SerializerTopicsTest ├── Makefile └── SerializerTopicsTest.ino ├── SwitchTest ├── Makefile └── SwitchTest.ino ├── TagScannerTest ├── Makefile └── TagScannerTest.ino ├── UtilsTest ├── Makefile └── UtilsTest.ino └── auniter.ini /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: dawidchyrzynski -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docsrc/xml 2 | docsrc/build 3 | .DS_Store -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 2ec2743465492061aecb7af749506d9c 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidchyrzynski/arduino-home-assistant/1d333ab229b2dcefedf1b51e033f2177b74fca8c/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_images/library-search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidchyrzynski/arduino-home-assistant/1d333ab229b2dcefedf1b51e033f2177b74fca8c/docs/_images/library-search.png -------------------------------------------------------------------------------- /docs/_images/manage-libraries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidchyrzynski/arduino-home-assistant/1d333ab229b2dcefedf1b51e033f2177b74fca8c/docs/_images/manage-libraries.png -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | header.navbar { 2 | background: #3eaf7c 3 | } 4 | header.navbar a { 5 | color: #fff 6 | } 7 | header.navbar .nav-item a:hover { 8 | color: #eee 9 | } 10 | header.navbar .site-name { 11 | color: #fff 12 | } 13 | header.navbar .icon { 14 | color: #fff; 15 | position: relative; 16 | top: 2px 17 | } 18 | .body-header ul.page-nav { 19 | margin-right: 1.2em; 20 | padding-right: 0 21 | } 22 | .body-header + hr { 23 | margin-top: 0 !important; 24 | } 25 | table.examples-table tbody td + td { 26 | text-align: left; 27 | } 28 | .sidebar-links li.toctree-l1 > a { 29 | font-weight: 600 30 | } 31 | .sidebar-links > .caption { 32 | display: none 33 | } 34 | .content + div.page-nav { 35 | max-width: 840px; 36 | } 37 | .content + div.page-nav ul.page-nav { 38 | max-width: 100%; 39 | padding: 0 0 0.5em 40 | } 41 | .searchbox .caption-text { 42 | display: none 43 | } 44 | .code-block-caption { 45 | margin-top: 30px; 46 | font-weight: bold; 47 | } 48 | form { 49 | display: flex; 50 | flex-direction: row; 51 | margin-top: 0.5em 52 | } 53 | form.search { 54 | padding-right: 0.5em 55 | } 56 | input[type="text"] { 57 | border: 1px solid #ddd; 58 | border-radius: 2px; 59 | flex: 1; 60 | padding: 8px 15px; 61 | font-size: 15px; 62 | outline: none; 63 | } 64 | input[type="submit"] { 65 | background: #3eaf7c; 66 | border: 1px solid #3eaf7c; 67 | color: #fff; 68 | font-weight: 500; 69 | font-size: 15px; 70 | padding: 8px; 71 | cursor: pointer; 72 | text-transform: capitalize; 73 | transition: background-color .3s 74 | } 75 | input[type="submit"]:hover { 76 | background: #58C996 77 | } 78 | .content p + ul { 79 | margin-top: -10px 80 | } 81 | .content pre { 82 | font-size: 14px 83 | } 84 | .cpp.var, 85 | .cpp.function { 86 | border: 1px solid #eee; 87 | background: #fcfcfc; 88 | margin-bottom: 0.5em; 89 | padding: 15px 90 | } 91 | .cpp > dt { 92 | border-bottom: 1px solid #eee; 93 | margin: 0 0 10px; 94 | padding-bottom: 5px; 95 | } 96 | .cpp.function > dt { 97 | border-bottom: 2px solid #eee; 98 | } 99 | .cpp > dt * { 100 | font-size: 16px; 101 | font-weight: 600 102 | } 103 | .cpp.class > dt * { 104 | font-size: 20px 105 | } 106 | .cpp > dt a * { 107 | color: #3eaf7c 108 | } 109 | .cpp > dt .k::after { 110 | content: " " 111 | } 112 | .cpp > dt .kt + .w::before { 113 | content: " " 114 | } 115 | .cpp > dd { 116 | margin-left: 0; 117 | text-align: justify; 118 | font-size: 15px; 119 | } 120 | .cpp .sig-paren { 121 | margin-left: 0; 122 | margin-right: 3px; 123 | } 124 | .cpp .sig-name { 125 | margin-right: 2px 126 | } 127 | .cpp .p::after, 128 | .cpp .n::after { 129 | content: " " 130 | } 131 | .cpp .k, 132 | .cpp .kt { 133 | color: #2664b9 134 | } 135 | .cpp .n { 136 | color: #2c3e50; 137 | margin: 0 138 | } 139 | .cpp.function .field-list { 140 | display: block; 141 | margin-bottom: 0 142 | } 143 | .cpp.function .field-list dt { 144 | padding-left: 0; 145 | text-transform: uppercase; 146 | font-size: 14px; 147 | font-weight: 600; 148 | border-bottom: 1px solid #eee; 149 | color: #999 !important; 150 | } 151 | .cpp.function .field-list dd { 152 | padding-left: 0 153 | } 154 | .cpp.function .field-list dd > p, 155 | .cpp.function .field-list dd > ul { 156 | margin: 8px 0 0; 157 | list-style-type: none; 158 | padding-left: 0 159 | } 160 | .cpp.function .field-list dd p strong { 161 | margin-left: 0 162 | } 163 | .cpp.function .field-list dd + dt { 164 | margin-top: 15px 165 | } 166 | .cpp .admonition { 167 | padding: 8px 15px 168 | } 169 | .cpp .admonition .admonition-title { 170 | margin-bottom: 5px 171 | } 172 | .breathe-sectiondef-title { 173 | color: #222 !important; 174 | font-size: 20px !important; 175 | text-align: center; 176 | text-decoration: underline; 177 | text-transform: uppercase; 178 | } 179 | .cpp p + ul { 180 | margin-top: 5px 181 | } 182 | p.highlight-link { 183 | margin-bottom: 0 184 | } -------------------------------------------------------------------------------- /docs/_static/custom.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', function() { 2 | document.querySelectorAll('a.reference.external').forEach(function(link) { 3 | link.target = '_blank'; 4 | }); 5 | 6 | document.querySelectorAll('.footer a').forEach(function(link) { 7 | link.target = '_blank'; 8 | }); 9 | 10 | document.querySelectorAll('form input[type="text"]').forEach(function(input) { 11 | input.setAttribute("placeholder", "Search docs"); 12 | }); 13 | }); -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '2.1.0', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: false, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false, 12 | SHOW_SEARCH_SUMMARY: true, 13 | ENABLE_SEARCH_SHORTCUTS: true, 14 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidchyrzynski/arduino-home-assistant/1d333ab229b2dcefedf1b51e033f2177b74fca8c/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidchyrzynski/arduino-home-assistant/1d333ab229b2dcefedf1b51e033f2177b74fca8c/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidchyrzynski/arduino-home-assistant/1d333ab229b2dcefedf1b51e033f2177b74fca8c/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #4f424c } 7 | .highlight { background: #2f1e2e; color: #e7e9db } 8 | .highlight .c { color: #776e71 } /* Comment */ 9 | .highlight .err { color: #ef6155 } /* Error */ 10 | .highlight .k { color: #815ba4 } /* Keyword */ 11 | .highlight .l { color: #f99b15 } /* Literal */ 12 | .highlight .n { color: #e7e9db } /* Name */ 13 | .highlight .o { color: #5bc4bf } /* Operator */ 14 | .highlight .p { color: #e7e9db } /* Punctuation */ 15 | .highlight .ch { color: #776e71 } /* Comment.Hashbang */ 16 | .highlight .cm { color: #776e71 } /* Comment.Multiline */ 17 | .highlight .cp { color: #776e71 } /* Comment.Preproc */ 18 | .highlight .cpf { color: #776e71 } /* Comment.PreprocFile */ 19 | .highlight .c1 { color: #776e71 } /* Comment.Single */ 20 | .highlight .cs { color: #776e71 } /* Comment.Special */ 21 | .highlight .gd { color: #ef6155 } /* Generic.Deleted */ 22 | .highlight .ge { font-style: italic } /* Generic.Emph */ 23 | .highlight .gh { color: #e7e9db; font-weight: bold } /* Generic.Heading */ 24 | .highlight .gi { color: #48b685 } /* Generic.Inserted */ 25 | .highlight .gp { color: #776e71; font-weight: bold } /* Generic.Prompt */ 26 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 27 | .highlight .gu { color: #5bc4bf; font-weight: bold } /* Generic.Subheading */ 28 | .highlight .kc { color: #815ba4 } /* Keyword.Constant */ 29 | .highlight .kd { color: #815ba4 } /* Keyword.Declaration */ 30 | .highlight .kn { color: #5bc4bf } /* Keyword.Namespace */ 31 | .highlight .kp { color: #815ba4 } /* Keyword.Pseudo */ 32 | .highlight .kr { color: #815ba4 } /* Keyword.Reserved */ 33 | .highlight .kt { color: #fec418 } /* Keyword.Type */ 34 | .highlight .ld { color: #48b685 } /* Literal.Date */ 35 | .highlight .m { color: #f99b15 } /* Literal.Number */ 36 | .highlight .s { color: #48b685 } /* Literal.String */ 37 | .highlight .na { color: #06b6ef } /* Name.Attribute */ 38 | .highlight .nb { color: #e7e9db } /* Name.Builtin */ 39 | .highlight .nc { color: #fec418 } /* Name.Class */ 40 | .highlight .no { color: #ef6155 } /* Name.Constant */ 41 | .highlight .nd { color: #5bc4bf } /* Name.Decorator */ 42 | .highlight .ni { color: #e7e9db } /* Name.Entity */ 43 | .highlight .ne { color: #ef6155 } /* Name.Exception */ 44 | .highlight .nf { color: #06b6ef } /* Name.Function */ 45 | .highlight .nl { color: #e7e9db } /* Name.Label */ 46 | .highlight .nn { color: #fec418 } /* Name.Namespace */ 47 | .highlight .nx { color: #06b6ef } /* Name.Other */ 48 | .highlight .py { color: #e7e9db } /* Name.Property */ 49 | .highlight .nt { color: #5bc4bf } /* Name.Tag */ 50 | .highlight .nv { color: #ef6155 } /* Name.Variable */ 51 | .highlight .ow { color: #5bc4bf } /* Operator.Word */ 52 | .highlight .w { color: #e7e9db } /* Text.Whitespace */ 53 | .highlight .mb { color: #f99b15 } /* Literal.Number.Bin */ 54 | .highlight .mf { color: #f99b15 } /* Literal.Number.Float */ 55 | .highlight .mh { color: #f99b15 } /* Literal.Number.Hex */ 56 | .highlight .mi { color: #f99b15 } /* Literal.Number.Integer */ 57 | .highlight .mo { color: #f99b15 } /* Literal.Number.Oct */ 58 | .highlight .sa { color: #48b685 } /* Literal.String.Affix */ 59 | .highlight .sb { color: #48b685 } /* Literal.String.Backtick */ 60 | .highlight .sc { color: #e7e9db } /* Literal.String.Char */ 61 | .highlight .dl { color: #48b685 } /* Literal.String.Delimiter */ 62 | .highlight .sd { color: #776e71 } /* Literal.String.Doc */ 63 | .highlight .s2 { color: #48b685 } /* Literal.String.Double */ 64 | .highlight .se { color: #f99b15 } /* Literal.String.Escape */ 65 | .highlight .sh { color: #48b685 } /* Literal.String.Heredoc */ 66 | .highlight .si { color: #f99b15 } /* Literal.String.Interpol */ 67 | .highlight .sx { color: #48b685 } /* Literal.String.Other */ 68 | .highlight .sr { color: #48b685 } /* Literal.String.Regex */ 69 | .highlight .s1 { color: #48b685 } /* Literal.String.Single */ 70 | .highlight .ss { color: #48b685 } /* Literal.String.Symbol */ 71 | .highlight .bp { color: #e7e9db } /* Name.Builtin.Pseudo */ 72 | .highlight .fm { color: #06b6ef } /* Name.Function.Magic */ 73 | .highlight .vc { color: #ef6155 } /* Name.Variable.Class */ 74 | .highlight .vg { color: #ef6155 } /* Name.Variable.Global */ 75 | .highlight .vi { color: #ef6155 } /* Name.Variable.Instance */ 76 | .highlight .vm { color: #ef6155 } /* Name.Variable.Magic */ 77 | .highlight .il { color: #f99b15 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/sphinx_press_theme.css: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Defines default styles specific to Sphinx Press, 4 | * on top of VuePress styles 5 | * 6 | */ 7 | 8 | /* FONTS FOR THE CODE - will fall back to monospace if unavailable */ 9 | 10 | @import url('https://fontlibrary.org/face/roboto-mono'); 11 | @import url('https://fontlibrary.org/face/inconsolata'); 12 | 13 | /* MAKES MAIN TEXT SECTION LARGER */ 14 | .content:not(.custom) { 15 | max-width: 840px; 16 | } 17 | 18 | /* THE SECTION BELOW DEFINES THE APPEARANCE OF AUTODOC-GENERATED DOCS */ 19 | 20 | .sig-name.descname { 21 | font-size: 1.2em; 22 | font-weight: bold; 23 | padding: 0 0 3px; /* creates a perfect grey rectangle*/ 24 | } 25 | 26 | .sig-param { 27 | font-family: 'RobotoMonoRegular', 'Roboto Mono', 'Inconsolata', monospace; 28 | margin-left: 0.3em; 29 | } 30 | 31 | .sig-paren { 32 | margin-left: 0.3em; 33 | } 34 | 35 | dt { 36 | line-height: 1.5em; 37 | margin-bottom: 1em; 38 | } 39 | 40 | dt.field-odd, dt.field-even, p.rubric { 41 | font-size: 1.2em; 42 | font-weight: bold; 43 | color: #4d6a86 44 | } 45 | 46 | dd { 47 | margin-inline-start: 10px; 48 | } 49 | 50 | dd.field-odd p strong { 51 | margin-left: 1em; 52 | } 53 | 54 | dl.method, dl.function { 55 | margin-top: 2em; 56 | margin-bottom: 3em; 57 | } 58 | 59 | .viewcode-link { 60 | margin-left: 1em; 61 | color: #9ad8bc; 62 | } 63 | 64 | /* THE SECTION BELOW DEFINES THE APPEARANCE OF TABLE-OF-CONTENTS */ 65 | 66 | /* color fixes for table of contents */ 67 | .toc-backref { 68 | /* TOCS cause all your section titles to go green. Pouah! */ 69 | color: inherit; 70 | } 71 | 72 | .contents.topic p.topic-title { 73 | /* Hide all TOC titles */ 74 | display: none; 75 | } 76 | 77 | .contents.topic { 78 | margin-bottom: 3em; 79 | } 80 | 81 | 82 | /* THE SECTION BELOW CHANGES CODE FONTS FOR BETTER 80-CHARS READABILITY */ 83 | /* Code will be displayed as Roboto, or Inconsolata if screen is small */ 84 | code, pre { 85 | font-family: 'RobotoMonoRegular', 'Roboto Mono', 'Inconsolata', monospace; 86 | } 87 | 88 | @media (max-width: 1200px) { 89 | code, pre { 90 | font-family: 'InconsolataRegular', 'Inconsolata', 'RobotoMonoRegular', 'Roboto Mono', monospace; 91 | } 92 | pre { 93 | font-size: 0.95em; 94 | } 95 | } 96 | 97 | blockquote { 98 | font-size: inherit; 99 | } 100 | 101 | blockquote h2 { 102 | margin-left: 1em; 103 | } 104 | 105 | /* THE SECTION BELOW FIXES A SPHINX-MERMAID OPACITY PROBLEM */ 106 | .content .section { 107 | opacity: 1.0 !important; 108 | } 109 | .section { 110 | opacity: 1.0 !important; 111 | } 112 | 113 | /* MAKES SPHINX SYNTAX figure:: :align:center WORK AGAIN */ 114 | .figure.align-center { 115 | text-align: center 116 | } -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dawidchyrzynski/arduino-home-assistant/1d333ab229b2dcefedf1b51e033f2177b74fca8c/docs/objects.inv -------------------------------------------------------------------------------- /docsrc/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | # Build Github pages 16 | github: 17 | @make clean 18 | @rm -rf xml 19 | @doxygen source/Doxyfile 20 | @make html 21 | @mkdir -p ../docs 22 | @rm -rf ../docs/* 23 | @touch ../docs/.nojekyll 24 | @cp -a build/html/. ../docs 25 | 26 | .PHONY: help Makefile 27 | 28 | # Catch-all target: route all unknown targets to Sphinx using the new 29 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 30 | %: Makefile 31 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 32 | -------------------------------------------------------------------------------- /docsrc/Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | exhale = "0.3.4" 8 | breathe = "4.34.0" 9 | sphinx = "5.0.2" 10 | lxml = "4.8.0" 11 | sphinx-press-theme = "0.8.0" 12 | sphinxcontrib-email = "0.3.5" 13 | 14 | [dev-packages] 15 | 16 | [requires] 17 | python_version = "3.9" 18 | -------------------------------------------------------------------------------- /docsrc/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | This document describes how to generate documentation of the library from the sources. 4 | If you're looking for the documentation please [follow this link](#). 5 | 6 | ## Prerequsites 7 | 8 | 1. Doxygen 9 | 2. Python 3.9+ 10 | 3. Pipenv 11 | 12 | ## Installation 13 | 14 | The first time setup is required before generating the documentation. Follow these steps: 15 | 1. Open terminal in the `docsrc` directory 16 | 2. Run `pipenv install` 17 | 18 | ### Apple Silicon M1 19 | 20 | On Apple M1 processors you may get this error when trying to build the documentation: `Could not parse the contents of index.xml as an xml.` 21 | 22 | Most likely this issue is caused by an architecture mismatch of the `lxml` package. 23 | To fix this issue open the Pipenv shell by running `pipenv shell` and follow these steps: 24 | 1. Run `pip uninstall lxml` 25 | 2. Run `arch -arm64 pip install lxml --no-binary lxml` 26 | 27 | This solution forces `lxml` to be built from the sources. 28 | 29 | ## Generating the documentation 30 | 31 | 1. Open terminal in the `docsrc` directory 32 | 2. Open the Pipenv shell `pipenv shell` 33 | 3. Run the build `make github` 34 | 35 | ## Github pages 36 | 37 | In order to build the documentation that's going to be published as Github pages run `make github`. 38 | The generated HTML build will be automatically moved to the `docs` directory. 39 | -------------------------------------------------------------------------------- /docsrc/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docsrc/source/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | # import os 14 | # import sys 15 | # sys.path.insert(0, os.path.abspath('.')) 16 | 17 | # -- Project information ----------------------------------------------------- 18 | 19 | project = 'ArduinoHA' 20 | copyright = '2022, Dawid Chyrzynski' 21 | author = 'Dawid Chyrzynski' 22 | 23 | # The full version, including alpha/beta/rc tags 24 | release = '2.1.0' 25 | 26 | # -- General configuration --------------------------------------------------- 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = [ 32 | 'breathe', 33 | 'sphinx.ext.extlinks', 34 | 'sphinxcontrib.email' 35 | ] 36 | 37 | # Add any paths that contain templates here, relative to this directory. 38 | # templates_path = ['templates'] 39 | 40 | # List of patterns, relative to source directory, that match files and 41 | # directories to ignore when looking for source files. 42 | # This pattern also affects html_static_path and html_extra_path. 43 | exclude_patterns = [] 44 | 45 | # Setup the breathe extension 46 | breathe_projects = { 47 | 'ArduinoHA': '../xml' 48 | } 49 | breathe_default_project = 'ArduinoHA' 50 | breathe_show_include = True 51 | breathe_default_members = ('members', 'undoc-members') 52 | 53 | # Tell sphinx what the primary language being documented is. 54 | primary_domain = 'cpp' 55 | 56 | # Tell sphinx what the pygments highlight language should be. 57 | highlight_language = 'cpp' 58 | 59 | extlinks = { 60 | 'example': ('https://github.com/dawidchyrzynski/arduino-home-assistant/tree/main/examples/', None) 61 | } 62 | 63 | # -- Options for HTML output ------------------------------------------------- 64 | 65 | html_scaled_image_link = False 66 | html_copy_source = False 67 | html_theme = 'press-ext' 68 | html_theme_path = ['themes'] 69 | html_title = 'ArduinoHA' 70 | html_sidebars = {'**': ['util/searchbox.html', 'sidetoc.html']} 71 | html_theme_options = { 72 | 'external_links': [ 73 | ('Github', 'https://github.com/dawidchyrzynski/arduino-home-assistant') 74 | ] 75 | } 76 | html_js_files = [ 77 | 'custom.js' 78 | ] 79 | html_css_files = [ 80 | 'custom.css' 81 | ] 82 | 83 | # Add any paths that contain custom static files (such as style sheets) here, 84 | # relative to this directory. They are copied after the builtin static files, 85 | # so a file named 'default.css' will overwrite the builtin 'default.css'. 86 | html_static_path = ['static'] 87 | 88 | # -- Extension --------------------------------------------------------------- 89 | 90 | email_automode = False 91 | -------------------------------------------------------------------------------- /docsrc/source/documents/api/core/ha-device.rst: -------------------------------------------------------------------------------- 1 | HADevice class 2 | ============== 3 | 4 | .. doxygenclass:: HADevice 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/core/ha-mqtt.rst: -------------------------------------------------------------------------------- 1 | HAMqtt class 2 | ============ 3 | 4 | .. doxygenclass:: HAMqtt 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/core/index.rst: -------------------------------------------------------------------------------- 1 | Core API 2 | ======== 3 | 4 | .. toctree:: 5 | 6 | ha-device 7 | ha-mqtt -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-base-device-type.rst: -------------------------------------------------------------------------------- 1 | HABaseDeviceType class 2 | ====================== 3 | 4 | .. doxygenclass:: HABaseDeviceType 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-binary-sensor.rst: -------------------------------------------------------------------------------- 1 | HABinarySensor class 2 | ==================== 3 | 4 | .. doxygenclass:: HABinarySensor 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-button.rst: -------------------------------------------------------------------------------- 1 | HAButton class 2 | ============== 3 | 4 | .. doxygenclass:: HAButton 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-camera.rst: -------------------------------------------------------------------------------- 1 | HACamera class 2 | ============== 3 | 4 | .. doxygenclass:: HACamera 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-cover.rst: -------------------------------------------------------------------------------- 1 | HACover class 2 | ============= 3 | 4 | .. doxygenclass:: HACover 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-device-tracker.rst: -------------------------------------------------------------------------------- 1 | HADeviceTracker class 2 | ===================== 3 | 4 | .. doxygenclass:: HADeviceTracker 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-device-trigger.rst: -------------------------------------------------------------------------------- 1 | HADeviceTrigger class 2 | ===================== 3 | 4 | .. doxygenclass:: HADeviceTrigger 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-fan.rst: -------------------------------------------------------------------------------- 1 | HAFan class 2 | =========== 3 | 4 | .. doxygenclass:: HAFan 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-hvac.rst: -------------------------------------------------------------------------------- 1 | HAHVAC class 2 | ============ 3 | 4 | .. doxygenclass:: HAHVAC 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-light.rst: -------------------------------------------------------------------------------- 1 | HALight class 2 | ============= 3 | 4 | .. doxygenclass:: HALight 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-lock.rst: -------------------------------------------------------------------------------- 1 | HALock class 2 | ============ 3 | 4 | .. doxygenclass:: HALock 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-number.rst: -------------------------------------------------------------------------------- 1 | HANumber class 2 | ============== 3 | 4 | .. doxygenclass:: HANumber 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-scene.rst: -------------------------------------------------------------------------------- 1 | HAScene class 2 | ============= 3 | 4 | .. doxygenclass:: HAScene 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-select.rst: -------------------------------------------------------------------------------- 1 | HASelect class 2 | ============== 3 | 4 | .. doxygenclass:: HASelect 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-sensor-number.rst: -------------------------------------------------------------------------------- 1 | HASensorNumber class 2 | ==================== 3 | 4 | .. doxygenclass:: HASensorNumber 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-sensor.rst: -------------------------------------------------------------------------------- 1 | HASensor class 2 | ============== 3 | 4 | .. doxygenclass:: HASensor 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-switch.rst: -------------------------------------------------------------------------------- 1 | HASwitch class 2 | ============== 3 | 4 | .. doxygenclass:: HASwitch 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/ha-tag-scanner.rst: -------------------------------------------------------------------------------- 1 | HATagScanner class 2 | ================== 3 | 4 | .. doxygenclass:: HATagScanner 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/device-types/index.rst: -------------------------------------------------------------------------------- 1 | Device types API 2 | ================ 3 | 4 | .. toctree:: 5 | 6 | ha-base-device-type 7 | ha-binary-sensor 8 | ha-button 9 | ha-camera 10 | ha-cover 11 | ha-device-tracker 12 | ha-device-trigger 13 | ha-fan 14 | ha-hvac 15 | ha-light 16 | ha-lock 17 | ha-number 18 | ha-scene 19 | ha-select 20 | ha-sensor 21 | ha-sensor-number 22 | ha-switch 23 | ha-tag-scanner 24 | -------------------------------------------------------------------------------- /docsrc/source/documents/api/index.rst: -------------------------------------------------------------------------------- 1 | API reference 2 | ============= 3 | 4 | .. toctree:: 5 | 6 | core/index 7 | device-types/index 8 | utils/index -------------------------------------------------------------------------------- /docsrc/source/documents/api/utils/ha-numeric.rst: -------------------------------------------------------------------------------- 1 | HANumeric class 2 | =============== 3 | 4 | .. doxygenclass:: HANumeric 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/utils/ha-serializer-array.rst: -------------------------------------------------------------------------------- 1 | HASerializerArray class 2 | ======================= 3 | 4 | .. doxygenclass:: HASerializerArray 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/utils/ha-serializer.rst: -------------------------------------------------------------------------------- 1 | HASerializer class 2 | ================== 3 | 4 | .. doxygenclass:: HASerializer 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/utils/ha-utils.rst: -------------------------------------------------------------------------------- 1 | HAUtils class 2 | ============= 3 | 4 | .. doxygenclass:: HAUtils 5 | :project: ArduinoHA 6 | :members: 7 | :protected-members: 8 | :private-members: 9 | :undoc-members: -------------------------------------------------------------------------------- /docsrc/source/documents/api/utils/index.rst: -------------------------------------------------------------------------------- 1 | Utils API 2 | ========= 3 | 4 | .. toctree:: 5 | 6 | ha-numeric 7 | ha-serializer 8 | ha-serializer-array 9 | ha-utils -------------------------------------------------------------------------------- /docsrc/source/documents/getting-started/compatible-hardware.rst: -------------------------------------------------------------------------------- 1 | Compatible Hardware 2 | =================== 3 | 4 | The library uses the Arduino Ethernet Client API for interacting with the network hardware. 5 | It should work fine as long as the `Client` class is available. 6 | 7 | Here is the list of devices on which the library was tested: 8 | 9 | - Arduino Uno 10 | - Arduino Mega 11 | - Arduino Nano 12 | - Arduino Pro Mini 13 | - Arduino Nano 33 IoT 14 | - Arduino Due 15 | - NodeMCU 16 | - Controllino Mega (Pure) 17 | - Controllino Maxi (Pure) 18 | - ESP-01 19 | - ESP32-CAM 20 | - Sonoff Dual R2 21 | - Sonoff Dual R3 22 | - Sonoff Basic 23 | - Sonoff Mini 24 | - Tuya Wi-Fi switch module 25 | - Tuya Wi-Fi curtain module 26 | 27 | Please note that it's not the complete list of supported devices. 28 | You may try to use the library on any device that uses Arduino core. -------------------------------------------------------------------------------- /docsrc/source/documents/getting-started/examples.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ======== 3 | 4 | .. list-table:: 5 | :widths: 25 75 6 | :header-rows: 1 7 | :class: examples-table 8 | 9 | * - Example 10 | - Description 11 | * - :example:`Binary sensor ` 12 | - Using the binary sensor as a door contact sensor. 13 | * - :example:`Button