• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Domoticz : update time ?

Scheduled Pinned Locked Moved Development
11 Posts 6 Posters 9.7k Views 6 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.
  • D Offline
    djam
    last edited by May 8, 2017, 6:33 AM

    Hello everyone and first, thanks to Mich for the availability of the MagicMirror and to all those who contributed to the writing of modules …

    My problem: I found a module that retrieves information from the Domoticz box via the json API. Everything works very well except updating the data, these are only done when the MagicMirror starts and then no update.

    Here is the module link: https://github.com/M-Arvidsson/MMM-domoticz

    If a person has an idea I am taker, excuse my English I am french.
    Thanks for any help you can bring.

    S 1 Reply Last reply May 8, 2017, 6:41 PM Reply Quote 0
    • S Offline
      strawberry 3.141 Project Sponsor Module Developer @djam
      last edited by May 8, 2017, 6:41 PM

      @djam you are using a timeout instead of an interval https://github.com/M-Arvidsson/MMM-domoticz/blob/master/domoticz.js#L169

      What’s the difference?

      setTimeout(function…, 1000) Get’s executed once after 1 second

      setInterval(function…, 1000) Get’s executed every second

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

      D Y 2 Replies Last reply May 8, 2017, 7:15 PM Reply Quote 0
      • D Offline
        djam @strawberry 3.141
        last edited by May 8, 2017, 7:15 PM

        @strawberry-3.141 Hello ,

        Simply, and in addition with the explanation ! ;-)
        Thank you very much, it works much better like that …
        I will finally be able to attack the CSS of the module that I will post on the forum.

        Thanks again

        1 Reply Last reply Reply Quote 0
        • Y Offline
          yomm @strawberry 3.141
          last edited by Jul 16, 2017, 9:55 PM

          @strawberry-3.141
          Hi,
          I tried to use setInterval but it doesn’t work for me.
          Here is the message on the console :

          domoticz.js:136 GET http://192.168.0.33:8080/json.htm?type=devices&rid=666 net::ERR8INSUFFICIENT_RESOURCES 
          domoticz.js:131 domoticz: Could not load data.
          domoRequest.onreadystatechange @ domoticz.js:131
          Did not load data
          

          Any idea please ?

          S 1 Reply Last reply Jul 17, 2017, 5:39 AM Reply Quote 0
          • S Offline
            strawberry 3.141 Project Sponsor Module Developer @yomm
            last edited by Jul 17, 2017, 5:39 AM

            @yomm not sure what files your loading there, but insufficient ressources could be a memory issue.

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

            1 Reply Last reply Reply Quote 0
            • Y Offline
              yomm
              last edited by Jul 17, 2017, 7:57 PM

              Thankj@strawberry-3.141 said in MMM-Domoticz : update time ?:

              @yomm not sure what files your loading there, but insufficient ressources could be a memory issue.

              Thanks you for your reply.

              The file is this one : https://github.com/M-Arvidsson/MMM-domoticz/blob/master/domoticz.js
              I am very interested by this module but without auto-refresh, it’s quite useless.
              So I installed the module, read your post, read the nodejs doc and just change the function as you mentioned (setTimeout --> setInterval).

              For @djam it seems to be working. On my side, the module is loaded but it doesn’t display anything and send a lot of log like I previously show you.
              My MM(²) is runing on a raspberry pi 2. If I understand what you said, it means that the rpi2 is runing low memory ?
              When i check (free -m) it’s always about 450-480MB free with setTimeout or setInterval.
              I could try on a rpi3 but as far as I know rpi2 and 3 both have 1GB RAM.

              Could you help me please ?

              1 Reply Last reply Reply Quote 0
              • L Offline
                luizcarlosnery
                last edited by Sep 17, 2017, 7:36 PM

                Hello everybody, I’m also working on this module, but I was not successful, the MM2 loads but does not show the monitored device.
                Can anyone help?

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rich710
                  last edited by Oct 3, 2017, 5:16 AM

                  Same for me, MM2 starts and no errors but the module MMM-domoticz don’t show up at screen at all.
                  My Domoticz Pi is up and running.
                  Thankful for help.

                  Regards
                  //Richard

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    Gwyrlim
                    last edited by Nov 5, 2017, 4:36 PM

                    Hi.
                    Just started my first mirror and added the Domoticz module. To get it to work I change the setTimeout to setInterval but I also had to change the call in the start function from this.scheduleUpdate(this.config.initialLoadDelay) to this.scheduleUpdate(this.config.updateInterval). Not doing this I think it will set the timer to fire every 10 ms and that didn’t work for me. It will take some time(this.config.updateInterval) to get the module up the first time but I can live with that until I know js better.

                    Hope it helps someone.

                    BR
                    /Markus

                    1 Reply Last reply Reply Quote 0
                    • Y Offline
                      yomm
                      last edited by Feb 25, 2018, 12:47 AM

                      Hi,

                      I try your solution and also change updateInterval from 5000 to 2000.

                      I let you know…

                      Thanks!

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