Giter VIP home page Giter VIP logo

beardedtinker / home-assistant_config Goto Github PK

View Code? Open in Web Editor NEW
383.0 24.0 48.0 85.49 MB

BeardedTinker Home Assistant configuration. Feel free to browse, edit, tweak, improve, criticize and suggest.

License: MIT License

Python 84.34% JavaScript 13.78% C++ 1.88%
ikea-tradfri synology homeassistant home-assistant home-assistant-config youtube-channel youtube home-automation smart-home zigbee2mqtt

home-assistant_config's People

Contributors

beardedtinker avatar conorsham avatar thefes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

home-assistant_config's Issues

Scenes

Haven't played with scenes so far and it's about time to get started.

LilyGO HiGrow sensor enhancements

New firmware from Pesor will support much easier configuration and abbility to add sensor faster to Home Assistant. This is Alpha version of custom component - still some work left to do.

Add GitHub workflow/actions

Will add GitHub actions/workflow to test configuration not by Travis CI (or not only by Travis CI) but also with GitHub CI.

Possible enhancement could be to add testing against BETA and DEV version too - similar what @frenck has in his repository.

Reolink cameras

Received some Reolink cameras from manufacturer to record videos about them.
Since I'm not going for some deep analysis of camera per se, I'll be focusing on various types of integrations that will include:

  • Synology DSM/Surveillance Station
  • HACS Reolink custom component
  • ONVIF
  • ffmjpeg
    Also some possible automations that could be fun to integrate and useful in real-life.

Heating statistics

Adding some more statistics for heating.
Now it will track for each tado zone (smart thermostat and smart thermostat valve) it's call-to-heat status.

So far I have:

  • 24 hours tracking
  • 30 days tracking

Need to check how 30 days tracking works because of purge date.

Good thing is that there is sensor for each room, but bad thing is that it's not tracking real overall heating time.
For ex. at same time only one but up to 4 rooms can request heat, so the sum of all heating times is not equal to total heating time.

Added groups, but that doesn't work as it gives "ON" status not "HEATING" or "IDLE". Would need to create one sensor that combines all climate sensors actions.

Notification platform fix

That time of the year.
New phones for all family members, so all personal and group notifications have to be fixed.

Also, will add TTS as platform for Notification Engine, to allow to push messages not just to phones but to speakers around the apartment.

Question: use now() or sensor.date

Nice trick, this sensor.

I was just wondering. Wouldn't using now() be evaluating every minute, and using the sensor.date entity be evaluating just once a day?

value_template: "{{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}"

Another value_template could be:

value_template: >
  {% set w = strptime(states('sensor.date'), '%Y-%m-%d').strftime('%w') | int %}
  {{['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'][w]}}

Not as clean but less resource consuming.

Adding Roborock S5 max integration

This issue is open to all stuff related to Roborock S5 max vacuum.

App used to control bot is Mi Home (Roborock one has different tokens - using Tuya servers?)

Token was retrieved by using Xiaomi Cloud Tokens Extractor. The process took less then 5 minutes with download of app for Windows.

Integration has been done via YAML as I'm still on 2021.2 version.

Making radio streaming finally work

After about 18 months of having these scripts and trying to make it work, it's time for it to work.
Still want to play a bit more about it, improve scripts that are now too complex, improve on UI (add radio station icons/pictures), add stop/volume up and down, and of course, add more radio stations on the list too...

But for now, this first commit in 2020 makes this work.

And cleanup of duplicate input fields and scripts.

Muting TTS and messages

Finally managed to get this rolling.
So far two things have been implemented:

  • audio notification
  • text notification

For both of them following entities have been created:

  • boolean to track on/off state
  • input datetime for start/stop schedule
  • automations to trigger on/off state

Next phase will be to go through all automations and scripts and implement this.
Have to be careful to avoid implementing this in:

  • Alarm for school for kids (morning alarm)
  • Warnings related to anything that is there to make flat safer (radiation, air quality, smoke in future or fire sensors....)

Google Assistant Relay addon support

When using TTS from Google, anything that is currently playing on Google devices will be stopped and not resumed after the text notification.

Goal is to use Assistant Relay Add-On to prevent this.
This requires a lot of tinkering since it is not drop in replacement.

Broadcast normally sends message to all Google devices and this needs to be preventing by adding broadcast to "name of the device" before message itself.

Also, this integration can be used to trigger commands on Google Devices via Google Assistant.

