<!--
title: Part 2
description: 
published: 1
date: 2024-02-09T22:06:09.721Z
tags: 
editor: ckeditor
dateCreated: 2024-02-09T21:57:47.138Z
-->

<p>Need to access time sensor</p>
<p><br>&nbsp;</p>
<p>alternatively, use now</p>
<p><br>&nbsp;</p>
<p><br>template:<br>- trigger:<br>- platform: time_pattern<br>seconds: "/1"<br>sensor:<br>- name: time<br>state: "{{ now().strftime('%H:%M:%S') }}"<br><br>{{ now().strftime("%I:%M %p") }}<br><br>{{ as_timestamp(state_attr("device_tracker.android_9050f88e39898022", "last_time_reachable")) | timestamp_local }}<br>{##{{ state_attr("device_tracker.android_9050f88e39898022", "last_time_reachable").strftime('%H:%M:%S') }}##}<br><br>- condition: template<br>value_template: '"{{ now().timestamp()+300 &lt; (as_timestamp(state_attr("device_tracker.android_9050f88e39898022", "last_time_reachable")) | float)&nbsp;<br>}}"'</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>Change attribute value via automation</p>
<p><br>&nbsp;</p>
<p><a href="https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/21">https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/21</a></p>
<p>- id: automation 3</p>
<p>trigger:</p>
<p>platform: time_pattern</p>
<p>minutes: '/1'</p>
<p>action:</p>
<p>service: python_script.set_state</p>
<p>data_template:</p>
<p>entity_id: sensor.cold_water_rate</p>
<p>state: 42</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>
<p><br>&nbsp;</p>
<h1>new HA OS on RaPi4</h1>
<p>http://192.168.178.52:8123/</p>
<p>create user</p>
<p>user: bora, pass: bora</p>
<p>select location</p>
<p>activate advanced mode under profile settings</p>
<p>install add ons</p>
<p>Samba share</p>
<p>username: homeassistant, password: bora, workgroup: WORKGROUP</p>
<p>add a new network location: \\192.168.178.52\config</p>
<p>file editor</p>
<p>duckdns</p>
<p>domains:<br>- habora.duckdns.org<br>token: 799093a4-0b34-454f-99cb-25a4637bf404<br>aliases: []<br>lets_encrypt:<br>accept_terms: true<br>algo: secp384r1<br>certfile: fullchain.pem<br>keyfile: privkey.pem<br>seconds: 300</p>
<p>&nbsp;</p>
<p>MariaDB</p>
<p>databases:<br>- homeassistant<br>logins:<br>- username: homeassistant<br>password: password1234<br>- username: read_only_user<br>password: password1234<br>rights:<br>- username: homeassistant<br>database: homeassistant<br>- username: read_only_user<br>database: homeassistant<br>privileges:<br>- SELECT</p>
<p>recorder:<br>db_url: mysql://homeassistant:password@core-mariadb/homeassistant?charset=utf8mb4</p>
<p>&nbsp;</p>
<p>Nginx Proxy Manager</p>
<p>Open WebUI → admin@example.com / changeme</p>
<p>Hosts – Proxy Hosts → Add Proxy Host</p>
<p>Domain Names: habora.duckdns.org</p>
<p>Als Scheme wählt Ihr http, unter „Forward Hostname / IP“ tragt Ihr die IP eures Home Assistant ein. → 192.168.178.52</p>
<p>Bei Forward Port gebt Ihr den Port ein, unter dem euer Home Assistant erreichbar ist. (Standardmäßig ist das der Port 8123)</p>
<p>Aktiviert abschließend noch den Punkt „Websockets Support„.</p>
<p>Anschließend wechselt Ihr auf den Reiter SSL.</p>
<p>Hier wählt ihr unter „SSL Certificate“ den Eintrag „Request a new SSL Certificate“ um ein neues Zertifikat zu erstellen aus.</p>
<p>Aktiviert nun den Punkt „Force SSL„, tragt eine gültige Email-Adresse für eure Zertifikat ein und akzeptiert die Let’s Encrypt Bedingungen durch aktivieren der Option am unteren Rand der Dialog.</p>
<p>Bestätigt nun die Eingaben durch einen Klick auf „Save“ und wartet, bis der Vorgang abgeschlossen ist.</p>
<p>Dann werden im Hintergrund die Zertifikate von Let’s Encrypt generiert. Das kann einen Augenblick in Anspruch nehmen.</p>
<p>Das registrieren des Zertifikates funktioniert nur, wenn die eingetragene Domain auch auf eure externe IP zeigt, und die Ports 80 und 443 auf die Home Assistant IP weitergeleitet sind.</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_eeaf4fb9a08969e4.png"></figure>
<p>configuration.yaml</p>
<p>http:</p>
<p>use_x_forwarded_for: true</p>
<p>trusted_proxies:</p>
<p>- 127.0.0.1</p>
<p>- 172.30.33.0/24</p>
<p>- ::1</p>
<p>Let's Encrypt</p>
<p>domains:<br>- habora.duckdns.org<br>email: boraers@googlemail.com<br>keyfile: privkey.pem<br>certfile: fullchain.pem<br>challenge: http<br>dns: {}</p>
<p>add to configuration.aml<br>http:<br>ssl_certificate: /ssl/fullchain.pem<br>ssl_key: /ssl/privkey.pem</p>
<p>influxdb</p>
<p>no adaptation of configuration was needed</p>
<p><a href="http://192.168.178.52:8123/api/hassio_ingress/FJZMGvrT7OnlTzBKdUP9jKiKEe4yp4V4D5VT4zHP5cQ/sources/0/hosts">http://192.168.178.52:8123/api/hassio_ingress/FJZMGvrT7OnlTzBKdUP9jKiKEe4yp4V4D5VT4zHP5cQ/sources/0/hosts</a></p>
<p><a href="http://192.168.178.52:8123/hassio/ingress/a0d7b954_influxdb">http://192.168.178.52:8123/hassio/ingress/a0d7b954_influxdb</a></p>
<p>create database: home_assistant</p>
<p>create user: homeassistant, pass: homeassistant, permissions: ALL</p>
<p>mosquitto</p>
<p>Logins:<br>- username: note4<br>password: note4</p>
<p>MQTT integration configuration:<br>127.0.0.1 ← not core-mosquitto<br>1883<br>note4<br>note4<br>MQTT protocol: 5</p>
<p>Grafana</p>
<p>env_vars:<br>- name: GF_SECURITY_ALLOW_EMBEDDING<br>value: "true"<br>- name: GF_AUTH_ANONYMOUS_ORG_NAME<br>value: Main Org.<br>- name: GF_AUTH_ANONYMOUS_ENABLED<br>value: "true"<br>- name: GF_AUTH_DISABLE_LOGIN_FORM<br>value: "false"</p>
<p>SSL: false or true, depending on having ssl set up</p>
<p>Network:<br>3000</p>
<p><a href="http://192.168.178.52:8123/hassio/ingress/a0d7b954_grafana">http://192.168.178.52:8123/hassio/ingress/a0d7b954_grafana</a></p>
<p>in web panel</p>
<p>add data source: InfluxDB</p>
<p>URL: <a href="http://a0d7b954-influxdb:8086/">http://</a><a href="http://192.168.178.52:8123/hassio/ingress/a0d7b954_influxdb">a0d7b954</a><a href="http://a0d7b954-influxdb:8086/">-influxdb:8086</a></p>
<p>database, user, pass</p>
<p>&nbsp;</p>
<p>Terminal and SSH</p>
<p>integrations</p>
<p>HACS</p>
<p>github credentials required</p>
<p>OpenWeatherMap</p>
<p>API Ke:</p>
<p>solarman</p>
<p>re-use old config files</p>
<p>automations</p>
<p>blueprints</p>
<p>bosch_shc</p>
<p>custom_components</p>
<p>group</p>
<p>images</p>
<p>python_scripts</p>
<p>www</p>
<p>alarm_control_panel.yaml</p>
<p>automations.yaml</p>
<p>climate.yaml</p>
<p>configuration.yaml</p>
<p>influxdb.yaml</p>
<p>mqtt.yaml</p>
<p>scenes.yaml</p>
<p>scripts.yaml</p>
<p>secrets.yaml</p>
<p>sensor.yaml</p>
<p>move to external SSD</p>
<p>che</p>
<p><br>&nbsp;</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_8c01be9bb611f888.png"></figure>
<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>Home-Assistant script template</h1>
<p><br>&nbsp;</p>
<p>{## Imitate available variables: ##}<br>{% set my_test_json = {<br>"temperature": 25,<br>"unit": "°C"<br>} %}<br><br>The temperature is {{ my_test_json.temperature }} {{ my_test_json.unit }}.<br><br>{% if is_state("sun.sun", "above_horizon") -%}<br>The sun rose {{ relative_time(states.sun.sun.last_changed) }} ago.<br>{%- else -%}<br>The sun will rise at {{ as_timestamp(state_attr("sun.sun", "next_rising")) | timestamp_local }}.<br>{%- endif %}<br><br>For loop example getting entity values in the weather domain:<br><br>{% for state in states.weather -%}<br>{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}<br>{{ state.name | lower }} is {{state.state_with_unit}}<br>{%- endfor %}.<br><br>{% set tado_temp = states('sensor.tado_wohnzimmer_temperature')|float(20) %}<br>{% set room_temp = states('sensor.meter_plus_90b4_temperature')|float(20) %}<br>{% set current_offset = state_attr('climate.tado_wohnzimmer',<br>'offset_celsius') %}<br>{{ tado_temp|round(1) }}<br>{{ room_temp|round(1) }}<br>{{ current_offset|round(1) }}<br>{{ (-(tado_temp - room_temp) + current_offset)|round(1) }}<br>{{ (tado_temp - current_offset)|round(1) }}<br><br>&nbsp;</p>
<p><br>{% set average_temp = 0 %}<br>{% set active_rooms = 0 %}<br>{% set temp_bedroom = states('sensor.radiator_thermostat_bedroom_temperature')|float(15) %}<br>{% set climate_bedroom = states('climate.room_climate_bedroom') %}<br>{% set temp_top = states('sensor.radiator_thermostat_child_top_temperature')|float(15) %}<br>{% set climate_top = states('climate.room_climate_child_s_room_1_top') %}<br>{% set temp_bottom = states('sensor.radiator_thermostat_bottom_temperature')|float(15) %}<br>{% set climate_bottom = states('climate.room_climate_child_s_room_2_botto') %}<br><br>{% if climate_bedroom not in ("unavailable", "unknown", "off") %}<br>{% set active_rooms = active_rooms + 1 %}<br>{% set average_temp = average_temp + temp_bedroom %}<br>{% endif %}<br><br>{{ average_temp/active_rooms|round(1) if active_rooms&gt;0 else 77 }}<br><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><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<h1>Python Scripts</h1>
<p><a href="https://www.home-assistant.io/integrations/python_script">https://www.home-assistant.io/integrations/python_script</a></p>
<p><br>&nbsp;</p>
<h2>Example 1</h2>
<p><a href="https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/5">https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/5</a></p>
<p>Scripts are placed in a python_scripts folder under the configuration directory, in my case it is /home/homeassistant/.homeassistant/python_scripts. You then need to either restart Home Assistant or click RELOAD SCRIPTS under Configuration, General, Configuration Reloading.</p>
<p><br>&nbsp;</p>
<p>For what it’s worth, I have been hunting for a solution to this problem and I finally decided to make a small script:</p>
<p># python_scripts/set_state.py</p>
<p><br>&nbsp;</p>
<p>#==================================================================================================</p>
<p># python_scripts/set_state.py</p>
<p>#==================================================================================================</p>
<p><br>&nbsp;</p>
<p>#--------------------------------------------------------------------------------------------------</p>
<p># Set the state or other attributes for the entity specified in the Automation Action</p>
<p>#--------------------------------------------------------------------------------------------------</p>
<p><br>&nbsp;</p>
<p>inputEntity = data.get('entity_id')</p>
<p>if inputEntity is None:</p>
<p>logger.warning("===== entity_id is required if you want to set something.")</p>
<p>else:</p>
<p>inputStateObject = hass.states.get(inputEntity)</p>
<p>inputState = inputStateObject.state</p>
<p>inputAttributesObject = inputStateObject.attributes.copy()</p>
<p><br>&nbsp;</p>
<p>for item in data:</p>
<p>newAttribute = data.get(item)</p>
<p>logger.debug("===== item = {0}; value = {1}".format(item,newAttribute))</p>
<p>if item == 'entity_id':</p>
<p>continue # already handled</p>
<p>elif item == 'state':</p>
<p>inputState = newAttribute</p>
<p>else:</p>
<p>inputAttributesObject[item] = newAttribute</p>
<p>&nbsp;</p>
<p>hass.states.set(inputEntity, inputState, inputAttributesObject)</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>With this script in place, the action could be:</p>
<p><br>&nbsp;</p>
<p>action:</p>
<p>service: python_script.set_state</p>
<p>data_template:</p>
<p>entity_id: Binary_sensor.sensor1</p>
<p>state: ON</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Example 2</h2>
<p><a href="https://www.home-assistant.io/integrations/python_script#calling-services">https://www.home-assistant.io/integrations/python_script#calling-services</a></p>
<p><br>&nbsp;</p>
<p>Start by enabling the Python script and create the first script.</p>
<p>Add to&nbsp;<code>configuration.yaml</code>:&nbsp;<code>python_script:</code></p>
<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>&nbsp;</p>
<p><code>name = data.get("name", "world")</code></p>
<p>&nbsp;</p>
<p><code># `logger` and `time` are available as builtin without the need of explicit import.</code></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>&nbsp;</p>
<p><code>data:</code></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>&nbsp;</p>
<p><code>&nbsp; default: info</code></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Flash ESPhome on ESP32 ESP2866 NodeMCU board</h1>
<p><a href="https://www.pieterbrinkman.com/2022/01/01/2022-update-flash-esphome-on-esp32-esp2866-nodemcu-board/">https://www.pieterbrinkman.com/2022/01/01/2022-update-flash-esphome-on-esp32-esp2866-nodemcu-board/</a></p>
<p><br>&nbsp;</p>
<p>Install using esphome-flasher:</p>
<p>download compiled firmware: In the Install menu click Manual Download. The compilation will now start and the .bin file will download when ready.</p>
<p>Go to the esphome-flasher GitHub page and download the flasher for the OS you’re using. There is a esp home flash tool for macOS, Ubuntu and Windows :<br><a href="https://github.com/esphome/esphome-flasher/releases"><strong><u>https://github.com/esphome/esphome-flasher/releases</u></strong></a></p>
<p>Connect your ESP board with USB to your laptop.</p>
<p>Open the flasher tool</p>
<p><strong>Serial port</strong>: select COM port where the board is connected (there is probably only one option 😊).</p>
<p><strong>Firmware</strong>: Browse to the location where you downloaded your compiled firmware and select your firmware.</p>
<p>Click<strong>&nbsp;Flash ESP&nbsp;</strong>and wait</p>
<p>The ESP will be flashed now, you can follow the progress in the console window. When finished writing the firmware the ESP will restart and connect to your WiFi.</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_c35888ec30af40ce.png"></figure>
<p>The ESP will be ready after it states that it’s&nbsp;<i>ready for Over-The-Air Updates</i>&nbsp;and&nbsp;<i>that he API server is ready</i>.</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Measuring DHT22</h1>
<p><a href="https://www.pieterbrinkman.com/2021/02/03/build-a-cheap-air-quality-meter-using-esphome-home-assistant-and-a-particulate-matter-sensor/">https://www.pieterbrinkman.com/2021/02/03/build-a-cheap-air-quality-meter-using-esphome-home-assistant-and-a-particulate-matter-sensor/</a></p>
<p><i><strong>Note:&nbsp;</strong>Step 1 and 2 have been changed with new UI and features in both Home Assistant and ESPHome. Read the&nbsp;</i><a href="https://www.pieterbrinkman.com/2022/01/01/2022-update-flash-esphome-on-esp32-esp2866-nodemcu-board/"><i><strong><u>updated article to flash ESPhome on your ESP32 / ESP2866 NodeMCU board</u></strong></i></a>&nbsp;and skip step 1 and 2 below.</p>
<p>3. Wire the PMS5003 Particular Matter sensor and DHT22 to the ESP board</p>
<p>Wiring the DHT sensor is straight forward.</p>
<p>Connect the GND to any free GND pin on the ESP</p>
<p>Connect the VSS to any free 3V3 pin on the ESP</p>
<p>Connect the DATA to D4 on the ESP</p>
<p><strong>4. Configure ESPHome to read the measurements and supply them to Home Assistant</strong></p>
<p>Now it’s time to expose the measurement values to Home Assistant.</p>
<p>Open ESPHome and click EDIT on your node. The ESPHome configuration editor will now show. Add the following configuration at the bottom of the configuration.</p>
<pre><code class="language-plaintext">uart:</code></pre>
<p>When ready, press the Upload button and ESPHome will flash the new firmware OTA. Wait till ready and you should be good to go. ===&gt; this can be done wirelessl now</p>
<p>You can verify the new switch and interval by going to Home Assistant and open the device. You will see that it will have a Start Measuring switch. Enable the switch and notice that the measurements value start changing. &nbsp;</p>
<p>Wait a two minutes and notice that the switch will be turned on for 20 seconds and then turned off again.</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_6645eb4607246ee.png"></figure>
<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>
<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>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_b7a34d7754cb750c.png"></figure>
<p>Exposing both inside and outside air quality with a vertical stack card will provide a nice comparison view.</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_99d77d30d22d0a29.png"></figure>
<p>That’s it. Now it’s time to start measuring and learn more about the air quality in your house. Let me know if you have any questions and if you managed to make it work!</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Working DHT11 on Berrbase NodeMCU ESP32</h1>
<p><a href="https://www.berrybase.de/esp32-nodemcu-development-board?sPartner=g_shopping&amp;gclid=Cj0KCQiAnNacBhDvARIsABnDa68SnJ4bQ8qK-zWJiPZKsqYP245LF2rjMlnLhZHn7BHi7THLCbbWnOcaAvoOEALw_wcB">https://www.berrybase.de/esp32-nodemcu-development-board?sPartner=g_shopping&amp;gclid=Cj0KCQiAnNacBhDvARIsABnDa68SnJ4bQ8qK-zWJiPZKsqYP245LF2rjMlnLhZHn7BHi7THLCbbWnOcaAvoOEALw_wcB</a></p>
<p>ESP32 NodeMCU Development Board</p>
<p>Artikel-Nr.: NMCU-ESP32</p>
<p>|</p>
<p>EAN: 4251266700609</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Connection</h2>
<p>DHT on breakout board with SMD resistors and LED was used → might need 10 kOhm resistor for bare DHT11</p>
<p><br>&nbsp;</p>
<p>12 = GPIO12</p>
<p>VCC = 3.3V</p>
<p>GND = Gnd</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>test-esp32nmcu.yaml → test-esp32nmcu___working_20221211.bin</h2>
<p>esphome:</p>
<p>&nbsp; name: test-esp32nmcu</p>
<p><br>&nbsp;</p>
<p>esp32:</p>
<p>&nbsp; board: esp32dev</p>
<p>&nbsp; framework:</p>
<p>&nbsp; &nbsp; type: arduino</p>
<p><br>&nbsp;</p>
<p># Enable logging</p>
<p>logger:</p>
<p><br>&nbsp;</p>
<p># Enable Home Assistant API</p>
<p>api:</p>
<p>&nbsp; encryption:</p>
<p>&nbsp; &nbsp; key: "MI1DnjQWboPRECsx7PlLQS4BiR7SQQSpYczCuzpupS4="</p>
<p><br>&nbsp;</p>
<p>ota:</p>
<p>&nbsp; password: "bb47b47929f02cd349e51eddd8602edb"</p>
<p><br>&nbsp;</p>
<p>wifi:</p>
<p>&nbsp; #ssid: !secret wifi_ssid</p>
<p>&nbsp; #password: !secret wifi_password</p>
<p>&nbsp; #ssid: "FRITZ!Box Gastzugang"</p>
<p>&nbsp; #password: "zakihasalittlewiener"</p>
<p>&nbsp; ssid: "FRITZ!Box 7530 GD"</p>
<p>&nbsp; password: "78302839617779115068"</p>
<p><br>&nbsp;</p>
<p>&nbsp; # Optional manual IP</p>
<p>&nbsp; manual_ip:</p>
<p>&nbsp; &nbsp; static_ip: 192.168.178.42</p>
<p>&nbsp; &nbsp; gateway: 192.168.178.1</p>
<p>&nbsp; &nbsp; subnet: 255.255.255.0</p>
<p><br>&nbsp;</p>
<p>&nbsp; # Enable fallback hotspot (captive portal) in case wifi connection fails</p>
<p>&nbsp; ap:</p>
<p>&nbsp; &nbsp; ssid: "Test-Esp32Nmcu Fallback Hotspot"</p>
<p>&nbsp; &nbsp; password: "pJDTx6ABN80C"</p>
<p><br>&nbsp;</p>
<p>captive_portal:</p>
<p><br>&nbsp;</p>
<p>sensor:</p>
<p>&nbsp; - platform: dht</p>
<p>&nbsp; &nbsp; pin: 12</p>
<p>&nbsp; &nbsp; temperature:</p>
<p>&nbsp; &nbsp; &nbsp; name: "Air quality meter Temperature"</p>
<p>&nbsp; &nbsp; humidity:</p>
<p>&nbsp; &nbsp; &nbsp; name: "Air quality meter Humidity"</p>
<p>&nbsp; &nbsp; update_interval: 10s</p>
<p>&nbsp; &nbsp; model: DHT11</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>flashing using ESPHome-Flasher-1.4.0-Windows-x64</h2>
<p><br>&nbsp;</p>
<p>see above</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>activate the sensor in HA</h2>
<p>after some minutes, the ESP32 should appear under Integrations with the initiall assigned name</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_3f1f9bd2d382bd8b.png"></figure>
<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>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_3736a24f705ebf1f.png"></figure>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_da20b167c94ec7a9.png"></figure>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>How to integrate full functionality of Bosch smart home components</h1>
<p><a href="https://github.com/tschamm/boschshc-hass">https://github.com/tschamm/boschshc-hass</a></p>
<p><br>&nbsp;</p>
<p>shc11d14d</p>
<p>192.168.178.34</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Connect via Samba share</h2>
<p><br>&nbsp;</p>
<p>add a Network Location in Windows Explorer</p>
<p><br>&nbsp;</p>
<p>LAN: <a href="smb://192.168.178.32/config">\\192.168.178.32\config</a></p>
<p>WLAN: <a href="smb://192.168.179.43/config">\\192.168.179.43\config</a> → not working??</p>
<p><br>&nbsp;</p>
<p>user: homeassistant</p>
<p>pass: bora</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>cop following folders into the config folder on RaPi:</h2>
<p>custom_components</p>
<p>images</p>
<p>tests</p>
<p><br>&nbsp;</p>
<h2>after restarting HA all components and functions should be available</h2>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Dashboard individualization</h1>
<p><a href="https://smarthomescene.com/guides/top-10-home-assistant-lovelace-themes/">https://smarthomescene.com/guides/top-10-home-assistant-lovelace-themes/</a></p>
<p>If you have not enabled custom themes already, add this to your&nbsp;<strong>configuration.yaml</strong>&nbsp;file and reboot Home Assistant:</p>
<pre><code class="language-plaintext">frontend:</code></pre>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<h1>Guest access</h1>
<p>create a dedicated account for gests:</p>
<p>user: Guest</p>
<p>pass: guest</p>
<p>open http://<a href="smb://192.168.178.32/config">192.168.178.32</a>:8123</p>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<p><a href="https://community.home-assistant.io/t/configuring-a-real-guest-user-an-alternative-approach/455910">https://community.home-assistant.io/t/configuring-a-real-guest-user-an-alternative-approach/455910</a></p>
<p>Hi, I’d like to share the way I approached the configuration of a guest user in my HA and how I worked around some well-known limitations, especially those related to the lack of a global sidebar / default dashboard configuration.</p>
<p>My requirements:</p>
<p>Guest user allowed to login only from the internal network</p>
<p>Only specific views available to the guest user</p>
<p><strong>No need for the guest user to switch to a different dashboard once logged in</strong></p>
<p><strong>No unnecessary items to show up in the sidebar for the guest user (including logbook, media, history, etc)</strong></p>
<p>Basically a sort of kiosk mode without using frontend hacks (<a href="https://github.com/maykar/kiosk-mode">https://github.com/maykar/kiosk-mode&nbsp;2</a>&nbsp;is now deprecated,&nbsp;<a href="https://github.com/Villhellm/custom-sidebar">https://github.com/Villhellm/custom-sidebar</a>&nbsp;is no more working in latest HA versions,&nbsp;<a href="https://github.com/galloween/custom-sidebar-v2">https://github.com/galloween/custom-sidebar-v2</a>&nbsp;works only for admin users).</p>
<p>Requirement&nbsp;#1&nbsp;is the simplest: just create a guest user with a simple password and toggle the&nbsp;<code>Can only log in from the local network</code>&nbsp;option.</p>
<p>Requirement&nbsp;#2&nbsp;is also stright-forward: create a dashboard, add a View for the guest user, under&nbsp;<code>Visibility</code>&nbsp;allow the guest user only to access that view, disable the guest user to access any other view of the dashboard.</p>
<p>Requirement&nbsp;#3&nbsp;is tricky. As we know there is no global default dashboard configuration, it is&nbsp;<i>per-user</i>&nbsp;/&nbsp;<i>per-device</i>.<br>This means the guest user, upon the first login, lands in the over-complicated&nbsp;<code>Overview</code>&nbsp;dashboard and should go in his profile to change the default dashboard. Not something I want them to do neither I want to do it on their behalf.<br>After reading tons of posts here, the simplest approach I found is to take control of the&nbsp;<code>Overview</code>&nbsp;dashboard (if I need the same content I can always create a brand new admin-only dashboard) and put all my views there (both for regular and guest users).<br>True, the name of the&nbsp;<code>Overview</code>&nbsp;dashboard cannot be change as well as the icon but at least in this way every user (guests or not), when logging in, will land to a dashboard populated with the contents I want.</p>
<p>Requirement&nbsp;#4&nbsp;was also a challenge. As we know also the order in which the items show up in the sidebar and which one is hidden or not is&nbsp;<i>per-user</i>&nbsp;/&nbsp;<i>per-device</i>. The way I approched it was the following:</p>
<p>I migrated all my dashbaords into views in order to have a single dashboard only (the&nbsp;<code>Overview</code>&nbsp;one). This is not mandatory of course, just an implementation choice, to avoid taking care of the order in which dashbaords are listed in the sidebar</p>
<p>I disabled in my configuration&nbsp;<code>Energy</code>,&nbsp;<code>Map</code>&nbsp;and&nbsp;<code>Media</code>&nbsp;since not using them at all (Ref.&nbsp;<a href="https://community.home-assistant.io/t/how-can-i-hide-the-energy-media-map-tabs-from-the-sidebar/433297/9">How can I hide the Energy/Media/Map tabs from the sidebar? - #9 by petro&nbsp;5</a>) resulting in the entries to disappear from the sidebar. This required switching from&nbsp;<code>default_config</code>&nbsp;to a long list taken from&nbsp;<a href="https://www.home-assistant.io/integrations/default_config/">Default Config - Home Assistant&nbsp;1</a>&nbsp;and commeting out those not needed</p>
<p>For&nbsp;<code>Logbook</code>&nbsp;and&nbsp;<code>History</code>, which are something I need as an admin but don’t want the other users to access and see, I made them available for admin users only, opting for the approach described in&nbsp;<a href="https://community.home-assistant.io/t/admin-only-access-for-logbook-and-history-menus/187722/44">Admin only access for Logbook and History menus - #44 by dan_mc&nbsp;8</a>. This required to copy the code of the two components from&nbsp;<code>/usr/src/homeassistant/homeassistant/components</code>&nbsp;or&nbsp;<a href="https://github.com/home-assistant/core/tree/master/homeassistant/components">core/homeassistant/components at master · home-assistant/core · GitHub&nbsp;3</a>&nbsp;into&nbsp;<code>config/custom_components</code>, add&nbsp;<code>version</code>&nbsp;to the manifest file and making the views admin-only in&nbsp;<code>async_register_built_in_panel()</code>&nbsp;as described in the other post. Of course maintenance of this could be time-consuming since theoretically the code should be updated upon each upgrade</p>
<p>In this way not only guest user but also any user on any deice, has no need to touch the sidebar, hide unnecessary entries or set a default dashboard<br>Hope can be helpful</p>
<p>Thanks</p>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<h1>Influx DB storing of Arduino data</h1>
<p>Example 1</p>
<p><a href="http://nilhcem.com/iot/home-monitoring-with-mqtt-influxdb-grafana">http://nilhcem.com/iot/home-monitoring-with-mqtt-influxdb-grafana</a></p>
<p><br><br>&nbsp;</p>
<p>Example 2</p>
<p><a href="http://www.iotsharing.com/2021/01/building-smart-home-system-with-home.html">http://www.iotsharing.com/2021/01/building-smart-home-system-with-home.html</a></p>
<p><br><br>&nbsp;</p>
<p>Example 3</p>
<p><a href="https://luigi-saetta.medium.com/evolving-my-home-automation-setup-af0323097d51">https://luigi-saetta.medium.com/evolving-my-home-automation-setup-af0323097d51</a></p>
<p><a href="https://luigi-saetta.medium.com/evolving-my-home-automation-2-e9b30c2eae54">https://luigi-saetta.medium.com/evolving-my-home-automation-2-e9b30c2eae54</a></p>
<p><br><br>&nbsp;</p>
<p>Example 4</p>
<p><a href="https://randomnerdtutorials.com/esp32-influxdb/">https://randomnerdtutorials.com/esp32-influxdb/</a></p>
<p><br><br>&nbsp;</p>
<p><a href="https://randomnerdtutorials.com/esp32-esp8266-sensor-bme280-influxdb/">https://randomnerdtutorials.com/esp32-esp8266-sensor-bme280-influxdb/</a></p>
<p>ssh into rapi via PUTT:</p>
<p><a href="https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/">https://randomnerdtutorials.com/esp32-mqtt-publish-subscribe-arduino-ide/</a></p>
<p><br><br>&nbsp;</p>
<p><a href="https://diyi0t.com/home-assistant-mqtt-tutorial/">https://diyi0t.com/home-assistant-mqtt-tutorial/</a></p>
<p><a href="https://community.home-assistant.io/t/publish-mqtt/324939/2">https://community.home-assistant.io/t/publish-mqtt/324939/2</a></p>
<p><a href="https://www.home-assistant.io/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/">https://www.home-assistant.io/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/</a></p>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<p>https://www.youtube.com/watch?v=U8f5FcnKdyw</p>
<p><br>&nbsp;</p>
<p>Example 5</p>
<p><a href="https://www.dummylabs.com/post/2019-01-13-influxdb-part1/">https://www.dummylabs.com/post/2019-01-13-influxdb-part1/</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>Home Assistant with InfluxDB on Synology</h1>
<p><a href="https://philhawthorne.com/getting-started-with-grafana-influxdb-for-home-assistant/">https://philhawthorne.com/getting-started-with-grafana-influxdb-for-home-assistant/</a></p>
<p><a href="https://philhawthorne.com/installing-home-assistant-io-on-a-synology-diskstation-nas/">https://philhawthorne.com/installing-home-assistant-io-on-a-synology-diskstation-nas/</a></p>
<p><a href="https://www.youtube.com/watch?v=rdvyYRBU7CM">https://www.youtube.com/watch?v=rdvyYRBU7CM</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Home Assistant on Linux VM with Docker, reverse proxy, MQTT and Node Red</h1>
<p><a href="https://selmi.medium.com/home-assistant-in-docker-the-ultimate-setup-16d4669dcb7">https://selmi.medium.com/home-assistant-in-docker-the-ultimate-setup-16d4669dcb7</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Presence detection options</h1>
<p><a href="https://philhawthorne.com/breaking-down-presence-detection-with-home-assistant/">https://philhawthorne.com/breaking-down-presence-detection-with-home-assistant/</a></p>
<p><a href="https://philhawthorne.com/making-home-assistants-presence-detection-not-so-binary/">https://philhawthorne.com/making-home-assistants-presence-detection-not-so-binary/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Automation of dumb devices</h1>
<p><a href="https://philhawthorne.com/making-dumb-dishwashers-and-washing-machines-smart-alerts-when-the-dishes-and-clothes-are-cleaned/">https://philhawthorne.com/making-dumb-dishwashers-and-washing-machines-smart-alerts-when-the-dishes-and-clothes-are-cleaned/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Using external Data Disk</h1>
<p><a href="https://peyanski.com/home-assistant-external-data-disk/">https://peyanski.com/home-assistant-external-data-disk/</a></p>
<p><br><br>&nbsp;</p>
<p><br><br>&nbsp;</p>
<p>Home Assistant Operating System supports storing most data on an external storage medium (e.g. USB attached SSD or HDD). This data disk contains not only user data but also most of the Home Assistant software as well (Core, Supervisor etc.). This means a fast data disk will make the system overall much faster.</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_eb38d3613d558289.png" alt="Graphics showing the architecture of the data disk feature"></figure>
<p>The data disk feature can be used on an existing installation without losing data: The system will move existing data to the external data disk automatically. However, it is recommended to create and download a full&nbsp;<a href="https://www.home-assistant.io/common-tasks/os/#backups"><u>Backup</u></a>&nbsp;before proceeding!</p>
<p>All data on the target disk will be overwritten!</p>
<p>The storage capacity of the external data disk must be larger than the storage capacity of the existing (boot) disk.</p>
<p>If you have been using a data disk previously with Home Assistant Operating System, you need to use your host computer to delete all partitions&nbsp;<i>before</i>&nbsp;using it as a data disk again.</p>
<h3>USING UI TO MOVE THE DATA PARTITION</h3>
<p>Connect the data disk to your system.</p>
<p>Go to&nbsp;<a href="https://my.home-assistant.io/redirect/storage"><strong><u>Settings &gt; System &gt; Storage</u></strong></a>&nbsp;in the UI.</p>
<p>Press the three dots on the top right and choose “Move datadisk”</p>
<p>Select the data disk from the list of available devices.</p>
<p>Press “Move”.</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_bb6004c436b08021.png" alt="Screenshot of the “Move datadisk” feature"></figure>
<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>&nbsp;</p>
<p><code>...</code></p>
<p>&nbsp;</p>
<p><code>data_disk: /dev/mmcblk1p4</code></p>
<p>&nbsp;</p>
<p><code>...</code></p>
<p>Sh</p>
<p>Copy</p>
<p>To get a list of potential targets which can be used by&nbsp;<code>datadisk</code>:</p>
<p><code>ha os datadisk list</code></p>
<p>Sh</p>
<p>Copy</p>
<p>To initiate the move to the new data disk use the&nbsp;<code>move</code>&nbsp;command:</p>
<p><code>ha os datadisk move /dev/sdx</code></p>
<p>Sh</p>
<p>Copy</p>
<p>The system will prepare the data disk and immediately reboot. The reboot will take 10 minutes or more depending on the speed of the new data disk; please be patient!</p>
<p>Using an USB attached SSD can draw quite some power. For instance on Raspberry Pi 3 the official Raspberry Pi power supply (PSU) only provides 2.5A which can be too tight. Use a more powerful power supply if you experience issues. Alternatively use a powered USB hub. Connect the Hub to one of the USB slots of your Raspberry Pi, and connect the SSD to the Hub. In this setup the power supply of the Hub will power the attached device(s).</p>
<p><br><br><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Save DB on USB stick/drive (Hassio)</h1>
<p><a href="https://community.home-assistant.io/t/save-db-on-usb-stick-drive-hassio/82144/24">https://community.home-assistant.io/t/save-db-on-usb-stick-drive-hassio/82144/24</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Running Home Assistant on a Raspberry Pi 3 from an external hard drive</h1>
<p><a href="https://mary.codes/blog/home_automation/running_home_assistant_from_an_external_hard_drive/">https://mary.codes/blog/home_automation/running_home_assistant_from_an_external_hard_drive/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://community.home-assistant.io/t/solved-mount-usb-drive-in-hassio-to-be-used-on-the-media-folder-with-udev-customization/258406/68">https://community.home-assistant.io/t/solved-mount-usb-drive-in-hassio-to-be-used-on-the-media-folder-with-udev-customization/258406/68</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>MQTT with RP2040</h1>
<p><a href="https://learn.adafruit.com/quickstart-rp2040-pico-with-wifi-and-circuitpython/internet-connect">https://learn.adafruit.com/quickstart-rp2040-pico-with-wifi-and-circuitpython/internet-connect</a></p>
<p><a href="https://www.tomshardware.com/how-to/send-and-receive-data-raspberry-pi-pico-w-mqtt">https://www.tomshardware.com/how-to/send-and-receive-data-raspberry-pi-pico-w-mqtt</a></p>
<p><a href="https://www.hackster.io/FrankDelporte/sending-sensor-data-from-raspberry-pi-pico-to-mqtt-445c97">https://www.hackster.io/FrankDelporte/sending-sensor-data-from-raspberry-pi-pico-to-mqtt-445c97</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>Weather</h1>
<h2>accuweather</h2>
<p>BoraEr</p>
<p>ineedweather_90</p>
<p>Follow instruction here to create new App: <a href="https://www.home-assistant.io/integrations/accuweather">https://www.home-assistant.io/integrations/accuweather</a></p>
<p>app: ha_weather</p>
<p>API key: GV0GKNtlJZNUHYZ5YNW6YGySLVVz0Huq</p>
<p><br>&nbsp;</p>
<p>search location key: <a href="https://www.accuweather.com/en/browse-locations">https://www.accuweather.com/en/browse-locations</a></p>
<p><br>&nbsp;</p>
<p>Leinfelden: 2604235, <a href="https://www.accuweather.com/en/de/leinfelden/70771/weather-forecast/2604235">https://www.accuweather.com/en/de/leinfelden/70771/weather-forecast/2604235</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>create a sensor from the weather attributes to plot the data:</p>
<p><a href="https://community.home-assistant.io/t/how-to-extract-temperature-from-weather-card/143260/3">https://community.home-assistant.io/t/how-to-extract-temperature-from-weather-card/143260/3</a></p>
<p><br># Temperatur-Attribut als Extra-Wert</p>
<p>sensor<br>- platform: template<br>sensors:<br>norwegian_temperature:<br>friendly_name: "met.no Temperatur Vorhersage"<br>unit_of_measurement: '°C'<br>value_template: "{{ state_attr('weather.home_musberg', 'temperature') }}"</p>
<p><br>&nbsp;</p>
<h2>openweathermap</h2>
<p><a href="https://www.home-assistant.io/integrations/openweathermap/">https://www.home-assistant.io/integrations/openweathermap/</a></p>
<p><br>&nbsp;</p>
<p>BoraEr</p>
<p>ineedweather_90</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>animated icons in weather card</h2>
<p><a href="https://community.home-assistant.io/t/animated-weather-icons/206736">https://community.home-assistant.io/t/animated-weather-icons/206736</a></p>
<p><a href="https://github.com/wowgamr/animated-weather-card">https://github.com/wowgamr/animated-weather-card</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>read content of DB</h1>
<p><a href="https://sqlitebrowser.org/">https://sqlitebrowser.org/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>InfluxDB: Removing or deleting data</h1>
<p><a href="https://community.home-assistant.io/t/influxdb-removing-or-deleting-data/292637">https://community.home-assistant.io/t/influxdb-removing-or-deleting-data/292637</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Read external InfluxDB in Home Assistant as a sensor</h1>
<p><a href="https://itobey.dev/index.php/read-external-influxdb-in-home-assistant-as-sensor/">https://itobey.dev/index.php/read-external-influxdb-in-home-assistant-as-sensor/</a></p>
<p><br>&nbsp;</p>
<h1>Using both MariaDB and InfluxDB</h1>
<p><a href="https://smarthomescene.com/guides/optimize-your-home-assistant-database/">https://smarthomescene.com/guides/optimize-your-home-assistant-database/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>InfluxDB hassio add-on: changing default database location</h1>
<p><a href="https://community.home-assistant.io/t/influxdb-hassio-add-on-changing-default-database-location/172354/10">https://community.home-assistant.io/t/influxdb-hassio-add-on-changing-default-database-location/172354/10</a></p>
<p><a href="https://community.home-assistant.io/t/where-does-influx-store-db-files-in-hassio/105502">https://community.home-assistant.io/t/where-does-influx-store-db-files-in-hassio/105502</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>location of influxdb database: <a href="https://community.home-assistant.io/t/influxdb-location-of-database-on-hass-io/169916/15">https://community.home-assistant.io/t/influxdb-location-of-database-on-hass-io/169916/15</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Remote access</h1>
<p><a href="https://peyanski.com/home-assistant-remote-access/#What_if_Home_Assistant_Remote_Access_is_not_working_or_you_loose_your_local_access">https://peyanski.com/home-assistant-remote-access/#What_if_Home_Assistant_Remote_Access_is_not_working_or_you_loose_your_local_access</a></p>
<p><br><br>&nbsp;</p>
<p><a href="https://siytek.com/home-assistant-remote/">https://siytek.com/home-assistant-remote/</a></p>
<p><a href="https://community.home-assistant.io/t/how-to-configure-remote-access-with-lets-encrypt/391432">https://community.home-assistant.io/t/how-to-configure-remote-access-with-lets-encrypt/391432</a></p>
<p><br>&nbsp;</p>
<h2>create DuckDNS subdomain:</h2>
<p>Duckdns.org</p>
<p>account boraers@googlemail.com</p>
<p>type free</p>
<p>token 799093a4-0b34-454f-99cb-25a4637bf404</p>
<p>Domain: https://habora.duckdns.org</p>
<p><br>&nbsp;</p>
<p>attention: if router is restartet, configuration of duckdns has to be updated!</p>
<p><br>&nbsp;</p>
<p>to be accessed via the HA app:</p>
<p><a href="https://habora.duckdns.org:8123/">https://habora.duckdns.org:8123/</a></p>
<p><br>&nbsp;</p>
<p>https://192.168.178.32:8123/</p>
<p><br>&nbsp;</p>
<p>https://habora.duckdns.org</p>
<p>habora.duckdns.org</p>
<p>duckdns.org</p>
<h2>edit configuration of DuckDNS addon:</h2>
<p>domains:<br>- https://habora.duckdns.org<br>token: 799093a4-0b34-454f-99cb-25a4637bf404<br>aliases: []<br>lets_encrypt:<br>accept_terms: true<br>algo: secp384r1<br>certfile: fullchain.pem<br>keyfile: privkey.pem<br>seconds: 300</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>install Let's Encrypt addon</h2>
<p><br><br>&nbsp;</p>
<p>domains:<br>- habora.duckdns.org<br>email: boraers@googlemail.com<br>keyfile: privkey.pem<br>certfile: fullchain.pem<br>challenge: http<br>dns: {}</p>
<p><br>&nbsp;</p>
<h2>port forwarding in fritz.box</h2>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_382f235fa92119d6.png"></figure>
<p><br>&nbsp;</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_b6f47a768db3e3a0.png"></figure>
<p><br>&nbsp;</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_aa3e230b366baeb8.png"></figure>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Start Let's Encrypt addon</h2>
<p><br>&nbsp;</p>
<figure class="image"><img src="file:///tmp/lu288339yycf.tmp/lu288339yyea_tmp_b50f5b35e0e18814.png"></figure>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>check access via calling the subomain (no https yet)</h2>
<p><a href="http://192.168.178.32:8123/">http://192.168.178.32:8123/</a></p>
<p>→ this can be done already from the internet</p>
<p>→ the login screen of HA should appear</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Enable HTTPS on your HA Install</h2>
<p><br>&nbsp;</p>
<p>edit configuration.yaml:</p>
<p>http:</p>
<p>ssl_certificate: /ssl/fullchain.pem</p>
<p>ssl_key: /ssl/privkey.pem</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>attention: different HA installation need other paths:</p>
<p><a href="https://community.home-assistant.io/t/remote-access-for-home-assistant/206072">https://community.home-assistant.io/t/remote-access-for-home-assistant/206072</a></p>
<p>Home Assistant OS or Supervised: → Let's Encrypt addon must be installed!</p>
<p>http:</p>
<p>ssl_certificate: /ssl/fullchain.pem</p>
<p>ssl_key: /ssl/privkey.pem</p>
<p><br>&nbsp;</p>
<p>Home Assistant Container:</p>
<p>You’ll need to mount the location with your SSL keys and certificates to /ssl/ in the container.</p>
<p>http:</p>
<p>ssl_certificate: /ssl/fullchain.pem</p>
<p>ssl_key: /ssl/privkey.pem</p>
<p><br>&nbsp;</p>
<p>Home Assistant Core:</p>
<p>http:</p>
<p>ssl_certificate: /etc/letsencrypt/live/hass.example.com/fullchain.pem</p>
<p>ssl_key: /etc/letsencrypt/live/hass.example.com/privkey.pem</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>restart HA</h2>
<p>after restart, HA should only be available via https:</p>
<p>internall: <a href="https://192.168.178.32:8123/">https://192.168.178.32:8123/</a></p>
<p>externall: <a href="https://habora.duckdns.org:8123/">https://habora.duckdns.org:8123/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Harden the Home Assistant Remote Access Security more</h2>
<p>Harden the Home Assistant remote access even more by enabling MFA</p>
<p><br>&nbsp;</p>
<p>Activating ip_ban_option and Multi-factor Authentication Modules is a must if you enable your Home Assistant Remote Access in the way that i’m showing with the port forwarding and SSL. So don’t skip this!</p>
<p><br>&nbsp;</p>
<p><a href="https://www.youtube.com/watch?v=jblBRuW1lu4">https://www.youtube.com/watch?v=jblBRuW1lu4</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Fritz Box Aktualisierungsanforderung mit DuckDNS</h2>
<p><a href="https://avm.de/service/wissensdatenbank/dok/FRITZ-Box-7590/30_Dynamic-DNS-in-FRITZ-Box-einrichten/">https://avm.de/service/wissensdatenbank/dok/FRITZ-Box-7590/30_Dynamic-DNS-in-FRITZ-Box-einrichten/</a></p>
<p>Klicken Sie in der Benutzeroberfläche der FRITZ!Box auf "Internet".</p>
<p>Klicken Sie im Menü "Internet" auf "Freigaben".</p>
<p>Klicken Sie auf die Registerkarte "DynDNS".</p>
<p>Aktivieren Sie die Option "DynDNS benutzen".</p>
<p>Tragen Sie im Feld "Update-URL" die Update-URL für Ihren Anbieter ein. Falls die Aktualisierungsanforderung sowohl für IPv4 als auch für IPv6 durchgeführt werden soll und Ihr Anbieter für IPv4 und IPv6 verschiedene Update-URLs erwartet, tragen Sie beide Update-URLs mit einem Leerzeichen getrennt ein.</p>
<p>Hinweis:Beispiele für Update-URLs verschiedener Anbieter finden Sie unten in dieser Anleitung. Falls Ihr Anbieter da nicht genannt wird, können Sie die Update-URL wie im Abschnitt "Update-URL selbst erstellen" beschrieben selbst erstellen.</p>
<p>Tragen Sie im Feld "Domainnamen" den Domainnamen ein, den Sie bei Ihrem Anbieter festgelegt haben.</p>
<p>Tragen Sie im Feld "Benutzername" den Benutzernamen Ihres Benutzerkontos beim Anbieter ein.</p>
<p>Tragen Sie im Feld "Kennwort" das Kennwort Ihres Benutzerkontos beim Anbieter ein.</p>
<p>Klicken Sie zum Speichern der Einstellungen auf "Übernehmen".</p>
<p>Jetzt übermittelt die FRITZ!Box nach dem Herstellen jeder Internetverbindung ihre jeweils aktuellen IP-Adressen an den Anbieter und ist somit immer unter ihrem individuellen Dynamic-DNS-Domainnamen erreichbar.</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>DuckDNS.org</p>
<p>Die Update-URL für die IPv4- und die IPv6-Adresse:</p>
<p>https://www.duckdns.org/update?domains=&lt;domain&gt;&amp;token=&lt;pass&gt;&amp;ip=&lt;ipaddr&gt;&amp;ipv6=&lt;ip6addr&gt;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>GoogleNest TTS issues after setting up ssl</h1>
<p><a href="https://www.home-assistant.io/integrations/tts">https://www.home-assistant.io/integrations/tts</a></p>
<p><br>&nbsp;</p>
<p><a href="https://community.home-assistant.io/t/tts-with-ssl-on/207875/3">https://community.home-assistant.io/t/tts-with-ssl-on/207875/3</a></p>
<p><br>&nbsp;</p>
<p>DNS-Rebind-Schutz</p>
<p><a href="https://avm.de/service/wissensdatenbank/dok/FRITZ-Box-7390/663_DNS-Auflosung-privater-IP-Adressen-nicht-moglich/">https://avm.de/service/wissensdatenbank/dok/FRITZ-Box-7390/663_DNS-Auflosung-privater-IP-Adressen-nicht-moglich/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>formatting of dates</h1>
<p><br>&nbsp;</p>
<p>filename: /Data/cams/{{ now().strftime("%Y-%m-%d %H.%M.%S") }} {{ entity_id.name }}.jpg</p>
<p>filename: ‘/tmp/armcrest_camera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg’</p>
<p>filename: '/home/homeassistant/.homeassistant/www/armcrest_camera_{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg'</p>
<p><br>&nbsp;</p>
<p>filename: &gt;-<br>/config/www/rtsp_esp32_{{ "%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</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>HA Examples</h1>
<p><a href="https://www.home-assistant.io/examples/">https://www.home-assistant.io/examples/</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>Müllkalender</h1>
<p><a href="https://smarthomeyourself.de/wiki/homeassistant/muellkalender-darstellung-mit-tagen-datum-in-einer-zeile/">https://smarthomeyourself.de/wiki/homeassistant/muellkalender-darstellung-mit-tagen-datum-in-einer-zeile/</a></p>
<p>Der folgende Eintrag muss in die configuration.yaml</p>
<p>waste_collection_schedule:</p>
<p>sources:</p>
<p>- name: ics</p>
<p>args:</p>
<p>file: "www/abfall.ics"</p>
<p>customize:</p>
<p>- type: Restabfall</p>
<p>alias: Restabfall</p>
<p>icon: mdi:trash-can</p>
<p>- type: Papiertonne</p>
<p>alias: Papiertonne</p>
<p>icon: mdi:trash-can</p>
<p>- type: Bioabfall</p>
<p>alias: Bioabfall</p>
<p>icon: mdi:trash-can</p>
<p>fetch_time: "04:00"</p>
<p>day_switch_time: "10:00"</p>
<p><br>&nbsp;</p>
<p>sensor:</p>
<p>- platform: waste_collection_schedule</p>
<p>name: Papierabfall_date</p>
<p>value_template: '{{value.date.strftime("%d.%m.%Y")}}'</p>
<p>types:</p>
<p>- Papiertonne</p>
<p>- platform: waste_collection_schedule</p>
<p>name: Papierabfall_collection</p>
<p>value_template: "{{value.daysTo}}"</p>
<p>types:</p>
<p>- Papiertonne</p>
<p>&nbsp;</p>
<p>- platform: waste_collection_schedule</p>
<p>name: Restmuelltonne_date</p>
<p>value_template: '{{value.date.strftime("%d.%m.%Y")}}'</p>
<p>types:</p>
<p>- Restabfall</p>
<p>- platform: waste_collection_schedule</p>
<p>name: Restmuelltonne_collection</p>
<p>value_template: "{{value.daysTo}}"</p>
<p>types:</p>
<p>- Restabfall</p>
<p>&nbsp;</p>
<p>- platform: waste_collection_schedule</p>
<p>name: Biotonne_date</p>
<p>value_template: '{{value.date.strftime("%d.%m.%Y")}}'</p>
<p>types:</p>
<p>- Bioabfall</p>
<p>- platform: waste_collection_schedule</p>
<p>name: Biotonne_collection</p>
<p>value_template: "{{value.daysTo}}"</p>
<p>types:</p>
<p>- Bioabfall</p>
<p>&nbsp;</p>
<p>- platform: waste_collection_schedule</p>
<p>name: next_waste_collection_daysto</p>
<p>details_format: upcoming</p>
<p>value_template: '{{value.types|join(", ")}} in {{value.daysTo}} Tagen'</p>
<p>&nbsp;</p>
<p>#button-card#</p>
<p>- platform: waste_collection_schedule</p>
<p>name: MyButtonCardSensor</p>
<p>value_template: '{{value.types|join(", ")}}|{{value.daysTo}}|{{value.date.strftime("%d.%m.%Y")}}|{{value.date.strftime("%a")}}'</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>Folgende Integrationen aus dem HACS Store sind dafür notwendig:</p>
<p>custom-cards/button-card</p>
<p>custom:multiple-entity-row</p>
<p><br>&nbsp;</p>
<p>type: entities</p>
<p>entities:</p>
<p>- entity: sensor.restmuelltonne_date</p>
<p>style: |</p>
<p>:host {</p>
<p>color: grey;</p>
<p>}</p>
<p>icon: 'mdi:delete-empty'</p>
<p>show_state: false</p>
<p>type: 'custom:multiple-entity-row'</p>
<p>name: Schwarze Tonne</p>
<p>secondary_info: last-changed</p>
<p>entities:</p>
<p>- entity: sensor.restmuelltonne_collection</p>
<p>name: Abholung in</p>
<p>unit: Tage(n)</p>
<p>- entity: sensor.restmuelltonne_date</p>
<p>name: Datum</p>
<p>- entity: sensor.biotonne_date</p>
<p>style: |</p>
<p>:host {</p>
<p>color: brown;</p>
<p>}</p>
<p>icon: 'mdi:bio'</p>
<p>show_state: false</p>
<p>type: 'custom:multiple-entity-row'</p>
<p>name: Braune Tonne</p>
<p>secondary_info: last-changed</p>
<p>entities:</p>
<p>- entity: sensor.biotonne_collection</p>
<p>name: Abholung in</p>
<p>unit: Tage(n)</p>
<p>- entity: sensor.biotonne_date</p>
<p>name: Datum</p>
<p>- entity: sensor.papierabfall_date</p>
<p>style: |</p>
<p>:host {</p>
<p>color: blue</p>
<p>}</p>
<p>icon: 'mdi:tree'</p>
<p>show_state: false</p>
<p>type: 'custom:multiple-entity-row'</p>
<p>name: Blaue Tonne</p>
<p>secondary_info: last-changed</p>
<p>entities:</p>
<p>- entity: sensor.papierabfall_collection</p>
<p>name: Abholung in</p>
<p>unit: Tage(n)</p>
<p>- entity: sensor.papierabfall_date</p>
<p>name: Datum</p>
<p>- entity: sensor.mybuttoncardsensor</p>
<p>type: 'custom:button-card'</p>
<p>layout: icon_name_state2nd</p>
<p>show_label: true</p>
<p>label: |</p>
<p>[[[</p>
<p>var days_to = entity.state.split("|")[1]</p>
<p>if (days_to == 0)</p>
<p>{ return "Heute" }</p>
<p>else if (days_to == 1)</p>
<p>{ return "Morgen" }</p>
<p>else</p>
<p>{ return "in " + days_to + " Tagen" }</p>
<p>]]]</p>
<p>show_name: true</p>
<p>name: |</p>
<p>[[[</p>
<p>return entity.state.split("|")[0]</p>
<p>]]]</p>
<p>state:</p>
<p>- color: red</p>
<p>operator: template</p>
<p>value: '[[[ return entity.state.split("|")[1] == 0 ]]]'</p>
<p>- color: orange</p>
<p>operator: template</p>
<p>value: '[[[ return entity.state.split("|")[1] == 1 ]]]'</p>
<p>- value: default</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>connect LED strip</h1>
<p><a href="https://de.banggood.com/SOLMORE-Smart-APP-WiFi-LED-Strip-Controller-+-24-Keys-Remote-Control-Work-with-Alexa-Google-Assistant-p-1658159.html?cur_warehouse=CN">https://de.banggood.com/SOLMORE-Smart-APP-WiFi-LED-Strip-Controller-+-24-Keys-Remote-Control-Work-with-Alexa-Google-Assistant-p-1658159.html?cur_warehouse=CN</a></p>
<p><strong>Connection step:</strong></p>
<p>The app name is "Smart Life", please search for and install the app on Google Play or Apple Store.</p>
<p>Step 1: Scan code download APP</p>
<p>Step 2: Make sure your phone is connected to wifi</p>
<p>Step 3: Press "+" to add the button and select "Lighting"</p>
<p>Step 4: Long press the controller to make the light flash</p>
<p>Step 5: Press the Confirm Flash button on your phone</p>
<p>Step 6: Enter the WiFi password and confirm</p>
<p>Step 7: Wait for the connection to succeed</p>
<p>Step 8: Start using</p>
<p><br>&nbsp;</p>
<p>boraers@gmail.com</p>
<p>tuyaforsmarthome_90</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://www.home-assistant.io/integrations/tuya">https://www.home-assistant.io/integrations/tuya</a></p>
<p>Cloud &gt; Development &gt;</p>
<p><br>&nbsp;</p>
<p><a href="https://iot.tuya.com/">https://iot.tuya.com/</a></p>
<p>boraers@googlemail.com</p>
<p>tuyaforsmarthome_90</p>
<p><br>&nbsp;</p>
<p>UserID: boraers@gmail.com</p>
<p><br>&nbsp;</p>
<p>Access ID/Client ID: 9wk4ecspwhveyycxev3r</p>
<p>Access Secret/Client Secret: 2c0ee61b3377443a88a94a611e1563e1</p>
<p>Project Code: p1671915179957wxkk7v</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>→ tuya integration in HA should recognize device → enter credentials</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://gadget-freakz.com/tuya-smart-life-integrated-into-home-assistant/#Smart_Life_application_tested">https://gadget-freakz.com/tuya-smart-life-integrated-into-home-assistant/#Smart_Life_application_tested</a></p>
<p>Add smart life to Home Assistant</p>
<p>You probably know us, we don’t want to use more apps. we want to control everything from one central home automation platform: Home Assistant in our case.</p>
<p>As told before: Make sure to can devices added in Smart Life before you can add them into Home Assistant.</p>
<p><br>&nbsp;</p>
<p>For all the parameters and settings: https://www.home-assistant.io/components/tuya/</p>
<p><br>&nbsp;</p>
<p>A sample configuration from me. 31 is the country code of The Netherlands. You can find your country codes in the second column of this site. The entry smart_life is the Tuya platform where I am registered. Add this into your own configuration.yaml and restart your Home Assistant instance. After starting it collects the compatible devices from Tuya. In my case only the Blitzwolf light.</p>
<p><br>&nbsp;</p>
<p>tuya:</p>
<p>username: xxx</p>
<p>password: xxx</p>
<p>country_code: 49</p>
<p>platform: smart_life</p>
<p>After changing your configuration, restart and check out Unused devices. In my case I have 2 products in Smart Life and only one is supported for now in Home Assistant: the Blitzwolf Led Light strip.</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Use local Tuya</h1>
<p><a href="https://github.com/rospogrigio/localtuya">https://github.com/rospogrigio/localtuya</a></p>
<p><a href="https://community.home-assistant.io/t/am-i-missing-something-no-color-on-light-in-scene/373591/14">https://community.home-assistant.io/t/am-i-missing-something-no-color-on-light-in-scene/373591/14</a></p>
<p>Add your bulbs as new devices with the following settings:</p>
<p>ID: 20</p>
<p>Brightness: 22</p>
<p>Color Temperature: 23</p>
<p>Brightness Lower Value: 0</p>
<p>Brightness Upper Value: 1000</p>
<p>Color Mode: 21</p>
<p>Color: 24</p>
<p>Minimum Color Temperature: 2701</p>
<p>Maximum Color Temperature: 6499</p>
<p>Scene: 25</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Get local key tuya since June 2022:</h2>
<p><a href="https://community.home-assistant.io/t/get-local-key-tuya-since-june-2022/436399/7">https://community.home-assistant.io/t/get-local-key-tuya-since-june-2022/436399/7</a></p>
<p><a href="https://www.youtube.com/watch?v=2kfv0W80NYk&amp;t=481s">https://www.youtube.com/watch?v=2kfv0W80NYk&amp;t=481s</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>45625580bcddc2a2bf27: "local_key": "4b1e7572e8b54ca3", Hama_LED</p>
<p>bf3d5d9718ef1b2a8c5asm: "local_key": "67426b621cacaf5f", Treppe</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>Issue: Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists</p>
<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>&nbsp;</p>
<p><code>&nbsp; - host: 192.168.1.215</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; device_id: xxx</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; local_key: xxx</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; friendly_name: Tuya Device</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; protocol_version: "3.3"</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; entities:</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; - platform: sensor</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; friendly_name: Plug Voltage</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; id: 20</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; scaling: 0.1 # Optional</code></p>
<p>&nbsp;</p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; device_class: voltage # Optional</code></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>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Flash Tasmota on Hama LED</h1>
<p><br>&nbsp;</p>
<p>Check compatibilit</p>
<p><a href="https://templates.blakadder.com/search.html">https://templates.blakadder.com/search.html</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><strong>Flashing:</strong></p>
<p><a href="https://siytek.com/esphome-vs-tasmota/#Flashing">https://siytek.com/esphome-vs-tasmota/#Flashing</a></p>
<p><a href="https://siytek.com/flashing-tasmota-methods/#Flashing-Tasmota-Online-using-Chrome-Browser">https://siytek.com/flashing-tasmota-methods/#Flashing-Tasmota-Online-using-Chrome-Browser</a></p>
<p><a href="https://tasmota.github.io/docs/Tuya-Convert/">https://tasmota.github.io/docs/Tuya-Convert/</a></p>
<p><br>&nbsp;</p>
<p><a href="https://siytek.com/tuya-convert-linux/">https://siytek.com/tuya-convert-linux/</a></p>
<p>sudo apt-get update</p>
<p>sudo apt-get upgrade</p>
<p>sudo apt-get install git</p>
<p>cd ~</p>
<p>git clone https://github.com/ct-Open-Source/tuya-convert</p>
<p>cd tuya-convert</p>
<p>sudo ./install_prereq.sh</p>
<p>sudo ./start_flash.sh</p>
<p><br>&nbsp;</p>
<p><strong>How To Use Tuya Convert On Raspberry Pi (Step-by-step Guide)</strong></p>
<p><a href="https://siytek.com/tuya-convert-and-raspberry-pi/">https://siytek.com/tuya-convert-and-raspberry-pi/</a></p>
<p>sudo apt-get update</p>
<p>sudo apt-get upgrade</p>
<p>sudo raspi-config → network options → select WiFi and enter your location and credentials → finish</p>
<p>rfkill unblock wifi</p>
<p>sudo apt-get install git</p>
<p>cd ~</p>
<p>git clone https://github.com/ct-Open-Source/tuya-convert</p>
<p>cd tuya-convert &amp;&amp; sudo su</p>
<p>sudo ./install_prereq.sh</p>
<p>sudo ./start_flash.sh</p>
<p><br>&nbsp;</p>
<p>→ <a href="http://10.42.42.1/">http://10.42.42.1/</a> using tasmota-xxxxx SSID → 192.168.4.1</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><strong>timeout issue with latest Ri OS version!</strong></p>
<p><a href="https://github.com/ct-Open-Source/tuya-convert/issues/1022">https://github.com/ct-Open-Source/tuya-convert/issues/1022</a></p>
<p><a href="https://www.drejo.com/blog/neo-tuya-tasmota/">https://www.drejo.com/blog/neo-tuya-tasmota/</a></p>
<p>solution: install old version: <a href="https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-05-28/2020-05-27-raspios-buster-arm64.zip">https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-05-28/2020-05-27-raspios-buster-arm64.zip</a></p>
<p><br>&nbsp;</p>
<p><strong>issue</strong>: N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.</p>
<p><strong>solution</strong>: apt-get --allow-releaseinfo-change update</p>
<p><a href="https://support.prepaid-hoster.de/faq/de/virtuelle-server/apt-fehler-this-must-be-accepted-explicitly-before-updates-for-this-repository-can-be-applied.html">https://support.prepaid-hoster.de/faq/de/virtuelle-server/apt-fehler-this-must-be-accepted-explicitly-before-updates-for-this-repository-can-be-applied.html</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><a href="https://siytek.com/how-to-set-up-tasmota-mqtt-auto-discovery-for-home-assistant/">https://siytek.com/how-to-set-up-tasmota-mqtt-auto-discovery-for-home-assistant/</a></p>
<p><a href="https://templates.blakadder.com/hama_00176547.html">https://templates.blakadder.com/hama_00176547.html</a></p>
<p>Hama 10W 806lm RGBW Bulb (00176547)</p>
<p>{"NAME":"Hama Smart WiF","GPIO":[0,0,0,0,37,40,0,0,38,0,39,0,0],"FLAG":0,"BASE":18}</p>
<p><br>&nbsp;</p>
<p>In order to turn on discovery mode so that Home Assistant can auto discover our device, we must turn on SetOption 19. Simply enter the following command in the Tasmota console.</p>
<p><strong>SetOption19 onws</strong></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><strong>Whether your wireless card support Access Point mode.</strong></p>
<p><a href="https://askubuntu.com/questions/180733/how-to-create-a-wi-fi-hotspot-in-access-point-mode/180734#180734">https://askubuntu.com/questions/180733/how-to-create-a-wi-fi-hotspot-in-access-point-mode/180734#180734</a></p>
<p>sudo apt-get update</p>
<p>sudo apt-get -y install aptitude</p>
<p>sudo aptitude install iw</p>
<p>iw list</p>
<p>→ Look for supported interface section, where it should be a entry called AP like below</p>
<p><br>&nbsp;</p>
<p><strong>updateBroadcom wifi driver</strong></p>
<p><a href="https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers">https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers</a></p>
<p><a href="https://www.technolaty.com/how-to-install-wireless-drivers-on-ubuntu/">https://www.technolaty.com/how-to-install-wireless-drivers-on-ubuntu/</a></p>
<p>sudo lshw -C network</p>
<p>sudo apt install firmware-b43-installer</p>
<p>sudo apt install linux-firmware</p>
<p>sudo reboot</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>simulate sunrise</h1>
<p>Sunrise:</p>
<p><a href="https://siytek.com/how-to-simulate-a-sunrise-with-home-assistant/">https://siytek.com/how-to-simulate-a-sunrise-with-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>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>RP2040 Micropython</h1>
<h2>PIR sensor + MQTT</h2>
<p><a href="https://www.tomshardware.com/how-to/send-and-receive-data-raspberry-pi-pico-w-mqtt">https://www.tomshardware.com/how-to/send-and-receive-data-raspberry-pi-pico-w-mqtt</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p>install MicroPython firmware:</p>
<p><a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-setup">https://www.tomshardware.com/how-to/raspberry-pi-pico-setup</a></p>
<p><a href="https://micropython.org/download/rp2-pico-w/">https://micropython.org/download/rp2-pico-w/</a></p>
<p>1. Download the MicroPython UF2 file for your model of Raspberry Pi Pico.</p>
<p><br>&nbsp;</p>
<p>2. Push and hold the BOOTSEL button on the Pico, then connect to your computer using a micro USB cable. Release BOOTSEL once the drive RPI-RP2 appears on your computer.</p>
<p><br>&nbsp;</p>
<p>3. Drag and drop the UF2 file on to the RPI-RP2 drive. The Raspberry Pi Pico will reboot and will now run MicroPython.</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Ultrasonic sensor</h2>
<p><a href="https://microcontrollerslab.com/hc-sr04-ultrasonic-sensor-raspberry-pi-pico-micropython-tutorial/">https://microcontrollerslab.com/hc-sr04-ultrasonic-sensor-raspberry-pi-pico-micropython-tutorial/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h2>Adafruit QT Py RP2040</h2>
<p><a href="https://learn.adafruit.com/adafruit-qt-py-2040">https://learn.adafruit.com/adafruit-qt-py-2040</a></p>
<p><br>&nbsp;</p>
<p>Micopthon formware:</p>
<p><a href="https://micropython.org/download/ADAFRUIT_QTPY_RP2040/">https://micropython.org/download/ADAFRUIT_QTPY_RP2040/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Seeed Xiao ESP32C3</h1>
<p><a href="https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/">https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>Force influxdb to update in regular intervals</h1>
<p><a href="https://www.reddit.com/r/homeassistant/comments/pa8x5r/write_to_influxdb_at_regular_intervals/">https://www.reddit.com/r/homeassistant/comments/pa8x5r/write_to_influxdb_at_regular_intervals/</a></p>
<p><a href="https://community.home-assistant.io/t/send-metrics-to-influxdb-at-regular-intervals/9096">https://community.home-assistant.io/t/send-metrics-to-influxdb-at-regular-intervals/9096</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<h1>water meter; AI-on-the-edge</h1>
<p><a href="https://www.youtube.com/watch?v=iUgxwbfkIqU">https://www.youtube.com/watch?v=iUgxwbfkIqU</a></p>
<p><a href="https://www.arducam.com/esp32-machine-vision-learning-guide/">https://www.arducam.com/esp32-machine-vision-learning-guide/</a></p>
<p><a href="https://www.youtube.com/watch?v=mDIJEyElkAU">https://www.youtube.com/watch?v=mDIJEyElkAU</a></p>
<p><a href="https://www.youtube.com/watch?v=zb3AEusPQLQ">https://www.youtube.com/watch?v=zb3AEusPQLQ</a></p>
<p><a href="https://www.youtube.com/watch?v=s6qQs4FN9B0">https://www.youtube.com/watch?v=s6qQs4FN9B0</a></p>
<p><br>&nbsp;</p>
<p><br>&nbsp;</p>
<p><a href="https://www.thingiverse.com/thing:4573481">https://www.thingiverse.com/thing:4573481</a></p>
<p><a href="https://github.com/jomjol/AI-on-the-edge-device/wiki">https://github.com/jomjol/AI-on-the-edge-device/wiki</a></p>
<p><a href="https://github.com/jomjol/water-meter-system-complete">https://github.com/jomjol/water-meter-system-complete</a></p>
<p><br>&nbsp;</p>
<p><a href="https://www.hackster.io/mickeb/esp32-cam-real-time-water-usage-sensor-f9c29d">https://www.hackster.io/mickeb/esp32-cam-real-time-water-usage-sensor-f9c29d</a></p>
<p><br>&nbsp;</p>
<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 didn’t 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>
