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-Domiticz

    Scheduled Pinned Locked Moved Utilities
    68 Posts 18 Posters 51.1k Views 18 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.
    • C Offline
      Charley Module Developer
      last edited by

      Hello Peter,

      There are two different things. One is Domoticz and the other is MagicMirror.
      The module requests data from Domoticz. It is a reply in json.
      This comes from my shutter.

      {
               "AddjMulti" : 1.0,
               "AddjMulti2" : 1.0,
               "AddjValue" : 0.0,
               "AddjValue2" : 0.0,
               "BatteryLevel" : 255,
               "CustomImage" : 0,
               "Data" : "Open",
               "Description" : "",
               "DimmerType" : "abs",
               "Favorite" : 0,
               "HardwareID" : 7,
               "HardwareName" : "ZwaveUSB",
               "HardwareType" : "OpenZWave USB",
               "HardwareTypeVal" : 21,
               "HaveDimmer" : true,
               "HaveGroupCmd" : true,
               "HaveTimeout" : false,
               "ID" : "00000501",
               "Image" : "Light",
               "IsSubDevice" : false,
               "LastUpdate" : "2018-04-16 08:37:09",
               "Level" : 255,
               "LevelInt" : 255,
               "MaxDimLevel" : 100,
               "Name" : "Rolluik",
               "Notifications" : "false",
               "PlanID" : "7",
               "PlanIDs" : [ 7 ],
               "Protected" : false,
               "ShowNotifications" : true,
               "SignalLevel" : "-",
               "Status" : "Open",
               "StrParam1" : "",
               "StrParam2" : "",
               "SubType" : "Switch",
               "SwitchType" : "Blinds Inverted",
               "SwitchTypeVal" : 6,
               "Timers" : "true",
               "Type" : "Light/Switch",
               "TypeImg" : "blinds",
               "Unit" : 1,
               "Used" : 1,
               "UsedByCamera" : false,
               "XOffset" : "698",
               "YOffset" : "1168",
               "idx" : "31"
            },
      

      The Image in this record is not the image in the MagicMirror. The MagicMirror Icons are from Fontawesome version 4.7 there is now a version 5 available but doesn’t like to work along 4.7 in MagicMirror.

      The icons you see in my module are based on the type of device retrieved with the json file from Domoticz. See the lines in my code from 55 to line 71

      There are no icons for shutters/shades or similar in fontawesome. That is why I use the status text from Domoticz. (In the Netherlands the webinterface is in Dutch but you will see that the status of the blinds are in English)

      Hope this clarifies the icon issue.

      MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

      1 Reply Last reply Reply Quote 0
      • C Offline
        Charley Module Developer
        last edited by

        Updated today with Humidity and the possibility to not show the subMenus.

        I choose not to add the Barometric Pressure and Sound Levels from Netatmo because my screen would be high enough in portrait mode.

        MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

        1 Reply Last reply Reply Quote 0
        • J Offline
          jaminben
          last edited by

          Hi Charley,

          I’m a newbie to MM so excuse me if the answer is obvious… the temperature and humidity work correctly but is there a way to display one after the other for the same sensor… so in my example screenshot you can see it lists all the temperatures first and then the humidity readings.

          Anyway, many thanks for creating the module… it’s fantastic :)

          0_1524401116389_house Tempretures.jpg

          1 Reply Last reply Reply Quote 0
          • C Offline
            Charley Module Developer
            last edited by Charley

            @jaminben Thanks for the thank you, i am still working on it to make it better.

            You can add more in your config.js settings

                  showItems: ['temperature','energy','battery','co', 'blinds','humidity','baro'],   // possible items  temperature, energy, battery, co, blinds, humidity,  baro
            
            

            Could you please reply with your config settings for this module .(delete any personal information ip,username or password)

            I think I misread your question, however all sensors data are grouped in the newest version.

            MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jaminben @Charley
              last edited by

              @Charley said in MMM-Domiticz:

              @jaminben Thanks for the thank you, i am still working on it to make it better.

              You can add more in your config.js settings

                    showItems: ['temperature','energy','battery','co', 'blinds','humidity','baro'],   // possible items  temperature, energy, battery, co, blinds, humidity,  baro
              
              

              Could you please reply with your config settings for this module .(delete any personal information ip,username or password)

              I think I misread your question, however all sensors data are grouped in the newest version.

              @Charley

              My config.js file…

              /* Magic Mirror Config Sample
               *
               * By Michael Teeuw http://michaelteeuw.nl
               * MIT Licensed.
               *
               * For more information how you can configurate this file
               * See https://github.com/MichMich/MagicMirror#configuration
               *
               */
              
              var config = {
              	address: "localhost", // Address to listen on, can be:
              	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
              	                      // - another specific IPv4/6 to listen on a specific interface
              	                      // - "", "0.0.0.0", "::" to listen on any interface
              	                      // Default, when address config is left out, is "localhost"
              	port: ******,
              	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "********"], // Set [] to allow all IP addresses
              	                                                       // or add a specific IPv4 of 192.168.1.5 :
              	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
              	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
              	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
              
              	language: "en",
              	timeFormat: 24,
              	units: "metric",
              
              	modules: [
              		{
              			module: "alert",
              		},
              		{
              			module: "updatenotification",
              			position: "top_bar"
              		},
              		{
              			module: "clock",
              			position: "top_left"
              		},
              		{
              			module: "calendar",
              			header: "*******",
              			position: "top_left",
              			config: {
              				calendars: [
              					{
              						symbol: "calendar-check-o ",
              						url: "********"
              					}
              				]
              			}
              		},
              		{
              			module: "compliments",
              			position: "lower_third"
              		},
              		{
              			module: "currentweather",
              			position: "top_right",
              			config: {
              				location: "*******",
              				locationID: "*****",  //ID from http://www.openweathermap.org/help/city_list.txt
              				appid: "******"
              			}
              		},
              		{
              			module: "weatherforecast",
              			position: "top_right",
              			header: "Weather Forecast",
              			config: {
              				location: "********",
              				locationID: "*******",  //ID from http://www.openweathermap.org/help/city_list.txt
              				appid: "*****"
              			}
              		},
              		{
              			module: "newsfeed",
              			position: "bottom_bar",
              			config: {
              				feeds: [
              					{
              						title: "BBC News",
              						url: "http://feeds.bbci.co.uk/news/uk/rss.xml"
              					}
              				],
              				showSourceTitle: true,
              				showPublishDate: true
              			}
              		},
              		{
              			module: "MMM-Domoticz",
              			position: "top_right",   // see mirror setting for options
              			config: {          
              				updateInterval: 45, // every 45 seconds
              				apiBase: '******',
              				apiPort: ****,
              				apiUser: "*******",
              					apiPw: "********",
              				temperatureTitle: "Current House Temperatures",
              				moduleTitle: "My smart home by Domoticz",
              				energyTitle: "Energy used by",
              				batteryTitle: "Battery level",
              				coTitle: "CO2 level",
              				blindsTitle: "Blinds",
              				energyNow: "Currently",
              				energyTotal: "Energy used",
              				batteryThreshold: 20,
              						coThreshold: 650,
              				subMenus: true,
              				showItems: ['temperature'],   // possible items  temperature, energy
              				excludedDevices: ['none','add your own']  // Device that will not be shown
              			}
              		},
              		{
              			module: 'MMM-Todoist',
              			position: 'top_right',	// This can be any of the regions. Best results in left or right regions.
              			header: 'Todoist', // This is optional
              			config: { // See 'Configuration options' for more information.
              				accessToken: '********',
              				maximumEntries: 60,
              				updateInterval: 10*60*1000, // Update every 10 minutes
              				projects: [ 166564794 ],
              				fade: false
              		  }
              		},
              	]
              
              };
              
              /*************** DO NOT EDIT THE LINE BELOW ***************/
              if (typeof module !== "undefined") {module.exports = config;}
              
              

              What I was trying to was something like:

              Garden 24.1 (temperature)
              55% (humidity)
              Lounge 20.2 (temperature)
              45% (humidity)
              Garage 22.1 (temperature)
              48% (humidity)

              Rather than:

              Garden 24.1 (temperature)
              Lounge 20.2 (temperature)
              Garage 22.1 (temperature)
              Garden 55% (humidity)
              Lounge 45% (humidity)
              Garage 48% (humidity)

              1 Reply Last reply Reply Quote 0
              • J Offline
                jaminben
                last edited by

                @Charley

                I just updated to the new version and it only shows the temperature now… not sure if that was intended or not.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  Charley Module Developer
                  last edited by Charley

                  You need to add humidity and baro to the showItems part in config.js
                  to see all options (someone asked in PM to block humidity)

                   showItems: ['temperature','energy','battery','co', 'blinds','humidity','baro']
                  

                  It will now show the way you like it

                  0_1524409121269_all together.png

                  MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    jaminben @Charley
                    last edited by

                    @Charley

                    Very cool… can I make one suggestion? How about if it detects that it already has a name present for the temperature it doesn’t display the name for the humidity and/or baro just the value? That way you don’t get duplicate names for the same sensor.

                    I can see in yours you have Woonkamer (Living Room) repeated 3 times which I assume is the same sensor?

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Charley Module Developer
                      last edited by Charley

                      Yes they are all the same sensor. I will try in the coming days if I am able to get those properly.

                      Just made it. if you pull the upgrade it is there

                      MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        jaminben @Charley
                        last edited by

                        @Charley said in MMM-Domiticz:

                        Yes they are all the same sensor. I will try in the coming days if I am able to get those properly.

                        Just made it. if you pull the upgrade it is there

                        Very nice… it works as expected :)

                        Next request… is there a way to sort them some how?

                        Sorry, I know I’m a PITA.

                        J 1 Reply Last reply Reply Quote 0
                        • J Offline
                          jaminben @jaminben
                          last edited by

                          @Charley

                          Ah, no… ignore my last comment. I can sort them via my Domoticz Dashboard.

                          Once again, MANY THANKS… I really appreciate the work you’ve done.

                          Very Cool Stuff.

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            Charley Module Developer
                            last edited by

                            @jaminben

                            I already tried before to reorder the data. In the description of API/JSON for Domoticz it says you can order by Name. (Line 37 in my code)

                            That is the documentation, but in reality you can’t order anything. If I look in the json coming from the request file there are no objects that would follow the order in your webapplication.

                            It could be done my making an array where all sensors are switches are in, but it would be a hassle if you add a new device you would also need to add to your modules config.

                            Lets wait what the next version of Domoticz brings and if I am able to implement it.

                            MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                            J 1 Reply Last reply Reply Quote 0
                            • J Offline
                              jaminben @Charley
                              last edited by

                              @Charley said in MMM-Domiticz:

                              @jaminben

                              I already tried before to reorder the data. In the description of API/JSON for Domoticz it says you can order by Name. (Line 37 in my code)

                              That is the documentation, but in reality you can’t order anything. If I look in the json coming from the request file there are no objects that would follow the order in your webapplication.

                              It could be done my making an array where all sensors are switches are in, but it would be a hassle if you add a new device you would also need to add to your modules config.

                              Lets wait what the next version of Domoticz brings and if I am able to implement it.

                              Not sure if you saw my previous comment and I’m not sure if it’s a fluke but I re-ordered my sensors within my Domoticz dashboard and they automatically re-ordered themselves within your module on the MM to match… probably a coincidence but mines looking exactly how I want them :)

                              1 Reply Last reply Reply Quote 0
                              • C Offline
                                Charley Module Developer
                                last edited by

                                @jaminben Thanks I will arrange them in my Dashboard as well.

                                MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                                1 Reply Last reply Reply Quote 0
                                • C Offline
                                  Charley Module Developer
                                  last edited by

                                  Today added total actual usage of Watts.
                                  Please add ‘usage’ to your showItems in your config.js

                                  MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    jaminben
                                    last edited by

                                    Hi Charley,

                                    Is it possible to get the colour of the values and icons to be white rather than grey?

                                    Thanks

                                    Ben

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      Charley Module Developer
                                      last edited by

                                      Today I have added to set the text colour to White.
                                      Just add in your config.js the option

                                      textWhite:true
                                      

                                      MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                                      1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        jaminben
                                        last edited by

                                        I updated and adding the config option ‘textWhite: true,’ but it doesn’t appear to work… any ideas?

                                        1 Reply Last reply Reply Quote 0
                                        • C Offline
                                          Charley Module Developer
                                          last edited by

                                          0_1525011269934_textWhite.png

                                          Made a small change it should work now

                                          MMM-Bose-Soundtouch, MMM-Domoticz, MMM-crypto-portfolio, MMM-Fibaro, MMM-rain-forecast

                                          1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            jaminben
                                            last edited by

                                            This post is deleted!
                                            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
                                            • 4 / 4
                                            • 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