esphome-stream-server icon indicating copy to clipboard operation
esphome-stream-server copied to clipboard

can use muti serial?

Open raxel0510 opened this issue 2 years ago • 1 comments

ESP32 have 3 uart can use uart1 port:5000 uart2 port:5001???

raxel0510 avatar Aug 25 '22 11:08 raxel0510

Thanks for this amazing tool! Sorry for my stupid question - I tried to connect the stream-server with 2 uarts - this can as yaml validated, but the code isn't executable.

mc0110 avatar Oct 11 '22 14:10 mc0110

It is definitely possible to run multiple stream servers, even if you do have to change the code a little to allow it. I took a copy of this code a couple of years ago, modified the constructor to accept a port parameter rather than defaulting to a set port, and simply created two stream servers. Not sure if the current code has been updated to allow the same, but it is not difficult to do yourself.

RoganDawes avatar Dec 15 '22 15:12 RoganDawes

Yes, this is possible:

uart:
  - id: uart1
    # ...
  - id: uart2
    # ...

stream_server:
  - uart_id: uart1
    port: 5000
  - uart_id: uart2
    port: 5001

oxan avatar Feb 07 '23 21:02 oxan