One year of Home Assistant

Very Cool. I was able to get my first button up and running. I’m going to map all the Harmony remote buttons I need. For the tv channels do you have the channel icons saved somewhere? If so how didyou code and where did you get the icons from? Thanks for the help!

Are you still on pi?
Seems you have a lot if entities there

For now, yes.

Saved to config/www/tv_logos

type: 'custom:tiles-card'
card_settings:
  title: TV Channels
  title_align: left
  columns: 4
  column_width: calc(97%/4)
  row_height: 75px
  background: var(--paper-card-background-color)
global_settings:
  label_sec:
    color:
      value: white
  icon:
    color:
      value: white
  shadow: 'elevation: 6dp'
  border:
    size: 3px
    radius: 5px
    color:
      value: black
entities:
  - column: 1
    entity: script.lounge_tv_ch_abc
    icon:
      value: /local/tv_logos/abc.png
      size: 100%
    row: 1
  - column: 2
    entity: script.lounge_tv_ch_sbs
    icon:
      value: /local/tv_logos/sbs.png
      size: 100%
    row: 1
  - column: 3
    entity: script.lounge_tv_ch_sbs_vice
    icon:
      value: /local/tv_logos/sbs-vice.png
      size: 100%
    row: 1
  - column: 4
    entity: script.lounge_tv_ch_sthnx
    icon:
      value: /local/tv_logos/southern-cross-television.png
      size: 100%
    row: 1
  - column: 1
    entity: script.lounge_tv_ch_nine
    icon:
      value: /local/tv_logos/nine.png
      size: 100%
    row: 2
  - column: 2
    entity: script.lounge_tv_ch_gem
    icon:
      value: /local/tv_logos/gem.png
      size: 100%
    row: 2
  - column: 3
    entity: script.lounge_tv_ch_go
    icon:
      value: /local/tv_logos/go.png
      size: 100%
    row: 2
  - column: 4
    entity: script.lounge_tv_ch_7mate
    icon:
      value: /local/tv_logos/seven-mate.png
      size: 100%
    row: 2
  - column: 1
    entity: script.lounge_tv_ch_7two
    icon:
      value: /local/tv_logos/seven-two.png
      size: 100%
    row: 3
  - column: 2
    entity: script.lounge_tv_ch_win
    icon:
      value: /local/tv_logos/win.png
      size: 100%
    row: 3
  - column: 3
    entity: script.lounge_tv_ch_one
    icon:
      value: /local/tv_logos/one.png
      size: 100%
    row: 3
  - column: 4
    entity: script.lounge_tv_ch_eleven
    icon:
      value: /local/tv_logos/eleven.png
      size: 100%
    row: 3
1 Like

Is the BOM radar static image or the multiple in rotation?

Also if what component is the forecast from?

Cheers, and awesome effort, I wait till you want to cudtomise the interface more, thats where the frustration comes from for me

Both are custom components by BrendanMoran

Radar is an animated loop:

Weather forecast custom component:

1 Like

Your setup is awesome. I’m only a few months in and had to learn what DHCP and DNS servers were when I started. I don’t want to derail your thread, but if you get a chance, can you help me out with controlling a projector? I’m sure I’ll have more questions about how you setup your stuff, because it looks great, but this one is keeping me from some functionality.


Thanks and keep up the good work. It’s inspiring to others

It’s good to see I’m not the only one who finds the generic_thermostat pretty useless. I’ve been forcing myself to continue using it thinking that “doing it myself” would be more cumbersome. But, in the end, I’m basically doing it myself anyway.

For me, each room has a desired temperature for when it’s occupied, but I don’t need different away temps for each room. So each room turns on an input boolean when it wants heat (or air conditioning) and then an automation interprets all the input booleans to determine if the heat actually needs to be on or not.

I see that you have sliders/input_numbers to set climate in each room. Do you have a generic_thermostat that gets adjusted with each of these or are you just using the input_numbers and automations?

Automations. The input numbers determine if the heating/cooling device should be turned on. Then the actual thermostat used to control the room temperature is the thermostat in the equipment not HA.

