Announcement

Collapse
No announcement yet.

Help getting started on a temperature hub project

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

    #16
    Did you not see the screenshot in the message that showed the rest if the commandsI tried sending? This is just a status only device in HS so no control is needed. I tried adding the /status and publishing that topic and when I did that nothing worked. The commands I sent from the rpi failed to send and nothing showed in the debug logs indicating the connection was there.

    Comment


      #17
      Your database shows shows two topics having been published. This is the Source column. Your screenshot shows the same topic with seven different payload values. The database has no entries in the Topic column so nothing has been setup to publish a MQTT topic when a HS device changes.

      What you have setup now is that HS device 677 will have its DeviceValue updated to the payload of test_message3 topic each time mcsMQTT receives this topic.

      If, for example, you want to to publish something when the existing HS device 114 has changed then you will use the Association tab to "A" checkbox on the row with Ref of 114. Then edit, if desired, the pub topic on the same row in the textbox that appears. There will be a default pub topic created.

      Overall I am not understanding what you are trying to accomplish. You indicated "I tried adding the /status and publishing that topic and when I did that nothing worked.", but I do not know where you did this as the database has no record of a topic with /status. You indicated "The commands I sent from the rpi failed to send". How did you send commands from RPi? Is the RPi the HS computer or something else on the same network? You indicated "The commands I sent from the rpi failed to send". The only connection that is made is the mcsMQTT client connecting to the MQTT broker. This sequence of a successful connection is shown in the debug including mcsMQTT publishing the Last Will and Testament message indicating that is online.

      Code:
      3/17/2021 7:08:48 PM 628 | Spawning Internal MQTT Broker
      3/17/2021 7:08:48 PM 637 | MQTT Thread Started with broker 1 127.0.0.1, Shutdown=False, Disconnect=False, Client=False, Connected=False, gValueCallback=True
      3/17/2021 7:08:48 PM 638 | MQTT Thread Not Connected Yet
      3/17/2021 7:08:48 PM 638 | Calling MQTTclient for Broker 1
      3/17/2021 7:08:48 PM 640 | MQTT Thread Client Created for Broker 1
      3/17/2021 7:08:48 PM 640 | MQTT Thread Client ID=mcsMQTT on Weber-HomeCTRL
      3/17/2021 7:08:48 PM 640 | Calling MQTT Connect
      3/17/2021 7:08:48 PM 640 | Pre-connect oMQTTClient(0) is Nothing=False
      3/17/2021 7:08:48 PM 654 | MQTT Thread Broker 1 127.0.0.1 Connect Response=0
      [B]3/17/2021 7:08:48 PM 655 | MQTT Broker 1 Connection Accepted, Connected=True to broker 127.0.0.1[/B]
      3/17/2021 7:08:48 PM 657 | Publish Weber-HomeCTRL/mcsMQTT/LWT=Online
      Click image for larger version

Name:	Capture.PNG
Views:	81
Size:	36.3 KB
ID:	1463869

      Click image for larger version

Name:	Capture1.PNG
Views:	50
Size:	77.4 KB
ID:	1463870

      Comment


        #18
        So what I am trying to do here is do a proof of concept with an RPI that I have here on my network for another function, that is separate from my HS4 system. I want to find a solution that I can hang a bunch of 1 wire temperature probes off of, and thought a RPI would be a somewhat easy option because I have some existing experience with that platform and to get the actual temp data into the RPI doesn't take much. At this point I'm not looking for any sort of control of the non HS system/remote RPI, just want to send temperatures from the probes every couple of minutes or so to my HS system. The screenshot of the shell session on the RPI is what I was actually sending to mcsmqtt at the same time the debug log was enabled and running-the point of that was to show that the debug log was not showing the messages coming through for the topic test_message3. So if I am understanding correctly what you are trying to explain is that what I had setup for device 677 should have been working for what I was trying to do?

        Comment


          #19
          That is correct. You should have seen HS device 677 being updated as new temperature readings were delivered. You could also enable the history for this topic or for this device so it will be recorded in a a SQLite or InfluxDB database for later viewing of the time history of the temperature.

          Comment


            #20
            Thank you for clarifying, so it sounds like at least I have it setup correctly. The issue remains however that the payload is not getting updated everytime I send the message for the test_tmessage3 topic. If I run wireshark on my HS4 machine while I am sending the message from the RPI, I can see the messages in the packet trace as getting to the server, however those same messages do not display in the debug log and device 677 does not get updated.

            Comment


              #21
              This seems like you have an issue with your MQTT broker that get a message, but does not forward it. Your debug shows subscription is for everything that the broker receives so it is the brokers job to forward everything it knows about. What I also recall from your debug is that you are using the internal mcsMQTT broker. For your testing change the QOS of the published messages from 0 to 1 so the broker will confirm that each client received the message. A QOS level of 0 means broker sends the message, but does not look for a receipt acknowledge. If you are using Wireshark then have it running on the HS computer so you see what it actually received at that point.

              Comment


                #22
                Is that set on the general page-outbound management Default QOS? At Most, At least exactly? or on the edit/add topic section for that device?

                Comment


                  #23
                  It is set by the publisher of the message. In your case it is the RPi client that is publishing.

                  Another thing you an do is install mosquitto broker on your RPi and have mcsMQTT use that broker rather than the internal broker. I use mosquitto broker in my environment. sudo apt-get install mosquitto

                  If you do setup a different broker then mcsMQTT and your test client also need to be setup to use this different broker.

                  Comment


                    #24
                    Originally posted by Michael McSharry View Post
                    It is set by the publisher of the message. In your case it is the RPi client that is publishing.

                    Another thing you an do is install mosquitto broker on your RPi and have mcsMQTT use that broker rather than the internal broker. I use mosquitto broker in my environment. sudo apt-get install mosquitto

                    If you do setup a different broker then mcsMQTT and your test client also need to be setup to use this different broker.
                    Adding a -q 1 to the command syntax was the ticket, updates every time. The only issue I have now is that homeseer is rounding the number. It is coming from mcsmqtt correctly with the decimal point and the number, but it is rounding up or down to a whole number. That is a homeseer issue, not the plugin. I appreciate the help in getting me going with this and continuing to work through my learning curve. I have proven this out enough to know that it should work for what I need which was the whole point of this exercise.

                    Comment


                      #25
                      The value stored inside HS is a Double so the precision exists. It is just a display issue that you are observing. Use /deviceutility page of HS, Status Graphics tab, and change the displayed number of decimal places to whatever you want.

                      If you need to raise the Quality Of Service to get reliable operation, then it is an indication of some marginal behavior on your network so this may be a canary in the coal mine situation.

                      Comment

                      Working...
                      X