• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
  1. Home
  2. linuxtuxie
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
L
Offline
  • Profile
  • Following 0
  • Followers 0
  • Topics 1
  • Posts 7
  • Groups 0

linuxtuxie

@linuxtuxie

1
Reputation
60
Profile views
7
Posts
0
Followers
0
Following
Joined Feb 10, 2020, 9:36 PM
Last Online Jan 23, 2022, 2:26 PM

linuxtuxie Unfollow Follow

Best posts made by linuxtuxie

  • MMM-SunnyPortal Solar Module

    Re: SMA/Sunny portal Solar Module

    Hi,

    I just uploaded a MagicMirror module called MMM-SunnyPortal on github which I think provides the requested view of your Solar Panel output.

    You can find the module at https://github.com/linuxtuxie/MMM-SunnyPortal/

    Have fun with it :)

    Regards,
    Linuxtuxie

    posted in Requests
    L
    linuxtuxie
    Feb 10, 2020, 10:05 PM

Latest posts made by linuxtuxie

  • RE: MMM-SunnyPortal Solar Module

    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

    posted in Requests
    L
    linuxtuxie
    Nov 23, 2020, 8:44 PM
  • RE: MMM-SunnyPortal not loading

    Hi Arjan,

    I also encountered the same problem and noticed that I was forced to create a more complex password on the portal, but even after changing the password, the problem remained…

    I got it working again by making use of the user-agent of the latest Firefox browser version, being:

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

    So it seems that we have hit the same browser user-agent issue again as mentioned in post https://forum.magicmirror.builders/post/77179

    You can fetch the latest release from
    https://github.com/linuxtuxie/MMM-SunnyPortal

    Can you confirm its working again?

    Regards,
    Linuxtuxie

    posted in Requests
    L
    linuxtuxie
    Nov 14, 2020, 8:28 PM
  • RE: MMM-SunnyPortal Solar Module

    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

    posted in Requests
    L
    linuxtuxie
    Jul 13, 2020, 11:25 PM
  • RE: MMM-SunnyPortal Solar Module

    @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

    posted in Requests
    L
    linuxtuxie
    Jun 26, 2020, 8:59 PM
  • RE: MMM-SunnyPortal Solar Module

    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

    posted in Requests
    L
    linuxtuxie
    Jun 16, 2020, 7:11 PM
  • RE: MMM-SunnyPortal Solar Module

    Hi Peter,

    If the inverter is visible on https://www.sunnyportal.com/ I would expect it to work.

    The main idea behind the module is that it is going to fetch the information in quite the same way as your browser would do when you visit the sunnyportal site.

    I personally have only tested the code with the inverter model Sunny Boy 1.5 1VL-40 (because that’s the one I could get my hands on ;)

    So I cannot guarantee that other inverters will work flawlessly.

    Regards,
    Linuxtuxie

    posted in Requests
    L
    linuxtuxie
    Mar 30, 2020, 4:25 PM
  • MMM-SunnyPortal Solar Module

    Re: SMA/Sunny portal Solar Module

    Hi,

    I just uploaded a MagicMirror module called MMM-SunnyPortal on github which I think provides the requested view of your Solar Panel output.

    You can find the module at https://github.com/linuxtuxie/MMM-SunnyPortal/

    Have fun with it :)

    Regards,
    Linuxtuxie

    posted in Requests
    L
    linuxtuxie
    Feb 10, 2020, 10:05 PM
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