1 Like

Looks awesome Tom! Impressive! Good to see a positive thread on here. Well done.

Couldn’t have done the weather page without your excellent custom components Brendan. Thank you.

1 Like

Heya

Just wondering what you did for snail mail?
It’s possibly here somewhere, but i cant find it.

My approach was to install reed switch inside.my post box, with an arduino triggering via mqtt on open.

Just interested in how you.approached it.

Other options I considered were laser sensors that have their beams broken when post is between them.

Cheers!
D.

My mailbox setup is very similar. It’s a NodeMCU-32S running ESPhome that has two reed switches. One for the letter slot lid and one for the letter retrieval door. It spends the majority of the time asleep. It wakes up for a couple of minutes every 12 hours to send wifi and battery state, or when either of the reed switches change state.

If 14 hours go by without getting a status update I get a lost connection alert from HA.

A signal from the slot = mailbox full, signal from the door = mailbox empty.

It’s powered by a single 18650 Li cell, 4.2V regulator and 6V 3.5W solar panel. So far (summer) the battery voltage has not deviated from 4.16V, day or night. I over engineered it a bit but the real test will be winter. Being this far south the day length gets very short, overcast and the panel is facing the wrong way for this hemisphere. We shall see in another 4 months or so how good my estimates and fudge factors were.

I’ve used this exact same circuit with one limit switch to monitor a boundary gate.

I tried a few (much) cheaper ebay solar panels but found they all lie about their power output. The worst one was a supposed 5V 5W panel that put out 250mW. So yeah, if anyone else is going to build something like this ‘caveat emptor’ when dealing with Chinese solar panels on ebay. Spend your money at a reputable supplier.

4 Likes

I’m glad you are having so much fun with HA. It’s been a year, so I think you are ready. I have two words for you “Node RED”. Good luck.

I’ve been able to do everything I wanted with yaml and jinja. Why would I add the extra layer?

3 Likes

Thanks for the inspiration. Always wanted my harmony devices all on one page

2 Likes

would love more info on this, I need a way to know if i have snail mail other than checking manually every few days…

What do you want to know?

would you share the code? did you just use arduino for it?

I have wanted to implement the same thing, but I have been reluctant to try because I didnt want to figure out how to run power to it.

I cant add a solar panel to mine but even a few months of battery would be good for me…

Very nice indeed, I like this in particular because it uses the states ui (old ui) which I desperately need because of my older ipads not supporting custom lovelace cards.

I will follow this thread and watch for the code (as I might use a bit in my own setup).

I got as far as this after 6 months of Home Assistant and always looking for new ideas:

https://github.com/jimz011/HA

I did it with ESPhome and a nodemcu-32s board.

Some notes:

  • All resistors 100K
  • All Diodes 1N4148 * not needed, see below
  • Look for magnetic reed switches with both NO (normally open) and NC (normally closed) contacts. Connect to the NC contacts. So the switch is open when the magnet is close. This will reduce the sleep current.
  • The header pins for the ESP board do not bring pins GPIO14 or GPIO32 to the Veroboard. If you do this they will short out.
  • There is a two pin header on the edge of the board you can short out to keep the board awake for testing / OTA updates. Alternatively just short either the door or lid sensors wires (i.e. open the lid or door).
  • ESPhome now supports multiple wake pins for the ESP32 so you don’t have to do it this way and it can be considerably simplified. No need for the diodes or R17 or configuration for GPIO12. Just set the wakeup pin to GPIO25 and GPIO26.
  • A good quality 2200mAh 4.2V 18650 Li cell should run this for months. Get one with a built in battery protection circuit to prevent over discharging and damaging your battery.

Configuration for ESPhome:

esphomeyaml:
  name: mailbox
  platform: ESP32
  board: nodemcu-32s

wifi:
  ssid: 'YOUR_SSID'
  password: !secret wifi_pwd 
  manual_ip:
    static_ip: 10.1.1.77
    gateway: 10.1.1.1
    subnet: 255.255.255.0

