Coder Social home page Coder Social logo

Display Sleep about epiframe HOT 7 CLOSED

jakemauer avatar jakemauer commented on June 4, 2024
Display Sleep

from epiframe.

Comments (7)

jakemauer avatar jakemauer commented on June 4, 2024 1

This is amazing, thank you Mike! I'm waiting to get my display back up and running this weekend but I'll keep you posted.

from epiframe.

MikeGawi avatar MikeGawi commented on June 4, 2024

This is fantastic! I love the idea!
OK, I will do the research, tests and will give you a feedback what is possible. The best would be to control the on/off with the API and/or the service command but I'll find the best way. Also the on/off times will be controlled by the configured frame on/off times.

Thanks!

from epiframe.

MikeGawi avatar MikeGawi commented on June 4, 2024

My findings so far:

  • tvservice (-p and -o) works for me on legacy and Fake KMS drivers. Full KMS will not work and is not recommended on Pi0 - maybe I was not searching too deeply but I'm happy it works on the default driver and I'll stick to that (no documentation needed, no specific changes, etc.).
  • the -p powers up the display but loses "hook" and displays black screen.
  • the -p powers up the display and fbset -depth 8 (dummy fbset to force a refresh) updates it (the console appears) so it can display something again.

I still needs some more testing but I will implement that feature soon.

@jakemauer - the tvservice -o was not working for you on default driver or I didn't get that right?

from epiframe.

jakemauer avatar jakemauer commented on June 4, 2024

from epiframe.

MikeGawi avatar MikeGawi commented on June 4, 2024

Ok, now I know where my confusion came from:
Checked on RPi4 and there the KMS driver (vc4-kms-v3d) is set as default, where on RPi0 a legacy driver is a default. Legacy and FKMS works with tvservice and KMS not.

from epiframe.

MikeGawi avatar MikeGawi commented on June 4, 2024

I think I've found the best solution that works for every default driver and on every Raspberry Pi (0,3,4):
vcgencmd display_power 0 and vcgencmd display_power 1
For some displays the power off works for few seconds only as hotplug is triggered but that's all about tweaking RPi configuration.

Please check that solution and let me know. The more tests performed the better this will work.

from epiframe.

MikeGawi avatar MikeGawi commented on June 4, 2024

Implemented and merged to master.

If you want to have the display power off during ePiframe off hours (start_times and stop_times settings) just use the setting control_display_power in config.cfg file or in WebUI: Settings->Display->Control Display Power. Obviously that will only work when HDMI display is selected.

As for

While I'm making wishes it would be cool if there was a webhook I could hit to turn it on/off so I could integrate it with my smart home system in Home Assistant.

you can use ePiframe API to get status and control the display power. This API command works regardless to the setting mentioned above.

from epiframe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.