HomeKit or HomeBridge integration to readout room temperatures



  • Hi,
    I just built my own MM and one thing that I am missing is a possibilty to show the room temperature.
    I also use Apple HomeKit and have a temperature via Philips Hues Motion sensor. But I don’t find a way to let the MagicMirror read the temperature in my HomeKit.
    Has anyone a solution for this?
    MMM-hue-lights ist a great module by the way, but as the name says it only reads the status of the lights, not of the motion sensors.

    My HomeKit room as it looks on the iPhone:
    HomeKit


  • Project Sponsor Module Developer

    @kuhlemann Given how closed Apple is with their APIs, you may have better luck trying to integrate directly with the Phillips Hue Motion sensor directly than trying to access it via Homekit. No idea if Phillips makes their API available however.



  • I now tried to solve this via ioBroker. I was able to adjust ioBroker via Node-RED to read out the temperature from my Hue motion sensor:
    ioBroker

    I tried to integrate this value via MMM-ioBroker.
    But I can’t get MMM-ioBroker to read the value 20,31.
    The config.js I use is:

      {
        module: 'MMM-ioBroker',
        position: 'top_right',
        config: {
          host: 'localhost',
          port: '8081',
          https: false,
          devices: [
              { name: 'Haustemperatur',
                deviceStates: [
                                  { id: 'node-red.0.hue.temperatur', icon: 'wi wi-thermometer', suffix: '°' },
                              ]
              },
            ]
        }
      },
    

    The MagicMirror only shows a “-” where the 20,31 should be. The rest of the module loads fine.
    Opening http://localhost:8081 in a browser opens the ioBroker on my Pi without any problem.

    Does anyone have an idea?



  • Hi,

    Because of this post I tried to get Homematic IP readings that I successfully integrated in ioBroker.
    I have a separate host for ioBroker and use port 8082.
    I also cannot get MMM-ioBroker to read the temperature and humidity readings.

    My pm2 logsshows:

    0|mm  | Connecting socket for: MMM-ioBroker
    :
    :
    0|mm  | Request Failed.
    0|mm  |  Status Code: 404
    0|mm  | Request Failed.
    0|mm  |  Status Code: 404
    :
    :
    

    What do you see in the log ?



  • @evroom 404 means not found.

    How did the url for the request get created? What does the url look like just before the request is sent?



  • @sdetweil
    I was hoping the module would take care of this.
    I do not know how a ioBroker URI should look like.
    I configured MMM-ioBroker using the IP and port of my ioBroker host and the ID’s that I used in ioBroker vis to display temperature and humidity of my Homematic IP devices.

    What would be the syntax of a GET call ?



  • Okay, got it working.

    In ioBroker I needed to activate the "Build-in Simple-API in web.0.

    Then this works:

    http://[ioBroker_IP]:8082/help
    

    And this works:

    http://[ioBroker_IP]:8082/getPlainValue/hm-rpc.0.xxxxxxxxx.1.ACTUAL_TEMPERATURE
    


  • @evroom cool!.. glad u got it working

    can u mark this solved? 3 dots to the right of topic…



  • @sdetweil said in HomeKit or HomeBridge integration to readout room temperatures:

    can u mark this solved? 3 dots to the right of topic…

    It is the topic of @Kuhlemann , so he needs to try if the solution that worked for me will work for him.



  • @evroom Thank you, this worked for me! I would have never found this out alone!
    Maybe someone should add this information to MMM-ioBroker!