Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
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.
best regards
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
24.06.2017, 22:19
(This post was last modified: 24.06.2017, 22:20 by Erwin van der Zwart.)
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
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
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
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
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
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
THANKS MR. Erwin van der Zwart
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
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.
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
08.07.2017, 17:30
(This post was last modified: 08.07.2017, 17:31 by Erwin van der Zwart.)
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
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
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!
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
08.07.2017, 23:12
(This post was last modified: 08.07.2017, 23:16 by Erwin van der Zwart.)
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
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
09.07.2017, 05:50
(This post was last modified: 09.07.2017, 05:55 by balatis.)
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
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
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
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
Thanks for the answer mr.Erwin
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
hi,
the forum is available for user home lynk?
thanks
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
Yes you can ask questions about homeLYnk and spaceLYnk here, but also on our Schneider EcoExpert forums.
BR,
Erwin
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
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!
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
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.
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
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
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
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
Posts: 150
Threads: 27
Joined: May 2017
Reputation:
2
05.10.2017, 19:13
(This post was last modified: 05.10.2017, 19:46 by balatis.)
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
|