Norien / Home-Assistant-Config

:house: Home Assistant configuration
94 stars 12 forks source link

Retro Fit for Smart Doorbell #25

Closed Norien closed 7 years ago

Norien commented 7 years ago

Objective: Replace old dumb doorbell with Nodemcu to allow automatons within Home-Assistant.

image 20170503_111545_hdr 20170503_110809_hdr 20170503_120036_hdr

Data Sheet for rectifier Firmware - ESPEasy

Norien commented 7 years ago

At some point my house had a second doorbell system installed for the basement. This is a cheap wireless system "carlon rc3105r"

20170508_110559_hdr I removed the battery terminals and plugged them into the nodemcu 3.3v and ground and that works ok. I then took the speaker input to the gpio and setup in espeasy as a switch

20170508_123254_hdr

capture

without issue Home Assistant picked up the mqtt topic as a binary_sensor!

binary_sensor:
  - platform: mqtt
    state_topic: "/doorbell/frontdoor/Switch"
    qos: 0
    payload_on: "0"
    payload_off: "1"

Next up is to cut the original box apart a bit to fit the nodemcu.

Norien commented 7 years ago

20170508_171633_hdr 20170508_171658_hdr

Norien commented 7 years ago

I forgot to reference the commit for code https://github.com/Norien/Home-Assistant-Config/commit/d21d4d1d2ba329bb1a1216a5ab38b820d8be6e66

Norien commented 7 years ago

Having some issues with the NodeMCU going offline approx once per day which requires manual reboot. Power adapter appears to be ok 5.1v @1amp it was suggested possibly the doorbell was TOO close to the router causing issues so I have moved it about 15 feet away and I'll see how that goes.

Norien commented 7 years ago

Setting Volume for night time was easier then I expected

    - service: media_player.volume_set
      data_template:
        entity_id: media_player.kitchen
        volume_level: >
          {% if is_state('sun.sun', 'above_horizon') %} 0.50
          {% elif is_state('sun.sun', 'below_horizon') %} 0.30
          {% endif %}

Data template makes things easy!

Norien commented 7 years ago

Solid uptime on the nodeMCU now. Looks like the stock firmware for the Netgear router was the culprit. Dd-wrt for the win!