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-NokiaHealth (Withings)

    Scheduled Pinned Locked Moved Health
    26 Posts 7 Posters 17.6k Views 10 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.
    • strawberry 3.141S Offline
      strawberry 3.141 Project Sponsor Module Developer @zdenek
      last edited by

      @zdenek did you run npm install in the directory of this module? The readme doesn’t say so, but it is required as the module makes use of some dependencies. For further help it would be great if you can post the logs with the errors.

      Please create a github issue if you need help, so I can keep track

      1 Reply Last reply Reply Quote 0
      • zdenekZ Offline
        zdenek
        last edited by

        yes, I did

        Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
            at moduleNeedsUpdate (main.js:134)
            at updateDom (main.js:104)
            at Object.updateDom (main.js:468)
            at Class.updateDom (module.js:295)
            at Object.$.getJSON [as success] (MMM-Hue.js:155)
            at fire (jquery.js:1037)
            at Object.fireWith [as resolveWith] (jquery.js:1148)
            at done (jquery.js:8074)
            at XMLHttpRequest.callback (jquery.js:8598)
        main.js:134 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
            at moduleNeedsUpdate (main.js:134)
            at updateDom (main.js:104)
            at Object.updateDom (main.js:468)
            at Class.updateDom (module.js:295)
            at Class.socketNotificationReceived (MMM-SystemStats.js:68)
            at module.js:183
            at n. (socketclient.js:25)
            at n.emit (universalModuleDefinition:2)
            at n.onevent (universalModuleDefinition:3)
            at n.MMSocket.self.socket.onevent (socketclient.js:19)
        main.js:134 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
            at moduleNeedsUpdate (main.js:134)
            at updateDom (main.js:104)
            at Object.updateDom (main.js:468)
            at Class.updateDom (module.js:295)
            at Class.socketNotificationReceived (MMM-SystemStats.js:68)
            at module.js:183
            at n. (socketclient.js:25)
            at n.emit (universalModuleDefinition:2)
            at n.onevent (universalModuleDefinition:3)
            at n.MMSocket.self.socket.onevent (socketclient.js:19)
        main.js:134 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
            at moduleNeedsUpdate (main.js:134)
            at updateDom (main.js:104)
            at Object.updateDom (main.js:468)
            at Class.updateDom (module.js:295)
            at Class.socketNotificationReceived (MMM-synology-ds.js:93)
            at module.js:183
            at n. (socketclient.js:25)
            at n.emit (universalModuleDefinition:2)
            at n.onevent (universalModuleDefinition:3)
            at n.MMSocket.self.socket.onevent (socketclient.js:19)
        main.js:134 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
            at moduleNeedsUpdate (main.js:134)
            at updateDom (main.js:104)
            at Object.updateDom (main.js:468)
            at Class.updateDom (module.js:295)
            at Object.$.getJSON [as success] (MMM-Hue.js:155)
            at fire (jquery.js:1037)
            at Object.fireWith [as resolveWith] (jquery.js:1148)
            at done (jquery.js:8074)
            at XMLHttpRequest.callback (jquery.js:8598)
        moduleNeedsUpdate @ main.js:134
        updateDom @ main.js:104
        updateDom @ main.js:468
        updateDom @ module.js:295
        $.getJSON @ MMM-Hue.js:155
        fire @ jquery.js:1037
        fireWith @ jquery.js:1148
        done @ jquery.js:8074
        callback @ jquery.js:8598
        XMLHttpRequest.send (async)
        send @ jquery.js:8526
        ajax @ jquery.js:7978
        jQuery.(anonymous function) @ jquery.js:7614
        getJSON @ jquery.js:8108
        getData @ MMM-Hue.js:153
        setInterval @ MMM-Hue.js:52
        main.js:134 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
            at moduleNeedsUpdate (main.js:134)
            at updateDom (main.js:104)
            at Object.updateDom (main.js:468)
            at Class.updateDom (module.js:295)
            at Class.socketNotificationReceived (MMM-SystemStats.js:68)
            at module.js:183
            at n. (socketclient.js:25)
            at n.emit (universalModuleDefinition:2)
            at n.onevent (universalModuleDefinition:3)
            at n.MMSocket.self.socket.onevent (socketclient.js:19)
        moduleNeedsUpdate @ main.js:134
        updateDom @ main.js:104
        updateDom @ main.js:468
        updateDom @ module.js:295
        socketNotificationReceived @ MMM-SystemStats.js:68
        (anonymous) @ module.js:183
        (anonymous) @ socketclient.js:25
        n.emit @ universalModuleDefinition:2
        n.onevent @ universalModuleDefinition:3
        MMSocket.self.socket.onevent @ socketclient.js:19
        n.onpacket @ universalModuleDefinition:3
        (anonymous) @ universalModuleDefinition:3
        n.emit @ universalModuleDefinition:2
        n.ondecoded @ universalModuleDefinition:1
        (anonymous) @ universalModuleDefinition:3
        r.emit @ universalModuleDefinition:1
        s.add @ universalModuleDefinition:1
        n.ondata @ universalModuleDefinition:1
        (anonymous) @ universalModuleDefinition:3
        n.emit @ universalModuleDefinition:2
        n.onPacket @ universalModuleDefinition:2
        (anonymous) @ universalModuleDefinition:2
        n.emit @ universalModuleDefinition:2
        n.onPacket @ universalModuleDefinition:2
        n.onData @ universalModuleDefinition:2
        ws.onmessage @ universalModuleDefinition:3
        main.js:134 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
            at moduleNeedsUpdate (main.js:134)
            at updateDom (main.js:104)
            at Object.updateDom (main.js:468)
            at Class.updateDom (module.js:295)
            at Class.socketNotificationReceived (MMM-synology-ds.js:93)
            at module.js:183
            at n. (socketclient.js:25)
            at n.emit (universalModuleDefinition:2)
            at n.onevent (universalModuleDefinition:3)
            at n.MMSocket.self.socket.onevent (socketclient.js:19)
        

        a lot of these rows

        strawberry 3.141S 1 Reply Last reply Reply Quote 0
        • strawberry 3.141S Offline
          strawberry 3.141 Project Sponsor Module Developer @zdenek
          last edited by

          @zdenek the logs are all related to other modules as far as i can see, that comes probably because they are in your config after mmm-nokiahealth. can you put mmm-nokiahealth at the bottom of your configured modules and try to restart and then post the logs again so we can see the logs related to this module

          Please create a github issue if you need help, so I can keep track

          zdenekZ 1 Reply Last reply Reply Quote 0
          • zdenekZ Offline
            zdenek @strawberry 3.141
            last edited by

            @strawberry-3.141 done, here is the result

            MMM-NokiaHealth received a system notification: ALL_MODULES_STARTED
            main.js:38 
            Uncaught TypeError: Cannot read property 'appendChild' of undefined
                at createDomObjects (main.js:38)
                at Object.modulesStarted (main.js:425)
                at startModules (loader.js:59)
                at loader.js:40
                at HTMLLinkElement.stylesheet.onload (loader.js:203)
            
            strawberry 3.141S 1 Reply Last reply Reply Quote 0
            • strawberry 3.141S Offline
              strawberry 3.141 Project Sponsor Module Developer @zdenek
              last edited by

              @zdenek Pls check the region that you set in your config. I only get this error, when I am using an invalid config position.

              Please create a github issue if you need help, so I can keep track

              zdenekZ 1 Reply Last reply Reply Quote 0
              • zdenekZ Offline
                zdenek @strawberry 3.141
                last edited by

                @strawberry-3.141 You are right, there was typo in Position. Now there is no error, but the module is not visible at all. No Error, but in Source code of page I can see the data, so it means, ID is right, script gets data, just doesn’t display. Could be cause I’ve another iFrame on the screen?

                thanks

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

                  Hi there is it possible to see a screenshot of how the graph looks like on the mirror, Thanks.

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    petero-dk
                    last edited by

                    I am sorry for the really slow response time, I have been totally swamped at work.

                    When it shows on the screen, it is essentially a small iframe in the middle with a graph (I will at some point get a screenshot)

                    However I have realized that the IFTTT integration is waaaaaay to slow, it will check once every 15 minutes, and then I have usually left the mirror. I need to figure out a way to instantly get the information from the scale. I have a few ideas but simply not enough time.

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

                      Hmmmmm i see your predicament sir…

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        petero-dk
                        last edited by

                        I am just airing one idea here:

                        Using the https://github.com/node-pcap/node_pcap I should be able to setup a listener for Withings Scales (by either destination URL or MAC address) once a device is detected show the graph.

                        Please feel free to share your thoughts on that? I do not know if this is too much for the MagicMirror to handle with pcap add-on. Perhaps this should be a separate plugin that can be reused for other device detections.

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

                          had a look at the pcap add-on to be honest i think its going to be heavy for just a listener

                          1 Reply Last reply Reply Quote 0
                          • zdenekZ Offline
                            zdenek
                            last edited by

                            still doesn’t work for me. I’ve tried new Raspberry pi 3, clean install of NOOB, installed MM, updated everything. Installed just few modules (Simple logo and MMM-WunderGround) and Nokia. It connects to server, get the data, but just not to create the graph. as you can see, alt text, div is created, and in Dev console is no error and in seleted DIV are located data alt text
                            Of course I ran npm install after installation of module Nokia.

                            thanks for help, Zdeněk

                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              petero-dk
                              last edited by

                              I know, I know, I know, the use case is convoluted and it needs work work work.

                              The graph will not display until a remote server flag is set. This was to avoid opening ports in the local network (which is not possible with me). The graph is supposed to only show when you have been on the scale (I am working on something that will make that user configurable, but time, ohhhh that missing time)

                              For now, try manually from your phone or laptop or somewhere else calling:
                              http://apps.ecomerc.com/nokiahealth/user.php?userid=[youruserid]&a=set

                              That will set a server flag that the module will check in order to show the graph. The idea was you can use IFTTT to set the server flag and show the graph, this was the model because IFTTT has a trigger for Withings new measurement. This does not work because the IFTTT trigger has a delay of up to 15 minutes.

                              zdenekZ 1 Reply Last reply Reply Quote 0
                              • zdenekZ Offline
                                zdenek @petero-dk
                                last edited by

                                @petero-dk thx, but now I’m confused even more. I did the trick with a=set and after start MM I can see the graph (there was somehting like “Values for…” but I’ve of course named ppl in the device) and small graph (need to resize, cause I can identify that the weight is between 50 and 100 kilos - this not enough to monitor the weight differences). Anyway, the graph after few secs disappeard and doesn’t start anymore. I tried restart MM (not the whole RP). So it’s not the same - in the DEV I can see values, no error, but on the screen no graph.

                                btw, great job - everyone, who is able own module is for me like magic-man

                                Zdeněk

                                P 1 Reply Last reply Reply Quote 0
                                • P Offline
                                  petero-dk @zdenek
                                  last edited by

                                  @zdenek You do not need to reset MM, just call the http://apps.ecomerc.com/nokiahealth/user.php?userid=[youruserid]&a=set and the graph will display for a few seconds.

                                  When you want to see it again, call
                                  http://apps.ecomerc.com/nokiahealth/user.php?userid=[youruserid]&a=set

                                  (It is like a remote control for the graph) - yes I know it seems stupid but at the time it was a good idea, it will be changed completely

                                  zdenekZ 1 Reply Last reply Reply Quote 0
                                  • zdenekZ Offline
                                    zdenek @petero-dk
                                    last edited by

                                    @petero-dk said in MMM-NokiaHealth (Withings):

                                    http://apps.ecomerc.com/nokiahealth/user.p

                                    oh, I’ve got it. So there is actually no way to display it permanently?
                                    and is there way, how to change the scale? or zoom? I mean, to see graph from 0 to 100 kilos doesn’t give detailed info. Let imagine, your weight is 80 kilos and you know, it can be from 70 to 90 and you want to see just this range…

                                    thanky

                                    P 1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      petero-dk @zdenek
                                      last edited by

                                      @zdenek not yet, but next version for both things…

                                      zdenekZ 1 Reply Last reply Reply Quote 1
                                      • zdenekZ Offline
                                        zdenek @petero-dk
                                        last edited by

                                        @petero-dk I can’t wait for…thanks

                                        1 Reply Last reply Reply Quote 0
                                        • F Offline
                                          fabbr
                                          last edited by

                                          Any update on this? I would love to see the graphs from the Nokia Health

                                          1 Reply Last reply Reply Quote 0
                                          • B Offline
                                            Bouba830
                                            last edited by

                                            Hello
                                            I cannot connect to retrieve the ID
                                            I have the impression that the links no longer work!
                                            can you help me ?
                                            thank you ;)

                                            FoziF 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
                                            • 1 / 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