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.

Trouble sending KNX value by email
#1
Hi, I'm very new to the world of LM and scripting.

Im trying to use the LM in a building were we're running KNX and Modbus. I was hoping to get the LM to send a email when i get a error/alarm in any part of the building.
I've set up using the example script (https://openrb.com/example-sending-email-from-lm2/) and i get it so send an email but the value i get is 'nil'

"KNX object 1/2/2 value is: nil"

Tested adding 'res, err'
Code:
res, err = mail('mail@mail.nu', 'Alert', 'KNX object 1/2/2 value is: ' .. tostring(value))
log(res, err)

And got this result, telling me nothing Big Grin

Code:
email_alarm 07.05.2023 21:41:14
* arg: 1
  * number: 1
* arg: 2
  * nil
Reply
#2
You are missing as first line: value = event.getvalue()
Reply
#3
(07.05.2023, 21:58)Erwin van der Zwart Wrote: You are missing as first line: value = event.getvalue()

Thank you!
Reply


Forum Jump: