fhem.cfg.demo 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. attr global userattr devStateIcon devStateStyle icon lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0 sortby structexclude webCmd widgetOverride
  2. attr global autoload_undefined_devices 1
  3. attr global backup_before_update 0
  4. attr global logfile -
  5. attr global modpath .
  6. attr global motd FHEM demo version
  7. attr global room System
  8. attr global sendStatistics never
  9. attr global statefile ./demolog/fhem.save
  10. attr global updateInBackground 1
  11. attr global verbose 3
  12. attr global mseclog
  13. define telnetPort telnet 7072 global
  14. attr telnetPort room System
  15. define WEB FHEMWEB 8083 global
  16. attr WEB JavaScripts codemirror/fhem_codemirror.js
  17. attr WEB defaultRoom Light
  18. attr WEB hiddenroom DashboardRoom
  19. attr WEB iconPath openautomation:fhemSVG:default
  20. attr WEB room System
  21. attr WEB sortRooms Light Cinema Residents Sensors System
  22. define WEBphone FHEMWEB 8084 global
  23. attr WEBphone hiddenroom DashboardRoom
  24. attr WEBphone iconPath openautomation:fhemSVG:default
  25. attr WEBphone room System
  26. attr WEBphone sortRooms Light Cinema Residents Sensors System
  27. attr WEBphone smallscreenCommands 1
  28. attr WEBphone stylesheetPrefix smallscreen
  29. define WEBtablet FHEMWEB 8085 global
  30. attr WEBtablet hiddenroom DashboardRoom
  31. attr WEBtablet iconPath openautomation:fhemSVG:default
  32. attr WEBtablet room System
  33. attr WEBtablet sortRooms Light Cinema Residents Sensors System
  34. attr WEBtablet stylesheetPrefix ios7touchpad
  35. # Fake FileLog entry, to access the fhem log from FHEMWEB
  36. define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
  37. attr Logfile room System
  38. define autocreate autocreate
  39. attr autocreate room System
  40. define eventTypes eventTypes demolog/eventTypes.txt
  41. attr eventTypes room System
  42. define CUL_0 CUL none 0000
  43. attr CUL_0 dummy 1
  44. attr CUL_0 room System
  45. define Outdoor FS20 1234 11
  46. attr Outdoor userattr Light Light_map structexclude
  47. attr Outdoor IODev CUL_0
  48. attr Outdoor Light AllLights
  49. attr Outdoor group Single Lights
  50. attr Outdoor icon light_outdoor
  51. attr Outdoor room Light
  52. define Office FS20 1234 12
  53. attr Office userattr Light Light_map structexclude
  54. attr Office IODev CUL_0
  55. attr Office Light AllLights
  56. attr Office group Single Lights
  57. attr Office icon light_office
  58. attr Office model fs20st
  59. attr Office room Light
  60. define Livingroom FS20 1234 13
  61. attr Livingroom userattr Light Light_map structexclude
  62. attr Livingroom IODev CUL_0
  63. attr Livingroom Light AllLights
  64. attr Livingroom eventMap off:dim0% on:dim100%
  65. attr Livingroom group Single Lights
  66. attr Livingroom icon light_pendant_light
  67. attr Livingroom model fs20di
  68. attr Livingroom room Light
  69. attr Livingroom webCmd dim
  70. define AllLights structure Light Alarm Livingroom Office Outdoor CT RGB
  71. attr AllLights devStateIcon undefined:light_question
  72. attr AllLights group Structure
  73. attr AllLights icon light_light
  74. attr AllLights room Light
  75. define Alarm FS20 1234 14
  76. attr Alarm userattr Light Light_map structexclude
  77. attr Alarm IODev CUL_0
  78. attr Alarm Light AllLights
  79. attr Alarm follow-on-for-timer 1
  80. attr Alarm group Single Lights
  81. attr Alarm icon light_wall_2
  82. attr Alarm room Light
  83. attr Alarm webCmd blink 5 1
  84. define Garden KS300 1234
  85. attr Garden IODev CUL_0
  86. attr Garden group Sensors
  87. attr Garden room Sensors
  88. define Log.Garden FileLog demolog/garden.log Sens.Out:T:.*
  89. attr Log.Garden room Sensors
  90. define Log.Predicted FileLog demolog/predicted.log predicted:T:.*
  91. attr Log.Predicted room Sensors
  92. define Cellar CUL_WS 1 -1 -3.5
  93. attr Cellar group Sensors
  94. attr Cellar room Sensors
  95. define SVG_01_Garden SVG Log.Garden:SVG_01_Garden:CURRENT
  96. attr SVG_01_Garden label "Temp: Min $data{min1}, Max $data{max1}, Last $data{currval1}"
  97. attr SVG_01_Garden room Sensors
  98. attr SVG_01_Garden startDate 2013-08-13
  99. define Log.Cellar FileLog demolog/cellar.log Cellar:T:.*
  100. attr Log.Cellar room Sensors
  101. define SVG_02_Cellar SVG Log.Cellar:SVG_02_Cellar:CURRENT
  102. attr SVG_02_Cellar label "Temp: Min $data{min1}, Max $data{max1}, Last $data{currval1}"
  103. attr SVG_02_Cellar room Sensors
  104. attr SVG_02_Cellar startDate 2013-08-13
  105. define Log.Dewpoint FileLog demolog/dewpoint.log .*dewpoint.*
  106. attr Log.Dewpoint room Sensors
  107. define dew_all dewpoint dewpoint .*
  108. attr dew_all group Helper
  109. attr dew_all room Sensors
  110. define SVG_03_Dewpoint SVG Log.Dewpoint:SVG_03_Dewpoint:CURRENT
  111. attr SVG_03_Dewpoint room Sensors
  112. attr SVG_03_Dewpoint startDate 2013-08-13
  113. define logProxy logProxy
  114. attr logProxy room System
  115. define SVG_04_Sun SVG logProxy:SVG_04_Sun:CURRENT
  116. attr SVG_04_Sun room Sensors
  117. attr SVG_04_Sun fixedrange year
  118. attr SVG_04_Sun title {"".logProxy_dec2hms($data{min1})." - ".logProxy_dec2hms($data{max1})." - ".logProxy_dec2hms($data{min2})." - ".logProxy_dec2hms($data{max2})}
  119. define SVG_05_Polar SVG logProxy:SVG_05_Polar:CURRENT
  120. attr SVG_05_Polar room Sensors
  121. attr SVG_05_Polar plotsize 340,300
  122. define sunRise at *{sunrise()} set Office on
  123. attr sunRise group Timer
  124. attr sunRise icon weather_sunrise
  125. attr sunRise room Light
  126. define sunSet at *{sunset()} set Office off
  127. attr sunSet group Timer
  128. attr sunSet icon weather_sunset
  129. attr sunSet room Light
  130. define outdoorNotifier notify Outdoor:.* set Office $EVENT
  131. attr outdoorNotifier group Notify
  132. attr outdoorNotifier icon light_ceiling_light
  133. attr outdoorNotifier room Light
  134. define Projector dummy
  135. attr Projector userattr lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
  136. attr Projector devStateIcon on:control_on_off:off off:control_home:on
  137. attr Projector group AV
  138. attr Projector room Cinema
  139. attr Projector setList on:noArg off:noArg
  140. attr Projector webCmd on:off
  141. define TV dummy
  142. attr TV userattr lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
  143. attr TV devStateIcon on:control_on_off:off off:control_home:on
  144. attr TV group AV
  145. attr TV room Cinema
  146. attr TV setList on:noArg off:noArg
  147. attr TV webCmd on:off
  148. define Screen dummy
  149. attr Screen userattr lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
  150. attr Screen devStateIcon down:fts_garage_door_100:up up:fts_garage_door_10:down
  151. attr Screen group AV
  152. attr Screen room Cinema
  153. attr Screen setList up:noArg down:noArg
  154. attr Screen webCmd down:up
  155. define CeilingLight FS20 0001 01
  156. attr CeilingLight userattr lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
  157. attr CeilingLight IODev CUL_0
  158. attr CeilingLight eventMap off:dim0% on:dim100%
  159. attr CeilingLight group Light
  160. attr CeilingLight icon light_ceiling_light
  161. attr CeilingLight model dummyDimmer
  162. attr CeilingLight room Cinema
  163. attr CeilingLight webCmd on:off:dim
  164. define ReadingLight FS20 0001 02
  165. attr ReadingLight userattr lightSceneParamsToSave lightSceneRestoreOnlyIfChanged:1,0
  166. attr ReadingLight IODev CUL_0
  167. attr ReadingLight eventMap off:dim0% on:dim100%
  168. attr ReadingLight group Light
  169. attr ReadingLight icon light_floor_lamp
  170. attr ReadingLight room Cinema
  171. attr ReadingLight webCmd on:off:dim:dim 50
  172. define wlCinema weblink htmlCode {LightScene_2html("lcCinema")}
  173. attr wlCinema room Cinema
  174. define lcCinema LightScene Projector Screen TV CeilingLight ReadingLight
  175. attr lcCinema alias Scenes
  176. attr lcCinema devStateIcon AllOff:control_home Break:rc_PAUSE Cinema:scene_cinema WatchTV:it_television
  177. attr lcCinema group Control
  178. attr lcCinema icon scene_scene
  179. attr lcCinema room Cinema
  180. attr lcCinema webCmd scene
  181. define anyViews Dashboard
  182. attr anyViews userattr dashboard_tab2backgroundimage dashboard_tab2colcount dashboard_tab2devices dashboard_tab2groups dashboard_tab2icon dashboard_tab2name dashboard_tab2rowcentercolwidth dashboard_tab2sorting
  183. attr anyViews dashboard_colcount 2
  184. attr anyViews dashboard_row center
  185. attr anyViews dashboard_rowcentercolwidth 50%
  186. attr anyViews dashboard_tab1groups Home State,Light,AV,Single Lights,Color Lights
  187. attr anyViews dashboard_tab1name Dashboard Demo
  188. attr anyViews dashboard_tab1sorting t0c0,Single Lights,true,400,209,0,0:t0c0,AV,true,400,170,0,209:t0c1,Light,true,444,129,h84,0:t0c1,Home State,true,444,204,384,129:
  189. attr anyViews room hidden
  190. attr anyViews alias Dashboard Demo
  191. define anyViews_weblink weblink htmlCode {DashboardAsHtml("anyViews")}
  192. attr anyViews_weblink room DashboardRoom
  193. define rgr_Residents RESIDENTS
  194. attr rgr_Residents alias Residents
  195. attr rgr_Residents devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home
  196. attr rgr_Residents group Home State
  197. attr rgr_Residents icon control_building_filled
  198. attr rgr_Residents room Residents
  199. attr rgr_Residents sortby 2
  200. attr rgr_Residents webCmd state
  201. define rgr_Parents RESIDENTS
  202. attr rgr_Parents alias Parents
  203. attr rgr_Parents devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home
  204. attr rgr_Parents group Home State
  205. attr rgr_Parents icon control_building_filled
  206. attr rgr_Parents room Residents
  207. attr rgr_Parents sortby 2
  208. attr rgr_Parents webCmd state
  209. define rgr_Children RESIDENTS
  210. attr rgr_Children alias Children
  211. attr rgr_Children devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home
  212. attr rgr_Children group Home State
  213. attr rgr_Children icon control_building_filled
  214. attr rgr_Children room Residents
  215. attr rgr_Children sortby 3
  216. attr rgr_Children webCmd state
  217. define rgr_Guests RESIDENTS
  218. attr rgr_Guests alias Guests
  219. attr rgr_Guests devStateIcon .*home:status_available:absent .*absent:status_away_1:home .*gone:status_standby:home .*none:control_building_empty .*gotosleep:status_night:asleep .*asleep:status_night:awoken .*awoken:status_available:home
  220. attr rgr_Guests group Home State
  221. attr rgr_Guests icon control_building_filled
  222. attr rgr_Guests room Residents
  223. attr rgr_Guests sortby 4
  224. attr rgr_Guests webCmd state
  225. define rg_Guest1 GUEST rgr_Residents,rgr_Guests
  226. attr rg_Guest1 alias Guest1
  227. attr rg_Guest1 devStateIcon .*home:user_available:absent .*absent:user_away:home .*none:control_building_empty:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown
  228. attr rg_Guest1 group Guests
  229. attr rg_Guest1 icon scene_visit_guests
  230. attr rg_Guest1 rg_autoGoneAfter 0.01
  231. attr rg_Guest1 rg_realname alias
  232. attr rg_Guest1 room Residents
  233. attr rg_Guest1 sortby 1
  234. attr rg_Guest1 webCmd state
  235. define rg_Guest2 GUEST rgr_Residents,rgr_Guests
  236. attr rg_Guest2 alias Guest2
  237. attr rg_Guest2 devStateIcon .*home:user_available:absent .*absent:user_away:home .*none:control_building_empty:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown
  238. attr rg_Guest2 group Guests
  239. attr rg_Guest2 icon scene_visit_guests
  240. attr rg_Guest2 rg_autoGoneAfter 0.01
  241. attr rg_Guest2 rg_realname alias
  242. attr rg_Guest2 room Residents
  243. attr rg_Guest2 sortby 1
  244. attr rg_Guest2 webCmd state
  245. define rr_Father ROOMMATE rgr_Residents,rgr_Parents
  246. attr rr_Father alias Status
  247. attr rr_Father devStateIcon .*home:user_available:absent .*absent:user_away:home .*gone:user_ext_away:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown
  248. attr rr_Father group Father
  249. attr rr_Father icon status_available
  250. attr rr_Father room Residents
  251. attr rr_Father rr_autoGoneAfter 0.1
  252. attr rr_Father sortby 0
  253. attr rr_Father webCmd state
  254. define rr_Mother ROOMMATE rgr_Residents,rgr_Parents
  255. attr rr_Mother alias Status
  256. attr rr_Mother devStateIcon .*home:user_available:absent .*absent:user_away:home .*gone:user_ext_away:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown
  257. attr rr_Mother group Mother
  258. attr rr_Mother icon status_available
  259. attr rr_Mother room Residents
  260. attr rr_Mother rr_autoGoneAfter 0.1
  261. attr rr_Mother rr_passPresenceTo rr_Baby
  262. attr rr_Mother sortby 0
  263. attr rr_Mother webCmd state
  264. define rr_Daughter ROOMMATE rgr_Residents,rgr_Children
  265. attr rr_Daughter alias Status
  266. attr rr_Daughter devStateIcon .*home:user_available:absent .*absent:user_away:home .*gone:user_ext_away:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown
  267. attr rr_Daughter group Daughter
  268. attr rr_Daughter icon status_available
  269. attr rr_Daughter room Residents
  270. attr rr_Daughter sortby 0
  271. attr rr_Daughter webCmd state
  272. define rr_Son ROOMMATE rgr_Residents,rgr_Children
  273. attr rr_Son alias Status
  274. attr rr_Son devStateIcon .*home:user_available:absent .*absent:user_away:home .*gone:user_ext_away:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown
  275. attr rr_Son group Son
  276. attr rr_Son icon status_available
  277. attr rr_Son room Residents
  278. attr rr_Son sortby 0
  279. attr rr_Son webCmd state
  280. define AllResidentsAway notify rgr_Residents:(absent|gone) set AllLights off;;set lcCinema scene AllOff
  281. attr AllResidentsAway room Residents
  282. define ResidentsComeHome notify rgr_Residents:home set Outdoor on
  283. attr ResidentsComeHome room Residents
  284. define rr_Baby ROOMMATE rgr_Residents,rgr_Children
  285. attr rr_Baby alias Status
  286. attr rr_Baby devStateIcon .*home:user_available:absent .*absent:user_away:home .*gone:user_ext_away:home .*gotosleep:scene_toilet:asleep .*asleep:scene_sleeping:awoken .*awoken:scene_sleeping_alternat:home .*:user_unknown
  287. attr rr_Baby group Baby
  288. attr rr_Baby icon status_available
  289. attr rr_Baby room Residents
  290. attr rr_Baby sortby 0
  291. attr rr_Baby webCmd state
  292. define RGB readingsProxy RGB
  293. attr RGB userattr Light Light_map structexclude
  294. attr RGB Light AllLights
  295. attr RGB alias RGB Light
  296. attr RGB comment light with the ability to change RGB color
  297. attr RGB devStateIcon {Color::devStateIcon("RGB","rgb","rgb","state")}
  298. attr RGB group Color Lights
  299. attr RGB room Light
  300. attr RGB setFn {if( $CMD =~ m/on|off/ ) { $ARGS=$CMD;;$CMD = "state" } else {fhem ("setreading $DEVICE state on");;} if( $CMD =~ m/hue/ ) {my ($r,$g,$b) = Color::hsv2rgb($ARGS/360,1,1);; my $rgb = Color::rgb2hex( $r*255, $g*255, $b*255 );; fhem ("setreading $DEVICE rgb $rgb");;} if( $CMD =~ m/rgb/ && $ARGS =~ m/^(..)(..)(..)/ ) {my( $r, $g, $b ) = (hex($1)/255.0, hex($2)/255.0, hex($3)/255.0);; my ($h,$s,$v) = Color::rgb2hsv($r,$g,$b);; my $hue = int($h*359);; fhem ("setreading $DEVICE hue $hue");;} fhem ("setreading $DEVICE $CMD $ARGS");;return undef;;}
  301. attr RGB setList on:noArg off:noArg rgb:colorpicker,RGB hue:colorpicker,HUE,0,1,359
  302. attr RGB webCmd hue:rgb:rgb ff0000:rgb 00ff00:rgb 0000ff:rgb ffffff:on:off
  303. define colorInit notify global:INITIALIZED {use Color;;Color_Initialize()}
  304. attr colorInit room hidden
  305. define CT readingsProxy CT
  306. attr CT userattr Light Light_map structexclude
  307. attr CT Light AllLights
  308. attr CT alias CT Light
  309. attr CT comment light with the ability to change the color temperature
  310. attr CT devStateIcon {Color::devStateIcon("CT","rgb","rgb","state")}
  311. attr CT getFn { my ($r,$g,$b) = Color::ct2rgb( ReadingsVal($DEVICE,"ct",333) );; return (Color::rgb2hex($r,$g,$b), 1);; }
  312. attr CT getList rgb:noArg
  313. attr CT group Color Lights
  314. attr CT room Light
  315. attr CT setFn {if( $CMD =~ m/on|off/ ) { $ARGS=$CMD;;$CMD = "state" } else {fhem ("setreading $DEVICE state on");;} fhem ("setreading $DEVICE $CMD $ARGS");;return undef;;}
  316. attr CT setList on:noArg off:noArg ct:colorpicker,CT,2000,1,6500
  317. attr CT webCmd ct::ct 2040:ct 2630:ct 3703:ct 6250:on:off
  318. define -ignoreErr Weather Weather 673513 1800 de
  319. attr Weather group Weather
  320. attr Weather room Weather
  321. define Weather.weblink weblink htmlCode { WeatherAsHtmlH("Weather") }
  322. attr Weather.weblink alias Weather Forecast
  323. attr Weather.weblink room Weather
  324. define -ignoreErr Display RSS jpg localhost ./demolog/layout
  325. attr Display room System
  326. attr Display size 800x600
  327. attr Display bg ./demolog/pictures
  328. attr Display tmin 15
  329. attr Display refresh 5