docs: update homeassistant/HA_part_2

This commit is contained in:
admin_bora 2024-02-09 23:06:14 +01:00 committed by admin_bora
parent 1a2c47ad1f
commit 3b250c7bb7
1 changed files with 349 additions and 60 deletions

View File

@ -2,7 +2,7 @@
title: Part 2
description:
published: 1
date: 2024-02-09T22:00:58.996Z
date: 2024-02-09T22:06:09.721Z
tags:
editor: ckeditor
dateCreated: 2024-02-09T21:57:47.138Z
@ -214,30 +214,24 @@ dateCreated: 2024-02-09T21:57:47.138Z
<p>Create folder&nbsp;<code>&lt;config&gt;/python_scripts</code></p>
<p>Create a file&nbsp;<code>&lt;config&gt;/python_scripts/hello_world.py</code>&nbsp;in the folder and give it this content:</p>
<p><code># `data` is available as builtin and is a dictionary with the input data.</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>name = data.get("name", "world")</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code># `logger` and `time` are available as builtin without the need of explicit import.</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>logger.info("Hello {} at {}".format(name, time.time()))</code></p>
<p><br>&nbsp;</p>
<p>Start Home Assistant to reload the script configuration.</p>
<p>Call your new&nbsp;<a href="https://my.home-assistant.io/redirect/developer_call_service?service=python_script.hello_world"><code><u>python_script.hello_world</u></code></a>&nbsp;service (with parameters) from the&nbsp;<a href="https://my.home-assistant.io/redirect/developer_services"><u>Services</u></a>, using the YAML mode.</p>
<p><code>service: python_script.hello_world</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>data:</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; name: "Input-Text"</code></p>
<p>Running this script show absolutely no output on the screen, but it logs with level&nbsp;<code>info</code>. You must have the&nbsp;<a href="https://www.home-assistant.io/integrations/logger/"><u>Logger</u></a>&nbsp;enabled at least for level&nbsp;<code>info</code>.</p>
<p>Your&nbsp;<code>confiuration.yaml</code>&nbsp;should include something like this.</p>
<p><code>logger:</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; default: info</code></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
@ -279,22 +273,7 @@ dateCreated: 2024-02-09T21:57:47.138Z
<p>Now add the some graph to your dashboard.</p>
<p><strong>6. Add air quality measurements to Home Assistant</strong></p>
<p>For viewing the measurements in my lovelace dashboard I used a custom card called&nbsp;<a href="https://github.com/kalkih/mini-graph-card"><strong><u>mini-graph-card</u></strong></a>, this card can be easily installed using HACS. I used the following Lovelace configuration.</p>
<p>type: 'custom:mini-graph-card'
name: Air quality inside
icon: 'mdi:server'
line_width: 2
animate: true
hours_to_show: 24
points_per_hour: 1.5
entities:
&nbsp;- entity: sensor.particulate_matter_1_0um_concentration
&nbsp; &nbsp;name: 1 µm &gt;
&nbsp;- entity: sensor.particulate_matter_2_5um_concentration
&nbsp; &nbsp;name: 2.5 µm &gt;
&nbsp;- entity: sensor.particulate_matter_10_0um_concentration
&nbsp; &nbsp;name: 10 µm &gt;
</p>
<p>type: 'custom:mini-graph-card' name: Air quality inside icon: 'mdi:server' line_width: 2 animate: true hours_to_show: 24 points_per_hour: 1.5 entities: &nbsp;- entity: sensor.particulate_matter_1_0um_concentration &nbsp; &nbsp;name: 1 µm &gt; &nbsp;- entity: sensor.particulate_matter_2_5um_concentration &nbsp; &nbsp;name: 2.5 µm &gt; &nbsp;- entity: sensor.particulate_matter_10_0um_concentration &nbsp; &nbsp;name: 10 µm &gt;</p>
<h3>Adding measurements of outside air</h3>
<p>To create additional context I also use<a href="https://www.home-assistant.io/integrations/luftdaten/"><u>&nbsp;</u><strong><u>Luftdaten integration</u></strong></a>&nbsp;to get outside air quality measurements nearby. This way you could automate opening windows or triggering ventilation to get better quality air from outside.</p>
<p>Luftdaten is making the world a better place through community driven, open environmental data. The coverage within northern Europe is impressive.</p>
@ -540,14 +519,11 @@ dateCreated: 2024-02-09T21:57:47.138Z
<h3>USING CLI TO MOVE THE DATA PARTITION</h3>
<p>To see the current data disk use:</p>
<p><code>$ ha os info</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>...</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>data_disk: /dev/mmcblk1p4</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>...</code></p>
<p>Sh</p>
<p>Copy</p>
@ -1033,42 +1009,29 @@ dateCreated: 2024-02-09T21:57:47.138Z
<p><a href="https://github.com/rospogrigio/localtuya/issues/183">https://github.com/rospogrigio/localtuya/issues/183</a></p>
<p>Adding in config manual works.</p>
<p><code>localtuya:</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; - host: 192.168.1.215</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; device_id: xxx</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; local_key: xxx</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; friendly_name: Tuya Device</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; protocol_version: "3.3"</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; entities:</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; - platform: sensor</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; friendly_name: Plug Voltage</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; id: 20</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; scaling: 0.1 # Optional</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; device_class: voltage # Optional</code></p>
<p>
</p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; unit_of_measurement: "V" # Optional</code></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
@ -1230,5 +1193,331 @@ dateCreated: 2024-02-09T21:57:47.138Z
<p><br>&nbsp;</p>
<p><a href="https://www.youtube.com/watch?v=iUgxwbfkIqU&amp;t=2s">https://www.youtube.com/watch?v=iUgxwbfkIqU&amp;t=2s</a></p>
<p><br>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>water meter with image recognition on PC</h1>
<p><br>&nbsp;</p>
<p><a href="https://pyimagesearch.com/2017/02/13/recognizing-digits-with-opencv-and-python/">https://pyimagesearch.com/2017/02/13/recognizing-digits-with-opencv-and-python/</a></p>
<p><a href="https://www.geeksforgeeks.org/text-detection-and-extraction-using-opencv-and-ocr/">https://www.geeksforgeeks.org/text-detection-and-extraction-using-opencv-and-ocr/</a></p>
<p><a href="https://medium.com/pythoneers/text-detection-and-extraction-from-image-with-python-5c0c75a8ff14">https://medium.com/pythoneers/text-detection-and-extraction-from-image-with-python-5c0c75a8ff14</a></p>
<p><br>&nbsp;</p>
<p><a href="https://tesseract-ocr.github.io/tessdoc/Installation.html">https://tesseract-ocr.github.io/tessdoc/Installation.html</a></p>
<p><a href="https://tesseract-ocr.github.io/tessdoc/Command-Line-Usage.html#simplest-invocation-to-ocr-an-image">https://tesseract-ocr.github.io/tessdoc/Command-Line-Usage.html#simplest-invocation-to-ocr-an-image</a></p>
<p>tesseract input.txt output.txt -l eng --psm 3</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://medium.com/quantrium-tech/installing-and-using-tesseract-4-on-windows-10-4f7930313f82">https://medium.com/quantrium-tech/installing-and-using-tesseract-4-on-windows-10-4f7930313f82</a></p>
<p>need to add esseract to sstempath!!!</p>
<p>cd C:\Users\Bora_2\Downloads</p>
<p>tesseract ziffer4.jpg stdout -l eng</p>
<p>tesseract ziffer4.jpg output.txt</p>
<p>tesseract input.txt output.txt -l eng</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html#examples">https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html#examples</a></p>
<p><br>&nbsp;</p>
<p><a href="https://github.com/tesseract-ocr/tesstrain">https://github.com/tesseract-ocr/tesstrain</a></p>
<p>make training MODEL_NAME=test-model DATA_DIR=/data GROUND_TRUTH_DIR=/data/foo-ground-truth</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>install GNU make on Win10</p>
<p><a href="https://leangaurav.medium.com/how-to-setup-install-gnu-make-on-windows-324480f1da69">https://leangaurav.medium.com/how-to-setup-install-gnu-make-on-windows-324480f1da69</a></p>
<p><a href="https://gnuwin32.sourceforge.net/packages/make.htm">https://gnuwin32.sourceforge.net/packages/make.htm</a></p>
<p>install software</p>
<p>add to PATH</p>
<p>C:\Program Files (x86)\GnuWin32\bin</p>
<p>Copy the path and jump to edit environment variables from windows search</p>
<p>Click Environment Variables.</p>
<p>Under user variables, find Path and click Edit.</p>
<p>Hit New, paste the copied path and hit Ok.</p>
<p>Hit OK on all other windows also.</p>
<p>Now open a fresh CMD/Terminal and type make and and hit Enter.</p>
<p>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://medium.com/@ahmetxgenc/how-to-use-tesseract-on-windows-fe9d2a9ba5c6">https://medium.com/@ahmetxgenc/how-to-use-tesseract-on-windows-fe9d2a9ba5c6</a></p>
<p>pip install pytesseract</p>
<p>pip install numpy</p>
<p>pip install opencv-python</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>$ tesseract help-psm</p>
<p>Page segmentation modes:</p>
<p>0 Orientation and script detection (OSD) only.</p>
<p>1 Automatic page segmentation with OSD.</p>
<p>2 Automatic page segmentation, but no OSD, or OCR. (not implemented)</p>
<p>3 Fully automatic page segmentation, but no OSD. (Default)</p>
<p>4 Assume a single column of text of variable sizes.</p>
<p>5 Assume a single uniform block of vertically aligned text.</p>
<p>6 Assume a single uniform block of text.</p>
<p>7 Treat the image as a single text line.</p>
<p>8 Treat the image as a single word.</p>
<p>9 Treat the image as a single word in a circle.</p>
<p>10 Treat the image as a single character.</p>
<p>11 Sparse text. Find as much text as possible in no particular order.</p>
<p>12 Sparse text with OSD.</p>
<p>13 Raw line. Treat the image as a single text line,</p>
<p>bypassing hacks that are Tesseract-specific.</p>
<p><br>&nbsp;</p>
<p>$ tesseract --help-oem</p>
<p>OCR Engine modes:</p>
<p>0 Legacy engine only.</p>
<p>1 Neural nets LSTM engine only.</p>
<p>2 Legacy + LSTM engines.</p>
<p>3 Default, based on what is available.</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Training Tesseract on custom data</h2>
<p><a href="https://nanonets.com/blog/ocr-with-tesseract/#training-tesseract-on-custom-data">https://nanonets.com/blog/ocr-with-tesseract/#training-tesseract-on-custom-data</a></p>
<p><br>&nbsp;</p>
<p><a href="https://muthu.co/all-tesseract-ocr-options/">https://muthu.co/all-tesseract-ocr-options/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Edge Impulse</h1>
<p><a href="https://studio.edgeimpulse.com/studio/select-project">https://studio.edgeimpulse.com/studio/select-project</a></p>
<p><a href="https://www.arduino.coach/edge-impulse-demonstration-of-accurate-digits-recognition-with-the-arduino-portenta.html">https://www.arduino.coach/edge-impulse-demonstration-of-accurate-digits-recognition-with-the-arduino-portenta.html</a></p>
<p><br>&nbsp;</p>
<p><a href="https://github.com/edgeimpulse/example-esp32-cam">https://github.com/edgeimpulse/example-esp32-cam</a></p>
<p><br>&nbsp;</p>
<p><a href="https://www.survivingwithandroid.com/tinyml-esp32-cam-edge-image-classification-with-edge-impulse/">https://www.survivingwithandroid.com/tinyml-esp32-cam-edge-image-classification-with-edge-impulse/</a></p>
<p><br>&nbsp;</p>
<p><a href="https://peter-ing.medium.com/beginners-guide-to-object-detection-with-edge-impulse-c8ea95f844a0">https://peter-ing.medium.com/beginners-guide-to-object-detection-with-edge-impulse-c8ea95f844a0</a></p>
<p><br>&nbsp;</p>
<p><a href="https://docs.arduino.cc/tutorials/nano-33-ble-sense/edge-impulse">https://docs.arduino.cc/tutorials/nano-33-ble-sense/edge-impulse</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Tensorflow Lite</h1>
<p><a href="https://wiki.seeedstudio.com/XIAO-BLE-Sense-TFLite-Getting-Started/">https://wiki.seeedstudio.com/XIAO-BLE-Sense-TFLite-Getting-Started/</a></p>
<p><br>&nbsp;</p>
<p><a href="https://developer.android.com/codelabs/digit-classifier-tflite#0">https://developer.android.com/codelabs/digit-classifier-tflite#0</a></p>
<p><br>&nbsp;</p>
<p><a href="https://www.edgeimpulse.com/blog/get-plugged-in-to-the-future-of-smart-energy-meters">https://www.edgeimpulse.com/blog/get-plugged-in-to-the-future-of-smart-energy-meters</a></p>
<p><br>&nbsp;</p>
<p><a href="https://www.youtube.com/watch?v=pWp3PhYI-OU">https://www.youtube.com/watch?v=pWp3PhYI-OU</a></p>
<p><br>&nbsp;</p>
<p><a href="https://github.com/leriomaggio/deep-learning-keras-tensorflow">https://github.com/leriomaggio/deep-learning-keras-tensorflow</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Alarm system</h1>
<p><a href="https://scotthelme.co.uk/creating-a-house-alarm-system-with-home-assistant/">https://scotthelme.co.uk/creating-a-house-alarm-system-with-home-assistant/</a></p>
<p><a href="https://leonardosmarthomemakers.com/how-to-create-a-diy-alarm-system-with-home-assistant/">https://leonardosmarthomemakers.com/how-to-create-a-diy-alarm-system-with-home-assistant/</a></p>
<p><a href="https://smarthomescene.com/guides/alarmo-make-your-own-alarm-system-in-home-assistant/">https://smarthomescene.com/guides/alarmo-make-your-own-alarm-system-in-home-assistant/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>MICRO PYTHON ON ESP32 (HUZZAH32)</h1>
<p><a href="https://wolfpaulus.com/micro-python-esp32/">https://wolfpaulus.com/micro-python-esp32/</a></p>
<p><a href="https://learn.adafruit.com/adafruit-esp32-feather-v2/micropython-setup">https://learn.adafruit.com/adafruit-esp32-feather-v2/micropython-setup</a></p>
<p><a href="http://kentarotanaka.com/huzzah32-esp32-micropython-setup/">http://kentarotanaka.com/huzzah32-esp32-micropython-setup/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>install HACS</h1>
<p><a href="https://peyanski.com/how-to-install-home-assistant-community-store-hacs/">https://peyanski.com/how-to-install-home-assistant-community-store-hacs/</a></p>
<p>install addon Terminal &amp; SSH</p>
<p>enter follwing code into WEB UI: wget -q -O - https://install.hacs.xyz | bash -</p>
<p>Restart Server</p>
<p>search for integration hacs</p>
<p>select all 4 check boxes</p>
<p>enter github credentials</p>
<p>You can further enable AppDaemon and NetDaemon apps discovery &amp; tracking. In simple words these are more option to customize your Home Assistant.</p>
<p>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Camera</h1>
<h2>M5Stack Timer Camera X</h2>
<h3>Arduino</h3>
<p><a href="https://docs.m5stack.com/en/quick_start/timer_cam/arduino">https://docs.m5stack.com/en/quick_start/timer_cam/arduino</a></p>
<p><a href="https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/">https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/</a></p>
<p><a href="https://community.home-assistant.io/t/m5stack-unit-cam-with-esphome/474378">https://community.home-assistant.io/t/m5stack-unit-cam-with-esphome/474378</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://www.fambach.net/esp32-cam-modul/">https://www.fambach.net/esp32-cam-modul/</a></p>
<p>Kamera Fernsteuern: http://&lt;ip&gt;/control?var=&lt;Variablenname&gt;&amp;val=&lt;Wert&gt;</p>
<p>http://192.168.178.42/control?var=framesize&amp;val=3</p>
<p>http://192.168.178.42:81/stream</p>
<p>commands work with web_cam example! → web_cam_M5Stack_Timer-CAM_working</p>
<p><br>&nbsp;</p>
<p><a href="https://randomnerdtutorials.com/esp32-cam-ov2640-camera-settings/">https://randomnerdtutorials.com/esp32-cam-ov2640-camera-settings/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>entity_id: camera.cam1</p>
<p>filename: /config/www/snapshot.jpg</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyeq_tmp_b0a3a1c1e3c3da03.jpg"></figure>
<p><br>&nbsp;</p>
<p>alias: take periodic pictures<br>description: ""<br>trigger:<br>- platform: time_pattern<br>minutes: /1<br>condition: []<br>action:<br>- service: camera.snapshot<br>data:<br>filename: &gt;-<br>/config/Timelapse/Plants_{{ "%04d"|format(now().year) }}_{{<br>"%02d"|format(now().month) }}_{{ "%02d"|format(now().day)<br>}}_{{ "%02d"|format(now().hour) }}_{{ "%02d"|format(now().minute) }}_{{ "%02d"|format(now().second) }}.jpeg<br>target:<br>entity_id: camera.esp32cam_1<br>mode: single</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h3>Micropython</h3>
<p><a href="https://lemariva.com/blog/2020/06/micropython-m5camera-timelapse-over-mqtt">https://lemariva.com/blog/2020/06/micropython-m5camera-timelapse-over-mqtt</a></p>
<p><a href="https://github.com/lemariva/uPyCam/tree/timelapse-camera">https://github.com/lemariva/uPyCam/tree/timelapse-camera</a></p>
<p><a href="https://github.com/lemariva/micropython-camera-driver">https://github.com/lemariva/micropython-camera-driver</a></p>
<p><br>&nbsp;</p>
<p>due to missing PSRAM, the micropython code does not work...</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Android controller for ESP32</h1>
<p><a href="https://www.youtube.com/watch?v=wrtNFFGXi5I&amp;t=363s">https://www.youtube.com/watch?v=wrtNFFGXi5I&amp;t=363s</a></p>
<p><a href="https://drive.google.com/file/d/17kUsL4qcdAIRIxtfcCf5VnePcwTSmhqX/view">https://drive.google.com/file/d/17kUsL4qcdAIRIxtfcCf5VnePcwTSmhqX/view</a></p>
<p><a href="https://play.google.com/store/apps/details?id=com.electro_tex.bluetoothcar">https://play.google.com/store/apps/details?id=com.electro_tex.bluetoothcar</a></p>
<p><br>&nbsp;</p>
<p><a href="https://www.youtube.com/watch?v=Pqs-3GgWW3s">https://www.youtube.com/watch?v=Pqs-3GgWW3s</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Python on Win10</h1>
<p>Install via Microsoft store</p>
<p><br><br>&nbsp;</p>
<p><a href="https://docs.python.org/3/library/venv.html">https://docs.python.org/3/library/venv.html</a></p>
<p>create new venv:</p>
<p>python -m venv “D:\Home Assistant\Micropython\myenv”</p>
<p><br>&nbsp;</p>
<p>activate in command prompt to install packages:</p>
<p>D:\”Home Assistant”\Python\myenv\Scripts\activate.bat</p>
<p>pip install ...</p>
<p>deactivate</p>
<p><br>&nbsp;</p>
<p>to see the new venv in VSCode:</p>
<p>Python: Select Interpreter → D:\Home Assistant\Micropython\myenv\Scripts\python.exe</p>
<p>then, restart VSCode</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>using password manager</h1>
<h2>KepassXC</h2>
<p><a href="https://keepassxc.org/download/">https://keepassxc.org/download/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>Use Yubico: <a href="https://www.yubico.com/de/works-with-yubikey/catalog/keepassxc/">https://www.yubico.com/de/works-with-yubikey/catalog/keepassxc/</a></p>
<p>Database &gt; Database Security &gt; Add Additional protection… &gt; Add Challenge-Response → choose Yubikey from the drop-down menu</p>
<p><br>&nbsp;</p>
<h3>browser plugin:</h3>
<p><a href="https://keepassxc.org/docs/KeePassXC_GettingStarted.html#_setup_browser_integration">https://keepassxc.org/docs/KeePassXC_GettingStarted.html#_setup_browser_integration</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>keepass for Android</h2>
<p>KeePass2Android or KeePassDX</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Syncthing</h2>
<p>Download: <a href="https://docs.syncthing.net/users/contrib.html#contributions">https://docs.syncthing.net/users/contrib.html#contributions</a></p>
<p>Getting started: <a href="https://docs.syncthing.net/intro/getting-started.html#getting-started">https://docs.syncthing.net/intro/getting-started.html#getting-started</a></p>
<p>Default Folder: C:\Users\Bora_2\Sync</p>
<p><br>&nbsp;</p>
<p>Device Identification BoraNB: 3YHOKRG-D57OAYW-QW7Z23T-MQPGWLJ-ZGR4UCV-DUB-LX1: KOVYWX3-M6CXGFE-M4UQSQQ</p>
<p>VOHODHG-KXFA7RQ-5NQ6LM3-3HLMSXC-6XMN4BH-XCIA7GC-LBZGX2G-N4APPQJ</p>
<p><br>&nbsp;</p>
<p>Starting Syncthing Automatically: <a href="https://docs.syncthing.net/users/autostart.html">https://docs.syncthing.net/users/autostart.html</a></p>
<p>Windows:</p>
<p>create shortcut in following folder</p>
<p>folder: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup</p>
<p>Alternatively, in newer versions of Windows, open shell:startup from the Run command (Win+R).</p>
<p>path: "D:\Home Assistant\syncthing-windows-amd64-v1.22.2\syncthing.exe" --no-console --no-browser</p>
<p>open: <a href="http://localhost:8384/">http://localhost:8384</a></p>
<p>Linux</p>
<p><a href="https://docs.syncthing.net/users/autostart.html#linux">https://docs.syncthing.net/users/autostart.html#linux</a></p>
<p>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Soil sensor</h1>
<p><a href="https://learn.adafruit.com/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor">https://learn.adafruit.com/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor</a></p>
<p><br>&nbsp;</p>
<p>3D models for assembling Adafruit soil sensor:</p>
<p><a href="https://learn.adafruit.com/soil-node">https://learn.adafruit.com/soil-node</a></p>
<p><a href="https://learn.adafruit.com/pyportal-pet-planter-with-adafruit-io">https://learn.adafruit.com/pyportal-pet-planter-with-adafruit-io</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>use wildcard for mqtt topics in automations</h1>
<p><a href="https://community.home-assistant.io/t/mqtt-topic-wildcard/389382">https://community.home-assistant.io/t/mqtt-topic-wildcard/389382</a></p>
<p>topic: "stat/+/RESULT"</p>
<p><br>&nbsp;</p>
<p><a href="https://community.home-assistant.io/t/automation-based-on-mqtt-message-with-wildcard-and-value-condition/311518/6">https://community.home-assistant.io/t/automation-based-on-mqtt-message-with-wildcard-and-value-condition/311518/6</a></p>
<p>As you have already discovered, this is not an acceptable way to use a wildcard (#) in an MQTT topic:</p>
<p><br>&nbsp;</p>
<p>topic: "#/batt"</p>
<p>The # wildcard can appear at the end of a topic, like this:</p>
<p><br>&nbsp;</p>
<p>topic: "home/sensors/#"</p>
<p>or alone:</p>
<p><br>&nbsp;</p>
<p>topic: "#"</p>
<p>You didnt mention the format of the battery topic but maybe the + wildcard can be useful. It is designed to allow for any sub-topic like this:</p>
<p><br>&nbsp;</p>
<p>topic: "home/OpenMQTTGateway/BttoMQTT/+/batt"</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://community.home-assistant.io/t/try-to-send-the-mqtt-payload-as-a-message-to-notify-mobile-app-in-ios/169197/6">https://community.home-assistant.io/t/try-to-send-the-mqtt-payload-as-a-message-to-notify-mobile-app-in-ios/169197/6</a></p>
<p><br>&nbsp;</p>
<p>data_template:</p>
<p>message: “{{ trigger.payload }}”</p>
<p>title: From mqtt_notifier</p>
<p>service: persistent_notification.create</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Tutorial to fix 401: Unauthorised Error with Grafana for mobile devices</h1>
<p><a href="https://community.home-assistant.io/t/tutorial-to-fix-401-unauthorised-error-with-grafana-for-mobile-devices/242622/9">https://community.home-assistant.io/t/tutorial-to-fix-401-unauthorised-error-with-grafana-for-mobile-devices/242622/9</a></p>
<p><br>&nbsp;</p>
<p>it works!</p>
<p>port forward router:<br>443 to 8123 tcp<br>and<br>80 to 3000 tcp<br>and grafana setings:</p>
<pre><code class="language-plaintext">plugins: []</code></pre>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;<br>&nbsp;</p>
<p><br>&nbsp;</p>