Logic Machine Forum
email - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: email (/showthread.php?tid=867)

Pages: 1 2


email - balatis - 24.06.2017

hi at the team .
very good jop
i am new at lua....
i want to sent en email only when the value from event script is 1 .
i use
 value = grp.getvalue('1/2/2')
if ( 1/2/2 == 1 ) then
  Email ("chrisbalatis@gmail.com", "subject", "text") 
end
but is not working. Huh

 best regards


RE: email - Erwin van der Zwart - 24.06.2017

Hi,

Make sure to enter the credentials inside the mail function (inside common functions), make sure to set DNS and default gateway on your NIC and make sure you gmail account has 'less secure apps' enabled and use this as event based script:
Code:
if event.getvalue() == true then
 res, err = mail("chrisbalatis@gmail.com", "subject", "text")
  log(res, err)
end
BR,

Erwin


RE: email - balatis - 25.06.2017

Good morning mr. Erwin.
thanks for the answer.
i have an other qouestion,i took for yahoo script (16. 14 byte ASCII string) and i want to change icons with value from16. 14 byte ASCII string.
have you any ideas how can it.?
thanks a lot
best regards


RE: email - Erwin van der Zwart - 25.06.2017

Hi,

What you can is create a event based script on the ascii object and make some if statements:

Code:
value = event.getvalue()
if value == "yourasciistring1" then
grp.update('1/1/1', 1)
elseif value == "yourasciistring2" then
grp.update('1/1/1', 2)
else
grp.update('1/1/1', 0)
end
Add a byte object 1/1/1 and add it to your visu and create the needed additional icons on value 1 and 2

BR,

Erwin


RE: email - balatis - 26.06.2017

THANKS MR. Erwin van der Zwart


RE: email - balatis - 08.07.2017

hi..
i did restore the script for weather , i have enable bus sniffer but the object not creat automatically....
when restore the script is enable..
thanks in advance.


RE: email - Erwin van der Zwart - 08.07.2017

Hi,

Objects are not created by sniffer from a script grp.write or grp.update action, only when a telegram is received.

So you need to create them by esf import, manually or create a script to create them. If you only need to created them once, manual will be easiest.

BR,

Erwin


RE: email - balatis - 08.07.2017

mr Erwin hi .
value = event.getvalue(here what kind value is ? object? 1/1/5?)
if value == "yourasciistring1" then
grp.update('1/1/1', 1)
elseif value == "yourasciistring2" then
grp.update('1/1/1', 2)
else
grp.update('1/1/1', 0)
end
thanks!


RE: email - Erwin van der Zwart - 08.07.2017

Hi,

You don't need to set a address when using event.getvalue() as this command (function) is used only inside a event based script and already knows the address that triggers the script. When a event based script is triggered by a tag group it also knows the event.dst.

You can't use event.getvalue() inside a resident script, here you need to use grp.getvalue('1/1/1').

BR,

Erwin


RE: email - balatis - 09.07.2017

good morning
value = event.getvalue(here i want to take value from 5/1/1 how is posibole to now that were wil read?)
if value == "yourasciistring1" then
grp.update('1/1/1', 1)
elseif value == "yourasciistring2" then
grp.update('1/1/1', 2)
else
grp.update('1/1/1', 0)
end
thanks!

it the same script when i use value = grp.getvalue('1/1/1') every 2 second do it reload....is normal?
thanks


RE: email - Erwin van der Zwart - 09.07.2017

Hi,

This sample should be attached as event based to the ascii object and when it changes it should update your icon object. You could include it into your resident script that receives the ascii but then it should be totaly different. I never seen that part from you so can't say anything about that now.

BR,

Erwin


RE: email - balatis - 09.07.2017

Thanks for the answer mr.Erwin


RE: email - balatis - 10.07.2017

hi,
the forum is available for user home lynk?
thanks


RE: email - Erwin van der Zwart - 10.07.2017

Hi,

Yes you can ask questions about homeLYnk and spaceLYnk here, but also on our Schneider EcoExpert forums.

BR,

Erwin


RE: email - balatis - 23.08.2017

hi ,
i have a problem with i pad -i phone , wen i have local conection is ok, but wen i use 3g i have visu but i can not to give commants on the buttons .
i have homelynk v.2.01
thanks!


RE: email - admin - 24.08.2017

Some mobile operators use transparent proxies and they can block websocket connections. One of possible solutions it to use VPN instead of port forwarding, which is much better for security.


RE: email - balatis - 24.08.2017

thanks admin


RE: email - balatis - 26.09.2017

hello.
i have a homelynk and i want to conect with alexa.
were i must to greate account?
i must to upgrate version? i have v 2.01
were can i fint app 'alexa'?
best regards
chris


RE: email - Erwin van der Zwart - 26.09.2017

Hi,

Alexa is not yet available for homeLYnk but i think it’s in testing fase now.

Hopefully we will have it soon (:

BR,

Erwin


RE: email - balatis - 05.10.2017

hello .
where  can i find the last firmwear for home lynk 2.1.0?

i would like to connect a home lynk with plc. can i make json? you could show me the way inputs and outputs
thank you from the members