We have moved at community.getvera.com

Author Topic: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.3a  (Read 22331 times)

Offline cedriclocqueneux

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +0/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #15 on: June 01, 2011, 06:52:39 am »
Does it work with Gmail smtp ?

Offline Henk

  • Hero Member
  • *****
  • Posts: 820
  • Karma: +3/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #16 on: June 01, 2011, 07:09:22 am »
Does it work with Gmail smtp ?

I havent seen anyone post here that got Gmail to work on port 443 with SSL enabled.
Maybe i didnt look hard enough through the threads?

I got as far as
http://forum.micasaverde.com/index.php?PHPSESSID=3051091f7ca575ea0b5fa4154e82da97&topic=6309.msg40295#msg40295

Anyone found something that proves the contrary?
« Last Edit: June 01, 2011, 07:12:50 am by Henk »
| Vera2 @ UI4 1.1.1350 / 3.20 | Vera Lite @ UI5 | Vera 3 @ UI5 | 2x Merten  504519 | 1x Duewi  064374 | 1x Everspring SM103 doorbell mod |1 Y-cam IP cam | various LUUP plugins |

Offline denix

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1088
  • Karma: +1/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #17 on: June 01, 2011, 09:04:54 pm »
@Henk, you mentioned ADD, where I had the same issue:

http://forum.micasaverde.com/index.php?topic=5130.msg31677#msg31677


@denix

Yes, and i solved it. In ADD comment out 2 lines using " --"
Here is the example:
Code: [Select]
 local SMTP_SERVER = "my.smtp.host"
-- local SMTP_AUTH_USER = ""
-- local SMTP_AUTH_PW = ""        
  local SMTP_PORT = "25"
  local USER_SENDING = "sender@my.vera"
  local USER_RECEIVING = "receiver@gmail.com"

I'm surprised it worked for you - I needed to patch the code (attached under provided link) for that to work...
Veras (1, 2, 3, Lite, Plus), lots of different Z-Wave modules, Luup plugins and theater/security integration.

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #18 on: June 01, 2011, 10:13:09 pm »
I'm surprised it worked for you - I needed to patch the code (attached under provided link) for that to work...
@denix,
For SND @Henk did comment out the parts in the smtp.send() call (as well). And although not stated as such here, the same may be true for ADD, per @huogas' and @Henk's comments over there based on your findings.
Dezwaved at the moment...

Offline gilles

  • Full Member
  • ***
  • Posts: 106
  • Karma: +0/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #19 on: December 28, 2011, 01:44:47 am »
Hi,
it seems that SND isn't Ui5 compatible at all. The messages text on the device in the dashboard have dissapeared.

Same thing for home made plugins, normal ?

gilles


Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #20 on: December 28, 2011, 08:43:36 am »
Quote
it seems that SND isn't Ui5 compatible at all.

SND and ADD work for me on Vera V2@1.5.255.

Quote
The messages text on the device in the dashboard have dissapeared.

Normal. MCV made changes to the layout manager for the dashboard (http://wiki.micasaverde.com/index.php/UI4_UI5_Migration#New_device_tags) that will break the dashboard presentation of most of the UI4 Luup plugins.

Offline gilles

  • Full Member
  • ***
  • Posts: 106
  • Karma: +0/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #21 on: December 28, 2011, 01:10:16 pm »
You're right it's functionnal.

So we have to rewrite UI4 plugins.

As I got you, I do a notification plugin with xmpp server called XFD (Xmpp Forwarder device). I use a base of your plugin and modify it. No problem with that?

Thank you for the link Iwill try to get my text working again in dashboard.

Envoyé depuis mon Flashback 7.1

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #22 on: December 28, 2011, 02:37:17 pm »
Quote
As I got you, I do a notification plugin with xmpp server called XFD (Xmpp Forwarder device). I use a base of your plugin and modify it. No problem with that?

No problem with that - SND is based on original research by guessed, so you should ask guessed. :)

Quote
Thank you for the link Iwill try to get my text working again in dashboard.

Forget the wiki documentation, copy with pride from already ported Luup plugins -  and be prepared for a buggy implementation of the UI5 dashboard layout manager.

