Solved EXT-Screen.js file keeps reverting to default values
-
I have been using EXT-Screen with EXT-Pir on my Magic Mirror for awhile now. It seems to work fine, but I do have an occassional problem which I would like to resolve. This is how my configuration file is written:
Entries for /home/pi/MagicMirror/config/config.js
{ module: 'EXT-Screen', position: 'bottom_left', configDeepMerge: false, config: { screen: { delay: 2 * 60 * 1000, mode: 4, displayStyle: "Text", displayLastPresence: false, gpio: 21 }, } }
When I walk in front of my mirror, I expect the sensor to detect my presence and activate the screen. When it doesn’t work, I already know how to resolve the issue. The way it is resolved is that I need to edit my /pi/MagicMirror/modules/EXT-Screen/EXT-Screen.js configuration file. I have determined that my calendar and news modules will occassionally get hung up, so I followed one recommendation to auto-reboot my Magic Mirror once-a-week. Normally, this works fine, and the mirror will operate as expected. When it doesn’t, I have determined that the EXT-Screen.js file seems to get automatically reconfigured to default values. Namely, the two values are:
mode: 1
displayLastPresence: trueI reconfigure these two values to the values I need:
mode: 4
displayLastPresence: false(NOTE: The important value is the ‘mode’, and I only toggle the ‘displayLastPresence’ field so that I can get a quick indicator that it has reverted back to the old value)
Upon reboot/restart, everything is working fine again. Is there any way to prevent the EXT-Screen.js file from going back to its default values? Again, this doesn’t happen all the time. I have added a cron job to reboot the mirror 4 times per month at 4 am:0 4 1 * * sudo reboot
0 4 7 * * sudo reboot
0 4 15 * * sudo reboot
0 4 22 * * sudo rebootMy mirror will reboot on the 1st, 7th, 15th and 22nd of each month and it and normally, I can confirm that everything is properly working after these dates. It seems to randomly return the default values to the EXT-Screen.js file. The config.js file remains intact with the correct values. Appreciate any ideas… thanks.
-
ah … are you really sure of your configuration !? (not me)
maybe some times wiki can help -
I have confirmed that BOTH of my config.js and EXT-Screen.js files have mode set to 4. I will continue to monitor the reboots and will report back when the failure occurs.
I have made a note of the date when the files were last written. If the EXT-Screen.js file gets re-written with the mode value reverting back to 1 at the next failure, I suppose I can try to change file permissions (eg. chmod 444) but I’m not sure if that would be recommended… Again, I am not sure if there is any way of making this consistently fail, so it might take some time before I can report any new developments. -
@bugsounet said in EXT-Screen.js file keeps reverting to default values:
ah … are you really sure of your configuration !? (not me)
maybe some times wiki can helpI repeat again…
After if you prefer…- Your config is TOTALY wrong…
- COPY SAMPLE CONFIG of the wiki and retry
- You Don’t have to edit main core file
-
Oh, ok. The Wiki page shows the two versions (minimal configuration and personalized configuration). I thought that I could just pick and choose some of the lines. The note indicated “Don’t copy/past the entire default config, just add in default config your needed new change value !”. I will copy the sample file and edit the values I need and post the results. Thanks!
-
now that you see the default personlized config …
Are you really sure that your config :
{ module: 'EXT-Screen', position: 'bottom_left', configDeepMerge: false, config: { screen: { delay: 2 * 60 * 1000, mode: 4, .... }, } }
is the same like this ???
The personalized default config :{ module: 'EXT-Screen', position: 'top_left', config: { debug: false, animateBody: true, delay: 2 * 60 * 1000, .... } },
That’s why … I say … your config is really wrong
All of your value inscreen:{}
are ignored -
Yes, I see the problem… but not sure what happened here. I’ve been using my configuration for quite awhile now, so I didn’t think that there was any issue with my configuration file. I was able to observe the mode change in the EXT-Screen.js file, which was what was confusing me. I have made the correction, so I am anticipating that the problem has been resolved. Thanks very much for the assistance!
-
ok, right, i keep this topic open
Let’s confirm in a couple of days !
Note: I have to do some update in a couple of days for
EXT-Screen
-
Ok. Thanks. I will update when available, and continue to monitor the reboots…
-
see
/boot/config.txt
file
the response is inside -
enable:
# uncomment to increase signal to HDMI, if you have interference, blanking, or # no display config_hdmi_boost=4
replace:
dtoverlay=vc4-kms-v3d
by
dtoverlay=vc4-fkms-v3d
note: it’s a system file!
so usesudo nano /boot/config.txt
when saved reboot your pi
-
Ok. Changes made… thanks.
-
It’s better?
-
So far, so good.
-
bugsounet