Even turning off the 2 secondary monitors first, then the main, and making sure to turn on the main monitor first doesn't work. It.strftime(64, 64, id(font2), TextAlign::BASELINE_CENTER, "%H:%M", id(homeassistant_time). The 4K is the main monitor of course, but I can't have it sleep without windows being moved to a secondary monitor. It.printf(2, 0, id(font2), "Hidden Energy:") It.printf(64, 64, id(font2), TextAlign::BASELINE_CENTER, "%.2f V", id(battery).state) It.printf(2, 0, id(font2), "Consumed Energy") It.printf(2, 0, id(font2), "Current Energy:") # Enable fallback hotspot (captive portal) in case wifi connection fails # Set this to the IP address of the router. And to see how long it lasts off one LiFePO4 battery, but I have played around with ESPnow on these boards and they last weeks and weeks.įull code for anyone interested: esphome: Takes a few extra seconds to populate the data so something else to play around with…MQTT perhaps rather than the API. The screen displays within about 2 sec of the motion being triggered so I am happy with that. I can’t measure any current flowing to the oled with a multimeter anymore. It.printf(23, 25, id(font1), "%.3f kWh", id(Hidden_Energy_Sensor).state) Īwesome, that did the trick, thanks a million! I didn’t see that in the docs anywhere and google failed me too. It.printf(0, 0, id(font2), "Hidden Energy:") It.printf(0, 0, id(font2), "Consumed Energy") It.strftime(64, 64, id(font2), TextAlign::BASELINE_CENTER, "%H:%M", id(homeassistant_time).now()) It.printf(0, 0, id(font2), "Current Energy:") Snippet of the code that runs without the wake up from the PIR: captive_portal:Įntity_id: sensor.total_consumed_daily_energy So, is there any way to completely turn off the OLED at the same time? However I have run into an interesting problem testing this out - the esp32 shuts down and restarts by the deep sleep code, but the display stays on and still draws some current. Here is the cable I purchased, not sure if it matters.Įdit: I just made this account on this forum to post this solution, since I struggled with this issue for ~9 months, so this is my first post.As I have the energy monitoring working well, I thought it might be a nice idea to have an OLED display running off an ESP that shows real time energy consumption: a visual reminder to save energy as every time we look at the number its going up…Īs we are supposed to be saving energy with this it would make sense to run it off a battery, so my idea is a motion sensor to wake up from deep sleep and display the data. However, it has been several weeks since I swapped the cable and there have been 0 issues, from what used to happen ~50% of the time. My guess is that it was a faulty cable or an incompatibility issue with my old videocard that I'll never diagnose. and low and behold the issue is now completely gone. HOW COULD THAT BE THE PROBLEM? But anyway I eventually rolled the dice and bought a $13 Displayport 1.2 cable off of Amazon. I saw some advice online about trying a different cable, which I thought was BS since I was using the cable that came with my monitor. I tried numerous software and driver updates, etc. But it confirmed for me that this is a Displayport 1.2 issue. Unfortunately, this restricted the display to 30 FPS at 4k, instead of the 60 FPS I was used to, so this was unacceptable. Sometimes I'd have to power cycle the monitor like 5 times to finally get it to display something after cold boot or waking from sleep.Īnyway, I determined that the issue never occurred when I deselected the "Displayport 1.2" option in the monitor's on screen display (using the buttons on the monitor to navigate the menu). I was having the exact same issue with an LG 4k monitor and my old Radeon 270x, in Windows 10. Hey, I don't know if you ever found a solution to this issue.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |