Doorbell: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
Line 28: Line 28:
* It's possible to make OTA firmware updates on the ESP32
* It's possible to make OTA firmware updates on the ESP32
* ESP32 broadcasts the doorbell ring to the network via a UDP packet (`__RING__RING__`), and a Discord webhook in #door
* ESP32 broadcasts the doorbell ring to the network via a UDP packet (`__RING__RING__`), and a Discord webhook in #door
* You can trigger various sound effects (try sending the doorbell MOO\n, BAAH\n, TRASH\n, PLAY some_number\n as UDP packets to port 3339)
* You can trigger various sound effects (try sending the doorbell MOO\n, BAAH\n, TRASH\n, PLAY some_number\n as UDP packets to port 4242)
* Customizable sound files (connect USB micro to MP3 board, replacing 00001.mp3 will replace the primary chime; if you want to add additional sound effects just add those files).
* Customizable sound files (connect USB micro to MP3 board, replacing 00001.mp3 will replace the primary chime; if you want to add additional sound effects just add those files).


Line 44: Line 44:
import socket
import socket
UDP_IP = SOME_IP_HERE # find noisebell on the network
UDP_IP = SOME_IP_HERE # find noisebell on the network
UDP_PORT = 3339
UDP_PORT = 4242
MESSAGE = "TRASH\n"
MESSAGE = "TRASH\n"
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

Revision as of 11:56, 31 October 2022

Noisebridge | About | Visit | 272 | Manual | Contact | Guilds | Resources | Events | Projects | 5MoF | Meetings | Donate | (Edit)
272 Capp St. | Layout | Parking | Fence | Access | Patio | Entrance | Front | Hackitorium | Stage | Lockers | Stairs | Upstairs | Classrooms | Exits | Roll up door | Bathrooms | Network | Roof | Audio | AV | Construction | Electrical | Print Shop | Elevator | Back hall | Back patio | Fire escape | Plants | Sustenance | Housekeeping | (Edit)
Access | Gate | Front Door | Doorbell | RFID Token | Payphone | Security Camera | SecWG | Olympus (Door) | (Edit)
Nbdoorbell.png
You are standing at the Doorbell of Noisebridge's gate.

You see a red doorbell button, a payphone, and an RFID Token reader.

EXITS: Gate, Patio

> PRESS DOORBELL

You press the doorbell and wait for someone to let you into the patio.


> Blinkingcursor.gif

The doorbell will ring for someone to let you into the space. Be patient and don't ring multiple times without waiting a while for someone to come to greet you.

Doorbell 4.0

Doorbell diagram

Updated: 2022-10-28

Summary

  • ESP32 Based (sketch for arduino ide)
  • DY-SV8F MP3 board for chimes and sound effects, it has 8MB? of storage built in (manual).
  • ESP32: GPIO23 - INPUT triggers doorbell, GPIO17 - TX, connect to RX on MP3 Board

Features

  • It's possible to make OTA firmware updates on the ESP32
  • ESP32 broadcasts the doorbell ring to the network via a UDP packet (`__RING__RING__`), and a Discord webhook in #door
  • You can trigger various sound effects (try sending the doorbell MOO\n, BAAH\n, TRASH\n, PLAY some_number\n as UDP packets to port 4242)
  • Customizable sound files (connect USB micro to MP3 board, replacing 00001.mp3 will replace the primary chime; if you want to add additional sound effects just add those files).

Troubleshooting

  • Is the shared power supply for the ESP32 and MP3 board plugged in? If using powered speakers are those plugged in? Is the speaker volume turned up?
  • Are all wires attached? ESP32: GPIO15, GPIO23 to doorbell wires. GPIO17 to MP3 RX Pin, 5V, and GND. DY-SV8F: Power, GND, RX to ESP32 TX. Check wire nuts.
  • Can you ping noisebell.local on the network? If you attach a USB cable to the ESP32 do you get serial read out? What happens when you press the doorbell, bridge GPIO15 and GPIO23, or send UDP packets to attempt to play some file? Anything in the serial console?
  • Can you re-flash the ESP32?

Quirks

You can send a UDP packet to the device `PLAY 2` for example would play file #2 on the device. The file system does not always order things as you expect. This dedicated library gives a good overview of the issue and possible mitigations. Absolute worst case you can send UDP packets, iterate through files, playing them, make note of the appropriate file and update the ESP firmware if needed!

# Tell Noisebridge to take out the trash
import socket
UDP_IP = SOME_IP_HERE # find noisebell on the network
UDP_PORT = 4242
MESSAGE = "TRASH\n"
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(MESSAGE.encode(), (UDP_IP, UDP_PORT))

Doorbell 3.0

Unknown

Doorbell 2.0

Arduino-based, includes lights and a customizable tone.

To do

* mount in a stable enclosure
* move transistor (sound) from pin 12 to another pin so we can use ethernet. (4,10,11,12,13 are used by ethernet/sd card. 5 is buzzer signal, 7 is LEDs)
* run an ethernet cable to the doorbell
* Improve and expand doorbell code!

Troubleshooting

* Check that the speaker is connected to the green terminals of the arduino, and an audio cable is plugged into the intercom box by the top door.
* Hit the reset key on the Arduino
* Ring the door bell. Does it work?
* Re-upload or modify the Arduino sketch

If this fails you can revert to doorbell 1.0.

Want to improve the doorbell? Change the chime? Here is arduino code. Hack it!

You'll need a USB mini cable to connect. The board is a [1], but choose Uno in the Arduino IDE.

Improvements & ability to alter light and sound patterns via ethernet will be coming soon.

Doorbell 1.0

Via original intercom box.

Fallback instructions.

Go to the intercom box by the top door:

* Ensure the buzzer switch on the top is set to 'On'
* Unplug the audio cable from the side of the intercom box by the door.

Doorbell 1.0 functionality should work

Pacific Electronics 3403 Door buzzer system.