Edit your calendar.js
Find the bit that says-
longDateFormat
Change LT: “hh:mm”
To
LT: “HH:mm”
Edit your calendar.js
Find the bit that says-
longDateFormat
Change LT: “hh:mm”
To
LT: “HH:mm”
@hnperkins if the script is working the opposite way round it could be that you have a pir board which uses inverted signals. The board I had originally worked this way. So when no motion is detected it gives you a 1 & when you move it gives you a 0. Instead of running the script try typing gpio read 0 (substitute the pin number you used here… remember gpio “wiring pi” numbering will be different to the number you input in your file. See https://pinout.xyz/). It only shows the current state so you need to keep putting this in as you move in front of the sensor to test it. Hit up + enter to “retype” the command quickly in the console.
If this is the case then unfortunately the script will not work in your case… it’s written for true or 1 to be when movement is detected.
If you use paviro’s module there is a configuration option to invert the input pin.
As to the screen being black when starting mm. It’s probably an error in your configuration. Search the forum to find info on how to check the config as that has been well covered.
@ceddirr looks like you’re running npm install from the modules directory, you probably want to cd in to the wunderlist folder (which itself is in modules) then run the npm install
I was having problems with this before (using a PIR sensor though, but shouldn’t matter so long as you use “GPIO read” to confirm the pin changes state from 0 to 1 when your sensor is triggered). My problem was that the screen saver was still active so although the monitor was switched ‘on’ the screen was still blank. I had tried various different things to disable the screen saver, but it just kept causing me problems. I solved it by using Xdotool to simulate a spacebar press after the vcgencmd was fired.
1st thing to check is that the the vcgencmd does actually make the screen go on /off (you can just type the command in to putty and confirm the screen operates correctly.
Note that that the modification I made above is now no longer required for me… for other reasons I actually started from scratch with a clean Raspian install, MM install etc. This time round it all just works correctly so the xdotool fix is no longer required.
@hnperkins yes, if it’s always showing a 1 then your sensor is ‘inverted’ to the standard way most pir boards work. Note it should go to 0 when the pir detects movement (you might need to continually wave your hand in front of the pir at the exact moment you hit enter after typing the gpio read to see the 0. If you never see a 0 then you may have a faulty pir).
Although I initially did get my ‘inverted’ sensor working using the invert configuration option in paviros module, it eventually stopped working correctly (my mirror would register a false detection every 3 mins or so causing my screen to stay always on). Not sure why it broke… seemed to happen after I upgraded to a newer version of mm, but issue didn’t go away after I tried rolling back. Final thing I did to stop false triggering was to install a ferrite choke on my input wire & to move where my pi sat at the back of my monitor (it was quite close to the monitors power converter initially).
Ultimately the way I got it working was to buy a different pir board (the kind with the 2 potentiometers for sensitivity & time adjustment) which also happened to be 0 for no movement & 1 for movement). I then used the pir.py script instead of the module to trigger screen on / off. I was fairly sure it wasn’t a single faulty pir unit (mine came in a pack of 3) but nothing I did got it working so in the end spending an extra fiver on a different type of pir seemed worth it to me.
Due to a change in one of the default configuration items since the latest version came out you need to put
address:“0.0.0.0”,
As a config item (not in your whitelist… This is a new line for your config)
Note, setting to 0.0.0.0 is telling the mirror to use any interface. If you want you could replace that with your mirror’s ip address.
@d3r said in After update to Mirror to 2.1.3 - no working Whitlist:
address:“0.0.0.0”,
Thanks d3r, this was indeed the solution.
So I think as wiring-pi is the npm specific version the reason it didn’t work was because they haven’t compiled it to work with the pi3 chip.
Temporary fix seems to be using outside url with http instead of https.
@fox this doesn’t go within the whitelist section it has to go after the comma at the end of your whitelist section.
It is its own config parameter.
address:“0.0.0.0”,