Send message at text change
Posted: Sunday 01 April 2018 18:39
Hi!
First of all exuse my baad english.
Im trying to send a email o telegram message when my vaccum start to clean and when it goes back to the dock station. The problem is my script dont send 1 email when the text change the state the script sends many.
commandArray = {}
if (otherdevices_svalues['M-O - Status'] == 'Cleaning')
then
commandArray['SendEmail']='M-O IS cleaning...#M-O Cleaning...#[email protected]'
end
if (otherdevices_svalues['M-O - Status'] == 'Back to home')
then
commandArray['SendEmail']='M-O Going back home...#M-O Returning home...#[email protected]'
end
return commandArray
I have tried this without luck. Now nothing is send.
commandArray = {}
if (devicechanged['M-O - Status'] == 'Cleaning') then
commandArray['SendEmail']='M-O Cleaning...#M-O Cleaning...#[email protected]'
elseif (devicechanged['M-O - Status'] == 'Back to home') then
commandArray['SendEmail']='M-O Returning home...#M-O Returning home...#[email protected]'
end
return commandArray
Anyone knows how to send a telegram message instead a email?
Thanx in advance for your help and regards
First of all exuse my baad english.
Im trying to send a email o telegram message when my vaccum start to clean and when it goes back to the dock station. The problem is my script dont send 1 email when the text change the state the script sends many.
commandArray = {}
if (otherdevices_svalues['M-O - Status'] == 'Cleaning')
then
commandArray['SendEmail']='M-O IS cleaning...#M-O Cleaning...#[email protected]'
end
if (otherdevices_svalues['M-O - Status'] == 'Back to home')
then
commandArray['SendEmail']='M-O Going back home...#M-O Returning home...#[email protected]'
end
return commandArray
I have tried this without luck. Now nothing is send.
commandArray = {}
if (devicechanged['M-O - Status'] == 'Cleaning') then
commandArray['SendEmail']='M-O Cleaning...#M-O Cleaning...#[email protected]'
elseif (devicechanged['M-O - Status'] == 'Back to home') then
commandArray['SendEmail']='M-O Returning home...#M-O Returning home...#[email protected]'
end
return commandArray
Anyone knows how to send a telegram message instead a email?
Thanx in advance for your help and regards