2019-05-16 14:55:08 +00:00
|
|
|
# Further reference
|
|
|
|
# https://platformio.org/lib
|
|
|
|
# SHT1x - 86 - https://platformio.org/lib/show/86/SHT1x
|
|
|
|
# MAX1704X - 5812 - https://platformio.org/lib/show/5812/MAX1704X/
|
|
|
|
# GxEPD2 - 5869 - https://platformio.org/lib/show/5869/GxEPD2
|
|
|
|
# AsyncMqttClient - 346 - https://platformio.org/lib/show/346/AsyncMqttClient/
|
|
|
|
# Adafruit GFX Library - 13 - https://platformio.org/lib/show/13/Adafruit GFX Library/
|
2019-05-27 17:29:03 +00:00
|
|
|
# SparkFun VEML6075 Library - 5452 - https://platformio.org/lib/show/5452/SparkFun%20VEML6075%20Arduino%20Library
|
|
|
|
# Adafruit Seesaw - 1890 - https://platformio.org/lib/show/1890/Adafruit%20seesaw%20Library
|
2019-05-16 14:55:08 +00:00
|
|
|
|
|
|
|
# Node Config
|
|
|
|
esphome:
|
|
|
|
name: !secret node_name
|
|
|
|
platform: ESP32
|
|
|
|
board: featheresp32
|
|
|
|
platformio_options:
|
|
|
|
upload_speed: 115200
|
|
|
|
includes:
|
|
|
|
- sht1x.h
|
|
|
|
- max1704xsensor.h
|
2019-05-27 17:29:03 +00:00
|
|
|
- veml6075.h
|
|
|
|
- local_plants.h
|
2019-05-16 14:55:08 +00:00
|
|
|
libraries:
|
|
|
|
- SPI
|
|
|
|
- Wire
|
|
|
|
- "346"
|
|
|
|
- "86"
|
|
|
|
- "5812"
|
2019-05-27 17:29:03 +00:00
|
|
|
- "5452"
|
|
|
|
- "1890"
|
2019-05-18 02:26:05 +00:00
|
|
|
on_boot:
|
2019-05-20 02:35:31 +00:00
|
|
|
- priority: 90.0 # 100 is highest where early init happens, 50.0 is where sensors come up
|
|
|
|
then:
|
|
|
|
- lambda: |-
|
2019-05-27 17:29:03 +00:00
|
|
|
id(early_boot) = true;
|
2019-05-20 02:35:31 +00:00
|
|
|
pinMode(13, OUTPUT);
|
|
|
|
digitalWrite(13, HIGH);
|
2019-05-27 17:29:03 +00:00
|
|
|
delay(100);
|
2019-05-20 02:35:31 +00:00
|
|
|
- priority: -100
|
|
|
|
then:
|
|
|
|
- lambda: |-
|
2019-05-27 17:29:03 +00:00
|
|
|
id(early_boot) = false;
|
|
|
|
ESP_LOGD("on_boot: -10:", "Starting sensor updates");
|
|
|
|
//////////////////////////////////////////////////
|
2019-05-20 02:35:31 +00:00
|
|
|
ESP_LOGD("on_boot: -10:", "WiFi");
|
|
|
|
id(sensor_wifi_signal)->update();
|
|
|
|
ESP_LOGD("on_boot: -10:", "END WiFi");
|
2019-05-27 17:29:03 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
//ESP_LOGD("on_boot: -10:", "UV");
|
|
|
|
//id(ptr_component_veml6075)->update();
|
|
|
|
//ESP_LOGD("on_boot: -10:", "END UV");
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
//ESP_LOGD("on_boot: -10:", "delay(500)");
|
|
|
|
delay(500);
|
|
|
|
ESP_LOGD("on_boot: -10:", "END delay(500)");
|
|
|
|
//////////////////////////////////////////////////
|
2019-05-20 02:35:31 +00:00
|
|
|
ESP_LOGD("on_boot: -10:", "shtx1");
|
|
|
|
((SHT1xSensor*)id(ptr_component_shtx1))->update();
|
|
|
|
ESP_LOGD("on_boot: -10:", "END shtx1");
|
2019-05-27 17:29:03 +00:00
|
|
|
//////////////////////////////////////////////////
|
2019-05-20 02:35:31 +00:00
|
|
|
ESP_LOGD("on_boot: -10:", "delay(500)");
|
|
|
|
delay(500);
|
|
|
|
ESP_LOGD("on_boot: -10:", "END delay(500)");
|
2019-05-27 17:29:03 +00:00
|
|
|
//////////////////////////////////////////////////
|
2019-05-20 02:35:31 +00:00
|
|
|
ESP_LOGD("on_boot: -10:", "max1704x");
|
|
|
|
id(ptr_component_max1704x)->update();
|
|
|
|
ESP_LOGD("on_boot: -10:", "END max1704x");
|
2019-05-27 17:29:03 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
ESP_LOGD("on_boot: -10:", "delay(500)");
|
|
|
|
delay(500);
|
|
|
|
ESP_LOGD("on_boot: -10:", "END delay(500)");
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
ESP_LOGD("on_boot: -10:", "LocalPlants");
|
|
|
|
id(ptr_component_local_plants)->update();
|
|
|
|
ESP_LOGD("on_boot: -10:", "END local_plants");
|
|
|
|
//////////////////////////////////////////////////
|
2019-05-20 02:35:31 +00:00
|
|
|
ESP_LOGD("on_boot: -10:", "delay(500)");
|
|
|
|
delay(500);
|
|
|
|
ESP_LOGD("on_boot: -10:", "END delay(500)");
|
2019-05-27 17:29:03 +00:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value sensor_wifi_signal: %.1f", id(sensor_wifi_signal).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Temperature_C: %.1f", id(Temperature_C).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Temperature_F: %.1f", id(Temperature_F).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Humidity: %.1f", id(Humidity).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value uva: %.1f", id(uva).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value uvb: %.1f", id(uvb).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value uv_index: %.1f", id(uv_index).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_1: %.1f", id(Plant_1).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_2: %.1f", id(Plant_2).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_3: %.1f", id(Plant_3).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_4: %.1f", id(Plant_4).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_5: %.1f", id(Plant_5).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_6: %.1f", id(Plant_6).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_7: %.1f", id(Plant_7).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Plant_8: %.1f", id(Plant_8).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Battery_Voltage: %.1f", id(Battery_Voltage).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Battery_Level: %.1f", id(Battery_Level).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Battery_Sleeping: %.1f", id(Battery_Sleeping).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Battery_Alert: %.1f", id(Battery_Alert).state);
|
|
|
|
ESP_LOGD("on_boot: -10:", "Value Battery_Threshold: %.1f", id(Battery_Threshold).state);
|
|
|
|
//////////////////////////////////////////////////
|
2019-05-20 02:35:31 +00:00
|
|
|
ESP_LOGD("on_boot: -10:", "Display");
|
2019-05-21 01:52:31 +00:00
|
|
|
id(display_main).clear();
|
2019-05-20 02:35:31 +00:00
|
|
|
id(display_main).update();
|
|
|
|
ESP_LOGD("on_boot: -10:", "END Display");
|
2019-05-27 17:29:03 +00:00
|
|
|
//////////////////////////////////////////////////
|
2019-05-20 02:35:31 +00:00
|
|
|
ESP_LOGD("on_boot: -10:", "END custom");
|
|
|
|
delay(500);
|
2019-05-27 17:29:03 +00:00
|
|
|
// Go to deep sleep if NOT in OTA mode
|
|
|
|
if (! id(ota_mode)) {
|
|
|
|
id(deep_sleep_main)->begin_sleep();
|
|
|
|
}
|
2019-05-18 02:26:05 +00:00
|
|
|
on_shutdown:
|
|
|
|
then:
|
|
|
|
- lambda: |-
|
|
|
|
digitalWrite(13, LOW);
|
2019-05-16 14:55:08 +00:00
|
|
|
|
2019-05-30 23:56:49 +00:00
|
|
|
# Basic status infos via blinky LED
|
|
|
|
# https://esphome.io/components/status_led.html
|
|
|
|
status_led:
|
|
|
|
pin:
|
|
|
|
number: 32
|
|
|
|
inverted: True
|
|
|
|
|
2019-05-16 14:55:08 +00:00
|
|
|
# WiFi config
|
|
|
|
wifi:
|
|
|
|
ssid: !secret wifi_ssid
|
|
|
|
password: !secret wifi_password
|
|
|
|
domain: !secret node_domain
|
2019-05-30 23:56:49 +00:00
|
|
|
power_save_mode: light
|
2019-05-16 14:55:08 +00:00
|
|
|
|
|
|
|
# Enable I2C (Qwiic and others)
|
|
|
|
i2c:
|
|
|
|
|
|
|
|
# Enable SPI
|
|
|
|
# CLK: D5
|
|
|
|
# MOSI: D18
|
|
|
|
spi:
|
|
|
|
clk_pin: 5
|
|
|
|
mosi_pin: 18
|
|
|
|
|
|
|
|
deep_sleep:
|
2019-05-20 02:35:31 +00:00
|
|
|
id: deep_sleep_main
|
2019-06-10 22:34:29 +00:00
|
|
|
run_duration: 15min
|
|
|
|
sleep_duration: 6h
|
2019-05-16 14:55:08 +00:00
|
|
|
wakeup_pin_mode: INVERT_WAKEUP # stop caring and be judicious about tolerance of goofy pin modes
|
|
|
|
|
|
|
|
# Enable logging
|
|
|
|
logger:
|
|
|
|
level: DEBUG # Flip to ERROR for production deployments
|
2019-05-21 01:52:31 +00:00
|
|
|
baud_rate: 115200 # Disable UART logging
|
2019-05-16 14:55:08 +00:00
|
|
|
|
|
|
|
# Enable Home Assistant API
|
|
|
|
#api:
|
|
|
|
# password: !secret api_password
|
|
|
|
|
|
|
|
# OTA Config
|
|
|
|
ota:
|
|
|
|
password: !secret ota_password
|
|
|
|
safe_mode: true
|
|
|
|
|
|
|
|
# Web Server (DISABLE outside of testing)
|
|
|
|
#web_server:
|
|
|
|
# port: 80
|
|
|
|
|
|
|
|
# MQTT CLIENT
|
|
|
|
mqtt:
|
|
|
|
broker: !secret mqtt_client_broker
|
|
|
|
port: 8883
|
|
|
|
username: !secret mqtt_client_username
|
|
|
|
password: !secret mqtt_client_password
|
|
|
|
birth_message:
|
2019-05-27 17:29:03 +00:00
|
|
|
topic: 'ha/status'
|
2019-05-16 14:55:08 +00:00
|
|
|
payload: 'online'
|
|
|
|
will_message:
|
2019-05-27 17:29:03 +00:00
|
|
|
topic: 'ha/status'
|
2019-05-16 14:55:08 +00:00
|
|
|
payload: 'offline'
|
|
|
|
|
2019-05-20 02:35:31 +00:00
|
|
|
globals:
|
|
|
|
- id: ptr_component_shtx1
|
|
|
|
type: "SHT1xSensor*"
|
|
|
|
restore_value: no
|
2019-05-27 17:29:03 +00:00
|
|
|
- id: ptr_component_veml6075
|
|
|
|
type: "VEML6075Sensor*"
|
|
|
|
restore_value: no
|
2019-05-20 02:35:31 +00:00
|
|
|
- id: ptr_component_max1704x
|
|
|
|
type: "MAX1704xSensor*"
|
|
|
|
restore_value: no
|
2019-05-27 17:29:03 +00:00
|
|
|
- id: ptr_component_local_plants
|
|
|
|
type: "LocalPlantsSensor*"
|
|
|
|
restore_value: no
|
|
|
|
- id: early_boot
|
|
|
|
type: bool
|
|
|
|
restore_value: no
|
|
|
|
- id: ota_mode
|
|
|
|
type: bool
|
|
|
|
restore_value: no
|
|
|
|
initial_value: "false"
|
2019-05-20 02:35:31 +00:00
|
|
|
|
2019-05-20 21:59:10 +00:00
|
|
|
time:
|
|
|
|
- platform: sntp
|
|
|
|
id: sntp_time
|
|
|
|
servers: 10.5.5.2
|
|
|
|
|
2019-05-20 02:35:31 +00:00
|
|
|
binary_sensor:
|
|
|
|
- platform: status
|
|
|
|
name: "Status"
|
2019-05-27 17:29:03 +00:00
|
|
|
- platform: gpio
|
|
|
|
name: "OTA Button"
|
|
|
|
id: button_ota
|
|
|
|
internal: true
|
|
|
|
pin:
|
|
|
|
number: A3
|
|
|
|
mode: INPUT_PULLDOWN
|
|
|
|
on_release:
|
|
|
|
then:
|
|
|
|
- lambda: |-
|
|
|
|
id(ota_mode) = true;
|
|
|
|
- deep_sleep.prevent: deep_sleep_main
|
2019-05-20 02:35:31 +00:00
|
|
|
|
|
|
|
sensor:
|
|
|
|
- platform: wifi_signal
|
|
|
|
id: sensor_wifi_signal
|
|
|
|
name: "WiFi_Signal"
|
|
|
|
update_interval: 3min
|
|
|
|
unit_of_measurement: "dB"
|
|
|
|
accuracy_decimals: 1
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- platform: custom
|
|
|
|
lambda: |-
|
|
|
|
SHT1xSensor* sht1x = new SHT1xSensor();
|
|
|
|
id(ptr_component_shtx1) = sht1x;
|
|
|
|
App.register_component(sht1x);
|
|
|
|
return {sht1x->temp_c_sensor, sht1x->temp_f_sensor, sht1x->humidity_sensor};
|
|
|
|
sensors:
|
|
|
|
- name: "Temperature_C"
|
|
|
|
id: Temperature_C
|
|
|
|
unit_of_measurement: "°C"
|
|
|
|
accuracy_decimals: 1
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- name: "Temperature_F"
|
|
|
|
id: Temperature_F
|
|
|
|
unit_of_measurement: "°F"
|
|
|
|
accuracy_decimals: 1
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- name: "Humidity"
|
|
|
|
id: Humidity
|
|
|
|
unit_of_measurement: "%"
|
|
|
|
accuracy_decimals: 1
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- platform: custom
|
|
|
|
lambda: |-
|
|
|
|
VEML6075Sensor* veml6075 = new VEML6075Sensor();
|
|
|
|
id(ptr_component_veml6075) = veml6075;
|
|
|
|
App.register_component(veml6075);
|
|
|
|
return {veml6075->uva_sensor, veml6075->uvb_sensor, veml6075->uv_index_sensor};
|
|
|
|
sensors:
|
|
|
|
- name: "UVA"
|
|
|
|
id: uva
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "UVB"
|
|
|
|
id: uvb
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "UV Index"
|
|
|
|
id: uv_index
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- platform: custom
|
|
|
|
lambda: |-
|
|
|
|
LocalPlantsSensor* local_plants = new LocalPlantsSensor();
|
|
|
|
id(ptr_component_local_plants) = local_plants;
|
|
|
|
App.register_component(local_plants);
|
|
|
|
return {local_plants->plant_1_sensor, local_plants->plant_2_sensor, local_plants->plant_3_sensor, local_plants->plant_4_sensor, local_plants->plant_5_sensor, local_plants->plant_6_sensor, local_plants->plant_7_sensor, local_plants->plant_8_sensor};
|
|
|
|
sensors:
|
|
|
|
- name: "Plant 1"
|
|
|
|
id: Plant_1
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "Plant 2"
|
|
|
|
id: Plant_2
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "Plant 3"
|
|
|
|
id: Plant_3
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "Plant 4"
|
|
|
|
id: Plant_4
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "Plant 5"
|
|
|
|
id: Plant_5
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "Plant 6"
|
|
|
|
id: Plant_6
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "Plant 7"
|
|
|
|
id: Plant_7
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-27 17:29:03 +00:00
|
|
|
- name: "Plant 8"
|
|
|
|
id: Plant_8
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- platform: custom
|
|
|
|
lambda: |-
|
|
|
|
MAX1704xSensor* max1704x = new MAX1704xSensor();
|
|
|
|
id(ptr_component_max1704x) = max1704x;
|
|
|
|
App.register_component(max1704x);
|
|
|
|
return {max1704x->voltageSensor, max1704x->percentSensor, max1704x->isSleepingSensor, max1704x->alertIsActiveSensor, max1704x->getThresholdSensor};
|
|
|
|
sensors:
|
|
|
|
- name: "Battery_Voltage"
|
|
|
|
id: Battery_Voltage
|
|
|
|
unit_of_measurement: "V"
|
|
|
|
accuracy_decimals: 2
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- name: "Battery_Level"
|
|
|
|
id: Battery_Level
|
|
|
|
unit_of_measurement: "%"
|
|
|
|
accuracy_decimals: 1
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- name: "Battery_Sleeping"
|
|
|
|
id: Battery_Sleeping
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- name: "Battery_Alert"
|
|
|
|
id: Battery_Alert
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
- name: "Battery_Threshold"
|
|
|
|
id: Battery_Threshold
|
|
|
|
accuracy_decimals: 0
|
2019-06-10 22:34:29 +00:00
|
|
|
expire_after: 12h
|
2019-05-20 02:35:31 +00:00
|
|
|
|
2019-05-16 14:55:08 +00:00
|
|
|
# 2.9" Waveshare e-ink setup
|
|
|
|
# BUSY -> 21, RST -> 14, DC -> 15, CS -> 27, CLK -> SCK(5), DIN -> MOSI(18), GND -> GND, 3.3V -> 3.3V
|
|
|
|
display:
|
|
|
|
- platform: waveshare_epaper
|
2019-05-20 02:35:31 +00:00
|
|
|
id: display_main
|
2019-05-16 14:55:08 +00:00
|
|
|
cs_pin: 27
|
|
|
|
dc_pin: 15
|
|
|
|
busy_pin: 21
|
|
|
|
reset_pin: 14
|
|
|
|
model: 2.90in
|
|
|
|
rotation: 90
|
2019-05-21 01:52:31 +00:00
|
|
|
update_interval: 1h
|
2019-05-16 14:55:08 +00:00
|
|
|
lambda: |-
|
2019-05-27 17:29:03 +00:00
|
|
|
if (id(early_boot)) {
|
|
|
|
it.clear();
|
|
|
|
it.image(84, 0, id(rocket_ship));
|
2019-05-16 14:55:08 +00:00
|
|
|
}
|
|
|
|
else {
|
2019-05-27 17:29:03 +00:00
|
|
|
delay(60*1000);
|
|
|
|
// Clear
|
|
|
|
it.clear();
|
|
|
|
// Battery
|
|
|
|
if (id(Battery_Level).state > 90) {
|
|
|
|
it.image(0, 0, id(battery_100));
|
|
|
|
}
|
|
|
|
else if (id(Battery_Level).state > 75) {
|
|
|
|
it.image(0, 0, id(battery_75));
|
|
|
|
}
|
|
|
|
else if (id(Battery_Level).state > 50) {
|
|
|
|
it.image(0, 0, id(battery_50));
|
|
|
|
}
|
|
|
|
else if (id(Battery_Level).state > 25) {
|
|
|
|
it.image(0, 0, id(inverted_battery_25));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
it.image(0, 0, id(inverted_battery_0));
|
|
|
|
}
|
|
|
|
if (id(Battery_Alert).state != 0) {
|
|
|
|
it.image(32, 0, id(alert_filled));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
it.printf(32, 16, id(deja_vu_mono), "%.1f%%", id(Battery_Level).state);
|
|
|
|
}
|
|
|
|
// Temperature
|
|
|
|
it.image(116, 0, id(thermometer)); // 148, 0
|
|
|
|
it.printf(153, 16, id(deja_vu_mono), "%.1f°F", id(Temperature_F).state);
|
|
|
|
// OTA Mode
|
|
|
|
if (id(ota_mode)) {
|
|
|
|
it.image(259, 0, id(ota_mode_enabled));
|
|
|
|
}
|
|
|
|
// Last update
|
|
|
|
it.image(0, 32, id(last_sync_icon));
|
|
|
|
it.strftime(32, 39, id(deja_vu_mono), "%Y-%m-%d %H:%M", id(sntp_time).now());
|
|
|
|
// Plants
|
|
|
|
it.image(0, 64, id(inverted_cat_nip));
|
|
|
|
it.image(37, 64, id(inverted_christmas_cactus));
|
|
|
|
it.image(74, 64, id(inverted_cat_grass));
|
|
|
|
it.image(111, 64, id(inverted_tarragon));
|
|
|
|
it.image(148, 64, id(inverted_tulip));
|
|
|
|
it.image(185, 64, id(inverted_poinsettia));
|
|
|
|
it.image(222, 64, id(inverted_bamboo));
|
|
|
|
it.image(259, 64, id(inverted_vase));
|
|
|
|
it.image(0, 96, id(cat_nip));
|
|
|
|
it.image(37, 96, id(christmas_cactus));
|
|
|
|
it.image(74, 96, id(cat_grass));
|
|
|
|
it.image(111, 96, id(tarragon));
|
|
|
|
it.image(148, 96, id(tulip));
|
|
|
|
it.image(185, 96, id(poinsettia));
|
|
|
|
it.image(222, 96, id(bamboo));
|
|
|
|
it.image(259, 96, id(vase));
|
|
|
|
it.image(222, 32, id(disabled_tulip));
|
|
|
|
it.image(259, 32, id(disabled_vase));
|
2019-05-16 14:55:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
font:
|
2019-05-18 02:26:05 +00:00
|
|
|
- file: "fonts/DejaVuSansMono.ttf"
|
|
|
|
id: deja_vu_mono
|
|
|
|
size: 18
|
2019-05-16 14:55:08 +00:00
|
|
|
|
|
|
|
image:
|
|
|
|
- file: graphics/noun_Alert_2145614.png # empty
|
|
|
|
id: alert_empty
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_Alert_2490416.png # filled
|
|
|
|
id: alert_filled
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_battery indicator_1601217.png # battery 75%
|
|
|
|
id: battery_75
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_battery level_1601219.png # battery 50%
|
|
|
|
id: battery_50
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_Cactus_1197535.png # christmas cactus
|
|
|
|
id: christmas_cactus
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_empty battery_1601215.png # battery 25%
|
|
|
|
id: battery_25
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_empty battery_1601218.png # battery 0%
|
|
|
|
id: battery_0
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_Full Battery_1601214.png # battery 100%
|
|
|
|
id: battery_100
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_grass_355100.png # cat grass
|
|
|
|
id: cat_grass
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_humidity_1762738.png # temp + humidity
|
|
|
|
id: temp_humidity
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_leaf_1153077.png # catnip
|
|
|
|
id: cat_nip
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_Tarragon_499800.png # tarragon
|
|
|
|
id: tarragon
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_Thermometer_217722.png # thermometer
|
|
|
|
id: thermometer
|
|
|
|
resize: 32x32
|
2019-05-20 21:59:10 +00:00
|
|
|
- file: graphics/noun_update_2346502.png # last sync
|
|
|
|
id: last_sync_icon
|
2019-05-16 14:55:08 +00:00
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_Tarragon_499800.png # inverted tarragon
|
|
|
|
id: inverted_tarragon
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_leaf_1153077.png # inverted catnip
|
2019-05-18 03:50:01 +00:00
|
|
|
id: inverted_cat_nip
|
2019-05-16 14:55:08 +00:00
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_grass_355100.png # inverted cat grass
|
|
|
|
id: inverted_cat_grass
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_empty battery_1601218.png # inverted battery_0
|
|
|
|
id: inverted_battery_0
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_empty battery_1601215.png # inverted battery_25
|
|
|
|
id: inverted_battery_25
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_Cactus_1197535.png # inverted christmas cactus
|
|
|
|
id: inverted_christmas_cactus
|
|
|
|
resize: 32x32
|
2019-05-18 03:01:30 +00:00
|
|
|
- file: graphics/noun_Tulip_2510353.png # tulip
|
|
|
|
id: tulip
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_Tulip_2510353.png # inverted tulip
|
|
|
|
id: inverted_tulip
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_poinsettia_1007994.png # poinsettia
|
|
|
|
id: poinsettia
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_poinsettia_1007994.png # inverted poinsettia
|
|
|
|
id: inverted_poinsettia
|
|
|
|
resize: 32x32
|
2019-05-18 03:50:01 +00:00
|
|
|
- file: graphics/inverted_noun_vase_206668.png # inverted vase
|
|
|
|
id: inverted_vase
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/inverted_noun_Bamboo_254221.png # inverted bamboo
|
|
|
|
id: inverted_bamboo
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_Bamboo_254221.png # bamboo
|
|
|
|
id: bamboo
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/noun_vase_206668.png # vase
|
|
|
|
id: vase
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/disabled_noun_vase_206668.png # disabled vase
|
|
|
|
id: disabled_vase
|
|
|
|
resize: 32x32
|
|
|
|
- file: graphics/disabled_noun_Tulip_2510353.png # disabled tulip
|
|
|
|
id: disabled_tulip
|
|
|
|
resize: 32x32
|
2019-05-21 01:52:31 +00:00
|
|
|
- file: graphics/noun_Settings Download_1854756.png # ota mode enabled
|
|
|
|
id: ota_mode_enabled
|
|
|
|
resize: 32x32
|
2019-05-27 17:29:03 +00:00
|
|
|
- file: graphics/noun_startup_1946229.png # rocket ship / startup
|
|
|
|
id: rocket_ship
|
|
|
|
resize: 128x128
|
2019-05-20 02:35:31 +00:00
|
|
|
|