This is a great plugin, an ability to suggest a time delay to refresh the word would be awesome.
Read the statement by Michael Teeuw here.
Posts made by Mar
-
RE: MMM-wordnik - Word of the Day
-
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.
-
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.
-
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.
-
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?
-
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.
-
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?
-
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.
-
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?
-
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