Bugsounet Coding

    • Register
    • Login
    • Search
    This Forum is now reserved to registred users!

    Solved EXT-Screen.js file keeps reverting to default values

    EXT-Screen
    2
    14
    55
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      freddy_boy last edited by

      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: true

      I 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 reboot

      My 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.

      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by

        ah … are you really sure of your configuration !? (not me)
        maybe some times wiki can help 🙂

        bugsounet 1 Reply Last reply Reply Quote 0
        • F
          freddy_boy last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • bugsounet
            bugsounet Main Coder @bugsounet last edited by bugsounet

            @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 help 🙂

            I 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
            1 Reply Last reply Reply Quote 0
            • F
              freddy_boy last edited by

              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!

              1 Reply Last reply Reply Quote 0
              • bugsounet
                bugsounet Main Coder last edited by bugsounet

                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 in screen:{} are ignored 😉

                1 Reply Last reply Reply Quote 0
                • F
                  freddy_boy last edited by

                  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!

                  1 Reply Last reply Reply Quote 1
                  • bugsounet
                    bugsounet Main Coder last edited by bugsounet

                    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

                    1 Reply Last reply Reply Quote 0
                    • F
                      freddy_boy last edited by

                      Ok. Thanks. I will update when available, and continue to monitor the reboots…

                      1 Reply Last reply Reply Quote 0
                      • bugsounet
                        bugsounet Main Coder last edited by

                        see /boot/config.txt file
                        the response is inside 🙂

                        1 Reply Last reply Reply Quote 0
                        • bugsounet
                          bugsounet Main Coder last edited by bugsounet

                          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 use sudo nano /boot/config.txt

                          when saved reboot your pi

                          1 Reply Last reply Reply Quote 0
                          • F
                            freddy_boy last edited by

                            Ok. Changes made… thanks.

                            1 Reply Last reply Reply Quote 0
                            • bugsounet
                              bugsounet Main Coder last edited by

                              It’s better?

                              1 Reply Last reply Reply Quote 0
                              • F
                                freddy_boy last edited by

                                So far, so good.

                                1 Reply Last reply Reply Quote 0
                                • Topic has been marked as solved  bugsounet bugsounet 
                                • First post
                                  Last post
                                Powered by NodeBB | @bugsounet ©2022