MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-SunnyPortal Solar Module

    Scheduled Pinned Locked Moved Requests
    23 Posts 7 Posters 11.3k Views 7 Watching
    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.
    • S Offline
      sdetweil @TheDuDiop
      last edited by

      @TheDuDiop because the module provides a package,json, and the dependencies are already listed,
      YOU do not need to install them separately

        "dependencies": {
          "chart.js": "^2.9.3",
          "flow": "^0.2.3",
          "request": "^2.88.0"
        }
      

      when u install the module, those dependencies will be installed too

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • T Offline
        TheDuDiop
        last edited by

        Thank you for your prompt reply, i have install again.
        but sorry i am still standing on the tube …

        where does that go ??

        “dependencies”: {
        “chart.js”: “^2.9.3”,
        “flow”: “^0.2.3”,
        “request”: “^2.88.0”
        }

        {
        module: ‘MMM-SunnyPortal’,
        position: ‘top_right’,
        header: ‘Solar Panels’, // The header text above the module. Use: “” to remove.
        config: {
        url: ‘https://www.sunnyportal.com’, // The SunnyPortal website’s URL
        updateInterval: 900, // How many times do we update the graphs?
        // Note: Do not update too frequently or you will get locked out
        // 15 Minutes is ideal
        username: ‘’, // Username for logging into https://www.sunnyportal.com/
        password: ‘’, // Password for logging into https://www.sunnyportal.com/
        width: 500, // The total width of the module
        height: 400 // The total height of the module
        “dependencies”: {
        “chart.js”: “^2.9.3”,
        “flow”: “^0.2.3”,
        “request”: “^2.88.0”,
        }
        }
        },

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @TheDuDiop
          last edited by sdetweil

          @TheDuDiop i was just showing it was already there in the package.json file.

          you did this

          git clone https://github.com/linuxtuxie/MMM-SunnyPortal.git
          cd MMM-SunnyPortal
          npm install
          
          danach
          
          npm install request --save
          npm install flow --save
          npm install chart.js --sav
          

          but only needed to do

          git clone https://github.com/linuxtuxie/MMM-SunnyPortal.git
          cd MMM-SunnyPortal
          npm install
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote -1
          • S Offline
            sdetweil
            last edited by

            open the developers window, f12 or ctrl-shift-i on the keyboard, select the tab labeled console and scroll up to see any errors,
            usually red text

            you can also add part of the module name to the filter field to help reduce the number of messages to look at

            sunn will be enough

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • T Offline
              TheDuDiop
              last edited by

              @sdetweil said in MMM-SunnyPortal Solar Module:

              developers window

              did you mean this:

              pi@raspberrypi:~ $ cd MagicMirror
              pi@raspberrypi:~/MagicMirror $ npm start

              magicmirror@2.11.0 start /home/pi/MagicMirror
              DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

              [2020-05-01 07:49:55.511] [LOG] Starting MagicMirror: v2.11.0
              [2020-05-01 07:49:55.522] [LOG] Loading config …
              [2020-05-01 07:49:55.530] [LOG] Loading module helpers …
              [2020-05-01 07:49:55.534] [LOG] No helper found for module: alert.
              [2020-05-01 07:49:55.614] [LOG] Initializing new module helper …
              [2020-05-01 07:49:55.615] [LOG] Module helper loaded: updatenotification
              [2020-05-01 07:49:55.616] [LOG] No helper found for module: clock.
              [2020-05-01 07:49:55.619] [LOG] Initializing new module helper …
              [2020-05-01 07:49:55.620] [LOG] Module helper loaded: mmm-udr
              [2020-05-01 07:49:56.243] [LOG] Initializing new module helper …
              [2020-05-01 07:49:56.244] [LOG] Module helper loaded: calendar
              [2020-05-01 07:49:56.770] [LOG] Initializing new module helper …
              [2020-05-01 07:49:56.771] [LOG] Module helper loaded: MMM-DWD-WarnWeather
              [2020-05-01 07:49:56.772] [LOG] No helper found for module: currentweather.
              [2020-05-01 07:49:56.773] [LOG] No helper found for module: weatherforecast.
              [2020-05-01 07:49:56.879] [LOG] Initializing new module helper …
              [2020-05-01 07:49:56.880] [LOG] Module helper loaded: MMM-Fuel
              [2020-05-01 07:49:57.384] [LOG] Initializing new module helper …
              [2020-05-01 07:49:57.385] [LOG] Module helper loaded: MMM-SunnyPortal
              [2020-05-01 07:49:57.385] [LOG] All module helpers loaded.
              [2020-05-01 07:49:57.574] [LOG] Starting server on port 8080 …
              [2020-05-01 07:49:57.596] [LOG] Server started …
              [2020-05-01 07:49:57.597] [LOG] Connecting socket for: updatenotification
              [2020-05-01 07:49:57.599] [LOG] Connecting socket for: mmm-udr
              [2020-05-01 07:49:57.599] [LOG] Starting node_helper
              [2020-05-01 07:49:57.600] [LOG] Connecting socket for: calendar
              [2020-05-01 07:49:57.601] [LOG] Starting node helper for: calendar
              [2020-05-01 07:49:57.602] [LOG] Connecting socket for: MMM-DWD-WarnWeather
              [2020-05-01 07:49:57.603] [LOG] MMM-DWD-WarnWeather helper started…
              [2020-05-01 07:49:57.604] [LOG] Connecting socket for: MMM-Fuel
              [2020-05-01 07:49:57.605] [LOG] Starting module helper: MMM-Fuel
              [2020-05-01 07:49:57.606] [LOG] Connecting socket for: MMM-SunnyPortal
              [2020-05-01 07:49:57.607] [LOG] Starting node helper for: MMM-SunnyPortal
              [2020-05-01 07:49:57.607] [LOG] Sockets connected & modules started …
              [2020-05-01 07:49:57.756] [LOG] Launching application.
              [2020-05-01 07:50:00.854] [LOG] Create new calendar fetcher for url: hlaalalalallalalalalalalalalaic.ics - Interval: 600000
              [2020-05-01 07:50:00.882] [LOG] SocketNotification START_SUNNYPORTAL received for the first time…setting updateInterval to 900000ms
              [2020-05-01 07:50:01.996] [LOG] Cookie Value: ASP.NET_SessionId=pgoxqxmetvbxoywf5crvnphn; BIGipServerPool_P_SunnyPortal=3036981440.20480.0000
              [2020-05-01 07:50:01.998] [LOG] Fetched VIEWSTATE value: zKxBKzNe9/MUZXDG/J0fVzXT0AaZuZ8OXFPZD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GENERATOR value: 4E24AF74
              [2020-05-01 07:50:02.063] [LOG] Cookie Value: ASP.NET_SessionId=ysbfmau4w0e3qicudfwhcvn2; BIGipServerPool_P_SunnyPortal=3053758656.20480.0000
              [2020-05-01 07:50:02.064] [LOG] Fetched VIEWSTATE value: SPU2vIohhKpzILTSf8NEacxSOREmXmrog5j9oACGJ/d7zRTHyS5CUIDQvCmrLatyO5mjCW7aNKFtQZAU/CZoeuRe+61Gy/a4/ZuMu0gdAY+OeNAsSk0ZpYQNLeodFj9Q1S6QK1hMs9ihTGUZbNbpskjj1YrKEWHv6vw8ggQXzcAWZvLQFFJv0wn0q0VMDO/FBQAPq7/HyZFWxWdIqWsbuM6nEX6CsCDxUCjFtEhKFftv0yt1meTYX7ORSXKXPjmbnX/s+cKLSy/O9Xv5T2oKIeBtgUOv+6tk+JL3AL36b+UA9YaXOPQww3d9d9asIvnyhWuQz1X78ZsdmH97EFL4GvEnueM2Si5NYxT9ODOex2z7D0k37bhXgdkMD4lyP59jT52aOhdFKfT2qIdj94DFjKYTJgcP+rWr4yLBOmfhJRioEAkRJGIHl9/v97oUDh06ljRxiOMhh77yHqd/rm5d4I/o2pLd8Nso5YTNm5ar58PxhaYivph/alFbYMyMcY2h00oTu/krRGZS1gMKrIVUHDlk1Kv2p8/F81PZ9N9lAVZEkP4BpjMXXVeWGuxmEX+PZIY+J6xy5YQRHC+lgEd9S5ogWSz873r8L4BUNBmaa1RqBna2+atG71CoZg7bN6llmetgSBv0LUdfHrcel5fvHjZZn/4LSqRgaiAsOCHAfJxvR1HlKJqaNtpQjUEkhH7BguzO/pDmUnhR3HrD/LfXNqZJL1D3GSMHfT+V1Wx2eVgD02BjJIATOxuyaPxz/mezIDUUwKUgMYs70JmeGUgCwDfNWwTkL+BnkrwLKuGrx/THIzGHUtplbZkb1bj8ItDOtxJfiFkkZ6XMP7HjKmlIEe/DyJhNzacuhdraxURavemuxc8IyE0kBFLu+T+kq1nBO1SknvGOPCIgJHWYtoe34xHtXkgf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x1cHaVqN4e+C0JJfAbFpU2QqnjqaIQRwpeCg/SgdAqSOHmrg4MoAD9B0WpqaMBXKyKeHNrntmWj7r/tyUP0fKF1PGI1Cn3IUHuVKbMybHgw95YbrfYE7yUxr/iBuPI4SkAEdbqLgQxDYUtEUsRzTkE8td6g6H5GaZ
              [2020-05-01 07:50:02.064] [LOG] Fetched VIEWSTATEGENERATOR value: 4E24AF74
              [2020-05-01 07:50:02.103] [LOG] Cookie Value: ASP.NET_SessionId=urv14lugscw4gcl3uqeqr51z; BIGipServerPool_P_SunnyPortal=3070535872.20480.0000
              [2020-05-01 07:50:02.104] [LOG] Fetched VIEWSTATE value: 3ZlIJkTD6/Nu07+OvDaS7flws2Ju49t6GgYkY6wI/RUdY5M4pRBgABZpEgG+8Zk8w7MQnK/qkdUG7/Kp+Lp3z+expWtx2n9mUZAHD5QAE3Dno+fv9xNo7sbywprecoDCLdY4D8JhCOLv3haYOvaf1ilt7qi6CpArJDZMaLC7nCm9mNvTHtHMJoJhJ5B/Y/ygsb3EsJLWkdfQ/8LVB2abSjN43Ouk0UqAK4QK0jkerrpPMjMjQ2rC/wRSVf7LeZblhgEXOdq4jhggQhV0eQ4lhoSYITXqqh9wxHlF5/ATzQcFu8uhLXJLYnKJXFKz3RK8M4UU9xaloBQTXtNNcTCnOx78633Iy5z8BfVCfUbkJ5+aZ0YlYSz2xDYdCxTG+JqSIdDc2HzaAWlcUNkNLIqZUyArRoOxzLKjOyhmtm/Roz19IO/aANWrdZr/2RN/IoAE4vpU6UYw4/m3BUicYLIzqtLH/eFNgjyyqUx5MG2mTFhGhLhuXK+4BwExu5dGxbnrbyo6H1gn8u/L1H0O1jAWGrLG9bcamjuF49hErLxyQ/1hso1eHO36M5qhkcKS71GBrxX1tuWwbU8Qo46jxVWx8vGi6g7lLfmRrM+gJA9S/c6NIMg+DL/11HnA2upxjnDdrfi9kE2QeLZxPR+HzLPSo+sPXu9al9OCODVGgOyQa/8vwOEteg6cJQUXOhtENcoV0I1xy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dbszYSHcJIYP+/cIsziKKEmewIumR/7DawpUtxEouOxpDblKj+xVm3X6EkKl1zS+Mgwvk6UR3FOt+/ksmizS7pMKfx0uKgVihJFLc/tph3J0NCCT7Ruy595FlIKfF0/GhbL+lsdXJZxGGduVQWHhr8xotftckg8d0yaJ3WNh47jxS+53bLwTfw9tHbM/dTu8rm4d3EZk1I88RmgyLAFONkMzz94YFpN2gBSohvcph2uWbT15g5rQjCIWC9S+CkqnLPoZUsijT8Y+PqetmtCO5sWoAv36eFX56cCiLeUWfcCMJ4f+RpUrgUtFuwRU12hgSxQFSgOy2JjS5zsqFKUlLrhCDo3lGmp09XIfdhWh7FeBFewaF
              [2020-05-01 07:50:02.105] [LOG] Fetched VIEWSTATEGENERATOR value: 4E24AF74
              [2020-05-01 07:50:02.530] [LOG] Login Failed, no redirect to Dashboard
              [2020-05-01 07:50:02.561] [LOG] Login Failed, no redirect to Dashboard
              [2020-05-01 07:50:02.580] [LOG] Login Failed, no redirect to Dashboard
              [2020-05-01 07:50:03.380] [LOG] HTTP Result: 200
              [2020-05-01 07:50:03.385] [LOG] Whoops! There was an uncaught exception…
              [2020-05-01 07:50:03.387] [ERROR] TypeError: Cannot read property ‘1’ of null
              at Request._callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_helper.js:103:121)
              at Request.self.callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:185:22)
              at Request.emit (events.js:200:13)
              at Request. (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:1154:10)
              at Request.emit (events.js:200:13)
              at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:1076:12)
              at Object.onceWrapper (events.js:288:20)
              at IncomingMessage.emit (events.js:205:15)
              at endReadableNT (_stream_readable.js:1154:12)
              at processTicksAndRejections (internal/process/task_queues.js:84:9)
              [2020-05-01 07:50:03.405] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
              [2020-05-01 07:50:03.406] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
              [2020-05-01 07:50:03.418] [LOG] HTTP Result: 200
              [2020-05-01 07:50:03.420] [LOG] Whoops! There was an uncaught exception…
              [2020-05-01 07:50:03.421] [ERROR] TypeError: Cannot read property ‘1’ of null
              at Request._callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_helper.js:103:121)
              at Request.self.callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:185:22)
              at Request.emit (events.js:200:13)
              at Request. (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:1154:10)
              at Request.emit (events.js:200:13)
              at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:1076:12)
              at Object.onceWrapper (events.js:288:20)
              at IncomingMessage.emit (events.js:205:15)
              at endReadableNT (_stream_readable.js:1154:12)
              at processTicksAndRejections (internal/process/task_queues.js:84:9)
              [2020-05-01 07:50:03.428] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
              [2020-05-01 07:50:03.431] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
              [2020-05-01 07:50:03.440] [LOG] HTTP Result: 200
              [2020-05-01 07:50:03.441] [LOG] Whoops! There was an uncaught exception…
              [2020-05-01 07:50:03.442] [ERROR] TypeError: Cannot read property ‘1’ of null
              at Request._callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_helper.js:103:121)
              at Request.self.callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:185:22)
              at Request.emit (events.js:200:13)
              at Request. (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:1154:10)
              at Request.emit (events.js:200:13)
              at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:1076:12)
              at Object.onceWrapper (events.js:288:20)
              at IncomingMessage.emit (events.js:205:15)
              at endReadableNT (_stream_readable.js:1154:12)
              at processTicksAndRejections (internal/process/task_queues.js:84:9)
              [2020-05-01 07:50:03.444] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
              [2020-05-01 07:50:03.445] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
              ^A^A

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @TheDuDiop
                last edited by

                @TheDuDiop said in MMM-SunnyPortal Solar Module:

                [2020-05-01 07:50:03.380] [LOG] HTTP Result: 200
                [2020-05-01 07:50:03.385] [LOG] Whoops! There was an uncaught exception…
                [2020-05-01 07:50:03.387] [ERROR] TypeError: Cannot read property ‘1’ of null
                at Request._callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_helper.js:103:121)

                the node_helper didn’t get the response from some service as it expected

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TheDuDiop
                  last edited by

                  thanks for your answer, what can I do that the node_helper goes again? or is this a developer problem?

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil
                    last edited by

                    probably a developer problem… don’t know the module at all

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • L Offline
                      linuxtuxie
                      last edited by

                      Hi,

                      It seems that the sunnyportal website is very picky about which user-agent is trying to connect to their web server.

                      I just changed the user-agent string on line 61 of the file node_helper.js
                      from

                      ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0’,

                      to

                      ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0’,

                      And now I am able to login again.

                      I will try to work out some better code to prevent this from happening in the future.

                      Can somebody else verify if this solution works?

                      Regards,
                      Linuxtuxie

                      T 1 Reply Last reply Reply Quote 0
                      • T Offline
                        TheDuDiop @linuxtuxie
                        last edited by

                        @linuxtuxie thank you will try it tomorrow

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          Snake-Darkangel
                          last edited by

                          Thanks for this great module. I have a problem on the loading.

                          mm-error.log

                          [2020-06-22 17:30:35.669] [ERROR]  (node:2694) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
                          [2020-06-22 17:30:35.671] [ERROR]  (node:2694) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
                          [2020-06-22 17:30:36.721] [ERROR]  Unable to fetch login page:  Error: certificate has expired
                              at TLSSocket.onConnectSecure (_tls_wrap.js:1317:34)
                              at TLSSocket.emit (events.js:200:13)
                              at TLSSocket._finishInit (_tls_wrap.js:792:8)
                              at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:606:12) {
                            code: 'CERT_HAS_EXPIRED'
                          }
                          [2020-06-22 17:30:36.741] [ERROR]  Unable to fetch login page:  Error: certificate has expired
                              at TLSSocket.onConnectSecure (_tls_wrap.js:1317:34)
                              at TLSSocket.emit (events.js:200:13)
                              at TLSSocket._finishInit (_tls_wrap.js:792:8)
                              at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:606:12) {
                            code: 'CERT_HAS_EXPIRED'
                          }
                          [2020-06-22 17:30:36.747] [ERROR]  Unable to fetch login page:  Error: certificate has expired
                              at TLSSocket.onConnectSecure (_tls_wrap.js:1317:34)
                              at TLSSocket.emit (events.js:200:13)
                              at TLSSocket._finishInit (_tls_wrap.js:792:8)
                              at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:606:12) {
                            code: 'CERT_HAS_EXPIRED'
                          }
                          [2020-06-22 17:30:39.469] [ERROR]  TypeError: Cannot read property 'statusCode' of undefined
                              at Request._callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_helper.js:101:46)
                              at self.callback (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:185:22)
                              at Request.emit (events.js:200:13)
                              at Request.onRequestError (/home/pi/MagicMirror/modules/MMM-SunnyPortal/node_modules/request/request.js:877:8)
                              at ClientRequest.emit (events.js:200:13)
                              at TLSSocket.socketErrorListener (_http_client.js:402:9)
                              at TLSSocket.emit (events.js:200:13)
                              at emitErrorNT (internal/streams/destroy.js:91:8)
                              at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
                              at processTicksAndRejections (internal/process/task_queues.js:84:9)
                          

                          So if I read correctly, I see that Buffer() is depreciate.
                          But It’s also write something strange with the certificate. In the mm-out.log I see more information:

                          0|mm       | [2020-06-22 17:26:43.303] [LOG]    SocketNotification START_SUNNYPORTAL received for the first time...setting updateInterval to 900000ms
                          0|mm       | [2020-06-22 17:26:44.113] [LOG]    Refreshed access token because it has expired. Expired at: 17:26:43 now is: 17:26:44
                          0|mm       | [2020-06-22 17:26:44.147] [LOG]    Refreshed access token because it has expired. Expired at: 18:26:44 now is: 17:26:44
                          

                          What can I do to resolve this case?
                          I already try to uninstall and re-install all, with npm install or ./install_deps.sh or the 3 npm install request / flow / chart but it doesn’t works.

                          Any idea?

                          Thanks for your help

                          L 1 Reply Last reply Reply Quote 0
                          • L Offline
                            linuxtuxie @Snake-Darkangel
                            last edited by linuxtuxie

                            @Snake-Darkangel

                            Thanks to hervidero the code has been altered so that it ignores the provided SSL Certificate.

                            Hervidero also made the charts a little bit better and wrote some code to make sure you can’t set an updateInterval < 15 minutes.

                            This release also includes the User-Agent change suggested in the previous comment

                            The latest release can be fetched here
                            https://github.com/linuxtuxie/MMM-SunnyPortal

                            Regards,
                            Linuxtuxie

                            I 1 Reply Last reply Reply Quote 0
                            • I Offline
                              icemanmw @linuxtuxie
                              last edited by

                              @linuxtuxie
                              Hello , i try to run the SunnyPortal module, but still no result. I´ve reinstalled the Pi severl times , down to a fresh image with no other modules, but i get only the loading view. thats all.

                              Any idea what i have to do ?

                              error message from PM2.log
                              Login Failed, no redirect to Dashboard or UserProfile/FixedPages/HoManEnergyRedesign.aspx

                              L 1 Reply Last reply Reply Quote 0
                              • L Offline
                                linuxtuxie @icemanmw
                                last edited by linuxtuxie

                                Hi icemanmw,

                                It seems that your installation is redirecting you to the following page: /FixedPages/HoManEnergyRedesign.aspx instead of the ones we already know of (DASHBOARD_URL & USERPROFILE_URL )

                                In to code we are checking if the returned HTTP redirect matches the DASHBOARD_URL or USERPROFILE_URL

                                You could try to use the below code in the node_helper.js script to add this page

                                • Add the HOMAN_URL variable at line 21
                                  var HOMAN_URL = ‘/FixedPages/HoManEnergyRedesign.aspx’;

                                • Change the code starting from line 99
                                  // Hack to check for login. Should forward to dashboard.
                                  if(httpResponse.headers.location && httpResponse.headers.location === DASHBOARD_URL) {
                                  console.log(“SUCCESSFULLY LOGGED IN TO DASHBOARD”);
                                  callback(err, jar);
                                  } else if(httpResponse.headers.location && httpResponse.headers.location === USERPROFILE_URL) {
                                  console.log(“SUCCESSFULLY LOGGED IN TO USERPROFILE”);
                                  callback(err, jar);
                                  } else if(httpResponse.headers.location && httpResponse.headers.location === HOMAN_URL) {
                                  console.log(“SUCCESSFULLY LOGGED IN TO HOMAN”);
                                  callback(err, jar);
                                  } else {
                                  console.log("Login Failed, no redirect to Dashboard, UserProfile or homan "+ httpResponse.headers.location);
                                  callback(new Error(‘Login Failed, no redirect to Dashboard, UserProfile or homan’));
                                  }

                                Can you let us know the results?

                                Regards,
                                Linuxtuxie

                                1 Reply Last reply Reply Quote 0
                                • I Offline
                                  icemanmw
                                  last edited by icemanmw

                                  Hi linuxtuxie,
                                  sorry fore my late response . I was a few days in Austria.
                                  Nevertheless i tried today your proposal and it looks much better. Now i see that :

                                  sunnyportal 2020-07-17 165439.jpg

                                  1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    Snake-Darkangel
                                    last edited by Snake-Darkangel

                                    I’ve the same issue. I try the update in the code, adding the httpResponse.headers.location in the log => it’s “undefined”
                                    (and http result : 200.)

                                    With the new version of the module, I’ve this log:

                                    [2020-11-23 12:26:02.231] [LOG]    Login Failed, no redirect to any of the known url's /FixedPages/Dashboard.aspx, /Templates/UserProfile.aspx, /FixedPages/HoManEnergyRedesign.aspx
                                    [2020-11-23 12:26:02.233] [LOG]    You are being redirected to the yet unkown url: undefined
                                    

                                    In my browser I see on the homepage a pop-up for a new SMA application. Maybe that can generate another URL ? I tried to cancel it to see if it’s the problem but … nope :(

                                    Still looking for a solution.

                                    1 Reply Last reply Reply Quote 0
                                    • L Offline
                                      linuxtuxie
                                      last edited by

                                      Hi Snake-Darkangel,

                                      Did you use the latest code listed at https://github.com/linuxtuxie/MMM-SunnyPortal ?

                                      More specifically the piece of code listed in the file node_helper.js is important. SunnyPortal seems to be very picky when it comes to the browser which makes a connection to there website. I recently updated the user-agent to the latest Firefox version as shown below:

                                      headers : {
                                      // We need to simulate a Browser which the SunnyPortal accepts…here I am Using Firefox 82.0.3 (64-bit) for Windows
                                      ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0’,
                                      },

                                      User SkyFocusNL even used another user-agent to get things working
                                      https://forum.magicmirror.builders/topic/14019/mmm-sunnyportal-not-loading/3
                                      maybe you can give that solution a try and provide us some feedback ?

                                      Regards,
                                      Linuxtuxie

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        Snake-Darkangel @linuxtuxie
                                        last edited by

                                        Hello @linuxtuxie ,

                                        Thank for your help. With the last update it’s working again.
                                        I probably miss an update -_-" (or forget to read other topic ^^)

                                        Regards,

                                        1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          DarthVaper
                                          last edited by

                                          Hello,

                                          any news about this loading problem ?

                                          Regards.

                                          1 Reply Last reply Reply Quote 0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post
                                          Enjoying MagicMirror? Please consider a donation!
                                          MagicMirror created by Michael Teeuw.
                                          Forum managed by Sam, technical setup by Karsten.
                                          This forum is using NodeBB as its core | Contributors
                                          Contact | Privacy Policy