Page 1 of 1
Events JSON - disable/enable
Posted: Wednesday 16 November 2016 9:25
by galadril
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
Re: Events JSON - disable/enable
Posted: Wednesday 16 November 2016 11:38
by elmortero
Re: Events JSON - disable/enable
Posted: Wednesday 16 November 2016 20:50
by Slinkos
That is not about enabling or disabling events, is it?
Re: Events JSON - disable/enable
Posted: Thursday 17 November 2016 9:24
by elmortero
My mistake.
Re: Events JSON - disable/enable
Posted: Friday 23 December 2016 11:47
by galadril
Bump

Re: Events JSON - disable/enable
Posted: Monday 13 February 2017 15:13
by ultratoto14
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.
Code: Select all
/json.htm?type=events¶m=updatestatus&eventid=21&eventstatus=0
Best regards,
U.
P.S. you can now work on additional triggering words on voice recognition

Re: Events JSON - disable/enable
Posted: Monday 13 February 2017 15:17
by galadril
thanks!!
Re: Events JSON - disable/enable
Posted: Monday 25 December 2017 7:05
by farhanito
sorry for waking up old thread..
where can we find this eventid?
Re: Events JSON - disable/enable
Posted: Friday 19 January 2018 8:50
by irongarment
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?
Re: Events JSON - disable/enable
Posted: Saturday 07 April 2018 12:49
by pmalvino
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
Re: Events JSON - disable/enable
Posted: Sunday 03 May 2020 16:55
by bouarbebou
Hi,
To find the eventid : /json.htm?type=events¶m=list
Re: Events JSON - disable/enable
Posted: Wednesday 07 May 2025 18:43
by AngelG
bouarbebou wrote: ↑Sunday 03 May 2020 16:55
Hi,
To find the eventid : /json.htm?type=events¶m=list
ultratoto14 wrote: ↑Monday 13 February 2017 15:13
Code: Select all
/json.htm?type=events¶m=updatestatus&eventid=21&eventstatus=0
From Stable 2023.2:
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