This commit is contained in:
Stephan Mühl
2023-03-22 12:15:18 +01:00
committed by GitHub
parent 3e12414a87
commit adb5102869
203 changed files with 35010 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Build Github pages
github:
@make clean
@rm -rf xml
@doxygen source/Doxyfile
@make html
@mkdir -p ../docs
@rm -rf ../docs/*
@touch ../docs/.nojekyll
@cp -a build/html/. ../docs
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@@ -0,0 +1,17 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
exhale = "0.3.4"
breathe = "4.34.0"
sphinx = "5.0.2"
lxml = "4.8.0"
sphinx-press-theme = "0.8.0"
sphinxcontrib-email = "0.3.5"
[dev-packages]
[requires]
python_version = "3.9"

View File

@@ -0,0 +1,389 @@
{
"_meta": {
"hash": {
"sha256": "06cbc4b751660842e50f1cd113469dcedc03e5f6ed5be43ab74f58b69b09e7f1"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.9"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"alabaster": {
"hashes": [
"sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359",
"sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"
],
"version": "==0.7.12"
},
"babel": {
"hashes": [
"sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51",
"sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"
],
"markers": "python_version >= '3.6'",
"version": "==2.10.3"
},
"beautifulsoup4": {
"hashes": [
"sha256:58d5c3d29f5a36ffeb94f02f0d786cd53014cf9b3b3951d42e0080d8a9498d30",
"sha256:ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693"
],
"markers": "python_version >= '3.6'",
"version": "==4.11.1"
},
"breathe": {
"hashes": [
"sha256:48804dcf0e607a89fb6ad88c729ef12743a42db03ae9489be4ef8f7c4011774a",
"sha256:ac0768a5e84addad3e632028fe67749c567aba2b29088493b64c2c1634bcdba1"
],
"index": "pypi",
"version": "==4.34.0"
},
"certifi": {
"hashes": [
"sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d",
"sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"
],
"markers": "python_version >= '3.6'",
"version": "==2022.6.15"
},
"charset-normalizer": {
"hashes": [
"sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5",
"sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"
],
"markers": "python_version >= '3.6'",
"version": "==2.1.0"
},
"docutils": {
"hashes": [
"sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125",
"sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==0.17.1"
},
"exhale": {
"hashes": [
"sha256:0871fa29ff9ac91c14e0dd69ad40db798068b4407e2e7ba5f650e07cedd6f365",
"sha256:8fe83b2d96ef41e0f921b865c1bf46c40c6907cbeff0207ab9b445fd54539a16"
],
"index": "pypi",
"version": "==0.3.4"
},
"idna": {
"hashes": [
"sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff",
"sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
],
"markers": "python_version >= '3.5'",
"version": "==3.3"
},
"imagesize": {
"hashes": [
"sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b",
"sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==1.4.1"
},
"importlib-metadata": {
"hashes": [
"sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670",
"sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23"
],
"markers": "python_version < '3.10'",
"version": "==4.12.0"
},
"jinja2": {
"hashes": [
"sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",
"sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"
],
"markers": "python_version >= '3.7'",
"version": "==3.1.2"
},
"lxml": {
"hashes": [
"sha256:04da965dfebb5dac2619cb90fcf93efdb35b3c6994fea58a157a834f2f94b318",
"sha256:0538747a9d7827ce3e16a8fdd201a99e661c7dee3c96c885d8ecba3c35d1032c",
"sha256:0645e934e940107e2fdbe7c5b6fb8ec6232444260752598bc4d09511bd056c0b",
"sha256:079b68f197c796e42aa80b1f739f058dcee796dc725cc9a1be0cdb08fc45b000",
"sha256:0f3f0059891d3254c7b5fb935330d6db38d6519ecd238ca4fce93c234b4a0f73",
"sha256:10d2017f9150248563bb579cd0d07c61c58da85c922b780060dcc9a3aa9f432d",
"sha256:1355755b62c28950f9ce123c7a41460ed9743c699905cbe664a5bcc5c9c7c7fb",
"sha256:13c90064b224e10c14dcdf8086688d3f0e612db53766e7478d7754703295c7c8",
"sha256:1423631e3d51008871299525b541413c9b6c6423593e89f9c4cfbe8460afc0a2",
"sha256:1436cf0063bba7888e43f1ba8d58824f085410ea2025befe81150aceb123e345",
"sha256:1a7c59c6ffd6ef5db362b798f350e24ab2cfa5700d53ac6681918f314a4d3b94",
"sha256:1e1cf47774373777936c5aabad489fef7b1c087dcd1f426b621fda9dcc12994e",
"sha256:206a51077773c6c5d2ce1991327cda719063a47adc02bd703c56a662cdb6c58b",
"sha256:21fb3d24ab430fc538a96e9fbb9b150029914805d551deeac7d7822f64631dfc",
"sha256:27e590352c76156f50f538dbcebd1925317a0f70540f7dc8c97d2931c595783a",
"sha256:287605bede6bd36e930577c5925fcea17cb30453d96a7b4c63c14a257118dbb9",
"sha256:2aaf6a0a6465d39b5ca69688fce82d20088c1838534982996ec46633dc7ad6cc",
"sha256:32a73c53783becdb7eaf75a2a1525ea8e49379fb7248c3eeefb9412123536387",
"sha256:41fb58868b816c202e8881fd0f179a4644ce6e7cbbb248ef0283a34b73ec73bb",
"sha256:4780677767dd52b99f0af1f123bc2c22873d30b474aa0e2fc3fe5e02217687c7",
"sha256:4878e667ebabe9b65e785ac8da4d48886fe81193a84bbe49f12acff8f7a383a4",
"sha256:487c8e61d7acc50b8be82bda8c8d21d20e133c3cbf41bd8ad7eb1aaeb3f07c97",
"sha256:49a866923e69bc7da45a0565636243707c22752fc38f6b9d5c8428a86121022c",
"sha256:4beea0f31491bc086991b97517b9683e5cfb369205dac0148ef685ac12a20a67",
"sha256:4cfbe42c686f33944e12f45a27d25a492cc0e43e1dc1da5d6a87cbcaf2e95627",
"sha256:4d5bae0a37af799207140652a700f21a85946f107a199bcb06720b13a4f1f0b7",
"sha256:4e285b5f2bf321fc0857b491b5028c5f276ec0c873b985d58d7748ece1d770dd",
"sha256:57e4d637258703d14171b54203fd6822fda218c6c2658a7d30816b10995f29f3",
"sha256:5974895115737a74a00b321e339b9c3f45c20275d226398ae79ac008d908bff7",
"sha256:5ef87fca280fb15342726bd5f980f6faf8b84a5287fcc2d4962ea8af88b35130",
"sha256:603a464c2e67d8a546ddaa206d98e3246e5db05594b97db844c2f0a1af37cf5b",
"sha256:6653071f4f9bac46fbc30f3c7838b0e9063ee335908c5d61fb7a4a86c8fd2036",
"sha256:6ca2264f341dd81e41f3fffecec6e446aa2121e0b8d026fb5130e02de1402785",
"sha256:6d279033bf614953c3fc4a0aa9ac33a21e8044ca72d4fa8b9273fe75359d5cca",
"sha256:6d949f53ad4fc7cf02c44d6678e7ff05ec5f5552b235b9e136bd52e9bf730b91",
"sha256:6daa662aba22ef3258934105be2dd9afa5bb45748f4f702a3b39a5bf53a1f4dc",
"sha256:6eafc048ea3f1b3c136c71a86db393be36b5b3d9c87b1c25204e7d397cee9536",
"sha256:830c88747dce8a3e7525defa68afd742b4580df6aa2fdd6f0855481e3994d391",
"sha256:86e92728ef3fc842c50a5cb1d5ba2bc66db7da08a7af53fb3da79e202d1b2cd3",
"sha256:8caf4d16b31961e964c62194ea3e26a0e9561cdf72eecb1781458b67ec83423d",
"sha256:8d1a92d8e90b286d491e5626af53afef2ba04da33e82e30744795c71880eaa21",
"sha256:8f0a4d179c9a941eb80c3a63cdb495e539e064f8054230844dcf2fcb812b71d3",
"sha256:9232b09f5efee6a495a99ae6824881940d6447debe272ea400c02e3b68aad85d",
"sha256:927a9dd016d6033bc12e0bf5dee1dde140235fc8d0d51099353c76081c03dc29",
"sha256:93e414e3206779ef41e5ff2448067213febf260ba747fc65389a3ddaa3fb8715",
"sha256:98cafc618614d72b02185ac583c6f7796202062c41d2eeecdf07820bad3295ed",
"sha256:9c3a88d20e4fe4a2a4a84bf439a5ac9c9aba400b85244c63a1ab7088f85d9d25",
"sha256:9f36de4cd0c262dd9927886cc2305aa3f2210db437aa4fed3fb4940b8bf4592c",
"sha256:a60f90bba4c37962cbf210f0188ecca87daafdf60271f4c6948606e4dabf8785",
"sha256:a614e4afed58c14254e67862456d212c4dcceebab2eaa44d627c2ca04bf86837",
"sha256:ae06c1e4bc60ee076292e582a7512f304abdf6c70db59b56745cca1684f875a4",
"sha256:b122a188cd292c4d2fcd78d04f863b789ef43aa129b233d7c9004de08693728b",
"sha256:b570da8cd0012f4af9fa76a5635cd31f707473e65a5a335b186069d5c7121ff2",
"sha256:bcaa1c495ce623966d9fc8a187da80082334236a2a1c7e141763ffaf7a405067",
"sha256:bd34f6d1810d9354dc7e35158aa6cc33456be7706df4420819af6ed966e85448",
"sha256:be9eb06489bc975c38706902cbc6888f39e946b81383abc2838d186f0e8b6a9d",
"sha256:c4b2e0559b68455c085fb0f6178e9752c4be3bba104d6e881eb5573b399d1eb2",
"sha256:c62e8dd9754b7debda0c5ba59d34509c4688f853588d75b53c3791983faa96fc",
"sha256:c852b1530083a620cb0de5f3cd6826f19862bafeaf77586f1aef326e49d95f0c",
"sha256:d9fc0bf3ff86c17348dfc5d322f627d78273eba545db865c3cd14b3f19e57fa5",
"sha256:dad7b164905d3e534883281c050180afcf1e230c3d4a54e8038aa5cfcf312b84",
"sha256:e5f66bdf0976ec667fc4594d2812a00b07ed14d1b44259d19a41ae3fff99f2b8",
"sha256:e8f0c9d65da595cfe91713bc1222af9ecabd37971762cb830dea2fc3b3bb2acf",
"sha256:edffbe3c510d8f4bf8640e02ca019e48a9b72357318383ca60e3330c23aaffc7",
"sha256:eea5d6443b093e1545ad0210e6cf27f920482bfcf5c77cdc8596aec73523bb7e",
"sha256:ef72013e20dd5ba86a8ae1aed7f56f31d3374189aa8b433e7b12ad182c0d2dfb",
"sha256:f05251bbc2145349b8d0b77c0d4e5f3b228418807b1ee27cefb11f69ed3d233b",
"sha256:f1be258c4d3dc609e654a1dc59d37b17d7fef05df912c01fc2e15eb43a9735f3",
"sha256:f9ced82717c7ec65a67667bb05865ffe38af0e835cdd78728f1209c8fffe0cad",
"sha256:fe17d10b97fdf58155f858606bddb4e037b805a60ae023c009f760d8361a4eb8",
"sha256:fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f"
],
"index": "pypi",
"version": "==4.9.1"
},
"markupsafe": {
"hashes": [
"sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003",
"sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88",
"sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5",
"sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7",
"sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a",
"sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603",
"sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1",
"sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135",
"sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247",
"sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6",
"sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601",
"sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77",
"sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02",
"sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e",
"sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63",
"sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f",
"sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980",
"sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b",
"sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812",
"sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff",
"sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96",
"sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1",
"sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925",
"sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a",
"sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6",
"sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e",
"sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f",
"sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4",
"sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f",
"sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3",
"sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c",
"sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a",
"sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417",
"sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a",
"sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a",
"sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37",
"sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452",
"sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933",
"sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a",
"sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"
],
"markers": "python_version >= '3.7'",
"version": "==2.1.1"
},
"packaging": {
"hashes": [
"sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb",
"sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"
],
"markers": "python_version >= '3.6'",
"version": "==21.3"
},
"pygments": {
"hashes": [
"sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb",
"sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"
],
"markers": "python_version >= '3.6'",
"version": "==2.12.0"
},
"pyparsing": {
"hashes": [
"sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb",
"sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"
],
"markers": "python_full_version >= '3.6.8'",
"version": "==3.0.9"
},
"pytz": {
"hashes": [
"sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7",
"sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"
],
"version": "==2022.1"
},
"requests": {
"hashes": [
"sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983",
"sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
],
"markers": "python_version >= '3.7' and python_version < '4'",
"version": "==2.28.1"
},
"six": {
"hashes": [
"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
"sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==1.16.0"
},
"snowballstemmer": {
"hashes": [
"sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1",
"sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"
],
"version": "==2.2.0"
},
"soupsieve": {
"hashes": [
"sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759",
"sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"
],
"markers": "python_version >= '3.6'",
"version": "==2.3.2.post1"
},
"sphinx": {
"hashes": [
"sha256:7bf8ca9637a4ee15af412d1a1d9689fec70523a68ca9bb9127c2f3eeb344e2e6",
"sha256:ebf612653238bcc8f4359627a9b7ce44ede6fdd75d9d30f68255c7383d3a6226"
],
"index": "pypi",
"version": "==4.5.0"
},
"sphinx-press-theme": {
"hashes": [
"sha256:2884caab1dc01ecb11d158d4dd6d3179e2dd97cd48516c769cc27360272e62b3",
"sha256:ddf877d414a2c66e13396d726115aa3f0c94d1ac9133b4df028c261bf388ab25"
],
"index": "pypi",
"version": "==0.8.0"
},
"sphinxcontrib-applehelp": {
"hashes": [
"sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a",
"sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"
],
"markers": "python_version >= '3.5'",
"version": "==1.0.2"
},
"sphinxcontrib-devhelp": {
"hashes": [
"sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e",
"sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"
],
"markers": "python_version >= '3.5'",
"version": "==1.0.2"
},
"sphinxcontrib-email": {
"hashes": [
"sha256:2387fc0691f3a4ed9c0b7d32acce5a42495340cc45f6e759a1b38e1eb86fe888",
"sha256:74738235afd602b7f692d2b62b4582034e8bb32dbcaa7ecab34be985d8bae590"
],
"index": "pypi",
"version": "==0.3.5"
},
"sphinxcontrib-htmlhelp": {
"hashes": [
"sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07",
"sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"
],
"markers": "python_version >= '3.6'",
"version": "==2.0.0"
},
"sphinxcontrib-jsmath": {
"hashes": [
"sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178",
"sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"
],
"markers": "python_version >= '3.5'",
"version": "==1.0.1"
},
"sphinxcontrib-qthelp": {
"hashes": [
"sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72",
"sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"
],
"markers": "python_version >= '3.5'",
"version": "==1.0.3"
},
"sphinxcontrib-serializinghtml": {
"hashes": [
"sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd",
"sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"
],
"markers": "python_version >= '3.5'",
"version": "==1.1.5"
},
"urllib3": {
"hashes": [
"sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14",
"sha256:aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
"version": "==1.26.9"
},
"zipp": {
"hashes": [
"sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad",
"sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"
],
"markers": "python_version >= '3.7'",
"version": "==3.8.0"
}
},
"develop": {}
}

View File

@@ -0,0 +1,41 @@
# Documentation
This document describes how to generate documentation of the library from the sources.
If you're looking for the documentation please [follow this link](#).
## Prerequsites
1. Doxygen
2. Python 3.9+
3. Pipenv
## Installation
The first time setup is required before generating the documentation. Follow these steps:
1. Open terminal in the `docsrc` directory
2. Run `pipenv install`
### Apple Silicon M1
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.`
Most likely this issue is caused by an architecture mismatch of the `lxml` package.
To fix this issue open the Pipenv shell by running `pipenv shell` and follow these steps:
1. Run `pip uninstall lxml`
2. Run `arch -arm64 pip install lxml --no-binary lxml`
This solution forces `lxml` to be built from the sources.
## Generating the documentation
1. Open terminal in the `docsrc` directory
2. Run the Doxygen command `doxygen`
3. Open the Pipenv shell `pipenv shell`
4. Run the build `make html`
The generated documentation will be available in the `docsrc/build/html` directory.
## Github pages
In order to build the documentation that's going to be published as Github pages run `make github`.
The generated HTML build will be automatically moved to the `docs` directory.

View File

@@ -0,0 +1,35 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,90 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'ArduinoHA'
copyright = '2022, Dawid Chyrzynski'
author = 'Dawid Chyrzynski'
# The full version, including alpha/beta/rc tags
release = '2.0.0'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'breathe',
'sphinx.ext.extlinks',
'sphinxcontrib.email'
]
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# Setup the breathe extension
breathe_projects = {
'ArduinoHA': '../xml'
}
breathe_default_project = 'ArduinoHA'
breathe_show_include = True
breathe_default_members = ('members', 'undoc-members')
# Tell sphinx what the primary language being documented is.
primary_domain = 'cpp'
# Tell sphinx what the pygments highlight language should be.
highlight_language = 'cpp'
extlinks = {
'example': ('https://github.com/dawidchyrzynski/arduino-home-assistant/tree/main/examples/', None)
}
# -- Options for HTML output -------------------------------------------------
html_scaled_image_link = False
html_copy_source = False
html_theme = 'press-ext'
html_theme_path = ['themes']
html_title = 'ArduinoHA'
html_sidebars = {'**': ['util/searchbox.html', 'sidetoc.html']}
html_theme_options = {
'external_links': [
('Github', 'https://github.com/dawidchyrzynski/arduino-home-assistant')
]
}
html_js_files = [
'custom.js'
]
html_css_files = [
'custom.css'
]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named 'default.css' will overwrite the builtin 'default.css'.
html_static_path = ['static']
# -- Extension ---------------------------------------------------------------
email_automode = False

View File

@@ -0,0 +1,9 @@
HADevice class
==============
.. doxygenclass:: HADevice
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HAMqtt class
============
.. doxygenclass:: HAMqtt
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,7 @@
Core API
========
.. toctree::
ha-device
ha-mqtt

View File

@@ -0,0 +1,9 @@
HABaseDeviceType class
======================
.. doxygenclass:: HABaseDeviceType
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HABinarySensor class
====================
.. doxygenclass:: HABinarySensor
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HAButton class
==============
.. doxygenclass:: HAButton
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HACamera class
==============
.. doxygenclass:: HACamera
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HACover class
=============
.. doxygenclass:: HACover
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HADeviceTracker class
=====================
.. doxygenclass:: HADeviceTracker
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HADeviceTrigger class
=====================
.. doxygenclass:: HADeviceTrigger
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HAFan class
===========
.. doxygenclass:: HAFan
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HAHVAC class
============
.. doxygenclass:: HAHVAC
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HALight class
=============
.. doxygenclass:: HALight
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HALock class
============
.. doxygenclass:: HALock
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HANumber class
==============
.. doxygenclass:: HANumber
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HAScene class
=============
.. doxygenclass:: HAScene
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HASelect class
==============
.. doxygenclass:: HASelect
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HASensorNumber class
====================
.. doxygenclass:: HASensorNumber
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HASensor class
==============
.. doxygenclass:: HASensor
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HASwitch class
==============
.. doxygenclass:: HASwitch
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HATagScanner class
==================
.. doxygenclass:: HATagScanner
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,23 @@
Device types API
================
.. toctree::
ha-base-device-type
ha-binary-sensor
ha-button
ha-camera
ha-cover
ha-device-tracker
ha-device-trigger
ha-fan
ha-hvac
ha-light
ha-lock
ha-number
ha-scene
ha-select
ha-sensor
ha-sensor-number
ha-switch
ha-tag-scanner

View File

@@ -0,0 +1,8 @@
API reference
=============
.. toctree::
core/index
device-types/index
utils/index

View File

@@ -0,0 +1,9 @@
HANumeric class
===============
.. doxygenclass:: HANumeric
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HASerializerArray class
=======================
.. doxygenclass:: HASerializerArray
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HASerializer class
==================
.. doxygenclass:: HASerializer
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
HAUtils class
=============
.. doxygenclass:: HAUtils
:project: ArduinoHA
:members:
:protected-members:
:private-members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
Utils API
=========
.. toctree::
ha-numeric
ha-serializer
ha-serializer-array
ha-utils

View File

@@ -0,0 +1,27 @@
Compatible Hardware
===================
The library uses the Arduino Ethernet Client API for interacting with the network hardware.
It should work fine as long as the `Client` class is available.
Here is the list of devices on which the library was tested:
- Arduino Uno
- Arduino Mega
- Arduino Nano
- Arduino Pro Mini
- Arduino Nano 33 IoT
- NodeMCU
- Controllino Mega (Pure)
- Controllino Maxi (Pure)
- ESP-01
- ESP32-CAM
- Sonoff Dual R2
- Sonoff Dual R3
- Sonoff Basic
- Sonoff Mini
- Tuya Wi-Fi switch module
- Tuya Wi-Fi curtain module
Please note that it's not the complete list of supported devices.
You may try to use the library on any device that uses Arduino core.

View File

@@ -0,0 +1,60 @@
Examples
========
.. list-table::
:widths: 25 75
:header-rows: 1
:class: examples-table
* - Example
- Description
* - :example:`Binary sensor <binary-sensor/binary-sensor.ino>`
- Using the binary sensor as a door contact sensor.
* - :example:`Button <button/button.ino>`
- Adding simple buttons to the Home Assistant panel.
* - :example:`Camera <esp32-cam/esp32-cam.ino>`
- Publishing the preview from the ESP32-CAM module.
* - :example:`Cover <cover/cover.ino>`
- Controlling a window cover (open / close / stop).
* - :example:`Device trigger <multi-state-button/multi-state-button.ino>`
- Implementation of a simple wall switch that reports press and hold states.
* - :example:`Fan <fan/fan.ino>`
- Controlling a simple fan (state + speed).
* - :example:`HVAC <hvac/hvac.ino>`
- HVAC controller with multiple modes, power control and target temperature.
* - :example:`Lock <lock/lock.ino>`
- A simple door lock that's controlled by the Home Assistant.
* - :example:`Light <light/light.ino>`
- A simple light that allows changing brightness, color temperature and RGB color.
* - :example:`Number <number/number.ino>`
- Adding an interactive numeric slider in the Home Assistant panel.
* - :example:`Scene <scene/scene.ino>`
- Adding a custom scene in the Home Assistant panel.
* - :example:`Select <select/select.ino>`
- A dropdown selector that's displayed in the Home Assistant panel.
* - :example:`Sensor <sensor/sensor.ino>`
- A simple sensor that reports a state in a string representation (open / opening / close).
* - :example:`Analog sensor <sensor-analog/sensor-analog.ino>`
- Reporting the analog pin's voltage to the Home Assistant.
* - :example:`Integer sensor <sensor-integer/sensor-integer.ino>`
- Reporting the device's uptime to the Home Assistant.
* - :example:`Switch <led-switch/led-switch.ino>`
- The LED that's controlled by the Home Assistant.
* - :example:`Multi-switch <multi-switch/multi-switch.ino>`
- Multiple switches controlled by the Home Assistant.
* - :example:`Tag scanner <tag-scanner/tag-scanner.ino>`
- Scanning RFID tags using the MFRC522 module.
* - :example:`Availability <availability/availability.ino>`
- Reporting entities' availability (online / offline) to the Home Assistant.
* - :example:`Advanced availability <advanced-availability/advanced-availability.ino>`
- Advanced availability reporting with MQTT LWT (Last Will and Testament).
* - :example:`MQTT advanced <mqtt-advanced/mqtt-advanced.ino>`
- Subscribing to custom topics and publishing custom messages.
* - :example:`MQTT with credentials <mqtt-with-credentials/mqtt-with-credentials.ino>`
- Establishing connection with a MQTT broker using the credentials.
* - :example:`NodeMCU (ESP8266) <nodemcu/nodemcu.ino>`
- Basic example for ESP8266 devices.
* - :example:`Arduino Nano 33 IoT <nano33iot/nano33iot.ino>`
- Basic example for Arduino Nano 33 IoT (SAMD family).
* - :example:`mDNS discovery <mdns/mdns.ino>`
- Make your ESP8266 discoverable via the mDNS.

View File

@@ -0,0 +1,17 @@
Getting started
===============
Welcome to the ArduinoHA library!
This documentation is a step-by-step guide that presents all features of the library.
If you feel that there is anything unclear don't hesitate to open a new GitHub discussion.
Have fun!
.. toctree::
:maxdepth: 2
prerequisites
installation
compatible-hardware
examples

View File

@@ -0,0 +1,44 @@
Installation
============
There are two ways to install the library depending on your project.
If you're using Arduino IDE to compile your project you only need to install the library into the IDE.
The second method is meant for more advanced users that use *makeEspArduino* for building the project for ESP32/ESP8266 devices.
Arduino IDE
-----------
To install the library into your Arduino IDE you can use Library Manager (available from IDE version 1.6.2).
Open the IDE and click to the "Sketch" menu and then *Include Library > Manage Libraries*.
.. image:: images/manage-libraries.png
:width: 500
:align: center
Type "home-assistant-integration" in the search field, select the latest version of the library from the dropdown and then click *Install*.
.. image:: images/library-search.png
:width: 500
:align: center
For other installation methods please refer to `Arduino documentation <https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries>`_.
makeEspArduino
--------------
The library can be installed in an environment managed by `makeEspArduino <https://github.com/plerup/makeEspArduino>`_.
The best approach is to add the library and its dependency as submodules in the project as follows:
::
git submodule add https://github.com/dawidchyrzynski/arduino-home-assistant.git arduino-home-assistant
cd arduino-home-assistant && git checkout tags/2.0.0 && cd ..
git submodule add https://github.com/knolleary/pubsubclient.git pubsubclient
cd pubsubclient && git checkout tags/v2.8
Then you just need to add one extra line in your `Makefile`:
::
LIBS := $(ROOT)/arduino-home-assistant $(ROOT)/pubsubclient

View File

@@ -0,0 +1,8 @@
Prerequisites
=============
ArduinoHA uses MQTT protocol over TCP to communicate with your Home Assistant instance.
The MQTT broker is not installed by default so you will need to install an extra HA addon in order to get the integration working.
The recommended setup method is to use the `Mosquitto Brokker addon <https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md>`_.
After installing the addon your HA instance acts as a broker for all devices you're going to integrate with it.

View File

@@ -0,0 +1,100 @@
Availability reporting
======================
Home Assistant allows to track online/offline states of devices and device types.
In this way controls available in the panel will be displayed as disabled if a device is offline.
The library allows to expose state of the entire device (i.e. shared availability) or specific type (sensor, switch, light, etc.).
By default this feature is not enabled to save resources (RAM and flash) but you can easily turn it on as shown below.
Shared availability
-------------------
I highly recommend to use shared availability feature as it allows to utilize MQTT LWT.
Basically, shared availability allows to control availability of all types related to a specific device.
For example: if your device has 5 switches and 2 buttons you can control their availability in the HA panel using a single method call.
See example below showing how to enable shared availability of the device.
By default, the device is considered online but you can control its state manually using ``HADevice::setAvailability(bool online)`` method.
In most cases you won't need to control availability manually as the library takes care of availability as long as the device is powered on.
::
#include <ArduinoHA.h>
HADevice device("myUniqueID");
void setup() {
device.enableSharedAvailability();
// device.setAvailability(false); // changes default state to offline
// ...
}
void loop() {
// ...
// device.setAvailability(true); // you can control availability manually if you want
}
MQTT LWT
--------
The shared availability feature is considered a complete solution only if it's used with MQTT LWT feature.
Without LWT if the device is powered off then Home Assistant displays it as online.
That's because availability tracking relies on MQTT messages and if you cut off power of your device then its not capable of publishing the offline message.
When LWT feature is enabled the device becomes offline in the HA panel even if you cut off power supply.
This solution is implemented by MQTT broker that automatically publishes the message when the TCP connection to the device is lost.
::
#include <ArduinoHA.h>
HADevice device("myUniqueID");
void setup() {
device.enableSharedAvailability();
device.enableLastWill();
// ...
}
void loop() {
// ...
}
Device type's availability
--------------------------
There also a way to control availability of specific device types.
Each type can be controlled separately as shown below.
Please note that this solution requires shared availability to be disabled and it's not supported by LWT.
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
HASwitch mySwitch("mySwitchId");
void setup() {
Ethernet.begin(mac);
// this line enables availability for your switch
mySwitch.setAvailability(true); // you can also set it to false
// ...
}
void loop() {
// ...
// you can control availability at runtime as follows:
mySwitch.setAvailability(true); // online
mySwitch.setAvailability(false); // offline
}

View File

@@ -0,0 +1,36 @@
Compiler macros
===============
The library supports couple of macros that are defined in the `ArduinoHADefines.h` file.
You can uncomment them in this specific file or provide flags directly to compiler (for example: via Makefile).
Debug mode
----------
Debug mode unlocks logging feature in the library.
Logs may be useful for debugging the communication with the Home Assistant.
To enable debug mode you need to defined `ARDUINOHA_DEBUG` macro.
Code optimization
-----------------
Defining one of the macros listed below results in truncating the corresponding device type.
It may be useful if you want to save some flash memory occupied by virtual tables of those classes.
* `EX_ARDUINOHA_BINARY_SENSOR`
* `EX_ARDUINOHA_BUTTON`
* `EX_ARDUINOHA_CAMERA`
* `EX_ARDUINOHA_COVER`
* `EX_ARDUINOHA_DEVICE_TRACKER`
* `EX_ARDUINOHA_DEVICE_TRIGGER`
* `EX_ARDUINOHA_FAN`
* `EX_ARDUINOHA_HVAC`
* `EX_ARDUINOHA_LIGHT`
* `EX_ARDUINOHA_LOCK`
* `EX_ARDUINOHA_NUMBER`
* `EX_ARDUINOHA_SCENE`
* `EX_ARDUINOHA_SELECT`
* `EX_ARDUINOHA_SENSOR`
* `EX_ARDUINOHA_SWITCH`
* `EX_ARDUINOHA_TAG_SCANNER`

View File

@@ -0,0 +1,46 @@
Connection parameters
=====================
:doc:`HAMqtt </documents/api/core/ha-mqtt>` class exposes a few variants of the ``begin`` method that allows specifying the MQTT connection parameters.
**This method should be called only once and at the end of the setup logic.**
The example below presents all possible variants. Pick one that meets your requirements.
.. NOTE::
Connection to the MQTT broker is established asynchronously.
The :doc:`HAMqtt::begin </documents/api/core/ha-mqtt>` method just sets the parameters of the connection.
The connection attempt is made during the loop cycle.
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
void setup() {
Ethernet.begin(mac);
// anoymous connection on default port 1883
mqtt.begin("192.168.1.50");
// anoymous connection on port 8888
mqtt.begin("192.168.1.50", 8888);
// connection with credentials on default port 1883
mqtt.begin("192.168.1.50", "username", "password");
// connection with credentials on port 8888
mqtt.begin("192.168.1.50", 8888, "username", "password");
// you can also use hostname in all variants
mqtt.begin("mybroker.local");
}
void loop() {
Ethernet.maintain();
mqtt.loop();
}

View File

@@ -0,0 +1,110 @@
Device configuration
====================
:doc:`HADevice </documents/api/core/ha-device>` represents the physical device where the library is installed.
Logically it's a group of types like sensors, switches, lights and so on.
In the Home Assistant, it's listed with properties that may be configured using the library's API.
Each property except the unique ID is optional.
Setting optional properties increases flash and RAM usage so it's not recommended to set them on lower-spec MCUs.
The supported properties are:
* unique ID*
* name
* software version
* manufacturer
* model
Unique ID
---------
The ID of a device needs to be unique in a scope of a Home Assistant instance.
The safest solution is to use the MAC address of an Ethernet or Wi-Fi chip but you can also implement your own solution.
There are three different ways to set the ID of the device.
You can pick one depending on your needs.
1) Providing string (const char*) to the :doc:`HADevice </documents/api/core/ha-device>` constructor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Try to keep the ID simple (alphanumeric characters) and short.
::
#include <ArduinoHA.h>
HADevice device("myUniqueID");
void setup() {
// ...
}
void loop() {
// ...
}
2) Providing byte array to the :doc:`HADevice </documents/api/core/ha-device>` constructor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
#include <ArduinoHA.h>
// use your own unique bytes sequence
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
HADevice device(mac, sizeof(mac));
void setup() {
// ...
}
void loop() {
// ...
}
3) Using :doc:`HADevice::setUniqueId </documents/api/core/ha-device>` method during the setup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
#include <ArduinoHA.h>
HADevice device;
void setup() {
// any length is acceptable
byte myId[] = {0x05, 0xb4, 0xc6, 0x9f, 0xbe, 0xce, 0x8c, 0x1f, 0xc7};
device.setUniqueId(myId, sizeof(myId)); // the input array is cloned internally
// ...
}
void loop() {
// ...
}
Device properties
-----------------
Each property has its corresponding setter method in the :doc:`HADevice </documents/api/core/ha-device>` class.
Please note that all these methods accept const char pointer whose **content is not copied**.
::
#include <ArduinoHA.h>
HADevice device("myUniqueId");
void setup() {
device.setName("Bedroom Light Controller");
device.setSoftwareVersion("1.0.0");
device.setManufacturer("Developer Corp.");
device.setModel("ABC-123");
// ...
}
void loop() {
// ...
}

View File

@@ -0,0 +1,113 @@
Device types
============
Device type represents a single entity in the Home Assistant panel.
It can be a sensor, lock, camera or anything that's listed in the table below.
Your physical device (for example ESP-01 board) can have multiple device types assigned.
They will be displayed as child entities in the HA panel.
Limitations
-----------
Registering a new device type requires some flash and RAM memory to be utilized.
On less powerful units like Arduino Uno, you may quickly hit the limit of resources, so keeping the device simple is recommended.
Hitting the resource limit will result in random reboots of the device.
By default, the maximum number of device types is 6.
You can increase the limit using the :doc:`HAMqtt </documents/api/core/ha-mqtt>` class constructor as follows:
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device, 12); // <------------ 12 is a new limit of device types
void setup() {
Ethernet.begin(mac);
// your setup logic goes here
}
void loop() {
Ethernet.maintain();
mqtt.loop();
// your loop logic goes here
}
Please note that this limit cannot be changed at runtime.
Supported device types
----------------------
.. list-table::
:widths: 25 15 60
:header-rows: 1
:class: supported-device-types-table
* - Device type
- Supported
- Documentation
* - Binary sensor
- ✅
- :doc:`HABinarySensor </documents/api/device-types/ha-binary-sensor>`
* - Button
- ✅
- :doc:`HAButton </documents/api/device-types/ha-button>`
* - Camera
- ✅
- :doc:`HACamera </documents/api/device-types/ha-camera>`
* - Cover
- ✅
- :doc:`HACover </documents/api/device-types/ha-cover>`
* - Device tracker
- ✅
- :doc:`HADeviceTracker </documents/api/device-types/ha-device-tracker>`
* - Device trigger
- ✅
- :doc:`HADeviceTrigger </documents/api/device-types/ha-device-trigger>`
* - Fan
- ✅
- :doc:`HAFan </documents/api/device-types/ha-fan>`
* - Humidifier
- ❌
- --
* - HVAC
- ✅
- :doc:`HAHVAC </documents/api/device-types/ha-hvac>`
* - Light
- ✅
- :doc:`HALight </documents/api/device-types/ha-light>`
* - Lock
- ✅
- :doc:`HALock </documents/api/device-types/ha-lock>`
* - Number
- ✅
- :doc:`HANumber </documents/api/device-types/ha-number>`
* - Scene
- ✅
- :doc:`HAScene </documents/api/device-types/ha-scene>`
* - Select
- ✅
- :doc:`HASelect </documents/api/device-types/ha-select>`
* - | Sensor (text)
- ✅
- :doc:`HASensor </documents/api/device-types/ha-sensor>`
* - | Sensor (number)
- ✅
- :doc:`HASensorNumber </documents/api/device-types/ha-sensor-number>`
* - Switch
- ✅
- :doc:`HASwitch </documents/api/device-types/ha-switch>`
* - Tag scanner
- ✅
- :doc:`HATagScanner </documents/api/device-types/ha-tag-scanner>`
* - Vacuum
- ❌
- --

View File

@@ -0,0 +1,44 @@
Discovery
=========
The library automatically maintains connection to the MQTT broker and takes care of the discovery process.
Each device type that you create (sensor, switch, light, fan, etc.) is automatically registered in MQTT manager.
Whenever connection with the MQTT broker is acquired the configuration of all device types is pushed to the Home Assistant.
There is one basic rule that you need to follow: device types need to be constructed after :doc:`HAMqtt </documents/api/core/ha-mqtt>` class.
That's because device types are relying on :doc:`HAMqtt </documents/api/core/ha-mqtt>` instance internally.
Topics prefix
-------------
In some cases you may need to change prefix of MQTT topics.
There are two types of topics utilized by the library:
* **discovery topic** - used for publishing device types' configuration (default: ``homeassistant``)
* **data topic** - used for publishing states, data, etc. (default: ``aha``)
The discovery topic's prefix can be changed using ``HAMqtt::setDiscoveryPrefix(const char* prefix)`` method.
The data topic's prefix can be changed using ``HAMqtt::setDataPrefix(const char* prefix)`` method
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
// register your device types here
void setup() {
mqtt.setDiscoveryPrefix("myCustomPrefix");
mqtt.setDataPrefix("myDataPrefix");
// ...
}
void loop() {
// ...
}

View File

@@ -0,0 +1,19 @@
Library
=======
This chapter describes basic all of the library's core.
Solid understanding of foundations will allow you to utilize full potential of the library.
.. toctree::
:maxdepth: 2
introduction
device-configuration
availability-reporting
connection-params
discovery
device-types
mqtt-security
mqtt-advanced
compiler-macros

View File

@@ -0,0 +1,79 @@
Introduction
============
Before implementing the business logic of your application you will need to
add a few necessary pieces of code to your project.
Basically, everything comes up to a few basic rules:
1) :doc:`HADevice </documents/api/core/ha-device>` and :doc:`HAMqtt </documents/api/core/ha-mqtt>` instances need to be initialized once globally or as a part of another global object.
2) :doc:`HAMqtt::begin </documents/api/core/ha-mqtt>` needs to be called at the end of setup logic. It provides MQTT broker credentials that will be used for a connection.
3) :doc:`HAMqtt::loop </documents/api/core/ha-mqtt>` method needs to be called periodically (it doesn't need to be called on each tick).
4) Device types need to be initialized after :doc:`HAMqtt </documents/api/core/ha-mqtt>` class (it will be described later in the documentation).
Here are the minimal boilerplates that you can start with.
Don't worry if you have no idea what's going on here.
Everything will be covered in the following chapters.
Arduino Boilerplate
-------------------
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
void setup() {
Ethernet.begin(mac);
// your setup logic goes here
// MQTT broker connection (use your data here)
mqtt.begin("192.168.1.50", "username", "password");
}
void loop() {
Ethernet.maintain();
mqtt.loop();
// your loop logic goes here
}
ESP32/ESP8266 Boilerplate
-------------------------
::
#include <ESP8266WiFi.h>
#include <ArduinoHA.h>
WiFiClient client;
HADevice device;
HAMqtt mqtt(client, device);
void setup() {
byte mac[WL_MAC_ADDR_LENGTH];
WiFi.macAddress(mac);
device.setUniqueId(mac, sizeof(mac));
// you can skip this part if you're already maintaining the connection logic
WiFi.begin("MyNetworkSSID", "MyPassword");
while (WiFi.status() != WL_CONNECTED) {
delay(500); // waiting for the connection
}
// your setup logic goes here
// MQTT broker connection (use your data here)
mqtt.begin("192.168.1.50", "username", "password");
}
void loop() {
mqtt.loop();
// your loop logic goes here
}

View File

@@ -0,0 +1,110 @@
MQTT advanced features
======================
Callbacks
---------
:doc:`HAMqtt </documents/api/core/ha-mqtt>` class exposes some useful callbacks that you can bind to.
Please take a look at the example below.
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
void onMessage(const char* topic, const uint8_t* payload, uint16_t length) {
// this method will be called each time the device receives an MQTT message
}
void onConnected() {
// this method will be called when connection to MQTT broker is established
}
void setup() {
Ethernet.begin(mac);
mqtt.onMessage(onMessage);
mqtt.onConnected(onConnected);
mqtt.begin("192.168.1.50", "username", "password");
}
void loop() {
Ethernet.maintain();
mqtt.loop();
}
Subscriptions
-------------
You can also subscribe to a custom topic using ``HAMqtt::subscribe(const char* topic)`` method.
The subscription needs to be made each time a connection to the MQTT broker is established.
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
void onMessage(const char* topic, const uint8_t* payload, uint16_t length) {
if (strcmp(topic, "myTopic") == 0) {
// message on "myTopic" received
}
}
void onConnected() {
mqtt.subscribe("myTopic");
}
void setup() {
Ethernet.begin(mac);
mqtt.onMessage(onMessage);
mqtt.onConnected(onConnected);
mqtt.begin("192.168.1.50", "username", "password");
}
void loop() {
Ethernet.maintain();
mqtt.loop();
}
Publishing a message
--------------------
HAMqtt class also exposes the method that allows to publish custom messages.
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
void setup() {
Ethernet.begin(mac);
mqtt.begin("192.168.1.50", "username", "password");
}
void loop() {
Ethernet.maintain();
mqtt.loop();
// Publishing the non-retained message:
// mqtt.publish("customTopic", "customPayload");
// Publishing the retained message:
// mqtt.publish("customTopic", "customPayload", true);
}

View File

@@ -0,0 +1,40 @@
MQTT security
=============
The library allows you to use credentials for acquiring a TCP connection with the MQTT broker.
By default you can use the same credentials you use for login in the Home Assistant panel but you can also configure custom credentials in the Mosquitto broker.
.. DANGER::
This solution is not 100% secure because communication between Arduino and Home Assistant is not encrypted.
Username and password can be easily discovered by analyzing your local network traffic.
However, that's fine as long as your local network is secured against unattended access.
On more powerful devices (like ESP), you should consider using TLS/SSL connection.
::
#include <Ethernet.h>
#include <ArduinoHA.h>
byte mac[] = {0x00, 0x10, 0xFA, 0x6E, 0x38, 0x4A};
EthernetClient client;
HADevice device(mac, sizeof(mac));
HAMqtt mqtt(client, device);
void setup() {
// ...
// replace username and password with your credentials
mqtt.begin("192.168.1.50", "username", "password");
}
void loop() {
// ...
}
SSL connection
--------------
On ESP32/ESP8266 you can use ``WiFiClientSecure`` client to establish encrypted connection between your device and Home Assistant.
Please take a look at :example:`this example <mqtt-with-ssl/mqtt-with-ssl.ino>`.

View File

@@ -0,0 +1,27 @@
ArduinoHA documentation
==================================================
ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
The library is designed to use as low resources (RAM/flash) as possible.
Initially, it was optimized to work on Arduino Uno with Ethernet Shield,
but I successfully use it on ESP8266/ESP8255 boards in my projects.
Features
--------
* Two-way communication (state reporting and command execution)
* MQTT discovery (device is added to the Home Assistant panel automatically)
* MQTT Last Will and Testament
* Support for custom MQTT messages (publishing and subscribing)
* Auto reconnect with MQTT broker
* Reporting availability (online/offline states) of a device
* Doxygen documentation
* Covered by unit tests (AUnit + EpoxyDuino + AUniter)
.. toctree::
:caption: Docs
:maxdepth: 3
documents/getting-started/index
documents/library/index
documents/api/index

View File

@@ -0,0 +1,2 @@
[theme]
inherit = press