Events JSON - disable/enable
Moderators: leecollings, remb0
- galadril
- Posts: 828
- Joined: Monday 07 September 2015 10:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Contact:
Events JSON - disable/enable
Hi,
Can you please change the json call so events can be enabled or disabled (without changes on the event code/blockly):
/json.htm?type=events¶m=update&eventid=21&eventstatus=0
At this moment Domoticz always does a param=create, with the full code/blockly xml in the url.
Best Regards
Mark
Can you please change the json call so events can be enabled or disabled (without changes on the event code/blockly):
/json.htm?type=events¶m=update&eventid=21&eventstatus=0
At this moment Domoticz always does a param=create, with the full code/blockly xml in the url.
Best Regards
Mark
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
https://play.google.com/store/apps/deta ... ongmonitor
-
- Posts: 81
- Joined: Thursday 10 December 2015 0:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Re: Events JSON - disable/enable
elmortero wrote:That already exists.
Have a look
https://www.domoticz.com/wiki/Domoticz_ ... documented
That is not about enabling or disabling events, is it?
-
- Posts: 247
- Joined: Sunday 29 November 2015 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.9639
- Location: Spain
- Contact:
Re: Events JSON - disable/enable
My mistake.
- galadril
- Posts: 828
- Joined: Monday 07 September 2015 10:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Contact:
Re: Events JSON - disable/enable
Bump 

Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
https://play.google.com/store/apps/deta ... ongmonitor
-
- Posts: 34
- Joined: Thursday 27 October 2016 8:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Events JSON - disable/enable
Should be ok, pull request has been merged:
https://github.com/domoticz/domoticz/pull/1225
Compare to what you proposed, I changed the param to updatestatus in order to have something more in sync with the real purpose of the API.
Best regards,
U.
P.S. you can now work on additional triggering words on voice recognition
https://github.com/domoticz/domoticz/pull/1225
Compare to what you proposed, I changed the param to updatestatus in order to have something more in sync with the real purpose of the API.
Code: Select all
/json.htm?type=events¶m=updatestatus&eventid=21&eventstatus=0
U.
P.S. you can now work on additional triggering words on voice recognition

- galadril
- Posts: 828
- Joined: Monday 07 September 2015 10:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Contact:
Re: Events JSON - disable/enable
thanks!!
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
https://play.google.com/store/apps/deta ... ongmonitor
-
- Posts: 34
- Joined: Friday 19 August 2016 5:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Events JSON - disable/enable
sorry for waking up old thread..
where can we find this eventid?
where can we find this eventid?
-
- Posts: 12
- Joined: Friday 24 November 2017 21:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: New Zealand
- Contact:
Re: Events JSON - disable/enable
I think this is what I am looking for too.
I want a way to set the indicator status on a Domoticz icon without causing an event to happen.
For example, I am making an irrigation system with six valves and ESPeasy. I have six switches in Domoticz with water-droplet icons.
If I click on a droplet that is 'off' it causes an 'on' event, which sends a command to ESPeasy to turn on one valve. I use ESPeasy rules internally to turn all of the other valves off.
If I click on a droplet that is already 'on' it causes an 'off' event. This sends a command to ESPeasy which turns off all valves (this is a safety feature, since there should be only one valve on, turning all off will turn that one off, and any others that are stuck on).
ESPeasy also starts a timer internally when any valve is turned on. If the valve is not turned off within a reasonable time then the timer will cause all valves to turn off. This is another safety feature. When all valves are turned off (for whatever reason) I want the icons to change to the 'off' state too.
So, what I want is for ESPeasy to send a JSON packet to Domoticz to turn the droplet icons 'off' and set the Domoticz state for that switch to 'off', but not to cause Domoticz to send an 'off' event.
What I really want, which doesn't seem to be present, although this feature in this thread might be it, is a (selective) decoupling of the on/off actions and on/off indicators. It seems to me that this would be a Good Thing, whereby Domoticz can send an 'on' request to a device, and the device will respond by sending a 'turn on indicator' message back to Domoticz. Similarly, if a device turns itself off it could send a 'turn off indicator' message to Domoticz so that it can be seen to be off, but without causing an 'off' command to be triggered. Without this it is easy to get into all sorts of awkward loops.
Is there such a thing?
I want a way to set the indicator status on a Domoticz icon without causing an event to happen.
For example, I am making an irrigation system with six valves and ESPeasy. I have six switches in Domoticz with water-droplet icons.
If I click on a droplet that is 'off' it causes an 'on' event, which sends a command to ESPeasy to turn on one valve. I use ESPeasy rules internally to turn all of the other valves off.
If I click on a droplet that is already 'on' it causes an 'off' event. This sends a command to ESPeasy which turns off all valves (this is a safety feature, since there should be only one valve on, turning all off will turn that one off, and any others that are stuck on).
ESPeasy also starts a timer internally when any valve is turned on. If the valve is not turned off within a reasonable time then the timer will cause all valves to turn off. This is another safety feature. When all valves are turned off (for whatever reason) I want the icons to change to the 'off' state too.
So, what I want is for ESPeasy to send a JSON packet to Domoticz to turn the droplet icons 'off' and set the Domoticz state for that switch to 'off', but not to cause Domoticz to send an 'off' event.
What I really want, which doesn't seem to be present, although this feature in this thread might be it, is a (selective) decoupling of the on/off actions and on/off indicators. It seems to me that this would be a Good Thing, whereby Domoticz can send an 'on' request to a device, and the device will respond by sending a 'turn on indicator' message back to Domoticz. Similarly, if a device turns itself off it could send a 'turn off indicator' message to Domoticz so that it can be seen to be off, but without causing an 'off' command to be triggered. Without this it is easy to get into all sorts of awkward loops.
Is there such a thing?
-
- Posts: 16
- Joined: Monday 13 April 2015 22:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Events JSON - disable/enable
Hello. Is there any solution for this problem.
I have the same problem, i can not activate the send data in switch device because its a push button for blinds, i need to send to http to modify/actualize the state of the icons of domoticz.
Thank you
I have the same problem, i can not activate the send data in switch device because its a push button for blinds, i need to send to http to modify/actualize the state of the icons of domoticz.
Thank you
-
- Posts: 1
- Joined: Sunday 03 May 2020 16:51
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Events JSON - disable/enable
Hi,
To find the eventid : /json.htm?type=events¶m=list
To find the eventid : /json.htm?type=events¶m=list
-
- Posts: 1
- Joined: Saturday 12 January 2019 17:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Events JSON - disable/enable
bouarbebou wrote: ↑Sunday 03 May 2020 16:55 Hi,
To find the eventid : /json.htm?type=events¶m=list
From Stable 2023.2:ultratoto14 wrote: ↑Monday 13 February 2017 15:13Code: Select all
/json.htm?type=events¶m=updatestatus&eventid=21&eventstatus=0
Code: Select all
/json.htm?type=command¶m=events&evparam=list
Code: Select all
/json.htm?type=command¶m=events&evparam=updatestatus&eventid=21&eventstatus=0
Last edited by AngelG on Wednesday 07 May 2025 18:52, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 1 guest