MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Mar
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 8
    • Posts 98
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @PointPubMedia

                      {
                              module: 'MMM-ProfileSwitcher',
                              config: {
                                      includeEveryoneToDefault: true,
                                      ignoreModules: ["alert", "updatenotification"],
                                      enterMessages: false,
                                      leaveMessages: false,
                                      defaultTime: 15000,
                                      timers: {
                                              "PAGE2":{profile:"default"}, //Switch to defaultClass after defaultTime
                                      }
                              }
                      },
                      {
                              module: 'MMM-Buttons',
                              minShortPressTime: 0,
                              maxShortPressTime: 1000,
                              minLongPressTime: 3000,
                              config: {
                              buttons: [
                                      {
                                              pin:23,
                                              name: "change_profile_1",
                                              longPress: undefined,
                                              shortPress: {
                                                      notification: "CURRENT_PROFILE",
                                                      payload: "PAGE2"
                                              }
                                      },
                                      {
                                              pin: 22,
                                              name: "change_profile_2",
                                              longPress: undefined,
                                              shortPress: {
                                                      notification: "CURRENT_PROFILE",
                                                      payload: "default"
                                              }
                                      }
                              ]
                              }
                      },
      
      posted in System
      M
      Mar
    • RE: PIR-Sensor - put your mirror to sleep if not used

      @DirkS

      Hey Dirk, i was having some issues and was using “/opt/vc/bin/tvservice -o” and “/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chat 2” to turn my screen on and off as that seems to be what everyone is using. This worked reliably since i started using the PIR sensor.

      All of a sudden this started making my screen go white when it issued the monitor on command…and the screen would stay white for a few minutes and sometimes it would come back.

      Using your “vcgencmd” commands in place of the previous in my monitor on/off scripts everything is back to working again.

      I had a couple questions. Firstly i didnt understand what you mean by hdmi_blanking=1…what does this do/should i put this in my boot/config.txt?? And secondly what is the difference between the two ways of toggling the monitor?

      (I did ask my question here: https://forum.magicmirror.builders/topic/1780/white-screen-after-screen-resumes-from-pir-or-sometimes-randomly-can-still-access-via-ssh-requires-restart-sometimes/4 incase but stumbled upon this after.)

      posted in System
      M
      Mar
    • RE: White screen after screen resumes from PIR, or sometimes randomly - can still access via ssh, requires restart sometimes

      @strawberry-3.141 I went through 1-10 on that second chvt LOL. no difference.

      After a bit of searching the following seemed to work to turn my screen on and off but im hesitant to change my monitor on/off script to these as Ive never had an issue with the commands above that everyone seems to use. (from: https://forum.magicmirror.builders/topic/52/pir-sensor-put-your-mirror-to-sleep-if-not-used/21)

      vcgencmd display_power 0
      
      vcgencmd display_power 1
      

      The original commands have worked for a long time so not sure why they’ve stopped working? can anyone explain the difference between the above and below? And why the below would start displaying a white screen when turned back on?

      /opt/vc/bin/tvservice -o
      
      /opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 2
      
      posted in Troubleshooting
      M
      Mar
    • RE: White screen after screen resumes from PIR, or sometimes randomly - can still access via ssh, requires restart sometimes

      White screen happens when the PIR sensor does this command, then after a few mins the MM comes back:

      /opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 2

      Im not sure if theres something wrong with the Pi and when I do:
      /opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 1
      it shows the terminal on the screen, then doing the command with 2 brings back the white screen on the MM.

      posted in Troubleshooting
      M
      Mar
    • White screen after screen resumes from PIR, or sometimes randomly - can still access via ssh, requires restart sometimes

      Im all of a sudden (no changes made I dont think, except updating ProfileSwitcher) getting a fully white blank screen when the pir detects motion and brings the screen back on. Sometimes it stays white for 15 mins and comes back to normal, other times it requires me to restart.

      When the white screen happens I can still access via ssh. Also I’m not using PIR module, just a simple script on start that monitors the PIR sensor and send the monitor off/on request. I havent had any issues before and its been on for over a week at a time.

      Update:

      So when the mirror comes back from the white screen after xx minutes this is the error in the log:

      0|mm       | ** Message: console message: http://localhost:8080/ @0: WebSocket network error: Error sending data: Connection reset by peer
      

      So seems like the PIR script I have running is still working fine but shutting and resuming the screen…just not sure why the white screen started happening all of a sudden. With the white screen I can still issue the screen off command:

      /opt/vc/bin/tvservice -o
      

      but issuing the on command brings me back to the white screen.

      posted in Troubleshooting
      M
      Mar
    • RE: [MMM-PIR-Sensor] Install failing

      @Jay I forgot what I did here to fix this issue. But to be honest after I got this working it still wasnt perfect. I ended going the route of a script on startup that controls the PIR sensor and its been perfect since and simple.

      posted in Troubleshooting
      M
      Mar
    • RE: Internet Monitor

      @Mykle1 As I posted up above, seems like others are having the same issue. I noticed that in the logs the internet monitor is posting the speed every few seconds so I was thinking this was a probably cause?

      Though the amount of slowdown just to show the wifi indicator was a little too much

      posted in Utilities
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @Jopyth No i had to switch the 1 and the 0 to make it work (0 first, then 1) so my code does differ slightly unfortunately. Suppose I’ll have to remember to manually make the change on updates unless it can be made a config option.
      That could be a good option. We’d need a way for profile switcher to send over all unique profiles which would make it easy to do, rather than scrape the config file for “classes”.

      edit: Though I suppose thinking about this not relying on another module would be much quicker fix.

      posted in System
      M
      Mar
    • RE: Internet Monitor

      Ive done quite a bit of testing and on the Zero this module really slows down my startup, and seems to cause a few other modules trying to connect to the internet to take forever to load, or timeout (i.e TubeStatus). Increases my startup from less than a minute to a few minutes. Im not really sure why, but as soon as i disable everything goes back to being smooth.

      posted in Utilities
      M
      Mar
    • RE: MMM-wordnik - Word of the Day

      This is a great plugin, an ability to suggest a time delay to refresh the word would be awesome.

      posted in Education
      M
      Mar
    • ES6 Arrow Functions dont work with Midori on Pi Zero [Compliments module latest error]

      On line 51 of the compliments.js it says “this.complimentFile((response) => {” but this throws up an error with Midori which looks like it doesnt support E6 Arrow functions.

      I had this issue with either the MMM-Buttons or MMM-ProfileSwitcher (cant remember) module and changing it back out to a regular function solved the issue after a lot of time spent debugging.

      I know there are now quite a lot of people who are using the Pi Zero to run this as it runs perfectly, is there a way to perhaps get some consistency around and not use these in modules until its supported? Midori is the only browser that seems to run on the Pi Zero without issues.

      posted in Troubleshooting
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @Jopyth Anyway to use one button to switch between profiles? Trying to use profile switches classes and creating the same button on different profiles (classes) but it always runs both buttons so take me back to the default page.

      posted in System
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @Jopyth Fixed!! I switched the 1 and the 0 in the watchHandler function of node_helper.js and solved the issue. Must have been backwards with how the button was being interpreted vs set up?

      Put the 0 first, then 1.

      Now the double click makes sense, the time between the clicks seems to have been what was counted as a valid min press time.

      posted in System
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @Jopyth Just tested with buttons ripped out from an old monitor and same issue, needed to double click. I suppose i will slowly go through the code and try break it down and see. any advice on which functions to start with?

      posted in System
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @Jopyth I thought this also, and set the short time from 0-1000ms and still will only register the second of a double click.

      Its very consistent though, i can get it to work 100% of the time with a double click like opening a folder on the computer. one click doesnt do anything, and I don’t believe the longPress worked at all (But i wasnt using it so not that bothered with it).

      Maybe its just the buttons…i just dont have anything else around that i could use to test as a button.

      posted in System
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @Jopyth Thanks for the response, and that seems to make complete sense. I missed that part in the documentation.

      Though upon trying PINS 22/23 i am still getting the same result. The button.py program detects each individual click properly, but in the MM I have to double (sometimes triple) click the button so that it registers. I can see it registers as it shows up in the pm2 logs and my profile changes.

      Im not sure if its an issue with the buttons as they are a standard 4 pin button and the test script works fine with them?

      posted in System
      M
      Mar
    • RE: MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

      @tosti007 Thanks for updating your module so quickly! and obviously thanks for taking the time to respond and maintain.

      posted in Utilities
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @istepgueu Will take a look through this now, but i already have a 1k resistor between pins 5/6 and the respective button. Hopefully something else comes up here.

      Yes my problem seems a bit opposite of what was posted in your link. I dont have any erroneous button presses, it just takes a few clicks until MMM-Buttons registers the click. You button.py registers every click instantly. So must be something in the buttons code?

      posted in System
      M
      Mar
    • RE: [MMM-Buttons] Connect multiple buttons to send configurable notifications

      @istepgueu Ive taken your button.py program and modified it for me two buttons 5/6. And while the program reads my button presses perfectly, MM-Buttons doesnt at all. I pretty much have to double click each time to make a button register. It switches my profiles just fine … but just takes lots of clicks to register.

      import RPi.GPIO as GPIO
      import time
      
      GPIO.setmode(GPIO.BCM)
      GPIO.setup(5, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(6, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      
      tries = 0
      
      while (tries < 200000):
          if GPIO.input(6):
              print("Open 6")
          else:
              print("Close 6")
          if GPIO.input(5):
              print("Open 5")
          else:
              print ("Close 5")
          time.sleep(0.5)
          tries = tries + 1
      
      posted in System
      M
      Mar
    • 1
    • 2
    • 3
    • 4
    • 5
    • 2 / 5