Page 1 of 1
Domoticz API/JSON?
Posted: Thursday 24 October 2013 21:59
by alfred_j_kwak
Is it possible for me to do something?
I spend last night trying to read Domoticz temperature values with Tasker. JSON API in Wiki
http://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s doesn't help much. Searching and reading several threads gives me "type=devices&rid=<DEVICE_ID> and I got it running. Is there any documentation about types, parameters and commands? If not - can I do something to put together kind of a list?
-Jussi-
Re: Domoticz API/JSON?
Posted: Thursday 24 October 2013 22:21
by Keptenkurk
In
this message Gizmocuz points to getting the info from the source code mainworker.cpp especially the decode_xxx parts. Now this doesn't solve the puzzle for me as a c++ noob (even installed notepad++ for it), but maybe someone else can show how to interpret this to get a working JSON from there. Would love to add it to the Wiki
Re: Domoticz API/JSON?
Posted: Friday 25 October 2013 8:37
by sebas
Keptenkurk wrote:In
this message Gizmocuz points to getting the info from the source code mainworker.cpp especially the decode_xxx parts. Now this doesn't solve the puzzle for me as a c++ noob (even installed notepad++ for it), but maybe someone else can show how to interpret this to get a working JSON from there. Would love to add it to the Wiki
The API isn't very well documented so it's a bit of reverse engineering. For the Android app I looked at the sources of the web frontend and used the developer console of Chrome to track all the API commands that are send by website.
What are you trying to do using json?
Re: Domoticz API/JSON?
Posted: Friday 25 October 2013 9:08
by gertjuhh
sebas wrote:Keptenkurk wrote:In
this message Gizmocuz points to getting the info from the source code mainworker.cpp especially the decode_xxx parts. Now this doesn't solve the puzzle for me as a c++ noob (even installed notepad++ for it), but maybe someone else can show how to interpret this to get a working JSON from there. Would love to add it to the Wiki
The API isn't very well documented so it's a bit of reverse engineering. For the Android app I looked at the sources of the web frontend and used the developer console of Chrome to track all the API commands that are send by website.
What are you trying to do using json?
Could you please add your missing findings to
http://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s ?
The more people contribute, the better the documentation will become.
Re: Domoticz API/JSON?
Posted: Friday 25 October 2013 11:26
by Keptenkurk
What are you trying to do using json?
Nothing special really. My use case was to get some Space Weather (solar flux, A index, K index) into the dashboard. These indicate radio propagation possibilities - which is another hobby
But next will be changing the temperature set value for my heating control script (so changing a dummy temperature). (but it's still so warm outside, my heater hasn't even been switched on)...
Could you please add your missing findings
Sure will!
/paul
Re: Domoticz API/JSON?
Posted: Sunday 27 December 2015 21:50
by seblang
hi
I want to command a light with external http command :
http://XXXXXX:[email protected]:8080/j ... itchcmd=On
when I start this commande in script i have :
Iacces not authorizzed for command :
http://XXXXXX:[email protected]:8080/j ... itchcmd=On
on the wiki it is a comment about Authorization (
https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's)
I have found solution to convert to base64 Encode. but i do not know how to use it!
thank for help
seb
Re: Domoticz API/JSON?
Posted: Monday 04 January 2016 22:50
by mrcage
You should try Basic Authentication or disable the authentication for local networks