Logic Machine Forum
Push notifications Mosaic - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Push notifications Mosaic (/showthread.php?tid=3584)



Push notifications Mosaic - Alexander - 24.09.2021

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.


RE: Push notifications Mosaic - admin - 27.09.2021

You can use Telegram for notifications. Here's a tutorial on how to set it up: https://forum.logicmachine.net/showthread.php?tid=2666&pid=17111#pid17111


RE: Push notifications Mosaic - Daniel - 27.09.2021

Or this https://forum.logicmachine.net/showthread.php?tid=1119&pid=6647#pid6647
but I would use telegram anyway.


RE: Push notifications Mosaic - khalil - 27.09.2021

(27.09.2021, 08:14)Daniel Wrote: Or this https://forum.logicmachine.net/showthread.php?tid=1119&pid=6647#pid6647
but I would use telegram anyway.

Is there something for WhatsApp?


RE: Push notifications Mosaic - admin - 27.09.2021

WhatsApp does not have an open API.


RE: Push notifications Mosaic - Daniel - 27.09.2021

I'm not aware of anything for WhatsApp


RE: Push notifications Mosaic - Alexander - 30.09.2021

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?


RE: Push notifications Mosaic - Daniel - 30.09.2021

Code:
value = event.getvalue()
if value then
  --send on message
else
  --send off message
end



RE: Push notifications Mosaic - Alexander - 03.10.2021

(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


RE: Push notifications Mosaic - Gabriel88 - 01.12.2023

(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.


RE: Push notifications Mosaic - CristianAgata - 02.12.2023

(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


RE: Push notifications Mosaic - Gabriel88 - 04.12.2023

(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


RE: Push notifications Mosaic - Daniel - 05.12.2023

Do you have the telegram messaging implemented? Can you send any message from LM to telegram?


RE: Push notifications Mosaic - Gabriel88 - 05.12.2023

(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


RE: Push notifications Mosaic - Daniel - 05.12.2023

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


RE: Push notifications Mosaic - Gabriel88 - 05.12.2023

(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?


RE: Push notifications Mosaic - Daniel - 05.12.2023

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



RE: Push notifications Mosaic - Gabriel88 - 05.12.2023

(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...