Ok, I finally got mine working again. Turned out to be something I broke on my end quite awhile back while I was experimenting with converting this app to be LAN-connected instead of having to communicate from the cloud.
@hondohudson - I think your problem is different than mine. Based on the line # in your error, I think yours is still the authentication access token issue. Do you have the latest code from my edits from this link?
The code around line 203 should look like this:
private doLogin() {
// TODO: make call through hub later...
apiPost("/api/4/auth/login",[pwd: settings.password, remember: 1]) { response ->
if (response.status == 200) {
//state.auth.expires_in = now() + response.data.expires_in
//state.auth.access_token = response.data.access_token
//Only refresh the token if it has expired
if (response.data.access_token != null){
state.auth.access_token = response.data.access_token
state.auth.expires_in = now() + response.data.expires_in
}
return true
} else {
return false
}
}
}
Ok so it looks like you put in a local IP address. That wonāt work. This is because SmartThings is going to be hitting your RainMachine from the cloud, which means you need to put in your public IP. That also means you need to make sure port 80 is forwarded from your router to the RM IP.
On a related note, I do still want to rewrite this app at some point to be able to connect from the hub over LAN. It will just take a few days of work, and I havenāt had any free time to mess around with it.
Iām getting the same error message as above: āError saving unnamed page. Please contact SmartApp developerā, although I definitely use external IP address and port forwarding. I verified that I can access RainMachine externally from the browser.
The log contains MissingPropertyException on line 348
Thanks in advance!
5:53:30 PM: error groovy.lang.MissingPropertyException: No such property: ErrorMessage for class: java.io.ByteArrayInputStream @ line 348
ec10834d-8df9-4ea5-ad82-17ef291bb0b7 5:53:30 PM: debug HTTP POST : [uri:http://67.86.xxx.xxx:18080, path:/api/4/auth/login, contentType:application/json, query:[access_token:], body:[pwd:xxxxxxxxx, remember:1]]
f75ec2b1-2e00-4a20-a510-421ac246c7ff 5:53:26 PM: debug summaryData: [[icon:indicator-dot-gray, iconColor:#878787, value:Unconfigured]] - [[icon:indicator-dot-gray, value:Unconfigured, iconColor:#878787]]
Your error message is slightly different, actually. Iāve not seen that one before. For what itās worth, I was never able to get SmartThings to connect unless I opened up port 80. Mine is actually not working right now because I switched to AT&T, and their dumb router apparently doesnāt let you forward port 80 because the native interface is stuck on it and canāt be reconfigured. My plan is to rewrite this app to use local LAN access before watering season starts.
Thank you for your hard work Copyninja I used your MyQ stuff for my Chamberlain garage door and it worked perfect. I sent you a donation for that one and as soon as I get my Rainmachine I am going to send you another donation. Thank You so much.
Finally started writing code to do this integration via LAN. It will take me awhile because it SUCKS, big time. SmartThings does not make this easy, and the documentation is not helpful. Good news is Iām able to get a response back from my Rainmachine via LAN, so now the biggest hurdle is parsing everything, which is a good deal more complicated this way for various reasons.
Yes! Itās definitely going to work. Last week I finished rewriting the install process to be able to set up everything using the local IP, and it works beautifully. I still need to rewrite the refresh process - might take another week or two, though before I get the time to finish it.
Iāll also need to rewrite the āstopā and āstop allā commands, but I canāt really test those out until I have the system up and running, which I donāt normally do until late April or May, so that may have to wait a bit. Iāll try and post a version that has the basic install/refresh capability first just so people can test it out and make sure it works.