Events JSON - disable/enable

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Events JSON - disable/enable

Post 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&param=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
elmortero
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

Post by elmortero »

Slinkos
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

Post by Slinkos »

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?
elmortero
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

Post by elmortero »

My mistake.
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Events JSON - disable/enable

Post by galadril »

Bump :cry:
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
ultratoto14
Posts: 34
Joined: Thursday 27 October 2016 8:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Events JSON - disable/enable

Post 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&param=updatestatus&eventid=21&eventstatus=0
Best regards,
U.

P.S. you can now work on additional triggering words on voice recognition ;-)
User avatar
galadril
Posts: 828
Joined: Monday 07 September 2015 10:32
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Events JSON - disable/enable

Post by galadril »

thanks!!
Solar panels of Ginlong, Omnik-Solar, Transenergy or Solarman?? Try my Android app:
https://play.google.com/store/apps/deta ... ongmonitor
farhanito
Posts: 34
Joined: Friday 19 August 2016 5:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Events JSON - disable/enable

Post by farhanito »

sorry for waking up old thread..

where can we find this eventid?
irongarment
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

Post 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?
pmalvino
Posts: 16
Joined: Monday 13 April 2015 22:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Events JSON - disable/enable

Post 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
bouarbebou
Posts: 1
Joined: Sunday 03 May 2020 16:51
Target OS: Linux
Domoticz version:
Contact:

Re: Events JSON - disable/enable

Post by bouarbebou »

Hi,
To find the eventid : /json.htm?type=events&param=list
AngelG
Posts: 1
Joined: Saturday 12 January 2019 17:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Events JSON - disable/enable

Post by AngelG »

bouarbebou wrote: Sunday 03 May 2020 16:55 Hi,
To find the eventid : /json.htm?type=events&param=list
ultratoto14 wrote: Monday 13 February 2017 15:13

Code: Select all

/json.htm?type=events&param=updatestatus&eventid=21&eventstatus=0
From Stable 2023.2:

Code: Select all

/json.htm?type=command&param=events&evparam=list

Code: Select all

/json.htm?type=command&param=events&evparam=updatestatus&eventid=21&eventstatus=0
Last edited by AngelG on Wednesday 07 May 2025 18:52, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests