├── images ├── aeotec.jpg ├── sonoff.jpg ├── state1.png ├── state2.png ├── xiaomi.jpg ├── HA_logo.jpeg ├── HA_update.png ├── node-red.png ├── wemosD1.jpg ├── amazondash.jpg ├── floorplan1.jpg ├── floorplan2.png ├── floorplan3.jpg ├── HA_dashboard.png ├── frontend_dark.jpg ├── frontend_full.png ├── frontend_map.png ├── state_darksky.png ├── frontend_lights.png ├── frontend_mobile.png ├── frontend_travel.png ├── frontend_weather.png └── frontend_switches.png └── README.md /images/aeotec.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/aeotec.jpg -------------------------------------------------------------------------------- /images/sonoff.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/sonoff.jpg -------------------------------------------------------------------------------- /images/state1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/state1.png -------------------------------------------------------------------------------- /images/state2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/state2.png -------------------------------------------------------------------------------- /images/xiaomi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/xiaomi.jpg -------------------------------------------------------------------------------- /images/HA_logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/HA_logo.jpeg -------------------------------------------------------------------------------- /images/HA_update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/HA_update.png -------------------------------------------------------------------------------- /images/node-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/node-red.png -------------------------------------------------------------------------------- /images/wemosD1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/wemosD1.jpg -------------------------------------------------------------------------------- /images/amazondash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/amazondash.jpg -------------------------------------------------------------------------------- /images/floorplan1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/floorplan1.jpg -------------------------------------------------------------------------------- /images/floorplan2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/floorplan2.png -------------------------------------------------------------------------------- /images/floorplan3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/floorplan3.jpg -------------------------------------------------------------------------------- /images/HA_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/HA_dashboard.png -------------------------------------------------------------------------------- /images/frontend_dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_dark.jpg -------------------------------------------------------------------------------- /images/frontend_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_full.png -------------------------------------------------------------------------------- /images/frontend_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_map.png -------------------------------------------------------------------------------- /images/state_darksky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/state_darksky.png -------------------------------------------------------------------------------- /images/frontend_lights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_lights.png -------------------------------------------------------------------------------- /images/frontend_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_mobile.png -------------------------------------------------------------------------------- /images/frontend_travel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_travel.png -------------------------------------------------------------------------------- /images/frontend_weather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_weather.png -------------------------------------------------------------------------------- /images/frontend_switches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArnaudLoos/HomeAssistant-Presentation/HEAD/images/frontend_switches.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
15 |
16 |
17 |
18 |
19 | #### HA Advantages:
20 |
21 | * Speed of development - updates generally released bi-weekly
22 | * Over 1,000 integrations
23 | * Runs on Raspberry Pi, Synology NAS, or any computer running python
24 | * Not dependent on cloud services (many components), all data stored locally in sqllite DB
25 | * Ability to use disparate hardware
26 | * Can work in conjunction with hubs from other manufacturers. Add HA in front of Smartthings
27 | * Integrates with Amazon Echo, Google Assistant, and HomeKit for voice
28 | * Helpful community - active [Discord](https://discord.gg/c5DvZ4e) channel and [Forum](https://community.home-assistant.io/)
29 | * [iOS app](https://home-assistant.io/docs/ecosystem/ios/), or easily accessible through a responsive [web interface](https://home-assistant.io/docs/frontend/mobile/)
30 |
31 |
129 |
130 | * Simple built-in updater
131 | * No need to manage underlying OS
132 | * Integrated app store for simple add-on installation and updating
133 | * Ability to integrate [community add-ons](https://github.com/hassio-addons) (web terminal, homebridge, pi-hole) and [third-party repositories](https://home-assistant.io/hassio/installing_third_party_addons/)
134 |
135 | ## Home Assistant Basics
136 | Home Assistant organizes all the components that comprise your home automation network. This includes information pulled from the Internet (weather forecast, traffic cam image, bitcoin price), the state of a switch or light (on/off), presence detection (home/away), and more.
137 |
138 | For each [component](https://home-assistant.io/components/) that you want to use in Home Assistant, you add an entry to your ```configuration.yaml``` file and specify its settings.
139 |
140 | The configuration file is written in [YAML](https://home-assistant.io/docs/configuration/yaml/). YAML is a markup language that utilizes block collections of key:value pairs. It is heavily dependant on indentation and if there is an error in your configuration file it is likely due to incorrect indentation. You can check your config with an [online YAML parser](https://yaml-online-parser.appspot.com/).
141 |
142 | It is possible to edit YAML files from within Home Assistant using the [HASS Configuration UI](https://home-assistant.io/docs/ecosystem/hass-configurator/)
143 |
144 |
145 | ```yaml
146 | homeassistant:
147 | name: Pittsburgh
148 | unit_system: imperial
149 | time_zone: America/New_York
150 | latitude: !secret latitude
151 | longitude: !secret longitude
152 | elevation: 330
153 |
154 | frontend:
155 | logbook:
156 | exclude:
157 | entities:
158 | - sensor.dark_sky_summary
159 | - sensor.dark_sky_daily_high_temperature
160 | - sensor.dark_sky_daily_low_temperature
161 | discovery:
162 | updater:
163 | sun:
164 | map:
165 | config:
166 | history:
167 | recorder:
168 | purge_interval: 2
169 | purge_keep_days: 7
170 | logger:
171 | default: warning
172 | http:
173 | api_password: my_password
174 |
175 | light:
176 | - platform: osramlightify
177 | host: 192.168.1.5
178 |
179 | sensor:
180 | - platform: darksky
181 | api_key: !secret darksky_api
182 | units: auto
183 | monitored_conditions:
184 | - summary
185 | - temperature
186 | - temperature_max
187 | - temperature_min
188 | - precip_type
189 | - precip_probability
190 | ```
191 |
192 | Each of these items is an entity with a state value and can be seen on the States page in [Developer Tools](https://home-assistant.io/docs/tools/dev-tools/) in its raw form
193 |
194 |
195 |
196 | and displayed on the frontend for easy viewing.
197 |
198 |
199 |
200 | Additional sensors can be added by defining the new component in your ```configuration.yaml``` file. The bitcoin price sensor can be added with the following:
201 |
202 |
203 | ```yaml
204 | - platform: bitcoin
205 | display_options:
206 | - market_price_usd
207 | ```
208 |
209 | Adding a switch component like a power plug or light will automatically cause an entity with a toggle switch to be defined in the frontend, allowing you to turn the switch on or off manually.
210 |
211 |
212 |
213 |
294 |
295 | How do I get this toggle switch? I create it.
296 |
297 | ```yaml
298 | input_boolean:
299 | enable_security:
300 | name: Alarm Enabled
301 | icon: mdi:shield-outline
302 | initial: on
303 | ```
304 |
305 | I define different ```input_boolean``` and use them as conditionals to ensure my automations only fire exactly when I want them to.
306 |
307 | ### Scripts and Scenes
308 |
309 | If the action you wish your automation to perform is simple, like turning on a light, then you can call the service ```light.turn_on``` directly and pass the ```entity_id```. If, however, you wish to trigger a more complex action then it may be necessary for your action to call ```script.turn_on``` or ```scene.turn_on``` with the ```entity_id``` being the name of the script or scene to execute.
310 |
311 | ***[Scripts](https://home-assistant.io/docs/scripts/)*** are a sequence of actions that Home Assistant will execute.
312 |
313 | ```yaml
314 | script:
315 | example_script:
316 | sequence:
317 | - service: light.turn_on
318 | entity_id: light.kitchen
319 | - service: light.turn_on
320 | entity_id: light.bedroom
321 | - service: notify.notify
322 | data:
323 | message: 'Lights are on!'
324 | ```
325 |
326 | ***[Scenes](https://home-assistant.io/components/scene/)*** capture the states you want certain entities to be.
327 |
328 | ```yaml
329 | scene:
330 | - name: Romantic
331 | entities:
332 | light.tv_back_light: on
333 | light.ceiling:
334 | state: on
335 | xy_color: [0.33, 0.66]
336 | brightness: 200
337 | - name: Movies
338 | entities:
339 | light.tv_back_light:
340 | state: on
341 | brightness: 100
342 | light.ceiling: off
343 | media_player.sony_bravia_tv:
344 | source: HDMI 1
345 | ```
346 |
347 | An add-on project named [scenegen](https://home-assistant.io/docs/ecosystem/scenegen/) can be used to create scenes by reading the current state of devices and outputting a corresponding scene.
348 |
349 | ### Additional Config
350 |
351 | ***[Splitting up the configuration](https://home-assistant.io/docs/configuration/splitting_configuration/)***
352 |
353 | You can move sections of your ```configuration.yaml``` to separate files and import them like so:
354 |
355 | ```
356 | group: !include groups.yaml
357 | automation: !include automations.yaml
358 | scene: !include scenes.yaml
359 | input_boolean: !include input_boolean.yaml
360 | script: !include scripts.yaml
361 | ```
362 |
363 | ***Grouping devices***
364 |
365 | Devices can be members of multiple groups. Some groups will be used to display devices together on the frontend. Other groups can be hidden (so they're not displayed on the frontend) and called within automations and scripts.
366 |
367 | ```
368 | Lights:
369 | - light.front_door
370 | - light.hallupper
371 | - light.halllower
372 | - light.living_room
373 | - light.bedroom
374 | Inside_Lights:
375 | - light.halllower
376 | - light.hallupper
377 | - light.living_room
378 | - light.bedroom
379 | Downstairs_Lights:
380 | - light.halllower
381 | - light.living_room
382 | Upstairs_Lights:
383 | - light.bedroom
384 | - light.hallupper
385 | ```
386 | ***[Customizing](https://home-assistant.io/docs/configuration/customizing-devices/)***
387 |
388 | Rename entities, hide entities, add [icons](https://materialdesignicons.com/), and more.
389 |
390 | ```
391 | sensor.dark_sky_summary:
392 | friendly_name: Conditions
393 | sensor.dark_sky_temperature:
394 | friendly_name: Temp
395 | sensor.dark_sky_daily_high_temperature:
396 | friendly_name: Daily High
397 | sensor.dark_sky_daily_low_temperature:
398 | friendly_name: Daily Low
399 | sensor.dark_sky_precip:
400 | friendly_name: Precipitation
401 | sensor.market_price:
402 | friendly_name: BTC
403 | icon: mdi:currency-btc
404 | binary_sensor.ecolink_doorwindow_sensor_sensor:
405 | hidden: true
406 | binary_sensor.ecolink_doorwindow_sensor_sensor_2:
407 | hidden: true
408 | binary_sensor.ecolink_motion_sensor_sensor:
409 | hidden: true
410 | ```
411 |
412 |
413 | ***[Device Tracking](https://home-assistant.io/components/device_tracker/)***
414 |
415 | Home Assistant can trigger automations based on your location and show your location on its map.
416 |
417 | Location tracking can be done in many different ways, with varying precision:
418 |
419 | * iOS App
420 | * iCloud
421 | * Owntracks
422 | * NMap scan
423 | * Many others
424 |
425 | Once the first device is discovered HA will create a file named ```known_devices.yaml``` where it will track all the devices it knows about. If you want to rename a device, add a picture, or stop tracking a device, make the change in this file. For each tracked device HA will create a ```device_tracker.device_name``` entity which can be displayed on the frontend.
426 |
427 | You can also define zones such that events will trigger when you enter or leave the zone.
428 |
429 | Define a zone like so:
430 |
431 | ```yaml
432 | - name: Code_&_Supply
433 | latitude: 40.46001
434 | longitude: -79.93072
435 | radius: 150
436 | icon: mdi:desktop-classic
437 | ```
438 |
439 |
440 |
441 | You even have the option of triggering events based on the direction of travel with the [proximity](https://home-assistant.io/components/proximity/) component. You can have the thermostat raise the temperature as you approach home.
442 |
443 | For more precise location detection Owntracks supports the use of iBeacons. You can [turn your Raspberry Pi into an iBeacon](https://andrewmemory.wordpress.com/2016/03/29/turning-a-raspberry-pi-3-into-an-ibeacon/) with a large radius to trigger automations reliably when arriving in your home zone, or place iBeacons in each room of your house to trigger presence based actions at the room level.
444 |
445 | ## [Add-ons](https://home-assistant.io/addons/)
446 |
447 |
448 | ### SSH, Samba, Git
449 | Add-ons for updating configurations:
450 |
451 | * ***Samba*** - Manage Home Assistant files exposed over an SMB share
452 | * ***Git*** - Load and update configuration files for Home Assistant from a Git repository
453 | * ***SSH*** - Enables easy ssh access for controlling the host
454 | * [hass](https://home-assistant.io/docs/tools/hass/) - command line control over Hass.io (reload, start/stop services, check config)
455 | * [hassctl](https://github.com/dale3h/hassctl) add-on for controlling hassbian
456 | * Can also control through GUI
457 |
458 | ### Duck DNS
459 | Dynamic DNS to access Home Assistant on the Internet.
460 |
461 | ***Secure your installation if it is publicly exposed!***
462 |
463 | Consider not publicly exposing your Home Assistant installation to the world and instead keeping it secure inside your network. Various access methods such as OpenVPN, [TOR](https://home-assistant.io/docs/ecosystem/tor/), or [ZeroTier](https://www.zerotier.com/) exist which allow for more secure access. Setup instructions for ZeroTier on Raspberry Pi can be found [here](https://iamkelv.in/blog/2017/06/zerotier.html).
464 |
465 | ### Let's Encrypt
466 | Easily and automatically add a free SSL certificate
467 |
468 | ### Mosquitto
469 | Enables a local MQTT broker.
470 |
471 | [MQTT](https://home-assistant.io/components/mqtt/) is a machine-to-machine or “Internet of Things” connectivity protocol on top of TCP/IP. It allows extremely lightweight publish/subscribe messaging transport.
472 | Network devices can either publish simple information to an MQTT topic or subscribe to a topic to consume the data published there by another device.
473 | The main advantage of MQTT is that it is a common protocol in the IoT space and allows easy sharing of information across devices that would otherwise be unable to communicate with each other.
474 |
475 | Example: I can build a simple [temperature and humidity sensor](https://home-assistant.io/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/) utilizing cheap microcontrollers like an [ESP8266](https://www.sparkfun.com/products/13678) or a [Wemos D1 mini](https://wiki.wemos.cc/products:d1:d1_mini). These controllers will read the temperature from an attached sensor and have the ability to communicate over Wi-Fi. But how do we get these values into Home Assistant? MQTT. There are MQTT libraries available for many platforms, including Arduino. You configure your sensor with the IP of your MQTT broker as well as the topic you wish to publish to. Topics and sub-topics can be created on the fly. So for instance, if I place my new sensor in my bedroom I can tell it to publish to the ```home/temp/bedroom/master/``` topic or if I wish to organize it differently I could instead publish to ```/home/bedroom/master/temp/```.
476 |
477 | Then, after I add the MQTT component to my configuration,
478 |
479 | ```
480 | mqtt:
481 | broker: 127.0.0.1
482 | port: 1883
483 | client_id: home-assistant-1
484 | keepalive: 60
485 | username: !secret mqtt_user
486 | password: !secret mqtt_pass
487 | ```
488 |
489 | I define a sensor to read that particular value.
490 |
491 | ```yaml
492 | - platform: mqtt
493 | name: "Bedroom Temp"
494 | state_topic: "home/bedroom/master/temp"
495 | unit_of_measurement: "ºF"
496 | ```
497 | And now inside Home Assistant I have a component named `sensor.bedroom_temp` with a value being updated as the MQTT topic gets updated.
498 |
499 | ***Pro tip:*** Home Assistant just pulls data from the MQTT topics you tell it to. If the information HA is disaplying seems incorrect or inconsistent it could be that the data being sent to Mosquitto is incorrect and not that it's an issue with HA. To troubleshoot these issues it can be beneficial to see the data being fed into Mosquitto from your sensors in real-time. To accomplish this I use the ```mosquitto_sub``` command with verbose output to subscribe to the ```#``` (all) topic. Omit ```--cafile``` if not using certificates.
500 |
501 | ```mosquitto_sub -t "#" -v --cafile /etc/mosquitto/certs/ca.crt -p 8883 -u
557 |
558 |
634 |
635 | There exists an [HA component](https://home-assistant.io/components/thethingsnetwork/) for [The Things Network](https://www.thethingsnetwork.org/) to tie in to a global IoT network based on LoRaWAN. LoRaWAN hubs cover an area 5 - 15 km to provide wide-area network coverage for low-bandwidth sensors and allow querying of these sensors world-wide. Home Assistant could, for example, read from all the LoRaWAN sensors connected to a private hub monitoring a 30 acre farm.
636 |
637 | [Graphing with Grafana and InfluxDB](https://philhawthorne.com/getting-started-with-grafana-influxdb-for-home-assistant/) - display graphs and dashboards of time series data
638 |
639 | And APIs to integrate with everything.
640 |
641 | * [Python API](https://dev-docs.home-assistant.io/en/dev/)
642 | * [Websocket API](https://home-assistant.io/developers/websocket_api/)
643 | * [REST API](https://home-assistant.io/developers/rest_api/)
644 | * [Python REST API](https://home-assistant.io/developers/python_api/)
645 |
646 | #### Additional examples from the community
647 |
648 | >I replaced a mechanical controller on my whole house wood burner with an Arduino using a thermocouple to read the temperatures in the plenum.
649 | Community member ericleejoe
650 |
651 |
740 |
741 | #### [AppDaemon](https://home-assistant.io/docs/ecosystem/appdaemon/)
742 | AppDaemon is a loosely coupled, multithreaded, sandboxed python execution environment for writing automation apps for Home Assistant. AppDaemon allows for writing more complex automations but is still based on state changes monitored by Home Assistant.
743 |
744 | For example I have a script checking my commute time to work in the morning and back home in the afternoon. This is possible because I use [Owntracks](https://home-assistant.io/components/device_tracker.owntracks/) to track my location. Essentially my current coordinates and the coordinates of my destination are passed to Google Maps via an API to determine travel time. This is done continuously in the background by the Google Travel Time component.
745 |
746 | ```yaml
747 | - platform: google_travel_time
748 | name: Time to Home
749 | api_key: xxxxxxxxxxxxx
750 | origin: device_tracker.my_iphone
751 | destination: zone.home
752 | options:
753 | mode: driving
754 | ```
755 |
756 |
757 |
758 | This script merely checks that component's state value at a specific time, and if it is greater than my defined threshold then it sends me a text.
759 |
760 | First I define my apps in ```apps.yaml```
761 | Defining apps this way allows me to reuse my code to trigger both alerts with different variables.
762 |
763 |
764 | ```
765 | commute_work:
766 | module: commute
767 | class: Commute
768 | time: "8:00:00"
769 | limit: 30
770 | sensor: sensor.time_to_work
771 | tracker: device_tracker.my_iphone
772 |
773 | commute_home:
774 | module: commute
775 | class: Commute
776 | time: "16:50:00"
777 | limit: 30
778 | sensor: sensor.time_to_home
779 | tracker: device_tracker.my_iphone
780 | ```
781 | And now I write my ```commute.py``` app.
782 |
783 | ```python
784 | import appdaemon.appapi as appapi
785 |
786 | class Commute(appapi.AppDaemon):
787 |
788 | def initialize(self):
789 | time = self.parse_time(self.args["time"])
790 | self.run_daily(self.check_travel, time)
791 |
792 | def check_travel(self, kwargs):
793 | commute = int(self.get_state(self.args["sensor"]))
794 | currentLocation = str(self.get_state(self.args["tracker"]))
795 | self.log(commute)
796 | self.log(currentLocation)
797 | if commute > int(self.args["limit"]):
798 | if currentLocation == 'Work':
799 | message = "Current travel time from work to home is {} minutes".format(commute)
800 | self.log(message)
801 | self.call_service("notify/twilio", title="Commute Warning", message = message, target="+1412xxxxxxx")
802 | elif currentLocation == 'home':
803 | message = "Current travel time from home to work is {} minutes".format(commute)
804 | self.log(message)
805 | self.call_service("notify/twilio", title="Commute Warning", message = message, target="+1412xxxxxxx")
806 | else:
807 | message = "Location unknown so no message sent"
808 | self.log(message)
809 | ```
810 |
811 | #### [HA Dashboard](https://home-assistant.io/docs/ecosystem/hadashboard/)
812 | HA Dashboard is a modular, skinnable dashboard for Home Assistant that is intended to be wall mounted, and is optimized for distance viewing. Perfect for displaying on a cheap Android tablet or Kindle Fire.
813 |
814 |
815 |
816 |
817 | #### [Floorplan](https://community.home-assistant.io/c/third-party/floorplan)
818 | Floorplan is a custom integration which allows you to show a floorplan of your home and overlay device control over top. It is very customizable.
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 | iOS app to create a floorpan template - [magicplan](https://itunes.apple.com/us/app/magicplan/id427424432?mt=8)
827 |
828 | #### [Node Red](https://nodered.org/)
829 | Node Red is a visual workflow development tool, allowing the creation of complex workflows to control Home Assistant devices.
830 |
831 |
832 |
833 | 3-part series on using Node Red to create Home Assistant automations.
834 | [Part 1](http://diyfuturism.com/index.php/2017/11/26/the-open-source-smart-home-getting-started-with-home-assistant-node-red/),
835 | [Part 2](http://diyfuturism.com/index.php/2017/12/14/basic-node-red-flows-for-automating-lighting-with-home-assistant/),
836 | [Part 3](http://diyfuturism.com/index.php/2018/01/18/going-further-with-home-automations-in-node-red/)
837 |
838 | ## Recommendations for starting out
839 | Hass.io running on a [Raspberry Pi 3](https://www.amazon.com/gp/product/B01C6EQNNK/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B01C6EQNNK&linkCode=as2&tag=solo07e-20&linkId=0305fc19669ba6f80b8813bdde12c5df) - $50 with power and case.
840 |
841 | Many people start with automating lights. Many lights are either wifi controlled or come with their own hub with a proprietary zigbee radio inside. You also should decide if you want white-only bulbs or color. I've found I prefer white bulbs that can display a range of white from cool to warm. I find the white color projected from color bulbs to be unpleasant. Color LED strips work well for adding a splash of color and effects.
842 |
843 | [Yeelight](https://www.amazon.com/YEELIGHT-YLDP03YL-Dimmable-Equivalent-Assistant/dp/B01LRTWQJ0/) Wi-Fi color bulb - $35
844 |
845 | [IKEA Tradfri](http://www.ikea.com/us/en/catalog/categories/departments/lighting/36815/) gateway kit with hub and two white bulbs - $80
846 |
847 | [Hue](https://www.amazon.com/gp/product/B07353SKDD/ref=as_li_qf_asin_il_tl?ie=UTF8&tag=solo07e-20&creative=9325&linkCode=as2&creativeASIN=B07353SKDD&linkId=771af38f2eedf74f476064f5b5090963) starter kit with hub and four white bulbs - $140
848 |
849 | Osram Lightify - [Hub](https://www.amazon.com/gp/product/B00R1PB2T0/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00R1PB2T0&linkCode=as2&tag=solo07e-20&linkId=988d7444b9635be6c56440b7780a9ed9) $30, [White bulb](https://www.amazon.com/gp/product/B00R3ID2BG/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00R3ID2BG&linkCode=as2&tag=solo07e-20&linkId=06e21b6fe1d65bf7fec7633c6799629c) $19
850 |
851 | Adding door/window sensors, motion detectors, fire alarms, water leak detectors, etc. requires investment in either Zigbee or Z-Wave.
852 |
853 | A cheap, popular, Zigbee based starter kit is the [Xiaomi Security Kit](https://www.gearbest.com/alarm-systems/pp_659225.html) for $60 which includes a Zigbee hub, two door/window sensors, and a push button. The trade-off is that it's meant for Chinese use only. This means the kit is shipped from China, you must purchase a power adapter, and run through the setup process in Chinese. Having done this myself it's actually pretty simple.
854 |
855 |
856 |
857 |
858 | [Sonoff switches](https://www.itead.cc/sonoff-wifi-wireless-switch.html) ($5 - $10) are a good option for automating power on/off. You can splice one to the cable of any lamp or to any extension cord to make it controllable. They are available in either Wi-Fi or RF versions. [Amazon link](https://www.amazon.com/gp/product/B074N22WFT/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B074N22WFT&linkCode=as2&tag=solo07e-20&linkId=1dca0516faaca5d6e46eb26ea7e87597)
859 |
860 |
861 |
862 | Flash the Sonoff with [Tasmota](https://github.com/arendst/Sonoff-Tasmota) or [ESPurna](https://bitbucket.org/xoseperez/espurna) third-party firmware.
863 | These firmware provide OTA updates and MQTT support.
864 |
865 | There is a large ecosystem of Z-Wave enabled devices and sensors, and some sensors may only be available in Z-Wave versions. To proceed with Z-Wave you need a Z-Wave hub and the Aeotec Z-Stick (Z-Wave plus version) is a popular option for the Raspberry Pi.
866 |
867 | [Aeotec Z-Stick Gen5](https://www.amazon.com/gp/product/B00X0AWA6E/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00X0AWA6E&linkCode=as2&tag=solo07e-20&linkId=53feaaf88db404e3044607f1ff6e611a) - $45
868 |
869 |
870 | 872 | Happy Automating! 873 |
--------------------------------------------------------------------------------