Change multiple switch state with json call

Moderator: leecollings

Post Reply
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Change multiple switch state with json call

Post by Slinkos »

Hi all,

With this json call you can turn a switch off:

Code: Select all

/json.htm?type=command&param=switchlight&idx=99&switchcmd=Off
My question: Is it possible to set 2 (or more) switches to "Off" within 1 json call?
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Change multiple switch state with json call

Post by gizmocuz »

Put them in a group or scene, and turn this on/off
Quality outlives Quantity!
Slinkos
Posts: 81
Joined: Thursday 10 December 2015 0:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Re: Change multiple switch state with json call

Post by Slinkos »

Yeah I could do that, or make a dummy switch with an event that triggers both. But I was just curious if it is possible at all.
flabrosse
Posts: 18
Joined: Thursday 07 July 2016 20:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Change multiple switch state with json call

Post by flabrosse »

I have a similar question. One of my devices (an ESP-12) regularly sends two pieces of information (temperature and voltage) to domoticz, both each time. I only just realised that often only one gets to domoticz. So I was wondering if I could merge the two in one JSON call.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest