Device Notification on/off setting just like timers (active) Topic is solved
Moderators: leecollings, remb0
-
- Posts: 128
- Joined: Saturday 26 March 2016 10:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Device Notification on/off setting just like timers (active)
Hi,
I have the following usecase;
When i leave home i activate the "away" switch.
When "away" i want to receive notifications of motion- and doorsensors for example.
My request is:
What i would like to do is to toggle notification settings for specific devices to 'ON' (or active) just like i can with timers for each device.
When i am home, i don't need to be notified when there is movement in the house, especially not over and over again, day or night, so i'd like to turn OFF notification settings then and/or activate a second setting that would send notifications with different settings. (low priority)
I don't see this option in the JSON/API, this is where/how i would like to control the notification setting.
Thanks!
I have the following usecase;
When i leave home i activate the "away" switch.
When "away" i want to receive notifications of motion- and doorsensors for example.
My request is:
What i would like to do is to toggle notification settings for specific devices to 'ON' (or active) just like i can with timers for each device.
When i am home, i don't need to be notified when there is movement in the house, especially not over and over again, day or night, so i'd like to turn OFF notification settings then and/or activate a second setting that would send notifications with different settings. (low priority)
I don't see this option in the JSON/API, this is where/how i would like to control the notification setting.
Thanks!
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Device Notification on/off setting just like timers (active)
There is no active = true or active = false type of setting for notifications.marmachine wrote: ↑Thursday 18 March 2021 12:11 When "away" i want to receive notifications of motion- and doorsensors for example.
I don't see this option in the JSON/API, this is where/how i would like to control the notification setting.
One way to workaround this would be to set the target notification system to one you do not use. In my case that would be kodi.
The 'deactivate' call would then look look like
Code: Select all
http://<domoticz ip:domoticz:port>/json.htm?devidx=54&idx=17¶m=updatenotification&tmsg=&tpriority=1&tsendalways=false&tsystems=kodi&ttype=7&tvalue=0&twhen=0&type=command
The 'reactivate' call would then look look like
Code: Select all
http://<domoticz ip:domoticz:port>/json.htm?devidx=54&idx=17¶m=updatenotification&tmsg=&tpriority=1&tsendalways=false&tsystems=email;fcm;http&ttype=7&tvalue=0&twhen=0&type=command
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: 128
- Joined: Saturday 26 March 2016 10:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Re: Device Notification on/off setting just like timers (active)
Excellent, thank you Waaren!
-
- Posts: 6
- Joined: Wednesday 20 November 2024 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Paris
- Contact:
Re: Device Notification on/off setting just like timers (active)
Hello everyone,
I am French and sorry in advance if the translation is not quite correct.
I allow myself to raise this subject because despite several tests on two different machines under raspberry the workaround to disable a notification given by "waaren" does not work or no longer works.
Here is the Domoticz version:
Version: 2024.7
dzVents Version: 3.1.8
Python Version: 3.9.2
If you have an idea I am a taker.
Thank you and have a good day.
I am French and sorry in advance if the translation is not quite correct.
I allow myself to raise this subject because despite several tests on two different machines under raspberry the workaround to disable a notification given by "waaren" does not work or no longer works.
Here is the Domoticz version:
Version: 2024.7
dzVents Version: 3.1.8
Python Version: 3.9.2
If you have an idea I am a taker.
Thank you and have a good day.
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Device Notification on/off setting just like timers (active)
So what is not working? You do not see the notification system on the selected device switch to for example only Kodi?furtifc wrote: ↑Wednesday 20 November 2024 16:27 Hello everyone,
I am French and sorry in advance if the translation is not quite correct.
I allow myself to raise this subject because despite several tests on two different machines under raspberry the workaround to disable a notification given by "waaren" does not work or no longer works.
See also the wiki for all the know notification API calls: https://wiki.domoticz.com/Domoticz_API/ ... ifications
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 6
- Joined: Wednesday 20 November 2024 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Paris
- Contact:
Re: Device Notification on/off setting just like timers (active)
Thank you for your answer, Yes that's exactly it, the notification on the selected device does not only go to kodi.
If I run the command line below via my browser on my PC here is the answer:
http://laudouard.hd.free.fr:25041/share ... pture1.JPG
I have the same error message with the function: Add device notification, while the order : Get device notifications it's ok.
If I run the command line below via my browser on my PC here is the answer:
Code: Select all
https://192.168.1.14:443/json.htm?devidx=820&idx=30¶m=updatenotification&tmsg=&tpriority=1&tsendalways=false&tsystems=kodi&ttype=7&tvalue=0&twhen=0&type=command
I have the same error message with the function: Add device notification, while the order : Get device notifications it's ok.
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Device Notification on/off setting just like timers (active)
A less complex API call like below is working (change deviceIDX)?
Code: Select all
IP:Port/json.htm?idx=<deviceIDX>¶m=getnotificationtypes&type=command
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 6
- Joined: Wednesday 20 November 2024 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Paris
- Contact:
Re: Device Notification on/off setting just like timers (active)
Yes it works. Screenshot on the link below
http://laudouard.hd.free.fr:25041/share ... pture2.JPG
Can you reproduce this malfunction at your level, am I the only one?
Thank you.
http://laudouard.hd.free.fr:25041/share ... pture2.JPG
Can you reproduce this malfunction at your level, am I the only one?
Thank you.
Last edited by furtifc on Wednesday 20 November 2024 18:24, edited 1 time in total.
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Device Notification on/off setting just like timers (active)
Yes, I have the same issue with the documented API call.
But the good news is that the API has changed and now also is able to really enable and disable the notification with parameter tactive=false|true
The API you can use is for example to switch off and set only http as notification system.
But the good news is that the API has changed and now also is able to really enable and disable the notification with parameter tactive=false|true
The API you can use is for example to switch off and set only http as notification system.
Code: Select all
/json.htm?devidx=<devID>&idx=<ID>¶m=updatenotification&taction=&tactive=false&tmsg=&tpriority=0&tsendalways=false&tsystems=http&ttype=7&tvalue=0&twhen=0&type=command
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Device Notification on/off setting just like timers (active)
I changed the wiki so it now is documented correctly:
Added is
taction=<action command>
tactive=<true/false>
Code: Select all
/json.htm?devidx=<DeviceID>&idx=<notificationID>¶m=updatenotification&taction=<action command>&tactive=<true/false>&tmsg=<msgText>&tpriority=<pri>&tsendalways=<true/false>&tsystems=<list of notification subsystems>&ttype=<notificationType>&tvalue=0&twhen=0&type=command
taction=<action command>
tactive=<true/false>
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 6
- Joined: Wednesday 20 November 2024 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Paris
- Contact:
Re: Device Notification on/off setting just like timers (active)
Too strong! It's perfect! It works very well and it's a feature that was missing.
Thank you very much for your responsiveness and availability.
Thank you very much for your responsiveness and availability.
-
- Posts: 6
- Joined: Wednesday 20 November 2024 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Paris
- Contact:
Re: Device Notification on/off setting just like timers (active)
Hello,
I add a clarification, this command line does not support spaces in the message section: &tmsg=<msgText>
Via the pc browser it's ok, but not from the command of a domoticz switch it's no. If we replace the spaces with a _ it works.
example:
&tmsg=Opening balcony door& = error
&tmsg=Opening_balcony_door& = OK
I add a clarification, this command line does not support spaces in the message section: &tmsg=<msgText>
Via the pc browser it's ok, but not from the command of a domoticz switch it's no. If we replace the spaces with a _ it works.
example:
&tmsg=Opening balcony door& = error
&tmsg=Opening_balcony_door& = OK
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Device Notification on/off setting just like timers (active)
You probably have to urlencode the message as indicated in the wiki.
&tmsg=Opening balcony door& = error
Will be
&tmsg=Opening%20balcony%20door%26%20%3D%20error
&tmsg=Opening balcony door& = error
Will be
&tmsg=Opening%20balcony%20door%26%20%3D%20error
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 6
- Joined: Wednesday 20 November 2024 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Paris
- Contact:
Re: Device Notification on/off setting just like timers (active)
Hello,
Thanks for your feedback, it works well with the %20 on the spaces.
On the other hand, the disadvantage of the true or false of the notification via an Update device notifications is that the idx of the notification changes, strangely it is not systematically but sometimes the idx changes while the only modification of the command is the true or false. In script mode it poses a problem.
Thanks for your feedback, it works well with the %20 on the spaces.
On the other hand, the disadvantage of the true or false of the notification via an Update device notifications is that the idx of the notification changes, strangely it is not systematically but sometimes the idx changes while the only modification of the command is the true or false. In script mode it poses a problem.
-
- Posts: 6
- Joined: Wednesday 20 November 2024 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: Paris
- Contact:
Re: Device Notification on/off setting just like timers (active)
The workaround by adding and removing the notification doesn't seem to work for me.
Same error message as at the beginning of the upgrade command.
Here is the tested command:
Same error message as at the beginning of the upgrade command.
Here is the tested command:
Code: Select all
http://<domoticz ip:domoticz:port>/json.htm?idx=93¶m=addnotification&tmsg=test&tpriority=0&tsendalways=true&tsystems=fcm;http&ttype=7&tvalue=0&twhen=0&type=command
Who is online
Users browsing this forum: No registered users and 0 guests