door intercom #16226
Replies: 3 comments 3 replies
-
Trying to use your user_config_override #define USE_SHINE I have 2 problems
Environment:
Any idea? Thanks |
Beta Was this translation helpful? Give feedback.
-
you must add in linker section lib_extra_dirs Then define the i2s pins in tasmota GUI and watch the console on reboot |
Beta Was this translation helpful? Give feedback.
-
I'm trying to use this feature but
|
Beta Was this translation helpful? Give feedback.
-
this describes an audio intercom with push to talk interface.
it may be used for a door intercom, or baby phone or similar
Hardware requirements:
any ESP32 should work (except C3), no PSRAM needed.
I2S Audio DAC with amplifier https://www.ebay.de/itm/165446200440?hash=item26855cac78:g:A8EAAOSwDspiY5o4
I2S microphone https://www.ebay.de/itm/173974875385?hash=item2881b5ecf9:g:B-cAAOSwZbRdVhJf
connect Audio DAC and microphone to any suitable ESP32 pins, microphone VCC must not be higher than 3.3 V. connect L/R pin to GND, connect an (8 Ohm) speaker to the DAC
and set the appropriate I2S settings in Tasmota GPIO WebUI.
I2S_BLK,I2S_WS,I2S_DOUT,I2S_DIN
you need 2 of these ESP devices, one for the door and one in house.
these are the console cmds to setup the bridge
// set slave ip, the ip of the door device
i2sbridge 192.168.188.105
// swap microphone channels, 6 swap on, 7 = swap off
i2sbridge 6
// set master mode, 4 = master, 5 = slave
i2sbridge 4
// set push to talk pin (here pin 13)
// when set pushing sets write mode, releasing sets read mode
i2sbridge p13
; start bridge 1 = read from slave, 2 = write to slave, 3 = loopback, 0 = off
i2sbridge 1
; set micro gain factor G = 1-50
i2smgain G
slave does not need any preset, except mgain or mic swap when desired
currently settings are not persistent and have to be preset at boot time by rule or script
here is a script example to setup a master device
>D
once=0
res=0
p:micgain=0
micrec=0
bridge=0
>BS
>F
if chg[micgain]>0 {
->i2smgain %0micgain%
}
>S
if wifis>0
and once==0 {
; set slave ip
=>i2sbridge 192.168.188.105
;swap microphone source
=>i2sbridge 6
; set to master mode
=>i2sbridge 4
; set ptt pin
=>i2sbridge p13
; set mic gain
=>i2smgain %0micgain%
once=1
}
if chg[bridge]>0 {
if bridge>0 {
=>i2sbridge 1
} else {
=>i2sbridge 0
}
}
>WS
sl(1 50 micgain "1" "Micro gain : %0micgain%" "50")
bu(bridge "Stop audio bridge" "Start audio bridge")
defines for user_config_override:
#define USE_SHINE
#define USE_I2S_AUDIO
#define USE_I2S_MIC
#define I2S_BRIDGE
#define MICSRATE 16000
#define MIC_CHANNELS 2
Beta Was this translation helpful? Give feedback.
All reactions