Page 1 of 2
notification when a scene start
Posted: Wednesday 26 October 2016 17:43
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 ?
Re: notification when a scene start
Posted: Wednesday 26 October 2016 17:46
by Egregius
Go scripting, then you control everything you want

Re: notification when a scene start
Posted: Wednesday 26 October 2016 19:51
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..
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:01
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?
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:04
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)
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:11
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...
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:20
by safi78
Suggestion (not tested though):
Start a telegram group-chat, add the bot to that chat and use that chat_id?
Could work?
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:22
by safi78
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:38
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..
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:42
by safi78
You could do that theoretically if you know the chat_id's and script it?
Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:45
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

Re: notification when a scene start
Posted: Wednesday 26 October 2016 20:53
by Derik
I mean this part:

- ScreenShot079.jpg (25.93 KiB) Viewed 3439 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..
Re: notification when a scene start
Posted: Thursday 27 October 2016 5:07
by safi78
Like I said, a groupchat would be the way to go. Or script it.
Re: notification when a scene start
Posted: Thursday 27 October 2016 17:13
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.
Re: notification when a scene start
Posted: Thursday 27 October 2016 23:25
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');
Re: notification when a scene start
Posted: Wednesday 23 November 2016 18:32
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 ?
Re: notification when a scene start
Posted: Thursday 05 January 2017 1:11
by guantolento
I solved this issue with a telegram action when the scene in on.
Inviato dal mio GT-I9301I utilizzando Tapatalk
Re: notification when a scene start
Posted: Wednesday 28 February 2018 15:55
by madrian
Anyone knows why
(devicechanged['Scene:...]) is not working in LUA scripts?
Re: notification when a scene start
Posted: Sunday 08 April 2018 21:49
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.
So it notifies the status, but I want to be notified when it changes....
Someone familiar with this?
Re: notification when a scene start
Posted: Tuesday 10 April 2018 22:38
by waaren
Could this be related ?
viewtopic.php?t=17767