MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Albert2002
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 44
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Hmm… I must have had a typo somewhere. Now the config is working for me as well but still no icon.

      this is how it works so far:

      {
      		module: 'MMM-xiaomi',
      		position: 'bottom_left',
      		header: 'Temperatur / Feuchtigkeit',  // This is optional
      		config: {
      			gatewayIP: '192.168.2.160',
      			gatewayToken: '6ebf9b84e5c615c09268166a99b95f0a',
      			showWindow: true,
      			rooms: [
      			{ name: 'Wohnzimmer', sortOrder: 30, devices : ['158d00015736a8', '158d000119fcb2'] },
      					]
      			// See 'Configuration options' for more information.
      				}
      		},
      

      This is what I get:

      alt text

      mm out:

      > magicmirror@2.1.3 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.1.3
      Loading config ...
      Loading module helpers ...
      No helper found for module: alert.
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      No helper found for module: currentweather.
      No helper found for module: weatherforecast.
      Initializing new module helper ...
      Module helper loaded: MMM-Remote-Control
      Initializing new module helper ...
      Module helper loaded: MMM-PNews
      Initializing new module helper ...
      Module helper loaded: newsfeed
      Initializing new module helper ...
      Module helper loaded: internet-monitor
      Initializing new module helper ...
      Module helper loaded: MMM-MovieListings
      Initializing new module helper ...
      Module helper loaded: MMM-Fuel
      Initializing new module helper ...
      Module helper loaded: MMM-NetworkScanner
      Initializing new module helper ...
      Module helper loaded: MMM-nasaastropic
      Initializing new module helper ...
      Module helper loaded: MMM-SystemStats
      No helper found for module: MMM-Carousel.
      Initializing new module helper ...
      Module helper loaded: MMM-Events
      Initializing new module helper ...
      Module helper loaded: MMM-xiaomi
      All module helpers loaded.
      Starting server on port 8080 ... 
      You're using a full whitelist configuration to allow for all IPs
      Server started ...
      Connecting socket for: calendar
      Starting node helper for: calendar
      Connecting socket for: MMM-Remote-Control
      Starting node helper for: MMM-Remote-Control
      Connecting socket for: MMM-PNews
      Starting module: MMM-PNews
      Connecting socket for: newsfeed
      Starting module: newsfeed
      Connecting socket for: internet-monitor
      internet-monitor helper started ...
      Connecting socket for: MMM-MovieListings
      MMM-MovieListing helper started...
      Connecting socket for: MMM-Fuel
      Starting module helper: MMM-Fuel
      Connecting socket for: MMM-NetworkScanner
      Starting module: MMM-NetworkScanner
      Connecting socket for: MMM-nasaastropic
      Starting node helper: MMM-nasaastropic
      Connecting socket for: MMM-SystemStats
      Connecting socket for: MMM-Events
      Starting node_helper for: MMM-Events
      Connecting socket for: MMM-xiaomi
      Starting xiaomi helper
      Sockets connected & modules started ...
      Launching application.
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/basic.ics - Interval: 300000
      Create new news fetcher for url: http://www.haz.de/rss/feed/haz_schlagzeilen - Interval: 300000
      Create new news fetcher for url: http://www.spiegel.de/schlagzeilen/index.rss - Interval: 300000
      starting internet monitor node helper
      MMM-NetworkScanner received CONFIG
      astro helper: config received
      retrieveAndUpdate()
      Sat Nov 18 2017 15:55:41 GMT+0100 (CET): Triggering Xiaomi Gateway connect
      NASA Astro Pic of the Day URL: https://apod.nasa.gov/apod/image/1711/20171117dawnTezel1200c.jpg
      Found device with ID 158d000119fcb2 of type magnet
      Found device with ID 158d00015aa973 of type controller
      Found device with ID 158d00015736a8 of type sensor
      
      

      No errors in the log

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Am sorry, it was my mistake. I did not checked my config.js. Out of nowhere there was again

      devices:
      

      instead of

      rooms: 
      

      Thank you for your help!

      I’ve tried to get the icon for the open state of the window sensors working this way:
      The first ID is the temperature sensor, the second one the window sensors:

      {
      		module: 'MMM-xiaomi',
      		position: 'bottom_left',
      		header: 'Temperatur / Feuchtigkeit',  // This is optional
      		config: {
      			gatewayIP: '192.168.2.160',
      			gatewayToken: '6ebf9b84e5c615c09268166a99b95f0a',
      			showWindow: true,
      			rooms: [
      			{ name: 'Wohnzimmer', sortOrder: 30, devices : ['158d00015736a8', '158d000119fcb2'] },
      					]
      				}
      		},
      

      and this way:

      {
      		module: 'MMM-xiaomi',
      		position: 'bottom_left',
      		header: 'Temperatur / Feuchtigkeit',  // This is optional
      		config: {
      			gatewayIP: '192.168.2.160',
      			gatewayToken: '6ebf9b84e5c615c09268166a99b95f0a',
      			rooms: [
      			{ name: 'Wohnzimmer', sortOrder: 30, showWindow: true, devices : ['158d00015736a8', '158d000119fcb2'] },
      					]
      				}
      		},
      

      Both times MM did not started because of errors in the config. How is the right way to get this solved?

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      I’ve pulled the latest update today. Since this i don’t see the temperature / humidity any more. I don’t have any errors in my logs depending MMM-xiaomi. The config.js is the same as well. Browser debug without errors. The only error which is new in my log is about the module nerwork scanner.

      By the way: Do I add the window sensors the same way as the Temperature sensor? Which lights are supported?

      empty

      mm error:

      TypeError: Cannot read property 'network' of undefined
          at Class.scanNetworkMAC (/home/pi/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:42:36)
          at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-NetworkScanner/node_helper.js:30:18)
          at Socket. (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:103:11)
          at emitTwo (events.js:106:13)
          at Socket.emit (events.js:194:7)
          at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:514:12
          at _combinedTickCallback (internal/process/next_tick.js:73:7)
          at process._tickCallback (internal/process/next_tick.js:104:9)
      
      

      mm out:

      
      > magicmirror@2.1.3 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.1.3
      Loading config ...
      Loading module helpers ...
      No helper found for module: alert.
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      No helper found for module: currentweather.
      No helper found for module: weatherforecast.
      Initializing new module helper ...
      Module helper loaded: MMM-Remote-Control
      Initializing new module helper ...
      Module helper loaded: MMM-DWD-WarnWeather
      Initializing new module helper ...
      Module helper loaded: MMM-PNews
      Initializing new module helper ...
      Module helper loaded: newsfeed
      Initializing new module helper ...
      Module helper loaded: internet-monitor
      Initializing new module helper ...
      Module helper loaded: MMM-MovieListings
      Initializing new module helper ...
      Module helper loaded: MMM-Fuel
      Initializing new module helper ...
      Module helper loaded: MMM-NetworkScanner
      Initializing new module helper ...
      Module helper loaded: MMM-nasaastropic
      Initializing new module helper ...
      Module helper loaded: MMM-SystemStats
      No helper found for module: MMM-Carousel.
      Initializing new module helper ...
      Module helper loaded: MMM-Events
      Initializing new module helper ...
      Module helper loaded: MMM-xiaomi
      All module helpers loaded.
      Starting server on port 8080 ... 
      You're using a full whitelist configuration to allow for all IPs
      Server started ...
      Connecting socket for: calendar
      Starting node helper for: calendar
      Connecting socket for: MMM-Remote-Control
      Starting node helper for: MMM-Remote-Control
      Connecting socket for: MMM-DWD-WarnWeather
      MMM-DWD-WarnWeather helper started...
      Connecting socket for: MMM-PNews
      Starting module: MMM-PNews
      Connecting socket for: newsfeed
      Starting module: newsfeed
      Connecting socket for: internet-monitor
      internet-monitor helper started ...
      Connecting socket for: MMM-MovieListings
      MMM-MovieListing helper started...
      Connecting socket for: MMM-Fuel
      Starting module helper: MMM-Fuel
      Connecting socket for: MMM-NetworkScanner
      Starting module: MMM-NetworkScanner
      Connecting socket for: MMM-nasaastropic
      Starting node helper: MMM-nasaastropic
      Connecting socket for: MMM-SystemStats
      Connecting socket for: MMM-Events
      Starting node_helper for: MMM-Events
      Connecting socket for: MMM-xiaomi
      Starting xiaomi helper
      Sockets connected & modules started ...
      Launching application.
      MMM-NetworkScanner received SCAN_NETWORK
      MMM-NetworkScanner is performing arp-scan
      Whoops! There was an uncaught exception...
      MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/basic.ics - Interval: 300000
      Create new news fetcher for url: http://www.haz.de/rss/feed/haz_schlagzeilen - Interval: 300000
      Create new news fetcher for url: http://www.spiegel.de/schlagzeilen/index.rss - Interval: 300000
      starting internet monitor node helper
      MMM-NetworkScanner received CONFIG
      astro helper: config received
      retrieveAndUpdate()
      Sat Nov 18 2017 10:10:53 GMT+0100 (CET): Triggering Xiaomi Gateway connect
      NASA Astro Pic of the Day URL: https://apod.nasa.gov/apod/image/1711/20171117dawnTezel1200c.jpg
      Found device with ID 158d000119fcb2 of type magnet
      Found device with ID 158d00015aa973 of type controller
      Found device with ID 158d00015736a8 of type sensor
      
      
      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Haven’t seen, that the Aqara sensor has pressure as well! They both has been on sale last week for less than 6€ on GB.
      I have taken the Xiaomi…

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Its working for me. No errors in the logs or the brower debug. Well done & thank you for your work!
      I can test it whit only one sensor so far. Waiting for the others.

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      I have the Xiaomi. I don’t think there is a difference apart from the design:
      Xiaomi vs Aqara door/window sensors

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      This looks great! As far as I understand there is for every room a thermometer & humidity with trent, light indicator (Yeelight?) and Windows sensors? Pretty nice!

      Are you going to release this as a new module, or as a change of the old one? I would prefer a new module, because this one takes a lot of space and is hardly to integrate in a single screen. I

      But I really think they will shut this down soon, guess they (gearbest) are not paying any taxes at all…
      

      I think the same. It already took more time to receive and it’s getting less products you can order with „Standard Shipping > Germany Express“

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Most of my Chinese stuff I get from gearbest.com If you choose „Standard Shipping > Germany Express“ you won’t get any problems. Watch out for mi smart home bundles on there website.

      posted in Utilities
      A
      Albert2002
    • RE: Browser access in LAN not working

      I’ve tried

      address: "Localhost",
      

      already without luck, but

      address: "0.0.0.0",
      

      is working for me!

      You made my day! Thank you!

      posted in Troubleshooting
      A
      Albert2002
    • Browser access in LAN not working

      Hi there,

      I was running MM in an older Version, somewhere from June and it was fine. I Tried to update with “git pull” but got errors, So out of performance reason I decided to do a fresh installation of MM. I renamed the old MM directory and installed the latest v2.1.3.
      I’ve installed all my old modules and used my old config as well. Everything was working fine except MMM-Remote-Control.
      I figured out that I don’t have access to MM via my Browser as well e.g http://RaspberryIP:8080. When I try so I get a “access denied” error in my Browser ( Firefox, Opera, Vivaldi) Even when am via VNC connected to the Rapberry starting a Browser there. Only localhost:8080 is working.

      I don’t get any errors in mm-error log.

      I already installed a second MM with 2.1.3 on a different Pi but still the same problem. No access to MM via my Browser. Any idea what to do?

      mm- out:

      > magicmirror@2.1.3 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.1.3
      Loading config ...
      Loading module helpers ...
      No helper found for module: alert.
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      No helper found for module: currentweather.
      No helper found for module: weatherforecast.
      Initializing new module helper ...
      Module helper loaded: MMM-Remote-Control
      Initializing new module helper ...
      Module helper loaded: MMM-DWD-WarnWeather
      Initializing new module helper ...
      Module helper loaded: MMM-PNews
      Initializing new module helper ...
      Module helper loaded: newsfeed
      Initializing new module helper ...
      Module helper loaded: internet-monitor
      Initializing new module helper ...
      Module helper loaded: MMM-MovieListings
      Initializing new module helper ...
      Module helper loaded: MMM-Fuel
      Initializing new module helper ...
      Module helper loaded: MMM-NetworkScanner
      Initializing new module helper ...
      Module helper loaded: MMM-nasaastropic
      Initializing new module helper ...
      Module helper loaded: MMM-SystemStats
      No helper found for module: MMM-Carousel.
      Initializing new module helper ...
      Module helper loaded: MMM-Events
      Initializing new module helper ...
      Module helper loaded: MMM-xiaomi
      All module helpers loaded.
      Starting server on port 8080 ... 
      You're using a full whitelist configuration to allow for all IPs
      Server started ...
      Connecting socket for: calendar
      Starting node helper for: calendar
      Connecting socket for: MMM-Remote-Control
      Starting node helper for: MMM-Remote-Control
      Connecting socket for: MMM-DWD-WarnWeather
      MMM-DWD-WarnWeather helper started...
      Connecting socket for: MMM-PNews
      Starting module: MMM-PNews
      Connecting socket for: newsfeed
      Starting module: newsfeed
      Connecting socket for: internet-monitor
      internet-monitor helper started ...
      Connecting socket for: MMM-MovieListings
      MMM-MovieListing helper started...
      Connecting socket for: MMM-Fuel
      Starting module helper: MMM-Fuel
      Connecting socket for: MMM-NetworkScanner
      Starting module: MMM-NetworkScanner
      Connecting socket for: MMM-nasaastropic
      Starting node helper: MMM-nasaastropic
      Connecting socket for: MMM-SystemStats
      Connecting socket for: MMM-Events
      Starting node_helper for: MMM-Events
      Connecting socket for: MMM-xiaomi
      Starting xiaomi helper
      Sockets connected & modules started ...
      Launching application.
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/htc.one.m2304%40gmail.com/private-14fa662585128c24fef964b020903be5/basic.ics - Interval: 300000
      Create new news fetcher for url: http://www.haz.de/rss/feed/haz_schlagzeilen - Interval: 300000
      Create new news fetcher for url: http://www.spiegel.de/schlagzeilen/index.rss - Interval: 300000
      starting internet monitor node helper
      MMM-NetworkScanner received CONFIG
      astro helper: config received
      retrieveAndUpdate()
      Triggering Xiaomi Gateway upate
      NASA Astro Pic of the Day URL: https://apod.nasa.gov/apod/image/1711/Jet67P_Rosetta_960.jpg
      Found device with ID 158d000119fcb2 of type magnet
      Found device with ID 158d00013e28ee of type power-plug
      Found device with ID 158d00015aa973 of type controller
      Found device with ID 158d00015736a8 of type sensor
      

      My config ( I have removed all the config entrys from modules to keep it more clearly here) :

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       */
      
      var config = {
      	port: 8080,
      	ipWhitelist: [],
      	language: 'de',
      	timeFormat: 24,
      	units: 'metric',
      	modules: [
      		{
      			module: 'alert',
      		},
      		{
      			module: 'clock',
      			position: 'top_left'
      		},
      		{
      			module: 'calendar',
      		},
      		{
      			module: 'currentweather',
      		},
      		{
      			module: 'weatherforecast',
      		},
      		{
      			module: 'MMM-Remote-Control',
      			// uncomment the following line to show the URL of the remote control on the mirror
      			//position: 'bottom_left'
      			// you can hide this module afterwards from the remote control itself
      		},
      		{
      			module: 'MMM-DWD-WarnWeather',
      		},
      		{
      			module: 'MMM-PNews',
      		},	
      		{
      			module: 'newsfeed',
      		},
      		{
      			module: 'internet-monitor',
      		},
      		{
      			module: 'MMM-MovieListings',
      		},
      		{
      			module:	'MMM-Fuel',
      		},
      		{
      			module: 'MMM-NetworkScanner',
      		},
      		{
      			module: 'MMM-nasaastropic',
      		},
      		{
      			module: 'MMM-SystemStats',
      		},
      		{
      			module: 'MMM-Carousel',
      		},
      		{
      			module: 'MMM-Events',
      		},
      		{
      		module: 'MMM-xiaomi',
      		},
      
      	]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== 'undefined') {module.exports = config;}
      
      

      Browserdebug on the localhost:8080

      main.js:404 Initializing MagicMirror.
      translator.js:197 Loading core translation file: translations/de.json
      translator.js:219 Loading core translation fallback file: translations/en.json
      loader.js:182 Load script: modules/MMM-Remote-Control//MMM-Remote-Control.js
      module.js:406 Check MagicMirror version for module 'MMM-Remote-Control' - Minimum version:  2.1.0 - Current version: 2.1.3
      module.js:408 Version is ok!
      module.js:414 Module registered: MMM-Remote-Control
      loader.js:152 Bootstrapping module: MMM-Remote-Control
      loader.js:157 Scripts loaded for: MMM-Remote-Control
      loader.js:197 Load stylesheet: modules/MMM-Remote-Control/remote-control.css
      loader.js:159 Styles loaded for: MMM-Remote-Control
      loader.js:161 Translations loaded for: MMM-Remote-Control
      loader.js:197 Load stylesheet: css/custom.css
      MMM-Remote-Control.js:21 Starting module: MMM-Remote-Control
      main.js:422 All modules started!
      
      posted in Troubleshooting
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Looking forward to see the window sensors! I would like to see the current state & the last change of it. Are you planing something like this?

      Name     State     Last change 
      Kitchen  closed   1.Nov. 18:01
      

      What I would like to see on my mirror as well are the sate of the Yeelights ( on / off)

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Sometimes a pictures tells you more than words…

      You did it!

      You did it! Great job! Thank you! :-)

      Next step are to integrate te Yeelights ;-)

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      I did so. Restarted MM.
      No errors in the logs.

      mm out:

      Triggering Xiaomi Gateway upate
      Found device with ID 158d000119fcb2 of type magnet
      Found device with ID 158d00015aa973 of type controller
      Found device with ID 158d00015736a8 of type sensor
      

      This I got from the Browser Debug:

      main.js:404 Initializing MagicMirror.
      translator.js:197 Loading core translation file: translations/de.json
      translator.js:219 Loading core translation fallback file: translations/en.json
      loader.js:182 Load script: modules/MMM-xiaomi//MMM-xiaomi.js
      module.js:406 Check MagicMirror version for module 'MMM-xiaomi' - Minimum version:  2.0.0 - Current version: 2.1.3
      module.js:408 Version is ok!
      module.js:414 Module registered: MMM-xiaomi
      loader.js:152 Bootstrapping module: MMM-xiaomi
      loader.js:182 Load script: modules/MMM-xiaomi/String.format.js
      String.format.js Failed to load resource: the server responded with a status of 404 (Not Found)
      loader.js:190 Error on loading script: modules/MMM-xiaomi/String.format.js
      script.onerror @ loader.js:190
      loader.js:182 Load script: https://code.jquery.com/jquery-2.2.3.min.js
      loader.js:157 Scripts loaded for: MMM-xiaomi
      loader.js:197 Load stylesheet: modules/MMM-xiaomi/MMM-xiaomi.css
      loader.js:159 Styles loaded for: MMM-xiaomi
      loader.js:161 Translations loaded for: MMM-xiaomi
      loader.js:197 Load stylesheet: css/custom.css
      MMM-xiaomi.js:35 Starting module: MMM-xiaomi
      main.js:422 All modules started!
      module.js:117 MMM-xiaomi received a system notification: ALL_MODULES_STARTED
      module.js:117 MMM-xiaomi received a system notification: DOM_OBJECTS_CREATED
      MMM-xiaomi.js:28 received XIAOMI_DATA
      MMM-xiaomi.js:242 Uncaught TypeError: this.html.col.format is not a function
          at Class. (MMM-xiaomi.js:242)
          at Function.each (jquery-2.2.3.min.js:2)
          at Class.renderText (MMM-xiaomi.js:210)
          at Class.render (MMM-xiaomi.js:100)
          at Class.socketNotificationReceived (MMM-xiaomi.js:29)
          at module.js:183
          at r. (socketclient.js:25)
          at r.emit (index.js:133)
          at r.onevent (socket.js:270)
          at r.MMSocket.self.socket.onevent (socketclient.js:19)
      
      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      One more. When I run the MM as standalone server (node serveronly) I get this in the Browser console:

      MMM-xiaomi.js:28 received XIAOMI_DATA
      MMM-xiaomi.js:212 Uncaught TypeError: Cannot read property 'id' of null
          at Class. (MMM-xiaomi.js:212)
          at Function.each (jquery-2.2.3.min.js:2)
          at Class.renderText (MMM-xiaomi.js:210)
          at Class.render (MMM-xiaomi.js:100)
          at Class.socketNotificationReceived (MMM-xiaomi.js:29)
          at module.js:183
          at r. (socketclient.js:25)
          at r.emit (index.js:133)
          at r.onevent (socket.js:270)
          at r.MMSocket.self.socket.onevent (socketclient.js:19)
      (anonymous) @ MMM-xiaomi.js:212
      each @ jquery-2.2.3.min.js:2
      renderText @ MMM-xiaomi.js:210
      render @ MMM-xiaomi.js:100
      socketNotificationReceived @ MMM-xiaomi.js:29
      (anonymous) @ module.js:183
      (anonymous) @ socketclient.js:25
      r.emit @ index.js:133
      r.onevent @ socket.js:270
      MMSocket.self.socket.onevent @ socketclient.js:19
      r.onpacket @ socket.js:228
      (anonymous) @ index.js:21
      r.emit @ index.js:133
      r.ondecoded @ manager.js:345
      (anonymous) @ index.js:21
      r.emit @ index.js:133
      s.add @ index.js:241
      r.ondata @ manager.js:335
      (anonymous) @ index.js:21
      r.emit @ index.js:133
      r.onPacket @ socket.js:457
      (anonymous) @ socket.js:274
      r.emit @ index.js:133
      r.onPacket @ transport.js:145
      r.onData @ transport.js:137
      ws.onmessage @ websocket.js:147
      
      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Hi Mirko! Thanks for your reply!

      Before and after I uncommented the line 51 and restartet MM.
      Still with the old Token

      pi@MagicMirror:~ $ miio --discover --sync
       INFO  Discovering devices. Press Ctrl+C to stop.
      
      Device ID: 52238776
      Model info: Unknown 
      Address: 192.168.2.107 
      Token: 6eea5ac1eb475bfedbfff98aab7c2bc7 via stored token
      Support: Unknown
      
      (node:25652) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Call to device timed out
      
      

      But right now after uncommenting the line the error log is different. In the log i can already see the Temperature and humidity (_properties: { temperature: 19.51, humidity: 62.44 },)!! The next step!

      
      > magicmirror@2.1.3 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.1.3
      Loading config ...
      Loading module helpers ...
      No helper found for module: alert.
      No helper found for module: clock.
      Initializing new module helper ...
      Module helper loaded: calendar
      No helper found for module: currentweather.
      No helper found for module: weatherforecast.
      Initializing new module helper ...
      Module helper loaded: MMM-DWD-WarnWeather
      Initializing new module helper ...
      Module helper loaded: MMM-PNews
      Initializing new module helper ...
      Module helper loaded: newsfeed
      Initializing new module helper ...
      Module helper loaded: MMM-Remote-Control
      No helper found for module: MMM-Remote-Control-Repository.
      Initializing new module helper ...
      Module helper loaded: internet-monitor
      Initializing new module helper ...
      Module helper loaded: MMM-MovieListings
      Initializing new module helper ...
      Module helper loaded: MMM-Fuel
      Initializing new module helper ...
      Module helper loaded: MMM-NetworkScanner
      Initializing new module helper ...
      Module helper loaded: MMM-nasaastropic
      Initializing new module helper ...
      Module helper loaded: MMM-SystemStats
      Initializing new module helper ...
      Module helper loaded: MMM-Departures
      No helper found for module: MMM-Carousel.
      Initializing new module helper ...
      Module helper loaded: MMM-Events
      Initializing new module helper ...
      Module helper loaded: MMM-xiaomi
      All module helpers loaded.
      Starting server on port 8080 ... 
      You're using a full whitelist configuration to allow for all IPs
      Server started ...
      Connecting socket for: calendar
      Starting node helper for: calendar
      Connecting socket for: MMM-DWD-WarnWeather
      MMM-DWD-WarnWeather helper started...
      Connecting socket for: MMM-PNews
      Starting module: MMM-PNews
      Connecting socket for: newsfeed
      Starting module: newsfeed
      Connecting socket for: MMM-Remote-Control
      Starting node helper for: MMM-Remote-Control
      Connecting socket for: internet-monitor
      internet-monitor helper started ...
      Connecting socket for: MMM-MovieListings
      MMM-MovieListing helper started...
      Connecting socket for: MMM-Fuel
      Starting module helper: MMM-Fuel
      Connecting socket for: MMM-NetworkScanner
      Starting module: MMM-NetworkScanner
      Connecting socket for: MMM-nasaastropic
      Starting node helper: MMM-nasaastropic
      Connecting socket for: MMM-SystemStats
      Connecting socket for: MMM-Departures
      Connecting socket for: MMM-Events
      Starting node_helper for: MMM-Events
      Connecting socket for: MMM-xiaomi
      Starting xiaomi helper
      Sockets connected & modules started ...
      Launching application.
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/htc.one.m2304%40gmail.com/private-;-)/basic.ics - Interval: 300000
      Create new news fetcher for url: http://www.haz.de/rss/feed/haz_schlagzeilen - Interval: 300000
      Create new news fetcher for url: http://www.spiegel.de/schlagzeilen/index.rss - Interval: 300000
      starting internet monitor node helper
      MMM-NetworkScanner received CONFIG
      astro helper: config received
      retrieveAndUpdate()
      Triggering Xiaomi Gateway upate
      MMM-Departures error: Error: getaddrinfo ENOTFOUND transportrest-sbiermann.rhcloud.com transportrest-sbiermann.rhcloud.com:80
      NASA Astro Pic of the Day URL: https://apod.nasa.gov/apod/image/1711/m5_hubblesmessier1024c.jpg
      Magnet {
        domain: null,
        _events: {},
        _eventsCount: 0,
        _maxListeners: undefined,
        model: 'lumi.magnet',
        id: '158d000119fcb2',
        type: 'magnet',
        capabilities: [],
        _properties: {},
        _propertiesToMonitor: [],
        _propertyDefinitions: {},
        _parent: 
         Gateway {
           domain: null,
           _events: {},
           _eventsCount: 0,
           _maxListeners: undefined,
           id: undefined,
           type: 'gateway',
           model: 'lumi.gateway.v3',
           capabilities: [ 'color:rgb', 'brightness', 'sensor', 'illuminance' ],
           address: '192.168.2.107',
           port: 54321,
           writeOnly: false,
           packet: 
            Packet {
              header: ,
              _serverStampTime: 1509842296639,
              _token: ,
              _tokenKey: ,
              _tokenIV: ,
              data: ,
              _serverStamp: 48587 },
           socket: 
            Socket {
              domain: null,
              _events: [Object],
              _eventsCount: 1,
              _maxListeners: undefined,
              _handle: [Object],
              _receiving: true,
              _bindState: 2,
              type: 'udp4',
              fd: -42,
              _reuseAddr: undefined,
              _queue: undefined },
           _id: 4,
           _promises: {},
           _hasFailedToken: false,
           _properties: { illuminance: 307, rgb: [Object], brightness: 0 },
           _propertiesToMonitor: [ 'illumination', 'rgb' ],
           _propertyDefinitions: { illumination: [Object], rgb: [Object] },
           _reversePropertyDefinitions: { illuminance: 'illumination' },
           _loadProperties: [Function: bound _loadProperties],
           management: DeviceManagement { device: [Circular] },
           debug: 
            { [Function: debug]
              namespace: 'miio.device.[192.168.2.107]',
              enabled: false,
              useColors: false,
              color: 1,
              inspectOpts: {} },
           _devices: 
            { '158d000119fcb2': [Object],
              '158d00013e28ee': [Object],
              '158d00015aa973': [Object],
              '158d00015736a8': [Object] },
           _monitorInterval: 60000,
           _propertyMonitor: 
            Timeout {
              _called: false,
              _idleTimeout: 60000,
              _idlePrev: [Object],
              _idleNext: [Object],
              _idleStart: 69767,
              _onTimeout: [Function: bound _loadProperties],
              _timerArgs: undefined,
              _repeat: 60000 },
           _lastToken: 1509842294044,
           _developerKey: 'xqbs1fvtsq6x4oby',
           devApi: 
            DeveloperApi {
              domain: null,
              _events: [Object],
              _eventsCount: 2,
              _maxListeners: undefined,
              address: '192.168.2.107',
              debug: [Object],
              socket: [Object],
              devices: [],
              ready: false },
           setRGB: [Function],
           setBrightness: [Function],
           _deviceListTimer: 
            Timeout {
              _called: false,
              _idleTimeout: 1800000,
              _idlePrev: [Object],
              _idleNext: [Object],
              _idleStart: 72417,
              _onTimeout: [Function: bound _updateDeviceList],
              _timerArgs: undefined,
              _repeat: 1800000 } },
        management: SubDeviceManagement { _device: [Circular] },
        debug: 
         { [Function: debug]
           namespace: 'miio.device.[192.168.2.107].158d000119fcb2',
           enabled: false,
           useColors: false,
           color: 1,
           inspectOpts: {} } }
      Switch {
        domain: null,
        _events: {},
        _eventsCount: 0,
        _maxListeners: undefined,
        model: 'lumi.switch',
        id: '158d00015aa973',
        type: 'controller',
        capabilities: [],
        _properties: {},
        _propertiesToMonitor: [],
        _propertyDefinitions: {},
        _parent: 
         Gateway {
           domain: null,
           _events: {},
           _eventsCount: 0,
           _maxListeners: undefined,
           id: undefined,
           type: 'gateway',
           model: 'lumi.gateway.v3',
           capabilities: [ 'color:rgb', 'brightness', 'sensor', 'illuminance' ],
           address: '192.168.2.107',
           port: 54321,
           writeOnly: false,
           packet: 
            Packet {
              header: ,
              _serverStampTime: 1509842296639,
              _token: ,
              _tokenKey: ,
              _tokenIV: ,
              data: ,
              _serverStamp: 48587 },
           socket: 
            Socket {
              domain: null,
              _events: [Object],
              _eventsCount: 1,
              _maxListeners: undefined,
              _handle: [Object],
              _receiving: true,
              _bindState: 2,
              type: 'udp4',
              fd: -42,
              _reuseAddr: undefined,
              _queue: undefined },
           _id: 4,
           _promises: {},
           _hasFailedToken: false,
           _properties: { illuminance: 307, rgb: [Object], brightness: 0 },
           _propertiesToMonitor: [ 'illumination', 'rgb' ],
           _propertyDefinitions: { illumination: [Object], rgb: [Object] },
           _reversePropertyDefinitions: { illuminance: 'illumination' },
           _loadProperties: [Function: bound _loadProperties],
           management: DeviceManagement { device: [Circular] },
           debug: 
            { [Function: debug]
              namespace: 'miio.device.[192.168.2.107]',
              enabled: false,
              useColors: false,
              color: 1,
              inspectOpts: {} },
           _devices: 
            { '158d000119fcb2': [Object],
              '158d00013e28ee': [Object],
              '158d00015aa973': [Object],
              '158d00015736a8': [Object] },
           _monitorInterval: 60000,
           _propertyMonitor: 
            Timeout {
              _called: false,
              _idleTimeout: 60000,
              _idlePrev: [Object],
              _idleNext: [Object],
              _idleStart: 69767,
              _onTimeout: [Function: bound _loadProperties],
              _timerArgs: undefined,
              _repeat: 60000 },
           _lastToken: 1509842294044,
           _developerKey: 'xqbs1fvtsq6x4oby',
           devApi: 
            DeveloperApi {
              domain: null,
              _events: [Object],
              _eventsCount: 2,
              _maxListeners: undefined,
              address: '192.168.2.107',
              debug: [Object],
              socket: [Object],
              devices: [],
              ready: false },
           setRGB: [Function],
           setBrightness: [Function],
           _deviceListTimer: 
            Timeout {
              _called: false,
              _idleTimeout: 1800000,
              _idlePrev: [Object],
              _idleNext: [Object],
              _idleStart: 72417,
              _onTimeout: [Function: bound _updateDeviceList],
              _timerArgs: undefined,
              _repeat: 1800000 } },
        management: SubDeviceManagement { _device: [Circular] },
        debug: 
         { [Function: debug]
           namespace: 'miio.device.[192.168.2.107].158d00015aa973',
           enabled: false,
           useColors: false,
           color: 3,
           inspectOpts: {} } }
      SensorHT {
        domain: null,
        _events: {},
        _eventsCount: 0,
        _maxListeners: undefined,
        model: 'lumi.sensor_ht',
        id: '158d00015736a8',
        type: 'sensor',
        capabilities: [ 'sensor', 'temperature', 'humidity' ],
        _properties: { temperature: 19.51, humidity: 62.44 },
        _propertiesToMonitor: [ 'temperature', 'humidity' ],
        _propertyDefinitions: 
         { temperature: { mapper: [Function] },
           humidity: { mapper: [Function] } },
        _parent: 
         Gateway {
           domain: null,
           _events: {},
           _eventsCount: 0,
           _maxListeners: undefined,
           id: undefined,
           type: 'gateway',
           model: 'lumi.gateway.v3',
           capabilities: [ 'color:rgb', 'brightness', 'sensor', 'illuminance' ],
           address: '192.168.2.107',
           port: 54321,
           writeOnly: false,
           packet: 
            Packet {
              header: ,
              _serverStampTime: 1509842296639,
              _token: ,
              _tokenKey: ,
              _tokenIV: ,
              data: ,
              _serverStamp: 48587 },
           socket: 
            Socket {
              domain: null,
              _events: [Object],
              _eventsCount: 1,
              _maxListeners: undefined,
              _handle: [Object],
              _receiving: true,
              _bindState: 2,
              type: 'udp4',
              fd: -42,
              _reuseAddr: undefined,
              _queue: undefined },
           _id: 4,
           _promises: {},
           _hasFailedToken: false,
           _properties: { illuminance: 307, rgb: [Object], brightness: 0 },
           _propertiesToMonitor: [ 'illumination', 'rgb' ],
           _propertyDefinitions: { illumination: [Object], rgb: [Object] },
           _reversePropertyDefinitions: { illuminance: 'illumination' },
           _loadProperties: [Function: bound _loadProperties],
           management: DeviceManagement { device: [Circular] },
           debug: 
            { [Function: debug]
              namespace: 'miio.device.[192.168.2.107]',
              enabled: false,
              useColors: false,
              color: 1,
              inspectOpts: {} },
           _devices: 
            { '158d000119fcb2': [Object],
              '158d00013e28ee': [Object],
              '158d00015aa973': [Object],
              '158d00015736a8': [Object] },
           _monitorInterval: 60000,
           _propertyMonitor: 
            Timeout {
              _called: false,
              _idleTimeout: 60000,
              _idlePrev: [Object],
              _idleNext: [Object],
              _idleStart: 69767,
              _onTimeout: [Function: bound _loadProperties],
              _timerArgs: undefined,
              _repeat: 60000 },
           _lastToken: 1509842294044,
           _developerKey: 'xqbs1fvtsq6x4oby',
           devApi: 
            DeveloperApi {
              domain: null,
              _events: [Object],
              _eventsCount: 2,
              _maxListeners: undefined,
              address: '192.168.2.107',
              debug: [Object],
              socket: [Object],
              devices: [],
              ready: false },
           setRGB: [Function],
           setBrightness: [Function],
           _deviceListTimer: 
            Timeout {
              _called: false,
              _idleTimeout: 1800000,
              _idlePrev: [Object],
              _idleNext: [Object],
              _idleStart: 72417,
              _onTimeout: [Function: bound _updateDeviceList],
              _timerArgs: undefined,
              _repeat: 1800000 } },
        management: SubDeviceManagement { _device: [Circular] },
        debug: 
         { [Function: debug]
           namespace: 'miio.device.[192.168.2.107].158d00015736a8',
           enabled: false,
           useColors: false,
           color: 6,
           inspectOpts: {} } }
      
      
      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Where did miio stored the Token?
      The Token Miio used “Token: 6eea5ac1eb475bfedbfff98aab7c2bc7 via stored token”
      is the old one! the new one is 050591e66a82f7adc92bfa6b03058cdb

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      I did the steps again to get the (new) Token. Now, I have a new Token and the Gateway again in my Mi Home app. I didn’t updated the Token on the different machine this time.

      I’ve tried out your new config. I still don’t see more than before on the MM, but I don’t have an error log as well, which make it a bit more harder.

      I have checked the IP address of the Gateway, its still the same. Dev is still enabled.

      My config with the new Token.

      		{
      		module: 'MMM-xiaomi',
      		position: 'bottom_left',
      		header: 'Temperatur / Feuchtigkeit',  // This is optional
      		config: {
      			interval: 30,
      			gatewayIP: '192.168.2.107',
      			gatewayToken: '050591e66a82f7adc92bfa6b03058cdb',
      			devices: [{ id: '158d00015736a8', name: 'Wohnzimmer' }]
      			// See 'Configuration options' for more information.
      				}
      		},
      

      Edit:

      I get a error when I try to discover with miio:

      pi@MagicMirror:~/MagicMirror/modules/MMM-xiaomi/node_modules/miio $ miio --discover
       INFO  Discovering devices. Press Ctrl+C to stop.
      
      Device ID: 52238776
      Model info: Unknown 
      Address: 192.168.2.107 
      Token: 6eea5ac1eb475bfedbfff98aab7c2bc7 via stored token
      Support: Unknown
      
      (node:3626) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Call to device timed out
      
      
      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      I am a step ahead!

      I followed the instructions to get the token “Getting the token when using the Mi Home app”
      This was working. I could see all the connected devices to the Gateway.

      pi@raspberrypi:~/MagicMirror/modules/MMM-xiaomi $ miio --discover --sync
       INFO  Discovering devices. Press Ctrl+C to stop.
      
      Device ID: 52238776
      Model info: Unknown 
      Address: 192.168.13.1 
      Token: 6eea5ac1eb475bfedbfff98aab7c2bc7 via auto-token
      Support: Unknown
      
      Device ID: 158d000119fcb2
      Model info: lumi.magnet (magnet)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      
      Device ID: 158d00013e28ee
      Model info: lumi.plug (power-plug)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      
      Device ID: 158d00015aa973
      Model info: lumi.switch (controller)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      
      Device ID: 158d00015736a8
      Model info: lumi.sensor_ht (sensor)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      

      At this point I had to switch over to the Pi with the installed MagicMirror:

      pi@MagicMirror:~ $ miio --discover
       INFO  Discovering devices. Press Ctrl+C to stop.
      
      Device ID: 52238776
      Model info: Unknown 
      Address: 192.168.2.107 
      Token: ???
      Support: Unknown
      

      I’ve updated the Token as described:

      pi@MagicMirror:~ $ miio --update 52238776 --token 6eea5ac1eb475bfedbfff98aab7c2bc7
       INFO  Attempting to update 52238776
       INFO  Device updated
      

      I’ve searched for devices again. Now with success!

      
      pi@MagicMirror:~ $ miio --discover
      
       INFO  Discovering devices. Press Ctrl+C to stop.
      
      Device ID: 52238776
      Model info: Unknown 
      Address: 192.168.2.107 
      Token: 6eea5ac1eb475bfedbfff98aab7c2bc7 via stored token
      Support: Unknown
      
      Device ID: 158d000119fcb2
      Model info: lumi.magnet (magnet)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      
      Device ID: 158d00013e28ee
      Model info: lumi.plug (power-plug)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      
      Device ID: 158d00015aa973
      Model info: lumi.switch (controller)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      
      Device ID: 158d00015736a8
      Model info: lumi.sensor_ht (sensor)
      Address: Owned by 52238776
      Token: Automatic via parent device
      Support: At least basic
      
      

      The problem so far is, that I still don’t get any informations visible in MM. I’ve tried ‘158d00015736a8’ and as well ‘52238776’ as id.
      The second problem is, that I’ve lost the Gateway in my Mi Home app after updating the Token!

      The question is, how to copy ( Store?) over the Token to a different Machine?

      mm error:

      error: Token could not be auto-discovered
          at Device._tokenResolve (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modules/miio/lib/device.js:141:13)
          at Device._onMessage (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modules/miio/lib/device.js:80:9)
          at emitTwo (events.js:106:13)
          at Socket.emit (events.js:194:7)
          at UDP.onMessage [as onmessage] (dgram.js:545:8)
      
      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Maybe you can get it tomorrow? Would be great to figure out.

      Something crossed my mind. When I set up the Developer mode in the Gateway there is a password too. I know that I need this one for OpenHAB. Maybe I need it for this module as well?

      posted in Utilities
      A
      Albert2002
    • RE: MMM-xiaomi - Temperature and Humidity from your smarthome

      Hi Mirko,

      thank you for your work! I really appreciate this!

      I’ve updated the module and installed the miio command line tools (with sudo)in the same directory. Or do I Have to install the miio command line tools in a different directory?
      How ever, when am running miio command line tools i get

      pi@raspberrypi:~/MagicMirror/modules/MMM-xiaomi $ miio --discover
       INFO  Discovering devices. Press Ctrl+C to stop.
      
      Device ID: 52238776
      Model info: Unknown 
      Address: 192.168.2.107 
      Token: ???
      Support: Unknown
      
      

      My id I’ve discovered seams to be a different style then the one in your example.
      After this I added the device id to my config:

      devices: [{ id: '52238776', name: 'Wohnzimmer' }]
      
      

      I still see the same as before.

      mm error:

      Error: Token could not be auto-discovered
          at Device._tokenResolve (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modules/miio/lib/device.js:141:13)
          at Device._onMessage (/home/pi/MagicMirror/modules/MMM-xiaomi/node_modules/miio/lib/device.js:80:9)
          at emitTwo (events.js:106:13)
          at Socket.emit (events.js:194:7)
          at UDP.onMessage [as onmessage] (dgram.js:545:8)
      

      mm-out:

      
      > magicmirror@2.1.3 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.1.3
      Loading config ...
      Loading module helpers ...
      Initializing new module helper ...
      Module helper loaded: MMM-xiaomi
      All module helpers loaded.
      Starting server on port 8080 ... 
      You're using a full whitelist configuration to allow for all IPs
      Server started ...
      Connecting socket for: MMM-xiaomi
      Starting xiaomi helper
      Sockets connected & modules started ...
      Launching application.
      Triggering Xiaomi Gateway upate
      Triggering Xiaomi Gateway upate
      
      

      MagicMirror error:

      { Error: listen EADDRINUSE 127.0.0.1:8080
          at Object.exports._errnoException (util.js:1050:11)
          at exports._exceptionWithHostPort (util.js:1073:20)
          at Server.setupListenHandle [as _listen2] (net.js:1263:14)
          at listenInCluster (net.js:1304:12)
          at doListen (net.js:1428:7)
          at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16)
          at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:10)
        code: 'EADDRINUSE',
        errno: 'EADDRINUSE',
        syscall: 'listen',
        address: '127.0.0.1',
        port: 8080 }
      

      MagicMirror out:

      
      > magicmirror@2.1.3 start /home/pi/MagicMirror
      > sh run-start.sh
      
      Starting MagicMirror: v2.1.3
      Loading config ...
      Loading module helpers ...
      Initializing new module helper ...
      Module helper loaded: MMM-xiaomi
      All module helpers loaded.
      Starting server on port 8080 ... 
      You're using a full whitelist configuration to allow for all IPs
      Server started ...
      Connecting socket for: MMM-xiaomi
      Starting xiaomi helper
      Sockets connected & modules started ...
      Whoops! There was an uncaught exception...
      MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      Launching application.
      
      posted in Utilities
      A
      Albert2002
    • 1
    • 2
    • 3
    • 2 / 3