Offline weissertigerxl

  • Jr. Member
  • **
  • Posts: 84
  • Karma: +1/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #23 on: December 29, 2011, 09:02:33 am »
Hi AP15e,

what is to be set at variable userSending, userReceiving?

Thanks

Offline gilles

  • Full Member
  • ***
  • Posts: 106
  • Karma: +0/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.2
« Reply #24 on: December 31, 2011, 12:14:14 pm »
Hi Ap15e,

Unfortunatly,I try to implement my plugin or SND plugin in the layout with no success.

What I have to do exactly ? I've got a variable out of my plugin from my I_.....xml so I modify  my D_....json but not sure my syntax is ok.

From my experience the link in the wiki isn't too usefull.

Could you give me the way ...

an extract of my json:

Code: [Select]
"eventList2": [

        {

            "id": 1,

            "label": {

                "lang_tag": "NotificationsSent",

                "text": "Notifications: "

                     },

            "serviceId": "urn:upnp-gilles-com:serviceId:XFD1",

            "argumentList": [

                {

                    "id": 1,

                    "dataType": "string",

                    "name": "NotificationsSent",

                    "prefix": {},

                    "suffix": {},

                    "HumanFriendlyText": {

                        "lang_tag": "hft_Notifications_sent",

                        "text": "_DEVICE_NAME_ NotificationsSent _ARGUMENT_VALUE_"

                    }

                }

                           ]

        },

       

       

    ],



if my device is D_XFD the _DEVICE_NAME_ is ?????

Thank you


Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.3a
« Reply #25 on: January 28, 2012, 07:22:09 am »
Please upgrade to SND V0.3a for compatibility with UI5.
« Last Edit: January 28, 2012, 12:36:54 pm by Ap15e »

Offline ninux

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.3a
« Reply #26 on: February 08, 2012, 04:39:08 pm »
Thank you for your plugin

How can I add a timestamp to the body of mail ?
I try this but il didn't work

Code: [Select]
local currentTime = os.date("*t")
luup.call_action( "urn:upnp-ap15e-com:serviceId:SND1", "SendMail", { subject = 'Message from Vera', body = 'Door open at '.. currentTime }, 29 )

What is the right syntax to add a variable ?

Thanks
« Last Edit: February 08, 2012, 04:41:26 pm by ninux »
VeraLite, RFXCOM Lan, IPX800

Offline ninux

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.3a
« Reply #27 on: February 09, 2012, 06:50:19 am »
Hi found the solution
Code: [Select]
local currentTime = os.date("%c")
luup.call_action( "urn:upnp-ap15e-com:serviceId:SND1", "SendMail", { subject = 'Message from Vera', body = 'Door open at '.. currentTime }, 29 )
VeraLite, RFXCOM Lan, IPX800

Offline apt

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +0/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.3a
« Reply #28 on: February 15, 2012, 03:13:46 pm »
Hi people,

I would like to use the plugin but I cannot get it to work at all. I've downloaded the 3a version. I'm installing it as described here: http://wiki.micasaverde.com/index.php/Install_LUUP_Plugins

I'm a little unsure about what to do at step 3:  Go to 'Create device' and create a new Luup device with UpnpDevFilename D_<your_plugin>.xml. I've used D_SND.xml and D_SND because the .xml extension wasn't used in the screenshot in http://forum.micasaverde.com/index.php?topic=6569.0

After step 4 of the install LUUP instruction I am a little unsure what to do: click the create device button below the fields or close with the x and click the reload  (curving arrows top right in your UI). I've tried both.

After rebooting and / or reloading and trying time and time again no device appear anywhere in the user interface.

I've gone through the procedure several times but I see no new device appearing. I'm on UI4 with the Vera2 with firmware 1.1.1245.

Could someone please be so kind as to see what I'm doing wrong here? Thanks, Arjan


Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: [_CODE_] SND - SMTP Notification Device (UPnP to SMTP bridge) V0.3a
« Reply #29 on: February 15, 2012, 04:43:43 pm »
Uploading the files doesn't create the device, so you'll have to fill in an arbitrary device name and 'D_SND.xml' and press the 'Create device' button, then you'll have to restart the Lua engine several times. When the device is visible on the dashboard, press the tool icon to configure the SMTP variables, press SAVE and SND should be ready to use.