meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sustcodecamp2016:group8:start [2016/03/04 08:58] – m5983 | sustcodecamp2016:group8:start [2016/03/11 10:37] (current) – m5983 | ||
|---|---|---|---|
| Line 95: | Line 95: | ||
| * twilight sensor - {{: | * twilight sensor - {{: | ||
| * | * | ||
| + | ==== Attachments ==== | ||
| + | Definition of code for Email notification: | ||
| + | < | ||
| + | //############################################## | ||
| + | # $Id: myUtilsTemplate.pm 7570 2015-01-14 18:31:44Z rudolfkoenig $ | ||
| + | # | ||
| + | # Save this file as 99_myUtils.pm, | ||
| + | # file. They are then available in every Perl expression. | ||
| - | ==== Google doc ==== | + | package main; |
| - | https://docs.google.com/document/d/1wBi_9CDYDaCNYA9cGpxQahuaIYWDqL4wWyGvOf4E_vg/edit?usp=sharing | + | |
| + | use strict; | ||
| + | use warnings; | ||
| + | use POSIX; | ||
| + | |||
| + | sub | ||
| + | myUtils_Initialize($$) | ||
| + | { | ||
| + | my ($hash) | ||
| + | } | ||
| + | |||
| + | # Enter you functions below _this_ line. | ||
| + | |||
| + | sub | ||
| + | DebianMail | ||
| + | { | ||
| + | my $rcpt = shift; | ||
| + | my $subject | ||
| + | my $text = shift; | ||
| + | my $attach | ||
| + | my $ret = ""; | ||
| + | my $sender | ||
| + | my $konto | ||
| + | my $passwrd = " | ||
| + | my $provider = " | ||
| + | Log 1, " | ||
| + | Log 1, " | ||
| + | Log 1, " | ||
| + | Log 1, " | ||
| + | |||
| + | $ret .= qx(sendEmail -f ' | ||
| + | $ret =~ s, | ||
| + | Log 1, " | ||
| + | } | ||
| + | |||
| + | 1;</code> | ||
| + | fhem.cfg file: | ||
| + | < | ||
| + | attr global userattr cmdIcon devStateIcon devStateStyle icon msgContactAudio msgContactLight msgContactMail msgContactPush msgContactScreen msgRecipient msgRecipientAudio msgRecipientLight msgRecipientMail msgRecipientPush msgRecipientScreen msgRecipientText sortby webCmd widgetOverride | ||
| + | attr global autoload_undefined_devices 1 | ||
| + | attr global logfile ./log/ | ||
| + | attr global modpath . | ||
| + | attr global motd SecurityCheck: | ||
| + | \ | ||
| + | WEB, | ||
| + | telnetPort has no password/ | ||
| + | \ | ||
| + | Restart FHEM for a new check if the problem is fixed,\ | ||
| + | or set the global attribute motd to none to supress this message.\ | ||
| + | |||
| + | attr global statefile ./ | ||
| + | attr global updateInBackground 1 | ||
| + | attr global verbose 3 | ||
| + | |||
| + | define telnetPort telnet 7072 global | ||
| + | |||
| + | define WEB FHEMWEB 8083 global | ||
| + | |||
| + | define WEBphone FHEMWEB 8084 global | ||
| + | attr WEBphone stylesheetPrefix smallscreen | ||
| + | |||
| + | define WEBtablet FHEMWEB 8085 global | ||
| + | attr WEBtablet stylesheetPrefix touchpad | ||
| + | |||
| + | # Fake FileLog entry, to access the fhem log from FHEMWEB | ||
| + | define Logfile FileLog ./ | ||
| + | |||
| + | define autocreate autocreate | ||
| + | attr autocreate filelog ./ | ||
| + | |||
| + | define eventTypes eventTypes ./ | ||
| + | |||
| + | # Disable this to avoid looking for new USB devices on startup | ||
| + | define initialUsbCheck notify global: | ||
| + | define CSM CUL / | ||
| + | define HMS100TF_a090 HMS a090 | ||
| + | attr HMS100TF_a090 IODev CSM | ||
| + | attr HMS100TF_a090 room HMS | ||
| + | define FileLog_HMS100TF_a090 FileLog ./ | ||
| + | attr FileLog_HMS100TF_a090 logtype temp4hum6: | ||
| + | attr FileLog_HMS100TF_a090 room HMS | ||
| + | define SVG_HMS100TF_a090 SVG FileLog_HMS100TF_a090: | ||
| + | attr SVG_HMS100TF_a090 label " | ||
| + | attr SVG_HMS100TF_a090 room Plots | ||
| + | define PIRI_Group8 FS20 815a 00 | ||
| + | attr PIRI_Group8 IODev CSM | ||
| + | attr PIRI_Group8 room FS20 | ||
| + | define FileLog_PIRI_Group8 FileLog ./ | ||
| + | attr FileLog_PIRI_Group8 logtype text | ||
| + | attr FileLog_PIRI_Group8 room FS20 | ||
| + | define FileLog_ThermostatG8 FileLog ./ | ||
| + | attr FileLog_ThermostatG8 logtype fht: | ||
| + | attr FileLog_ThermostatG8 room FHT | ||
| + | define SVG_ThermostatG8 SVG FileLog_ThermostatG8: | ||
| + | attr SVG_ThermostatG8 label " | ||
| + | attr SVG_ThermostatG8 room Plots | ||
| + | define FileLog_FHT_5212 FileLog ./ | ||
| + | attr FileLog_FHT_5212 logtype fht: | ||
| + | attr FileLog_FHT_5212 room FHT | ||
| + | define SVG_FHT_5212 SVG FileLog_FHT_5212: | ||
| + | attr SVG_FHT_5212 label " | ||
| + | attr SVG_FHT_5212 room Plots | ||
| + | define FileLog_FS20_256800 FileLog ./ | ||
| + | attr FileLog_FS20_256800 logtype text | ||
| + | attr FileLog_FS20_256800 room FS20 | ||
| + | define FileLog_FS20_256801 FileLog ./ | ||
| + | attr FileLog_FS20_256801 logtype text | ||
| + | attr FileLog_FS20_256801 room FS20 | ||
| + | define FileLog_FS20_256802 FileLog ./ | ||
| + | attr FileLog_FS20_256802 logtype text | ||
| + | attr FileLog_FS20_256802 room FS20 | ||
| + | define FileLog_FS20_256803 FileLog ./ | ||
| + | attr FileLog_FS20_256803 logtype text | ||
| + | attr FileLog_FS20_256803 room FS20 | ||
| + | define FileLog_FHT_1339 FileLog ./ | ||
| + | attr FileLog_FHT_1339 logtype fht: | ||
| + | attr FileLog_FHT_1339 room FHT | ||
| + | define SVG_FHT_1339 SVG FileLog_FHT_1339: | ||
| + | attr SVG_FHT_1339 label " | ||
| + | attr SVG_FHT_1339 room Plots | ||
| + | define DimmerG8 FS20 42b0 00 | ||
| + | attr DimmerG8 IODev CSM | ||
| + | attr DimmerG8 room FS20 | ||
| + | attr DimmerG8 showtime 1 | ||
| + | attr DimmerG8 stateFormat 1 | ||
| + | define FileLog_DimmerG8 FileLog ./ | ||
| + | attr FileLog_DimmerG8 logtype text | ||
| + | attr FileLog_DimmerG8 room FS20 | ||
| + | define lightG8 FS20 42b0 38 | ||
| + | attr lightG8 IODev CSM | ||
| + | attr lightG8 room FS20 | ||
| + | define FileLog_lightG8 FileLog ./ | ||
| + | attr FileLog_lightG8 logtype text | ||
| + | attr FileLog_lightG8 room FS20 | ||
| + | define globalMsg msgConfig | ||
| + | attr globalMsg comment FHEM Global Configuration for command ' | ||
| + | attr globalMsg group Global | ||
| + | attr globalMsg stateFormat fhemMsgState | ||
| + | attr globalMsg verbose 3 | ||
| + | define FileLog_FHT_4549 FileLog ./ | ||
| + | attr FileLog_FHT_4549 logtype fht: | ||
| + | attr FileLog_FHT_4549 room FHT | ||
| + | define SVG_FHT_4549 SVG FileLog_FHT_4549: | ||
| + | attr SVG_FHT_4549 label " | ||
| + | attr SVG_FHT_4549 room Plots | ||
| + | define HMS100TF_cab9 HMS cab9 | ||
| + | attr HMS100TF_cab9 IODev CSM | ||
| + | attr HMS100TF_cab9 room HMS | ||
| + | define FileLog_HMS100TF_cab9 FileLog ./ | ||
| + | attr FileLog_HMS100TF_cab9 logtype temp4hum6: | ||
| + | attr FileLog_HMS100TF_cab9 room HMS | ||
| + | define SVG_HMS100TF_cab9 SVG FileLog_HMS100TF_cab9: | ||
| + | attr SVG_HMS100TF_cab9 label " | ||
| + | attr SVG_HMS100TF_cab9 room Plots | ||
| + | define FileLog_FS20_ff2a00 FileLog ./ | ||
| + | attr FileLog_FS20_ff2a00 logtype text | ||
| + | attr FileLog_FS20_ff2a00 room FS20 | ||
| + | define FileLog_FS20_ff2a01 FileLog ./ | ||
| + | attr FileLog_FS20_ff2a01 logtype text | ||
| + | attr FileLog_FS20_ff2a01 room FS20 | ||
| + | define FileLog_FS20_1be41b FileLog ./ | ||
| + | attr FileLog_FS20_1be41b logtype text | ||
| + | attr FileLog_FS20_1be41b room FS20 | ||
| + | define FileLog_FHT_3232 FileLog ./ | ||
| + | attr FileLog_FHT_3232 logtype fht: | ||
| + | attr FileLog_FHT_3232 room FHT | ||
| + | define SVG_FHT_3232 SVG FileLog_FHT_3232: | ||
| + | attr SVG_FHT_3232 label " | ||
| + | attr SVG_FHT_3232 room Plots | ||
| + | define ThermostatG8_not notify Thermo8: | ||
| + | {\ | ||
| + | if ($EVTPART1 gt " | ||
| + | {\ | ||
| + | fhem "set Thermo8 desired-temp 20"\ | ||
| + | }\ | ||
| + | }\ | ||
| + | |||
| + | attr ThermostatG8_not disable 1 | ||
| + | define FileLog_FS20_1be400 FileLog ./ | ||
| + | attr FileLog_FS20_1be400 logtype text | ||
| + | attr FileLog_FS20_1be400 room FS20 | ||
| + | define Thermo8 FHT 2d34 | ||
| + | attr Thermo8 IODev CSM | ||
| + | attr Thermo8 room FHT | ||
| + | define FileLog_Thermo8 FileLog ./ | ||
| + | attr FileLog_Thermo8 logtype fht: | ||
| + | attr FileLog_Thermo8 room FHT | ||
| + | define SVG_Thermo8 SVG FileLog_Thermo8: | ||
| + | attr SVG_Thermo8 label " | ||
| + | attr SVG_Thermo8 room Plots | ||
| + | define LightThermo notify PIRI_Group8: | ||
| + | { fhem "set DimmerG8 on" } | ||
| + | attr LightThermo disable 1 | ||
| + | define FileLog_FS20_6ce101 FileLog ./ | ||
| + | attr FileLog_FS20_6ce101 logtype text | ||
| + | attr FileLog_FS20_6ce101 room FS20 | ||
| + | define FileLog_FS20_777700 FileLog ./ | ||
| + | attr FileLog_FS20_777700 logtype text | ||
| + | attr FileLog_FS20_777700 room FS20 | ||
| + | define FileLog_FS20_6ce100 FileLog ./ | ||
| + | attr FileLog_FS20_6ce100 logtype text | ||
| + | attr FileLog_FS20_6ce100 room FS20 | ||
| + | define winG8 CUL_FHTTK 268e63 | ||
| + | attr winG8 IODev CSM | ||
| + | attr winG8 room CUL_FHTTK | ||
| + | define FileLog_winG8 FileLog ./ | ||
| + | attr FileLog_winG8 logtype fht80tf: | ||
| + | attr FileLog_winG8 room CUL_FHTTK | ||
| + | define SVG_winG8 SVG FileLog_winG8: | ||
| + | attr SVG_winG8 label "winG8 Min $data{min1}, | ||
| + | attr SVG_winG8 room Plots | ||
| + | define OpenWindow notify winG8: | ||
| + | {\ | ||
| + | if ($EVTPART1 eq " | ||
| + | {\ | ||
| + | fhem "set Thermo8 desired-temp 16.0" | ||
| + | \ | ||
| + | }\ | ||
| + | } | ||
| + | attr OpenWindow disable 1 | ||
| + | define PiriChange notify PIRI_Group8: | ||
| + | {\ | ||
| + | fhem "set DimmerG8 on;;;;set Thermo8 desired-temp 20;;;; | ||
| + | \ | ||
| + | } | ||
| + | attr PiriChange disable 0 | ||
| + | define heatingOn dummy | ||
| + | attr heatingOn userattr 1 | ||
| + | define notificationEmail MSGMail cubie@cubieez manishlamichhane@gmail.com smtp.gmail.com /etc/dovecot/users | ||
| + | attr notificationEmail CR 0 | ||
| + | attr notificationEmail authfile | ||
| + | attr notificationEmail from cubie@cubieez | ||
| + | attr notificationEmail mailtype plain | ||
| + | attr notificationEmail smtphost smtp.gmail.com | ||
| + | attr notificationEmail smtpport 465 | ||
| + | attr notificationEmail subject notficication from codecamp | ||
| + | attr notificationEmail to manishlamichhane@gmail.com | ||
| + | define myEmail MSGMail cubie@cubeez manishlamichhane@gmail.com smtp.gmail.com / | ||
| + | attr myEmail CR 1 | ||
| + | attr myEmail authfile / | ||
| + | attr myEmail from cubie@cubeez | ||
| + | attr myEmail mailtype plain | ||
| + | attr myEmail smtphost smtp.gmail.com | ||
| + | attr myEmail subject FHEM | ||
| + | attr myEmail to manishlamichhane@gmail.com | ||
| + | define notifyMail notify PIRI_Group8: | ||
| + | { fhem " | ||
| + | } | ||
| + | attr notifyMail disable 1 | ||
| + | define FHT_3133 FHT 3133 | ||
| + | attr FHT_3133 IODev CSM | ||
| + | attr FHT_3133 room FHT | ||
| + | define FileLog_FHT_3133 FileLog ./ | ||
| + | attr FileLog_FHT_3133 logtype fht: | ||
| + | attr FileLog_FHT_3133 room FHT | ||
| + | define SVG_FHT_3133 SVG FileLog_FHT_3133: | ||
| + | attr SVG_FHT_3133 label " | ||
| + | attr SVG_FHT_3133 room Plots | ||
| + | define FHT_5012 FHT 5012 | ||
| + | attr FHT_5012 IODev CSM | ||
| + | attr FHT_5012 room FHT | ||
| + | define FileLog_FHT_5012 FileLog ./ | ||
| + | attr FileLog_FHT_5012 logtype fht: | ||
| + | attr FileLog_FHT_5012 room FHT | ||
| + | define SVG_FHT_5012 SVG FileLog_FHT_5012: | ||
| + | attr SVG_FHT_5012 label " | ||
| + | attr SVG_FHT_5012 room Plots | ||
| + | define CUL_FHTTK_b9b7d6 CUL_FHTTK b9b7d6 | ||
| + | attr CUL_FHTTK_b9b7d6 IODev CSM | ||
| + | attr CUL_FHTTK_b9b7d6 room CUL_FHTTK | ||
| + | define FileLog_CUL_FHTTK_b9b7d6 FileLog ./ | ||
| + | attr FileLog_CUL_FHTTK_b9b7d6 logtype fht80tf: | ||
| + | attr FileLog_CUL_FHTTK_b9b7d6 room CUL_FHTTK | ||
| + | define SVG_CUL_FHTTK_b9b7d6 SVG FileLog_CUL_FHTTK_b9b7d6: | ||
| + | attr SVG_CUL_FHTTK_b9b7d6 label " | ||
| + | attr SVG_CUL_FHTTK_b9b7d6 room Plots | ||
| + | define FS20_42b001 FS20 42b0 01 | ||
| + | attr FS20_42b001 IODev CSM | ||
| + | attr FS20_42b001 room FS20 | ||
| + | define FileLog_FS20_42b001 FileLog ./ | ||
| + | attr FileLog_FS20_42b001 logtype text | ||
| + | attr FileLog_FS20_42b001 room FS20 | ||
| + | define FS20_4d7b00 FS20 4d7b 00 | ||
| + | attr FS20_4d7b00 IODev CSM | ||
| + | attr FS20_4d7b00 room FS20 | ||
| + | define FileLog_FS20_4d7b00 FileLog ./ | ||
| + | attr FileLog_FS20_4d7b00 logtype text | ||
| + | attr FileLog_FS20_4d7b00 room FS20 | ||
| + | define FS20_1b1b00 FS20 1b1b 00 | ||
| + | attr FS20_1b1b00 IODev CSM | ||
| + | attr FS20_1b1b00 room FS20 | ||
| + | define FileLog_FS20_1b1b00 FileLog ./ | ||
| + | attr FileLog_FS20_1b1b00 logtype text | ||
| + | attr FileLog_FS20_1b1b00 room FS20 | ||
| + | define FS20_1be411 FS20 1be4 11 | ||
| + | attr FS20_1be411 IODev CSM | ||
| + | attr FS20_1be411 room FS20 | ||
| + | define FileLog_FS20_1be411 FileLog ./ | ||
| + | attr FileLog_FS20_1be411 logtype text | ||
| + | attr FileLog_FS20_1be411 room FS20 | ||
| + | define FS20_1be401 FS20 1be4 01 | ||
| + | attr FS20_1be401 IODev CSM | ||
| + | attr FS20_1be401 room FS20 | ||
| + | define FileLog_FS20_1be401 FileLog ./ | ||
| + | attr FileLog_FS20_1be401 logtype text | ||
| + | attr FileLog_FS20_1be401 room FS20 | ||
| + | |||
| + | </ | ||
| + | ==== Report and Presentation Slides ==== | ||
| + | * Report - {{: | ||
| + | * Slides - {{: | ||
| + | |||
| + | ==== Poster ==== | ||
| + | {{: | ||