have made several apps with App-Inventor but now stumbled upon a problem I have not yet found a solution for.
I am trying to get my Domoticz (home automation) system responding to an app.
However I do not get the API call working properly.
Any suggestions.
Here is the link to the API documentation:
https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Get_all_lights.2Fswitches
So basically what I am trying to do is this:
I am trying to get my Domoticz (home automation) system responding to an app.
However I do not get the API call working properly.
Any suggestions.
Here is the link to the API documentation:
https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Get_all_lights.2Fswitches
So basically what I am trying to do is this:
http://192.168.1.2:8080//json.htm?type=command¶m=switchlight&idx=99&switchcmd=Off
When I enter this in a web-browser (using the right IP number and IDX for the switch) my switch nicely turns off.
Now what I would like to have is some code that does this when I push a button on my screen.
Would also be nice to get the list of devices in my system in a database using this:
/json.htm?type=devices&filter=light&used=true&order=Name
Anybody any idea ???
--
use the web component together with your URL
Sorry made a mistake in the original post
should be a single "/" before the json part just like above in the blocks.
--
sorry, I have overseen, that you are using a local ip and port 8080
this probably does not work? see also: API connect through port 8080
--
I changed port 8080 in Domoticz to port 80 and made sure this was working
Then altered my code in Mit App-Inventor and no luck,,,,,
Next step I tried to access from global IP number (not local) and also no success.
Anybody around with Domoticz experience ???
Then altered my code in Mit App-Inventor and no luck,,,,,
Next step I tried to access from global IP number (not local) and also no success.
Anybody around with Domoticz experience ???
--
Thanks for your prompt reply's anyway......
--
Next step I tried to access from global IP number (not local) and also no success.
global ip without port should work...