Editing
Home Assistant
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Tips= [[http://home-assistant.io/common-tasks/os/ Common Tasks HAOS]]<br> {{template:top}} ==Alexa without Nabu Casa== 1. Install Node Red Add-on to Home Assistant.<br> 2. Add the node-red-contrib-alexa-cakebaked node to the pallete.<br> 3. Here’s the magic. Create an account on Ben Hardill’s website. Ben maintains the magic link between Alexa and Node Red. He does all of the AWS work for you. Adding devices could not be easier. I have 40 devices on his server now, and adding a new device takes about two minutes. If I am slow. Ben offers this service to the community for free, but I strongly recommend that you to commit a $1/month sponsorship through Github.<br> In this example, I will add a Sonoff Mini R4 that I just flashed with ESPHome. Alexa will know it as “Fred”, and Home Assistane already knows the ESPHome device as “sonoffminir4”. Open the Hardill site and click on devices.<br> Click on Add Device. As in the image below, I named the device “Fred”, and made it a simple on-off<br> [[File:Hardill- Add New Device.jpg]]<br clear=all> After adding the device to your Hardill account, tell Alexa to “Discover”. About a minute later, Alexa announces that she had found a new device: “Fred”. In Home Assistant/Node-Red, drop the Alexa-home node on your flow. The first time you open it you will need to configure the node with your Alexa login credentials. You should find Fred in the device dropdown. It isn’t alphabetic, but the most recent device added is usually at the bottom of the list. Select Fred then click on “Done”.<br> [[File:NodeRed- Edit Alexa Home Node device.jpg]]<br clear=all> I added a debug node to show that Alexa is responding to “Fred”. Deploy, then select the Debug panel:<br> [[File:NodeRed- Flow- Fred.jpg]]<br clear=all> Now, when I say “Alexa, turn on Fred”, the Alexa Home node outputs a command, “TurnOnRequest” for on and “TurnOffRequest” for off.<br> [[File:NodeRed- Flow- Fred- Debug.jpg]]<br clear=all> From here you can do just about anything you want with the Node Red flow. But, I just want to turn the Sonoff switch on or off, so I added a switch node to determine if the command was “TurnOnRequest” or “TurnOffRequest”. Then a Change Node to change the payload to “on” or “off”, then finally into a “Call Service” node to tell Home Assistant to turn Fred on or off.<br> [[File:NodeRed- Flow- Fred- Complete.jpg]]<br clear=all> ===the flow code=== <code>[{"id":"a0859613214d75bc","type":"alexa-home","z":"5d1b0398.99236c","conf":"49ef520c.ed4c0c","device":"199512","acknoledge":true,"name":"Fred","topic":"","x":190,"y":2860,"wires":[["d3e7050d43452a6f"]]},{"id":"d3e7050d43452a6f","type":"switch","z":"5d1b0398.99236c","name":"on or off","property":"command","propertyType":"msg","rules":[{"t":"eq","v":"TurnOnRequest","vt":"str"},{"t":"eq","v":"TurnOffRequest","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":360,"y":2860,"wires":[["b295e70dfb6e5e97"],["4da578b998f05402"]]},{"id":"b295e70dfb6e5e97","type":"change","z":"5d1b0398.99236c","name":"Set payload to on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":2840,"wires":[["4e46a720527e90e6"]]},{"id":"4da578b998f05402","type":"change","z":"5d1b0398.99236c","name":"Set payload to off","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":2880,"wires":[["233cec751d2910a7"]]},{"id":"4e46a720527e90e6","type":"api-call-service","z":"5d1b0398.99236c","name":"Turn Fred On","server":"cc0d1734.6963a8","version":5,"debugenabled":true,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.sonoffminir4_sonoffminir4"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":800,"y":2840,"wires":[[]]},{"id":"233cec751d2910a7","type":"api-call-service","z":"5d1b0398.99236c","name":"Turn Fred Off","server":"cc0d1734.6963a8","version":5,"debugenabled":true,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.sonoffminir4_sonoffminir4"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":790,"y":2880,"wires":[[]]},{"id":"49ef520c.ed4c0c","type":"alexa-home-conf","username":"SteveMann","info":"https://alexa-node-red.bm.hardill.me.uk/"},{"id":"cc0d1734.6963a8","type":"server","name":"Home Assistant- Raspberry","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]</code> {{template:top}} ==Assign an area to an entity== You can change the device area in the Advanced Settings [[Home_Assistant#Rename_Entities|here]]. {{template:top}} ==Bluetooth== [[tips-bluetooth|Bluetooth]]<br> ==Dashboard Tips== ===Dwains Dashboard=== [https://www.youtube.com/watch?v=d3Tb7Fy8AIg YouTube tutorial-] Automatically Create Home Assistant Dashboards! NO YAML!<br> {{template:top}} ==[[Home_Assistant#Delete_an_Automation_2|Delete an Automation]]<br>== {{template:top}} ==Delete an MQTT device== <b>1.</b> In "Devices", click on the device to delete<br> [[File:device to delete.jpg|frame|left]]<br clear=all> <br> <b>2.</b> Click on the kebab menu to delete the device.<br> [[File:device to delete-2.jpg|frame|left]]<br clear=all> <br> If the device pops up again with the old data, then it might be that its still in MQTT with a RETAIN tag. To delete from MQTT the easiest way is to use MQTT-Explorer. connect it to your MQTT instance and just delete the old tasmota switch. {{template:top}} ==Delete the database file== The database file can get pretty big, so I delete it every few months.<br> -rw-r--r-- 1 root root 866.4M Dec 22 11:35 home-assistant_v2.db -rw-r--r-- 1 root root 32.0K Dec 22 11:35 home-assistant_v2.db-shm -rw-r--r-- 1 root root 5.0M Dec 22 11:36 home-assistant_v2.db-wal What are the db-shm and db-wal files? From petro:<br> they are temp files for sqlite (the database), delete them too. {{template:top}} ==Device Location== Here's how you change a device location:<br> In Devices, click on the device that you want to add or change the location.<br> [[File:deviceLocation1.jpg|frameless|border|left|640px]]<br clear=all> <br> ;Next, click on the edit icon:<br> [[File:deviceLocation2.jpg|frameless|border|left|640px]]<br clear=all> <br> ;Here you can edit the area:<br> [[File:deviceLocation3.jpg|frameless|border|left|640px]]<br clear=all> {{template:top}} ==Edit the Sidebar== Allows sidebar items to be hidden and moved.<br> Long press on the sidebar will start edit mode, you can move items by dragging them to the right place.<br> Hiding is done by pressing the X button.<br> Hidden panels are shown underneath the shown panels, clicking them will restore them.<br> All data is stored in localStorage, meaning this is a user/browser setting, and it doesn't survive a logout.<br> [[File:HA Sidebar Edit.jpg]]<br> {{template:top}} ==Graphs== <i>Queston from forum</i><br> How do you get those nice graphs? I’m stuck with the blocky standard graphs [[File:Nice Graph Example.png]]<br clear=all> Answer by: tom_l<br> Give your sensors a [https://www.home-assistant.io/integrations/sensor/#device-class device_class] and a state_class of measurement. Then the graphs show 5 minute means with min and max shading. ==If Then Else== [[Automations#Jeep_Presence|Here is an example of IF THEN in an automation.]]<br> {{template:top}} ==Icons== ===MDI=== [https://pictogrammers.github.io/@mdi/font/7.0.96/ Graphic of all icons]<br> ===Hue=== [https://github.com/arallsopp/hass-hue-icons Hue Icons, HACS Add-on]<br> {{template:top}} ==Make a switch appear in the light domain.== <nowiki>- platform: gpio id: sonoff_relay pin: number: GPIO12 light: - platform: binary name: "${friendly_name}" id: light_relay output: sonoff_relay restore_mode: ALWAYS_OFF</nowiki> {{template:toponly}} ==Network Storage== [https://www.home-assistant.io/common-tasks/os/#network-storage Docs: Network Storage]<br> {{template:toponly}} ==Logon-Logoff sounds== From the Ubuntu user forums:<br> The Yaru sound theme has a login and logoff sound! You can enable the login sound by adding mpv /usr/share/sounds/Yaru/stereo/desktop-login.oga in Startup Applications, but I can't enable the logoff sound. Can somebody please help me enable the Yaru logoff sound? I added my script in /usr/lib/systemd/system-shutdown and it works!<br> {{template:top}} ==notifications== I wanted an easy way to test an automation while being developed, and the <b>persistent notifications</b> would put any notification I wanted into my notificatiopns panel.<br> You can add one by calling persistent_notification.create or if you don’t care what the ID of it is (generally you don’t unless you plan to use <i>persistent_notification.dismiss</i> to clear it via an automation). notify.persistent_notification Also notify.alexa_media_stephen does a text to speech to my Alexa unit on the desktop. {{template:top}} ==OpenMQTTGateway== [https://docs.openmqttgateway.com/#first-ready-to-go-openmqttgateway-device Tutorial]<br> OpenMQTTGateway project goal is to concentrate in one firmware different technologies and protocols, decreasing by the way the number of physical bridges needed, and hiding the different technologies singularity behind a simple & wide spread communication protocol; MQTT<br> {{template:top}} ==Passwords and Configurations== Passwords and configurations can be found in /config/.storage/core.config_entries (A text file). It’s supposed to be off limits, but some integrations were migrated to UI without proper thinking, and do not allow basic capabilities such as changing user/password or API keys. <br> The “proper” way is to remove and reinstall the integration, but hey, are we tinkerers or are we not? {{template:top}} ==Detect if a node is alive== <nowiki># This sensor lets me see if a node is connected or not. (Disconnected means in Deep Sleep, for example). # Ping host 192.168.1.201 (This requires a fixed IP. solar.local did not respond) binary_sensor: - platform: ping host: 192.168.1.201 name: "Sollar Temperature Probe" count: 2 scan_interval: 5< - platform: ping name: Internet host: 8.8.8.8 scan_interval: 15</nowiki> ==Reboot the host== ===From Home Assistant=== Three dot menu in the top right corner of Settings > System > Hardware ===From the Terminal CLI=== Click on the Terminal icon (or open the Terminal and SSH add-on then open the Web UI).<br> This enters a CLI, and you are root.<br> You can enter <b>ha help</b> to see what commands are available.<br> <b>ha host help</b> shows what host related commands are available.<br> <b>ha host reboot</b> will reboot the host. Warning, the restart of Home Assistant takes three or four minutes.<br> {{template:top}} ==Remove Duplicate Devices== [https://github.com/HASwitchPlate/HASPone/wiki/Fix-common-HASPone-issues Fix common HASPone issues]<br>
Summary:
Please note that all contributions to Notebook may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Notebook:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Home Page
C++ Reference
ESP Hardware
ESPHome
Home Assistant
Network Stuff
Tools
What links here
Related changes
Special pages
Page information