Starting esp32_cam

Merge branch 'master' of ssh://meneelyt.myds.me:1352/volume1/homes/git/IoT/ESPHome
This commit is contained in:
2020-12-23 16:25:08 -05:00
10 changed files with 226 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ wifi:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lily Fallback Hotspot"
ssid: "Lily15 Fallback Hotspot"
password: "QNWj7LmaNoD6"
manual_ip:
# Set this to the IP of the ESP
@@ -22,14 +22,36 @@ wifi:
captive_portal:
# Enable logging
logger:
level: debug
#logger:
# level: debug
# Enable Home Assistant API
api:
ota:
deep_sleep:
run_duration: 30sec
sleep_duration: 1min
id: deep_sleep_1
mqtt:
broker: 192.168.86.99
username: ha
password: lorrie
on_message:
topic: lily15/ota_mode
payload: 'ON'
then:
- deep_sleep.prevent: deep_sleep_1
text_sensor:
- platform: mqtt_subscribe
name: "Data from topic"
id: mqttsensor
topic: the/topic
spi:
clk_pin: 18
mosi_pin: 23
@@ -46,9 +68,12 @@ font:
- file: "arial.ttf"
id: font_arialbig
size: 24
- file: "times.ttf"
id: font_times
size: 16
# - file: "times.ttf"
# id: font_times
# size: 16
- file: "arial.ttf"
id: font_arialtiny
size: 10
sensor:
- platform: homeassistant
@@ -59,6 +84,10 @@ sensor:
id: bedroomtemperature
internal: true
entity_id: sensor.bedroomtemperature
- platform: homeassistant
id: backyardtemperature
internal: true
entity_id: sensor.backyardtemperature
#Dimensions: 122 x 250
display:
@@ -69,11 +98,15 @@ display:
reset_pin: 16
model: 2.13in-ttgo-b73
id: display_update
update_interval: 30s
full_update_every: 30
update_interval: 10s
full_update_every: 300
rotation: 90°
lambda: |-
it.strftime(250, 0, id(font_arialbig), TextAlign::TOP_RIGHT, "%a %b %e %l:%M %P", id(esptime).now());
it.strftime(125, 0, id(font_arialbig), TextAlign::TOP_CENTER, "%a %b %e %l:%M %P", id(esptime).now());
it.line(0,25,250,25);
it.printf(0, 34, id(font_arial), "Office: %.1f°F", id(timofficetemperature).state);
it.printf(0, 54, id(font_arial), "Bedroom: %.1f°F", id(bedroomtemperature).state);
it.printf(0, 37, id(font_arial), "Tim office: %.1f°F", id(timofficetemperature).state);
it.printf(0, 57, id(font_arial), "Bedroom: %.1f°F", id(bedroomtemperature).state);
it.printf(0, 77, id(font_arial), "Outside: %.1f°F", id(backyardtemperature).state);
it.printf(0, 97, id(font_arial), "MQTT message: %s", id(mqttsensor).state.c_str());
it.printf(125, 132, id(font_arialtiny), TextAlign::BOTTOM_CENTER, "192.168.87.15");

54
purple2.yaml Normal file
View File

@@ -0,0 +1,54 @@
esphome:
name: purple2
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "Meneely"
password: "punxsutawney1"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Purple Fallback Hotspot"
password: "QNWj7LmaNoD6"
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.87.11
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.86.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.254.0
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
i2c:
sda: D2
scl: D1
scan: True
id: bus_a
sensor:
- platform: bme280
temperature:
name: "Purple2_BME280 Temperature"
oversampling: 16x
pressure:
name: "Purple2_BME280 Pressure"
humidity:
name: "Purple2_BME280 Humidity"
address: 0x76
update_interval: 60s
- platform: bh1750
name: "Purple2_BH1750 Illuminance"
address: 0x23
measurement_time: 69
update_interval: 60s

34
requirements.txt Normal file
View File

@@ -0,0 +1,34 @@
bitstring>=3.1.7
bottle>=0.12.18
certifi>=2020.6.20
cffi>=1.14.4
chardet>=3.0.4
click>=7.1.2
colorama>=0.4.4
colorlog>=4.2.1
cryptography>=3.3.1
ecdsa>=0.16.0
esphome>=1.15.3
esptool>=2.8
idna>=2.10
ifaddr>=0.1.7
marshmallow>=3.8.0
paho-mqtt>=1.5.0
Pillow>=8.0.0
platformio>=4.3.4
protobuf>=3.12.2
pyaes>=1.6.1
pycparser>=2.20
pyelftools>=0.26
pyserial>=3.4
pytz>=2020.1
PyYAML>=5.3.1
reedsolo>=1.5.4
requests>=2.24.0
semantic-version>=2.8.5
six>=1.15.0
tabulate>=0.8.7
tornado>=6.0.4
tzlocal>=2.1
urllib3>=1.25.11
voluptuous>=0.11.7

35
requirements20201215.txt Normal file
View File

@@ -0,0 +1,35 @@
bitstring==3.1.7
bottle==0.12.19
certifi==2020.12.5
cffi==1.14.4
chardet==4.0.0
click==7.1.2
colorama==0.4.4
colorlog==4.6.2
cryptography==3.3.1
ecdsa==0.16.1
esphome==1.15.3
esptool==3.0
idna==2.10
ifaddr==0.1.7
marshmallow==3.9.1
paho-mqtt==1.5.1
Pillow==8.0.1
pkg-resources==0.0.0
platformio==5.0.3
protobuf==3.14.0
pyaes==1.6.1
pycparser==2.20
pyelftools==0.27
pyserial==3.5
pytz==2020.4
PyYAML==5.3.1
reedsolo==1.5.4
requests==2.25.0
semantic-version==2.8.5
six==1.15.0
tabulate==0.8.7
tornado==6.1
tzlocal==2.1
urllib3==1.26.2
voluptuous==0.12.1

55
shelly1_1.yaml Normal file
View File

@@ -0,0 +1,55 @@
esphome:
name: shelly1_1
platform: ESP8266
board: esp01_1m
wifi:
ssid: "Meneely"
password: "punxsutawney1"
power_save_mode: none
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Shelly1_1 Fallback Hotspot"
password: "QNWj7LmaNoD6"
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.87.21
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.86.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.254.0
# Enable logging
logger:
level: debug
# Enable Home Assistant API
api:
ota:
# Device Specific Config
output:
- platform: gpio
pin: GPIO4
id: shelly_1_relay
light:
- platform: binary
name: "Living Room Light (Shelly)"
output: shelly_1_relay
id: lightid
binary_sensor:
- platform: gpio
pin:
number: GPIO5
#mode: INPUT_PULLUP
#inverted: True
name: "Switch Shelly 1"
on_state:
then:
- light.toggle: lightid
internal: true
id: switchid

BIN
shelly1_orig.bin Normal file

Binary file not shown.

1
upload_purple Normal file
View File

@@ -0,0 +1 @@
esphome purple.yaml run --upload-port 192.168.87.11

1
upload_purple2 Normal file
View File

@@ -0,0 +1 @@
esphome purple2.yaml run --upload-port 192.168.87.11

1
write_purple2 Normal file
View File

@@ -0,0 +1 @@
esphome purple2.yaml run --upload-port /dev/ttyS5

1
write_shelly1 Normal file
View File

@@ -0,0 +1 @@
esphome shelly1_1.yaml run --upload-port /dev/ttyS5