Page 1 of 1
JSON full spec? Scenes/Groups
Posted: Saturday 28 September 2013 19:04
by maq1017
Hi there,
New to Domoticz and JSON, but currently coding an interface to integrate my existing LightWave system into Domoticz, retaining use of the original (pretty bad!) LW remote app.
I'm struggling to see what you can do with JSON, and specifically looking to understand how you trigger groups or scenes. Can anyone provide any examples, or even better if there is a full spec for the JSON calls out there somewhere.
I have individual switches triggering fine via JSON, but I don't fancy adding a virtual switch to trigger each scene unless thats the only way to do it, as my set up is scene heavy. Any help appreciated!
Regards,
M
Re: JSON full spec? Scenes/Groups
Posted: Sunday 29 September 2013 10:33
by gizmocuz
There is not a documented json interface yet. (who want to do this?)
Best thing todo is look at the domoticz web interface and html pages.
For switching devices/scenes, have a look in domoticz.js (but also of course in the html pages)
With kind regards,
Rob
Re: JSON full spec? Scenes/Groups
Posted: Monday 30 September 2013 17:09
by gertjuhh
I started expanding the Wiki, although progress is slow.
http://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s
Re: JSON full spec? Scenes/Groups
Posted: Tuesday 01 October 2013 1:03
by maq1017
Already very helpful updates, thank you

Re: JSON full spec? Scenes/Groups
Posted: Sunday 27 December 2015 21:40
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: JSON full spec? Scenes/Groups
Posted: Monday 11 March 2019 7:50
by klauskinski
Hi, guys,
Let's restart this topic again... I'm doing DIY electronics that talks JSON over mqtt (which works fine). However, in order to make it work with domoticz, I'd need the domoticz JSON specs. It's dead simple to do it for a sensor with a single value (e.g. a dummy temperature sensor), however I use sensors that report multiple values, e.g. BMP280 which reports temperature, baro pressure and humidity or a gyro that report 3D position changes as well as other values.
So, the question is does somebody have a guide to domoticz JSON over mqtt?
Thanks,
klaus
Re: JSON full spec? Scenes/Groups
Posted: Monday 11 March 2019 8:56
by waaren
klauskinski wrote: ↑Monday 11 March 2019 7:50
I'd need the domoticz JSON specs. It's dead simple to do it for a sensor with a single value (e.g. a dummy temperature sensor), however I use sensors that report multiple values, e.g. BMP280 which reports temperature, baro pressure and humidity or a gyro that report 3D position changes as well as other values.
So, the question is does somebody have a guide to domoticz JSON over mqtt?
The domoticz JSON guide is maintained
here and the mqtt JSON syntaxis is derived from these commands.
example: Temperature/humidity/barometer
JSON:
Code: Select all
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=TEMP;HUM;HUM_STAT;BAR;BAR_FOR
MQTT:
Code: Select all
#mosquitto_pub -t domoticz/in -m '{"idx": IDX, "nvalue": 0, "svalue":"TEMP;HUM;HUM_STAT:BAR;BAR_FOR" }'
- Spoiler: show
- sets the parameters for a Temp+Humidity+Barometer device
IDX = id of your device (This number can be found in the devices tab in the column "IDX")
TEMP = Temperature
HUM = Humidity
HUM_STAT = Humidity status
BAR = Barometric pressure
BAR_FOR = Barometer forecast
HUM_STAT can be one of:
0=Normal
1=Comfortable
2=Dry
3=Wet
Barometer forecast can be one of:
0 = No info
1 = Sunny
2 = Partly cloudy
3 = Cloudy
4 = Rain
Re: JSON full spec? Scenes/Groups
Posted: Monday 11 March 2019 9:27
by klauskinski
Thanks, I'll give it a try.