Domoticz API/JSON?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Domoticz API/JSON?

Post 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-
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Domoticz API/JSON?

Post 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 :roll:
sebas
Posts: 117
Joined: Tuesday 17 September 2013 7:46
Target OS: Linux
Domoticz version:
Location: Deventer, The Netherlands
Contact:

Re: Domoticz API/JSON?

Post 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 :roll:
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?
gertjuhh

Re: Domoticz API/JSON?

Post 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 :roll:
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.
User avatar
Keptenkurk
Posts: 103
Joined: Wednesday 21 August 2013 17:24
Target OS: -
Domoticz version:
Location: Waalre, The Netherlands
Contact:

Re: Domoticz API/JSON?

Post 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
seblang
Posts: 10
Joined: Sunday 27 December 2015 21:24
Target OS: Windows
Domoticz version:
Contact:

Re: Domoticz API/JSON?

Post 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
mrcage
Posts: 6
Joined: Monday 28 December 2015 11:53
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz API/JSON?

Post by mrcage »

You should try Basic Authentication or disable the authentication for local networks
Domoticz newbie :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest