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”,
Have you disabled screensaver? That can cause the screen to remain blank.
Easiest way is to install xscreensaver then disable it from the desktop (yes this seems counterintuitive but it works)
@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.
@Damian Yes I think it would be best to just use the basic config from the readme 1st & see if that works (obvs with your username / password combo).
All @mongo116’s comments about authenticating / session IDs etc are more for if you are stepping through the code yourself with a debugger in your browser. I don’t think that’s what you’re trying to do. You don’t need to worry about any of that if you’re just wanting to view the module on your mirror as it should do all that in the background. If you did want to start trying to see where its going wrong you can enable the
debug : true
option and then connect your web browser on a computer to the mirror and use the web developer console too see some more detailed info on whats happening in the background.
@mongo116 no, thank you for making the module! I had a crack at making a hive module a while back & gave up as I couldn’t get it working so it was great when I saw you’d done all the hard work :)
@Damian 1st of all, I don’t think you need to do an npm install after cloning the repo (doesn’t say it in the readme… although its been a while since I set up my hive so cant remember although I dont have a ‘node_modules’ subfolder in my MMM-Hive folder so unlikely).
Not sure if thats 100% your problem but you could start off removing the folder & then recloning.
I modified my outside url to be http instead of https as I was getting that issue so that should work.
I’d recommend that you go back to basics… 1) does your mirror work with the MMM-Hive removed from the config? Check that 1st
2) As you’ve used just about every config option its hard to see which (if any) could be causing the issue. I’d start off adding in just the basics- u/n, password, receiver name (note I haven’t set this as I just use the default so cant advise where this may screw up). Then you can add in options one at a time.
As @mongo116 says the ‘debug’ option could also help to see a bit more where its going wrong.
@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.
I’m going to preface this by stating that I am not an electrical engineer… Modifying electronic devices & removing enclosures to expose live conductors is dangerous. Know the risks! I wouldn’t plug this in without an rcd or similar device being between the mm & your source of mains electricity.
The main issue there will be your ac terminals. There are iec standards which tell you the correct clearance required, based on a whole range of parameters. I’m not qualified to give you an actual distance, but if it was me then I’d be looking to do at least the following:
Use some kind of ‘stand off’ to physically stop the bottom of your board from touching the metal case. Think of the type of standoff you would use on a motherboard for example. Thesr can be fitted to the corners of your board.
Use a thicker, solid insulation… That sheeting you’ve shown would be easily punctured by a sharp bit of solder at the bottom of your board. I’d use a solid piece of plastic underneath it as well (got any old plastic lids from a takeaway container?)
Finally as you’ve cracked open the case of your monitor consider if there is a chance that you now have metallic elements which could (under fault conditions) cause a shock if touched. Is the chassis earthed?
Should say, I’m just switching the ac in for monitor power directly…
@MadScientist I went with this one. Only thing is it ain’t pretty so I’m looking to build it in to a nicer enclosure to increase the WAF.
I didn’t try using a ferrite ring, but I’ve got a few kicking around. Maybe worth a go.
Now everything is working, except I get some phantom triggers of the relay every couple of minutes. But I will look into it once everything is set up completely. Maybe I have something around here that can trigger the PIR sensor even if it’s covered by a cloth.
That pretty much sums up my experience as well… I used to have the pir module working great (I didn’t use a relay, just screen off/on). It started acting up so I tried all of the following:
Using script
Putting pir sensor in a box to avoid trigger sources
A different pir sensor (same type as I had previously working)
Completely different type of pir sensor
Complete rebuild of pi from scratch & reinstall mm.
An acoustic noise driven sensor.
No matter what I did I get random triggers usually every couple of mins. All I can think is its either an issue with the input ‘floating’ and being pulled down (all though tried pull up & pull down option in wiring pi).
Only thing I can think is that I’ve possibly fried my gpio somehow.
Anyway I went with a pir / relay which is stand alone so doesn’t use the pi to turn monitor on / off.
Be interested if you ever manage to resolve the random triggers.