mqtt:
  broker: 10.1.1.100
  username: !secret mqtt_usr
  password: !secret mqtt_pwd

logger:
  level: WARN

ota:
  password: !secret esp_pwd

deep_sleep:
  run_duration: 2min
  sleep_duration: 720min
  wakeup_pin_mode: KEEP_AWAKE
  wakeup_pin: GPIO12 # change to GPIO25 and GPIO26

sensor:
  - platform: wifi_signal
    name: "Mailbox WiFi Signal"
    update_interval: 4s
    filters:
      - sliding_window_moving_average:
          window_size: 15
          send_every: 15

  - platform: adc
    pin: GPIO36
    name: "Mailbox Battery"
    attenuation: 6db
    unit_of_measurement: "V"
    update_interval: 4s
    filters:
      - multiply: 1.89
      - sliding_window_moving_average:
          window_size: 15
          send_every: 15

binary_sensor:
  - platform: status
    name: "Mailbox Status"
  - platform: gpio
    pin:
      number: GPIO25
    name: "Mailbox Lid"
    device_class: door
    filters:
      - delayed_on: 100ms
      - delayed_off: 10s
  - platform: gpio
    pin:
      number: GPIO26
    name: "Mailbox Door"
    device_class: door
    filters:
      - delayed_on: 100ms
      - delayed_off: 10s
  - platform: gpio # no longer needed ESPhome supports multiple wake pins
    pin:
      number: 12
      mode: INPUT_PULLDOWN
    name: "Mailbox Wake Pin"

Configuration for home assistant sensors is automatic due to discovery.

Home Assistant Configuration:

#################################################################
## Mailbox Full Sensor
#################################################################

- platform: mqtt
  state_topic: "home-assistant/variable/mailbox"
  name: "mailbox"
  payload_on: 'ON'
  payload_off: 'OFF'
  qos: 0
#################################################################
## Mailbox Automations
#################################################################

- id: mail_arrived_alert
  alias: 'Mail Arrived Alert'
  trigger:
    platform: state
    entity_id: binary_sensor.mailbox
    to: 'on'
  action:
  - service: notify.all_ios_devices
    data:
      message: Snail-mail has arrived.
      data:
        push:
          sound: "MailArrived.wav"

- id: mailbox_full
  alias: 'Mailbox Full'
  hide_entity: true
  initial_state: true
  trigger:
    platform: state
    entity_id: binary_sensor.mailbox_lid
    to: 'on'
  action:
    service: mqtt.publish
    data_template:
      payload: "ON"
      topic: 'home-assistant/variable/mailbox'
      retain: true

- id: mailbox_clear
  alias: 'Mailbox Clear'
  hide_entity: true
  initial_state: true
  trigger:
    platform: state
    entity_id: binary_sensor.mailbox_door
    to: 'on'
  action:
    service: mqtt.publish
    data_template:
      payload: "OFF"
      topic: 'home-assistant/variable/mailbox'
      retain: true

- id: mailbox_connection_monitor
  alias: 'Mailbox Connection Monitor'
  trigger:
    platform: state
    entity_id: binary_sensor.mailbox_status
    to: 'off'
    for:
      hours: 14
  action:
  - service: notify.ios_iphonex
    data:
      message: Communication lost to mailbox sensor.
      data:
        push:
          sound: "Attention.wav"

- id: mailbox_battery_monitor
  alias: 'Mailbox Battery Monitor'
  trigger:
    platform: numeric_state
    entity_id: sensor.mailbox_battery
    below: 3.3 # any lower than this and the ESP may reset
  action:
  - service: notify.ios_iphonex
    data_template:
      message: Mailbox battery low volatage {{ states('sensor.mailbox_battery') }}.
      data:
        push:
          sound: "Attention.wav"

I just added the battery monitor. Not sure if it will alart me when the sensor becomes unavailable. It spends 99% of it’s time in this ‘unavailable’ state (only waking up to report twice a day or if the reed switches activate).

1 Like