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-FHEM shows values from FHEM devices ...

    Scheduled Pinned Locked Moved Utilities
    40 Posts 14 Posters 41.1k Views 15 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
      DirkS
      last edited by

      Great work! It is already running on my Mirror under development. Is there the possibility to change the displayed name?

      And can you give me some config examples to show on the mirror other states than temp sensors? I don’t understand how to separate.

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

        I noticed it doesn’t update the values. Once it takes the data but stays with it. Is there something i miss?

        1 Reply Last reply Reply Quote 0
        • B Offline
          BenRoe Module Developer @DirkS
          last edited by BenRoe

          @DirkS The Module use the FHEM name of the device or you can set a alias for the device in FHEM like this in the fhem.cfg file attr LaCr.Thermo01 alias Bad

          One module config is for a group of devices with the same value type. One group for temperature and humidity and another for lights …

          modules: [
            {
              module: 'MMM-FHEM',
              position: 'bottom_bar',
              config: {
                deviceNames: [
                              'FhemDeviceName1',
                              'FhemDeviceName2',
                              'FhemDeviceName3',
                             ],
                deviceReadings: [
                                  { name: 'temperature', icon: 'wi wi-thermometer', suffix: '°' },
                                  { name: 'humidity', icon: 'wi wi-humidity', suffix: '%' },
                                ],
              },
            },
            {
              module: 'MMM-FHEM',
              position: 'bottom_bar',
              config: {
                deviceNames: [
                              'FhemDeviceLight1',
                              'FhemDeviceLight2',
                             ],
                deviceReadings: [
                                  { name: 'state', icon: 'fa fa-lightbulb-o', suffix: '' },
                                ],
              },
            },
          ]
          

          Ich kann das vielleicht auch umschreiben, sodas man für jedes FhemDevice die Readings/Werte angeben kann.

          1 Reply Last reply Reply Quote 1
          • D Offline
            DirkS
            last edited by DirkS

            Ja nice! Now i have a usecase for the alias attr. ;) Before i had no clue for what i could need it.

            Readings for every single device would be good. I gives you more flexibility.

            What about a debug function? I would like to see the timing when it does fetch the last status and if the connection get interrupted etc.

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              BenRoe Module Developer @DirkS
              last edited by

              @DirkS If i have time, i will change it that every device can be configured.
              No clue how to implement a debug function. Feel free to do Pull Request.

              1 Reply Last reply Reply Quote 0
              • D Offline
                DirkS
                last edited by

                From where did you took the icons? I’m searching under Font Awesome but i couldn’t find them you took within the example?

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

                  @DirkS the weather icons are from vendor/weather-icons/css/weather-icons.css

                  @BenRoe you don’t request this css file in your module, you should do that or users will have no icons if they don’t use any other weather related module

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

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    DirkS
                    last edited by DirkS

                    so i can take every icon from here? http://erikflowers.github.io/weather-icons/

                    Edit: Yeah, works :D

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      disakos
                      last edited by

                      hello @BenRoe , may you please adopt this module to read Domoticz values ?
                      I see that it is similar because we can read domoticz values by json https://www.domoticz.com/wiki/Domoticz_API/JSON_URL’s#Retrieve_status_of_specific_device

                      For example one of retrived data from BME280 sensor

                      {
                      “ActTime” : 1477914474,
                      “ServerTime” : “2016-10-31 12:47:54”,
                      “Sunrise” : “06:33”,
                      “Sunset” : “16:21”,
                      “result” : [
                      {
                      “AddjMulti” : 1.0,
                      “AddjMulti2” : 1.0,
                      “AddjValue” : 0.0,
                      “AddjValue2” : 0.0,
                      “Barometer” : 984,
                      “BatteryLevel” : 255,
                      “CustomImage” : 0,
                      “Data” : “20.6 C, 58 %, 984 hPa”,
                      “Description” : “”,
                      “DewPoint” : “12.05”,
                      “Favorite” : 1,
                      “Forecast” : 0,
                      “ForecastStr” : “No Info”,
                      “HardwareID” : 3,
                      “HardwareName” : “Virtual”,
                      “HardwareType” : “Dummy (Does nothing, use for virtual switches only)”,
                      “HardwareTypeVal” : 15,
                      “HaveTimeout” : false,
                      “Humidity” : 58,
                      “HumidityStatus” : “Normal”,
                      “ID” : “14056”,
                      “LastUpdate” : “2016-10-31 12:46:59”,
                      “Name” : “Łazienka”,
                      “Notifications” : “true”,
                      “PlanID” : “0”,
                      “PlanIDs” : [ 0 ],
                      “Protected” : false,
                      “ShowNotifications” : true,
                      “SignalLevel” : “-”,
                      “SubType” : “THB1 - BTHR918, BTHGN129”,
                      “Temp” : 20.60,
                      “Timers” : “false”,
                      “Type” : “Temp + Humidity + Baro”,
                      “TypeImg” : “temperature”,
                      “Unit” : 1,
                      “Used” : 1,
                      “XOffset” : “0”,
                      “YOffset” : “0”,
                      “idx” : “7”
                      }
                      ],
                      “status” : “OK”,
                      “title” : “Devices”
                      }

                      Interesting thing is Name of sensor (“Name”), Temperature ( “Temp”) , Humidity or Preassure etc…
                      I think that would be great extension of this module ;)

                      Please ;]

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        DirkS
                        last edited by

                        Did you try to use some more modules of FHEM for different device types? It does not work correctly. The fading between the information is not working as i discovered.

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          DazDavid
                          last edited by

                          Thanks for the amazing Module. Any news about the Overwriting Issue with two different Groups?

                          1 Reply Last reply Reply Quote 1
                          • B Offline
                            Bobby
                            last edited by

                            Hi, i have some trouble with this modul.
                            The Error is:

                            21:11:17.224 TypeError: self.defaults.deviceReadings is undefined 1 MMM-FHEM.js:97:1

                            config.js:

                            { module: 'MMM-FHEM', position: 'bottom_bar', header: 'FHEM', config: { deviceNames: [ 'BadNode' ], deviceReadings: [ { name: 'temperature3', icon: 'fa fa-lightbulb-o', suffix: '°' }, // { name: 'humidity2', icon: 'wi wi-humidity', suffix: '%' }, ], }, }

                            I hope you can help me.
                            Thanks
                            Bobby

                            1 Reply Last reply Reply Quote 0
                            • B Offline
                              BenRoe Module Developer
                              last edited by

                              @DirkS yes you can use the weather icons from http://erikflowers.github.io/weather-icons/ and the font awesome icons http://fontawesome.io/icons/

                              @DazDavid here is the thread to this problem https://forum.magicmirror.builders/topic/697/multiple-module-instances-overwrites-itself-values/2

                              I will rewrite the module. Then every device can have different reading values.

                              @Bobby is FHEM running on the same machine as the MM2?

                              B 2 Replies Last reply Reply Quote 0
                              • B Offline
                                Bobby @BenRoe
                                last edited by

                                @BenRoe Thx for the fast answer. Yes, it is on the same Raspi. In the dev console of the browser, the correct value of the reading is displayed to me in the array as well.

                                1 Reply Last reply Reply Quote 0
                                • D Offline
                                  DazDavid
                                  last edited by

                                  @BenRoe cannot wait for the rewrite. Any idea how long it will take approximately and if you could add https Support?

                                  1 Reply Last reply Reply Quote 1
                                  • B Offline
                                    Bobby @BenRoe
                                    last edited by

                                    @BenRoe Hi, i found the problem an it works fine now.
                                    I changed following line self.defaults.deviceReadings[index] in self.config.deviceReadings[index]
                                    There are no default values for deviceNames and deviceReadings. They are only in the config.js

                                    This helps for me.
                                    Thanks
                                    Bobby

                                    1 Reply Last reply Reply Quote 1
                                    • B Offline
                                      BenRoe Module Developer
                                      last edited by

                                      I updated the Module to Version 0.2.0
                                      Update instruction https://github.com/BenRoe/MMM-FHEM#update-the-module

                                      Please change the module configuration in your config.js to the new structure.

                                      @DazDavid now with https support
                                      @Bobby fix the bug you found
                                      @DirkS you can set different readings for every FHEM device

                                      If you like the module please star it on github

                                      1 Reply Last reply Reply Quote 0
                                      • D Offline
                                        Dom1n1c
                                        last edited by

                                        Is it possible to access values from openhab?

                                        The syntax of the rest interface in OH is:

                                        IP:8080/rest/items/specificitem
                                        And to get the ‘Raw’ result/value:

                                        IP:8080/rest/items/specificitem/state

                                        I saw that there were a few Addons (for my smartwatch) that could use both FHEM and OpenHAB

                                        Thanks

                                        B 1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          BenRoe Module Developer @Dom1n1c
                                          last edited by

                                          @Dom1n1c it is possible. I don’t have the time to rewrite the module for openhab. Sorry

                                          1 Reply Last reply Reply Quote 0
                                          • D Offline
                                            DazDavid
                                            last edited by

                                            @BenRoe thank you for the update.
                                            Unfortunatelly the new version killed my FHEM Server somehow… Anyway I found a workarounf in the meanwhile.
                                            I build a new Tablet UI HTML File for the Mirror and used the iframe Module in MM to display the values. Works pretty good and im more Flexible.

                                            B 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
                                            • 2 / 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