[Homeyduino] E-paper for Homey

Some follow up on my issue’s:

This is solved bij reverting back to version 1.2.2 (still with standard Homeyduino app)

I solved this. Looks like this is a bug in the e-paper code. :thinking:
When changing the deep sleep time to zero (to disable deep sleep), this value isn’t stored in preferences. So after restarting (what the screen does when changing deep sleep), this value is lost and the screen finds the previous value in preferences :frowning:

So I added 2 lines of code after row 43 (inspired by the code above from row 37) in File HomeyFunction.ino, function setTimeDeepSleep.

Old code:

  if (value.toInt() == 0) {
    preferences.putBool("deepSleepEnable", false);
    ESP.restart();

New code:

  if (value.toInt() == 0) {
    preferences.putInt("timeToSleep", value.toInt());
    preferences.putBool("deepSleepEnable", false);
    delay(1000);
    ESP.restart();

Now it works :crazy_face:

@sebyldino can you fix this in new version of homey e-paper code? Or do you want to have a GitHub bug report on this?

1 Like