Solar power preparation

This change will be regarding tracking of apartment energy usage between two cycles: day and night.
In theory, when there is enough data available, it could make it easy to calculate your energy usage and create optimal off-grid/inline PV system + battery capacity needed.

Zigbee2MQTT switches, timers etc

Upon the request from James Sheeran on YouTube to record video about enabling Join in Zigbee2MQTT from within Home Assistant, here are few new additions:

  • Input Number filed - to select how long do you want to allow new devices to join (in minutes)
  • Timer - to enable HA native timer, based on input above
  • Enable/Disable automations to of course enable or disable joining (enabled via switch, disabled via timer)
  • Interview done automation, to receive notification when new device has been added
  • Switch to start/enable join

Still not tested, but this should work. And I really wished I added this sooner.

This is of course, based on official documentation - https://www.zigbee2mqtt.io/integration/home_assistant.html
With minor modifications.

Recycling/garbage day

Simple automations that are triggered in the morning when it's time to take out any specific bag for recycling.
Need to improve on overlapping notifications if two types of bags need to be taken out.

replace device_tracker.* with person.*

After getting spammed with INTRUDER messages, finnaly replaced device_tracker.* with person.*
Will have to triple-check if there is anything else to replace.

UPS power failure

So far, only one notification arrives on power failure.
Need to add Alert when system is on UPS + notifications with remaining time.

Probably should also try to intercept shutdown and send message too.

Adding NFC/RFID support

Thanks to @adonno - adding RFID reader (external) to HA.
Also, some of the tags are added:

  • card
  • FOB
  • wristband

So, to prepare for future ideas (there are some that I'll share in next video), I've create placeholder automations for each possible combination (with tag reader and by using mobile app).
For now, I'll leave them as is - just blinking LED when scanned.

Find why one light is turning on

For some strange reson, Zita Desk Light turns on randomly at light:

  • 03:39:46 AM - 27.12.
    In logs it just changed status, no automation or anything triggered it.

Chromecast Radio streaming: volume sync issue / Volume 0/100 instead of 0/1

Hi BeardedTinker,

Many thanks for your well explained Youtube video to setup chromecast radio streaming.

All works fine except the volume sync issue.

When I use the card I made and press 'Execute' the selected media.player starts playing the source with the selected volume.
When I change the volume in the card, nothing happens on the media.player. If I press again 'execute' the media player stops playing (I guess it loads again the radio stream) and after few seconds it starts to play again with the corrected volume.

Is there a way to avoid this silence? Meaning change the script only to change the volume and not to load again the audio stream?

Furthermore I like more a volume setting from 0 to 100 instead of 0 to 1. I changed the input_number.yaml but got an error. Searched the internet and found the script must be changed from:
volume_level: '{{ states("input_number.radio_volume") }}'
to
volume_level: '{{ states("input_number.radio_volume")|int/100 }}'

After this change the error disappeared but when I execute your script, the mediaplayer always starts with volume 0 and I cannot longer control the volume from the media player by your script.

Thanks for your help!
Johan (Belgium)

Lovelace files

Although my Lovelace code is not managed in yaml files, I've dumped it in /lovelace folder, and divided it in individual files (for each view).

This is has to be updated by hand, so there will probably be a long delay.

Chromecast Radio streaming

I've had for 2 years now few input fields and scripts, from the time I was trying to get this working.
Now it's time to get it all working:
e0ea41e - this one made it work
f80c4c6 - in this I've added more improvements

Following is used in more complexed version in Lovelace to show logo and add some better controls.

cards:
  - entities:
      - entity: input_select.radio_station
      - entity: input_text.custom_radio
      - entity: input_select.chromecast_radio
      - entity: switch.radio_volume_down
      - entity: switch.radio_mute
      - entity: switch.radio_volume_up
      - entity: switch.radio_stop
      - entity: switch.radio_play
    entity: input_select.radio_station
    state_image:
      Antena Zagreb: /local/radio/antena-zagreb.jpg
      Narodni: /local/radio/narodni-radio.jpg
      HKR: /local/radio/otvoreni.jpg
      HRT1: /local/radio/otvoreni.jpg
      HRT2: /local/radio/otvoreni.jpg
      Otvoreni: /local/radio/otvoreni.jpg
      Radio Marija: /local/radio/otvoreni.jpg
      Radio Postaja Mir Međugorje: /local/radio/otvoreni.jpg
      yammat FM: /local/radio/yammat-fm.jpg
      Stopped: /local/radio/otvoreni.jpg
    type: picture-glance
  - entities:
      - entity: sensor.radio_station_selected
      - entity: sensor.speaker_selected
      - entity: input_number.volume_radio
    show_header_toggle: false
    type: entities
type: vertical-stack

Still to do is fix naming convention - want to get everything easily searchable - all needs to start with radio_*

Shelly Gas sensor

Adding support for Shelly Gas sensor.
Besides internal/HACS Shelly integration, this time using MQTT.

For this, 2 automations are also created:

  • Shelly discovery
  • Shelly announce

Still need to add automations for gas leak and when air is clear.

After HA update, ticket is not closing

Automation to track new versions of HA is working and doing everything OK until update.
Then it should close the ticket after restart - as there is no more upadtes.

It's not working.
From what I've seen there are two issues:

  • typo in one sensor name - my bad
  • missing boolean that would stop this script to run on each reboot.

Adding Mi TV stick

Adding support for Mi TV stick. Not sure why I got it (same TV is Smart TV, has external Google Chromecast connected and now this too) but it will be used to test things and maybe think of some fun ways to use it.
For now it will have to integrations:

  • AndroidTV using ADB server (addone) - entites will have mi_tv name
  • Chromecast - entites will have mi_tv_stick name

School day wake up alarms

This is my take on school day wake up for kids.
For now, a lot of things are hard-coded and I'd like to make it more easy to customize.
For ex. alarm time, light intensity, any light transition, volume, radio station being played etc.

Also it still lacks any School from Home variables, but at the end, this should only delay time for wake-up, everything else should remain the same.

Missing also is any automation related to school holidays. It now only looks if it's workday or not - if it is, there is alarm.
This should be fixed, but hopefully, I have a bit of time before first holidays start to think of how to fix this.

Thermal printer support

Adding support for Thermal printer in Home Assistant.
It is 58mm thermal printer model GOOJPRT QR204 - https://s.click.aliexpress.com/e/_A1ct9V (this is affiliated link that costs you nothing extra). There are a lot of shops selling them as Embedded Thermal Printer for taxi etc.
But what's great is that it can be connected to ESP board (such as ESP8266) and thus a lot of options appear.
One great project is Morning News but it lacks integration with Home Assistant.
The other project is ESP8266 MQTT Thermal Printer - very small project but just enough for proof of concept.

But next problem was that this project didn't support MQTT Auth, so there is Pull Request to add support - by me!!!!

The idea is to be able to print whatever you want from your Home Assistant to thermal printer.
It can be:

  • weather information
  • daily schedule from calendar
  • warnings and alerts
    etc.

And yes, if you have 3D pritner, you can print also case for it. This is older case and I'll probably to remix of it but for my own test it works OK.

Earthquake warning

9 months after last big earthquake, and few hours after last that woke us up, it was time to add Earthquake automation.
Hope to never see it, but here it is.
It should work using geo_location - any time there is a new event from usgs_earthquakes_feed feed, it should send notifications out. Probably will be with a delay of 30 minutes, but...

Updated Shelly devices to 1.8 firware

My Shelly devices have been updated to 1.8.x firmware that brings some stability updates but also major changes to CoAP.
Of course, I didn't check development of ShellyForHass on the day of update to see if there is newer version that can handle this correctly.
There is a bug report and until there is a new release, I'll have a bug in the system not showing correctly values.

My current symptom is that I get 0W usage sometimes, so probably my energy reading until this is fixed will be wrong.

Also, a bit of change to integration configuration as I'll be pulling more data from sensors now.

Dishwasher/Washing machine notifications

Simple dish washer and washing machine notifications.

Tracking is done by using Shelly Plug S power monitoring.
Will try to improved this a bit further, but currently there are two things:

  • Dishwasher - it has auto power off, and this really does work great since it props to 0W after it finishes. Can also be used to track pods usage
  • Washing machine - it doesn't power off in same way that other machine does, so I have to keep track of power usage after it finishes. The other issue is that it also has drying option, so can't use run-cycle as indicator for pods usage.

Reducing mobile data cost

WiFi sometimes gets disconnected or lost. That results in excessive data usage and extra mobile phone cost. Who would say that 16GB is not enough each month.
This will create (warning) notification each time companion app (sensor) loses WiFi connection.
When connection is restored it also gives notification with SSID that's been connected too.
Hopefully this will reduce extra mobile data cost.

Github Integration

Adding GitHub integration to track favorite repositories.
These are:

  • BeardedTinker/Home-Assistant_config
  • frenck/home-assistant-config
  • CCOSTAN/Home-AssistantConfig
  • pesor/LilyGO-TTGO-HiGrow
  • home-assistant/core

In future I may add more. Also, no additional automation for now.

Home Assistant Update is Available

This issue is re-opened automagicly by Home Assistant.
It should be closed manually by commenting closes #14 when committing new .HA_VERSION file

School night script and notification

Some time ago I created script that warns if it's school night and time to go to bed.
But it's missing any notification (automation) that would actually trigger it.

Creating that automation could be easy - just have to check if tomorrow is workday and school day.
But (again but) we also have input_boolean.school that tracks if today is school or some school break.

The problem is that this is triggered on that day and school night is triggered day before that.

So some more complications are needed to solve that.

Check status of devices

Have to add alerts/notifications when devices are not responding:

  • Zigbee devices - if they are unavailable or low signal
  • Plant sensors - if they don't respond for more then 120 minutes (they should send new status every 60 minutes)
  • Mobile apps - if this fails, tracking and automations could fail

Xiaomi Mosquito Repellent

Currently I'm using one Xiaomi Mosquito repellent but I'm planing to get some more.
As it is still not possible to source it locally, I need to place order at least 45 days before I run out of it.

That's why there is notification on 45 days left to order new/spare one.

Shelly Motion sensor

New Shelly motion sensor is in the house and I've been playing it for few days.
Firmware is update to version from 26.02.2021. Internal HA integration is wonky at best. MQTT is (now once again) working great.
Using it to automate kitchen light and so far so good.

This time, I don't use timer, just pure sensor that has internal motion blindness set to 1 minute with delay of additional 1 minute for light to turn off. This should be enough.

TODO: Differentiate day, evening and night, to adapt light intensity.

Strangely, vibration sensor (on setting 2) is registering vibrations - can't figure from what - walking, jumping, trucks passing - need to watch for this one. And yes, it's much more sensitive then Aqara vibration sensor from Xiaomi.

Camera automation can't save to /tmp folder

It looks like during some of the work on configuration on 6th of August, I've broken:
camera-balcony-motion-webhook.yaml
camera-elevator-motion-webhook.yaml
Error in log was Can't write /config/tmp/elevator.jpg, no access to path!
This has been fixed now, but still no images are saved.
Tried changing owner of existing files to root:root and username:users.
Also tried changing permison to 777 - so far no luck

Lost connection to HA

Lost completely connection with HA. System was at first very slow to respond to automation to turn lights on. Some lights didn't turn on, voice prompt failed to play.
Unable to access via web or app, with message Failed to load.
Restarting HA didn't solve the issue. All integrations responded with "loading takes too much time".
First goal is tog rt everything back up, then to try figure out what did happen.

Notify engine by CCOSTAN

Adding notify engine to HA from CCOSTAN

Adapted to work with Android devices, still some more tweaking to get images etc working.
To do:

  • add one more device
  • make work with both iOS and Android (hmm does my daughter read this - she'll get iPhone as gift...)
  • do some more checking and logic - when to send to me via app and when to send to telegram.

lovelace info

Hi there,

Is there any way that we can view your lovelace setup? Thanks

Implementation of slae.sh CC2652RB Zigbee stick

Due to me doing stuff before thinking, here comes rushed implementation of Slae.sh CC2652RB Zigbee coordinator in my main setup.

It replaces cc2531 stick I used for last 2+ years.

But as I didn't plan to do it I had to do quick and dirty pairing of devices and also I've taken the opportunity to rename various devices and add things that were missing.

Currently, there are some issue, that I believe they are tied to differences in Zigbee version devices support .
For example: Left dining room light LED1836G9 could potentially have 3.0 support while Right LED1623G12 probably has version 1.2. Although with cc2531 I was able to bind the to same IKEA E1743 switch, now I can't . Right one does bind, left doesn't.

Same problem is in living room - all lights paired except one (LED1732G11) and in kitchen.

Besides that, bathroom hunidity and temperature sensor doesn't want to pair in the network (Xiaomi device).

From first few hours of usage, everything works the same - maybe the lights respond a bit faster, but impossible to test.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.