Page 1 of 1
Email subject line
Posted: Sat 08 May 2021 11:44 pm
by liddelljs
Hi all,
Love the email function in the new release. A minor one I know but is there any way to customise the subject line? I have two weather stations and the generic mail doesn't alert me to which station it is coming from.
Cheers
Steve
Re: Email subject line
Posted: Sun 09 May 2021 12:39 am
by PaulMy
Hi,
I presume you have two instances of CumulusMX running.
The text "By default the email messages use UTF-8 plain text, but you can define your own in strings.ini and use HTML if you wish" in the Alarm settings indicates you can modify or create your own text. You could edit one or both so it would indicate which station.
Enjoy,
Paul
Re: Email subject line
Posted: Sun 09 May 2021 12:51 am
by jlmr731
I saw that on the bottom of alarms page but not sure what the format should be for string.ini would need a descriptor with in [ ] then also options for text to equal
Re: Email subject line
Posted: Sun 09 May 2021 1:27 am
by liddelljs
Thanks Both. I do run two instances of MX on two different RPi's, hence my desire to differentiate the emails. Thanks for the heads up on strings.ini file Paul. I thought it might only refer to text formatting but the samplestrings.ini file does contain an e-mail preamble line (subject?). I modified this line to add my station, selected to use html formatting (thinking this forces the strings.ini file(?) and forced an alarm. No change to the e-mail format. Still just quotes the generic "Cumulus MX Alarm" message.
Further update - I thought I could change that actual alarm message in strings.ini for my station. I tried it for the wind gust alarm (added my location to the message) and then forced a wind gust alarm. No change - still got the generic message. Doesn't seem to be reading from my strings.ini file for some reason. Clearly something I am missing.
Cheers
Steve
Re: Email subject line
Posted: Sun 09 May 2021 9:04 am
by mcrossley
The subject can be defined in strings.ini
Code: Select all
[AlarmEmails]
subject=Cumulus MX Alarm
preamble=A Cumulus MX alarm has been triggered.
windGustAbove=A wind gust above {0} {1} has occurred.
pressureAbove=The pressure has risen above {0} {1}.
tempAbove=The temperature has risen above {0} {1}.
pressBelow=The pressure has fallen below {0} {1}.
tempBelow=The temperature has fallen below {0} {1}.
pressDown=The pressure has decreased by more than {0} {1}.
pressUp=The pressure has increased by more than {0} {1}.
rainAbove=The rainfall today has exceeded {0} {1}.
rainRateAbove=The rainfall rate has exceeded {0} {1}.
sensorLost=Contact has been lost with a remote sensor.
tempDown=The temperature decreased by more than {0} {1}.
tempUp=The temperature has increased by more than {0} {1}.
windAbove=The average wind speed has exceeded {0} {1}.
dataStopped=Cumulus has stopped receiving data from your weather station.
batteryLow=A low battery condition has been detected.
dataSpike=A data spike from your weather station has been suppressed.
upgrade=An upgrade to Cumulus MX is now available.
Where {0} will have the value substituted, and {1} will have the units substituted.
You need to restart Cumulus MX after changing strings.ini
Re: Email subject line
Posted: Sun 09 May 2021 9:42 am
by liddelljs
Many thanks Mark. The MX restart got me. All good and working as you described.
Cheers
Steve
Re: Email subject line
Posted: Wed 19 May 2021 7:10 pm
by M1DUL
liddelljs wrote: ↑Sun 09 May 2021 9:42 am
Many thanks Mark. The MX restart got me. All good and working as you described.
Cheers
Steve
Dear Steve and all,
Did you manage to get your Email subject line working? because mine is still saying the default Cumulus MX Alarm" message.
Here is a screen print of mine:
samplestrings.ini1.jpg
samplestrings.ini2.jpg
I have restarted Cumulus after I did the change, but that has made no diference. Do I need to add anything else to my code? if so what do I need to add.
Many Thanks for any help and Information
Cheers
Mike
Re: Email subject line
Posted: Wed 19 May 2021 7:19 pm
by freddie
Aren't you meant to rename the file as strings.ini?
Re: Email subject line
Posted: Wed 19 May 2021 7:38 pm
by M1DUL
freddie wrote: ↑Wed 19 May 2021 7:19 pm
Aren't you meant to rename the file as strings.ini?
Thank you Freddie, you are right.
Many Thanks
Mike