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
JSON full spec? Scenes/Groups
Moderators: leecollings, remb0
- gizmocuz
- Posts: 2350
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: JSON full spec? Scenes/Groups
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
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
Quality outlives Quantity!
Re: JSON full spec? Scenes/Groups
I started expanding the Wiki, although progress is slow.
http://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s
http://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s
-
- Posts: 4
- Joined: Saturday 28 September 2013 18:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: JSON full spec? Scenes/Groups
Already very helpful updates, thank you
-
- Posts: 10
- Joined: Sunday 27 December 2015 21:24
- Target OS: Windows
- Domoticz version:
- Contact:
Re: JSON full spec? Scenes/Groups
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
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
-
- Posts: 3
- Joined: Monday 11 March 2019 7:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Switzerland
- Contact:
Re: JSON full spec? Scenes/Groups
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
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
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: JSON full spec? Scenes/Groups
The domoticz JSON guide is maintained here and the mqtt JSON syntaxis is derived from these commands.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?
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
Code: Select all
#mosquitto_pub -t domoticz/in -m '{"idx": IDX, "nvalue": 0, "svalue":"TEMP;HUM;HUM_STAT:BAR;BAR_FOR" }'
- Spoiler: show
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 3
- Joined: Monday 11 March 2019 7:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Switzerland
- Contact:
Re: JSON full spec? Scenes/Groups
Thanks, I'll give it a try.
Who is online
Users browsing this forum: Amazon [Bot], palnic and 0 guests