{"id":293,"date":"2017-05-24T21:05:58","date_gmt":"2017-05-24T21:05:58","guid":{"rendered":"https:\/\/test.warrensoft.co.uk\/wp-test\/home-hub\/?p=293"},"modified":"2018-12-08T07:32:18","modified_gmt":"2018-12-08T07:32:18","slug":"hub-email-alerts","status":"publish","type":"post","link":"https:\/\/test.warrensoft.co.uk\/wp-test\/2017\/05\/24\/hub-email-alerts\/","title":{"rendered":"Hub Email Alerts"},"content":{"rendered":"<p>We have all the controller code installed for Alerts, we just need to configure some values and settings.<\/p>\n<p>Here is my sensor landscape:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-291\" src=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/TestSensorLandscape-300x112.png\" alt=\"\" width=\"300\" height=\"112\" srcset=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/TestSensorLandscape-300x112.png 300w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/TestSensorLandscape.png 354w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Choose a suitable sensor to add some alerts and enter values for High Alert, Low Alert &amp; Email Recipient.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-296\" src=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/SensorAlertEdit-214x300.png\" alt=\"\" width=\"214\" height=\"300\" srcset=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/SensorAlertEdit-214x300.png 214w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/SensorAlertEdit.png 492w\" sizes=\"auto, (max-width: 214px) 100vw, 214px\" \/><\/p>\n<p>In order for the hub to send email notifications, it needs to know some details about the M<em>ail Server<\/em>, <em>Email From <\/em>address and <em>Email Sender<\/em>. These are Settings that need to be configured in the Organisation | Settings tab.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-298\" src=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/AlertUserSettings-300x238.png\" alt=\"\" width=\"300\" height=\"238\" srcset=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/AlertUserSettings-300x238.png 300w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/AlertUserSettings.png 489w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The Mail Server field needs to be populated with the name of your mail server, and the Email Sender with a valid email address. The Email From field is just the value displayed in the email, and could potentially be any text. I was able to send emails through my ISP with this simple arrangement, however, it should be fairly straightforward to modify the send_email function in helpers.py, and add any additional user settings required.<\/p>\n<p>If you have a working temperature sensor, then all that remains is to warm it up to generate the alert. The value will need to exceed the limit for 3 cycles in order to trigger the alert. This is to prevent erroneous readings from causing unnecessary messages.<\/p>\n<p>If you do not have a real sensor, \u00a0you can place the alert on the virtual sensor to confirm your code and email configuration is working. In the next post we will look at SMS alerts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have all the controller code installed for Alerts, we just need to configure some values and settings. Here is my sensor landscape: Choose a suitable sensor to add some alerts and enter values for High Alert, Low Alert &amp; Email Recipient. In order for the hub to send email notifications, it needs to know &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/test.warrensoft.co.uk\/wp-test\/2017\/05\/24\/hub-email-alerts\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hub Email Alerts&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-hub-software-controller"],"_links":{"self":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":9,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":643,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/293\/revisions\/643"}],"wp:attachment":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}