Announcement

Collapse
No announcement yet.

Setup help when using a remote Windows-based computer running mcsMQTT as broker

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

    Setup help when using a remote Windows-based computer running mcsMQTT as broker

    I am trying to use HS4 Windows on two different computers, primary and secondary, to monitor Bluetooth BLE beacons. I have HS4 setup on the primary to connect to the secondary, which is the broker. The primary Windows HS4 connects to this broker, but I am not getting any updates from the broker to the primary regarding beacons. I'm sure it is a setting that I have not got correct. Please advise. Thanks.
    "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
    "Reboot and rejoice!" F. Pishotta, 1989

    #2
    Primary IP 192.168.1.2
    Secondary IP 192.168.1.3

    On Primary MQTT Broker setup as 192.168.1.3
    On Secondary MQTT Broker setup as 127.0.0.1

    Beacons on a Windows computer are not now being delivered as published MQTT messages. They are only processed internally as pseudo-topics. Let me look into adding option to publish these.

    Comment


      #3
      Originally posted by Michael McSharry View Post
      Primary IP 192.168.1.2
      Secondary IP 192.168.1.3

      On Primary MQTT Broker setup as 192.168.1.3
      On Secondary MQTT Broker setup as 127.0.0.1

      Beacons on a Windows computer are not now being delivered as published MQTT messages. They are only processed internally as pseudo-topics. Let me look into adding option to publish these.
      Michael: Thanks. Would beacons on an RPi set up be delivered as published MQTT messages? Otherwise, I look forward to your adding this as an option. Elliott
      "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
      "Reboot and rejoice!" F. Pishotta, 1989

      Comment


        #4
        Yes RPi Beacon information is transmitted via MQTT. Note other thread where the update was made to provide the same with Windows. The update is at mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board with the dll zip going into the \bin\mcsMQTT subfolder of HS.

        Comment


          #5
          Originally posted by Michael McSharry View Post
          Yes RPi Beacon information is transmitted via MQTT. Note other thread where the update was made to provide the same with Windows. The update is at mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board with the dll zip going into the \bin\mcsMQTT subfolder of HS.
          That was quick! Thanks!
          "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
          "Reboot and rejoice!" F. Pishotta, 1989

          Comment


            #6
            Originally posted by Michael McSharry View Post
            Yes RPi Beacon information is transmitted via MQTT. Note other thread where the update was made to provide the same with Windows. The update is at mcsMQTT Change Log (HS4 & HS3) - HomeSeer Message Board with the dll zip going into the \bin\mcsMQTT subfolder of HS.
            So, I put the two new files, MCSMQTTHS4_2020.dll and MCSMQTTHS4_2020.pdb in the subfolder of HomeSeer on all computers running HS4. However, I am still not getting BLE data sent via the broker to my primary HS installation from the secondary. This was the case for both the RPi version and for the Windows 10 version.
            "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
            "Reboot and rejoice!" F. Pishotta, 1989

            Comment


              #7
              Did you do the following? The logic in 5.25.1.0 will work the same as prior versions unless an association is made with a beacon of interest and then the pub topic is defined to indicate that this beacon data is to be published via MQTT. If the pub topic remains blank then the beacon data will update the HS Device directly. If it is not blank then it will not longer update HS directly, but will do the update when the Broker echo's back the published topic.
              With version 5.25.1.0 I added the ability to publish the BLE Beacon topics recognized in the Windows BLE stack. It is done by replicating the Sub Topic into the Pub Topic text box on the Edit tab or Association tab.

              Comment


                #8
                Originally posted by Michael McSharry View Post
                Did you do the following? The logic in 5.25.1.0 will work the same as prior versions unless an association is made with a beacon of interest and then the pub topic is defined to indicate that this beacon data is to be published via MQTT. If the pub topic remains blank then the beacon data will update the HS Device directly. If it is not blank then it will not longer update HS directly, but will do the update when the Broker echo's back the published topic.
                Michael: Thanks. What is clear to me is that I do not fully understand all the steps I need to do to publish/subscribe for a device and how to set this up within your plugin. I will have to do more studying.
                "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
                "Reboot and rejoice!" F. Pishotta, 1989

                Comment


                  #9
                  First step is to enable the BLE function from Local Page, Bluetooth Tab.

                  Click image for larger version

Name:	1.png
Views:	130
Size:	37.7 KB
ID:	1558485

                  The discovered beacons will show up in the Association Table of the MQTT Page, Association Tab. Most easily found using the Topic 1 (T1) filter as Beacon. If you do not see Beacon in T1 then click Rebuild button in the filter heading.

                  The Beacons are listed by their MAC address. Find one that you are interested. Many will be fake/random ones generated by smart devices to protect privacy. In the example below I recognize the one ending in .2E as my long range beacon. I clicked the "A" column checkbox to create a HS device. Status of this beacon will now be reported in HS. If I want other MQTT clients to know about it then I copy the Sub and paste it in the Pub textbox.

                  Click image for larger version

Name:	0x.png
Views:	97
Size:	82.5 KB
ID:	1558486



                  Comment


                    #10
                    Michael:
                    Thanks for taking the time to provide these instructions. I had already figured out most of this, but had been stymied on "... copy the Sub and paste it in the Pub textbox." It took me awhile to find it, but I finally located the "Pub textbox." As in your post, that Pub textbox was not visible to me, but looking where you pasted yours, moving my mouse over the area, I discovered the box. Now, on to the next challenge: trying to figure out why my primary HS4 set up disconnects from the broker that the secondary computer is running.
                    Elliott
                    "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
                    "Reboot and rejoice!" F. Pishotta, 1989

                    Comment


                      #11
                      Make certain your MQTT clients all have unique Client Id's. In particular for mcsMQTT, the MQTT Page, General Tab, Client Id text box in the same area where you setup your Broker IP.

                      Comment


                        #12
                        Originally posted by Michael McSharry View Post
                        Make certain your MQTT clients all have unique Client Id's. In particular for mcsMQTT, the MQTT Page, General Tab, Client Id text box in the same area where you setup your Broker IP.
                        So, connection to broker on RPi seems to be more stable. I have another issue, though. The beacon, which is detected and reported in mcsMQTT on my primary Windows computer running HS4, is not detected and reported in mcsMQTT on the RPi running HS4. This occurs, despite the fact that the blueman-applet on the RPi does detect the beacon. The plugin on the RPi HS4 is set to Discover New Local and Remote BLE Beacons. How should I troubleshoot? Thanks.
                        "Living with technology means living in a [constant] state of flux." S. Higgenbotham, 2023
                        "Reboot and rejoice!" F. Pishotta, 1989

                        Comment


                          #13
                          It is not clear to me what your test environment is. Are the two HS4 computers close to each other so both will see the beacon via the Bluetooth interfaces? Are you publishing the beacon from Windows HS4 computer (i.e. has pub topic text box with Beacon/xxxx)? Am I not familiar with blueman-applet, but I will guess that it attaches to the Bluetooth hardware on RPi. If this is the case then I do not know if the hardware can be shared by two simultaneous users (blueman and mcsMQTT).

                          Comment

                          Working...
                          X