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-xiaomi - Temperature and Humidity from your smarthome

    Scheduled Pinned Locked Moved Utilities
    141 Posts 27 Posters 217.6k Views 27 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
      Smotx
      last edited by

      HI,

      Anyone know why MMM Xiaomi need aplay ?

      Error: Cannot find module 'node-aplay'
          at Module._resolveFilename (module.js:543:15)
          at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
          at Function.Module._load (module.js:473:25)
          at Module.require (module.js:586:17)
          at require (internal/module.js:11:18)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-xiaomi/node_helper.js:11:20)
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-xiaomi/node_helper.js:140:3)
          at Module._compile (module.js:642:30)
          at Object.Module._extensions..js (module.js:653:10)
          at Module.load (module.js:561:32)
      Whoops! There was an uncaught exception...
      
      

      Thanks

      1 Reply Last reply Reply Quote 0
      • S Offline
        Smotx @mirko3000
        last edited by

        @mirko3000 said in MMM-xiaomi - Temperature and Humidity from your smarthome:

        I just recieved my order of another 6 window sensors yesterday :) But I really think they will shut this down soon, guess they (gearbest) are not paying any taxes at all…

        Working on the new version, this is what I have in mind:
        0_1510134269455_Bildschirmfoto 2017-11-08 um 10.42.55.png

        How to have this screen ?

        E 1 Reply Last reply Reply Quote 0
        • S Offline
          Smotx @mirko3000
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • S Offline
            Smotx
            last edited by

            it seems that these window sensors are not compatible.

            Xiaomi Aqara Window Door Sensor

            I added them to the config module and no return on MM.

            When i launch

            miio discover
            

            it found

            Device ID: 158d0001ab1f9c
            Model info: lumi.magnet.aq2
            

            but when i launch npm start, MMM-xiaomi say

            Found device with ID 158d0001ab1f9c of type generic
            

            and no

            Found device with ID 158d0001ab1f9c of type magnet
            
            1 Reply Last reply Reply Quote 0
            • S Offline
              Smotx
              last edited by Smotx

              Thanks to owner of module : @mirko3000 for update to see this sensor !

              Now that’s work

              1 Reply Last reply Reply Quote 0
              • V Offline
                VagelisAn
                last edited by VagelisAn

                Dear @mirko3000 i have follow your instraction and i install the MMM-Xiaomi, i install and the miio to get the access token but the scan of miio is not find the getaway accesstoken

                pi@raspberrypi:~ $ miio discover
                 INFO  Discovering devices. Press Ctrl+C to stop.
                
                Device ID: 631XXXXX
                Model info: Unknown
                Address: XXX.XXX.X.XXX
                Token: ???
                Support: Unknown
                
                

                I use the MI application and get the ip and accessToken and the id from temperature sensor.
                The name is lumi.158xxxxxxxxxxx
                this is the code of config

                module: 'MMM-xiaomi',
                		position: 'top_right',
                		header: 'Temperature / Humidity',  // This is optional
                		config: {
                			config: {
                			gatewayIP: 'IP getaway from MI home',
                			gatewayToken: 'accese getaway from MI home',
                			showWindow: true,
                			showVentilation: true,
                			showLights: false,
                			audioNotifications: true,
                			rooms:  [
                				{
                					name: 'Bedroom-Mi Temp',
                					sortOrder: 10,
                					devices : ['lumi.158xxxxxxxxxxx']
                				},
                					]
                					}
                		}
                

                I execute and i have this error in terminal andthe xiaomi modules say connecting to xiaommi getaway.

                { Error: Call to device timed out
                    at retry (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modules/miio/lib/devi             ce.js:225:18)
                    at _ensureToken.catch.err (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modu             les/miio/lib/device.js:238:8)
                    at <anonymous> code: 'timeout' }
                
                

                Sorry if my English is bad

                1 Reply Last reply Reply Quote 0
                • G Offline
                  gh057
                  last edited by gh057

                  Has anyone tried to get the module to work with a Gateway AND a Yeelight bed lamp ??

                  I mean i have the module working with my gateway (manually added the token, and then the sensors appeard in miio discovery) but i havent managed to get it to work with the yeelight lamp (that also acts as a bluetooth gateway for my other sensors).

                  When i reseted the lamp, and connected to its wifi, i discovered it with miio and extracted the token, but later when i registered the lamp with the mi app, and connected my pi to my wifi, while the lamp is pingable by the pi, now miio doesn’t discover it!!

                  But, besides that, even if i manage to discover the lamp again with miio, i’m not aware if its even possible to add a second gateway to the module.

                  Does anyone know??

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    gauka12345
                    last edited by

                    HI there i have got same problem the gateway was turned off
                    then i have tried to reconnect all the temperature sensors and tokens shows with ??? question marks… can some one help please!

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      gauka12345
                      last edited by

                      pi@raspberrypi:~/miio $ miio discover
                      INFO Discovering devices. Press Ctrl+C to stop.

                      Device ID: 72558327
                      Model info: lumi.gateway.v3
                      Address: 192.168.0.9
                      Token: ???
                      Support: At least generic

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

                        hi,

                        Same problem here too

                        I have changed my router, so i have change wifi of Xiaomi hub

                        On magicmirror config i have set new ip 192.168.2.xxx (before 192.168.1.xxx).

                        But always nothing on MagicMirror after reboot.

                        perhaps token has changed with new router… So, on the rasp i launch command ```
                        miio discover

                        
                        ` $ sudo miio discover
                         INFO  Discovering devices. Press Ctrl+C to stop.
                        
                        Device ID: 567xxxx54
                        Model info: Unknown
                        Address: 192.168.2.xxx
                        Token: ???
                        Support: Unknown
                        `
                        
                        Anybody know why ? :(.
                        garblefluxG 1 Reply Last reply Reply Quote 0
                        • G Offline
                          gauka12345
                          last edited by

                          Hi
                          You can get token by installing older version of mi home app on you mobile
                          https://www.apkmirror.com/apk/xiaomi-inc/mihome/mihome-5-0-19-release/mihome-5-0-19-android-apk-download/
                          Then you will need to follow this tutorial to obtain the token
                          https://www.youtube.com/watch?v=Q4QV8tMI8H4
                          however so far i have swap the tokens but with no luck. i think the device need to be discovered by MIiio.

                          S 1 Reply Last reply Reply Quote 0
                          • S Offline
                            Smotx @gauka12345
                            last edited by Smotx

                            @gauka12345

                            I gave found new token on Mi home app android, it worked a few days, and then again it does not work anymore, it tells me ‘time out’ and in mioo discover there is nothing at all

                            { Error: Call to device timed out
                            at retry (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modules/miio/lib/device.js:225:18)
                            at _ensureToken.catch.err (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modules/miio/lib/device.js:238:8)
                            at code: ‘timeout’

                            1 Reply Last reply Reply Quote 0
                            • garblefluxG Offline
                              garbleflux Project Sponsor @Smotx
                              last edited by

                              @smotx said in MMM-xiaomi - Temperature and Humidity from your smarthome:

                              hi,

                              Same problem here too

                              I have changed my router, so i have change wifi of Xiaomi hub

                              On magicmirror config i have set new ip 192.168.2.xxx (before 192.168.1.xxx).

                              But always nothing on MagicMirror after reboot.

                              perhaps token has changed with new router… So, on the rasp i launch command ```
                              miio discover

                              
                              ` $ sudo miio discover
                               INFO  Discovering devices. Press Ctrl+C to stop.
                              
                              Device ID: 567xxxx54
                              Model info: Unknown
                              Address: 192.168.2.xxx
                              Token: ???
                              Support: Unknown
                              `
                              
                              Anybody know why ? :(.
                              

                              I had the same problem. Meanwhile, I have found the solution. An update from Xiaomi changed the token in the gateway. This must now be read out via the smartphone. In my case the miio discovery command did not work any more. I followed this instruktion to get the new token

                              https://forum.smartapfel.de/forum/thread/1219-xiaomi-mi-gateway-homebridge-mi-aqara/?postID=31779#post31779

                              … and now all works fine again - I have all my sensors back on the mirror.

                              regards
                              Mike

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

                                after this command :

                                miio tokens update 567xxxxx --token 6xxxxxxxxxxxxxxxxxxxxxxxxxxx
                                

                                mine to work again a few days, and now is KO again… for the third time… :face_with_steam_from_nose: Token has not changed, ip has not changed…

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

                                  I can’t find what needs to be changed in CSS to change the font color of the temperature and humidity numbers.

                                  1 Reply Last reply Reply Quote 0
                                  • L Offline
                                    lovesicker
                                    last edited by lovesicker

                                    Hi guys,

                                    I have two temperature sensors. Each sensor registers with a gateway. Could anyone tell me how to add the two gateways in config.js file?

                                    I try to add the following codes in config.js:

                                    {
                                    module: ‘MMM-xiaomi’,
                                    position: ‘top_right’,
                                    header: ‘Temperature / Humidity’,
                                    config: {
                                    gatewayIP: ‘192.168.186.181’,
                                    gatewayToken: ‘xxxxxxxx-ceec093b30b1775dc741a7’,
                                    showWindow: true,
                                    showVentilation: true,
                                    showLights: false,
                                    audioNotifications: true,
                                    rooms: [
                                    {
                                    name: ‘Bedroom’,
                                    sortOrder: 20,
                                    devices : [‘158d000xxxx9f’]
                                    }
                                    ],
                                    gatewayIP: ‘192.168.186.166’,
                                    gatewayToken: ‘xxxxxxxx–927e2d20b22c22b007194c’,
                                    rooms: [
                                    {
                                    name: ‘Childroom’,
                                    sortOrder: 30,
                                    devices : [‘158d000xxxx4f6’]
                                    }
                                    ]
                                    }
                                    }

                                    but MagicMirror always display the last sensor, which registers with the secondary gateway in config.js file.

                                    image

                                    Could anyone give me some suggestions? Thanks in advance!

                                    garblefluxG 1 Reply Last reply Reply Quote 0
                                    • garblefluxG Offline
                                      garbleflux Project Sponsor @lovesicker
                                      last edited by

                                      @lovesicker Hi,
                                      I think you are on the wrong way: You use gatewayIP and gatewayToken twice. Thats not necessary.
                                      Look to my configuration - this works fine:
                                      {
                                      module: ‘MMM-xiaomi’,
                                      position: ‘bottom_left’,
                                      colored: true,
                                      header: ‘Temperatur / Luftfeuchtigkeit’, // This is optional
                                      config: {
                                      gatewayIP: ‘192.168.160.xx’,
                                      outsideSensorId: ‘15xxx0201dxxx’,
                                      gatewayToken: ‘cd857eee1fc760d029767709cd50xxxx’,
                                      showWindow: true,
                                      showVentilation: true,
                                      showLights: false,
                                      showTend: false,
                                      showNotifications: false,
                                      audioNotifications: false,

                                                          rooms:  [
                                      		{
                                      		name: 'Büro',
                                      		minTemperature : 15,
                                                          maxTemperature : 35,
                                                          sortOrder: 1,
                                      		devices : ['158d0001c2cxxx']
                                      		},
                                      		{
                                      		name: 'Aussentemperatur  ',
                                      		sortOrder: 20,
                                                          devices : ['15xxx00201d4xxx']    
                                                          },                  
                                                          {
                                                          name: 'Wohnzimmer  ',
                                                          minTemperature : 15,
                                                          maxTemperature : 35,
                                                          sortOrder: 2,
                                                          devices : ['158d0001c2cxxx']
                                      		},
                                      		{
                                                          name: 'Schlafzimmer  ',
                                                          sortOrder: 3,
                                                          minTemperature : 15,
                                                          maxTemperature : 30,
                                                          devices : ['1xxx000201dxxx', '15xxx001f49xxx']
                                                          },
                                                          {
                                                          name: 'Philipp',
                                                          minTemperature : 15,
                                                          maxTemperature : 35,
                                                          sortOrder: 4,
                                                          devices : ['1xxd0001c14xxx']
                                                          },
                                                          {
                                      		name: 'Marco',
                                                          minTemperature : 15,
                                                          maxTemperature : 35, 
                                                          sortOrder: 5,
                                      		devices : ['15xxx01f54xxx']
                                                          }, 
                                                            {
                                      		name: 'HW-Raum',
                                                          minTemperature : 10,
                                                          maxTemperature : 35, 
                                                          sortOrder: 7,
                                      		devices : ['15xxx002029xxx']
                                                          }, 		
                                      					{
                                                          name: 'Garage',
                                                          minTemperature : 15,
                                                          maxTemperature : 35,
                                                          sortOrder: 10,
                                                          devices : ['15xxx001c1xxx']
                                                          },
                                                          {
                                                          name: 'Keller',
                                                          minTemperature : 15,
                                                          maxTemperature : 35,
                                                          sortOrder: 9,
                                                          devices : ['15xxx001c2axxx']
                                                          },
                                                          {
                                                          name: 'WC',
                                                          minTemperature : 15,
                                                          maxTemperature : 35,
                                                          sortOrder: 8,
                                                          devices : ['15xxx001c1axxx']
                                                          },
                                                          {
                                                          name: 'Bad',
                                                          minTemperature : 18,
                                                          maxTemperature : 35,
                                                          sortOrder: 6,
                                                          devices : ['15xxx001c2cxxx']
                                                          },  
                                      

                                      ]

                                      L 1 Reply Last reply Reply Quote 0
                                      • L Offline
                                        lovesicker @garbleflux
                                        last edited by lovesicker

                                        @garbleflux First, thank you for your reply.
                                        I have two different rooms. There are a temperature sensor and a gateway in each room! So I have to add two gateways in config.js file.

                                        garblefluxG 1 Reply Last reply Reply Quote 0
                                        • garblefluxG Offline
                                          garbleflux Project Sponsor @lovesicker
                                          last edited by

                                          @lovesicker Hi,
                                          why do you use two gateways? It’s not necessary. I use one gateway for my complete house. I use 10 temperature and humity sensors. Have a closer look to my config.
                                          Regards Mike.

                                          L 1 Reply Last reply Reply Quote 0
                                          • L Offline
                                            lovesicker @garbleflux
                                            last edited by

                                            @garbleflux thank you for your discussion.

                                            It’s difficult to explain. Let me try. Maybe my scenario is very different with yours.

                                            There are one Xiaomi temperature sensor, one Xiaomi air conditioning companion (gateway) and one Xiaomi intelligent clock (integrated partial AI function) in EACH bedroom.

                                            When I speak to the clock, “Hi Xiaoai, please tell me the room temperature” or “temperature”, the clock tell me the correct number of degrees via the RIGHT gateway. When I say “power on the air conditioning”, the same thing happen.

                                            It’s unsuitable that I say "tell me CHILDROOM temperature " or “power off CHILDROOM air conditioning” when I’m in my bedroom. Although I know it is realizable.

                                            I’m not sure I clearly explain the reason. Anyway, I need two gateways in my house.

                                            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
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 8 / 8
                                            • 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