Read the statement by Michael Teeuw here.
Currentweather and weatherforecast do not stay hidden
-
When using a button, PIR, gesture sensor, microwave sensor etc to blank the screen the currentweather and weatherforecast always turn themselves on. I want to turn them off to prevent screen burn in. So I have protyped several ways I ust mentioned to have the screen blank unless I physically (with a button or my presense or a gesture) make it display. All the modules respect this EXCEPT the currentwewather and weather forecast.
It seems to be happening when they update their data. If I have, for example, currentweather set to fetch an update at 10 minutes, and the forecast set to update at 15 minutes. Those are the time intervals it takes for those respective modules to reapear. And they shouldn’t because I haven’t sent them the notification to do so.
Any ideas of what code needs to be changed to make them respect the setting and not alter the DOM by themselves?
p.s.
I read this and am not sure how it applies, but I"m thinking it is involved in my issue…Re: Why does currentweather use lockstring??? -
@kayakbabe hm. my sleepwake module just does a hide on all modules, and nothing shows thru.
how are u blanking the screen?
-
@sdetweil
It’s the default behavior of the MMM-GroveGestures module.in config.js
"CLOCKWISE": { moduleExec: { module: [], exec: (module, gestures) => { module.hide(1000, null, {lockstring:"GESTURE"}) } } }, "ANTICLOCKWISE": { moduleExec: { module: [], exec: (module, gestures) => { module.show(1000, null, {lockstring:"GESTURE"}) } } },
in the code is looks like it adds a div around each module and sets it to
class="container" style="display: none;">
No “GESTURE” is being sent as all would show instead of hide. It’s just the weather stuff that reappears. The added DIV is being altered by some other process to
class="container" style="display: block;">
I can’t figure out what is doing it.
-
@kayakbabe said in Currentweather and weatherforecast do not stay hidden:
module.hide(1000, null, {lockstring:“GESTURE”})
module.hide(1000, {lockString:"GESTURE"})
after it’s the same scheme for
module.show()
;)
-
@Bugsounet I found that in the config.js for the grove gestures and changed it. … no effect. I fully stopped and restarted the magic mirror.
the other modules stayed hidden like the are supposed to, but not the current weather or weather forecast.
-
@sdetweil what sleepwake module are you using?
-
@kayakbabe https://github.com/sdetweil/MMM-SleepWake
I wrote this because I did not have a PIR sensor at the time, but did have a webcam.
I also didn’t want to learn how to manage the camera so use a system module,
motion.
sudo apt-get install motionthe module gets triggered by something executing the trigger script i provide.
-
@sdetweil Having what you have on hand makes a ton of sense. I would probably go that on route myself except I’m making this as a gift for my Dad. He is an absolute paranoid dude when it comes to cameras especially in his bathroom or bedroom, which is where this will go. And the PIR sensors are cheap. cheaper than even a pi camera. And this mirror will always be on due to the cheap monitor I"m using.
I do think something in the currentweather and forecastweather is tossing out dom information that is switching the style css from display off to display block.
i have commented out all the other modules except the MMM-grovegestures and the two weather modules. So it’s not coming from elsewhere.From looking at the code, it appears that there is an onIdle somewhere. I want to find that.
I wish I had Coda on this pi. I’m used to coding in a Mac environment. I’m being stubborn and trying to do this all on the pi.
Is there a graphic code editor which can search files in a project and not just the file you have open?