Hi all, is there a simple way to test the email config? I hope to get my first device setup tomorrow (a zwave light switch) so dont have anything setup on the platform but would like to know if the email config I put in actually works.
thanks!
Hi all, is there a simple way to test the email config? I hope to get my first device setup tomorrow (a zwave light switch) so dont have anything setup on the platform but would like to know if the email config I put in actually works.
thanks!
Clint,
Yes you can do that. I did something similar recently.
I would suggest,
Add the settings to the config file.
Create a simple switch item and add it to a sitemap
Create a simple rule that looks something like this,
rule "Email test"
when
Item newitem changed to ON //Rule triggered from switch on sitemap.
then
sendMail(“destinationemailaddress@???.com”, “Test email!”, “”)
end
I hope that helps. Of course the wiki has more details, https://github.com/openhab/openhab/wiki/Actions#mail-actions
Regards,
George
Awesome, thanks George!
I setup this as my item: Switch sensor “GE Switch” {GE=“GESwitch”}
which is the variable that matches to “newitem” in your rule?
Your going to first want to add the Zwave light switch to your Zwave network/controller. Then you’ll want to add that Zwave device to your items file.
Below is zwave wall switch and email setup I used to test with.
Item
Switch Light_Foyer "Foyer Lights" (All, Lights) {zwave="3"}
rule
rule "Testing Mail Light"
when
Item Light_Foyer received command ON
then
sendMail("xxxx@myemail.xxx", "Light Turned On", "The Foyer Room Light was turned on at " + Date.state.format("%tr") +" on "+ Date.state.format("%tD"))
end
Clint,
As Paul mentioned you can create a new Switch item in your items file and then add that to your sitemap and rule.
Regards,
George
Thanks guys, traveling this week so this has to wait until this weekend.
Will keep you posted!