This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Push notifications Mosaic
#1
Hi guys,

Is it possible with push notifications when using Mosiac? 
For example if the water leakage sensor detects water, then I want a notification on my phone.
Reply
#2
You can use Telegram for notifications. Here's a tutorial on how to set it up: https://forum.logicmachine.net/showthrea...1#pid17111
Reply
#3
Or this https://forum.logicmachine.net/showthrea...47#pid6647
but I would use telegram anyway.
------------------------------
Ctrl+F5
Reply
#4
(27.09.2021, 08:14)Daniel Wrote: Or this https://forum.logicmachine.net/showthrea...47#pid6647
but I would use telegram anyway.

Is there something for WhatsApp?
Best Regards,
Reply
#5
WhatsApp does not have an open API.
Reply
#6
I'm not aware of anything for WhatsApp
------------------------------
Ctrl+F5
Reply
#7
I've tried this, and it works.
I've tested this on my outdoor ligthing with my status group (on/off).
But how can I change the message so it will for example say Outdoor lights is on and Outdoor lights is off?
Reply
#8
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end
------------------------------
Ctrl+F5
Reply
#9
(30.09.2021, 15:37)Daniel Wrote:
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end

Offcourse, thought it would be something like that. Thank you
Reply
#10
(30.09.2021, 15:37)Daniele Wrote:
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end

Ciao amministratore. Questo script, dovrebbe sostituire l'altro? Oppure deve essere un'integrazione? Ti chiedo scusa in anticipo, ma sono i miei primi passi nel mondo LUA. Ti allego uno screenshot dello script iniziale.

(30.09.2021, 15:37)Daniele Wrote:
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end

Ciao Daniele. Questo script, dovrebbe sostituire l'altro? Oppure deve essere un'integrazione? Ti chiedo scusa in anticipo, ma sono i miei primi passi nel mondo LUA. Ti allego uno screenshot dello script iniziale.

Attached Files Thumbnail(s)
       
Reply
#11
(01.12.2023, 19:46)Gabriel88 Wrote:
(30.09.2021, 15:37)Daniele Wrote:
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end

Ciao amministratore. Questo script, dovrebbe sostituire l'altro? Oppure deve essere un'integrazione? Ti chiedo scusa in anticipo, ma sono i miei primi passi nel mondo LUA. Ti allego uno screenshot dello script iniziale.

(30.09.2021, 15:37)Daniele Wrote:
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end

Ciao Daniele. Questo script, dovrebbe sostituire l'altro? Oppure deve essere un'integrazione? Ti chiedo scusa in anticipo, ma sono i miei primi passi nel mondo LUA. Ti allego uno screenshot dello script iniziale.

Hi Gabriel88,
If you want that telegram send message you must implement this code into the other.
What do you want to do?
Best regards Cristian
Reply
#12
(02.12.2023, 12:37)CristianAgata Wrote:
(01.12.2023, 19:46)Gabriel88 Wrote:
(30.09.2021, 15:37)Daniele Wrote:
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end

Ciao amministratore. Questo script, dovrebbe sostituire l'altro? Oppure deve essere un'integrazione? Ti chiedo scusa in anticipo, ma sono i miei primi passi nel mondo LUA. Ti allego uno screenshot dello script iniziale.

(30.09.2021, 15:37)Daniele Wrote:
Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end

Ciao Daniele. Questo script, dovrebbe sostituire l'altro? Oppure deve essere un'integrazione? Ti chiedo scusa in anticipo, ma sono i miei primi passi nel mondo LUA. Ti allego uno screenshot dello script iniziale.

Hi Gabriel88,
If you want that telegram send message you must implement this code into the other.
What do you want to do?
Best regards Cristian
 Hi Cristian. I would simply like to do this: 
When a device's status goes to "1", i want a telegram message like "ON"; 
When a device status goes to "0", i want a telegram message like "OFF"
  I try various ways but couldn't. Obviously, i'm just starting now with LUA Blush
  I apologize for the earlier message in Italian. I tought the forum page did the automatic translation
Reply
#13
Do you have the telegram messaging implemented? Can you send any message from LM to telegram?
------------------------------
Ctrl+F5
Reply
#14
(05.12.2023, 08:23)Daniel Wrote: Do you have the telegram messaging implemented? Can you send any message from LM to telegram?

Hi Daniel. Yes, sorry if I didn't clarify. I've set everything up, and I'm currently receiving telegram notifications. Now what I want to do is change the notifications, as I told Cristian before
Reply
#15
OK then the script provided above is exactly what you need. Create event based script which will be triggered by your 1/0 object and define the message in the commented area for on and off
------------------------------
Ctrl+F5
Reply
#16
(05.12.2023, 15:14)Daniel Wrote: OK then the script provided above is exactly what you need. Create event based script which will be triggered by your 1/0 object and define the message in the commented area for on and off

Like this?

Attached Files Thumbnail(s)
   
Reply
#17
Like that
Code:
require("user.telegram")
messageON = 'Something is ON'
messageOFF = 'Something is OFF'

value = event.getvalue()
if value then
telegram(messageON)
else
 telegram(messageOFF)
end
------------------------------
Ctrl+F5
Reply
#18
(05.12.2023, 16:06)Daniel Wrote: Like that
Code:
require("user.telegram")
messageON = 'Something is ON'
messageOFF = 'Something is OFF'

value = event.getvalue()
if value then
telegram(messageON)
else
 telegram(messageOFF)
end

Smile perfect!!!!!!!!!! woks!! I adore lm5...
Reply


Forum Jump: