changeset 7:5a80f3f2be8d

more boards, cams
author drewp@bigasterisk.com
date Thu, 27 Jun 2024 16:55:03 -0700
parents 477883ce71ec
children d030ab3fc9f5
files cam-en-py.yaml cam-go-gn.yaml cam-tt-couch.yaml cam-tt-screen.yaml cam-ws-tt.yaml readme.md tt-console.yaml
diffstat 7 files changed, 534 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cam-en-py.yaml	Thu Jun 27 16:55:03 2024 -0700
@@ -0,0 +1,78 @@
+# mac 24:6f:28:af:b3:34
+
+esphome:
+  name: "cam-en-py"
+  platform: esp32
+  board: esp32cam
+
+logger:
+  level: INFO
+
+wifi:
+  networks:
+    - ssid: !secret wifi_ssid
+      password: !secret wifi_password
+
+ota:
+  platform: esphome
+
+mqtt:
+  id: mqtt_client
+  broker: "mqtt2.bigasterisk.com"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sensor:
+  - platform: wifi_signal
+    name: "wifi_signal"
+    update_interval: 60s
+
+light:
+  - platform: monochromatic
+    name: "flash"
+    output: flash_out
+    default_transition_length: 0s
+
+output:
+  - platform: ledc
+    id: flash_out
+    pin: GPIO4
+    frequency: 19531Hz
+    channel: 4
+
+esp32_camera:
+  external_clock:
+    pin: GPIO0
+    frequency: 20MHz
+  i2c_pins:
+    sda: GPIO26
+    scl: GPIO27
+  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
+  vsync_pin: GPIO25
+  href_pin: GPIO23
+  pixel_clock_pin: GPIO22
+  power_down_pin: GPIO32
+  name: "cam-en-py"
+  jpeg_quality: 10
+  vertical_flip: true
+  horizontal_mirror: true
+  # 320x240 640x480 800x600 1024x768 1280x1024 1600x1200
+  resolution: "800x600"
+
+esp32_camera_web_server:
+  - port: 8080
+    mode: stream
+  - port: 8081
+    mode: snapshot
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cam-go-gn.yaml	Thu Jun 27 16:55:03 2024 -0700
@@ -0,0 +1,78 @@
+# mac 24:6F:28:AE:4F:50
+
+esphome:
+  name: "cam-go-gn"
+  platform: esp32
+  board: esp32cam
+
+logger:
+  level: INFO
+
+wifi:
+  networks:
+    - ssid: !secret wifi_ssid
+      password: !secret wifi_password
+
+ota:
+  platform: esphome
+
+mqtt:
+  id: mqtt_client
+  broker: "mqtt2.bigasterisk.com"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sensor:
+  - platform: wifi_signal
+    name: "wifi_signal"
+    update_interval: 60s
+
+light:
+  - platform: monochromatic
+    name: "flash"
+    output: flash_out
+    default_transition_length: 0s
+
+output:
+  - platform: ledc
+    id: flash_out
+    pin: GPIO4
+    frequency: 19531Hz
+    channel: 4
+
+esp32_camera:
+  external_clock:
+    pin: GPIO0
+    frequency: 20MHz
+  i2c_pins:
+    sda: GPIO26
+    scl: GPIO27
+  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
+  vsync_pin: GPIO25
+  href_pin: GPIO23
+  pixel_clock_pin: GPIO22
+  power_down_pin: GPIO32
+  name: "cam-go-gn"
+  jpeg_quality: 10
+  vertical_flip: true
+  horizontal_mirror: true
+  # 320x240 640x480 800x600 1024x768 1280x1024 1600x1200
+  resolution: "1280x1024"
+
+esp32_camera_web_server:
+  - port: 8080
+    mode: stream
+  - port: 8081
+    mode: snapshot
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cam-tt-couch.yaml	Thu Jun 27 16:55:03 2024 -0700
@@ -0,0 +1,83 @@
+# mac 54:43:B2:A9:79:E4
+
+esphome:
+  name: "cam-tt-couch"
+  platform: esp32
+  board: esp32cam
+
+logger:
+  level: INFO
+
+wifi:
+  networks:
+    - ssid: !secret wifi_ssid
+      password: !secret wifi_password
+
+ota:
+  platform: esphome
+
+mqtt:
+  id: mqtt_client
+  broker: "mqtt2.bigasterisk.com"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+sensor:
+  - platform: wifi_signal
+    name: "wifi_signal"
+    update_interval: 60s
+
+light:
+  - platform: monochromatic
+    name: "flash"
+    output: flash_out
+    default_transition_length: 0s
+
+output:
+  - platform: ledc
+    id: flash_out
+    pin: GPIO4
+    frequency: 19531Hz
+    channel: 4
+
+esp32_camera:
+  external_clock:
+    pin: GPIO0
+    frequency: 20MHz
+  i2c_pins:
+    sda: GPIO26
+    scl: GPIO27
+  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
+  vsync_pin: GPIO25
+  href_pin: GPIO23
+  pixel_clock_pin: GPIO22
+  power_down_pin: GPIO32
+  name: "cam-tt-couch"
+  jpeg_quality: 10
+  vertical_flip: true
+  horizontal_mirror: true
+  # 320x240 640x480 800x600 1024x768 1280x1024 1600x1200
+  resolution: "800x600"
+
+esp32_camera_web_server:
+  - port: 8080
+    mode: stream
+  - port: 8081
+    mode: snapshot
+# ffplay -i http://cam-th-couch:8081/ -vf hqdn3d=luma_spatial=0:chroma_spatial=50:luma_tmp=3:chroma_tmp=3
+
+# maybe this first:
+#  vaguedenoiser=threshold=5
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cam-tt-screen.yaml	Thu Jun 27 16:55:03 2024 -0700
@@ -0,0 +1,78 @@
+# mac 54:43:B2:AB:C6:20
+
+esphome:
+  name: "cam-tt-screen"
+  platform: esp32
+  board: esp32cam
+
+logger:
+  level: INFO
+
+wifi:
+  networks:
+    - ssid: !secret wifi_ssid
+      password: !secret wifi_password
+
+ota:
+  platform: esphome
+
+mqtt:
+  id: mqtt_client
+  broker: "mqtt2.bigasterisk.com"
+
+  on_message:
+    - topic: cam/th-screen/projector_power
+      payload: "send"
+      then:
+        - remote_transmitter.transmit_nec:
+            address: 0x0F04
+            command: 0x52AD
+
+remote_transmitter:
+  id: ir_out
+  # 100R to ir led
+  pin: GPIO12
+  carrier_duty_percent: 50%
+
+sensor:
+  - platform: wifi_signal
+    name: "wifi_signal"
+    update_interval: 60s
+
+light:
+  - platform: monochromatic
+    name: "flash"
+    output: flash_out
+    default_transition_length: 0s
+
+output:
+  - platform: ledc
+    id: flash_out
+    pin: GPIO4
+    frequency: 19531Hz
+    channel: 4
+
+esp32_camera:
+  external_clock:
+    pin: GPIO0
+    frequency: 20MHz
+  i2c_pins:
+    sda: GPIO26
+    scl: GPIO27
+  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
+  vsync_pin: GPIO25
+  href_pin: GPIO23
+  pixel_clock_pin: GPIO22
+  power_down_pin: GPIO32
+  name: "cam-tt-screen"
+  jpeg_quality: 10
+  vertical_flip: true
+  horizontal_mirror: true
+  # 320x240 640x480 800x600 1024x768 1280x1024 1600x1200
+  resolution: "800x600"
+
+esp32_camera_web_server:
+  - port: 8080
+    mode: stream
+  - port: 8081
+    mode: snapshot
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cam-ws-tt.yaml	Thu Jun 27 16:55:03 2024 -0700
@@ -0,0 +1,78 @@
+# mac 24:62:ab:f9:de:5c
+
+esphome:
+  name: "cam-ws-tt"
+  platform: esp32
+  board: esp32cam
+
+logger:
+  level: INFO
+
+wifi:
+  networks:
+    - ssid: !secret wifi_ssid
+      password: !secret wifi_password
+
+ota:
+  platform: esphome
+
+mqtt:
+  id: mqtt_client
+  broker: "mqtt2.bigasterisk.com"
+
+binary_sensor:
+  - platform: gpio
+    pin: GPIO12
+    name: "motion"
+    device_class: motion
+
+
+
+
+
+
+
+
+
+sensor:
+  - platform: wifi_signal
+    name: "wifi_signal"
+    update_interval: 60s
+
+light:
+  - platform: monochromatic
+    name: "flash"
+    output: flash_out
+    default_transition_length: 0s
+
+output:
+  - platform: ledc
+    id: flash_out
+    pin: GPIO4
+    frequency: 19531Hz
+    channel: 4
+
+esp32_camera:
+  external_clock:
+    pin: GPIO0
+    frequency: 20MHz
+  i2c_pins:
+    sda: GPIO26
+    scl: GPIO27
+  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
+  vsync_pin: GPIO25
+  href_pin: GPIO23
+  pixel_clock_pin: GPIO22
+  power_down_pin: GPIO32
+  name: "cam-ws-tt"
+  jpeg_quality: 10
+  vertical_flip: true
+  horizontal_mirror: true
+  # 320x240 640x480 800x600 1024x768 1280x1024 1600x1200
+  resolution: "1600x1200"
+
+esp32_camera_web_server:
+  - port: 8080
+    mode: stream
+  - port: 8081
+    mode: snapshot
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/readme.md	Thu Jun 27 16:55:03 2024 -0700
@@ -0,0 +1,2 @@
+
+ffplay -i http://cam-th-couch:8080/ -vf hqdn3d=luma_spatial=0:chroma_spatial=50:luma_tmp=3:chroma_tmp=10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tt-console.yaml	Thu Jun 27 16:55:03 2024 -0700
@@ -0,0 +1,137 @@
+# mac 3c:71:bf:ab:6e:94
+
+esphome:
+  name: "tt-console"
+  platform: esp32
+  board: lolin32
+
+logger:
+  baud_rate: 0
+  level: DEBUG
+  logs:
+    out: DEBUG
+
+wifi:
+  networks:
+    - ssid: !secret wifi_ssid
+      password: !secret wifi_password
+
+ota:
+  platform: esphome
+
+sensor:
+  - platform: wifi_signal
+    name: "wifi_signal"
+    update_interval: 60s
+
+mqtt:
+  id: mqtt_client
+  broker: "mqtt2.bigasterisk.com"
+  on_json_message:
+    - topic: theater_blaster/ir_out/volume_up
+      then:
+        - remote_transmitter.transmit_nec:
+            address: 0x4BB6
+            command: 0x40BF
+            repeat:
+              times: !lambda |-
+                if (x.containsKey("times")) {
+                  return x["times"];
+                }
+                return 1;
+    - topic: theater_blaster/ir_out/volume_down
+      then:
+        - remote_transmitter.transmit_nec:
+            address: 0x4BB6
+            command: 0xC03F
+            repeat:
+              times: !lambda |-
+                if (x.containsKey("times")) {
+                  return x["times"];
+                }
+                return 1;
+  on_message:
+    - topic: theater_blaster/ir_out
+      payload: "input_bd"
+      then:
+        - remote_transmitter.transmit_nec:
+            address: 0x4B36
+            command: 0x31CE
+    - topic: theater_blaster/ir_out
+      payload: "input_cbl"
+      then:
+        - remote_transmitter.transmit_nec:
+            address: 0x4BB6
+            command: 0x708F
+    - topic: theater_blaster/ir_out
+      payload: "input_game"
+      then:
+        - remote_transmitter.transmit_nec:
+            address: 0x4BB6
+            command: 0xB04F
+    - topic: theater_blaster/ir_out
+      payload: "input_pc"
+      then:
+        - remote_transmitter.transmit_nec:
+            address: 0x4BB6
+            command: 0x39C6
+
+remote_receiver:
+  - id: ir_in
+    # CHO1838 receiver; sig|gnd|vcc 3v3
+    pin:
+      number: GPIO27
+      mode: INPUT
+      inverted: True
+    dump: nec
+  - id: rf_in
+    pin: GPIO13
+    tolerance: 20%
+    filter: 250us
+    idle: 8ms
+    dump: rc_switch
+    on_rc_switch:
+      then:
+        - logger.log:
+            level: INFO
+            tag: out
+            format: "RF read; proto %d; code %08llx"
+            args: [x.protocol, x.code]
+        - mqtt.publish:
+            topic: !lambda |-
+              return "tt-console/rf_received/" + 
+                std::to_string(x.protocol) +
+                "/" + std::to_string(static_cast<unsigned long>(x.code >> 32)) +
+                "/" + std::to_string(static_cast<unsigned long>(x.code & 0xffff));
+            payload: ""
+remote_transmitter:
+  id: ir_out
+  pin: GPIO14
+  carrier_duty_percent: 50%
+
+#13 rf recv
+#12 rf send
+#https://www.passion-radio.com/img/cms/wifi-kit-32-pinout.png
+
+#on_...:
+#  - remote_transmitter.transmit_nec:
+#      address: 0x1234
+#      command: 0x78AB
+
+i2c:
+  sda: 4
+  scl: 15
+
+font:
+  - file: "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf"
+    id: font_vera
+    size: 20
+
+display:
+  - platform: ssd1306_i2c
+    model: "SSD1306 128x64"
+    reset_pin: 16
+    address: 0x3C
+    lambda: |-
+      it.print(128/2, 0+6, id(font_vera), TextAlign::TOP_CENTER, "big cast erisk");
+      it.print(128/2, 64-6, id(font_vera), TextAlign::BOTTOM_CENTER ,"Volume 45");