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-Hive

    Scheduled Pinned Locked Moved Utilities
    39 Posts 7 Posters 24.8k Views 6 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
      spwood100 @spwood100
      last edited by

      @mongo116 , If I click into the output in developer tools I get the following (not sure if thats any help?)

      socketNotificationReceived: function(notification, payload) {
      var dt = new Date();
      var utcDate = dt.toUTCString();
      if (notification === “INSIDE”) {
      if (this.config.debug == true) {
      Log.log(utcDate + " " + this.name + " received notification: " + notification);
      this.processData(“INSIDE”, JSON.parse(payload));
      this.updateDom(this.config.animationSpeed);
      this.loaded = true;
      this.error = false;
      this.error401 = false;
      }

      M 1 Reply Last reply Reply Quote 0
      • M Offline
        mongo116 Module Developer @spwood100
        last edited by

        @spwood100 It looks like it should be working. I’ve just updated the module though and added the payload when debug is true. This should now output a load of text when in the console. Which is the JSON response from the Hive server relating to your receiver. You should see something like the following:

        “name”:“Your Receiver”,“nodeType”:“http://alertme.com/schema/json/node.class.thermostat.json#”

        I am using the “name”:“Your Receiver” to find the correct node (as this is the one that holds the temperature info). Could be that your’s is called something else. I’d say attach the complete JSON here, but I cannot be sure there isn’t anything in there that you wouldn’t want to put on a public website! So best bet is to copy / paste the text (starting with {“meta”:{},“links”:{},“linked”:{},“nodes”:[ and ending with }}}]}) into notepad++, and use the JS Tool plugin, which has a very good JSON viewer. If you run the JSON viewer, you will then see meta, links, linked, nodes etc on the left pane. If you can expand Nodes and then go into each one (0, 1, 2, etc) and let me know the ‘name:’ for each node (with the corresponding node number).

        Thanks

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

          Hey
          Yes I saw that suddenly pop up on my screen and I know have a bunch more information. My receiver and thermostat are named “downstairs” but I can rename those as thats not critical seeing as there is only one Hive thermostat in the house. So I have renamed this and cannot see the old name in the payload but I do see the first node which has a name of Your Receiver and if I drill down into that it does have a bunch of attributes one of which is Thermostat and has a Reported value in there.

          In terms of the information you want though:

          Node

          Array > Object 1: Hall Light

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

            Node > Array > Object 2 - Your Reciever
            Node > Array > Object 3 - Landing Light
            Node > Array > Object 4 - Receiver 3 ( I think this is the hot water reciever)
            Node > Array > Object 5 - Hub
            Node > Array > Object 6 - This seems to be an API call
            Node > Array > Object 7
            Node > Array > Object 8 - Your Receiver
            Node > Array > Object 9 - Receiver 2

            Hope this helps

            M 2 Replies Last reply Reply Quote 0
            • M Offline
              mongo116 Module Developer @spwood100
              last edited by

              @spwood100 Thanks for the info. I’ve updated the module and added a new config setting (‘nodeName’). Can you copy the debug text from the INSIDE debug info into notepad++ again, and using the JSON viewer drill down into each of the nodes. Only one should have stateHeatingRelay under attributes. Assuming only one does, make a note of the ‘name’ of this node and then add the following to the config section of the MMM-Hive section in your config.js:

              nodeName: "value from above here",
              

              Hopefully this should then pick up the inside temperature from your thermostat. If more than one have a stateHeatingRelay, then it’s back to the drawing board! As that’s not mentioned in any of the api details on the web :)

              1 Reply Last reply Reply Quote 0
              • M Offline
                mongo116 Module Developer @spwood100
                last edited by

                @spwood100 If I look at the payload from my Hive, I’m only seeing 5 nodes:
                0: Your Receiver
                1: Heating (thermostat)
                2: Signal Booster
                3: Your Hub
                4: Heating (receiver)

                My system is only heating, so maybe that’s the issue. It may be that both the hot water and heating receiver have stateHeatingRelay in the JSON response. Let me know how you get on with the updated version though. Thanks

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

                  BINGO!!
                  It works, thanks so mych for your help on this (and obviously developing the module in the first place), its very much appreciated. Nice solution as well!
                  Cheers
                  S

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    mongo116 Module Developer @spwood100
                    last edited by

                    @spwood100 Fantastic news :)
                    So what was the nodeName you have used to get this working?

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

                      Its Receiver 2 which I guess is a standard if its a multi node set-up as you cannot rename it.
                      Thanks again

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        rick @mongo116
                        last edited by

                        @mongo116 Hi - Looks like Hive have changed the login details and so the inside temp has stopped working. This can be fixed by changing the following line (#62) in node_helper.js from

                        url: lUrl + '/global/login',
                        

                        to

                        url: lUrl + '/cognito/login',
                        
                        M 1 Reply Last reply Reply Quote 0
                        • D Offline
                          DarrenG
                          last edited by

                          Ah thank you, came here to research this issue and have just implemented your fix and all working again.

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            mongo116 Module Developer @rick
                            last edited by

                            @rick Cheers for the details. I’ve updated and added some config options in case this changes again, so you only then need to update the config.

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              rick
                              last edited by

                              Looks like Hive have been changing login details yet again!. This time you need to change line(#67) in node_helper.js from

                              headers: { 'Content-Type': 'application/json'},
                              

                              to

                              headers: { 'Content-Type': 'application/json', 'User-Agent': 'HiveRNApp/10.16.2' },
                              
                              M 1 Reply Last reply Reply Quote 1
                              • M Offline
                                mongo116 Module Developer @rick
                                last edited by

                                @rick Thanks for that. Github has been updated :thumbs_up_light_skin_tone:

                                1 Reply Last reply Reply Quote 1
                                • M Offline
                                  mongo116 Module Developer
                                  last edited by

                                  Not sure whether many are using this module but figured I’d provide an update on the changes I made today. I’ve now updated the module so that it works again! I have updated to include the new login process and from testing it all appears to work - would welcome any feedback though :)

                                  1 Reply Last reply Reply Quote 0
                                  • N Offline
                                    np27np27
                                    last edited by

                                    My Hive module is giving a login error all of a sudden. Has Hive changed its user authentication method?
                                    Can the module author update this?

                                    N 1 Reply Last reply Reply Quote 0
                                    • N Offline
                                      np27np27 @np27np27
                                      last edited by

                                      @mongo116 ?

                                      N 1 Reply Last reply Reply Quote 0
                                      • N Offline
                                        np27np27 @np27np27
                                        last edited by

                                        I think its to do with Hive’s 2-factor authentication
                                        Does anyone have a workaround for it?

                                        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
                                        • 2 / 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