• 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
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Nobody knows???

Scheduled Pinned Locked Moved Unsolved Troubleshooting
16 Posts 3 Posters 2.8k Views 3 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 Away
    sdetweil @karsten13
    last edited by Feb 24, 2022, 8:59 PM

    @karsten13 ok.

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • F Offline
      fischi87 @karsten13
      last edited by fischi87 Feb 25, 2022, 5:41 AM Feb 25, 2022, 5:41 AM

      @karsten13

      i will send u my code part and the error later. thanks for ur reply!

      i hope we can fix this problem.

      1 Reply Last reply Reply Quote 0
      • F Offline
        fischi87 @karsten13
        last edited by Feb 25, 2022, 6:48 PM

        @karsten13

        var stromRequest = new XMLHttpRequest();
                  var requestURL = 'http://192.168.178.44/cm?cmnd=var1';
                  stromRequest.onreadystatechange = function () {
                    if (stromRequest.readyState === XMLHttpRequest.DONE) {
                      if(stromRequest.status === 200) {
                        var json_parse = JSON.parse(stromRequest.responseText).Var1
                        var stromverbrauch = Number(json_parse * 0.30)//.toFixed(2);
                        var verbrauch = stromverbrauch.toFixed(2);
        

        this is my request and the error:

        Bildschirmfoto 2022-02-25 um 19.47.26.png

        K 1 Reply Last reply Feb 25, 2022, 7:51 PM Reply Quote 0
        • K Offline
          karsten13 @fischi87
          last edited by Feb 25, 2022, 7:51 PM

          @fischi87

          so I assume the code snippet is from the module.js (not from node_helper.js). The url with IP 192.168.178.44 is pointing to another device in your network and is therefore different to the IP where mm is running?

          If mm has the same IP you could try localhost instead, if the IP’s are different you can try this:

          var requestURL = location.protocol + "//" + location.host + "/cors?url=http://192.168.178.44/cm?cmnd=var1";
          

          The 2. option with the cors url works only with the develop branch of mm (will be in the next official relase coming 1. April).

          F 1 Reply Last reply Feb 26, 2022, 6:42 AM Reply Quote 0
          • F Offline
            fischi87 @karsten13
            last edited by fischi87 Feb 26, 2022, 6:45 AM Feb 26, 2022, 6:42 AM

            @karsten13

            thats right, its from the module.js. i read i can fix this issue with the node_helper.js but i dont know how to write the code down in the node_helper.js to get the result from my url.

            i will try ur answer later.

            i know how to write code in the node_helper.js form the request?

            thanks

            1 Reply Last reply Reply Quote 0
            • F Offline
              fischi87
              last edited by fischi87 Feb 26, 2022, 9:55 AM Feb 26, 2022, 9:52 AM

              @karsten13 said in Nobody knows???:

              var requestURL = location.protocol + “//” + location.host + “/cors?url=http://192.168.178.44/cm?cmnd=var1”;

              now I get this error:

              Bildschirmfoto 2022-02-26 um 10.51.05.png

              cannot get /cors.

              K S 2 Replies Last reply Feb 26, 2022, 3:13 PM Reply Quote 0
              • K Offline
                karsten13 @fischi87
                last edited by Feb 26, 2022, 3:13 PM

                @fischi87

                you switched to develop and pulled the latest version of mm? Looks like not.

                1 Reply Last reply Reply Quote 0
                • S Away
                  sdetweil @fischi87
                  last edited by Feb 26, 2022, 3:45 PM

                  @fischi87 here is how to get to develop branch, depending on how u installed
                  https://forum.magicmirror.builders/topic/14327/testing-new-fixes-or-solving-current-problems-with-next-release-code

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  F 1 Reply Last reply Feb 26, 2022, 6:32 PM Reply Quote 0
                  • F Offline
                    fischi87 @sdetweil
                    last edited by fischi87 Feb 26, 2022, 6:49 PM Feb 26, 2022, 6:32 PM

                    @sdetweil

                    after switch to develop no MagicMirror display anymore? no autocrat, nothing?

                    electron problem!

                    S 1 Reply Last reply Feb 26, 2022, 6:50 PM Reply Quote 0
                    • S Away
                      sdetweil @fischi87
                      last edited by sdetweil Feb 26, 2022, 8:31 PM Feb 26, 2022, 6:50 PM

                      @fischi87 and u have to npm install after switch

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        9/16
                        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