Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Support #20

Open
mrtnkhl opened this issue May 17, 2024 · 6 comments
Open

Audio Support #20

mrtnkhl opened this issue May 17, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@mrtnkhl
Copy link

mrtnkhl commented May 17, 2024

There is currently no audio support planned until reverse engineering and interfacing with the digital bus is fully working. Creating this Issue as a placeholder for possible future work and to inform others who might be looking for audio (and video) support.

Per @DaSchaef the audio (and video signals) are modulated onto the wire in an analog format. It is suggested but has not been verified through testing that connecting a headphone amplifier via a coupling capacitor to the bus would yield audio signals. Likewise, connecting a line-out to the bus could allow sending audio signals to the (door) station. It is important to understand that analogue audio (and video) signals are only present after the digital bus command has been sent to the respective station to transmit audio (or audio and video) on the wires that also transport the digital bus signals.

See https://gdoor-org.github.io/documentation/protocol.html "Request Audio", "Request Video" for more details on the respective bus messages.

Since is (unfortunately) no digital audio (or video) signal are present, a combination of an ADC and DAC, most likely connecting via I2S to the ESP32 is needed to convert the analog signals to the digital domain. Using an ADC, DAC and a Raspberry Pi could be an option as well but this would require too many resources and power.

Per @DaSchaef, on the ESP32 side, there is additional work needed, mostly in software, like working with the DMA engine, timing Wifi transmissions correctly, etc.. This work can be summarized in the categories of coupling, digitizing, processing and streaming to an endpoint, e.g. via SIP or RTSP. If one wanted to have bidirectional, parallel communication, with the other (door) station some analog circuit magic to prevent audio feedback loops would be needed as well.

@mrtnkhl
Copy link
Author

mrtnkhl commented May 17, 2024

https://github.com/sikorapatryk/sip-call

Some previous work has been done using an ESP32 with an ADC and DAC as a SIP client, so maybe this can be of use here.

@mrtnkhl
Copy link
Author

mrtnkhl commented May 17, 2024

https://github.com/vvigilante/comelit-simplebus1

Another similar project but for Comelit, including the analog circuits interfacing with the ESP32 internal ADC and DAC for audio:

image

@mrtnkhl
Copy link
Author

mrtnkhl commented May 17, 2024

See this thread for a similar discussion for a Comelit system:
Elektroarzt/simplebus2-mqtt-bridge#3

@DaSchaef DaSchaef added the enhancement New feature or request label May 27, 2024
@DaSchaef
Copy link
Contributor

DaSchaef commented Jun 6, 2024

I successfully received audio via my computer:

  • I just connected a cheap USB audio dongle to the bus (after the diode bridge, so that I do not need to care about polarity). (So that if something get's damaged it is only the cheap USB dongle)
  • I used Audacity to record the audio from the USB dongle
  • I send AUDIO_REQUEST via the GDoor v3.1 hardware adapter to my outdoor station
  • I talked in front of the station

My voice was easily recorded on the computer.
So I can confirm that bus audio is just plain simple analog "line audio".

I would not recommend this setup so far, as for a real usage more protection and also a bit of filtering is needed.
In real world usage there would be multiple issues:

  • The connected audio may disturb or "weaken" the bus signals
  • The bus signals may damage the USB audio input

(both easily solvable)

After doing a lot of research:

  • ESP video is a project in its own, we would solve problems which do not need to be solved.
    Even if we realize a solution (external ADCs etc), they will not be long lasting, as chip availability may change etc.
  • ESP audio may be possible, but as video is not possible, let's just make one adapter.

My feeling is we should continue the audio and video route by just making plain simple adapters.
Kind of "bus to cinch analog video" and "bus to cinch analog audio".
These signals can be digitized with ~10€ USB Dongles and a Raspberry Pi, which itself can then act as VOIP phone,
image sender or whatever is needed.

grafik

@DaSchaef
Copy link
Contributor

DaSchaef commented Jun 6, 2024

I have no Gira equipment here to test video. (if someone finds a cheap used video outdoor station 😉 , indoor is not needed for tests, we know how to request it 😅 )
So my raspberry pi solution / hat would be a "blind try" regarding video.

@mrtnkhl
Copy link
Author

mrtnkhl commented Jun 8, 2024

@DaSchaef do any of the Comelit circuits posted above look useful? It seems like they have bus-coupled audio ADC/DAC working and code for it as well on the ESP32 platform?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants