Announcement

Collapse
No announcement yet.

Question re: Flume Water Integration

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

    Question re: Flume Water Integration

    Hi Michael McSharry. Thanks for including Flume in your mcsMQTT plugin. I'm trying to follow your manual, but am a little confused. What goes in the obscured input box? See attached screenshot (red box). Is that where the payload is supposed to go? I was able to get the client_id, client_secret, username, password and device_id, and tried to follow your example but it was returning some errors. I was wondering If maybe I was entering the wrong thing in the redacted input.

    Thanks in advance for your help.

    Attached Files

    #2
    The payload format is shown just above the red box you marked. It will be something like
    Code:
    {"grant_type": "password","client_id": "1234461UN1WABCD","client_secret": "1234564EIHVA6VABCDEF","username": "myemail@yahoo.com","password": "mypassword"}
    The detail will be specific to your client id, client secret, account email and account password.

    What was the error you were receiving. There may also be some info in the \data\mcsMQTT\mcsMQTT Debug.txt file if you have debug enabled.

    Comment


      #3
      Originally posted by Michael McSharry View Post
      The payload format is shown just above the red box you marked. It will be something like
      Code:
      {"grant_type": "password","client_id": "1234461UN1WABCD","client_secret": "1234564EIHVA6VABCDEF","username": "myemail@yahoo.com","password": "mypassword"}
      The detail will be specific to your client id, client secret, account email and account password.

      What was the error you were receiving. There may also be some info in the \data\mcsMQTT\mcsMQTT Debug.txt file if you have debug enabled.
      Thanks for the confirmation Michael. I don't remember the error (I had cleared out what I had done because I was in the middle of juggling a bunch of other things at the time), but I'll give it another shot and make sure that debug is enabled. Should the error reappear I'll update this thread.

      Much appreciated!

      Comment


        #4
        Hey Michael McSharry I tried setting it up again and am getting the same errors. See screen grabs (I'll compress and direct message you the log)
        Attached Files

        Comment


          #5
          I emailed you the log file. Too big for DM.

          I looked at the log and it looks like it just says it couldn't authorize. I matched the payload format to your instructions and supplied the correct secrets. So, not sure what I'm doing wrong.

          Comment


            #6
            I received you email, but I did not see any attachments. I am away from home now so only webmail is available, but I suspect the attachment missed the ride.

            I did evaluate the Flume integration and did see some issues that came up due to breakage with updates since the integration was done earlier this year.

            In the manual there was a statement to get the Flume devices the text box command from the Device page for flumewater ini 12.7.1 should be “/devices?user=false&location=false”. In the document it was “/devices=user=false&location=false”.

            I also determined that the GET protocol URL when starting with an endpoint of / duplicated the URL. This was fixed in 6.0.0.1. Since I am remote now it is hard to support earlier versions so to be able to take advantage of this fix you need to update to version 6.0.0.1 which is available at https://forums.homeseer.com/forum/hs...ge-log-hs4-hs3. You can install it using the updater_override process or manually as described at the bottom of the thread.

            An authentication error that your are experiencing are likely independent of any issues with the plugin. When I used my credentials in the payload I was able to connect to the Flume server with a 200 rather than 404 status code returned. I do not have any Flume devices so I was not able to evaluate flumetech.com URL. Once you have success with flumewater URL and enter the “/devices?user=false&location=false” from the HS Devices page for the control of this URL then you should have the information about the device(s) you have available and the Flumetech.pub and Flumewater.pub files should be operational as the endpoints. In the ones I was using (attached), the flumetech files assumes the flume device id is returned in an array at second position (:01
            ...api.flumewater.com/me.GET:data:01:type-1:device_id):/... Since I did not have any devices I cannot confirm if :00: or :01: is correct.

            I can add additional debug if needed, but at this point it seems that the values in the bottom textbox on Cloud Page (JSON format) are not correct so when mcsMQTT requests access it is refused (401 code).

            Attached Files

            Comment


              #7
              That's weird. I used your exact format for the payload and am using the client id and secret from their API as instructed, so I'm not sure why the authentication is failing. I'll keep playing with it and also try to install your 6.0.0.1 version. I don't have as much time as I use to now that I have an infant at home, but I'll report any updates as soon as I can. Thanks!

              Comment


                #8
                I updated to your latest version 6.0.0.1, but now when I try to enter the URL info, the additional fields don't show up so I can't add any info beyond the URL.
                Attached Files

                Comment


                  #9
                  Okay the additional fields seems to get created only when I leave the plugin page and return. Didn't have this issue before.

                  Comment


                    #10
                    Okay. I got pass the first authentication issue. It looks like your manual is out of date. Their is more header information that is needed to be filled in for it to authenticate properly. If you go to the "get tokens" interactive page and enter the payload information you'll see the required header at the right: https://flumetech.readme.io/reference/get-tokens-1

                    Now I just need to actually get some information when polling. I have the device id, but not clear where I'm supposed to put it in the query. Should I replace "device_id" with the actual device id?

                    Edit: I re-read your last post. If I understand you correctly, I just need to place the sample .pub files you provided in the appropriate directory and theoretically, the device ID should automatically be captured in the payload. Correct?
                    Attached Files

                    Comment


                      #11
                      From post 6
                      [quote]
                      Once you have success with flumewater URL and enter the “/devices?user=false&location=false” from the HS Devices page for the control of this URL then you should have the information about the device(s) you have available and the Flumetech.pub and Flumewater.pub files should be operational as the endpoints.
                      [\quote]

                      After you do this then the pub file can be used, but make certain what shows in the Association tab does contain the device id and that the JSON array index 00 or 01 is where it shows on the Association table.

                      I believe the default header for accept is Accept: '*/*'; This should mean that mcsMQTT can accept anything the server elects to send, including JSON. I was able to get past the authentication with the default. I can add the explicit application/json in the user manual for the next update.

                      Comment


                        #12
                        My apologies Michael, but I'm a bit confused as to where on the HS Devices page I put the following: “/devices?user=false&location=false”. Is this in the mcsMQTT plugin itself?

                        Edit: Okay, I figured it out. I see that I need to enter it in the device/command text box within the association table for api.flumewater.com. Once I did that all the general information downloaded.

                        Comment


                          #13
                          Okay. More progress. I put both .pub files in the data/mcsMQTT directory and added "/devices?user=false&location=false" to the association table for api.flumewater.com. I am now getting data for that URL. for the api.flumetech.com I'm still not getting any data. I have the polling set to 5 minutes (300000 sec). Do I put "/devices?user=false&location=false" in that one too? I tried with and without it, but no luck.
                          Attached Files

                          Comment


                            #14
                            This is my URL setup page.
                            Attached Files

                            Comment


                              #15
                              In the URL device for FlumeWater next to the SUBMIT button. In my case it is HS Device Feature 5648. This has the same effect as putting it in the Cloud Page, URL Tab for the Endpoint text box with a periodic polling rate, but it happens only when the Submit button is clicked rather than periodically. Your status of this Device Feature should be "Start Polling" as shown for 5648 and it not, then first click the START POLLING to allow the request to be sent. These control buttons exists so a user can start and stop the access to the site via events or from the Devices Page

                              Comment

                              Working...
                              X