notification when a scene start

Moderator: leecollings

guantolento
Posts: 129
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi / ODroid
Domoticz version: LastBeta
Location: Italy BG
Contact:

notification when a scene start

Post by guantolento »

good evening everyone. I would like to know if you can be notified when a scene is active. having some scene that are activated in automatic mode at specific times, receiving the notification would have the assurance that the system works properly. can someone help me ?
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: notification when a scene start

Post by Egregius »

Go scripting, then you control everything you want ;)
Derik
Posts: 1605
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Post by Derik »

Egregius wrote:Go scripting, then you control everything you want ;)
Scipting is a hard part [ for me ].. Do you have a simple how to...
Or a good/simple start..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
safi78
Posts: 204
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Contact:

Re: notification when a scene start

Post by safi78 »

I just tried this with LUA:

Code: Select all

if (devicechanged ["scene:MyScene"] == "On") then
        commandArray['SendNotification']="MyScene On"
end
which does not work.

Alternative, add a dummy switch unique for that scene to your scene and add notifications for that?
homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz
safi78
Posts: 204
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Contact:

Re: notification when a scene start

Post by safi78 »

Or even better, hook up a telegram bot to domoticz :)

Scenes have an "On"-action, where you can call the telegram-api and send the notification through there?

I don't think you can 'loop-back' a notification by calling the notification system with the domoticz-api itself hehe. (<- would work if it was implemented lol)
homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz
Derik
Posts: 1605
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Post by Derik »

safi78 wrote:Or even better, hook up a telegram bot to domoticz :)

Scenes have an "On"-action, where you can call the telegram-api and send the notification through there?

I don't think you can 'loop-back' a notification by calling the notification system with the domoticz-api itself hehe. (<- would work if it was implemented lol)
Telegram bot.. nice..
Only 1 problem
You can not send a message to a other person...
That is not the best option..
Looks great when you can choose with the bot for different people where you can sent the message to...
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
safi78
Posts: 204
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Contact:

Re: notification when a scene start

Post by safi78 »

Suggestion (not tested though):

Start a telegram group-chat, add the bot to that chat and use that chat_id?

Could work?
homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz
safi78
Posts: 204
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Contact:

Re: notification when a scene start

Post by safi78 »

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz
Derik
Posts: 1605
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Post by Derik »

what a great option like to me.
I can send message from the bot to separate people
To my wife 2 Wednesday.. Set the garbage outside
To my kids close the door
To my self xx
To x .. y
To my wife sex...
etc

And then in the notification area from a device..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
safi78
Posts: 204
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Contact:

Re: notification when a scene start

Post by safi78 »

You could do that theoretically if you know the chat_id's and script it?
homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz
safi78
Posts: 204
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Contact:

Re: notification when a scene start

Post by safi78 »

Don't know how you are going to implement the 'sex' thing with your wife through domoticz though, but hey, why not.

You could just use telegram for that in the way it was intended. Send a message ;)
homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz
Derik
Posts: 1605
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Post by Derik »

I mean this part:
ScreenShot079.jpg
ScreenShot079.jpg (25.93 KiB) Viewed 3428 times
I do have the bot working only on this place the bot send to one adres....
When i can set the bot here to different people should be great..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
safi78
Posts: 204
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Contact:

Re: notification when a scene start

Post by safi78 »

Like I said, a groupchat would be the way to go. Or script it.
homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz
guantolento
Posts: 129
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi / ODroid
Domoticz version: LastBeta
Location: Italy BG
Contact:

Re: notification when a scene start

Post by guantolento »

Egregius wrote:Go scripting, then you control everything you want ;)
but, can you explain me how to ? just a little example if you can.
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: notification when a scene start

Post by Egregius »

Derik wrote: Only 1 problem
You can not send a message to a other person...
Not correct.
As long as that 'other person' sends a message to the bot you can find the chat id.
Something goes when you add the bot to a group or a channel.
That way I sent Telegram messages to my wife, to myself and to both in a channel.
guantolento wrote:
Egregius wrote:Go scripting, then you control everything you want ;)
but, can you explain me how to ? just a little example if you can.
Well, the scenes have a own LUA table now, so it's possible to detect changes in scenes and use that as a base.
Must be easy to add to my pass2php script, I don't use scenes as I create them my own completely in a script.
Sending a message in that script is as simple as
telegram('this is the message','receiver');
guantolento
Posts: 129
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi / ODroid
Domoticz version: LastBeta
Location: Italy BG
Contact:

Re: notification when a scene start

Post by guantolento »

hi guys,
i tried with this script lua but don't work.

Code: Select all

commandArray = {}

if devicechanged['Scene:Spegni Luci Zona Notte'] == 'On' then
commandArray['SendNotification'] = 'Domoticz Email#Spegni Luci Zona Notte#[email protected]'
end

return commandArray
if i use this script mail arrived, but continuos mail...

Code: Select all

commandArray = {}

if devicechanged['Bagno Piccolo Specchiera - S1'] == 'On' then
commandArray['SendNotification'] = 'Domoticz Cambio Stato#Bagno Piccolo Specchiera ON#[email protected]'
end

return commandArray
someone can tell me why ?
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
guantolento
Posts: 129
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi / ODroid
Domoticz version: LastBeta
Location: Italy BG
Contact:

Re: notification when a scene start

Post by guantolento »

I solved this issue with a telegram action when the scene in on.

Inviato dal mio GT-I9301I utilizzando Tapatalk
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: notification when a scene start

Post by madrian »

Anyone knows why

(devicechanged['Scene:...]) is not working in LUA scripts?
astrapowerrr
Posts: 141
Joined: Tuesday 31 January 2017 20:34
Target OS: -
Domoticz version:
Contact:

Re: notification when a scene start

Post by astrapowerrr »

Hi
I just updated to the beta version and now when any scene is started I get notification.
For example: I have set 2 notification 1 for opening and closing air ventilation and one if pond temp gets above 10 degrees. Both working fine!!

But now when I use the scene I’m home, or good night, or close curtains, etc...
The notification says my pond is above 10 degrees and it gives a notification of the air vent position(closed or open at the time).

So when I’m not at home and with sunset my curtains are closing(scene) I get notification my airvent is open. :oops: :?

So it notifies the status, but I want to be notified when it changes....

Someone familiar with this?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: notification when a scene start

Post by waaren »

Could this be related ?

viewtopic.php?t=17767
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest