Announcement

Collapse
No announcement yet.

Can't control devices with certain naming conventions, need help.

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

    Can't control devices with certain naming conventions, need help.

    I've been playing with mcsmqtt for a day now trying to figure out the plugin. I'm running the latest 5.13.0.0 I've gotten things to kind of work, I can view the status of devices, just can't seem to control anything. I've been using MQTT explorer which has helped a lot. For instance, I have many UPB switches which i can control just fine in the UPB plugin for homeseer. Via MQTT explorer I can view the status, but when I try to change a value, such as dim a light to 50% nothing happens.

    My naming convention is like this:

    Default Topic Template
    Security-DVR/mcsMQTT/$$ROOM:/$$NAME:/STATUS

    Default Payload Template
    $$VALUE:

    Wildcard Non-Plugin Control Template
    Security-DVR/mcsMQTT/$$ROOM:/$$NAME:/cmnd


    I am not sure what i am doing wrong. In the screenshot of MQTT Explorer I have lights on and I try sending a command to dim it to 50. It does not work.
    Also, is it possible to have the same name for Command HS Device on subscribed Topic and on Publish message on Device change using Topic.
    In other words, can something like this work too for both "Command HS Device on subscribed Topic" and "Publish message on Device change using Topic"?
    This is what i am thinking of but this doesn't seem to work either
    Security-DVR/mcsMQTT/$$ROOM:/$$NAME:

    This is basically the same thing minus the cmnd and STATUS

    Here is an example of a command that does not work

    Security-DVR/mcsMQTT/Brian's Bedroom/Ceiling Lights/cmnd

    Please let me know what I'm doing wrong. My goal is to eventually get this running with homeassistant, but for now I just want it to work reliably with MQTT Explorer.


    #2
    My naming convention is like this:

    Default Topic Template
    Security-DVR/mcsMQTT/$$ROOM:/$$NAME:/STATUS

    Default Payload Template
    $$VALUE:

    Wildcard Non-Plugin Control Template
    Security-DVR/mcsMQTT/$$ROOM:/$$NAME:/cmnd
    The above looks reasonable

    I am not sure what i am doing wrong. In the screenshot of MQTT Explorer I have lights on and I try sending a command to dim it to 50. It does not work.
    I'm not a MQTT Explorer user, but what I infer from the screenshot is you are sending on topic Security-DVR/mcsMQTT/Brian's Roon:/Ceiling Lights/cmnd. This topic could be problematic with use of the single quote and the space. Single quote should be handled and addition setup may be necessary for the space as it is not a recommended character in MQTT topics. To see what is actually happening the mcsMQTT debug should be enabled from General tab and the data will be collected in \data\mcsMQTT\mcsMQTT Debug.txt. For just starting I suggest keeping it simple with topics that have only alphabet and numbers.


    Also, is it possible to have the same name for Command HS Device on subscribed Topic and on Publish message on Device change using Topic.
    In other words, can something like this work too for both "Command HS Device on subscribed Topic" and "Publish message on Device change using Topic"?
    This is what i am thinking of but this doesn't seem to work either
    Security-DVR/mcsMQTT/$$ROOM:/$$NAME:
    The plugin has prevented this to avoid the potential of positive feedback loop. The topic should be implicit in who should be expected to be the controller and who should be observing status.

    Comment


      #3
      Got it, seems to be working fine now without spaces and I can now control lights using mqtt explorer. I've just renamed the devices I want to use with a space and special characters to an underscore. However, maybe as part of your plugin can you create an option such as "substitute spaces and special characters with an underscore" this would be useful when homeseer has a lot of devices, and in conjunction with auto association this would be quite useful. That way I don't have to go and rename every device with a space in mcsmqtt that i want to use...

      Another question, How does the homeassistant discovery thing work? I'm currently working with homeassistant, and would like the homeseer and homeassistant talking to each other via mqtt. judging from this page there seems to be a naming convention used in homeassistent for discovery. I'm just wondering what the best way to integrate homeseer and homeassistnat. Do i have to configure things via yaml files, or is there an easier way?

      Comment


        #4
        maybe as part of your plugin can you create an option such as "substitute spaces and special characters with an underscore" this would be useful when homeseer has a lot of devices
        I should be able to do this. I had this in the original plugin versions and was convinced to use standard URI encoding mechanism for this such is used by browser.

        How does the homeassistant discovery thing work
        There is a recent discussion on this at https://forums.homeseer.com/forum/li...-homeassistant What your link shows is the definition of the protocol. It works well for HS/mcsMQTT to listen to other widgets that use the protocol for mcsMQTT to setup the HS devices. It works, but not as well, for other widgets to setup what thinks look like in HS because HS does not follow the device paradigm used in HA around which the referenced discovery protocol was defined.

        Comment


          #5
          Originally posted by Michael McSharry View Post

          I should be able to do this. I had this in the original plugin versions and was convinced to use standard URI encoding mechanism for this such is used by browser.
          Sounds good. Please let me know when you have this working as I'm very eager to test. Would save me a lot of time rather than having to change every space and special character to an underscore in mcsmqtt. Thanks

          Also, regarding the homeassistant discovery button, are you saying it's better to use it for devices that are already on Homeassistant? for instance if i add a device to homeassistant and press the discovery button in homeseer, homeseer should add the device as a homeseer device? is this correct or am I not quite understanding something...

          My actual goal is to use homeassistant only as a display interface. (I really like the homeassistant UI, and I have too many connection issues with Homeseers HSTouch.)
          I plan to leave all my devices in homeseer, and my automation logic too. I'm really just looking for a way to have homeassistant and homeseer talk to each other, but more as a client/server relationship. Basically I want to leave homeseer and all the plugins, events, and devices as the server and homeassistent as a dummy client that i would only use for controlling homeseer via the nice UI. if i have to add all the devices in homeseer to homeassistant via creating more yaml files, so be it. I just want to make sure I am doing this correctly, and there isn't an easier way, or if I'm missing something.

          Comment


            #6
            The homeassistant discovery messages are volunteered by the source. I would guess that a restart of HA would generate a number of these messages to describe the HA device set. It is just a guess. These is not a mechanism I am aware for HS to ask HA to set discovery messages. I provided the button is HS to sent discovery information about HS.

            A device in HA or HS can share status and control. If Homeassistant discovery is used then HS will have a better chance of setting up HS device automatically than the other way around. It is just a matter of the amount of manual vs. auto setup needed. What I have seen is that many only want the HS Zwave support and everything else is in HA so they do not care about HS knowing about any HA devices.

            Comment


              #7
              Version 5.13.5.0 has the third encoding option. Locations are the same with a third option added to replace all special characters with underscore. The default is on the General tab and the topic/device by topic/device selections are on the Edit tab.

              The topic with the update is at Multiple lines on each of two axis & InfluxDB Charting - HomeSeer Message Board

              Click image for larger version

Name:	Capture.PNG
Views:	85
Size:	12.0 KB
ID:	1449573Click image for larger version

Name:	Capture1.PNG
Views:	76
Size:	33.4 KB
ID:	1449574

              Comment

              Working...
              X