Announcement

Collapse
No announcement yet.

Homie Convention

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Homie Convention

    Michael McSharry are you doing any work or any interest in the homie MQTT convention?

    https://homieiot.github.io/

    It would be interesting for mcsMQTT to have support to easily be able to bring in new devices into HomeSeer from other systems. I know there's a MQTT Client in very active development for Hubitat that is supporting the homie convention and Node-RED also has support. There's also an active integration with ISY through an ISY bridge project.

    #2
    Doesn't MQTT JSON offer a stronger/larger functionality already?
    Karl S
    HS4Pro on Windows 10
    242 Devices
    56 Z-Wave Nodes
    37 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units 1 display

    Comment


      #3
      I am for standards and making things easier for the end user. I was not aware of this before and only briefly looked at it. What I did not see in my look is the distinction for the direction of the topic. It is a command or is is a status? Shelly tends to follow the convention but the multi-point end nodes may not comply. e.g. 0/relay , 1/relay, 0/energy, /energy. Look at Tasmota it starts with the stat, tele or cmnd as default and if default is not used the cmnd goes in the middle. What systems have adopted this definition for topics?

      Comment


        #4
        Originally posted by Michael McSharry View Post
        I am for standards and making things easier for the end user. I was not aware of this before and only briefly looked at it. What I did not see in my look is the distinction for the direction of the topic. It is a command or is is a status?
        It's outlined on the first page towards the bottom. Topics are status and per normal conventions append '/set' for the command.

        Shelly tends to follow the convention but the multi-point end nodes may not comply. e.g. 0/relay , 1/relay, 0/energy, /energy. Look at Tasmota it starts with the stat, tele or cmnd as default and if default is not used the cmnd goes in the middle. What systems have adopted this definition for topics?
        This is a new convention that seems to be pretty young and it's not widely adopted. It's also competing with the Home Assistant Discovery standard as well. I haven't delved very deeply into it yet but both "standards" are intended to define a common device structure to facilitate auto discovery of devices within MQTT. Which standard will win out...... probably the Home Assistant discovery in the short term but I thought I'd throw this out and see if you were aware and was watching it along with the Home Assistant discovery.

        Comment


          #5
          Thanks for the awareness. What I have been doing recently is recognizing published topic structure for widgets and doing auto-discovery/HS device creation for these. WLED was the last one. It is much easier for me when the structure is know and more convenient for the end user vs. adding generic features to mcsMQTT that always require reference to the manual to have a chance to benefit from the feature.

          Comment


            #6
            Originally posted by Michael McSharry View Post
            Thanks for the awareness. What I have been doing recently is recognizing published topic structure for widgets and doing auto-discovery/HS device creation for these. WLED was the last one. It is much easier for me when the structure is know and more convenient for the end user vs. adding generic features to mcsMQTT that always require reference to the manual to have a chance to benefit from the feature.
            Absolutely... that's what caught my attention with the Homie convention was a consorted effort to define topic structures. If more devices start supporting this or the HASS discovery convention it will make things a lot easier for end users.

            Comment


              #7
              Now i understand why thoses option were present in openhab mqtt binding
              Attached Files

              Comment


                #8
                Originally posted by MattL0 View Post
                Now i understand why thoses option were present in openhab mqtt binding
                Yup...

                Comment


                  #9
                  ESPHome uses the HomeAssistant convention, so it is not limited to ESP devices.
                  In fact, I use it quite a lot to integrate sensors/data from Python scripts (so not from ESP devices):
                  - solar panels
                  - PlugWise
                  - ...

                  Comment


                    #10
                    I'm all for standards which makes things easier. Ive just been putting my toe in the water when it comes to MQTT. I've only done reading temperatures and the like from my NUC processor and I'm planing to add reading temperatures from the RPi as well. So a basic standard for doing this would be good to follow.

                    That would also allow us to have libraries we could share for functions like this. In my case I tend to stick with RPi for devices I need but with standards the processor really doesn't matter.
                    HomeSeer Version: HS3 Standard Edition 3.0.0.548
                    Linux version: Linux auto 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                    Number of Devices: 484 | Number of Events: 776

                    Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.61.0: BLBackup
                    3.0.0.70: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ
                    4.2.3.0: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.47: Pushover 3P
                    3.0.0.16: RaspberryIO | 3.0.1.262: Z-Wave

                    Z-Net version: 1.0.23 for Inclusion Nodes
                    SmartStick+: 6.04 (ZDK 6.81.3) on Server

                    Comment


                      #11
                      I will be posting the Python script in a week or 2. With the script one can publish data in the HomeAssistant convention.
                      The ESPHome plugin picks it up and does the rest.

                      Verstuurd vanaf mijn SM-G965F met Tapatalk

                      Comment


                        #12
                        I just took a look at a Tasmota device that I configured as [Sonoff Basic, IR Send, Counter] that has "SetOption19 1" setup and obtain the following disclosure sent to the homeassistant topic. First time looking at homeassistant discovery and highlighted some items that I recognized. I did not see anything about the IRSend GPIO that was setup. I can see how this information could be used for Homeseer as well in a discovery process. What I read is that Tasmota, at this time, does not have an equivalent discovery process per homie convention.

                        Code:
                        00:00:06 WIF: Connected
                        00:00:06 HTP: Web server active on Wemos with IP address 192.168.0.233
                        19:04:26 MQT: Wemos/tele/INFO2 = {"WebServerMode":"Admin","Hostname":"Wemos","IPAddress":"192.168.0.233"}
                        19:04:26 MQT: Wemos/tele/INFO3 = {"RestartReason":"Software/System restart"}
                        19:04:26 MQT: Wemos/stat/RESULT = {"POWER":"OFF"}
                        19:04:26 MQT: Wemos/stat/POWER = OFF
                        19:04:26 MQT: Wemos/stat/RESULT = {"POWER":"OFF"}
                        19:04:26 MQT: Wemos/stat/POWER = OFF
                        
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_1/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_1/config = {"name":"Tasmota","cmd_t":"~cmnd/POWER","stat_t":"~tele/STATE","val_tpl":"{{value_json.POWER}}","pl_off":"OFF","pl_on":"ON","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"CFB4C6_RL_1","device":{"identifiers":["CFB4C6"],"connections":[["mac","DC:4F:22:CF:B4:C6"]]},"~":"Wemos/"} (retained)
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_2/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_2/config =  (retained)
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_3/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_3/config =  (retained)
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_4/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_4/config =  (retained)
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_5/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_5/config =  (retained)
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_6/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_6/config =  (retained)
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_7/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_7/config =  (retained)
                        19:04:27 MQT: homeassistant/light/CFB4C6_LI_8/config =  (retained)
                        19:04:27 MQT: homeassistant/switch/CFB4C6_RL_8/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_BTN_1/config = {"name":"Tasmota Button1","stat_t":"~stat/BUTTON1","avty_t":"~tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"CFB4C6_BTN_1","device":{"identifiers":["CFB4C6"],"connections":[["mac","DC:4F:22:CF:B4:C6"]]},"~":"Wemos/","value_template":"{{value_json.STATE}}","pl_on":"TOGGLE","off_delay":1} (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_BTN_2/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_BTN_3/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_BTN_4/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_1/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_2/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_3/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_4/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_5/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_6/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_7/config =  (retained)
                        19:04:27 MQT: homeassistant/binary_sensor/CFB4C6_SW_8/config =  (retained)
                        19:04:27 MQT: homeassistant/sensor/CFB4C6_COUNTER_C1/config = {"name":"Tasmota COUNTER C1","stat_t":"~SENSOR","avty_t":"~LWT","frc_upd":true,"pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"CFB4C6_COUNTER_C1","device":{"identifiers":["CFB4C6"],"connections":[["mac","DC:4F:22:CF:B4:C6"]]},"~":"Wemos/tele/","unit_of_meas":" ","val_tpl":"{{value_json['COUNTER'].C1}}"} (retained)
                        19:04:27 MQT: homeassistant/sensor/CFB4C6_status/config = {"name":"Tasmota status","stat_t":"~HASS_STATE","avty_t":"~LWT","frc_upd":true,"pl_avail":"Online","pl_not_avail":"Offline","json_attributes_topic":"~HASS_STATE","unit_of_meas":" ","val_tpl":"{{value_json['RSSI']}}","ic":"mdi:information-outline","uniq_id":"CFB4C6_status","device":{"identifiers":["CFB4C6"],"connections":[["mac","DC:4F:22:CF:B4:C6"]],"name":"Tasmota","model":"Sonoff Basic","sw_version":"8.1.0(tasmota)","manufacturer":"Tasmota"},"~":"Wemos/tele/"} (retained)
                        
                        19:04:30 MQT: Wemos/tele/STATE = {"Time":"2020-02-10T19:04:30","Uptime":"0T00:00:13","UptimeSec":13,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"U","BSSId":"78:8A:20:84:48:1D","Channel":11,"RSSI":72,"Signal":-64,"LinkCount":1,"Downtime":"0T00:00:07"}}
                        19:04:30 MQT: Wemos/tele/SENSOR = {"Time":"2020-02-10T19:04:30","COUNTER":{"C1":0}}
                        19:13:00 MQT: Wemos/stat/RESULT = {"POWER":"ON"}
                        19:13:00 MQT: Wemos/stat/POWER = ON

                        Comment


                          #13
                          I incorporated the HomeAssistent convention for discovery in mcsMQTT 5.1.2.0. I started discussion thread at https://forums.homeseer.com/forum/li...tant-discovery

                          I also have the hooks in place for Homie convention, but I do not know of any devices that use it. If somebody has some then let me know and I can either get them or work with you.

                          Comment


                            #14
                            I've written several bridges that publish data conforming to the Homie Convention (and intend to do more):
                            * https://github.com/ccutrer/balboa_worldwide_app
                            * https://github.com/ccutrer/somfy_sdn
                            * https://github.com/ccutrer/nodejs-poolController-mqtt

                            I use OpenHAB with many HomeSeer ZWave devices, but I've grown tired of how difficult it is to write an OpenHAB binding, so have shifted focus to MQTT+Homie Convention, which is also nice that non-OpenHAB users can utilize my work.

                            Comment

                            Working...
                            X