Announcement

Collapse
No announcement yet.

MQTT_Iot

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

    MQTT_Iot

    stefxx Hi Stef,

    what is MQTT IOT plugin ?

    #2
    With HS4 I was going to change mcsMQTT plugin to mcsIOT to reflect better the wide range of it’s capability beyond just MQTT. I elected to not do it in consideration of existing mcsMQTT users.

    Comment


      #3
      Hi !

      MQTT IoT is something I am playing with, not fully sure on the end goal, if any. But in the basis it is (yet another) MQTT plugin.

      Reason is that with the 120+ MQTT devices I own (and the number continues to grow), managing them becomes a nightmare. Every single device needs quite a bit of tweaking during setup, even if it is the same type of device I've used many times before. If something changes to the device (due to new settings or firmware) I have to revisit many options on many devices again.

      So I've tried to create a plugin with the actual device in mind first, instead of the MQTT data. The "device" is fully defined in a JSON template, and so are all the features of that device (because features are often quite similar between devices so they can be re-used). The JSON template contains all the device/feature properties to setup the device in HomeSeer, and also contains the MQTT data that is required to operate the device.

      The thing is, creating a JSON for a device is not the most user friendly thing to do and requires a little more than beginners skills. Which kinda defeats the purpose of the plugin, since I want to keep it as simple as possible. But ultimately, with the help of the community off course, this could let to a re-usable set of JSON templates for all frequently used MQTT devices. And users only need to enter the name, topic and type of device to setup there device in HomeSeer.

      Feel free to try the beta (well, alpha...) as it is fully functional. I think the plugin is quite self-explanatory, except for the JSON layout. The JSON files can be found in the <HomeSeer>\Data\MQTT_IoT directory. Default are the templates that come with the plugin, Custom is where you can create your own templates. Note that for now you'll have to restart the plugin to pickup any changes to the JSON templates.

      Thanks for your interest in the plugin!
      stefxx

      Comment


        #4
        stefxx ,
        I suggested a component (feature) for HSTouch...(As better Front End) It would add a punch to the system and even reduce the steps to create events...Should I say like the way AK SmartDevice works.
        • I may be wrong... That HStouch is a closed space (not open to devs) that HomeSeer has lost out on that innovation to try and make HStouch a better product that they try to cram to much into the server.
        • And if I may add, you would get devs who would create interactive add-ons or user interfaces just there in HStouch.
        And why not?.. Reason being that most people would prefer the "one stop shop" They would rather use all things HomeSeer so to say...
        It can be done and I had to go elsewhere to find it. But if sharing ideas was the name of day, then below is an example of what's possible :


        Click image for larger version  Name:	Home Remote.png Views:	0 Size:	133.0 KB ID:	1483916


        Eman.

        TinkerLand : Life's Choices,"No One Size Fits All"

        Comment


          #5
          How is what you are trying to do different than using the meta data in the HomeAssistant Discovery protocol? Homie is another similar protocol that does not have as large adoption rate. Tasmota has also come out with a tailored one and it looks like it will be phasing out HomeAssistant Discovery.

          Comment


            #6
            Hi Michael. No nothing to do with discovery. The plugin is simply using a config JSON file that contains both the HS4 device/feature definition and the connected MQTT topics to get status and control the IoT device. Remember our discussion around Shutters (and Dimmers)? Well, the perfectionist I am I really want Open, Close, Going up, Going down and % open all on the same feature. Which requires 4 topics to ensure I always have the latest status. And then, still on the same feature, I want to control Open, Close, Stop and a slider to control % open. Have 12 of those devices and you migt understand my challenge...

            So this is now being handled by a single JSON config that only needs the #TOPIC# to work for all devices. And if anything changes, only a single config file needs to be edited:

            Code:
            {
              "template": "Tasmota Shutter",
              "name": "Shutter",
              "address": "Shutter",
              "status": [
                {
                  "topics": [
                  "tele/#TOPIC#/SENSOR:Shutter1:Position",
                  "stat/#TOPIC#/SHUTTER1"
                  ],
                  "values": [
                    {
                      "payload": 0,
                      "value": 0,
                      "status": "Closed",
                      "image": "shutter-0.png"
                    },
                    {
                      "payload": "#NUMBER#",
                      "start": 1,
                      "end": 99,
                      "prefix": "Pos ",
                      "suffix": "%",
                      "decimals": 0,
                      "image": "shutter-[0-100,10].png"
                    },
                    {
                      "payload": 100,
                      "value": 100,
                      "status": "Open",
                      "image": "shutter-100.png"
                    }
                  ]
                },
                {
                  "topics": [
                    "stat/#TOPIC#/RESULT:Shutter1: Direction",
                    "tele/#TOPIC#/SENSOR:Shutter1: Direction"
                  ],
                  "values": [
                    {
                      "payload": -1,
                      "value": -1,
                      "status": "Down",
                      "image": "shutter-down.png"
                    },
                    {
                      "payload": 1,
                      "value": 101,
                      "status": "Up",
                      "image": "shutter-up.png"
                    }
                  ]
                }
              ],
              "control": [
                {
                  "topic": "cmnd/#TOPIC#/ShutterClose1",
                  "values": [
                    {
                      "payload": "",
                      "type": "button",
                      "value": 0,
                      "label": "Close",
                      "column": 1,
                      "controluse": "off"
                    }
                  ]
                },
                {
                  "topic": "cmnd/#TOPIC#/ShutterPosition1",
                  "values": [
                    {
                      "payload": "#NUMBER#",
                      "type": "slider",
                      "start": 1,
                      "end": 99,
                      "prefix": "Pos ",
                      "suffix": "%",
                      "column": 2,
                      "controluse": "dim"
                    }
                  ]
                },
                {
                  "topic": "cmnd/#TOPIC#/ShutterOpen1",
                  "values": [
                    {
                      "payload": "",
                      "type": "button",
                      "value": 100,
                      "label": "Open",
                      "column": 3,
                      "controluse": "on"
                    }
                  ]
                },
                {
                  "topic": "cmnd/#TOPIC#/ShutterStop1",
                  "values": [
                    {
                      "payload": "",
                      "type": "button",
                      "value": -2,
                      "label": "Stop",
                      "column": 4,
                      "controluse": "stop"
                    }
                  ]
                }
              ]
            }
            stefxx

            Comment


              #7
              stefxx Hi Stef,

              I switched my account (Mattl0).

              I have installed the plugin. Just a note that I had to manually create all the folders of the plugin because window format "".

              I pretty like the plugin. I have transferred some device to it, and I plan to transfer more.

              Do you think it would be possible to create a forum for it? I have some suggestions/features for the plugin.

              Also, an "How-to" would be great to expose all what the plugin can do. I have guessed some of it with the Default templates when I create customs one, but it would be great to have something official.

              Thank you.

              Comment


                #8
                Thanks pistacheL0 . I like your new name

                Documentation/How-To is still on my to-do list. I won't have much time to work on it this week to be honest. But I have just submitted the plugin to the store and requested a dedicated sub forum for it. So in a few days it should be available.

                In the latest beta the linux directory issue is resolved.
                stefxx

                Comment


                  #9
                  Thanks!!
                  Hi Stef,

                  there are still issues installing the plugin on linux.+ This time with the release version, my custom templates have been erased . I can load a backup for now
                  This is an arror from hs log
                  Code:
                  Error creating zip output file (/opt/HomeSeer/./Data/MQTT_IoT/Default/\Devices\Benexmart ZB-L01C 4-Button.json), Could not find a part of the path "/opt/HomeSeer/Data/MQTT_IoT/Default/Devices/Benexmart ZB-L01C 4-Button.json".

                  Comment


                    #10
                    Hi Matt,

                    Let's continue here: https://forums.homeseer.com/forum/hs...qtt-iot-stefxx
                    stefxx

                    Comment

                    Working...
                    X