• Categories
  • Recent
  • Tags
  • Popular
  • Register
  • Login
  • Categories
  • Recent
  • Tags
  • Popular
  • Register
  • Login

Email notification setup

Scheduled Pinned Locked Moved Getting Started
20 Posts 5 Posters 4.2k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    MTBHuw
    last edited by 6 Nov 2017, 12:18

    Hi, I'm trying to get an email notification set up for one of my sensors. I'm experimenting (on my desk at the moment!) with a HC-SR04 sensor so that I can measure water level in a tank. The sensor is working fine, and sending consistent readings to My Controller via my Serial Gateway.

    I would like it to send me an email when the water level reaches a threshold of "x"cm. I've set this up in Rules with Condition Type "threshold", trigger when value from sensor is >=50cm. Then under Operations, I've asked it to email me this.

    I assume I need to set up the email account, SMTP etc under Settings, which I've tried, but I keep getting a "400: Bad Request" when I test the connection. I'm trying to use my gmail account with the following settings:

    smtp.gmail.com
    Port : 465
    From address : my gmail
    SSL Enabled
    Use SSL chosen
    My username and password.

    Any help appreciated again.

    J 1 Reply Last reply 6 Nov 2017, 13:26 Reply Quote 0
    • J Offline
      jkandasa @MTBHuw
      last edited by 6 Nov 2017, 13:26

      @mtbhuw Your setup should be looking as follows,
      0_1509974679464_38e5359b-8180-442d-9fdc-6c0ef47e8aea-image.png

      Do you see any warning message on your email? You have to allow this device.

      1 Reply Last reply Reply Quote 0
      • M Offline
        MTBHuw
        last edited by 6 Nov 2017, 13:56

        Hi, yes that's how I have it set up in My Controller. I've also set gmail to allow "less secure apps". I was getting the "400: Bad Request" message but as I type this and retrying the Test Connection, it seems to be working now. I'll try it out....

        Thanks.

        1 Reply Last reply Reply Quote 0
        • I Offline
          iahim67
          last edited by 8 Dec 2017, 06:54

          Hi, MyController (1.0.0) is a great job:-), works with smartsleep very well so far.
          I am trying to set up a gmail notification, does not work with the settings above however.
          When I press the test button I get the 400 error ... the respective gmail account is configured for low security.
          Has google changed something in between?
          Is gmail still working for you guys?
          Thanks ...

          I 1 Reply Last reply 8 Dec 2017, 07:00 Reply Quote 0
          • I Offline
            iahim67 @iahim67
            last edited by 8 Dec 2017, 07:00

            Just need to add: I am running Mycontroller on Windows 10 for now, could that be the reason I'm not able to get gmail notification working?

            J 1 Reply Last reply 11 Dec 2017, 06:35 Reply Quote 0
            • J Offline
              jkandasa @iahim67
              last edited by 11 Dec 2017, 06:35

              @iahim67 Can you list complete error details?

              1 Reply Last reply Reply Quote 0
              • I Offline
                iahim67
                last edited by 11 Dec 2017, 17:39

                I get this when I hit the "test connection" button

                0_1513013852027_58b7f877-50d8-4ea5-ada4-bf59bf0c15cf-image.png

                (0_1513013883038_8cd84dd6-10a7-40e0-9f89-4bf7fa215c3b-image.png

                J 1 Reply Last reply 12 Dec 2017, 10:55 Reply Quote 0
                • J Offline
                  jkandasa @iahim67
                  last edited by 12 Dec 2017, 10:55

                  @iahim67 Can you test with SMTP port as 465 and Use SSL and user name with @gmail.com

                  1 Reply Last reply Reply Quote 0
                  • I Offline
                    iahim67
                    last edited by 12 Dec 2017, 15:43

                    I did that already with the same result ... then I tried STARTTLS & 587.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      Tag MOD
                      last edited by Tag 12 Dec 2017, 21:26 12 Dec 2017, 15:54

                      Hi!,

                      Are you able to "ping" the server from the command line?

                      You should see the output like below

                      # ping smtp.gmail.com
                      PING gmail-smtp-msa.l.google.com (108.177.126.108) 56(84) bytes of data.
                      64 bytes from 108.177.126.108: icmp_seq=1 ttl=44 time=13.4 ms
                      64 bytes from 108.177.126.108: icmp_seq=2 ttl=44 time=15.7 ms
                      64 bytes from 108.177.126.108: icmp_seq=3 ttl=44 time=104 ms
                      64 bytes from 108.177.126.108: icmp_seq=4 ttl=44 time=73.2 ms
                      64 bytes from 108.177.126.108: icmp_seq=5 ttl=44 time=41.1 ms
                      64 bytes from 108.177.126.108: icmp_seq=6 ttl=44 time=37.7 ms
                      64 bytes from 108.177.126.108: icmp_seq=7 ttl=44 time=50.8 ms
                      ^C
                      --- gmail-smtp-msa.l.google.com ping statistics ---
                      7 packets transmitted, 7 received, 0% packet loss, time 6009ms
                      rtt min/avg/max/mdev = 13.407/48.175/104.992/29.960 ms
                      

                      Can you check if there are no spaces in the servername field in mycontroller itself?

                      Port 587 is the TLS port, try to disable SSL and use port 25
                      does that work?

                      1 Reply Last reply Reply Quote 0
                      • I Offline
                        iahim67
                        last edited by 12 Dec 2017, 17:51

                        Yes, seems I am able to ping the server:

                        0_1513101041832_cdc7c1e2-1e03-4a36-9eeb-bcef4f06a973-image.png

                        T 1 Reply Last reply 12 Dec 2017, 18:36 Reply Quote 0
                        • T Offline
                          Tag MOD @iahim67
                          last edited by 12 Dec 2017, 18:36

                          @iahim67

                          okay that is good so we know we can at least connect to the server.

                          How about disable SSL and use port 25? does that work?

                          1 Reply Last reply Reply Quote 0
                          • I Offline
                            iahim67
                            last edited by 12 Dec 2017, 19:09

                            same error:

                            0_1513105749868_0f6389df-9cb8-469e-a5f2-88fc8b293db8-image.png

                            1 Reply Last reply Reply Quote 0
                            • I Offline
                              iahim67
                              last edited by 12 Dec 2017, 19:12

                              One more thing to note, perhaps it helps: I am using Domoticz in parallel and I can send email notifications from Domoticz, the following does work:

                              0_1513105918431_a7102aee-7238-4394-8647-10ff7508c126-image.png

                              J 1 Reply Last reply 13 Dec 2017, 02:29 Reply Quote 0
                              • J Offline
                                jkandasa @iahim67
                                last edited by jkandasa 13 Dec 2017, 02:29

                                @iahim67 can you investigate on network response?

                                right click on MyController page, select Inspect also check mycontrollor.log is there any error?

                                0_1513132151180_email-status.png

                                1 Reply Last reply Reply Quote 0
                                • I Offline
                                  iahim67
                                  last edited by 13 Dec 2017, 16:21

                                  I get this:

                                  0_1513182040082_0e4c9ea9-9e7f-4865-984c-fbeb63f9def9-image.png

                                  skywatchS 1 Reply Last reply 6 Feb 2020, 12:04 Reply Quote 0
                                  • skywatchS Offline
                                    skywatch @iahim67
                                    last edited by 6 Feb 2020, 12:04

                                    Did this get resolved? I am having the same issue now.

                                    J 1 Reply Last reply 6 Feb 2020, 15:54 Reply Quote 0
                                    • J Offline
                                      jkandasa @skywatch
                                      last edited by 6 Feb 2020, 15:54

                                      @skywatch I do not see any issue with email setup. Are you getting 400? can you post mycontroller.log when you perform this action?

                                      skywatchS 1 Reply Last reply 6 Feb 2020, 16:55 Reply Quote 0
                                      • skywatchS Offline
                                        skywatch @jkandasa
                                        last edited by 6 Feb 2020, 16:55

                                        @jkandasa THanks - The pi mycontroller is running on has ssmtp installed and this works for sending cron messages etc.
                                        I tried to ping my isp mail server with no response (but also got no response from a win10 machine either) yet mails are working as far as I can tell.
                                        I have to get Mum from the hospital now so will try again later when I have time.

                                        skywatchS 1 Reply Last reply 4 Mar 2020, 14:45 Reply Quote 0
                                        • skywatchS Offline
                                          skywatch @skywatch
                                          last edited by 4 Mar 2020, 14:45

                                          @skywatch Emails working fine for me now 🙂

                                          1 Reply Last reply Reply Quote 1
                                          • First post
                                            Last post

                                          2

                                          Online

                                          618

                                          Users

                                          531

                                          Topics

                                          3.4k

                                          Posts
                                          Copyright © 2015-2025 MyController.org | Contributors | Localization