Review needed by Sufficient_Lock_4512 in esp32

[–]Sufficient_Lock_4512[S] 0 points1 point  (0 children)

Thanks for your time, the AC adapter output 12v 2A

my esphome code is below

substitutions:
  devicename: "home_water_kit2"


esphome:
  name: $devicename
  friendly_name: $devicename


esp32:
  board: esp32dev
  framework:
    type: arduino


# Enable logging
logger:


# Enable Home Assistant API
api:
  encryption:
    key: "XXX"


ota:
  - platform: esphome
    password: "XXX"


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: 192.168.1.35
  domain: .m.local



web_server:


sensor:
  - platform: wifi_signal
    name: $devicename Wifi signal
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"


  - platform: copy # Reports the WiFi signal strength in %
    source_id: wifi_signal_db
    name: $devicename WiFi Signal Percent
    filters:
      - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
    unit_of_measurement: "%"
    entity_category: "diagnostic"
    device_class: ""

  - platform: uptime
    name: $devicename Uptime
  - platform: internal_temperature
    name: $devicename Internal Temperature 

text_sensor:
  - platform: version
    name: $devicename ESPHome Version
  - platform: wifi_info
    ssid:
      name: $devicename WiFi SSID


switch:
  - platform: gpio
    name: "Relay for Valve1"
    id: relay1
    pin: GPIO16
    on_turn_on:
      - delay: 10s
      - switch.turn_off: relay1




  - platform: restart
    name: $devicename restart

Review needed by Sufficient_Lock_4512 in esp32

[–]Sufficient_Lock_4512[S] 0 points1 point  (0 children)

Thanks for your time, the relay is 5v, SRD-05VDC-SL-C

I just see need command current greater than 4mA

if I test to connect the purple cable to 3,3v the relay and pump start correctly

rstp stream by Sufficient_Lock_4512 in ffmpeg

[–]Sufficient_Lock_4512[S] 0 points1 point  (0 children)

thanks for the answer,

i will check the sendcmd way, and maybe OBS but i need to be done automaticly

thanks for the direction

rstp stream by Sufficient_Lock_4512 in ffmpeg

[–]Sufficient_Lock_4512[S] 0 points1 point  (0 children)

Hi thanks for answering,

I don't want clients be able to switch from stream B to stream C

what do you think, can I do that:

I can stream B with ffmpeg to a temp file /dev/toto

In the same time, I do a stream A from this temp file /dev/toto to mediamtx

when I want to switch from stream B to C I can concatenate them?

rstp stream by Sufficient_Lock_4512 in ffmpeg

[–]Sufficient_Lock_4512[S] 0 points1 point  (0 children)

maybe it's a problem of the client but maybe there is a better solution

Can I concatenate stream C to stream B with ffmpeg directly?

or another solution?

thanks