notification when a scene start

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

notification when a scene start

Postby guantolento » Wednesday 26 October 2016 17:43

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

Egregius
Posts: 2268
Joined: Thursday 09 April 2015 12:19
Target OS: Raspberry Pi
Domoticz version: BetaRPi2
Location: Beitem, BE
Contact:

Re: notification when a scene start

Postby Egregius » Wednesday 26 October 2016 17:46

Go scripting, then you control everything you want ;)

User avatar
Derik
Posts: 1763
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Postby Derik » Wednesday 26 October 2016 19:51

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

User avatar
safi78
Posts: 452
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: notification when a scene start

Postby safi78 » Wednesday 26 October 2016 20:01

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?
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
safi78
Posts: 452
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: notification when a scene start

Postby safi78 » Wednesday 26 October 2016 20:04

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)
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
Derik
Posts: 1763
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Postby Derik » Wednesday 26 October 2016 20:11

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

User avatar
safi78
Posts: 452
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: notification when a scene start

Postby safi78 » Wednesday 26 October 2016 20:20

Suggestion (not tested though):

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

Could work?
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
safi78
Posts: 452
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: notification when a scene start

Postby safi78 » Wednesday 26 October 2016 20:22

I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
Derik
Posts: 1763
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Postby Derik » Wednesday 26 October 2016 20:38

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

User avatar
safi78
Posts: 452
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: notification when a scene start

Postby safi78 » Wednesday 26 October 2016 20:42

You could do that theoretically if you know the chat_id's and script it?
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
safi78
Posts: 452
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: notification when a scene start

Postby safi78 » Wednesday 26 October 2016 20:45

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 ;)
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

User avatar
Derik
Posts: 1763
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: notification when a scene start

Postby Derik » Wednesday 26 October 2016 20:53

I mean this part:
ScreenShot079.jpg
ScreenShot079.jpg (25.93 KiB) Viewed 920 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

User avatar
safi78
Posts: 452
Joined: Thursday 05 September 2013 15:39
Target OS: Linux
Domoticz version: LastBeta
Location: Alkmaar, NL
Contact:

Re: notification when a scene start

Postby safi78 » Thursday 27 October 2016 5:07

Like I said, a groupchat would be the way to go. Or script it.
I don't know if you noticed or not, but I'm an extremely arrogant man who tends to think all of his plans will work ...

https://safiweb.nl

homebridge, rfxcom, zwave, nest, applamp, hue, debian, apple, mysensors, netatmo, fibaro, synology, foscam, otherz

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

Re: notification when a scene start

Postby guantolento » Thursday 27 October 2016 17:13

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

Egregius
Posts: 2268
Joined: Thursday 09 April 2015 12:19
Target OS: Raspberry Pi
Domoticz version: BetaRPi2
Location: Beitem, BE
Contact:

Re: notification when a scene start

Postby Egregius » Thursday 27 October 2016 23:25

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: 157
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi
Domoticz version: LastBeta
Location: Italy BG
Contact:

Re: notification when a scene start

Postby guantolento » Wednesday 23 November 2016 19:32

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 [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 [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: 157
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi
Domoticz version: LastBeta
Location: Italy BG
Contact:

Re: notification when a scene start

Postby guantolento » Thursday 05 January 2017 2:11

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


Return to “Lights and Switches”

Who is online

Users browsing this forum: No registered users and 2 guests