Hi,
I'm new to Hubitat having moved from ST.
Finding it great but trying to set up some functionality that I'm not completely familiar with.
I'm trying to 'talk' to my solar inverter website and it seems there is a two step process, first I have to make a login request then a request for the data. When I put the http commands into the browser, both work fine and I get a json looking response. However when i directly paste the http statements into my device driver, the second one doesn't work and wont even let me save the driver file, it say 'Not found on line 13' (in this example).
So there is obviously something wrong with the variable commandPlant but how come it works in the browser? Is there some characters that Hubitat doesn't like?
I've really tried but drawn a blank please help!!!
-
def commandLogin= "http://m.ginlong.com/cpro/login/validateLogin.json?userName=someone@yahoo.co.uk&password=apassword&lan=2&domain=m.ginlong.com&userType=C"
-
def commandPlant= "https://m.ginlong.com/cpro/epc/plantDetail/showPlantDetailAjax.json?plantId=999999&APP_ID=123456&APP_SECRET=123456"
-
httpGet(uri: "${commandLogin}"){ respLogin ->
-
httpGet(uri: "${commandPlant}"){ respPlant ->