SMTP Setup


 
You’re over complicating things. If you truly need a static IP on your HM, your router should have a static dhcp section that allows you to assign a static IP to the HM. The HM will still use DHCP but will always get the same IP. There’s really no reason to do static IP assignments on the actual devices these days. That applies for anything. Heatermeter, printers, media players.
 
I am totally confused on how to enter a DNS server, or resolve the DNS issues the "/etc/config/dhcp" file and the "/etc/uci show dhcp" didn't help much either only that there is no DNS servers.

None of this is what I expected
 
When I ping smtp.gmail.com I get 74.125.70.108, so why don't you try putting that in the SMTP config page as the SMTP server to eliminate the need for DNS lookup? If that works then your HM has DNS issues. In the HM Static IP setup there is a place to specify the DNS if you go that route.
 
MY ASUS router has Manual Assignment instead of static go figure. In some worlds DHCP does the job in mine I use static so that port forwarding and leasing IP's is a hassle. ever tried to connect to the HM web service by host name? I had issues so IP's work every time.

I make it difficult, because I am from the Microsoft planet.
 
Right. The Manual Assignment section is what you want. Assign an IP / mac address combo and you're done. No need to configure the static IP settings on the end device. Next time the device reboots, it will get the manually assigned IP.

eHDX2lZl.png
 
Last edited:
Add the IP is pingable from HM but no email.

I use to get SMTP messages in the Syslog Now all I get is;

Thu Sep 21 06:26:08 2017 user.warn : Alarm 0H started ringing
Thu Sep 21 06:26:14 2017 user.warn : Alarm stopped
Thu Sep 21 06:26:22 2017 user.warn : Alarm 0L started ringing
Thu Sep 21 06:26:22 2017 user.warn : Alarm stopped
 
Well I have had for the day going hunting in the morning hopefully I will be more successful.

Mahalo for all your help
 
That makes sense since the PING NSLOOKUP and TRACERT does return a value in the Diagnostic page

I'm confused. What's the return value? On a *ix system, a successful execution should return a 0. If the return codes are non-zero, then name lookups are failing.

I'll confess to only having a single rPi in the house, integrated into my HeaterMeter. The only network configuration I've done with it is to connect it to my WiFi (Ubiquti UAC-LR) and let my DHCP server (on pfSense,) deal with the rest, including occasionally boring a hole in the firewall to let the outside world find my HeaterMeter.
 
Well my hunting trip went as well as my SMTP setup, no success.

Bryan I setup the HM mail relay and tested the alarm for the pit heat, no email even in the spam folder. I can now ping DNS names like Heatmaster.com and lede-project.org as well as getting my HM to show in the Device page.

I was getting email failed notices in the System log now all I get are;

Mon Oct 2 11:20:55 2017 user.warn : Alarm 0L started ringing
Mon Oct 2 11:21:11 2017 user.info : Discarding duplicate update
Mon Oct 2 11:21:18 2017 user.warn : Alarm stopped
Mon Oct 2 11:21:43 2017 user.info : New -1 peak @1506961300=83.2 half=109 per=0 amp=-12.2 gain=0.0
Mon Oct 2 11:21:56 2017 user.warn : Alarm 0H started ringing
Mon Oct 2 11:22:00 2017 user.warn : Alarm stopped
Mon Oct 2 11:22:14 2017 user.info : New 1 peak @1506961318=93.2 half=18 per=127 amp=10.0 gain=-2.2
Mon Oct 2 11:22:14 2017 user.info : Ziegler P=2.4 I=0.038 D=1.3
Mon Oct 2 11:22:30 2017 user.warn : Alarm 0L started ringing
Mon Oct 2 11:22:30 2017 user.warn : Alarm stopped
Mon Oct 2 11:22:30 2017 user.warn : Alarm 0L started ringing
Mon Oct 2 11:22:30 2017 user.warn : Alarm stopped
Mon Oct 2 11:24:42 2017 user.warn : Alarm 0L started ringing
Mon Oct 2 11:24:56 2017 user.warn : Alarm stopped
Mon Oct 2 11:26:55 2017 user.info : New -1 peak @1506961595=82.7 half=277 per=295 amp=-10.5 gain=-0.5
Mon Oct 2 11:26:55 2017 user.info : Ziegler P=2.4 I=0.016 D=3.0
Mon Oct 2 11:27:30 2017 user.warn : Alarm 0L started ringing
Mon Oct 2 11:27:30 2017 user.warn : Alarm stopped


along with several of these error msgs;
Mon Oct 2 11:27:37 2017 daemon.err uhttpd[383]: wc: /proc/net/nf_conntrack: No such file or directory
Mon Oct 2 11:27:37 2017 daemon.err uhttpd[383]: sysctl: error: 'net.nf_conntrack_max' is an unknown key
 
Those error messages at the bottom are from viewing the LEDE Status page, letting you know that there's no firewall stuff enabled on the device, not an issue.

In your regular log messages, I see no email being sent. Do you have "Email" checked on the alarm page for the alarm you are testing (Pit low it looks like), and have you saved the page before using the test button?

Finally, I know you were messing with /usr/share/linkmeter/alarm earlier in the thread. DO NOT DO. Have you reverted any changes you've made to /usr/share/linkmeter/alarm?
 
The email is checked and the page was saved

I had never made changes to the /usr/share/linkmeter/alarm, but after the comments on a missing "}" I added it, I can remove it. I inquired as to what had modified it but no response.

# The entire script is a function, to allow redirection to logger
do_alarms() {
cd `dirname $0`
for SCR in "alarm-all" "alarm-${al_probe}${al_type}" ; do
if [ -x "$SCR" ] ; then
. ./$SCR 2>&1
[ $? -ne 0 ] && exit $?
fi
done
} <-- I added this "}"
 
Last edited:
Yeah there should be no changes needed to /usr/share/linkmeter/alarm, there are no missing characters in the file. Revert it back to original. Usually, the "eval" error indicates you don't have your message properly quoted, because the eval is filling in the variables. The error is in line 1 of the message, not the alarms script.

EDIT: The } you added is breaking the script, the } to close that is at the end of the file already
 
change removed, rebooted but no email is the alarm script file on Github.

I really had editing critical files I would like to replace the Alarm script just in case I hit a key when I shouldn't have.

Lesson learned, advice is free sometimes action cost.
 
The password (your Pi serial number) has several "0" zeros pre-appended to the serial number I some cases 0 is a valid number is that true in this case or are they to be removed pre-appended zeros.
 
You can remove any changes you've made to the alarm script by deleting it from your overlayfs (or "upgrade" the firmware to itself):
rm /overlay/upper/usr/share/linkmeter/alarm

Regarding the password and zeros, I don't know, what do the instructions say?
The account password needs to match your Raspberry Pi's serial number. This can be found under System -> Raspberry Pi -> cpu_serial. The serial/password much include all numbers/letter, do not omit the leading zeros and be sure there is no whitespace in the password.

But it isn't your password if you're not seeing email logging in the syslog, it is the script still erroring in some way which is why I recommend starting fresh because I know for a fact it will spit out an error message if there is an actual error (not caused by the script failing to load, which is what is happening now I believe).
 
Last and final question on the matter.

If I download the image and create a new boot stick would that take me back to square one.
 

 

Back
Top