diff --git a/README.md b/README.md
index 41f278e..12d4973 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@
> This is a [Shelly 2.5 Double Relay Switch](https://www.amazon.com/gp/product/B07RRD13DJ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) that is controlling the main pump on my pool and the auxillary pump that runs the pool cleaner. It turns the pump on and off through out the day and off at night (when we are least likely to be using the pool and when you get the most heat/water loss if the pump is running) and turns on the cleaner for a couple of hours in the morning. It also has some modes for Off (during the winter) and Continous when I need extra cleaning.
> ### [Scripture of the Day Melissa](./devices/scripture_of_the_day_melissa.yaml)/[Scripture of the Day Mayson](./devices/scripture_of_the_day_mayson.yaml)
-> This is a project I just started working on recently, the code is complete but the build is not quite done. I am planning on building 2 of them as Christmas presents for my wife and son. It will consist of a [ESP32 e-Paper Panel Driver Board](https://www.waveshare.com/product/displays/e-paper-esp32-driver-board.htm) powered by a [lithium battery](https://www.amazon.com/dp/B0867KDMY7/?coliid=IE0LBNACFHG4U&colid=1LOK862UA8LA0&psc=1&ref_=lv_ov_lig_dp_it) and [TP4056 lithium battery charger module](https://www.amazon.com/dp/B06XQRQR3Q/?coliid=I1B2ELKKLLKAK0&colid=1LOK862UA8LA0&psc=1&ref_=lv_ov_lig_dp_it) and driving a [Waveshare 7.5inch 800×480 E-Ink display](https://www.waveshare.com/7.5inch-e-paper.htm) all mounted inside a wood frame I am building. The plan is to have it sit in deep-sleep most of the time but wake up every night, grab a random scripture from the [Our Manna Daily Verses API](http://www.ourmanna.com/verses/api/), update the display with the verse, and go back to sleep. I need to take the display back out of the frame, do some sanding, stain the wood, build the circuit board, and assemble it all but this is what the first one looks like so far.
+> This project was one of the first projects I have done that I would call woodworking. I made 2 of these as Christmas presents for my wife and son. They consist of an [ESP32 e-Paper Panel Driver Board](https://www.waveshare.com/product/displays/e-paper-esp32-driver-board.htm) powered by a [lithium battery](https://www.amazon.com/dp/B0867KDMY7/?coliid=IE0LBNACFHG4U&colid=1LOK862UA8LA0&psc=1&ref_=lv_ov_lig_dp_it) and [TP4056 lithium battery charger module](https://www.amazon.com/dp/B06XQRQR3Q/?coliid=I1B2ELKKLLKAK0&colid=1LOK862UA8LA0&psc=1&ref_=lv_ov_lig_dp_it) and driving a [Waveshare 7.5inch 800×480 E-Ink display](https://www.waveshare.com/7.5inch-e-paper.htm). The ESP32 sits in deep-sleep most of the time but wakes up every night, grabs a random scripture from the [Our Manna Daily Verses API](http://www.ourmanna.com/verses/api/), updates the display with the verse, and goes back to sleep.
>
>
diff --git a/custom/scripture_of_the_day.h b/custom/scripture_of_the_day.h
index d14da9c..47ad7a6 100644
--- a/custom/scripture_of_the_day.h
+++ b/custom/scripture_of_the_day.h
@@ -14,7 +14,7 @@ using namespace esphome;
class ScriptureOfTheDay : public Component {
public:
float get_setup_priority() const override { return setup_priority::LATE; }
- void setup() override { update_at_ = millis() + 4000; }
+ void setup() override { update_at_ = millis() + 6000; }
void loop() override;
void set_http_request(http_request::HttpRequestComponent *http_request) { http_request_ = http_request; }
@@ -43,7 +43,7 @@ class ScriptureOfTheDay : public Component {
void ScriptureOfTheDay::loop()
{
- // If we try to make the request to soon it fails so we delay 4 seconds
+ // If we try to make the request to soon it fails so we delay 6 seconds
if (millis() > update_at_)
{
// If we get an especially long verse that won't fit on the display we try again.
@@ -60,6 +60,7 @@ void ScriptureOfTheDay::loop()
void ScriptureOfTheDay::display_scripture()
{
+ // Don't do anything if we haven't gotten the new scripture yet
if (scripture_.size() == 0)
{
return;
@@ -69,7 +70,6 @@ void ScriptureOfTheDay::display_scripture()
int currentPosition = STARTING_POSITION + (SPACE_BETWEEN_LINES / 2) * (MAX_VERSE_LINES - verseLineCount);
for (int i = 0; i < verseLineCount; i++)
{
- ESP_LOGD("Nuttytree", scripture_[i].c_str());
display_->print(400, currentPosition, verse_font_, TextAlign::CENTER, scripture_[i].c_str());
currentPosition += SPACE_BETWEEN_LINES;
}
diff --git a/devices/scripture_of_the_day_mayson.yaml b/devices/scripture_of_the_day_mayson.yaml
index 1878861..ae0d3a5 100644
--- a/devices/scripture_of_the_day_mayson.yaml
+++ b/devices/scripture_of_the_day_mayson.yaml
@@ -1,7 +1,6 @@
substitutions:
device_id: scripture_of_the_day_mayson
device_name: Scripture of the Day Mayson
- log_level: debug
packages:
device_base: !include ../packages/scripture_of_the_day.yaml
diff --git a/devices/scripture_of_the_day_melissa.yaml b/devices/scripture_of_the_day_melissa.yaml
index 2eef177..bc16c41 100644
--- a/devices/scripture_of_the_day_melissa.yaml
+++ b/devices/scripture_of_the_day_melissa.yaml
@@ -1,7 +1,6 @@
substitutions:
device_id: scripture_of_the_day_melissa
device_name: Scripture of the Day Melissa
- log_level: debug
packages:
device_base: !include ../packages/scripture_of_the_day.yaml
diff --git a/images/scripture_of_the_day/back.jpg b/images/scripture_of_the_day/back.jpg
index 6a2f826..2520c62 100644
Binary files a/images/scripture_of_the_day/back.jpg and b/images/scripture_of_the_day/back.jpg differ
diff --git a/images/scripture_of_the_day/front.jpg b/images/scripture_of_the_day/front.jpg
index cffb4aa..109523b 100644
Binary files a/images/scripture_of_the_day/front.jpg and b/images/scripture_of_the_day/front.jpg differ
diff --git a/packages/scripture_of_the_day.yaml b/packages/scripture_of_the_day.yaml
index 15a3c0c..3eabb81 100644
--- a/packages/scripture_of_the_day.yaml
+++ b/packages/scripture_of_the_day.yaml
@@ -13,11 +13,6 @@ esphome:
build_path: ../build/${device_id}
includes:
- ../custom/scripture_of_the_day.h
-# on_boot:
-# priority: -100
-# then:
-# - delay: 4s
-# - lambda: Scripture->update_scripture();
<<: !include ../components/wifi/wifi_dhcp.yaml
@@ -33,11 +28,11 @@ custom_component:
Scripture->set_fonts(verse_font, reference_font);
return {Scripture};
-# Setting run duration to 15s, if we aren't done by then something went wrong so we restart to save battery
-# Setting a default sleep time of 15min that will only apply if we forced a shutdown after the 15s run duration
+# Setting run duration to 30s, if we aren't done by then something went wrong so we shutdown to save battery
+# Setting a default sleep time of 15min that will only apply if we forced a shutdown after the 30s run duration
deep_sleep:
id: deep_sleep_cmp
- run_duration: 15s
+ run_duration: 30s
sleep_duration: 15min
display: