• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Currentweather and weatherforecast do not stay hidden

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 3 Posters 788 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    kayakbabe
    last edited by kayakbabe Aug 20, 2020, 5:26 AM Aug 20, 2020, 5:25 AM

    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???

    S 1 Reply Last reply Aug 20, 2020, 12:31 PM Reply Quote 0
    • S Away
      sdetweil @kayakbabe
      last edited by Aug 20, 2020, 12:31 PM

      @kayakbabe hm. my sleepwake module just does a hide on all modules, and nothing shows thru.

      how are u blanking the screen?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      K 2 Replies Last reply Aug 20, 2020, 2:07 PM Reply Quote 0
      • K Offline
        kayakbabe @sdetweil
        last edited by kayakbabe Aug 20, 2020, 2:16 PM Aug 20, 2020, 2:07 PM

        @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.

        1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User
          last edited by A Former User Aug 20, 2020, 2:14 PM Aug 20, 2020, 2:12 PM

          @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()

          ;)

          K 1 Reply Last reply Aug 21, 2020, 3:48 AM Reply Quote 0
          • K Offline
            kayakbabe @Guest
            last edited by Aug 21, 2020, 3:48 AM

            @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.

            1 Reply Last reply Reply Quote 0
            • K Offline
              kayakbabe @sdetweil
              last edited by Aug 21, 2020, 4:00 AM

              @sdetweil what sleepwake module are you using?

              S 1 Reply Last reply Aug 21, 2020, 12:12 PM Reply Quote 0
              • S Away
                sdetweil @kayakbabe
                last edited by sdetweil Aug 21, 2020, 1:17 PM Aug 21, 2020, 12:12 PM

                @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 motion

                the module gets triggered by something executing the trigger script i provide.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                K 1 Reply Last reply Aug 21, 2020, 8:41 PM Reply Quote 0
                • K Offline
                  kayakbabe @sdetweil
                  last edited by Aug 21, 2020, 8:41 PM

                  @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?

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    8/8
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy