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

MMM-Hue

Scheduled Pinned Locked Moved Utilities
huehome automation
25 Posts 16 Posters 21.3k Views 17 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.
  • M Offline
    Mitchfarino Module Developer
    last edited by Mitchfarino Sep 17, 2016, 11:29 PM Sep 17, 2016, 11:16 PM

    Monitor your Philips Hue Lights using MMM-Hue

    This is my first attempt at developing anything like this, so hopefully it helps someone

    At the moment, all you need to enter is your bridge IP Address and your user ID.

    The module displays the status of each room/group set up on your bridge.
    MMM-Hue can be found here:

    https://github.com/MitchSS/MMM-Hue

    I’d also light to thank @strawberry-3-141 for their help with this!

    0_1474154841679_MMM-Hue.PNG

    1 Reply Last reply Reply Quote 0
    • M Offline
      Mitchfarino Module Developer
      last edited by Sep 18, 2016, 7:48 PM

      I’ve changed the config so that the user can toggle between coloured icons or the standard font colour of the mirror.

      0_1474228120101_Icons.PNG

      1 Reply Last reply Reply Quote 0
      • D Offline
        darrene
        last edited by Oct 14, 2016, 11:39 AM

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • M Offline
          Mitchfarino Module Developer
          last edited by Mitchfarino Oct 14, 2016, 12:07 PM Oct 14, 2016, 12:03 PM

          Hi @darrene - did you manage to sort your issue?

          You’re right, you have to create your account in the bridge first.

          The link in the readme should take you to the correct page, which walks you through creating the account.
          http://www.developers.meethue.com/documentation/getting-started

          Give me a shout if you have any problems
          0_1476446717005_clip api.PNG

          D 1 Reply Last reply Oct 14, 2016, 12:06 PM Reply Quote 0
          • D Offline
            darrene @Mitchfarino
            last edited by darrene Oct 14, 2016, 12:07 PM Oct 14, 2016, 12:06 PM

            Thanks @Mitchfarino - it was user-error. I visited the developer page rather than clicking on the link you provided :) I deleted my previous post in shame after I realised my error.

            All sorted now. It’s fabulous. Thanks for sharing your code with the community by the way!

            1 Reply Last reply Reply Quote 1
            • D Offline
              darrene
              last edited by Oct 29, 2016, 2:59 PM

              Hi @Mitchfarino, I was just wondering if you’d considered extending the module to control lighting schedules?

              It suddenly struck me that as the mirror is always on and stays in the house, it might be very really cool (not to mention useful when you’re away) to have a capability in the module to turn on/off dim lights on a hardcoded schedule or time/day combo.

              From there it could even be a short hop to link it up the the MMM-RemoteControl module, to set schedules remotely.

              M 1 Reply Last reply Oct 30, 2016, 4:16 PM Reply Quote 0
              • M Offline
                Mitchfarino Module Developer @darrene
                last edited by Mitchfarino Oct 30, 2016, 4:16 PM Oct 30, 2016, 4:16 PM

                Hi @darrene

                Do you mean you want to be able to control the lights/schedules from your mirror?

                How would you interact with it to create them etc?

                I think at the moment the remote control only allows you show or hide modules, I’m not sure what future developments are in the pipeline though ( @Jopyth will know more on that)

                1 Reply Last reply Reply Quote 0
                • D Offline
                  darrene
                  last edited by darrene Oct 30, 2016, 5:07 PM Oct 30, 2016, 5:06 PM

                  Not directly - I think it’d be a lot of work and as you say, would need a way of interfacing with the mirror. At the end of all that you could just use The Hue/Elgato Eve/Siri app to do the same thing.

                  What I wondered though, was if something like MMM-Schedule was installed, it’d be really easy to put a schedule in the config.js to turn specific lights on and off on certain schedules - it could send the notification schedule which MMM-Hue could react to. It’d mean you/the mirror could schedule the lighting schemes automatically to run while you were away from home.

                  If MMM-Hue could react to a HUE_LIGHT_ON and HUE_LIGHT_OFF notification, perhaps with a light-ID and Brightness value as the payload, that’d do the trick wouldn’t it?

                  A scheduling GUI would be uber-cool, but hard-coding the config.js would be enough for most, I’d have thought…

                  It’s on my (very long) list of things to have a go at, if I get a chance :)

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Clogs
                    last edited by Nov 17, 2016, 10:39 PM

                    Hi @Mitchfarino

                    Like your MMM-Hue module but will admit getting it to work was a little bit more tricky then what I had anticipated.

                    My version 1.0 Hue hub setup controlling a 9 individual bulbs. I did not set up the bulbs as part of a groups.

                    Wanted to share just a few simple findings to help others to get your module to work even better.

                    Inspecting your code in MMM-Hue.js I found that you had a this.lightsorgroups hardcoded to “groups”. As a result of this my Hue setup was presented as just the Home icon with ‘Lights On’ as the status.

                    Changing the hardcoded this.lightsorgroups to “lights” did result in a similar display as shown in your first post however all the named lights showed the X (fa-times) icon for the status even though lights were on, others off an others unreacheable.

                    So I made a further minor change on line 69 and changed it to:

                    lightstatus.classList.add("fa", this.result[lamps[i]].state.reachable ? (this.result[lamps[i]].state.on ? "fa-lightbulb-o" : "fa-adjust" ) : "fa-times");

                    Keep up the good work.

                    M 1 Reply Last reply Nov 17, 2016, 10:45 PM Reply Quote 0
                    • M Offline
                      Mitchfarino Module Developer @Clogs
                      last edited by Nov 17, 2016, 10:45 PM

                      Hi @Clogs

                      Thanks for your feedback, I’m sorry I haven’t been able to update the module to account for individual lights

                      As you have noticed it is in the code, I just didn’t expose it to the config.

                      I’m going to pick it up soon, and will update in this thread.

                      Thanks for letting me know, and for giving me the nudge I need to get it updated

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      • 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