[OBSOLETE] Flume Water Meter Smartthings Smartapp + Flume Water Meter Device Handler

I would need to dive/research more into the custom alerts structure of the Flume api but I believe it’s doable, as this takes time. Don’t have an estimate on completion but I added this use case to my request/feature backlog along with adding data values, and adding connected status, and battery levels. No particular priority at the moment what ever is faster to release combine with use case value.

I haven’t followed what s0nniez recent code changes have been made so you would need to reach out to him for further inquiries.

FYI I just released an improved fully rewritten version at [RELEASE] SmarThings Smart App and Device Handler for Flume Smart Home Water Monitor

FYI updated version is ready on the GitHub GitHub - getterdone/FlumeWaterMeter: Flume Water Meter Smartthings Smartapp + Flume Water Meter Device Handler.

Thank you C.K. for the donation :), very much appreciated.

The updates are complete for legacy values for data monitoring** and custom alerts.**
This version gets alerts values every 3 minutes+30 random seconds/hour.
Water flow values every 9 minutes + 30 random seconds/hour.
Battery and Wifi Connected evey 31 minutes + 30 random seconds/hour.

Known Issues: 120 calls to the Flume API per hour are shared across all users so there’s way no way to get around them at this point without using the Node proxy workaround that @NickT has provided.

**What does this mean?
In this implementation there are 20 calls/hour made for alerts, so through testing/observing Live Logging I noticed that out of those alerts 2/20 (10%) to 6/20 (30%) will not make a successful call to the Flume api. So the alert will not be updated unless a successful call to Flume server is made. So best case scenario the water wet alert will be reflected on the Flume Smartthings app 3-9 minutes after it happens and worst case scenario you will receive water wet alert 21-27 minutes after it happens.

Rate limits are out of my techie know how and while I can apply the Node proxy solution that @NickT has provided in his Flume redesign that would be redundant at this point plus I’m pretty short on free time these days so it will take a while before I revised this implementation with the Node proxy rate limit workaround .

In short, this version works without Node proxy but please take into consideration the known issues above :).

sorry for the dumb question, but what exactly does this line mean? add the smartapp and the device handler in the ide side you then go to the smartapp settings on the SmartThings ide.
what other IDE side is there but the Smarthings IDE?
My issue is that after creating the app, entering my Flume ID and secret code into the app, once i try to launch the app on my phone it states processing asks for my service manager - email and PW then boots me out. launching again gets the same results. below is the errors i receive, Can anyone figure out what i’m doing wrong? thanks in advance

line 239 - headers[“Authorization”] = “Bearer ${state?.myToken[0]}”
line 1528 - path: “auth”,

4a773de3-e5b0-4cd5-91f2-ef07d41ab3a8 12:58:00 PM: error java.lang.NullPointerException: Cannot invoke method getAt() on null object @line 239 (getDefaultAuthHeaders)
4a773de3-e5b0-4cd5-91f2-ef07d41ab3a8 12:58:00 PM: debug line 1528 initFlume_locations(flumeUserId) = null
4a773de3-e5b0-4cd5-91f2-ef07d41ab3a8 12:58:00 PM: error getJWT Exception: groovyx.net.http.HttpResponseException: Bad Request @line 262 (login)
4a773de3-e5b0-4cd5-91f2-ef07d41ab3a8 12:58:00 PM: error getJWT Exception: groovyx.net.http.HttpResponseException: Bad Request @line 262 (login)
4a773de3-e5b0-4cd5-91f2-ef07d41ab3a8 12:57:49 PM: debug getChildDevices(false), children=0

That line refers to going to the Settings of the Flume SM using the Smartthings ide:
Go here and click App Settings highligjted in Red:

Now in the App Settings, you then add your Flume API key + secret values here highlighted in red:


You can also enable Oauth.
After click ‘Update’

Try deleting the smartapp and device handler from the smartthings ide and try again.
Follow the steps below found on the github link:

  1. You need to get your API Client key and Secret Key from Flume’s Customer Portal https://portal.flumetech.com/ See this help guide on steps: Introduction

  2. Once app is installed in Smartthings web IDE you will need to provide Client Key and Secret Key in the Flume Smartapp>Edit SmartApp>settings: Add your Client and Secret info here.

  3. Don’t forget to do enable Oauth Flume Smartapp>Edit SmartApp>OAuth

  4. Install/Add the Flume Smart App using your iOS/Android Smartthings Mobile OneApp App:
    From dashboard Click the + , In the ‘Add’ screen select ‘SmartApp’ then in the list find/select the smartapp ‘OneApp Flume Water Flow SM’

  5. Once you enter your login credentials in the Flume Options smartthings app click Done. That’s it.

Notes: This new OneApp implementation will find your Flume device(s) and assigned the names automatically based on the names you initially provided on the Flume ios/android app. Look for your Flume device(s) on your Smarthings OneApp dashboard. This will handle Low Leak Alerts, Custom Alerts, and High Flow Alerts.

  1. Enjoy

I have the same issue, so you completely removed the DH and app and started over and everything worked? not sure what you mean by removed from the IDE. I’m a noobie to this app building process

Yes, I went into the Samsung IDE and deleted the Device Handler and the SmartApp (both of which you add as part of the install) and then just did the install from scratch again.

So there’s no particular order for the DH versus the app? I was wondering since I don’t see the device before I load the app if that’s why it’s not working but I don’t know I’m grasping at straws. I’ve done this a couple times and it doesn’t seem to be any different

Just to be clear, in the IDE you need to add both the Device Handler (in “My Device Handlers”) and the SmartApp (in “My SmartApps”). After both are added with your credentials the “Flume” smartapp should be available in the mobile app.

1 Like

Thank you for responding. I have created both the DH and the app. not sure what you mean by “After both are added with your credentials” can you explain please? I have the app available to me but it seams as if it isn’t accepting my PW.

In the IDE, in the smartapp (in the list of smartapps, click the icon to the left of the name, a square with a pencil called “Edit properties”), did you enter your Flume API and Secret in the “settings” section and did you make sure OAuth is enabled in the “OAuth” section?

i’m not sure if this is how it is supposed to work but i was running the app from the app section. I just now noticed an item on my home screen named with the Flume water sensor. low and behold i open it and there it is. I feel very stupid right now, sorry for wasting your time

i’m sure it isn’t working correctly. i manually created the device and that kind works, i can see usage but the status is always wet.the app still kicks me out after entering my PW. i have checked many times to make sure the flume info is present.Any thoughts?

Sensor reset: The implementation relies on the Flume ios/android notifications such as custom alerts. If you want to reset to dry you NEED to clear your notifications from the Flume ios/android app then wait usually 9-15 minutes and the sensor will reset to dry.

PW entered: Once you enter your username and password that’s it, click done there’s nothing else to do. Go back to SmartThings home/dashboard.

Find the Flume sensor listed on your home/dashboard SmartThings app, you’re done.

So the app is only used for settings, everything else is done with the dashboard device? are you supposed to manually have to create the device? I did. Also, i deleted the notifications in the flume app.on Friday and it was still wet today so i deleted and recreated the device. probably the wrong move but i just cant get this to work

Try deleting the Flume SM app. When installed properly deleting the Flume SM also removes the Flume sensor automatically. In your case the sensor you added manually will need to removed manually if it’s still lingering.

Then start from step 4 post above.

I have been able to install both SmartApps/DTH’s and I see the sensor show up in my SmartThings App.

However, I am unable to create an automation – when I try to create a rule, the Smart App/Sensor does not appear under the list of devices to obtain status from.

What am I doing wrong? I am trying to create a rule that says if in Away or Vacation mode and the Sensor shows ‘wet’ to do X Y Z …

Thanks!

Hi,

For now the workaround is to use Webcore to make automations.
I opened a thread on the developer side to ask what other steps I need to make sure this device is listed within the Automations sections of the new Smarrthings app.

Device not showing in Automations - Developer Programs / Support - SmartThings Community

Hi, I’m having trouble re-installing the SmartThings SmartApp and Device Handler. I had the an older version of the SmartApp installed from a long time ago, which I created in the SmartThings Classic android app. I’ve since gotten a Flume2, and I’m trying to re-install from scratch. I’ve deleted everything, making sure there are no legacy configurations (devices, apps, device handlers).

Good news is I’m able to successfully add the SmartApp (and turn on OAuth and enter the client id/secret), as pictured below…

But I’m not able to install the Device Handler. When I select the Device Handler to install…

…I get a generic message that it was skipped due to errors…

I also tried creating the Device Handler manually by copying/pasting the code from the repo, which seemed to work fine, but when I launch the Flume SmartApp, enter my login credentials, and connect successfully, it’s supposed to automatically add my Flume device to my list of Devices, but it did not do so. Not sure how to get my Flume device actually added to the SmartThings app.

Note: I also tried the other SmartApp (the one that doesn’t have “Meter” in the title) but, again, trying to add the Device Handler from the repo failed. I also tried with both SmartApps installed…same results.

Not sure what else to troubleshoot here. Any assistance would be appreciated!

@Smartphi any chance you will update this for Edge?

1 Like