commandref.html 3.0 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <title>FHEM reference</title>
  5. <script type="text/javascript" src="fhemdoc.js"></script>
  6. <noscript>
  7. <link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
  8. </noscript>
  9. <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
  10. <link rel="shortcut icon" href="/fhem/icons/favicon.ico"/>
  11. </head>
  12. <body style="word-wrap: break-word;">
  13. <div id="menuScrollArea">
  14. <div id="logo"></div>
  15. <div id="menu">
  16. <h3>fhem.pl reference</h3>
  17. Version: <b>EN</b>&nbsp;<a href="commandref_DE.html">DE</a>
  18. <br><br>
  19. <a href="#doctop">Scroll to top</a>
  20. <br><br>
  21. <a style="display:none" href="#" name="loadAll">Load complete doc</a>
  22. <br><br>
  23. <a id="otherLang" style="display:none" href="#" name="otherLang">
  24. Load <span style="display:none" lang="DE">german</span>
  25. <span style="display:none" lang="EN">english</span>
  26. doc for <span class="mod"></span>
  27. </a>
  28. </div>
  29. </div>
  30. <div id="right">
  31. <a name="doctop"></a>
  32. <h3>Contents</h3>
  33. <ul>
  34. <a href="#intro">Introduction</a><br>
  35. <a href="#command">FHEM command types</a><br>
  36. <a href="#devspec">Device specification</a><br>
  37. <a href="#attributes">Attributes</a><br>
  38. <br>
  39. <b>FHEM commands</b>
  40. <ul>
  41. <!-- header:command -->
  42. <a href="#apptime">apptime</a> &nbsp;
  43. <a href="#attr">attr</a> &nbsp;
  44. <a href="#backup">backup</a> &nbsp;
  45. <a href="#cancel">cancel</a> &nbsp;
  46. <a href="#cmdalias">cmdalias</a> &nbsp;
  47. <a href="#configdb">configdb</a> &nbsp;
  48. <a href="#copy">copy</a> &nbsp;
  49. <a href="#count">count</a> &nbsp;
  50. <a href="#createlog">createlog</a> &nbsp;
  51. <a href="#CULflash">CULflash</a> &nbsp;
  52. <a href="#define">define</a> &nbsp;
  53. <a href="#defmod">defmod</a> &nbsp;
  54. <a href="#delete">delete</a> &nbsp;
  55. <a href="#deleteattr">deleteattr</a> &nbsp;
  56. <a href="#deletefile">deletefile</a> &nbsp;
  57. <a href="#deletereading">deletereading</a> &nbsp;
  58. <a href="#displayattr">displayattr</a> &nbsp;
  59. <a href="#fhemdebug">fhemdebug</a> &nbsp;
  60. <a href="#fheminfo">fheminfo</a> &nbsp;
  61. <a href="#get">get</a> &nbsp;
  62. <a href="#help">help</a> &nbsp;
  63. <a href="#HMtemplate">HMtemplate</a> &nbsp;
  64. <a href="#IF">IF</a> &nbsp;
  65. <a href="#include">include</a> &nbsp;
  66. <a href="#inform">inform</a> &nbsp;
  67. <a href="#JsonList">JsonList</a> &nbsp;
  68. <a href="#JsonList2">JsonList2</a> &nbsp;
  69. <a href="#list">list</a> &nbsp;
  70. <a href="#modify">modify</a> &nbsp;
  71. <a href="#MSG">MSG</a> &nbsp;
  72. <a href="#notice">notice</a> &nbsp;
  73. <a href="#quit">quit</a> &nbsp;
  74. <a href="#reload">reload</a> &nbsp;
  75. <a href="#rename">rename</a> &nbsp;
  76. <a href="#rereadcfg">rereadcfg</a> &nbsp;
  77. <a href="#restore">restore</a> &nbsp;
  78. <a href="#save">save</a> &nbsp;
  79. <a href="#set">set</a> &nbsp;
  80. <a href="#setdefaultattr">setdefaultattr</a> &nbsp;
  81. <a href="#setreading">setreading</a> &nbsp;
  82. <a href="#setstate">setstate</a> &nbsp;
  83. <a href="#shutdown">shutdown</a> &nbsp;
  84. <a href="#sleep">sleep</a> &nbsp;
  85. <a href="#template">template</a> &nbsp;
  86. <a href="#trigger">trigger</a> &nbsp;
  87. <a href="#update">update</a> &nbsp;
  88. <a href="#uptime">uptime</a> &nbsp;
  89. <a href="#usb">usb</a> &nbsp;
  90. <a href="#version">version</a> &nbsp;
  91. <a href="#XmlList">XmlList</a> &nbsp;
  92. </ul>
  93. <br>
  94. <b>Device modules</b>
  95. <ul>
  96. <a href="#global">global</a><br>
  97. <!-- header:device -->
  98. <a href="#alexa">alexa</a> &nbsp;
  99. <a href="#ALL3076">ALL3076</a> &nbsp;
  100. <a href="#ALL4000T">ALL4000T</a> &nbsp;
  101. <a href="#ALL4027">ALL4027</a> &nbsp;
  102. <a href="#allergy">allergy</a> &nbsp;
  103. <a href="#AMAD">AMAD</a> &nbsp;
  104. <a href="#AMADCommBridge">AMADCommBridge</a> &nbsp;
  105. <a href="#AMADDevice">AMADDevice</a> &nbsp;
  106. <a href="#Aqicn">Aqicn</a> &nbsp;
  107. <a href="#ArduCounter">ArduCounter</a> &nbsp;
  108. <a href="#Aurora">Aurora</a> &nbsp;
  109. <a href="#BDKM">BDKM</a> &nbsp;
  110. <a href="#BOSEST">BOSEST</a> &nbsp;
  111. <a href="#BRAVIA">BRAVIA</a> &nbsp;
  112. <a href="#Broadlink">Broadlink</a> &nbsp;
  113. <a href="#BS">BS</a> &nbsp;
  114. <a href="#Calendar">Calendar</a> &nbsp;
  115. <a href="#CALVIEW">CALVIEW</a> &nbsp;
  116. <a href="#CM11">CM11</a> &nbsp;
  117. <a href="#CO20">CO20</a> &nbsp;
  118. <a href="#ComfoAir">ComfoAir</a> &nbsp;
  119. <a href="#CUL">CUL</a> &nbsp;
  120. <a href="#CUL_EM">CUL_EM</a> &nbsp;
  121. <a href="#CUL_FHTTK">CUL_FHTTK</a> &nbsp;
  122. <a href="#CUL_HM">CUL_HM</a> &nbsp;
  123. <a href="#CUL_HOERMANN">CUL_HOERMANN</a> &nbsp;
  124. <a href="#CUL_IR">CUL_IR</a> &nbsp;
  125. <a href="#CUL_MAX">CUL_MAX</a> &nbsp;
  126. <a href="#CUL_REDIRECT">CUL_REDIRECT</a> &nbsp;
  127. <a href="#CUL_RFR">CUL_RFR</a> &nbsp;
  128. <a href="#CUL_TCM97001">CUL_TCM97001</a> &nbsp;
  129. <a href="#CUL_TX">CUL_TX</a> &nbsp;
  130. <a href="#CUL_WS">CUL_WS</a> &nbsp;
  131. <a href="#dash_dhcp">dash_dhcp</a> &nbsp;
  132. <a href="#DFPlayerMini">DFPlayerMini</a> &nbsp;
  133. <a href="#DLNARenderer">DLNARenderer</a> &nbsp;
  134. <a href="#Dooya">Dooya</a> &nbsp;
  135. <a href="#DUOFERN">DUOFERN</a> &nbsp;
  136. <a href="#DUOFERNSTICK">DUOFERNSTICK</a> &nbsp;
  137. <a href="#EC3000">EC3000</a> &nbsp;
  138. <a href="#ECMD">ECMD</a> &nbsp;
  139. <a href="#ECMDDevice">ECMDDevice</a> &nbsp;
  140. <a href="#EDIPLUG">EDIPLUG</a> &nbsp;
  141. <a href="#EGPM">EGPM</a> &nbsp;
  142. <a href="#EGPM2LAN">EGPM2LAN</a> &nbsp;
  143. <a href="#EIB">EIB</a> &nbsp;
  144. <a href="#EleroDrive">EleroDrive</a> &nbsp;
  145. <a href="#EleroStick">EleroStick</a> &nbsp;
  146. <a href="#EleroSwitch">EleroSwitch</a> &nbsp;
  147. <a href="#EM">EM</a> &nbsp;
  148. <a href="#EMEM">EMEM</a> &nbsp;
  149. <a href="#EMGZ">EMGZ</a> &nbsp;
  150. <a href="#EMT7110">EMT7110</a> &nbsp;
  151. <a href="#EMWZ">EMWZ</a> &nbsp;
  152. <a href="#ENECSYSGW">ENECSYSGW</a> &nbsp;
  153. <a href="#ENECSYSINV">ENECSYSINV</a> &nbsp;
  154. <a href="#ENIGMA2">ENIGMA2</a> &nbsp;
  155. <a href="#EnOcean">EnOcean</a> &nbsp;
  156. <a href="#EQ3BT">EQ3BT</a> &nbsp;
  157. <a href="#ESA2000">ESA2000</a> &nbsp;
  158. <a href="#ESPEasy">ESPEasy</a> &nbsp;
  159. <a href="#fakeRoku">fakeRoku</a> &nbsp;
  160. <a href="#FBAHA">FBAHA</a> &nbsp;
  161. <a href="#FBAHAHTTP">FBAHAHTTP</a> &nbsp;
  162. <a href="#FBDECT">FBDECT</a> &nbsp;
  163. <a href="#FHT">FHT</a> &nbsp;
  164. <a href="#FHT8V">FHT8V</a> &nbsp;
  165. <a href="#FHZ">FHZ</a> &nbsp;
  166. <a href="#FRAMEBUFFER">FRAMEBUFFER</a> &nbsp;
  167. <a href="#FReplacer">FReplacer</a> &nbsp;
  168. <a href="#FRITZBOX">FRITZBOX</a> &nbsp;
  169. <a href="#FRM">FRM</a> &nbsp;
  170. <a href="#FRM_AD">FRM_AD</a> &nbsp;
  171. <a href="#FRM_I2C">FRM_I2C</a> &nbsp;
  172. <a href="#FRM_IN">FRM_IN</a> &nbsp;
  173. <a href="#FRM_LCD">FRM_LCD</a> &nbsp;
  174. <a href="#FRM_OUT">FRM_OUT</a> &nbsp;
  175. <a href="#FRM_PWM">FRM_PWM</a> &nbsp;
  176. <a href="#FRM_RGB">FRM_RGB</a> &nbsp;
  177. <a href="#FRM_ROTENC">FRM_ROTENC</a> &nbsp;
  178. <a href="#FRM_SERVO">FRM_SERVO</a> &nbsp;
  179. <a href="#FRM_STEPPER">FRM_STEPPER</a> &nbsp;
  180. <a href="#FS20">FS20</a> &nbsp;
  181. <a href="#FTUISRV">FTUISRV</a> &nbsp;
  182. <a href="#FULLY">FULLY</a> &nbsp;
  183. <a href="#GAEBUS">GAEBUS</a> &nbsp;
  184. <a href="#GardenaSmartBridge">GardenaSmartBridge</a> &nbsp;
  185. <a href="#GardenaSmartDevice">GardenaSmartDevice</a> &nbsp;
  186. <a href="#GHoma">GHoma</a> &nbsp;
  187. <a href="#GOOGLECAST">GOOGLECAST</a> &nbsp;
  188. <a href="#harmony">harmony</a> &nbsp;
  189. <a href="#HEATRONIC">HEATRONIC</a> &nbsp;
  190. <a href="#HEOSGroup">HEOSGroup</a> &nbsp;
  191. <a href="#HEOSMaster">HEOSMaster</a> &nbsp;
  192. <a href="#HEOSPlayer">HEOSPlayer</a> &nbsp;
  193. <a href="#Hideki">Hideki</a> &nbsp;
  194. <a href="#HMCCU">HMCCU</a> &nbsp;
  195. <a href="#HMCCUCHN">HMCCUCHN</a> &nbsp;
  196. <a href="#HMCCUDEV">HMCCUDEV</a> &nbsp;
  197. <a href="#HMCCURPC">HMCCURPC</a> &nbsp;
  198. <a href="#HMLAN">HMLAN</a> &nbsp;
  199. <a href="#HMS">HMS</a> &nbsp;
  200. <a href="#HMUARTLGW">HMUARTLGW</a> &nbsp;
  201. <a href="#holiday">holiday</a> &nbsp;
  202. <a href="#HOMBOT">HOMBOT</a> &nbsp;
  203. <a href="#HP1000">HP1000</a> &nbsp;
  204. <a href="#HTTPMOD">HTTPMOD</a> &nbsp;
  205. <a href="#HTTPSRV">HTTPSRV</a> &nbsp;
  206. <a href="#HUEBridge">HUEBridge</a> &nbsp;
  207. <a href="#HUEDevice">HUEDevice</a> &nbsp;
  208. <a href="#HXB">HXB</a> &nbsp;
  209. <a href="#HXBDevice">HXBDevice</a> &nbsp;
  210. <a href="#Hyperion">Hyperion</a> &nbsp;
  211. <a href="#I2C_BH1750">I2C_BH1750</a> &nbsp;
  212. <a href="#I2C_BME280">I2C_BME280</a> &nbsp;
  213. <a href="#I2C_BMP180">I2C_BMP180</a> &nbsp;
  214. <a href="#I2C_DS1307">I2C_DS1307</a> &nbsp;
  215. <a href="#I2C_EEPROM">I2C_EEPROM</a> &nbsp;
  216. <a href="#I2C_HDC1008">I2C_HDC1008</a> &nbsp;
  217. <a href="#I2C_K30">I2C_K30</a> &nbsp;
  218. <a href="#I2C_LCD">I2C_LCD</a> &nbsp;
  219. <a href="#I2C_LM75A">I2C_LM75A</a> &nbsp;
  220. <a href="#I2C_MCP23008">I2C_MCP23008</a> &nbsp;
  221. <a href="#I2C_MCP23017">I2C_MCP23017</a> &nbsp;
  222. <a href="#I2C_MCP342x">I2C_MCP342x</a> &nbsp;
  223. <a href="#I2C_MMA845X">I2C_MMA845X</a> &nbsp;
  224. <a href="#I2C_PCA9532">I2C_PCA9532</a> &nbsp;
  225. <a href="#I2C_PCA9685">I2C_PCA9685</a> &nbsp;
  226. <a href="#I2C_PCF8574">I2C_PCF8574</a> &nbsp;
  227. <a href="#I2C_SHT21">I2C_SHT21</a> &nbsp;
  228. <a href="#I2C_SHT3x">I2C_SHT3x</a> &nbsp;
  229. <a href="#I2C_TSL2561">I2C_TSL2561</a> &nbsp;
  230. <a href="#IOhomecontrol">IOhomecontrol</a> &nbsp;
  231. <a href="#IPCAM">IPCAM</a> &nbsp;
  232. <a href="#IPWE">IPWE</a> &nbsp;
  233. <a href="#IT">IT</a> &nbsp;
  234. <a href="#Itach_IR">Itach_IR</a> &nbsp;
  235. <a href="#Itach_IRDevice">Itach_IRDevice</a> &nbsp;
  236. <a href="#Itach_Relay">Itach_Relay</a> &nbsp;
  237. <a href="#Jabber">Jabber</a> &nbsp;
  238. <a href="#JawboneUp">JawboneUp</a> &nbsp;
  239. <a href="#JeeLink">JeeLink</a> &nbsp;
  240. <a href="#JSONMETER">JSONMETER</a> &nbsp;
  241. <a href="#KeyValueProtocol">KeyValueProtocol</a> &nbsp;
  242. <a href="#km200">km200</a> &nbsp;
  243. <a href="#KM273">KM273</a> &nbsp;
  244. <a href="#KNX">KNX</a> &nbsp;
  245. <a href="#KODI">KODI</a> &nbsp;
  246. <a href="#KOPP_FC">KOPP_FC</a> &nbsp;
  247. <a href="#KOSTALPIKO">KOSTALPIKO</a> &nbsp;
  248. <a href="#KS300">KS300</a> &nbsp;
  249. <a href="#LaCrosse">LaCrosse</a> &nbsp;
  250. <a href="#LaCrosseGateway">LaCrosseGateway</a> &nbsp;
  251. <a href="#Level">Level</a> &nbsp;
  252. <a href="#LGTV">LGTV</a> &nbsp;
  253. <a href="#LGTV_IP12">LGTV_IP12</a> &nbsp;
  254. <a href="#LGTV_WebOS">LGTV_WebOS</a> &nbsp;
  255. <a href="#LIGHTIFY">LIGHTIFY</a> &nbsp;
  256. <a href="#LINDY_HDMI_SWITCH">LINDY_HDMI_SWITCH</a> &nbsp;
  257. <a href="#LIRC">LIRC</a> &nbsp;
  258. <a href="#LuftdatenInfo">LuftdatenInfo</a> &nbsp;
  259. <a href="#LUXTRONIK2">LUXTRONIK2</a> &nbsp;
  260. <a href="#M232">M232</a> &nbsp;
  261. <a href="#M232Counter">M232Counter</a> &nbsp;
  262. <a href="#M232Voltage">M232Voltage</a> &nbsp;
  263. <a href="#mailcheck">mailcheck</a> &nbsp;
  264. <a href="#MAX">MAX</a> &nbsp;
  265. <a href="#MAXLAN">MAXLAN</a> &nbsp;
  266. <a href="#MEDIAPORTAL">MEDIAPORTAL</a> &nbsp;
  267. <a href="#MilightBridge">MilightBridge</a> &nbsp;
  268. <a href="#MilightDevice">MilightDevice</a> &nbsp;
  269. <a href="#Modbus">Modbus</a> &nbsp;
  270. <a href="#ModbusAttr">ModbusAttr</a> &nbsp;
  271. <a href="#ModbusSET">ModbusSET</a> &nbsp;
  272. <a href="#ModbusTrovis5576">ModbusTrovis5576</a> &nbsp;
  273. <a href="#MPD">MPD</a> &nbsp;
  274. <a href="#MQTT">MQTT</a> &nbsp;
  275. <a href="#MQTT_BRIDGE">MQTT_BRIDGE</a> &nbsp;
  276. <a href="#MQTT_DEVICE">MQTT_DEVICE</a> &nbsp;
  277. <a href="#MSGFile">MSGFile</a> &nbsp;
  278. <a href="#MSGMail">MSGMail</a> &nbsp;
  279. <a href="#MYSENSORS">MYSENSORS</a> &nbsp;
  280. <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> &nbsp;
  281. <a href="#N4HBUS">N4HBUS</a> &nbsp;
  282. <a href="#N4HMODULE">N4HMODULE</a> &nbsp;
  283. <a href="#Nello">Nello</a> &nbsp;
  284. <a href="#netatmo">netatmo</a> &nbsp;
  285. <a href="#NetIO230B">NetIO230B</a> &nbsp;
  286. <a href="#Netzer">Netzer</a> &nbsp;
  287. <a href="#NetzerI2C">NetzerI2C</a> &nbsp;
  288. <a href="#NEUTRINO">NEUTRINO</a> &nbsp;
  289. <a href="#Nextion">Nextion</a> &nbsp;
  290. <a href="#Nmap">Nmap</a> &nbsp;
  291. <a href="#NUKIBridge">NUKIBridge</a> &nbsp;
  292. <a href="#NUKIDevice">NUKIDevice</a> &nbsp;
  293. <a href="#NUT">NUT</a> &nbsp;
  294. <a href="#OBIS">OBIS</a> &nbsp;
  295. <a href="#ONKYO_AVR">ONKYO_AVR</a> &nbsp;
  296. <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a> &nbsp;
  297. <a href="#OPENWEATHER">OPENWEATHER</a> &nbsp;
  298. <a href="#OREGON">OREGON</a> &nbsp;
  299. <a href="#OWAD">OWAD</a> &nbsp;
  300. <a href="#OWCOUNT">OWCOUNT</a> &nbsp;
  301. <a href="#OWDevice">OWDevice</a> &nbsp;
  302. <a href="#OWFS">OWFS</a> &nbsp;
  303. <a href="#OWID">OWID</a> &nbsp;
  304. <a href="#OWLCD">OWLCD</a> &nbsp;
  305. <a href="#OWMULTI">OWMULTI</a> &nbsp;
  306. <a href="#OWServer">OWServer</a> &nbsp;
  307. <a href="#OWSWITCH">OWSWITCH</a> &nbsp;
  308. <a href="#OWTEMP">OWTEMP</a> &nbsp;
  309. <a href="#OWTHERM">OWTHERM</a> &nbsp;
  310. <a href="#OWVAR">OWVAR</a> &nbsp;
  311. <a href="#OWX">OWX</a> &nbsp;
  312. <a href="#OWX_ASYNC">OWX_ASYNC</a> &nbsp;
  313. <a href="#OWX_CCC">OWX_CCC</a> &nbsp;
  314. <a href="#OWX_FRM">OWX_FRM</a> &nbsp;
  315. <a href="#OWX_SER">OWX_SER</a> &nbsp;
  316. <a href="#OWX_TCP">OWX_TCP</a> &nbsp;
  317. <a href="#panStamp">panStamp</a> &nbsp;
  318. <a href="#PCA301">PCA301</a> &nbsp;
  319. <a href="#PHILIPS_AUDIO">PHILIPS_AUDIO</a> &nbsp;
  320. <a href="#PHTV">PHTV</a> &nbsp;
  321. <a href="#PID20">PID20</a> &nbsp;
  322. <a href="#PIFACE">PIFACE</a> &nbsp;
  323. <a href="#pilight">pilight</a> &nbsp;
  324. <a href="#pilight_contact">pilight_contact</a> &nbsp;
  325. <a href="#pilight_ctrl">pilight_ctrl</a> &nbsp;
  326. <a href="#pilight_dimmer">pilight_dimmer</a> &nbsp;
  327. <a href="#pilight_raw">pilight_raw</a> &nbsp;
  328. <a href="#pilight_smoke">pilight_smoke</a> &nbsp;
  329. <a href="#pilight_switch">pilight_switch</a> &nbsp;
  330. <a href="#pilight_temp">pilight_temp</a> &nbsp;
  331. <a href="#ping">ping</a> &nbsp;
  332. <a href="#PIONEERAVR">PIONEERAVR</a> &nbsp;
  333. <a href="#PIONEERAVRZONE">PIONEERAVRZONE</a> &nbsp;
  334. <a href="#PLAYBULB">PLAYBULB</a> &nbsp;
  335. <a href="#plex">plex</a> &nbsp;
  336. <a href="#Plugwise">Plugwise</a> &nbsp;
  337. <a href="#POKEYS">POKEYS</a> &nbsp;
  338. <a href="#PrecipitationSensor">PrecipitationSensor</a> &nbsp;
  339. <a href="#PROPLANTA">PROPLANTA</a> &nbsp;
  340. <a href="#Pushalot">Pushalot</a> &nbsp;
  341. <a href="#Pushbullet">Pushbullet</a> &nbsp;
  342. <a href="#PushNotifier">PushNotifier</a> &nbsp;
  343. <a href="#Pushover">Pushover</a> &nbsp;
  344. <a href="#Pushsafer">Pushsafer</a> &nbsp;
  345. <a href="#PW_Circle">PW_Circle</a> &nbsp;
  346. <a href="#PW_Scan">PW_Scan</a> &nbsp;
  347. <a href="#PW_Sense">PW_Sense</a> &nbsp;
  348. <a href="#PW_Switch">PW_Switch</a> &nbsp;
  349. <a href="#PWM">PWM</a> &nbsp;
  350. <a href="#PWMR">PWMR</a> &nbsp;
  351. <a href="#QRCode">QRCode</a> &nbsp;
  352. <a href="#Revolt">Revolt</a> &nbsp;
  353. <a href="#RFXCOM">RFXCOM</a> &nbsp;
  354. <a href="#RFXMETER">RFXMETER</a> &nbsp;
  355. <a href="#RFXX10REC">RFXX10REC</a> &nbsp;
  356. <a href="#Robonect">Robonect</a> &nbsp;
  357. <a href="#RPI_GPIO">RPI_GPIO</a> &nbsp;
  358. <a href="#RPII2C">RPII2C</a> &nbsp;
  359. <a href="#rssFeed">rssFeed</a> &nbsp;
  360. <a href="#S7">S7</a> &nbsp;
  361. <a href="#S7_ARead">S7_ARead</a> &nbsp;
  362. <a href="#S7_AWrite">S7_AWrite</a> &nbsp;
  363. <a href="#S7_Client">S7_Client</a> &nbsp;
  364. <a href="#S7_DRead">S7_DRead</a> &nbsp;
  365. <a href="#S7_DWrite">S7_DWrite</a> &nbsp;
  366. <a href="#S7_S5Client">S7_S5Client</a> &nbsp;
  367. <a href="#S7_S7Client">S7_S7Client</a> &nbsp;
  368. <a href="#SCIVT">SCIVT</a> &nbsp;
  369. <a href="#SD_RSL">SD_RSL</a> &nbsp;
  370. <a href="#SD_WS">SD_WS</a> &nbsp;
  371. <a href="#SD_WS07">SD_WS07</a> &nbsp;
  372. <a href="#SD_WS09">SD_WS09</a> &nbsp;
  373. <a href="#SD_WS_Maverick">SD_WS_Maverick</a> &nbsp;
  374. <a href="#SHC">SHC</a> &nbsp;
  375. <a href="#SHCdev">SHCdev</a> &nbsp;
  376. <a href="#SIGNALduino">SIGNALduino</a> &nbsp;
  377. <a href="#SIGNALduino_un">SIGNALduino_un</a> &nbsp;
  378. <a href="#siri">siri</a> &nbsp;
  379. <a href="#Siro">Siro</a> &nbsp;
  380. <a href="#SIS_PMS">SIS_PMS</a> &nbsp;
  381. <a href="#SISPM">SISPM</a> &nbsp;
  382. <a href="#SMAEM">SMAEM</a> &nbsp;
  383. <a href="#SMAInverter">SMAInverter</a> &nbsp;
  384. <a href="#SmartMeterP1">SmartMeterP1</a> &nbsp;
  385. <a href="#SMARTMON">SMARTMON</a> &nbsp;
  386. <a href="#SmartPi">SmartPi</a> &nbsp;
  387. <a href="#SMASTP">SMASTP</a> &nbsp;
  388. <a href="#SML">SML</a> &nbsp;
  389. <a href="#Snapcast">Snapcast</a> &nbsp;
  390. <a href="#SOMFY">SOMFY</a> &nbsp;
  391. <a href="#SONOS">SONOS</a> &nbsp;
  392. <a href="#SONOSPLAYER">SONOSPLAYER</a> &nbsp;
  393. <a href="#speedtest">speedtest</a> &nbsp;
  394. <a href="#Spotify">Spotify</a> &nbsp;
  395. <a href="#SSCam">SSCam</a> &nbsp;
  396. <a href="#STACKABLE">STACKABLE</a> &nbsp;
  397. <a href="#STACKABLE_CC">STACKABLE_CC</a> &nbsp;
  398. <a href="#STOCKQUOTES">STOCKQUOTES</a> &nbsp;
  399. <a href="#STV">STV</a> &nbsp;
  400. <a href="#SWAP">SWAP</a> &nbsp;
  401. <a href="#SWAP_0000002200000003">SWAP_0000002200000003</a> &nbsp;
  402. <a href="#SWAP_0000002200000008">SWAP_0000002200000008</a> &nbsp;
  403. <a href="#SYSMON">SYSMON</a> &nbsp;
  404. <a href="#SYSSTAT">SYSSTAT</a> &nbsp;
  405. <a href="#tahoma">tahoma</a> &nbsp;
  406. <a href="#TBot_List">TBot_List</a> &nbsp;
  407. <a href="#TCM">TCM</a> &nbsp;
  408. <a href="#TechemHKV">TechemHKV</a> &nbsp;
  409. <a href="#TechemWZ">TechemWZ</a> &nbsp;
  410. <a href="#TEK603">TEK603</a> &nbsp;
  411. <a href="#TelegramBot">TelegramBot</a> &nbsp;
  412. <a href="#TellStick">TellStick</a> &nbsp;
  413. <a href="#TeslaPowerwall2AC">TeslaPowerwall2AC</a> &nbsp;
  414. <a href="#THINKINGCLEANER">THINKINGCLEANER</a> &nbsp;
  415. <a href="#THZ">THZ</a> &nbsp;
  416. <a href="#TPLinkHS110">TPLinkHS110</a> &nbsp;
  417. <a href="#TRAFFIC">TRAFFIC</a> &nbsp;
  418. <a href="#TRX">TRX</a> &nbsp;
  419. <a href="#TRX_ELSE">TRX_ELSE</a> &nbsp;
  420. <a href="#TRX_LIGHT">TRX_LIGHT</a> &nbsp;
  421. <a href="#TRX_SECURITY">TRX_SECURITY</a> &nbsp;
  422. <a href="#TRX_WEATHER">TRX_WEATHER</a> &nbsp;
  423. <a href="#TUL">TUL</a> &nbsp;
  424. <a href="#UbiquitiMP">UbiquitiMP</a> &nbsp;
  425. <a href="#UbiquitiOut">UbiquitiOut</a> &nbsp;
  426. <a href="#Unifi">Unifi</a> &nbsp;
  427. <a href="#UNIRoll">UNIRoll</a> &nbsp;
  428. <a href="#UpsPico">UpsPico</a> &nbsp;
  429. <a href="#USBWX">USBWX</a> &nbsp;
  430. <a href="#USF1000">USF1000</a> &nbsp;
  431. <a href="#UWZ">UWZ</a> &nbsp;
  432. <a href="#Vallox">Vallox</a> &nbsp;
  433. <a href="#VantagePro2">VantagePro2</a> &nbsp;
  434. <a href="#VBUSDEV">VBUSDEV</a> &nbsp;
  435. <a href="#VBUSIF">VBUSIF</a> &nbsp;
  436. <a href="#VCONTROL">VCONTROL</a> &nbsp;
  437. <a href="#Verkehrsinfo">Verkehrsinfo</a> &nbsp;
  438. <a href="#VIERA">VIERA</a> &nbsp;
  439. <a href="#VolumeLink">VolumeLink</a> &nbsp;
  440. <a href="#Weather">Weather</a> &nbsp;
  441. <a href="#WEBCOUNT">WEBCOUNT</a> &nbsp;
  442. <a href="#WEBIO">WEBIO</a> &nbsp;
  443. <a href="#WEBIO_12DIGITAL">WEBIO_12DIGITAL</a> &nbsp;
  444. <a href="#WifiLight">WifiLight</a> &nbsp;
  445. <a href="#WINCONNECT">WINCONNECT</a> &nbsp;
  446. <a href="#withings">withings</a> &nbsp;
  447. <a href="#WMBUS">WMBUS</a> &nbsp;
  448. <a href="#WS2000">WS2000</a> &nbsp;
  449. <a href="#WS300">WS300</a> &nbsp;
  450. <a href="#WS3600">WS3600</a> &nbsp;
  451. <a href="#Wunderground">Wunderground</a> &nbsp;
  452. <a href="#WWO">WWO</a> &nbsp;
  453. <a href="#X10">X10</a> &nbsp;
  454. <a href="#XBMC">XBMC</a> &nbsp;
  455. <a href="#XiaomiFlowerSens">XiaomiFlowerSens</a> &nbsp;
  456. <a href="#xxLG7000">xxLG7000</a> &nbsp;
  457. <a href="#YAMAHA_AVR">YAMAHA_AVR</a> &nbsp;
  458. <a href="#YAMAHA_BD">YAMAHA_BD</a> &nbsp;
  459. <a href="#YAMAHA_NP">YAMAHA_NP</a> &nbsp;
  460. <a href="#yowsup">yowsup</a> &nbsp;
  461. <a href="#ZWave">ZWave</a> &nbsp;
  462. <a href="#ZWCUL">ZWCUL</a> &nbsp;
  463. <a href="#ZWDongle">ZWDongle</a> &nbsp;
  464. </ul>
  465. <br>
  466. <b>Helper modules</b>
  467. <ul>
  468. <!-- header:helper -->
  469. <a href="#Alarm">Alarm</a> &nbsp;
  470. <a href="#alarmclock">alarmclock</a> &nbsp;
  471. <a href="#allowed">allowed</a> &nbsp;
  472. <a href="#archetype">archetype</a> &nbsp;
  473. <a href="#Astro">Astro</a> &nbsp;
  474. <a href="#at">at</a> &nbsp;
  475. <a href="#autocreate">autocreate</a> &nbsp;
  476. <a href="#average">average</a> &nbsp;
  477. <a href="#cloneDummy">cloneDummy</a> &nbsp;
  478. <a href="#configDB">configDB</a> &nbsp;
  479. <a href="#CustomReadings">CustomReadings</a> &nbsp;
  480. <a href="#Dashboard">Dashboard</a> &nbsp;
  481. <a href="#DbLog">DbLog</a> &nbsp;
  482. <a href="#DbRep">DbRep</a> &nbsp;
  483. <a href="#dewpoint">dewpoint</a> &nbsp;
  484. <a href="#DOIF">DOIF</a> &nbsp;
  485. <a href="#DOIFtools">DOIFtools</a> &nbsp;
  486. <a href="#dummy">dummy</a> &nbsp;
  487. <a href="#ElectricityCalculator">ElectricityCalculator</a> &nbsp;
  488. <a href="#eventTypes">eventTypes</a> &nbsp;
  489. <a href="#expandJSON">expandJSON</a> &nbsp;
  490. <a href="#FB_CALLLIST">FB_CALLLIST</a> &nbsp;
  491. <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a> &nbsp;
  492. <a href="#FHEM2FHEM">FHEM2FHEM</a> &nbsp;
  493. <a href="#FHEMWEB">FHEMWEB</a> &nbsp;
  494. <a href="#FileLog">FileLog</a> &nbsp;
  495. <a href="#FLOORPLAN">FLOORPLAN</a> &nbsp;
  496. <a href="#GasCalculator">GasCalculator</a> &nbsp;
  497. <a href="#GEOFANCY">GEOFANCY</a> &nbsp;
  498. <a href="#GoogleAuth">GoogleAuth</a> &nbsp;
  499. <a href="#GUEST">GUEST</a> &nbsp;
  500. <a href="#HCS">HCS</a> &nbsp;
  501. <a href="#Heating_Control">Heating_Control</a> &nbsp;
  502. <a href="#HMinfo">HMinfo</a> &nbsp;
  503. <a href="#HOMEMODE">HOMEMODE</a> &nbsp;
  504. <a href="#HourCounter">HourCounter</a> &nbsp;
  505. <a href="#InfoPanel">InfoPanel</a> &nbsp;
  506. <a href="#KM271">KM271</a> &nbsp;
  507. <a href="#LightScene">LightScene</a> &nbsp;
  508. <a href="#Log2Syslog">Log2Syslog</a> &nbsp;
  509. <a href="#logProxy">logProxy</a> &nbsp;
  510. <a href="#MaxScanner">MaxScanner</a> &nbsp;
  511. <a href="#MediaList">MediaList</a> &nbsp;
  512. <a href="#monitoring">monitoring</a> &nbsp;
  513. <a href="#msgConfig">msgConfig</a> &nbsp;
  514. <a href="#msgDialog">msgDialog</a> &nbsp;
  515. <a href="#notify">notify</a> &nbsp;
  516. <a href="#PachLog">PachLog</a> &nbsp;
  517. <a href="#PostMe">PostMe</a> &nbsp;
  518. <a href="#powerMap">powerMap</a> &nbsp;
  519. <a href="#PRESENCE">PRESENCE</a> &nbsp;
  520. <a href="#rain">rain</a> &nbsp;
  521. <a href="#RandomTimer">RandomTimer</a> &nbsp;
  522. <a href="#readingsChange">readingsChange</a> &nbsp;
  523. <a href="#readingsGroup">readingsGroup</a> &nbsp;
  524. <a href="#readingsHistory">readingsHistory</a> &nbsp;
  525. <a href="#readingsProxy">readingsProxy</a> &nbsp;
  526. <a href="#remotecontrol">remotecontrol</a> &nbsp;
  527. <a href="#RESIDENTS">RESIDENTS</a> &nbsp;
  528. <a href="#RFHEM">RFHEM</a> &nbsp;
  529. <a href="#ROOMMATE">ROOMMATE</a> &nbsp;
  530. <a href="#RSS">RSS</a> &nbsp;
  531. <a href="#sequence">sequence</a> &nbsp;
  532. <a href="#SingleFileLog">SingleFileLog</a> &nbsp;
  533. <a href="#SIP">SIP</a> &nbsp;
  534. <a href="#statistics">statistics</a> &nbsp;
  535. <a href="#structure">structure</a> &nbsp;
  536. <a href="#SUNRISE_EL">SUNRISE_EL</a> &nbsp;
  537. <a href="#SVG">SVG</a> &nbsp;
  538. <a href="#telnet">telnet</a> &nbsp;
  539. <a href="#Text2Speech">Text2Speech</a> &nbsp;
  540. <a href="#THRESHOLD">THRESHOLD</a> &nbsp;
  541. <a href="#TrashCal">TrashCal</a> &nbsp;
  542. <a href="#Twilight">Twilight</a> &nbsp;
  543. <a href="#Utils">Utils</a> &nbsp;
  544. <a href="#watchdog">watchdog</a> &nbsp;
  545. <a href="#WaterCalculator">WaterCalculator</a> &nbsp;
  546. <a href="#weblink">weblink</a> &nbsp;
  547. <a href="#WeekdayTimer">WeekdayTimer</a> &nbsp;
  548. <a href="#weekprofile">weekprofile</a> &nbsp;
  549. <a href="#WOL">WOL</a> &nbsp;
  550. <a href="#WUup">WUup</a> &nbsp;
  551. <a href="#YAAHM">YAAHM</a> &nbsp;
  552. <!-- header end -->
  553. </ul>
  554. <br>
  555. <a href="#perl">Perl specials</a><br>
  556. <a href="#gnuplot-syntax">gnuplot file syntax</a><br>
  557. </ul>
  558. <a name="intro"></a>
  559. <h3>Introduction</h3>
  560. <ul>
  561. FHEM is mainly used for home automation, but it is suitable for other tasks
  562. too, where notification, timers and logging plays an important role.<br>
  563. <br>
  564. It supports different hardware devices to interface with certain protocols
  565. (e.g. FHZ1000PC to interface FS20 and HMS, CM11 to access X10), and logical
  566. devices like FS20 or FHT to digest the messages for a certain device type using
  567. this protocol.<br>
  568. <br>
  569. FHEM is modular. The different devices are represented through modules which
  570. implement certain functions (e.g. define, get, set). Even seemingly integral
  571. parts of FHEM like triggers (<a href="#notify">notify</a>) and timers (<a
  572. href="#at">at</a>) are implemented this way, giving the possibility to
  573. replace/extend this functionality.<br> <br>
  574. FHEM is controlled through readable / ascii commands, which are specified in
  575. files (e.g. the configuration file), or issued over a TCP/IP connection, either
  576. directly in a telnet session, with a fhem.pl in client mode or from one of the
  577. web frontends.<br> <br>
  578. When starting the server you have to specify a configuration file:<br>
  579. <ul>
  580. <code>perl fhem.pl fhem.cfg</code>
  581. </ul>
  582. <br>
  583. A reasonable minimal configuration file looks like: <pre>
  584. attr global <a href="#logfile">logfile</a> log/fhem.log
  585. attr global <a href="#modpath">modpath</a> .
  586. attr global <a href="#statefile">statefile</a> log/fhem.save
  587. define telnetPort <a href="#telnet">telnet</a> 7072 global
  588. define WEB <a href="#FHEMWEB">FHEMWEB</a> 8083 global</pre>
  589. Note: the last two lines are optional and assume you wish to use the
  590. builtin telnet and WEB interface.<br>
  591. <br>
  592. The web interface can be reached at
  593. <ul>
  594. http://&lt;fhemhost&gt;:8083
  595. </ul>
  596. <br>
  597. TCP/IP communication with FHEM can either happen in a "session" (via
  598. telnet) or single client command (via fhem.pl). Example:
  599. <ul>
  600. <code>telnet &lt;fhemhost&gt; 7072<br>
  601. &lt;NL&gt; </code>(This newline switches into "prompt" mode)<code><br>
  602. &lt;command&gt;...<br>
  603. quit</code><br>
  604. </ul>
  605. or
  606. <ul>
  607. <code>fhem.pl &lt;fhemhost&gt;:7072 "&lt;fhem-command&gt" "..."</code>
  608. </ul>
  609. <br>
  610. If a OS-user called fhem exists, and FHEM is started as root, FHEM will
  611. automatically change to to this user via setuid. <br>
  612. </ul>
  613. <!-- intro end - diese Zeile nicht entfernen! -->
  614. <a name="command"></a>
  615. <h3>FHEM command types</h3>
  616. <ul>
  617. There are three types of commands: "fhem" commands (described in this
  618. document), shell commands (they must be enclosed in double quotes ") and perl
  619. expressions (enclosed in curly brackets {}). shell commands or perl expressions
  620. are needed for complex <a href="#at">at</a> or <a href="#notify">notify</a>
  621. arguments, but can also issued as a "normal" command.<br>
  622. <br>
  623. E.g. the following three commands all do the same when issued from a telnet
  624. prompt:<br>
  625. <ul>
  626. set lamp off<br>
  627. "fhem.pl 7072 "set lamp off""<br>
  628. {fhem("set lamp off")}<br>
  629. </ul>
  630. <br>
  631. Shell commands will be executed in the background, perl expressions and
  632. FHEM commands will be executed in the main "thread". In order to make perl
  633. expressions easier to write, some special functions and variables are
  634. available. See the section <a href="#perl">Perl special</a> for a description.
  635. To trigger FHEM commands from a shell script (this is the "other way round"),
  636. use the client form of fhem.pl (described above).<br>
  637. <br>
  638. Multiple FHEM commands are separated by semicolon (;). In order to use semicolon
  639. in perl code or shell programs, they have to be escaped by the double semicolon
  640. (;;). See the <b>Notes</b> section of the <a href="#notify">notify</a>
  641. chapter on command parameters and escape rules.<br>
  642. E.g. the following first command switches Lamp1 off at 07:00 and Lamp2
  643. immediately (at the point of definition), the second one switches both lamps
  644. off at 07:00.<br>
  645. <ul>
  646. define lampoff at 07:00 set Lamp1 off; set Lamp2 off<br>
  647. define lampoff at 07:00 set Lamp1 off;; set Lamp2 off<br>
  648. </ul>
  649. For every further indirection you need to double the semicolons:, e.g. to
  650. switch on every day 2 devices at 7:00 for 10 minutes you have to write:<br>
  651. <ul>
  652. define onAt at 07:00 set Lamp1 on;;set Lamp2 on;; define offAt at +00:10 set Lamp1 off;;;;set Lamp2 off
  653. </ul>
  654. Don't dispair, the previous example can also be written as
  655. <ul>
  656. define onAt at 07:00 set Lamp1,Lamp2 on-for-timer 600
  657. </ul>
  658. <br>
  659. Commands can be either typed in plain, or read from a file (e.g. the
  660. configuration file at startup). The commands are either executed directly, or
  661. later if they are arguments to the <a href="#at">at</a> and <a
  662. href="#notify">notify</a> FHEM commands.<br>
  663. <br>
  664. A line ending with \ will be concatenated with the next one, so long lines
  665. (e.g. multiple perl commands) can be split in multiple lines. Some web fronteds
  666. (e.g. webpgm2) make editing of multiline commands transparent for you (i.e. there is no need for \) .<br>
  667. <br>
  668. </ul>
  669. <!-- command end - diese Zeile nicht entfernen! -->
  670. <a name="devspec"></a>
  671. <h3>Device specification (devspec)</h3>
  672. <ul>
  673. The commands
  674. <a href="#attr">attr</a>,
  675. <a href="#deleteattr">deleteattr</a>,
  676. <a href="#displayattr">displayattr</a>,
  677. <a href="#delete">delete</a>,
  678. <a href="#get">get</a>,
  679. <a href="#list">list</a>,
  680. <a href="#set">set</a>,
  681. <a href="#setreading">setreading</a>,
  682. <a href="#setstate">setstate</a>,
  683. <a href="#trigger">trigger</a>
  684. can take a more complex device specification as argument, which will be
  685. expanded to a list of devices. A device specification (short devspec) can be:
  686. <ul>
  687. <li>a single device name. This is the most common case.</li>
  688. <li>a list of devices, separated by comma (,)</li>
  689. <li>a regular expression</li>
  690. <li>a NAME=VALUE pair, where NAME can be an internal value like TYPE, a
  691. Reading-Name or an attribute. VALUE is a regexp. To negate the
  692. comparison, use NAME!=VALUE. To restrict the search, use i: as prefix
  693. for internal values, r: for readings and a: for attributes. See the
  694. example below.</li>
  695. <li>if the spec is followed by the expression :FILTER=NAME=VALUE, then the
  696. values found in the first round are filtered by the second expression.
  697. </ul>
  698. Examples:
  699. <ul>
  700. <code>set lamp1 on</code><br>
  701. <code>set lamp1,lamp2,lamp3 on</code><br>
  702. <code>set lamp.* on</code><br>
  703. <code>set room=kitchen off</code><br>
  704. <code>set room=kitchen:FILTER=STATE=on off</code><br>
  705. <code>set room=kitchen:FILTER=STATE!=off off</code><br>
  706. <code>list disabled=</code><br>
  707. <code>list TYPE=FS20 STATE</code><br>
  708. <code>list i:TYPE=FS20 STATE</code><br>
  709. </ul>
  710. Notes:
  711. <ul>
  712. <li>the spec may not contain space characters.</n>
  713. <li>if there is a device which exactly corresponds to the spec, then
  714. no special processing is done.</li>
  715. <li>first the spec is separated by comma, then the regular expression and
  716. filter operations are executed.</li>
  717. <li>the returned list can contain the same device more than once, so
  718. "set lamp3,lamp3 on" switches lamp3 twice.</li>
  719. <li>for more complex structuring demands see the <a href="#structure">
  720. structure</a> device.
  721. </ul>
  722. </ul>
  723. <!-- devspec end - diese Zeile nicht entfernen! -->
  724. <a name="attributes"></a>
  725. <h3>Attributes</h3>
  726. All devices have attributes. These can be set by means of the <a
  727. href="#attr">attr</a> command, displayed with the <a
  728. href="#displayattr">displayattr</a> command, and deleted by the <a
  729. href="#deleteattr">deleteattr</a> command.<p>
  730. There are global attributes that are used by all devices and local attributes
  731. that apply to individual device classes only.<p>
  732. Some devices (like <a href="#FHEMWEB">FHEMWEB</a>) automatically define new
  733. global attributes on the first definition of a device of such type.<p>
  734. You can use the command <p><code>attr global userattr
  735. &lt;attributelist&gt;</code><p> for the <a href="#global">global</a> device to
  736. declare new global attributes and <p><code>attr &lt;devicespec&gt; userattr
  737. &lt;attributelist&gt;</code><p> for individual devices according to <a
  738. href="#devspec">devspec</a> to declare new local attributes.
  739. <code>&lt;attributelist&gt;</code> is a space-separated list which contains the
  740. names of the additional attributes. See the documentation of the <a
  741. href="#attr">attr</a> command for examples.<p>
  742. Be careful not to overwrite additional global attributes previously defined by
  743. yourself or a device. Use the <code>attr global userattr
  744. &lt;attributelist&gt;</code> as early in your configuration as possible.
  745. <h4>Device specific attributes</h4>
  746. Device specific attributes are documented in the corresponding device section.
  747. <h4>Global attributes used by all devices</h4>
  748. <ul>
  749. <a name="alias"></a>
  750. <li>alias<br>
  751. Used by FHEMWEB to display a device with another name e.g. when using
  752. special characters/spaces not accepted by device definition.
  753. </li><br>
  754. <a name="comment"></a>
  755. <li>comment<br>
  756. Add an arbitrary comment.
  757. </li><br>
  758. <a name="eventMap"></a>
  759. <li>eventMap<br>
  760. Replace event names and set arguments. The value of this attribute
  761. consists of a list of space separated values, each value is a colon
  762. separated pair. The first part specifies the "old" value, the second
  763. the new/desired value. If the first character is slash(/) or comma(,)
  764. then split not by space but by this character, enabling to embed spaces.
  765. You can specify a widgetOverride after an additional colon (e.g.
  766. on-for-timer:OnFor:texField), the default widget is :noArg to avoid
  767. extra input fields in cmdList.
  768. Examples:<ul><code>
  769. attr store eventMap on:open off:closed<br>
  770. attr store eventMap /on-for-timer 10:open/off:closed/<br>
  771. set store open
  772. </code></ul>
  773. The explicit variant of this attribute has the following syntax:
  774. <ul><code>
  775. attr store eventMap { dev=>{"on"=>"open"}, usr=>{"open"=>"on"} }<br>
  776. attr store eventMap { dev=>{"^on(-for-timer)?(.*)"=>"open$2"},
  777. usr=>{"^open(.*)"=>"on$1"},
  778. fw=>{"^open(.*)"=>"open"} }
  779. </code></ul>
  780. This variant must be used, if the mapping is not symmetrical, the first
  781. part (dev) representing the device to user mapping, i.e. if the device
  782. reports on 100 or on-for-timer 100, the user will see open 100. The
  783. second part (usr) is the other direction, if the user specified open
  784. 10, the device will receive on 10. On both occasions the key will be
  785. first compared directly with the text, and if it is not equal, then it
  786. will be tried to match it as a regexp. When using regexps in the usr
  787. part with wildcards, the fw part must be filled with the exact same
  788. keys to enable a correct display in the FHEMWEB set dropdown list in
  789. the detail view.
  790. </li><br>
  791. <a name="genericDisplayType"></a>
  792. <li>genericDisplayType<br>
  793. used by some frontends (but not FHEMWEB) to offer a default image or
  794. appropriate commands for this device. Currently the following values
  795. are supported: switch,outlet,light,blind,speaker,thermostat
  796. </li><br>
  797. <a name="group"></a>
  798. <li>group<br>
  799. Group devices. Recognized by web-pgm2 (module <a
  800. href="#FHEMWEB">FHEMWEB</a>), it makes
  801. devices in the same group appear in the same box).
  802. This is used to further group
  803. devices together. A device can appear in more than one group, in this
  804. case the groups have to be specified comma-separated.<br>
  805. If this attribute is not set then the device type is used as the
  806. grouping attribute.
  807. </li><br>
  808. <a name="room"></a>
  809. <li>room<br>
  810. Filter/group devices. Recognized by web-pgm2 and web-pgm3. A device
  811. can appear in more than one room, in this case the rooms have to be
  812. specified comma-separated.<br>
  813. Devices in the room hidden will not appear in the web output, or set
  814. the <a href="#hiddenroom"> FHEMWEB attribute to selectively disable
  815. rooms for certain FHEMWEB instances.
  816. </li><br>
  817. <a name="suppressReading"></a>
  818. <li>suppressReading<br>
  819. Used to eliminate unwanted readings. The value is a regular expression,
  820. with ^ and $ added. Only necessary in exceptional cases.
  821. </li><br>
  822. <a name="showtime"></a>
  823. <li>showtime<br>
  824. Used in the webfrontend pgm2 to show the time of last activity
  825. instead of the state in the summary view. Useful e.g. for FS20 PIRI
  826. devices.
  827. </li><br>
  828. <a name="verbose"></a>
  829. <li>verbose<br>
  830. Set the verbosity level. Possible values:
  831. <ul>
  832. <li>0 - server start/stop</li>
  833. <li>1 - error messages or unknown packets</li>
  834. <li>2 - major events/alarms.</li>
  835. <li>3 - commands sent out will be logged.</li>
  836. <li>4 - you'll see whats received by the different devices.</li>
  837. <li>5 - debugging.</li>
  838. </ul>
  839. The value for the <a href="#global">global</a> device is a default for
  840. other devices without own verbose attribute set.
  841. </li></br>
  842. </ul>
  843. <a name="readingFnAttributes"></a>
  844. <h4>readingFnAttributes</h4><p>
  845. The following global attributes are honored by the modules that make use of the
  846. standardized readings updating mechanism in fhem.pl. Check the module's
  847. attribute list if you want to know if a device supports these attributes. <br>
  848. <ul>
  849. <a name="stateFormat"></a>
  850. <li>stateFormat<br>
  851. Modifies the STATE of the device, shown by the list command or in the room
  852. overview in FHEMWEB. If not set, its value is taken from the state reading.
  853. If set, then every word in the argument is replaced by the value of the
  854. reading if such a reading for the current device exists. If the value of
  855. this attribute is enclused in {}, then it is evaluated. This attribute is
  856. evaluated each time a reading is updated.<br>
  857. The "set magic" described <a href="#set">here</a> is also applied.
  858. </li>
  859. <p>
  860. <a name="event-on-update-reading"></a>
  861. <li>event-on-update-reading<br>
  862. If not set, every update of any reading creates an event, which e.g. is
  863. handled by <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a>.
  864. The attribute takes a comma-separated list of readings. You may use regular
  865. expressions in that list. If set, only updates of the listed readings
  866. create events.
  867. </li>
  868. <p>
  869. <a name="event-on-change-reading"></a>
  870. <li>event-on-change-reading<br>
  871. The attribute takes a comma-separated list of readings. You may use regular
  872. expressions in that list. If set, only changes of the listed readings
  873. create events. In other words, if a reading listed here is updated with the
  874. new value identical to the old value, no event is created. If an optional [:threshold]
  875. is given after a reading name events are only generated if the change is >= threshold.
  876. </li>
  877. The precedence of event-on-update-reading and event-on-change-reading is as
  878. follows:
  879. <ol>
  880. <li>If both attributes are not set, any update of any reading of the device
  881. creates an event.</li>
  882. <li>If any of the attributes is set, no events occur for updates or changes
  883. of readings not listed in any of the attributes.</li>
  884. <li>If a reading is listed in event-on-update-reading, an update of the
  885. reading creates an event no matter whether the reading is also listed
  886. in event-on-change-reading.</li>
  887. </ol>
  888. <p>
  889. <a name="timestamp-on-change-reading"></a>
  890. <li>timestamp-on-change-reading<br>
  891. The attribute takes a comma-separated list of readings. You may use regular
  892. expressions in that list. If set, the timestamps of the listed readings will
  893. not be changed if event-on-change-reading is also set and it would not create
  894. an event for this reading.
  895. </li>
  896. <p>
  897. <a name="event-aggregator"></a>
  898. <li>event-aggregator</li>
  899. The primary uses of this attribute are to calculate (time-weighted) averages of
  900. readings over time periods and to throttle the update rate of readings and thus
  901. the amount of data written to the logs.<p>
  902. This attribute takes a comma-separated list of <code>reading:interval:method:function:holdTime</code>
  903. quintuples. You may use regular expressions for <code>reading</code>. If set, updates for the
  904. listed readings are ignored and associated events are suppressed for a black-out period of at
  905. least <code>interval</code> seconds (downsampling). After the black-out period has expired, the reading is
  906. updated with a value that is calculated from the values and timestamps of the previously ignored
  907. updates within the black-out period as follows:
  908. <table>
  909. <tr><th>function</th><th>description</th></tr>
  910. <tr><td>v</td><td>the last value encountered</td></tr>
  911. <tr><td>v0</td><td>the first value encountered</td></tr>
  912. <tr><td>min</td><td>the smallest value encountered</td></tr>
  913. <tr><td>max</td><td>the largest value encountered</td></tr>
  914. <tr><td>mean</td><td>the arithmetic mean of all values</td></tr>
  915. <tr><td>sd</td><td>the standard deviation from the mean</td></tr>
  916. <tr><td>median</td><td>the median of all values (requires holdTime and function none)</td></tr>
  917. <tr><td>integral</td><td>the arithmetic sum (if not time-weighted) or integral area (if time-weighted) of all values</td></tr>
  918. <tr><td>n</td><td>number of samples</td></tr>
  919. <tr><td>t</td><td>timestamp of the last value</td></tr>
  920. <tr><td>t0</td><td>timestamp of the first value</td></tr>
  921. </table>
  922. <p>
  923. If <code>method</code> is <code>none</code>, then that's all there is. If <code>method</code>
  924. is <code>const</code> or <code>linear</code>, the time-weighted series of values is taken into
  925. account instead. The weight is the timespan between two subsequent updates.
  926. With the <code>const</code> method, the value is the value of the reading at the beginning of
  927. the timespan; with the <code>linear</code> method, the value is the arithmetic average of
  928. the values at the beginning and the end of the timespan.
  929. Rollovers of black-out periods are handled as one would expect it.<p>
  930. One would typically use the <code>linear</code> method with the <code>mean</code> function for
  931. quantities continuously varying over time like electric power consumption, temperature or speed.
  932. For cumulative quantities like energy consumed, rain fallen or distance covered,
  933. the <code>none</code> method with the <code>v</code> function is used. The <code>constant</code>
  934. method is for discrete quantities that stay constant until the corresponding reading is updated,
  935. e.g. counters, switches and the like.<p>
  936. If the <code>holdTime</code> in seconds is defined, the samples will be kept in memory allowing
  937. the calculation of floating statistics instead of blocked statistics. With <code>holdTime</code>
  938. defined the <code>interval</code> can be kept undefined so that the readings update rate is unchanged
  939. or it can be set to a value less then <code>holdTime</code> for downsampling as described above
  940. with a full history of the readings in memory. Note that the historic samples are not persistent
  941. and will be lost when restarting FHEM.<p>
  942. The event aggregator only takes into consideration those updates that remain after preprocessing
  943. according to the <code>event-on-update-reading</code> and <code>event-on-change-reading</code>
  944. directives. Besides which, any update of a reading that occurs within a timespan from the preceding
  945. update that is smaller than the resolution of FHEM's time granularity is ditched.<p>
  946. When more than one function should be calculated for the same reading, the original reading must be
  947. multiplied (e.g. by using a notify) before applying the event-aggregator to the derived readings.<p>
  948. Examples:<br>
  949. <code>attr myPowerMeter event-aggregator EP_POWER_METER:300:linear:mean,EP_ENERGY_METER:300:none:v</code><br>
  950. <code>attr myBadSensor event-aggregator TEMP::none:median:300</code><br>
  951. <code>attr mySunMeter event-aggregator SUN_INTENSITY_24H::const:integral:86400</code>
  952. </li>
  953. <p>
  954. <a name="event-min-interval"></a>
  955. <li>event-min-interval<br>
  956. This attribute takes a comma-separated list of reading:minInterval pairs.
  957. You may use regular expressions for reading. Events will only be
  958. generated, if at least minInterval seconds elapsed since the last reading
  959. of the matched type. If event-on-change-reading is also specified, they are
  960. combined with OR: if one of them is true, the event is generated.
  961. </li>
  962. <p>
  963. <a name="userReadings"></a>
  964. <li>userReadings<br>
  965. A comma-separated list of definitions of user-defined readings. Each
  966. definition has the form:
  967. <ul>
  968. <code>
  969. &lt;reading&gt;[:&lt;trigger&gt;] [&lt;modifier&gt;] { &lt;perl code&gt; }
  970. </code>
  971. </ul>
  972. After a single or bulk readings update, the user-defined readings are set
  973. by evaluating the <a href="#perl">perl code</a><code> { &lt;perl code&gt;
  974. }</code> for all definitions and setting the value of the respective
  975. user-defined reading <code>&lt;reading&gt;</code> to the result. If
  976. &lt;trigger&gt; is given, then all processing for this specific user
  977. reading is only done if one of the just updated "reading: value"
  978. combinations matches &lt;trigger&gt;, which is treated as a regexp.
  979. <br>
  980. Examples:<br>
  981. <ul><code>
  982. attr myEnergyMeter userReadings energy
  983. { ReadingsVal("myEnergyMeter","counters.A",0)/1250.0;; }<br>
  984. attr myMultiMeter userReadings
  985. energy1:counters.A.* { ReadingsVal("myMultiMeter","counters.A",0)/1250.0;; },
  986. energy2:counters.B.* { ReadingsVal("myMultiMeter","counters.B",0)/1250.0;; }
  987. </code></ul>
  988. <code>&lt;modifier&gt;</code> can take one of these values:
  989. <ul>
  990. <li>none: the same as it would not have been given at all.</li>
  991. <li>difference: the reading is set to the difference between the current
  992. and the previously evaluated value.</li>
  993. <li>differential: the reading is set to the difference between the
  994. current and the previously evaluated value divided by the time in
  995. seconds between the current and the previous evaluation. Granularity
  996. of time is one second. No value is calculated if the time past is
  997. below one second. Useful to calculate rates.</li>
  998. <li>integral: reverse function of differential. The result is incremented
  999. by the product of the time difference between the last two readings
  1000. and the avarage of the last two readings. <br>
  1001. result += (time - timeold) * (oldval + value) / 2
  1002. </li>
  1003. <li>offset: if the current evaluated value is smaler than the previously
  1004. evaluated value the reading is incremented by the previous value.
  1005. the reading can then be used as an offset correct for a counter that
  1006. is reset for example due to a power loss.</li>
  1007. <li>monotonic: if the difference between the current and the previously
  1008. evaluated value is positive the reading is incremented by this difference.
  1009. this allows to derive a monotonic growing counter from an original counter
  1010. even if the original will be rest by a power loss</li>
  1011. </ul>
  1012. Example:<br>
  1013. <ul><code>attr myPowerMeter userReadings power
  1014. differential { ReadingsVal("myPowerMeter","counters.A",0)/1250.0;; }
  1015. </code></ul>
  1016. Notes:
  1017. <ul>
  1018. <li>user readings with modifiers difference and differential store the
  1019. calculated values internally. The user reading is set earliest at the
  1020. second evaluation. Beware of stale values when changing
  1021. definitions!</li>
  1022. <li>the name of the defined Readings consists of alphanumeric characters
  1023. with underscore (_) and the minus (-) sign.</li>
  1024. </ul>
  1025. </li>
  1026. </ul>
  1027. <h4>Common attributes</h4>
  1028. The following local attributes are used by a wider range of devices:
  1029. <ul>
  1030. <a name="IODev"></a>
  1031. <li>IODev<br>
  1032. Set the IO or physical device which should be used for sending signals
  1033. for this "logical" device. An example for the physical device is an FHZ
  1034. or a CUL. Note: Upon startup FHEM assigns each logical device
  1035. (FS20/HMS/KS300/etc) the last physical device which can receive data
  1036. for this type of device. The attribute IODev needs to be used only if
  1037. you attached more than one physical device capable of receiving signals
  1038. for this logical device.</li><br>
  1039. <li>Special: attribute disable can be toggled<br/>
  1040. Attribute "disable" can be toggled by issuing the following command:<br/>
  1041. <br/>
  1042. <code>attr &lt;device&gt; disable toggle</code><br/>
  1043. <br/>
  1044. Attribute "disable" must be offered by the corresponding module</li>
  1045. </ul>
  1046. <!-- attributes end - diese Zeile nicht entfernen! -->
  1047. <br><br>
  1048. <a name="commands"></a>
  1049. <a name="attr"></a>
  1050. <h3>attr</h3>
  1051. <ul>
  1052. <code>attr &lt;devspec&gt; &lt;attrname&gt; [&lt;value&gt;] </code><br>
  1053. <br>Set an attribute for a device defined by <a href="#define">define</a>.
  1054. You can define your own <a href="#attributes">attributes</a> too to use them
  1055. in other applications.
  1056. Use "attr &lt;name&gt; ?" to get a list of possible attributes.
  1057. See the <a href="#devspec">Device specification</a> section for details on
  1058. &lt;devspec&gt;.
  1059. After setting the attribute, the global event "ATTR" will be generated.
  1060. <br><br>
  1061. Examples:
  1062. <ul>
  1063. <code>attr global verbose 3</code><br>
  1064. <code>attr lamp room kitchen</code><br>
  1065. <code>attr lamp group lights</code><br>
  1066. <code>attr lamp loglevel 6</code><br>
  1067. <code>attr weatherstation event-on-update-reading wind,temperature,humidity</code><br>
  1068. <code>attr weatherstation event-on-change-reading israining</code><br>
  1069. <code>attr weatherstation event-on-change-reading israining,state</code><br>
  1070. <code>attr heating stateFormat Temp:measured-temp, Valve:actuator</code><br>
  1071. </ul>
  1072. <br>
  1073. Notes:<br>
  1074. <ul>
  1075. <li>See <a href="#deleteattr">deleteattr</a> to delete attributes.</li>
  1076. </ul>
  1077. </ul>
  1078. <a name="cancel"></a>
  1079. <h3>cancel</h3>
  1080. <ul>
  1081. <code>cancel [&lt;id&gt; [quiet]]</code>
  1082. <br><br>
  1083. Cancels a named <a href="#sleep">sleep</a>.
  1084. </ul>
  1085. <!-- cancel end -->
  1086. <a name="define"></a>
  1087. <h3>define</h3>
  1088. <ul>
  1089. <code>define [option] &lt;name&gt; &lt;type&gt; &lt;type-specific&gt;</code><br>
  1090. <br>
  1091. Define a device. You need devices if you want to manipulate them (e.g.
  1092. set on/off), and the logfile is also more readable if it contains e.g.
  1093. "lamp off" instead of "Device 5673, Button 00, Code 00 (off)". <br>
  1094. After definition, the global event "DEFINED" will be generated, see the
  1095. notify section for details.<br>
  1096. <br><br>
  1097. Each device takes different additional arguments at definition, see the
  1098. corresponding device section for details.<br>
  1099. <br>
  1100. Options:<br>
  1101. <ul>
  1102. <li>-temporary<br>
  1103. Add the TEMPORARY flag to the definition, which will prevent saving the
  1104. device to fhem.cfg.
  1105. </li><br>
  1106. <li>-ignoreErr<br>
  1107. Reduce the number of errors displayed when a certain FHEM-module cannot
  1108. be loaded. Used by fhem.cfg.demo, as using the RSS example requires the
  1109. installation of several uncommon perl modules.
  1110. </li><br>
  1111. </ul>
  1112. </ul>
  1113. <!-- define end -->
  1114. <a name="defmod"></a>
  1115. <h3>defmod</h3>
  1116. <ul>
  1117. <code>defmod &lt;name&gt; &lt;type&gt; &lt;type-specific&gt;</code><br>
  1118. <br>
  1119. Define a device or modify it, if it already exists. E.g. to switch off a lamp
  1120. 10 Minutes after the last message from the motion detector, you may use
  1121. <ul><code>
  1122. define mdNtfy notify motionDetector defmod mdOff at +00:10 set lamp off
  1123. </code></ul>
  1124. Using define here for the mdOff will generate an error if the motion detector
  1125. triggers within the 10 minutes after the first event, as the mdOff at
  1126. definition still exists.
  1127. <br>
  1128. </ul>
  1129. <!-- defmod end -->
  1130. <a name="delete"></a>
  1131. <h3>delete</h3>
  1132. <ul>
  1133. <code>delete &lt;devspec&gt;</code> <br>
  1134. <br>
  1135. Delete something created with the <a href="#define">define</a> command.
  1136. See the <a href="#devspec">Device specification</a> section for details on
  1137. &lt;devspec&gt;.<br>
  1138. After deletion, the global event "DELETED" will be generated, see the notify
  1139. section for details.<br>
  1140. Examples:
  1141. <ul>
  1142. <code>delete lamp</code><br>
  1143. </ul>
  1144. <br>
  1145. </ul>
  1146. <!-- delete end -->
  1147. <a name="deleteattr"></a>
  1148. <h3>deleteattr</h3>
  1149. <ul>
  1150. <code>deleteattr &lt;devspec&gt; [&lt;attrname&gt;]</code> <br>
  1151. <br>
  1152. Delete either a single attribute (see the <a href="#attr">attr</a> command)
  1153. or all attributes for a device (if no &lt;attrname&gt; is defined).
  1154. See the <a href="#devspec">Device specification</a> section for details on
  1155. &lt;devspec&gt;.<br>
  1156. After deleting the attribute, the global event "DELETEATTR" will be generated.
  1157. <br>
  1158. Examples:
  1159. <ul>
  1160. <code>deleteattr lamp follow-on-for-timer</code><br>
  1161. <code>deleteattr lamp</code><br>
  1162. </ul>
  1163. <br>
  1164. </ul>
  1165. <!-- deleteattr end -->
  1166. <a name="deletereading"></a>
  1167. <h3>deletereading</h3>
  1168. <ul>
  1169. <code>deletereading &lt;devspec&gt; &lt;readingname&gt;</code> <br>
  1170. <br>
  1171. Delete the reading &lt;readingname&gt;
  1172. for a device. &lt;readingname&gt; is a perl regular expression that must match the whole name of the reading.
  1173. Use with greatest care! FHEM might crash if you delete vital readings of a device.
  1174. See the <a href="#devspec">Device specification</a> section for details on
  1175. &lt;devspec&gt;.<br>
  1176. <br>
  1177. Examples:
  1178. <ul>
  1179. <code>deletereading mySensor temp1</code><br>
  1180. <code>deletereading mySensor temp\d+</code><br>
  1181. </ul>
  1182. <br>
  1183. </ul>
  1184. <!-- deletereading end -->
  1185. <a name="displayattr"></a>
  1186. <h3>displayattr</h3>
  1187. <ul>
  1188. <code>displayattr &lt;devspec&gt; [&lt;attrname&gt;]</code> <br>
  1189. <br>
  1190. Display either the value of a single attribute (see the <a href="#attr">attr</a> command)
  1191. or all attributes for a device (if no &lt;attrname&gt; is defined).
  1192. See the <a href="#devspec">Device specification</a> section for details on
  1193. &lt;devspec&gt;.<br>
  1194. If more then one device is specified, then the device name will also included
  1195. in the output.
  1196. <br>
  1197. Examples:
  1198. <ul>
  1199. <code>
  1200. fhem&gt; di WEB<br>
  1201. menuEntries AlarmOn,/fhem?cmd=set%20alarm%20on<br>
  1202. room Misc.<br>
  1203. fhem&gt di WEB room<br>
  1204. Misc.<br>
  1205. </code>
  1206. </ul>
  1207. <br>
  1208. </ul>
  1209. <!-- displayattr end -->
  1210. <a name="get"></a>
  1211. <h3>get</h3>
  1212. <ul>
  1213. <code>get &lt;devspec&gt; &lt;type-specific&gt;</code>
  1214. <br><br>
  1215. Ask a value directly from the device, and wait for an answer. In general, you
  1216. can get a list of possible parameters by
  1217. <ul>
  1218. <code>get &lt;device&gt; ?</code>
  1219. </ul>
  1220. See the <a href="#devspec">Device specification</a> section for details on
  1221. &lt;devspec&gt;.<br>
  1222. <br>
  1223. Each device has different get parameters, see the corresponding device
  1224. section for details.<br>
  1225. <br>
  1226. </ul>
  1227. <!-- get end -->
  1228. <a name="include"></a>
  1229. <h3>include</h3>
  1230. <ul>
  1231. <code>include &lt;filename&gt;</code> <br>
  1232. <br>
  1233. Read in the file, and process every line as a FHEM command.
  1234. Note: only experts should use this command.
  1235. <br>
  1236. </ul>
  1237. <!-- include end -->
  1238. <a name="inform"></a>
  1239. <h3>inform</h3>
  1240. <ul>
  1241. <code>inform {on|off|timer|raw} [regexp]</code> <br>
  1242. <br>
  1243. If set to on, and a device state changes, send a notification to the current
  1244. client. This command can be used by other programs/modules to receive a
  1245. notification.<br>
  1246. The option timer prepends a timerstamp to the line. Note: this command is
  1247. a nice way to check which events are generated, to help you when creating
  1248. <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a> entries.
  1249. <br>
  1250. </ul>
  1251. <!-- inform end -->
  1252. <a name="list"></a>
  1253. <h3>list</h3>
  1254. <ul>
  1255. <code>list [devspec] [value]</code><br>
  1256. or<br>
  1257. <code>list {-r|-R} devspec</code><br>
  1258. <br><br>
  1259. Output a list of all definitions, all notify settings and all at
  1260. entries. This is one of the few commands which return a string in a
  1261. normal case.
  1262. See the <a href="#devspec">Device specification</a> section for details on
  1263. &lt;devspec&gt;.
  1264. <br>
  1265. If value is specified, then output this property (like DEF, TYPE, etc) or
  1266. reading (actuator, measured-temp) for all devices from the devspec.
  1267. <br><br>
  1268. Example:
  1269. <pre><code> fhem> list
  1270. Type list <name> for detailed info.
  1271. Internal:
  1272. global (Internal)
  1273. FHZ:
  1274. FHZ (fhtbuf: 23)
  1275. FS20:
  1276. Btn4 (on-old-for-timer)
  1277. Roll1 (on)
  1278. Stehlampe (off)
  1279. FHT:
  1280. fl (measured-temp: 21.1 (Celsius))
  1281. KS300:
  1282. out1 (T: 2.9 H: 74 W: 2.2 R: 8.2 IR: no)
  1283. at:
  1284. at_rollup (Next: 07:00:00)
  1285. notify:
  1286. ntfy_btn4 (active)
  1287. FileLog:
  1288. avglog (active)
  1289. </code></pre>
  1290. If specifying <code>name</code>, then a detailed status for <code>name</code>
  1291. will be displayed, e.g.:
  1292. <pre><code> fhem> list fl
  1293. Internals:
  1294. CODE 5102
  1295. DEF 5102
  1296. NAME fl
  1297. NR 15
  1298. STATE measured-temp: 21.1 (Celsius)
  1299. TYPE FHT
  1300. IODev FHZ
  1301. Attributes:
  1302. room Heizung
  1303. Readings:
  1304. 2006-11-02 09:45:56 actuator 19%
  1305. [...]
  1306. </code></pre>
  1307. With the -r (raw) option output the device definition in a format suitable
  1308. for inclusion in fhem.cfg and fhem.state. -R returns the definition of the
  1309. device itself, together with the definition of probably associated devices.
  1310. Note: the algorithm to select associated devices is known to be imperfect.
  1311. </ul>
  1312. <!-- list end -->
  1313. <a name="modify"></a>
  1314. <h3>modify</h3>
  1315. <ul>
  1316. <code>modify &lt;name&gt; &lt;type-dependent-options&gt;</code>
  1317. <br><br>
  1318. Used to modify some definitions. Useful for changing some <a
  1319. href="#at">at</a> or <a href="#notify">notify</a> definitions. If specifying
  1320. one argument to an at type definition, only the time part will be changed. In
  1321. case of a notify type definition, only the regex part will be changed. All
  1322. other values (state, attributes, etc) will remain intact.
  1323. After modify, the global event "MODIFIED" will be generated.
  1324. <br><br>
  1325. Example:
  1326. <ul>
  1327. <code>define lampon at 19:00 set lamp on</code><br>
  1328. <code>modify lampon *19:00</code><br>
  1329. <code>modify lampon 19:00 set lamp on-for-timer 16</code><br>
  1330. </ul>
  1331. </ul>
  1332. <!-- modify end -->
  1333. <a name="quit"></a>
  1334. <h3>quit</h3>
  1335. <ul>
  1336. <code>quit</code>
  1337. <br><br>
  1338. If used in a TCP/IP session, terminate the client session.<br>
  1339. If used in a script, terminate the parsing of the current script.
  1340. <br><br>
  1341. Example:
  1342. <ul>
  1343. <code>quit</code>
  1344. </ul>
  1345. </ul>
  1346. <!-- quit end -->
  1347. <a name="reload"></a>
  1348. <h3>reload</h3>
  1349. <ul>
  1350. <code>reload &lt;module&gt;</code>
  1351. <br><br>
  1352. Reload the given module from the module directory. It is a convenient way to
  1353. test modules whithout restarting the program.
  1354. <br><br>
  1355. Example:
  1356. <ul>
  1357. <code>reload 99_PRIV</code>
  1358. </ul>
  1359. </ul>
  1360. <!-- reload end -->
  1361. <a name="rename"></a>
  1362. <h3>rename</h3>
  1363. <ul>
  1364. <code>rename &lt;oldname&gt; &lt;newname&gt;</code>
  1365. <br><br>
  1366. Rename a device from the &lt;oldname&gt; to &lt;newname&gt;, together with
  1367. its attributes. The global event RENAMED will be generated, see the notify
  1368. section for details.
  1369. <br><br>
  1370. Example:
  1371. <ul>
  1372. <code>rename FHT_1234 fht.kitchen</code>
  1373. </ul>
  1374. </ul>
  1375. <!-- rename end -->
  1376. <a name="rereadcfg"></a>
  1377. <h3>rereadcfg</h3>
  1378. <ul>
  1379. <code>rereadcfg [fhem-config-file]</code>
  1380. <br><br>
  1381. Re-read the active configuration file, or the optionally specified file.<br>
  1382. The sequence: the <a href="#statefile">statefile</a> will be saved first,
  1383. then all devices will be deleted, then the currently active config file (or
  1384. the specified file) will be read and at last the statefile will be
  1385. reloaded.<br>
  1386. Upon completion it triggers the global:REREADCFG event. All existing
  1387. connections up to the one issuing the rereadcfg will be closed.
  1388. <br><br>
  1389. Example:
  1390. <ul>
  1391. <code>rereadcfg</code>
  1392. </ul>
  1393. </ul>
  1394. <!-- rereadcfg end -->
  1395. <a name="save"></a>
  1396. <h3>save</h3>
  1397. <ul>
  1398. <code>save [&lt;configfile&gt;]</code>
  1399. <br><br>
  1400. Save first the <a href="#statefile">statefile</a>, then the
  1401. <a href="#configfile">configfile</a> information. If a parameter is specified,
  1402. it will be used instead the global configfile attribute.<br><br>
  1403. Notes:
  1404. <ul>
  1405. <li>save only writes out definitions and attributes, but no (set/get)
  1406. commands which were previously part of the config file. If you need such
  1407. commands after the initialization (e.g. <a href="#FHZset">FHTcode</a>), you
  1408. should trigger them via <a href="#notify">notify</a>, when receiving the
  1409. INITIALIZED event.</li>
  1410. <li>save tries to preserve comments (lines starting with #) and include
  1411. structures, but it won't work correctly if some of these files are not
  1412. writeable.</li>
  1413. <li>before overwriting the files, the old version will be saved, see the <a
  1414. href="#restoreDirs">restoreDirs</a> global attribute for details.
  1415. </ul>
  1416. </ul>
  1417. <!-- save end -->
  1418. <a name="set"></a>
  1419. <h3>set</h3>
  1420. <ul>
  1421. <code>set &lt;devspec&gt; &lt;type-specific&gt;</code>
  1422. <br><br>
  1423. Set parameters of a device / send signals to a device. You can
  1424. get a list of possible parameters by
  1425. <ul>
  1426. <code>set &lt;name&gt; ?</code>
  1427. </ul>
  1428. See the <a href="#devspec">Device specification</a> section for details on
  1429. &lt;devspec&gt;. The set command returns only a value on error.<br>
  1430. <br>
  1431. Each device has different set parameters, see the corresponding device
  1432. section for details.<br>
  1433. <br><br>
  1434. From featurelevel 5.7 on the set and setreading command replaces:
  1435. <ul>
  1436. <li>[device:name] with the reading, internal or attribute of the device, if
  1437. both device and the reading, internal or attribute exists.
  1438. <ul>
  1439. <li>You can use the r:, i: or a: prefix to restrict the search to one
  1440. type, analogue to the devspec filtering.</li>
  1441. <li>The suffix :d retrieves the first number</li>
  1442. <li>The suffix :i retrieves the integer part of the first number.</li>
  1443. <li>The suffix :r&lt;n&gt; retrieves the first number and rounds it to
  1444. &lt;n&gt; decimal places. If &lt;n&gt; is missing, then rounds it to
  1445. one decimal place.</li>
  1446. <li>The suffix :t returns the timestamp (works only for readings)</li>
  1447. <li>The suffix :sec returns the number of seconds since the reading was
  1448. set.</li>
  1449. </ul>
  1450. Example:
  1451. <ul>
  1452. set Lamp blink [blinkDummy:number] [r:blinkDummy:duration:d]
  1453. </ul>
  1454. </li>
  1455. <li>[device:name:d] same as above, but only the number is retrieved</li>
  1456. <li>[device:name:sec] same as above, but only the number is retrieved</li>
  1457. <li>{(perlExpression)} with the result of perlExpression.
  1458. The $DEV variable is additionally available, designating the set device
  1459. name.
  1460. </li>
  1461. </ul>
  1462. These replacements are also known as "set magic".
  1463. <br><br>
  1464. <a name="setExtensions"></a>
  1465. Some modules support a common list of <b>set extensions</b>, and point in
  1466. their documentation to this section. If the module itself implements one of
  1467. the following commands, then the module-implementation takes precedence.
  1468. <ul>
  1469. <li>on-for-timer &lt;seconds&gt<br>
  1470. Issue the on command for the device, and after &lt;seconds&gt; the off
  1471. command. For issuing the off command an internal timer will be
  1472. scheduled, which is deleted upon a restart. To delete this internal
  1473. timer without restart specify 0 as argument.</li>
  1474. <li>off-for-timer &lt;seconds&gt<br>
  1475. see on-for-timer above.</li>
  1476. <li>on-till &lt;timedet&gt<br>
  1477. Issue the on command for the device, and create an at definition with
  1478. &lt;timedet&gt; (in the form HH:MM[:SS]) to set it off. This definition
  1479. is visible, and its name is deviceName+"_till". To cancel the scheduled
  1480. off, delete the at definition. Note: on-till is not active, if the
  1481. specified time is after the current time, in order to make things like
  1482. <ul><code>
  1483. define morningLight at *06:00 set Lamp on-till {sunrise()}
  1484. </code></ul>
  1485. easy.</li>
  1486. <li>on-till-overnight &lt;timedet&gt<br>
  1487. Like on-till, but wont compare the current time with the timespec, so
  1488. following will work:
  1489. <ul><code>
  1490. define nightLight at *{sunset()} set Lamp on-till-overnight 01:00
  1491. </code></ul>
  1492. </li>
  1493. <li>off-till &lt;timedet&gt<br>
  1494. see on-till above.</li>
  1495. <li>off-till-overnight &lt;timedet&gt<br>
  1496. see on-till-overnight above.</li>
  1497. <li>blink &lt;number&gt; &lt;blink-period&gt;<br>
  1498. set the device on for &lt;blink-period&gt; then off for
  1499. &lt;blink-period&gt; and repeat this &lt;number&gt; times.
  1500. To stop blinking specify "0 0" as argument.</li>
  1501. <li>intervals &lt;from1&gt;-&lt;till1&gt; &lt;from2&gt;-&lt;till2&gt;...
  1502. </br>
  1503. set the device on for the specified intervals, which are all timespecs
  1504. in the form HH:MM[:SS]. The intervals are space separated.</li>
  1505. </ul>
  1506. Examples:
  1507. <ul>
  1508. <code>
  1509. set switch on-for-timer 12.5<br>
  1510. set switch on-till {sunset()}<br>
  1511. set switch blink 3 1<br>
  1512. set switch intervals 08:00-12:00 13:00-18:00<br>
  1513. </code>
  1514. </ul>
  1515. </ul>
  1516. <!-- set end -->
  1517. <a name="setdefaultattr"></a>
  1518. <h3>setdefaultattr</h3>
  1519. <ul>
  1520. <code>setdefaultattr [&lt;attrname&gt; [&lt;value&gt;]] </code><br>
  1521. <br>Add a default attribute. Each device defined from now on will receive
  1522. this attribute.<br> If no attrname is specified, then the default attribute
  1523. list will be deleted.
  1524. <br><br>
  1525. Example to set the attribute "room kitchen" and "loglevel 4" to
  1526. each of the lamps:
  1527. <ul>
  1528. <code>setdefaultattr room kitchen</code><br>
  1529. <code>setdefaultattr loglevel 4</code><br>
  1530. <code>define lamp1 FS20 1234 11</code><br>
  1531. <code>define lamp2 FS20 1234 12</code><br>
  1532. <code>define lamp3 FS20 1234 13</code><br>
  1533. <code>setdefaultattr</code><br>
  1534. </ul>
  1535. <br>
  1536. Notes:<br>
  1537. <ul>
  1538. <li>There is no way to delete a single default-attribute from the list</li>
  1539. </ul>
  1540. </ul>
  1541. <!-- setdefaultattr end -->
  1542. <a name="setreading"></a>
  1543. <h3>setreading</h3>
  1544. <ul>
  1545. <code>setreading &lt;devspec&gt; &lt;reading&gt; &lt;value&gt;</code>
  1546. <br><br>
  1547. Set the reading &lt;reading&gt; for the device <code>&lt;name&gt;</code> to
  1548. &lt;value&gt; without sending out commands to the device, but triggering
  1549. events and eventMap/stateFormat transformations as usual. See the set
  1550. command documentation for replacement description.
  1551. <br><br>
  1552. Examples:
  1553. <ul>
  1554. setreading lamp state on
  1555. </ul>
  1556. Note: setreading won't generate an event for device X, if it is called from a
  1557. notify for device X. Use "sleep 0.1; setreading X Y Z" in this case.
  1558. </ul>
  1559. <!-- setreading end -->
  1560. <a name="setstate"></a>
  1561. <h3>setstate</h3>
  1562. <ul>
  1563. <code>setstate &lt;devspec&gt; &lt;value&gt;</code>
  1564. <br><br>
  1565. Set the STATE entry for the device specified by <code>&lt;devspec&gt;</code>,
  1566. which is used for displaying the device state in different frontends.
  1567. No signals will be sent to the device, no events will be generated, and no
  1568. eventMap or stateFormat translation will be done either.
  1569. This command is also used in the <a href="#statefile">statefile</a>.
  1570. See the <a href="#devspec">Device specification</a> section for details on
  1571. &lt;devspec&gt;.
  1572. <br><br>
  1573. Examples:
  1574. <ul>
  1575. setstate lamp on
  1576. </ul>
  1577. </ul>
  1578. <!-- setstate end -->
  1579. <a name="shutdown"></a>
  1580. <h3>shutdown</h3>
  1581. <ul>
  1582. <code>shutdown [restart|exitValue]</code>
  1583. <br><br>
  1584. Shut down the server (after saving the <a href="#statefile">state information
  1585. </a>). It triggers the global:SHUTDOWN event. If the optional restart
  1586. parameter is specified, FHEM tries to restart itself. exitValue may be
  1587. important for start scripts.
  1588. <br><br>
  1589. Example:
  1590. <ul>
  1591. <code>shutdown</code><br>
  1592. <code>shutdown restart</code><br>
  1593. <code>shutdown 1</code><br>
  1594. </ul>
  1595. </ul>
  1596. <!-- shutdown end -->
  1597. <a name="sleep"></a>
  1598. <h3>sleep</h3>
  1599. <ul>
  1600. <code>sleep &lt;sec&gt; [&lt;id&gt;] [quiet]</code>
  1601. <br><br>
  1602. sleep followed by another command is comparable to a nameless <a
  1603. href="#at">at</a>, it executes the following commands after waiting the
  1604. specified time. The unit is seconds, with millisecond accuracy, as you can
  1605. specify decimal places.<br><br>
  1606. A sleep with an &lt;id&gt; will replace a sleep with the same &lt;id&gt;
  1607. and can be canceled by <a href="#cancel">cancel</a>.
  1608. When called in a notify/at/etc, then nonempty return values of the following
  1609. commands are logged to the global logfile with loglevel 2.<br> If quiet is
  1610. specified, then skip this logging.
  1611. <br><br>
  1612. Example:
  1613. <ul>
  1614. define n3 notify btn3.* set lamp on;;sleep 1.5;;set lamp off<br>
  1615. define a3 at +*00:05 set Windsensor 1w_measure;; sleep 2 quiet;; get
  1616. Windsensor 1w_temp
  1617. </ul>
  1618. <br>
  1619. Note: a sleep not followed by any command will block FHEM, is deprecated, and
  1620. it issues a WARNING in the FHEM log.
  1621. <br>
  1622. </ul>
  1623. <!-- sleep end -->
  1624. <a name="trigger"></a>
  1625. <h3>trigger</h3>
  1626. <ul>
  1627. <code>trigger &lt;devspec&gt; &lt;state&gt;</code>
  1628. <br><br>
  1629. Trigger a <a href="#notify">notify</a> definition.
  1630. See the <a href="#devspec">Device specification</a> section for details on
  1631. &lt;devspec&gt;.
  1632. <br><br>
  1633. Example:
  1634. <ul>
  1635. <code>trigger btn3 on</code>
  1636. </ul>
  1637. </ul>
  1638. <!-- trigger end -->
  1639. <!-- commands end - diese Zeile nicht entfernen! -->
  1640. <a name="global"></a>
  1641. <h3>global</h3>
  1642. <ul>
  1643. The global device is used to set different global attributes. It will be
  1644. automatically defined, it cannot be deleted or renamed and has no set or get
  1645. parameters<br>
  1646. <br>
  1647. <b>Define</b><ul>N/A</ul><br>
  1648. <b>Set </b><ul>N/A</ul><br>
  1649. <b>Get</b><ul>N/A</ul><br>
  1650. <b>Attributes</b>
  1651. <ul>
  1652. <li><a href="#archivedir">archivedir</a></li>
  1653. <li><a href="#archivecmd">archivecmd</a></li>
  1654. <li><a href="#nrarchive">nrarchive</a></li>
  1655. <a name="archivesort"></a>
  1656. <li>archivesort<br>
  1657. archivesort may be set to the (default) alphanum or timestamp, and
  1658. specifies how the last files are computed for the nrarchive attribute.
  1659. </li><br>
  1660. <a name="autoload_undefined_devices"></a>
  1661. <li>autoload_undefined_devices<br>
  1662. If set, automatically load the corresponding module when a message
  1663. of this type is received. This is used by the <a href="#autocreate">
  1664. autocreate</a> device, to automatically create a FHEM device upon
  1665. receiving a corresponding message.
  1666. </li><br>
  1667. <a name="autosave"></a>
  1668. <li>autosave<br>
  1669. enable some modules to automatically trigger save after a configuration
  1670. change, e.g. after a new device was created. Default is 1 (true), you
  1671. can deactivate this feature by setting the value to 0.
  1672. </li>
  1673. <a name="backupcmd"></a>
  1674. <li>backupcmd<br>
  1675. You could pass the backup to your own command / script by using this attribute.
  1676. If this attribute is specified, then it will be started as a shell command and
  1677. passes a space separated list of files / directories as <strong>one</strong>
  1678. argument to the command, like e.g.:
  1679. <br>
  1680. <ul>
  1681. <code>"/etc/fhem.cfg /var/log/fhem/fhem.save /usr/share/fhem/contrib
  1682. /usr/share/fhem/FHEM /usr/share/fhem/foo /usr/share/fhem/foobar
  1683. /usr/share/fhem/www"</code>
  1684. </ul>
  1685. Note: Your command / script has to return the string "backup done" or
  1686. everything else to report errors, to work properly with update!<br>
  1687. This Attribute is used by the <a href="#backup">backup</a> command.<br>
  1688. Example:<br>
  1689. <ul>
  1690. attr global backupcmd /usr/local/bin/myBackupScript.sh
  1691. </ul>
  1692. </li><br>
  1693. <a name="backupdir"></a>
  1694. <li>backupdir<br>
  1695. A folder to store the compressed backup file.
  1696. This Attribute is used by the <a href="#backup">backup</a> command.<br>
  1697. Example:<br>
  1698. <ul>
  1699. attr global backupdir /Volumes/BigHD
  1700. </ul>
  1701. </li><br>
  1702. <a name="backupsymlink"></a>
  1703. <li>backupsymlink<br>
  1704. If this attribute is set to everything else as "no", the archive
  1705. command tar will support symlinks in your backup. Otherwise, if this
  1706. attribute is set to "no" symlinks are ignored by tar.
  1707. This Attribute is used by the <a href="#backup">backup</a> command.<br>
  1708. Example:<br>
  1709. <ul>
  1710. attr global backupsymlink yes
  1711. </ul>
  1712. </li><br>
  1713. <a name="blockingCallMax"></a>
  1714. <li>blockingCallMax<br>
  1715. Limit the number of parallel running processes started by the
  1716. BlockingCall FHEM helper routine. Useful on limited hardware.
  1717. </li><br>
  1718. <a name="configfile"></a>
  1719. <li>configfile<br>
  1720. Contains the name of the FHEM configuration file. If <a
  1721. href="#save">save</a> is called without argument, then the output will
  1722. be written to this file.
  1723. </li><br>
  1724. <a name="commandref"></a>
  1725. <li>commandref<br>
  1726. If set to "full" (default), then a full commandref will be generated
  1727. after each update. If set to modular, there is only a short description
  1728. at the beginning, and the module documentation is loaded from FHEM
  1729. dynamically.
  1730. </li><br>
  1731. <a name="dnsHostsFile"></a>
  1732. <li>dnsHostsFile<br>
  1733. If dnsServer is set, check the contents of the file specified as
  1734. argument. To use the system hosts file, set it to /etc/hosts on
  1735. Linux/Unix/OSX and C:\windows\system32\drivers\etc\hosts on Windows.
  1736. Note: only IPv4 is supported.
  1737. </li><br>
  1738. <a name="dnsServer"></a>
  1739. <li>dnsServer<br>
  1740. Contains the IP address of the DNS Server. If some of the modules or
  1741. user code calls the HttpUtils_NonblockingGet function, and this
  1742. attribute is set, then FHEM specific nonblocking code will be used to
  1743. resolve the given address. If this attribute is not set, the blocking
  1744. OS implementation (inet_aton and gethostbyname) will be used.
  1745. </li><br>
  1746. <a name="holiday2we"></a>
  1747. <li>holiday2we<br>
  1748. If this attribute is set, then the <a href="#perl">$we</a> variable
  1749. will be true, if the value of the <a href="#holiday">holiday</a>
  1750. variable referenced by this attribute is not none.<br>
  1751. Example:<br>
  1752. <ul>
  1753. attr global holiday2we hessen
  1754. </ul>
  1755. </li><br>
  1756. <a name="featurelevel"></a>
  1757. <li>featurelevel<br>
  1758. Enable/disable old or new features, based on FHEM version.
  1759. E.g. the $value hash for notify is only set for featurelevel up to 5.6,
  1760. as it is deprecated, use the Value() function instead.
  1761. </li><br>
  1762. <a name="logdir"></a>
  1763. <li>logdir<br>
  1764. If set, the %L attribute in the logfile attribute (or in the FileLog
  1765. modules file definition) is replaced wth the value of the attribute.
  1766. Note: changing the value won't result in moving the files and may cause
  1767. other problems.
  1768. </li><br>
  1769. <a name="logfile"></a>
  1770. <li>logfile<br>
  1771. Specify the logfile to write. You can use "-" for
  1772. stdout, in this case the server won't background itself.<br>
  1773. The logfile name can also take wildcards for easier logfile rotation,
  1774. see the <a href="#FileLog">FileLog</a> section. Just apply the
  1775. <code>archivecmd / archivedir / nrarchive</code> attributes to the
  1776. <code>global</code> device as you would do for a FileLog device.<br>
  1777. You can access the current name of the logfile with
  1778. <code>{ $currlogfile }</code>.
  1779. </li><br>
  1780. <a name="modpath"></a>
  1781. <li>modpath<br>
  1782. Specify the path to the modules directory <code>FHEM</code>. The path
  1783. does <b>not</b> contain the directory FHEM. Upon setting the
  1784. attribute, the directory will be scanned for filenames of the form
  1785. NN_&lt;NAME&gt;.pm, and make them available for device definition under
  1786. &lt;NAME&gt;. If the first device of type &lt;NAME&gt; is defined, the
  1787. module will be loaded, and its function with the name
  1788. &lt;NAME&gt;_Initialize will be called. Exception to this rule are
  1789. modules with NN=99, these are considered to be utility modules
  1790. containing only perl helper functions, they are loaded at startup (i.e.
  1791. modpath attribute definition time).
  1792. </li><br>
  1793. <a name="motd"></a>
  1794. <li>motd<br>
  1795. Message Of The Day. Displayed on the homescreen of the FHEMWEB package,
  1796. or directly after the telnet logon, before displaying the fhem> prompt.
  1797. SecurityCheck is setting motd if it is not defined upon startup, to
  1798. avoid this set the motd value to none. motd is also used to show
  1799. collected error messages upon FHEM start.
  1800. </li><br>
  1801. <a name="mseclog"></a>
  1802. <li>mseclog<br>
  1803. If set, the timestamp in the logfile will contain a millisecond part.
  1804. </li><br>
  1805. <a name="nofork"></a>
  1806. <li>nofork<br>
  1807. If set and the logfile is not "-", do not try to background. Needed on
  1808. some Fritzbox installations, and it will be set automatically for
  1809. Windows.
  1810. </li><br>
  1811. <a name="pidfilename"></a>
  1812. <li>pidfilename<br>
  1813. Write the process id of the perl process to the specified file. The
  1814. server runs as a daemon, and some distributions would like to check by
  1815. the pid if we are still running. The file will be deleted upon
  1816. shutdown.
  1817. </li><br>
  1818. <a name="proxy"></a>
  1819. <li>proxy<br>
  1820. IP:PORT of the proxy server to be used by HttpUtils.
  1821. </li><br>
  1822. <a name="proxyAuth"></a>
  1823. <li>proxyAuth<br>
  1824. Base64 encoded username:password
  1825. </li><br>
  1826. <a name="proxyExclude"></a>
  1827. <li>proxyExclude<br>
  1828. regexp for hosts to exclude when using a proxy
  1829. </li><br>
  1830. <a name="restoreDirs"></a>
  1831. <li>restoreDirs<br>
  1832. update saves each file before overwriting it with the new version from
  1833. the Web. For this purpose update creates a directory restoreDir in the
  1834. global modpath directory, then a subdirectory with the current date,
  1835. where the old version of the currently replaced file is stored.
  1836. The default value of this attribute is 3, meaning that 3 old versions
  1837. (i.e. date-directories) are kept, and the older ones are deleted.<br>
  1838. fhem.cfg and fhem.state will be also copied with this method before
  1839. executing save. To restore the files, you can use the restore FHEM
  1840. command.<br>
  1841. <br>If the attribute is set to 0, the feature is deactivated.
  1842. </li><br>
  1843. <li><a href="#fheminfo">sendStatistics</a><br>
  1844. <a name="statefile"></a>
  1845. <li>statefile<br>
  1846. Set the filename where the state and certain <a href="#at">at</a>
  1847. information will be saved before shutdown. If it is not specified, then
  1848. no information will be saved.
  1849. </li><br>
  1850. <li><a href="#title">title</a><br>
  1851. <li><a href="#fheminfo">uniqueID</a><br>
  1852. <a name="useInet6"></a>
  1853. <li>useInet6<br>
  1854. try to use IPv6 in HttpUtils for communication. If the server does not
  1855. have an IPv6 address, fall back to IPv4. Note: IO::Socket::INET6 is
  1856. required.
  1857. </li><br>
  1858. <a name="userattr"></a>
  1859. <li>userattr<br>
  1860. A space separated list which contains the names of additional
  1861. attributes for all devices. Without specifying them you will not be
  1862. able to set them (in order to prevent typos).<br>
  1863. userattr can also specified for other devices, in this case
  1864. these additinal attribute names are only valid for this device.
  1865. </li><br>
  1866. <a name="dupTimeout"></a>
  1867. <li>dupTimeout<br>
  1868. Define the timeout for which 2 identical events from two different
  1869. receiver are considered a duplicate. Default is 0.5 seconds.
  1870. </li><br>
  1871. <a name="showInternalValues"></a>
  1872. <li>showInternalValues<br>
  1873. Show data used for internal computations. If the name of an internal
  1874. value, reading or attribute starts with dot (.), then it is normally
  1875. hidden, and will only be visible, if this attribute is set to 1.
  1876. The attribute is checked by the list command, by the FHEMWEB room
  1877. overview and by xmllist.
  1878. </li><br>
  1879. <a name="sslVersion"></a>
  1880. <li>sslVersion<br>
  1881. Specifies the accepted cryptography algorithms by all modules using the
  1882. TcpServices helper module. The current default TLSv12:!SSLv3 is thought
  1883. to be more secure than the previously used SSLv23:!SSLv3:!SSLv2, but it
  1884. causes problems with some not updated web services.
  1885. </li><br>
  1886. <a name="stacktrace"></a>
  1887. <li>stacktrace<br>
  1888. if set (to 1), dump a stacktrace to the log for each "PERL WARNING".
  1889. </li><br>
  1890. <a name="restartDelay"></a>
  1891. <li>restartDelay<br>
  1892. set the delay for shutdown restart, default is 2 (seconds).
  1893. </li><br>
  1894. </ul>
  1895. <br>
  1896. <b>Events:</b>
  1897. <ul>
  1898. <li>INITIALIZED<br>after initialization is finished.</li>
  1899. <li>REREADCFG<br>after the configuration is reread.</li>
  1900. <li>SAVE<br>before the configuration is saved.</li>
  1901. <li>SHUTDOWN<br>before FHEM is shut down.</li>
  1902. <li>DEFINED &lt;devname&gt;<br>after a device is defined.</li>
  1903. <li>DELETED &lt;devname&gt;<br>after a device was deleted.</li>
  1904. <li>RENAMED &lt;old&gt; &lt;new&gt;<br>after a device was renamed.</li>
  1905. <li>UNDEFINED &lt;defspec&gt;<br>upon reception of a message for an
  1906. undefined device.</li>
  1907. <li>MODIFIED &lt;defspec&gt;</br> after a device modification.</li>
  1908. <li>UPDATE</br> after an update is completed.</li>
  1909. </ul>
  1910. </ul>
  1911. <!-- global end - do not remove this line! -->
  1912. <a name="ALL3076"></a>
  1913. <h3>ALL3076</h3>
  1914. <ul>
  1915. Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
  1916. <br><br>
  1917. <a name="ALL3076define"></a>
  1918. <b>Define</b>
  1919. <ul>
  1920. <code>define &lt;name&gt; ALL3076 &lt;ip-address&gt; </code>
  1921. <br><br>
  1922. Defines an Allnet 3076 device (Dimmable lightswitch) via its ip address or dns name<br><br>
  1923. Examples:
  1924. <ul>
  1925. <code>define lamp1 ALL3076 192.168.1.200</code><br>
  1926. </ul>
  1927. </ul>
  1928. <br>
  1929. <a name="ALL3076set"></a>
  1930. <b>Set </b>
  1931. <ul>
  1932. <code>set &lt;name&gt; &lt;value&gt;</code>
  1933. <br><br>
  1934. where <code>value</code> is one of:<br>
  1935. <pre>
  1936. dimdown
  1937. dim10%
  1938. dim20%
  1939. dim30%
  1940. dim40%
  1941. dim50%
  1942. dim60%
  1943. dim70%
  1944. dim80%
  1945. dim90%
  1946. dim100%
  1947. dim[0-100]%
  1948. dimup
  1949. off
  1950. on
  1951. toggle
  1952. </pre>
  1953. Examples:
  1954. <ul>
  1955. <code>set lamp1 on</code><br>
  1956. <code>set lamp1 dim11%</code><br>
  1957. <code>set lamp2 toggle</code><br>
  1958. </ul>
  1959. <br>
  1960. Notes:
  1961. <ul>
  1962. <li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
  1963. </ul>
  1964. </ul>
  1965. </ul>
  1966. <a name="ALL4000T"></a>
  1967. <h3>ALL4000T</h3>
  1968. <ul>
  1969. Note: this module requires the following perl modules: XML::Simple LWP::UserAgent
  1970. HTTP::Request.
  1971. <br><br>
  1972. <a name="ALL4000Tdefine"></a>
  1973. <b>Define</b>
  1974. <ul>
  1975. <code>define &lt;name&gt; ALL4000T &lt;ip-address&gt; &lt;port&gt; &lt;delay&gt;</code>
  1976. <br><br>
  1977. Defines a temperature sensor connected on an Allnet 4000 device via its ip address and port. Use the delay argument to define the delay between polls.<br><br>
  1978. Examples:
  1979. <ul>
  1980. <code>define AUSSEN.POOL.TEMP.vorlauf ALL4000T 192.168.68.20 t2 120</code><br>
  1981. </ul>
  1982. </ul>
  1983. <br>
  1984. </ul>
  1985. <a name="ALL4027"></a>
  1986. <h3>ALL4027</h3>
  1987. <ul>
  1988. Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
  1989. <br><br>
  1990. <a name="ALL4027define"></a>
  1991. <b>Define</b>
  1992. <ul>
  1993. <code>define &lt;name&gt; ALL4027 &lt;ip-address&gt; &lt;port&gt; &lt;relay_nr&gt; &lt;delay&gt;</code>
  1994. <br><br>
  1995. Defines an Allnet 4027 device (Box with 8 relays) connected to an ALL4000 via its ip address. The status of the device is also pooled (delay interval), because someone else is able to change the state via the webinterface of the device.<br><br>
  1996. Examples:
  1997. <ul>
  1998. <code>define lamp1 ALL4027 192.168.8.200 0 7 60</code><br>
  1999. </ul>
  2000. </ul>
  2001. <br>
  2002. <a name="ALL4027set"></a>
  2003. <b>Set </b>
  2004. <ul>
  2005. <code>set &lt;name&gt; &lt;value&gt;</code>
  2006. <br><br>
  2007. where <code>value</code> is one of:<br>
  2008. <pre>
  2009. off
  2010. on
  2011. on-for-timer &lt;Seconds&gt;
  2012. toggle
  2013. </pre>
  2014. Examples:
  2015. <ul>
  2016. <code>set poolpump on</code><br>
  2017. </ul>
  2018. <br>
  2019. Notes:
  2020. <ul>
  2021. <li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
  2022. </ul>
  2023. </ul>
  2024. </ul>
  2025. <a name="AMAD"></a>
  2026. <h3>AMAD</h3>
  2027. <ul>
  2028. <u><b>AMAD - Automagic Android Device</b></u>
  2029. <br>
  2030. This module integrates Android devices into FHEM and displays several settings <b><u>using the Android app "Automagic"</u></b>.
  2031. Automagic is comparable to the "Tasker" app for automating tasks and configuration settings. But Automagic is more user-friendly. The "Automagic Premium" app currently costs EUR 2.90.
  2032. <br>
  2033. Any information retrievable by Automagic can be displayed in FHEM by this module. Just define your own Automagic-"flow" and send the data to the AMADCommBridge. One even can control several actions on Android devices.
  2034. <br>
  2035. To be able to make use of all these functions the Automagic app and additional flows need to be installed on the Android device. The flows can be retrieved from the FHEM directory, the app can be bought in Google Play Store.
  2036. <br><br>
  2037. <b>How to use AMAD?</b>
  2038. <ul>
  2039. <li>install the "Automagic Premium" app from the Google Play store.</li>
  2040. <li>install the flowset 74_AMADautomagicFlowset$VERSION.xml from the directory $INSTALLFHEM/FHEM/lib/ on your Android device and activate.</li>
  2041. </ul>
  2042. <br>
  2043. Now you need to define a device in FHEM.
  2044. <br><br>
  2045. <a name="AMADdefine"></a>
  2046. <b>Define</b>
  2047. <ul><br>
  2048. <code>define &lt;name&gt; AMAD &lt;IP-ADDRESS&gt;</code>
  2049. <br><br>
  2050. Example:
  2051. <ul><br>
  2052. <code>define WandTabletWohnzimmer AMAD 192.168.0.23</code><br>
  2053. </ul>
  2054. <br>
  2055. With this command two new AMAD devices in a room called AMAD are created. The parameter &lt;IP-ADDRESS&lt; defines the IP address of your Android device. The second device created is the AMADCommBridge which serves as a communication device from each Android device to FHEM.<br>
  2056. !!!Coming Soon!!! The communication port of each AMAD device may be set by the definition of the "port" attribute. <b>One needs background knowledge of Automagic and HTTP requests as this port will be set in the HTTP request trigger of both flows, therefore the port also needs to be set there.
  2057. <br>
  2058. The communication port of the AMADCommBridge device can easily be changed within the attribut "port".</b>
  2059. </ul>
  2060. <br><a name="AMADCommBridge"></a>
  2061. <b>AMAD Communication Bridge</b>
  2062. <ul>
  2063. Creating your first AMAD device automatically creates the AMADCommBridge device in the room AMAD. With the help of the AMADCommBridge any Android device communicates initially to FHEM.<b>To make the IP addresse of the FHEM server known to the Android device, the FHEM server IP address needs to be configured in the AMADCommBridge. WITHOUT THIS STEP THE AMADCommBridge WILL NOT WORK PROPERLY.</b><br>
  2064. Please us the following command for configuration of the FHEM server IP address in the AMADCommBridge: <i>set AMADCommBridge fhemServerIP &lt;FHEM-IP&gt;.</i><br>
  2065. Additionally the <i>expertMode</i> may be configured. By this setting a direct communication with FHEM will be established without the restriction of needing to make use of a notify to execute set commands.
  2066. </ul><br>
  2067. <br>
  2068. <b><u>You are finished now! After 15 seconds latest the readings of your AMAD Android device should be updated. Consequently each 15 seconds a status request will be sent. If the state of your AMAD Android device does not change to "active" over a longer period of time one should take a look into the log file for error messages.</u></b>
  2069. <br><br><br>
  2070. <a name="AMADreadings"></a>
  2071. <b>Readings</b>
  2072. <ul>
  2073. <li>airplanemode - on/off, state of the aeroplane mode</li>
  2074. <li>androidVersion - currently installed version of Android</li>
  2075. <li>automagicState - state of the Automagic App <b>(prerequisite Android >4.3). In case you have Android >4.3 and the reading says "not supported", you need to enable Automagic inside Android / Settings / Sound & notification / Notification access</b></li>
  2076. <li>batteryHealth - the health of the battery (1=unknown, 2=good, 3=overheat, 4=dead, 5=over voltage, 6=unspecified failure, 7=cold)</li>
  2077. <li>batterytemperature - the temperature of the battery</li>
  2078. <li>bluetooth - on/off, bluetooth state</li>
  2079. <li>checkActiveTask - state of an app (needs to be defined beforehand). 0=not active or not active in foreground, 1=active in foreground, <b>see note below</b></li>
  2080. <li>connectedBTdevices - list of all devices connected via bluetooth</li>
  2081. <li>connectedBTdevicesMAC - list of MAC addresses of all devices connected via bluetooth</li>
  2082. <li>currentMusicAlbum - currently playing album of mediaplayer</li>
  2083. <li>currentMusicApp - currently playing player app (Amazon Music, Google Play Music, Google Play Video, Spotify, YouTube, TuneIn Player, Aldi Life Music)</li>
  2084. <li>currentMusicArtist - currently playing artist of mediaplayer</li>
  2085. <li>currentMusicIcon - cover of currently play album<b>Noch nicht fertig implementiert</b></li>
  2086. <li>currentMusicState - state of currently/last used mediaplayer</li>
  2087. <li>currentMusicTrack - currently playing song title of mediaplayer</li>
  2088. <li>daydream - on/off, daydream currently active</li>
  2089. <li>deviceState - state of Android devices. unknown, online, offline.</li>
  2090. <li>doNotDisturb - state of do not Disturb Mode</li>
  2091. <li>dockingState - undocked/docked, Android device in docking station</li>
  2092. <li>flow_SetCommands - active/inactive, state of SetCommands flow</li>
  2093. <li>flow_informations - active/inactive, state of Informations flow</li>
  2094. <li>flowsetVersionAtDevice - currently installed version of the flowsets on the Android device</li>
  2095. <li>incomingCallerName - Callername from last Call</li>
  2096. <li>incomingCallerNumber - Callernumber from last Call</li>
  2097. <li>incommingWhatsAppMessageFrom - last WhatsApp message</li>
  2098. <li>incommingWhatsTelegramMessageFrom - last telegram message</li>
  2099. <li>intentRadioName - name of the most-recent streamed intent radio</li>
  2100. <li>intentRadioState - state of intent radio player</li>
  2101. <li>keyguardSet - 0/1 keyguard set, 0=no 1=yes, does not indicate whether it is currently active</li>
  2102. <li>lastSetCommandError - last error message of a set command</li>
  2103. <li>lastSetCommandState - last state of a set command, command send successful/command send unsuccessful</li>
  2104. <li>lastStatusRequestError - last error message of a statusRequest command</li>
  2105. <li>lastStatusRequestState - ast state of a statusRequest command, command send successful/command send unsuccessful</li>
  2106. <li>nextAlarmDay - currently set day of alarm</li>
  2107. <li>nextAlarmState - alert/done, current state of "Clock" stock-app</li>
  2108. <li>nextAlarmTime - currently set time of alarm</li>
  2109. <li>powerLevel - state of battery in %</li>
  2110. <li>powerPlugged - 0=no/1,2=yes, power supply connected</li>
  2111. <li>screen - on locked,unlocked/off locked,unlocked, state of display</li>
  2112. <li>screenBrightness - 0-255, level of screen-brightness</li>
  2113. <li>screenFullscreen - on/off, full screen mode</li>
  2114. <li>screenOrientation - Landscape/Portrait, screen orientation (horizontal,vertical)</li>
  2115. <li>screenOrientationMode - auto/manual, mode for screen orientation</li>
  2116. <li>state - current state of AMAD device</li>
  2117. <li>userFlowState - current state of a Flow, established under setUserFlowState Attribut</li>
  2118. <li>volume - media volume setting</li>
  2119. <li>volumeNotification - notification volume setting</li>
  2120. <br>
  2121. Prerequisite for using the reading checkActivTask the package name of the application to be checked needs to be defined in the attribute <i>checkActiveTask</i>. Example: <i>attr Nexus10Wohnzimmer
  2122. checkActiveTask com.android.chrome</i> f&uuml;r den Chrome Browser.
  2123. <br><br>
  2124. </ul>
  2125. <br><br>
  2126. <a name="AMADset"></a>
  2127. <b>Set</b>
  2128. <ul>
  2129. <li>activateVoiceInput - start voice input on Android device</li>
  2130. <li>bluetooth - on/off, switch bluetooth on/off</li>
  2131. <li>clearNotificationBar - All/Automagic, deletes all or only Automagic notifications in status bar</li>
  2132. <li>closeCall - hang up a running call</li>
  2133. <li>currentFlowsetUpdate - start flowset update on Android device</li>
  2134. <li>installFlowSource - install a Automagic flow on device, <u>XML file must be stored in /tmp/ with extension xml</u>. <b>Example:</b> <i>set TabletWohnzimmer installFlowSource WlanUebwerwachen.xml</i></li>
  2135. <li>doNotDisturb - sets the do not Disturb Mode, always Disturb, never Disturb, alarmClockOnly alarm Clock only, onlyImportant only important Disturbs</li>
  2136. <li>mediaAmazonMusic - play/stop/next/back , controlling the amazon music media player</li>
  2137. <li>mediaGoogleMusic - play/stop/next/back , controlling the google play music media player</li>
  2138. <li>mediaSpotifyMusic - play/stop/next/back , controlling the spotify media player</li>
  2139. <li>nextAlarmTime - sets the alarm time. Only valid for the next 24 hours.</li>
  2140. <li>notifySndFile - plays a media-file <b>which by default needs to be stored in the folder "/storage/emulated/0/Notifications/" of the Android device. You may use the attribute setNotifySndFilePath for defining a different folder.</b></li>
  2141. <li>openCall - initial a call and hang up after optional time / set DEVICE openCall 0176354 10 call this number and hang up after 10s</li>
  2142. <li>screenBrightness - 0-255, set screen brighness</li>
  2143. <li>screenMsg - display message on screen of Android device</li>
  2144. <li>sendintent - send intent string <u>Example:</u><i> set $AMADDEVICE sendIntent org.smblott.intentradio.PLAY url http://stream.klassikradio.de/live/mp3-192/stream.klassikradio.de/play.m3u name Klassikradio</i>, first parameter contains the action, second parameter contains the extra. At most two extras can be used.</li>
  2145. <li>sendSMS - Sends an SMS to a specific phone number. Bsp.: sendSMS Dies ist ein Test|555487263</li>
  2146. <li>statusRequest - Get a new status report of Android device. Not all readings can be updated using a statusRequest as some readings are only updated if the value of the reading changes.</li>
  2147. <li>timer - set a countdown timer in the "Clock" stock app. Only seconds are allowed as parameter.</li>
  2148. <li>ttsMsg - send a message which will be played as voice message</li>
  2149. <li>userFlowState - set Flow/s active or inactive,<b><i>set Nexus7Wohnzimmer Badezimmer:inactive vorheizen</i> or <i>set Nexus7Wohnzimmer Badezimmer vorheizen,Nachtlicht Steven:inactive</i></b></li>
  2150. <li>vibrate - vibrate Android device</li>
  2151. <li>volume - set media volume. Works on internal speaker or, if connected, bluetooth speaker or speaker connected via stereo jack</li>
  2152. <li>volumeNotification - set notifications volume</li>
  2153. </ul>
  2154. <br>
  2155. <b>Set (depending on attribute values)</b>
  2156. <ul>
  2157. <li>changetoBtDevice - switch to another bluetooth device. <b>Attribute setBluetoothDevice needs to be set. See note below!</b></li>
  2158. <li>openApp - start an app. <b>attribute setOpenApp</b></li>
  2159. <li>openURL - opens a URLS in the standard browser as long as no other browser is set by the <b>attribute setOpenUrlBrowser</b>.<b>Example:</b><i> attr Tablet setOpenUrlBrowser de.ozerov.fully|de.ozerov.fully.MainActivity, first parameter: package name, second parameter: Class Name</i></li>
  2160. <li>screen - on/off/lock/unlock, switch screen on/off or lock/unlock screen. In Automagic "Preferences" the "Device admin functions" need to be enabled, otherwise "Screen off" does not work. <b>attribute setScreenOnForTimer</b> changes the time the display remains switched on!</li>
  2161. <li>screenFullscreen - on/off, activates/deactivates full screen mode. <b>attribute setFullscreen</b></li>
  2162. <li>screenLock - Locks screen with request for PIN. <b>attribute setScreenlockPIN - enter PIN here. Only use numbers, 4-16 numbers required.</b></li>
  2163. <li>screenOrientation - Auto,Landscape,Portait, set screen orientation (automatic, horizontal, vertical). <b>attribute setScreenOrientation</b></li>
  2164. <li>system - issue system command (only with rooted Android devices). reboot,shutdown,airplanemodeON (can only be switched ON) <b>attribute root</b>, in Automagic "Preferences" "Root functions" need to be enabled.</li>
  2165. <li>setAPSSID - set WLAN AccesPoint SSID to prevent WLAN sleeps</li>
  2166. <li>setNotifySndFilePath - set systempath to notifyfile (default /storage/emulated/0/Notifications/</li>
  2167. <li>setTtsMsgSpeed - set speaking speed for TTS (Value between 0.5 - 4.0, 0.5 Step) default is 1.0</li>
  2168. <li>setTtsMsgLang - set speaking language for TTS, de or en (default is de)</li>
  2169. <br>
  2170. To be able to use "openApp" the corresponding attribute "setOpenApp" needs to contain the app package name.
  2171. <br><br>
  2172. To be able to switch between bluetooth devices the attribute "setBluetoothDevice" needs to contain (a list of) bluetooth devices defined as follows: <b>attr &lt;DEVICE&gt; BTdeviceName1|MAC,BTDeviceName2|MAC</b> No spaces are allowed in any BTdeviceName. Defining MAC please make sure to use the character : (colon) after each second digit/character.<br>
  2173. Example: <i>attr Nexus10Wohnzimmer setBluetoothDevice Logitech_BT_Adapter|AB:12:CD:34:EF:32,Anker_A3565|GH:56:IJ:78:KL:76</i>
  2174. </ul>
  2175. <br><br>
  2176. <a name="AMADstate"></a>
  2177. <b>state</b>
  2178. <ul>
  2179. <li>initialized - shown after initial define.</li>
  2180. <li>active - device is active.</li>
  2181. <li>disabled - device is disabled by the attribute "disable".</li>
  2182. </ul>
  2183. <br><br><br>
  2184. <u><b>Further examples and reading:</b></u>
  2185. <ul><br>
  2186. <a href="http://www.fhemwiki.de/wiki/AMAD#Anwendungsbeispiele">Wiki page for AMAD (german only)</a>
  2187. </ul>
  2188. <br><br><br>
  2189. </ul>
  2190. <a name="AMADCommBridge"></a>
  2191. <h3>AMADCommBridge</h3>
  2192. <ul>
  2193. <u><b>AMAD - Automagic Android Device</b></u></p>
  2194. <b>AMADCommBridge - Communication bridge for all AMAD devices</b>
  2195. </br>
  2196. This module is the central point for the successful integration of Android devices in FHEM. It also provides a link level between AMAD supported devices and FHEM. All communication between AMAD Android and FHEM runs through this interface.</br>
  2197. Therefore, the initial setup of an AMAD device is also performed exactly via this module instance.
  2198. </br></br>
  2199. In order to successfully establish an Android device in FHEM, an AMADCommBridge device must be created in the first step.
  2200. <br><br>
  2201. <a name="AMADCommBridgedefine"></a>
  2202. <b>Define</b>
  2203. <ul><br>
  2204. <code>define &lt;name&gt; AMADCommBridge</code>
  2205. <br><br>
  2206. Example:
  2207. <ul><br>
  2208. <code>define AMADBridge AMADCommBridge</code><br>
  2209. </ul>
  2210. <br>
  2211. This statement creates a new AMADCommBridge device named AMADBridge.
  2212. </ul></br>
  2213. In the following, only the Flowset has to be installed on the Android device and the Flow 'First Run Assistant' run. (Simply press the Homebutton)</br>
  2214. The wizard then guides you through the setup of your AMAD device and ensures that at the end of the installation process the Android device is created as an AMAD device in FHEM.
  2215. </ul>
  2216. <br><br>
  2217. <a name="AMADCommBridgereadings"></a>
  2218. <b>Readings</b>
  2219. <ul><br>
  2220. <li>JSON_ERROR - JSON Error message reported by Perl</li>
  2221. <li>JSON_ERROR_STRING - The string that caused the JSON error message</li>
  2222. <li>fhemServerIP - The IP address of the FHEM server, is set by the module based on the JSON string from the installation wizard. Can also be set by user using set command</li>
  2223. <li>receiveFhemCommand - is set the fhemControlMode attribute to trigger, the reading is set as soon as an FHEM command is sent. A notification can then be triggered.</br>
  2224. If set instead of trigger setControl as value for fhemControlMode, the reading is not executed but the set command executed immediately.</li>
  2225. <li>receiveVoiceCommand - The speech control is activated by AMAD (set DEVICE activateVoiceInput), the last recognized voice command is written into this reading.</li>
  2226. <li>receiveVoiceDevice - Name of the device from where the last recognized voice command was sent</li>
  2227. <li>state - state of the Bridge, open, closed</li>
  2228. </ul>
  2229. <br><br>
  2230. <a name="AMADCommBridgeattribute"></a>
  2231. <b>Attributes</b>
  2232. <ul><br>
  2233. <li>allowFrom - Regexp the allowed IP addresses or hostnames. If this attribute is set, only connections from these addresses are accepted.</br>
  2234. Attention: If allowfrom is not set, and no kind allowed instance is defined, and the remote has a non-local address, then the connection is rejected. The following addresses are considered local:</br>
  2235. IPV4: 127/8, 10/8, 192.168/16, 172.16/10, 169.254/16</br>
  2236. IPV6: ::1, fe80/10</li>
  2237. <li>debugJSON - If set to 1, JSON error messages are written in readings. See JSON_ERROR * under Readings</li>
  2238. <li>fhemControlMode - Controls the permissible type of control of FHEM devices. You can control the bridge in two ways FHEM devices. Either by direct FHEM command from a flow, or as a voice command by means of voice control (set DEVICE activateVoiceInput)
  2239. <ul><li>trigger - If the value trigger is set, all FHEM set commands sent to the bridge are written to the reading receiveFhemCommand and can be executed using notify. Voice control is possible; readings receiveVoice * are set. On the Android device several voice commands can be linked by means of "and". Example: turn on the light scene in the evening and turn on the TV</li>
  2240. <li>setControl - All set commands sent via the flow are automatically executed. The triggering of a reading is not necessary. The control by means of language behaves like the value trigger</li>
  2241. <li>thirdPartControl - Behaves as triggered, but in the case of voice control, a series of voice commands by means of "and" is not possible. Used for voice control via modules of other module authors ((z.B. 39_TEERKO.pm)</li></ul>
  2242. </li>
  2243. </ul>
  2244. </br></br>
  2245. If you have problems with the wizard, an Android device can also be applied manually, you will find in the Commandref to the AMADDevice module.
  2246. </ul>
  2247. <a name="AMADDevice"></a>
  2248. <h3>AMADDevice</h3>
  2249. <ul>
  2250. <u><b>AMAD - Automagic Android Device</b></u>
  2251. <br>
  2252. This module integrates Android devices into FHEM and displays several settings <b><u>using the Android app "Automagic"</u></b>.
  2253. Automagic is comparable to the "Tasker" app for automating tasks and configuration settings. But Automagic is more user-friendly. The "Automagic Premium" app currently costs EUR 2.90.
  2254. <br>
  2255. Any information retrievable by Automagic can be displayed in FHEM by this module. Just define your own Automagic-"flow" and send the data to the AMADCommBridge. One even can control several actions on Android devices.
  2256. <br>
  2257. To be able to make use of all these functions the Automagic app and additional flows need to be installed on the Android device. The flows can be retrieved from the FHEM directory, the app can be bought in Google Play Store.
  2258. <br><br>
  2259. <b>How to use AMADDevice?</b>
  2260. <ul>
  2261. <li>first, make sure that the AMADCommBridge in FHEM was defined</li>
  2262. <li>install the "Automagic Premium" app from the PlayStore</li>
  2263. <li>install the flowset 74_AMADDeviceautomagicFlowset$VERSION.xml file from the $INSTALLFHEM/FHEM/lib/ directory on the Android device</li>
  2264. <li>activate the "installation assistant" Flow in Automagic. If one now sends Automagic into the background, e.g. Homebutton, the assistant starts and creates automatically a FHEM device for the android device</li>
  2265. </ul>
  2266. <br><br>
  2267. <u><b>Define a AMADDevice device by hand.</b></u>
  2268. <br><br>
  2269. <a name="AMADDevicedefine"></a>
  2270. <b>Define</b>
  2271. <ul><br>
  2272. 10.6.9.10 1496497380000 IODev=AMADBridge
  2273. <code>define &lt;name&gt; AMADDevice &lt;IP-ADRESSE&gt; &lt;AMAD_ID&gt; IODev=&lt;IODEVICE&gt;</code>
  2274. <br><br>
  2275. Example:
  2276. <ul><br>
  2277. <code>define WandTabletWohnzimmer AMADDevice 192.168.0.23 123456 IODev=NAME_des_AMADCommBridge_Devices</code><br>
  2278. </ul>
  2279. <br>
  2280. In this case, an AMADDevice is created by hand. The AMAD_ID, here 123456, must also be entered exactly as a global variable in Automagic.
  2281. </ul>
  2282. <br><br><br>
  2283. <a name="AMADDevicereadings"></a>
  2284. <b>Readings</b>
  2285. <ul>
  2286. <li>airplanemode - on/off, state of the aeroplane mode</li>
  2287. <li>androidVersion - currently installed version of Android</li>
  2288. <li>automagicState - state of the Automagic App <b>(prerequisite Android >4.3). In case you have Android >4.3 and the reading says "not supported", you need to enable Automagic inside Android / Settings / Sound & notification / Notification access</b></li>
  2289. <li>batteryHealth - the health of the battery (1=unknown, 2=good, 3=overheat, 4=dead, 5=over voltage, 6=unspecified failure, 7=cold)</li>
  2290. <li>batterytemperature - the temperature of the battery</li>
  2291. <li>bluetooth - on/off, bluetooth state</li>
  2292. <li>checkActiveTask - state of an app (needs to be defined beforehand). 0=not active or not active in foreground, 1=active in foreground, <b>see note below</b></li>
  2293. <li>connectedBTdevices - list of all devices connected via bluetooth</li>
  2294. <li>connectedBTdevicesMAC - list of MAC addresses of all devices connected via bluetooth</li>
  2295. <li>currentMusicAlbum - currently playing album of mediaplayer</li>
  2296. <li>currentMusicApp - currently playing player app (Amazon Music, Google Play Music, Google Play Video, Spotify, YouTube, TuneIn Player, Aldi Life Music)</li>
  2297. <li>currentMusicArtist - currently playing artist of mediaplayer</li>
  2298. <li>currentMusicIcon - cover of currently play album<b>Noch nicht fertig implementiert</b></li>
  2299. <li>currentMusicState - state of currently/last used mediaplayer</li>
  2300. <li>currentMusicTrack - currently playing song title of mediaplayer</li>
  2301. <li>daydream - on/off, daydream currently active</li>
  2302. <li>deviceState - state of Android devices. unknown, online, offline.</li>
  2303. <li>doNotDisturb - state of do not Disturb Mode</li>
  2304. <li>dockingState - undocked/docked, Android device in docking station</li>
  2305. <li>flow_SetCommands - active/inactive, state of SetCommands flow</li>
  2306. <li>flow_informations - active/inactive, state of Informations flow</li>
  2307. <li>flowsetVersionAtDevice - currently installed version of the flowsets on the Android device</li>
  2308. <li>incomingCallerName - Callername from last Call</li>
  2309. <li>incomingCallerNumber - Callernumber from last Call</li>
  2310. <li>incommingWhatsAppMessageFrom - last WhatsApp message</li>
  2311. <li>incommingWhatsTelegramMessageFrom - last telegram message</li>
  2312. <li>intentRadioName - name of the most-recent streamed intent radio</li>
  2313. <li>intentRadioState - state of intent radio player</li>
  2314. <li>keyguardSet - 0/1 keyguard set, 0=no 1=yes, does not indicate whether it is currently active</li>
  2315. <li>lastSetCommandError - last error message of a set command</li>
  2316. <li>lastSetCommandState - last state of a set command, command send successful/command send unsuccessful</li>
  2317. <li>lastStatusRequestError - last error message of a statusRequest command</li>
  2318. <li>lastStatusRequestState - ast state of a statusRequest command, command send successful/command send unsuccessful</li>
  2319. <li>nextAlarmDay - currently set day of alarm</li>
  2320. <li>nextAlarmState - alert/done, current state of "Clock" stock-app</li>
  2321. <li>nextAlarmTime - currently set time of alarm</li>
  2322. <li>nfc - state of nfc service on/off</li>
  2323. <li>nfcLastTagID - nfc_id of last scan nfc Tag / In order for the ID to be recognized correctly, the trigger NFC TagIDs must be processed in Flow NFC Tag Support and the TagId's Commase-separated must be entered.</li>
  2324. <li>powerLevel - state of battery in %</li>
  2325. <li>powerPlugged - 0=no/1,2=yes, power supply connected</li>
  2326. <li>screen - on locked,unlocked/off locked,unlocked, state of display</li>
  2327. <li>screenBrightness - 0-255, level of screen-brightness</li>
  2328. <li>screenFullscreen - on/off, full screen mode</li>
  2329. <li>screenOrientation - Landscape/Portrait, screen orientation (horizontal,vertical)</li>
  2330. <li>screenOrientationMode - auto/manual, mode for screen orientation</li>
  2331. <li>state - current state of AMAD device</li>
  2332. <li>userFlowState - current state of a Flow, established under setUserFlowState Attribut</li>
  2333. <li>volume - media volume setting</li>
  2334. <li>volumeNotification - notification volume setting</li>
  2335. <li>wiredHeadsetPlugged - 0/1 headset plugged out or in</li>
  2336. <br>
  2337. Prerequisite for using the reading checkActivTask the package name of the application to be checked needs to be defined in the attribute <i>checkActiveTask</i>. Example: <i>attr Nexus10Wohnzimmer
  2338. checkActiveTask com.android.chrome</i> f&uuml;r den Chrome Browser.
  2339. <br><br>
  2340. </ul>
  2341. <br><br>
  2342. <a name="AMADDeviceset"></a>
  2343. <b>Set</b>
  2344. <ul>
  2345. <li>activateVoiceInput - start voice input on Android device</li>
  2346. <li>bluetooth - on/off, switch bluetooth on/off</li>
  2347. <li>clearNotificationBar - All/Automagic, deletes all or only Automagic notifications in status bar</li>
  2348. <li>closeCall - hang up a running call</li>
  2349. <li>currentFlowsetUpdate - start flowset update on Android device</li>
  2350. <li>installFlowSource - install a Automagic flow on device, <u>XML file must be stored in /tmp/ with extension xml</u>. <b>Example:</b> <i>set TabletWohnzimmer installFlowSource WlanUebwerwachen.xml</i></li>
  2351. <li>doNotDisturb - sets the do not Disturb Mode, always Disturb, never Disturb, alarmClockOnly alarm Clock only, onlyImportant only important Disturbs</li>
  2352. <li>mediaAmazonMusic - play/stop/next/back , controlling the amazon music media player</li>
  2353. <li>mediaGoogleMusic - play/stop/next/back , controlling the google play music media player</li>
  2354. <li>mediaSpotifyMusic - play/stop/next/back , controlling the spotify media player</li>
  2355. <li>mediaTuneinRadio - play/stop/next/back , controlling the TuneinRadio media player</li>
  2356. <li>mediaAldiMusic - play/stop/next/back , controlling the Aldi music media player</li>
  2357. <li>mediaAudible - play/stop/next/back , controlling the Audible media player</li>
  2358. <li>mediaYouTube - play/stop/next/back , controlling the YouTube media player</li>
  2359. <li>mediaVlcPlayer - play/stop/next/back , controlling the VLC media player</li>
  2360. <li>nextAlarmTime - sets the alarm time. Only valid for the next 24 hours.</li>
  2361. <li>notifySndFile - plays a media-file <b>which by default needs to be stored in the folder "/storage/emulated/0/Notifications/" of the Android device. You may use the attribute setNotifySndFilePath for defining a different folder.</b></li>
  2362. <li>openCall - initial a call and hang up after optional time / set DEVICE openCall 0176354 10 call this number and hang up after 10s</li>
  2363. <li>screenBrightness - 0-255, set screen brighness</li>
  2364. <li>screenMsg - display message on screen of Android device</li>
  2365. <li>sendintent - send intent string <u>Example:</u><i> set $AMADDEVICE sendIntent org.smblott.intentradio.PLAY url http://stream.klassikradio.de/live/mp3-192/stream.klassikradio.de/play.m3u name Klassikradio</i>, first parameter contains the action, second parameter contains the extra. At most two extras can be used.</li>
  2366. <li>sendSMS - Sends an SMS to a specific phone number. Bsp.: sendSMS Dies ist ein Test|555487263</li>
  2367. <li>startDaydream - start Daydream</li>
  2368. <li>statusRequest - Get a new status report of Android device. Not all readings can be updated using a statusRequest as some readings are only updated if the value of the reading changes.</li>
  2369. <li>timer - set a countdown timer in the "Clock" stock app. Only minutes are allowed as parameter.</li>
  2370. <li>ttsMsg - send a message which will be played as voice message (to change laguage temporary set first character &en; or &de;)</li>
  2371. <li>userFlowState - set Flow/s active or inactive,<b><i>set Nexus7Wohnzimmer Badezimmer:inactive vorheizen</i> or <i>set Nexus7Wohnzimmer Badezimmer vorheizen,Nachtlicht Steven:inactive</i></b></li>
  2372. <li>userFlowRun - executes the specified flow</li>
  2373. <li>vibrate - vibrate Android device</li>
  2374. <li>volume - set media volume. Works on internal speaker or, if connected, bluetooth speaker or speaker connected via stereo jack</li>
  2375. <li>volumeNotification - set notifications volume</li>
  2376. </ul>
  2377. <br>
  2378. <b>Set (depending on attribute values)</b>
  2379. <ul>
  2380. <li>changetoBtDevice - switch to another bluetooth device. <b>Attribute setBluetoothDevice needs to be set. See note below!</b></li>
  2381. <li>nfc - activate or deactivate the nfc Modul on/off. <b>attribute root</b></li>
  2382. <li>openApp - start an app. <b>attribute setOpenApp</b></li>
  2383. <li>openURL - opens a URLS in the standard browser as long as no other browser is set by the <b>attribute setOpenUrlBrowser</b>.<b>Example:</b><i> attr Tablet setOpenUrlBrowser de.ozerov.fully|de.ozerov.fully.MainActivity, first parameter: package name, second parameter: Class Name</i></li>
  2384. <li>screen - on/off/lock/unlock, switch screen on/off or lock/unlock screen. In Automagic "Preferences" the "Device admin functions" need to be enabled, otherwise "Screen off" does not work. <b>attribute setScreenOnForTimer</b> changes the time the display remains switched on!</li>
  2385. <li>screenFullscreen - on/off, activates/deactivates full screen mode. <b>attribute setFullscreen</b></li>
  2386. <li>screenLock - Locks screen with request for PIN. <b>attribute setScreenlockPIN - enter PIN here. Only use numbers, 4-16 numbers required.</b></li>
  2387. <li>screenOrientation - Auto,Landscape,Portait, set screen orientation (automatic, horizontal, vertical). <b>attribute setScreenOrientation</b></li>
  2388. <li>system - issue system command (only with rooted Android devices). reboot,shutdown,airplanemodeON (can only be switched ON) <b>attribute root</b>, in Automagic "Preferences" "Root functions" need to be enabled.</li>
  2389. <li>setAPSSID - set WLAN AccesPoint SSID to prevent WLAN sleeps</li>
  2390. <li>setNotifySndFilePath - set systempath to notifyfile (default /storage/emulated/0/Notifications/</li>
  2391. <li>setTtsMsgSpeed - set speaking speed for TTS (Value between 0.5 - 4.0, 0.5 Step) default is 1.0</li>
  2392. <li>setTtsMsgLang - set speaking language for TTS, de or en (default is de)</li>
  2393. <li>setTtsMsgVol - is set, change automatically the media audio end set it back</li>
  2394. <br>
  2395. To be able to use "openApp" the corresponding attribute "setOpenApp" needs to contain the app package name.
  2396. <br><br>
  2397. To be able to switch between bluetooth devices the attribute "setBluetoothDevice" needs to contain (a list of) bluetooth devices defined as follows: <b>attr &lt;DEVICE&gt; BTdeviceName1|MAC,BTDeviceName2|MAC</b> No spaces are allowed in any BTdeviceName. Defining MAC please make sure to use the character : (colon) after each second digit/character.<br>
  2398. Example: <i>attr Nexus10Wohnzimmer setBluetoothDevice Logitech_BT_Adapter|AB:12:CD:34:EF:32,Anker_A3565|GH:56:IJ:78:KL:76</i>
  2399. </ul>
  2400. <br><br>
  2401. <a name="AMADDevicestate"></a>
  2402. <b>state</b>
  2403. <ul>
  2404. <li>initialized - shown after initial define.</li>
  2405. <li>active - device is active.</li>
  2406. <li>disabled - device is disabled by the attribute "disable".</li>
  2407. </ul>
  2408. <br><br><br>
  2409. <u><b>Further examples and reading:</b></u>
  2410. <ul><br>
  2411. <a href="http://www.fhemwiki.de/wiki/AMAD#Anwendungsbeispiele">Wiki page for AMAD (german only)</a>
  2412. </ul>
  2413. <br><br><br>
  2414. </ul>
  2415. <a name="Alarm"></a>
  2416. <h3>Alarm</h3>
  2417. <p> FHEM module to set up a house alarm system with 8 different alarm levels</p>
  2418. <a name="Alarmusage"></a>
  2419. <h4>Usage</h4>
  2420. See <a href="http://www.fhemwiki.de/wiki/Modul_Alarm">German Wiki page</a>
  2421. <a name="Alarmdefine"></a>
  2422. <br/>
  2423. <h4>Define</h4>
  2424. <p>
  2425. <code>define &lt;name&gt; Alarm</code>
  2426. <br />Defines the Alarm system. </p>
  2427. <a name="Alarmset"></a>
  2428. <h4>Set</h4>
  2429. <ul>
  2430. <li><a name="alarm_cancel">
  2431. <code>set &lt;name&gt; canceled &lt;level&gt;</code>
  2432. </a>
  2433. <br />cancels an alarm of level &lt;level&gt;, where &lt;level&gt; = 0..7 </li>
  2434. <li><a name="alarm_arm">
  2435. <code>set &lt;name&gt; armed &lt;level&gt;</code><br />
  2436. <code>set &lt;name&gt; disarmed &lt;level&gt;</code>
  2437. </a>
  2438. <br />sets the alarm of level &lt;level&gt; to armed (i.e., active) or disarmed
  2439. (i.e., inactive), where &lt;level&gt; = 0..7 </li>
  2440. <li><a name="alarm_lock">
  2441. <code>set &lt;name&gt; locked</code><br />
  2442. <code>set &lt;name&gt; unlocked</code>
  2443. </a>
  2444. <br />sets the lockstate of the alarm module to <i>locked</i> (i.e., alarm setups
  2445. may not be changed) resp. <i>unlocked</i> (i.e., alarm setups may be changed>)</li>
  2446. </ul>
  2447. <a name="Alarmget"></a>
  2448. <h4>Get</h4>
  2449. <ul>
  2450. <li><a name="alarm_version"></a>
  2451. <code>get &lt;name&gt; version</code>
  2452. <br />Display the version of the module</li>
  2453. </ul>
  2454. <a name="Alarmattr"></a>
  2455. <h4>Attributes</h4>
  2456. <ul>
  2457. <li><a name="alarm_hiddenroom"><code>attr &lt;name&gt; hiddenroom
  2458. &lt;string&gt;</code></a>
  2459. <br />Room name for hidden alarm room (containing only the Alarm device), default:
  2460. AlarmRoom</li>
  2461. <li><a name="alarm_publicroom"><code>attr &lt;name&gt; publicroom
  2462. &lt;string&gt;</code></a>
  2463. <br />Room name for public alarm room (containing sensor/actor devices), default:
  2464. Alarm</li>
  2465. <li><a name="alarm_lockstate"><code>attr &lt;name&gt; lockstate
  2466. locked|unlocked</code></a>
  2467. <br /><i>locked</i> means that alarm setups may not be changed, <i>unlocked</i>
  2468. means that alarm setups may be changed></li>
  2469. <li><a name="alarm_testbutton"><code>attr &lt;name&gt; testbutton 0|1</code></a>
  2470. <br /><i>1</i> means that a test button is displayed for every actor field</li>
  2471. <li><a name="alarm_statedisplay"><code>attr &lt;name&gt; statedisplay
  2472. simple,color,table,none</code></a>
  2473. <br />defines how the state of all eight alarm levels is shown. Example for the case
  2474. when alarm no. 0 is disarmed and only alarm no. 2 is raised: <ul>
  2475. <li> simple = -OXOOOOO</li>
  2476. <li> color = <span style="color:lightgray"> 0 </span><span style="font-weight:bold;color:green">1 <span style="font-weight:bold;color:red"
  2477. >2</span> 3 4 5 6 7</span></li>
  2478. <li> table = HTML mini table with lightgray, green and red fields for alarms
  2479. </li>
  2480. <li> none = no state display</li>
  2481. </ul>
  2482. </li>
  2483. <li><a name="alarm_armdelay"><code>attr &lt;name&gt; armdelay <i>mm:ss</i></code></a>
  2484. <br />time until the arming of an alarm becomes operative (0:00 - 9:59 allowed)</li>
  2485. <li><a name="alarm_armwait"><code>attr &lt;name&gt; armwait <i>action</i></code></a>
  2486. <br />FHEM action to be carried out immediately after the arm event</li>
  2487. <li><a name="alarm_armact"><code>attr &lt;name&gt; armact <i>action</i></code></a>
  2488. <br />FHEM action to be carried out at the arme event after the delay time </li>
  2489. <li><a name="alarm_disarmact"><code>attr &lt;name&gt; disarmact <i>action</i></code></a>
  2490. <br />FHEM action to be carried out on the disarming of an alarm</li>
  2491. <li><a name="alarm_cancelact"><code>attr &lt;name&gt; cancelact <i>action</i></code></a>
  2492. <br />FHEM action to be carried out on the canceling of an alarm</li>
  2493. <li><a name="alarm_internals"></a>For each of the 8 alarm levels, several attributes
  2494. hold the alarm setup. They should not be changed by hand, but through the web
  2495. interface to avoid confusion: <code>level&lt;level&gt;start, level&lt;level&gt;end,
  2496. level&lt;level&gt;msg, level&lt;level&gt;xec, level&lt;level&gt;onact,
  2497. level&lt;level&gt;offact</code></li>
  2498. <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
  2499. href="#event-on-update-reading">event-on-update-reading</a>, <a
  2500. href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
  2501. >room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
  2502. <a href="#webCmd">webCmd</a></li>
  2503. </ul>
  2504. <a name="Aqicn"></a>
  2505. <h3>Air Quality Index</h3>
  2506. <ul>
  2507. This modul fetch Air Quality data from http://aqicn.org.
  2508. <br><br>
  2509. <a name="Aqicndefine"></a>
  2510. <b>Define</b>
  2511. <ul><br>
  2512. <code>define &lt;name&gt; Aqicn</code>
  2513. <br><br>
  2514. Example:
  2515. <ul><br>
  2516. <code>define aqicnMaster Aqicn</code><br>
  2517. </ul>
  2518. <br>
  2519. This statement creates the Aqicn Master Device.<br>
  2520. After the device has been created, you can search Aqicn Station by city name and create automatically the station device.
  2521. </ul>
  2522. <br><br>
  2523. <a name="Aqicnreadings"></a>
  2524. <b>Readings</b>
  2525. <ul>
  2526. <li>APL - Air Pollution Level</li>
  2527. <li>AQI - Air Quality Index (AQI) of the dominant pollutant in city. Values are converted from µg/m³ to AQI level using US EPA standards. For more detailed information: https://en.wikipedia.org/wiki/Air_quality_index and https://www.airnow.gov/index.cfm?action=aqi_brochure.index. </li>
  2528. <li>CO-AQI - AQI of CO (carbon monoxide). An AQI of 100 for carbon monoxide corresponds to a level of 9 parts per million (averaged over 8 hours).</li>
  2529. <li>NO2-AQI - AQI of NO2 (nitrogen dioxide). See also https://www.airnow.gov/index.cfm?action=pubs.aqiguidenox</li>
  2530. <li>PM10-AQI - AQI of PM10 (respirable particulate matter). For particles up to 10 micrometers in diameter: An AQI of 100 corresponds to 150 micrograms per cubic meter (averaged over 24 hours).</li>
  2531. <li>PM2.5-AQI - AQI of PM2.5 (fine particulate matter). For particles up to 2.5 micrometers in diameter: An AQI of 100 corresponds to 35 micrograms per cubic meter (averaged over 24 hours).</li>
  2532. <li>O3-AQI - AQI of O3 (ozone). An AQI of 100 for ozone corresponds to an ozone level of 0.075 parts per million (averaged over 8 hours). See also https://www.airnow.gov/index.cfm?action=pubs.aqiguideozone</li>
  2533. <li>SO2-AQI - AQI of SO2 (sulfur dioxide). An AQI of 100 for sulfur dioxide corresponds to a level of 75 parts per billion (averaged over one hour).</li>
  2534. <li>temperature - Temperature in degrees Celsius</li>
  2535. <li>pressure - Atmospheric pressure in hectopascals (hPa)</li>
  2536. <li>humidity - Relative humidity in percent</li>
  2537. <li>state- Current AQI and air pollution level</li>
  2538. <li>status - condition of the data</li>
  2539. <li>pubDate- Local time of publishing the data</li>
  2540. <li>pubUnixTime - Unix time stamp of local time but converted wrongly, if local time is e.g. 1300 GMT+1, the time stamp shows 1300 UTC.</li>
  2541. <li>pubTimezone - Time zone of the city (UTC)</li>
  2542. <li>windspeed - Wind speed in kilometer per hour</li>
  2543. <li>windDirection - Wind direction</li>
  2544. <li>dominatPoll - Dominant pollutant in city</li>
  2545. <li>dewpoint - Dew in degrees Celsius</li>
  2546. <li>healthImplications - Information about Health Implications</li>
  2547. <li>htmlStyle - can be used to format the STATE and FHEMWEB (Example: stateFormate htmlStyle</li>
  2548. </ul>
  2549. <br>
  2550. <a name="Aqicnget"></a>
  2551. <b>get</b>
  2552. <ul>
  2553. <li>stationSearchByCity - search station by city name and open the result in seperate popup window</li>
  2554. <li>update - fetch new data every x times</li>
  2555. </ul>
  2556. <br>
  2557. <a name="Aqicnattribute"></a>
  2558. <b>Attribute</b>
  2559. <ul>
  2560. <li>interval - interval in seconds for automatically fetch data (default 3600)</li>
  2561. </ul>
  2562. </ul>
  2563. <a name="ArduCounter"></a>
  2564. <h3>ArduCounter</h3>
  2565. <ul>
  2566. This module implements an Interface to an Arduino based counter for pulses on any input pin of an Arduino Uno, Nano or similar device like a Jeenode. The typical use case is an S0-Interface on an energy meter<br>
  2567. Counters are configured with attributes that define which Arduino pins should count pulses and in which intervals the Arduino board should report the current counts.<br>
  2568. The Arduino sketch that works with this module uses pin change interrupts so it can efficiently count pulses on all available input pins.
  2569. <br><br>
  2570. <b>Prerequisites</b>
  2571. <ul>
  2572. <br>
  2573. <li>
  2574. This module requires an Arduino uno, nano, Jeenode or similar device running the ArduCounter sketch provided with this module<br>
  2575. In order to flash an arduino board with the corresponding ArduCounter firmware, avrdude needs to be installed.
  2576. </li>
  2577. </ul>
  2578. <br>
  2579. <a name="ArduCounterdefine"></a>
  2580. <b>Define</b>
  2581. <ul>
  2582. <br>
  2583. <code>define &lt;name&gt; ArduCounter &lt;device&gt;</code>
  2584. <br>
  2585. &lt;device&gt; specifies the serial port to communicate with the Arduino.<br>
  2586. The name of the serial-device depends on your distribution.
  2587. You can also specify a baudrate if the device name contains the @
  2588. character, e.g.: /dev/ttyUSB0@38400<br>
  2589. The default baudrate of the ArduCounter firmware is 38400 since Version 1.4
  2590. <br>
  2591. Example:<br>
  2592. <br>
  2593. <ul><code>define AC ArduCounter /dev/ttyUSB2@38400</code></ul>
  2594. </ul>
  2595. <br>
  2596. <a name="ArduCounterconfiguration"></a>
  2597. <b>Configuration of ArduCounter counters</b><br><br>
  2598. <ul>
  2599. Specify the pins where impulses should be counted e.g. as <code>attr AC pinX falling pullup 30</code> <br>
  2600. The X in pinX can be an Arduino pin number with or without the letter D e.g. pin4, pinD5, pin6, pinD7 ...<br>
  2601. After the pin you can define if rising or falling edges of the signals should be counted. The optional keyword pullup activates the pullup resistor for the given Arduino Pin.
  2602. The last argument is also optional and specifies a minimal pulse length in milliseconds. In this case the first argument (e.g. falling) means that an impulse starts with a falling edge from 1 to 0 and ends when the signal changes back from 0 to 1.
  2603. <br><br>
  2604. Example:<br>
  2605. <pre>
  2606. define AC ArduCounter /dev/ttyUSB2
  2607. attr AC factor 1000
  2608. attr AC interval 60 300
  2609. attr AC pinD4 falling pullup
  2610. attr AC pinD5 falling pullup 30
  2611. attr AC pinD6 rising
  2612. </pre>
  2613. this defines three counters connected to the pins D4, D5 and D5. <br>
  2614. D4 and D5 have their pullup resistors activated and the impulse draws the pins to zero. <br>
  2615. For D4 every falling edge of the signal (when the input changes from 1 to 0) is counted.<br>
  2616. For D5 the arduino measures the time in milliseconds between the falling edge and the rising edge. If this time is longer than the specified 30 milliseconds then the impulse is counted. If the time is shorter then this impulse is regarded as noise and added to a separate reject counter.<br>
  2617. For pin D6 the ardiono counts every time when the signal changes from 0 to 1. <br>
  2618. The ArduCounter sketch which must be loaded on the Arduino implements this using pin change interrupts,
  2619. so all avilable input pins can be used, not only the ones that support normal interrupts.
  2620. </ul>
  2621. <br>
  2622. <a name="ArduCounterset"></a>
  2623. <b>Set-Commands</b><br>
  2624. <ul>
  2625. <li><b>raw</b></li>
  2626. send the value to the Arduino board so you can directly talk to the sketch using its commands.<br>
  2627. This is not needed for normal operation but might be useful sometimes for debugging<br>
  2628. <li><b>flash</b></li>
  2629. flashes the ArduCounter firmware ArduCounter.hex from the fhem subdirectory FHEM/firmware
  2630. onto the device. This command needs avrdude to be installed. The attribute flashCommand specidies how avrdude is called. If it is not modifed then the module sets it to avrdude -p atmega328P -c arduino -P [PORT] -D -U flash:w:[HEXFILE] 2>[LOGFILE]<br>
  2631. This setting should work for a standard installation and the placeholders are automatically replaced when
  2632. the command is used. So normally there is no need to modify this attribute.<br>
  2633. Depending on your specific Arduino board however, you might need to insert <code>-b 57600</code> in the flash Command.<br>
  2634. <br>
  2635. <li><b>reset</b></li>
  2636. reopens the arduino device and sends a command to it which causes a reinitialize and reset of the counters. Then the module resends the attribute configuration / definition of the pins to the device.
  2637. </ul>
  2638. <br>
  2639. <a name="ArduCounterget"></a>
  2640. <b>Get-Commands</b><br>
  2641. <ul>
  2642. <li><b>info</b></li>
  2643. send a command to the Arduino board to get current counts.<br>
  2644. This is not needed for normal operation but might be useful sometimes for debugging<br>
  2645. </ul>
  2646. <br>
  2647. <a name="ArduCounterattr"></a>
  2648. <b>Attributes</b><br><br>
  2649. <ul>
  2650. <li><a href="#do_not_notify">do_not_notify</a></li>
  2651. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  2652. <br>
  2653. <li><b>pin.*</b></li>
  2654. Define a pin of the Arduino board as input. This attribute expects either
  2655. <code>rising</code>, <code>falling</code> or <code>change</code>, followed by an optional <code>pullup</code> and an optional number as value.<br>
  2656. If a number is specified, the arduino will track rising and falling edges of each impulse and measure the length of a pulse in milliseconds. The number specified here is the minimal length of a pulse and a pause before a pulse. If one is too small, the pulse is not counted but added to a separate reject counter.
  2657. <li><b>interval</b> normal max min mincout</li>
  2658. Defines the parameters that affect the way counting and reporting works.
  2659. This Attribute expects at least two and a maximum of four numbers as value. The first is the normal interval, the second the maximal interval, the third is a minimal interval and the fourth is a minimal pulse count.
  2660. In the usual operation mode (when the normal interval is smaller than the maximum interval),
  2661. the Arduino board just counts and remembers the time between the first impulse and the last impulse for each pin.<br>
  2662. After the normal interval is elapsed the Arduino board reports the count and time for those pins where impulses were encountered.<br>
  2663. This means that even though the normal interval might be 10 seconds, the reported time difference can be
  2664. something different because it observed impulses as starting and ending point.<br>
  2665. The Power (e.g. for energy meters) is the calculated based of the counted impulses and the time between the first and the last impulse. <br>
  2666. For the next interval, the starting time will be the time of the last impulse in the previous
  2667. reporting period and the time difference will be taken up to the last impulse before the reporting
  2668. interval has elapsed.
  2669. <br><br>
  2670. The second, third and fourth numbers (maximum, minimal interval and minimal count) exist for the special case when the pulse frequency is very low and the reporting time is comparatively short.<br>
  2671. For example if the normal interval (first number) is 60 seconds and the device counts only one impulse in 90 seconds, the the calculated power reading will jump up and down and will give ugly numbers.
  2672. By adjusting the other numbers of this attribute this can be avoided.<br>
  2673. In case in the normal interval the observed impulses are encountered in a time difference that is smaller than the third number (minimal interval) or if the number of impulses counted is smaller than the
  2674. fourth number (minimal count) then the reporting is delayed until the maximum interval has elapsed or the above conditions have changed after another normal interval.<br>
  2675. This way the counter will report a higher number of pulses counted and a larger time difference back to fhem.
  2676. <br><br>
  2677. If this is seems too complicated and you prefer a simple and constant reporting interval, then you can set the normal interval and the mximum interval to the same number. This changes the operation mode of the counter to just count during this normal and maximum interval and report the count. In this case the reported time difference is always the reporting interval and not the measured time between the real impulses.
  2678. <li><b>factor</b></li>
  2679. Define a multiplicator for calculating the power from the impulse count and the time between the first and the last impulse
  2680. <li><b>readingNameCount[0-9]+</b></li>
  2681. Change the name of the counter reading pinX to something more meaningful.
  2682. <li><b>readingNameLongCount[0-9]+</b></li>
  2683. Change the name of the long counter reading longX (only created when verboseReadingsX is set to 1) to something more meaningful.
  2684. <li><b>readingNamePower[0-9]+</b></li>
  2685. Change the name of the power reading powerX to something more meaningful.
  2686. <li><b>readingFactor[0-9]+</b></li>
  2687. Override the factor attribute for this individual pin.
  2688. <li><b>readingStartTime[0-9]+</b></li>
  2689. Allow the reading time stamp to be set to the beginning of measuring intervals
  2690. <li><b>verboseReadings[0-9]+</b></li>
  2691. create readings timeDiff, countDiff and lastMsg for each pin
  2692. </ul>
  2693. <br>
  2694. <b>Readings / Events</b><br>
  2695. <ul>
  2696. The module creates at least the following readings and events for each defined pin:
  2697. <li><b>pin.*</b></li>
  2698. the current count at this pin
  2699. <li><b>power.*</b></li>
  2700. the current calculated power at this pin
  2701. Most reading names can be customized with attribues and many more readings can be generated by setting the attribute verboseReadings[0-9]+ to 1.<br>
  2702. This includes the "long count" reading which keeps on counting up after fhem restarts whereas the pin.* count is only a temporary internal count that starts at 0 when the arduino board starts.
  2703. </ul>
  2704. <br>
  2705. </ul>
  2706. <a name="Astro"></a>
  2707. <h3>Astro</h3>
  2708. <p> FHEM module with a collection of various routines for astronomical data</p>
  2709. <a name="Astrodefine"></a>
  2710. <h4>Define</h4>
  2711. <p>
  2712. <code>define &lt;name&gt; Astro</code>
  2713. <br />Defines the Astro device (only one is needed per FHEM installation). </p>
  2714. <p>
  2715. Readings with prefix <i>Sun</i> refer to the sun, with prefix <i>Moon</i> refer to the moon.
  2716. The suffixes for these readings are
  2717. <ul>
  2718. <li><i>Age</i> = angle (in degrees) of body along its track</li>
  2719. <li><i>Az,Alt</i> = azimuth and altitude angle (in degrees) of body above horizon</li>
  2720. <li><i>Dec,Ra</i> = declination (in degrees) and right ascension (in HH:MM) of body position</li>
  2721. <li><i>Lat,Lon</i> = latitude and longituds (in degrees) of body position</li>
  2722. <li><i>Diameter</i> = virtual diameter (in arc minutes) of body</li>
  2723. <li><i>Distance,DistanceObserver</i> = distance (in km) of body to center of earth or to observer</li>
  2724. <li><i>PhaseN,PhaseS</i> = Numerical and string value for phase of body</li>
  2725. <li><i>Sign</i> = Circadian sign for body along its track</li>
  2726. <li><i>Rise,Transit,Set</i> = times (in HH:MM) for rise and set as well as for highest position of body</li>
  2727. </ul>
  2728. <p>
  2729. Readings with prefix <i>Obs</i> refer to the observer.
  2730. In addition to some of the suffixes gives above, the following may occur
  2731. <ul>
  2732. <li><i>Date,Dayofyear</i> = date</li>
  2733. <li><i>JD</i> = Julian date</li>
  2734. <li><i>Season,SeasonN</i> = String and numerical (0..3) value of season</li>
  2735. <li><i>Time,Timezone</i> obvious meaning</li>
  2736. <li><i>GMST,ÖMST</i> = Greenwich and Local Mean Sidereal Time (in HH:MM)</li>
  2737. </ul>
  2738. <p>
  2739. An SVG image of the current moon phase may be obtained under the link
  2740. <code>&lt;ip address of fhem&gt;/fhem/Astro_moonwidget?name='&lt;device name&gt;'&amp;size='&lt;width&gt;x&lt;height&gt;'</code>
  2741. <p>
  2742. Notes: <ul>
  2743. <li>Calculations are only valid between the years 1900 and 2100</li>
  2744. <li>Attention: Timezone is taken from the local Perl settings, NOT automatically defined for a location</li>
  2745. <li>This module uses the global attribute <code>language</code> to determine its output data<br/>
  2746. (default: EN=english). For German output set <code>attr global language DE</code>.</li>
  2747. <li>The time zone is determined automatically from the local settings of the <br/>
  2748. operating system. If geocordinates from a different time zone are used, the results are<br/>
  2749. not corrected automatically.
  2750. <li>Some definitions determining the observer position are used<br/>
  2751. from the global device, i.e.<br/>
  2752. <code>attr global longitude &lt;value&gt;</code><br/>
  2753. <code>attr global latitude &lt;value&gt;</code><br/>
  2754. <code>attr global altitude &lt;value&gt;</code> (in m above sea level)<br/>
  2755. These definitions are only used when there are no corresponding local attribute settings.
  2756. </li>
  2757. <li>
  2758. It is not necessary to define an Astro device to use the data provided by this module<br/>
  2759. To use its data in any other module, you just need to put <code>require "95_Astro.pm";</code> <br/>
  2760. at the start of your own code, and then may call, for example, the function<br/>
  2761. <code>Astro_Get( SOME_HASH_REFERENCE,"dummy","text", "SunRise","2019-12-24");</code><br/>
  2762. to acquire the sunrise on Christmas Eve 2019</li>
  2763. </ul>
  2764. <a name="Astroget"></a>
  2765. <h4>Get</h4>
  2766. Attention: Get-calls are NOT written into the readings of the device ! Readings change only through periodic updates !<br/>
  2767. </li>
  2768. <ul>
  2769. <li><a name="astro_json"></a>
  2770. <code>get &lt;name&gt; json [&lt;reading&gt;]</code><br/>
  2771. <code>get &lt;name&gt; json [&lt;reading&gt;] YYYY-MM-DD</code><br/>
  2772. <code>get &lt;name&gt; json [&lt;reading&gt;] YYYY-MM-DD HH:MM:[SS]</code>
  2773. <br />returns the complete set or an individual reading of astronomical data either for the current time, or for a day and time given in the argument.</li>
  2774. <li><a name="astro_text"></a>
  2775. <code>get &lt;name&gt; text [&lt;reading&gt;]</code><br/>
  2776. <code>get &lt;name&gt; text [&lt;reading&gt;] YYYY-MM-DD</code><br/>
  2777. <code>get &lt;name&gt; text [&lt;reading&gt;] YYYY-MM-DD HH:MM:[SS]</code>
  2778. <br />returns the complete set or an individual reading of astronomical data either for the current time, or for a day and time given in the argument.</li>
  2779. <li><a name="astro_version"></a>
  2780. <code>get &lt;name&gt; version</code>
  2781. <br />Display the version of the module</li>
  2782. </ul>
  2783. <a name="Astroattr"></a>
  2784. <h4>Attributes</h4>
  2785. <ul>
  2786. <li><a name="astro_interval">
  2787. <code>&lt;interval&gt;</code>
  2788. <br />Update interval in seconds. The default is 3600 seconds, a value of 0 disables the automatic update. </li>
  2789. <li>Some definitions determining the observer position:<br/>
  2790. <code>attr &lt;name&gt; longitude &lt;value&gt;</code><br/>
  2791. <code>attr &lt;name&gt; latitude &lt;value&gt;</code><br/>
  2792. <code>attr &lt;name&gt; altitude &lt;value&gt;</code> (in m above sea level)<br/>
  2793. <code>attr &lt;name&gt; horizon &lt;value&gt;</code> custom horizon angle in degrees, default 0<br/>
  2794. These definitions take precedence over global attribute settings.
  2795. </li>
  2796. <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
  2797. href="#event-on-update-reading">event-on-update-reading</a>, <a
  2798. href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
  2799. >room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
  2800. <a href="#webCmd">webCmd</a></li>
  2801. </ul>
  2802. <a name="Aurora"></a>
  2803. <h3>Aurora</h3>
  2804. <ul>
  2805. <br>
  2806. <a name="Aurora_Define"></a>
  2807. <b>Define</b>
  2808. <ul>
  2809. <code>define &lt;name&gt; Aurora &lt;ip&gt; [&lt;interval&gt;]</code><br>
  2810. <br>
  2811. Defines a device connected to a <a href="#Aurora">Aurora</a>.<br><br>
  2812. The device status will be updated every &lt;interval&gt; seconds. 0 means no updates.
  2813. Groups are updated only on definition and statusRequest<br><br>
  2814. Examples:
  2815. <ul>
  2816. <code>define aurora Aurora 10.0.1.xxx 10</code><br>
  2817. </ul>
  2818. </ul><br>
  2819. <a name="Aurora_Readings"></a>
  2820. <b>Readings</b>
  2821. <ul>
  2822. <li>bri<br>
  2823. the brightness reported from the device. the value can be betwen 1 and 254</li>
  2824. <li>colormode<br>
  2825. the current colormode</li>
  2826. <li>ct<br>
  2827. the colortemperature in mireds and kelvin</li>
  2828. <li>hue<br>
  2829. the current hue</li>
  2830. <li>pct<br>
  2831. the current brightness in percent</li>
  2832. <li>onoff<br>
  2833. the current on/off state as 0 or 1</li>
  2834. <li>sat<br>
  2835. the current saturation</li>
  2836. <li>state<br>
  2837. the current state</li>
  2838. <br>
  2839. Notes:
  2840. <ul>
  2841. <li>with current bridge firware versions groups have <code>all_on</code> and <code>any_on</code> readings,
  2842. with older firmware versions groups have no readings.</li>
  2843. <li>not all readings show the actual device state. all readings not related to the current colormode have to be ignored.</li>
  2844. <li>the actual state of a device controlled by a living colors or living whites remote can be different and will
  2845. be updated after some time.</li>
  2846. </ul><br>
  2847. </ul><br>
  2848. <a name="Aurora_Set"></a>
  2849. <b>Set</b>
  2850. <ul>
  2851. <li>on [&lt;ramp-time&gt;]</li>
  2852. <li>off [&lt;ramp-time&gt;]</li>
  2853. <li>toggle [&lt;ramp-time&gt;]</li>
  2854. <li>statusRequest<br>
  2855. Request device status update.</li>
  2856. <li>pct &lt;value&gt; [&lt;ramp-time&gt;]<br>
  2857. dim to &lt;value&gt;<br>
  2858. Note: the FS20 compatible dimXX% commands are also accepted.</li>
  2859. <li>color &lt;value&gt;<br>
  2860. set colortemperature to &lt;value&gt; kelvin.</li>
  2861. <li>bri &lt;value&gt; [&lt;ramp-time&gt;]<br>
  2862. set brighness to &lt;value&gt;; range is 0-254.</li>
  2863. <li>dimUp [delta]</li>
  2864. <li>dimDown [delta]</li>
  2865. <li>ct &lt;value&gt; [&lt;ramp-time&gt;]<br>
  2866. set colortemperature to &lt;value&gt; in mireds (range is 154-500) or kelvin (rankge is 2000-6493).</li>
  2867. <li>ctUp [delta]</li>
  2868. <li>ctDown [delta]</li>
  2869. <li>hue &lt;value&gt; [&lt;ramp-time&gt;]<br>
  2870. set hue to &lt;value&gt;; range is 0-65535.</li>
  2871. <li>humUp [delta]</li>
  2872. <li>humDown [delta]</li>
  2873. <li>sat &lt;value&gt; [&lt;ramp-time&gt;]<br>
  2874. set saturation to &lt;value&gt;; range is 0-254.</li>
  2875. <li>satUp [delta]</li>
  2876. <li>satDown [delta]</li>
  2877. <li>effect &lt;name&gt;</li>
  2878. <li>rgb &lt;rrggbb&gt;<br>
  2879. set the color to (the nearest equivalent of) &lt;rrggbb&gt;</li>
  2880. <br>
  2881. <li><a href="#setExtensions"> set extensions</a> are supported.</li>
  2882. <br>
  2883. Note:
  2884. <ul>
  2885. <li>&lt;ramp-time&gt; is given in seconds</li>
  2886. <li>multiple paramters can be set at once separated by <code>:</code><br>
  2887. Examples:<br>
  2888. <code>set LC on : transitiontime 100</code><br>
  2889. <code>set bulb on : bri 100 : color 4000</code><br></li>
  2890. </ul>
  2891. </ul><br>
  2892. <a name="Aurora_Get"></a>
  2893. <b>Get</b>
  2894. <ul>
  2895. <li>rgb</li>
  2896. <li>RGB</li>
  2897. <li>devStateIcon<br>
  2898. returns html code that can be used to create an icon that represents the device color in the room overview.</li>
  2899. </ul><br>
  2900. <a name="Aurora_Attr"></a>
  2901. <b>Attributes</b>
  2902. <ul>
  2903. <li>color-icon<br>
  2904. 1 -> use lamp color as icon color and 100% shape as icon shape<br>
  2905. 2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
  2906. <li>transitiontime<br>
  2907. default transitiontime for all set commands if not specified directly in the set.</li>
  2908. <li>delayedUpdate<br>
  2909. 1 -> the update of the device status after a set command will be delayed for 1 second. usefull if multiple devices will be switched.
  2910. </li>
  2911. <li>devStateIcon<br>
  2912. will be initialized to <code>{(Aurora_devStateIcon($name),"toggle")}</code> to show device color as default in room overview.</li>
  2913. <li>webCmd<br>
  2914. will be initialized to a device specific value</li>
  2915. </ul>
  2916. </ul><br>
  2917. <a name="BDKM"></a>
  2918. <h3>BDKM</h3>
  2919. <ul>
  2920. BDKM is a module supporting Buderus Logamatic KM gateways similar
  2921. to the <a href="#km200">km200</a> module. For installation of the
  2922. gateway see fhem km200 internet wiki<br>
  2923. Compared with the km200 module the code of the BDKM module is more
  2924. compact and has some extra features. It has the ablility to
  2925. define how often a gateway ID is polled, which FHEM reading
  2926. (alias) is generated for a gateway ID and which minimum difference
  2927. to the last reading must exist to generate a new reading (see
  2928. attributes).<br>
  2929. It determines value ranges, allowed values and writeability from
  2930. the gateway supporting FHEMWEB and readingsGroup when setting
  2931. Values (drop down value menues).<br>
  2932. On definition of a BDKM device the gateway is connected and a full
  2933. poll collecting all IDs is done. This takes about 20 to 30
  2934. seconds. After that the module knows all IDs reported
  2935. by the gateway. To examine these IDs just type:<BR>
  2936. <code>get myBDKM INFO</code><BR>
  2937. These IDs can be used with the PollIds attribute to define if and
  2938. how the IDs are read during the poll cycle. <br> All IDs can be
  2939. mapped to own short readings.
  2940. <br><br>
  2941. <a name="BDKMdefine"></a>
  2942. <b>Define</b>
  2943. <ul>
  2944. <code>define &lt;name&gt; BDKM &lt;IP-address|hostname&gt; &lt;GatewayPassword&gt;
  2945. &lt;PrivatePassword&gt; &lt;MD5-Salt&gt;</code><br>
  2946. or <br>
  2947. <code>define &lt;name&gt; BDKM &lt;IP-address|hostname&gt; &lt;AES-Key&gt;</code><br>
  2948. <br><br>
  2949. <code>&lt;name&gt;</code> :
  2950. Name of device<br>
  2951. <code>&lt;IP-address&gt;</code> :
  2952. The IP adress of your Buderus gateway<br>
  2953. <code>&lt;GatewayPassword&gt;</code> :
  2954. The gateway password as printed on case of the gateway s.th.
  2955. of the form: xxxx-xxxx-xxxx-xxxx<br>
  2956. <code>&lt;PrivatePassword&gt;</code> : The private password as
  2957. set with the buderus App<br>
  2958. <code>&lt;MD5-Salt&gt;</code> : MD5 salt for the crypt
  2959. algorithm you want to use (hex string like 867845e9.....). Have a look for km200 salt 86 ... <br>
  2960. AES-Key can be generated here:<br>
  2961. https://ssl-account.com/km200.andreashahn.info<br>
  2962. <br>
  2963. </ul>
  2964. <a name="BDKMset"></a>
  2965. <b>Set </b>
  2966. <ul>
  2967. <code>set &lt;name&gt; &lt;ID&gt; &lt;value&gt; ...</code>
  2968. <br><br>
  2969. where <code>ID</code> is a valid writeable gateway ID (See list command,
  2970. or "<code>get myBDKM INFO</code>")<br>
  2971. The set command first reads the the ID from the gateway and also
  2972. triggers a FHEM readings if necessary. After that it is checked if the
  2973. value is valid. Then the ID and value(s) are transfered to to the
  2974. gateway. After waiting (attr ReadBackDelay milliseconds) the value
  2975. is read back and checked against value to be set. If necessary again
  2976. a FHEM reading may be triggered. The read back value or an error is
  2977. returned by the command. <br>
  2978. Examples:
  2979. <ul>
  2980. <code>set myBDKM /heatingCircuits/hc1/temporaryRoomSetpoint 22.0</code><br>
  2981. or the aliased version of it (if
  2982. /heatingCircuits/hc1/temporaryRoomSetpointee is aliased to
  2983. RoomTemporaryDesiredTemp):<br>
  2984. <code>set myBDKM RoomTemporaryDesiredTemp 22.0</code><br>
  2985. special to set time of gateway to the hosts date:<br>
  2986. <code>set myBDKM /gateway/DateTime now</code><br>
  2987. aliased:<br>
  2988. <code>set myBDKM DateTime now</code><br>
  2989. </ul>
  2990. <br>
  2991. </ul>
  2992. <br>
  2993. <a name="BDKMget"></a>
  2994. <b>Get </b>
  2995. <ul>
  2996. <code>get &lt;name&gt; &lt;ID&gt; &lt;[raw|json]&gt;...</code><br><br>
  2997. where <code>ID</code> is a valid gateway ID or an alias to it.
  2998. (See list command)<br> The get command reads the the ID from the
  2999. gateway, triggeres readings if necessarry, and returns the value
  3000. or an error if s.th. went wrong. While polling is done
  3001. asychronously with a non blocking HTTP GET. The set and get
  3002. functions use a blocking HTTP GET/POST to be able to return a
  3003. value directly to the user. Normaly get and set are only used by
  3004. command line or when setting values via web interface.<br>
  3005. With the <code>raw</code> option the whole original decoded data of the
  3006. ID (as read from the gateway) is returned as a string.<br> With
  3007. the <code>json</code> option a perl hash reference pointing to the
  3008. JSON data is returned (take a look into the module if you want to
  3009. use that)<br>
  3010. <br>
  3011. Examples:
  3012. <ul>
  3013. <code>get myBDKM /heatingCircuits/hc1/temporaryRoomGetpoint</code><br>
  3014. or the aliased version of it (see attr below):<br>
  3015. <code>get myBDKM RoomTemporaryDesiredTemp</code><br>
  3016. <code>get myBDKM DateTime</code><br>
  3017. <code>get myBDKM /gateway/instAccess</code><br>
  3018. Spacial to get Infos about IDs known by the gateway and own
  3019. configurations:<BR>
  3020. <code>get myBDKM INFO</code><br>
  3021. Everything matching /temp/
  3022. <code>get myBDKM INFO temp</code><br>
  3023. Everything matching /Heaven/ or /Hell/
  3024. <code>get myBDKM INFO Heaven Hell</code><br>
  3025. Everything known:
  3026. <code>get myBDKM INFO .*</code><br>
  3027. Arguments to <code>INFO</code> are reqular expressions
  3028. which are matched against all IDs and all aliases.
  3029. </ul>
  3030. <br>
  3031. </ul>
  3032. <br>
  3033. <a name="BDKMattr"></a>
  3034. <b>Attributes</b>
  3035. <ul>
  3036. <li>BaseInterval<br>
  3037. The interval time in seconds between poll cycles.
  3038. It defaults to 120 seconds. Which means that every 120 seconds a
  3039. new poll collects values of IDs which turn it is.
  3040. </li><br>
  3041. <li>InterPollDelay<br>
  3042. The delay time in milliseconds between reading of two IDs from
  3043. the gateway. It defaults to 0 (read as fast as possible).
  3044. Some gateways/heatings seem to stop answering after a while
  3045. when you are reading a lot of IDs. (verbose 2 "communication ERROR").
  3046. To avoid gateway hangups always try to read only as many IDs as
  3047. really required. If it doesn't help try to increase the
  3048. InterPollDelay value. E.g. start with 100.
  3049. </li><br>
  3050. <li>ReadBackDelay<br>
  3051. Read back delay for the set command in milliseconds. This value
  3052. defaults to 500 (0.5s). After setting a value, the gateway need
  3053. some time before the value can be read back. If this delay is
  3054. too short after writing you will get back the old value and not
  3055. the expected new one. The default should work in most cases.
  3056. </li><br>
  3057. <li>HttpTimeout<br>
  3058. Timeout for all HTTP requests in seconds (polling, set,
  3059. get). This defaults to 10s. If there is no answer from the
  3060. gateway for HttpTimeout time an error is returned. If a HTTP
  3061. request expires while polling an error log (level 2) is
  3062. generated and the request is automatically restarted after 60
  3063. seconds.
  3064. </li><br>
  3065. <li>PollIds<br>
  3066. Without this attribute FHEM readings are NOT generated
  3067. automatically! <br>
  3068. This attribute defines how and when IDs are polled within
  3069. a base interval (set by atrribute <code>BaseInterval</code>).<br>
  3070. The attribute contains list of space separated IDs and options
  3071. written as <br>
  3072. <code>GatewayID:Modulo:Delta:Alias</code>
  3073. <br>
  3074. Where Gateway is the real gateway ID like "/gateway/DateTime".<br>
  3075. Modulo is the value which defines how often the GatewayID is
  3076. polled from the gateway and checked for FHEM readings update.
  3077. E.g. a value of 4 means that the ID is polled only every 4th cycle.<br>
  3078. Delta defines the minimum difference a polled value must have to the
  3079. previous reading, before a FHEM reading with the new value is generated.<br>
  3080. Alias defines a short name for the GatewayID under which the gateway ID
  3081. can be accessed. Also readings (Logfile entries) are generated with this
  3082. short alias if set. If not set, the original ID is used.<br>
  3083. In detail:<br>
  3084. <code>ID:1:0:Alias</code> - poll every cycle, when difference >= 0 to previous reading (means always, also for strings) trigger FHEM reading to "Alias"<br>
  3085. <code>ID:1::Alias</code> - poll every cycle, no Delta set => trigger FHEM reading to "Alias" on value change only<br>
  3086. <code>ID:0::Alias</code> - update reading on startup once if reading changed (to the one prevously saved in fhem.save)<br>
  3087. <code>ID:1:0.5:Alias</code> - poll every cycle, when difference => 0.5 trigger a FHEM reading to "Alias"<br>
  3088. <code>ID:15::Alias</code> - poll every 15th cylce, update reading only if changed<br>
  3089. <code>ID:::Alias</code> - update reading on (get/set) only and only if value changed<br>
  3090. <code>ID::0:Alias</code> - update reading on (get/set) only and trigger reading always on get/set<br>
  3091. <code>ID</code> - without colons ":", poll every cycle, update reading allways (same as <code>ID:1:0:</code>)<br>
  3092. Also some usefull defaults can be set by the special keyword RC300DEFAULTS, RC35DEFAULTS, RC30DEFAULTS.<br>
  3093. As I don't know anything about RC35 or RC30 the later keywords are currently empty (please send me some info with "get myBDKM INFO" :-)<br>
  3094. Definitions set by the special keywords (see the module code for it) are overwritten by definitions later set in the attribute definition<br>
  3095. Example:
  3096. <ul>
  3097. <code>attr myBDKM PollIds \<br>
  3098. RC300DEFAULTS \<br>
  3099. /gateway/DateTime:0::Date \<br>
  3100. /system/info:0:0:\<br>
  3101. /dhwCircuits/dhw1/actualTemp:1:0.2:WaterTemp
  3102. </code><br>
  3103. </ul>
  3104. Which means: Use RC300DEFAULTS, trigger FHEM reading "Date" when date has changed on startup only. Trigger FHEM reading "/system/info" (no aliasing) always on startup, poll water temperature every cycle and trigger FHEM reading "WaterTemp" when difference to last reading was at least 0.2 degrees.
  3105. <br>
  3106. </li><br>
  3107. </ul>
  3108. </ul>
  3109. <a name="BOSEST"></a>
  3110. <h3>BOSEST</h3>
  3111. <ul>
  3112. BOSEST is used to control a BOSE SoundTouch system (one or more SoundTouch 10, 20 or 30 devices)<br><br>
  3113. <b>Note:</b> The followig libraries are required for this module:
  3114. <ul><li>libwww-perl</li> <li>libmojolicious-perl</li> <li>libxml-simple-perl</li> <li>libnet-bonjour-perl</li> <li>libev-perl</li><li>liburi-escape-xs-perl</li><li>sox</li><li>libsox-fmt-mp3</li><br>
  3115. Use <b>sudo apt-get install libwww-perl libmojolicious-perl libxml-simple-perl libnet-bonjour-perl libev-perl</b> to install this libraries.<br>Please note:
  3116. libmojolicious-perl must be >=5.54, but under wheezy is only 2.x avaible.<br>
  3117. Use <b>sudo apt-get install cpanminus</b> and <b>sudo cpanm Mojolicious</b> to update to the newest version<br>
  3118. TTS can be configured as described in the following thread: <a href=https://forum.fhem.de/index.php/topic,46838.0.html>Link</a><br>
  3119. <br>
  3120. Questions and/or feedback can be posted on the FHEM forum: <a https://forum.fhem.de/index.php/topic,46838.msg533050.html#new>Link</a><br>
  3121. </ul><br>
  3122. <a name="BOSESTdefine" id="BOSESTdefine"></a>
  3123. <b>Define</b>
  3124. <ul>
  3125. <code>define &lt;name&gt; BOSEST</code><br>
  3126. <br>
  3127. Example:
  3128. <ul>
  3129. <code>define bosesystem BOSEST</code><br>
  3130. Defines BOSE SoundTouch system. All devices/speakers will show up after 60s under "Unsorted" in FHEM.<br/>
  3131. </ul>
  3132. </ul>
  3133. <br>
  3134. <a name="BOSESTset" id="BOSESTset"></a>
  3135. <b>Set</b>
  3136. <ul>
  3137. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  3138. The following commands are defined for the devices/speakers (execpt <b>autoAddDLNAServers</b> is for the "main" BOSEST) :<br><br>
  3139. <ul><u>General commands</u>
  3140. <li><code><b>on</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; power on the device</li>
  3141. <li><code><b>off</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; turn the device off</li>
  3142. <li><code><b>power</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; toggle on/off</li>
  3143. <li><code><b>volume</b> [0...100] [+x|-x]</code> &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in percentage or change volume by ±x from current level</li>
  3144. <li><code><b>channel</b> 0...20</code> &nbsp;&nbsp;-&nbsp;&nbsp; select present to play</li>
  3145. <li><code><b>saveChannel</b> 07...20</code> &nbsp;&nbsp;-&nbsp;&nbsp; save current channel to channel 07 to 20</li>
  3146. <li><code><b>play</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; start/resume to play </li>
  3147. <li><code><b>pause</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; pause the playback</li>
  3148. <li><code><b>stop</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; stop playback</li>
  3149. <li><code><b>nextTrack</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; play next track</li>
  3150. <li><code><b>prevTrack</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; play previous track</li>
  3151. <li><code><b>mute</b> on|off|toggle</code> &nbsp;&nbsp;-&nbsp;&nbsp; control volume mute</li>
  3152. <li><code><b>shuffle</b> on|off</code> &nbsp;&nbsp;-&nbsp;&nbsp; control shuffle mode</li>
  3153. <li><code><b>repeat</b> all|one|off</code> &nbsp;&nbsp;-&nbsp;&nbsp; control repeat mode</li>
  3154. <li><code><b>bass</b> 0...10</code> &nbsp;&nbsp;-&nbsp;&nbsp; set the bass level</li>
  3155. <li><code><b>recent</b> 0...15</code> &nbsp;&nbsp;-&nbsp;&nbsp; set number of names in the recent list in readings</li>
  3156. <li><code><b>source</b> bluetooth,bt-discover,aux mode, airplay</code> &nbsp;&nbsp;-&nbsp;&nbsp; select a local source</li><br>
  3157. <li><code><b>addDLNAServer</b> Name1 [Name2] [Namex]</code> &nbsp;&nbsp;-&nbsp;&nbsp; add DLNA servers Name1 (and Name2 to Namex) to the BOSE library</li>
  3158. <li><code><b>removeDLNAServer</b> Name1 [Name2] [Namex]</code> &nbsp;&nbsp;-&nbsp;&nbsp; remove DLNA servers Name1 (and Name2 to Namex) to the BOSE library</li>
  3159. </ul><br>Example: <code>set BOSE_1234567890AB volume 25</code>&nbsp;&nbsp;Set volume on device with the name BOSE_1234567890AB <br><br><br>
  3160. <ul><u>Timer commands:</u>
  3161. <li><code><b>on-for-timer</b> 1...x</code> &nbsp;&nbsp;-&nbsp;&nbsp; power on the device for x seconds</li>
  3162. <li><code><b>off-for-timer</b> 1...x</code> &nbsp;&nbsp;-&nbsp;&nbsp; turn the device off and power on again after x seconds</li>
  3163. <li><code><b>on-till</b> hh:mm:ss</code> &nbsp;&nbsp;-&nbsp;&nbsp; power on the device until defined time</li>
  3164. <li><code><b>off-till</b> hh:mm:ss</code> &nbsp;&nbsp;-&nbsp;&nbsp; turn the device off and power on again at defined time</li>
  3165. <li><code><b>on-till-overneight</b> hh:mm:ss</code> &nbsp;&nbsp;-&nbsp;&nbsp; power on the device until defined time on the next day</li>
  3166. <li><code><b>off-till-overneight</b> hh:mm:ss</code> &nbsp;&nbsp;-&nbsp;&nbsp; turn the device off at defined time on the next day</li>
  3167. </ul><br>Example: <code>set BOSE_1234567890AB on-till 23:00:00</code>&nbsp;&nbsp;Switches device with the name BOSE_1234567890AB now on and at 23:00:00 off<br><br><br>
  3168. <ul><u>Multiroom commands:</u>
  3169. <li><code><b>createZone</b> deviceID</code> &nbsp;&nbsp;-&nbsp;&nbsp; create multiroom zone (defines <code>&lt;name&gt;</code> as zoneMaster) </li>
  3170. <li><code><b>addToZone</b> deviceID</code> &nbsp;&nbsp;-&nbsp;&nbsp; add device <code>&lt;name&gt;</code> to multiroom zone</li>
  3171. <li><code><b>removeFromZone</b> deviceID</code> &nbsp;&nbsp;-&nbsp;&nbsp; remove device <code>&lt;name&gt;</code> from multiroom zone</li>
  3172. <li><code><b>playEverywhere</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; play sound of device <code>&lt;name&gt;</code> on all others devices</li>
  3173. <li><code><b>stopPlayEverywhere</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; stop playing sound on all devices</li>
  3174. </ul><br>Example: <code>set BOSE_1234567890AB playEverywhere</code>&nbsp;&nbsp;Starts Multiroom with device with the name BOSE_1234567890AB as master <br><br><br>
  3175. <ul><u>TextToSpeach commands (needs Google Translate):</u>
  3176. <li><code><b>speak</b> "message" [0...100] [+x|-x] [en|de|xx]</code> &nbsp;&nbsp;-&nbsp;&nbsp; Text to speak, optional with volume adjustment and language to use. The message to speak may have up to 100 letters</li>
  3177. <li><code><b>speakOff</b> "message" [0...100] [+x|-x] [en|de|xx]</code> &nbsp;&nbsp;-&nbsp;&nbsp; Text to speak, optional with volume adjustment and language to use. The message to speak may have up to 100 letters. Device is switched off after speak</li>
  3178. <li><code><b>ttsVolume</b> [0...100] [+x|-x]</code> &nbsp;&nbsp;-&nbsp;&nbsp; set the TTS volume level in percentage or change volume by ±x from current level</li>
  3179. <li><code><b>ttsDirectory</b> "directory"</code> &nbsp;&nbsp;-&nbsp;&nbsp; set DLNA TTS directory. FHEM user needs permissions to write to that directory. </li>
  3180. <li><code><b>ttsLanguage </b> en|de|xx</code> &nbsp;&nbsp;-&nbsp;&nbsp; set default TTS language (default: en)</li>
  3181. <li><code><b>ttsSpeakOnError</b> 0|1</code> &nbsp;&nbsp;-&nbsp;&nbsp; 0=disable to speak "not available" text</li>
  3182. <li><code><b>autoAddDLNAServers</b> 0|1</code> &nbsp;&nbsp;-&nbsp;&nbsp; 1=automatically add all DLNA servers to BOSE library. This command is only for "main" BOSEST, not for devices/speakers!</li> <br>
  3183. </ul><br> Example: <code>set BOSE_1234567890AB speakOff "Music is going to switch off now. Good night." 30 en</code>&nbsp;&nbsp;Speaks message at volume 30 and then switches off device.<br><br> <br>
  3184. </ul><br>
  3185. <a name="BOSESTget" id="BOSESTget"></a>
  3186. <b>Get</b>
  3187. <ul>
  3188. <code>n/a</code>
  3189. </ul>
  3190. <br>
  3191. </ul>
  3192. <a name="BRAVIA"></a>
  3193. <h3>BRAVIA</h3>
  3194. <ul>
  3195. This module controls a Sony TV device over ethernet. Devices of series starting from 2011 are supported.
  3196. <br><br>
  3197. <b>Define</b>
  3198. <ul>
  3199. <code>define &lt;name&gt; BRAVIA &lt;ip-or-hostname&gt; [&lt;poll-interval&gt;]</code>
  3200. <br><br>
  3201. With definition of a BRAVIA device an internal task will be scheduled.
  3202. This task pulls frequently the status and other information from the TV.<br>
  3203. The intervall can be defined in seconds by an optional parameter &lt;poll-intervall&gt;.
  3204. The default value is 45 seconds.
  3205. <br><br>
  3206. After definition of a device using this module it has to be registered as a remote control
  3207. (<a href=#BRAVIAregister><code>set register</code></a>).
  3208. <br><br>
  3209. As long as readings are not among the usual AV readings they are clustered:
  3210. <table>
  3211. <tr><td>s_*</td><td>: status</td></tr>
  3212. <tr><td>ci_*</td><td>: content information</td></tr>
  3213. </table>
  3214. <br><br>
  3215. The module contains predefined layouts for <a href=#remotecontrol>remotecontrol</a> using PNG and SVG.
  3216. <br><br>
  3217. </ul>
  3218. <a name="BRAVIAset"></a>
  3219. <b>Set</b>
  3220. <ul>
  3221. <code>set &lt;name&gt; &lt;option&gt; &lt;value&gt;</code>
  3222. <br><br>
  3223. Options:
  3224. <ul>
  3225. <li><i>channel</i><br>
  3226. List of all known channels. The module collects all visited channels.
  3227. Channels can be loaded automtically with modells from 2013 and newer.
  3228. (number of channels, see <a href=#BRAVIAchannelsMax>channelsMax</a>).</li>
  3229. <li><i>channelDown</i><br>
  3230. Switches a channel back.</li>
  3231. <li><i>channelUp</i><br>
  3232. Switches a channel forward.</li>
  3233. <li><i>mute</i><br>
  3234. Set mute if <a href=#BRAVIAupnp>Upnp</a> is activated.</li>
  3235. <li><i>off</i><br>
  3236. Switches TV to off. State of device will have been set to "set_off" for 60 seconds or until off-status is pulled from TV.</li>
  3237. <li><a name="BRAVIAon"></a><i>on</i><br>
  3238. Switches TV to on, with modells from 2013 using WOL. State of device will have been set to "set_on" for 60 seconds or until on-status is pulled from TV.</li>
  3239. <li><i>pause</i><br>
  3240. Pauses a playing of a recording, of an internal App, etc.</li>
  3241. <li><i>play</i><br>
  3242. Starts playing of a recording, of an internal App, etc.</li>
  3243. <li><i>record</i><br>
  3244. Starts recording of current content.</li>
  3245. <li><a name="BRAVIAregister"></a><i>register</i><br>
  3246. One-time registration of Fhem as remote control in the TV.<br>
  3247. With <a href=#BRAVIArequestFormat>requestFormat</a> = "xml" registration works without parameter.<br>
  3248. With <a href=#BRAVIArequestFormat>requestFormat</a> = "json" registration has to be executed twice.<br>
  3249. The register option offers an additional input field:
  3250. <ol>
  3251. <li>Call with empty input. A PIN for registration has to be shown on the TV.</li>
  3252. <li>Insert PIN into input field and register again.</li></ol></li>
  3253. <li><a name="BRAVIArequestFormat"></a><i>requestFormat</i><br>
  3254. "xml" for xml based communication (modells from 2011 and 2012)<br>
  3255. "json" for communication with modells from 2013 and newer</li>
  3256. <li><i>remoteControl</i><br>
  3257. Sends command directly to TV.</li>
  3258. <li><i>statusRequest</i><br>
  3259. Retrieves current status information from TV.</li>
  3260. <li><i>stop</i><br>
  3261. Stops recording, playing of an internal App, etc.</li>
  3262. <li><i>toggle</i><br>
  3263. Toggles power status of TV.</li>
  3264. <li><i>tvpause</i><br>
  3265. Activates Timeshift mode.</li>
  3266. <li><a name="BRAVIAupnp"></a><i>upnp</i><br>
  3267. Activates Upnp service used to control volume.</li>
  3268. <li><i>volume</i><br>
  3269. Straight setting of volume. <a href=#BRAVIAupnp>Upnp</a> service has to be activated.</li>
  3270. <li><i>volumeDown</i><br>
  3271. Decreases volume.</li>
  3272. <li><i>volumeUp</i><br>
  3273. Increases volume.</li>
  3274. </ul>
  3275. </ul>
  3276. <br>
  3277. <a name="BRAVIAattr"></a>
  3278. <b>Attributes</b>
  3279. <ul>
  3280. <code>attr &lt;name&gt; &lt;attribute&gt; &lt;value&gt;</code>
  3281. <br><br>
  3282. Attributes:
  3283. <ul>
  3284. <li><a name="BRAVIAchannelsMax"></a><i>channelsMax</i><br>
  3285. Maximum amount of channels to be displayed, default is 50.</li>
  3286. <li><a name="BRAVIAmacaddr"></a><i>macaddr</i><br>
  3287. Enables power on of TV using WOL.</li>
  3288. </ul>
  3289. </ul>
  3290. </ul>
  3291. <a name="BS"></a>
  3292. <h3>BS</h3>
  3293. <ul>
  3294. The module BS allows to collect data from a brightness sensor through a
  3295. <a href="#FHZ">FHZ</a> device. For details on the brightness sensor see
  3296. <a href="http://www.busware.de/tiki-index.php?page=CPM-BS">busware wiki</a>.
  3297. You can have at most nine different brightness sensors in range of your
  3298. FHZ.<br>
  3299. <br>
  3300. The state contains the brightness in % (reading <code>brightness</code>) and
  3301. the brightness in lux (reading <code>lux</code>). The <code>flags</code>
  3302. reading is always zero. The meaning of these readings is explained in more
  3303. detail on the above mentioned wiki page.<br>
  3304. <br>
  3305. <a name="BSDefine"></a>
  3306. <b>Define</b>
  3307. <ul>
  3308. <code>define &lt;name&gt; BS &lt;sensor#&gt; [&lt;RExt&gt;]</code>
  3309. <br><br>
  3310. <code>&lt;sensor#&gt;</code> is the number of sensor in the brightness
  3311. sensor address system that runs from 1 to 9.<br>
  3312. <br>
  3313. <code>&lt;RExt&gt;</code> is the value of the resistor on your brightness
  3314. sensor in &Omega; (Ohm). The brightness reading in % is proportional to the resistance, the
  3315. lux reading is proportional to the resistance squared. The value is
  3316. optional. The default resistance is RExt= 50.000&Omega;.<br>
  3317. <br>
  3318. Example:<br>
  3319. <ul>
  3320. <code>define bs1 BS 1 40000</code><br>
  3321. </ul>
  3322. </ul>
  3323. <br>
  3324. <a name="BSset"></a>
  3325. <b>Set </b>
  3326. <ul>
  3327. N/A
  3328. </ul>
  3329. <br>
  3330. <a name="BSget"></a>
  3331. <b>Get</b>
  3332. <ul>
  3333. N/A
  3334. </ul>
  3335. <br>
  3336. <a name="BSattr"></a>
  3337. <b>Attributes</b>
  3338. <ul>
  3339. <li><a href="#do_not_notify">do_not_notify</a></li>
  3340. <li><a href="#showtime">showtime</a></li>
  3341. <li><a href="#model">model</a> (bs)</li>
  3342. <li><a href="#ignore">ignore</a></li>
  3343. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  3344. </ul>
  3345. <br>
  3346. </ul>
  3347. <a name="Broadlink"></a>
  3348. <h3>Broadlink</h3>
  3349. <ul>
  3350. <i>Broadlink</i> implements a connection to Broadlink devices - currently tested with Broadlink RM Pro, which is able to send IR and 433MHz commands. It is also able to record this commands.
  3351. <br>
  3352. It requires AES encryption please install on Windows:<br>
  3353. <code>ppm install Crypt-CBC</code><br>
  3354. <code>ppm install Crypt-OpenSSL-AES</code><br><br>
  3355. or Linux/Raspberry:
  3356. <code>sudo apt-get install libcrypt-cbc-perl</code><br>
  3357. <code>sudo apt-get install libcrypt-rijndael-perl</code><br>
  3358. <code>sudo cpan Crypt/OpenSSL/AES.pm</code><br>
  3359. <br><br>
  3360. <a name="Broadlinkdefine"></a>
  3361. <b>Define</b>
  3362. <ul>
  3363. <code>define &lt;name&gt; Broadlink &lt;ip/host&gt; &lt;mac&gt; &lt;type=rmpro or sp3&gt;</code>
  3364. <br><br>
  3365. Example: <code>define broadlinkWZ Broadlink 10.23.11.85 34:EA:34:F4:77:7B rmpro</code>
  3366. <br><br>
  3367. The <i>mac</i> of the device have to be set in format: xx:xx:xx:xx:xx<br>
  3368. The type is in current development state optional.
  3369. </ul>
  3370. <br>
  3371. <a name="Broadlinkset"></a>
  3372. <b>Set for rmpro</b><br>
  3373. <ul>
  3374. <li><code>set &lt;name&gt; &lt;commandSend&gt; &lt;command name&gt;</code>
  3375. <br><br>
  3376. Send a previous recorded command.
  3377. </li>
  3378. <li><code>set &lt;name&gt; recordNewCommand &lt;command name&gt;</code>
  3379. <br><br>
  3380. Records a new command. You have to specify a commandname
  3381. </li>
  3382. <li>
  3383. <code>set &lt;name&gt; remove &lt;command name&gt;</code>
  3384. <br><br>
  3385. Removes a recored command.
  3386. </li>
  3387. <li>
  3388. <code>set &lt;name&gt; rename &lt;old command name&gt; &lt;new command name&gt;</code>
  3389. <br><br>
  3390. Renames a recored command.
  3391. </li>
  3392. </ul>
  3393. <br>
  3394. <b>Set for sp3</b><br>
  3395. <ul>
  3396. <li><code>set &lt;name&gt; on</code>
  3397. <br><br>
  3398. Set the device on
  3399. </li>
  3400. <li><code>set &lt;name&gt; off</code>
  3401. <br><br>
  3402. Set the device off
  3403. </li>
  3404. <li><code>set &lt;name&gt; toggle</code>
  3405. <br><br>
  3406. Toggle the device on and off
  3407. </li>
  3408. <li><code>set &lt;name&gt; getStatus</code>
  3409. <br><br>
  3410. Get the device on/off status
  3411. </li>
  3412. </ul>
  3413. <br>
  3414. <a name="Broadlinkattr"></a>
  3415. <b>Attributes for all Broadlink Devices</b><br>
  3416. <ul>
  3417. <li><code>socket_timeout</code>
  3418. <br><br>
  3419. sets a timeout for the device communication
  3420. </li>
  3421. </ul>
  3422. <br>
  3423. </ul>
  3424. <a name="CALVIEW"></a>
  3425. <h3>CALVIEW</h3>
  3426. <ul>This module creates a device with deadlines based on calendar-devices of the 57_Calendar.pm module. You need to install the perl-modul Date::Parse!</ul>
  3427. <ul>Actually the module supports only the "get <> next" function of the CALENDAR-Modul.</ul>
  3428. <b>Define</b>
  3429. <ul><code>define &lt;Name&gt; CALVIEW &lt;calendarname(s) separate with ','&gt; &lt;next&gt; &lt;updateintervall in sec (default 43200)&gt;</code></ul>
  3430. <ul><code>define myView CALVIEW Googlecalendar next</code></ul>
  3431. <ul><code>define myView CALVIEW Googlecalendar,holiday next 900</code></ul>
  3432. <ul>- setting the update interval is not needed normally because every calendar update triggers a caview update</ul>
  3433. <a name="CALVIEW set"></a>
  3434. <b>Set</b>
  3435. <ul><code>set &lt;Name&gt; update</code></ul>
  3436. <ul><code>set myView update</code></ul>
  3437. <ul>this will manually update all readings from the given CALENDAR Devices</ul>
  3438. <b>Attribute</b>
  3439. <li>datestyle<br>
  3440. not set - the default, disables displaying readings bdatetimeiso / edatetimeiso<br>
  3441. ISO8601 - enables readings bdatetimeiso / edatetimeiso (start and end time of term ISO8601 formated like 2017-02-27T00:00:00)
  3442. </li><br>
  3443. <li>disable<br>
  3444. 0 / not set - internal notify function enabled (default) <br>
  3445. 1 - disable the internal notify-function of CALVIEW wich is triggered when one of the given CALENDAR devices has updated
  3446. </li><br>filterSummary
  3447. <li>filterSummary &lt;filtersouce&gt;:&lt;filtersummary&gt;[,&lt;filtersouce&gt;:&lt;filtersummary&gt;]<br>
  3448. not set - displays all terms (default .*:.*) <br>
  3449. &lt;filtersouce&gt;:&lt;filtersummary&gt;[,&lt;filtersouce&gt;:&lt;filtersummary&gt;] - CALVIEW will display term where summary matches the &lt;filtersouce&gt;:&lt;filtersummary&gt;, several filters must be separated by comma (,)
  3450. e.g.: filterSummary Kalender_Abfall:Leichtverpackungen,Kalender_Abfall:Bioabfall
  3451. filterSummary Kalender_Abfall:Leichtverpackungen,Kalender_Feiertage:.*,Kalender_Christian:.*,Kalender_Geburtstage:.*
  3452. </li><br>
  3453. <li>fulldaytext [text]<br>
  3454. this text will be displayed in _timeshort reading for fullday terms (default ganztägig)
  3455. </li><br>
  3456. <li>isbirthday<br>
  3457. 0 / not set - no age calculation (default) <br>
  3458. 1 - age calculation active. The module calculates the age with year given in description or location (see att yobfield).
  3459. </li><br>
  3460. <li>maxreadings<br>
  3461. defines the number of max term as readings
  3462. </li><br>
  3463. <li>modes<br>
  3464. here the CALENDAR modes can be selected , to be displayed in the view
  3465. </li><br>
  3466. <li>oldStyledReadings<br>
  3467. 0 the default style of readings <br>
  3468. 1 readings look like "2015.06.21-00:00" with value "Start of Summer"
  3469. </li><br>
  3470. <li>sourcecolor &lt;calendername&gt;:&lt;colorcode&gt;[,&lt;calendername&gt;:&lt;colorcode&gt;]<br>
  3471. here you can define the termcolor for terms from your calendars for the calview tabletui widget, several calendar:color pairs must be separated by comma
  3472. </li><br>
  3473. <li>timeshort<br>
  3474. 0 time in _timeshort readings formated 00:00:00 <br>
  3475. 1 time in _timeshort readings formated 00:00
  3476. </li><br>
  3477. <li>yobfield<br>
  3478. _description - (default) year of birth will be read from term description <br>
  3479. _location - year of birth will be read from term location <br>
  3480. _summary - year of birth will be read from summary (uses the first sequence of 4 digits in the string)
  3481. </li><br>
  3482. <li>weekdayformat<br>
  3483. formats the name of the reading weekdayname <br>
  3484. - de-long - (default) german, long name like Dienstag <br>
  3485. - de-short - german, short name like Di <br>
  3486. - en-long - english, long name like Tuesday <br>
  3487. - en-short - english, short name like Tue <br>
  3488. </li><br>
  3489. <a name="CM11"></a>
  3490. <h3>CM11</h3>
  3491. <ul>
  3492. Note: this module requires the Device::SerialPort or Win32::SerialPort module.
  3493. <br><br>
  3494. <a name="CM11define"></a>
  3495. <b>Define</b>
  3496. <ul>
  3497. <code>define &lt;name&gt; CM11 &lt;serial-device&gt;</code>
  3498. <br><br>
  3499. CM11 is the X10 module to interface X10 devices with the PC.<br><br>
  3500. The current implementation can evaluate incoming data on the powerline of
  3501. any kind. It can send on, off, dimdown and dimup commands.
  3502. <br><br>
  3503. The name of the serial-device depends on your distribution. If
  3504. serial-device is none, then no device will be opened, so you can experiment
  3505. without hardware attached.<br>
  3506. If you experience problems (for verbose 4 you get a lot of "Bad CRC message"
  3507. in the log), then try to define your device as <br>
  3508. <code>define &lt;name&gt; FHZ &lt;serial-device&gt; strangetty</code><br>
  3509. <br>
  3510. Example:
  3511. <ul>
  3512. <code>define x10if CM11 /dev/ttyUSB3</code><br>
  3513. </ul>
  3514. <br>
  3515. </ul>
  3516. <a name="CM11set"></a>
  3517. <b>Set</b>
  3518. <ul>
  3519. <code>set &lt;name&gt; reopen</code>
  3520. <br><br>
  3521. Reopens the serial port.
  3522. </ul>
  3523. <br>
  3524. <a name="CM11get"></a>
  3525. <b>Get</b>
  3526. <ul>
  3527. <code>get &lt;name&gt; fwrev</code>
  3528. <br><br>
  3529. Reads the firmware revision of the CM11 device. Returns <code>error</code>
  3530. if the serial connection to the device times out. Can be used for error
  3531. detection.
  3532. <br><br>
  3533. <code>get &lt;name&gt; time</code>
  3534. <br><br>
  3535. Reads the internal time of the device which is the total uptime (modulo one
  3536. year), since fhem sets the time to 0.00:00:00 if the device requests the time
  3537. to be set after being powered on. Returns <code>error</code>
  3538. if the serial connection to the device times out. Can be used for error
  3539. detection.
  3540. </ul>
  3541. <br>
  3542. <a name="CM11attr"></a>
  3543. <b>Attributes</b>
  3544. <ul>
  3545. <li><a href="#do_not_notify">do_not_notify</a></li>
  3546. <li><a href="#attrdummy">dummy</a></li>
  3547. <li><a href="#model">model</a> (CM11)</li>
  3548. </ul>
  3549. <br>
  3550. </ul>
  3551. <a name="CO20"></a>
  3552. <h3>CO20</h3>
  3553. <ul>
  3554. Module for measuring air quality with usb sticks based on the AppliedSensor iAQ-Engine sensor.
  3555. Products currently know to work are the VOLTCRAFT CO-20, the Sentinel Haus Institut RaumluftW&auml;chter
  3556. and the VELUX Raumluftf&uuml;hler.<br>
  3557. Probably works with all devices recognized as iAQ Stick (0x03eb:0x2013).<br><br>
  3558. Notes:
  3559. <ul>
  3560. <li>Device::USB hast to be installed on the FHEM host.<br>
  3561. It can be installed with '<code>cpan install Device::USB</code>'<br>
  3562. or on debian with '<code>sudo apt-get install libdevice-usb-perl'</code>'</li>
  3563. <li>FHEM has to have permissions to open the device. To configure this with udev
  3564. rules see here: <a href="https://code.google.com/p/usb-sensors-linux/wiki/Install_AirSensor_Linux">Install_AirSensor_Linux
  3565. usb-sensors-linux</a></li>
  3566. <li>Advanced features are only available after setting the attribute <i>advanced</i>.<br>
  3567. Almost all the hidden settings from the Windows application are implemented in this mode.<br>
  3568. Readout of values gathered in standalone mode is not possible yet.</li>
  3569. </ul><br>
  3570. <a name="CO20_Define"></a>
  3571. <b>Define</b>
  3572. <ul>
  3573. <code>define &lt;name&gt; CO20 [bus:device]</code><br>
  3574. <br>
  3575. Defines a CO20 device. bus:device hast to be used if more than one sensor is connected to the same host.<br><br>
  3576. Examples:
  3577. <ul>
  3578. <code>define CO20 CO20</code><br>
  3579. </ul>
  3580. </ul><br>
  3581. <a name="CO20_Readings"></a>
  3582. <b>Readings</b>
  3583. <ul>
  3584. <li>voc<br>
  3585. CO2 equivalents in ppm</li>
  3586. <li>debug<br>
  3587. debug value</li>
  3588. <li>pwm<br>
  3589. pwm value</li>
  3590. <li>r_h<br>
  3591. resistance of heating element in Ohm (?)</li>
  3592. <li>r_s<br>
  3593. resistance of sensor element in Ohm (?)</li>
  3594. </ul><br>
  3595. <a name="CO20_Get"></a>
  3596. <b>Get</b>
  3597. <ul>
  3598. <li>update / air_data<br>
  3599. trigger an update</li>
  3600. <li>flag_data<br>
  3601. get internal flag values</li>
  3602. <li>knob_data<br>
  3603. get internal knob values</li>
  3604. <li>stick_data<br>
  3605. get stick information</li>
  3606. </ul><br>
  3607. <a name="CO20_Set"></a>
  3608. <b>Set</b>
  3609. <ul>
  3610. <li>KNOB_CO2_VOC_level_warn1<br>
  3611. sets threshold for yellow led</li>
  3612. <li>KNOB_CO2_VOC_level_warn2<br>
  3613. sets threshold for red led</li>
  3614. <li>KNOB_Reg_Set<br>
  3615. internal value, affects voc reading</li>
  3616. <li>KNOB_Reg_P<br>
  3617. internal pid value</li>
  3618. <li>KNOB_Reg_I<br>
  3619. internal pid value</li>
  3620. <li>KNOB_Reg_D<br>
  3621. internal pid value</li>
  3622. <li>KNOB_LogInterval<br>
  3623. log interval for standalone mode</li>
  3624. <li>KNOB_ui16StartupBits<br>
  3625. set to 0 for no automatic calibration on startup</li>
  3626. <li>FLAG_WARMUP<br>
  3627. warmup time left in minutes</li>
  3628. <li>FLAG_BURN_IN<br>
  3629. burn in time left in minutes</li>
  3630. <li>FLAG_RESET_BASELINE<br>
  3631. reset voc baseline value</li>
  3632. <li>FLAG_CALIBRATE_HEATER<br>
  3633. trigger calibration / burn in</li>
  3634. <li>FLAG_LOGGING<br>
  3635. value count from external logging</li>
  3636. </ul><br>
  3637. <a name="CO20_Attr"></a>
  3638. <b>Attributes</b>
  3639. <ul>
  3640. <li>interval<br>
  3641. the interval in seconds used to read updates [10..]. the default ist 300.</li>
  3642. <li>retries<br>
  3643. number of retries on USB read/write failures [0..20]. the default is 3.</li>
  3644. <li>timeout<br>
  3645. the USB connection timeout in milliseconds [250..10000]. the default is 1000.</li>
  3646. <li>advanced<br>
  3647. 1 -> enables most of the advanced settings and readings described here</li>
  3648. <li>disable<br>
  3649. 1 -> disconnect and stop polling</li>
  3650. </ul>
  3651. </ul>
  3652. <a name="CUL"></a>
  3653. <h3>CUL</h3>
  3654. <ul>
  3655. <table>
  3656. <tr><td>
  3657. The CUL/CUN(O) is a family of RF devices sold by <a
  3658. href="http://www.busware.de">busware.de</a>.
  3659. With the opensource firmware
  3660. <a href="http://culfw.de/culfw.html">culfw</a> they are capable
  3661. to receive and send different 433/868 MHz protocols (FS20/FHT/S300/EM/HMS/MAX!).
  3662. It is even possible to use these devices as range extenders/routers, see the
  3663. <a href="#CUL_RFR">CUL_RFR</a> module for details.
  3664. <br> <br>
  3665. Some protocols (FS20, FHT and KS300) are converted by this module so that
  3666. the same logical device can be used, irrespective if the radio telegram is
  3667. received by a CUL or an FHZ device.<br>
  3668. Other protocols (S300/EM) need their
  3669. own modules. E.g. S300 devices are processed by the CUL_WS module if the
  3670. signals are received by the CUL, similarly EMWZ/EMGZ/EMEM is handled by the
  3671. CUL_EM module.<br><br>
  3672. It is possible to attach more than one device in order to get better
  3673. reception, FHEM will filter out duplicate messages.<br><br>
  3674. Note: This module may require the <code>Device::SerialPort</code> or
  3675. <code>Win32::SerialPort</code> module if you attach the device via USB
  3676. and the OS sets strange default parameters for serial devices.<br><br>
  3677. </td><td>
  3678. <img src="ccc.jpg"/>
  3679. </td></tr>
  3680. </table>
  3681. <a name="CULdefine"></a>
  3682. <b>Define</b>
  3683. <ul>
  3684. <code>define &lt;name&gt; CUL &lt;device&gt; &lt;FHTID&gt;</code> <br>
  3685. <br>
  3686. USB-connected devices (CUL/CUN):<br><ul>
  3687. &lt;device&gt; specifies the serial port to communicate with the CUL.
  3688. The name of the serial-device depends on your distribution, under
  3689. linux the cdc_acm kernel module is responsible, and usually a
  3690. /dev/ttyACM0 device will be created. If your distribution does not have a
  3691. cdc_acm module, you can force usbserial to handle the CUL by the
  3692. following command:
  3693. <ul><code>
  3694. modprobe usbserial vendor=0x03eb product=0x204b
  3695. </code></ul>
  3696. In this case the device is most probably /dev/ttyUSB0.<br><br>
  3697. You can also specify a baudrate if the device name contains the @
  3698. character, e.g.: /dev/ttyACM0@38400<br><br>
  3699. If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
  3700. perl module <code>Device::SerialPort</code> is not needed, and FHEM
  3701. opens the device with simple file io. This might work if the operating
  3702. system uses sane defaults for the serial parameters, e.g. some Linux
  3703. distributions and OSX.<br><br>
  3704. </ul>
  3705. Network-connected devices (CUN(O)):<br><ul>
  3706. &lt;device&gt; specifies the host:port of the device, e.g.
  3707. 192.168.0.244:2323
  3708. </ul>
  3709. <br>
  3710. If the device is called none, then no device will be opened, so you
  3711. can experiment without hardware attached.<br>
  3712. The FHTID is a 4 digit hex number, and it is used when the CUL talks to
  3713. FHT devices or when CUL requests data. Set it to 0000 to avoid answering
  3714. any FHT80b request by the CUL.
  3715. </ul>
  3716. <br>
  3717. <a name="CULset"></a>
  3718. <b>Set </b>
  3719. <ul>
  3720. <li>reopen<br>
  3721. Reopens the connection to the device and reinitializes it.
  3722. </li><br>
  3723. <li>raw<br>
  3724. Issue a CUL firmware command. See the <a
  3725. href="http://culfw.de/commandref.html">this</a> document
  3726. for details on CUL commands.
  3727. </li><br>
  3728. <li>freq / bWidth / rAmpl / sens<br>
  3729. <a href="#rfmode">SlowRF</a> mode only.<br>
  3730. Set the CUL frequency / bandwidth / receiver-amplitude / sensitivity<br>
  3731. Use it with care, it may destroy your hardware and it even may be
  3732. illegal to do so. Note: The parameters used for RFR transmission are
  3733. not affected.<br>
  3734. <ul>
  3735. <li>freq sets both the reception and transmission frequency. Note:
  3736. Although the CC1101 can be set to frequencies between 315 and 915
  3737. MHz, the antenna interface and the antenna of the CUL is tuned for
  3738. exactly one frequency. Default is 868.3 MHz (or 433 MHz)</li>
  3739. <li>bWidth can be set to values between 58 kHz and 812 kHz. Large values
  3740. are susceptible to interference, but make possible to receive
  3741. inaccurately calibrated transmitters. It affects tranmission too.
  3742. Default is 325 kHz.</li>
  3743. <li>rAmpl is receiver amplification, with values between 24 and 42 dB.
  3744. Bigger values allow reception of weak signals. Default is 42.
  3745. </li>
  3746. <li>sens is the decision boundary between the on and off values, and it
  3747. is 4, 8, 12 or 16 dB. Smaller values allow reception of less clear
  3748. signals. Default is 4 dB.</li>
  3749. </ul>
  3750. </li><br>
  3751. <a name="hmPairForSec"></a>
  3752. <li>hmPairForSec<br>
  3753. <a href="#rfmode">HomeMatic</a> mode only.<br>
  3754. Set the CUL in Pairing-Mode for the given seconds. Any HM device set into
  3755. pairing mode in this time will be paired with FHEM.
  3756. </li><br>
  3757. <a name="hmPairSerial"></a>
  3758. <li>hmPairSerial<br>
  3759. <a href="#rfmode">HomeMatic</a> mode only.<br>
  3760. Try to pair with the given device. The argument is a 10 character
  3761. string, usually starting with letters and ending with digits, printed on
  3762. the backside of the device. It is not necessary to put the given device
  3763. in learning mode if it is a receiver.
  3764. </li><br>
  3765. <a name="hmPairForSec"></a>
  3766. <li>led<br>
  3767. Set the CUL led off (00), on (01) or blinking (02).
  3768. </li><br>
  3769. <li>ITClock</br>
  3770. Set the IT clock for Intertechno V1 protocol. Default 250.
  3771. </li><br>
  3772. </ul>
  3773. <a name="CULget"></a>
  3774. <b>Get</b>
  3775. <ul>
  3776. <li>version<br>
  3777. returns the CUL firmware version
  3778. </li><br>
  3779. <li>uptime<br>
  3780. returns the CUL uptime (time since CUL reset)
  3781. </li><br>
  3782. <li>raw<br>
  3783. Issues a CUL firmware command, and waits for one line of data returned by
  3784. the CUL. See the CUL firmware README document for details on CUL
  3785. commands.
  3786. </li><br>
  3787. <li>fhtbuf<br>
  3788. CUL has a message buffer for the FHT. If the buffer is full, then newly
  3789. issued commands will be dropped, and an "EOB" message is issued to the
  3790. FHEM log.
  3791. <code>fhtbuf</code> returns the free memory in this buffer (in hex),
  3792. an empty buffer in the CUL V2 is 74 bytes, in CUL V3/CUN(O) 200 Bytes.
  3793. A message occupies 3 + 2x(number of FHT commands) bytes,
  3794. this is the second reason why sending multiple FHT commands with one
  3795. <a href="#set">set</a> is a good idea. The first reason is, that
  3796. these FHT commands are sent at once to the FHT.
  3797. </li> <br>
  3798. <li>ccconf<br>
  3799. Read some CUL radio-chip (cc1101) registers (frequency, bandwidth, etc.),
  3800. and display them in human readable form.
  3801. </li><br>
  3802. <li>cmds<br>
  3803. Depending on the firmware installed, CULs have a different set of
  3804. possible commands. Please refer to the README of the firmware of your
  3805. CUL to interpret the response of this command. See also the raw command.
  3806. </li><br>
  3807. <li>credit10ms<br>
  3808. One may send for a duration of credit10ms*10 ms before the send limit
  3809. is reached and a LOVF is generated.
  3810. </li><br>
  3811. </ul>
  3812. <a name="CULattr"></a>
  3813. <b>Attributes</b>
  3814. <ul>
  3815. <li><a name="addvaltrigger">addvaltrigger</a><br>
  3816. Create triggers for additional device values. Right now these are RSSI
  3817. and RAWMSG for the CUL family and RAWMSG for the FHZ.
  3818. </li><br>
  3819. <li><a name="connectCommand">connectCommand</a><br>
  3820. raw culfw command sent to the CUL after a (re-)connect of the USB device,
  3821. and sending the usual initialization needed for the configured rfmode.
  3822. </li>
  3823. <li><a href="#do_not_notify">do_not_notify</a></li>
  3824. <li><a href="#attrdummy">dummy</a></li>
  3825. <li><a name="hmId">hmId</a><br>
  3826. Set the HomeMatic ID of this device. If this attribute is absent, the
  3827. ID will be F1&lt;FHTID&gt;. Note 1: After setting or changing this
  3828. attribute you have to relearn all your HomeMatic devices. Note 2: The
  3829. value <b>must</b> be a 6 digit hex number, and 000000 is not valid. FHEM
  3830. won't complain if it is not correct, but the communication won't work.
  3831. </li><br>
  3832. <li><a name="hmProtocolEvents">hmProtocolEvents</a><br>
  3833. Generate events for HomeMatic protocol messages. These are normally
  3834. used for debugging, by activating "inform timer" in a telnet session,
  3835. or looking at the Event Monitor window in the FHEMWEB frontend.<br>
  3836. Example:
  3837. <ul>
  3838. <code>
  3839. 2012-05-17 09:44:22.515 CUL CULHM RCV L:0B N:81 CMD:A258 SRC:......
  3840. DST:...... 0000 (TYPE=88,WAKEMEUP,BIDI,RPTEN)
  3841. </code>
  3842. </ul>
  3843. </li><br>
  3844. <li><a name="longids">longids</a><br>
  3845. Comma separated list of device-types for CUL that should be handled
  3846. using long IDs. This additional ID allows it to differentiate some
  3847. weather sensors, if they are sending on the same channel.
  3848. Therefore a random generated id is added. If you choose to use longids,
  3849. then you'll have to define a different device after battery change.
  3850. Default is not to use long IDs.<br>
  3851. Modules which are using this functionality are for e.g. :
  3852. 14_Hideki, 41_OREGON, 14_CUL_TCM97001, 14_SD_WS07.<br>
  3853. Examples:<br>
  3854. <ul><code>
  3855. # Do not use any long IDs for any devices (this is default):<br>
  3856. attr cul longids 0<br>
  3857. # Use long IDs for all devices:<br>
  3858. attr cul longids 1<br>
  3859. # Use longids for SD_WS07 devices.<br>
  3860. # Will generate devices names like SD_WS07_TH_3 for channel 3.<br>
  3861. attr cul longids SD_WS07
  3862. </code></ul>
  3863. </li><br>
  3864. <li><a href="#model">model</a> (CUL,CUN,etc)</li>
  3865. <li><a name="sendpool">sendpool</a><br>
  3866. If using more than one CUL for covering a large area, sending
  3867. different events by the different CUL's might disturb each other. This
  3868. phenomenon is also known as the Palm-Beach-Resort effect.
  3869. Putting them in a common sendpool will serialize sending the events.
  3870. E.g. if you have three CUN's, you have to specify following
  3871. attributes:<br>
  3872. <code>attr CUN1 sendpool CUN1,CUN2,CUN3<br>
  3873. attr CUN2 sendpool CUN1,CUN2,CUN3<br>
  3874. attr CUN3 sendpool CUN1,CUN2,CUN3</code><br>
  3875. </li><br>
  3876. <li><a name="rfmode">rfmode</a><br>
  3877. Configure the RF Transceiver of the CUL (the CC1101). Available
  3878. arguments are:
  3879. <ul>
  3880. <li>SlowRF<br>
  3881. To communicate with FS20/FHT/HMS/EM1010/S300/Hoermann devices @1 kHz
  3882. datarate. This is the default.</li>
  3883. <li>HomeMatic<br>
  3884. To communicate with HomeMatic type of devices @10 kHz datarate.</li>
  3885. <li>MAX<br>
  3886. To communicate with MAX! type of devices @10 kHz datarate.</li>
  3887. <li>WMBus_S</li>
  3888. <li>WMBus_T<br>
  3889. To communicate with Wireless M-Bus devices like water, gas or
  3890. electrical meters. Wireless M-Bus uses two different communication
  3891. modes, S-Mode and T-Mode. While in this mode, no reception of other
  3892. protocols like SlowRF or HomeMatic is possible. See also the WMBUS
  3893. FHEM Module.
  3894. </li>
  3895. </ul>
  3896. </li><br>
  3897. <li><a href="#showtime">showtime</a></li>
  3898. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  3899. </ul>
  3900. <br>
  3901. </ul>
  3902. <a name="CUL_EM"></a>
  3903. <h3>CUL_EM</h3>
  3904. <ul>
  3905. The CUL_EM module interprets EM type of messages received by the CUL, notably
  3906. from EMEM, EMWZ or EMGZ devices.
  3907. <br><br>
  3908. <a name="CUL_EMdefine"></a>
  3909. <b>Define</b>
  3910. <ul>
  3911. <code>define &lt;name&gt; CUL_EM &lt;code&gt; [corr1 corr2
  3912. CostPerUnit BasicFeePerMonth]</code> <br>
  3913. <br>
  3914. &lt;code&gt; is the code which must be set on the EM device. Valid values
  3915. are 1 through 12. 1-4 denotes EMWZ, 5-8 EMEM and 9-12 EMGZ devices.<br><br>
  3916. <b>corr1</b> is used to correct the current number, <b>corr2</b>
  3917. for the total number.
  3918. <ul>
  3919. <li>for EMWZ devices you should specify the rotation speed (R/kW)
  3920. of your watt-meter (e.g. 150) for corr1 and 12 times this value for
  3921. corr2</li>
  3922. <li>for EMEM devices the corr1 value is 0.01, and the corr2 value is
  3923. 0.001 </li>
  3924. </ul>
  3925. <br>
  3926. <b>CostPerUnit</b> and <b>BasicFeePerMonth</b> are used to compute your
  3927. daily and monthly fees. Your COST will appear in the log, generated once
  3928. daily (without the basic fee) or month (with the bassic fee included). Your
  3929. definition should look like e.g.:
  3930. <ul><code>
  3931. define emwz 1 75 900 0.15 12.50<br>
  3932. </code></ul>
  3933. and the Log looks like:
  3934. <ul><code>
  3935. CUM_DAY: 6.849 CUM: 60123.4 COST: 1.02<br>
  3936. CUM_MONTH: 212.319 CUM: 60123.4 COST: 44.34<br>
  3937. </code></ul>
  3938. Tip: You can configure your EMWZ device to show in the CUM column of the
  3939. STATE reading the current reading of your meter. For this purpose: multiply
  3940. the current reading (from the real device) with the corr1 value (RperKW),
  3941. and subtract the RAW CUM value from it. Now set the basis reading of your
  3942. EMWZ device (named emwz) to this value.<br>
  3943. </ul>
  3944. <br>
  3945. <a name="CUL_EMset"></a>
  3946. <b>Set</b> <ul>N/A</ul><br>
  3947. <a name="CUL_EMget"></a>
  3948. <b>Get</b> <ul>N/A</ul><br>
  3949. <a name="CUL_EMattr"></a>
  3950. <b>Attributes</b>
  3951. <ul>
  3952. <li><a href="#ignore">ignore</a></li><br>
  3953. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  3954. <li><a href="#showtime">showtime</a></li><br>
  3955. <li><a href="#model">model</a> (EMEM,EMWZ,EMGZ)</li><br>
  3956. <li><a href="#IODev">IODev</a></li><br>
  3957. <li><a href="#eventMap">eventMap</a></li><br>
  3958. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  3959. <li><a name="maxPeak">maxPeak</a> &lt;number&gt;<br>
  3960. Specifies the maximum possible peak value for the EM meter
  3961. ("TOP:" value in logfile). Peak values greater than this value
  3962. are considered as EM read errors and are ignored.
  3963. For example if it's not possible to consume more than 40kW of
  3964. power set maxPeak to 40 to make the readings of the power meter
  3965. more robust.
  3966. </li><br>
  3967. <li><a name="CounterOffset">CounterOffset</a><br>
  3968. Specifies the difference between true (gas) meter value and
  3969. value reported by the EMGZ.<br>
  3970. CounterOffset = true Value - Reading "total"<br>
  3971. Example:
  3972. <ul>
  3973. <code>attr Gaszaehler CounterOffset 15427.434</code><br>
  3974. </ul>
  3975. </li>
  3976. </ul>
  3977. <br>
  3978. </ul>
  3979. <a name="CUL_FHTTK"></a>
  3980. <h3>CUL_FHTTK</h3>
  3981. <ul>
  3982. This module handles messages from the FHT80 TF "Fenster-T&uuml;r-Kontakt" (Window-Door-Contact)
  3983. which are normally only acted upon by the <a href="#FHT">FHT80B</a>. With this module,
  3984. FHT80 TFs are in a limited way (see <a href="http://fhz4linux.info/tiki-index.php?page=FHT+protocol">Wiki</a>
  3985. for detailed explanation of TF's mode of operation) usable similar to HMS100 TFK. The name
  3986. of the module was chosen as a) only CUL will spill out the datagrams and b) "TF" designates
  3987. usually temperature+humidity sensors (no clue, why ELV didn't label this one "TFK" like with
  3988. FS20 and HMS).<br><br>
  3989. As said before, FHEM can receive FHT80 TF radio (868.35 MHz) messages only through an
  3990. <a href="#CUL">CUL</a> device, so this must be defined first.
  3991. <br><br>
  3992. With the latest build on <a href="http://sourceforge.net/p/culfw/code/HEAD/tree/trunk/culfw/Devices/">SVN</a>
  3993. or next official version 1.62 or higher, it is possible to send out FHT80 TF data with a CUL or simular
  3994. devices. So it can be simulate up to four window sensor with one device
  3995. (see <a href="http://www.fhemwiki.de/wiki/CUL_FHTTK">FHEM Wiki</a>). To setup a window sensor, you have to
  3996. add and/or change the attribute "model" to dummy. The 6 digit hex number must not equal to FHTID.<br><br>
  3997. <a name="CUL_FHTTKdefine"></a>
  3998. <b>Define</b>
  3999. <ul>
  4000. <code>define &lt;name&gt; CUL_FHTTK &lt;devicecode&gt;</code>
  4001. <br><br>
  4002. <code>&lt;devicecode&gt;</code> is a six digit hex number, given to the FHT80 TF during
  4003. production, i. e. it is not changeable. (Yes, it keeps this code after changing batteries
  4004. as well.)<br>
  4005. Examples:
  4006. <ul>
  4007. <code>define TK_TEST CUL_FHTTK 965AB0</code>
  4008. </ul>
  4009. </ul>
  4010. <br>
  4011. <a name="CUL_FHTTKset"></a>
  4012. <b>Set</b>
  4013. <ul> Only available, if model is set to dummy.<br><br>
  4014. <code>set &lt;name&gt; &lt;value&gt;</code>
  4015. <br><br>
  4016. where <code>value</code> is one of:<br>
  4017. <ul><code>
  4018. Pair # start pairing with FHT80B (activate FHT80B sync mode before) - state after pairing is Closed<br>
  4019. Closed # set window state to Closed<br>
  4020. Open # set window state to Open<br>
  4021. ReSync # resync virtual sensor with FHT80b after a reset of CUL device. In other words, perform a virtual
  4022. battery exchange to synchronize the sensor with FHT80b device again. (at the moment, only
  4023. available with prototype cul_fw - see forum 55774)<br>
  4024. </code></ul>
  4025. </ul>
  4026. <br>
  4027. <b>Get</b>
  4028. <ul> No get implemented yet ...
  4029. </ul><br>
  4030. <a name="CUL_FHTTKattr"></a>
  4031. <b>Attributes</b>
  4032. <ul>
  4033. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  4034. <li><a href="#verbose">verbose</a></li><br>
  4035. <li><a href="#model">model</a><br>Possible values are: FHT80TF, FHT80TF-2, dummy (value, which allow to simulate a window sensor)</li><br>
  4036. <li><a href="#showtime">showtime</a></li><br>
  4037. <li><a href="#IODev">IODev</a></li><br>
  4038. <li><a href="#ignore">ignore</a></li><br>
  4039. <li><a href="#eventMap">eventMap</a></li><br>
  4040. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  4041. </ul>
  4042. <br>
  4043. </ul>
  4044. <a name="CUL_HM"></a><h3>CUL_HM</h3>
  4045. <ul>
  4046. Support for eQ-3 HomeMatic devices via the <a href="#CUL">CUL</a> or the <a href="#HMLAN">HMLAN</a>.<br>
  4047. <br>
  4048. <a name="CUL_HMdefine"></a><b>Define</b>
  4049. <ul>
  4050. <code><B>define &lt;name&gt; CUL_HM &lt;6-digit-hex-code|8-digit-hex-code&gt;</B></code>
  4051. <br><br>
  4052. Correct device definition is the key for HM environment simple maintenance.
  4053. <br>
  4054. Background to define entities:<br>
  4055. HM devices has a 3 byte (6 digit hex value) HMid - which is key for
  4056. addressing. Each device hosts one or more channels. HMid for a channel is
  4057. the device's HMid plus the channel number (1 byte, 2 digit) in hex.
  4058. Channels should be defined for all multi-channel devices. Channel entities
  4059. cannot be defined if the hosting device does not exist<br> Note: FHEM
  4060. mappes channel 1 to the device if it is not defined explicitely. Therefore
  4061. it does not need to be defined for single channel devices.<br>
  4062. Note: if a device is deleted all assotiated channels will be removed as
  4063. well. <br> An example for a full definition of a 2 channel switch is given
  4064. below:<br>
  4065. <ul><code>
  4066. define livingRoomSwitch CUL_HM 123456<br>
  4067. define LivingroomMainLight CUL_HM 12345601<br>
  4068. define LivingroomBackLight CUL_HM 12345602<br><br></code>
  4069. </ul>
  4070. livingRoomSwitch is the device managing communication. This device is
  4071. defined prior to channels to be able to setup references. <br>
  4072. LivingroomMainLight is channel 01 dealing with status of light, channel
  4073. peers and channel assotiated register. If not defined channel 01 is covered
  4074. by the device entity.<br> LivingRoomBackLight is the second 'channel',
  4075. channel 02. Its definition is mandatory to operate this function.<br><br>
  4076. Sender specials: HM threats each button of remotes, push buttons and
  4077. similar as channels. It is possible (not necessary) to define a channel per
  4078. button. If all channels are defined access to pairing informatin is
  4079. possible as well as access to channel related register. Furthermore names
  4080. make the traces better readable.<br><br>
  4081. define may also be invoked by the <a href="#autocreate">autocreate</a>
  4082. module, together with the necessary subType attribute.
  4083. Usually you issue a <a href="#CULset">hmPairForSec</a> and press the
  4084. corresponding button on the device to be paired, or issue a <a
  4085. href="#CULset">hmPairSerial</a> set command if the device is a receiver
  4086. and you know its serial number. Autocreate will then create a fhem
  4087. device and set all necessary attributes. Without pairing the device
  4088. will not accept messages from fhem. fhem may create the device even if
  4089. the pairing is not successful. Upon a successful pairing you'll see a
  4090. CommandAccepted entry in the details section of the CUL_HM device.<br><br>
  4091. If you cannot use autocreate, then you have to specify:<br>
  4092. <ul>
  4093. <li>the &lt;6-digit-hex-code&gt;or HMid+ch &lt;8-digit-hex-code&gt;<br>
  4094. It is the unique, hardcoded device-address and cannot be changed (no,
  4095. you cannot choose it arbitrarily like for FS20 devices). You may
  4096. detect it by inspecting the fhem log.</li>
  4097. <li>the subType attribute<br>
  4098. which is one of switch dimmer blindActuator remote sensor swi
  4099. pushButton threeStateSensor motionDetector keyMatic winMatic
  4100. smokeDetector</li>
  4101. </ul>
  4102. Without these attributes fhem won't be able to decode device messages
  4103. appropriately. <br><br>
  4104. <b>Notes</b>
  4105. <ul>
  4106. <li>If the interface is a CUL device, the <a href="#rfmode">rfmode </a>
  4107. attribute of the corresponding CUL/CUN device must be set to HomeMatic.
  4108. Note: this mode is BidCos/Homematic only, you will <b>not</b> receive
  4109. FS20/HMS/EM/S300 messages via this device. Previously defined FS20/HMS
  4110. etc devices must be assigned to a different input device (CUL/FHZ/etc).
  4111. </li>
  4112. <li>Currently supported device families: remote, switch, dimmer,
  4113. blindActuator, motionDetector, smokeDetector, threeStateSensor,
  4114. THSensor, winmatic. Special devices: KS550, HM-CC-TC and the KFM100.
  4115. </li>
  4116. <li>Device messages can only be interpreted correctly if the device type is
  4117. known. fhem will extract the device type from a "pairing request"
  4118. message, even if it won't respond to it (see <a
  4119. href="#hmPairSerial">hmPairSerial</a> and <a
  4120. href="#hmPairForSec">hmPairForSec</a> to enable pairing).
  4121. As an alternative, set the correct subType and model attributes, for a
  4122. list of possible subType values see "attr hmdevice ?".</li>
  4123. <a name="HMAES"></a>
  4124. <li>The so called "AES-Encryption" is in reality a signing request: if it is
  4125. enabled, an actor device will only execute a received command, if a
  4126. correct answer to a request generated by the actor is received. This
  4127. means:
  4128. <ul>
  4129. <li>Reaction to commands is noticably slower, as 3 messages are sent
  4130. instead of one before the action is processed by the actor.</li>
  4131. <li>Every command and its final ack from the device is sent in clear,
  4132. so an outside observer will know the status of each device.</li>
  4133. <li>The firmware implementation is buggy: the "toggle" event is executed
  4134. <b>before</b> the answer for the signing request is received, at
  4135. least by some switches (HM-LC-Sw1-Pl and HM-LC-SW2-PB-FM).</li>
  4136. <li>The <a href="#HMLAN">HMLAN</a> configurator will answer signing
  4137. requests by itself, and if it is configured with the 3-byte address
  4138. of a foreign CCU which is still configurerd with the default
  4139. password, it is able to answer signing requests correctly.</li>
  4140. <li>AES-Encryption is useable with a HMLAN or a CUL. When using
  4141. a CUL, the perl-module Crypt::Rijndael needs to be installed.
  4142. Due to the issues above I do not recommend using Homematic
  4143. encryption at all.</li>
  4144. </ul>
  4145. </li>
  4146. </ul>
  4147. </ul><br>
  4148. <a name="CUL_HMset"></a><b>Set</b>
  4149. <ul>
  4150. Note: devices which are normally send-only (remote/sensor/etc) must be set
  4151. into pairing/learning mode in order to receive the following commands.
  4152. <br><br>
  4153. Universal commands (available to most hm devices):
  4154. <ul>
  4155. <li><B>assignHmKey</B><a name="CUL_HMassignHmKey"></a><br>
  4156. Initiates a key-exchange with the device, exchanging the old AES-key of the device with the key with the highest
  4157. index defined by the attribute hmKey* in the HMLAN or VCCU. The old key is determined by the reading aesKeyNbr,
  4158. which specifies the index of the old key when the reading is divided by 2.
  4159. </li>
  4160. <li><B>clear &lt;[rssi|readings|register|msgEvents|attack|all]&gt;</B><a name="CUL_HMclear"></a><br>
  4161. A set of variables can be removed.<br>
  4162. <ul>
  4163. readings: all readings will be deleted. Any new reading will be added usual. May be used to eliminate old data<br>
  4164. register: all captured register-readings in FHEM will be removed. This has NO impact to the values in the device.<br>
  4165. msgEvents: all message event counter will be removed. Also commandstack will be cleared. <br>
  4166. rssi: collected rssi values will be cleared. <br>
  4167. attack: information regarding an attack will be removed. <br>
  4168. all: all of the above. <br>
  4169. </ul>
  4170. </li>
  4171. <li><B>getConfig</B><a name="CUL_HMgetConfig"></a><br>
  4172. Will read major configuration items stored in the HM device. Executed
  4173. on a channel it will read pair Inforamtion, List0, List1 and List3 of
  4174. the 1st internal peer. Furthermore the peerlist will be retrieved for
  4175. teh given channel. If executed on a device the command will get the
  4176. above info or all assotated channels. Not included will be the
  4177. configuration for additional peers. <br> The command is a shortcut
  4178. for a selection of other commands.
  4179. </li>
  4180. <li><B>getRegRaw [List0|List1|List2|List3|List4|List5|List6]&lt;peerChannel&gt; </B><a name="CUL_HMgetRegRaw"></a><br>
  4181. Read registerset in raw format. Description of the registers is beyond
  4182. the scope of this documentation.<br>
  4183. Registers are structured in so called lists each containing a set of
  4184. registers.<br>
  4185. List0: device-level settings e.g. CUL-pairing or dimmer thermal limit
  4186. settings.<br>
  4187. List1: per channel settings e.g. time to drive the blind up and
  4188. down.<br>
  4189. List3: per 'link' settings - means per peer-channel. This is a lot of
  4190. data!. It controlls actions taken upon receive of a trigger from the
  4191. peer.<br>
  4192. List4: settings for channel (button) of a remote<br><br>
  4193. &lt;PeerChannel&gt; paired HMid+ch, i.e. 4 byte (8 digit) value like
  4194. '12345601'. It is mendatory for List 3 and 4 and can be left out for
  4195. List 0 and 1. <br>
  4196. 'all' can be used to get data of each paired link of the channel. <br>
  4197. 'selfxx' can be used to address data for internal channels (associated
  4198. with the build-in switches if any). xx is the number of the channel in
  4199. decimal.<br>
  4200. Note1: execution depends on the entity. If List1 is requested on a
  4201. device rather then a channel the command will retrieve List1 for all
  4202. channels assotiated. List3 with peerChannel = all will get all link
  4203. for all channel if executed on a device.<br>
  4204. Note2: for 'sender' see <a href="#CUL_HMremote">remote</a> <br>
  4205. Note3: the information retrieval may take a while - especially for
  4206. devices with a lot of channels and links. It may be necessary to
  4207. refresh the web interface manually to view the results <br>
  4208. Note4: the direct buttons on a HM device are hidden by default.
  4209. Nevertheless those are implemented as links as well. To get access to
  4210. the 'internal links' it is necessary to issue <br>
  4211. 'set &lt;name&gt; <a href="#CUL_HMregSet">regSet</a> intKeyVisib visib'<br>
  4212. or<br>
  4213. 'set &lt;name&gt; <a href="#CUL_HMregBulk">regBulk</a> RegL_0. 2:81'<br>
  4214. Reset it by replacing '81' with '01'<br> example:<br>
  4215. <ul><code>
  4216. set mydimmer getRegRaw List1<br>
  4217. set mydimmer getRegRaw List3 all <br>
  4218. </code></ul>
  4219. </li>
  4220. <li><B>getSerial</B><a name="CUL_HMgetSerial"></a><br>
  4221. Read serial number from device and write it to attribute serialNr.
  4222. </li>
  4223. <li><B>inhibit [on|off]</B><br>
  4224. Block / unblock all changes to the actor channel, i.e. actor state is frozen
  4225. until inhibit is set off again. Inhibit can be executed on any actor channel
  4226. but obviously not on sensors - would not make any sense.<br>
  4227. Practically it can be used to suspend any notifies as well as peered channel action
  4228. temporarily without the need to delete them. <br>
  4229. Examples:
  4230. <ul><code>
  4231. # Block operation<br>
  4232. set keymatic inhibit on <br><br>
  4233. </ul></code>
  4234. </li>
  4235. <li><B>pair</B><a name="CUL_HMpair"></a><br>
  4236. Pair the device with a known serialNumber (e.g. after a device reset)
  4237. to FHEM Central unit. FHEM Central is usualy represented by CUL/CUNO,
  4238. HMLAN,...
  4239. If paired, devices will report status information to
  4240. FHEM. If not paired, the device won't respond to some requests, and
  4241. certain status information is also not reported. Paring is on device
  4242. level. Channels cannot be paired to central separate from the device.
  4243. See also <a href="#CUL_HMgetpair">getPair</a> and
  4244. <a href="#CUL_HMunpair">unpair</a>.<br>
  4245. Don't confuse pair (to a central) with peer (channel to channel) with
  4246. <a href="#CUL_HMpeerChan">peerChan</a>.<br>
  4247. </li>
  4248. <li><B>peerBulk</B> &lt;peerch1,peerch2,...&gt; [set|unset]<a name="CUL_HMpeerBulk"></a><br>
  4249. peerBulk will add peer channels to the channel. All peers in the list will be added. <br>
  4250. with unset option the peers in the list will be subtracted from the device's peerList.<br>
  4251. peering sets the configuration of this link to its defaults. As peers are not
  4252. added in pairs default will be as defined for 'single' by HM for this device. <br>
  4253. More suffisticated funktionality is provided by
  4254. <a href="#CUL_HMpeerChan">peerChan</a>.<br>
  4255. peerBulk will not delete existing peers, just handle the given peerlist.
  4256. Other already installed peers will not be touched.<br>
  4257. peerBulk may be used to remove peers using <B>unset</B> option while default ist set.<br>
  4258. Main purpose of this command is to re-store data to a device.
  4259. It is recommended to restore register configuration utilising
  4260. <a href="#CUL_HMregBulk">regBulk</a> subsequent. <br>
  4261. Example:<br>
  4262. <ul><code>
  4263. set myChannel peerBulk 12345601,<br>
  4264. set myChannel peerBulk self01,self02,FB_Btn_04,FB_Btn_03,<br>
  4265. set myChannel peerBulk 12345601 unset # remove peer 123456 channel 01<br>
  4266. </code></ul>
  4267. </li>
  4268. <li><B>regBulk &lt;reg List&gt;:&lt;peer&gt; &lt;addr1:data1&gt; &lt;addr2:data2&gt;...</B><a name="CUL_HMregBulk"></a><br>
  4269. This command will replace the former regRaw. It allows to set register
  4270. in raw format. Its main purpose is to restore a complete register list
  4271. to values secured before. <br>
  4272. Values may be read by <a href="#CUL_HMgetConfig">getConfig</a>. The
  4273. resulting readings can be used directly for this command.<br>
  4274. &lt;reg List&gt; is the list data should be written to. Format could be
  4275. '00', 'RegL_00', '01'...<br>
  4276. &lt;peer&gt; is an optional adder in case the list requires a peer.
  4277. The peer can be given as channel name or the 4 byte (8 chars) HM
  4278. channel ID.<br>
  4279. &lt;addr1:data1&gt; is the list of register to be written in hex
  4280. format.<br>
  4281. Example:<br>
  4282. <ul><code>
  4283. set myChannel regBulk RegL_00. 02:01 0A:17 0B:43 0C:BF 15:FF 00:00<br>
  4284. RegL_03.FB_Btn_07
  4285. 01:00 02:00 03:00 04:32 05:64 06:00 07:FF 08:00 09:FF 0A:01 0B:44 0C:54 0D:93 0E:00 0F:00 11:C8 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 1A:00 1B:00 1C:00 1D:FF 1E:93 1F:00 81:00 82:00 83:00 84:32 85:64 86:00 87:FF 88:00 89:FF 8A:21 8B:44 8C:54 8D:93 8E:00 8F:00 91:C8 92:00 93:00 94:00 95:00 96:00 97:00 98:00 99:00 9A:00 9B:00 9C:00 9D:05 9E:93 9F:00 00:00<br>
  4286. set myblind regBulk 01 0B:10<br>
  4287. set myblind regBulk 01 0C:00<br>
  4288. </code></ul>
  4289. myblind will set the max drive time up for a blind actor to 25,6sec
  4290. </li>
  4291. <li><B>regSet [prep|exec] &lt;regName&gt; &lt;value&gt; &lt;peerChannel&gt;</B><a name="CUL_HMregSet"></a><br>
  4292. For some major register a readable version is implemented supporting
  4293. register names &lt;regName&gt; and value conversionsing. Only a subset
  4294. of register can be supproted.<br>
  4295. Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
  4296. improve data transmission.
  4297. Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
  4298. The last command must have the parameter "exec" in order to transmitt the information.<br>
  4299. &lt;value&gt; is the data in human readable manner that will be written
  4300. to the register.<br>
  4301. &lt;peerChannel&gt; is required if this register is defined on a per
  4302. 'peerChan' base. It can be set to '0' other wise.See <a
  4303. href="#CUL_HMgetRegRaw">getRegRaw</a> for full description<br>
  4304. Supported register for a device can be explored using<br>
  4305. <ul><code>set regSet ? 0 0</code></ul>
  4306. Condensed register description will be printed
  4307. using<br>
  4308. <ul><code>set regSet &lt;regname&gt; ? 0</code></ul>
  4309. </li>
  4310. <li><B>reset</B><a name="CUL_HMreset"></a><br>
  4311. Factory reset the device. You need to pair it again to use it with
  4312. fhem.
  4313. </li>
  4314. <li><B>sign [on|off]</B><a name="CUL_HMsign"></a><br>
  4315. Activate or deactivate signing (also called AES encryption, see the <a
  4316. href="#HMAES">note</a> above). Warning: if the device is attached via
  4317. a CUL, you need to install the perl-module Crypt::Rijndael to be
  4318. able to switch it (or deactivate signing) from fhem.
  4319. </li>
  4320. <li><B>statusRequest</B><a name="CUL_HMstatusRequest"></a><br>
  4321. Update device status. For multichannel devices it should be issued on
  4322. an per channel base
  4323. </li>
  4324. <li><B>unpair</B><a name="CUL_HMunpair"></a><br>
  4325. "Unpair" the device, i.e. make it available to pair with other master
  4326. devices. See <a href="#CUL_HMpair">pair</a> for description.</li>
  4327. <li><B>virtual &lt;number of buttons&gt;</B><a name="CUL_HMvirtual"></a><br>
  4328. configures a defined curcuit as virtual remote controll. Then number
  4329. of button being added is 1 to 255. If the command is issued a second
  4330. time for the same entity additional buttons will be added. <br>
  4331. Example for usage:
  4332. <ul><code>
  4333. define vRemote CUL_HM 100000 # the selected HMid must not be in use<br>
  4334. set vRemote virtual 20 # define 20 button remote controll<br>
  4335. set vRemote_Btn4 peerChan 0 &lt;actorchannel&gt; # peers Button 4 and 5 to the given channel<br>
  4336. set vRemote_Btn4 press<br>
  4337. set vRemote_Btn5 press long<br>
  4338. </code></ul>
  4339. see also <a href="#CUL_HMpress">press</a>
  4340. </li>
  4341. <li><B>deviceRename &lt;newName&gt;</B><a name="CUL_HMdeviceRename"></a><br>
  4342. rename the device and all its channels.
  4343. </li>
  4344. <li><B>fwUpdate [onlyEnterBootLoader] &lt;filename&gt; [&lt;waitTime&gt;]</B><br>
  4345. update Fw of the device. User must provide the appropriate file.
  4346. waitTime can be given optionally. In case the device needs to be set to
  4347. FW update mode manually this is the time the system will wait.<br>
  4348. "onlyEnterBootLoader" tells the device to enter the boot loader so it can be
  4349. flashed using the eq3 firmware update tool. Mainly useful for flush-mounted devices
  4350. in FHEM environments solely using HM-LAN adapters.
  4351. </li>
  4352. </ul>
  4353. <br>
  4354. <B>subType dependent commands:</B>
  4355. <ul>
  4356. <br>
  4357. <li>switch
  4358. <ul>
  4359. <li><B>on</B> <a name="CUL_HMon"> </a> - set level to 100%</li>
  4360. <li><B>off</B><a name="CUL_HMoff"></a> - set level to 0%</li>
  4361. <li><B>on-for-timer &lt;sec&gt;</B><a name="CUL_HMonForTimer"></a> -
  4362. set the switch on for the given seconds [0-85825945].<br> Note:
  4363. off-for-timer like FS20 is not supported. It may to be programmed
  4364. thru channel register.</li>
  4365. <li><B>on-till &lt;time&gt;</B><a name="CUL_HMonTill"></a> - set the switch on for the given end time.<br>
  4366. <ul><code>set &lt;name&gt; on-till 20:32:10<br></code></ul>
  4367. Currently a max of 24h is supported with endtime.<br>
  4368. </li>
  4369. <li><B>press &lt;[short|long]&gt; &lt;[on|off|&lt;peer&gt;]&gt; &lt;btnNo&gt;</B><a name="CUL_HMpress"></a><br>
  4370. simulate a press of the local button or direct connected switch of the actor.<br>
  4371. <B>[short|long]</B> select simulation of short or long press of the button.
  4372. Parameter is optional, short is default<br>
  4373. <B>[on|off|&lt;peer&gt;]</B> is relevant for devices with direct buttons per channel (blind or dimmer).
  4374. Those are available for dimmer and blind-actor, usually not for switches<br>
  4375. <B>&lt;peer&gt;</B> allows to stimulate button-press of any peer of the actor.
  4376. i.e. if the actor is peered to any remote, virtual or io (HMLAN/CUL)
  4377. press can trigger the action defined. <br>
  4378. <B>[noBurst]</B> relevant for virtual only <br>
  4379. It will cause the command being added to the command queue of the peer. <B>No</B> burst is
  4380. issued subsequent thus the command is pending until the peer wakes up. It therefore
  4381. <B>delays the button-press</B>, but will cause less traffic and performance cost. <br>
  4382. <B>Example:</B>
  4383. <code>
  4384. set actor press # trigger short of internal peer self assotiated to the channel<br>
  4385. set actor press long # trigger long of internal peer self assotiated to the channel<br>
  4386. set actor press on # trigger short of internal peer self related to 'on'<br>
  4387. set actor press long off # trigger long of internal peer self related to 'of'<br>
  4388. set actor press long FB_Btn01 # trigger long peer FB button 01<br>
  4389. set actor press long FB_chn-8 # trigger long peer FB button 08<br>
  4390. set actor press self01 # trigger short of internal peer 01<br>
  4391. set actor press fhem02 # trigger short of FHEM channel 2<br>
  4392. </code>
  4393. </li>
  4394. <li><B>pressL &lt;peer&gt;</B><a name="CUL_HMpressL"></a><br>
  4395. simulates a long press for a given peer. See press for details
  4396. </li>
  4397. <li><B>pressS &lt;peer&gt;</B><a name="CUL_HMpressS"></a><br>
  4398. simulates a long press for a given peer. See press for details
  4399. </li>
  4400. <li><B>toggle</B><a name="CUL_HMtoggle"></a> - toggle the Actor. It will switch from any current
  4401. level to off or from off to 100%</li>
  4402. </ul>
  4403. <br>
  4404. </li>
  4405. <li>dimmer, blindActuator<br>
  4406. Dimmer may support virtual channels. Those are autocrated if applicable. Usually there are 2 virtual channels
  4407. in addition to the primary channel. Virtual dimmer channels are inactive by default but can be used in
  4408. in parallel to the primay channel to control light. <br>
  4409. Virtual channels have default naming SW&lt;channel&gt;_V&lt;no&gt;. e.g. Dimmer_SW1_V1 and Dimmer_SW1_V2.<br>
  4410. Dimmer virtual channels are completely different from FHEM virtual buttons and actors but
  4411. are part of the HM device. Documentation and capabilities for virtual channels is out of scope.<br>
  4412. <ul>
  4413. <li><B>0 - 100 [on-time] [ramp-time]</B><br>
  4414. set the actuator to the given value (in percent)
  4415. with a resolution of 0.5.<br>
  4416. Optional for dimmer on-time and ramp time can be choosen, both in seconds with 0.1s granularity.<br>
  4417. On-time is analog "on-for-timer".<br>
  4418. Ramp-time default is 2.5s, 0 means instantanous<br>
  4419. </li>
  4420. <li><B><a href="#CUL_HMon">on</a></B></li>
  4421. <li><B><a href="#CUL_HMoff">off</a></B></li>
  4422. <li><B><a href="#CUL_HMpress">press &lt;[short|long]&gt;&lt;[on|off]&gt;</a></B></li>
  4423. <li><B><a href="#CUL_HMtoggle">toggle</a></B></li>
  4424. <li><B>toggleDir</B><a name="CUL_HMtoggleDir"></a> - toggled drive direction between up/stop/down/stop</li>
  4425. <li><B><a href="#CUL_HMonForTimer">on-for-timer &lt;sec&gt;</a></B> - Dimmer only! <br></li>
  4426. <li><B><a href="#CUL_HMonTill">on-till &lt;time&gt;</a></B> - Dimmer only! <br></li>
  4427. <li><B>stop</B> - stop motion (blind) or dim ramp</li>
  4428. <li><B>old</B> - switch back to old value after a change. Dimmer only.</li>
  4429. <li><B>pct &lt;level&gt [&lt;ontime&gt] [&lt;ramptime&gt]</B> - set actor to a desired <B>absolut level</B>.<br>
  4430. Optional ontime and ramptime could be given for dimmer.<br>
  4431. ontime may be time in seconds. It may also be entered as end-time in format hh:mm:ss
  4432. </li>
  4433. <li><B>up [changeValue] [&lt;ontime&gt] [&lt;ramptime&gt]</B> dim up one step</li>
  4434. <li><B>down [changeValue] [&lt;ontime&gt] [&lt;ramptime&gt]</B> dim up one step<br>
  4435. changeValue is optional an gives the level to be changed up or down in percent. Granularity is 0.5%, default is 10%. <br>
  4436. ontime is optional an gives the duration of the level to be kept. '0' means forever and is default.<br>
  4437. ramptime is optional an defines the change speed to reach the new level. It is meaningful only for dimmer.
  4438. <br></li>
  4439. </ul>
  4440. <br>
  4441. </li>
  4442. <li>remotes, pushButton<a name="CUL_HMremote"></a><br>
  4443. This class of devices does not react on requests unless they are put
  4444. to learn mode. FHEM obeys this behavior by stacking all requests until
  4445. learn mode is detected. Manual interaction of the user is necessary to
  4446. activate learn mode. Whether commands are pending is reported on
  4447. device level with parameter 'protCmdPend'.
  4448. </li>
  4449. <ul>
  4450. <li><B>peerIODev [IO] &lt;btn_no&gt; [<u>set</u>|unset]</B><a name="CUL_HMpeerIODev"></a><br>
  4451. The command is similar to <B><a href="#CUL_HMpeerChan">peerChan</a></B>.
  4452. While peerChan
  4453. is executed on a remote and peers any remote to any actor channel peerIODev is
  4454. executed on an actor channel and peer this to an channel of an FHEM IO device.<br>
  4455. An IO device according to eQ3 supports up to 50 virtual buttons. Those
  4456. will be peered/unpeerd to the actor. <a href="CUL_HMpress">press</a> can be
  4457. used to stimulate the related actions as defined in the actor register.
  4458. <li><B>peerChan &lt;btn_no&gt; &lt;actChan&gt; [single|<u>dual</u>|reverse][<u>set</u>|unset] [<u>both</u>|actor|remote]</B>
  4459. <a name="CUL_HMpeerChan"></a><br>
  4460. peerChan will establish a connection between a sender- <B>channel</B> and
  4461. an actuator-<B>channel</B> called link in HM nomenclatur. Peering must not be
  4462. confused with pairing.<br>
  4463. <B>Pairing</B> refers to assign a <B>device</B> to the central.<br>
  4464. <B>Peering</B> refers to virtally connect two <B>channels</B>.<br>
  4465. Peering allowes direkt interaction between sender and aktor without
  4466. the necessity of a CCU<br>
  4467. Peering a sender-channel causes the sender to expect an ack from -each-
  4468. of its peers after sending a trigger. It will give positive feedback (e.g. LED green)
  4469. only if all peers acknowledged.<br>
  4470. Peering an aktor-channel will setup a parameter set which defines the action to be
  4471. taken once a trigger from -this- peer arrived. In other words an aktor will <br>
  4472. - process trigger from peers only<br>
  4473. - define the action to be taken dedicated for each peer's trigger<br>
  4474. An actor channel will setup a default action upon peering - which is actor dependant.
  4475. It may also depend whether one or 2 buttons are peered <B>in one command</B>.
  4476. A swich may setup oen button for 'on' and the other for 'off' if 2 button are
  4477. peered. If only one button is peered the funktion will likely be 'toggle'.<br>
  4478. The funtion can be modified by programming the register (aktor dependant).<br>
  4479. Even though the command is executed on a remote or push-button it will
  4480. as well take effect on the actuator directly. Both sides' peering is
  4481. virtually independant and has different impact on sender and receiver
  4482. side.<br>
  4483. Peering of one actuator-channel to multiple sender-channel as
  4484. well as one sender-channel to multiple Actuator-channel is
  4485. possible.<br>
  4486. &lt;actChan&gt; is the actuator-channel to be peered.<br>
  4487. &lt;btn_no&gt; is the sender-channel (button) to be peered. If
  4488. 'single' is choosen buttons are counted from 1. For 'dual' btn_no is
  4489. the number of the Button-pair to be used. I.e. '3' in dual is the
  4490. 3rd button pair correcponding to button 5 and 6 in single mode.<br>
  4491. If the command is executed on a channel the btn_no is ignored.
  4492. It needs to be set, should be 0<br>
  4493. [single|dual]: this mode impacts the default behavior of the
  4494. Actuator upon using this button. E.g. a dimmer can be learned to a
  4495. single button or to a button pair. <br>
  4496. Defaults to dual.<br>
  4497. 'dual' (default) Button pairs two buttons to one actuator. With a
  4498. dimmer this means one button for dim-up and one for dim-down. <br>
  4499. 'reverse' identical to dual - but button order is reverse.<br>
  4500. 'single' uses only one button of the sender. It is useful for e.g. for
  4501. simple switch actuator to toggle on/off. Nevertheless also dimmer can
  4502. be learned to only one button. <br>
  4503. [set|unset]: selects either enter a peering or remove it.<br>
  4504. Defaults to set.<br>
  4505. 'set' will setup peering for the channels<br>
  4506. 'unset' will remove the peering for the channels<br>
  4507. [actor|remote|both] limits the execution to only actor or only remote.
  4508. This gives the user the option to redo the peering on the remote
  4509. channel while the settings in the actor will not be removed.<br>
  4510. Defaults to both.<br>
  4511. Example:
  4512. <ul><code>
  4513. set myRemote peerChan 2 mySwActChn single set #peer second button to an actuator channel<br>
  4514. set myRmtBtn peerChan 0 mySwActChn single set #myRmtBtn is a button of the remote. '0' is not processed here<br>
  4515. set myRemote peerChan 2 mySwActChn dual set #peer button 3 and 4<br>
  4516. set myRemote peerChan 3 mySwActChn dual unset #remove peering for button 5 and 6<br>
  4517. set myRemote peerChan 3 mySwActChn dual unset aktor #remove peering for button 5 and 6 in actor only<br>
  4518. set myRemote peerChan 3 mySwActChn dual set remote #peer button 5 and 6 on remote only. Link settings il mySwActChn will be maintained<br>
  4519. </code></ul>
  4520. </li>
  4521. </li>
  4522. </ul>
  4523. <li>virtual<a name="CUL_HMvirtual"></a><br>
  4524. <ul>
  4525. <li><B><a href="#CUL_HMpeerChan">peerChan</a></B> see remote</li>
  4526. <li><B><a name="CUL_HMpress"></a>press [long|short] [&lt;peer&gt;] [&lt;repCount&gt;] [&lt;repDelay&gt;] </B>
  4527. <ul>
  4528. simulates button press for an actor from a peered sensor.
  4529. will be sent of type "long".
  4530. <li>[long|short] defines whether long or short press shall be simulated. Defaults to short</li>
  4531. <li>[&lt;peer&gt;] define which peer's trigger shall be simulated.Defaults to self(channelNo).</li>
  4532. <li>[&lt;repCount&gt;] Valid for long press only. How long shall the button be pressed? Number of repetition of the messages is defined. Defaults to 1</li>
  4533. <li>[&lt;repDelay&gt;] Valid for long press only. defines wait time between the single messages. </li>
  4534. </ul>
  4535. </li>
  4536. <li><B>virtTemp &lt;[off -10..50]&gt;<a name="CUL_HMvirtTemp"></a></B>
  4537. simulates a thermostat. If peered to a device it periodically sends the
  4538. temperature until "off" is given. See also <a href="#CUL_HMvirtHum">virtHum</a><br>
  4539. </li>
  4540. <li><B>virtHum &lt;[off -10..50]&gt;<a name="CUL_HMvirtHum"></a></B>
  4541. simulates the humidity part of a thermostat. If peered to a device it periodically sends
  4542. the temperature and humidity until both are "off". See also <a href="#CUL_HMvirtTemp">virtTemp</a><br>
  4543. </li>
  4544. <li><B>valvePos &lt;[off 0..100]&gt;<a name="CUL_HMvalvePos"></a></B>
  4545. stimulates a VD<br>
  4546. </li>
  4547. </ul>
  4548. </li>
  4549. <li>smokeDetector<br>
  4550. Note: All these commands work right now only if you have more then one
  4551. smoekDetector, and you peered them to form a group. For issuing the
  4552. commands you have to use the master of this group, and currently you
  4553. have to guess which of the detectors is the master.<br>
  4554. smokeDetector can be setup to teams using
  4555. <a href="#CUL_HMpeerChan">peerChan</a>. You need to peer all
  4556. team-members to the master. Don't forget to also peerChan the master
  4557. itself to the team - i.e. peer it to itself! doing that you have full
  4558. controll over the team and don't need to guess.<br>
  4559. <ul>
  4560. <li><B>teamCall</B> - execute a network test to all team members</li>
  4561. <li><B>teamCallBat</B> - execute a network test simulate bat low</li>
  4562. <li><B>alarmOn</B> - initiate an alarm</li>
  4563. <li><B>alarmOff</B> - switch off the alarm</li>
  4564. </ul>
  4565. </li>
  4566. <li>4Dis (HM-PB-4DIS-WM|HM-RC-Dis-H-x-EU|ROTO_ZEL-STG-RM-DWT-10)
  4567. <ul>
  4568. <li><B>text &lt;btn_no&gt; [on|off] &lt;text1&gt; &lt;text2&gt;</B><br>
  4569. Set the text on the display of the device. To this purpose issue
  4570. this set command first (or a number of them), and then choose from
  4571. the teach-in menu of the 4Dis the "Central" to transmit the data.<br>
  4572. If used on a channel btn_no and on|off must not be given but only pure text.<br>
  4573. \_ will be replaced by blank character.<br>
  4574. Example:
  4575. <ul><code>
  4576. set 4Dis text 1 on On Lamp<br>
  4577. set 4Dis text 1 off Kitchen Off<br>
  4578. <br>
  4579. set 4Dis_chn4 text Kitchen Off<br>
  4580. </code></ul>
  4581. </li>
  4582. </ul>
  4583. <br></li>
  4584. <li>Climate-Control (HM-CC-TC)
  4585. <ul>
  4586. <li><B>desired-temp &lt;temp&gt;</B><br>
  4587. Set different temperatures. &lt;temp&gt; must be between 6 and 30
  4588. Celsius, and precision is half a degree.</li>
  4589. <li><B>tempListSat [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4590. <li><B>tempListSun [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4591. <li><B>tempListMon [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4592. <li><B>tempListTue [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4593. <li><B>tempListThu [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4594. <li><B>tempListWed [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4595. <li><B>tempListFri [prep|exec] HH:MM temp ... 24:00 temp</B><br>
  4596. Specify a list of temperature intervals. Up to 24 intervals can be
  4597. specified for each week day, the resolution is 10 Minutes. The
  4598. last time spec must always be 24:00.<br>
  4599. Example: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
  4600. 22.5, thereafter until midnight, 19 degrees celsius is desired.<br>
  4601. <code> set th tempListSat 06:00 19 23:00 22.5 24:00 19<br></code>
  4602. </li>
  4603. <br>
  4604. <li><B>tempListTmpl =>"[verify|restore] [[ &lt;file&gt; :]templateName] ...</B><br>
  4605. The tempList for one or more devices can be stored in a file. User can compare the
  4606. tempList in the file with the data read from the device. <br>
  4607. Restore will write the tempList to the device.<br>
  4608. Default opeartion is verify.<br>
  4609. Default file is tempList.cfg.<br>
  4610. Default templateName is the name of the actor<br>
  4611. Default for file and templateName can be set with attribut <B>tempListTmpl</B><br>
  4612. Example for templist file. room1 and room2 are the names of the template: <br>
  4613. <code>entities:room1
  4614. tempListSat>08:00 16.0 15:00 18.0 21:30 19.0 24:00 14.0
  4615. tempListSun>08:00 16.0 15:00 18.0 21:30 19.0 24:00 14.0
  4616. tempListMon>07:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
  4617. tempListTue>07:00 16.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 15.0
  4618. tempListWed>07:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
  4619. tempListThu>07:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
  4620. tempListFri>07:00 16.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
  4621. entities:room2
  4622. tempListSat>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0
  4623. tempListSun>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0
  4624. tempListMon>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0
  4625. tempListTue>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 15.0
  4626. tempListWed>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0
  4627. tempListThu>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0
  4628. tempListFri>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
  4629. </code>
  4630. Specials:<br>
  4631. <li>none: template will be ignored</li>
  4632. <li>defaultWeekplan: as default each day is set to 18.0 degree.
  4633. useful if peered to a TC controller. Implicitely teh weekplan of TC will be used.</li>
  4634. </li>
  4635. <li><B>tempTmplSet =>"[[ &lt;file&gt; :]templateName]</B><br>
  4636. Set the attribut and apply the change to the device
  4637. </li>
  4638. <li><B>templateDel =>" &lt;template&gt; </B><br>
  4639. Delete templateentry for this entity
  4640. </li>
  4641. <li><B>partyMode &lt;HH:MM&gt;&lt;durationDays&gt;</B><br>
  4642. set control mode to party and device ending time. Add the time it ends
  4643. and the <b>number of days</b> it shall last. If it shall end next day '1'
  4644. must be entered<br></li>
  4645. <li><B>sysTime</B><br>
  4646. set time in climate channel to system time</li>
  4647. </ul><br>
  4648. </li>
  4649. <li>Climate-Control (HM-CC-RT-DN|HM-CC-RT-DN-BoM)
  4650. <ul>
  4651. <li><B>controlMode &lt;auto|boost|day|night&gt;</B><br></li>
  4652. <li><B>controlManu &lt;temp&gt;</B><br></li>
  4653. <li><B>controlParty &lt;temp&gt;&lt;startDate&gt;&lt;startTime&gt;&lt;endDate&gt;&lt;endTime&gt;</B><br>
  4654. set control mode to party, define temp and timeframe.<br>
  4655. example:<br>
  4656. <code>set controlParty 15 03.8.13 20:30 5.8.13 11:30</code></li>
  4657. <li><B>sysTime</B><br>
  4658. set time in climate channel to system time</li>
  4659. <li><B>desired-temp &lt;temp&gt;</B><br>
  4660. Set different temperatures. &lt;temp&gt; must be between 6 and 30
  4661. Celsius, and precision is half a degree.</li>
  4662. <li><B>tempListSat [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4663. <li><B>tempListSun [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4664. <li><B>tempListMon [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4665. <li><B>tempListTue [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4666. <li><B>tempListThu [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4667. <li><B>tempListWed [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
  4668. <li><B>tempListFri [prep|exec] HH:MM temp ... 24:00 temp</B><br>
  4669. Specify a list of temperature intervals. Up to 24 intervals can be
  4670. specified for each week day, the resolution is 10 Minutes. The
  4671. last time spec must always be 24:00.<br>
  4672. Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
  4673. improve data transmission. This is especially helpful if device is operated in wakeup mode.
  4674. Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
  4675. The last command must have the parameter "exec" in order to transmitt the information.<br>
  4676. Example: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
  4677. 22.5, thereafter until midnight, 19 degrees celsius is desired.<br>
  4678. <code> set th tempListSat 06:00 19 23:00 22.5 24:00 19<br></code>
  4679. <br>
  4680. <code> set th tempListSat prep 06:00 19 23:00 22.5 24:00 19<br>
  4681. set th tempListSun prep 06:00 19 23:00 22.5 24:00 19<br>
  4682. set th tempListMon prep 06:00 19 23:00 22.5 24:00 19<br>
  4683. set th tempListTue exec 06:00 19 23:00 22.5 24:00 19<br></code>
  4684. </li>
  4685. </ul><br>
  4686. </li>
  4687. <li>OutputUnit (HM-OU-LED16)
  4688. <ul>
  4689. <li><B>led [off|red|green|yellow]</B><br>
  4690. switches the LED of the channel to the color. If the command is
  4691. executed on a device it will set all LEDs to the specified
  4692. color.<br>
  4693. For Expert all LEDs can be set individual by providing a 8-digit hex number to the device.<br></li>
  4694. <li><B>ilum &lt;brightness&gt;&lt;duration&gt; </B><br>
  4695. &lt;brightness&gt; [0-15] of backlight.<br>
  4696. &lt;duration&gt; [0-127] in sec. 0 is permanent 'on'.<br></li>
  4697. </ul><br>
  4698. </li>
  4699. <li>OutputUnit (HM-OU-CFM-PL)
  4700. <ul>
  4701. <li><B>led &lt;color&gt;[,&lt;color&gt;..] [&lt;repeat&gt..]</B><br>
  4702. Possible colors are [redL|greenL|yellowL|redS|greenS|yellowS|pause]. A
  4703. sequence of colors can be given separating the color entries by ','.
  4704. White spaces must not be used in the list. 'S' indicates short and
  4705. 'L' long ilumination. <br>
  4706. <b>repeat</b> defines how often the sequence shall be executed. Defaults to 1.<br>
  4707. </li>
  4708. <li><B>playTone &lt;MP3No&gt[,&lt;MP3No&gt..] [&lt;repeat&gt;] [&lt;volume&gt;]</B><br>
  4709. Play a series of tones. List is to be entered separated by ','. White
  4710. spaces must not be used in the list.<br>
  4711. <b>replay</b> can be entered to repeat the last sound played once more.<br>
  4712. <b>repeat</b> defines how often the sequence shall be played. Defaults to 1.<br>
  4713. <b>volume</b> is defined between 0 and 10. 0 stops any sound currently playing. Defaults to 10 (100%).<br>
  4714. Example:
  4715. <ul><code>
  4716. # "hello" in display, symb bulb on, backlight, beep<br>
  4717. set cfm_Mp3 playTone 3 # MP3 title 3 once<br>
  4718. set cfm_Mp3 playTone 3 3 # MP3 title 3 3 times<br>
  4719. set cfm_Mp3 playTone 3,6,8,3,4 # MP3 title list 3,6,8,3,4 once<br>
  4720. set cfm_Mp3 playTone 3,6,8,3,4 255# MP3 title list 3,6,8,3,4 255 times<br>
  4721. set cfm_Mp3 playTone replay # repeat last sequence<br>
  4722. <br>
  4723. set cfm_Led led redL 4 # led red blink 3 times long<br>
  4724. set cfm_Led led redS,redS,redS,redL,redL,redL,redS,redS,redS 255 # SOS 255 times<br>
  4725. </ul></code>
  4726. </li>
  4727. </ul><br>
  4728. </li>
  4729. <li>HM-RC-19xxx
  4730. <ul>
  4731. <li><B>alarm &lt;count&gt;</B><br>
  4732. issue an alarm message to the remote<br></li>
  4733. <li><B>service &lt;count&gt;</B><br>
  4734. issue an service message to the remote<br></li>
  4735. <li><B>symbol &lt;symbol&gt; [set|unset]</B><br>
  4736. activate a symbol as available on the remote.<br></li>
  4737. <li><B>beep [off|1|2|3]</B><br>
  4738. activate tone<br></li>
  4739. <li><B>backlight [off|on|slow|fast]</B><br>
  4740. activate backlight<br></li>
  4741. <li><B>display &lt;text&gt; comma unit tone backlight &lt;symbol(s)&gt;
  4742. </B><br>
  4743. control display of the remote<br>
  4744. &lt;text&gt; : up to 5 chars <br>
  4745. comma : 'comma' activates the comma, 'no' leaves it off <br>
  4746. [unit] : set the unit symbols.
  4747. [off|Proz|Watt|x3|C|x5|x6|x7|F|x9|x10|x11|x12|x13|x14|x15]. Currently
  4748. the x3..x15 display is not tested. <br>
  4749. tone : activate one of the 3 tones [off|1|2|3]<br>
  4750. backlight: activate backlight flash mode [off|on|slow|fast]<br>
  4751. &lt;symbol(s)&gt; activate symbol display. Multople symbols can be
  4752. acticated at the same time, concatinating them comma separated. Don't
  4753. use spaces here. Possiblesymbols are
  4754. [bulb|switch|window|door|blind|scene|phone|bell|clock|arrowUp|arrowDown]<br><br>
  4755. Example:
  4756. <ul><code>
  4757. # "hello" in display, symb bulb on, backlight, beep<br>
  4758. set FB1 display Hello no off 1 on bulb<br>
  4759. # "1234,5" in display with unit 'W'. Symbols scene,phone,bell and
  4760. # clock are active. Backlight flashing fast, Beep is second tone<br>
  4761. set FB1 display 12345 comma Watt 2 fast scene,phone,bell,clock
  4762. </ul></code>
  4763. </li>
  4764. </ul><br>
  4765. </li>
  4766. <li>HM-Dis-WM55
  4767. <ul>
  4768. <li><B>displayWM help </B><br>
  4769. <B>displayWM [long|short] &lt;text1&gt; &lt;color1&gt; &lt;icon1&gt; ... &lt;text6&gt; &lt;color6&gt; &lt;icon6&gt;</B><br>
  4770. <B>displayWM [long|short] &lt;lineX&gt; &lt;text&gt; &lt;color&gt; &lt;icon&gt;</B><br>
  4771. up to 6 lines can be addressed.<br>
  4772. <B>lineX</B> line number that shall be changed. If this is set the 3 parameter of a line can be adapted. <br>
  4773. <B>textNo</B> is the text to be dispalyed in line No. The text is assotiated with the text defined for the buttons.
  4774. txt&lt;BtnNo&gt;_&lt;lineNo&gt; references channel 1 to 10 and their lines 1 or 2.
  4775. Alternaly a free text of up to 12 char can be used<br>
  4776. <B>color</B> is one white, red, orange, yellow, green, blue<br>
  4777. <B>icon</B> is one off, on, open, closed, error, ok, noIcon<br>
  4778. Example:
  4779. <ul><code>
  4780. set disp01 displayWM short txt02_2 green noIcon txt10_1 red error txt05_2 yellow closed txt02_2 orange open <br>
  4781. set disp01 displayWM long line3 txt02_2 green noIcon<br>
  4782. set disp01 displayWM long line2 nc yellow noIcon<br>
  4783. set disp01 displayWM long line6 txt02_2<br>
  4784. set disp01 displayWM long line1 nc nc closed<br>
  4785. </ul></code>
  4786. </li>
  4787. </ul><br>
  4788. </li>
  4789. <li>HM-Dis-EP-WM55
  4790. <ul>
  4791. <li><B>displayEP help </B><br>
  4792. <B>displayEP &lt;text1,icon1:text2,icon2:text3,icon3&gt; &lt;sound&gt; &lt;repetition&gt; &lt;pause&gt; &lt;signal&gt;</B><br>
  4793. up to 3 lines can be addressed.<br>
  4794. If help is given a <i><B>help</B></i> on the command is given. Options for all parameter will be given.<br>
  4795. <B>textx</B> 12 char text for the given line.
  4796. If empty the value as per reading will be transmittet - i.e. typically no change.
  4797. text0-9 will display predefined text of channels 4 to 8.
  4798. 0xHH allows to display a single char in hex format.<br>
  4799. <B>iconx</B> Icon for this line.
  4800. If empty the value as per reading will be transmittet - i.e. typically no change.<br>
  4801. <B>sound</B> sound to be played<br>
  4802. <B>repetition</B> 0..15 <br>
  4803. <B>pause</B> 1..160<br>
  4804. <B>signal</B> signal color to be displayed<br>
  4805. <br>
  4806. <B>Note: param reWriteDisplayxx</B> <br>
  4807. <li>
  4808. upon button press the device will overwrite the 3 middles lines. When set <br>
  4809. attr chan param reWriteDisplayxx<br>
  4810. the 3 lines will be rewritten to the latest value after xx seconds. xx is between 01 and 99<br>
  4811. </li>
  4812. </li>
  4813. </ul><br>
  4814. </li>
  4815. <li>keyMatic<br><br>
  4816. <ul>The Keymatic uses the AES signed communication. Control
  4817. of the Keymatic is possible with the HM-LAN adapter and the CUL.
  4818. To control the KeyMatic with a CUL, the perl-module Crypt::Rijndael
  4819. needs to be installed.</ul><br>
  4820. <ul>
  4821. <li><B>lock</B><br>
  4822. The lock bolt moves to the locking position<br></li>
  4823. <li><B>unlock [sec]</B><br>
  4824. The lock bolt moves to the unlocking position.<br>
  4825. [sec]: Sets the delay in seconds after the lock automatically locked again.<br>
  4826. 0 - 65535 seconds</li>
  4827. <li><B>open [sec]</B><br>
  4828. Unlocked the door so that the door can be opened.<br>
  4829. [sec]: Sets the delay in seconds after the lock automatically locked
  4830. again.<br>0 - 65535 seconds</li>
  4831. </ul>
  4832. </li>
  4833. <li>winMatic <br><br>
  4834. <ul>winMatic provides 2 channels, one for the window control and a second
  4835. for the accumulator.</ul><br>
  4836. <ul>
  4837. <li><B>level &lt;level&gt; &lt;relockDelay&gt; &lt;speed&gt;</B><br>
  4838. set the level. <br>
  4839. &lt;level&gt;: range is 0 to 100%<br>
  4840. &lt;relockDelay&gt;: range 0 to 65535 sec. 'ignore' can be used to igneore the value alternaly <br>
  4841. &lt;speed&gt;: range is 0 to 100%<br>
  4842. </li>
  4843. <li><B>stop</B><br>
  4844. stop movement<br>
  4845. </li>
  4846. </ul>
  4847. </li>
  4848. <li>CCU_FHEM<br>
  4849. <ul>
  4850. <li>defIgnUnknown<br>
  4851. define unknown devices which are present in the readings.
  4852. set attr ignore and remove the readingfrom the list. <br>
  4853. </li>
  4854. </ul>
  4855. </li>
  4856. <li>HM-Sys-sRP-Pl<br><br>
  4857. setup the repeater's entries. Up to 36entries can be applied.
  4858. <ul>
  4859. <li><B>setRepeat &lt;entry&gt; &lt;sender&gt; &lt;receiver&gt; &lt;broadcast&gt;</B><br>
  4860. &lt;entry&gt; [1..36] entry number in repeater table. The repeater can handle up to 36 entries.<br>
  4861. &lt;sender&gt; name or HMID of the sender or source which shall be repeated<br>
  4862. &lt;receiver&gt; name or HMID of the receiver or destination which shall be repeated<br>
  4863. &lt;broadcast&gt; [yes|no] determines whether broadcast from this ID shall be repeated<br>
  4864. <br>
  4865. short application: <br>
  4866. <code>setRepeat setAll 0 0 0<br></code>
  4867. will rewrite the complete list to the deivce. Data will be taken from attribut repPeers. <br>
  4868. attribut repPeers is formated:<br>
  4869. src1:dst1:[y/n],src2:dst2:[y/n],src2:dst2:[y/n],...<br>
  4870. <br>
  4871. Reading repPeer is formated:<br>
  4872. <ul>
  4873. Number src dst broadcast verify<br>
  4874. number: entry sequence number<br>
  4875. src: message source device - read from repeater<br>
  4876. dst: message destination device - assembled from attributes<br>
  4877. broadcast: shall broadcast be repeated for this source - read from repeater<br>
  4878. verify: do attributes and readings match?<br>
  4879. </ul>
  4880. </li>
  4881. </ul>
  4882. </li>
  4883. <br>
  4884. Debugging:
  4885. <ul>
  4886. <li><B>raw &lt;data&gt; ...</B><br>
  4887. Only needed for experimentation.
  4888. send a list of "raw" commands. The first command will be
  4889. immediately sent, the next one after the previous one is acked by
  4890. the target. The length will be computed automatically, and the
  4891. message counter will be incremented if the first two charcters are
  4892. ++. Example (enable AES):
  4893. <pre>
  4894. set hm1 raw ++A001F100001234560105000000001\
  4895. ++A001F10000123456010802010AF10B000C00\
  4896. ++A001F1000012345601080801\
  4897. ++A001F100001234560106</pre>
  4898. </li>
  4899. </ul>
  4900. </ul>
  4901. </ul>
  4902. <br>
  4903. <a name="CUL_HMget"></a><b>Get</b><br>
  4904. <ul>
  4905. <li><B>configSave &lt;filename&gt;</B><a name="CUL_HMconfigSave"></a><br>
  4906. Saves the configuration of an entity into a file. Data is stored in a
  4907. format to be executed from fhem command prompt.<br>
  4908. The file is located in the fhem home directory aside of fhem.cfg. Data
  4909. will be stored cumulative - i.e. new data will be appended to the
  4910. file. It is up to the user to avoid duplicate storage of the same
  4911. entity.<br>
  4912. Target of the data is ONLY the HM-device information which is located
  4913. IN the HM device. Explicitely this is the peer-list and the register.
  4914. With the register also the peering is included.<br>
  4915. The file is readable and editable by the user. Additionaly timestamps
  4916. are stored to help user to validate.<br>
  4917. Restrictions:<br>
  4918. Even though all data of the entity will be secured to the file FHEM
  4919. stores the data that is avalilable to FHEM at time of save!. It is up
  4920. to the user to read the data from the HM-hardware prior to execution.
  4921. See recommended flow below.<br>
  4922. This command will not store any FHEM attributes o device definitions.
  4923. This continues to remain in fhem.cfg.<br>
  4924. Furthermore the secured data will not automatically be reloaded to the
  4925. HM-hardware. It is up to the user to perform a restore.<br><br>
  4926. As with other commands also 'configSave' is best executed on a device
  4927. rather then on a channel. If executed on a device also the assotiated
  4928. channel data will be secured. <br><br>
  4929. <code>
  4930. Recommended work-order for device 'HMdev':<br>
  4931. set HMdev clear msgEvents # clear old events to better check flow<br>
  4932. set HMdev getConfig # read device & channel inforamtion<br>
  4933. # wait until operation is complete<br>
  4934. # protState should be CMDs_done<br>
  4935. # there shall be no warnings amongst prot... variables<br>
  4936. get configSave myActorFile<br>
  4937. </code>
  4938. </li>
  4939. <li><B>param &lt;paramName&gt;</B><br>
  4940. returns the content of the relevant parameter for the entity. <br>
  4941. Note: if this command is executed on a channel and 'model' is
  4942. requested the content hosting device's 'model' will be returned.
  4943. </li>
  4944. <li><B>reg &lt;addr&gt; &lt;list&gt; &lt;peerID&gt;</B><a name="CUL_HMget_reg"></a><br>
  4945. returns the value of a register. The data is taken from the storage in FHEM and not
  4946. read directly outof the device.
  4947. If register content is not present please use getConfig, getReg in advance.<br>
  4948. &lt;addr&gt; address in hex of the register. Registername can be used alternaly
  4949. if decoded by FHEM. "all" will return all decoded register for this entity in one list.<br>
  4950. &lt;list&gt; list from which the register is taken. If rgistername is used list
  4951. is ignored and can be set to 0.<br>
  4952. &lt;peerID&gt; identifies the registerbank in case of list3 and list4. It an be set to dummy if not used.<br>
  4953. </li>
  4954. <li><B>regVal &lt;addr&gt; &lt;list&gt; &lt;peerID&gt;</B><br>
  4955. returns the value of a register. It does the same as <a href="#CUL_HMget_reg">reg</a> but strips off units<br>
  4956. </li>
  4957. <li><B>regList</B><br>
  4958. returns a list of register that are decoded by FHEM for this device.<br>
  4959. Note that there could be more register implemented for a device.<br>
  4960. </li>
  4961. <li><B>saveConfig &lt;file&gt;</B><a name="CUL_HMsaveConfig"></a><br>
  4962. stores peers and register to the file.<br>
  4963. Stored will be the data as available in fhem. It is necessary to read the information from the device prior to the save.<br>
  4964. The command supports device-level action. I.e. if executed on a device also all related channel entities will be stored implicitely.<br>
  4965. Storage to the file will be cumulative.
  4966. If an entity is stored multiple times to the same file data will be appended.
  4967. User can identify time of storage in the file if necessary.<br>
  4968. Content of the file can be used to restore device configuration.
  4969. It will restore all peers and all register to the entity.<br>
  4970. Constrains/Restrictions:<br>
  4971. prior to rewrite data to an entity it is necessary to pair the device with FHEM.<br>
  4972. restore will not delete any peered channels, it will just add peer channels.<br>
  4973. </li>
  4974. <li><B>listDevice</B><br>
  4975. <ul>
  4976. <li>when used with ccu it returns a list of Devices using the ccu service to assign an IO.<br>
  4977. </li>
  4978. <li>when used with ActionDetector user will get a comma separated list of entities being assigned to the action detector<br>
  4979. get ActionDetector listDevice # returns all assigned entities<br>
  4980. get ActionDetector listDevice notActive# returns entities which habe not status alive<br>
  4981. get ActionDetector listDevice alive # returns entities with status alive<br>
  4982. get ActionDetector listDevice unknown # returns entities with status unknown<br>
  4983. get ActionDetector listDevice dead # returns entities with status dead<br>
  4984. </li>
  4985. </ul>
  4986. </li>
  4987. <li><B>info</B><br>
  4988. <ul>
  4989. <li>provides information about entities using ActionDetector<br>
  4990. </li>
  4991. </ul>
  4992. </li>
  4993. </ul><br>
  4994. <a name="CUL_HMattr"></a><b>Attributes</b>
  4995. <ul>
  4996. <li><a href="#eventMap">eventMap</a></li>
  4997. <li><a href="#do_not_notify">do_not_notify</a></li>
  4998. <li><a href="#ignore">ignore</a></li>
  4999. <li><a href="#dummy">dummy</a></li>
  5000. <li><a href="#showtime">showtime</a></li>
  5001. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  5002. <li><a name="CUL_HMaesCommReq">aesCommReq</a>
  5003. if set HMLAN/USB is forced to request AES signature before sending ACK to the device.<br>
  5004. This funktion strictly works with HMLAN/USB - it doesn't work for CUL type IOs.<br>
  5005. </li>
  5006. <li><a name="#CUL_HMactAutoTry">actAutoTry</a>
  5007. actAutoTry 0_off,1_on<br>
  5008. setting this option enables Action Detector to send a statusrequest in case of a device is going to be marked dead.
  5009. The attribut may be useful in case a device is being checked that does not send messages regularely - e.g. an ordinary switch.
  5010. </li>
  5011. <li><a name="#CUL_HMactCycle">actCycle</a>
  5012. actCycle &lt;[hhh:mm]|off&gt;<br>
  5013. Supports 'alive' or better 'not alive' detection for devices. [hhh:mm] is the maximum silent time for the device.
  5014. Upon no message received in this period an event will be raised "&lt;device&gt; is dead".
  5015. If the device sends again another notification is posted "&lt;device&gt; is alive". <br>
  5016. This actiondetect will be autocreated for each device with build in cyclic status report.<br>
  5017. Controlling entity is a pseudo device "ActionDetector" with HMId "000000".<br>
  5018. Due to performance considerations the report latency is set to 600sec (10min).
  5019. It can be controlled by the attribute "actCycle" of "ActionDetector".<br>
  5020. Once entered to the supervision the HM device has 2 attributes:<br>
  5021. <ul>
  5022. actStatus: activity status of the device<br>
  5023. actCycle: detection period [hhh:mm]<br>
  5024. </ul>
  5025. The overall function can be viewed checking out the "ActionDetector" entity. The status of all entities is present in the READING section.<br>
  5026. Note: This function can be enabled for devices with non-cyclic messages as well. It is up to the user to enter a reasonable cycletime.
  5027. </li>
  5028. <li><a name="#CUL_HMautoReadReg">autoReadReg</a><br>
  5029. '0' autoReadReg will be ignored.<br>
  5030. '1' will execute a getConfig for the device automatically after each reboot of FHEM. <br>
  5031. '2' like '1' plus execute after power_on.<br>
  5032. '3' includes '2' plus updates on writes to the device<br>
  5033. '4' includes '3' plus tries to request status if it seems to be missing<br>
  5034. '5' checks reglist and peerlist. If reading seems incomplete getConfig will be scheduled<br>
  5035. '8_stateOnly' will only update status information but not configuration
  5036. data like register and peer<br>
  5037. Execution will be delayed in order to prevent congestion at startup. Therefore the update
  5038. of the readings and the display will be delayed depending on the size of the database.<br>
  5039. Recommendations and constrains upon usage:<br>
  5040. <ul>
  5041. use this attribute on the device or channel 01. Do not use it separate on each channel
  5042. of a multi-channel device to avoid duplicate execution<br>
  5043. usage on devices which only react to 'config' mode is not recommended since executen will
  5044. not start until config is triggered by the user<br>
  5045. usage on devices which support wakeup-mode is usefull. But consider that execution is delayed
  5046. until the device "wakes up".<br>
  5047. </ul>
  5048. </li>
  5049. <li><a name="#CUL_HMburstAccess">burstAccess</a><br>
  5050. can be set for the device entity if the model allowes conditionalBurst.
  5051. The attribut will switch off burst operations (0_off) which causes less message load
  5052. on HMLAN and therefore reduces the chance of HMLAN overload.<br>
  5053. Setting it on (1_auto) allowes shorter reaction time of the device. User does not
  5054. need to wait for the device to wake up. <br>
  5055. Note that also the register burstRx needs to be set in the device.</li>
  5056. <li><a name="#CUL_HMexpert">expert</a><br>
  5057. This attribut controls the visibility of the register readings. This attibute controls
  5058. the presentation of device parameter in the readings.<br>
  5059. it is a binary coded number with following presets:<br>
  5060. <ul>
  5061. 0_defReg : default register<br>
  5062. 1_allReg : all register<br>
  5063. 2_defReg+raw : default register and raw reading<br>
  5064. 3_allReg+raw : all register and raw reading<br>
  5065. 4_off : no register<br>
  5066. 8_templ+default: templates and default register<br>
  5067. 12_templOnly : templates only<br>
  5068. 251_anything : anything available<br>
  5069. </ul>
  5070. If expert is applied a device it is used for assotiated channels.
  5071. It can be overruled if expert attibute is also applied to the channel device.<br>
  5072. Make sure to check out attribut showInternalValues in the global values as well.
  5073. extert takes benefit of the implementation.
  5074. Nevertheless - by definition - showInternalValues overrules expert.
  5075. </li>
  5076. <li><a name="#CUL_HMreadOnly">readOnly</a><br>
  5077. restircts commands to read od observ only.
  5078. </li>
  5079. <li><a name="#CUL_HMIOgrp">IOgrp</a><br>
  5080. can be given to devices and shall point to a virtual CCU. As a consequence the
  5081. CCU will take care of the assignment to the best suitable IO. It is necessary that a
  5082. virtual CCU is defined and all relevant IO devices are assigned to it. Upon sending the CCU will
  5083. check which IO is operational and has the best RSSI performance for this device.<br>
  5084. Optional a prefered IO - perfIO can be given. In case this IO is operational it will be selected regardless
  5085. of rssi values. <br>
  5086. If none is detected in the prefIO list the mechanism is stopped and the IO as of IOdev is assigned<br>
  5087. Example:<br>
  5088. <ul><code>
  5089. attr myDevice1 IOgrp vccu<br>
  5090. attr myDevice2 IOgrp vccu:prefIO<br>
  5091. attr myDevice2 IOgrp vccu:prefIO1,prefIO2,prefIO3<br>
  5092. attr myDevice2 IOgrp vccu:prefIO1,prefIO2,none<br>
  5093. </code></ul>
  5094. </li>
  5095. <li><a name="#CUL_HMlevelRange">levelRange</a><br>
  5096. can be used with dimmer only. It defines the dimmable range to be used with this dimmer-channel.
  5097. It is meant to support e.g. LED light that starts at 10% and reaches maxbrightness at 40%.
  5098. levelrange will normalize the level to this range. I.e. set to 100% will physically set the
  5099. dimmer to 40%, 1% will set to 10% physically. 0% still switches physially off.<br>
  5100. Impacted are commands on, up, down, toggle and pct. <b>Not</b> effected is the off command
  5101. which still set physically 0%.<br>
  5102. To be considered:<br>
  5103. dimmer level set by peers and buttons is not impacted. Those are controlled by device register<br>
  5104. Readings level may go to negative or above 100%. This simply results from the calculation and reflects
  5105. physical level is above or below the given range.<br>
  5106. In case of virtual dimmer channels available present the attribut needs to be set for
  5107. each channel<br>
  5108. User should be careful to set min level other then '0'<br>
  5109. Example:<br>
  5110. <ul><code>
  5111. attr myChannel levelRange 0,40<br>
  5112. attr myChannel levelRange 10,80<br>
  5113. </code></ul>
  5114. </li>
  5115. <li><a name="#CUL_HMmodel">model</a>,
  5116. <a name="subType">subType</a><br>
  5117. These attributes are set automatically after a successful pairing.
  5118. They are not supposed to be set by hand, and are necessary in order to
  5119. correctly interpret device messages or to be able to send them.</li>
  5120. <li><a name="#CUL_HMmsgRepeat">msgRepeat</a><br>
  5121. defines number of repetitions if a device doesn't answer in time. <br>
  5122. Devices which donly support config mode no repeat ist allowed. <br>
  5123. For devices with wakeup mode the device will wait for next wakeup. Lonng delay might be
  5124. considered in this case. <br>
  5125. Repeat for burst devices will impact HMLAN transmission capacity.</li>
  5126. <li><a name="#CUL_HMparam">param</a><br>
  5127. param defines model specific behavior or functions. See <a href="#CUL_HMparams"><b>available parameter</b></a> for details</li>
  5128. <li><a name="#CUL_HMrawToReadable">rawToReadable</a><br>
  5129. Used to convert raw KFM100 values to readable data, based on measured
  5130. values. E.g. fill slowly your container, while monitoring the
  5131. values reported with <a href="#inform">inform</a>. You'll see:
  5132. <ul>
  5133. 10 (at 0%)<br>
  5134. 50 (at 20%)<br>
  5135. 79 (at 40%)<br>
  5136. 270 (at 100%)<br>
  5137. </ul>
  5138. Apply these values with: "attr KFM100 rawToReadable 10:0 50:20 79:40 270:100".
  5139. fhem will do a linear interpolation for values between the bounderies.
  5140. </li>
  5141. <li><a name="#CUL_HMrssiLog">rssiLog</a><br>
  5142. can be given to devices, denied for channels. If switched '1' each RSSI entry will be
  5143. written to a reading. User may use this to log and generate a graph of RSSI level.<br>
  5144. Due to amount of readings and events it is NOT RECOMMENDED to switch it on by default.
  5145. </li>
  5146. <li><a name="#CUL_HMtempListTmpl">tempListTmpl</a><br>
  5147. Sets the default template for a heating controller. If not given the detault template is taken from
  5148. file tempList.cfg using the enitity name as template name (e.g. ./tempLict.cfg:RT1_Clima <br>
  5149. To avoid template usage set this attribut to '0'.<br>
  5150. Format is &lt;file&gt;:&lt;templatename&gt;. lt
  5151. </li>
  5152. <li><a name="unit">unit</a><br>
  5153. set the reported unit by the KFM100 if rawToReadable is active. E.g.<br>
  5154. attr KFM100 unit Liter
  5155. </li>
  5156. <li><a name="cyclicMsgOffset">cyclicMsgOffset</a><br>
  5157. when calculating the timestamp for sending the next cyclic message (e.g. weather or valve data) then the value of this attribute<br>
  5158. in milliseconds is added to the result. So adjusting this might fix problems for example when weather messages of virtual devices are not received reliably
  5159. </li>
  5160. </ul> <br>
  5161. <a name="CUL_HMparams"><b>available parameter for attribut "param"</b></a>
  5162. <ul>
  5163. <li><B>HM-Sen-RD-O</B><br>
  5164. <B>offAtPon</B> heat channel only: force heating off after powerOn<br>
  5165. <B>onAtRain</B> heat channel only: force heating on while status changes to 'rain' and off when it changes to 'dry'<br>
  5166. </li>
  5167. <li><B>virtuals</B><br>
  5168. <B>noOnOff</B> virtual entity will not toggle state when trigger is received. If this parameter is
  5169. not given the entity will toggle its state between On and Off with each trigger<br>
  5170. <B>msgReduce:&lt;No&gt;</B> if channel is used for <a ref="CUL_HMvalvePos"></a> it skips every No message
  5171. in order to reduce transmit load. Numbers from 0 (no skip) up to 9 can be given.
  5172. VD will lose connection with more then 5 skips<br>
  5173. </li>
  5174. <li><B>blind</B><br>
  5175. <B>levelInverse</B> while HM considers 100% as open and 0% as closed this may not be
  5176. intuitive to all user. Ny default 100% is open and will be dislayed as 'on'. Setting this param the display will be inverted - 0% will be open and 100% is closed.<br>
  5177. NOTE: This will apply to readings and set commands. <B>It does not apply to any register. </B><br>
  5178. <B>ponRestoreSmart</B> upon powerup of the device the Blind will drive to expected closest endposition followed by driving to the pre-PON level<br>
  5179. <B>ponRestoreForce</B> upon powerup of the device the Blind will drive to level 0, then to level 100 followed by driving to the pre-PON level<br>
  5180. </li>
  5181. <li><B>sensRain</B><br>
  5182. <B>siren</B><br>
  5183. <B>powerMeter</B><br>
  5184. <B>switch</B><br>
  5185. <B>dimmer</B><br>
  5186. <B>rgb</B><br>
  5187. <B>showTimed</B> if timmed is running -till will be added to state.
  5188. This results eventually in state on-till which allowes better icon handling.<br>
  5189. </li>
  5190. </ul><br>
  5191. <a name="CUL_HMevents"><b>Generated events:</b></a>
  5192. <ul>
  5193. <li><B>general</B><br>
  5194. recentStateType:[ack|info] # cannot be used ti trigger notifies<br>
  5195. <ul>
  5196. <li>ack indicates that some statusinfo is derived from an acknowledge</li>
  5197. <li>info indicates an autonomous message from the device</li>
  5198. <li><a name="CUL_HMsabotageAttackId"><b>sabotageAttackId</b></a><br>
  5199. Alarming configuration access to the device from a unknown source<br></li>
  5200. <li><a name="CUL_HMsabotageAttack"><b>sabotageAttack</b></a><br>
  5201. Alarming configuration access to the device that was not issued by our system<br></li>
  5202. <li><a name="CUL_HMtrigDst"><b>trigDst_&lt;name&gt;: noConfig</b></a><br>
  5203. A sensor triggered a Device which is not present in its peerList. Obviously the peerList is not up to date<br></li>
  5204. </ul>
  5205. </li>
  5206. <li><B>HM-CC-TC,ROTO_ZEL-STG-RM-FWT</B><br>
  5207. T: $t H: $h<br>
  5208. battery:[low|ok]<br>
  5209. measured-temp $t<br>
  5210. humidity $h<br>
  5211. actuator $vp %<br>
  5212. desired-temp $dTemp<br>
  5213. desired-temp-manu $dTemp #temperature if switchen to manual mode<br>
  5214. desired-temp-cent $dTemp #temperature if switchen to central mode<br>
  5215. windowopen-temp-%d %.1f (sensor:%s)<br>
  5216. tempList$wd hh:mm $t hh:mm $t ...<br>
  5217. displayMode temp-[hum|only]<br>
  5218. displayTemp [setpoint|actual]<br>
  5219. displayTempUnit [fahrenheit|celsius]<br>
  5220. controlMode [auto|manual|central|party]<br>
  5221. tempValveMode [Auto|Closed|Open|unknown]<br>
  5222. param-change offset=$o1, value=$v1<br>
  5223. ValveErrorPosition_for_$dname $vep %<br>
  5224. ValveOffset_for_$dname : $of %<br>
  5225. ValveErrorPosition $vep %<br>
  5226. ValveOffset $of %<br>
  5227. time-request<br>
  5228. trig_&lt;src&gt; &lt;value&gt; #channel was triggered by &lt;src&gt; channel.
  5229. This event relies on complete reading of channels configuration, otherwise Data can be
  5230. incomplete or incorrect.<br>
  5231. trigLast &lt;channel&gt; #last receiced trigger<br>
  5232. </li>
  5233. <li><B>HM-CC-RT-DN and HM-CC-RT-DN-BoM</B><br>
  5234. state:T: $actTemp desired: $setTemp valve: $vp %<br>
  5235. motorErr: [ok|ValveTight|adjustRangeTooLarge|adjustRangeTooSmall|communicationERR|unknown|lowBat|ValveErrorPosition]
  5236. measured-temp $actTemp<br>
  5237. desired-temp $setTemp<br>
  5238. ValvePosition $vp %<br>
  5239. mode [auto|manual|party|boost]<br>
  5240. battery [low|ok]<br>
  5241. batteryLevel $bat V<br>
  5242. measured-temp $actTemp<br>
  5243. desired-temp $setTemp<br>
  5244. actuator $vp %<br>
  5245. time-request<br>
  5246. trig_&lt;src&gt; &lt;value&gt; #channel was triggered by &lt;src&gt; channel.
  5247. </li>
  5248. <li><B>HM-CC-VD,ROTO_ZEL-STG-RM-FSA</B><br>
  5249. $vp %<br>
  5250. battery:[critical|low|ok]<br>
  5251. motorErr:[ok|blocked|loose|adjusting range too small|opening|closing|stop]<br>
  5252. ValvePosition:$vp %<br>
  5253. ValveErrorPosition:$vep %<br>
  5254. ValveOffset:$of %<br>
  5255. ValveDesired:$vp % # set by TC <br>
  5256. operState:[errorTargetNotMet|onTarget|adjusting|changed] # operational condition<br>
  5257. operStateErrCnt:$cnt # number of failed settings<br>
  5258. </li>
  5259. <li><B>HM-CC-SCD</B><br>
  5260. [normal|added|addedStrong]<br>
  5261. battery [low|ok]<br>
  5262. </li>
  5263. <li><B>HM-SEC-SFA-SM</B><br>
  5264. powerError [on|off]<br>
  5265. sabotageError [on|off]<br>
  5266. battery: [critical|low|ok]<br>
  5267. </li>
  5268. <li><B>HM-LC-BL1-PB-FM</B><br>
  5269. motor: [opening|closing]<br>
  5270. </li>
  5271. <li><B>HM-LC-SW1-BA-PCB</B><br>
  5272. battery: [low|ok]<br>
  5273. </li>
  5274. <li><B>HM-OU-LED16</B><br>
  5275. color $value # hex - for device only<br>
  5276. $value # hex - for device only<br>
  5277. color [off|red|green|orange] # for channel <br>
  5278. [off|red|green|orange] # for channel <br>
  5279. </li>
  5280. <li><B>HM-OU-CFM-PL</B><br>
  5281. [on|off|$val]<br>
  5282. </li>
  5283. <li><B>HM-Sen-Wa-Od</B><br>
  5284. $level%<br>
  5285. level $level%<br>
  5286. </li>
  5287. <li><B>KFM100</B><br>
  5288. $v<br>
  5289. $cv,$unit<br>
  5290. rawValue:$v<br>
  5291. Sequence:$seq<br>
  5292. content:$cv,$unit<br>
  5293. </li>
  5294. <li><B>KS550/HM-WDS100-C6-O</B><br>
  5295. T: $t H: $h W: $w R: $r IR: $ir WD: $wd WDR: $wdr S: $s B: $b<br>
  5296. temperature $t<br>
  5297. humidity $h<br>
  5298. windSpeed $w<br>
  5299. windDirection $wd<br>
  5300. windDirRange $wdr<br>
  5301. rain $r<br>
  5302. isRaining $ir<br>
  5303. sunshine $s<br>
  5304. brightness $b<br>
  5305. unknown $p<br>
  5306. </li>
  5307. <li><B>HM-Sen-RD-O</B><br>
  5308. lastRain: timestamp # no trigger generated. Begin of previous Rain -
  5309. timestamp of the reading is the end of rain. <br>
  5310. </li>
  5311. <li><B>THSensor and HM-WDC7000</B><br>
  5312. T: $t H: $h AP: $ap<br>
  5313. temperature $t<br>
  5314. humidity $h<br>
  5315. airpress $ap #HM-WDC7000 only<br>
  5316. </li>
  5317. <li><B>dimmer</B><br>
  5318. overload [on|off]<br>
  5319. overheat [on|off]<br>
  5320. reduced [on|off]<br>
  5321. dim: [up|down|stop]<br>
  5322. </li>
  5323. <li><B>motionDetector</B><br>
  5324. brightness:$b<br>
  5325. alive<br>
  5326. motion on (to $dest)<br>
  5327. motionCount $cnt _next:$nextTr"-"[0x0|0x1|0x2|0x3|15|30|60|120|240|0x9|0xa|0xb|0xc|0xd|0xe|0xf]<br>
  5328. cover [closed|open] # not for HM-Sec-MDIR<br>
  5329. sabotageError [on|off] # only HM-Sec-MDIR<br>
  5330. battery [low|ok]<br>
  5331. devState_raw.$d1 $d2<br>
  5332. </li>
  5333. <li><B>remote/pushButton/outputUnit</B><br>
  5334. <ul> (to $dest) is added if the button is peered and does not send to broadcast<br>
  5335. Release is provided for peered channels only</ul>
  5336. Btn$x onShort<br>
  5337. Btn$x offShort<br>
  5338. Btn$x onLong $counter<br>
  5339. Btn$x offLong $counter<br>
  5340. Btn$x onLongRelease $counter<br>
  5341. Btn$x offLongRelease $counter<br>
  5342. Btn$x onShort (to $dest)<br>
  5343. Btn$x offShort (to $dest)<br>
  5344. Btn$x onLong $counter (to $dest)<br>
  5345. Btn$x offLong $counter (to $dest)<br>
  5346. Btn$x onLongRelease $counter (to $dest)<br>
  5347. Btn$x offLongRelease $counter (to $dest)<br>
  5348. </li>
  5349. <li><B>remote/pushButton</B><br>
  5350. battery [low|ok]<br>
  5351. trigger [Long|Short]_$no trigger event from channel<br>
  5352. </li>
  5353. <li><B>swi</B><br>
  5354. Btn$x Short<br>
  5355. Btn$x Short (to $dest)<br>
  5356. battery: [low|ok]<br>
  5357. </li>
  5358. <li><B>switch/dimmer/blindActuator</B><br>
  5359. $val<br>
  5360. powerOn [on|off|$val]<br>
  5361. [unknown|motor|dim] [up|down|stop]:$val<br>
  5362. timedOn [running|off]<br> # on is temporary - e.g. started with on-for-timer
  5363. </li>
  5364. <li><B>sensRain</B><br>
  5365. $val<br>
  5366. powerOn <br>
  5367. level &lt;val&ge;<br>
  5368. timedOn [running|off]<br> # on is temporary - e.g. started with on-for-timer
  5369. trigger [Long|Short]_$no trigger event from channel<br>
  5370. </li>
  5371. <li><B>smokeDetector</B><br>
  5372. [off|smoke-Alarm|alive] # for team leader<br>
  5373. [off|smoke-forward|smoke-alarm] # for team members<br>
  5374. [normal|added|addedStrong] #HM-CC-SCD<br>
  5375. SDteam [add|remove]_$dname<br>
  5376. battery [low|ok]<br>
  5377. smoke_detect [none|&lt;src&gt;]<br>
  5378. teamCall:from $src<br>
  5379. </li>
  5380. <li><B>threeStateSensor</B><br>
  5381. [open|tilted|closed]<br>
  5382. [wet|damp|dry] #HM-SEC-WDS only<br>
  5383. cover [open|closed] #HM-SEC-WDS and HM-Sec-RHS<br>
  5384. alive yes<br>
  5385. battery [low|ok]<br>
  5386. contact [open|tilted|closed]<br>
  5387. contact [wet|damp|dry] #HM-SEC-WDS only<br>
  5388. sabotageError [on|off] #HM-SEC-SC only<br>
  5389. </li>
  5390. <li><B>winMatic</B><br>
  5391. [locked|$value]<br>
  5392. motorErr [ok|TurnError|TiltError]<br>
  5393. direction [no|up|down|undefined]<br>
  5394. charge [trickleCharge|charge|dischange|unknown]<br>
  5395. airing [inactiv|$air]<br>
  5396. course [tilt|close]<br>
  5397. airing [inactiv|$value]<br>
  5398. contact tesed<br>
  5399. </li>
  5400. <li><B>keyMatic</B><br>
  5401. unknown:40<br>
  5402. battery [low|ok]<br>
  5403. uncertain [yes|no]<br>
  5404. error [unknown|motor aborted|clutch failure|none']<br>
  5405. lock [unlocked|locked]<br>
  5406. [unlocked|locked|uncertain]<br>
  5407. </li>
  5408. </ul>
  5409. <a name="CUL_HMinternals"><b>Internals</b></a>
  5410. <ul>
  5411. <li><B>aesCommToDev</B><br>
  5412. gives information about success or fail of AES communication between IO-device and HM-Device<br>
  5413. </li>
  5414. </ul><br>
  5415. <br>
  5416. </ul>
  5417. <a name="CUL_HOERMANN"></a>
  5418. <h3>CUL_HOERMANN</h3>
  5419. <ul>
  5420. The CUL_HOERMANN module registers the 868MHz Hoermann Garage-Door-Opener
  5421. signals received by the CUL. <b>Note</b>: As the structure of this signal is
  5422. not understood, no checksum is verified, so it is likely to receive bogus
  5423. messages.
  5424. <br><br>
  5425. <a name="CUL_HOERMANNdefine"></a>
  5426. <b>Define</b>
  5427. <ul>
  5428. <code>define &lt;name&gt; CUL_HOERMANN &lt;10-digit-hex-code&gt;</code>
  5429. <br>
  5430. </ul>
  5431. <br>
  5432. <a name="CUL_HOERMANNset"></a>
  5433. <b>Set</b>
  5434. <ul>
  5435. <li>toggle<br>
  5436. Send a signal, which, depending on the status of the door, opens it,
  5437. closes it or stops the current movement. NOTE: needs culfw 1.67+
  5438. </li>
  5439. </ul><br>
  5440. <a name="CUL_HOERMANNget"></a>
  5441. <b>Get</b> <ul>N/A</ul><br>
  5442. <a name="CUL_HOERMANNattr"></a>
  5443. <b>Attributes</b>
  5444. <ul>
  5445. <li><a href="#do_not_notify">do_not_notify</a></li>
  5446. <li><a href="#showtime">showtime</a></li>
  5447. <li><a href="#IODev">IODev</a></li>
  5448. <li><a href="#disable">disable</a></li>
  5449. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  5450. </ul>
  5451. <br>
  5452. </ul>
  5453. <a name="CUL_IR"></a>
  5454. <h3>CUL_IR</h3>
  5455. <ul>
  5456. The CUL_IR module interprets Infrared messages received by the CUN/CUNO/CUNOv2/TuxRadio.
  5457. Those devices can receive Infrared Signals from basically any Remote controller and will transform
  5458. that information in a so called Button-Code <br><br>
  5459. <a name="CUL_IRdefine"></a>
  5460. <b>Define</b>
  5461. <ul>
  5462. <code>define &lt;name&gt; CUL_IR &lt;<a href="#IODev">IODev</a>&gt;</code> <br>
  5463. <br>
  5464. &lt;<a href="#IODev">IODev</a>&gt; is the devicename of the IR-receivung device, e.g. CUNO1.<br><br>
  5465. Your definition should look like E.g.:
  5466. <pre>
  5467. define IR-Dev CUL_IR CUNO1</pre>
  5468. </ul>
  5469. <a name="CUL_IRset"></a>
  5470. <b>Set</b>
  5471. <ul>
  5472. <a name="irLearnForSec"></a>
  5473. <li>irLearnForSec<br>
  5474. Sets the CUL_IR device in an IR-Code Learning mode for the given seconds. Any received IR-Code will
  5475. be stored as a Button attribute for this devices. The name of these attributes is dependent on the two
  5476. attributes <a href="#CUL_IRattr">learncount</a> and <a href="#CUL_IRattr">learnprefix</a>.<br>
  5477. Attention: Before learning IR-Codes the CUL_IR device needs to be set in IR-Receiving mode
  5478. by modifying the <a href="#irReceive">irReceive</a> attribute.
  5479. </li>
  5480. <a name="irSend"></a>
  5481. <li>irSend<br>
  5482. Sends out IR-commands via the connected IODev. The IR-command can be specified as buttonname according
  5483. to <a href="#Button.*">Button.*</a> or as IR-Code directly. If a buttonname is specified, the
  5484. corresponding IR-Code will be sent out.<br>
  5485. Example: <br>
  5486. <pre>set IR-Dev irSend ButtonA001 </pre>
  5487. If defining an IR-Code directly the following Code-Syntax needs to be followed:<br>
  5488. <pre>IRCode: &lt;PP&gt;&lt;AAAA&gt;&lt;CCCC&gt;&lt;FF&gt; </pre>
  5489. with P = Protocol; A = Address; C = Command; F = Flags<br>
  5490. With the Flags you can modify IR-Repetition. Flags between 00-0E will produce
  5491. 0-15 IR-Repetitions.
  5492. You can type the IR-Code as plain as above, or with a heading "I" as learnt for the buttons.<br>
  5493. Example: <br>
  5494. <code>set IR-Dev irSend 0A07070F0F02<br>
  5495. set IR-Dev irSend I0A07070F0F00 </code>
  5496. </li>
  5497. </ul>
  5498. <a name="CUL_IRget"></a>
  5499. <b>Get</b>
  5500. <ul>N/A</ul>
  5501. <a name="CUL_IRattr"></a>
  5502. <b>Attributes</b>
  5503. <ul>
  5504. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  5505. <li><a href="#showtime">showtime</a></li><br>
  5506. <li><a href="#loglevel">loglevel</a></li><br>
  5507. <li><a href="#irReceive">irReceive</a><br>
  5508. Configure the IR Transceiver of the &lt;<a href="#IODev">IODev</a>&gt; (the CUNO1). Available
  5509. arguments are:
  5510. <ul>
  5511. <li>OFF<br>
  5512. Switching off the reception of IR signals. This is the default.</li>
  5513. <li>ON<br>
  5514. Switching on the reception of IR signals. This is WITHOUT filtering repetitions. This is
  5515. not recommended as many remote controls do repeat their signals.</li>
  5516. <li>ON_NR<br>
  5517. Switching on the reception of IR signals with filtering of repetitions. This is
  5518. the recommended modus operandi.</li>
  5519. </ul>
  5520. </li><br>
  5521. <li><a name="Button.*"></a>Button.*<br>
  5522. Button.* is the wildcard for all learnt IR-Codes. IR-Codes are learnt as Button-Attributes.
  5523. The name for a learnt Button - IR-Code is compiled out of three elements:<br>
  5524. <pre>
  5525. Button&lt;learnprefix&gt;&lt;learncount&gt;
  5526. </pre>
  5527. When the CUL_IR device is set into <a href="#irLearnForSec">learning mode</a> it will generate a
  5528. new button-attribute for each new IR-Code received.This is done according to the following syntax:<br>
  5529. <pre>
  5530. &lt;Button-Attribute-Name&gt; &lt;IR-Code&gt;</pre>
  5531. Examples of learnt button-attributes with EMPTY &lt;learnprefix&gt; and &lt;learncount&gt; starting from 1:<br>
  5532. <pre>
  5533. Button001 I02029A000000
  5534. Button002 I02029A000001</pre>
  5535. To make sure that something happens when this IR-code is received later on one has to modify the attribute
  5536. and to add commands as attribute values.
  5537. Examples:
  5538. <pre>
  5539. Button001 I02029A000000 set WZ_Lamp on
  5540. Button002 I02029A000001 set Switch on</pre>
  5541. The syntax for this is:
  5542. <pre>
  5543. attr &lt;device-name&gt; &lt;attribute-name&gt; &lt;IR-Code&gt; &lt;command&gt;
  5544. </pre>
  5545. </li>
  5546. <li><a name="Group.*"></a>Group.*<br>
  5547. Group.* is the wildcard for IR-Code groups. With these attributes one can define
  5548. IR-Code parts, which may match to several Button-IR-Codes.<br>
  5549. This is done by defining group-attributes that contain only parts of the IR-Code.
  5550. The syntax is:
  5551. <pre>
  5552. &lt;Group-Attribute-Name&gt; &lt;IR-Code&gt;</pre>
  5553. Examples of a group-attribute is:<br>
  5554. <pre>
  5555. Group001 I02029A</pre>
  5556. With this all IR-Codes starting with I02029A will match the Group001.
  5557. </li><br>
  5558. <li><a name="learncount"></a>learncount<br>
  5559. learncount is used to store the next button-code-number that needs to be learned.
  5560. By manually modifying this attribute new button sequences can be arranged.
  5561. </li><br>
  5562. <li><a name="learnprefix"></a>learnprefix<br>
  5563. learnprefix is a string which will be added to the button-attribute-name. <br>
  5564. A button-attribute-name is constructed by:
  5565. <pre>
  5566. Button&lt;learnprefix&gt;&lt;learncount&gt; </pre>
  5567. If learnprefix is empty the button-attribute-name only contains the term
  5568. "Button" and the actual number of <a href="#learncount">learncount</a>.
  5569. </li><br>
  5570. </ul>
  5571. <br>
  5572. </ul>
  5573. <a name="CUL_MAX"></a>
  5574. <h3>CUL_MAX</h3>
  5575. <ul>
  5576. The CUL_MAX module interprets MAX! messages received by the CUL. It will be automatically created by autocreate, just make sure
  5577. that you set the right rfmode like <code>attr CUL0 rfmode MAX</code>.<br>
  5578. <br><br>
  5579. <a name="CUL_MAXdefine"></a>
  5580. <b>Define</b>
  5581. <ul>
  5582. <code>define &lt;name&gt; CUL_MAX &lt;addr&gt;</code>
  5583. <br><br>
  5584. Defines an CUL_MAX device of type &lt;type&gt; and rf address &lt;addr&gt. The rf address
  5585. must not be in use by any other MAX device.
  5586. </ul>
  5587. <br>
  5588. <a name="CUL_MAXset"></a>
  5589. <b>Set</b>
  5590. <ul>
  5591. <li>pairmode<br>
  5592. Sets the CUL_MAX into pairing mode for 60 seconds where it can be paired with
  5593. other devices (Thermostats, Buttons, etc.). You also have to set the other device
  5594. into pairing mode manually. (For Thermostats, this is pressing the "Boost" button
  5595. for 3 seconds, for example).</li>
  5596. <li>fakeSC &lt;device&gt; &lt;open&gt;<br>
  5597. Sends a fake ShutterContactState message &lt;open&gt; must be 0 or 1 for
  5598. "window closed" or "window opened". If the &lt;device&gt; has a non-zero groupId,
  5599. the fake ShutterContactState message affects all devices with that groupId.
  5600. Make sure you associate the target device(s) with fakeShutterContact beforehand.</li>
  5601. <li>fakeWT &lt;device&gt; &lt;desiredTemperature&gt; &lt;measuredTemperature&gt;<br>
  5602. Sends a fake WallThermostatControl message (parameters both may have one digit
  5603. after the decimal point, for desiredTemperature it may only by 0 or 5).
  5604. If the &lt;device&gt; has a non-zero groupId, the fake WallThermostatControl
  5605. message affects all devices with that groupId. Make sure you associate the target
  5606. device with fakeWallThermostat beforehand.</li>
  5607. </ul>
  5608. <br>
  5609. <a name="CUL_MAXget"></a>
  5610. <b>Get</b> <ul>N/A</ul><br>
  5611. <a name="CUL_MAXattr"></a>
  5612. <b>Attributes</b>
  5613. <ul>
  5614. <li><a href="#ignore">ignore</a></li><br>
  5615. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  5616. <li><a href="#showtime">showtime</a></li><br>
  5617. <li><a href="#loglevel">loglevel</a></li><br>
  5618. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  5619. </ul>
  5620. <br>
  5621. <a name="CUL_MAXevents"></a>
  5622. <b>Generated events:</b>
  5623. <ul>N/A</ul>
  5624. <br>
  5625. </ul>
  5626. <a name="CUL_REDIRECT"></a>
  5627. <h3>CUL_REDIRECT</h3>
  5628. <ul>
  5629. The CUL_REDIRECT modul receive additional protocols from CUL<br>
  5630. and redirect them to other modules.
  5631. <br>
  5632. <a name="CUL_REDIRECT_Parse"></a>
  5633. </ul>
  5634. <a name="CUL_RFR"></a>
  5635. <h3>CUL_RFR</h3>
  5636. <ul>
  5637. <table>
  5638. <tr><td>
  5639. The CUL_RFR module is used to "attach" a second CUL to your base CUL, and
  5640. use it as a repeater / range extender. RFR is shorthand for RF_ROUTER.
  5641. Transmission of the data uses the CC1101 packet capabilities with GFSK
  5642. modulation at 250kBaud after pinging the base CUL at the usual 1kBaud. After
  5643. configured, the RFR device can be used like another CUL connected directly to
  5644. FHEM.<br>
  5645. In theory every SlowRF protocol should work, as the hook is implemented in
  5646. the culfw output routine: instead of sending the data to the USB-Interface it
  5647. is transmitted via radio to the base CUL. There are still some restrictions:
  5648. <ul>
  5649. <li>due to the ping both CULs have to be in SlowRF mode, and use the same
  5650. parameters (freq, bwidth, etc).</li>
  5651. <li>the logical module handling the protocol is not allowed to access the
  5652. routines of the IODev (i.e. CUL) directly.</li>
  5653. </ul>
  5654. Tested protocols are FHT, FS20, EM, HMS, S300.<br>
  5655. Since there is no ack or a resend mechanism, it should be primarily used to
  5656. forward "unimportant" data, it was developed for forwading KS300 packets.
  5657. <br><br>
  5658. Before you can use this feature in fhem, you have to enable/configure RF
  5659. ROUTING in both CUL's:
  5660. <ul>
  5661. <li>First give your base CUL (which remains connected to the PC) an RFR ID
  5662. by issuing the fhem command "set MyCUL raw ui0100". With this command
  5663. the base CUL will get the ID 01, and it will not relay messages to other
  5664. CUL's (as the second number is 00).</li>
  5665. <li>Now replace the base CUL with the RFR CUL, and set its id by issuing
  5666. the fhem command "set MyCUL raw ui0201". Now remove this CUL and attach the
  5667. original, base CUL again. The RFR CUL got the id 02, and will relay every
  5668. message to the base CUL with id 01.</li>
  5669. <li>Take the RFR CUL, and attach it to an USB power supply, as seen on
  5670. the image. As the configured base id is not 00, it will activate RF
  5671. reception on boot, and will start sending messages to the base CUL.</li>
  5672. <li>Now you have to define this RFR cul as a fhem device:</li>
  5673. </ul>
  5674. </td><td>
  5675. <img src="cul_rfr.jpg"/>
  5676. </td></tr>
  5677. </table>
  5678. <br>
  5679. <a name="CUL_RFRdefine"></a>
  5680. <b>Define</b>
  5681. <ul>
  5682. <code>define &lt;name&gt; CUL_RFR &lt;own-id&gt; &lt;base-id&gt;</code> <br>
  5683. <br>
  5684. &lt;own-id&gt; is the id of the RFR CUL <b>not</b> connected to the PC,
  5685. &lt;base-id&gt; is the id of the CUL connected to the PC. Both parameters
  5686. have two characters, each representing a one byte hex number.<br>
  5687. Example:
  5688. <ul>
  5689. <code>set MyCUL raw ui0100</code><br>
  5690. # Now replace the base CUL with the RFR CUL<br>
  5691. <code>set MyCUL raw ui0201</code><br>
  5692. # Reattach the base CUL to the PC and attach the RFR CUL to a
  5693. USB power supply<br>
  5694. <code>define MyRFR CUL_RFR 02 01</code><br>
  5695. </ul>
  5696. </ul> <br>
  5697. <a name="CUL_RFRset"></a>
  5698. <b>Set</b> <ul>Same as for the <a href="#CULset">CUL</a>.</ul><br>
  5699. <a name="CUL_RFRget"></a>
  5700. <b>Get</b> <ul>Same as for the <a href="#CULget">CUL</a>.</ul><br>
  5701. <a name="CUL_RFRattr"></a>
  5702. <b>Attributes</b>
  5703. <ul>
  5704. <li><a href="#ignore">ignore</a></li><br>
  5705. <li><a href="#IODev">IODev</a></li><br>
  5706. The rest of the attributes is the same as for the <a href="#CUL">CUL</a>.</ul><br>
  5707. </ul>
  5708. <br>
  5709. <a name="CUL_TCM97001"></a>
  5710. <h3>CUL_TCM97001</h3>
  5711. <ul>
  5712. The CUL_TCM97001 module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
  5713. <br>
  5714. <b>Supported models:</b>
  5715. <ul>
  5716. <li>TCM97...</li>
  5717. <li>ABS700</li>
  5718. <li>TCM21....</li>
  5719. <li>Prologue</li>
  5720. <li>Rubicson</li>
  5721. <li>NC_WS</li>
  5722. <li>GT_WT_02</li>
  5723. <li>AURIOL</li>
  5724. <li>Eurochron</li>
  5725. <li>KW9010</li>
  5726. </ul>
  5727. <br>
  5728. New received device packages are add in fhem category CUL_TCM97001 with autocreate.
  5729. <br><br>
  5730. <a name="CUL_TCM97001_Define"></a>
  5731. <b>Define</b>
  5732. <ul>The received devices created automatically.<br>
  5733. The ID of the defive are the first two Hex values of the package as dezimal.<br>
  5734. </ul>
  5735. <br>
  5736. <a name="CUL_TCM97001 Events"></a>
  5737. <b>Generated events:</b>
  5738. <ul>
  5739. <li>temperature: The temperature</li>
  5740. <li>humidity: The humidity (if available)</li>
  5741. <li>battery: The battery state: low or ok (if available)</li>
  5742. <li>channel: The Channelnumber (if available)</li>
  5743. <li>trend: The temperature trend (if available)</li>
  5744. </ul>
  5745. <br>
  5746. <b>Attributes</b>
  5747. <ul>
  5748. <li><a href="#IODev">IODev</a>
  5749. Note: by setting this attribute you can define different sets of 8
  5750. devices in FHEM, each set belonging to a Device which is capable of receiving the signals. It is important, however,
  5751. that a device is only received by the defined IO Device, e.g. by using
  5752. different Frquencies (433MHz vs 868MHz)
  5753. </li>
  5754. <li><a href="#do_not_notify">do_not_notify</a></li>
  5755. <li><a href="#ignore">ignore</a></li>
  5756. <li><a href="#model">model</a> (TCM97..., ABS700, TCM21...., Prologue, Rubicson, NC_WS, GT_WT_02, AURIOL, KW9010, Unknown)</li>
  5757. <li><a href="#showtime">showtime</a></li>
  5758. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  5759. </ul>
  5760. </ul>
  5761. <a name="CUL_TX"></a>
  5762. <h3>CUL_TX</h3>
  5763. <ul>
  5764. The CUL_TX module interprets TX2/TX3 type of messages received by the CUL,
  5765. see also http://www.f6fbb.org/domo/sensors/tx3_th.php.
  5766. This protocol is used by the La Crosse TX3-TH thermo/hygro sensor and other
  5767. wireless themperature sensors. Please report the manufacturer/model of other
  5768. working devices. <br><br>
  5769. <a name="CUL_TXdefine"></a>
  5770. <b>Define</b>
  5771. <ul>
  5772. <code>define &lt;name&gt; CUL_TX &lt;code&gt; [corr] [minsecs]</code> <br>
  5773. <br>
  5774. &lt;code&gt; is the code of the autogenerated address of the TX device (0
  5775. to 127)<br>
  5776. corr is a correction factor, which will be added to the value received from
  5777. the device.<br>
  5778. minsecs are the minimum seconds between two log entries or notifications
  5779. from this device. <br>E.g. if set to 300, logs of the same type will occure
  5780. with a minimum rate of one per 5 minutes even if the device sends a message
  5781. every minute. (Reduces the log file size and reduces the time to display
  5782. the plots)
  5783. </ul>
  5784. <br>
  5785. <a name="CUL_TXset"></a>
  5786. <b>Set</b> <ul>N/A</ul><br>
  5787. <a name="CUL_TXget"></a>
  5788. <b>Get</b> <ul>N/A</ul><br>
  5789. <a name="CUL_TXattr"></a>
  5790. <b>Attributes</b>
  5791. <ul>
  5792. <li><a href="#ignore">ignore</a></li><br>
  5793. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  5794. <li><a href="#showtime">showtime</a></li><br>
  5795. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  5796. </ul>
  5797. <br>
  5798. <a name="CUL_TXevents"></a>
  5799. <b>Generated events:</b>
  5800. <ul>
  5801. <li>temperature: $temp</li>
  5802. <li>humidity: $hum</li>
  5803. </ul>
  5804. <br>
  5805. </ul>
  5806. <a name="CUL_WS"></a>
  5807. <h3>CUL_WS</h3>
  5808. <ul>
  5809. The CUL_WS module interprets S300 type of messages received by the CUL.
  5810. <br><br>
  5811. <a name="CUL_WSdefine"></a>
  5812. <b>Define</b>
  5813. <ul>
  5814. <code>define &lt;name&gt; CUL_WS &lt;code&gt; [corr1...corr4]</code> <br>
  5815. <br>
  5816. &lt;code&gt; is the code which must be set on the S300 device. Valid values
  5817. are 1 through 8.<br>
  5818. corr1..corr4 are up to 4 numerical correction factors, which will be added
  5819. to the respective value to calibrate the device. Note: rain-values will be
  5820. multiplied and not added to the correction factor.
  5821. </ul>
  5822. <br>
  5823. <a name="CUL_WSset"></a>
  5824. <b>Set</b> <ul>N/A</ul><br>
  5825. <a name="CUL_WSget"></a>
  5826. <b>Get</b> <ul>N/A</ul><br>
  5827. <a name="CUL_WSattr"></a>
  5828. <b>Attributes</b>
  5829. <ul>
  5830. <li><a href="#IODev">IODev</a>
  5831. Note: by setting this attribute you can define different sets of 8
  5832. devices in FHEM, each set belonging to a CUL. It is important, however,
  5833. that a device is only received by the CUL defined, e.g. by using
  5834. different Frquencies (433MHz vs 868MHz)
  5835. </li>
  5836. <li><a href="#do_not_notify">do_not_notify</a></li>
  5837. <li><a href="#eventMap">eventMap</a></li>
  5838. <li><a href="#ignore">ignore</a></li>
  5839. <li><a href="#model">model</a> (S300,KS300,ASH2200)</li>
  5840. <li><a href="#showtime">showtime</a></li>
  5841. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  5842. </ul>
  5843. <br>
  5844. </ul>
  5845. <a name="CULflash"></a>
  5846. <h3>CULflash</h3>
  5847. <ul>
  5848. <code>CULflash [fhem-device|none]; &lt;TYPE&gt;</code> <br>
  5849. <br>
  5850. Download the firmware from a nightly SVN chekout and flash the
  5851. hardware.
  5852. Currently the CUL is supported with its versions:
  5853. CUL_V2, CUL_V2_HM, CUL_V3, CUL_V3_ZWAVE, CUL_V4.<br>
  5854. If the fhem-device is none, than the inserted device must already be in the
  5855. flash-mode.<br>
  5856. <b>Note:</b>for flashing the CUL dfu-programmer has to be installed in the
  5857. path, this is already the case with the Fritz!Box 7390 image from
  5858. fhem.de<br>
  5859. Example:
  5860. <ul>
  5861. <code>CULflash CUL CUL_V3<br>
  5862. CULflash none CUL_V3</code>
  5863. </ul>
  5864. Note: the message "dfu-programmer: failed to release interface 0." is
  5865. normal on the FB7390.
  5866. </ul>
  5867. <a name="Calendar"></a>
  5868. <h3>Calendar</h3>
  5869. <ul>
  5870. <br>
  5871. <a name="Calendardefine"></a>
  5872. <b>Define</b><br><br>
  5873. <ul>
  5874. <code>define &lt;name&gt; Calendar ical url &lt;URL&gt; [&lt;interval&gt;]</code><br>
  5875. <code>define &lt;name&gt; Calendar ical file &lt;FILENAME&gt; [&lt;interval&gt;]</code><br>
  5876. <br>
  5877. Defines a calendar device.<br><br>
  5878. A calendar device periodically gathers calendar events from the source calendar at the given URL or from a file.
  5879. The file must be in ICal format.<br><br>
  5880. If the URL
  5881. starts with <code>https://</code>, the perl module IO::Socket::SSL must be installed
  5882. (use <code>cpan -i IO::Socket::SSL</code>).<br><br>
  5883. Note for users of Google Calendar: You can literally use the private ICal URL from your Google Calendar.
  5884. If your Google Calendar
  5885. URL starts with <code>https://</code> and the perl module IO::Socket::SSL is not installed on your system, you can
  5886. replace it by <code>http://</code> if and only if there is no redirection to the <code>https://</code> URL.
  5887. Check with your browser first if unsure.<br><br>
  5888. The optional parameter <code>interval</code> is the time between subsequent updates
  5889. in seconds. It defaults to 3600 (1 hour).<br><br>
  5890. Examples:
  5891. <pre>
  5892. define MyCalendar Calendar ical url https://www.google.com&shy;/calendar/ical/john.doe%40example.com&shy;/private-foo4711/basic.ics
  5893. define YourCalendar Calendar ical url http://www.google.com&shy;/calendar/ical/jane.doe%40example.com&shy;/private-bar0815/basic.ics 86400
  5894. define SomeCalendar Calendar ical file /home/johndoe/calendar.ics
  5895. </pre>
  5896. </ul>
  5897. <br>
  5898. <a name="Calendarset"></a>
  5899. <b>Set </b><br><br>
  5900. <ul>
  5901. <code>set &lt;name&gt; update</code><br>
  5902. Forces the retrieval of the calendar from the URL. The next automatic retrieval is scheduled to occur <code>interval</code> seconds later.<br><br>
  5903. <code>set &lt;name&gt; reload</code><br>
  5904. Same as <code>update</code> but all calendar events are removed first.<br><br>
  5905. </ul>
  5906. <br>
  5907. <a name="Calendarget"></a>
  5908. <b>Get</b><br><br>
  5909. <ul>
  5910. <code>get &lt;name&gt; update</code><br>
  5911. Same as <code>set &lt;name&gt; update</code><br><br>
  5912. <code>get &lt;name&gt; reload</code><br>
  5913. Same as <code>set &lt;name&gt; update</code><br><br>
  5914. <code>get &lt;name&gt; &lt;format&gt; &lt;filter&gt; [&lt;max&gt;]</code><br>
  5915. Returns, line by line, information on the calendar events in the calendar &lt;name&gt;. The content depends on the
  5916. &lt;format&gt specifier:<br><br>
  5917. <table>
  5918. <tr><th>&lt;format&gt;</th><th>content</th></tr>
  5919. <tr><td>uid</td><td>the UID of the event</td></tr>
  5920. <tr><td>text</td><td>a user-friendly textual representation, best suited for display</td></tr>
  5921. <tr><td>summary</td><td>the content of the summary field (subject, title)</td></tr>
  5922. <tr><td>location</td><td>the content of the location field</td></tr>
  5923. <tr><td>categories</td><td>the content of the categories field</td></tr>
  5924. <tr><td>alarm</td><td>alarm time in human-readable format</td></tr>
  5925. <tr><td>start</td><td>start time in human-readable format</td></tr>
  5926. <tr><td>end</td><td>end time in human-readable format</td></tr>
  5927. <tr><td>categories</td><td>the content of the categories field</td></tr>
  5928. <tr><td>full</td><td>the full state</td></tr>
  5929. <tr><td>debug</td><td>like full with additional information for debugging purposes</td></tr>
  5930. </table><br>
  5931. The &lt;filter&gt; specifier determines the selected subset of calendar events:<br><br>
  5932. <table>
  5933. <tr><th>&lt;filter&gt;</th><th>selection</th></tr>
  5934. <tr><td>mode=&lt;regex&gt;</td><td>all calendar events with mode matching the regular expression &lt;regex&gt</td></tr>
  5935. <tr><td>&lt;mode&gt;</td><td>all calendar events in the mode &lt;mode&gt</td></tr>
  5936. <tr><td>uid=&lt;regex&gt;</td><td>all calendar events identified by UIDs that match the regular expression &lt;regex&gt;.</td></tr>
  5937. <tr><td>&lt;uid&gt;</td><td>all calendar events identified by the UID &lt;uid&gt;</td></tr>
  5938. <tr><td>&lt;reading&gt;</td><td>all calendar events listed in the reading &lt;reading&gt; (modeAlarm, modeAlarmed, modeStart, etc.) - this is deprecated and will be removed in a future version, use mode=&lt;regex&gt; instead.</td></tr>
  5939. <tr><td>all</td><td>all calendar events (past, current and future)</td></tr>
  5940. <tr><td>next</td><td>only calendar events that have not yet ended and among these only the first in a series, best suited for display</td></tr>
  5941. </table><br>
  5942. The <code>mode=&lt;regex&gt;</code> and <code>uid=&lt;regex&gt;</code> filters should be preferred over the
  5943. <code>&lt;mode&gt;</code> and <code>&lt;uid&gt;</code> filters.<br><br>
  5944. The optional parameter <code>&lt;max&gt;</code> limits
  5945. the number of returned lines.<br><br>
  5946. See attributes <code>hideOlderThan</code> and
  5947. <code>hideLaterThan</code> for how to return events within a certain time window.
  5948. Please remember that the global &pm;400 days limits apply.<br><br>
  5949. Examples:<br>
  5950. <code>get MyCalendar text next</code><br>
  5951. <code>get MyCalendar summary uid:435kjhk435googlecom 1</code><br>
  5952. <code>get MyCalendar summary 435kjhk435googlecom 1</code><br>
  5953. <code>get MyCalendar full all</code><br>
  5954. <code>get MyCalendar text mode=alarm|start</code><br>
  5955. <code>get MyCalendar text uid=.*6286.*</code><br>
  5956. <br>
  5957. <code>get &lt;name&gt; find &lt;regexp&gt;</code><br>
  5958. Returns, line by line, the UIDs of all calendar events whose summary matches the regular expression
  5959. &lt;regexp&gt;.<br><br>
  5960. <code>get &lt;name&gt; vcalendar</code><br>
  5961. Returns the calendar in ICal format as retrieved from the source.<br><br>
  5962. <code>get &lt;name&gt; vevents</code><br>
  5963. Returns a list of all VEVENT entries in the calendar with additional information for
  5964. debugging. Only properties that have been kept during processing of the source
  5965. are shown. The list of calendar events created from each VEVENT entry is shown as well
  5966. as the list of calendar events that have been omitted.
  5967. </ul>
  5968. <br>
  5969. <a name="Calendarattr"></a>
  5970. <b>Attributes</b>
  5971. <br><br>
  5972. <ul>
  5973. <li><code>update sync|async|none</code><br>
  5974. If this attribute is not set or if it is set to <code>sync</code>, the processing of
  5975. the calendar is done in the foreground. Large calendars will block FHEM on slow
  5976. systems. If this attribute is set to <code>async</code>, the processing is done in the
  5977. background and FHEM will not block during updates. If this attribute is set to
  5978. <code>none</code>, the calendar will not be updated at all.
  5979. </li><p>
  5980. <li><code>removevcalendar 0|1</code><br>
  5981. If this attribute is set to 1, the vCalendar will be discarded after the processing to reduce the memory consumption of the module.
  5982. A retrieval via <code>get &lt;name&gt; vcalendar</code> is then no longer possible.
  5983. </li><p>
  5984. <li><code>hideOlderThan &lt;timespec&gt;</code><br>
  5985. <code>hideLaterThan &lt;timespec&gt;</code><br><p>
  5986. These attributes limit the list of events shown by
  5987. <code>get &lt;name&gt; full|debug|text|summary|location|alarm|start|end ...</code>.<p>
  5988. The time is specified relative to the current time t. If hideOlderThan is set,
  5989. calendar events that ended before t-hideOlderThan are not shown. If hideLaterThan is
  5990. set, calendar events that will start after t+hideLaterThan are not shown.<p>
  5991. Please note that an action triggered by a change to mode "end" cannot access the calendar event
  5992. if you set hideOlderThan to 0 because the calendar event will already be hidden at that time. Better set
  5993. hideOlderThan to 10.<p>
  5994. <code>&lt;timespec&gt;</code> must have one of the following formats:<br>
  5995. <table>
  5996. <tr><th>format</th><th>description</th><th>example</th></tr>
  5997. <tr><td>SSS</td><td>seconds</td><td>3600</td></tr>
  5998. <tr><td>SSSs</td><td>seconds</td><td>3600s</td></tr>
  5999. <tr><td>HH:MM</td><td>hours:minutes</td><td>02:30</td></tr>
  6000. <tr><td>HH:MM:SS</td><td>hours:minutes:seconds</td><td>00:01:30</td></tr>
  6001. <tr><td>D:HH:MM:SS</td><td>days:hours:minutes:seconds</td><td>122:10:00:00</td></tr>
  6002. <tr><td>DDDd</td><td>days</td><td>100d</td></tr>
  6003. </table></li>
  6004. <p>
  6005. <li><code>cutoffOlderThan &lt;timespec&gt;</code><br>
  6006. This attribute cuts off all non-recurring calendar events that ended a timespan cutoffOlderThan
  6007. before the last update of the calendar. The purpose of setting this attribute is to save memory.
  6008. Such calendar events cannot be accessed at all from FHEM. Calendar events are not cut off if
  6009. they are recurring or if they have no end time (DTEND).
  6010. </li><p>
  6011. <li><code>onCreateEvent &lt;perl-code&gt;</code><br>
  6012. This attribute allows to run the Perl code &lt;perl-code&gt; for every
  6013. calendar event that is created. See section <a href="#CalendarPlugIns">Plug-ins</a> below.
  6014. </li><p>
  6015. <li><code>SSLVerify</code><br>
  6016. This attribute sets the verification mode for the peer certificate for connections secured by
  6017. SSL. Set attribute either to 0 for SSL_VERIFY_NONE (no certificate verification) or
  6018. to 1 for SSL_VERIFY_PEER (certificate verification). Disabling verification is useful
  6019. for local calendar installations (e.g. OwnCloud, NextCloud) without valid SSL certificate.
  6020. </li><p>
  6021. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  6022. </ul>
  6023. <br>
  6024. <b>Description</b>
  6025. <ul>
  6026. <br>
  6027. A calendar is a set of calendar events. The calendar events are
  6028. fetched from the source calendar at the given URL on a regular basis.<p>
  6029. A calendar event has a summary (usually the title shown in a visual
  6030. representation of the source calendar), a start time, an end time, and zero, one or more alarm times. In case of multiple alarm times for a calendar event, only the
  6031. earliest alarm time is kept.<p>
  6032. Recurring calendar events (series) are currently supported to an extent:
  6033. FREQ INTERVAL UNTIL COUNT are interpreted, BYMONTHDAY BYMONTH WKST
  6034. are recognized but not interpreted. BYDAY is correctly interpreted for weekly and monthly events.
  6035. The module will get it most likely wrong
  6036. if you have recurring calendar events with unrecognized or uninterpreted keywords.
  6037. Out-of-order events and events excluded from a series (EXDATE) are handled.
  6038. <p>
  6039. Calendar events are created when FHEM is started or when the respective entry in the source
  6040. calendar has changed and the calendar is updated or when the calendar is reloaded with
  6041. <code>get &lt;name&gt; reload</code>.
  6042. Only calendar events within &pm;400 days around the event creation time are created. Consider
  6043. reloading the calendar from time to time to avoid running out of upcoming events. You can use something like <code>define reloadCalendar at +*240:00:00 set MyCalendar reload</code> for that purpose.<p>
  6044. Some dumb calendars do not use LAST-MODIFIED. This may result in modifications in the source calendar
  6045. go unnoticed. Reload the calendar if you experience this issue.<p>
  6046. A calendar event is identified by its UID. The UID is taken from the source calendar.
  6047. All events in a series including out-of-order events habe the same UID.
  6048. All non-alphanumerical characters
  6049. are stripped off the original UID to make your life easier.<p>
  6050. A calendar event can be in one of the following modes:
  6051. <table>
  6052. <tr><td>upcoming</td><td>Neither the alarm time nor the start time of the calendar event is reached.</td></tr>
  6053. <tr><td>alarm</td><td>The alarm time has passed but the start time of the calendar event is not yet reached.</td></tr>
  6054. <tr><td>start</td><td>The start time has passed but the end time of the calendar event is not yet reached.</td></tr>
  6055. <tr><td>end</td><td>The end time of the calendar event has passed.</td></tr>
  6056. </table><br>
  6057. A calendar event transitions from one mode to another immediately when the time for the change has come. This is done by waiting
  6058. for the earliest future time among all alarm, start or end times of all calendar events.
  6059. <p>
  6060. A calendar device has several readings. Except for <code>calname</code>, each reading is a semicolon-separated list of UIDs of
  6061. calendar events that satisfy certain conditions:
  6062. <table>
  6063. <tr><td>calname</td><td>name of the calendar</td></tr>
  6064. <tr><td>modeAlarm</td><td>events in alarm mode</td></tr>
  6065. <tr><td>modeAlarmOrStart</td><td>events in alarm or start mode</td></tr>
  6066. <tr><td>modeAlarmed</td><td>events that have just transitioned from upcoming to alarm mode</td></tr>
  6067. <tr><td>modeChanged</td><td>events that have just changed their mode somehow</td></tr>
  6068. <tr><td>modeEnd</td><td>events in end mode</td></tr>
  6069. <tr><td>modeEnded</td><td>events that have just transitioned from start to end mode</td></tr>
  6070. <tr><td>modeStart</td><td>events in start mode</td></tr>
  6071. <tr><td>modeStarted</td><td>events that have just transitioned to start mode</td></tr>
  6072. <tr><td>modeUpcoming</td><td>events in upcoming mode</td></tr>
  6073. </table>
  6074. </ul>
  6075. <p>
  6076. For recurring events, usually several calendar events exists with the same UID. In such a case,
  6077. the UID is only shown in the mode reading for the most interesting mode. The most
  6078. interesting mode is the first applicable of start, alarm, upcoming, end.<p>
  6079. In particular, you will never see the UID of a series in modeEnd or modeEnded as long as the series
  6080. has not yet ended - the UID will be in one of the other mode... readings. This means that you better
  6081. do not trigger FHEM events for series based on mode... readings. See below for a recommendation.<p>
  6082. <b>Events</b>
  6083. <ul><br>
  6084. When the calendar was reloaded or updated or when an alarm, start or end time was reached, one
  6085. FHEM event is created:<p>
  6086. <code>triggered</code><br><br>
  6087. When you receive this event, you can rely on the calendar's readings being in a consistent and
  6088. most recent state.<p>
  6089. When a calendar event has changed, two FHEM events are created:<p>
  6090. <code>changed: UID &lt;mode&gt;</code><br>
  6091. <code>&lt;mode&gt;: UID</code><br><br>
  6092. &lt;mode&gt; is the current mode of the calendar event after the change. Note: there is a
  6093. colon followed by a single space in the FHEM event specification.<p>
  6094. The recommended way of reacting on mode changes of calendar events is to get notified
  6095. on the aforementioned FHEM events and do not check for the FHEM events triggered
  6096. by a change of a mode reading.
  6097. <p>
  6098. </ul>
  6099. <a name="CalendarPlugIns"></a>
  6100. <b>Plug-ins</b>
  6101. <ul>
  6102. <br>
  6103. This is experimental. Use with caution.<p>
  6104. A plug-in is a piece of Perl code that modifies a calendar event on the fly. The Perl code operates on the
  6105. hash reference <code>$e</code>. The most important elements are as follows:
  6106. <table>
  6107. <tr><th>code</th><th>description</th></tr>
  6108. <tr><td>$e->{start}</td><td>the start time of the calendar event, in seconds since the epoch</td></tr>
  6109. <tr><td>$e->{end}</td><td>the end time of the calendar event, in seconds since the epoch</td></tr>
  6110. <tr><td>$e->{alarm}</td><td>the alarm time of the calendar event, in seconds since the epoch</td></tr>
  6111. <tr><td>$e->{summary}</td><td>the summary (caption, title) of the calendar event</td></tr>
  6112. <tr><td>$e->{location}</td><td>the location of the calendar event</td></tr>
  6113. </table><br>
  6114. To add or change the alarm time of a calendar event for all events with the string "Tonne" in the
  6115. summary, the following plug-in can be used:<br><br>
  6116. <code>attr MyCalendar onCreateEvent { $e->{alarm}= $e->{start}-86400 if($e->{summary} =~ /Tonne/);; }</code><br>
  6117. <br>The double semicolon masks the semicolon. <a href="#perl">Perl specials</a> cannot be used.<br>
  6118. </ul>
  6119. <br><br>
  6120. <b>Usage scenarios</b>
  6121. <ul><br><br>
  6122. <i>Show all calendar events with details</i><br><br>
  6123. <ul>
  6124. <code>
  6125. get MyCalendar full all<br>
  6126. 2767324dsfretfvds7dsfn3e4&shy;dsa234r234sdfds6bh874&shy;googlecom alarm 31.05.2012 17:00:00 07.06.2012 16:30:00-07.06.2012 18:00:00 Erna for coffee<br>
  6127. 992hydf4y44awer5466lhfdsr&shy;gl7tin6b6mckf8glmhui4&shy;googlecom upcoming 08.06.2012 00:00:00-09.06.2012 00:00:00 Vacation
  6128. </code><br><br>
  6129. </ul>
  6130. <i>Show calendar events in your photo frame</i><br><br>
  6131. <ul>
  6132. Put a line in the <a href="#RSSlayout">layout description</a> to show calendar events in alarm or start mode:<br><br>
  6133. <code>text 20 60 { fhem("get MyCalendar text next 2") }</code><br><br>
  6134. This may look like:<br><br>
  6135. <code>
  6136. 07.06.12 16:30 Erna for coffee<br>
  6137. 08.06.12 00:00 Vacation
  6138. </code><br><br>
  6139. </ul>
  6140. <i>Switch the light on when Erna comes</i><br><br>
  6141. <ul>
  6142. First find the UID of the calendar event:<br><br>
  6143. <code>
  6144. get MyCalendar find .*Erna.*<br>
  6145. 2767324dsfretfvds7dsfn3e4&shy;dsa234r234sdfds6bh874&shy;googlecom
  6146. </code><br><br>
  6147. Then define a notify (the dot after the second colon matches the space):<br><br>
  6148. <code>
  6149. define ErnaComes notify MyCalendar:start:.2767324dsfretfvds7dsfn3e4&shy;dsa234r234sdfds6bh874&shy;googlecom set MyLight on
  6150. </code><br><br>
  6151. You can also do some logging:<br><br>
  6152. <code>
  6153. define LogErna notify MyCalendar:alarm:.2767324dsfretfvds7dsfn3e4&shy;dsa234r234sdfds6bh874&shy;googlecom { Log3 $NAME, 1, "ALARM name=$NAME event=$EVENT part1=$EVTPART0 part2=$EVTPART1" }
  6154. </code><br><br>
  6155. </ul>
  6156. <i>Switch actors on and off</i><br><br>
  6157. <ul>
  6158. Think about a calendar with calendar events whose summaries (subjects, titles) are the names of devices in your fhem installation.
  6159. You want the respective devices to switch on when the calendar event starts and to switch off when the calendar event ends.<br><br>
  6160. <code>
  6161. define SwitchActorOn notify MyCalendar:start:.* {
  6162. my $reading="$EVTPART0";;
  6163. my $uid= "$EVTPART1";;
  6164. my $actor= fhem("get MyCalendar summary $uid");;
  6165. if(defined $actor) {
  6166. fhem("set $actor on")
  6167. }
  6168. }<br><br>
  6169. define SwitchActorOff notify MyCalendar:end:.* {
  6170. my $reading="$EVTPART0";;
  6171. my $uid= "$EVTPART1";;
  6172. my $actor= fhem("get MyCalendar summary $uid");;
  6173. if(defined $actor) {
  6174. fhem("set $actor off")
  6175. }
  6176. }
  6177. </code><br><br>
  6178. You can also do some logging:<br><br>
  6179. <code>
  6180. define LogActors notify MyCalendar:(start|end):.* { my $reading= "$EVTPART0";; my $uid= "$EVTPART1";; my $actor= fhem("get MyCalendar summary $uid");; Log 3 $NAME, 1, "Actor: $actor, Reading $reading" }
  6181. </code><br><br>
  6182. </ul>
  6183. </ul>
  6184. <b>Embedded HTML</b>
  6185. <ul><br>
  6186. The module provides an additional function <code>CalendarAsHtml(&lt;name&gt;,&lt;options&gt;)</code>. It
  6187. returns the HTML code for a list of calendar events. <code>&lt;name&gt;</code> is the name of the
  6188. Calendar device and <code>&lt;options&gt;</code> is what you would write after <code>get &lt;name&gt; text ...</code>.
  6189. <br><br>
  6190. Example: <code>define MyCalendarWeblink weblink htmlCode { CalendarAsHtml("MyCalendar","next 3") }</code>
  6191. <br><br>
  6192. This is a rudimentary function which might be extended in a future version.
  6193. <p>
  6194. </ul>
  6195. </ul>
  6196. <a name="ComfoAir"></a>
  6197. <h3>ComfoAir</h3>
  6198. <ul>
  6199. ComfoAir provides a way to communicate with ComfoAir ventilation systems from Zehnder, especially the ComfoAir 350 (CA350).
  6200. It seems that many other ventilation systems use the same communication device and protocol,
  6201. e.g. WHR930 from StorkAir, G90-380 from Wernig and Santos 370 DC from Paul.
  6202. They are connected via serial line to the fhem computer.
  6203. This module is based on the protocol description at http://www.see-solutions.de/sonstiges/Protokollbeschreibung_ComfoAir.pdf
  6204. and copies some ideas from earlier modules for the same devices that were posted in the fhem forum from danhauck(Santos) and Joachim (WHR962).
  6205. <br>
  6206. The module can be used in two ways depending on how fhem and / or a vendor supplied remote control device
  6207. like CC Ease or CC Luxe are connected to the system. If a remote control device is connected it is strongly advised that
  6208. fhem does not send data to the ventilation system as well and only listens to the communication betweem the vendor equipment.
  6209. The RS232 interface used is not made to support more than two parties communicating and connecting fhem in parallel to a CC Ease or similar device can lead to
  6210. collisions when sending data which can corrupt the ventilation system.
  6211. If connected in parallel fhem should only passively listen and &lt;Interval&gt; is to be set to 0. <br>
  6212. If no remote control device is connected to the ventilation systems then fhem has to take control and actively request data
  6213. in the interval to be defined. Otherwiese fhem will not see any data. In this case fhem can also send commands to modify settings.
  6214. <br><br>
  6215. <b>Prerequisites</b>
  6216. <ul>
  6217. <br>
  6218. <li>
  6219. This module requires the Device::SerialPort or Win32::SerialPort module.
  6220. </li>
  6221. </ul>
  6222. <br>
  6223. <a name="ComfoAirDefine"></a>
  6224. <b>Define</b>
  6225. <ul>
  6226. <br>
  6227. <code>define &lt;name&gt; ComfoAir &lt;device&gt; &lt;Interval&gt;</code>
  6228. <br><br>
  6229. The module connects to the ventialation system through the given Device and either passively listens to data that is communicated
  6230. between the ventialation system and its remote control device (e.g. CC Luxe) or it actively requests data from the
  6231. ventilation system every &lt;Interval&gt; seconds <br>
  6232. If &lt;Interval&gt; is set to 0 then no polling will be done and the module only listens to messages on the line.<br>
  6233. <br>
  6234. Example:<br>
  6235. <br>
  6236. <ul><code>define ZL ComfoAir /dev/ttyUSB1@9600 60</code></ul>
  6237. </ul>
  6238. <br>
  6239. <a name="ComfoAirConfiguration"></a>
  6240. <b>Configuration of the module</b><br><br>
  6241. <ul>
  6242. apart from the serial connection and the interval which both are specified in the define command there are several attributes that
  6243. can optionally be used to modify the behavior of the module. <br><br>
  6244. The module internally gives names to all the protocol messages that are defined in the module and these names can be used
  6245. in attributes to define which requests are periodically sent to the ventilation device. The same nams can also be used with
  6246. set commands to manually send a request. Since all messages and readings are generically defined in a data structure in the module, it should be
  6247. quite easy to add more protocol details if needed without programming.
  6248. <br>
  6249. The names currently defined are:
  6250. <pre>
  6251. Bootloader-Version
  6252. Firmware-Version
  6253. RS232-Modus
  6254. Sensordaten
  6255. KonPlatine-Version
  6256. Verzoegerungen
  6257. Ventilation-Levels
  6258. Temperaturen
  6259. Betriebsstunden
  6260. Status-Bypass
  6261. Status-Vorheizung
  6262. </pre>
  6263. The attributes that control which messages are sent / which data is requested every &lt;Interval&gt; seconds are:
  6264. <pre>
  6265. poll-Bootloader-Version
  6266. poll-Firmware-Version
  6267. poll-RS232-Modus
  6268. poll-Sensordaten
  6269. poll-KonPlatine-Version
  6270. poll-Verzoegerungen
  6271. poll-Ventilation-Levels
  6272. poll-Temperaturen
  6273. poll-Betriebsstunden
  6274. poll-Status-Bypass
  6275. poll-Status-Vorheizung
  6276. </pre>
  6277. if the attribute is set to 1, the corresponding data is requested every &lt;Interval&gt; seconds. If it is set to 0, then the data is not requested.
  6278. by default Ventilation-Levels, Temperaturen and Status-Bypass are requested if no attributes are set.
  6279. <br><br>
  6280. Example:<br><br>
  6281. <pre>
  6282. define ZL ComfoAir /dev/ttyUSB1@9600 60
  6283. attr ZL poll-Status-Bypass 0
  6284. define FileLog_Lueftung FileLog ./log/Lueftung-%Y.log ZL
  6285. </pre>
  6286. </ul>
  6287. <a name="ComfoAirSet"></a>
  6288. <b>Set-Commands</b><br>
  6289. <ul>
  6290. like with the attributes mentioned above, set commands can be used to send a request for data manually. The following set options are available for this:
  6291. <pre>
  6292. request-Status-Bypass
  6293. request-Bootloader-Version
  6294. request-Sensordaten
  6295. request-Temperaturen
  6296. request-Firmware-Version
  6297. request-KonPlatine-Version
  6298. request-Ventilation-Levels
  6299. request-Verzoegerungen
  6300. request-Betriebsstunden
  6301. request-Status-Vorheizung
  6302. </pre>
  6303. additionally important fields can be set:
  6304. <pre>
  6305. Temp_Komfort (target temperature for comfort)
  6306. Stufe (ventilation level)
  6307. </pre>
  6308. </ul>
  6309. <a name="ComfoAirGet"></a>
  6310. <b>Get-Commands</b><br>
  6311. <ul>
  6312. All readings that are derived from the responses to protocol requests are also available as Get commands. Internally a Get command triggers the corresponding
  6313. request to the device and then interprets the data and returns the right field value. To avoid huge option lists in FHEMWEB, only the most important Get options
  6314. are visible in FHEMWEB. However this can easily be changed since all the readings and protocol messages are internally defined in the modue in a data structure
  6315. and to make a Reading visible as Get option only a little option (e.g. <code>showget => 1</code> has to be added to this data structure
  6316. </ul>
  6317. <a name="ComfoAirattr"></a>
  6318. <b>Attributes</b><br><br>
  6319. <ul>
  6320. <li><a href="#do_not_notify">do_not_notify</a></li>
  6321. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  6322. <br>
  6323. <li><b>poll-Bootloader-Version</b></li>
  6324. <li><b>poll-Firmware-Version</b></li>
  6325. <li><b>poll-RS232-Modus</b></li>
  6326. <li><b>poll-Sensordaten</b></li>
  6327. <li><b>poll-KonPlatine-Version</b></li>
  6328. <li><b>poll-Verzoegerungen</b></li>
  6329. <li><b>poll-Ventilation-Levels</b></li>
  6330. <li><b>poll-Temperaturen</b></li>
  6331. <li><b>poll-Betriebsstunden</b></li>
  6332. <li><b>poll-Status-Bypass</b></li>
  6333. <li><b>poll-Status-Vorheizung</b></li>
  6334. include a request for the data belonging to the named group when sending requests every interval seconds <br>
  6335. <li><b>hide-Bootloader-Version</b></li>
  6336. <li><b>hide-Firmware-Version</b></li>
  6337. <li><b>hide-RS232-Modus</b></li>
  6338. <li><b>hide-Sensordaten</b></li>
  6339. <li><b>hide-KonPlatine-Version</b></li>
  6340. <li><b>hide-Verzoegerungen</b></li>
  6341. <li><b>hide-Ventilation-Levels</b></li>
  6342. <li><b>hide-Temperaturen</b></li>
  6343. <li><b>hide-Betriebsstunden</b></li>
  6344. <li><b>hide-Status-Bypass</b></li>
  6345. <li><b>hide-Status-Vorheizung</b></li>
  6346. prevent readings of the named group from being created even if used passively without polling and an external remote control requests this data.
  6347. please note that this attribute doesn't delete already existing readings.<br>
  6348. <li><b>queueDelay</b></li>
  6349. modify the delay used when sending requests to the device from the internal queue, defaults to 1 second <br>
  6350. <li><b>queueMax</b></li>
  6351. max length of the send queue, defaults to 50<br>
  6352. <li><b>timeout</b></li>
  6353. set the timeout for reads, defaults to 2 seconds <br>
  6354. </ul>
  6355. <br>
  6356. </ul>
  6357. <a name="CustomReadings"></a>
  6358. <h3>CustomReadings</h3>
  6359. <ul>
  6360. FHEM module to define own readings.
  6361. <br><br>
  6362. This module allows to define own readings. The readings can be defined in an attribute so that they can get changed without changing the code of the module.<br>
  6363. To use this module you should have some perl and linux knowledge<br>
  6364. The examples presuppose that you run FHEM on a linux machine like a Raspberry Pi or a Cubietruck.<br>
  6365. Note: the "bullshit" definition is an example to show what happens if you define bullshit :-)<br><br>
  6366. <u>Example (definition in fhem.cfg)</u>
  6367. <br><code>
  6368. define myReadings CustomReadings<br>
  6369. attr myReadings room 0-Test<br>
  6370. attr myReadings group Readings<br>
  6371. attr myReadings interval 2<br>
  6372. attr myReadings readingDefinitions hdd_temperature:qx(hddtemp /dev/sda 2>&1),<br>
  6373. ac_powersupply_voltage:qx(cat /sys/class/power_supply/ac/voltage_now 2>&1) / 1000000,<br>
  6374. ac_powersupply_current:qx(cat /sys/class/power_supply/ac/current_now 2>&1) / 1000000,<br>
  6375. perl_version:$],<br>
  6376. timezone:qx(cat /etc/timezone 2>&1),<br>
  6377. kernel:qx(uname -r 2>&1),<br>
  6378. device_name:$hash->{NAME},<br>
  6379. bullshit: $hash->{bullshit},<br>
  6380. fhem_backup_folder_size:qx(du -ch /opt/fhem/backup | grep total | cut -d 't' -f1 2>&1)<br>
  6381. <br><br>
  6382. <b>Optionally, to display the readings:</b><br>
  6383. define myReadingsDisplay weblink htmlCode {CustomReadings_GetHTML('myReadings')}<br>
  6384. attr myReadingsDisplay group Readings<br>
  6385. attr myReadingsDisplay room 0-Test<br>
  6386. </code>
  6387. <br>
  6388. <u>Resulting readings:</u><br>
  6389. <table>
  6390. <colgroup width="250" span="3"></colgroup>
  6391. <tr>
  6392. <td>ac_powersupply_current</td>
  6393. <td>0.236</td>
  6394. <td>2014-08-09 15:40:21</td>
  6395. </tr>
  6396. <tr>
  6397. <td>ac_powersupply_voltage</td>
  6398. <td>5.028</td>
  6399. <td>2014-08-09 15:40:21</td>
  6400. </tr>
  6401. <tr>
  6402. <td>bullshit</td>
  6403. <td>ERROR</td>
  6404. <td>2014-08-09 15:40:21</td>
  6405. </tr>
  6406. <tr>
  6407. <td>device_name</td>
  6408. <td>myReadings</td>
  6409. <td>2014-08-09 15:40:21</td>
  6410. </tr>
  6411. <tr>
  6412. <td>fhem_backup_folder_size</td>
  6413. <td>20M</td>
  6414. <td>2014-08-09 15:40:21</td>
  6415. </tr>
  6416. <tr>
  6417. <td>hdd_temperature</td>
  6418. <td>/dev/sda: TS128GSSD320: 47°C</td>
  6419. <td>2014-08-09 15:40:21</td>
  6420. </tr>
  6421. <tr>
  6422. <td>kernel</td>
  6423. <td>3.4.103-sun7i+</td>
  6424. <td>2014-08-09 15:40:21</td>
  6425. </tr>
  6426. <tr>
  6427. <td>perl_version</td>
  6428. <td>5.014002</td>
  6429. <td>2014-08-09 15:40:21</td>
  6430. </tr>
  6431. <tr>
  6432. <td>timezone</td>
  6433. <td>Europe/Berlin</td>
  6434. <td>2014-08-09 15:40:21</td>
  6435. </tr>
  6436. </table>
  6437. <br>
  6438. <a name="CustomReadings_Define"></a>
  6439. <b>Define</b><br>
  6440. define &lt;name&gt; CustomReadings<br>
  6441. <br>
  6442. <a name="CustomReadings_Readings"></a>
  6443. <b>Readings</b><br>
  6444. As defined
  6445. <br><br>
  6446. <a name="CustomReadings_Attr"></a>
  6447. <b>Attributes</b>
  6448. <ul>
  6449. <li>interval<br>
  6450. Refresh interval in seconds</li><br>
  6451. <li>readingDefinitions<br>
  6452. The definitions are separated by a comma. A definition consists of two parts, separated by a colon.<br>
  6453. The first part is the name of the reading and the second part the function.<br>
  6454. The function gets evaluated and must return a result.<br><br>
  6455. Example: <code>kernel:qx(uname -r 2>&1)</code><br>
  6456. Defines a reading with the name "kernel" and evaluates the linux function uname -r<br>
  6457. Multiline output from commands, systemcall, scripts etc. can be use for more than one reading with <br>
  6458. the keyword <code>COMBINED</code> as reading (which wont appear itself) while its command output<br>
  6459. will be put line by line in the following readings defined (so they don't need a function defined<br>
  6460. after the colon (it would be ignored)).But the lines given must match the number and order of the<br>
  6461. following readings.<br><br>
  6462. COMBINED can be used together or lets say after or even in between normal expressions if the<br>
  6463. number of lines of the output matches exactly.
  6464. Example: <code>COMBINED:qx(cat /proc/sys/vm/dirty_background*),dirty_bytes:,dirty_ration:</code><br>
  6465. Defines two readings (dirty_bytes and dirty_ratio) which will get set by the lines of those <br>
  6466. two files the cat command will find in the kernel proc directory.<br>
  6467. In some cases this can give an noticeable performance boost as the readings are filled up all at once.
  6468. </li>
  6469. </ul><br>
  6470. </ul>
  6471. <a name="DFPlayerMini"></a>
  6472. <h3>DFPlayerMini - FN-M16P Embedded MP3 Audio Module</h3>
  6473. This module integrates the <a href="http://www.flyrontech.com/eproducts/84.html">DFPlayerMini - FN-M16P Embedded MP3 Audio Module device</a> into fhem.
  6474. See the <a href="http://www.flyrontech.com/edownload/6.html">datasheet</a> of the module for technical details.
  6475. <br>
  6476. The MP3 player can be connected directly to a serial interface or via ethernet/WiFi by using a hardware with offers a transparent
  6477. serial bridge over TCP/IP like <a href="http://www.letscontrolit.com/wiki/index.php/Ser2Net">ESPEasy Ser2Net</a>.
  6478. <br><br>
  6479. It is also possible to use other fhem transport devices like <a href="#MYSENSORS">MYSENSORS</a>.
  6480. <br><br>
  6481. The module supports all commands of the DFPlayer and offers additional convenience functions like
  6482. <ul>
  6483. <li>integration of <a href="#Text2Speech">Text2Speech</a> for easy download of speech mp3 files</li>
  6484. <li>easier control of which file to play by</li>
  6485. <li>keeping a reference of all files the DFPlayer can play</li>
  6486. <li>playing several files in succession (playlist)</li>
  6487. <li>creating and playing files for speaking numbers</li>
  6488. </ul>
  6489. <br>
  6490. <a name="DFPlayerMinidefine"></a>
  6491. <b>Define</b><br>
  6492. <code>define &lt;name&gt; DFPlayerMini {none | devicename[\@baudrate] | devicename\@directio | hostname:port} </code>
  6493. <br>
  6494. <ul>
  6495. <li>
  6496. If directly connected &lt;devicename&gt; specifies the serial port to communicate with the DFPlayer Mini.
  6497. The name of the serial-device depends on your distribution, under
  6498. linux the cdc_acm kernel module is responsible, and usually a
  6499. /dev/ttyACM0 or /dev/ttyUSB0 device will be created.
  6500. You can also specify a baudrate if the device name contains the @
  6501. character, e.g.: /dev/ttyACM0@9600<br><br>This is also the default baudrate and normally shouldn't be changed
  6502. as the DFPlayer uses a fixed baudrate of 9600.
  6503. If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
  6504. perl module Device::SerialPort is not needed, and fhem opens the device
  6505. with simple file io. This might work if the operating system uses sane
  6506. defaults for the serial parameters, e.g. some Linux distributions and
  6507. OSX. <br>
  6508. </li>
  6509. <li>
  6510. If connected via TCP/IP &lt;hostname:port&gt; specifies the IP address and port of the device that provides the transparent serial
  6511. bridge to the DFP, e.g. 192.168.2.28:23
  6512. </li>
  6513. <li>
  6514. for other types of transport <code>none</code> can be specified as the device. In that case the attribute <code>sendCmd</code> should be specified and responses
  6515. from the DFP should be given to this module with <code>set response</code>.
  6516. </li>
  6517. </ul>
  6518. <br>
  6519. <a name="DFPlayerMiniattr"></a>
  6520. <b>Attributes</b>
  6521. <ul>
  6522. <li>TTSDev<br>
  6523. The name of a Text2Speech device. This has to be defined beforehand with none as the &lt;alsadevice&gt; as a server device. It should be used for no other purposes
  6524. than use by this module.
  6525. </li>
  6526. <li>requestAck<br>
  6527. The DFPlayer can send a response to any command sent to it to acknowledge that is has received the command. As this increases the communication
  6528. overhead it can be switched off if the communication integrity is ensured by other means. If set the next command is only sent if the last one was
  6529. acknowledged by the DFPlayer. This ensures that no command is lost if the the DFPlayer is busy/sleeping.
  6530. </li>
  6531. <li>sendCmd<br>
  6532. A fhem command that is used to send the command data generated by this module to the DFPlayer hardware. If this is set, no other way of communication with the DFP is used.
  6533. This can be used integrate other transport devices than those supported natively.<br>
  6534. E. g. to communicate via a MySensors device named mys_dfp with an appropriate sketch use <br>
  6535. <code>
  6536. attr &lt;dfp&gt; sendCmd set mys_dfp value11 $msg
  6537. </code><br>
  6538. The module will then send a command to the DFP replacing $msg with the actual payload using the fhem command
  6539. <code>
  6540. set mys_dfp value11 &lt;payload&gt;
  6541. </code>
  6542. <br>
  6543. See <code>set response</code> for a way to get the response of the DFPlayer received via a different device back into this module.
  6544. </li>
  6545. <li>uploadPath<br>
  6546. The DFPlayer plays files from an SD card or USB stick connected to it. The mp3/wav files have to be copied to this storage device by the user.
  6547. The device expects the files with specific names and in specific folders, see the datasheet for details.
  6548. Copying the files can also be done by this module if the storage device is accessible by the computer fhem is running on.
  6549. It has to be mounted in a specific path with is specified with this attribute.
  6550. <br>
  6551. See uploadTTS, uploadTTScache and readFiles commands where this is used.
  6552. </li>
  6553. <li>rememberMissingTTS<br>
  6554. If set <code>tts</code> commands without a matching file create a special reading. See <code>set tts</code> and <code>set uploadTTScache</code>.
  6555. </li>
  6556. <li>keepAliveInterval<br>
  6557. Specifies the interval in seconds for sending a keep alive message to the DFP. Can be used to check if the DFP is still working and to keep connections open.<br>
  6558. After three missing answers the status of the devices is set to disconnected.<br>
  6559. Set the interval to 0 to disable the keep alive feature. Default is 60 seconds.
  6560. </li>
  6561. </ul>
  6562. <a name="DFPlayerMiniget"></a>
  6563. <br>
  6564. <b>Get</b>
  6565. <br><br>
  6566. All query commands supported by the DFP have a corresponding get command:
  6567. <table>
  6568. <tr><th>get</th><th>DFP cmd byte</th><th>parameters</th><th>comment</th></tr>
  6569. <tr><td>storage</td><td>0x3F</td><td></td><td></td></tr>
  6570. <tr><td>status</td><td>0x42</td><td></td><td></td></tr>
  6571. <tr><td>volume</td><td>0x43</td><td></td><td></td></tr>
  6572. <tr><td>equalizer</td><td>0x44</td><td></td><td></td></tr>
  6573. <tr><td>noTracksRootUsb</td><td>0x47</td><td></td><td></td></tr>
  6574. <tr><td>noTracksRootSd</td><td>0x48</td><td></td><td></td></tr>
  6575. <tr><td>currentTrackUsb</td><td>0x4B</td><td></td><td></td></tr>
  6576. <tr><td>currentTrackSd</td><td>0x4C</td><td></td><td></td></tr>
  6577. <tr><td>noTracksInFolder</td><td>0x4E</td><td>folder number</td><td>1-99</td></tr>
  6578. <tr><td>noFolders</td><td>0x4F</td><td></td><td></td></tr>
  6579. </table>
  6580. <a name="DFPlayer Miniset"></a>
  6581. <br>
  6582. <b>Set</b>
  6583. <br><br>
  6584. All commands supported by the DFP have a corresponding set command:
  6585. <br>
  6586. <table>
  6587. <tr><th>set</th><th>DFP cmd byte</th><th>parameters</th><th>comment</th></tr>
  6588. <tr><td>next</td><td>0x01</td><td>-</td><td></td></tr>
  6589. <tr><td>prev</td><td>0x02</td><td>-</td><td></td></tr>
  6590. <tr><td>trackNum</td><td>0x03</td><td>number of track in root directory</td><td>between 1 and 3000 (uses the order in which the files where created!)</td></tr>
  6591. <tr><td>volumeUp</td><td>0x04</td><td>-</td><td></td></tr>
  6592. <tr><td>volumeDown</td><td>0x05</td><td>-</td><td></td></tr>
  6593. <tr><td>volumeStraight</td><td>0x06</td><td>volume</td><td>0-30</td></tr>
  6594. <tr><td>equalizer</td><td>0x07</td><td>name of the equalizer mode</td><td>Normal, Pop, Rock, Jazz, Classic, Bass</td></tr>
  6595. <tr><td>repeatSingle</td><td>0x08</td><td>-</td><td></td></tr>
  6596. <tr><td>storage</td><td>0x09</td><td>SD or USB</td><td></td></tr>
  6597. <tr><td>sleep</td><td>0x0A</td><td>-</td><td>not supported by DFP, DFP needs power cycle to work again</td></tr>
  6598. <tr><td>wake</td><td>0x0B</td><td>-</td><td>not supported by DFP, but probably by FN-M22P</td></tr>
  6599. <tr><td>reset</td><td>0x0C</td><td>-</td><td></td></tr>
  6600. <tr><td>play</td><td>0x0D</td><td>-</td><td>plays the current track</td></tr>
  6601. <tr><td>play</td><td>0x0F, 0x12, 0x13, 0x14</td><td>a space separated list of files to play successively</td><td>the correct DFP command is used automatically.
  6602. Files can be specified with either their reading name, reading value or folder name/track number.
  6603. See set readFiles</td></tr>
  6604. <tr><td>pause</td><td>0x0E</td><td>-</td><td></td></tr>
  6605. <tr><td>amplification</td><td>0x10</td><td>level of amplification</td><td>0-31</td></tr>
  6606. <tr><td>repeatRoot</td><td>0x11</td><td>on, off</td><td></td></tr>
  6607. <tr><td>MP3TrackNum</td><td>0x12</td><td>tracknumber</td><td>1-3000, from folder MP3</td></tr>
  6608. <tr><td>intercutAdvert</td><td>0x13</td><td>tracknumber</td><td>1-3000, from folder ADVERT</td></tr>
  6609. <tr><td>folderTrackNum</td><td>0x0F</td><td>foldernumber tracknumber</td><td>folder: 1-99, track: 1-255</td></tr>
  6610. <tr><td>folderTrackNum3000</td><td>0x14</td><td>foldernumber tracknumber</td><td>folder: 1-15, track: 1-3000</td></tr>
  6611. <tr><td>stopAdvert</td><td>0x15</td><td>-</td><td></td></tr>
  6612. <tr><td>stop</td><td>0x16</td><td>-</td><td></td></tr>
  6613. <tr><td>repeatFolder</td><td>0x17</td><td>number of folder</td><td>1-99</td></tr>
  6614. <tr><td>shuffle</td><td>0x18</td><td>-</td><td></td></tr>
  6615. <tr><td>repeatCurrentTrack</td><td>0x19</td><td>on, off</td><td></td></tr>
  6616. <tr><td>DAC</td><td>0x1A</td><td>on, off</td><td></td></tr>
  6617. </table>
  6618. <br>
  6619. All other set commands are not sent to the DFP but offer convenience functions:
  6620. <br>
  6621. <ul>
  6622. <li>
  6623. close
  6624. </li>
  6625. <li>
  6626. raw <br>sends a command encoded in hex directly to the DFP without any validation
  6627. </li>
  6628. <li>
  6629. reopen
  6630. </li>
  6631. <li>
  6632. readFiles <br> reads all files from the storage medium mounted at <code>uploadPath</code>. If these files are accessible by the DFP (i.e. they conform to the naming convention)
  6633. a reading is created for the file. The reading name is File_&lt;folder&gt;/&lt;tracknumber&gt;. Folder can be ., MP3, ADVERT, 00 to 99.
  6634. The reading value is the filename without the tracknumber and suffix.<br>
  6635. Example:<br>
  6636. For the file MP3/0003SongTitle.mp3 the reading File_MP3/0003 with value SongTitle is created.
  6637. <br>
  6638. The <code>set &lt;dfp&gt; play</code> command can make use of these readings, i.e. it is possible to use either <code>set &lt;dfp&gt; play File_MP3/0003</code>,
  6639. <code>set &lt;dfp&gt; play MP3/3</code> or <code>set &lt;dfp&gt; play SongTitle</code> to play the same track.
  6640. </li>
  6641. <li>
  6642. uploadTTS &lt;destination path&gt; &lt;Text to translate to speech&gt;<br>
  6643. The text specified is converted to a speech mp3 file using the Text2Speech device specified with attr <code>TTSDev</code>. The mp3 file is then copied into the given
  6644. destination path within uploadPath.
  6645. <br>
  6646. Examples:<br>
  6647. <code>set &lt;dfp&gt; 01/0001Test Dies ist ein Test</code><br>
  6648. <code>set &lt;dfp&gt; ADVERT/0099Hinweis Achtung</code>
  6649. </li>
  6650. <li>
  6651. uploadTTScache<br>
  6652. upload all files from the cache directory of the <code>TTSDev</code> to <code>uploadPath</code>. Uploading starts with folder 01. After 3000 files
  6653. the next folder is used. The MD5 hash is used as the filename. When the upload is finished <code>set readFiles</code> is executed. The command <code>set tts</code> makes use of the readings created by this.
  6654. </li>
  6655. <li>
  6656. tts &lt;text to translate to speech&gt;<br>
  6657. <code>TTSDev</code> is used to calculate the MD5 hash of &lt;text to translate to speech&gt;. It then tries to play the file with this hash value.
  6658. If no reading for such a file exists and if the attribute <code>rememberMissingTTS</code> is set, a new reading Missing_MD5<md5> with <text to translate to speech> as its
  6659. value is created.
  6660. <br>Prerequisites:<br>
  6661. This only works if this text had been translated earlier and the resulting mp3 file was stored in the cache directory of TTSDev.
  6662. The files in the cache have to be uploaded to the storage card with <code>set uploadTTScache</code>.
  6663. </li>
  6664. <li>
  6665. uploadNumbers destinationFolder<br>
  6666. creates mp3 files for all tokens required to speak arbitrary german numbers. <br>
  6667. Example:<br>
  6668. <code>set &lt;dfp&gt; uploadNumbers 99</code>
  6669. <br>
  6670. creates the 31 mp3 files required in folder 99.
  6671. </li>
  6672. <li>
  6673. sayNumber number<br>
  6674. translates a number into speech and plays the required tracks. Requires that uploadNumbers command was used to create the speech files.
  6675. <br>
  6676. Example:
  6677. <br>
  6678. <code>sayNumber -34.7</code>
  6679. <br>
  6680. is equivalent to
  6681. <br>
  6682. <code>play minus vier und dreissig komma sieben</code>
  6683. </li>
  6684. <li>
  6685. response<br> 10 bytes response message from DFP encoded as hex
  6686. </li>
  6687. </ul>
  6688. <a name="DLNARenderer"></a>
  6689. <h3>DLNARenderer</h3>
  6690. <ul>
  6691. DLNARenderer automatically discovers all your MediaRenderer devices in your local network and allows you to fully control them.<br>
  6692. It also supports multiroom audio for Caskeid and Bluetooth Caskeid speakers (e.g. MUNET).<br><br>
  6693. <b>Note:</b> The followig libraries are required for this module:
  6694. <ul><li>SOAP::Lite</li> <li>LWP::Simple</li> <li>XML::Simple</li> <li>XML::Parser::Lite</li> <li>LWP::UserAgent</li><br>
  6695. </ul>
  6696. <a name="DLNARendererdefine"></a>
  6697. <b>Define</b>
  6698. <ul>
  6699. <code>define &lt;name&gt; DLNARenderer</code>
  6700. <br><br>
  6701. Example:
  6702. <ul>
  6703. <code>define dlnadevices DLNARenderer</code><br>
  6704. After about 2 minutes you can find all automatically created DLNA devices under "Unsorted".<br/>
  6705. </ul>
  6706. </ul>
  6707. <br>
  6708. <a name="DLNARendererset"></a>
  6709. <b>Set</b>
  6710. <ul>
  6711. <br><code>set &lt;name&gt; stream &lt;value&gt</code><br>
  6712. Set any URL to play.
  6713. </ul>
  6714. <ul>
  6715. <br><code>set &lt;name&gt; on</code><br>
  6716. Starts playing the last stream (reading stream).
  6717. </ul>
  6718. <ul>
  6719. <br><code>set &lt;name&gt; off</code><br>
  6720. Sends stop command to device.
  6721. </ul>
  6722. <ul>
  6723. <br><code>set &lt;name&gt; stop</code><br>
  6724. Stop playback.
  6725. </ul>
  6726. <ul>
  6727. <br><code>set &lt;name&gt; volume 0-100</code><br>
  6728. <code>set &lt;name&gt; volume +/-0-100</code><br>
  6729. Set volume of the device.
  6730. </ul>
  6731. <ul>
  6732. <br><code>set &lt;name&gt; channel 1-10</code><br>
  6733. Start playing channel X which must be configured as channel_X attribute first.<br>
  6734. You can specify your channel also in DIDL-Lite XML format if your player doesn't support plain URIs.
  6735. </ul>
  6736. <ul>
  6737. <br><code>set &lt;name&gt; mute on/off</code><br>
  6738. Mute the device.
  6739. </ul>
  6740. <ul>
  6741. <br><code>set &lt;name&gt; pause</code><br>
  6742. Pause playback of the device. No toggle.
  6743. </ul>
  6744. <ul>
  6745. <br><code>set &lt;name&gt; pauseToggle</code><br>
  6746. Toggle pause/play for the device.
  6747. </ul>
  6748. <ul>
  6749. <br><code>set &lt;name&gt; play</code><br>
  6750. Initiate play command. Only makes your player play if a stream was loaded (currentTrackURI is set).
  6751. </ul>
  6752. <ul>
  6753. <br><code>set &lt;name&gt; next</code><br>
  6754. Play next track.
  6755. </ul>
  6756. <ul>
  6757. <br><code>set &lt;name&gt; previous</code><br>
  6758. Play previous track.
  6759. </ul>
  6760. <ul>
  6761. <br><code>set &lt;name&gt; seek &lt;seconds&gt;</code><br>
  6762. Seek to position of track in seconds.
  6763. </ul>
  6764. <ul>
  6765. <br><code>set &lt;name&gt; speak "This is a test. 1 2 3."</code><br>
  6766. Speak the text followed after speak within quotes. Works with Google Translate.
  6767. </ul>
  6768. <ul>
  6769. <br><code>set &lt;name&gt; playEverywhere</code><br>
  6770. Only available for Caskeid players.<br>
  6771. Play current track on all available Caskeid players in sync.
  6772. </ul>
  6773. <ul>
  6774. <br><code>set &lt;name&gt; stopPlayEverywhere</code><br>
  6775. Only available for Caskeid players.<br>
  6776. Stops multiroom audio.
  6777. </ul>
  6778. <ul>
  6779. <br><code>set &lt;name&gt; addUnit &lt;unitName&gt;</code><br>
  6780. Only available for Caskeid players.<br>
  6781. Adds unit to multiroom audio session.
  6782. </ul>
  6783. <ul>
  6784. <br><code>set &lt;name&gt; removeUnit &lt;unitName&gt;</code><br>
  6785. Only available for Caskeid players.<br>
  6786. Removes unit from multiroom audio session.
  6787. </ul>
  6788. <ul>
  6789. <br><code>set &lt;name&gt; multiRoomVolume 0-100</code><br>
  6790. <code>set &lt;name&gt; multiRoomVolume +/-0-100</code><br>
  6791. Only available for Caskeid players.<br>
  6792. Set volume of all devices within this session.
  6793. </ul>
  6794. <ul>
  6795. <br><code>set &lt;name&gt; enableBTCaskeid</code><br>
  6796. Only available for Caskeid players.<br>
  6797. Activates Bluetooth Caskeid for this device.
  6798. </ul>
  6799. <ul>
  6800. <br><code>set &lt;name&gt; disableBTCaskeid</code><br>
  6801. Only available for Caskeid players.<br>
  6802. Deactivates Bluetooth Caskeid for this device.
  6803. </ul>
  6804. <ul>
  6805. <br><code>set &lt;name&gt; stereo &lt;left&gt; &lt;right&gt; &lt;pairName&gt;</code><br>
  6806. Only available for Caskeid players.<br>
  6807. Sets stereo mode for left/right speaker and defines the name of the stereo pair.
  6808. </ul>
  6809. <ul>
  6810. <br><code>set &lt;name&gt; standalone</code><br>
  6811. Only available for Caskeid players.<br>
  6812. Puts the speaker into standalone mode if it was member of a stereo pair before.
  6813. </ul>
  6814. <ul>
  6815. <br><code>set &lt;name&gt; saveGroupAs &lt;groupName&gt;</code><br>
  6816. Only available for Caskeid players.<br>
  6817. Saves the current group configuration (e.g. saveGroupAs LivingRoom).
  6818. </ul>
  6819. <ul>
  6820. <br><code>set &lt;name&gt; loadGroup &lt;groupName&gt;</code><br>
  6821. Only available for Caskeid players.<br>
  6822. Loads the configuration previously saved (e.g. loadGroup LivingRoom).
  6823. </ul>
  6824. <br>
  6825. <a name="DLNARendererattr"></a>
  6826. <b>Attributes</b>
  6827. <ul>
  6828. <br><code>ignoreUDNs</code><br>
  6829. Define list (comma or blank separated) of UDNs which should prevent automatic device creation.<br>
  6830. It is important that uuid: is also part of the UDN and must be included.
  6831. </ul>
  6832. </ul>
  6833. <a name="DOIF"></a>
  6834. <h3>DOIF</h3>
  6835. <ul>
  6836. DOIF is a universal module. It works event- and time-controlled.<br>
  6837. <br>
  6838. It combines the functionality of a notify, at-, watchdog command with logical queries.<br>
  6839. <br>
  6840. Complex problems can be solved with this module, which would otherwise be solved only with several modules at different locations in FHEM. This leads to clear solutions and simplifies their maintenance.<br>
  6841. <br>
  6842. Logical queries are created in conditions using Perl operators.
  6843. These are combined with information from states, readings, internals of devices or times in square brackets.
  6844. Arbitrary Perl functions can also be specified that are defined in FHEM.
  6845. The module is triggered by time or by events information through the Devices specified in the condition.
  6846. If a condition is true, the associated FHEM- or Perl commands are executed.<br>
  6847. <br>
  6848. Syntax:<br>
  6849. <br>
  6850. <code>define &lt;name&gt; DOIF (&lt;condition&gt;) (&lt;commands&gt;) DOELSEIF (&lt;condition&gt;) (&lt;commands&gt;) DOELSEIF ... DOELSE (&lt;commands&gt;)</code><br>
  6851. <br>
  6852. The commands are always processed from left to right. There is only one command executed, namely the first, for which the corresponding condition in the processed sequence is true. In addition, only the conditions are checked, which include a matching device of the trigger (in square brackets).<br>
  6853. <br>
  6854. <b>Features</b><br>
  6855. <ol><br>
  6856. + intuitive syntax, as used in branches (if - elseif-....elseif - else) in higher-level languages<br>
  6857. + in the condition of any logical queries can be made as well as perl functions are used (full perl support)<br>
  6858. + it can be any FHEM commands and perl commands are executed<br>
  6859. + syntax checking at the time of definition are identified missing brackets<br>
  6860. + status is specified with <code>[&lt;devicename&gt;]</code>, readings with <code>[&lt;devicename&gt;:&lt;readingname&gt;]</code> or internals with <code>[&lt;devicename&gt;:&&lt;internal&gt;]</code><br>
  6861. + time information on the condition: <code>[HH:MM:SS]</code> or <code>[HH:MM]</code> or <code>[&lt;seconds&gt;]</code><br>
  6862. + indirect time on the condition: <code>[[&lt;devicename&gt;]]</code> or <code>[[&lt;devicename&gt;:&lt;readingname&gt;]]</code> or <code>[{&lt;perl-function&gt;}]</code><br>
  6863. + time calculation on the condition: <code>[(&lt;time calculation in Perl with time syntax specified above&gt;)]</code><br>
  6864. + time intervals: <code>[&lt;begin&gt;-&lt;end&gt;]</code> for <code>&lt;begin&gt;</code> and <code>&lt;end&gt;</code>, the above time format can be selected.<br>
  6865. + relative times preceded by a plus sign <code>[+&lt;time&gt;]</code> or <code>[+&lt;begin&gt;-+&lt;end&gt;]</code> combined with Perl functions<br>
  6866. + weekday control: <code>[&lt;time&gt;|012345678]</code> or <code>[&lt;begin&gt;-&lt;end&gt;|012345678]</code> (0-6 corresponds to Sunday through Saturday) such as 7 for $we and 8 for !$we<br>
  6867. + statuses, readings, internals und time intervals for only queries without trigger with [?...]<br>
  6868. + DOELSEIF cases and DOELSE at the end are optional<br>
  6869. + delay specification with resetting is possible (watchdog function)<br>
  6870. + the execution part can be left out in each case. So that the module can be used for pure status display.<br>
  6871. + definition of the status display with use of any readings or statuses<br>
  6872. </ol><br>
  6873. <br>
  6874. Many examples with english identifiers - see <a href="http://fhem.de/commandref_DE.html#DOIF">german section</a>.
  6875. <br>
  6876. </ul>
  6877. <a name="DOIFtools"></a>
  6878. <h3>DOIFtools</h3>
  6879. <ul>
  6880. DOIFtools contains tools to support DOIF.<br>
  6881. <br>
  6882. <ul>
  6883. <li>create readingsGroup definitions for labeling frontend widgets.</li>
  6884. <li>create a debug logfile for some DOIF and quoted devices with optional device listing each state or wait timer update.</li>
  6885. <li>optional device listing in debug logfile each state or wait timer update.</li>
  6886. <li>navigation between device listings in logfile if opened via DOIFtools.</li>
  6887. <li>create userReadings in DOIF devices displaying real dates for weekday restricted timer.</li>
  6888. <li>delete user defined readings in DOIF devices with multiple choice.</li>
  6889. <li>delete visible readings in other devices with multiple choice, but not <i>state</i>.</li>
  6890. <li>record statistics data about events.</li>
  6891. <li>limitting recordig duration.</li>
  6892. <li>generate a statistics report.</li>
  6893. <li>lists every DOIF definition in <i>probably associated with</i>.</li>
  6894. <li>access to DOIFtools from any DOIF device via <i>probably associated with</i></li>
  6895. <li>access from DOIFtools to existing DOIFtoolsLog logfiles</li>
  6896. <li>show event monitor in device detail view and optionally in DOIFs detail view</li>
  6897. <li>convert events to DOIF operands, a selected operand is copied to clipboard and the DEF editor will open</li>
  6898. <li>check definitions and offer recommendations</li>
  6899. <li>create shortcuts</li>
  6900. <li>optionally create a menu entry</li>
  6901. <li>show a list of running wait timer</li>
  6902. <li>scale values to color numbers and RGB values for coloration</li>
  6903. </ul>
  6904. <br>
  6905. Just one definition per FHEM-installation is allowed. <a href="https://fhem.de/commandref_DE.html#DOIFtools">More in the german section.</a>
  6906. <br>
  6907. </ul>
  6908. <a name="DUOFERN"></a>
  6909. <h3>DUOFERN</h3>
  6910. <ul>
  6911. Support for DuoFern devices via the <a href="#DUOFERNSTICK">DuoFern USB Stick</a>.<br>
  6912. <br><br>
  6913. <a name="DUOFERN_define"></a>
  6914. <b>Define</b>
  6915. <ul>
  6916. <code>define &lt;name&gt; DUOFERN &lt;code&gt;</code>
  6917. <br><br>
  6918. &lt;code&gt; specifies the radio code of the DuoFern device<br><br>
  6919. Example:<br>
  6920. <ul>
  6921. <code>define myDuoFern DUOFERN 49ABCD</code><br>
  6922. </ul>
  6923. </ul>
  6924. <br>
  6925. <a name="DUOFERN_set"></a>
  6926. <b>Set</b>
  6927. <ul>
  6928. <b>Universal commands (available to most actors):</b><br><br>
  6929. <ul>
  6930. <li><b>remotePair</b><br>
  6931. Activates the pairing mode of the actor.<br>
  6932. Some actors accept this command in unpaired mode up to two hours afte power up.
  6933. </li><br>
  6934. <li><b>remoteUnpair</b><br>
  6935. Activates the unpairing mode of the actor.
  6936. </li><br>
  6937. <li><b>getStatus</b><br>
  6938. Sends a status request message to the DuoFern device.
  6939. </li><br>
  6940. <li><b>manualMode [on|off]</b><br>
  6941. Activates the manual mode. If manual mode is active
  6942. all automatic functions will be ignored.
  6943. </li><br>
  6944. <li><b>timeAutomatic [on|off]</b><br>
  6945. Activates the timer automatic.
  6946. </li><br>
  6947. <li><b>sunAutomatic [on|off]</b><br>
  6948. Activates the sun automatic.
  6949. </li><br>
  6950. <li><b>dawnAutomatic [on|off]</b><br>
  6951. Activates the dawn automatic.
  6952. </li><br>
  6953. <li><b>duskAutomatic [on|off]</b><br>
  6954. Activates the dusk automatic.
  6955. </li><br>
  6956. <li><b>dusk</b><br>
  6957. Move roller shutter downwards or switch on switch/dimming actor
  6958. if duskAutomatic is activated.
  6959. </li><br>
  6960. <li><b>dawn</b><br>
  6961. Move roller shutter upwards or switch off switch/dimming actor
  6962. if dawnAutomatic is activated.
  6963. </li><br>
  6964. <li><b>sunMode [on|off]</b><br>
  6965. Activates the sun mode. If sun automatic is activated,
  6966. the roller shutter will move to the sunPosition or a switch/dimming
  6967. actor will shut off.
  6968. </li><br>
  6969. <li><b>reset [settings|full]</b><br>
  6970. settings: Clear all settings and endpoints of the actor.<br>
  6971. full: Complete reset of the actor including pairs.
  6972. </li><br>
  6973. </ul>
  6974. <b>Roller shutter actor commands:</b><br><br>
  6975. <ul>
  6976. <li><b>up [timer]</b><br>
  6977. Move the roller shutter upwards. If parameter <b>timer</b> is used the command will
  6978. only be executed if timeAutomatic is activated.
  6979. </li><br>
  6980. <li><b>down [timer]</b><br>
  6981. Move the roller shutter downwards. If parameter <b>timer</b> is used the command will
  6982. only be executed if timeAutomatic is activated.
  6983. </li><br>
  6984. <li><b>stop</b><br>
  6985. Stop motion.
  6986. </li><br>
  6987. <li><b>position &lt;value&gt; [timer]</b><br>
  6988. Set roller shutter to a desired absolut level. If parameter <b>timer</b> is used the
  6989. command will only be executed if timeAutomatic is activated.
  6990. </li><br>
  6991. <li><b>toggle</b><br>
  6992. Switch the roller shutter through the sequence up/stop/down/stop.
  6993. </li><br>
  6994. <li><b>rainAutomatic [on|off]</b><br>
  6995. Activates the rain automatic.
  6996. </li><br>
  6997. <li><b>windAutomatic [on|off]</b><br>
  6998. Activates the wind automatic.
  6999. </li><br>
  7000. <li><b>sunPosition &lt;value&gt;</b><br>
  7001. Set the sun position.
  7002. </li><br>
  7003. <li><b>ventilatingMode [on|off]</b><br>
  7004. Activates the ventilating mode. If activated, the roller
  7005. shutter will stop on ventilatingPosition when moving down.
  7006. </li><br>
  7007. <li><b>ventilatingPosition &lt;value&gt;</b><br>
  7008. Set the ventilating position.
  7009. </li><br>
  7010. <li><b>windMode [on|off]</b><br>
  7011. Activates the wind mode. If wind automatic and wind mode is
  7012. activated, the roller shutter moves in windDirection and ignore any automatic
  7013. or manual command.<br>
  7014. The wind mode ends 15 minutes after last activation automatically.
  7015. </li><br>
  7016. <li><b>windDirection [up|down]</b><br>
  7017. Movemet direction for wind mode.
  7018. </li><br>
  7019. <li><b>rainMode [on|off]</b><br>
  7020. Activates the rain mode. If rain automatic and rain mode is
  7021. activated, the roller shutter moves in rainDirection and ignore any automatic
  7022. command.<br>
  7023. The rain mode ends 15 minutes after last activation automatically.
  7024. </li><br>
  7025. <li><b>rainDirection [up|down]</b><br>
  7026. Movemet direction for rain mode.
  7027. </li><br>
  7028. <li><b>runningTime &lt;sec&gt;</b><br>
  7029. Set the motor running time.
  7030. </li><br>
  7031. <li><b>motorDeadTime [off|short|long]</b><br>
  7032. Set the motor dead time.
  7033. </li><br>
  7034. <li><b>reversal [on|off]</b><br>
  7035. Reversal of direction of rotation.
  7036. </li><br>
  7037. </ul>
  7038. <b>Switch/dimming actor commands:</b><br><br>
  7039. <ul>
  7040. <li><b>on [timer]</b><br>
  7041. Switch on the actor. If parameter <b>timer</b> is used the command will
  7042. only be executed if timeAutomatic is activated.
  7043. </li><br>
  7044. <li><b>off [timer]</b><br>
  7045. Switch off the actor. If parameter <b>timer</b> is used the command will
  7046. only be executed if timeAutomatic is activated.
  7047. </li><br>
  7048. <li><a href="#setExtensions">set extensions</a> are supported.
  7049. </li><br>
  7050. <li><b>level &lt;value&gt; [timer]</b><br>
  7051. Set actor to a desired absolut level. If parameter <b>timer</b> is used the
  7052. command will only be executed if timeAutomatic is activated.
  7053. </li><br>
  7054. <li><b>modeChange [on|off]</b><br>
  7055. Inverts the on/off state of a switch actor or change then modus of a dimming actor.
  7056. </li><br>
  7057. <li><b>stairwellFunction [on|off]</b><br>
  7058. Activates the stairwell function of a switch/dimming actor.
  7059. </li><br>
  7060. <li><b>stairwellTime &lt;sec&gt;</b><br>
  7061. Set the stairwell time.
  7062. </li><br>
  7063. </ul>
  7064. <b>Blind actor commands:</b><br><br>
  7065. <ul>
  7066. <li><b>blindsMode [on|off]</b><br>
  7067. Activates the blinds mode.
  7068. </li><br>
  7069. <li><b>slatPosition &lt;value&gt;</b><br>
  7070. Set the slat to a desired absolut level.
  7071. </li><br>
  7072. <li><b>defaultSlatPos &lt;value&gt;</b><br>
  7073. Set the default slat position.
  7074. </li><br>
  7075. <li><b>slatRunTime &lt;msec&gt;</b><br>
  7076. Set the slat running time.
  7077. </li><br>
  7078. <li><b>tiltInSunPos [on|off]</b><br>
  7079. Tilt slat after blind moved to sun position.
  7080. </li><br>
  7081. <li><b>tiltInVentPos [on|off]</b><br>
  7082. Tilt slat after blind moved to ventilation position.
  7083. </li><br>
  7084. <li><b>tiltAfterMoveLevel [on|off]</b><br>
  7085. Tilt slat after blind moved to an absolute position.
  7086. </li><br>
  7087. <li><b>tiltAfterStopDown [on|off]</b><br>
  7088. Tilt slat after stopping blind while moving down.
  7089. </li><br>
  7090. </ul>
  7091. <b>Thermostat commands:</b><br><br>
  7092. <ul>
  7093. <li><b>desired-temp &lt;temp&gt; [timer]</b><br>
  7094. Set desired temperature. &lt;temp&gt; must be between -40 and 80
  7095. Celsius, and precision is half a degree. If parameter <b>timer</b>
  7096. is used the command will only be executed if timeAutomatic is activated.
  7097. </li><br>
  7098. <li><b>tempUp [timer]</b><br>
  7099. Increases the desired temperature by half a degree. If parameter <b>timer</b>
  7100. is used the command will only be executed if timeAutomatic is activated.
  7101. </li><br>
  7102. <li><b>tempDown [timer]</b><br>
  7103. Decrease the desired temperature by half a degree. If parameter <b>timer</b>
  7104. is used the command will only be executed if timeAutomatic is activated.
  7105. </li><br>
  7106. <li><b>temperatureThreshold[1|2|3|4] &lt;temp&gt;</b><br>
  7107. Set temperature threshold 1 to 4. &lt;temp&gt; must be between -40 and 80
  7108. Celsius, and precision is half a degree.
  7109. </li><br>
  7110. <li><b>actTempLimit [timer]</b><br>
  7111. Set desired temperature to the selected temperatureThreshold. If parameter
  7112. <b>timer</b> is used the command will only be executed if timeAutomatic is
  7113. activated.
  7114. </li><br>
  7115. </ul>
  7116. <b>SX5 commands:</b><br><br>
  7117. <ul>
  7118. <li><b>10minuteAlarm [on|off]</b><br>
  7119. Activates the alarm sound of the SX5 when the door is left open for longer than 10 minutes.
  7120. </li><br>
  7121. <li><b>2000cycleAlarm [on|off]</b><br>
  7122. Activates the alarm sounds of the SX5 when the SX5 has run 2000 cycles.
  7123. </li><br>
  7124. <li><b>automaticClosing [off|30|60|90|120|150|180|210|240]</b><br>
  7125. Set the automatic closing time of the SX5 (sec).
  7126. </li><br>
  7127. <li><b>openSpeed [11|15|19]</b><br>
  7128. Set the open speed of the SX5 (cm/sec).
  7129. </li><br>
  7130. <li><b>backJump [on|off]</b><br>
  7131. If activated the SX5 moves briefly in the respective opposite direction after reaching the end point.
  7132. </li><br>
  7133. <li><b>getConfig</b><br>
  7134. Sends a config request message to the weather sensor.
  7135. </li><br>
  7136. </ul>
  7137. <b>Weather sensor commands:</b><br><br>
  7138. <ul>
  7139. <li><b>getConfig</b><br>
  7140. Sends a configuration request message.
  7141. </li><br>
  7142. <li><b>getTime</b><br>
  7143. Sends a time request message.
  7144. </li><br>
  7145. <li><b>getWeather</b><br>
  7146. Sends a weather data request message.
  7147. </li><br>
  7148. <li><b>writeConfig</b><br>
  7149. Write the configuration back to the weather sensor.
  7150. </li><br>
  7151. <li><b>DCF [on|off]</b><br>
  7152. Switch the DCF receiver on or off.
  7153. </li><br>
  7154. <li><b>time</b><br>
  7155. Set the current system time to the weather sensor.
  7156. </li><br>
  7157. <li><b>interval &lt;value&gt;</b><br>
  7158. Set the interval time for automatic transmittion of the weather data.<br>
  7159. &lt;value&gt;: off or 1 to 100 minutes
  7160. </li><br>
  7161. <li><b>latitude &lt;value&gt;</b><br>
  7162. Set the latitude of the weather sensor position<br>
  7163. &lt;value&gt;: 0 to 90
  7164. </li><br>
  7165. <li><b>longitude &lt;value&gt;</b><br>
  7166. Set the longitude of the weather sensor position<br>
  7167. &lt;value&gt;: -90 to 90
  7168. </li><br>
  7169. <li><b>timezone &lt;value&gt;</b><br>
  7170. Set the time zone of the weather sensor<br>
  7171. &lt;value&gt;: 0 to 23
  7172. </li><br>
  7173. <li><b>triggerDawn &lt;value1&gt; ... [&lt;value5&gt;]</b><br>
  7174. Sets up to 5 trigger values for a dawn event.<br>
  7175. &lt;value[n]&gt;: off or 1 to 100 lux
  7176. </li><br>
  7177. <li><b>triggerDusk &lt;value1&gt; ... [&lt;value5&gt;]</b><br>
  7178. Sets up to 5 trigger values for a dusk event.<br>
  7179. &lt;value[n]&gt;: off or 1 to 100 Lux
  7180. </li><br>
  7181. <li><b>triggerRain [on|off]</b><br>
  7182. Switch the trigger of the rain event on or off.
  7183. </li><br>
  7184. <li><b>triggerSun &lt;value1&gt;:&lt;sun1&gt;:&lt;shadow1&gt;[:&lt;temperature1&gt;] ... [&lt;value5&gt;:&lt;sun5&gt;:&lt;shadow5&gt;[:&lt;temperature5&gt;]]</b><br>
  7185. Sets up to 5 trigger values for a sun event.<br>
  7186. &lt;value[n]&gt;: off or 1 to 100 kLux<br>
  7187. &lt;sun[n]&gt;: time to detect sun, 1 to 30 minutes<br>
  7188. &lt;shadow[n]&gt;: time to detect shadow, 1 to 30 minutes<br>
  7189. &lt;temperature[n]&gt;: optional minimum temperature, -5 to 26 &deg;C
  7190. </li><br>
  7191. <li><b>triggerSunDirction &lt;startangle1&gt;:&lt;width1&gt; ... [&lt;startangle5&gt;:&lt;width5&gt;]</b><br>
  7192. If enabled, the respective sun event will only be triggered, if sunDirection is in the specified range.<br>
  7193. &lt;startangle[n]&gt;: off or 0 to 292.5 degrees (stepsize 22.5&deg;)<br>
  7194. &lt;width[n]&gt;: 45 to 180 degrees (stepsize 45&deg;)<br>
  7195. </li><br>
  7196. <li><b>triggerSunHeight &lt;startangle1&gt;:&lt;width1&gt; ... [&lt;startangle5&gt;:&lt;width5&gt;]</b><br>
  7197. If enabled, the respective sun event will only be triggered, if sunHeight is in the specified range.<br>
  7198. &lt;startangle[n]&gt;: off or 0 to 65 degrees (stepsize 13&deg;)<br>
  7199. &lt;width[n]&gt;: 26 or 52 degrees<br>
  7200. </li><br>
  7201. <li><b>triggerTemperature &lt;value1&gt; ... [&lt;value5&gt;]</b><br>
  7202. Sets up to 5 trigger values for a temperature event.<br>
  7203. &lt;value[n]&gt;: off or -40 to 80 &deg;C
  7204. </li><br>
  7205. <li><b>triggerWind &lt;value1&gt; ... [&lt;value5&gt;]</b><br>
  7206. Sets up to 5 trigger values for a wind event.<br>
  7207. &lt;value[n]&gt;: off or 1 to 31 m/s
  7208. </li><br>
  7209. </ul><br>
  7210. </ul>
  7211. <br>
  7212. <a name="DUOFERN_get"></a>
  7213. <b>Get</b> <ul>N/A</ul><br>
  7214. <a name="DUOFERN_attr"></a>
  7215. <b>Attributes</b>
  7216. <ul>
  7217. <li><a href="#IODev">IODev</a></li><br>
  7218. <li><b>timeout &lt;sec&gt;</b><br>
  7219. After sending a command to an actor, the actor must respond with its status within this time. If no status message is received,
  7220. up to two getStatus commands are resend.<br>
  7221. Default 60s.
  7222. </li><br>
  7223. <li><b>toggleUpDown</b><br>
  7224. If attribute is set, a stop command is send instead of the up or down command if the roller shutter is moving.
  7225. </li><br>
  7226. </ul>
  7227. <br>
  7228. </ul>
  7229. <a name="DUOFERNSTICK"></a>
  7230. <h3>DUOFERNSTICK</h3>
  7231. <ul>
  7232. The DUOFERNSTICK is the fhem module for the Rademacher DuoFern USB stick. <br>
  7233. <br><br>
  7234. <a name="DUOFERNSTICK_define"></a>
  7235. <b>Define</b>
  7236. <ul>
  7237. <code>define &lt;name&gt; DUOFERNSTICK &lt;device&gt; &lt;code&gt;</code><br><br>
  7238. &lt;device&gt; specifies the serial port to communicate with the DuoFern stick.<br>
  7239. &lt;code&gt; specifies the radio code of the DuoFern stick.<br>
  7240. <br>
  7241. The baud rate must be 115200 baud.<br>
  7242. The code of the DuoFern stick must start with 6F.
  7243. <br><br>
  7244. Example:<br>
  7245. <ul>
  7246. <code>define myDuoFernStick DUOFERNSTICK COM5@115200 6FEDCB</code><br>
  7247. <code>define myDuoFernStick DUOFERNSTICK /dev/serial/by-id/usb-Rademacher_DuoFern_USB-Stick_WR0455TN-if00-port0@115200 6FEDCB</code><br>
  7248. </ul>
  7249. </ul>
  7250. <br>
  7251. <a name="DUOFERNSTICK_set"></a>
  7252. <p><b>Set</b></p>
  7253. <ul>
  7254. <li><b>pair</b><br>
  7255. Set the DuoFern stick in pairing mode for 60 seconds. Any DouFern device set into
  7256. pairing mode in this time will be paired with the DuoFern stick.
  7257. </li><br>
  7258. <li><b>unpair</b><br>
  7259. Set the DuoFern stick in unpairing mode for 60 seconds. Any DouFern device set into
  7260. unpairing mode in this time will be unpaired from the DuoFern stick.
  7261. </li><br>
  7262. <li><b>reopen</b><br>
  7263. Reopens the connection to the device and reinitializes it.
  7264. </li><br>
  7265. <li><b>statusBroadcast</b><br>
  7266. Sends a status request message to all DuoFern devices.
  7267. </li><br>
  7268. <li><b>remotePair &lt;code&gt</b><br>
  7269. Activates the pairing mode on the device specified by the code.<br>
  7270. Some actors accept this command in unpaired mode up to two hours afte power up.
  7271. </li><br>
  7272. <li><b>raw &lt;rawmsg&gt;</b><br>
  7273. Sends a raw message.
  7274. </li><br>
  7275. </ul>
  7276. <br>
  7277. <b>Get</b> <ul>N/A</ul><br>
  7278. <a name="DUOFERNSTICK_attr"></a>
  7279. <b>Attributes</b>
  7280. <ul>
  7281. N/A
  7282. </ul>
  7283. <br>
  7284. </ul>
  7285. <a name="Dashboard"></a>
  7286. <h3>Dashboard</h3>
  7287. <ul>
  7288. Creates a Dashboard in any group can be arranged. The positioning may depend the Groups and column width are made<br>
  7289. arbitrarily by drag'n drop. Also, the width and height of a Group can be increased beyond the minimum size.<br>
  7290. <br>
  7291. <a name="Dashboarddefine"></a>
  7292. <b>Define</b>
  7293. <ul>
  7294. <code>define &lt;name&gt; Dashboard</code>
  7295. <br><br>
  7296. Example:<br>
  7297. <ul>
  7298. <code>define anyViews Dashboard</code>
  7299. </ul><br>
  7300. <b>Bestpractice beginner configuration</b>
  7301. <br><br>
  7302. <code>
  7303. define anyViews Dashboard<br>
  7304. attr anyViews dashboard_colcount 2<br>
  7305. attr anyviews dashboard_rowcentercolwidth 30,70<br>
  7306. attr anyViews dashboard_tab1groups &lt;Group1&gt;,&lt;Group2&gt;,&lt;Group3&gt;<br>
  7307. </code>
  7308. </ul>
  7309. <br>
  7310. <a name="Dashboardset"></a>
  7311. <b>Set</b>
  7312. <ul>
  7313. <code>set &lt;name&gt; lock</code><br><br>
  7314. locks the Dashboard so that no position changes can be made<br>
  7315. <code>set &lt;name&gt; unlock</code><br><br>
  7316. unlock the Dashboard<br>
  7317. </ul>
  7318. <br>
  7319. <a name="Dashboardget"></a>
  7320. <b>Get</b> <ul>N/A</ul><br>
  7321. <a name="Dashboardattr"></a>
  7322. <b>Attributes</b>
  7323. <ul>
  7324. <a name="dashboard_tabcount"></a>
  7325. <li>dashboard_tabcount<br>
  7326. Returns the number of displayed tabs. (Does not need to be set any more. It is read automatically from the configured tabs)
  7327. Default: 1
  7328. </li><br>
  7329. <a name="dashboard_activetab"></a>
  7330. <li>dashboard_activetab<br>
  7331. Specifies which tab is activated. Can be set manually, but is also set by the switch "Set" to the currently active tab.
  7332. Default: 1
  7333. </li><br>
  7334. <a name="dashboard_tabXname"></a>
  7335. <li>dashboard_tabXname<br>
  7336. Title of Tab at position X.
  7337. </li><br>
  7338. <a name="dashboard_tabXsorting"></a>
  7339. <li>dashboard_tabXsorting<br>
  7340. Contains the position of each group in Tab X. Value is written by the "Set" button. It is not recommended to take manual changes.
  7341. </li><br>
  7342. <a name="dashboard_row"></a>
  7343. <li>dashboard_row<br>
  7344. To select which rows are displayed. top only; center only; bottom only; top and center; center and bottom; top,center and bottom.<br>
  7345. Default: center
  7346. </li><br>
  7347. <a name="dashboard_width"></a>
  7348. <li>dashboard_width<br>
  7349. To determine the Dashboardwidth. The value can be specified, or an absolute width value (eg 1200) in pixels in% (eg 80%).<br>
  7350. Default: 100%
  7351. </li><br>
  7352. <a name="dashboard_rowcenterheight"></a>
  7353. <li>dashboard_rowcenterheight<br>
  7354. Height of the center row in which the groups may be positioned. <br>
  7355. Default: 400
  7356. </li><br>
  7357. <a name="dashboard_rowcentercolwidth"></a>
  7358. <li>dashboard_rowcentercolwidth<br>
  7359. About this attribute, the width of each column of the middle Dashboardrow can be set. It can be stored for each column a separate value.
  7360. The values ​​must be separated by a comma (no spaces). Each value determines the column width in%! The first value specifies the width of the first column,
  7361. the second value of the width of the second column, etc. Is the sum of the width greater than 100 it is reduced.
  7362. If more columns defined as widths the missing widths are determined by the difference to 100. However, are less columns are defined as the values ​​of
  7363. ignores the excess values​​.<br>
  7364. Default: 100
  7365. </li><br>
  7366. <a name="dashboard_rowtopheight"></a>
  7367. <li>dashboard_rowtopheight<br>
  7368. Height of the top row in which the groups may be positioned. <br>
  7369. Default: 250
  7370. </li><br>
  7371. <a name="dashboard_rowbottomheight"></a>
  7372. <li>"dashboard_rowbottomheight<br>
  7373. Height of the bottom row in which the groups may be positioned.<br>
  7374. Default: 250
  7375. </li><br>
  7376. <a name="dashboard_tabXgroups"></a>
  7377. <li>dashboard_tabXgroups<br>
  7378. Comma-separated list of the names of the groups to be displayed in Tab X.<br>
  7379. Each group can be given an icon for this purpose the group name, the following must be completed ":&lt;icon&gt;@&lt;color&gt;"<br>
  7380. Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow<br/>
  7381. Additionally a group can contain a regular expression to show all groups matching a criteria.
  7382. Example: .*Light.* to show all groups that contain the string "Light"
  7383. </li><br>
  7384. <a name="dashboard_tabXdevices"></a>
  7385. <li>dashboard_tabXdevices<br>
  7386. devspec list of devices that should appear in the tab. The format is:<br/>
  7387. GROUPNAME:devspec1,devspec2,...,devspecN:ICONNAME</br/>
  7388. THe icon name is optional. Also the group name is optional. In case of missing group name, the matching devices are not grouped but shown as separate widgets without titles. For further details on the devspec format see:<br/>
  7389. <a href="#devspec">Dev-Spec</a>
  7390. </li><br>
  7391. <a name="dashboard_tabXicon"></a>
  7392. <li>dashboard_tabXicon<br>
  7393. Set the icon for a Tab. There must exist an icon with the name ico.(png|svg) in the modpath directory. If the image is referencing an SVG icon, then you can use the @colorname suffix to color the image.
  7394. </li><br>
  7395. <a name="dashboard_colcount"></a>
  7396. <li>dashboard_colcount<br>
  7397. Number of columns in which the groups can be displayed. Nevertheless, it is possible to have multiple groups <br>
  7398. to be positioned in a column next to each other. This is depend on the width of columns and groups. <br>
  7399. Default: 1
  7400. </li><br>
  7401. <a name="dashboard_tabXcolcount"></a>
  7402. <li>dashboard_tabXcolcount<br>
  7403. Number of columns for a specific tab in which the groups can be displayed. Nevertheless, it is possible to have multiple groups <br>
  7404. to be positioned in a column next to each other. This depends on the width of columns and groups. <br>
  7405. Default: <dashboard_colcount>
  7406. </li><br>
  7407. <a name="dashboard_tabXbackgroundimage"></a>
  7408. <li>dashboard_tabXbackgroundimage<br>
  7409. Shows a background image for the X tab. The image is not stretched in any way, it should therefore match the tab size or extend it.
  7410. Standard:
  7411. </li><br>
  7412. <a name="dashboard_flexible"></a>
  7413. <li>dashboard_flexible<br>
  7414. If set to a value > 0, the widgets are not positioned in columns any more but can be moved freely to any position in the tab.<br/>
  7415. The value for this parameter also defines the grid, in which the position "snaps in".
  7416. Default: 0
  7417. </li><br>
  7418. <a name="dashboard_showfullsize"></a>
  7419. <li>dashboard_showfullsize<br>
  7420. Hide FHEMWEB Roomliste (complete left side) and Page Header if Value is 1.<br>
  7421. Default: 0
  7422. </li><br>
  7423. <a name="dashboard_showtabs"></a>
  7424. <li>dashboard_showtabs<br>
  7425. Displays the Tabs/Buttonbar on top or bottom, or hides them. If the Buttonbar is hidden lockstate is "lock" is used.<br>
  7426. Default: tabs-and-buttonbar-at-the-top
  7427. </li><br>
  7428. <a name="dashboard_showtogglebuttons"></a>
  7429. <li>dashboard_showtogglebuttons<br>
  7430. Displays a Toogle Button on each Group do collapse.<br>
  7431. Default: 0
  7432. </li><br>
  7433. <a name="dashboard_backgroundimage"></a>
  7434. <li>dashboard_backgroundimage<br>
  7435. Displays a background image for the complete dashboard. The image is not stretched in any way so the size should match/extend the
  7436. dashboard height/width.
  7437. Default:
  7438. </li><br>
  7439. <a name="dashboard_debug"></a>
  7440. <li>dashboard_debug<br>
  7441. Show Hiddenfields. Only for Maintainer's use.<br>
  7442. Default: 0
  7443. </li><br>
  7444. </ul>
  7445. </ul>
  7446. <a name="DbLog"></a>
  7447. <h3>DbLog</h3>
  7448. <ul>
  7449. <br>
  7450. With DbLog events can be stored in a database. SQLite, MySQL/MariaDB and PostgreSQL are supported databases. <br><br>
  7451. <b>Prereqisites</b> <br><br>
  7452. The Perl-modules <code>DBI</code> and <code>DBD::&lt;dbtype&gt;</code> are needed to be installed (use <code>cpan -i &lt;module&gt;</code>
  7453. if your distribution does not have it).
  7454. <br><br>
  7455. On a debian based system you may install these modules for instance by: <br><br>
  7456. <ul>
  7457. <table>
  7458. <colgroup> <col width=5%> <col width=95%> </colgroup>
  7459. <tr><td> <b>DBI</b> </td><td>: <code> sudo apt-get install libdbi-perl </code> </td></tr>
  7460. <tr><td> <b>MySQL</b> </td><td>: <code> sudo apt-get install [mysql-server] mysql-client libdbd-mysql libdbd-mysql-perl </code> (mysql-server only if you use a local MySQL-server installation) </td></tr>
  7461. <tr><td> <b>SQLite</b> </td><td>: <code> sudo apt-get install sqlite3 libdbi-perl libdbd-sqlite3-perl </code> </td></tr>
  7462. <tr><td> <b>PostgreSQL</b> </td><td>: <code> sudo apt-get install libdbd-pg-perl </code> </td></tr>
  7463. </table>
  7464. </ul>
  7465. <br>
  7466. <br>
  7467. <b>Preparations</b> <br><br>
  7468. At first you need to setup the database. <br>
  7469. Sample code and Scripts to prepare a MySQL/PostgreSQL/SQLite database you can find in <code>contrib/dblog/&lt;DBType&gt;_create.sql</code>.
  7470. The database contains two tables: <code>current</code> and <code>history</code>. <br>
  7471. The latter contains all events whereas the former only contains the last event for any given reading and device.
  7472. Please consider the <a href="#DbLogattr">attribute</a> DbLogType implicitly to determine the usage of tables
  7473. <code>current</code> and <code>history</code>.
  7474. <br><br>
  7475. The columns have the following meaning:: <br><br>
  7476. <ul>
  7477. <table>
  7478. <colgroup> <col width=5%> <col width=95%> </colgroup>
  7479. <tr><td> TIMESTAMP </td><td>: timestamp of event, e.g. <code>2007-12-30 21:45:22</code> </td></tr>
  7480. <tr><td> DEVICE </td><td>: device name, e.g. <code>Wetterstation</code> </td></tr>
  7481. <tr><td> TYPE </td><td>: device type, e.g. <code>KS300</code> </code> </td></tr>
  7482. <tr><td> EVENT </td><td>: event specification as full string, e.g. <code>humidity: 71 (%)</code> </td></tr>
  7483. <tr><td> READING </td><td>: name of reading extracted from event, e.g. <code>humidity</code> </td></tr>
  7484. <tr><td> VALUE </td><td>: actual reading extracted from event, e.g. <code>71</code> </td></tr>
  7485. <tr><td> UNIT </td><td>: unit extracted from event, e.g. <code>%</code> </td></tr>
  7486. </table>
  7487. </ul>
  7488. <br>
  7489. <br>
  7490. <b>create index</b> <br>
  7491. Due to reading performance, e.g. on creation of SVG-plots, it is very important that the <b>index "Search_Idx"</b>
  7492. or a comparable index (e.g. a primary key) is applied. A sample code for creation of that index is also available at the mentioned scripts in
  7493. <code>contrib/dblog/&lt;DBType&gt;_create.sql</code>. <br><br>
  7494. The index "Search_Idx" can be created, e.g. in database 'fhem', by these statements (also subsequently): <br><br>
  7495. <ul>
  7496. <table>
  7497. <colgroup> <col width=5%> <col width=95%> </colgroup>
  7498. <tr><td> <b>MySQL</b> </td><td>: <code> CREATE INDEX Search_Idx ON `fhem`.`history` (DEVICE, READING, TIMESTAMP); </code> </td></tr>
  7499. <tr><td> <b>SQLite</b> </td><td>: <code> CREATE INDEX Search_Idx ON `history` (DEVICE, READING, TIMESTAMP); </code> </td></tr>
  7500. <tr><td> <b>PostgreSQL</b> </td><td>: <code> CREATE INDEX "Search_Idx" ON history USING btree (device, reading, "timestamp"); </code> </td></tr>
  7501. </table>
  7502. </ul>
  7503. <br>
  7504. For the connection to the database a <b>configuration file</b> is used.
  7505. The configuration is stored in a separate file to avoid storing the password in the main configuration file and to have it
  7506. visible in the output of the <a href="https://fhem.de/commandref.html#list">list</a> command.
  7507. <br><br>
  7508. The <b>configuration file</b> should be copied e.g. to /opt/fhem and has the following structure you have to customize
  7509. suitable to your conditions (decomment the appropriate raws and adjust it): <br><br>
  7510. <pre>
  7511. ####################################################################################
  7512. # database configuration file
  7513. #
  7514. # NOTE:
  7515. # If you don't use a value for user / password please delete the leading hash mark
  7516. # and write 'user => ""' respectively 'password => ""' instead !
  7517. #
  7518. #
  7519. ## for MySQL
  7520. ####################################################################################
  7521. #%dbconfig= (
  7522. # connection => "mysql:database=fhem;host=db;port=3306",
  7523. # user => "fhemuser",
  7524. # password => "fhempassword",
  7525. # # optional enable(1) / disable(0) UTF-8 support (at least V 4.042 is necessary)
  7526. # utf8 => 1
  7527. #);
  7528. ####################################################################################
  7529. #
  7530. ## for PostgreSQL
  7531. ####################################################################################
  7532. #%dbconfig= (
  7533. # connection => "Pg:database=fhem;host=localhost",
  7534. # user => "fhemuser",
  7535. # password => "fhempassword"
  7536. #);
  7537. ####################################################################################
  7538. #
  7539. ## for SQLite (username and password stay empty for SQLite)
  7540. ####################################################################################
  7541. #%dbconfig= (
  7542. # connection => "SQLite:dbname=/opt/fhem/fhem.db",
  7543. # user => "",
  7544. # password => ""
  7545. #);
  7546. ####################################################################################
  7547. </pre>
  7548. <br>
  7549. <a name="DbLogdefine"></a>
  7550. <b>Define</b>
  7551. <ul>
  7552. <br>
  7553. <code>define &lt;name&gt; DbLog &lt;configfilename&gt; &lt;regexp&gt;</code>
  7554. <br><br>
  7555. <code>&lt;configfilename&gt;</code> is the prepared <b>configuration file</b>. <br>
  7556. <code>&lt;regexp&gt;</code> is identical to the specification of regex in the <a href="https://fhem.de/commandref.html#FileLog">FileLog</a> definition.
  7557. <br><br>
  7558. <b>Example:</b>
  7559. <ul>
  7560. <code>define myDbLog DbLog /etc/fhem/db.conf .*:.*</code><br>
  7561. all events will stored into the database
  7562. </ul>
  7563. <br>
  7564. After you have defined your DbLog-device it is recommended to run the <b>configuration check</b> <br><br>
  7565. <ul>
  7566. <code>set &lt;name&gt; configCheck</code> <br>
  7567. </ul>
  7568. <br>
  7569. This check reports some important settings and gives recommendations back to you if proposals are indentified.
  7570. (Available for MySQL, PostgreSQL) <br><br>
  7571. DbLog distinguishes between the synchronous (default) and asynchronous logmode. The logmode is adjustable by the
  7572. <a href="#DbLogattr">attribute</a> asyncMode. Since version 2.13.5 DbLog is supporting primary key (PK) set in table
  7573. current or history. If you want use PostgreSQL with PK it has to be at lest version 9.5.
  7574. <br><br>
  7575. The content of VALUE will be optimized for automated post-processing, e.g. <code>yes</code> is translated to <code>1</code>
  7576. <br><br>
  7577. The stored values can be retrieved by the following code like FileLog:<br>
  7578. <ul>
  7579. <code>get myDbLog - - 2012-11-10 2012-11-10 KS300:temperature::</code>
  7580. </ul>
  7581. <br>
  7582. <b>transfer FileLog-data to DbLog </b> <br><br>
  7583. There is the special module 98_FileLogConvert.pm available to transfer filelog-data to the DbLog-database. <br>
  7584. The module can be downloaded <a href="https://svn.fhem.de/trac/browser/trunk/fhem/contrib/98_FileLogConvert.pm"> here</a>
  7585. or from directory ./contrib instead.
  7586. Further informations and help you can find in the corresponding <a href="https://forum.fhem.de/index.php/topic,66383.0.html">
  7587. Forumthread </a>. <br><br><br>
  7588. <b>Reporting and Management of DbLog database content</b> <br><br>
  7589. By using <a href="https://fhem.de/commandref.html#SVG">SVG</a> database content can be visualized. <br>
  7590. Beyond that the module <a href="https://fhem.de/commandref.html#DbRep">DbRep</a> can be used to prepare tabular
  7591. database reports or you can manage the database content with available functions of that module.
  7592. <br><br>
  7593. </ul>
  7594. <br>
  7595. <br>
  7596. <a name="DbLogset"></a>
  7597. <b>Set</b>
  7598. <ul>
  7599. <code>set &lt;name&gt; addLog &lt;devspec&gt;:&lt;Reading&gt; [Value] </code><br><br>
  7600. <ul> Inserts an additional log entry of a device/reading combination into the database.
  7601. Optionally you can enter a "Value" that is used as reading value for the dataset. If the value isn't specified (default),
  7602. the current value of the specified reading will be inserted into the database. The field "$EVENT" will be filled automatically
  7603. by "addLog". The device can be declared by a <a href="#devspec">device specification (devspec)</a>.
  7604. "Reading" will be evaluated as regular expression.
  7605. By the addLog-command NO additional events will be created !<br><br>
  7606. <b>Examples:</b> <br>
  7607. set &lt;name&gt; addLog SMA_Energymeter:Bezug_Wirkleistung <br>
  7608. set &lt;name&gt; addLog TYPE=SSCam:state <br>
  7609. set &lt;name&gt; addLog MyWetter:(fc10.*|fc8.*) <br>
  7610. set &lt;name&gt; addLog MyWetter:(wind|wind_ch.*) 20 <br>
  7611. set &lt;name&gt; addLog TYPE=CUL_HM:FILTER=model=HM-CC-RT-DN:FILTER=subType!=(virtual|):(measured-temp|desired-temp|actuator) <br>
  7612. </ul><br>
  7613. <code>set &lt;name&gt; clearReadings </code><br><br>
  7614. <ul> This function clears readings which were created by different DbLog-functions. </ul><br>
  7615. <code>set &lt;name&gt; commitCache </code><br><br>
  7616. <ul>In asynchronous mode (<a href="#DbLogattr">attribute</a> asyncMode=1), the cached data in memory will be written into the database
  7617. and subsequently the cache will be cleared. Thereby the internal timer for the asynchronous mode Modus will be set new.
  7618. The command can be usefull in case of you want to write the cached data manually or e.g. by an AT-device on a defined
  7619. point of time into the database. </ul><br>
  7620. <code>set &lt;name&gt; configCheck </code><br><br>
  7621. <ul>This command checks some important settings and gives recommendations back to you if proposals are indentified.
  7622. (available for MySQL, PostgreSQL) </ul><br>
  7623. <code>set &lt;name&gt; count </code><br/><br/>
  7624. <ul>Count records in tables current and history and write results into readings countCurrent and countHistory.</ul><br/>
  7625. <code>set &lt;name&gt; countNbl </code><br/><br/>
  7626. <ul>The non-blocking execution of "set &lt;name&gt; count".</ul><br/>
  7627. <code>set &lt;name&gt; deleteOldDays &lt;n&gt;</code><br/><br/>
  7628. <ul>Delete records from history older than &lt;n&gt; days. Number of deleted records will be written into reading lastRowsDeleted.</ul><br/>
  7629. <code>set &lt;name&gt; deleteOldDaysNbl &lt;n&gt;</code><br/><br/>
  7630. <ul>Is identical to function "deleteOldDays" whereupon deleteOldDaysNbl will be executed non-blocking. </ul><br/>
  7631. <code>set &lt;name&gt; eraseReadings </code><br><br>
  7632. <ul> This function deletes all readings except reading "state". </ul><br>
  7633. <a name="DbLogsetexportCache"></a>
  7634. <code>set &lt;name&gt; exportCache [nopurge | purgeCache] </code><br><br>
  7635. <ul>If DbLog is operating in asynchronous mode, it's possible to exoprt the cache content into a textfile.
  7636. The file will be written to the directory (global->modpath)/log/ by default setting. The detination directory can be
  7637. changed by the <a href="#DbLogattr">attribute</a> expimpdir. <br>
  7638. The filename will be generated automatically and is built by a prefix "cache_", followed by DbLog-devicename and the
  7639. present timestmp, e.g. "cache_LogDB_2017-03-23_22-13-55". <br>
  7640. There are two options possible, "nopurge" respectively "purgeCache". The option determines whether the cache content
  7641. will be deleted after export or not.
  7642. Using option "nopurge" (default) the cache content will be preserved. </ul><br>
  7643. <code>set &lt;name&gt; importCachefile &lt;file&gt; </code><br><br>
  7644. <ul>Imports an textfile into the database which has been written by the "exportCache" function.
  7645. The allocatable files will be searched in directory (global->modpath)/log/ by default and a drop-down list will be
  7646. generated from the files which are found in the directory.
  7647. The source directory can be changed by the <a href="#DbLogattr">attribute</a> expimpdir. <br>
  7648. Only that files will be shown which are correlate on pattern starting with "cache_", followed by the DbLog-devicename. <br>
  7649. For example a file with the name "cache_LogDB_2017-03-23_22-13-55", will match if Dblog-device has name "LogDB". <br>
  7650. After the import has been successfully done, a prefix "impdone_" will be added at begin of the filename and this file
  7651. ddoesn't appear on the drop-down list anymore. <br>
  7652. If you want to import a cachefile from another source database, you may adapt the filename so it fits the search criteria
  7653. "DbLog-Device" in its name. After renaming the file appeares again on the drop-down list. </ul><br>
  7654. <code>set &lt;name&gt; listCache </code><br><br>
  7655. <ul>If DbLog is set to asynchronous mode (attribute asyncMode=1), you can use that command to list the events are cached in memory.</ul><br>
  7656. <code>set &lt;name&gt; purgeCache </code><br><br>
  7657. <ul>In asynchronous mode (<a href="#DbLogattr">attribute</a> asyncMode=1), the in memory cached data will be deleted.
  7658. With this command data won't be written from cache into the database. </ul><br>
  7659. <code>set &lt;name&gt; reduceLog &lt;n&gt; [average[=day]] [exclude=deviceRegExp1:ReadingRegExp1,deviceRegExp2:ReadingRegExp2,...]</code> <br><br>
  7660. <ul>Reduces records older than &lt;n&gt; days to one record each hour (the 1st) per device & reading. <br><br>
  7661. <b>CAUTION:</b> It is strongly recommended to check if the default INDEX 'Search_Idx' exists on the table 'history'! <br>
  7662. The execution of this command may take (without INDEX) extremely long. FHEM will be <b>blocked completely</b> after issuing the command to completion ! <br><br>
  7663. With the optional argument 'average' not only the records will be reduced, but all numerical values of an hour
  7664. will be reduced to a single average. <br>
  7665. With the optional argument 'average=day' not only the records will be reduced, but all numerical values of a
  7666. day will be reduced to a single average. (implies 'average') <br>
  7667. You can optional set the last argument to "EXCLUDE=deviceRegExp1:ReadingRegExp1,deviceRegExp2:ReadingRegExp2,...."
  7668. to exclude device/readings from reduceLog. <br>
  7669. You can optional set the last argument to "INCLUDE=Database-deviceRegExp:Database-ReadingRegExp" to delimit
  7670. the SELECT statement which is executet on the database. This reduces the system RAM load and increases the
  7671. performance. (Wildcards are % and _) <br>
  7672. </ul><br>
  7673. <code>set &lt;name&gt; reduceLogNbl &lt;n&gt; [average[=day]] [exclude=deviceRegExp1:ReadingRegExp1,deviceRegExp2:ReadingRegExp2,...]</code> <br><br>
  7674. <ul>Same function as "set &lt;name&gt; reduceLog" but FHEM won't be blocked due to this function is implemented non-blocking ! <br>
  7675. </ul><br>
  7676. <code>set &lt;name&gt; reopen [n] </code><br/><br/>
  7677. <ul>Perform a database disconnect and immediate reconnect to clear cache and flush journal file if no time [n] was set. <br>
  7678. If optionally a delay time of [n] seconds was set, the database connection will be disconnect immediately but it was only reopened
  7679. after [n] seconds. In synchronous mode the events won't saved during that time. In asynchronous mode the events will be
  7680. stored in the memory cache and saved into database after the reconnect was done. </ul><br/>
  7681. <code>set &lt;name&gt; rereadcfg </code><br/><br/>
  7682. <ul>Perform a database disconnect and immediate reconnect to clear cache and flush journal file.<br/>
  7683. Probably same behavior als reopen, but rereadcfg will read the configuration data before reconnect.</ul><br/>
  7684. <code>set &lt;name&gt; userCommand &lt;validSqlStatement&gt;</code><br/><br/>
  7685. <ul><b>DO NOT USE THIS COMMAND UNLESS YOU REALLY (REALLY!) KNOW WHAT YOU ARE DOING!!!</b><br/><br/>
  7686. Performs any (!!!) sql statement on connected database. Usercommand and result will be written into
  7687. corresponding readings.</br>
  7688. The result can only be a single line. If the SQL-Statement seems to deliver a multiline result, it can be suitable
  7689. to use the analysis module <a href=https://fhem.de/commandref.html#DbRep>DbRep</a>.</br>
  7690. If the database interface delivers no result (undef), the reading "userCommandResult" contains the message
  7691. "no result".
  7692. </ul><br/>
  7693. </ul><br>
  7694. <a name="DbLogget"></a>
  7695. <b>Get</b>
  7696. <ul>
  7697. <code>get &lt;name&gt; ReadingsVal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;device&gt; &lt;reading&gt; &lt;default&gt;</code><br/>
  7698. <code>get &lt;name&gt; ReadingsTimestamp &lt;device&gt; &lt;reading&gt; &lt;default&gt;</code><br/>
  7699. <br/>
  7700. Retrieve one single value, use and syntax are similar to ReadingsVal() and ReadingsTimestamp() functions.<br/>
  7701. </ul>
  7702. <br/>
  7703. <br/>
  7704. <ul>
  7705. <code>get &lt;name&gt; &lt;infile&gt; &lt;outfile&gt; &lt;from&gt;
  7706. &lt;to&gt; &lt;column_spec&gt; </code>
  7707. <br><br>
  7708. Read data from the Database, used by frontends to plot data without direct
  7709. access to the Database.<br>
  7710. <ul>
  7711. <li>&lt;in&gt;<br>
  7712. A dummy parameter for FileLog compatibility. Sessing by defaultto <code>-</code><br>
  7713. <ul>
  7714. <li>current: reading actual readings from table "current"</li>
  7715. <li>history: reading history readings from table "history"</li>
  7716. <li>-: identical to "history"</li>
  7717. </ul>
  7718. </li>
  7719. <li>&lt;out&gt;<br>
  7720. A dummy parameter for FileLog compatibility. Setting by default to <code>-</code>
  7721. to check the output for plot-computing.<br>
  7722. Set it to the special keyword
  7723. <code>all</code> to get all columns from Database.
  7724. <ul>
  7725. <li>ALL: get all colums from table, including a header</li>
  7726. <li>Array: get the columns as array of hashes</li>
  7727. <li>INT: internally used by generating plots</li>
  7728. <li>-: default</li>
  7729. </ul>
  7730. </li>
  7731. <li>&lt;from&gt; / &lt;to&gt;<br>
  7732. Used to select the data. Please use the following timeformat or
  7733. an initial substring of it:<br>
  7734. <ul><code>YYYY-MM-DD_HH24:MI:SS</code></ul></li>
  7735. <li>&lt;column_spec&gt;<br>
  7736. For each column_spec return a set of data separated by
  7737. a comment line on the current connection.<br>
  7738. Syntax: &lt;device&gt;:&lt;reading&gt;:&lt;default&gt;:&lt;fn&gt;:&lt;regexp&gt;<br>
  7739. <ul>
  7740. <li>&lt;device&gt;<br>
  7741. The name of the device. Case sensitive. Using a the joker "%" is supported.</li>
  7742. <li>&lt;reading&gt;<br>
  7743. The reading of the given device to select. Case sensitive. Using a the joker "%" is supported.
  7744. </li>
  7745. <li>&lt;default&gt;<br>
  7746. no implemented yet
  7747. </li>
  7748. <li>&lt;fn&gt;
  7749. One of the following:
  7750. <ul>
  7751. <li>int<br>
  7752. Extract the integer at the beginning of the string. Used e.g.
  7753. for constructs like 10%</li>
  7754. <li>int&lt;digit&gt;<br>
  7755. Extract the decimal digits including negative character and
  7756. decimal point at the beginning og the string. Used e.g.
  7757. for constructs like 15.7&deg;C</li>
  7758. <li>delta-h / delta-d<br>
  7759. Return the delta of the values for a given hour or a given day.
  7760. Used if the column contains a counter, as is the case for the
  7761. KS300 rain column.</li>
  7762. <li>delta-ts<br>
  7763. Replaced the original value with a measured value of seconds since
  7764. the last and the actual logentry.
  7765. </li>
  7766. </ul></li>
  7767. <li>&lt;regexp&gt;<br>
  7768. The string is evaluated as a perl expression. The regexp is executed
  7769. before &lt;fn&gt; parameter.<br>
  7770. Note: The string/perl expression cannot contain spaces,
  7771. as the part after the space will be considered as the
  7772. next column_spec.<br>
  7773. <b>Keywords</b>
  7774. <li>$val is the current value returned from the Database.</li>
  7775. <li>$ts is the current timestamp returned from the Database.</li>
  7776. <li>This Logentry will not print out if $val contains th keyword "hide".</li>
  7777. <li>This Logentry will not print out and not used in the following processing
  7778. if $val contains th keyword "ignore".</li>
  7779. </li>
  7780. </ul></li>
  7781. </ul>
  7782. <br><br>
  7783. Examples:
  7784. <ul>
  7785. <li><code>get myDbLog - - 2012-11-10 2012-11-20 KS300:temperature</code></li>
  7786. <li><code>get myDbLog current ALL - - %:temperature</code></li><br>
  7787. you will get all actual readings "temperature" from all logged devices.
  7788. Be careful by using "history" as inputfile because a long execution time will be expected!
  7789. <li><code>get myDbLog - - 2012-11-10_10 2012-11-10_20 KS300:temperature::int1</code><br>
  7790. like from 10am until 08pm at 10.11.2012</li>
  7791. <li><code>get myDbLog - all 2012-11-10 2012-11-20 KS300:temperature</code></li>
  7792. <li><code>get myDbLog - - 2012-11-10 2012-11-20 KS300:temperature KS300:rain::delta-h KS300:rain::delta-d</code></li>
  7793. <li><code>get myDbLog - - 2012-11-10 2012-11-20 MyFS20:data:::$val=~s/(on|off).*/$1eq"on"?1:0/eg</code><br>
  7794. return 1 for all occurance of on* (on|on-for-timer etc) and 0 for all off*</li>
  7795. <li><code>get myDbLog - - 2012-11-10 2012-11-20 Bodenfeuchte:data:::$val=~s/.*B:\s([-\.\d]+).*/$1/eg</code><br>
  7796. Example of OWAD: value like this: <code>"A: 49.527 % B: 66.647 % C: 9.797 % D: 0.097 V"</code><br>
  7797. and output for port B is like this: <code>2012-11-20_10:23:54 66.647</code></li>
  7798. <li><code>get DbLog - - 2013-05-26 2013-05-28 Pumpe:data::delta-ts:$val=~s/on/hide/</code><br>
  7799. Setting up a "Counter of Uptime". The function delta-ts gets the seconds between the last and the
  7800. actual logentry. The keyword "hide" will hide the logentry of "on" because this time
  7801. is a "counter of Downtime"</li>
  7802. </ul>
  7803. <br><br>
  7804. </ul>
  7805. <b>Get</b> when used for webcharts
  7806. <ul>
  7807. <code>get &lt;name&gt; &lt;infile&gt; &lt;outfile&gt; &lt;from&gt;
  7808. &lt;to&gt; &lt;device&gt; &lt;querytype&gt; &lt;xaxis&gt; &lt;yaxis&gt; &lt;savename&gt; </code>
  7809. <br><br>
  7810. Query the Database to retrieve JSON-Formatted Data, which is used by the charting frontend.
  7811. <br>
  7812. <ul>
  7813. <li>&lt;name&gt;<br>
  7814. The name of the defined DbLog, like it is given in fhem.cfg.</li>
  7815. <li>&lt;in&gt;<br>
  7816. A dummy parameter for FileLog compatibility. Always set to <code>-</code></li>
  7817. <li>&lt;out&gt;<br>
  7818. A dummy parameter for FileLog compatibility. Set it to <code>webchart</code>
  7819. to use the charting related get function.
  7820. </li>
  7821. <li>&lt;from&gt; / &lt;to&gt;<br>
  7822. Used to select the data. Please use the following timeformat:<br>
  7823. <ul><code>YYYY-MM-DD_HH24:MI:SS</code></ul></li>
  7824. <li>&lt;device&gt;<br>
  7825. A string which represents the device to query.</li>
  7826. <li>&lt;querytype&gt;<br>
  7827. A string which represents the method the query should use. Actually supported values are: <br>
  7828. <code>getreadings</code> to retrieve the possible readings for a given device<br>
  7829. <code>getdevices</code> to retrieve all available devices<br>
  7830. <code>timerange</code> to retrieve charting data, which requires a given xaxis, yaxis, device, to and from<br>
  7831. <code>savechart</code> to save a chart configuration in the database. Requires a given xaxis, yaxis, device, to and from, and a 'savename' used to save the chart<br>
  7832. <code>deletechart</code> to delete a saved chart. Requires a given id which was set on save of the chart<br>
  7833. <code>getcharts</code> to get a list of all saved charts.<br>
  7834. <code>getTableData</code> to get jsonformatted data from the database. Uses paging Parameters like start and limit.<br>
  7835. <code>hourstats</code> to get statistics for a given value (yaxis) for an hour.<br>
  7836. <code>daystats</code> to get statistics for a given value (yaxis) for a day.<br>
  7837. <code>weekstats</code> to get statistics for a given value (yaxis) for a week.<br>
  7838. <code>monthstats</code> to get statistics for a given value (yaxis) for a month.<br>
  7839. <code>yearstats</code> to get statistics for a given value (yaxis) for a year.<br>
  7840. </li>
  7841. <li>&lt;xaxis&gt;<br>
  7842. A string which represents the xaxis</li>
  7843. <li>&lt;yaxis&gt;<br>
  7844. A string which represents the yaxis</li>
  7845. <li>&lt;savename&gt;<br>
  7846. A string which represents the name a chart will be saved with</li>
  7847. <li>&lt;chartconfig&gt;<br>
  7848. A jsonstring which represents the chart to save</li>
  7849. <li>&lt;pagingstart&gt;<br>
  7850. An integer used to determine the start for the sql used for query 'getTableData'</li>
  7851. <li>&lt;paginglimit&gt;<br>
  7852. An integer used to set the limit for the sql used for query 'getTableData'</li>
  7853. </ul>
  7854. <br><br>
  7855. Examples:
  7856. <ul>
  7857. <li><code>get logdb - webchart "" "" "" getcharts</code><br>
  7858. Retrieves all saved charts from the Database</li>
  7859. <li><code>get logdb - webchart "" "" "" getdevices</code><br>
  7860. Retrieves all available devices from the Database</li>
  7861. <li><code>get logdb - webchart "" "" ESA2000_LED_011e getreadings</code><br>
  7862. Retrieves all available Readings for a given device from the Database</li>
  7863. <li><code>get logdb - webchart 2013-02-11_00:00:00 2013-02-12_00:00:00 ESA2000_LED_011e timerange TIMESTAMP day_kwh</code><br>
  7864. Retrieves charting data, which requires a given xaxis, yaxis, device, to and from<br>
  7865. Will ouput a JSON like this: <code>[{'TIMESTAMP':'2013-02-11 00:10:10','VALUE':'0.22431388090756'},{'TIMESTAMP'.....}]</code></li>
  7866. <li><code>get logdb - webchart 2013-02-11_00:00:00 2013-02-12_00:00:00 ESA2000_LED_011e savechart TIMESTAMP day_kwh tageskwh</code><br>
  7867. Will save a chart in the database with the given name and the chart configuration parameters</li>
  7868. <li><code>get logdb - webchart "" "" "" deletechart "" "" 7</code><br>
  7869. Will delete a chart from the database with the given id</li>
  7870. </ul>
  7871. <br><br>
  7872. </ul>
  7873. <a name="DbLogattr"></a>
  7874. <b>Attributes</b>
  7875. <br><br>
  7876. <ul><b>addStateEvent</b>
  7877. <ul>
  7878. <code>attr &lt;device&gt; addStateEvent [0|1]
  7879. </code><br>
  7880. As you probably know the event associated with the state Reading is special, as the "state: "
  7881. string is stripped, i.e event is not "state: on" but just "on". <br>
  7882. Mostly it is desireable to get the complete event without "state: " stripped, so it is the default behavior of DbLog.
  7883. That means you will get state-event complete as "state: xxx". <br>
  7884. In some circumstances, e.g. older or special modules, it is a good idea to set addStateEvent to "0".
  7885. Try it if you have trouble with the default adjustment.
  7886. <br>
  7887. </ul>
  7888. </ul>
  7889. <br>
  7890. <ul><b>asyncMode</b>
  7891. <ul>
  7892. <code>attr &lt;device&gt; asyncMode [1|0]
  7893. </code><br>
  7894. This attribute determines the operation mode of DbLog. If asynchronous mode is active (asyncMode=1), the events which should be saved
  7895. at first will be cached in memory. After synchronisation time cycle (attribute syncInterval), or if the count limit of datasets in cache
  7896. is reached (attribute cacheLimit), the cached events get saved into the database using bulk insert.
  7897. If the database isn't available, the events will be cached in memeory furthermore, and tried to save into database again after
  7898. the next synchronisation time cycle if the database is available. <br>
  7899. In asynchronous mode the data insert into database will be executed non-blocking by a background process.
  7900. You can adjust the timeout value for this background process by attribute "timeout" (default 86400s). <br>
  7901. In synchronous mode (normal mode) the events won't be cached im memory and get saved into database immediately. If the database isn't
  7902. available the events are get lost. <br>
  7903. </ul>
  7904. </ul>
  7905. <br>
  7906. <ul><b>cacheEvents</b>
  7907. <ul>
  7908. <code>attr &lt;device&gt; cacheEvents [2|1|0]
  7909. </code><br>
  7910. <ul>
  7911. <li>cacheEvents=1: creates events of reading CacheUsage at point of time when a new dataset has been added to the cache. </li>
  7912. <li>cacheEvents=2: creates events of reading CacheUsage at point of time when in aychronous mode a new write cycle to the
  7913. database starts. In that moment CacheUsage contains the amount of datasets which will be written to
  7914. the database. </li><br>
  7915. </ul>
  7916. </ul>
  7917. </ul>
  7918. <br>
  7919. <ul><b>cacheLimit</b>
  7920. <ul>
  7921. <code>
  7922. attr &lt;device&gt; cacheLimit &lt;n&gt;
  7923. </code><br>
  7924. In asynchronous logging mode the content of cache will be written into the database and cleared if the number &lt;n&gt; datasets
  7925. in cache has reached (default: 500). Thereby the timer of asynchronous logging mode will be set new to the value of
  7926. attribute "syncInterval". <br>
  7927. </ul>
  7928. </ul>
  7929. <br>
  7930. <ul><b>colEvent</b>
  7931. <ul>
  7932. <code>
  7933. attr &lt;device&gt; colEvent &lt;n&gt;
  7934. </code><br>
  7935. The field length of database field EVENT will be adjusted. By this attribute the default value in the DbLog-device can be
  7936. adjusted if the field length in the databse was changed nanually. If colEvent=0 is set, the database field
  7937. EVENT won't be filled . <br>
  7938. <b>Note:</b> <br>
  7939. If the attribute is set, all of the field length limits are valid also for SQLite databases as noticed in Internal COLUMNS ! <br>
  7940. </ul>
  7941. </ul>
  7942. <br>
  7943. <ul><b>colReading</b>
  7944. <ul>
  7945. <code>
  7946. attr &lt;device&gt; colReading &lt;n&gt;
  7947. </code><br>
  7948. The field length of database field READING will be adjusted. By this attribute the default value in the DbLog-device can be
  7949. adjusted if the field length in the databse was changed nanually. If colReading=0 is set, the database field
  7950. READING won't be filled . <br>
  7951. <b>Note:</b> <br>
  7952. If the attribute is set, all of the field length limits are valid also for SQLite databases as noticed in Internal COLUMNS ! <br>
  7953. </ul>
  7954. </ul>
  7955. <br>
  7956. <ul><b>colValue</b>
  7957. <ul>
  7958. <code>
  7959. attr &lt;device&gt; colValue &lt;n&gt;
  7960. </code><br>
  7961. The field length of database field VALUE will be adjusted. By this attribute the default value in the DbLog-device can be
  7962. adjusted if the field length in the databse was changed nanually. If colEvent=0 is set, the database field
  7963. VALUE won't be filled . <br>
  7964. <b>Note:</b> <br>
  7965. If the attribute is set, all of the field length limits are valid also for SQLite databases as noticed in Internal COLUMNS ! <br>
  7966. </ul>
  7967. </ul>
  7968. <br>
  7969. <ul><b>DbLogType</b>
  7970. <ul>
  7971. <code>
  7972. attr &lt;device&gt; DbLogType [Current|History|Current/History]
  7973. </code><br>
  7974. This attribute determines which table or which tables in the database are wanted to use. If the attribute isn't set,
  7975. the adjustment <i>history</i> will be used as default. <br>
  7976. The meaning of the adjustments in detail are: <br><br>
  7977. <ul>
  7978. <table>
  7979. <colgroup> <col width=10%> <col width=90%> </colgroup>
  7980. <tr><td> <b>Current</b> </td><td>Events are only logged into the current-table.
  7981. The entries of current-table will evaluated with SVG-creation. </td></tr>
  7982. <tr><td> <b>History</b> </td><td>Events are only logged into the history-table. No dropdown list with proposals will created with the
  7983. SVG-creation. </td></tr>
  7984. <tr><td> <b>Current/History</b> </td><td>Events will be logged both the current- and the history-table.
  7985. The entries of current-table will evaluated with SVG-creation. </td></tr>
  7986. <tr><td> <b>SampleFill/History</b> </td><td>Events are only logged into the history-table. The entries of current-table will evaluated with SVG-creation
  7987. and can be filled up with a customizable extract of the history-table by using a
  7988. <a href="http://fhem.de/commandref.html#DbRep">DbRep-device</a> command
  7989. "set &lt;DbRep-name&gt; tableCurrentFillup" (advanced feature). </td></tr>
  7990. </table>
  7991. </ul>
  7992. <br>
  7993. <br>
  7994. <b>Note:</b> <br>
  7995. The current-table has to be used to get a Device:Reading-DropDown list when a SVG-Plot will be created. <br>
  7996. </ul>
  7997. </ul>
  7998. <br>
  7999. <ul><b>DbLogSelectionMode</b>
  8000. <ul>
  8001. <code>
  8002. attr &lt;device&gt; DbLogSelectionMode [Exclude|Include|Exclude/Include]
  8003. </code><br>
  8004. Thise DbLog-Device-Attribute specifies how the device specific Attributes DbLogExclude and DbLogInclude are handled.
  8005. If this Attribute is missing it defaults to "Exclude".
  8006. <ul>
  8007. <li>Exclude: DbLog behaves just as usual. This means everything specified in the regex in DEF will be logged by default and anything excluded
  8008. via the DbLogExclude attribute will not be logged</li>
  8009. <li>Include: Nothing will be logged, except the readings specified via regex in the DbLogInclude attribute </li>
  8010. <li>Exclude/Include: Just almost the same as Exclude, but if the reading matches the DbLogExclude attribute, then
  8011. it will further be checked against the regex in DbLogInclude whicht may possibly re-include the already
  8012. excluded reading. </li>
  8013. </ul>
  8014. </ul>
  8015. </ul>
  8016. <br>
  8017. <ul><b>DbLogInclude</b>
  8018. <ul>
  8019. <code>
  8020. attr &lt;device&gt; DbLogInclude regex:MinInterval,[regex:MinInterval] ...
  8021. </code><br>
  8022. A new Attribute DbLogInclude will be propagated
  8023. to all Devices if DBLog is used. DbLogInclude works just like DbLogExclude but
  8024. to include matching readings.
  8025. See also DbLogSelectionMode-Attribute of DbLog-Device which takes influence on
  8026. on how DbLogExclude and DbLogInclude are handled. <br>
  8027. <b>Example</b> <br>
  8028. <code>attr MyDevice1 DbLogInclude .*</code> <br>
  8029. <code>attr MyDevice2 DbLogInclude state,(floorplantext|MyUserReading):300,battery:3600</code>
  8030. </ul>
  8031. </ul>
  8032. <br>
  8033. <ul><b>DbLogExclude</b>
  8034. <ul>
  8035. <code>
  8036. attr &lt;device&gt; DbLogExclude regex:MinInterval,[regex:MinInterval] ...
  8037. </code><br>
  8038. A new Attribute DbLogExclude will be propagated to all Devices if DBLog is used.
  8039. DbLogExclude will work as regexp to exclude defined readings to log. Each individual regexp-group are separated by comma.
  8040. If a MinInterval is set, the logentry is dropped if the defined interval is not reached and value vs. lastvalue is eqal. <br>
  8041. <b>Example</b> <br>
  8042. <code>attr MyDevice1 DbLogExclude .*</code> <br>
  8043. <code>attr MyDevice2 DbLogExclude state,(floorplantext|MyUserReading):300,battery:3600</code>
  8044. </ul>
  8045. </ul>
  8046. <br>
  8047. <ul><b>excludeDevs</b>
  8048. <ul>
  8049. <code>
  8050. attr &lt;device&gt; excludeDevs &lt;devspec1&gt;,&lt;devspec2&gt;,&lt;devspec..&gt;
  8051. </code><br>
  8052. The devices "devspec1", "devspec2" up to "devspec.." will be excluded from logging into database. This attribute
  8053. will only be evaluated if internal "NOTIFYDEV" is not defined or if DbLog-define ".*:.*" (that means all devices
  8054. should be logged) is set.
  8055. Thereby devices can be explicit excluded from logging. The devices to exclude can be specified as
  8056. <a href="#devspec">device-specification</a>.
  8057. For further informations about devspec please see <a href="#devspec">device-specification</a>. <br>
  8058. <b>Example</b> <br>
  8059. <code>
  8060. attr &lt;device&gt; excludeDevs global,Log.*,Cam.*,TYPE=DbLog
  8061. </code><br>
  8062. # The devices global respectively devices starting with "Log" or "Cam" and devices with Type=DbLog
  8063. are excluded from database logging. <br>
  8064. </ul>
  8065. </ul>
  8066. <br>
  8067. <ul><b>expimpdir</b>
  8068. <ul>
  8069. <code>
  8070. attr &lt;device&gt; expimpdir &lt;directory&gt;
  8071. </code><br>
  8072. If the cache content will be exported by <a href="#DbLogsetexportCache">"exportCache"</a> or the "importCachefile"
  8073. command, the file will be written into or read from that directory. The default directory is
  8074. "(global->modpath)/log/".
  8075. Make sure the specified directory is existing and writable. <br>
  8076. <b>Example</b> <br>
  8077. <code>
  8078. attr &lt;device&gt; expimpdir /opt/fhem/cache/
  8079. </code><br>
  8080. </ul>
  8081. </ul>
  8082. <br>
  8083. <ul><b>noNotifyDev</b>
  8084. <ul>
  8085. <code>
  8086. attr &lt;device&gt; noNotifyDev [1|0]
  8087. </code><br>
  8088. Enforces that NOTIFYDEV won't set and hence won't used. <br>
  8089. </ul>
  8090. </ul>
  8091. <br>
  8092. <ul><b>noSupportPK</b>
  8093. <ul>
  8094. <code>
  8095. attr &lt;device&gt; noSupportPK [1|0]
  8096. </code><br>
  8097. Deactivates the support of a set primary key by the module.<br>
  8098. </ul>
  8099. </ul>
  8100. <br>
  8101. <ul><b>syncEvents</b>
  8102. <ul>
  8103. <code>attr &lt;device&gt; syncEvents [1|0]
  8104. </code><br>
  8105. events of reading syncEvents will be created. <br>
  8106. </ul>
  8107. </ul>
  8108. <br>
  8109. <ul><b>shutdownWait</b>
  8110. <ul>
  8111. <code>attr &lt;device&gt; shutdownWait <n>
  8112. </code><br>
  8113. causes fhem shutdown to wait n seconds for pending database commit<br/>
  8114. </ul>
  8115. </ul>
  8116. <br>
  8117. <ul><b>showproctime</b>
  8118. <ul>
  8119. <code>attr &lt;device&gt; [1|0]
  8120. </code><br>
  8121. If set, the reading "sql_processing_time" shows the required execution time (in seconds) for the sql-requests. This is not calculated
  8122. for a single sql-statement, but the summary of all sql-statements necessary for within an executed DbLog-function in background.
  8123. The reading "background_processing_time" shows the total time used in background. <br>
  8124. </ul>
  8125. </ul>
  8126. <br>
  8127. <ul><b>showNotifyTime</b>
  8128. <ul>
  8129. <code>attr &lt;device&gt; showNotifyTime [1|0]
  8130. </code><br>
  8131. If set, the reading "notify_processing_time" shows the required execution time (in seconds) in the DbLog
  8132. Notify-function. This attribute is practical for performance analyses and helps to determine the differences of time
  8133. required when the operation mode was switched from synchronous to the asynchronous mode. <br>
  8134. </ul>
  8135. </ul>
  8136. <br>
  8137. <ul><b>syncInterval</b>
  8138. <ul>
  8139. <code>attr &lt;device&gt; syncInterval &lt;n&gt;
  8140. </code><br>
  8141. If DbLog is set to asynchronous operation mode (attribute asyncMode=1), with this attribute you can setup the interval in seconds
  8142. used for storage the in memory cached events into the database. THe default value is 30 seconds. <br>
  8143. </ul>
  8144. </ul>
  8145. <br>
  8146. <ul><b>suppressAddLogV3</b>
  8147. <ul>
  8148. <code>attr &lt;device&gt; suppressAddLogV3 [1|0]
  8149. </code><br>
  8150. If set, verbose3-Logfileentries done by the addLog-function will be suppressed. <br>
  8151. </ul>
  8152. </ul>
  8153. <br>
  8154. <ul><b>suppressUndef</b>
  8155. <ul>
  8156. <code>
  8157. attr &lt;device&gt; ignoreUndef <n>
  8158. </code><br>
  8159. suppresses all undef values when returning data from the DB via get <br>
  8160. <b>Example</b> <br>
  8161. <code>#DbLog eMeter:power:::$val=($val>1500)?undef:$val</code>
  8162. </ul>
  8163. </ul>
  8164. <br>
  8165. <ul><b>timeout</b>
  8166. <ul>
  8167. <code>
  8168. attr &lt;device&gt; timeout <n>
  8169. </code><br>
  8170. setup timeout of the write cycle into database in asynchronous mode (default 86400s) <br>
  8171. </ul>
  8172. </ul>
  8173. <br>
  8174. <ul><b>valueFn</b>
  8175. <ul>
  8176. <code>
  8177. attr &lt;device&gt; valueFn {}
  8178. </code><br>
  8179. Perl expression that can use and change values of $TIMESTAMP, $DEVICE, $DEVICETYPE, $READING, $VALUE (value of reading) and
  8180. $UNIT (unit of reading value).
  8181. It also has readonly-access to $EVENT for evaluation in your expression. <br>
  8182. If $TIMESTAMP should be changed, it must meet the condition "yyyy-mm-dd hh:mm:ss", otherwise the $timestamp wouldn't
  8183. be changed.
  8184. In addition you can set the variable $IGNORE=1 if you want skip a dataset from logging. <br><br>
  8185. <b>Examples</b> <br>
  8186. <code>
  8187. attr &lt;device&gt; valueFn {if ($DEVICE eq "living_Clima" && $VALUE eq "off" ){$VALUE=0;} elsif ($DEVICE eq "e-power"){$VALUE= sprintf "%.1f", $VALUE;}}
  8188. </code> <br>
  8189. # change value "off" to "0" of device "living_Clima" and rounds value of e-power to 1f <br><br>
  8190. <code>
  8191. attr &lt;device&gt; valueFn {if ($DEVICE eq "SMA_Energymeter" && $READING eq "state"){$IGNORE=1;}}
  8192. </code><br>
  8193. # don't log the dataset of device "SMA_Energymeter" if the reading is "state" <br><br>
  8194. <code>
  8195. attr &lt;device&gt; valueFn {if ($DEVICE eq "Dum.Energy" && $READING eq "TotalConsumption"){$UNIT="W";}}
  8196. </code><br>
  8197. # set the unit of device "Dum.Energy" to "W" if reading is "TotalConsumption" <br><br>
  8198. </ul>
  8199. </ul>
  8200. <br>
  8201. <ul><b>verbose4Devs</b>
  8202. <ul>
  8203. <code>
  8204. attr &lt;device&gt; verbose4Devs &lt;device1&gt;,&lt;device2&gt;,&lt;device..&gt;
  8205. </code><br>
  8206. If verbose level 4 is used, only output of devices set in this attribute will be reported in FHEM central logfile. If this attribute
  8207. isn't set, output of all relevant devices will be reported if using verbose level 4.
  8208. The given devices are evaluated as Regex. <br>
  8209. <b>Example</b> <br>
  8210. <code>
  8211. attr &lt;device&gt; verbose4Devs sys.*,.*5000.*,Cam.*,global
  8212. </code><br>
  8213. # The devices starting with "sys", "Cam" respectively devices are containing "5000" in its name and the device "global" will be reported in FHEM
  8214. central Logfile if verbose=4 is set. <br>
  8215. </ul>
  8216. </ul>
  8217. <br>
  8218. </ul>
  8219. <a name="DbRep"></a>
  8220. <h3>DbRep</h3>
  8221. <ul>
  8222. <br>
  8223. The purpose of this module is browsing and managing the content of DbLog-databases. The searchresults can be evaluated concerning to various aggregations and the appropriate
  8224. Readings will be filled. The data selection will been done by declaration of device, reading and the time settings of selection-begin and selection-end. <br><br>
  8225. All database operations are implemented nonblocking. Optional the execution time of SQL-statements in background can also be determined and provided as reading.
  8226. (refer to <a href="#DbRepattr">attributes</a>). <br>
  8227. All existing readings will be deleted when a new operation starts. By attribute "readingPreventFromDel" a comma separated list of readings which are should prevent
  8228. from deletion can be provided. <br><br>
  8229. Currently the following functions are provided: <br><br>
  8230. <ul><ul>
  8231. <li> Selection of all datasets within adjustable time limits. </li>
  8232. <li> Exposure of datasets of a Device/Reading-combination within adjustable time limits. </li>
  8233. <li> Selecion of datasets by usage of dynamically calclated time limits at execution time. </li>
  8234. <li> Calculation of quantity of datasets of a Device/Reading-combination within adjustable time limits and several aggregations. </li>
  8235. <li> The calculation of summary- , difference- , maximum- , minimum- and averageValues of numeric readings within adjustable time limits and several aggregations. </li>
  8236. <li> The deletion of datasets. The containment of deletion can be done by Device and/or Reading as well as fix or dynamically calculated time limits at execution time. </li>
  8237. <li> export of datasets to file (CSV-format). </li>
  8238. <li> import of datasets from file (CSV-Format). </li>
  8239. <li> rename of device names in datasets </li>
  8240. <li> automatic rename of device names in datasets and other DbRep-definitions after FHEM "rename" command (see <a href="#DbRepAutoRename">DbRep-Agent</a>) </li>
  8241. <li> Execution of arbitrary user specific SQL-commands </li>
  8242. <li> creation of backups non-blocking (MySQL) </li>
  8243. <li> transfer dumpfiles to a FTP server after backup </li>
  8244. <li> restore of serverSide-backups non-blocking (MySQL) </li>
  8245. <li> optimize the connected database (optimizeTables, vacuum) </li>
  8246. <li> report of existing database processes (MySQL) </li>
  8247. <li> purge content of current-table </li>
  8248. <li> fill up the current-table with a (tunable) extract of the history-table</li>
  8249. </ul></ul>
  8250. <br>
  8251. To activate the function "Autorename" the attribute "role" has to be assigned to a defined DbRep-device. The standard role after DbRep definition is "Client.
  8252. Please read more in section <a href="#DbRepAutoRename">DbRep-Agent</a> . <br><br>
  8253. DbRep provides a UserExit function. By that interface the user can execute own program code dependent from free
  8254. definable Reading/Value-combinations (Regex). The interface works without respectively independent from event
  8255. generation.
  8256. Further informations you can find as described at <a href="#DbRepattr">attribute</a> "userExitFn". <br><br>
  8257. FHEM-Forum: <br>
  8258. <a href="https://forum.fhem.de/index.php/topic,53584.msg452567.html#msg452567">Modul 93_DbRep - Reporting and Management of database content (DbLog)</a>.<br><br>
  8259. <br>
  8260. <b>Preparations </b> <br><br>
  8261. The module requires the usage of a DbLog instance and the credentials of the database definition will be used. <br>
  8262. Only the content of table "history" will be included if isn't other is explained. <br><br>
  8263. Overview which other Perl-modules DbRep is using: <br><br>
  8264. Net::FTP (only if FTP-Transfer after database dump is used) <br>
  8265. Net::FTPSSL (only if FTP-Transfer with encoding after database dump is used) <br>
  8266. POSIX <br>
  8267. Time::HiRes <br>
  8268. Time::Local <br>
  8269. Scalar::Util <br>
  8270. DBI <br>
  8271. Blocking (FHEM-module) <br><br>
  8272. Due to performance reason the following index should be created in addition: <br>
  8273. <code>
  8274. CREATE INDEX Report_Idx ON `history` (TIMESTAMP, READING) USING BTREE;
  8275. </code>
  8276. </ul>
  8277. <br>
  8278. <a name="DbRepdefine"></a>
  8279. <b>Definition</b>
  8280. <br>
  8281. <ul>
  8282. <code>
  8283. define &lt;name&gt; DbRep &lt;name of DbLog-instance&gt;
  8284. </code>
  8285. <br><br>
  8286. (&lt;name of DbLog-instance&gt; - name of the database instance which is wanted to analyze needs to be inserted)
  8287. </ul>
  8288. <br><br>
  8289. <a name="DbRepset"></a>
  8290. <b>Set </b>
  8291. <ul>
  8292. Currently following set-commands are included. They are used to trigger the evaluations and define the evaluation option option itself.
  8293. The criteria of searching database content and determine aggregation is carried out by setting several <a href="#DbRepattr">attributes</a>.
  8294. <br><br>
  8295. <ul><ul>
  8296. <li><b> averageValue </b> - calculates the average value of readingvalues DB-column "VALUE") between period given by timestamp-<a href="#DbRepattr">attributes</a> which are set.
  8297. The reading to evaluate must be defined using attribute "reading". </li> <br>
  8298. <li><b> countEntries [history|current] </b> - provides the number of table-entries (default: history) between period set
  8299. by timestamp-<a href="#DbRepattr">attributes</a> if set.
  8300. If timestamp-attributes are not set, all entries of the table will be count.
  8301. The <a href="#DbRepattr">attributes</a> "device" and "reading" can be used to
  8302. limit the evaluation. </li> <br>
  8303. <li><b> delEntries </b> - deletes all database entries or only the database entries specified by <a href="#DbRepattr">attributes</a> Device and/or
  8304. Reading and the entered time period between "timestamp_begin", "timestamp_end" (if set) or "timeDiffToNow/timeOlderThan". <br><br>
  8305. <ul>
  8306. "timestamp_begin" is set: deletes db entries <b>from</b> this timestamp until current date/time <br>
  8307. "timestamp_end" is set : deletes db entries <b>until</b> this timestamp <br>
  8308. both Timestamps are set : deletes db entries <b>between</b> these timestamps <br><br>
  8309. Due to security reasons the attribute "allowDeletion" needs to be set to unlock the delete-function. <br>
  8310. </li>
  8311. <br>
  8312. </ul>
  8313. <li><b> deviceRename </b> - renames the device name of a device inside the connected database (Internal DATABASE).
  8314. The devicename will allways be changed in the <b>entire</b> database. Possibly set time limits or restrictions by
  8315. <a href="#DbRepattr">attributes</a> device and/or reading will not be considered. <br><br>
  8316. <ul>
  8317. <b>input format: </b> set &lt;name&gt; deviceRename &lt;old device name&gt;,&lt;new device name&gt; <br>
  8318. # The amount of renamed device names (datasets) will be displayed in reading "device_renamed". <br>
  8319. # If the device name to be renamed was not found in the database, a WARNUNG will appear in reading "device_not_renamed". <br>
  8320. # Appropriate entries will be written to Logfile if verbose >= 3 is set.
  8321. <br><br>
  8322. </li> <br>
  8323. </ul>
  8324. <li><b> diffValue </b> - calculates the defference of the readingvalues DB-column "VALUE") between period given by <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or "timeDiffToNow / timeOlderThan".
  8325. The reading to evaluate must be defined using attribute "reading".
  8326. This function is mostly reasonable if readingvalues are increasing permanently and don't write value-differences to the database.
  8327. The difference will be generated from the first available dataset (VALUE-Field) to the last available dataset between the
  8328. specified time linits/aggregation, in which a balanced difference value of the previous aggregation period will be transfered to the
  8329. following aggregation period in case this period contains a value. <br>
  8330. An possible counter overrun (restart with value "0") will be considered (compare <a href="#DbRepattr">attribute</a> "diffAccept"). <br><br>
  8331. If only one dataset will be found within the evalution period, the difference can be calculated only in combination with the balanced
  8332. difference of the previous aggregation period. In this case a logical inaccuracy according the assignment of the difference to the particular aggregation period
  8333. can be possible. Hence in warning in "state" will be placed and the reading "less_data_in_period" with a list of periods
  8334. with only one dataset found in it will be created.
  8335. <br><br>
  8336. <ul>
  8337. <b>Note: </b><br>
  8338. Within the evaluation respectively aggregation period (day, week, month, etc.) you should make available at least one dataset
  8339. at the beginning and one dataset at the end of each aggregation period to take the difference calculation as much as possible.
  8340. <br>
  8341. <br>
  8342. </li>
  8343. </ul>
  8344. <li><b> dumpMySQL [clientSide | serverSide]</b>
  8345. - creates a dump of the connected MySQL database. <br>
  8346. Depended from selected option the dump will be created on Client- or on Serv-Side. <br>
  8347. The variants differs each other concerning the executing system, the creating location, the usage of
  8348. attributes, the function result and the needed hardware ressources. <br>
  8349. The option "clientSide" e.g. needs more powerful FHEM-Server hardware, but saves all available
  8350. tables inclusive possibly created views.
  8351. <br><br>
  8352. <ul>
  8353. <b><u>Option clientSide</u></b> <br>
  8354. The dump will be created by client (FHEM-Server) and will be saved in FHEM log-directory by
  8355. default.
  8356. The target directory can be set by <a href="#DbRepattr">attribute</a> "dumpDirLocal" and has to be
  8357. writable by the FHEM process. <br>
  8358. Before executing the dump a table optimization can be processed optionally (see attribute
  8359. "optimizeTablesBeforeDump") as well as a FHEM-command (attribute "executeBeforeDump"). <br><br>
  8360. <b>Attention ! <br>
  8361. To avoid FHEM from blocking, you have to operate DbLog in asynchronous mode if the table
  8362. optimization want to be used ! </b> <br><br>
  8363. After the dump a FHEM-command can be executed as well (see attribute "executeAfterDump"). <br>
  8364. By other <a href="#DbRepattr">attributes</a> the run-time behavior of the function can be
  8365. controlled to optimize the performance and demand of ressources. <br><br>
  8366. The attributes relevant for function "dumpMySQL clientSide" are "dumpComment", "dumpDirLocal", "dumpMemlimit",
  8367. "dumpSpeed ", "dumpFilesKeep", "executeBeforeDump", "executeAfterDump" and
  8368. "optimizeTablesBeforeDump". <br>
  8369. After a successfull finished dump old dumpfiles will be deleted and only the number of attribute
  8370. "dumpFilesKeep" (default: 3) would remain in target directory "dumpDirLocal". <br><br>
  8371. The <b>naming convention of dump files</b> is: &lt;dbname&gt;_&lt;date&gt;_&lt;time&gt;.sql <br><br>
  8372. The created dumpfile may imported on the MySQL-Server by e.g.: <br><br>
  8373. <ul>
  8374. mysql -u &lt;user&gt; -p &lt;dbname&gt; < &lt;filename&gt;.sql <br><br>
  8375. </ul>
  8376. to restore the database from the dump. <br><br><br>
  8377. <b><u>Option serverSide</u></b> <br>
  8378. The dump will be created on the MySQL-Server and will be saved in its Home-directory
  8379. by default. <br>
  8380. The whole history-table (not the current-table) will be exported <b>CSV-formatted</b> without
  8381. any restrictions. <br>
  8382. Before executing the dump a table optimization can be processed optionally (see attribute
  8383. "optimizeTablesBeforeDump") as well as a FHEM-command (attribute "executeBeforeDump"). <br><br>
  8384. <b>Attention ! <br>
  8385. To avoid FHEM from blocking, you have to operate DbLog in asynchronous mode if the table
  8386. optimization want to be used ! </b> <br><br>
  8387. After the dump a FHEM-command can be executed as well (see attribute "executeAfterDump"). <br>
  8388. The attributes relevant for function "dumpMySQL serverSide" are "dumpDirRemote", "dumpDirLocal",
  8389. "dumpFilesKeep", "optimizeTablesBeforeDump", "executeBeforeDump" and "executeAfterDump". <br><br>
  8390. The target directory can be set by <a href="#DbRepattr">attribute</a> "dumpDirRemote".
  8391. It must be located on the MySQL-Host and has to be writable by the MySQL-server process. <br>
  8392. The used database user must have the "FILE"-privilege. <br><br>
  8393. <b>Note:</b> <br>
  8394. If the internal version management of DbRep should be used and the size of the created dumpfile be
  8395. reported, you have to mount the remote MySQL-Server directory "dumpDirRemote" on the client
  8396. and publish it to the DbRep-device by fill out the <a href="#DbRepattr">attribute</a>
  8397. "dumpDirLocal". <br>
  8398. Same is necessary if ftp transfer after dump is to be used (attribute "ftpUse" respectively "ftpUseSSL").
  8399. <br><br>
  8400. <ul>
  8401. <b>Example: </b> <br>
  8402. attr &lt;DbRep-device&gt; dumpDirRemote /volume1/ApplicationBackup/dumps_FHEM/ <br>
  8403. attr &lt;DbRep-device&gt; dumpDirLocal /sds1/backup/dumps_FHEM/ <br>
  8404. attr &lt;DbRep-device&gt; dumpFilesKeep 2 <br><br>
  8405. # The dump will be created remote on the MySQL-Server in directory
  8406. '/volume1/ApplicationBackup/dumps_FHEM/'. <br>
  8407. # The internal version management searches in local mounted directory '/sds1/backup/dumps_FHEM/'
  8408. for present dumpfiles and deletes these files except the last two versions. <br>
  8409. <br>
  8410. </ul>
  8411. If the internal version management is used, after a successfull finished dump old dumpfiles will
  8412. be deleted and only the number of attribute "dumpFilesKeep" (default: 3) would remain in target
  8413. directory "dumpDirLocal" (the mounted "dumpDirRemote").
  8414. In that case FHEM needs write permissions to the directory "dumpDirLocal". <br><br>
  8415. The <b>naming convention of dump files</b> is: &lt;dbname&gt;_&lt;date&gt;_&lt;time&gt;.csv <br><br>
  8416. You can start a restore of table history from serverSide-Backup by command: <br><br>
  8417. <ul>
  8418. set &lt;name&gt; &lt;restoreMySQL&gt; &lt;filename&gt;.csv <br><br>
  8419. </ul>
  8420. <br><br>
  8421. <b><u>FTP-Transfer after Dump</u></b> <br>
  8422. If those possibility is be used, the <a href="#DbRepattr">attribute</a> "ftpUse" or
  8423. "ftpUseSSL" has to be set. The latter if encoding for FTP is to be used. <br>
  8424. Further <a href="#DbRepattr">attributes</a> are: <br><br>
  8425. <ul>
  8426. <table>
  8427. <colgroup> <col width=5%> <col width=95%> </colgroup>
  8428. <tr><td> ftpUse </td><td>: FTP Transfer after dump will be switched on (without SSL encoding) </td></tr>
  8429. <tr><td> ftpUser </td><td>: User for FTP-server login, default: anonymous </td></tr>
  8430. <tr><td> ftpUseSSL </td><td>: FTP Transfer with SSL encoding after dump </td></tr>
  8431. <tr><td> ftpDebug </td><td>: debugging of FTP communication for diagnostics </td></tr>
  8432. <tr><td> ftpDir </td><td>: directory on FTP-server in which the file will be send into (default: "/") </td></tr>
  8433. <tr><td> ftpPassive </td><td>: set if passive FTP is to be used </td></tr>
  8434. <tr><td> ftpPort </td><td>: FTP-Port, default: 21 </td></tr>
  8435. <tr><td> ftpPwd </td><td>: password of FTP-User, not set by default </td></tr>
  8436. <tr><td> ftpServer </td><td>: name or IP-address of FTP-server. <b>absolutely essential !</b> </td></tr>
  8437. <tr><td> ftpTimeout </td><td>: timeout of FTP-connection in seconds (default: 30). </td></tr>
  8438. </table>
  8439. </ul>
  8440. <br>
  8441. <br>
  8442. </ul>
  8443. </li><br>
  8444. <li><b> exportToFile </b> - exports DB-entries to a file in CSV-format between period given by timestamp.
  8445. Limitations of selections can be set by <a href="#DbRepattr">attributes</a> Device and/or Reading.
  8446. The filename will be defined by <a href="#DbRepattr">attribute</a> "expimpfile" . </li> <br>
  8447. <li><b> fetchrows [history|current] </b> - provides <b>all</b> table-entries (default: history)
  8448. between period given by timestamp-<a href="#DbRepattr">attributes</a>.
  8449. A possibly set aggregation will <b>not</b> be considered. </li> <br>
  8450. <li><b> insert </b> - use it to insert data ito table "history" manually. Input values for Date, Time and Value are mandatory. The database fields for Type and Event will be filled in with "manual" automatically and the values of Device, Reading will be get from set <a href="#DbRepattr">attributes</a>. <br><br>
  8451. <ul>
  8452. <b>input format: </b> Date,Time,Value,[Unit] <br>
  8453. # Unit is optional, attributes of device, reading must be set ! <br>
  8454. # If "Value=0" has to be inserted, use "Value = 0.0" to do it. <br><br>
  8455. <b>example:</b> 2016-08-01,23:00:09,TestValue,TestUnit <br>
  8456. # Spaces are NOT allowed in fieldvalues ! <br>
  8457. <br>
  8458. <b>Note: </b><br>
  8459. Please consider to insert AT LEAST two datasets into the intended time / aggregatiom period (day, week, month, etc.) because of
  8460. it's needed by function diffValue. Otherwise no difference can be calculated and diffValue will be print out "0" for the respective period !
  8461. <br>
  8462. <br>
  8463. </li>
  8464. </ul>
  8465. <li><b> importFromFile </b> - imports datasets in CSV format from file into database. The filename will be set by <a href="#DbRepattr">attribute</a> "expimpfile". <br><br>
  8466. <ul>
  8467. <b>dataset format: </b> "TIMESTAMP","DEVICE","TYPE","EVENT","READING","VALUE","UNIT" <br><br>
  8468. # The fields "TIMESTAMP","DEVICE","TYPE","EVENT","READING" and "VALUE" have to be set. The field "UNIT" is optional.
  8469. The file content will be imported transactional. That means all of the content will be imported or, in case of error, nothing of it.
  8470. If an extensive file will be used, DON'T set verbose = 5 because of a lot of datas would be written to the logfile in this case.
  8471. It could lead to blocking or overload FHEM ! <br><br>
  8472. <b>Example: </b> "2016-09-25 08:53:56","STP_5000","SMAUTILS","etotal: 11859.573","etotal","11859.573","" <br>
  8473. <br>
  8474. </li> <br>
  8475. </ul>
  8476. <li><b> maxValue </b> - calculates the maximum value of readingvalues DB-column "VALUE") between period given by <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or "timeDiffToNow / timeOlderThan".
  8477. The reading to evaluate must be defined using attribute "reading".
  8478. The evaluation contains the timestamp of the <b>last</b> appearing of the identified maximum value within the given period. </li> <br>
  8479. <li><b> minValue </b> - calculates the miniimum value of readingvalues DB-column "VALUE") between period given by <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or "timeDiffToNow / timeOlderThan".
  8480. The reading to evaluate must be defined using attribute "reading".
  8481. The evaluation contains the timestamp of the <b>first</b> appearing of the identified minimum value within the given period. </li> <br>
  8482. <li><b> optimizeTables </b> - optimize tables in the connected database (MySQL). <br><br>
  8483. <ul>
  8484. <b>Note:</b> <br>
  8485. Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
  8486. is operating in asynchronous mode to avoid FHEMWEB from blocking. <br><br>
  8487. </li><br>
  8488. </ul>
  8489. <li><b> readingRename </b> - renames the reading name of a device inside the connected database (see Internal DATABASE).
  8490. The readingname will allways be changed in the <b>entire</b> database. Possibly set time limits or restrictions by
  8491. <a href="#DbRepattr">attributes</a> device and/or reading will not be considered. <br><br>
  8492. <ul>
  8493. <b>input format: </b> set &lt;name&gt; readingRename &lt;old reading name&gt;,&lt;new reading name&gt; <br>
  8494. # The amount of renamed reading names (datasets) will be displayed in reading "reading_renamed". <br>
  8495. # If the reading name to be renamed was not found in the database, a WARNUNG will appear in reading "reading_not_renamed". <br>
  8496. # Appropriate entries will be written to Logfile if verbose >= 3 is set.
  8497. <br><br>
  8498. </li> <br>
  8499. </ul>
  8500. <li><b> restoreMySQL &lt;file&gt;.csv </b> - imports the content of table history from a serverSide-backup. <br>
  8501. The function provides a drop-down-list of files which can be used for restore.
  8502. Therefore you have to mount the remote directory "dumpDirRemote" of the MySQL-Server on the
  8503. Client and make it usable to the DbRep-device by setting the <a href="#DbRepattr">attribute</a>
  8504. "dumpDirLocal". <br>
  8505. All files with extension "csv" and if the filename is beginning with the name of the connected database
  8506. (see Internal DATABASE) will be listed. <br><br>
  8507. </li><br>
  8508. <li><b> sqlCmd </b> - executes an arbitrary user specific command. <br>
  8509. If the command contains a operation to delete data, the <a href="#DbRepattr">attribute</a>
  8510. "allowDeletion" has to be set for security reason. <br>
  8511. The statement doesn't consider limitations by attributes device and/or reading. <br>
  8512. If the <a href="#DbRepattr">attributes</a> "timestamp_begin" respectively "timestamp_end"
  8513. should assumed in the statement, you can use the placeholder "<b>§timestamp_begin§</b>" respectively
  8514. "<b>§timestamp_end§</b>" on suitable place. <br><br>
  8515. <ul>
  8516. <b>Examples of SQL-statements: </b> <br><br>
  8517. <ul>
  8518. <li>set &lt;name&gt; sqlCmd select DEVICE, count(*) from history where TIMESTAMP >= "2017-01-06 00:00:00" group by DEVICE having count(*) > 800 </li>
  8519. <li>set &lt;name&gt; sqlCmd select DEVICE, count(*) from history where TIMESTAMP >= "2017-05-06 00:00:00" group by DEVICE </li>
  8520. <li>set &lt;name&gt; sqlCmd select DEVICE, count(*) from history where TIMESTAMP >= §timestamp_begin§ group by DEVICE </li>
  8521. <li>set &lt;name&gt; sqlCmd select * from history where DEVICE like "Te%t" order by `TIMESTAMP` desc </li>
  8522. <li>set &lt;name&gt; sqlCmd select * from history where `TIMESTAMP` > "2017-05-09 18:03:00" order by `TIMESTAMP` desc </li>
  8523. <li>set &lt;name&gt; sqlCmd select * from current order by `TIMESTAMP` desc </li>
  8524. <li>set &lt;name&gt; sqlCmd select sum(VALUE) as 'Einspeisung am 04.05.2017', count(*) as 'Anzahl' FROM history where `READING` = "Einspeisung_WirkP_Zaehler_Diff" and TIMESTAMP between '2017-05-04' AND '2017-05-05' </li>
  8525. <li>set &lt;name&gt; sqlCmd delete from current </li>
  8526. <li>set &lt;name&gt; sqlCmd delete from history where TIMESTAMP < "2016-05-06 00:00:00" </li>
  8527. <li>set &lt;name&gt; sqlCmd update history set VALUE='TestVa$$ue$' WHERE VALUE='TestValue' </li>
  8528. <li>set &lt;name&gt; sqlCmd select * from history where DEVICE = "Test" </li>
  8529. <li>set &lt;name&gt; sqlCmd insert into history (TIMESTAMP, DEVICE, TYPE, EVENT, READING, VALUE, UNIT) VALUES ('2017-05-09 17:00:14','Test','manuell','manuell','Tes§e','TestValue','°C') </li>
  8530. </ul>
  8531. <br>
  8532. The result of the statement will be shown in <a href="#DbRepReadings">Reading</a> "SqlResult".
  8533. By <a href="#DbRepattr">attribut</a> "sqlResultFormat" the fomatting can be choosen. <br><br>
  8534. <b>Note:</b> <br>
  8535. Even though the module works non-blocking regarding to database operations, a huge
  8536. sample space (number of rows/readings) could block the browser session respectively
  8537. FHEMWEB.
  8538. If you are unsure about the result of the statement, you should preventively add a limit to
  8539. the statement. <br><br>
  8540. </li><br>
  8541. </ul>
  8542. <li><b> sumValue </b> - calculates the amount of readingvalues DB-column "VALUE") between period given by
  8543. <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or
  8544. "timeDiffToNow / timeOlderThan". The reading to evaluate must be defined using attribute
  8545. "reading". Using this function is mostly reasonable if value-differences of readings
  8546. are written to the database. </li> <br>
  8547. <li><b> tableCurrentFillup </b> - the current-table will be filled u with an extract of the history-table.
  8548. The <a href="#DbRepattr">attributes</a> for limiting time and device, reading are considered.
  8549. Thereby the content of the extract can be affected. In the associated DbLog-device the attribute "DbLogType" should be set to
  8550. "SampleFill/History". </li> <br>
  8551. <li><b> tableCurrentPurge </b> - deletes the content of current-table. There are no limits, e.g. by attributes "timestamp_begin", "timestamp_end", device, reading
  8552. and so on, considered. </li> <br>
  8553. <li><b> vacuum </b> - optimize tables in the connected database (SQLite, PostgreSQL). <br><br>
  8554. <ul>
  8555. <b>Note:</b> <br>
  8556. Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
  8557. is operating in asynchronous mode to avoid FHEM from blocking. <br><br>
  8558. </li>
  8559. </ul><br>
  8560. <br>
  8561. </ul></ul>
  8562. <b>For all evaluation variants (except sqlCmd) applies: </b> <br>
  8563. In addition to the needed reading the device can be complemented to restrict the datasets for reporting / function.
  8564. If the time limit attributes are not set, the period from '1970-01-01 01:00:00' to the current date/time will be used as selection criterion.
  8565. <br><br>
  8566. <b>Note: </b> <br>
  8567. If you are in detail view it could be necessary to refresh the browser to see the result of operation as soon in DeviceOverview section "state = done" will be shown.
  8568. <br><br>
  8569. </ul>
  8570. <a name="DbRepget"></a>
  8571. <b>Get </b>
  8572. <ul>
  8573. The get-commands of DbRep provide to retrieve some metadata of the used database instance.
  8574. Those are for example adjusted server parameter, server variables, datadasestatus- and table informations. THe available get-functions depending of
  8575. the used database type. So for SQLite curently only "get svrinfo" is usable. The functions nativ are delivering a lot of outpit values.
  8576. They can be limited by function specific <a href="#DbRepattr">attributes</a>. The filter has to be setup by a comma separated list.
  8577. SQL-Wildcard (%) can be used to setup the list arguments.
  8578. <br><br>
  8579. <b>Note: </b> <br>
  8580. After executing a get-funktion in detail view please make a browser refresh to see the results !
  8581. <br><br>
  8582. <ul><ul>
  8583. <li><b> dbstatus </b> - lists global informations about MySQL server status (e.g. informations related to cache, threads, bufferpools, etc. ).
  8584. Initially all available informations are reported. Using the <a href="#DbRepattr">attribute</a> "showStatus" the quantity of
  8585. results can be limited to show only the desired values. Further detailed informations of items meaning are
  8586. explained <a href=http://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html>there</a>. <br>
  8587. <br><ul>
  8588. <b>Example</b> <br>
  8589. get &lt;name&gt; dbstatus <br>
  8590. attr &lt;name&gt; showStatus %uptime%,%qcache% <br>
  8591. # Only readings containing "uptime" and "qcache" in name will be created
  8592. </li>
  8593. <br><br>
  8594. </ul>
  8595. <li><b> dbvars </b> - lists global informations about MySQL system variables. Included are e.g. readings related to InnoDB-Home, datafile path,
  8596. memory- or cache-parameter and so on. The Output reports initially all available informations. Using the
  8597. <a href="#DbRepattr">attribute</a> "showVariables" the quantity of results can be limited to show only the desired values.
  8598. Further detailed informations of items meaning are explained
  8599. <a href=http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html>there</a>. <br>
  8600. <br><ul>
  8601. <b>Example</b> <br>
  8602. get &lt;name&gt; dbvars <br>
  8603. attr &lt;name&gt; showVariables %version%,%query_cache% <br>
  8604. # Only readings containing "version" and "query_cache" in name will be created
  8605. </li>
  8606. <br><br>
  8607. </ul>
  8608. <li><b> procinfo </b> - reports the existing database processes in a summary table (only MySQL). <br>
  8609. Typically only the own processes of the connection user (set in DbLog configuration file) will be
  8610. reported. If all precesses have to be reported, the global "PROCESS" right has to be granted to the
  8611. user. <br>
  8612. As of MariaDB 5.3 for particular SQL-Statements a progress reporting will be provided
  8613. (table row "PROGRESS"). So you can track, for instance, the degree of processing during an index
  8614. creation. <br>
  8615. Further informations can be found
  8616. <a href=https://mariadb.com/kb/en/mariadb/show-processlist/>there</a>. <br>
  8617. </li>
  8618. <br><br>
  8619. <li><b> svrinfo </b> - common database server informations, e.g. DBMS-version, server address and port and so on. The quantity of elements to get depends
  8620. on the database type. Using the <a href="#DbRepattr">attribute</a> "showSvrInfo" the quantity of results can be limited to show only
  8621. the desired values. Further detailed informations of items meaning are explained
  8622. <a href=https://msdn.microsoft.com/en-us/library/ms711681(v=vs.85).aspx>there</a>. <br>
  8623. <br><ul>
  8624. <b>Example</b> <br>
  8625. get &lt;name&gt; svrinfo <br>
  8626. attr &lt;name&gt; showSvrInfo %SQL_CATALOG_TERM%,%NAME% <br>
  8627. # Only readings containing "SQL_CATALOG_TERM" and "NAME" in name will be created
  8628. </li>
  8629. <br><br>
  8630. </ul>
  8631. <li><b> tableinfo </b> - access detailed informations about tables in MySQL database which is connected by the DbRep-device.
  8632. All available tables in the connected database will be selected by default.
  8633. Using the<a href="#DbRepattr">attribute</a> "showTableInfo" the results can be limited to tables you want to show.
  8634. Further detailed informations of items meaning are explained <a href=http://dev.mysql.com/doc/refman/5.7/en/show-table-status.html>there</a>. <br>
  8635. <br><ul>
  8636. <b>Example</b> <br>
  8637. get &lt;name&gt; tableinfo <br>
  8638. attr &lt;name&gt; showTableInfo current,history <br>
  8639. # Only informations related to tables "current" and "history" are going to be created
  8640. </li>
  8641. <br><br>
  8642. </ul>
  8643. <br>
  8644. </ul></ul>
  8645. </ul>
  8646. <a name="DbRepattr"></a>
  8647. <b>Attributes</b>
  8648. <br>
  8649. <ul>
  8650. Using the module specific attributes you are able to define the scope of evaluation and the aggregation. <br><br>
  8651. <b>Note for SQL-Wildcard Usage:</b> <br>
  8652. Within the attribute values of "device" and "reading" you may use SQL-Wildcard "%", Character "_" is not supported as a wildcard.
  8653. The character "%" stands for any characters. <br>
  8654. This rule is valid to all functions <b>except</b> "insert", "importFromFile" and "deviceRename". <br>
  8655. The function "insert" doesn't allow setting the mentioned attributes containing the wildcard "%". <br>
  8656. In readings the wildcard character "%" will be replaced by "/" to meet the rules of allowed characters in readings.
  8657. <br><br>
  8658. <ul><ul>
  8659. <li><b>aggregation </b> - Aggregation of Device/Reading-selections. Possible is hour, day, week, month or "no".
  8660. Delivers e.g. the count of database entries for a day (countEntries), Summation of
  8661. difference values of a reading (sumValue) and so on. Using aggregation "no" (default) an
  8662. aggregation don't happens but the output contaims all values of Device/Reading in the defined time period. </li> <br>
  8663. <li><b>allowDeletion </b> - unlocks the delete-function </li> <br>
  8664. <li><b>device </b> - Selection of a particular device. <br>
  8665. You can specify <a href="https://fhem.de/commandref.html#devspec">device specifications (devspec)</a>. <br>
  8666. Inside of device specifications a SQL wildcard (%) will be evaluated as a normal ASCII-character.
  8667. The device names are derived from device specification and the active devices in FHEM before
  8668. SQL selection will be carried out. </li> <br>
  8669. <ul>
  8670. <b>Examples:</b> <br>
  8671. <code>attr &lt;Name&gt; device TYPE=DbRep</code> <br>
  8672. # select datasets of active present devices with Type "DbRep" <br>
  8673. <code>attr &lt;Name&gt; device MySTP_5000</code> <br>
  8674. # select datasets of device "MySTP_5000" <br>
  8675. <code>attr &lt;Name&gt; device SMA.*</code> <br>
  8676. # select datasets of devices starting with "SMA" <br>
  8677. <code>attr &lt;Name&gt; device SMA_Energymeter,MySTP_5000</code> <br>
  8678. # select datasets of devices "SMA_Energymeter" and "MySTP_5000" <br>
  8679. <code>attr &lt;Name&gt; device %5000</code> <br>
  8680. # select datasets of devices ending with "5000" <br>
  8681. </ul>
  8682. <br><br>
  8683. <li><b>diffAccept </b> - valid for function diffValue. diffAccept determines the threshold, up to that a calaculated difference between two
  8684. straight sequently datasets should be commenly accepted (default = 20). <br>
  8685. Hence faulty DB entries with a disproportional high difference value will be eliminated and don't tamper the result.
  8686. If a threshold overrun happens, the reading "diff_overrun_limit_&lt;diffLimit&gt;" will be generated
  8687. (&lt;diffLimit&gt; will be substituted with the present prest attribute value). <br>
  8688. The reading contains a list of relevant pair of values. Using verbose=3 this list will also be reported in the FHEM
  8689. logfile.
  8690. </li><br>
  8691. <ul>
  8692. Example report in logfile if threshold of diffAccept=10 overruns: <br><br>
  8693. DbRep Rep.STP5000.etotal -> data ignored while calc diffValue due to threshold overrun (diffAccept = 10): <br>
  8694. 2016-04-09 08:50:50 0.0340 -> 2016-04-09 12:42:01 13.3440 <br><br>
  8695. # The first dataset with a value of 0.0340 is untypical low compared to the next value of 13.3440 and results a untypical
  8696. high difference value. <br>
  8697. # Now you have to decide if the (second) dataset should be deleted, ignored of the attribute diffAccept should be adjusted.
  8698. </ul><br>
  8699. <li><b>disable </b> - deactivates the module </li> <br>
  8700. <li><b>dumpComment </b> - User-comment. It will be included in the header of the created dumpfile by
  8701. command "dumpMySQL clientSide". </li> <br>
  8702. <li><b>dumpDirLocal </b> - Target directory of database dumps by command "dumpMySQL clientSide"
  8703. (default: "{global}{modpath}/log/" on the FHEM-Server). <br>
  8704. In this directory also the internal version administration searches for old backup-files
  8705. and deletes them if the number exceeds attribute "dumpFilesKeep".
  8706. The attribute is also relevant to publish a local mounted directory "dumpDirRemote" to
  8707. DbRep. </li> <br>
  8708. <li><b>dumpDirRemote </b> - Target directory of database dumps by command "dumpMySQL serverSide"
  8709. (default: the Home-directory of MySQL-Server on the MySQL-Host). </li> <br>
  8710. <li><b>dumpMemlimit </b> - tolerable memory consumption for the SQL-script during generation period (default: 100000 characters).
  8711. Please adjust this parameter if you may notice memory bottlenecks and performance problems based
  8712. on it on your specific hardware. </li> <br>
  8713. <li><b>dumpSpeed </b> - Number of Lines which will be selected in source database with one select by dump-command
  8714. "dumpMySQL ClientSide" (default: 10000).
  8715. This parameter impacts the run-time and consumption of resources directly. </li> <br>
  8716. <li><b>dumpFilesKeep </b> - The specified number of dumpfiles remain in the dump directory (default: 3).
  8717. If there more (older) files has been found, these files will be deleted after a new database dump
  8718. was created successfully.
  8719. The global attrubute "archivesort" will be considered. </li> <br>
  8720. <li><b>executeAfterDump </b> - you can specify a FHEM-command which should be executed <b>after dump</b>. <br>
  8721. Funktions have to be enclosed in {} .<br><br>
  8722. <ul>
  8723. <b>Example:</b> <br><br>
  8724. attr &lt;DbRep-device&gt; executeAfterDump set og_gz_westfenster off; <br>
  8725. attr &lt;DbRep-device&gt; executeAfterDump {adump ("&lt;DbRep-device&gt;")} <br><br>
  8726. # "adump" is a function defined in 99_myUtils.pm e.g.: <br>
  8727. <pre>
  8728. sub adump {
  8729. my ($name) = @_;
  8730. my $hash = $defs{$name};
  8731. # own function, e.g.
  8732. Log3($name, 3, "DbRep $name -> Dump finished");
  8733. return;
  8734. }
  8735. </pre>
  8736. </ul>
  8737. </li>
  8738. <li><b>executeBeforeDump </b> - you can specify a FHEM-command which should be executed <b>before dump</b>. <br>
  8739. Funktions have to be enclosed in {} .<br><br>
  8740. <ul>
  8741. <b>Example:</b> <br><br>
  8742. attr &lt;DbRep-device&gt; executeBeforeDump set og_gz_westfenster on; <br>
  8743. attr &lt;DbRep-device&gt; executeBeforeDump {bdump ("&lt;DbRep-device&gt;")} <br><br>
  8744. # "bdump" is a function defined in 99_myUtils.pm e.g.: <br>
  8745. <pre>
  8746. sub bdump {
  8747. my ($name) = @_;
  8748. my $hash = $defs{$name};
  8749. # own function, e.g.
  8750. Log3($name, 3, "DbRep $name -> Dump starts now");
  8751. return;
  8752. }
  8753. </pre>
  8754. </ul>
  8755. </li>
  8756. <li><b>expimpfile </b> - Path/filename for data export/import </li> <br>
  8757. <li><b>ftpUse </b> - FTP Transfer after dump will be switched on (without SSL encoding). The created
  8758. database backup file will be transfered non-blocking to the FTP-Server (Attribut "ftpServer").
  8759. </li> <br>
  8760. <li><b>ftpUseSSL </b> - FTP Transfer with SSL encoding after dump. The created database backup file will be transfered
  8761. non-blocking to the FTP-Server (Attribut "ftpServer"). </li> <br>
  8762. <li><b>ftpUser </b> - User for FTP-server login, default: "anonymous". </li> <br>
  8763. <li><b>ftpDebug </b> - debugging of FTP communication for diagnostics. </li> <br>
  8764. <li><b>ftpDir </b> - directory on FTP-server in which the file will be send into (default: "/"). </li> <br>
  8765. <li><b>ftpPassive </b> - set if passive FTP is to be used </li> <br>
  8766. <li><b>ftpPort </b> - FTP-Port, default: 21 </li> <br>
  8767. <li><b>ftpPwd </b> - password of FTP-User, is not set by default </li> <br>
  8768. <li><b>ftpServer </b> - name or IP-address of FTP-server. <b>absolutely essential !</b> </li> <br>
  8769. <li><b>ftpTimeout </b> - timeout of FTP-connection in seconds (default: 30). </li> <br>
  8770. <a name="DbRepattrlimit"></a>
  8771. <li><b>limit </b> - limits the number of selected datasets by the "fetchrows" command (default 1000).
  8772. This limitation should prevent the browser session from overload and
  8773. avoids FHEMWEB from blocking. Please change the attribut according your requirements or change the
  8774. selection criteria (decrease evaluation period). </li> <br>
  8775. <li><b>optimizeTablesBeforeDump </b> - if set to "1", the database tables will be optimized before executing the dump
  8776. (default: 0).
  8777. Thereby the backup run-time time will be extended. <br><br>
  8778. <ul>
  8779. <b>Note</b> <br>
  8780. The table optimizing cause locking the tables and therefore to blocking of
  8781. FHEM if DbLog isn't working in asynchronous mode (DbLog-attribute "asyncMode") !
  8782. <br>
  8783. </ul>
  8784. </li> <br>
  8785. <li><b>reading </b> - Selection of a particular reading.
  8786. More than one reading are specified as a comma separated list. <br>
  8787. If SQL wildcard (%) is set in a list, it will be evaluated as a normal ASCII-character. <br>
  8788. </li> <br>
  8789. <ul>
  8790. <b>Examples:</b> <br>
  8791. <code>attr &lt;Name&gt; reading etotal</code> <br>
  8792. <code>attr &lt;Name&gt; reading et%</code> <br>
  8793. <code>attr &lt;Name&gt; reading etotal,etoday</code> <br>
  8794. </ul>
  8795. <br><br>
  8796. <li><b>readingNameMap </b> - the name of the analyzed reading can be overwritten for output </li> <br>
  8797. <li><b>role </b> - the role of the DbRep-device. Standard role is "Client". The role "Agent" is described
  8798. in section <a href="#DbRepAutoRename">DbRep-Agent</a>. </li> <br>
  8799. <li><b>readingPreventFromDel </b> - comma separated list of readings which are should prevent from deletion when a
  8800. new operation starts </li> <br>
  8801. <li><b>showproctime </b> - if set, the reading "sql_processing_time" shows the required execution time (in seconds)
  8802. for the sql-requests. This is not calculated for a single sql-statement, but the summary
  8803. of all sql-statements necessara for within an executed DbRep-function in background. </li> <br>
  8804. <li><b>showStatus </b> - limits the sample space of command "get ... dbstatus". SQL-Wildcard (%) can be used. </li> <br>
  8805. <ul>
  8806. Example: attr ... showStatus %uptime%,%qcache% <br>
  8807. # Only readings with containing "uptime" and "qcache" in name will be shown <br>
  8808. </ul><br>
  8809. <li><b>showVariables </b> - limits the sample space of command "get ... dbvars". SQL-Wildcard (%) can be used. </li> <br>
  8810. <ul>
  8811. Example: attr ... showVariables %version%,%query_cache% <br>
  8812. # Only readings with containing "version" and "query_cache" in name will be shown <br>
  8813. </ul><br>
  8814. <li><b>showSvrInfo </b> - limits the sample space of command "get ... svrinfo". SQL-Wildcard (%) can be used. </li> <br>
  8815. <ul>
  8816. Example: attr ... showSvrInfo %SQL_CATALOG_TERM%,%NAME% <br>
  8817. # Only readings with containing "SQL_CATALOG_TERM" and "NAME" in name will be shown <br>
  8818. </ul><br>
  8819. <li><b>showTableInfo </b> - limits the tablename which is selected by command "get ... tableinfo". SQL-Wildcard
  8820. (%) can be used. </li> <br>
  8821. <ul>
  8822. Example: attr ... showTableInfo current,history <br>
  8823. # Only informations about tables "current" and "history" will be shown <br>
  8824. </ul><br>
  8825. <li><b>sqlResultFormat </b> - determines the formatting of the "set ... sqlCmd" command result. possible options are: <br><br>
  8826. <ul>
  8827. <b>separated </b> - every line of the result will be generated sequentially in a single
  8828. reading. (default) <br><br>
  8829. <b>mline </b> - the result will be generated as multiline in
  8830. <a href="#DbRepReadings">Reading</a> SqlResult.
  8831. Field separator is "|". <br><br>
  8832. <b>sline </b> - the result will be generated as singleline in
  8833. <a href="#DbRepReadings">Reading</a> SqlResult.
  8834. Field separator is "|" and the dataset is separated by "]|[". <br><br>
  8835. <b>table </b> - the result will be generated as an table in
  8836. <a href="#DbRepReadings">Reading</a> SqlResult. <br><br>
  8837. <b>json </b> - creates <a href="#DbRepReadings">Reading</a> SqlResult as a JSON
  8838. coded hash.
  8839. Every hash-element consists of the serial number of the dataset (key)
  8840. and its value. </li> <br><br>
  8841. To process the result, you may use a userExitFn in 99_myUtils for example: <br>
  8842. <pre>
  8843. sub resfromjson {
  8844. my ($name,$reading,$value) = @_;
  8845. my $hash = $defs{$name};
  8846. if ($reading eq "SqlResult") {
  8847. # only reading SqlResult contains JSON encoded data
  8848. my $data = decode_json($value);
  8849. foreach my $k (keys(%$data)) {
  8850. # use your own processing from here for every hash-element
  8851. # e.g. output of every element that contains "Cam"
  8852. my $ke = $data->{$k};
  8853. if($ke =~ m/Cam/i) {
  8854. my ($res1,$res2) = split("\\|", $ke);
  8855. Log3($name, 1, "$name - extract element $k by userExitFn: ".$res1." ".$res2);
  8856. }
  8857. }
  8858. }
  8859. return;
  8860. }
  8861. </pre>
  8862. </ul>
  8863. <br>
  8864. <li><b>timestamp_begin </b> - begin of data selection (*) </li> <br>
  8865. <li><b>timestamp_end </b> - end of data selection. If not set the current date/time combination will be used. (*) </li> <br>
  8866. (*) The format of timestamp is as used with DbLog "YYYY-MM-DD HH:MM:SS". For the attributes "timestamp_begin", "timestamp_end"
  8867. you can also use one of the following entries. The timestamp-attribute will be dynamically set to: <br><br>
  8868. <ul>
  8869. <b>current_year_begin</b> : matches "&lt;current year&gt;-01-01 00:00:00" <br>
  8870. <b>current_year_end</b> : matches "&lt;current year&gt;-12-31 23:59:59" <br>
  8871. <b>previous_year_begin</b> : matches "&lt;previous year&gt;-01-01 00:00:00" <br>
  8872. <b>previous_year_end</b> : matches "&lt;previous year&gt;-12-31 23:59:59" <br>
  8873. <b>current_month_begin</b> : matches "&lt;current month first day&gt; 00:00:00" <br>
  8874. <b>current_month_end</b> : matches "&lt;current month last day&gt; 23:59:59" <br>
  8875. <b>previous_month_begin</b> : matches "&lt;previous month first day&gt; 00:00:00" <br>
  8876. <b>previous_month_end</b> : matches "&lt;previous month last day&gt; 23:59:59" <br>
  8877. <b>current_week_begin</b> : matches "&lt;first day of current week&gt; 00:00:00" <br>
  8878. <b>current_week_end</b> : matches "&lt;last day of current week&gt; 23:59:59" <br>
  8879. <b>previous_week_begin</b> : matches "&lt;first day of previous week&gt; 00:00:00" <br>
  8880. <b>previous_week_end</b> : matches "&lt;last day of previous week&gt; 23:59:59" <br>
  8881. <b>current_day_begin</b> : matches "&lt;current day&gt; 00:00:00" <br>
  8882. <b>current_day_end</b> : matches "&lt;current day&gt; 23:59:59" <br>
  8883. <b>previous_day_begin</b> : matches "&lt;previous day&gt; 00:00:00" <br>
  8884. <b>previous_day_end</b> : matches "&lt;previous day&gt; 23:59:59" <br>
  8885. <b>current_hour_begin</b> : matches "&lt;current hour&gt;:00:00" <br>
  8886. <b>current_hour_end</b> : matches "&lt;current hour&gt;:59:59" <br>
  8887. <b>previous_hour_begin</b> : matches "&lt;previous hour&gt;:00:00" <br>
  8888. <b>previous_hour_end</b> : matches "&lt;previous hour&gt;:59:59" <br> </ul><br>
  8889. Make sure that "timestamp_begin" < "timestamp_end" is fulfilled. <br><br>
  8890. <ul>
  8891. <b>Example:</b> <br><br>
  8892. attr &lt;DbRep-device&gt; timestamp_begin current_year_begin <br>
  8893. attr &lt;DbRep-device&gt; timestamp_end current_year_end <br><br>
  8894. # Analyzes the database between the time limits of the current year. <br>
  8895. </ul>
  8896. <br><br>
  8897. <b>Note </b> <br>
  8898. If the attribute "timeDiffToNow" will be set, the attributes "timestamp_begin" respectively "timestamp_end" will be deleted if they were set before.
  8899. The setting of "timestamp_begin" respectively "timestamp_end" causes the deletion of attribute "timeDiffToNow" if it was set before as well.
  8900. <br><br>
  8901. <li><b>timeDiffToNow </b> - the begin of data selection will be set to the timestamp "&lt;current time&gt; -
  8902. &lt;timeDiffToNow&gt;" dynamically (in seconds). Thereby always the last
  8903. &lt;timeDiffToNow&gt;-seconds will be considered (e.g. if set to 86400, always the last
  8904. 24 hours should assumed). The Timestamp calculation will be done dynamically at execution
  8905. time. </li> <br>
  8906. <li><b>timeOlderThan </b> - the end of data selection will be set to the timestamp "&lt;aktuelle Zeit&gt; -
  8907. &lt;timeOlderThan&gt;" dynamically (in seconds). Always the datasets up to timestamp
  8908. "&lt;current time&gt; - &lt;timeOlderThan&gt;" will be considered (e.g. if set to
  8909. 86400, all datasets older than one day will be considered). The Timestamp calculation
  8910. will be done dynamically at execution time. </li> <br>
  8911. <li><b>timeout </b> - set the timeout-value for Blocking-Call Routines in background in seconds (default 86400) </li> <br>
  8912. <li><b>userExitFn </b> - provides an interface to execute user specific program code. <br>
  8913. To activate the interfaace at first you should implement the subroutine which will be
  8914. called by the interface in your 99_myUtls.pm as shown in by the example: <br>
  8915. <pre>
  8916. sub UserFunction {
  8917. my ($name,$reading,$value) = @_;
  8918. my $hash = $defs{$name};
  8919. ...
  8920. # e.g. output transfered data
  8921. Log3 $name, 1, "UserExitFn $name called - transfer parameter are Reading: $reading, Value: $value " ;
  8922. ...
  8923. return;
  8924. }
  8925. </pre>
  8926. The interface activation takes place by setting the subroutine name in the attribute.
  8927. Optional you may set a Reading:Value combination (Regex) as argument. If no Regex is
  8928. specified, all value combinations will be evaluated as "true" (related to .*:.*).
  8929. <br><br>
  8930. <ul>
  8931. <b>Example:</b> <br>
  8932. attr <device> userExitFn UserFunction .*:.* <br>
  8933. # "UserFunction" is the name of subroutine in 99_myUtils.pm.
  8934. </ul>
  8935. <br>
  8936. The interface works generally without and independent from Events.
  8937. If the attribute is set, after every reading generation the Regex will be evaluated.
  8938. If the evaluation was "true", set subroutine will be called.
  8939. For further processing following parameters will be forwarded to the function: <br><br>
  8940. <ul>
  8941. <li>$name - the name of the DbRep-Device </li>
  8942. <li>$reading - the name of the created reading </li>
  8943. <li>$value - the value of the reading </li>
  8944. </ul>
  8945. </li>
  8946. <br><br>
  8947. </ul></ul></ul>
  8948. <a name="DbRepReadings"></a>
  8949. <b>Readings</b>
  8950. <br>
  8951. <ul>
  8952. Regarding to the selected operation the reasults will be shown as readings. At the beginning of a new operation all old readings will be deleted to avoid
  8953. that unsuitable or invalid readings would remain.<br><br>
  8954. In addition the following readings will be created: <br><br>
  8955. <ul><ul>
  8956. <li><b>state </b> - contains the current state of evaluation. If warnings are occured (state = Warning) compare Readings
  8957. "diff_overrun_limit_&lt;diffLimit&gt;" and "less_data_in_period" </li> <br>
  8958. <li><b>errortext </b> - description about the reason of an error state </li> <br>
  8959. <li><b>background_processing_time </b> - the processing time spent for operations in background/forked operation </li> <br>
  8960. <li><b>sql_processing_time </b> - the processing time wasted for all sql-statements used for an operation </li> <br>
  8961. <li><b>diff_overrun_limit_&lt;diffLimit&gt;</b> - contains a list of pairs of datasets which have overrun the threshold (&lt;diffLimit&gt;)
  8962. of calculated difference each other determined by attribute "diffAccept" (default=20). </li> <br>
  8963. <li><b>less_data_in_period </b> - contains a list of time periods within only one dataset was found. The difference calculation considers
  8964. the last value of the aggregation period before the current one. Valid for function "diffValue". </li> <br>
  8965. <li><b>SqlResult </b> - result of the last executed sqlCmd-command. The formatting can be specified
  8966. by <a href="#DbRepattr">attribute</a> "sqlResultFormat" </li> <br>
  8967. <li><b>sqlCmd </b> - contains the last executed sqlCmd-command </li> <br>
  8968. </ul></ul>
  8969. <br><br>
  8970. </ul>
  8971. <a name="DbRepAutoRename"></a>
  8972. <b>DbRep Agent - automatic change of device names in databases and DbRep-definitions after FHEM "rename" command</b>
  8973. <br>
  8974. <ul>
  8975. By the attribute "role" the role of DbRep-device will be configured. The standard role is "Client". If the role has changed to "Agent", the DbRep device
  8976. react automatically on renaming devices in your FHEM installation. The DbRep device is now called DbRep-Agent. <br><br>
  8977. By the DbRep-Agent the following features are activated when a FHEM-device has being renamed: <br><br>
  8978. <ul><ul>
  8979. <li> in the database connected to the DbRep-Agent (Internal Database) dataset containing the old device name will be searched and renamed to the
  8980. to the new device name in <b>all</b> affected datasets. </li> <br>
  8981. <li> in the DbLog-Device assigned to the DbRep-Agent the definition will be changed to substitute the old device name by the new one. Thereby the logging of
  8982. the renamed device will be going on in the database. </li> <br>
  8983. <li> in other existing DbRep-definitions with Type "Client" a possibly set attribute "device = old device name" will be changed to "device = new device name".
  8984. Because of that, reporting definitions will be kept consistent automatically if devices are renamed in FHEM. </li> <br>
  8985. </ul></ul>
  8986. The following restrictions take place if a DbRep device was changed to an Agent by setting attribute "role" to "Agent". These conditions will be activated
  8987. and checked: <br><br>
  8988. <ul><ul>
  8989. <li> within a FHEM installation only one DbRep-Agent can be configured for every defined DbLog-database. That means, if more than one DbLog-database is present,
  8990. you could define same numbers of DbRep-Agents as well as DbLog-devices are defined. </li> <br>
  8991. <li> after changing to DbRep-Agent role only the set-command "renameDevice" will be available and as well as a reduced set of module specific attributes will be
  8992. permitted. If a DbRep-device of privious type "Client" has changed an Agent, furthermore not permitted attributes will be deleted if set. </li> <br>
  8993. </ul></ul>
  8994. All activities like database changes and changes of other DbRep-definitions will be logged in FHEM Logfile with verbose=3. In order that the renameDevice
  8995. function don't running into timeout set the timeout attribute to an appropriate value, especially if there are databases with huge datasets to evaluate.
  8996. As well as all the other database operations of this module, the autorename operation will be executed nonblocking. <br><br>
  8997. <ul>
  8998. <b>Example </b> of definition of a DbRep-device as an Agent: <br><br>
  8999. <code>
  9000. define Rep.Agent DbRep LogDB <br>
  9001. attr Rep.Agent devStateIcon connected:10px-kreis-gelb .*disconnect:10px-kreis-rot .*done:10px-kreis-gruen <br>
  9002. attr Rep.Agent icon security <br>
  9003. attr Rep.Agent role Agent <br>
  9004. attr Rep.Agent room DbLog <br>
  9005. attr Rep.Agent showproctime 1 <br>
  9006. attr Rep.Agent stateFormat { ReadingsVal("$name","state", undef) eq "running" ? "renaming" : ReadingsVal("$name","state", undef). " &raquo;; ProcTime: ".ReadingsVal("$name","sql_processing_time", undef)." sec"} <br>
  9007. attr Rep.Agent timeout 86400 <br>
  9008. </code>
  9009. <br>
  9010. </ul>
  9011. </ul>
  9012. <a name="Dooya"></a>
  9013. <h3>Dooya protocol</h3>
  9014. <ul>
  9015. The Dooya protocol is used by a wide range of devices,
  9016. which are either senders or receivers/actuators.
  9017. The RECIVING and SENDING of Dooya commands is implemented in the SIGNALduino, so this module currently supports
  9018. devices like blinds and shutters. The Dooya protocol is used from a lot of different shutter companies in Germanyr. Examples are Rohrmotor24 or Nobily.
  9019. <br><br>
  9020. <pre>
  9021. <code>4: sduino/msg READ: MU;P0=4717;P1=-1577;P2=284;P3=-786;P4=649;P5=-423;D=01232345[......]445232;CP=2;</code>
  9022. <code>4: sduino: Fingerprint for MU Protocol id 16 -> Dooya shutter matches, trying to demodulate</code>
  9023. <code>4: sduino: decoded matched MU Protocol id 16 dmsg u16#370658E133 length 40</code>
  9024. <code>4: SIGNALduino_unknown Protocol: 16</code>
  9025. <code>4: SIGNALduino_unknown converted to bits: 0011011100000110010110001110000100110011</code>
  9026. <code>4: SIGNALduino_unknown / shutter Dooya 0011011100000110010110001110000100110011 received</code>
  9027. <code>4: 00110111000001100101100 1110 0001 0011 0011</code>
  9028. <code>4: SIGNALduino_unknown found shutter from Dooya. id=3606104, remotetype=14, channel=1, direction=down, all_shutters=false</code>
  9029. </pre>
  9030. <br> a <a href="#SIGNALduino">SIGNALduino</a> device (must be defined first) <br>
  9031. <br>
  9032. <br>
  9033. <a name="Dooyadefine"></a>
  9034. <br>
  9035. <b>Define</b>
  9036. <br>
  9037. <ul>
  9038. <code>define &lt;name&gt; Dooya &lt;id&gt;_&lt;channel&gt; </code>
  9039. <br>
  9040. <br>
  9041. The id is a 28-digit binar code, that uniquely identifies a single remote control.
  9042. <br>
  9043. Pairing is done by setting the shutter in programming mode, either by disconnecting/reconnecting the power,
  9044. and by pressing the program button on an already associated remote.
  9045. <br>
  9046. Once the shutter is in programming mode, send the "prog" command from within FHEM to complete the pairing.
  9047. The shutter will peep shortly to indicate completion.
  9048. <br>
  9049. You are now able to control this blind from FHEM, the receiver thinks it is just another remote control or the real exist remote.
  9050. For the shutter it´s the same.
  9051. <ul>
  9052. <li><code>&lt;id&gt;</code> is a 28 digit binar number that uniquely identifies FHEM as a new remote control.
  9053. <br>You can use a different one for each device definition, and group them using a structure. You can use the same ID for a couple of shutters
  9054. and you can give every one an other channel. (0 to 15, 0 ist the MASTER and conrols all other channels.)
  9055. If you set one of them, you need to pick the same address as an existing remote. You can create the Device with autocreate with a real remote or manuel without remote control.</li>
  9056. </ul>
  9057. <br>
  9058. Examples:
  9059. <ul>
  9060. <code>define Rollo_Master Dooya 0011011100000110010110001110_0</code><br> Rollo_Master channel 0 controls all shutters (channel 1 - 15) with the same ID, in this case Rollo_1 and Rollo_2 <br>
  9061. <br>
  9062. <code>define Rollo_1 Dooya 0011011100000110010110001110_1</code><br> Rollo_1 channel 1<br>
  9063. <code>define Rollo_2 Dooya 0011011100000110010110101110_2</code><br> Rollo_2 channel 2<br>
  9064. </ul>
  9065. </ul>
  9066. <br>
  9067. <a name="Dooyaset"></a>
  9068. <b>Set </b>
  9069. <ul>
  9070. <code>set &lt;name&gt; &lt;value&gt; [&lt;time&gt]</code>
  9071. <br><br>
  9072. where <code>value</code> is one of:<br>
  9073. <pre>
  9074. on
  9075. off
  9076. stop
  9077. pos value (0..100) # see note
  9078. prog # Special, see note
  9079. </pre>
  9080. Examples:
  9081. <ul>
  9082. <code>set rollo_1 on</code><br>
  9083. <code>set rollo_1 on,sleep 1,rollo_2 on,sleep 1,rollo_3 on</code><br>
  9084. <code>set rollo_1 off</code><br>
  9085. <code>set rollo_1 pos 50</code><br>
  9086. </ul>
  9087. <br>
  9088. Notes:
  9089. <ul>
  9090. <li>prog is a special command used to pair the receiver to FHEM:
  9091. Set the receiver in programming mode and send the "prog" command from FHEM to finish pairing.<br>
  9092. The shutter will peep shortly to indicate success.
  9093. </li>
  9094. <li>pos value<br>
  9095. The position is variying between 0 completely open and 100 for covering the full window.
  9096. The position must be between 0 and 100 and the appropriate
  9097. attributes drive-down-time-to-100, drive-down-time-to-close,
  9098. drive-up-time-to-100 and drive-up-time-to-open must be set.<br>
  9099. </li>
  9100. </ul>
  9101. The position reading distinuishes between multiple cases
  9102. <ul>
  9103. <li>Without timing values set only generic values are used for status and position: <pre>open, closed, moving</pre> are used
  9104. </li>
  9105. <li>With timing values set but drive-down-time-to-close equal to drive-down-time-to-100 and drive-up-time-to-100 equal 0
  9106. the device is considered to only vary between 0 and 100 (100 being completely closed)
  9107. </li>
  9108. <li>With full timing values set the device is considerd a window shutter (Rolladen) with a difference between
  9109. covering the full window (position 100) and being completely closed (position 200)
  9110. </li>
  9111. </ul>
  9112. </ul>
  9113. <br>
  9114. <b>Get</b>
  9115. <ul>N/A</ul><br>
  9116. <a name="Dooyaattr"></a>
  9117. <b>Attributes</b>
  9118. <ul>
  9119. <a name="IODev"></a>
  9120. <li>IODev<br>
  9121. Set the IO or physical device which should be used for sending signals
  9122. for this "logical" device. It must be the SIGNALduino.<br>
  9123. Note: The IODev has to be set, otherwise no commands will be sent!<br>
  9124. </li><br>
  9125. <a name="channel"></a>
  9126. <li>channel<br>
  9127. Set the channel of the remote. You can use 0 (MASTER) to 15.<br>
  9128. Note: The MASTER conrols all remotes with the same ID!!!<br>
  9129. </li><br>
  9130. <a name="SignalRepeats"></a>
  9131. <li>SignalRepeats<br>
  9132. Set the repeats for sending signal. You can use 5, 10, 15 and 20.
  9133. </li><br>
  9134. <a name="additionalPosReading"></a>
  9135. <li>additionalPosReading<br>
  9136. Position of the shutter will be stored in the reading <code>pos</code> as numeric value.
  9137. Additionally this attribute might specify a name for an additional reading to be updated with the same value than the pos.
  9138. </li><br>
  9139. <a name="eventMap"></a>
  9140. <li>eventMap<br>
  9141. Replace event names and set arguments. The value of this attribute
  9142. consists of a list of space separated values, each value is a colon
  9143. separated pair. The first part specifies the "old" value, the second
  9144. the new/desired value. If the first character is slash(/) or comma(,)
  9145. then split not by space but by this character, enabling to embed spaces.
  9146. Examples:
  9147. <ul><code>
  9148. attr store eventMap on:open off:closed<br>
  9149. attr store eventMap /on-for-timer 10:open/off:closed/<br>
  9150. set store open
  9151. </code>
  9152. </ul>
  9153. </li>
  9154. <br>
  9155. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  9156. <a name="attrdummy"></a>
  9157. <li>dummy<br>
  9158. Set the device attribute dummy to define devices which should not
  9159. output any radio signals. Associated notifys will be executed if
  9160. the signal is received. Used e.g. to react to a code from a sender, but
  9161. it will not emit radio signal if triggered in the web frontend.
  9162. </li><br>
  9163. <li><a href="#loglevel">loglevel</a></li><br>
  9164. <li><a href="#showtime">showtime</a></li><br>
  9165. <a name="model"></a>
  9166. <a name="ignore"></a>
  9167. <li>ignore<br>
  9168. Ignore this device, e.g. if it belongs to your neighbour. The device
  9169. won't trigger any FileLogs/notifys, issued commands will silently
  9170. ignored (no RF signal will be sent out, just like for the <a
  9171. href="#attrdummy">dummy</a> attribute). The device won't appear in the
  9172. list command (only if it is explicitely asked for it), nor will it
  9173. appear in commands which use some wildcard/attribute as name specifiers
  9174. (see <a href="#devspec">devspec</a>). You still get them with the
  9175. "ignored=1" special devspec.
  9176. </li><br>
  9177. <a name="drive-down-time-to-100"></a>
  9178. <li>drive-down-time-to-100<br>
  9179. The time the blind needs to drive down from "open" (pos 0) to pos 100.<br>
  9180. In this position, the lower edge touches the window frame, but it is not completely shut.<br>
  9181. For a mid-size window this time is about 12 to 15 seconds.
  9182. </li><br>
  9183. <a name="drive-down-time-to-close"></a>
  9184. <li>drive-down-time-to-close<br>
  9185. The time the blind needs to drive down from "open" (pos 0) to "close", the end position of the blind.<br>
  9186. This is about 3 to 5 seonds more than the "drive-down-time-to-100" value.
  9187. </li><br>
  9188. <a name="drive-up-time-to-100"></a>
  9189. <li>drive-up-time-to-100<br>
  9190. The time the blind needs to drive up from "close" (endposition) to "pos 100".<br>
  9191. This usually takes about 3 to 5 seconds.
  9192. </li><br>
  9193. <a name="drive-up-time-to-open"></a>
  9194. <li>drive-up-time-to-open<br>
  9195. The time the blind needs drive up from "close" (endposition) to "open" (upper endposition).<br>
  9196. This value is usually a bit higher than "drive-down-time-to-close", due to the blind's weight.
  9197. </li><br>
  9198. </ul>
  9199. <br>
  9200. <a name="Dooyaevents"></a>
  9201. <b>Generated events:</b>
  9202. <ul>
  9203. From a Dooya device you can receive one of the following events.
  9204. <li>on</li>
  9205. <li>off</li>
  9206. <li>stop</li>
  9207. Which event is sent is device dependent and can sometimes be configured on
  9208. the device.
  9209. </ul>
  9210. </ul>
  9211. <a name="EC3000"></a>
  9212. <h3>EC3000</h3>
  9213. <ul>
  9214. The Energy Count 3000 is a AC mains plug with integrated power meter functionality from CONRAD.<br><br>
  9215. It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
  9216. <a name="EC3000Define"></a>
  9217. <b>Define</b>
  9218. <ul>
  9219. <code>define &lt;name&gt; EC3000 &lt;addr&gt;</code> <br>
  9220. <br>
  9221. addr is a 4 digit hex number to identify the EC3000 device.
  9222. Note: devices are autocreated on reception of the first message.<br>
  9223. </ul>
  9224. <br>
  9225. <a name="EC3000_Set"></a>
  9226. <b>Set</b>
  9227. <ul>
  9228. </ul><br>
  9229. <a name="EC3000_Get"></a>
  9230. <b>Get</b>
  9231. <ul>
  9232. </ul><br>
  9233. <a name="EC3000_Readings"></a>
  9234. <b>Readings</b>
  9235. <ul>
  9236. <li>consumption</li>
  9237. <li>consumptionMax</li>
  9238. <li>consumptionNow</li>
  9239. </ul><br>
  9240. <a name="EC3000_Attr"></a>
  9241. <b>Attributes</b>
  9242. <ul>
  9243. <li>offLevel<br>
  9244. a power level less or equal <code>offLevel</code> is considered to be off</li>
  9245. </ul><br>
  9246. </ul>
  9247. <a name="ECMD"></a>
  9248. <h3>ECMD</h3>
  9249. <ul>
  9250. Any physical device with request/response-like communication capabilities
  9251. over a serial line or TCP connection can be defined as ECMD device. A practical example
  9252. of such a device is the AVR microcontroller board AVR-NET-IO from
  9253. <a href="http://www.pollin.de">Pollin</a> with
  9254. <a href="http://www.ethersex.de/index.php/ECMD">ECMD</a>-enabled
  9255. <a href="http://www.ethersex.de">Ethersex</a> firmware. The original
  9256. NetServer firmware from Pollin works as well. There is a plenitude of use cases.<p>
  9257. A physical ECMD device can host any number of logical ECMD devices. Logical
  9258. devices are defined as <a href="#ECMDDevice">ECMDDevice</a>s in fhem.
  9259. ADC 0 to 3 and I/O port 0 to 3 of the above mentioned board
  9260. are examples of such logical devices. ADC 0 to 3 all belong to the same
  9261. device class ADC (analog/digital converter). I/O port 0 to 3 belong to the device
  9262. class I/O port. By means of extension boards you can make your physical
  9263. device drive as many logical devices as you can imagine, e.g. IR receivers,
  9264. LC displays, RF receivers/transmitters, 1-wire devices, etc.<p>
  9265. Defining one fhem module for any device class would create an unmanageable
  9266. number of modules. Thus, an abstraction layer is used. You create a device class
  9267. on the fly and assign it to a logical ECMD device. The
  9268. <a href="#ECMDClassdef">class definition</a>
  9269. names the parameters of the logical device, e.g. a placeholder for the number
  9270. of the ADC or port, as well as the get and set capabilities. Worked examples
  9271. are to be found in the documentation of the <a href="#ECMDDevice">ECMDDevice</a> device.
  9272. <br><br>
  9273. Note: this module requires the Device::SerialPort or Win32::SerialPort module
  9274. if the module is connected via serial Port or USB.<p>
  9275. <a name="ECMDcharcoding"></a>
  9276. <b>Character coding</b><br><br>
  9277. ECMD is suited to process any character including non-printable and control characters.
  9278. User input for raw data, e.g. for setting attributes, and the display of raw data, e.g. in the log,
  9279. is perl-encoded according to the following table (ooo stands for a three-digit octal number):<BR>
  9280. <table>
  9281. <tr><th>character</th><th>octal</th><th>code</th></tr>
  9282. <tr><td>Bell</td><td>007</td><td>\a</td></tr>
  9283. <tr><td>Backspace</td><td>008</td><td>\008</td></tr>
  9284. <tr><td>Escape</td><td>033</td><td>\e</td></tr>
  9285. <tr><td>Formfeed</td><td>014</td><td>\f</td></tr>
  9286. <tr><td>Newline</td><td>012</td><td>\n</td></tr>
  9287. <tr><td>Return</td><td>015</td><td>\r</td></tr>
  9288. <tr><td>Tab</td><td>011</td><td>\t</td></tr>
  9289. <tr><td>backslash</td><td>134</td><td>\134 or \\</td></tr>
  9290. <tr><td>any</td><td>ooo</td><td>\ooo</td></tr>
  9291. </table><br>
  9292. In user input, use \134 for backslash to avoid conflicts with the way FHEM handles continuation lines.
  9293. <br><br>
  9294. <a name="ECMDdefine"></a>
  9295. <b>Define</b><br><br>
  9296. <ul>
  9297. <code>define &lt;name&gt; ECMD telnet &lt;IPAddress:Port&gt;</code><br><br>
  9298. or<br><br>
  9299. <code>define &lt;name&gt; ECMD serial &lt;SerialDevice&gt;[&lt;@BaudRate&gt;]</code>
  9300. <br><br>
  9301. Defines a physical ECMD device. The keywords <code>telnet</code> or
  9302. <code>serial</code> are fixed.<br><br>
  9303. Examples:
  9304. <ul>
  9305. <code>define AVRNETIO ECMD telnet 192.168.0.91:2701</code><br>
  9306. <code>define AVRNETIO ECMD serial /dev/ttyS0</code><br>
  9307. <code>define AVRNETIO ECMD serial /dev/ttyUSB0@38400</code><br>
  9308. </ul>
  9309. <br>
  9310. </ul>
  9311. <a name="ECMDset"></a>
  9312. <b>Set</b><br><br>
  9313. <ul>
  9314. <code>set &lt;name&gt; classdef &lt;classname&gt; &lt;filename&gt;</code>
  9315. <br><br>
  9316. Creates a new device class <code>&lt;classname&gt;</code> for logical devices.
  9317. The class definition is in the file <code>&lt;filename&gt;</code>. You must
  9318. create the device class before you create a logical device that adheres to
  9319. that definition.
  9320. <br><br>
  9321. Example:
  9322. <ul>
  9323. <code>set AVRNETIO classdef /etc/fhem/ADC.classdef</code><br>
  9324. </ul>
  9325. <br>
  9326. <code>set &lt;name&gt; reopen</code>
  9327. <br><br>
  9328. Closes and reopens the device. Could be handy if connection is lost and cannot be
  9329. reestablished automatically.
  9330. <br><br>
  9331. </ul>
  9332. <a name="ECMDget"></a>
  9333. <b>Get</b><br><br>
  9334. <ul>
  9335. <code>get &lt;name&gt; raw &lt;command&gt;</code>
  9336. <br><br>
  9337. Sends the command <code>&lt;command&gt;</code> to the physical ECMD device
  9338. <code>&lt;name&gt;</code> and reads the response. In the likely case that
  9339. the command needs to be terminated by a newline character, you have to
  9340. resort to a <a href="#perl">&lt;perl special&gt;</a>.
  9341. <br><br>
  9342. Example:
  9343. <ul>
  9344. <code>get AVRNETIO raw { "ip\n" }</code><br>
  9345. </ul>
  9346. </ul>
  9347. <br><br>
  9348. <a name="ECMDattr"></a>
  9349. <b>Attributes</b><br><br>
  9350. <ul>
  9351. <li>classdefs<br>A colon-separated list of &lt;classname&gt;=&lt;filename&gt;.
  9352. The list is automatically updated if a class definition is added. You can
  9353. directly set the attribute. Example: <code>attr myECMD classdefs ADC=/etc/fhem/ADC.classdef:GPIO=/etc/fhem/AllInOne.classdef</code></li>
  9354. <li>split &lt;separator&gt<br>
  9355. Some devices send several readings in one transmission. The split attribute defines the
  9356. separator to split such transmissions into separate messages. The regular expression for
  9357. matching a reading is then applied to each message in turn. After splitting, the separator
  9358. <b>is</b> still part of the single messages. Separator can be a single- or multi-character string,
  9359. e.g. \n or \r\n.
  9360. Example: <code>attr myECMD split \n</code> splits <code>foo 12\nbar off\n</code> into
  9361. <code>foo 12\n</code> and <code>bar off\n</code>.</li>
  9362. <li>logTraffic &lt;loglevel&gt;<br>Enables logging of sent and received datagrams with the given loglevel. Control characters in the logged datagrams are <a href="#ECMDcharcoding">escaped</a>, i.e. a double backslash is shown for a single backslash, \n is shown for a line feed character, etc.</li>
  9363. <li>timeout &lt;seconds&gt;<br>Time in seconds to wait for a response from the physical ECMD device before FHEM assumes that something has gone wrong. The default is 3 seconds if this attribute is not set.</li>
  9364. <li>partial &lt;seconds&gt;<br>Some physical ECMD devices split responses into several transmissions. If the partial attribute is set, this behavior is accounted for as follows: (a) If a response is expected for a get or set command, FHEM collects transmissions from the physical ECMD device until either the response matches the expected response (<code>reading ... match ...</code> in the <a href="#ECMDClassdef">class definition</a>) or the time in seconds given with the partial attribute has expired. (b) If a spontaneous transmission does not match the regular expression for any reading, the transmission is recorded and prepended to the next transmission. If the line is quiet for longer than the time in seconds given with the partial attribute, the recorded transmission is discarded. Use regular expressions that produce exact matches of the complete response (after combining partials and splitting).</li>
  9365. <li>requestSeparator &lt;separator&gt<br>
  9366. A single command from FHEM to the device might need to be broken down into several requests.
  9367. A command string is split at all
  9368. occurrences of the request separator. The request separator itself is removed from the command string and thus is
  9369. not part of the request. The default is to have no request separator. Use a request separator that does not occur in the actual request.
  9370. </li>
  9371. <li>responseSeparator &lt;separator&gt<br>
  9372. In order to identify the single responses from the device for each part of the command broken down by request separators, a response separator can be appended to the response to each single request.
  9373. The response separator is only appended to commands split by means of a
  9374. request separator. The default is to have no response separator, i.e. responses are simply concatenated. Use a response separator that does not occur in the actual response.
  9375. </li>
  9376. <li>autoReopen &lt;timeout&gt;,&lt;delay&gt;<br>
  9377. If this attribute is set, the device is automatically reopened if no bytes were written for &lt;timeout&gt seconds or more. After reopening
  9378. FHEM waits &lt;delay&gt; seconds before writing to the device. Use the delay with care because it stalls FHEM completely.
  9379. </li>
  9380. <li><a href="#verbose">verbose</a></li>
  9381. </ul>
  9382. <br><br>
  9383. <b>Separators</b>
  9384. <br><br>
  9385. <i>When to use the split and partial attributes?</i><p>
  9386. Set the <code>partial</code> attribute in combination with <code>reading ... match ...</code> in the <a href="#ECMDClassdef">class definition</a>, if you receive datagrams with responses which are broken into several transmissions, like <code>resp</code> followed by <code>onse\r\n</code>.<p>
  9387. Set the <code>split</code> attribute if you
  9388. receive several responses in one transmission, like <code>reply1\r\nreply2\r\n</code>.<p>
  9389. <i>When to use the requestSeparator and responseSeparator attributes?</i><p>
  9390. Set the <code>requestSeparator</code> attribute, if you want to send several requests in one command, with one transmission per request. The strings sent to the device for <code>set</code> and <code>get</code> commands
  9391. as defined in the <a href="#ECMDClassdef">class definition</a> are broken down into several request/response
  9392. interactions with the physical device. The request separator is not sent to the physical device.<p>
  9393. Set the <code>responseSeparator</code> attribute to separate the responses received for a command
  9394. broken down into several requests by means of a request separator. This is useful for easier postprocessing.<p>
  9395. Example: you want to send the requests <code>request1</code> and <code>request2</code> in one command. The
  9396. physical device would respond with <code>response1</code> and <code>response2</code> respectively for each
  9397. of the requests. You set the request separator to \000 and the response separator to \001 and you define
  9398. the command as <code>request1\000request2\000</code>. The command is broken down into <code>request1</code>
  9399. and <code>request2</code>. <code>request1</code> is sent to the physical device and <code>response1</code>
  9400. is received, followed by sending <code>request2</code> and receiving <code>response2</code>. The final
  9401. result is <code>response1\001response2\001</code>.<p>
  9402. You can think of this feature as of a macro. Splitting and partial matching is still done per single
  9403. request/response within the macro.<p>
  9404. <a name="ECMDDatagram"></a>
  9405. <b>Datagram monitoring and matching</b>
  9406. <br><br>
  9407. Data to and from the physical device is processed as is. In particular, if you need to send a line feed you have to explicitely send a \n control character. On the other hand, control characters like line feeds are not stripped from the data received. This needs to be considered when defining a <a href="#ECMDClassdef">class definition</a>.<p>
  9408. For debugging purposes, especially when designing a <a href="#ECMDClassdef">class definition</a>, it is advisable to turn traffic logging on. Use <code>attr myECMD logTraffic 3</code> to log all data to and from the physical device at level 3.<p>
  9409. Datagrams and attribute values are logged with non-printable and control characters encoded as <a href="#ECMDcharcoding">here</a> followed by the octal representation in parantheses.
  9410. Example: <code>#!foo\r\n (\043\041\146\157\157\015\012)</code>.<p>
  9411. Data received from the physical device is processed as it comes in chunks. If for some reason a datagram from the device is split in transit, pattern matching and processing will most likely fail. You can use the <code>partial</code> attribute to make FHEM collect and recombine the chunks.
  9412. <br><br>
  9413. <a name="ECMDConnection"></a>
  9414. <b>Connection error handling</b>
  9415. <br><br>
  9416. This modules handles unexpected disconnects of devices as follows (on Windows only for TCP connections):<p>
  9417. Disconnects are detected if and only if data from the device in reply to data sent to the device cannot be received with at most two attempts. FHEM waits at most 3 seconds (or the time specified in the <code>timeout</code> attribute, see <a href="#ECMDattr">Attributes</a>). After the first failed attempt, the connection to the device is closed and reopened again. The state of the device
  9418. is <code>failed</code>. Then the data is sent again to the device. If still no reply is received, the state of the device is <code>disconnected</code>, otherwise <code>opened</code>. You will have to fix the problem and then use <code>set myECMD reopen</code> to reconnect to the device.<p>
  9419. Please design your class definitions in such a way that the double sending of data does not bite you in any case.
  9420. <br><br>
  9421. <a name="ECMDClassdef"></a>
  9422. <b>Class definition</b>
  9423. <br><br>
  9424. The class definition for a logical ECMD device class is contained in a text file.
  9425. The text file is made up of single lines. Empty lines and text beginning with #
  9426. (hash) are ignored. Therefore make sure not to use hashes in commands.<br>
  9427. The following commands are recognized in the device class definition:<br><br>
  9428. <ul>
  9429. <li><code>params &lt;parameter1&gt; [&lt;parameter2&gt; [&lt;parameter3&gt; ... ]]</code><br><br>
  9430. Declares the names of the named parameters that must be present in the
  9431. <a href="#ECMDDevicedefine">definition of the logical ECMD device</a>.
  9432. <br><br>
  9433. </li>
  9434. <li><code>state &lt;reading&gt;</code><br><br>
  9435. Normally, the state reading is set to the latest command or reading name followed
  9436. by the value, if any. This command sets the state reading to the value of the
  9437. named reading if and only if the reading is updated.<br><br>
  9438. </li>
  9439. <li><code>set &lt;commandname&gt; cmd { <a href="#perl">&lt;perl special&gt;</a> }</code><br>
  9440. <code>get &lt;commandname&gt; cmd { <a href="#perl">&lt;perl special&gt;</a> }</code>
  9441. <br><br>
  9442. Declares a new set or get command <code>&lt;commandname&gt;</code>. If the user invokes the set or get command <code>&lt;commandname&gt;</code>, the string that results from the execution of the &lt;perl special&gt; is sent to the physical device.<p>
  9443. A request separator (see <a href="#ECMDattr">Attributes</a>)
  9444. can be used to split the command into chunks. This is required for sending multiple <a href="http://www.ethersex.de/index.php/ECMD">Ethersex commands</a> for one command in the class definition.
  9445. The result string for the command is the
  9446. concatenation of all responses received from the physical device, optionally with response separators
  9447. (see <a href="#ECMDattr">Attributes</a>) in between.
  9448. <br><br>
  9449. </li>
  9450. <li>
  9451. <code>set &lt;commandname&gt; expect "&lt;regex&gt;"</code><br>
  9452. <code>get &lt;commandname&gt; expect "&lt;regex&gt;"</code>
  9453. <br><br>
  9454. Declares what FHEM expects to receive after the execution of the get or set command <code>&lt;commandname&gt;</code>. <code>&lt;regex&gt;</code> is a Perl regular expression. The double quotes around the regular expression are mandatory and they are not part of the regular expression itself.
  9455. <code>&lt;regex&gt;</code> must match the entire reply, as in <code>m/^&lt;regex&gt;$/</code>.
  9456. Particularly, broken connections can only be detected if something is expected (see <a href="#ECMDConnection">Connection error handling</a>).
  9457. <br><br>
  9458. </li>
  9459. <li>
  9460. <code>set &lt;commandname&gt; postproc { <a href="#perl">&lt;perl special&gt;</a> }</code><br>
  9461. <code>get &lt;commandname&gt; postproc { <a href="#perl">&lt;perl special&gt;</a> }</code>
  9462. <br><br>
  9463. Declares a postprocessor for the command <code>&lt;commandname&gt;</code>. The data received from the physical device in reply to the get or set command <code>&lt;commandname&gt;</code> is processed by the Perl code <code>&lt;perl command&gt;</code>. The perl code operates on <code>$_</code>. Make sure to return the result in <code>$_</code> as well. The result of the perl command is shown as the result of the get or set command.
  9464. <br><br>
  9465. </li>
  9466. <li>
  9467. <code>set &lt;commandname&gt; params &lt;parameter1&gt; [&lt;parameter2&gt; [&lt;parameter3&gt; ... ]]</code><br>
  9468. <code>get &lt;commandname&gt; params &lt;parameter1&gt; [&lt;parameter2&gt; [&lt;parameter3&gt; ... ]]</code>
  9469. <br><br>
  9470. Declares the names of the named parameters that must be present in the
  9471. set or get command <code>&lt;commandname&gt;</code></a>. Be careful not to use a parameter name that
  9472. is already used in the device definition (see <code>params</code> above).
  9473. <br><br>
  9474. </li>
  9475. <li>
  9476. <code>reading &lt;reading&gt; match "&lt;regex&gt;"</code>
  9477. <br><br>
  9478. Declares a new reading named <code>&lt;reading&gt;</code>. A spontaneous data transmission from the physical device that matches the Perl regular expression <code>&lt;regex&gt;</code> is evaluated to become the value of the named reading. All ECMDDevice devices belonging to the ECMD device with readings with matching regular expressions will receive an update of the said readings.
  9479. <code>&lt;regex&gt;</code> must match the entire reply, as in <code>m/^&lt;regex&gt;$/</code>.
  9480. <br><br>
  9481. </li>
  9482. <li>
  9483. <code>reading &lt;reading&gt; postproc { <a href="#perl">&lt;perl special&gt;</a> }</code>
  9484. <br><br>
  9485. Declares a postprocessor for the reading <code>&lt;reading&gt;</code>. The data received for the named reading is processed by the Perl code <code>&lt;perl command&gt;</code>. This works analogously to the <code>postproc</code> spec for set and get commands.
  9486. <br><br>
  9487. </li>
  9488. </ul>
  9489. The perl specials in the definitions above can
  9490. contain macros:<br><br>
  9491. <ul>
  9492. <li>The macro <code>%NAME</code> will expand to the device name.</li>
  9493. <li>The macro <code>%TYPE</code> will expand to the device type.</li>
  9494. <li>The macro <code>%&lt;parameter&gt;</code> will expand to the
  9495. current value of the named parameter. This can be either a parameter
  9496. from the device definition or a parameter from the set or get
  9497. command.</li>
  9498. <li>The macro substitution occurs before perl evaluates the
  9499. expression. It is a plain text substitution. Be careful not to use parameters with overlapping names like
  9500. <code>%pin</code> and <code>%pin1</code>.</li>
  9501. <li>If in doubt what happens, run the commands with loglevel 5 and
  9502. inspect the log file.</li>
  9503. </ul><br><br>
  9504. The rules outlined in the <a href="#perl">documentation of perl specials</a>
  9505. for the <code>&lt;perl command&gt</code> in the postprocessor definitions apply.
  9506. <b>Note:</b> Beware of undesired side effects from e.g. doubling of semicolons!
  9507. </ul>
  9508. <a name="ECMDDevice"></a>
  9509. <h3>ECMDDevice</h3>
  9510. <ul>
  9511. <br>
  9512. <a name="ECMDDevicedefine"></a>
  9513. <b>Define</b>
  9514. <ul>
  9515. <code>define &lt;name&gt; ECMDDevice [&lt;classname&gt; [&lt;parameter1&gt; [&lt;parameter2&gt; [&lt;parameter3&gt; ... ]]]]</code>
  9516. <br><br>
  9517. Defines a logical ECMD device. The number of given parameters must match those given in
  9518. the <a href="#ECMDClassdef">class definition</a> of the device class <code>&lt;classname&gt;</code>.<p>
  9519. Normally, the logical ECMDDevice is attached to the latest previously defined physical ECMD device
  9520. for I/O. Use the <code>IODev</code> attribute of the logical ECMDDevice to attach to any
  9521. physical ECMD device, e.g. <code>attr myRelais2 IODev myAVRNETIO</code>. In such a case the correct
  9522. reference to the class cannot be made at the time of definition of the device. Thus, you need to
  9523. omit the &lt;classname&gt; and &lt;parameter&gt; references in the definition of the device and use the
  9524. <code>class</code> <a href="#ECMDDeviceattr">attribute</a> instead.
  9525. <br><br>
  9526. Examples:
  9527. <ul>
  9528. <code>define myADC ECMDDevice ADC</code><br>
  9529. <code>define myRelais1 ECMDDevice relais 8</code><br>
  9530. <code>define myRelais2 ECMDDevice</code><br>
  9531. <code>attr myRelais2 IODev myAVRNETIO</code><br>
  9532. <code>attr myRelais2 class relais 8</code>
  9533. </ul>
  9534. <br>
  9535. </ul>
  9536. <a name="ECMDDeviceset"></a>
  9537. <b>Set</b>
  9538. <ul>
  9539. <code>set &lt;name&gt; &lt;commandname&gt; [&lt;parameter1&gt; [&lt;parameter2&gt; [&lt;parameter3&gt; ... ]]]</code>
  9540. <br><br>
  9541. The number of given parameters must match those given for the set command <code>&lt;commandname&gt;</code> definition in
  9542. the <a href="#ECMDClassdef">class definition</a>.<br><br>
  9543. If <code>set &lt;commandname&gt;</code> is invoked the perl special in curly brackets from the command definition
  9544. is evaluated and the result is sent to the physical ECMD device.
  9545. <br><br>
  9546. Example:
  9547. <ul>
  9548. <code>set myRelais1 on</code><br>
  9549. <code>set myDisplay text This\x20text\x20has\x20blanks!</code><br>
  9550. </ul>
  9551. <br>
  9552. </ul>
  9553. <a name="ECMDDeviceget"></a>
  9554. <b>Get</b>
  9555. <ul>
  9556. <code>get &lt;name&gt; &lt;commandname&gt; [&lt;parameter1&gt; [&lt;parameter2&gt; [&lt;parameter3&gt; ... ]]]</code>
  9557. <br><br>
  9558. The number of given parameters must match those given for the get command <code>&lt;commandname&gt;</code> definition in
  9559. the <a href="#ECMDClassdef">class definition</a>.<br><br>
  9560. If <code>get &lt;commandname&gt;</code> is invoked the perl special in curly brackets from the command definition
  9561. is evaluated and the result is sent to the physical ECMD device. The response from the physical ECMD device is returned
  9562. and the state of the logical ECMD device is updated accordingly.
  9563. <br><br>
  9564. Example:
  9565. <ul>
  9566. <code>get myADC value 3</code><br>
  9567. </ul>
  9568. <br>
  9569. </ul>
  9570. <a name="ECMDDeviceattr"></a>
  9571. <b>Attributes</b>
  9572. <ul>
  9573. <li>class<br>
  9574. If you omit the &lt;classname&gt; and &lt;parameter&gt; references in the
  9575. <a href="#ECMDDevicedefine">definition</a> of the device, you have to add them
  9576. separately as an attribute. Example: <code>attr myRelais2 class relais 8</code>.</li>
  9577. <li>noState<br>
  9578. Changes of readings do not change the state reading if this attribute is set to a non-zero value.
  9579. For example, this is desirable if you need to avoid the second event created by changing the state
  9580. reading. Previously created state readings can be deleted by means of <a href="#deletereading">deletereading</a>.
  9581. The user can define the value shown in the state of the device by means
  9582. of the <a href="#stateFormat">stateFormat</a> attribute.</li>
  9583. <li><a href="#verbose">verbose</a></li>
  9584. <li><a href="#eventMap">eventMap</a></li>
  9585. <li><a href="#IODev">IODev</a></li>
  9586. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  9587. </ul>
  9588. <br><br>
  9589. <b>Example 1</b>
  9590. <br><br>
  9591. <ul>
  9592. The following example shows how to access the ADC of the AVR-NET-IO board from
  9593. <a href="http://www.pollin.de">Pollin</a> with
  9594. <a href="http://www.ethersex.de/index.php/ECMD">ECMD</a>-enabled
  9595. <a href="http://www.ethersex.de">Ethersex</a> firmware.<br><br>
  9596. The class definition file <code>/etc/fhem/ADC.classdef</code> looks as follows:<br><br>
  9597. <code>
  9598. get value cmd {"adc get %channel\n"} <br>
  9599. get value params channel<br>
  9600. get value expect "\d+\n"<br>
  9601. get value postproc { s/^(\d+)\n$/$1/;; $_ }<br>
  9602. </code>
  9603. <br>
  9604. In the fhem configuration file or on the fhem command line we do the following:<br><br>
  9605. <code>
  9606. define AVRNETIO ECMD telnet 192.168.0.91:2701 # define the physical device<br>
  9607. attr AVRNETIO classdefs ADC=/etc/fhem/ADC.classdef # define the device class ADC<br>
  9608. define myADC ECDMDevice ADC # define the logical device myADC with device class ADC<br>
  9609. get myADC value 1 # retrieve the value of analog/digital converter number 1<br>
  9610. </code>
  9611. <br>
  9612. The get command is evaluated as follows: <code>get value</code> has one named parameter
  9613. <code>channel</code>. In the example the literal <code>1</code> is given and thus <code>%channel</code>
  9614. is replaced by <code>1</code> to yield <code>"adc get 1\n"</code> after macro substitution. Perl
  9615. evaluates this to a literal string which is send as a plain ethersex command to the AVR-NET-IO. The
  9616. board returns something like <code>024\n</code> for the current value of analog/digital converter number 1. The postprocessor keeps only the digits.
  9617. <br><br>
  9618. </ul>
  9619. <b>Example 2</b>
  9620. <br><br>
  9621. <ul>
  9622. The following example shows how to switch a relais driven by pin 3 (bit mask 0x08) of I/O port 2 on for
  9623. one second and then off again.<br><br>
  9624. The class definition file <code>/etc/fhem/relais.classdef</code> looks as follows:<br><br>
  9625. <code>
  9626. params pinmask<br>
  9627. set on cmd {"io set ddr 2 ff\n\000ioset port 2 0%pinmask\n\000wait 1000\n\000io set port 2 00\n"}<br>
  9628. set on expect ".*"<br>
  9629. set on postproc {s/^OK\nOK\nOK\nOK\n$/success/; "$_" eq "success" ? "ok" : "error"; }<br>
  9630. </code>
  9631. <br>
  9632. In the fhem configuration file or on the fhem command line we do the following:<br><br>
  9633. <code>
  9634. define AVRNETIO ECMD telnet 192.168.0.91:2701 # define the physical device<br>
  9635. attr AVRNETIO classdefs relais=/etc/fhem/relais.classdef # define the device class relais<br>
  9636. attr AVRNETIO requestSeparator \000<br>
  9637. define myRelais ECMDDevice 8 # define the logical device myRelais with pin mask 8<br>
  9638. set myRelais on # execute the "on" command<br>
  9639. </code>
  9640. <br>
  9641. The set command is evaluated as follows: <code>%pinmask</code>
  9642. is replaced by <code>8</code> to yield
  9643. <code>"io set ddr 2 ff\n\000io set port 2 08\n\000wait 1000\n\000io set port 2 00\n\000"</code> after macro substitution. Perl
  9644. evaluates this to a literal string. This string is split into lines (with trailing newline characters)
  9645. <code>
  9646. <ul>
  9647. <li>io set ddr 2 ff\n</li>
  9648. <li>ioset port 2 08\n</li>
  9649. <li>wait 1000\n</li>
  9650. <li>io set port 2 00\n</li>
  9651. </ul>
  9652. </code>
  9653. These lines are sent as a plain ethersex commands to the AVR-NET-IO one by one. After
  9654. each line the answer from the physical device is read back. They are concatenated and returned
  9655. for further processing by the <code>postproc</code> command.
  9656. For any of the four plain ethersex commands, the AVR-NET-IO returns the string <code>OK\n</code>. They are
  9657. concatenated. The postprocessor takes the result from <code>$_</code>,
  9658. substitutes it by the string <code>success</code> if it is <code>OK\nOK\nOK\nOK\n</code>, and then either
  9659. returns the string <code>ok</code> or the string <code>error</code>. If the responseSeparator was set to \000,
  9660. the result string would be <code>OK\n\000OK\n\000OK\n\000OK\n\000</code> instead of <code>OK\nOK\nOK\nOK\n</code>.
  9661. <br><br>
  9662. </ul>
  9663. <b>Example 3</b>
  9664. <br><br>
  9665. <ul>
  9666. The following example shows how to implement a sandbox.<br><br>
  9667. The class definition file <code>/etc/fhem/DummyServer.classdef</code> looks as follows:<br><br>
  9668. <code>
  9669. reading foo match "\d+\n"<br>
  9670. reading foo postproc { s/^(\d+).*$/$1/;; $_ }<br>
  9671. </code>
  9672. <br>
  9673. In the fhem configuration file or on the fhem command line we do the following:<br><br>
  9674. <code>
  9675. define myDummyServer ECMD telnet localhost:9999 # define the physical device<br>
  9676. set myDummyServer classdef DummyServer /etc/fhem/DummyServer.classdef # define the device class DummyServer<br>
  9677. define myDummyClient ECDMDevice DummyServer # define a logical device with device class DummyServer<br>
  9678. </code>
  9679. <p>
  9680. On a Unix command line, run <code>netcat -l 9999</code>. This makes netcat listening on port 9999. Data received on that port are printed on stdout. Data input from stdin is sent to the other end of an incoming connection.<p>
  9681. Start FHEM.<p>
  9682. Then enter the number 4711 at the stdin of the running netcat server.<p>
  9683. FHEM sees <code>4711\n</code> coming in from the netcat dummy server. The incoming string matches the regular expression of the <code>foo</code> reading. The postprocessor is used to strip any trailing garbage from the digits. The result 4711 is used to update the <code>foo</code> reading.
  9684. <br><br>
  9685. </ul>
  9686. </ul>
  9687. <a name="EDIPLUG"></a>
  9688. <h3>EDIPLUG</h3>
  9689. FHEM module to control the Edimax Smart Plug Switches SP-2101W and SP-1101W (http://www.edimax.com)<br>
  9690. FHEM Forum : <a href="http://forum.fhem.de/index.php/topic,29541.0.html">http://forum.fhem.de/index.php/topic,29541.0.html</a><br>
  9691. SP-2101W - Edimax Smart Plug Switch with Power Meter<br>
  9692. SP-1101W - Edimax Smart Plug Switch<br>
  9693. requires XML:Simple -> sudo apt-get install libxml-simple-perl<br>
  9694. <br>
  9695. <ul>
  9696. <a name="EDIPLUGdefine"></a>
  9697. <b>Define</b>
  9698. <ul>
  9699. define &lt;name&gt; EDIPLUG &lt; IP_EDIMAX_Device (or FQDN) &gt;<br>
  9700. Example:<br>
  9701. <li>define myediplug EDIPLUG 192.168.0.99</li>
  9702. <li>define myediplug EDIPLUG ediplug.myhome.net</li>
  9703. </ul>
  9704. <a name="EDIPLUGset"></a>
  9705. <b>Set</b>
  9706. <ul>
  9707. <li>on => switch power on</li>
  9708. <li>off => switch power off</li>
  9709. <li>list => set a new list for one day with one entry : DayOfWeek(0-6) Starttime(hh:mm) Endtime(hh:mm) Command(on/off) e.g. 1 10:00 11:30 on<br>
  9710. use (DayOfWeek) 00:00 24:00 on to switch the complete day on</li>
  9711. <li>addlist => add a new on/off time : DayOfWeek(0-6) Starttime(hh:mm) Endtime(hh:mm) Command(on/off) e.g. 1 10:00 11:30 on</li>
  9712. <li>dellist => remove a existing on/off time : DayOfWeek(0-6) Starttime(hh:mm) Endtime(hh:mm) e.g. 1 10:00 11:30</li>
  9713. <li>delete => delete timelist of one day : DayOfWeek(0-6)</li>
  9714. <li>day => enable/disable timeschedule for one day : DayOfWeek(0-6) on/off</li>
  9715. </ul>
  9716. <a name="EDIPLUGget"></a>
  9717. <b>Get</b><ul>
  9718. <li>info => shows MAC , Firmware Version , Model , Name</li>
  9719. <li>power => shows all Power informations ( model SP-2101W only)</li>
  9720. <li>schedule => show all internal on/off timetables</li>
  9721. <li>status => show on/off state</li>
  9722. </ul>
  9723. <a name="EDIPLUGattr"></a>
  9724. <b>Attributes</b>
  9725. <ul>
  9726. <li>interval => polling interval (default 60)</li>
  9727. <li>timeout => max. time to wait in seconds (default 2)</li>
  9728. <li>read-only => only read (Get) from device (default 0)</li>
  9729. <li>user => username (default admin)</li>
  9730. <li>password => password (default 1234)</li>
  9731. </ul>
  9732. <br>
  9733. <b>Readings</b>
  9734. <ul>
  9735. <li>0.So -> switching times Sunday</li>
  9736. <li>0.So.state -> Sunday switching on/off</li>
  9737. <li>.</li>
  9738. <li>.</li>
  9739. <li>.</li>
  9740. <li>6.Sa -> switching times Saturday</li>
  9741. <li>6.Sa.state -> Saturday switching on/off ( model SP-2101W only )</li>
  9742. <li>last_Toggle_Time ( model SP-2101W only )</li>
  9743. <li>current ( model SP-2101W only )</li>
  9744. <li>power_now ( model SP-2101W only )</li>
  9745. <li>power_day ( model SP-2101W only )</li>
  9746. <li>power_week ( model SP-2101W only )</li>
  9747. <li>power_month ( model SP-2101W only )</li>
  9748. </ul>
  9749. </ul>
  9750. <a name="EGPM"></a>
  9751. <h3>EGPM Socket</h3>
  9752. <ul>
  9753. Defines a Socket from EGPM2LAN Module. If the global Module AUTOCREATE is enabled,
  9754. this device will be created automatically. For manual Setup, pls. see the description of <a href="#EGPM2LAN">EGPM2LAN</a>.
  9755. <br><br>
  9756. <a name="EGPMdefine"></a>
  9757. <b>Define</b>
  9758. <ul>
  9759. <code>define &lt;name&gt; EGPM &lt;device&gt; &lt;socket-nr&gt;</code>
  9760. <br>
  9761. </ul>
  9762. <br>
  9763. <a name="EGPMset"></a>
  9764. <b>Set</b>
  9765. <ul><code>set &lt;name&gt; &lt;[on|off|toggle]&gt;</code><br>
  9766. Switches the socket on or of.
  9767. </ul>
  9768. <ul><code>set &lt;name&gt; &lt;[on-for-timer|off-for-timer|on-till|off-till|blink|intervals]&gt;</code><br>
  9769. Switches the socket for a specified time+duration or n-times. For Details see <a href="#setExtensions">set extensions</a>
  9770. </ul><br>
  9771. Example:
  9772. <ul>
  9773. <code>define lamp1 EGPM mainswitch 1</code><br>
  9774. <code>set lamp1 on</code><br>
  9775. </ul>
  9776. <br>
  9777. <a name="EGPMget"></a>
  9778. <b>Get</b> <ul>N/A</ul><br>
  9779. <a name="EGPMattr"></a>
  9780. <b>Attributes</b>
  9781. <ul>
  9782. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  9783. </ul>
  9784. <br>
  9785. <a name="EGPM2LANevents"></a>
  9786. <b>Generated events</b>
  9787. <ul>
  9788. <li>EGPM &lt;name&gt; &lt;[on|off]&gt</li>
  9789. </ul>
  9790. </ul>
  9791. <a name="EGPM2LAN"></a>
  9792. <h3>EGPM2LAN</h3>
  9793. <ul>
  9794. <br>
  9795. <a name="EGPM2LANdefine"></a>
  9796. <b>Define</b>
  9797. <ul>
  9798. <code>define &lt;name&gt; EGPM2LAN &lt;IP-Address&gt;</code><br>
  9799. <br>
  9800. Creates a Gembird &reg; <a href="http://energenie.com/item.aspx?id=7557" >Energenie EG-PM2-LAN</a> device to switch up to 4 sockets over the network.
  9801. If you have more than one device, it is helpful to connect and set names for your sockets over the web-interface first.
  9802. The name settings will be adopted to FHEM and helps you to identify the sockets. Please make sure that you&acute;re logged off from the Energenie web-interface otherwise you can&acute;t control it with FHEM at the same time.<br>
  9803. Create a <a href="#EGPM">EGPM-Module</a> to control a single socket with additional features.<br>
  9804. <b>EG-PMS2-LAN with surge protector feature was not tested until now.</b>
  9805. </ul><br>
  9806. <a name="EGPM2LANset"></a>
  9807. <b>Set</b>
  9808. <ul>
  9809. <code>set &lt;name&gt; password [&lt;one-word&gt;]</code><br>
  9810. Encrypt and store device-password in FHEM. Leave empty to remove the password.<br>
  9811. Before 04/2017, the password was stored in clear-text using the DEFINE-Command, but it should not be stored in the config-file.<br>
  9812. <br>
  9813. <code>set &lt;name&gt; &lt;[on|off|toggle]&gt &lt;socketnr.&gt;</code><br>
  9814. Switch the socket on or off.<br>
  9815. <br>
  9816. <code>set &lt;name&gt; &lt;[on|off]&gt &lt;all&gt;</code><br>
  9817. Switch all available sockets on or off.<br>
  9818. <br>
  9819. <code>set &lt;name&gt; &lt;staterequest&gt;</code><br>
  9820. Update the device information and the state of all sockets.<br>
  9821. If <a href="#autocreate">autocreate</a> is enabled, an <a href="#EGPM">EGPM</a> device will be created for each socket.<br>
  9822. <br>
  9823. <code>set &lt;name&gt; &lt;clearreadings&gt;</code><br>
  9824. Removes all readings from the list to get rid of old socketnames.
  9825. </ul>
  9826. <br>
  9827. <a name="EGPM2LANget"></a>
  9828. <b>Get</b>
  9829. <ul><code>get &lt;name&gt; state</code><br>
  9830. Returns a text like this: "1: off 2: on 3: off 4: off" or the last error-message if something went wrong.<br>
  9831. </ul><br>
  9832. <a name="EGPM2LANattr"></a>
  9833. <b>Attributes</b>
  9834. <ul>
  9835. <li>stateDisplay</li>
  9836. Default: <b>socketNumer</b> changes between <b>socketNumer</b> and <b>socketName</b> in front of the current state. Call <b>set statusrequest</b> to update all states.
  9837. <li>autocreate</li>
  9838. Default: <b>on</b> <a href="#EGPM">EGPM</a>-devices will be created automatically with a <b>set</b>-command.
  9839. Change this attribute to value <b>off</b> to avoid that mechanism.
  9840. <li><a href="#loglevel">loglevel</a></li>
  9841. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  9842. </ul>
  9843. <br>
  9844. <br>
  9845. <br>
  9846. Example:
  9847. <ul>
  9848. <code>define mainswitch EGPM2LAN 10.192.192.20</code><br>
  9849. <code>set mainswitch password SecretGarden</code><br>
  9850. <code>set mainswitch on 1</code><br>
  9851. </ul>
  9852. </ul>
  9853. <a name="EIB"></a>
  9854. <h3>EIB / KNX</h3>
  9855. <div>
  9856. <p>EIB/KNX is a standard for building automation / home automation.
  9857. It is mainly based on a twisted pair wiring, but also other mediums (ip, wireless) are specified.</p>
  9858. <p>While the module <a href="#TUL">TUL</a> represents the connection to the EIB network,
  9859. the EIB modules represent individual EIB devices. This module provides a basic set of operations (on, off, on-till, etc.)
  9860. to switch on/off EIB devices. Sophisticated setups can be achieved by combining a number of
  9861. EIB module instances or by sending raw hex values to the network (set &lt;devname&gt; raw &lt;hexval&gt;).</p>
  9862. <p>EIB/KNX defines a series of Datapoint Type as standard data types used
  9863. to allow general interpretation of values of devices manufactured by different companies.
  9864. These datatypes are used to interpret the status of a device, so the state in FHEM will then
  9865. show the correct value.</p>
  9866. <p><a name="EIBdefine"></a> <b>Define</b></p>
  9867. <div>
  9868. <code>define &lt;name&gt; EIB &lt;main group&gt; [&lt;additional group&gt; ..]</code>
  9869. <p>Define an EIB device, connected via a <a href="#TUL">TUL</a>. The
  9870. &lt;group&gt; parameters are either a group name notation (0-15/0-15/0-255) or the hex representation of the value (0-f0-f0-ff).
  9871. The &lt;main group&gt; is used for sending of commands to the EIB network.</p>
  9872. <p>The state of the instance will be updated when a new state is received from the network for any of the given groups.
  9873. This is useful for example for toggle switches where a on command is send to one group and the real state (on or off) is
  9874. responded back on a second group.</p>
  9875. <p>For actors and sensors the <a href="#autocreate">autocreate</a> module may help.</p>
  9876. <p>Example:</p>
  9877. <pre>
  9878. define lamp1 EIB 0/10/12
  9879. define lamp1 EIB 0/10/12 0/0/5
  9880. define lamp1 EIB 0A0C
  9881. </pre>
  9882. </div>
  9883. <p><a name="EIBset"></a> <b>Set</b></p>
  9884. <div>
  9885. <code>set &lt;name&gt; &lt;value&gt; [&lt;time&gt; g&lt;groupnr&gt;]</code>
  9886. <p>where value one of:</p>
  9887. <li><b>on</b> switch on device</li>
  9888. <li><b>off</b> switch off device</li>
  9889. <li><b>on-for-timer</b> &lt;secs&gt; switch on the device for the given time. After the specified seconds a switch off command is sent.</li>
  9890. <li><b>on-till</b> &lt;time spec&gt; switches the device on. The device will be switched off at the given time.</li>
  9891. <li><b>raw</b> &lt;hexvalue&gt; sends the given value as raw data to the device.</li>
  9892. <li><b>value</b> &lt;decimal value&gt; transforms the value according to the chosen model and send the result to the device.</li>
  9893. <p>Example:</p>
  9894. <pre>
  9895. set lamp1 on
  9896. set lamp1 off
  9897. set lamp1 on-for-timer 10
  9898. set lamp1 on-till 13:15:00
  9899. set lamp1 raw 234578
  9900. set lamp1 value 23.44
  9901. </pre>
  9902. <p>When as last argument a g&lt;groupnr&gt; is present, the command will be sent
  9903. to the EIB group indexed by the groupnr (starting by 1, in the order as given in Define).</p>
  9904. <pre>
  9905. define lamp1 EIB 0/10/01 0/10/02
  9906. set lamp1 on g2 (will send "on" to 0/10/02)
  9907. </pre>
  9908. <p>A dimmer can be used with a slider as shown in following example:</p>
  9909. <pre>
  9910. define dim1 EIB 0/0/5
  9911. attr dim1 model percent
  9912. attr dim1 webCmd value
  9913. </pre>
  9914. <p>The current date and time can be sent to the bus by the following settings:</p>
  9915. <pre>
  9916. define timedev EIB 0/0/7
  9917. attr timedev model time
  9918. attr timedev eventMap /value now:now/
  9919. attr timedev webCmd now
  9920. define datedev EIB 0/0/8
  9921. attr datedev model date
  9922. attr datedev eventMap /value now:now/
  9923. attr datedev webCmd now
  9924. # send every midnight the new date
  9925. define dateset at *00:00:00 set datedev value now
  9926. # send every hour the current time
  9927. define timeset at +*01:00:00 set timedev value now
  9928. </pre>
  9929. </div>
  9930. <p><a name="EIBget"></a> <b>Get</b></p>
  9931. <div>
  9932. <p>If you execute get for a EIB/KNX-Element there will be requested a state from the device. The device has to be able to respond to a read - this is not given for all devices.<br>
  9933. The answer from the bus-device is not shown in the toolbox, but is treated like a regular telegram.</p>
  9934. </div>
  9935. <p><a name="EIBattr"></a> <b>Attributes</b></p>
  9936. <div>
  9937. <a href="#IODev">IODev</a><br>
  9938. <a href="#alias">alias</a><br>
  9939. <a href="#comment">comment</a><br>
  9940. <a href="#devStateIcon">devStateIcon</a><br>
  9941. <a href="#devStateStyle">devStateStyle</a><br>
  9942. <a href="#do_not_notify">do_not_notify</a><br>
  9943. <a href="#dummy">dummy</a><br>
  9944. <a href="#readingFnAttributes">readingFnAttributes</a><br>
  9945. <a href="#event-aggregator">event-aggregator</a><br>
  9946. <a href="#event-min-interval">event-min-interval</a><br>
  9947. <a href="#event-on-change-reading">event-on-change-reading</a><br>
  9948. <a href="#event-on-update-reading">event-on-update-reading</a><br>
  9949. <a href="#eventMap">eventMap</a><br>
  9950. <a href="#group">group</a><br>
  9951. <a href="#icon">icon</a><br>
  9952. <a href="#ignore">ignore</a><br>
  9953. <a href="#room">room</a><br>
  9954. <a href="#showtime">showtime</a><br>
  9955. <a href="#sortby">sortby</a><br>
  9956. <a href="#stateFormat">stateFormat</a><br>
  9957. <a href="#userReadings">userReadings</a><br>
  9958. <a href="#userattr">userattr</a><br>
  9959. <a href="#verbose">verbose</a><br>
  9960. <a href="#webCmd">webCmd</a><br>
  9961. <a href="#widgetOverride">widgetOverride</a><br>
  9962. <br>
  9963. <p><a name="EIBreadingX"></a> <b>EIBreadingX</b></p>
  9964. <div>
  9965. Enable additional readings for this EIB-device. With this Attribute set, a reading setG&lt;x&gt; will be updated when a set command is issued from FHEM, a reading getG&lt;x&gt; will be updated as soon a Value is received from EIB-Bus (&lt;x&gt; stands for the groupnr. - see define statement). The logic for the state reading remains unchanged. This is especially useful when the define statement contains more than one group parameter.
  9966. <p>If set to 1, the following additional readings will be available:</p>
  9967. <pre>
  9968. setGx will be updated on a SET command issued by FHEM. &lt;x&gt; stands for the groupnr. - see define statement
  9969. getGx will be updated on reception of a message from EIB-bus.
  9970. </pre>
  9971. <p>Example:</p>
  9972. <pre>
  9973. define myDimmer EIB 0/1/1 0/1/2
  9974. attr myDimmer EIBreadingX 1
  9975. attr myDimmer model dpt1 dpt5 # GA 0/1/1 will be interpreted as on/off, GA 0/1/2 will be handled as dpt5
  9976. attr myDimmer stateFormat getG2 % # copies actual dim-level (as received from dimmer) into STATE
  9977. </pre>
  9978. <p>If the EIBreadingX is set, you can specify multiple blank separated models to cope with multiple groups in the define statement. The setting cannot be done thru the pulldown-menu, you have to specify them with <code>attr &lt;device&gt; model &lt;dpt1&gt; &lt;dpt2&gt; &lt;dpt3&gt;</code></p>
  9979. </div>
  9980. <p><a name="EIBreadingSender"></a> <b>EIBreadingSender</b></p>
  9981. <div>
  9982. Enable an additional reading for this EIB-device. With this Attribute set, a reading sender will be updated any time a new telegram arrives.
  9983. <p>If set to 1, the following additional reading will be available: <pre>sender</pre></p>
  9984. <pre>
  9985. sender will be updated any time a new telegram arrives at this group-adress
  9986. </pre>
  9987. <p>Example:</p>
  9988. <pre>
  9989. define myDimmer EIB 0/1/1
  9990. attr myDimmer EIBreadingSender 1
  9991. </pre>
  9992. </div>
  9993. <p><a name="EIBanswerReading"></a> <b>EIBanswerReading</b></p>
  9994. <div>
  9995. If enabled, FHEM answers on read requests. The content of state is send to the bus as answer.
  9996. <p>If set to 1, read-requests are answered</p>
  9997. <p>Example:</p>
  9998. <pre>
  9999. define myValue EIB 0/1/1
  10000. attr myValue EIBanswerReading 1
  10001. </pre>
  10002. </div>
  10003. <p><a name="EIBreadingRegex"></a> <b>EIBreadingRegex</b></p>
  10004. <div>
  10005. You can pass n pairs of regex-pattern and string to replace, seperated by a slash. Internally the "new" state is always in the format getG[n]:[state]. The substitution is done every time, a new object is received. You can use this function for converting, adding units, having more fun with icons, ...
  10006. This function has only an impact on the content of state - no other functions are disturbed.
  10007. <p>Example:</p>
  10008. <pre>
  10009. define myLamp EIB 0/1/1 0/1/2 0/1/2
  10010. attr myLamp EIBreadingRegex getG[1]:/steuern: getG[2]:/status: getG[3]:/sperre:
  10011. attr myLamp EIBreadingRegex devStateIcon status.on:general_an status.off:general_aus sperre.on:lock
  10012. </pre>
  10013. </div>
  10014. <p><a name="EIBwritingRegex"></a> <b>EIBwritingRegex</b></p>
  10015. You can pass n pairs of regex-pattern and string to replace, seperated by a slash. Internally the "new" state is always in the format setG1:[state]. The substitution is done every time, after an object is send. You can use this function for converting, adding units, having more fun with icons, ...
  10016. This function has only an impact on the content of state - no other functions are disturbed.
  10017. <p>Example:</p>
  10018. <pre>
  10019. define myLockObject EIB 0/1/1
  10020. attr myLamp EIBwritingRegex setG1:on/LOCKED setG1:/UNLOCKED
  10021. </pre>
  10022. </div>
  10023. <p><a name="model"></a> <b>model</b></p>
  10024. <div>
  10025. <p>This attribute is mandatory!</p>
  10026. Set the model according to the datapoint types defined by the (<a href="http://www.sti.uniurb.it/romanell/110504-Lez10a-KNX-Datapoint%20Types%20v1.5.00%20AS.pdf" target="_blank">EIB / KNX specifications</a>). The device state in FHEM is interpreted and shown according to the specification.<br>
  10027. <br>
  10028. <U>dpt1</U> - 1 bit<br>
  10029. Will be interpreted as on/off, 1=on 0=off and vice versa<br>
  10030. <br>
  10031. <U>dpt3</U> - Discrete Dim-Message<br>
  10032. Usage: set value to +/-0..100. -54 means dim down by 50%<br>
  10033. <br>
  10034. <U>dpt5</U> - 1 byte unsigned<br>
  10035. dpt5.003 - angle in degrees<br>
  10036. angle - same as dpt5.003<br>
  10037. dpt5.004 - percent<br>
  10038. percent - same as above<br>
  10039. percent255 - scaled percentage: 255=100%<br>
  10040. <br>
  10041. <U>dpt6</U> - 1 byte signed <br>
  10042. dpt6.001 - percent<br>
  10043. dpt6.010<br>
  10044. <br>
  10045. <U>dpt7</U> - 2 byte unsigned<br>
  10046. length - mm<br>
  10047. current - mA<br>
  10048. brightness<br>
  10049. timeperiod - ms<br>
  10050. timeperiod - min<br>
  10051. timeperiod - h<br>
  10052. <br>
  10053. <U>dpt9</U> - 2 byte float<br>
  10054. tempsensor<br>
  10055. lightsensor<br>
  10056. speedsensor<br>
  10057. speedsensor-km/h<br>
  10058. pressuresensor<br>
  10059. rainsensor<br>
  10060. time1sensor<br>
  10061. time2sensor<br>
  10062. humiditysensor<br>
  10063. airqualitysensor<br>
  10064. voltage-mV<br>
  10065. current-mA2<br>
  10066. current-mA2<br>
  10067. power<br>
  10068. powerdensity<br>
  10069. <br>
  10070. <U>dpt10</U> - time hh:mm:ss<br>
  10071. dpt10_ns - same as DPT10, seconds always 0<br>
  10072. time - receiving has no effect, sending any value contains actual system time. For examle use set timedev value now<br>
  10073. <br>
  10074. <U>dpt11</U> - date dd.mm.yyyy<br>
  10075. date - receiving has no effect, sending any value contains actual system date. For examle use set timedev value now<br>
  10076. <br>
  10077. <U>dpt12</U> - 4 byte unsigned<br>
  10078. <br>
  10079. <U>dpt13</U> - 4 byte signed<br>
  10080. <br>
  10081. <U>dpt14</U> - 4 byte float<br>
  10082. <br>
  10083. <U>dpt16</U> - text, use with "string": set textdev string Hallo Welt<br>
  10084. </div>
  10085. </div>
  10086. <a name="EM"></a>
  10087. <h3>EM</h3>
  10088. <ul>
  10089. <a name="EMdefine"></a>
  10090. <b>Define</b>
  10091. <ul>
  10092. <code>define &lt;name&gt; EM &lt;em1010pc-device&gt;</code>
  10093. <br><br>
  10094. Define a EM1010PC USB device. As the EM1010PC was not designed to be used
  10095. with a PC attached to it all the time, it won't transmit received signals
  10096. automatically, fhem has to poll it every 5 minutes.<br>
  10097. Currently there is no way to read the internal log of the EM1010PC with
  10098. fhem, use the program em1010.pl in the contrib directory for this
  10099. purpose.<br><br>
  10100. Examples:
  10101. <ul>
  10102. <code>define em EM /dev/elv_em1010pc</code><br>
  10103. </ul>
  10104. </ul>
  10105. <br>
  10106. <a name="EMset"></a>
  10107. <b>Set</b>
  10108. <ul>
  10109. <code>set EM &lt;value&gt;</code>
  10110. <br><br>
  10111. where <code>value</code> is either time or reset.<br>
  10112. If time has arguments of the form YYYY-MM-DD HH:MM:SS, then the specified
  10113. time will be set, else the time from the host.<br>
  10114. Note: after reset you should set the time.
  10115. </ul>
  10116. <br>
  10117. <a name="EMget"></a>
  10118. <b>Get</b>
  10119. <ul>
  10120. <code>get EM &lt;value&gt;</code>
  10121. <br><br>
  10122. where <code>value</code> is either version or time.
  10123. </ul>
  10124. <a name="EMattr"></a>
  10125. <b>Attributes</b>
  10126. <ul>
  10127. <li><a href="#model">model</a> (em1010pc)</li>
  10128. <li><a href="#attrdummy">dummy</a></li>
  10129. </ul>
  10130. <br>
  10131. </ul>
  10132. <a name="EMEM"></a>
  10133. <h3>EMEM</h3>
  10134. <ul>
  10135. <br>
  10136. <a name="EMEMdefine"></a>
  10137. <b>Define</b>
  10138. <ul>
  10139. <code>define &lt;name&gt; EMEM &lt;device-number&gt;</code>
  10140. <br><br>
  10141. Define up to 4 EM1000EM attached to the EM1010PC. The device number must
  10142. be between 5 and 8.
  10143. Defining an EMEM will schedule an internal task, which reads the
  10144. status of the device every 5 minutes, and triggers notify/filelog commands.
  10145. <br>Note: Currently this device does not support a "set" function.
  10146. <br><br>
  10147. Example:
  10148. <ul>
  10149. <code>define emem EMEM 5</code><br>
  10150. </ul>
  10151. </ul>
  10152. <br>
  10153. <b>Set</b> <ul>N/A</ul><br>
  10154. <a name="EMEMget"></a>
  10155. <b>Get</b>
  10156. <ul>
  10157. <code>get EMEM status</code>
  10158. <br><br>
  10159. This is the same command which is scheduled every 5 minutes internally.
  10160. </ul>
  10161. <br>
  10162. <a name="EMEMattr"></a>
  10163. <b>Attributes</b>
  10164. <ul>
  10165. <li><a href="#model">model</a> (EM1000EM)</li>
  10166. <li><a href="#attrdummy">dummy</a></li>
  10167. <li><a href="#IODev">IODev</a></li><br>
  10168. </ul>
  10169. <br>
  10170. </ul>
  10171. <a name="EMGZ"></a>
  10172. <h3>EMGZ</h3>
  10173. <ul>
  10174. <a name="EMGZdefine"></a>
  10175. <b>Define</b>
  10176. <ul>
  10177. <code>define &lt;name&gt; EMGZ &lt;device-number&gt;</code>
  10178. <br><br>
  10179. Define up to 4 EM1000GZ attached to the EM1010PC. The device number must
  10180. be between 9 and 12.
  10181. Defining an EMGZ will schedule an internal task, which reads the
  10182. status of the device every 5 minutes, and triggers notify/filelog commands.
  10183. <br><br>
  10184. Example:
  10185. <ul>
  10186. <code>define emgz EMGZ 9</code><br>
  10187. </ul>
  10188. </ul>
  10189. <a name="EMGZset"></a>
  10190. <b>Set</b>
  10191. <ul>
  10192. <code>set EMGZdevice &lt;param&gt; &lt;value&gt;</code><br><br>
  10193. where param is:
  10194. <ul>
  10195. <li>price<br>
  10196. The price of one KW in EURO (use e.g. 0.20 for 20 Cents). It is used
  10197. only on the EM1010PC display, it is of no interest for FHEM.</li>
  10198. </ul>
  10199. </ul>
  10200. <br>
  10201. <a name="EMGZget"></a>
  10202. <b>Get</b>
  10203. <ul>
  10204. <code>get EMGZ status</code>
  10205. <br><br>
  10206. This is the same command which is scheduled every 5 minutes internally.
  10207. </ul>
  10208. <br>
  10209. <a name="EMGZattr"></a>
  10210. <b>Attributes</b>
  10211. <ul>
  10212. <li><a href="#model">model</a> (EM1000GZ)</li>
  10213. <li><a href="#attrdummy">dummy</a></li>
  10214. <li><a href="#IODev">IODev</a></li><br>
  10215. </ul>
  10216. <br>
  10217. </ul>
  10218. <a name="EMT7110"></a>
  10219. <h3>EMT7110</h3>
  10220. <ul>
  10221. The EMT7110 is a plug with integrated power meter functionality.<br>
  10222. It can be integrated into FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
  10223. The EMT7110 sends with 9.579 kbit/s. Therefore it is necessary to set the JeeLink to a mode where it recieves this data rate.<br>
  10224. This can be done using the initCommands attribute of the JeeLink.<br><br>
  10225. If you have only 9.579 kbit/s sensors use this setting:<br>
  10226. <code>attr myJeeLink initCommands 1r v</code><br><br>
  10227. If you have also 17.241 kbit/s sensors (like TX29...) use this setting:<br>
  10228. <code>attr myJeeLink initCommands 30t v</code><br>
  10229. 30t means that the JeeLink toggles the data rate every 30 Seconds.<br>
  10230. <br><a name="EMT7110_Define"></a>
  10231. <b>Define</b>
  10232. <code>define &lt;name&gt; EMT7110 &lt;addr&gt;</code> <br>
  10233. addr is a 4 digit hex number to identify the EMT7110 device.<br>
  10234. To enable autocreate for a certain time you must set LaCrossePairForSec in the <a href="#JeeLink">JeeLink</a> IODevice device.<br>
  10235. <br>
  10236. <a name="EMT7110_Set"></a>
  10237. <b>Set</b>
  10238. <ul>
  10239. <li>
  10240. resetAccumulatedPower<br>
  10241. Sets the accumulatedPowerOffset attribute to the current value of accumulatedPowerMeasured.
  10242. Don't forget to call save to write the new value to fhem.cfg
  10243. </li>
  10244. </ul><br>
  10245. <a name="EMT7110_Get"></a>
  10246. <b>Get</b>
  10247. <ul>
  10248. </ul><br>
  10249. <a name="EMT7110_Readings"></a>
  10250. <b>Readings</b>
  10251. <ul>
  10252. <li>accumulatedPowerMeasured<br>
  10253. The accumulated power sent by the EMT7110. The EMT7110 accumulates the power even if it was removed and reconnected to the power outlet.
  10254. The only way to reset it is to remove and reinsert the batteries in the EMT7110.
  10255. </li><br>
  10256. <li>accumulatedPower<br>
  10257. Is accumulatedPowerMeasured minus the value of the accumulatedPowerOffset attribute value
  10258. This reading is used for the A: part of state
  10259. </li><br>
  10260. <li>costs<br>
  10261. Is accumulatedPower * pricePerKWH attribute value
  10262. </li><br>
  10263. <li>current<br>
  10264. The measured current in mA
  10265. </li><br>
  10266. <li>power<br>
  10267. The measured power in Watt
  10268. </li><br>
  10269. <li>voltage<br>
  10270. The measured voltage in Volt
  10271. </li><br>
  10272. </ul>
  10273. <a name="EMT7110_Attr"></a>
  10274. <b>Attributes</b>
  10275. <ul>
  10276. <li>accumulatedPowerOffset<br>
  10277. See accumulatedPower reading
  10278. </li><br>
  10279. <li>pricePerKWH<br>
  10280. See costs reading
  10281. </li><br>
  10282. </ul><br>
  10283. </ul>
  10284. <a name="EMWZ"></a>
  10285. <h3>EMWZ</h3>
  10286. <ul>
  10287. <a name="EMWZdefine"></a>
  10288. <b>Define</b>
  10289. <ul>
  10290. <code>define &lt;name&gt; EMWZ &lt;device-number&gt;</code>
  10291. <br><br>
  10292. Define up to 4 EM1000WZ attached to the EM1010PC. The device number must
  10293. be between 1 and 4. Defining an EMWZ will schedule an internal task, which
  10294. reads the status of the device every 5 minutes, and triggers notify/filelog
  10295. commands. <br><br>
  10296. Example:
  10297. <ul>
  10298. <code>define emwz EMWZ 1</code><br>
  10299. </ul>
  10300. </ul>
  10301. <br>
  10302. <a name="EMWZset"></a>
  10303. <b>Set</b>
  10304. <ul>
  10305. <code>set EMWZdevice &lt;param&gt; &lt;value&gt;</code><br><br>
  10306. where param is one of:
  10307. <ul>
  10308. <li>rperkw<br>
  10309. Number of rotations for a KiloWatt of the EM1000WZ device (actually
  10310. of the device where the EM1000WZ is attached to). Without setting
  10311. this correctly, all other readings will be incorrect.</li>
  10312. <li>alarm<br>
  10313. Alarm in WATT. if you forget to set it, the default value is
  10314. rediculously low (random), and if a value above this threshold is
  10315. received, the EM1010PC will start beeping once every minute. It can
  10316. be very annoying.</li>
  10317. <li>price<br>
  10318. The price of one KW in EURO (use e.g. 0.20 for 20 Cents). It is used
  10319. only on the EM1010PC display, it is of no interest for FHEM.</li>
  10320. </ul>
  10321. </ul>
  10322. <br>
  10323. <a name="EMWZget"></a>
  10324. <b>Get</b>
  10325. <ul>
  10326. <code>get EMWZ status</code>
  10327. <br><br>
  10328. This is the same command which is scheduled every 5 minutes internally.
  10329. </ul>
  10330. <br>
  10331. <a name="EMWZattr"></a>
  10332. <b>Attributes</b>
  10333. <ul>
  10334. <li><a href="#model">model</a> (EM1000WZ)</li>
  10335. <li><a href="#attrdummy">dummy</a></li>
  10336. <li><a href="#IODev">IODev</a></li><br>
  10337. </ul>
  10338. <br>
  10339. </ul>
  10340. <a name="ENECSYSGW"></a>
  10341. <h3>ENECSYSGW</h3>
  10342. <ul>
  10343. Module to access the ENECSYS gateway (http://www.ENECSYS.com/products/gateway/).<br /><br />
  10344. The actual micro-inverter devices are defined as <a href="#ENECSYSINV">ENECSYSINV</a> devices.
  10345. <br /><br />
  10346. All newly found inverter devices are autocreated and added to the room ENECSYSINV.
  10347. <br /><br />
  10348. <a name="ENECSYSGW_Define"></a>
  10349. <b>Define</b>
  10350. <ul>
  10351. <code>define &lt;name&gt; ENECSYSGW [&lt;host&gt;] [&lt;interval&gt;]</code><br />
  10352. <br />
  10353. Defines an ENECSYSGW device with address &lt;host&gt;.<br /><br />
  10354. The gateway will be polled every &lt;interval&gt; seconds. The default is 10 and minimum is 5.<br /><br />
  10355. Examples:
  10356. <ul>
  10357. <code>define gateway ENECSYSGW 10.0.1.1</code><br />
  10358. </ul>
  10359. </ul><br />
  10360. </ul><br />
  10361. <a name="ENECSYSINV"></a>
  10362. <h3>ENECSYSINV</h3>
  10363. <ul>
  10364. <br />
  10365. <a name="ENECSYSINV_Define"></a>
  10366. <b>Define</b>
  10367. <ul>
  10368. <code>define &lt;name&gt; ENECSYSINV &lt;id&gt; [&lt;interval&gt;]</code><br />
  10369. <br />
  10370. Defines an micro-inverter device connected to an <a href="#ENECSYSGW">ENECSYSGW</a>.<br /><br />
  10371. Examples:
  10372. <ul>
  10373. <code>define SolarPanel1 ENECSYSINV 100123456</code><br />
  10374. </ul>
  10375. </ul><br />
  10376. <a name="ENECSYSINV_Readings"></a>
  10377. <b>Readings</b>
  10378. <ul>
  10379. <li>acfrequency<br />
  10380. the alternating current frequency reported from the device. Should be around 50 Hz in Europe.</li>
  10381. <li>acpower<br />
  10382. the alternating current power</li>
  10383. <li>acvolt<br />
  10384. the alternating current voltage</li>
  10385. <li>dccurrent<br />
  10386. the direct current</li>
  10387. <li>dcpower<br />
  10388. the direct current power</li>
  10389. <li>dcvolt<br />
  10390. the direct current voltage</li>
  10391. <li>efficiency<br />
  10392. the efficiency of the inverter</li>
  10393. <li>lifetime<br />
  10394. the sum of collected energy of the inverter</li>
  10395. <li>temperature<br />
  10396. the temperature of the inverter</li>
  10397. <li>state<br />
  10398. the current state (equal to dcpower) </li>
  10399. </ul><br />
  10400. </ul><br />
  10401. <p>
  10402. <a name="ENIGMA2" id="ENIGMA2"></a>
  10403. </p>
  10404. <h3>
  10405. ENIGMA2
  10406. </h3>
  10407. <ul>
  10408. <a name="ENIGMA2define" id="ENIGMA2define"></a> <b>Define</b>
  10409. <ul>
  10410. <code>define &lt;name&gt; ENIGMA2 &lt;ip-address-or-hostname&gt; [[[[&lt;port&gt;] [&lt;poll-interval&gt;]] [&lt;http-user&gt;]] [&lt;http-password&gt;]]</code><br>
  10411. <br>
  10412. This module controls ENIGMA2 based devices like Dreambox or VUplus receiver via network connection.<br>
  10413. <br>
  10414. Defining an ENIGMA2 device will schedule an internal task (interval can be set with optional parameter &lt;poll-interval&gt; in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
  10415. <br>
  10416. Example:<br>
  10417. <ul>
  10418. <code>define SATReceiver ENIGMA2 192.168.0.10<br>
  10419. <br>
  10420. # With custom port<br>
  10421. define SATReceiver ENIGMA2 192.168.0.10 8080<br>
  10422. <br>
  10423. # With custom interval of 20 seconds<br>
  10424. define SATReceiver ENIGMA2 192.168.0.10 80 20<br>
  10425. <br>
  10426. # With HTTP user credentials<br>
  10427. define SATReceiver ENIGMA2 192.168.0.10 80 20 root secret</code>
  10428. </ul>
  10429. </ul><br>
  10430. <br>
  10431. <a name="ENIGMA2set" id="ENIGMA2set"></a> <b>Set</b>
  10432. <ul>
  10433. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  10434. <br>
  10435. Currently, the following commands are defined.<br>
  10436. <ul>
  10437. <li>
  10438. <b>on</b> &nbsp;&nbsp;-&nbsp;&nbsp; powers on the device and send a WoL magic package if needed
  10439. </li>
  10440. <li>
  10441. <b>off</b> &nbsp;&nbsp;-&nbsp;&nbsp; turns the device in standby mode
  10442. </li>
  10443. <li>
  10444. <b>toggle</b> &nbsp;&nbsp;-&nbsp;&nbsp; switch between on and off
  10445. </li>
  10446. <li>
  10447. <b>shutdown</b> &nbsp;&nbsp;-&nbsp;&nbsp; turns the device in deepstandby mode
  10448. </li>
  10449. <li>
  10450. <b>reboot</b> &nbsp;&nbsp;-&nbsp;&nbsp;reboots the device
  10451. </li>
  10452. <li>
  10453. <b>restartGui</b> &nbsp;&nbsp;-&nbsp;&nbsp;restarts the GUI / ENIGMA2 process
  10454. </li>
  10455. <li>
  10456. <b>channel</b> channel,0...999,sRef &nbsp;&nbsp;-&nbsp;&nbsp; zap to specific channel or service reference
  10457. </li>
  10458. <li>
  10459. <b>channelUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; zap to next channel
  10460. </li>
  10461. <li>
  10462. <b>channelDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; zap to previous channel
  10463. </li>
  10464. <li>
  10465. <b>volume</b> 0...100 &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in percentage
  10466. </li>
  10467. <li>
  10468. <b>volumeUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; increases the volume level
  10469. </li>
  10470. <li>
  10471. <b>volumeDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; decreases the volume level
  10472. </li>
  10473. <li>
  10474. <b>mute</b> on,off,toggle &nbsp;&nbsp;-&nbsp;&nbsp; controls volume mute
  10475. </li>
  10476. <li>
  10477. <b>play</b> &nbsp;&nbsp;-&nbsp;&nbsp; starts/resumes playback
  10478. </li>
  10479. <li>
  10480. <b>pause</b> &nbsp;&nbsp;-&nbsp;&nbsp; pauses current playback or enables timeshift
  10481. </li>
  10482. <li>
  10483. <b>stop</b> &nbsp;&nbsp;-&nbsp;&nbsp; stops current playback
  10484. </li>
  10485. <li>
  10486. <b>record</b> &nbsp;&nbsp;-&nbsp;&nbsp; starts recording of current channel
  10487. </li>
  10488. <li>
  10489. <b>input</b> tv,radio &nbsp;&nbsp;-&nbsp;&nbsp; switches between tv and radio mode
  10490. </li>
  10491. <li>
  10492. <b>statusRequest</b> &nbsp;&nbsp;-&nbsp;&nbsp; requests the current status of the device
  10493. </li>
  10494. <li>
  10495. <b>remoteControl</b> UP,DOWN,... &nbsp;&nbsp;-&nbsp;&nbsp; sends remote control commands; see remoteControl help for full command list<br />
  10496. Note: You may add the word "long" after the command to simulate a long key press.
  10497. </li>
  10498. <li>
  10499. <b>showText</b> text &nbsp;&nbsp;-&nbsp;&nbsp; sends info message to screen to be displayed for 8 seconds
  10500. </li>
  10501. <li>
  10502. <b>msg</b> yesno,info... &nbsp;&nbsp;-&nbsp;&nbsp; allows more complex messages as showText, see commands as listed below
  10503. </li>
  10504. </ul>
  10505. <ul>
  10506. <u>Note:</u> If you would like to restrict access to admin set-commands (-> statusRequest, reboot, restartGui, shutdown) you may set your FHEMWEB instance's attribute allowedCommands like 'set,set-user'.
  10507. The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
  10508. </ul>
  10509. </ul><br>
  10510. <br>
  10511. <ul>
  10512. <u>Messaging</u><br>
  10513. <br>
  10514. <ul>
  10515. showText has predefined settings. If you would like to send more individual messages to your TV screen, the function msg can be used. For this application the following commands are available:<br>
  10516. <br>
  10517. <u>Type Selection:</u><br>
  10518. <ul>
  10519. <code>msg yesno<br>
  10520. msg info<br>
  10521. msg message<br>
  10522. msg attention<br></code>
  10523. </ul><br>
  10524. <br>
  10525. The following parameter are essentially needed after type specification:
  10526. <ul>
  10527. <code>msg &lt;TYPE&gt; &lt;TIMEOUT&gt; &lt;YOUR MESSAGETEXT&gt;<br></code>
  10528. </ul>
  10529. </ul>
  10530. </ul><br>
  10531. <br>
  10532. <a name="ENIGMA2get" id="ENIGMA2get"></a> <b>Get</b>
  10533. <ul>
  10534. <code>get &lt;name&gt; &lt;what&gt;</code><br>
  10535. <br>
  10536. Currently, the following commands are defined:<br>
  10537. <br>
  10538. <ul>
  10539. <code>channel<br>
  10540. currentMedia<br>
  10541. currentTitle<br>
  10542. mute<br>
  10543. nextTitle<br>
  10544. power<br>
  10545. providername<br>
  10546. servicevideosize<br>
  10547. input<br>
  10548. streamUrl<br>
  10549. volume<br></code>
  10550. </ul>
  10551. </ul><br>
  10552. <br>
  10553. <a name="ENIGMA2attr" id="ENIGMA2attr"></a> <b>Attributes</b><br>
  10554. <ul>
  10555. <ul>
  10556. <li>
  10557. <b>bouquet-tv</b> - service reference address where the favorite television bouquet can be found (initially set automatically during define)
  10558. </li>
  10559. <li>
  10560. <b>bouquet-radio</b> - service reference address where the favorite radio bouquet can be found (initially set automatically during define)
  10561. </li>
  10562. <li>
  10563. <b>disable</b> - Disable polling (true/false)
  10564. </li>
  10565. <li>
  10566. <b>http-method</b> - HTTP access method to be used; e.g. a FritzBox might need to use POST instead of GET (GET/POST)
  10567. </li>
  10568. <li>
  10569. <b>http-noshutdown</b> - Set FHEM-internal HttpUtils connection close behaviour (defaults=1)
  10570. </li>
  10571. <li>
  10572. <b>https</b> - Access box via secure HTTP (true/false)
  10573. </li>
  10574. <li>
  10575. <b>ignoreState</b> - Do not check for available device before sending commands to it (true/false)
  10576. </li>
  10577. <li>
  10578. <b>lightMode</b> - reduces regular queries (resulting in less functionality), e.g. for low performance devices. (true/false)
  10579. </li>
  10580. <li>
  10581. <b>macaddr</b> - manually set specific MAC address for device; overwrites value from reading "lanmac". (true/false)
  10582. </li>
  10583. <li>
  10584. <b>remotecontrol</b> - Explicitly set specific remote control unit format. This will only be considered for set-command <strong>remoteControl</strong> as of now.
  10585. </li>
  10586. <li>
  10587. <b>timeout</b> - Set different polling timeout in seconds (default=6)
  10588. </li>
  10589. <li>
  10590. <b>wakeupCmd</b> - Set a command to be executed when turning on an absent device. Can be an FHEM command or Perl command in {}. Available variables: ENIGMA2 device name -> $DEVICE, ENIGMA2 device MAC address -> $MACADDR (default=Wake-on-LAN)
  10591. </li>
  10592. </ul>
  10593. </ul><br>
  10594. <br>
  10595. <br>
  10596. <b>Generated Readings/Events:</b><br>
  10597. <ul>
  10598. <ul>
  10599. <li>
  10600. <b>acg</b> - Shows Automatic Gain Control value in percent; reflects overall signal quality strength
  10601. </li>
  10602. <li>
  10603. <b>apid</b> - Shows the audio process ID for current channel
  10604. </li>
  10605. <li>
  10606. <b>ber</b> - Shows Bit Error Rate for current channel
  10607. </li>
  10608. <li>
  10609. <b>channel</b> - Shows the service name of current channel or media file name; part of FHEM-4-AV-Devices compatibility
  10610. </li>
  10611. <li>
  10612. <b>currentMedia</b> - The service reference ID of current channel; part of FHEM-4-AV-Devices compatibility
  10613. </li>
  10614. <li>
  10615. <b>currentTitle</b> - Shows the title of the running event; part of FHEM-4-AV-Devices compatibility
  10616. </li>
  10617. <li>
  10618. <b>enigmaversion</b> - Shows the installed version of ENIGMA2
  10619. </li>
  10620. <li>
  10621. <b>eventcurrenttime</b> - Shows the current time of running event as UNIX timestamp
  10622. </li>
  10623. <li>
  10624. <b>eventcurrenttime_hr</b> - Shows the current time of running event in human-readable format
  10625. </li>
  10626. <li>
  10627. <b>eventcurrenttime_next</b> - Shows the current time of next event as UNIX timestamp
  10628. </li>
  10629. <li>
  10630. <b>eventcurrenttime_next_hr</b> - Shows the current time of next event in human-readable format
  10631. </li>
  10632. <li>
  10633. <b>eventdescription</b> - Shows the description of running event
  10634. </li>
  10635. <li>
  10636. <b>eventdescriptionextended</b> - Shows the extended description of running event
  10637. </li>
  10638. <li>
  10639. <b>eventdescriptionextended_next</b> - Shows the extended description of next event
  10640. </li>
  10641. <li>
  10642. <b>eventdescription_next</b> - Shows the description of next event
  10643. </li>
  10644. <li>
  10645. <b>evenduration</b> - Shows the total duration time of running event in seconds
  10646. </li>
  10647. <li>
  10648. <b>evenduration_hr</b> - Shows the total duration time of running event in human-readable format
  10649. </li>
  10650. <li>
  10651. <b>evenduration_next</b> - Shows the total duration time of next event in seconds
  10652. </li>
  10653. <li>
  10654. <b>evenduration_next_hr</b> - Shows the total duration time of next event in human-readable format
  10655. </li>
  10656. <li>
  10657. <b>eventname</b> - Shows the name of running event
  10658. </li>
  10659. <li>
  10660. <b>eventname_next</b> - Shows the name of next event
  10661. </li>
  10662. <li>
  10663. <b>eventremaining</b> - Shows the remaining duration time of running event in seconds
  10664. </li>
  10665. <li>
  10666. <b>eventremaining_hr</b> - Shows the remaining duration time of running event in human-readable format
  10667. </li>
  10668. <li>
  10669. <b>eventremaining_next</b> - Shows the remaining duration time of next event in seconds
  10670. </li>
  10671. <li>
  10672. <b>eventremaining_next_hr</b> - Shows the remaining duration time of next event in human-readable format
  10673. </li>
  10674. <li>
  10675. <b>eventstart</b> - Shows the starting time of running event as UNIX timestamp
  10676. </li>
  10677. <li>
  10678. <b>eventstart_hr</b> - Shows the starting time of running event in human readable format
  10679. </li>
  10680. <li>
  10681. <b>eventstart_next</b> - Shows the starting time of next event as UNIX timestamp
  10682. </li>
  10683. <li>
  10684. <b>eventstart_next_hr</b> - Shows the starting time of next event in human readable format
  10685. </li>
  10686. <li>
  10687. <b>eventtitle</b> - Shows the title of the running event
  10688. </li>
  10689. <li>
  10690. <b>eventtitle_next</b> - Shows the title of the next event
  10691. </li>
  10692. <li>
  10693. <b>fpversion</b> - Shows the firmware version for the front processor
  10694. </li>
  10695. <li>
  10696. <b>hddX_capacity</b> - Shows the total capacity of the installed hard drive in GB
  10697. </li>
  10698. <li>
  10699. <b>hddX_free</b> - Shows the free capacity of the installed hard drive in GB
  10700. </li>
  10701. <li>
  10702. <b>hddX_model</b> - Shows hardware details for the installed hard drive
  10703. </li>
  10704. <li>
  10705. <b>imageversion</b> - Shows the version for the installed software image
  10706. </li>
  10707. <li>
  10708. <b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
  10709. </li>
  10710. <li>
  10711. <b>iswidescreen</b> - Indicates widescreen format - 0=off 1=on
  10712. </li>
  10713. <li>
  10714. <b>lanmac</b> - Shows the device MAC address
  10715. </li>
  10716. <li>
  10717. <b>model</b> - Shows details about the device hardware
  10718. </li>
  10719. <li>
  10720. <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
  10721. </li>
  10722. <li>
  10723. <b>nextTitle</b> - Shows the title of the next event; part of FHEM-4-AV-Devices compatibility
  10724. </li>
  10725. <li>
  10726. <b>onid</b> - The ON ID
  10727. </li>
  10728. <li>
  10729. <b>pcrpid</b> - The PCR process ID
  10730. </li>
  10731. <li>
  10732. <b>pmtpid</b> - The PMT process ID
  10733. </li>
  10734. <li>
  10735. <b>power</b> - Reports the power status of the device (can be "on" or "off")
  10736. </li>
  10737. <li>
  10738. <b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present"). In case of an absent device, control is basically limited to turn it on again. This will only work if the device supports Wake-On-LAN packages, otherwise command "on" will have no effect.
  10739. </li>
  10740. <li>
  10741. <b>providername</b> - Service provider of current channel
  10742. </li>
  10743. <li>
  10744. <b>recordings</b> - Number of active recordings
  10745. </li>
  10746. <li>
  10747. <b>recordingsX_name</b> - name of active recording no. X
  10748. </li>
  10749. <li>
  10750. <b>recordingsX_servicename</b> - servicename of active recording no. X
  10751. </li>
  10752. <li>
  10753. <b>recordings_next</b> - Shows the time of next recording as UNIX timestamp
  10754. </li>
  10755. <li>
  10756. <b>recordings_next_hr</b> - Shows the time of next recording as human-readable format
  10757. </li>
  10758. <li>
  10759. <b>recordings_next_counter</b> - Shows the time until next recording starts in seconds
  10760. </li>
  10761. <li>
  10762. <b>recordings_next_counter_hr</b> - Shows the time until next recording starts human-readable format
  10763. </li>
  10764. <li>
  10765. <b>recordings_next_name</b> - name of next recording
  10766. </li>
  10767. <li>
  10768. <b>recordings_next_servicename</b> - servicename of next recording
  10769. </li>
  10770. <li>
  10771. <b>recordings_error</b> - counter for failed recordings in timerlist
  10772. </li>
  10773. <li>
  10774. <b>recordings_finished</b> - counter for finished recordings in timerlist
  10775. </li>
  10776. <li>
  10777. <b>servicename</b> - Name for current channel
  10778. </li>
  10779. <li>
  10780. <b>servicereference</b> - The service reference ID of current channel
  10781. </li>
  10782. <li>
  10783. <b>servicevideosize</b> - Video resolution for current channel
  10784. </li>
  10785. <li>
  10786. <b>sid</b> - The S-ID
  10787. </li>
  10788. <li>
  10789. <b>snr</b> - Shows Signal to Noise for current channel in percent
  10790. </li>
  10791. <li>
  10792. <b>snrdb</b> - Shows Signal to Noise in dB
  10793. </li>
  10794. <li>
  10795. <b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "absent")
  10796. </li>
  10797. <li>
  10798. <b>tsid</b> - The TS ID
  10799. </li>
  10800. <li>
  10801. <b>tuner_X</b> - Details about the used tuner hardware
  10802. </li>
  10803. <li>
  10804. <b>txtpid</b> - The TXT process ID
  10805. </li>
  10806. <li>
  10807. <b>videoheight</b> - Height of the video resolution for current channel
  10808. </li>
  10809. <li>
  10810. <b>videowidth</b> - Width of the video resolution for current channel
  10811. </li>
  10812. <li>
  10813. <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
  10814. </li>
  10815. <li>
  10816. <b>vpid</b> - The Video process ID
  10817. </li>
  10818. <li>
  10819. <b>webifversion</b> - Type and version of the used web interface
  10820. </li>
  10821. </ul>
  10822. </ul>
  10823. </ul>
  10824. <a name="EQ3BT"></a>
  10825. <h3>EQ3BT</h3>
  10826. <ul>
  10827. EQ3BT is used to control a EQ3 Bluetooth Smart Radiator Thermostat<br><br>
  10828. <b>Note:</b> The bluez package is required to run this module. Please check if gatttool executable is available on your system.
  10829. <br>
  10830. <br>
  10831. <a name="EQ3BTdefine" id="EQ3BTdefine"></a>
  10832. <b>Define</b>
  10833. <ul>
  10834. <code>define &lt;name&gt; EQ3BT &lt;mac address&gt;</code><br>
  10835. <br>
  10836. Example:
  10837. <ul>
  10838. <code>define livingroom.thermostat EQ3BT 00:33:44:33:22:11</code><br>
  10839. </ul>
  10840. </ul>
  10841. <br>
  10842. <a name="EQ3BTset" id="EQ3BTset"></a>
  10843. <b>Set</b>
  10844. <ul>
  10845. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  10846. The following commands are defined:<br><br>
  10847. <ul>
  10848. <li><code><b>desiredTemperature</b> [4.5...29.5]</code> &nbsp;&nbsp;-&nbsp;&nbsp; set the temperature</li>
  10849. <li><code><b>boost</b> on/off</code> &nbsp;&nbsp;-&nbsp;&nbsp; activate boost command</li>
  10850. <li><code><b>mode</b> manual/automatic</code> &nbsp;&nbsp;-&nbsp;&nbsp; set manual/automatic mode</li>
  10851. <li><code><b>updateStatus</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; read current thermostat state and update readings</li>
  10852. <li><code><b>eco</b> </code> &nbsp;&nbsp;-&nbsp;&nbsp; set eco temperature</li>
  10853. <li><code><b>comfort</b> </code> &nbsp;&nbsp;-&nbsp;&nbsp; set comfort temperature</li>
  10854. </ul>
  10855. <br>
  10856. </ul>
  10857. <a name="EQ3BTget" id="EQ3BTget"></a>
  10858. <b>Get</b>
  10859. <ul>
  10860. <code>n/a</code>
  10861. </ul>
  10862. <br>
  10863. <a name="EQ3BTattr" id="EQ3BTattr"></a>
  10864. <b>attr</b>
  10865. <ul>
  10866. <li>sshHost - FQD-Name or IP of ssh remote system / you must configure your ssh system for certificate authentication. For better handling you can config ssh Client with .ssh/config file</li>
  10867. </ul>
  10868. <br>
  10869. </ul>
  10870. <a name="ESA2000"></a>
  10871. <h3>ESA2000</h3>
  10872. <ul>
  10873. The ESA2000 module interprets ESA1000 or ESA2000 type of messages received by the CUL.
  10874. <br><br>
  10875. <a name="ESA2000define"></a>
  10876. <b>Define</b>
  10877. <ul>
  10878. <code>define &lt;name&gt; ESA2000 &lt;code&gt;
  10879. [base1 base2]</code> <br>
  10880. <br>
  10881. &lt;code&gt; is the 4 digit HEX code identifying the devices.<br><br>
  10882. <b>base1/2</b> is added to the total kwh as a base (Hoch- und Niedertarifz&auml;hlerstand).
  10883. </ul>
  10884. <br>
  10885. <a name="ESA2000set"></a>
  10886. <b>Set</b> <ul>N/A</ul><br>
  10887. <a name="ESA2000get"></a>
  10888. <b>Get</b> <ul>N/A</ul><br>
  10889. <a name="ESA2000attr"></a>
  10890. <b>Attributes</b>
  10891. <ul>
  10892. <li><a href="#ignore">ignore</a></li><br>
  10893. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  10894. <li><a href="#showtime">showtime</a></li><br>
  10895. <li><a href="#model">model</a> (esa2000-led, esa2000-wz, esa2000-s0, esa1000wz-ir, esa1000wz-s0, esa1000wz-led, esa1000gas)</li><br>
  10896. <li><a href="#IODev">IODev</a></li><br>
  10897. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  10898. </ul>
  10899. <br>
  10900. </ul>
  10901. <a name="ESPEasy"></a>
  10902. <h3>ESPEasy</h3>
  10903. <ul>
  10904. <p>Provides access and control to Espressif ESP8266 WLAN-SoC w/ ESPEasy</p>
  10905. Notes:
  10906. <ul>
  10907. <li>You have to define a bridge device before any logical device can be
  10908. defined.
  10909. </li>
  10910. <li>You have to configure your ESP to use "FHEM HTTP" controller protocol.
  10911. Furthermore ESP controller IP must match FHEM's IP address. ESP controller
  10912. port and the FHEM ESPEasy bridge port must be the same.
  10913. </li>
  10914. <li>
  10915. Max. 2 ESPEasy bridges can be defined at the same time: 1 for IPv4 and 1 for IPv6
  10916. </li>
  10917. <li>Further information about this module is available here:
  10918. <a href="https://forum.fhem.de/index.php/topic,55728.0.html">Forum #55728</a>
  10919. </li>
  10920. <br>
  10921. <li><b>UPDATE:
  10922. </li>
  10923. <li></b>For security reasons: if one or more of your ESPEasy device uses a
  10924. public IP address then you have to enable this explicitly or the device(s)
  10925. will be ignored/rejected:
  10926. </li>
  10927. <ul>
  10928. <li>
  10929. Enable all ESPEasy device IP addresses/subnets/regexs with the help of
  10930. bridge attributes
  10931. <a href="#ESPEasy_bridge_attr_allowedips">allowedIPs</a> /
  10932. <a href="#ESPEasy_bridge_attr_deniedips">deniedIPs</a>.
  10933. </li>
  10934. <li>
  10935. Enable authentication: see attribute
  10936. <a href="#ESPEasy_bridge_attr_authentication">authentication</a> and
  10937. bridge set <a href="#ESPEasy_bridge_set_user">user</a>
  10938. / <a href="#ESPEasy_bridge_set_pass">pass</a> commands.
  10939. </li>
  10940. </ul>
  10941. <br>
  10942. </ul>
  10943. Requirements:
  10944. <ul>
  10945. <li>
  10946. ESPEasy build &gt;= <a href="https://github.com/ESP8266nu/ESPEasy"
  10947. target="_new">R128</a> (self compiled) or an ESPEasy precompiled image
  10948. &gt;= <a href="http://www.letscontrolit.com/wiki/index.php/ESPEasy#Loading_firmware" target="_new">R140_RC3</a><br>
  10949. </li>
  10950. <li>perl module JSON<br>
  10951. Use "cpan install JSON" or operating system's package manager to install
  10952. Perl JSON Modul. Depending on your os the required package is named:
  10953. libjson-perl or perl-JSON.
  10954. </li>
  10955. </ul>
  10956. <h3>ESPEasy Bridge</h3>
  10957. <a name="ESPEasy_bridge_define"></a>
  10958. <b>Define </b>(bridge)<br><br>
  10959. <ul>
  10960. <code>define &lt;name&gt; ESPEasy bridge &lt;[IPV6:]port&gt;</code><br><br>
  10961. <li>
  10962. <a name=""><code>&lt;name&gt;</code></a><br>
  10963. Specifies a device name of your choise.<br>
  10964. example: <code>ESPBridge</code>
  10965. </li><br>
  10966. <li>
  10967. <a name=""><code>&lt;port&gt;</code></a><br>
  10968. Specifies TCP port for incoming ESPEasy http requests. This port must
  10969. <u>not</u> be used by any other application or daemon on your system and
  10970. must be in the range 1024..65535 unless you run your FHEM installation
  10971. with root permissions (not recommanded).<br>
  10972. If you want to define an IPv4 and an IPv6 bridge on the same TCP port
  10973. (recommanded) then it might be necessary on (some?) Linux
  10974. distributions to activate IPV6_V6ONLY socket option. Use <code>"echo
  10975. 1>/proc/sys/net/ipv6/bindv6only"</code> or systemctl for that purpose.<br>
  10976. eg. <code>8383</code><br>
  10977. eg. <code>IPV6:8383</code><br>
  10978. Example:<br>
  10979. <code>define ESPBridge ESPEasy bridge 8383</code></li><br>
  10980. </ul>
  10981. <br><a name="ESPEasy_bridge_get"></a>
  10982. <b>Get </b>(bridge)<br><br>
  10983. <ul>
  10984. <li><a name="ESPEasy_bridge_get_reading">&lt;reading&gt;</a><br>
  10985. returns the value of the specified reading</li>
  10986. <br>
  10987. <li><a name="ESPEasy_bridge_get_queueSize">queueSize</a><br>
  10988. returns number of entries for each queue (&lt;ip&gt;:number
  10989. [&lt;ip&gt;:number] [...]).
  10990. </li><br>
  10991. <li><a name="ESPEasy_bridge_get_user">user</a><br>
  10992. returns username used by basic authentication for incoming requests.
  10993. </li><br>
  10994. <li><a name="ESPEasy_bridge_get_pass">pass</a><br>
  10995. returns password used by basic authentication for incoming requests.
  10996. </li><br>
  10997. </ul>
  10998. <br><a name="ESPEasy_bridge_set"></a>
  10999. <b>Set </b>(bridge)<br><br>
  11000. <ul>
  11001. <li><a name="ESPEasy_bridge_set_help">help</a><br>
  11002. Shows set command usage<br>
  11003. required values: <code>help|pass|user|clearQueue</code></li><br>
  11004. <li><a name="ESPEasy_bridge_set_clearqueue">clearQueue</a><br>
  11005. Used to erase all command queues.<br>
  11006. required value: <code>&lt;none&gt;</code><br>
  11007. eg. : <code>set ESPBridge clearQueue</code></li><br>
  11008. <li><a name="ESPEasy_bridge_set_pass">pass</a><br>
  11009. Specifies password used by basic authentication for incoming requests.<br>
  11010. Note that attribute <a href="#ESPEasy_bridge_attr_authentication">authentication</a>
  11011. must be set to enable basic authentication, too.<br>
  11012. required value: <code>&lt;password&gt;</code><br>
  11013. eg. : <code>set ESPBridge pass secretpass</code></li><br>
  11014. <li><a name="ESPEasy_bridge_set_user">user</a><br>
  11015. Specifies username used by basic authentication for incoming requests.<br>
  11016. Note that attribute <a href="#ESPEasy_bridge_attr_authentication">authentication</a>
  11017. must be set to enable basic authentication, too.<br>
  11018. required value: <code>&lt;username&gt;</code><br>
  11019. eg. : <code>set ESPBridge user itsme</code></li><br>
  11020. </ul>
  11021. <br><a name="ESPEasy_bridge_attr"></a>
  11022. <b>Attributes </b>(bridge)<br><br>
  11023. <ul>
  11024. <li><a name="ESPEasy_bridge_attr_allowedips">allowedIPs</a><br>
  11025. Used to limit IPs or IP ranges of ESPs which are allowed to commit data.
  11026. <br>
  11027. Specify IP, IP/netmask, regexp or a comma separated list of these values.
  11028. Netmask can be written as bitmask or dotted decimal. Domain names for dns
  11029. lookups are not supported.<br>
  11030. Possible values: IPv64 address, IPv64/netmask, regexp<br>
  11031. Default: 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16,
  11032. fe80::/10, fc00::/7, ::1
  11033. <br><br>
  11034. Examles:<br>
  11035. <table><tr><td>
  11036. 10.68.30.147
  11037. </td><td>
  11038. =&gt; IPv4 single address
  11039. </td></tr><tr><td>
  11040. 10.68.30.0/25
  11041. </td><td>
  11042. =&gt; IPv4 CIDR network 192.168.30.0-127
  11043. </td></tr><tr><td>
  11044. 10.68.30.8/255.255.248.0
  11045. </td><td>
  11046. =&gt; IPv4 CIDR network 192.168.30.8-15
  11047. </td></tr><tr><td>
  11048. 192.168.30.1([0-4][0-9]|50)
  11049. </td><td>
  11050. =&gt; IPv4 range w/ regexp: 192.168.30.100-150
  11051. </td></tr><tr><td>
  11052. 2001:1a59:50a9::aaaa
  11053. </td><td>
  11054. =&gt; IPv6 single address
  11055. </td></tr><tr><td>
  11056. 2001:1a59:50a9::/48
  11057. </td><td>
  11058. =&gt; IPv6 network 2001:1a59:50a9::/48
  11059. </td></tr><tr><td>
  11060. 2001:1a59:50a9::01[0-4][0-9]
  11061. </td><td>
  11062. =&gt; IPv6 range w/ regexp: 2001:1a59:50a9::0100-0149
  11063. </tr></td>
  11064. </table>
  11065. <span style="font-size:small;">Note that short IPv6 notation (::) must be
  11066. used in conjunction with regexps.</span>
  11067. </li><br>
  11068. <li><a name="ESPEasy_bridge_attr_authentication">authentication</a><br>
  11069. Used to enable basic authentication for incoming requests.<br>
  11070. Note that user, pass and authentication attribute must be set to activate
  11071. basic authentication<br>
  11072. Possible values: 0,1<br>
  11073. Default: 0</li><br>
  11074. <li><a name="ESPEasy_bridge_attr_autocreate">autocreate</a><br>
  11075. Used to overwrite global autocreate setting.<br>
  11076. Global autocreate setting will be detected by global attribut
  11077. 'autoload_undefined_devices'<br>
  11078. Possible values: 0,1<br>
  11079. Default: 0 (disabled)</li><br>
  11080. <li><a name="ESPEasy_bridge_attr_autosave">autosave</a><br>
  11081. Used to overwrite global autosave setting.<br>
  11082. Global autosave setting will be detected by global attribut 'autosave'.
  11083. <br>
  11084. Possible values: 0,1<br>
  11085. Default: 0 (disabled)</li><br>
  11086. <li><a name="ESPEasy_bridge_attr_combinedevices">combineDevices</a><br>
  11087. Used to gather all ESP devices of a single ESP into 1 FHEM device even if
  11088. different ESP devices names are used.<br>
  11089. Possible values: 0, 1, IPv64 address, IPv64/netmask, ESPname or a comma
  11090. separated list consisting of these values.<br>
  11091. Netmasks can be written as bitmask or dotted decimal. Domain names for dns
  11092. lookups are not supported.<br>
  11093. Default: 0 (disabled for all ESPs)<br>
  11094. Eg. 1 (globally enabled)<br>
  11095. Eg. ESP01,ESP02<br>
  11096. Eg. 10.68.30.1,10.69.0.0/16,ESP01,2002:1a59:50a9::/48</li><br>
  11097. <li><a name="ESPEasy_bridge_attr_deniedips">deniedIPs</a><br>
  11098. Used to define IPs or IP ranges of ESPs which are denied to commit data.
  11099. <br>
  11100. Syntax see <a href="#ESPEasy_bridge_attr_allowedips">allowedIPs</a>.<br>
  11101. This attribute will overwrite any IP or range defined by
  11102. <a href="#ESPEasy_bridge_attr_allowedips">allowedIPs</a>.<br>
  11103. Default: none (no IPs are denied)</li><br>
  11104. <li><a name="ESPEasy_bridge_attr_disable">disable</a><br>
  11105. Used to disable device.<br>
  11106. Possible values: 0,1<br>
  11107. Default: 0 (eanble)</li><br>
  11108. <li><a name="ESPEasy_bridge_attr_httpreqtimeout">httpReqTimeout</a><br>
  11109. Specifies seconds to wait for a http answer from ESP8266 device.<br>
  11110. Possible values: 4..60<br>
  11111. Default: 10 seconds</li><br>
  11112. <li><a name="ESPEasy_bridge_attr_maxhttpsessions">maxHttpSessions</a><br>
  11113. Limit maximal concurrent outgoing http sessions to a single ESP.<br>
  11114. Set to 0 to disable this feature. At the moment (ESPEasy R147) it seems
  11115. to be possible to send 5 "concurrent" requests if nothing else keeps the
  11116. esp working.<br>
  11117. Possible values: 0..9<br>
  11118. Default: 3</li><br>
  11119. <li><a name="ESPEasy_bridge_attr_maxqueuesize">maxQueueSize</a><br>
  11120. Limit maximal queue size (number of commands in queue) for outgoing http
  11121. requests.<br>
  11122. If command queue size is reached (eg. ESP is offline) any further
  11123. command will be ignored and discard.<br>
  11124. Possible values: >10<br>
  11125. Default: 250</li><br>
  11126. <li><a name="ESPEasy_bridge_attr_resendfailedcmd">resendFailedCmd</a><br>
  11127. Used to resend commands when http request returned an error<br>
  11128. Possible values: 0,1<br>
  11129. Default: 0 (disabled)</li><br>
  11130. <li><a name="ESPEasy_bridge_attr_uniqids">uniqIDs</a><br>
  11131. This attribute has been removed.</li><br>
  11132. <li><a href="#readingFnAttributes">readingFnAttributes</a>
  11133. </li><br>
  11134. </ul>
  11135. <h3>ESPEasy Device</h3>
  11136. <a name="ESPEasy_device_define"></a>
  11137. <b>Define </b>(logical device)<br><br>
  11138. <ul>
  11139. Notes: Logical devices will be created automatically if any values are
  11140. received by the bridge device and autocreate is not disabled. If you
  11141. configured your ESP in a way that no data is send independently then you
  11142. have to define logical devices. At least wifi rssi value could be defined
  11143. to use autocreate and presence detection.<br><br>
  11144. <code>define &lt;name&gt; ESPEasy &lt;ip|fqdn&gt; &lt;port&gt; &lt;IODev&gt; &lt;identifier&gt;</code><br><br>
  11145. <li>
  11146. <a name=""><code>&lt;name&gt;</code></a><br>
  11147. Specifies a device name of your choise.<br>
  11148. example: <code>ESPxx</code>
  11149. </li><br>
  11150. <li>
  11151. <a name=""><code>&lt;ip|fqdn&gt;</code></a><br>
  11152. Specifies ESP IP address or hostname.<br>
  11153. example: <code>172.16.4.100</code><br>
  11154. example: <code>espxx.your.domain.net</code>
  11155. </li><br>
  11156. <li>
  11157. <a name=""><code>&lt;port&gt;</code></a><br>
  11158. Specifies http port to be used for outgoing request to your ESP. Should be 80<br>
  11159. example: <code>80</code>
  11160. </li><br>
  11161. <li>
  11162. <a name=""><code>&lt;IODev&gt;</code></a><br>
  11163. Specifies your ESP bridge device. See above.<br>
  11164. example: <code>ESPBridge</code>
  11165. </li><br>
  11166. <li>
  11167. <a name=""><code>&lt;identifier&gt;</code></a><br>
  11168. Specifies an identifier that will bind your ESP to this device.<br>
  11169. This identifier must be specified in this form:<br>
  11170. &lt;esp name&gt;_&lt;esp device name&gt;.<br>
  11171. If bridge attribute <a href="#ESPEasy_bridge_attr_combinedevices">combineDevices</a> is used then &lt;esp name&gt; is used, only.<br>
  11172. ESP name and device name can be found here:<br>
  11173. &lt;esp name&gt;: =&gt; ESP GUI =&gt; Config =&gt; Main Settings =&gt; Name<br>
  11174. &lt;esp device name&gt;: =&gt; ESP GUI =&gt; Devices =&gt; Edit =&gt; Task Settings =&gt; Name<br>
  11175. example: <code>ESPxx_DHT22</code><br>
  11176. example: <code>ESPxx</code>
  11177. </li><br>
  11178. <li>Example:<br>
  11179. <code>define ESPxx ESPEasy 172.16.4.100 80 ESPBridge EspXX_SensorXX</code>
  11180. </li><br>
  11181. </ul>
  11182. <br><a name="ESPEasy_device_get"></a>
  11183. <b>Get </b>(logical device)<br><br>
  11184. <ul>
  11185. <li><a name="ESPEasy_device_get_reading">&lt;reading&gt;</a><br>
  11186. returns the value of the specified reading
  11187. </li><br>
  11188. <li><a name="ESPEasy_bridge_get_pinmap">pinMap</a><br>
  11189. returns possible alternative pin names that can be used in commands
  11190. </li><br>
  11191. </ul>
  11192. <br><a name="ESPEasy_device_set"></a>
  11193. <b>Set </b>(logical device)
  11194. <br><br>
  11195. <ul>
  11196. Notes:<br>
  11197. - Commands are case insensitive.<br>
  11198. - Users of Wemos D1 mini or NodeMCU can use Arduino pin names instead of
  11199. GPIO numbers.<br>
  11200. &nbsp;&nbsp;D1 =&gt; GPIO5, D2 =&gt; GPIO4, ...,TX =&gt; GPIO1 (see: get
  11201. <a href="#ESPEasy_bridge_get_pinmap">pinMap</a>)<br>
  11202. - low/high state can be written as 0/1 or on/off
  11203. <br>
  11204. <br>
  11205. <li><a name="ESPEasy_device_set_clearreadings">clearReadings</a><br>
  11206. Delete all readings that are auto created by received sensor values
  11207. since last FHEM restart.<br>
  11208. <ul>
  11209. <li>arguments: <code>none</code></li>
  11210. <li>example: set &lt;esp&gt; clearReadings</li>
  11211. </ul>
  11212. </li><br>
  11213. <li><a name="ESPEasy_device_set_help">help</a><br>
  11214. Shows set command usage.<br>
  11215. <ul>
  11216. <li>arguments: <code>a valid set command</code></li>
  11217. <li>example: <code>set &lt;esp&gt; help gpio</code></li>
  11218. </ul>
  11219. </li><br>
  11220. <li><a name="ESPEasy_device_set_raw">raw</a><br>
  11221. Can be used for own ESP plugins or new ESPEasy commands that are not
  11222. considered by this module at the moment. Any argument will be sent
  11223. directly to the ESP.
  11224. <ul>
  11225. <li>arguments: raw &lt;cmd&gt; [&lt;arg1&gt;] [&lt;arg2&gt;] [&lt;...&gt;]</li>
  11226. <li>example: set &lt;esp&gt; raw myCommand p1 p2 p3</li>
  11227. </ul>
  11228. </li><br>
  11229. <li><a name="ESPEasy_device_set_statusrequest">statusRequest</a><br>
  11230. Trigger a statusRequest for configured GPIOs (see attribut pollGPIOs)
  11231. and do a presence check<br>
  11232. <ul>
  11233. <li>arguments: <code>n/a</code></li>
  11234. <li>example: <code>set &lt;esp&gt; statusRequest</code></li>
  11235. </ul><br>
  11236. </li><br>
  11237. </ul>
  11238. <i><b>Note:</b> The following commands are built-in ESPEasy Software commands
  11239. that are send directly to the ESP after passing a syntax check. A detailed
  11240. description can be found here:
  11241. <a href="http://www.letscontrolit.com/wiki/index.php/ESPEasy_Command_Reference"
  11242. target="_NEW">ESPEasy Command Reference</a></i><br><br>
  11243. <ul>
  11244. </ul>
  11245. <u>ESPEasy generic I/O commands:</u><br><br>
  11246. <ul>
  11247. <li><a name="ESPEasy_device_set_gpio">GPIO</a><br>
  11248. Switch output pins to high/low<br>
  11249. <ul>
  11250. <li>arguments: <code>&lt;pin&gt; &lt;0|1|off|on&gt;</code></li>
  11251. <li>example: <code>set &lt;esp&gt; gpio 14 on</code></li>
  11252. </ul>
  11253. </li><br>
  11254. <li><a name="ESPEasy_device_set_pwm">PWM</a><br>
  11255. Direct PWM control of output pins<br>
  11256. <ul>
  11257. <li>arguments: <code>&lt;pin&gt; &lt;level&gt;</code></li>
  11258. <li>example: <code>set &lt;esp&gt; pwm 14 512</code></li>
  11259. </ul>
  11260. </li><br>
  11261. <li><a name="ESPEasy_device_set_pwmfade">PWMFADE</a><br>
  11262. Fade output pins to a pwm value<br>
  11263. <ul>
  11264. <li>arguments: <code>&lt;pin&gt; &lt;target pwm&gt; &lt;duration 1-30s&gt;</code></li>
  11265. <li>example: <code>set &lt;esp&gt; pwmfade 14 1023 10</code></li>
  11266. </ul>
  11267. </li><br>
  11268. <li><a name="ESPEasy_device_set_pulse">Pulse</a><br>
  11269. Direct pulse control of output pins<br>
  11270. <ul>
  11271. <li>arguments: <code>&lt;pin&gt; &lt;0|1|off|on&gt; &lt;duration&gt;</code></li>
  11272. <li>example: <code>set &lt;esp&gt; pulse 14 on 10</code></li>
  11273. </ul>
  11274. </li><br>
  11275. <li><a name="ESPEasy_device_set_logpulse">LongPulse</a><br>
  11276. Direct pulse control of output pins<br>
  11277. <ul>
  11278. <li>arguments: <code>&lt;pin&gt; &lt;0|1|off|on&gt; &lt;duration&gt;</code></li>
  11279. <li>example: <code>set &lt;esp&gt; longpulse 14 on 10</code></li>
  11280. </ul>
  11281. </li><br>
  11282. <li><a name="ESPEasy_device_set_pcfgpio">PCFGpio</a><br>
  11283. Control PCF8574 (8-bit I/O expander for I2C-bus)<br>
  11284. <ul>
  11285. <li>arguments: <code>&lt;port&gt; &lt;0|1|off|on&gt;</code></li>
  11286. <li>example: <code>set &lt;esp&gt; PCFGpio 128 on</code></li>
  11287. </ul>
  11288. Port numbering see:
  11289. <a href="https://www.letscontrolit.com/wiki/index.php/PCF8574#Input">
  11290. ESPEasy Wiki PCF8574</a>
  11291. </li><br>
  11292. <li><a name="ESPEasy_device_set_pcfpulse">PCFPulse</a><br>
  11293. Control PCF8574 (8-bit I/O expander for I2C-bus)
  11294. <ul>
  11295. <li>arguments: <code>&lt;port&gt; &lt;0|1|off|on&gt; &lt;duration&gt;</code></li>
  11296. <li>example: <code>set &lt;esp&gt; PCFPulse 128 on 10</code></li>
  11297. </ul>
  11298. Port numbering see:
  11299. <a href="https://www.letscontrolit.com/wiki/index.php/PCF8574#Input">
  11300. ESPEasy Wiki PCF8574</a>
  11301. </li><br>
  11302. <li><a name="ESPEasy_device_set_pcflongpulse">PCFLongPulse</a><br>
  11303. Control on PCF8574 (8-bit I/O expander for I2C-bus)
  11304. <ul>
  11305. <li>arguments: <code>&lt;port&gt; &lt;0|1|off|on&gt; &lt;duration&gt;</code></li>
  11306. <li>example: <code>set &lt;esp&gt; PCFLongPulse 128 on 10</code></li>
  11307. </ul>
  11308. Port numbering see:
  11309. <a href="https://www.letscontrolit.com/wiki/index.php/PCF8574#Input">
  11310. ESPEasy Wiki PCF8574</a>
  11311. </li><br>
  11312. <li><a name="ESPEasy_device_set_mcpgpio">mcpgpio</a><br>
  11313. Control MCP23017 output pins (16-Bit I/O Expander with Serial Interface)<br>
  11314. <ul>
  11315. <li>arguments: <code>&lt;port&gt; &lt;0|1|off|on&gt;</code></li>
  11316. <li>example: <code>set &lt;esp&gt; mcpgpio 48 on</code></li>
  11317. </ul>
  11318. Port numbering see:
  11319. <a href="https://www.letscontrolit.com/wiki/index.php/MCP23017#Input">
  11320. ESPEasy Wiki MCP23017</a>
  11321. </li><br>
  11322. <li><a name="ESPEasy_device_set_pcapwm">pcapwm</a><br>
  11323. Control PCA9685 (16-channel / 12-bit PWM I2C-bus controller)<br>
  11324. <ul>
  11325. <li>arguments: <code>&lt;pin 0-15&gt; &lt;level 0-4095&gt;</code></li>
  11326. <li>example: <code>set &lt;esp&gt; pcapwm 15 4095</code></li>
  11327. </ul>
  11328. </li><br>
  11329. </ul>
  11330. <u>ESPEasy motor control commands:</u><br><br>
  11331. <ul>
  11332. <li><a name="ESPEasy_device_set_servo">Servo</a><br>
  11333. Direct control of servo motors<br>
  11334. <ul>
  11335. <li>arguments: <code>&lt;servoNo&gt; &lt;pin&gt; &lt;position&gt;</code></li>
  11336. <li>example: <code>set &lt;esp&gt; servo 1 14 100</code></li>
  11337. </ul>
  11338. </li><br>
  11339. <li><a name="ESPEasy_device_set_motorshieldcmd">MotorShieldCMD</a><br>
  11340. Control a DC motor or stepper<br>
  11341. <ul>
  11342. <li>
  11343. arguments: <code>DCMotor &lt;motornumber&gt; &lt;forward|backward|release&gt; &lt;speed&gt;</code><br>
  11344. arguments: <code>Stepper &lt;motornumber&gt; &lt;forward|backward|release&gt; &lt;steps&gt; &lt;single|double|interleave|microstep&gt;</code>
  11345. </li>
  11346. <li>
  11347. example: <code>set &lt;esp&gt; MotorShieldCMD DCMotor 1 forward 10</code><br>
  11348. example: <code>set &lt;esp&gt; MotorShieldCMD Stepper 1 backward 25 single</code>
  11349. </li>
  11350. </ul>
  11351. </li><br>
  11352. </ul>
  11353. <u>ESPEasy display related commands:</u><br>
  11354. <ul><br>
  11355. <li><a name="ESPEasy_device_set_lcd">lcd</a><br>
  11356. Write text messages to LCD screen<br>
  11357. Pay attention to attributes
  11358. <a href="#ESPEasy_device_attr_displaytextencode">displayTextEncode</a> and
  11359. <a href="#ESPEasy_device_attr_displaytextwidth">displayTextWidth</a>.<br>
  11360. <ul>
  11361. <li>arguments: <code>&lt;row&gt; &lt;col&gt; &lt;text&gt;</code></li>
  11362. <li>example: <code>set &lt;esp&gt; lcd 1 1 Test a b c</code></li>
  11363. </ul>
  11364. </li><br>
  11365. <li><a name="ESPEasy_device_set_lcdcmd">lcdcmd</a><br>
  11366. Control LCD screen<br>
  11367. <ul>
  11368. <li>arguments: <code>&lt;on|off|clear&gt;</code></li>
  11369. <li>example: <code>set &lt;esp&gt; lcdcmd clear</code></li>
  11370. </ul>
  11371. </li><br>
  11372. <li><a name="ESPEasy_device_set_oled">oled</a><br>
  11373. Write text messages to OLED screen<br>
  11374. Pay attention to attributes
  11375. <a href="#ESPEasy_device_attr_displaytextencode">displayTextEncode</a> and
  11376. <a href="#ESPEasy_device_attr_displaytextwidth">displayTextWidth</a>.<br>
  11377. <ul>
  11378. <li>arguments: <code>&lt;row&gt; &lt;col&gt; &lt;text&gt;</code></li>
  11379. <li>example: <code>set &lt;esp&gt; oled 1 1 Test a b c</code></li>
  11380. </ul>
  11381. </li><br>
  11382. <li><a name="ESPEasy_device_set_oledcmd">oledcmd</a><br>
  11383. Control OLED screen<br>
  11384. <ul>
  11385. <li>arguments: <code>&lt;on|off|clear&gt;</code></li>
  11386. <li>example: <code>set &lt;esp&gt; oledcmd clear</code></li>
  11387. </ul>
  11388. </li><br>
  11389. <li><a name="ESPEasy_device_set_oledframedcmd">oledframedcmd</a><br>
  11390. Switch oledframed on/off<br>
  11391. <ul>
  11392. <li>arguments: <code>&lt;on|off&gt;</code></li>
  11393. <li>example: <code>set &lt;esp&gt; oledframedcmd on</code></li>
  11394. </ul>
  11395. </li><br>
  11396. </ul>
  11397. <u>ESPEasy DMX related commands:</u>
  11398. <ul><br>
  11399. <li><a name="ESPEasy_device_set_dmx">dmx</a><br>
  11400. Send DMX commands to a device<br>
  11401. <ul>
  11402. <li>arguments: <code>&lt;on|off|log|value|channel=value[,value][...]&gt;</code></li>
  11403. <li>example: <code>set &lt;esp&gt; dmx 1=255,2=127</code></li>
  11404. </ul>
  11405. </li><br>
  11406. </ul>
  11407. <u>ESPEasy LED/Lights related commands:</u>
  11408. <ul><br>
  11409. <li><a name="ESPEasy_device_set_lights">Lights</a> (plugin can be found <a
  11410. href="https://github.com/ddtlabs/ESPEasy-Plugin-Lights target="_NEW">here</a>)<br>
  11411. Control a rgb or ct light<br>
  11412. <ul>
  11413. <li>arguments: <code>&lt;rgb|ct|pct|on|off|toggle&gt; [&lt;hex-rgb|color-temp|pct-value&gt;] [&lt;fading time&gt;]</code></li>
  11414. <li>examples:<br>
  11415. <code>set &lt;esp&gt; lights rgb aa00aa</code><br>
  11416. <code>set &lt;esp&gt; lights rgb aa00aa 10</code><br>
  11417. <code>set &lt;esp&gt; lights ct 3200</code><br>
  11418. <code>set &lt;esp&gt; lights ct 3200 10</code><br>
  11419. <code>set &lt;esp&gt; lights pct 50</code><br>
  11420. <code>set &lt;esp&gt; lights on</code><br>
  11421. <code>set &lt;esp&gt; lights off</code><br>
  11422. <code>set &lt;esp&gt; lights toggle</code><br>
  11423. </li>
  11424. </ul>
  11425. </li><br>
  11426. <li><a name="ESPEasy_device_set_nfx">nfx</a> (plugin can be found
  11427. <a target="_blank" href="https://github.com/djcysmic/NeopixelBusFX">here</a>)<br>
  11428. Control nfx plugin<br>
  11429. Note: To use FHEMWEB's colorpicker and slider widgets you have to set
  11430. Attribut <a href="ESPEasy_device_attr_maplightscmds">mapLightCmds</a>.
  11431. <ul>
  11432. <li>arguments: <code>&lt;off|on|dim|line|one|all|rgb|fade|colorfade|rainbow|kitt|comet|theatre|scan|dualscan|twinkle|twinklefade|sparkle|wipe|fire|stop|statusrequest|fadetime|fadedelay|speed|count|bgcolor&gt; [&lt;rgb&gt;] [&lt;fadeing time&gt;] [&lt;delay time&gt;]</code></li>
  11433. <li>examples:<br>
  11434. <code>
  11435. set &lt;esp&gt; nfx all 00ff00 100<br>
  11436. set &lt;esp&gt; nfx rgb aa00ff 1000 10<br>
  11437. set &lt;esp&gt; nfx line 0 100 f0f0f0c<br>
  11438. </code>
  11439. </li>
  11440. </ul>
  11441. </li><br>
  11442. <li><a name="ESPEasy_device_set_candle">candle</a><br>
  11443. Control candle rgb plugin<br>
  11444. <ul>
  11445. <li>arguments:
  11446. <code>CANDLE:&lt;FlameType&gt;:&lt;Color&gt;:&lt;Brightness&gt;</code></li>
  11447. <li>example: <code>set &lt;esp&gt; CANDLE:4:FF0000:200</code></li>
  11448. </ul>
  11449. </li><br>
  11450. <li><a name="ESPEasy_device_set_neopixel">neopixel</a><br>
  11451. Control neopixel plugin (single LED)<br>
  11452. <ul>
  11453. <li>arguments: <code>&lt;led nr&gt; &lt;red 0-255&gt; &lt;green 0-255&gt; &lt;blue 0-255&gt;</code></li>
  11454. <li>example: <code>set &lt;esp&gt; neopixel 1 255 255 255</code></li>
  11455. </ul>
  11456. </li><br>
  11457. <li><a name="ESPEasy_device_set_neopixelall">neopixelall</a><br>
  11458. Control neopixel plugin (all together)<br>
  11459. <ul>
  11460. <li>arguments: <code>&lt;red 0-255&gt; &lt;green 0-255&gt; &lt;blue 0-255&gt;</code></li>
  11461. <li>example: <code>set &lt;esp&gt; neopixelall 255 255 255</code></li>
  11462. </ul>
  11463. </li><br>
  11464. <li><a name="ESPEasy_device_set_neopixelline">neopixelline</a><br>
  11465. Control neopixel plugin (line)<br>
  11466. <ul>
  11467. <li>arguments: <code>&lt;start led no&gt; &lt;stop led no&gt; &lt;red 0-255&gt; &lt;green 0-255&gt; &lt;blue 0-255&gt;</code></li>
  11468. <li>example: <code>set &lt;esp&gt; neopixelline 1 5 0 127 255</code></li>
  11469. </ul>
  11470. </li><br>
  11471. </ul>
  11472. <u>ESPEasy sound related commands:</u>
  11473. <ul><br>
  11474. <li><a name="ESPEasy_device_set_tone">tone</a><br>
  11475. Play a tone on a pin via a speaker or piezo element (ESPEasy &gt;=
  11476. 2.0.0-dev6)
  11477. <br>
  11478. <ul>
  11479. <li>arguments: <code>&lt;pin&gt; &lt;freq Hz&gt; &lt;duration s&gt;</code></li>
  11480. <li>example: <code>set &lt;esp&gt; tone 14 4000 1</code></li>
  11481. </ul>
  11482. </li><br>
  11483. <li><a name="ESPEasy_device_set_rtttl">rtttl</a><br>
  11484. Play melodies via <a target="_NEW"
  11485. href="https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification">RTTTL</a>
  11486. (ESPEasy &gt;= 2.0.0-dev6)
  11487. <br>
  11488. <ul>
  11489. <li>arguments: &lt;rtttl&gt; &lt;pin&gt;:&lt;rtttl codes&gt;</li>
  11490. <li>example: <code>set &lt;esp&gt; rtttl 14:d=10,o=6,b=180,c,e,g</code></li>
  11491. </ul>
  11492. </li><br>
  11493. <li><a name="ESPEasy_device_set_buzzer">buzzer</a><br>
  11494. Beep a short time<br>
  11495. <ul>
  11496. <li>arguments: <code>none</code></li>
  11497. <li>example: <code>set &lt;esp&gt; buzzer</code></li>
  11498. </ul>
  11499. </li><br>
  11500. </ul>
  11501. <u>ESPEasy miscellaneous commands:</u>
  11502. <ul><br>
  11503. <li><a name="ESPEasy_device_set_event">Event</a><br>
  11504. Trigger an ESP event. Such events can be used in ESP Easy rules.<br>
  11505. <ul>
  11506. <li>arguments: <code>&lt;string&gt;</code></li>
  11507. <li>example: <code>set &lt;esp&gt; event testevent</code></li>
  11508. </ul>
  11509. </li><br>
  11510. <li><a name="ESPEasy_device_set_irsend">irsend</a><br>
  11511. Send ir codes via "Infrared Transmit" Plugin<br>
  11512. Supported protocols are: NEC, JVC, RC5, RC6, SAMSUNG, SONY, PANASONIC at
  11513. the moment. As long as official documentation is missing you can find
  11514. some details here:
  11515. <a href="http://www.letscontrolit.com/forum/viewtopic.php?f=5&t=328" target="_NEW">
  11516. IR Transmitter thread #1</a> and
  11517. <a
  11518. href="https://www.letscontrolit.com/forum/viewtopic.php?t=328&start=61" target="_NEW">
  11519. IR Transmitter thread #61</a>.<br>
  11520. <ul>
  11521. <li>
  11522. arguments: <code>&lt;NEC|JVC|RC5|RC6|SAMSUNG|SONY|PANASONIC&gt; &lt;hex code&gt; &lt;bit length&gt;</code><br>
  11523. arguments: <code>&lt;RAW&gt; &lt;B32 raw&gt; &lt;frequenz&gt; &lt;pulse length&gt; &lt;blank length&gt;</code>
  11524. </li>
  11525. <li>
  11526. example: <code>set &lt;esp&gt; irsend NEC 7E81542B 32</code><br>
  11527. example: <code>set &lt;esp&gt; irsend RAW 3U0GGL8AGGK588A22K58ALALALAGL1A22LAK45ALALALALALALALALAL1AK5 38 512 256</code>
  11528. </li>
  11529. </ul>
  11530. </li><br>
  11531. <li><a name="ESPEasy_device_set_serialsend">serialsend</a><br>
  11532. Used for ser2net plugin<br>
  11533. <ul>
  11534. <li>arguments: <code>&lt;string&gt;</code></li>
  11535. <li>example: <code>set &lt;esp&gt; serialsend test</code></li>
  11536. </ul>
  11537. </li><br>
  11538. </ul>
  11539. <u>ESPEasy administrative commands</u> (be careful !!!):
  11540. <ul><br>
  11541. <li><a name="ESPEasy_device_set_erase">erase</a><br>
  11542. Wipe out ESP flash memory<br>
  11543. <ul>
  11544. <li>arguments: <code>none</code></li>
  11545. <li>example: <code>set &lt;esp&gt; erase</code></li>
  11546. </ul>
  11547. </li><br>
  11548. <li><a name="ESPEasy_device_set_reboot">reboot</a><br>
  11549. Used to reboot your ESP<br>
  11550. <ul>
  11551. <li>arguments: <code>none</code></li>
  11552. <li>example: <code>set &lt;esp&gt; reboot</code></li>
  11553. </ul>
  11554. </li><br>
  11555. <li><a name="ESPEasy_device_set_reset">reset</a><br>
  11556. Do a factory reset on the ESP<br>
  11557. <ul>
  11558. <li>arguments: <code>none</code></li>
  11559. <li>example: <code>set &lt;esp&gt; reset</code></li>
  11560. </ul>
  11561. </li><br>
  11562. </ul>
  11563. <u>ESPEasy experimental commands:</u> (The following commands can be changed or removed at any time)
  11564. <ul><br>
  11565. <li><a name="ESPEasy_device_set_rgb">rgb</a><br>
  11566. Used to control a rgb light wo/ an ESPEasy plugin.<br>
  11567. You have to set attribute <a href="#ESPEasy_device_attr_rgbgpios">rgbGPIOs</a> to
  11568. enable this feature. Default colorpicker mode is HSVp but can be adjusted
  11569. with help of attribute <a href="#ESPEasy_device_attr_colorpicker">colorpicker</a>
  11570. to HSV or RGB. Set attribute <a href="#webCmd">webCmd</a> to rgb to
  11571. display a colorpicker in FHEMWEB room view and on detail page.<br>
  11572. <ul>
  11573. <li>
  11574. arguments: <code>&lt;rrggbb&gt;|on|off|toggle</code>
  11575. </li>
  11576. <li>
  11577. examples:<br>
  11578. <code>set &lt;esp&gt; rgb 00FF00</code><br>
  11579. <code>set &lt;esp&gt; rgb on</code><br>
  11580. <code>set &lt;esp&gt; rgb off</code><br>
  11581. <code>set &lt;esp&gt; rgb toggle</code><br>
  11582. </li>
  11583. <li>Full featured example:<br>
  11584. attr &lt;ESP&gt; colorpicker HSVp<br>
  11585. attr &lt;ESP&gt; devStateIcon { ESPEasy_devStateIcon($name) }<br>
  11586. attr &lt;ESP&gt; Interval 30<br>
  11587. attr &lt;ESP&gt; parseCmdResponse status,pwm<br>
  11588. attr &lt;ESP&gt; pollGPIOs D6,D7,D8<br>
  11589. attr &lt;ESP&gt; rgbGPIOs D6,D7,D8<br>
  11590. attr &lt;ESP&gt; webCmd rgb:rgb ff0000:rgb 00ff00:rgb 0000ff:toggle:on:off
  11591. </li>
  11592. </ul>
  11593. </li><br>
  11594. </ul>
  11595. <u>ESPEasy deprecated commands:</u> (will be removed in a later version)
  11596. <ul><br>
  11597. <li><a name="ESPEasy_device_set_status">status</a><br>
  11598. Request esp device status (eg. gpio)<br>
  11599. See attributes: parseCmdResponse, readingPrefixGPIO, readingSuffixGPIOState
  11600. <ul>
  11601. <li>arguments: <code>&lt;pin&gt;</code></li>
  11602. <li>example: <code>set &lt;esp&gt; status 14</code></li>
  11603. </ul>
  11604. </li><br>
  11605. </ul>
  11606. <br><a name="ESPEasy_device_attr"></a>
  11607. <b>Attributes</b> (logical device)<br><br>
  11608. <ul>
  11609. <li><a name="ESPEasy_device_attr_adjustvalue">adjustValue</a><br>
  11610. Used to adjust sensor values<br>
  11611. Must be a space separated list of &lt;reading&gt;:&lt;formula&gt;.
  11612. Reading can be a regexp. Formula can be an arithmetic expression like
  11613. 'round(($VALUE-32)*5/9,2)'.
  11614. If $VALUE is omitted in formula then it will be added to the beginning of
  11615. the formula. So you can simple write 'temp:+20' or '.*:*4'<br>
  11616. Modified or ignored values are marked in the system log (verbose 4). Use
  11617. verbose 5 logging to see more details.<br>
  11618. If the used sub function returns 'undef' then the value will be ignored.
  11619. <br>
  11620. The following variables can be used if necessary:
  11621. <ul>
  11622. <li>$VALUE contains the original value</li>
  11623. <li>$READING contains the reading name</li>
  11624. <li>$NAME contains the device name</li>
  11625. </ul>
  11626. Default: none<br>
  11627. Eg. <code>attr ESPxx adjustValue humidity:+0.1
  11628. temperature*:($VALUE-32)*5/9</code><br>
  11629. Eg. <code>attr ESPxx adjustValue
  11630. .*:my_OwnFunction($NAME,$READING,$VALUE)</code><br>
  11631. <br>
  11632. Sample function to ignore negative values:<br>
  11633. <code>
  11634. sub my_OwnFunction($$$) {<br>
  11635. &nbsp;&nbsp;my ($name,$reading,$value) = @_;<br>
  11636. &nbsp;&nbsp;return ($value < 0) ? undef : $value;<br>
  11637. }<br>
  11638. </code>
  11639. </li><br>
  11640. <li><a name="ESPEasy_device_attr_colorpicker">colorpicker</a><br>
  11641. Used to select colorpicker mode<br>
  11642. Possible values: RGB,HSV,HSVp<br>
  11643. Default: HSVp
  11644. </li><br>
  11645. <li><a name="ESPEasy_device_attr_colorpickerctcw">colorpickerCTcw</a><br>
  11646. Used to select ct colorpicker's cold white color temperature in Kelvin<br>
  11647. Possible values: &gt; colorpickerCTww<br>
  11648. Default: 6000
  11649. </li><br>
  11650. <li><a name="ESPEasy_device_attr_colorpickerctww">colorpickerCTww</a><br>
  11651. Used to select ct colorpicker's warm white color temperature in Kelvin<br>
  11652. Possible values: &lt; colorpickerCTcw<br>
  11653. Default: 2000
  11654. </li><br>
  11655. <li><a name="ESPEasy_device_attr_disable">disable</a><br>
  11656. Used to disable device<br>
  11657. Possible values: 0,1<br>
  11658. Default: 0
  11659. </li><br>
  11660. <li><a name="ESPEasy_device_attr_displaytextencode">displayTextEncode</a><br>
  11661. Used to disable url encoding for text that is send to oled/lcd displays.
  11662. Useful if you want to encode the text by yourself.<br>
  11663. Possible values: 0,1<br>
  11664. Default: 1 (enabled)
  11665. </li><br>
  11666. <li><a name="ESPEasy_device_attr_displaytextwidth">displayTextWidth</a><br>
  11667. Used to specify number of characters per display line.<br>
  11668. If set then all characters before and after the text on the same line will
  11669. be overwritten with spaces. Attribute
  11670. <a href="#ESPEasy_device_attr_displaytextencode">displayTextEncode</a> must not be
  11671. disabled to use this feature. A 128x64px display has 16 characters per
  11672. line if you are using a 8px font.<br>
  11673. Possible values: integer<br>
  11674. Default: 0 (disabled)
  11675. </li><br>
  11676. <li><a name="ESPEasy_device_attr_interval">Interval</a><br>
  11677. Used to set polling interval for presence check and GPIOs polling in
  11678. seconds. 0 will disable this feature.<br>
  11679. Possible values: secs &gt; 10.<br>
  11680. Default: 300
  11681. </li><br>
  11682. <li><a href="#IODev">IODev</a><br>
  11683. Used to select I/O device (ESPEasy Bridge).
  11684. </li><br>
  11685. <li><a name="ESPEasy_device_attr_maplightscmds">mapLightCmds</a><br>
  11686. Enable the following commands and map them to the specified ESPEasy
  11687. command: rgb, ct, pct, on, off, toggle, dim, line, one, all, fade,
  11688. colorfade, rainbow, kitt, comet, theatre, scan, dualscan, twinkle,
  11689. twinklefade, sparkle, wipe, fire, stop, fadetime, fadedelay, count, speed,
  11690. bgcolor. Ask the ESPEasy maintainer to add more if required.<br>
  11691. Needed to use FHEM's colorpicker or slider widgets to control a
  11692. rgb/ct/effect/... plugin.<br>
  11693. required values: <code>a valid set command</code><br>
  11694. eg. <code>attr &lt;esp&gt; mapLightCmds Lights</code>
  11695. </li><br>
  11696. <li><a name="ESPEasy_device_attr_presencecheck">presenceCheck</a><br>
  11697. Used to enable/disable presence check for ESPs<br>
  11698. Presence check determines the presence of a device by readings age. If any
  11699. reading of a device is newer than <a href="#ESPEasy_device_attr_interval">interval</a>
  11700. seconds then it is marked as being present. This kind of check works for
  11701. ESP devices in deep sleep too but require at least 1 reading that is
  11702. updated regularly. Therefore the ESP must send the corresponding data
  11703. regularly (ESP device option "delay").<br>
  11704. Possible values: 0,1<br>
  11705. Default: 1 (enabled)
  11706. </li><br>
  11707. <li><a name="ESPEasy_device_attr_readingswitchtext">readingSwitchText</a><br>
  11708. Use on,off instead of 1,0 for readings if ESP device is a switch.<br>
  11709. Possible values: 0,1<br>
  11710. Default: 1 (enabled)
  11711. </li><br>
  11712. <li><a name="ESPEasy_device_attr_setstate">setState</a><br>
  11713. Summarize received values in state reading.<br>
  11714. A positive number determines the number of characters used for abbreviated
  11715. reading names. Only readings with an age less than
  11716. <a href="#ESPEasy_device_attr_interval">interval</a> will be considered. If your are
  11717. not satisfied with format or behavior of setState then disable this
  11718. attribute (set to 0) and use global attributes userReadings and/or
  11719. stateFormat to get what you want.<br>
  11720. Possible values: integer &gt;=0<br>
  11721. Default: 3 (enabled with 3 characters abbreviation)
  11722. </li><br>
  11723. The following two attributes should only be use in cases where ESPEasy
  11724. software do not send data on status changes and no rule/dummy can be used
  11725. to do that. Useful for commands like PWM, STATUS, ...
  11726. <br><br>
  11727. <li><a name="ESPEasy_device_attr_parsecmdresponse">parseCmdResponse</a><br>
  11728. Used to parse response of commands like GPIO, PWM, STATUS, ...<br>
  11729. Specify a module command or comma separated list of commands as argument.
  11730. Commands are case insensitive.<br>
  11731. Only necessary if ESPEasy software plugins do not send their data
  11732. independently. Useful for commands like STATUS, PWM, ...<br>
  11733. Possible values: &lt;set cmd&gt;[,&lt;set cmd&gt;][,...]<br>
  11734. Default: status<br>
  11735. Eg. <code>attr ESPxx parseCmdResponse status,pwm</code>
  11736. </li><br>
  11737. <li><a name="ESPEasy_device_attr_pollgpios">pollGPIOs</a><br>
  11738. Used to enable polling for GPIOs status. This polling will do same as
  11739. command 'set ESPxx status &lt;device&gt; &lt;pin&gt;'<br>
  11740. Possible values: GPIO number or comma separated GPIO number list<br>
  11741. Default: none<br>
  11742. Eg. <code>attr ESPxx pollGPIOs 13,D7,D2</code>
  11743. </li>
  11744. <br>
  11745. The following two attributes control naming of readings that are
  11746. generated by help of parseCmdResponse and pollGPIOs (see above)
  11747. <br><br>
  11748. <li><a name="ESPEasy_device_attr_readingprefixgpio">readingPrefixGPIO</a><br>
  11749. Specifies a prefix for readings based on GPIO numbers. For example:
  11750. "set ESPxx pwm 13 512" will switch GPIO13 into pwm mode and set pwm to
  11751. 512. If attribute readingPrefixGPIO is set to PIN and attribut
  11752. <a href="#ESPEasy_device_attr_parsecmdresponse">parseCmdResponse</a> contains pwm
  11753. command then the reading name will be PIN13.<br>
  11754. Possible Values: <code>string</code><br>
  11755. Default: GPIO
  11756. </li><br>
  11757. <li><a name="ESPEasy_device_attr_readingsuffixgpiostate">readingSuffixGPIOState</a><br>
  11758. Specifies a suffix for the state-reading of GPIOs (see Attribute
  11759. <a href="#ESPEasy_device_attr_pollgpios">pollGPIOs</a>)<br>
  11760. Possible Values: <code>string</code><br>
  11761. Default: no suffix<br>
  11762. Eg. attr ESPxx readingSuffixGPIOState _state
  11763. </li><br>
  11764. <li>
  11765. <a href="#readingFnAttributes">readingFnAttributes</a>
  11766. </li><br>
  11767. <b>Experimental</b> (The following attributes can be changed or removed at
  11768. any time):<br><br>
  11769. <li><a name="ESPEasy_device_attr_rgbgpios">rgbGPIOs</a><br>
  11770. Use to define GPIOs your lamp is conneted to. Must be set to be able to
  11771. use <a href="#ESPEasy_device_set_rgb">rgb</a> set command.<br>
  11772. Possible values: Comma separated tripple of ESP pin numbers or arduino pin
  11773. names<br>
  11774. Eg: 12,13,15<br>
  11775. Eg: D6,D7,D8<br>
  11776. Default: none
  11777. </li><br>
  11778. </ul>
  11779. </ul>
  11780. <a name="ElectricityCalculator"></a>
  11781. <h3>ElectricityCalculator</h3>
  11782. <ul>
  11783. <table>
  11784. <tr>
  11785. <td>
  11786. The ElectricityCalculator Module calculates the electrical energy consumption and costs of one ore more electricity meters.<BR>
  11787. It is not a counter module itself but it requires a regular expression (regex or regexp) in order to know where to retrieve the counting ticks of one or more mechanical or electronic electricity meter.<BR>
  11788. <BR>
  11789. As soon the module has been defined within the fhem.cfg, the module reacts on every event of the specified counter like myOWDEVICE:counter.* etc.<BR>
  11790. <BR>
  11791. The ElectricityCalculator module provides several current, historical, statistical values around with respect to one or more electricity meter and creates respective readings.<BR>
  11792. <BR>
  11793. To avoid waiting for max. 12 months to have realistic values, the readings <BR>
  11794. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterDay1st</code>,<BR>
  11795. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMonth1st</code>,<BR>
  11796. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterYear1st</code> and<BR>
  11797. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMeter1st</code><BR>
  11798. must be corrected with real values by using the <code>setreading</code> - command.<BR>
  11799. These real values may be found on the last electricity bill. Otherwise it will take 24h for the daily, 30days for the monthly and up to 12 month for the yearly values to become realistic.<BR>
  11800. <BR>
  11801. Intervalls smaller than 10s will be discarded to avoid peaks due to fhem blockages (e.g. DbLog - reducelog).
  11802. <BR>
  11803. </td>
  11804. </tr>
  11805. </table>
  11806. <table><tr><td><a name="ElectricityCalculatorDefine"></a><b>Define</b></td></tr></table>
  11807. <table><tr><td><ul><code>define &lt;name&gt; ElectricityCalculator &lt;regex&gt;</code></ul></td></tr></table>
  11808. <ul><ul>
  11809. <table>
  11810. <tr><td><code>&lt;name&gt;</code> : </td><td>The name of the calculation device. (E.g.: "myElectricityCalculator")</td></tr>
  11811. <tr><td><code>&lt;regex&gt;</code> : </td><td>A valid regular expression (also known as regex or regexp) of the event where the counter can be found</td></tr>
  11812. </table>
  11813. </ul></ul>
  11814. <table><tr><td><ul>Example: <code>define myElectricityCalculator ElectricityCalculator myElectricityCounter:countersA.*</code></ul></td></tr></table>
  11815. <BR>
  11816. <table>
  11817. <tr><td><a name="ElectricityCalculatorSet"></a><b>Set</b></td></tr>
  11818. <tr><td>
  11819. <ul>
  11820. The set - function sets individual values for example to correct values after power loss etc.<BR>
  11821. The set - function works only for readings which have been stored in the CalculatorDevice.<BR>
  11822. The Readings being stored in the Counter - Device need to be changed individially with the <code>set</code> - command.<BR>
  11823. </ul>
  11824. </td></tr>
  11825. </table>
  11826. <BR>
  11827. <table>
  11828. <tr><td><a name="ElectricityCalculatorGet"></a><b>Get</b></td></tr>
  11829. <tr><td>
  11830. <ul>
  11831. The get - function just returns the individual value of the reading.<BR>
  11832. The get - function works only for readings which have been stored in the CalculatorDevice.<BR>
  11833. The Readings being stored in the Counter - Device need to be read individially with <code>get</code> - command.<BR>
  11834. </ul>
  11835. </td></tr>
  11836. </table>
  11837. <BR>
  11838. <table>
  11839. <tr><td><a name="ElectricityCalculatorAttr"></a><b>Attributes</b></td></tr>
  11840. <tr><td>
  11841. <ul>
  11842. If the below mentioned attributes have not been pre-defined completly beforehand, the program will create the ElectricityCalculator specific attributes with default values.<BR>
  11843. In addition the global attributes e.g. <a href="#room">room</a> can be used.<BR>
  11844. </ul>
  11845. </td></tr>
  11846. </table>
  11847. <ul><ul>
  11848. <table>
  11849. <tr>
  11850. <td>
  11851. <tr><td><li><code>BasicPricePerAnnum</code> : </li></td><td> A valid float number for basic annual fee in the chosen currency for the electricity supply to the home.<BR>
  11852. The value is provided by your local electricity supplier and is shown on your electricity bill.<BR>
  11853. For UK and US users it may known under "standing charge". Please make sure it is based on one year!<BR>
  11854. The default value is 0.00<BR>
  11855. </td></tr>
  11856. </td>
  11857. </tr>
  11858. </table>
  11859. </ul></ul>
  11860. <ul><ul>
  11861. <table>
  11862. <tr>
  11863. <td>
  11864. <tr><td><li><code>Currency</code> : </li></td><td> One of the pre-defined list of currency symbols [&#8364;,&#163;,&#36;].<BR>
  11865. The default value is &#8364;<BR>
  11866. </td></tr>
  11867. </td>
  11868. </tr>
  11869. </table>
  11870. </ul></ul>
  11871. <ul><ul>
  11872. <table>
  11873. <tr>
  11874. <td>
  11875. <tr><td><li><code>disable</code> : </li></td><td> Disables the current module. The module will not react on any events described in the regular expression.<BR>
  11876. The default value is 0 = enabled.<BR>
  11877. </td></tr>
  11878. </td>
  11879. </tr>
  11880. </table>
  11881. </ul></ul>
  11882. <ul><ul>
  11883. <table>
  11884. <tr>
  11885. <td>
  11886. <tr><td><li><code>ElectricityCounterOffset</code> : </li></td><td> A valid float number of the electric Energy difference = offset (not the difference of the counter ticks!) between the value shown on the mechanic meter for the electric energy and the calculated electric energy of the counting device.<BR>
  11887. The value for this offset will be calculated as follows W<sub>Offset</sub> = W<sub>Mechanical</sub> - W<sub>Module</sub><BR>
  11888. The default value is 0.00<BR>
  11889. </td></tr>
  11890. </td>
  11891. </tr>
  11892. </table>
  11893. </ul></ul>
  11894. <ul><ul>
  11895. <table>
  11896. <tr>
  11897. <td>
  11898. <tr><td><li><code>ElectricityKwhPerCounts</code> : </li></td><td> A valid float number of electric energy in kWh per counting ticks.<BR>
  11899. The value is given by the mechanical trigger of the mechanical electricity meter. E.g. ElectricityKwhPerCounts = 0.001 means each count is a thousandth of one kWh (=Wh).<BR>
  11900. Some electronic counter (E.g. HomeMatic HM-ES-TX-WM) providing the counted electric energy as Wh. Therfore this attribute must be 0.001 in order to transform it correctly to kWh.<BR>
  11901. The default value is 1 (= the counter is already providing kWh)<BR>
  11902. </td></tr>
  11903. </td>
  11904. </tr>
  11905. </table>
  11906. </ul></ul>
  11907. <ul><ul>
  11908. <table>
  11909. <tr>
  11910. <td>
  11911. <tr><td><li><code>ElectricityPricePerKWh</code> : </li></td><td> A valid float number for electric energy price in the chosen currency per kWh.<BR>
  11912. The value is provided by your local electricity supplier and is shown on your electricity bill.<BR>
  11913. The default value is 0.2567<BR>
  11914. </td></tr>
  11915. </td>
  11916. </tr>
  11917. </table>
  11918. </ul></ul>
  11919. <ul><ul>
  11920. <table>
  11921. <tr>
  11922. <td>
  11923. <tr><td><li><code>MonthlyPayment</code> : </li></td><td> A valid float number for monthly advance payments in the chosen currency towards the electricity supplier.<BR>
  11924. The default value is 0.00<BR>
  11925. </td></tr>
  11926. </td>
  11927. </tr>
  11928. </table>
  11929. </ul></ul>
  11930. <ul><ul>
  11931. <table>
  11932. <tr>
  11933. <td>
  11934. <tr><td><li><code>MonthOfAnnualReading</code> : </li></td><td> A valid integer number for the month when the mechanical electricity meter reading is performed every year.<BR>
  11935. The default value is 5 (May)<BR>
  11936. </td></tr>
  11937. </td>
  11938. </tr>
  11939. </table>
  11940. </ul></ul>
  11941. <ul><ul>
  11942. <table>
  11943. <tr>
  11944. <td>
  11945. <tr><td><li><code>ReadingDestination</code> : </li></td><td> One of the pre-defined list for the destination of the calculated readings: [CalculatorDevice,CounterDevice].<BR>
  11946. The CalculatorDevice is the device which has been created with this module.<BR>
  11947. The CounterDevice is the Device which is reading the mechanical Electricity-meter.<BR>
  11948. The default value is CalculatorDevice - Therefore the readings will be written into this device.<BR>
  11949. </td></tr>
  11950. </td>
  11951. </tr>
  11952. </table>
  11953. </ul></ul>
  11954. <ul><ul>
  11955. <table>
  11956. <tr>
  11957. <td>
  11958. <tr><td><li><code>SiPrefixPower</code> : </li></td><td> One value of the pre-defined list: W (Watt), kW (Kilowatt), MW (Megawatt) or GW (Gigawatt).<BR>
  11959. It defines which SI-prefix for the power value shall be used. The power value will be divided accordingly by multiples of 1000.
  11960. The default value is W (Watt).<BR>
  11961. </td></tr>
  11962. </td>
  11963. </tr>
  11964. </table>
  11965. </ul></ul>
  11966. <BR>
  11967. <table>
  11968. <tr><td><a name="ElectricityCalculatorReadings"></a><b>Readings</b></td></tr>
  11969. <tr><td>
  11970. <ul>
  11971. As soon the device has been able to read at least 2 times the counter, it automatically will create a set of readings:<BR>
  11972. The placeholder <code>&lt;DestinationDevice&gt;</code> is the device which has been chosen in the attribute <code>ReadingDestination</code> above. <BR> This will not appear if CalculatorDevice has been chosen.<BR>
  11973. The placeholder <code>&lt;SourceCounterReading&gt;</code> is the reading based on the defined regular expression where the counting ticks are coming from.<BR>
  11974. </ul>
  11975. </td></tr>
  11976. </table>
  11977. <ul><ul>
  11978. <table>
  11979. <tr>
  11980. <td>
  11981. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterCurrent</code> : </li></td><td>Current indicated total electric energy consumption as shown on mechanical electricity meter. Correct Offset-attribute if not identical.<BR>
  11982. </td></tr>
  11983. </td>
  11984. </tr>
  11985. </table>
  11986. </ul></ul>
  11987. <ul><ul>
  11988. <table>
  11989. <tr>
  11990. <td>
  11991. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterDay1st</code> : </li></td><td>The first meter reading after midnight.<BR>
  11992. </td></tr>
  11993. </td>
  11994. </tr>
  11995. </table>
  11996. </ul></ul>
  11997. <ul><ul>
  11998. <table>
  11999. <tr>
  12000. <td>
  12001. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterDayLast</code> : </li></td><td>The last meter reading of the previous day.<BR>
  12002. </td></tr>
  12003. </td>
  12004. </tr>
  12005. </table>
  12006. </ul></ul>
  12007. <ul><ul>
  12008. <table>
  12009. <tr>
  12010. <td>
  12011. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMonth1st</code> : </li></td><td>The first meter reading after midnight of the first day of the month.<BR>
  12012. </td></tr>
  12013. </td>
  12014. </tr>
  12015. </table>
  12016. </ul></ul>
  12017. <ul><ul>
  12018. <table>
  12019. <tr>
  12020. <td>
  12021. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMonthLast</code> : </li></td><td>The last meter reading of the previous month.<BR>
  12022. </td></tr>
  12023. </td>
  12024. </tr>
  12025. </table>
  12026. </ul></ul>
  12027. <ul><ul>
  12028. <table>
  12029. <tr>
  12030. <td>
  12031. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMeter1st</code> : </li></td><td>The first meter reading after midnight of the first day of the month where the mechanical meter is read by the electricity supplier.<BR>
  12032. </td></tr>
  12033. </td>
  12034. </tr>
  12035. </table>
  12036. </ul></ul>
  12037. <ul><ul>
  12038. <table>
  12039. <tr>
  12040. <td>
  12041. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMeterLast</code> : </li></td><td>The last meter reading of the previous meter reading year.<BR>
  12042. </td></tr>
  12043. </td>
  12044. </tr>
  12045. </table>
  12046. </ul></ul>
  12047. <ul><ul>
  12048. <table>
  12049. <tr>
  12050. <td>
  12051. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterYear1st</code> : </li></td><td>The first meter reading after midnight of the first day of the year.<BR>
  12052. </td></tr>
  12053. </td>
  12054. </tr>
  12055. </table>
  12056. </ul></ul>
  12057. <ul><ul>
  12058. <table>
  12059. <tr>
  12060. <td>
  12061. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterYearLast</code> : </li></td><td>The last meter reading of the previous year.<BR>
  12062. </td></tr>
  12063. </td>
  12064. </tr>
  12065. </table>
  12066. </ul></ul>
  12067. <ul><ul>
  12068. <table>
  12069. <tr>
  12070. <td>
  12071. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostDayLast</code> : </li></td><td>Energy costs of the last day.<BR>
  12072. </td></tr>
  12073. </td>
  12074. </tr>
  12075. </table>
  12076. </ul></ul>
  12077. <ul><ul>
  12078. <table>
  12079. <tr>
  12080. <td>
  12081. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMeterLast</code> : </li></td><td>Energy costs in the chosen currency of the last electricity meter period.<BR>
  12082. </td></tr>
  12083. </td>
  12084. </tr>
  12085. </table>
  12086. </ul></ul>
  12087. <ul><ul>
  12088. <table>
  12089. <tr>
  12090. <td>
  12091. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMonthLast</code> : </li></td><td>Energy costs in the chosen currency of the last month.<BR>
  12092. </td></tr>
  12093. </td>
  12094. </tr>
  12095. </table>
  12096. </ul></ul>
  12097. <ul><ul>
  12098. <table>
  12099. <tr>
  12100. <td>
  12101. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostYearLast</code> : </li></td><td>Energy costs of the last calendar year.<BR>
  12102. </td></tr>
  12103. </td>
  12104. </tr>
  12105. </table>
  12106. </ul></ul>
  12107. <ul><ul>
  12108. <table>
  12109. <tr>
  12110. <td>
  12111. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostDay</code> : </li></td><td>Energy consumption in kWh since the beginning of the current day (midnight).<BR>
  12112. </td></tr>
  12113. </td>
  12114. </tr>
  12115. </table>
  12116. </ul></ul>
  12117. <ul><ul>
  12118. <table>
  12119. <tr>
  12120. <td>
  12121. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMeter</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the month of where the last electricity meter reading has been performed by the electricity supplier.<BR>
  12122. </td></tr>
  12123. </td>
  12124. </tr>
  12125. </table>
  12126. </ul></ul>
  12127. <ul><ul>
  12128. <table>
  12129. <tr>
  12130. <td>
  12131. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMonth</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current month.<BR>
  12132. </td></tr>
  12133. </td>
  12134. </tr>
  12135. </table>
  12136. </ul></ul>
  12137. <ul><ul>
  12138. <table>
  12139. <tr>
  12140. <td>
  12141. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostYear</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current year.<BR>
  12142. </td></tr>
  12143. </td>
  12144. </tr>
  12145. </table>
  12146. </ul></ul>
  12147. <ul><ul>
  12148. <table>
  12149. <tr>
  12150. <td>
  12151. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyDay</code> : </li></td><td>Energy consumption in kWh since the beginning of the current day (midnight).<BR>
  12152. </td></tr>
  12153. </td>
  12154. </tr>
  12155. </table>
  12156. </ul></ul>
  12157. <ul><ul>
  12158. <table>
  12159. <tr>
  12160. <td>
  12161. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyDayLast</code> : </li></td><td>Total Energy consumption in kWh of the last day.<BR>
  12162. </td></tr>
  12163. </td>
  12164. </tr>
  12165. </table>
  12166. </ul></ul>
  12167. <ul><ul>
  12168. <table>
  12169. <tr>
  12170. <td>
  12171. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMeter</code> : </li></td><td>Energy consumption in kWh since the beginning of the month of where the last electricity-meter reading has been performed by the Electricity supplier.<BR>
  12172. </td></tr>
  12173. </td>
  12174. </tr>
  12175. </table>
  12176. </ul></ul>
  12177. <ul><ul>
  12178. <table>
  12179. <tr>
  12180. <td>
  12181. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMeterLast</code> : </li></td><td>Total Energy consumption in kWh of the last electricity-meter reading period.<BR>
  12182. </td></tr>
  12183. </td>
  12184. </tr>
  12185. </table>
  12186. </ul></ul>
  12187. <ul><ul>
  12188. <table>
  12189. <tr>
  12190. <td>
  12191. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMonth</code> : </li></td><td>Energy consumption in kWh since the beginning of the current month (midnight of the first).<BR>
  12192. </td></tr>
  12193. </td>
  12194. </tr>
  12195. </table>
  12196. </ul></ul>
  12197. <ul><ul>
  12198. <table>
  12199. <tr>
  12200. <td>
  12201. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMonthLast</code> : </li></td><td>Total Energy consumption in kWh of the last month.<BR>
  12202. </td></tr>
  12203. </td>
  12204. </tr>
  12205. </table>
  12206. </ul></ul>
  12207. <ul><ul>
  12208. <table>
  12209. <tr>
  12210. <td>
  12211. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyYear</code> : </li></td><td>Energy consumption in kWh since the beginning of the current year (midnight of the first).<BR>
  12212. </td></tr>
  12213. </td>
  12214. </tr>
  12215. </table>
  12216. </ul></ul>
  12217. <ul><ul>
  12218. <table>
  12219. <tr>
  12220. <td>
  12221. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyYearLast</code> : </li></td><td>Total Energy consumption in kWh of the last calendar year.<BR>
  12222. </td></tr>
  12223. </td>
  12224. </tr>
  12225. </table>
  12226. </ul></ul>
  12227. <ul><ul>
  12228. <table>
  12229. <tr>
  12230. <td>
  12231. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_FinanceReserve</code> : </li></td><td>Financial Reserve based on the advanced payments done on the first of every month towards the Electricity supplier. With negative values, an additional payment is to be expected.<BR>
  12232. </td></tr>
  12233. </td>
  12234. </tr>
  12235. </table>
  12236. </ul></ul>
  12237. <ul><ul>
  12238. <table>
  12239. <tr>
  12240. <td>
  12241. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_MonthMeterReading</code> : </li></td><td>Number of month since last meter reading. The month when the reading occured is the first month = 1.<BR>
  12242. </td></tr>
  12243. </td>
  12244. </tr>
  12245. </table>
  12246. </ul></ul>
  12247. <ul><ul>
  12248. <table>
  12249. <tr>
  12250. <td>
  12251. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerCurrent</code> : </li></td><td>Current electric Power. (Average Power between current and previous measurement.)<BR>
  12252. </td></tr>
  12253. </td>
  12254. </tr>
  12255. </table>
  12256. </ul></ul>
  12257. <ul><ul>
  12258. <table>
  12259. <tr>
  12260. <td>
  12261. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerDayAver</code> : </li></td><td>Average electric Power since midnight.<BR>
  12262. </td></tr>
  12263. </td>
  12264. </tr>
  12265. </table>
  12266. </ul></ul>
  12267. <ul><ul>
  12268. <table>
  12269. <tr>
  12270. <td>
  12271. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerDayMax</code> : </li></td><td>Maximum Power peak since midnight.<BR>
  12272. </td></tr>
  12273. </td>
  12274. </tr>
  12275. </table>
  12276. </ul></ul>
  12277. <ul><ul>
  12278. <table>
  12279. <tr>
  12280. <td>
  12281. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerDayMin</code> : </li></td><td>Minimum Power peak since midnight.<BR>
  12282. </td></tr>
  12283. </td>
  12284. </tr>
  12285. </table>
  12286. </ul></ul>
  12287. </ul>
  12288. <a name="EleroDrive"></a>
  12289. <h3>EleroDrive</h3>
  12290. <ul>
  12291. This mudule implements an Elero drive. It uses EleroStick as IO-Device.
  12292. <br><br>
  12293. <a name="EleroDrive_Define"></a>
  12294. <b>Define</b>
  12295. <ul>
  12296. <code>define &lt;name&gt; EleroDrive &lt;channel&gt;</code> <br>
  12297. &lt;channel&gt; specifies the channel of the transmitter stick that shall be used.
  12298. <br><br>
  12299. </ul>
  12300. <a name="EleroDrive_Set"></a>
  12301. <b>Set</b>
  12302. <ul>
  12303. <li>moveDown<br>
  12304. </li>
  12305. <li>moveUp<br>
  12306. </li>
  12307. <li>stop<br>
  12308. </li>
  12309. <li>moveIntermediate<br>
  12310. </li>
  12311. <li>moveTilt<br>
  12312. </li>
  12313. <li>refresh<br>
  12314. </li>
  12315. </ul>
  12316. <br>
  12317. <a name="EleroDrive_Get"></a>
  12318. <b>Get</b>
  12319. <ul>
  12320. <li>no gets<br>
  12321. </li><br>
  12322. </ul>
  12323. <a name="EleroDrive_Attr"></a>
  12324. <b>Attributes</b>
  12325. <ul>
  12326. <li>IODev<br>
  12327. The name of the IO-Device, normally the name of the EleroStick definition</li>
  12328. <li>TopToBottomTime<br>
  12329. The time in seconds this drive needs for a complete run from the top to the bottom or vice versa</li>
  12330. <li>IntermediatePercent<br>
  12331. Percent open when in intermediate position</li>
  12332. <li>TiltPercent<br>
  12333. Percent open when in tilt position</li>
  12334. </ul><br>
  12335. <a name="EleroDrive_Readings"></a>
  12336. <b>Readings</b>
  12337. <ul>
  12338. <li>position<br>
  12339. Current position of the drive (top_position, bottom_position, ...)</li>
  12340. <li>percentClosed<br>
  12341. 0 ... 100<br>
  12342. 100 is completely closed, 0 is completely open</li>
  12343. </ul><br>
  12344. </ul>
  12345. <a name="EleroStick"></a>
  12346. <h3>EleroStick</h3>
  12347. <ul>
  12348. This module provides the IODevice for EleroDrive and other future modules that implement Elero components<br>
  12349. It handles the communication with an "Elero Transmitter Stick"
  12350. <br><br>
  12351. <a name="EleroStick_Define"></a>
  12352. <b>Define</b>
  12353. <ul>
  12354. <li>
  12355. <code>define &lt;name&gt; EleroStick &lt;port&gt;</code> <br>
  12356. &lt;port&gt; specifies the serial port where the transmitter stick is attached.<br>
  12357. The name of the serial-device depends on your OS. Example: /dev/ttyUSB1@38400<br>
  12358. The baud rate must be 38400 baud.<br><br>
  12359. </li>
  12360. </ul>
  12361. <a name="EleroStick_Set"></a>
  12362. <b>Set</b>
  12363. <ul>
  12364. <li>no sets<br>
  12365. </li><br>
  12366. </ul>
  12367. <a name="EleroStick_Get"></a>
  12368. <b>Get</b>
  12369. <ul>
  12370. <li>no gets<br>
  12371. </li><br>
  12372. </ul>
  12373. <a name="EleroStick_Attr"></a>
  12374. <b>Attributes</b>
  12375. <ul>
  12376. <li>Clients<br>
  12377. The received data gets distributed to a client (e.g. EleroDrive, ...) that handles the data.
  12378. This attribute tells, which are the clients, that handle the data. If you add a new module to FHEM, that shall handle
  12379. data distributed by the EleroStick module, you must add it to the Clients attribute.
  12380. </li>
  12381. <br>
  12382. <li>MatchList<br>
  12383. The MatchList defines, which data shall be distributed to which device.<br>
  12384. It can be set to a perl expression that returns a hash that is used as the MatchList<br>
  12385. Example: <code>attr myElero MatchList {'1:EleroDrive' => '.*'}</code>
  12386. </li>
  12387. <br>
  12388. <li>ChannelTimeout<br>
  12389. The delay, how long the modul waits for an answer after sending a command to a drive.<br>
  12390. Default is 5 seconds.
  12391. </li>
  12392. <br>
  12393. <li>Delay<br>
  12394. If something like structure send commands very fast, Delay (seconds) throttles the transmission down that the Elero-system gets time to handle each command.
  12395. </li>
  12396. <br>
  12397. <li>DisableTimer<br>
  12398. Disables the periodically request of the status. Should normally not be set to 1.
  12399. </li>
  12400. <br>
  12401. <li>SwitchChannels<br>
  12402. Comma separated list of channels that are a switch device.
  12403. </li>
  12404. <br>
  12405. <li>Interval<br>
  12406. When all channels are checkt, this number of seconds will be waited, until the channels will be checked again.<br>
  12407. Default is 60 seconds.
  12408. </li><br>
  12409. </ul>
  12410. <a name="EleroStick_Readings"></a>
  12411. <b>Readings</b>
  12412. <ul>
  12413. <li>state<br>
  12414. disconnected or opened if a transmitter stick is connected</li>
  12415. <li>SendType<br>
  12416. Type of the last command sent to the stick</li>
  12417. <li>SendMsg<br>
  12418. Last command sent to the stick</li>
  12419. <li>AnswerType<br>
  12420. Type of the last Answer received from the stick</li>
  12421. <li>AnswerMsg<br>
  12422. Last Answer received from the stick</li>
  12423. </ul><br>
  12424. </ul>
  12425. <a name="EleroSwitch"></a>
  12426. <h3>EleroSwitch</h3>
  12427. <ul>
  12428. This mudule implements an Elero switch. It uses EleroStick as IO-Device.
  12429. <br><br>
  12430. <a name="EleroSwitch_Define"></a>
  12431. <b>Define</b>
  12432. <ul>
  12433. <code>define &lt;name&gt; EleroSwitch &lt;channel&gt;</code> <br>
  12434. &lt;channel&gt; specifies the channel of the transmitter stick that shall be used.
  12435. <br><br>
  12436. </ul>
  12437. <a name="EleroSwitch_Set"></a>
  12438. <b>Set</b>
  12439. <ul>
  12440. <li>on<br>
  12441. </li>
  12442. <li>off<br>
  12443. </li>
  12444. <li>dim1<br>
  12445. </li>
  12446. <li>dim2<br>
  12447. </li>
  12448. <li>refresh<br>
  12449. </li>
  12450. </ul>
  12451. <br>
  12452. <a name="EleroSwitch_Get"></a>
  12453. <b>Get</b>
  12454. <ul>
  12455. <li>no gets<br>
  12456. </li><br>
  12457. </ul>
  12458. <a name="EleroSwitch_Attr"></a>
  12459. <b>Attributes</b>
  12460. <ul>
  12461. <li>IODev<br>
  12462. The name of the IO-Device, normally the name of the EleroStick definition</li>
  12463. </ul><br>
  12464. <a name="EleroSwitch_Readings"></a>
  12465. <b>Readings</b>
  12466. <ul>
  12467. <li>state<br>
  12468. Current state of the switch (on, off, dim1, dim2)</li>
  12469. </ul><br>
  12470. </ul>
  12471. <a name="EnOcean"></a>
  12472. <h3>EnOcean</h3>
  12473. <ul><br>
  12474. <b>Quick Links</b>
  12475. <ul>
  12476. <li><a href="#EnOceanget">Get Commands</a></li>
  12477. <li><a href="#EnOceanset">Set Commands</a></li>
  12478. <li><a href="#EnOceanattr">Attributes</a></li>
  12479. <li><a href="#EnOceanevents">Generated Events</a></li>
  12480. </ul><br><br>
  12481. EnOcean devices are sold by numerous hardware vendors (e.g. Eltako, Peha, etc),
  12482. using the RF Protocol provided by the EnOcean Alliance.<br><br>
  12483. Depending on the function of the device an specific device profile is used, called
  12484. EnOcean Equipment Profile (EEP). The specific definition of a device is referenced by
  12485. the EEP (RORG-FUNC-TYPE). Basically four groups (RORG) will be differed, e. g.
  12486. RPS (switches), 1BS (contacts), 4BS, VLD (sensors and controller). Some manufacturers use
  12487. additional proprietary extensions. RORG MSC is not supported except for few exceptions.
  12488. Further technical information can be found at the
  12489. <a href="http://www.enocean-alliance.org/de/enocean_standard/">EnOcean Alliance</a>,
  12490. see in particular the
  12491. <a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a>
  12492. <br><br>
  12493. The supplementary Generic Profiles approach instead defines a language to communicate the
  12494. transmitted data types and ranges. The devices becomes self describing on their data
  12495. structures in communication. The Generic Profiles include a language definition with
  12496. a parameter selection that covers every possible measured value to be transmitted.
  12497. Therefore, the approach does not only define parameters for the value recalculation algorithm
  12498. but also includes specific signal definition. (e.g. physical units). Further technical
  12499. information can be found at the
  12500. <a href="https://www.enocean-alliance.org/fileadmin/redaktion/enocean_alliance/pdf/GenericProfiles_V1_Extract.pdf">Generic Profiles 1.0 Abstract</a>
  12501. <br><br>
  12502. Smart Acknowledge (Smart Ack) enables a special bidirectional communication. The communication is managed by a
  12503. Controller that responds to the devices telegrams with acknowledges. Smart Ack is a bidirectional communication
  12504. protocol between two actors. At least one actor must be an energy autarkic Sensor, and at least one must be a line
  12505. powered Controller (Fhem). A sensor sends its data and expects the answer telegram in a predefined very short
  12506. time slot. In this time Sensors receiver is active. For this purpose we declare a Post Master with Mail Boxes.
  12507. A Mail Box is like a letter box for a Sensor and it specific to a single sender. Telegrams from Fhem are collected
  12508. into the Mail Box. A Sensor can reclaim telegrams that are in his Mail Box.
  12509. <br><br>
  12510. Fhem recognizes a number of devices automatically. In order to teach-in, for
  12511. some devices the sending of confirmation telegrams has to be turned on.
  12512. Some equipment types and/or device models must be manually specified.
  12513. Do so using the <a href="#EnOceanattr">attributes</a>
  12514. <a href="#subType">subType</a> and <a href="#model">model</a>, see chapter
  12515. <a href="#EnOceanset">Set</a> and
  12516. <a href="#EnOceanevents">Generated events</a>. With the help of additional
  12517. <a href="#EnOceanattr">attributes</a>, the behavior of the devices can be
  12518. changed separately.
  12519. <br><br>
  12520. Fhem and the EnOcean devices must be trained with each other. To this, Fhem
  12521. must be in the learning mode, see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>,
  12522. <a href="#EnOcean_smartAck">Smart Ack Learning</a> and <a href="#TCM_learningMode">learningMode</a>.
  12523. The teach-in procedure depends on the type of the devices.
  12524. <br><br>
  12525. Switches (EEP RPS) and contacts (EEP 1BS) are recognized when receiving the first message.
  12526. Contacts can also send a teach-in telegram. Fhem not need this telegram.
  12527. Sensors (EEP 4BS) has to send a teach-in telegram. The profile-less
  12528. 4BS teach-in procedure transfers no EEP profile identifier and no manufacturer
  12529. ID. In this case Fhem does not recognize the device automatically. The proper
  12530. device type must be set manually, use the <a href="#EnOceanattr">attributes</a>
  12531. <a href="#subType">subType</a>, <a href="#manufID">manufID</a> and/or
  12532. <a href="#model">model</a>. If the EEP profile identifier and the manufacturer
  12533. ID are sent the device is clearly identifiable. Fhem automatically assigns
  12534. these devices to the correct profile.
  12535. <br><br>
  12536. 4BS devices can also be taught in special cases by using of confirmation telegrams. This method
  12537. is used for the EnOcean Tipp-Funk devices. The function is activated via the attribute [<a href="#EnOcean_teachMethod">teachMethod</a>] = confirm.<br>
  12538. For example the remote device Eltako TF100D can be learned as follows
  12539. <ul><br>
  12540. <code>define &lt;name&gt; EnOcean H5-38-08</code><br>
  12541. set TF100D in learning mode<br>
  12542. <code>set &lt;name&gt; teach</code>
  12543. </ul>
  12544. <br>
  12545. Some 4BS, VLD or MSC devices must be paired bidirectional,
  12546. see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.
  12547. <br><br>
  12548. Devices that communicate encrypted, has to taught-in through specific procedures.
  12549. <br><br>
  12550. Smart Ack Learning is a futher process where devices exchange information about each
  12551. other in order to create the logical links in the EnOcean network and a Post Master Mail Box.
  12552. It can result in Learn In or Learn Out, see <a href="#EnOcean_smartAck">Smart Ack Learning</a>.
  12553. <br><br>
  12554. Fhem supports many of most common EnOcean profiles and manufacturer-specific
  12555. devices. Additional profiles and devices can be added if required.
  12556. <br><br>
  12557. In order to enable communication with EnOcean remote stations a
  12558. <a href="#TCM">TCM</a> module is necessary.
  12559. <br><br>
  12560. Please note that EnOcean repeaters also send Fhem data telegrams again.
  12561. Use the TCM <code>attr &lt;name&gt; <a href="#blockSenderID">blockSenderID</a> own</code>
  12562. to block receiving telegrams with a TCM SenderIDs.
  12563. <br><br>
  12564. <b>Observing Functions</b><br>
  12565. <ul>
  12566. Interference or overloading of the radio transmission can prevent the reception of Fhem
  12567. commands at the receiver. With the help of the observing function Fhem checks the reception
  12568. of the acknowledgment telegrams of the actuator. If within one second no acknowledgment
  12569. telegram is received, the last set command is sent again.
  12570. The set command is repeated a maximum of 5 times. The maximum number can be specified in the attribute
  12571. <a href="#EnOcean_observeCmdRepetition">observeCmdRepetition</a>.<br>
  12572. The function can only be used if the actuator immediately after the reception of
  12573. the set command sends an acknowledgment message.<br>
  12574. The observing function is turned on by the Attribute <a href="#EnOcean_observe">observe.</a>
  12575. In addition, further devices can be monitored. The names of this devices can be entered in the
  12576. <a href="#EnOcean_observeRefDev">observeRefDev</a> attribute. If additional device are specified,
  12577. the monitoring is stopped as soon as the first acknowledgment telegram of one of the devices was received (OR logic).
  12578. If the <a href="#EnOcean_observeLogic">observeLogic</a> attribute is set to "and", the monitoring is stopped when a telegram
  12579. was received by all devices (AND logic). Please note that the name of the own device has also to be entered in the
  12580. <a href="#EnOcean_observeRefDev">observeRefDev</a> if required.<br>
  12581. If the maximum number of retries is reached and still no all acknowledgment telegrams has been received, the reading
  12582. "observeFailedDev" shows the faulty devices and the command can be executed, that is stored in the
  12583. <a href="#EnOcean_observeErrorAction">observeErrorAction</a> attribute.
  12584. <br><br>
  12585. </ul>
  12586. <b>Energy Management</b><br>
  12587. <ul>
  12588. <li><a href="#demand_response">Demand Response</a> (EEP A5-37-01)</li>
  12589. Demand Response (DR) is a standard to allow utility companies to send requests for reduction in power
  12590. consumption during peak usage times. It is also used as a means to allow users to reduce overall power
  12591. comsumption as energy prices increase. The EEP was designed with a very flexible setting for the level
  12592. (0...15) as well as a default level whereby the transmitter can specify a specific level for all
  12593. controllers to use (0...100 % of either maximum or current power output, depending on the load type).
  12594. The profile also includes a timeout setting to indicate how long the DR event should last if the
  12595. DR transmitting device does not send heartbeats or subsequent new DR levels.<br>
  12596. The DR actor controls the target actuators such as switches, dimmers etc. The DR actor
  12597. is linked to the FHEM target actors via the attribute <a href="#EnOcean_demandRespRefDev">demandRespRefDev</a>.<br>
  12598. <ul>
  12599. <li>Standard actions are available for the following profiles:</li>
  12600. <ul>
  12601. <li>switch (setting the switching command for min, max by the attribute <a href="#EnOcean_demandRespMin">demandRespMin</a>,
  12602. <a href="#EnOcean_demandRespMax">demandRespMax</a>)</li>
  12603. <li>gateway/switching (on, off)</li>
  12604. <li>gateway/dimming (dim 0...100, relative to the max or current set value)</li>
  12605. <li>lightCtrl.01 (dim 0...255)</li>
  12606. <li>actuator.01 (dim 0...100)</li>
  12607. <li>roomSensorControl.01 (setpoint 0...255)</li>
  12608. <li>roomSensorControl.05 (setpoint 0...255 or nightReduction 0...5 for Eltako devices)</li>
  12609. <li>roomCtrlPanel.00 (roomCtrlMode comfort|economy)</li>
  12610. </ul>
  12611. <li>On the target actuator can be specified alternatively a freely definable command.
  12612. The command sequence is stored in the attribute <a href="#EnOcean_demandRespAction">demandRespAction</a>.
  12613. The command sequence can be designed similar to "notify". For the command sequence predefined variables can be used,
  12614. eg. $LEVEL. This actions can be executed very flexible depending on the given energy
  12615. reduction levels.
  12616. </li>
  12617. <li>Alternatively or additionally, a custom command sequence in the DR profile itself
  12618. can be stored.
  12619. </li>
  12620. </ul>
  12621. The profile has a master and slave mode.
  12622. <ul>
  12623. <li>In slave mode, demand response data telegrams received eg a control unit of the power utility,
  12624. evaluated and the corresponding commands triggered on the linked target actuators. The behavior in
  12625. slave mode can be changed by multiple attributes.
  12626. </li>
  12627. <li>In master mode, the demand response level is set by set commands and thus sends a corresponding
  12628. data telegram and the associated target actuators are controlled. The demand response control
  12629. value are specified by "level", "power", "setpoint" "max" or "min". Each other settings are
  12630. calculated proportionally. In normal operation, ie without power reduction, the control value (level)
  12631. is 15. Through the optional parameters "powerUsageScale", "randomStart", "randomEnd" and "timeout"
  12632. the control behavior can be customized. The threshold at which the reading "powerUsageLevel"
  12633. between "min" and "max" switch is specified with the attribute
  12634. <a href="#EnOcean_demandRespThreshold">demandRespThreshold</a>.
  12635. </li>
  12636. </ul>
  12637. Additional information about the profile itself can be found in the EnOcean EEP documentation.
  12638. <br><br>
  12639. </ul>
  12640. <b>Remote Management</b><br>
  12641. <ul>
  12642. Remote Management allows EnOcean devices to be configured and maintained over the air.
  12643. Thanks to Remote Management, sensors or switches IDs, for instance, can be stored or deleted from
  12644. already installed actuators or gateways which are hard to access. Remote Management also allows querying
  12645. debug information from the Remote Device and calling some manufacturer implemented functions.<br>
  12646. Remote Management is performed by the Remote Manager, operated by the actor, on the
  12647. managed Remote Device (Sensor, Gateway). The management is done through a series of
  12648. commands and responding answers. Actor sends the commands to the Remote Device. Remote
  12649. Device sends answers to the actor. The commands indicate the Remote Device what to do.
  12650. Remote Device answers if requested by the command. The commands belong to one of the
  12651. main use case categories, which are:
  12652. <ul>
  12653. <li>Security</li>
  12654. <li>Locate / indentify remote device</li>
  12655. <li>Get status</li>
  12656. <li>Extended function</li>
  12657. </ul>
  12658. The management is often done with a group of Remote Devices. Commands are sent as
  12659. addressed unicast telegrams, usually. In special cases broadcast transmission is also available.
  12660. To avoid telegram collisions the Remote Devices respond to broadcast commands with a
  12661. random delay.<br>
  12662. The Security, Locate, and Get Status options provide to the actor basic operability of Remote
  12663. management. Their purpose is to ensure the proper work of Remote Management when
  12664. operating with several Remote Devices. These functions behave in the same way on every
  12665. Remote Device. Every product that supports Remote Management provides these options.<br>
  12666. Extended functions provide the real benefit of Remote Management. They vary from Remote
  12667. Device to Remote Device. They depend on how and where the Remote Device is used.
  12668. Therefore, not every Remote Device provides every extended function. It depends on the
  12669. programmer / customer what extended functions he wants to add. There is a list of specified
  12670. commands, but the manufacturer can also add manufacturer specific extended functions. These
  12671. functions are identified by the manufacturer ID.<br>
  12672. More information can be found on the <a href="http://www.enocean.com">EnOcean websites</a>.<br><ber>
  12673. Fhem operates primarily as a remote manager. For tests but also a client device can be created.
  12674. <br><br>
  12675. The remote manager function must be activated for the desired device by
  12676. <ul><br>
  12677. <code>attr &lt;remote device name&gt; remote manager</code><br>
  12678. </ul>
  12679. <br><br>
  12680. The remote client device must be defined as follows<br>
  12681. <ul><br>
  12682. <code>define &lt;client name&gt; EnOcean C5-00-00</code><br>
  12683. </ul><br>
  12684. and has to by unlocked for t seconds
  12685. <ul><br>
  12686. <code>set &lt;client name&gt; unlock &lt;t/s&gt;</code><br>
  12687. </ul><br>
  12688. Only one remote management client device should be defined.<br><br>
  12689. For security reasons the remote management commands can only be accessed in the unlock
  12690. period. The period can be entered in two cases:
  12691. <ul>
  12692. <li>Within 30min after device power-up if no CODE is set</li>
  12693. <li>Within 30min after an unlock command with a correct 32bit security code is received</li>
  12694. </ul>
  12695. The unlock/lock period can be accessed only with the security code. The security code can be
  12696. set whenever the Remote Device accepts remote management commands.<br>
  12697. When the Remote Device is locked it does not respond to any command, but unlock and ping.
  12698. When a wrong security code is received the Remote Device does not process unlock commands
  12699. for a security period of 30 seconds.<br>
  12700. Security code=0x000000 is the default value and has to be interpreted as: no CODE has been
  12701. set. The actor can also set the security code to 0x000000 from a previously set value. If no
  12702. security code is set, unlock after the unlock period is not processed. Only ping will be
  12703. processed. Remote Management is not available until next power up. 0xFFFFFFFF is reserved
  12704. and can not be used as security code.<br><br>
  12705. To administrate a remote device whose Remote ID must be known. The Remote ID can be determined
  12706. as follows:
  12707. <ul><br>
  12708. <code>attr &lt;name&gt; remote manager</code><br>
  12709. power-up the remote device<br>
  12710. <code>get &lt;name&gt; remoteID</code><br><br>
  12711. </ul>
  12712. All commands are described in the remote management chapters of the <a href="#EnOcean_remoteSet">set</a>-
  12713. and <a href="#EnOcean_remoteGet">get</a>-commands.<br><br>
  12714. The Remote Management Function is configured using the following attributes:<br>
  12715. <ul>
  12716. <li><a href="#EnOcean_remoteCode">remoteCode</a></li>
  12717. <li><a href="#EnOcean_remoteEEP">remoteEEP</a></li>
  12718. <li><a href="#EnOcean_remoteID">remoteID</a></li>
  12719. <li><a href="#EnOcean_remoteManagement">remoteManagement</a></li>
  12720. <li><a href="#EnOcean_remoteManufID">remoteManufID</a></li>
  12721. </ul><br>
  12722. The content of events is described in the chapter <a href="#EnOcean_remoteEvents">Remote Management Events</a><br><br>.
  12723. The following extended functions are supported:
  12724. <ul>
  12725. <li>210:remoteLinkTableInfo</li>
  12726. <li>211:remoteLinkTable</li>
  12727. <li>212:remoteLinkTable</li>
  12728. <li>213:remoteLinkTableGP</li>
  12729. <li>214:remoteLinkTableGP</li>
  12730. <li>220:remoteLearnMode</li>
  12731. <li>221:remoteTeach</li>
  12732. <li>224:remoteReset</li>
  12733. <li>225:remoteRLT</li>
  12734. <li>226:remoteApplyChanges</li>
  12735. <li>227:remoteProductID</li>
  12736. <li>230:remoteDevCfg</li>
  12737. <li>231:remoteDevCfg</li>
  12738. <li>232:remoteLinkCfg</li>
  12739. <li>233:remoteLinkCfg</li>
  12740. <li>240:remoteAck</li>
  12741. <li>250:remoteRepeater</li>
  12742. <li>251:remoteRepeater</li>
  12743. <li>252:remoteRepeaterFilter</li>
  12744. </ul>
  12745. <br><br>
  12746. </ul>
  12747. <b>Radio Link Test</b><br>
  12748. <ul>
  12749. Units supporting the Radio Link Test (RLT) shall offer a functionality that allows for radio link testing between them
  12750. (Position A to Position B, point-to-point only). Fhem support at least 1BS and 4BS test messages. When two units
  12751. perform radio link testing one unit needs to act in a mode called RLT Master and the other unit needs to act in
  12752. a mode called RLT Slave. Fhem acts as RLT Master (subType radioLinkTest).<br>
  12753. The Radio Link Test device must be defined as follows<br>
  12754. <ul><br>
  12755. <code>define &lt;name&gt; EnOcean A5-3F-00</code><br>
  12756. </ul><br>
  12757. and has to by activated
  12758. <ul><br>
  12759. <code>set &lt;name&gt; standby</code><br>
  12760. </ul><br>
  12761. Alternatively, the device can also be created automatically by autocreate. Only one RLT device may be defined in FHEM.<br>
  12762. After activation the RLT Master listens for RLT Query messages. On reception of at least one RLT Query messsage the
  12763. RLT Master responds and starts transmission of RLT MasterTest messages. After that the RLT Master awaits the response
  12764. from the RLT Slave.<br>
  12765. A radio link test communication consits of a minimum of 16 and a maximum of 256 RLT MasterTest messages. When the
  12766. radio link test communication is completed the RLT Master gets deactivated automatically. The test results can be
  12767. found in the log file.
  12768. <br><br>
  12769. </ul>
  12770. <b>Security features</b><br>
  12771. <ul>
  12772. The receiving and sending of encrypted messages is supported. This module currently allows the secure operating mode of PTM 215
  12773. based switches.<br>
  12774. To receive secured telegrams, you first have to start the teach in mode via<br><br>
  12775. <code>set &lt;IODev&gt; teach &lt;t/s&gt;</code><br><br>
  12776. and then doing the following on the PTM 215 module:<br>
  12777. <ul>
  12778. <li>Remove the switch cover of the module</li>
  12779. <li>Press both buttons of one rocker side (A0 & A1 or B0 & B1)</li>
  12780. <li>While keeping the buttons pressed actuate the energy bow twice.</li><br>
  12781. </ul>
  12782. This generates two teach-in telegrams which create a Fhem device with the subType "switch.00" and synchronize the Fhem with
  12783. the PTM 215. Both the Fhem and the PTM 215 now maintain a counter which is used to generate a rolling code encryption scheme.
  12784. Also during teach-in, a private key is transmitted to the Fhem. The counter value is allowed to desynchronize for a maximum of
  12785. 128 counts, to allow compensating for missed telegrams, if this value is crossed you need to teach-in the PTM 215 again. Also
  12786. if your Fhem installation gets erased including the state information, you need to teach in the PTM 215 modules again (which
  12787. you would need to do anyway).<br><br>
  12788. To send secured telegrams, you first have send a secure teach-in to the remode device<br><br>
  12789. <ul>
  12790. <code>set &lt;name&gt; teachInSec</code><br><br>
  12791. </ul>
  12792. As for the security of this solution, if someone manages to capture the teach-in telegrams, he can extract the private key,
  12793. so the added security isn't perfect but relies on the fact, that none listens to you setting up your installation.
  12794. <br><br>
  12795. The cryptographic functions need the additional Perl modules Crypt/Rijndael and Crypt/Random. The module must be installed manually.
  12796. With the help of CPAN at the operating system level, for example,<br><br>
  12797. <ul>
  12798. <code>/usr/bin/perl -MCPAN -e 'install Crypt::Rijndael'</code><br>
  12799. <code>/usr/bin/perl -MCPAN -e 'install Crypt::Random'</code>
  12800. </ul>
  12801. <br><br>
  12802. </ul>
  12803. <a name="EnOceandefine"></a>
  12804. <b>Define</b>
  12805. <ul>
  12806. <code>define &lt;name&gt; EnOcean &lt;DEF&gt; [&lt;EEP&gt;]|getNextID|&lt;EEP&gt;</code>
  12807. <br><br>
  12808. Define an EnOcean device, connected via a <a href="#TCM">TCM</a> modul. The
  12809. &lt;DEF&gt; is the SenderID/DestinationID of the device (8 digit hex number), for example
  12810. <ul><br>
  12811. <code>define switch1 EnOcean FFC54500</code><br>
  12812. </ul><br>
  12813. In order to control devices, you cannot reuse the SenderIDs/
  12814. DestinationID of other devices (like remotes), instead you have to create
  12815. your own, which must be in the allowed SenderID range of the underlying Fhem
  12816. IO device, see <a href="#TCM">TCM</a> BaseID, LastID. For this first query the
  12817. <a href="#TCM">TCM</a> with the <code>get &lt;tcm&gt; baseID</code> command
  12818. for the BaseID. You can use up to 128 IDs starting with the BaseID shown there.
  12819. If you are using an Fhem SenderID outside of the allowed range, you will see an
  12820. ERR_ID_RANGE message in the Fhem log.<br>
  12821. FHEM can assign a free SenderID alternatively, for example
  12822. <ul><br>
  12823. <code>define switch1 EnOcean getNextID</code><br>
  12824. </ul><br>
  12825. If the EEP is known, the appropriate device can be created with the basic parameters, for example
  12826. <ul><br>
  12827. <code>define sensor1 EnOcean FFC54500 A5-02-05</code><br>
  12828. </ul><br>
  12829. or
  12830. <ul><br>
  12831. <code>define sensor1 EnOcean A5-02-05</code><br>
  12832. </ul><br>
  12833. Inofficial EEP for special devices
  12834. <ul>
  12835. <li>G5-07-01 PioTek-Tracker<br></li>
  12836. <li>G5-10-12 Room Sensor and Control Unit [Eltako FUTH65D]<br></li>
  12837. <li>G5-38-08 Gateway, Dimming [Eltako FSG, FUD]<br></li>
  12838. <li>H5-38-08 Gateway, Dimming [Eltako TF61D, TF100D]<br></li>
  12839. <li>M5-38-08 Gateway, Switching [Eltako FSR14]<br></li>
  12840. <li>N5-38-08 Gateway, Switching [Eltako TF61L, TF61R, TF100A, TF100L]<br></li>
  12841. <li>G5-3F-7F Shutter [Eltako FSB]<br></li>
  12842. <li>H5-3F-7F Shutter [Eltako TF61J]<br></li>
  12843. <li>L6-02-01 Smoke Detector [Eltako FRW]<br></li>
  12844. <li>G5-ZZ-ZZ Light and Presence Sensor [Omnio Ratio eagle-PM101]<br></li>
  12845. <li>ZZ-ZZ-ZZ EnOcean RAW profile<br></li>
  12846. <br><br>
  12847. </ul>
  12848. The <a href="#autocreate">autocreate</a> module may help you if the actor or sensor send
  12849. acknowledge messages or teach-in telegrams. In order to control this devices e. g. switches with
  12850. additional SenderIDs you can use the attributes <a href="#subDef">subDef</a>,
  12851. <a href="#subDef0">subDef0</a> and <a href="#subDefI">subDefI</a>.<br>
  12852. Fhem communicates unicast, if bidirectional 4BS or UTE teach-in is used, see
  12853. <a href="#EnOcean_teach-in"> Bidirectional Teach-In / Teach-Out</a>. In this case
  12854. Fhem send unicast telegrams with its SenderID and the DestinationID of the device.
  12855. <br><br>
  12856. </ul>
  12857. <a name="EnOceaninternals"></a>
  12858. <b>Internals</b>
  12859. <ul>
  12860. <li>DEF: 0000000 ... FFFFFFFF|&lt;EEP&gt;<br>
  12861. EnOcean DestinationID or SenderID<br>
  12862. If the attributes subDef* are set, this values are used as EnOcean SenderID.<br>
  12863. For an existing device, the device can be re-parameterized by entering the EEP.<br>
  12864. </li>
  12865. <li>&lt;IODev&gt;_DestinationID: 0000000 ... FFFFFFFF<br>
  12866. Received destination address, Broadcast radio: FFFFFFFF<br>
  12867. </li>
  12868. <li>&lt;IODev&gt;_RSSI: LP/dBm<br>
  12869. Received signal strength indication (best value of all received subtelegrams)<br>
  12870. </li>
  12871. <li>&lt;IODev&gt;_ReceivingQuality: excellent|good|bad<br>
  12872. excellent: RSSI >= -76 dBm (internal standard antenna sufficiently)<br>
  12873. good: RSSI < -76 dBm and RSSI >= -87 dBm (good antenna necessary)<br>
  12874. bad: RSSI < -87 dBm (repeater required)<br>
  12875. </li>
  12876. <li>&lt;IODev&gt;_RepeatingCounter: 0...2<br>
  12877. Number of forwardings by repeaters<br>
  12878. </li>
  12879. <br><br>
  12880. </ul>
  12881. <a name="EnOceanset"></a>
  12882. <b>Set</b>
  12883. <ul>
  12884. <li><a name="EnOcean_teach-in">Teach-In / Teach-Out</a>
  12885. <ul>
  12886. <li>Teach-in remote devices</li>
  12887. <br>
  12888. <code>set &lt;IODev&gt; teach &lt;t/s&gt;</code>
  12889. <br><br>
  12890. Set Fhem in the learning mode.<br>
  12891. A device, which is then also put in this state is to paired with
  12892. Fhem. Bidirectional Teach-In / Teach-Out is used for some 4BS, VLD and MSC devices,
  12893. e. g. EEP 4BS, RORG A5-20-01 (Battery Powered Actuator).<br>
  12894. Bidirectional Teach-In for 4BS, UTE and Generic Profiles are supported.<br>
  12895. <code>IODev</code> is the name of the TCM Module.<br>
  12896. <code>t/s</code> is the time for the learning period.
  12897. <br><br>
  12898. Types of learning modes see <a href="#TCM_learningMode">learningMode</a>
  12899. <br><br>
  12900. Example:
  12901. <ul><code>set TCM_0 teach 600</code></ul>
  12902. <br>
  12903. <li>RPS profiles Teach-In (switches)</li>
  12904. <br>
  12905. <code>set &lt;name&gt; A0|AI|B0|BI|C0|CI|D0|DI</code>
  12906. <br><br>
  12907. Send teach-in telegram to remote device.
  12908. <br><br>
  12909. <li>1BS profiles Teach-In (contact)</li>
  12910. <br>
  12911. <code>set &lt;name&gt; teach</code>
  12912. <br><br>
  12913. Send teach-in telegram to remote device.
  12914. <br><br>
  12915. <li>4BS profiles Teach-In (sensors, dimmer, room controller etc.)</li>
  12916. <br>
  12917. <code>set &lt;name&gt; teach</code>
  12918. <br><br>
  12919. Send teach-in telegram to remote device.<br>
  12920. If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
  12921. is assigned automatically.
  12922. <br><br>
  12923. <li>UTE - Universal Uni- and Bidirectional Teach-In</li>
  12924. <br>
  12925. <code>set &lt;name&gt; teachIn|teachOut</code>
  12926. <br><br>
  12927. Send teach-in telegram to remote device.<br>
  12928. If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
  12929. is assigned automatically.
  12930. <br><br>
  12931. <li>Generic Profiles Teach-In</li>
  12932. <br>
  12933. <code>set &lt;name&gt; teachIn|teachOut</code>
  12934. <br><br>
  12935. Send teach-in telegram to remote device.<br>
  12936. If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
  12937. is assigned automatically.
  12938. <br><br>
  12939. <li>Secure Devices Teach-In</li>
  12940. <br>
  12941. <code>set &lt;name&gt; teachInSec</code>
  12942. <br><br>
  12943. Secure teach-in to the remode device.<br>
  12944. If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
  12945. is assigned automatically.
  12946. <br><br>
  12947. </ul>
  12948. </li>
  12949. <li><a name="EnOcean_smartAck">Smart Ack Learning</a>
  12950. <ul>
  12951. <li>Teach-in remote Smart Ack devices</li>
  12952. <br>
  12953. <code>set &lt;IODev&gt; smartAckLearn &lt;t/s&gt;</code>
  12954. <br><br>
  12955. Set Fhem in the Smart Ack learning mode.<br>
  12956. The post master fuctionality must be activated using the command <code>smartAckMailboxMax</code> in advance.<br>
  12957. The simple learnmode is supported, see <a href="#TCM_smartAckLearnMode">smartAckLearnMode</a><br>
  12958. A device, which is then also put in this state is to paired with
  12959. Fhem. Bidirectional learn in for 4BS, UTE and Generic Profiles are supported.<br>
  12960. <code>IODev</code> is the name of the TCM Module.<br>
  12961. <code>t/s</code> is the time for the learning period.
  12962. <br><br>
  12963. Example:
  12964. <ul><code>set TCM_0 smartAckLearn 600</code></ul>
  12965. <br>
  12966. </ul>
  12967. </li>
  12968. <li><a name="EnOcean_remoteSet">Remote Management</a>
  12969. <ul>
  12970. <code>set &lt;name&gt; &lt;value&gt;</code>
  12971. <br><br>
  12972. where <code>value</code> is
  12973. <li>remoteAction<br>
  12974. sent action command to perfoms an action, depending on the functionality of the device</li>
  12975. <li>remoteApplyChanges devCfg|linkTable|no_change<br>
  12976. apply changes</li>
  12977. <li>remoteDevCfg &lt;index&gt; &lt;value&gt;<br>
  12978. set configuration</li>
  12979. <li>remoteLinkTable in|out &lt;index&gt; &lt;ID&gt; &lt;EEP&gt; &lt;channel&gt;<br>
  12980. set link table content</li>
  12981. <li>remoteLinkCfg in|out &lt;index&gt; &lt;data index&gt; &lt;value&gt;<br>
  12982. set link based configuration</li>
  12983. <li>remoteLinkTableGP in|out &lt;index&gt; &lt;GP channel description&gt;<br>
  12984. set link table content</li>
  12985. <li>remoteLock<br>
  12986. locks the remote device or local client</li>
  12987. <li>remoteLearnMode in|out|off &lt;index&gt;<br>
  12988. initiate remote learn-in or learn-out of inbound index</li>
  12989. <li>remoteReset devCfg|linkTableIn|linkTableOut|no_change<br>
  12990. reset to defaults</li>
  12991. <li>remoteRLT on|off &lt;number of RLT slaves&gt;<br>
  12992. reset to defaults</li>
  12993. <li>remoteRepeater on|off|filter &lt;level&gt; &lt;filter structure&gt;<br>
  12994. set repeater functions</li>
  12995. <li>remoteRepeaterFilter apply|block|delete|deleteAll destinationID|sourceID|rorg|rssi &lt;filter value&gt;<br>
  12996. set repeater functions</li>
  12997. <li>remoteSetCode<br>
  12998. set the remote security code</li>
  12999. <li>remoteTeach &lt;channel&gt;<br>
  13000. request teach-in telegram from channel 00..FF</li>
  13001. <li>remoteUnlock [1...1800]<br>
  13002. unlocks the remote device or local client<br>
  13003. The unlock period can be set in the client mode between 1s and 1800 s.</li>
  13004. <br>
  13005. [&lt;channel&gt;] = 00...FF<br>
  13006. [&lt;EEP&gt;] = &lt;RORG&gt;-&lt;function&gt;-&lt;type&gt;<br>
  13007. [&lt;filter structure&gt;] = AND|OR<br>
  13008. [&lt;filter value&gt;] = &lt;destinationID&gt;|&lt;sourceID&gt;|&lt;RORG&gt;|&lt;LP/dBm&gt;<br>
  13009. [&lt;GP channel description&gt;] = &lt;name of channel 00&gt;:&lt;O|I&gt;:&lt;channel type&gt;:&lt;signal type&gt;:&lt;value type&gt;[:&lt;resolution&gt;[:&lt;engineering min&gt;:&lt;scaling min&gt;:&lt;engineering max&gt;:&lt;scaling max&gt;]]<br>
  13010. [&lt;ID&gt;] = 00000001...FFFFFFFE<br>
  13011. [&lt;index&gt;] = 00...FF<br>
  13012. [&lt;number of RLT slaves&gt;] = 01..7F<br>
  13013. [&lt;level&gt;] = 1|2<br>
  13014. [&lt;data index&gt;] = 0000...FFFF<br>
  13015. [&lt;value&gt;] = n x 00...FF<br>
  13016. </ul><br>
  13017. </li><br>
  13018. <li>Switch, Pushbutton Switch (EEP F6-02-01 ... F6-03-02)<br>
  13019. RORG RPS [default subType]
  13020. <ul>
  13021. <code>set &lt;name&gt; &lt;value&gt;</code>
  13022. <br><br>
  13023. where <code>value</code> is one of A0, AI, B0, BI, C0, CI, D0, DI,
  13024. combinations of these and released. First and second action can be sent
  13025. simultaneously. Separate first and second action with a comma.<br>
  13026. In fact we are trying to emulate a PT200 type remote.<br>
  13027. If you define an <a href="#eventMap">eventMap</a> attribute with on/off,
  13028. then you will be able to easily set the device from the <a
  13029. href="#FHEMWEB">WEB</a> frontend.<br>
  13030. <a href="#setExtensions">set extensions</a> are supported, if the corresponding
  13031. <a href="#eventMap">eventMap</a> specifies the <code>on</code> and <code>off</code>
  13032. mappings, for example <code>attr <name> eventMap on-till:on-till AI:on A0:off</code>.<br>
  13033. With the help of additional <a href="#EnOceanattr">attributes</a>, the
  13034. behavior of the devices can be adapt.<br>
  13035. The attr subType must be switch. This is done if the device was created by autocreate.
  13036. <br><br>
  13037. Example:
  13038. <ul><code>
  13039. set switch1 BI<br>
  13040. set switch1 B0,CI<br>
  13041. attr eventMap BI:on B0:off<br>
  13042. set switch1 on<br>
  13043. </code></ul><br>
  13044. </ul>
  13045. </li>
  13046. <li>Staircase off-delay timer (EEP F6-02-01 ... F6-02-02)<br>
  13047. RORG RPS [Eltako FTN14, tested with Eltako FTN14 only]<br>
  13048. <ul>
  13049. <code>set &lt;name&gt; &lt;value&gt;</code>
  13050. <br><br>
  13051. where <code>value</code> is
  13052. <li>on<br>
  13053. issue switch on command</li>
  13054. <li>released<br>
  13055. start timer</li>
  13056. </ul><br>
  13057. Set attr eventMap to B0:on BI:off, attr subType to switch, attr
  13058. webCmd to on:released and if needed attr switchMode to pushbutton manually.<br>
  13059. The attr subType must be switch. This is done if the device was created by autocreate.<br>
  13060. Use the sensor type "Schalter" for Eltako devices. The Staircase
  13061. off-delay timer is switched on when pressing "on" and the time will be started
  13062. when pressing "released". "released" immediately after "on" is sent if
  13063. the attr switchMode is set to "pushbutton".
  13064. </li>
  13065. <br><br>
  13066. <li>Pushbutton Switch (EEP D2-03-00)<br>
  13067. RORG VLD [EnOcean PTM 215 Modul]
  13068. <ul>
  13069. <code>set &lt;name&gt; &lt;value&gt;</code>
  13070. <br><br>
  13071. where <code>value</code> is
  13072. <li>teachIn<br>
  13073. initiate UTE teach-in</li>
  13074. <li>teachInSec<br>
  13075. initiate secure teach-in</li>
  13076. <li>teachOut<br>
  13077. initiate UTE teach-out</li>
  13078. <li>A0|AI|B0|BI<br>
  13079. issue switch command</li>
  13080. <li>A0,B0|A0,AI|AI,B0|AI,BI<br>
  13081. issue switch command</li>
  13082. <li>pressed<br>
  13083. energy bow pressed</li>
  13084. <li>pressed34<br>
  13085. 3 or 4 buttons and energy bow pressed</li>
  13086. <li>released<br>
  13087. energy bow released</li><br>
  13088. </ul>
  13089. First and second action can be sent simultaneously. Separate first and second action with a comma.<br>
  13090. If you define an <a href="#eventMap">eventMap</a> attribute with on/off,
  13091. then you will be able to easily set the device from the <a href="#FHEMWEB">WEB</a> frontend.<br>
  13092. <a href="#setExtensions">set extensions</a> are supported, if the corresponding
  13093. <a href="#eventMap">eventMap</a> specifies the <code>on</code> and <code>off</code>
  13094. mappings, for example <code>attr <name> eventMap on-till:on-till AI:on A0:off</code>.<br>
  13095. If <a href="#EnOcean_comMode">comMode</a> is set to biDir the device can be controlled bidirectionally.<br>
  13096. With the help of additional <a href="#EnOceanattr">attributes</a>, the behavior of the devices can be adapt.<br>
  13097. The attr subType must be switch.00. This is done if the device was created by autocreate.
  13098. <br><br>
  13099. <ul>
  13100. Example:
  13101. <ul><code>
  13102. set switch1 BI<br>
  13103. set switch1 B0,CI<br>
  13104. attr eventMap BI:on B0:off<br>
  13105. set switch1 on<br>
  13106. </code></ul><br>
  13107. </ul>
  13108. </li>
  13109. <li>Single Input Contact, Door/Window Contact (EEP D5-00-01)<br>
  13110. RORG 1BS [tested with Eltako FSR14]
  13111. <ul>
  13112. <code>set &lt;name&gt; &lt;value&gt;</code>
  13113. <br><br>
  13114. where <code>value</code> is
  13115. <li>closed<br>
  13116. issue closed command</li>
  13117. <li>open<br>
  13118. issue open command</li>
  13119. <li>teach<br>
  13120. initiate teach-in</li>
  13121. </ul><br>
  13122. The attr subType must be contact. The attribute must be set manually.
  13123. </li><br><br>
  13124. <li>Room Sensor and Control Unit (EEP A5-10-02)<br>
  13125. [Thermokon SR04 PTS]<br>
  13126. <ul>
  13127. <code>set &lt;name&gt; &lt;value&gt;</code>
  13128. <br><br>
  13129. where <code>value</code> is
  13130. <li>teach<br>
  13131. initiate teach-in</li>
  13132. <li>setpoint [0 ... 255]<br>
  13133. Set the actuator to the specifed setpoint.</li>
  13134. <li>setpointScaled [&lt;floating-point number&gt;]<br>
  13135. Set the actuator to the scaled setpoint.</li>
  13136. <li>fanStage [auto|0|1|2|3]<br>
  13137. Set fan stage</li>
  13138. <li>switch [on|off]<br>
  13139. Set switch</li>
  13140. </ul><br>
  13141. The actual temperature will be taken from the temperature reported by
  13142. a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
  13143. primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
  13144. If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
  13145. command is sent when the reference device is updated.<br>
  13146. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  13147. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  13148. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled setting
  13149. setpointScaled.<br>
  13150. The attr subType must be roomSensorControl.05. The attribute must be set manually.
  13151. </li>
  13152. <br><br>
  13153. <li>Room Sensor and Control Unit (EEP A5-10-03)<br>
  13154. [used for IntesisBox PA-AC-ENO-1i]<br>
  13155. <ul>
  13156. <code>set &lt;name&gt; &lt;value&gt;</code>
  13157. <br><br>
  13158. where <code>value</code> is
  13159. <li>teach<br>
  13160. initiate teach-in</li>
  13161. <li>setpoint [0 ... 255]<br>
  13162. Set the actuator to the specifed setpoint.</li>
  13163. <li>setpointScaled [&lt;floating-point number&gt;]<br>
  13164. Set the actuator to the scaled setpoint.</li>
  13165. <li>fanStage [auto|0|1|2|3]<br>
  13166. Set fan stage</li>
  13167. <li>switch [on|off]<br>
  13168. Set switch</li>
  13169. </ul><br>
  13170. The actual temperature will be taken from the temperature reported by
  13171. a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
  13172. primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
  13173. If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
  13174. command is sent when the reference device is updated.<br>
  13175. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  13176. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  13177. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled setting
  13178. setpointScaled.<br>
  13179. The attr subType must be roomSensorControl.05 and attr manufID must be 019. The attribute must be set manually.
  13180. </li>
  13181. <br><br>
  13182. <li>Room Sensor and Control Unit (A5-10-06 plus night reduction)<br>
  13183. [Eltako FTR65DS, FTR65HS]<br>
  13184. <ul>
  13185. <code>set &lt;name&gt; &lt;value&gt;</code>
  13186. <br><br>
  13187. where <code>value</code> is
  13188. <li>teach<br>
  13189. initiate teach-in</li>
  13190. <li>desired-temp [t/&#176C [lock|unlock]]<br>
  13191. Set the desired temperature.</li>
  13192. <li>nightReduction [t/K [lock|unlock]]<br>
  13193. Set night reduction</li>
  13194. <li>setpointTemp [t/&#176C [lock|unlock]]<br>
  13195. Set the desired temperature</li>
  13196. </ul><br>
  13197. The actual temperature will be taken from the temperature reported by
  13198. a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
  13199. primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
  13200. If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpointTemp
  13201. command is sent when the reference device is updated.<br>
  13202. This profil can be used with a further Room Sensor and Control Unit Eltako FTR55*
  13203. to control a heating/cooling relay FHK12, FHK14 or FHK61. If Fhem and FTR55*
  13204. is teached in, the temperature control of the FTR55* can be either blocked
  13205. or to a setpoint deviation of +/- 3 K be limited. For this use the optional parameter
  13206. [block] = lock|unlock, unlock is default.<br>
  13207. The attr subType must be roomSensorControl.05 and attr manufID must be 00D.
  13208. The attributes must be set manually.
  13209. </li>
  13210. <br><br>
  13211. <li>Room Sensor and Control Unit (EEP A5-10-10)<br>
  13212. [Thermokon SR04 * rH, Thanos SR *]<br>
  13213. <ul>
  13214. <code>set &lt;name&gt; &lt;value&gt;</code>
  13215. <br><br>
  13216. where <code>value</code> is
  13217. <li>teach<br>
  13218. initiate teach-in</li>
  13219. <li>setpoint [0 ... 255]<br>
  13220. Set the actuator to the specifed setpoint.</li>
  13221. <li>setpointScaled [&lt;floating-point number&gt;]<br>
  13222. Set the actuator to the scaled setpoint.</li>
  13223. <li>switch [on|off]<br>
  13224. Set switch</li>
  13225. </ul><br>
  13226. The actual temperature will be taken from the temperature reported by
  13227. a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
  13228. primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
  13229. The actual humidity will be taken from the humidity reported by
  13230. a humidity reference device <a href="#EnOcean_humidityRefDev">humidityRefDev</a>
  13231. primarily or from the attribute <a href="#EnOcean_humidity">humidity</a> if it is set.<br>
  13232. If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
  13233. command is sent when the reference device is updated.<br>
  13234. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  13235. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  13236. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled setting
  13237. setpointScaled.<br>
  13238. The attr subType must be roomSensorControl.01. The attribute must be set manually.
  13239. </li>
  13240. <br><br>
  13241. <li>Room Sensor and Control Unit (EEP A5-10-12)<br>
  13242. [Eltako FUTH65D]<br>
  13243. <ul>
  13244. <code>set &lt;name&gt; &lt;value&gt;</code>
  13245. <br><br>
  13246. where <code>value</code> is
  13247. <li>teach<br>
  13248. initiate teach-in</li>
  13249. <li>setpoint [0 ... 255]<br>
  13250. Set the actuator to the specifed setpoint.</li>
  13251. <li>setpointScaled [&lt;floating-point number&gt;]<br>
  13252. Set the actuator to the scaled setpoint.</li>
  13253. <li>switch [on|off]<br>
  13254. Set switch</li>
  13255. </ul><br>
  13256. The actual temperature will be taken from the temperature reported by
  13257. a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
  13258. primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
  13259. If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
  13260. command is sent when the reference device is updated.<br>
  13261. The attr subType must be roomSensorControl.01 and attr manufID must be 00D. The attribute must be set manually.
  13262. </li>
  13263. <br><br>
  13264. <li>Battery Powered Actuator (EEP A5-20-01)<br>
  13265. [Kieback&Peter MD15-FTL-xx]<br>
  13266. <ul>
  13267. <code>set &lt;name&gt; &lt;value&gt;</code>
  13268. <br><br>
  13269. where <code>value</code> is
  13270. <li>setpoint setpoint/%<br>
  13271. Set the actuator to the specifed setpoint (0...100). The setpoint can also be set by the
  13272. <a href="#EnOcean_setpointRefDev">setpointRefDev</a> device if it is set.</li>
  13273. <li>setpointTemp t/&#176C<br>
  13274. Set the actuator to the specifed temperature setpoint. The temperature setpoint can also be set by the
  13275. <a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a> device if it is set.<br>
  13276. The FHEM PID controller calculates the actuator setpoint based on the temperature setpoint. The controller's
  13277. operation can be set via the PID parameters <a href="#EnOcean_pidFactor_P">pidFactor_P</a>,
  13278. <a href="#EnOcean_pidFactor_I">pidFactor_I</a> and <a href="#EnOcean_pidFactor_D">pidFactor_D</a>.<br>
  13279. If the attribute pidCtrl is set to off, the PI controller of the actuator is used (selfCtrl mode). Please
  13280. read the instruction manual of the device, whether the device has an internal PI controller.<br></li>
  13281. <li>runInit<br>
  13282. Maintenance Mode: Run init sequence</li>
  13283. <li>valveOpens<br>
  13284. Maintenance Mode: Valve opens<br>
  13285. After the valveOpens command, the valve remains open permanently and can no longer be controlled by Fhem.
  13286. By pressing the button on the device itself, the actuator is returned to its normal operating state.</li>
  13287. <li>valveCloses<br>
  13288. Maintenance Mode: Valve closes</li>
  13289. </ul><br>
  13290. The Heating Radiator Actuating Drive is configured using the following attributes:<br>
  13291. <ul>
  13292. <li><a href="#EnOcean_pidActorCallBeforeSetting">pidActorCallBeforeSetting</a></li>
  13293. <li><a href="#EnOcean_pidActorErrorAction">pidActorErrorAction</a></li>
  13294. <li><a href="#EnOcean_pidActorErrorPos">pidActorErrorPos</a></li>
  13295. <li><a href="#EnOcean_pidActorLimitLower">pidActorLimitLower</a></li>
  13296. <li><a href="#EnOcean_pidActorLimitUpper">pidActorLimitUpper</a></li>
  13297. <li><a href="#EnOcean_pidCtrl">pidCtrl</a></li>
  13298. <li><a href="#EnOcean_pidDeltaTreshold">pidDeltaTreshold</a></li>
  13299. <li><a href="#EnOcean_pidFactor_P">pidFactor_P</a></li>
  13300. <li><a href="#EnOcean_pidFactor_I">pidFactor_I</a></li>
  13301. <li><a href="#EnOcean_pidFactor_D">pidFactor_D</a></li>
  13302. <li><a href="#EnOcean_pidIPortionCallBeforeSetting">pidIPortionCallBeforeSetting</a></li>
  13303. <li><a href="#EnOcean_pidSensorTimeout">pidSensorTimeout</a></li>
  13304. <li><a href="#EnOcean_rcvRespAction">rcvRespAction</a></li>
  13305. <li><a href="#EnOcean_setpointRefDev">setpointRefDev</a></li>
  13306. <li><a href="#EnOcean_setpointSummerMode">setpointSummerMode</a></li>
  13307. <li><a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a></li>
  13308. <li><a href="#temperatureRefDev">temperatureRefDev</a></li>
  13309. <li><a href="#EnOcean_summerMode">summerMode</a></li>
  13310. </ul>
  13311. The actual temperature will be reported by the Heating Radiator Actuating Drive or by the
  13312. <a href="#temperatureRefDev">temperatureRefDev</a> if it is set. The internal temperature sensor
  13313. of the Micropelt iTRV is not suitable as an actual temperature value for the PID controller.
  13314. An external room thermostat is required.<br>
  13315. The attr event-on-change-reading .* shut not by set. The PID controller expects periodic events.
  13316. If these are missing, a communication alarm is signaled.<br>
  13317. The attr subType must be hvac.01. This is done if the device was
  13318. created by autocreate. To control the device, it must be bidirectional paired,
  13319. see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.<br>
  13320. The command is not sent until the device wakes up and sends a message, usually
  13321. every 10 minutes.
  13322. </li>
  13323. <br><br>
  13324. <li>Heating Radiator Actuating Drive (EEP A5-20-04)<br>
  13325. [Holter SmartDrive MX]<br>
  13326. <ul>
  13327. <code>set &lt;name&gt; &lt;value&gt;</code>
  13328. <br><br>
  13329. where <code>value</code> is
  13330. <li>setpoint setpoint/%<br>
  13331. Set the actuator to the specifed setpoint (0...100). The setpoint can also be set by the
  13332. <a href="#EnOcean_setpointRefDev">setpointRefDev</a> device if it is set.</li>
  13333. <li>setpointTemp t/&#176C<br>
  13334. Set the actuator to the specifed temperature setpoint. The temperature setpoint can also be set by the
  13335. <a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a> device if it is set.<br>
  13336. The FHEM PID controller calculates the actuator setpoint based on the temperature setpoint. The controller's
  13337. operation can be set via the PID parameters <a href="#EnOcean_pidFactor_P">pidFactor_P</a>,
  13338. <a href="#EnOcean_pidFactor_I">pidFactor_I</a> and <a href="#EnOcean_pidFactor_D">pidFactor_D</a>.</li>
  13339. <li>runInit<br>
  13340. Maintenance Mode: Run init sequence</li>
  13341. <li>valveOpens<br>
  13342. Maintenance Mode: Valve opens<br>
  13343. After the valveOpens command, the valve remains open permanently and can no longer be controlled by Fhem.
  13344. By pressing the button on the device itself, the actuator is returned to its normal operating state.</li>
  13345. <li>valveCloses<br>
  13346. Maintenance Mode: Valve closes</li>
  13347. </ul><br>
  13348. The Heating Radiator Actuating Drive is configured using the following attributes:<br>
  13349. <ul>
  13350. <li><a href="#EnOcean_blockKey">blockKey</a></li>
  13351. <li><a href="#EnOcean_displayOrientation">displayOrientation</a></li>
  13352. <li><a href="#EnOcean_measurementCtrl">measurementCtrl</a></li>
  13353. <li><a href="#model">model</a></li>
  13354. <li><a href="#EnOcean_pidActorCallBeforeSetting">pidActorCallBeforeSetting</a></li>
  13355. <li><a href="#EnOcean_pidActorErrorAction">pidActorErrorAction</a></li>
  13356. <li><a href="#EnOcean_pidActorErrorPos">pidActorErrorPos</a></li>
  13357. <li><a href="#EnOcean_pidActorLimitLower">pidActorLimitLower</a></li>
  13358. <li><a href="#EnOcean_pidActorLimitUpper">pidActorLimitUpper</a></li>
  13359. <li><a href="#EnOcean_pidCtrl">pidCtrl</a></li>
  13360. <li><a href="#EnOcean_pidDeltaTreshold">pidDeltaTreshold</a></li>
  13361. <li><a href="#EnOcean_pidFactor_P">pidFactor_P</a></li>
  13362. <li><a href="#EnOcean_pidFactor_I">pidFactor_I</a></li>
  13363. <li><a href="#EnOcean_pidFactor_D">pidFactor_D</a></li>
  13364. <li><a href="#EnOcean_pidIPortionCallBeforeSetting">pidIPortionCallBeforeSetting</a></li>
  13365. <li><a href="#EnOcean_pidSensorTimeout">pidSensorTimeout</a></li>
  13366. <li><a href="#EnOcean_setpointRefDev">setpointRefDev</a></li>
  13367. <li><a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a></li>
  13368. <li><a href="#temperatureRefDev">temperatureRefDev</a></li>
  13369. <li><a href="#EnOcean_summerMode">summerMode</a></li>
  13370. <li><a href="#EnOcean_wakeUpCycle">wakeUpCycle</a></li>
  13371. </ul>
  13372. The actual temperature will be reported by the Heating Radiator Actuating Drive or by the
  13373. <a href="#temperatureRefDev">temperatureRefDev</a> if it is set.<br>
  13374. The attr event-on-change-reading .* shut not by set. The PID controller expects periodic events.
  13375. If these are missing, a communication alarm is signaled.<br>
  13376. The attr subType must be hvac.04. This is done if the device was
  13377. created by autocreate. To control the device, it must be bidirectional paired,
  13378. see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.<br>
  13379. The OEM version of the Holter SmartDrive MX has an internal PID controller. This function is activated by
  13380. attr <device> model OEM and attr <device> pidCtrl off.<br>
  13381. The command is not sent until the device wakes up and sends a message, usually
  13382. every 5 minutes.
  13383. </li>
  13384. <br><br>
  13385. <li>Generic HVAC Interface (EEP A5-20-10)<br>
  13386. [IntesisBox PA-AC-ENO-1i]<br>
  13387. <ul>
  13388. <code>set &lt;name&gt; &lt;value&gt;</code>
  13389. <br><br>
  13390. where <code>value</code> is
  13391. <li>ctrl auto|0...100<br>
  13392. Set control variable</li>
  13393. <li>fanSpeed auto|1...14<br>
  13394. Set fan speed</li>
  13395. <li>occupancy occupied|off|standby|unoccupied<br>
  13396. Set room occupancy</li>
  13397. <li>on<br>
  13398. Set on</li>
  13399. <li>off<br>
  13400. Set off</li>
  13401. <li>mode auto|heat|morning_warmup|cool|night_purge|precool|off|test|emergency_heat|fan_only|free_cool|ice|max_heat|eco|dehumidification|calibration|emergency_cool|emergency_stream|max_cool|hvc_load|no_load|auto_heat|auto_cool<br>
  13402. Set mode</li>
  13403. <li>teach<br>
  13404. Teach-in</li>
  13405. <li>vanePosition auto|horizontal|position_2|position_3|position_4|vertical|swing|vertical_swing|horizontal_swing|hor_vert_swing|stop_swing<br>
  13406. Set vane position</li>
  13407. </ul><br>
  13408. The attr subType must be hvac.10. This is done if the device was
  13409. created by autocreate. To control the device, it must be bidirectional paired,
  13410. see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.
  13411. </li>
  13412. <br><br>
  13413. <li>Generic HVAC Interface - Error Control (EEP A5-20-11)<br>
  13414. [IntesisBox PA-AC-ENO-1i]<br>
  13415. <ul>
  13416. <code>set &lt;name&gt; &lt;value&gt;</code>
  13417. <br><br>
  13418. where <code>value</code> is
  13419. <li>externalDisable disable|enable<br>
  13420. Set external disablement</li>
  13421. <li>remoteCtrl disable|enable<br>
  13422. Dieable/enable remote controller</li>
  13423. <li>teach<br>
  13424. Teach-in</li>
  13425. <li>window closed|opened<br>
  13426. Set window state</li>
  13427. </ul><br>
  13428. The attr subType must be hvac.11. This is done if the device was
  13429. created by autocreate. To control the device, it must be bidirectional paired,
  13430. see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.
  13431. </li>
  13432. <br><br>
  13433. <li>Energy management, <a name="demand_response">demand response</a> (EEP A5-37-01)<br>
  13434. demand response master commands<br>
  13435. <ul>
  13436. <code>set &lt;name&gt; &lt;value&gt;</code>
  13437. <br><br>
  13438. where <code>value</code> is
  13439. <li>level 0...15 [&lt;powerUsageScale&gt; [&lt;randomStart&gt; [&lt;randomEnd&gt; [timeout]]]]<br>
  13440. set demand response level</li>
  13441. <li>max [&lt;powerUsageScale&gt; [&lt;randomStart&gt; [&lt;randomEnd&gt; [timeout]]]]<br>
  13442. set power usage level to max</li>
  13443. <li>min [&lt;powerUsageScale&gt; [&lt;randomStart&gt; [&lt;randomEnd&gt; [timeout]]]]<br>
  13444. set power usage level to min</li>
  13445. <li>power power/% [&lt;powerUsageScale&gt; [&lt;randomStart&gt; [&lt;randomEnd&gt; [timeout]]]]<br>
  13446. set power</li>
  13447. <li>setpoint 0...255 [&lt;powerUsageScale&gt; [&lt;randomStart&gt; [&lt;randomEnd&gt; [timeout]]]]<br>
  13448. set setpoint</li>
  13449. <li>teach<br>
  13450. initiate teach-in</li>
  13451. </ul><br>
  13452. [&lt;powerUsageScale&gt;] = max|rel, [&lt;powerUsageScale&gt;] = max is default<br>
  13453. [&lt;randomStart&gt;] = yes|no, [&lt;randomStart&gt;] = no is default<br>
  13454. [&lt;randomEnd&gt;] = yes|no, [&lt;randomEnd&gt;] = no is default<br>
  13455. [timeout] = 0/min | 15/min ... 3825/min, [timeout] = 0 is default<br>
  13456. The attr subType must be energyManagement.01.<br>
  13457. This is done if the device was created by autocreate.<br>
  13458. </li>
  13459. <br><br>
  13460. <li><a name="Gateway">Gateway</a> (EEP A5-38-08)<br>
  13461. The Gateway profile include 7 different commands (Switching, Dimming,
  13462. Setpoint Shift, Basic Setpoint, Control variable, Fan stage, Blind Central Command).
  13463. The commands can be selected by the attribute gwCmd or command line. The attribute
  13464. entry has priority.<br>
  13465. <ul>
  13466. <code>set &lt;name&gt; &lt;value&gt;</code>
  13467. <br><br>
  13468. where <code>value</code> is
  13469. <li>&lt;gwCmd&gt; &lt;cmd&gt; [subCmd]<br>
  13470. initiate Gateway commands by command line</li>
  13471. <li>&lt;cmd&gt; [subCmd]<br>
  13472. initiate Gateway commands if attribute gwCmd is set.</li>
  13473. </ul><br>
  13474. The attr subType must be gateway. Attribute gwCmd can also be set to
  13475. switching|dimming|setpointShift|setpointBasic|controlVar|fanStage|blindCmd.<br>
  13476. This is done if the device was created by autocreate.<br>
  13477. For Eltako devices attributes must be set manually.
  13478. </li>
  13479. <br><br>
  13480. <li>Gateway (EEP A5-38-08)<br>
  13481. Switching<br>
  13482. [Eltako FLC61, FSA12, FSR14]<br>
  13483. <ul>
  13484. <code>set &lt;name&gt; &lt;value&gt;</code>
  13485. <br><br>
  13486. where <code>value</code> is
  13487. <li>teach<br>
  13488. initiate teach-in mode</li>
  13489. <li>on [lock|unlock]<br>
  13490. issue switch on command</li>
  13491. <li>off [lock|unlock]<br>
  13492. issue switch off command</li>
  13493. <li><a href="#setExtensions">set extensions</a> are supported.</li>
  13494. </ul><br>
  13495. The attr subType must be gateway and gwCmd must be switching. This is done if the device was
  13496. created by autocreate.<br>
  13497. For Eltako devices attributes must be set manually. For Eltako FSA12 attribute model must be set
  13498. to FSA12.
  13499. </li>
  13500. <br><br>
  13501. <li>Gateway (EEP A5-38-08)<br>
  13502. Dimming<br>
  13503. [Eltako FUD12, FUD14, FUD61, FUD70, FSG14, ...]<br>
  13504. <ul>
  13505. <code>set &lt;name&gt; &lt;value&gt;</code>
  13506. <br><br>
  13507. where <code>value</code> is
  13508. <li>dim/% [rampTime/s [lock|unlock]]<br>
  13509. issue dim command</li>
  13510. <li>teach<br>
  13511. initiate teach-in mode</li>
  13512. <li>on [lock|unlock]<br>
  13513. issue switch on command</li>
  13514. <li>off [lock|unlock]<br>
  13515. issue switch off command</li>
  13516. <li>dim dim/% [rampTime/s [lock|unlock]]<br>
  13517. issue dim command</li>
  13518. <li>dimup dim/% [rampTime/s [lock|unlock]]<br>
  13519. issue dim command</li>
  13520. <li>dimdown dim/% [rampTime/s [lock|unlock]]<br>
  13521. issue dim command</li>
  13522. <li><a href="#setExtensions">set extensions</a> are supported.</li>
  13523. </ul><br>
  13524. rampTime Range: t = 1 s ... 255 s or 0 if no time specified,
  13525. for Eltako: t = 1 = fast dimming ... 255 = slow dimming or 0 = dimming speed on the dimmer used<br>
  13526. The attr subType must be gateway and gwCmd must be dimming. This is done if the device was
  13527. created by autocreate.<br>
  13528. For Eltako devices attributes must be set manually. Use the sensor type "PC/FVS" for Eltako devices.
  13529. </li>
  13530. <br><br>
  13531. <li>Gateway (EEP A5-38-08)<br>
  13532. Dimming of fluorescent lamps<br>
  13533. [Eltako FSG70, tested with Eltako FSG70 only]<br>
  13534. <ul>
  13535. <code>set &lt;name&gt; &lt;value&gt;</code>
  13536. <br><br>
  13537. where <code>value</code> is
  13538. <li>on<br>
  13539. issue switch on command</li>
  13540. <li>off<br>
  13541. issue switch off command</li>
  13542. <li><a href="#setExtensions">set extensions</a> are supported.</li>
  13543. </ul><br>
  13544. The attr subType must be gateway and gwCmd must be dimming. Set attr eventMap to B0:on BI:off,
  13545. attr subTypeSet to switch and attr switchMode to pushbutton manually.<br>
  13546. Use the sensor type "Richtungstaster" for Eltako devices.
  13547. </li>
  13548. <br><br>
  13549. <li>Gateway (EEP A5-38-08)<br>
  13550. Setpoint shift<br>
  13551. [untested]<br>
  13552. <ul>
  13553. <code>set &lt;name&gt; &lt;value&gt;</code>
  13554. <br><br>
  13555. where <code>value</code> is
  13556. <li>teach<br>
  13557. initiate teach-in mode</li>
  13558. <li>shift 1/K <br>
  13559. issue Setpoint shift</li>
  13560. </ul><br>
  13561. Shift Range: T = -12.7 K ... 12.8 K<br>
  13562. The attr subType must be gateway and gwCmd must be setpointShift.
  13563. This is done if the device was created by autocreate.<br>
  13564. </li>
  13565. <br><br>
  13566. <li>Gateway (EEP A5-38-08)<br>
  13567. Basic Setpoint<br>
  13568. [untested]<br>
  13569. <ul>
  13570. <code>set &lt;name&gt; &lt;value&gt;</code>
  13571. <br><br>
  13572. where <code>value</code> is
  13573. <li>teach<br>
  13574. initiate teach-in mode</li>
  13575. <li>basic t/&#176C<br>
  13576. issue Basic Setpoint</li>
  13577. </ul><br>
  13578. Setpoint Range: t = 0 &#176C ... 51.2 &#176C<br>
  13579. The attr subType must be gateway and gwCmd must be setpointBasic.
  13580. This is done if the device was created by autocreate.<br>
  13581. </li>
  13582. <br><br>
  13583. <li>Gateway (EEP A5-38-08)<br>
  13584. Control variable<br>
  13585. [untested]<br>
  13586. <ul>
  13587. <code>set &lt;name&gt; &lt;value&gt;</code>
  13588. <br><br>
  13589. where <code>value</code> is
  13590. <li>teach<br>
  13591. initiate teach-in mode</li>
  13592. <li>presence present|absent|standby<br>
  13593. issue Room occupancy</li>
  13594. <li>energyHoldOff normal|holdoff<br>
  13595. issue Energy hold off</li>
  13596. <li>controllerMode auto|heating|cooling|off<br>
  13597. issue Controller mode</li>
  13598. <li>controllerState auto|override <0 ... 100> <br>
  13599. issue Control variable override</li>
  13600. </ul><br>
  13601. Override Range: cvov = 0 % ... 100 %<br>
  13602. The attr subType must be gateway and gwCmd must be controlVar.
  13603. This is done if the device was created by autocreate.<br>
  13604. </li>
  13605. <br><br>
  13606. <li>Gateway (EEP A5-38-08)<br>
  13607. Fan stage<br>
  13608. [untested]<br>
  13609. <ul>
  13610. <code>set &lt;name&gt; &lt;value&gt;</code>
  13611. <br><br>
  13612. where <code>value</code> is
  13613. <li>teach<br>
  13614. initiate teach-in mode</li>
  13615. <li>stage 0 ... 3|auto<br>
  13616. issue Fan Stage override</li>
  13617. </ul><br>
  13618. The attr subType must be gateway and gwCmd must be fanStage.
  13619. This is done if the device was created by autocreate.<br>
  13620. </li>
  13621. <br><br>
  13622. <li>Gateway (EEP A5-38-08)<br>
  13623. <a name="Blind Command Central">Blind Command Central</a><br>
  13624. [not fully tested]<br>
  13625. <ul>
  13626. <code>set &lt;name&gt; &lt;value&gt;</code>
  13627. <br><br>
  13628. where <code>value</code> is
  13629. <li>position/% [&alpha;/&#176]<br>
  13630. drive blinds to position with angle value</li>
  13631. <li>teach<br>
  13632. initiate teach-in mode</li>
  13633. <li>status<br>
  13634. Status request</li>
  13635. <li>opens<br>
  13636. issue blinds opens command</li>
  13637. <li>up tu/s ta/s<br>
  13638. issue roll up command</li>
  13639. <li>closes<br>
  13640. issue blinds closes command</li>
  13641. <li>down td/s ta/s<br>
  13642. issue roll down command</li>
  13643. <li>position position/% [&alpha;/&#176]<br>
  13644. drive blinds to position with angle value</li>
  13645. <li>stop<br>
  13646. issue blinds stops command</li>
  13647. <li>runtimeSet tu/s td/s<br>
  13648. set runtime parameter</li>
  13649. <li>angleSet ta/s<br>
  13650. set angle configuration</li>
  13651. <li>positionMinMax positionMin/% positionMax/%<br>
  13652. set min, max values for position</li>
  13653. <li>angleMinMax &alpha;o/&#176 &alpha;s/&#176<br>
  13654. set slat angle for open and shut position</li>
  13655. <li>positionLogic normal|inverse<br>
  13656. set position logic</li>
  13657. </ul><br>
  13658. Runtime Range: tu|td = 0 s ... 255 s<br>
  13659. Select a runtime up and a runtime down that is at least as long as the
  13660. shading element or roller shutter needs to move from its end position to
  13661. the other position.<br>
  13662. Position Range: position = 0 % ... 100 %<br>
  13663. Angle Time Range: ta = 0 s ... 25.5 s<br>
  13664. Runtime value for the sunblind reversion time. Select the time to revolve
  13665. the sunblind from one slat angle end position to the other end position.<br>
  13666. Slat Angle: &alpha;|&alpha;o|&alpha;s = -180 &#176 ... 180 &#176<br>
  13667. Position Logic, normal: Blinds fully opens corresponds to Position = 0 %<br>
  13668. Position Logic, inverse: Blinds fully opens corresponds to Position = 100 %<br>
  13669. The attr subType must be gateway and gwCmd must be blindCmd.<br>
  13670. See also attributes <a href="#EnOcean_sendDevStatus">sendDevStatus and <a href="#EnOcean_serviceOn">serviceOn</a></a><br>
  13671. The profile is linked with controller profile, see <a href="#Blind Status">Blind Status</a>.<br>
  13672. </li>
  13673. <br><br>
  13674. <li>Extended Lighting Control (EEP A5-38-09)<br>
  13675. [untested]<br>
  13676. <ul>
  13677. <code>set &lt;name&gt; &lt;value&gt;</code>
  13678. <br><br>
  13679. where <code>value</code> is
  13680. <li>teach<br>
  13681. initiate remote teach-in</li>
  13682. <li>on<br>
  13683. issue switch on command</li>
  13684. <li>off<br>
  13685. issue switch off command</li>
  13686. <li>dim dim [rampTime/s]<br>
  13687. issue dim command</li>
  13688. <li>dimup rampTime/s<br>
  13689. issue dim command</li>
  13690. <li>dimdown rampTime/s<br>
  13691. issue dim command</li>
  13692. <li>stop<br>
  13693. stop dimming</li>
  13694. <li>rgb &lt;red color value&gt&lt;green color value&gt&lt;blue color value&gt<br>
  13695. issue color value command</li>
  13696. <li>scene drive|store 0..15<br>
  13697. store actual value in the scene or drive to scene value</li>
  13698. <li>dimMinMax &lt;min value&gt &lt;max value&gt<br>
  13699. set minimal and maximal dimmer value</li>
  13700. <li>lampOpHours 0..65535<br>
  13701. set the operation hours of the lamp</li>
  13702. <li>block unlock|on|off|local<br>
  13703. locking local operations</li>
  13704. <li>meteringValues 0..65535 mW|W|kW|MW|Wh|kWh|MWh|GWh|mA|mV<br>
  13705. set a new value for the energy metering (overwrite the actual value with the selected unit)</li>
  13706. <li>meteringValues 0..6553.5 A|V<br>
  13707. set a new value for the energy metering (overwrite the actual value with the selected unit)</li>
  13708. <li><a href="#setExtensions">set extensions</a> are supported.</li>
  13709. </ul><br>
  13710. color values: 00 ... FF hexadecimal<br>
  13711. rampTime Range: t = 1 s ... 65535 s or 1 if no time specified, ramping time can be set by attribute
  13712. <a href="#EnOcean_rampTime">rampTime</a><br>
  13713. The attr subType or subTypSet must be lightCtrl.01. This is done if the device was created by autocreate.<br>
  13714. The subType is associated with the subtype lightCtrlState.02.
  13715. </li>
  13716. <br><br>
  13717. <li><a name="Manufacturer Specific Applications">Manufacturer Specific Applications</a> (EEP A5-3F-7F)<br>
  13718. Shutter<br>
  13719. [Eltako FSB12, FSB14, FSB61, FSB70, tested with Eltako devices only]<br>
  13720. <ul>
  13721. <code>set &lt;name&gt; &lt;value&gt;</code>
  13722. <br><br>
  13723. where <code>value</code> is
  13724. <li>position/% [&alpha;/&#176]<br>
  13725. drive blinds to position with angle value</li>
  13726. <li>anglePos &alpha;/&#176<br>
  13727. drive blinds to angle value</li>
  13728. <li>closes<br>
  13729. issue blinds closes command</li>
  13730. <li>down td/s<br>
  13731. issue roll down command</li>
  13732. <li>opens<br>
  13733. issue blinds opens command</li>
  13734. <li>position position/% [&alpha;/&#176]<br>
  13735. drive blinds to position with angle value</li>
  13736. <li>stop<br>
  13737. issue stop command</li>
  13738. <li>teach<br>
  13739. initiate teach-in mode</li>
  13740. <li>up tu/s<br>
  13741. issue roll up command</li>
  13742. </ul><br>
  13743. Run-time Range: tu|td = 1 s ... 255 s<br>
  13744. Position Range: position = 0 % ... 100 %<br>
  13745. Slat Angle Range: &alpha; = -180 &#176 ... 180 &#176<br>
  13746. Angle Time Range: ta = 0 s ... 6 s<br>
  13747. The devive can only fully controlled if the attributes <a href="#angleMax">angleMax</a>,
  13748. <a href="#angleMin">angleMin</a>, <a href="#angleTime">angleTime</a>,
  13749. <a href="#shutTime">shutTime</a> and <a href="#shutTimeCloses">shutTimeCloses</a>,
  13750. are set correctly.
  13751. If <a href="#EnOcean_settingAccuracy">settingAccuracy</a> is set to high, the run-time is sent in 1/10 increments.<br>
  13752. Set attr subType to manufProfile, manufID to 00D and attr model to FSB14|FSB61|FSB70|TF manually.<br>
  13753. Use the sensor type "Szenentaster/PC" for Eltako devices.
  13754. </li>
  13755. <br><br>
  13756. <li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-12)<br>
  13757. [Telefunken Funktionsstecker, PEHA Easyclick, AWAG Elektrotechnik AG Omnio UPS 230/xx,UPD 230/xx, NodOn in-wall module, smart plug]<br>
  13758. <ul>
  13759. <code>set &lt;name&gt; &lt;value&gt;</code>
  13760. <br><br>
  13761. where <code>value</code> is
  13762. <li>autoOffTime t/s [&lt;channel&gt;]<br>
  13763. set auto Off timer</li>
  13764. <li>delayOffTime t/s [&lt;channel&gt;]<br>
  13765. set delay Off timer</li>
  13766. <li>dim/% [&lt;channel&gt; [&lt;rampTime&gt;]]<br>
  13767. issue dimming command</li>
  13768. <li>extSwitchMode unavailable|switch|pushbutton|auto [&lt;channel&gt;]<br>
  13769. set external interface mode</li>
  13770. <li>extSwitchType toggle|direction [&lt;channel&gt;]<br>
  13771. set external interface type</li>
  13772. <li>on [&lt;channel&gt;]<br>
  13773. issue switch on command</li>
  13774. <li>off [&lt;channel&gt;]<br>
  13775. issue switch off command</li>
  13776. <li>dim dim/% [&lt;channel&gt; [&lt;rampTime&gt;]]<br>
  13777. issue dimming command</li>
  13778. <li>local dayNight day|night, day is default<br>
  13779. set the user interface indication</li>
  13780. <li>local defaultState on|off|last, off is default<br>
  13781. set the default setting of the output channels when switch on</li>
  13782. <li>local localControl enabled|disabled, disabled is default<br>
  13783. enable the local control of the device</li>
  13784. <li>local overCurrentShutdown off|restart, off is default<br>
  13785. set the behavior after a shutdown due to an overcurrent</li>
  13786. <li>local overCurrentShutdownReset not_active|trigger, not_active is default<br>
  13787. trigger a reset after an overcurrent</li>
  13788. <li>local rampTime&lt;1...3&gt; 0/s, 0.5/s ... 7/s, 7.5/s, 0 is default<br>
  13789. set the dimming time of timer 1 ... 3</li>
  13790. <li>local teachInDev enabled|disabled, disabled is default<br>
  13791. enable the taught-in devices with different EEP</li>
  13792. <li>measurement delta 0/s ... 4095/s, 0 is default<br>
  13793. define the difference between two displayed measurements </li>
  13794. <li>measurement mode energy|power, energy is default<br>
  13795. define the measurand</li>
  13796. <li>measurement report query|auto, query is default<br>
  13797. specify the measurement method</li>
  13798. <li>measurement reset not_active|trigger, not_active is default<br>
  13799. resetting the measured values</li>
  13800. <li>measurement responseTimeMax 10/s ... 2550/s, 10 is default<br>
  13801. set the maximum time between two outputs of measured values</li>
  13802. <li>measurement responseTimeMin 1/s ... 255/s, 1 is default<br>
  13803. set the minimum time between two outputs of measured values</li>
  13804. <li>measurement unit Ws|Wh|KWh|W|KW, Ws is default<br>
  13805. specify the measurement unit</li>
  13806. <li>roomCtrlMode off|comfort|comfort-1|comfort-2|economy|buildingProtection<br>
  13807. set pilot wire mode</li>
  13808. <li>special repeater off|1|2<br>
  13809. set repeater level of device (additional NodOn command)
  13810. </li>
  13811. </ul><br>
  13812. [autoOffTime] = 0 s ... 0.1 s ... 6553.4 s<br>
  13813. [delayOffTime] = 0 s ... 0.1 s ... 6553.4 s<br>
  13814. [channel] = 0...29|all|input, all is default<br>
  13815. The default channel can be specified with the attr <a href="#EnOcean_defaultChannel">defaultChannel</a>.<br>
  13816. [rampTime] = 1..3|switch|stop, switch is default<br>
  13817. The attr subType must be actuator.01. This is done if the device was
  13818. created by autocreate. To control the device, it must be bidirectional paired,
  13819. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  13820. </li>
  13821. <br><br>
  13822. <li>Blind Control for Position and Angle (D2-05-00 - D2-05-01)<br>
  13823. [AWAG Elektrotechnik AG OMNIO UPJ 230/12, REGJ12/04M ]<br>
  13824. <ul>
  13825. <code>set &lt;name&gt; &lt;value&gt;</code>
  13826. <br><br>
  13827. where <code>value</code> is
  13828. <li>opens [&lt;channel&gt;]<br>
  13829. issue blinds opens command</li>
  13830. <li>closes [&lt;channel&gt;]<br>
  13831. issue blinds closes command</li>
  13832. <li>position position/% [[&alpha;/%] [[&lt;channel&gt;] [directly|opens|closes]]]<br>
  13833. drive blinds to position with angle value</li>
  13834. <li>anglePos &alpha;/% [&lt;channel&gt;]<br>
  13835. drive blinds to angle value</li>
  13836. <li>stop [&lt;channel&gt;]<br>
  13837. issue stop command</li>
  13838. <li>alarm [&lt;channel&gt;]<br>
  13839. set actuator to the "alarm" mode. When the actuator ist set to the "alarm" mode neither local
  13840. nor central positioning and configuration commands will be executed. Before entering the "alarm"
  13841. mode, the actuator will execute the "alarm action" as configured by the attribute <a href="#EnOcean_alarmAction">alarmAction</a>
  13842. </li>
  13843. <li>lock [&lt;channel&gt;]<br>
  13844. set actuator to the "blockade" mode. When the actuator ist set to the "blockade" mode neither local
  13845. nor central positioning and configuration commands will be executed.
  13846. </li>
  13847. <li>unlock [&lt;channel&gt;]<br>
  13848. issue unlock command</li>
  13849. </ul><br>
  13850. Channel Range: 1 ... 4|all, default is all<br>
  13851. Position Range: position = 0 % ... 100 %<br>
  13852. Slat Angle Range: &alpha; = 0 % ... 100 %<br>
  13853. The devive can only fully controlled if the attributes <a href="#EnOcean_alarmAction">alarmAction</a>,
  13854. <a href="#angleTime">angleTime</a>, <a href="#EnOcean_reposition">reposition</a> and <a href="#shutTime">shutTime</a>
  13855. are set correctly.<br>
  13856. With the attribute <a name="EnOcean_defaultChannel">defaultChannel</a> the default channel can be specified.<br>
  13857. The attr subType must be blindsCtrl.00 or blindsCtrl.01. This is done if the device was
  13858. created by autocreate. To control the device, it must be bidirectional paired,
  13859. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  13860. </li>
  13861. <br><br>
  13862. <li>Multisensor Windows Handle (D2-06-01)<br>
  13863. [Soda GmbH]<br>
  13864. <ul>
  13865. <code>set &lt;name&gt; &lt;value&gt;</code>
  13866. <br><br>
  13867. where <code>value</code> is
  13868. <li>presence absent|present<br>
  13869. set vacation mode</li>
  13870. <li>handleClosedClick disable|enable<br>
  13871. set handle closed click feature</li>
  13872. <li>batteryLowClick disable|enable<br>
  13873. set battery low click feature</li>
  13874. <li>teachSlave contact|windowHandleClosed|windowHandleOpen|windowHandleTilted<br>
  13875. sent teach-in to the slave devices (contact: EEP: D5-00-01, windowHandle: EEP F6-10-00)<br>
  13876. The events window or handle will get forwarded once a slave-device contact or windowHandle is taught in.
  13877. </li>
  13878. <li>updateInterval t/s<br>
  13879. set sensor update interval</li>
  13880. <li>blinkInterval t/s<br>
  13881. set vacation blink interval</li>
  13882. </ul><br>
  13883. sensor update interval Range: updateInterval = 5 ... 65535<br>
  13884. vacation blick interval Range: blinkInterval = 3 ... 255<br>
  13885. The multisensor window handle is configured using the following attributes:<br>
  13886. <ul>
  13887. <li><a href="#EnOcean_subDefH">subDefH</a></li>
  13888. <li><a href="#EnOcean_subDefW">subDefW</a></li>
  13889. </ul>
  13890. The attr subType must be multisensor.01. This is done if the device was
  13891. created by autocreate.
  13892. </li>
  13893. <br><br>
  13894. <li>Room Control Panels (D2-10-00 - D2-10-02)<br>
  13895. [Kieback & Peter RBW322-FTL]<br>
  13896. <ul>
  13897. <code>set &lt;name&gt; &lt;value&gt;</code>
  13898. <br><br>
  13899. where <code>value</code> is
  13900. <li>buildingProtectionTemp t/&#176C<br>
  13901. set building protection temperature</li>
  13902. <li>clearCmds [&lt;channel&gt;]<br>
  13903. clear waiting commands</li>
  13904. <li>comfortTemp t/&#176C<br>
  13905. set comfort temperature</li>
  13906. <li>config<br>
  13907. Setting the configuration of the room controller, the configuration parameters are set using attributes.</li>
  13908. <li>cooling auto|off|on|no_change<br>
  13909. switch cooling</li>
  13910. <li>deleteTimeProgram<br>
  13911. delete time programs of the room controller</li>
  13912. <li>desired-temp t/&#176C<br>
  13913. set setpoint temperature</li>
  13914. <li>economyTemp t/&#176C<br>
  13915. set economy temperature</li>
  13916. <li>fanSpeed fanspeed/%<br>
  13917. set fan speed</li>
  13918. <li>fanSpeedMode central|local<br>
  13919. set fan speed mode</li>
  13920. <li>heating auto|off|on|no_change<br>
  13921. switch heating</li>
  13922. <li>preComfortTemp t/&#176C<br>
  13923. set pre comfort temperature</li>
  13924. <li>roomCtrlMode buildingProtectionTemp|comfortTemp|economyTemp|preComfortTemp<br>
  13925. select setpoint temperature</li>
  13926. <li>setpointTemp t/&#176C<br>
  13927. set current setpoint temperature</li>
  13928. <li>time<br>
  13929. set time and date of the room controller </li>
  13930. <li>timeProgram<br>
  13931. set time programms of the room contoller</li>
  13932. <li>window closed|open<br>
  13933. put the window state</li>
  13934. </ul><br>
  13935. Setpoint Range: t = 0 &#176C ... 40 &#176C<br>
  13936. The room controller is configured using the following attributes:<br>
  13937. <ul>
  13938. <li><a href="#EnOcean_blockDateTime">blockDateTime</a></li>
  13939. <li><a href="#EnOcean_blockDisplay">blockDisplay</a></li>
  13940. <li><a href="#EnOcean_blockFanSpeed">blockFanSpeed</a></li>
  13941. <li><a href="#EnOcean_blockMotion">blockMotion</a></li>
  13942. <li><a href="#EnOcean_blockProgram">blockProgram</a></li>
  13943. <li><a href="#EnOcean_blockOccupany">blockOccupancy</a></li>
  13944. <li><a href="#EnOcean_blockTemp">blockTemp</a></li>
  13945. <li><a href="#EnOcean_blockTimeProgram">blockTimeProgram</a></li>
  13946. <li><a href="#EnOcean_blockSetpointTemp">blockSetpointTemp</a></li>
  13947. <li><a href="#EnOcean_daylightSavingTime">daylightSavingTime</a></li>
  13948. <li><a href="#EnOcean_displayContent">displayContent</a></li>
  13949. <li><a href="#EnOcean_pollInterval">pollInterval</a></li>
  13950. <li><a href="#EnOcean_temperatureScale">temperatureScale</a></li>
  13951. <li><a href="#EnOcean_timeNotation">timeNotation</a></li>
  13952. <li><a href="#EnOcean_timeProgram[1-4]">timeProgram[1-4]</a></li>
  13953. </ul>
  13954. The attr subType must be roomCtrlPanel.00. This is done if the device was
  13955. created by autocreate. To control the device, it must be bidirectional paired,
  13956. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  13957. </li>
  13958. <br><br>
  13959. <li>Room Control Panels (D2-11-01 - D2-11-08)<br>
  13960. [Thermokon EasySens SR06 LCD-2T/-2T rh -4T/-4T rh]<br>
  13961. <ul>
  13962. <code>set &lt;name&gt; &lt;value&gt;</code>
  13963. <br><br>
  13964. where <code>value</code> is
  13965. <li>cooling on|off, default [colling] = off<br>
  13966. set cooling symbol at the display</li>
  13967. <li>desired-temp t/&#176C<br>
  13968. set setpoint temperature</li>
  13969. <li>fanSpeed auto|off|1|2|3<br>
  13970. set fan speed</li>
  13971. <li>heating on|off, default [heating] = off<br>
  13972. set heating symbol at the display</li>
  13973. <li>occupancy occupied|unoccupied<br>
  13974. set occupancy state</li>
  13975. <li>setpointTemp t/&#176C<br>
  13976. set current setpoint temperature</li>
  13977. <li>setpointShiftMax t/K<br>
  13978. set setpoint shift max</li>
  13979. <li>setpointType setpointTemp|setpointShift<br>
  13980. set setpoint type</li>
  13981. <li>window closed|open, default [window] = closed<br>
  13982. set window open symbol at the display</li>
  13983. </ul><br>
  13984. Setpoint Range: t = 5 &#176C ... 40 &#176C<br>
  13985. Setpoint Shift Max Range: t = 0 K ... 10 K<br>
  13986. The attr subType must be roomCtrlPanel.01. This is done if the device was
  13987. created by autocreate. To control the device, it must be bidirectional paired by Smart Ack,
  13988. see <a href="#EnOcean_smartAck">SmartAck Learning</a>.
  13989. </li>
  13990. <br><br>
  13991. <li>Fan Control (D2-20-00 - D2-20-02)<br>
  13992. [Maico ECA x RC/RCH, ER 100 RC, untested]<br>
  13993. <ul>
  13994. <code>set &lt;name&gt; &lt;value&gt;</code>
  13995. <br><br>
  13996. where <code>value</code> is
  13997. <li>on<br>
  13998. fan on</li>
  13999. <li>off<br>
  14000. fan off</li>
  14001. <li>desired-temp [t/&#176C]<br>
  14002. set setpoint temperature</li>
  14003. <li>fanSpeed fanspeed/%|auto|default<br>
  14004. set fan speed</li>
  14005. <li>humidityThreshold rH/%<br>
  14006. set humidity threshold</li>
  14007. <li>roomSize 0...350/m<sup>2</sup>|default|not_used<br>
  14008. set room size</li>
  14009. <li>setpointTemp [t/&#176C]<br>
  14010. set current setpoint temperature</li>
  14011. </ul><br>
  14012. Setpoint Range: t = 0 &#176C ... 40 &#176C<br>
  14013. The fan controller is configured using the following attributes:<br>
  14014. <ul>
  14015. <li><a href="#EnOcean_setCmdTrigger">setCmdTrigger</a></li>
  14016. <li><a href="#EnOcean_switchHysteresis">switchHysteresis</a></li>
  14017. <li><a href="#temperatureRefDev">temperatureRefDev</a></li>
  14018. </ul>
  14019. The attr subType must be fanCtrl.00. This is done if the device was
  14020. created by autocreate. To control the device, it must be bidirectional paired,
  14021. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>. The profile
  14022. behaves like a master. Only one fan can be taught as a slave.
  14023. </li>
  14024. <br><br>
  14025. <li>Heat Recovery Ventilation (D2-50-00 - D2-50-11)<br>
  14026. [untested]<br>
  14027. <ul>
  14028. <code>set &lt;name&gt; &lt;value&gt;</code>
  14029. <br><br>
  14030. where <code>value</code> is
  14031. <li>ventilation off|1...4|auto|demand|supplyAir|exhaustAir<br>
  14032. select ventilation mode/level</li>
  14033. <li>heatExchangerBypass opens|closes<br>
  14034. override of automatic heat exchanger bypass control</li>
  14035. <li>startTimerMode<br>
  14036. enable timer operation mode</li>
  14037. <li>CO2Threshold default|1/%<br>
  14038. override CO2 threshold for CO2 control in automatic mode</li>
  14039. <li>humidityThreshold default|rH/%<br>
  14040. override humidity threshold for humidity control in automatic mode</li>
  14041. <li>airQuatityThreshold default|1/%<br>
  14042. override air qualidity threshold for air qualidity control in automatic mode</li>
  14043. <li>roomTemp default|t/&#176C<br>
  14044. override room temperature threshold for room temperature control mode</li>
  14045. </ul><br>
  14046. roomTemp Range: t = -63 &#176C ... 63 &#176C<br>
  14047. xThreshold Range: 0 % ... 100 %<br>
  14048. The attr subType must be heatRecovery.00. This is done if the device was
  14049. created by autocreate. To control the device, it must be bidirectional paired,
  14050. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  14051. </li>
  14052. <br><br>
  14053. <li>Valve Control (EEP D2-A0-01)<br>
  14054. <ul>
  14055. <code>set &lt;name&gt; &lt;value&gt;</code>
  14056. <br><br>
  14057. where <code>value</code> is
  14058. <li>closes<br>
  14059. issue closes command (master)</li>
  14060. <li>opens<br>
  14061. issue opens command (master)</li>
  14062. <li>closed<br>
  14063. issue closed command (slave)</li>
  14064. <li>open<br>
  14065. issue open command (slave)</li>
  14066. <li>teachIn<br>
  14067. initiate UTE teach-in (slave)</li>
  14068. <li>teachOut<br>
  14069. initiate UTE teach-out (slave)</li>
  14070. </ul><br>
  14071. The valve controller is configured using the following attributes:<br>
  14072. <ul>
  14073. <li><a href="#EnOcean_devMode">devMode</a></li>
  14074. </ul>
  14075. The attr subType must be valveCtrl.00. This is done if the device was
  14076. created by autocreate. To control the device, it must be bidirectional paired,
  14077. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>. The profile
  14078. behaves like a master or slave, see <a href="#EnOcean_devMode">devMode</a>.
  14079. </li>
  14080. <br><br>
  14081. <li>Generic Profiles<br>
  14082. <ul>
  14083. <code>set &lt;name&gt; &lt;value&gt;</code>
  14084. <br><br>
  14085. where <code>value</code> is
  14086. <li>&lt;00 ... 64&gt;-&lt;channel name&gt; &lt;value&gt;<br>
  14087. set channel value</li>
  14088. <li>channelName &lt;channel number&gt;-&lt;channel name&gt;<br>
  14089. rename channel</li>
  14090. <li>teachIn<br>
  14091. sent teach-in telegram</li>
  14092. <li>teachOut<br>
  14093. sent teach-out telegram</li>
  14094. </ul><br>
  14095. The generic profile device is configured using the following attributes:<br>
  14096. <ul>
  14097. <li><a href="#EnOcean_comMode">comMode</a></li>
  14098. <li><a href="#EnOcean_devMode">devMode</a></li>
  14099. <li><a href="#EnOcean_gpDef">gpDef</a></li>
  14100. <li><a href="#EnOcean_manufID">manufID</a></li>
  14101. </ul>
  14102. The attr subType must be genericProfile. This is done if the device was
  14103. created by autocreate. If the profile in slave mode is operated, especially the channel
  14104. definition in the gpDef attributes must be entered manually.
  14105. </li>
  14106. <br><br>
  14107. <li>RAW Command<br>
  14108. <ul>
  14109. <code>set &lt;name&gt; &lt;value&gt;</code>
  14110. <br><br>
  14111. where <code>value</code> is
  14112. <li>1BS|4BS|GPCD|GPSD|GPTI|GPTR|MSC|RPS|UTE|VLD data [status]<br>
  14113. sent data telegram</li>
  14114. </ul><br>
  14115. [data] = &lt;1-byte hex ... 512-byte hex&gt;<br>
  14116. [status] = 0x00 ... 0xFF<br>
  14117. With the help of this command data messages in hexadecimal format can be sent.
  14118. Telegram types (RORG) 1BS, 4BS, RPS, MSC, UTE, VLD, GPCD, GPSD, GPTI and GPTR are supported.
  14119. For further information, see <a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a> and
  14120. Generic Profiles.
  14121. </li>
  14122. <br><br>
  14123. <li>Radio Link Test<br>
  14124. <ul>
  14125. <code>set &lt;name&gt; &lt;value&gt;</code>
  14126. <br><br>
  14127. where <code>value</code> is
  14128. <li>standby|stop<br>
  14129. set RLT Master state
  14130. </li>
  14131. </ul><br>
  14132. The Radio Link Test device is configured using the following attributes:<br>
  14133. <ul>
  14134. <li><a href="#EnOcean_rltRepeat">rltRepeat</a></li>
  14135. <li><a href="#EnOcean_rltType">rltType</a></li>
  14136. </ul>
  14137. The attr subType must be readioLinkTest. This is done if the device was
  14138. created by autocreate or manually by <code>define &lt;name&gt; EnOcean A5-3F-00</code><br>.
  14139. </li>
  14140. <br><br>
  14141. </ul></ul>
  14142. <a name="EnOceanget"></a>
  14143. <b>Get</b>
  14144. <ul>
  14145. <li><a name="EnOcean_remoteGet">Remote Management</a>
  14146. <ul>
  14147. <code>get &lt;name&gt; &lt;value&gt;</code>
  14148. <br><br>
  14149. where <code>value</code> is
  14150. <li>remoteDevCfg &lt;start data index&gt; &lt;end data index&gt;<br>
  14151. get device configuration between start index and end index</li>
  14152. <li>remoteFunctions<br>
  14153. get a list of the supported extended functions</li>
  14154. <li>remoteID<br>
  14155. get the remote device ID</li>
  14156. <li>remoteLinkTableInfo<br>
  14157. query supported link table info</li>
  14158. <li>remoteLinkCfg in|out &lt;index&gt; &lt;start data index&gt; &lt;end data index&gt; &lt;length&gt;<br>
  14159. get link table between start index and end index</li>
  14160. <li>remoteLinkTable in|out &lt;start index&gt; &lt;end index&gt;<br>
  14161. get link table between start index and end index</li>
  14162. <li>remoteLinkTableGP in|out &lt;index&gt;<br>
  14163. get link table GP entry with index</li>
  14164. <li>remotePing<br>
  14165. get a ping response from the remote device</li>
  14166. <li>remoteProductID<br>
  14167. query product ID</li>
  14168. <li>remoteRepeater<br>
  14169. asks for the repeater status of the remote device</li>
  14170. <li>remoteStatus<br>
  14171. asks for the status info of the remote device</li>
  14172. <br>
  14173. [&lt;data index&gt;] = 0000...FFFF<br>
  14174. [&lt;index&gt;] = 00...FF<br>
  14175. [&lt;length&gt;] = n x 00...FF<br>
  14176. </ul>
  14177. </li><br><br>
  14178. <li>Dual Channel Switch Actuator (EEP A5-11-059)<br>
  14179. [untested]<br>
  14180. <ul>
  14181. <code>get &lt;name&gt; &lt;value&gt;</code>
  14182. <br><br>
  14183. where <code>value</code> is
  14184. <li>state<br>
  14185. status request</li>
  14186. </ul><br>
  14187. The attr subType or subTypSet must be switch.05. This is done if the device was created by autocreate.
  14188. </li>
  14189. <br><br>
  14190. <li>Extended Lighting Control (EEP A5-38-09)<br>
  14191. [untested]<br>
  14192. <ul>
  14193. <code>get &lt;name&gt; &lt;value&gt;</code>
  14194. <br><br>
  14195. where <code>value</code> is
  14196. <li>state<br>
  14197. status request</li>
  14198. </ul><br>
  14199. The attr subType or subTypSet must be lightCtrl.01. This is done if the device was created by autocreate.<br>
  14200. The subType is associated with the subtype lightCtrlState.02.
  14201. </li>
  14202. <br><br>
  14203. <li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-12)<br>
  14204. [Telefunken Funktionsstecker, PEHA Easyclick, AWAG Elektrotechnik AG Omnio UPS 230/xx,UPD 230/xx, NodOn in-wall module, smart plug]<br>
  14205. <ul>
  14206. <code>get &lt;name&gt; &lt;value&gt;</code>
  14207. <br><br>
  14208. where <code>value</code> is
  14209. <li>roomCtrlMode<br>
  14210. get pilot wire mode</li>
  14211. <li>settings [&lt;channel&gt;]<br>
  14212. get external interface settings</li>
  14213. <li>state [&lt;channel&gt;]<br>
  14214. </li>
  14215. <li>measurement &lt;channel&gt; energy|power<br>
  14216. </li>
  14217. <li>special &lt;channel&gt; health|load|voltage|serialNumber<br>
  14218. additional Permondo SmartPlug PSC234 commands
  14219. </li>
  14220. <li>special &lt;channel&gt; firmwareVersion|reset|taughtInDevID|taughtInDevNum<br>
  14221. additional NodOn commands
  14222. </li>
  14223. </ul><br>
  14224. The default channel can be specified with the attr <a href="#EnOcean_defaultChannel">defaultChannel</a>.<br>
  14225. The attr subType must be actuator.01. This is done if the device was
  14226. created by autocreate. To control the device, it must be bidirectional paired,
  14227. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  14228. </li>
  14229. <br><br>
  14230. <li>Blind Control for Position and Angle (D2-05-00)<br>
  14231. [AWAG Elektrotechnik AG OMNIO UPJ 230/12, REGJ12/04M]<br>
  14232. <ul>
  14233. <code>get &lt;name&gt; &lt;value&gt;</code>
  14234. <br><br>
  14235. where <code>value</code> is
  14236. <li>position [&lt;channel&gt;]<br>
  14237. query position and angle value</li>
  14238. </ul><br>
  14239. Channel Range: 1 ... 4|all, default is all<br>
  14240. The devive can only fully controlled if the attributes <a href="#EnOcean_alarmAction">alarmAction</a>,
  14241. <a href="#angleTime">angleTime</a>, <a href="#EnOcean_reposition">reposition</a> and <a href="#shutTime">shutTime</a>
  14242. are set correctly.<br>
  14243. With the attribute <a name="EnOcean_defaultChannel">defaultChannel</a> the default channel can be specified.<br>
  14244. The attr subType must be blindsCtrl.00 or blindsCrtl.01. This is done if the device was
  14245. created by autocreate. To control the device, it must be bidirectional paired,
  14246. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  14247. </li>
  14248. <br><br>
  14249. <li>Multisensor Windows Handle (D2-06-01)<br>
  14250. [Soda GmbH]<br>
  14251. <ul>
  14252. <code>get &lt;name&gt; &lt;value&gt;</code>
  14253. <br><br>
  14254. where <code>value</code> is
  14255. <li>config<br>
  14256. get configuration settings</li>
  14257. <li>log<br>
  14258. get log data</li>
  14259. </ul><br>
  14260. The multisensor window handle is configured using the following attributes:<br>
  14261. <ul>
  14262. <li><a href="#EnOcean_subDefH">subDefH</a></li>
  14263. <li><a href="#EnOcean_subDefW">subDefW</a></li>
  14264. </ul>
  14265. The attr subType must be multisensor.01. This is done if the device was
  14266. created by autocreate.
  14267. </li>
  14268. <br><br>
  14269. <li>Room Control Panels (D2-10-00 - D2-10-02)<br>
  14270. [Kieback & Peter RBW322-FTL]<br>
  14271. <ul>
  14272. <code>get &lt;name&gt; &lt;value&gt;</code>
  14273. <br><br>
  14274. where <code>value</code> is
  14275. <li>config<br>
  14276. get the configuration of the room controler</li>
  14277. <li>data<br>
  14278. get data</li>
  14279. <li>roomCtrl<br>
  14280. get the parameter of the room controler</li>
  14281. <li>timeProgram<br>
  14282. get the time program</li>
  14283. </ul><br>
  14284. The attr subType must be roomCtrlPanel.00. This is done if the device was
  14285. created by autocreate. To control the device, it must be bidirectional paired,
  14286. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  14287. </li>
  14288. <br><br>
  14289. <li>Fan Control (D2-20-00 - D2-20-02)<br>
  14290. [Maico ECA x RC/RCH, ER 100 RC, untested]<br>
  14291. <ul>
  14292. <code>get &lt;name&gt; &lt;value&gt;</code>
  14293. <br><br>
  14294. where <code>value</code> is
  14295. <li>state<br>
  14296. get the state of the room controler</li>
  14297. </ul><br>
  14298. The attr subType must be fanCtrl.00. This is done if the device was
  14299. created by autocreate. To control the device, it must be bidirectional paired,
  14300. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  14301. </li>
  14302. <br><br>
  14303. <li>Heat Recovery Ventilation (D2-50-00 - D2-50-11)<br>
  14304. [untested]<br>
  14305. <ul>
  14306. <code>get &lt;name&gt; &lt;value&gt;</code>
  14307. <br><br>
  14308. where <code>value</code> is
  14309. <li>basicState<br>
  14310. get the basic state</li>
  14311. <li>extendedState<br>
  14312. get the extended state</li>
  14313. </ul><br>
  14314. The attr subType must be heatRecovery.00. This is done if the device was
  14315. created by autocreate. To control the device, it must be bidirectional paired,
  14316. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  14317. </li>
  14318. <br><br>
  14319. <li>Valve Control (EEP D2-A0-01)<br>
  14320. <ul>
  14321. <code>get &lt;name&gt; &lt;value&gt;</code>
  14322. <br><br>
  14323. where <code>value</code> is
  14324. <li>state<br>
  14325. get the state of the valve controler (master)</li>
  14326. </ul><br>
  14327. The attr subType must be valveCtrl.00. This is done if the device was
  14328. created by autocreate. To control the device, it must be bidirectional paired,
  14329. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>. The profile
  14330. behaves like a master or slave, see <a href="#EnOcean_devMode">devMode</a>.
  14331. </li>
  14332. <br><br>
  14333. </ul><br>
  14334. <a name="EnOceanattr"></a>
  14335. <b>Attributes</b>
  14336. <ul>
  14337. <ul>
  14338. <li><a name="actualTemp">actualTemp</a> t/&#176C<br>
  14339. The value of the actual temperature, used by a Room Sensor and Control Unit
  14340. or when controlling HVAC components e. g. Battery Powered Actuators (MD15 devices). Should by
  14341. filled via a notify from a distinct temperature sensor.<br>
  14342. If absent, the reported temperature from the HVAC components is used.
  14343. </li>
  14344. <li><a name="EnOcean_alarmAction">alarmAction</a> &lt;channel1&gt;[:&lt;channel2&gt;[:&lt;channel3&gt;[:&lt;channel4&gt;]]]<br>
  14345. [alarmAction] = no|stop|opens|closes, default is no<br>
  14346. Action that is executed before the actuator is entering the "alarm" mode.<br>
  14347. Notice subType blindsCrtl.00, blindsCrtl.01: The attribute can only be set while the actuator is online.
  14348. </li>
  14349. <li><a name="angleMax">angleMax</a> &alpha;s/&#176, [&alpha;s] = -180 ... 180, 90 is default.<br>
  14350. Slat angle end position maximum.<br>
  14351. angleMax is supported for shutter.
  14352. </li>
  14353. <li><a name="angleMin">angleMin</a> &alpha;o/&#176, [&alpha;o] = -180 ... 180, -90 is default.<br>
  14354. Slat angle end position minimum.<br>
  14355. angleMin is supported for shutter.
  14356. </li>
  14357. <li><a name="angleTime">angleTime</a> &lt;channel1&gt;[:&lt;channel2&gt;[:&lt;channel3&gt;[:&lt;channel4&gt;]]]<br>
  14358. subType blindsCtrl.00, blindsCtrl.01: [angleTime] = 0|0.01 .. 2.54, 0 is default.<br>
  14359. subType manufProfile: [angleTime] = 0 ... 6, 0 is default.<br>
  14360. Runtime value for the sunblind reversion time. Select the time to revolve
  14361. the sunblind from one slat angle end position to the other end position.<br>
  14362. Notice subType blindsCrtl.00: The attribute can only be set while the actuator is online.
  14363. </li>
  14364. <li><a name="EnOcean_blockDateTime">blockDateTime</a> yes|no, [blockDateTime] = no is default.<br>
  14365. blockDateTime is supported for roomCtrlPanel.00.
  14366. </li>
  14367. <li><a name="EnOcean_blockDisplay">blockDisplay</a> yes|no, [blockDisplay] = no is default.<br>
  14368. blockDisplay is supported for roomCtrlPanel.00.
  14369. </li>
  14370. <li><a name="EnOcean_blockFanSpeed">blockFanSpeed</a> yes|no, [blockFanSpeed] = no is default.<br>
  14371. blockFanSpeed is supported for roomCtrlPanel.00.
  14372. </li>
  14373. <li><a name="EnOcean_blockKey">blockKey</a> yes|no, [blockKey] = no is default.<br>
  14374. blockKey is supported for roomCtrlPanel.00 and hvac.04.
  14375. </li>
  14376. <li><a name="EnOcean_blockMotion">blockMotion</a> yes|no, [blockMotion] = no is default.<br>
  14377. blockMotion is supported for roomCtrlPanel.00.
  14378. </li>
  14379. <li><a name="EnOcean_blockOccupany">blockOccupancy</a> yes|no, [blockOccupancy] = no is default.<br>
  14380. blockOccupancy is supported for roomCtrlPanel.00.
  14381. </li>
  14382. <li><a name="EnOcean_blockTemp">blockTemp</a> yes|no, [blockTemp] = no is default.<br>
  14383. blockTemp is supported for roomCtrlPanel.00.
  14384. </li>
  14385. <li><a name="EnOcean_blockTimeProgram">blockTimeProgram</a> yes|no, [blockTimeProgram] = no is default.<br>
  14386. blockTimeProgram is supported for roomCtrlPanel.00.
  14387. </li>
  14388. <li><a name="EnOcean_blockSetpointTemp">blockSetpointTemp</a> yes|no, [blockSetpointTemp] = no is default.<br>
  14389. blockSetPointTemp is supported for roomCtrlPanel.00.
  14390. </li>
  14391. <li><a name="EnOcean_blockUnknownMSC">blockUnknownMSC</a> yes|no,
  14392. [blockUnknownMSC] = no is default.<br>
  14393. If the structure of the MSC telegrams can not interpret the raw data to be output. Setting this attribute to yes,
  14394. the output can be suppressed.
  14395. </li>
  14396. <li><a name="EnOcean_comMode">comMode</a> biDir|confirm|uniDir, [comMode] = uniDir is default.<br>
  14397. Communication Mode between an enabled EnOcean device and Fhem.<br>
  14398. Unidirectional communication means a point-to-multipoint communication
  14399. relationship. The EnOcean device e. g. sensors does not know the unique
  14400. Fhem SenderID.<br>
  14401. If the attribute is set to confirm Fhem awaits confirmation telegrams from the remote device.<br>
  14402. Bidirectional communication means a point-to-point communication
  14403. relationship between an enabled EnOcean device and Fhem. It requires all parties
  14404. involved to know the unique Sender ID of their partners. Bidirectional communication
  14405. needs a teach-in / teach-out process, see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  14406. </li>
  14407. <li><a name="EnOcean_dataEnc">dataEnc</a> VAES|AES-CBC, [dataEnc] = VAES is default<br>
  14408. Data encryption algorithm
  14409. </li>
  14410. <li><a name="EnOcean_defaultChannel">defaultChannel</a> &lt;channel&gt;
  14411. subType actuator.01: [defaultChannel] = all|input|0 ... 29, all is default.<br>
  14412. subType blindsCtrl.00, blindsCtrl.01: [defaultChannel] = all|1 ... 4, all is default.<br>
  14413. Default device channel
  14414. </li>
  14415. <li><a name="EnOcean_daylightSavingTime">daylightSavingTime</a> supported|not_supported, [daylightSavingTime] = supported is default.<br>
  14416. daylightSavingTime is supported for roomCtrlPanel.00.
  14417. </li>
  14418. <li><a name="EnOcean_demandRespAction">demandRespAction</a> &lt;command&gt;<br>
  14419. Command being executed after an demand response command is set. If &lt;command&gt; is enclosed in {},
  14420. then it is a perl expression, if it is enclosed in "", then it is a shell command,
  14421. else it is a "plain" fhem.pl command (chain). In the &lt;command&gt; you can access the demand response
  14422. readings $TYPE, $NAME, $LEVEL, $SETPOINT, $POWERUSAGE, $POWERUSAGESCALE, $POWERUSAGELEVEL, $STATE. In addition,
  14423. the variables $TARGETNAME, $TARGETTYPE, $TARGETSTATE can be used if the action is executed
  14424. on the target device. This data is available as a local variable in perl, as environment variable for shell
  14425. scripts, and will be textually replaced for Fhem commands.
  14426. </li>
  14427. <li><a name="EnOcean_demandRespMax">demandRespMax</a> A0|AI|B0|BI|C0|CI|D0|DI, [demandRespMax] = B0 is default<br>
  14428. Switch command which is executed if the demand response switches to a maximum.
  14429. </li>
  14430. <li><a name="EnOcean_demandRespMin">demandRespMin</a> A0|AI|B0|BI|C0|CI|D0|DI, [demandRespMax] = BI is default<br>
  14431. Switch command which is executed if the demand response switches to a minimum.
  14432. </li>
  14433. <li><a name="EnOcean_demandRespRefDev">demandRespRefDev</a> &lt;name&gt;<br>
  14434. </li>
  14435. <li><a name="EnOcean_demandRespRandomTime">demandRespRandomTime</a> t/s [demandRespRandomTime] = 1 is default<br>
  14436. Maximum length of the random delay at the start or end of a demand respose event in slave mode.
  14437. </li>
  14438. <li><a name="EnOcean_demandRespThreshold">demandRespThreshold</a> 0...15 [demandRespTheshold] = 8 is default<br>
  14439. Threshold for switching the power usage level between minimum and maximum in the master mode.
  14440. </li>
  14441. <li><a name="EnOcean_demandRespTimeoutLevel">demandRespTimeoutLevel</a> max|last [demandRespTimeoutLevel] = max is default<br>
  14442. Demand response timeout level in slave mode.
  14443. </li>
  14444. <li><a name="devChannel">devChannel</a> 00 ... FF, [devChannel] = FF is default<br>
  14445. Number of the individual device channel, FF = all channels supported by the device
  14446. </li>
  14447. <li><a name="destinationID">destinationID</a> multicast|unicast|00000001 ... FFFFFFFF,
  14448. [destinationID] = multicast is default<br>
  14449. Destination ID, special values: multicast = FFFFFFFF, unicast = [DEF]
  14450. </li>
  14451. <li><a name="EnOcean_devMode">devMode</a> master|slave, [devMode] = master is default.<br>
  14452. device operation mode.
  14453. </li>
  14454. <li><a href="#devStateIcon">devStateIcon</a></li>
  14455. <li><a name="EnOcean_dimMax">dimMax</a> dim/%|off, [dimMax] = 255 is default.<br>
  14456. maximum brightness value<br>
  14457. dimMax is supported for the profile gateway/dimming.
  14458. </li>
  14459. <li><a name="EnOcean_dimMin">dimMin</a> dim/%|off, [dimMax] = off is default.<br>
  14460. minimum brightness value<br>
  14461. If [dimMax] = off, then the actuator takes down the ramp time set there.
  14462. dimMin is supported for the profile gateway/dimming.
  14463. </li>
  14464. <li><a name="dimValueOn">dimValueOn</a> dim/%|last|stored,
  14465. [dimValueOn] = 100 is default.<br>
  14466. Dim value for the command "on".<br>
  14467. The dimmer switched on with the value 1 % ... 100 % if [dimValueOn] =
  14468. 1 ... 100.<br>
  14469. The dimmer switched to the last dim value received from the
  14470. bidirectional dimmer if [dimValueOn] = last.<br>
  14471. The dimmer switched to the last Fhem dim value if [dimValueOn] =
  14472. stored.<br>
  14473. dimValueOn is supported for the profile gateway/dimming.
  14474. </li>
  14475. <li><a href="#EnOcean_disable">disable</a> 0|1<br>
  14476. If applied set commands will not be executed.
  14477. </li>
  14478. <li><a href="#EnOcean_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...<br>
  14479. Space separated list of HH:MM tupels. If the current time is between
  14480. the two time specifications, set commands will not be executed. Instead of
  14481. HH:MM you can also specify HH or HH:MM:SS. To specify an interval
  14482. spawning midnight, you have to specify two intervals, e.g.:
  14483. <ul>
  14484. 23:00-24:00 00:00-01:00
  14485. </ul>
  14486. </li>
  14487. <li><a name="EnOcean_displayContent">displayContent</a>
  14488. humidity|off|setpointTemp|temperatureExtern|temperatureIntern|time|default|no_change, [displayContent] = no_change is default.<br>
  14489. displayContent is supported for roomCtrlPanel.00.
  14490. </li>
  14491. <li><a name="EnOcean_displayOrientation">displayOrientation</a> rad/&#176, [displayOrientation] = 0|90|180|270, 0 is default.<br>
  14492. Display orientation of the actuator
  14493. </li>
  14494. <li><a href="#do_not_notify">do_not_notify</a></li>
  14495. <li><a name="EnOcean_eep">eep</a> &lt;00...FF&gt;-&lt;00...3F&gt;-&lt;00...7F&gt;<br>
  14496. EnOcean Equipment Profile (EEP)
  14497. <li><a href="#eventMap">eventMap</a></li>
  14498. </li>
  14499. <li><a name="EnOcean_gpDef">gpDef</a> &lt;name of channel 00&gt;:&lt;O|I&gt;:&lt;channel type&gt;:&lt;signal type&gt;:&lt;value type&gt;[:&lt;resolution&gt;[:&lt;engineering min&gt;:&lt;scaling min&gt;:&lt;engineering max&gt;:&lt;scaling max&gt;]] ...
  14500. &lt;name of channel 64&gt;:&lt;O|I&gt;:&lt;channel type&gt;:&lt;signal type&gt;:&lt;value type&gt;[:&lt;resolution&gt;[:&lt;engineering min&gt;:&lt;scaling min&gt;:&lt;engineering max&gt;:&lt;scaling max&gt;]]
  14501. <br>
  14502. Generic Profiles channel definitions are set automatically in master mode. If the profile in slave mode is operated, the channel
  14503. definition must be entered manually. For each channel, the channel definitions are to be given in ascending order. The channel
  14504. parameters to be specified in decimal. First, the outgoing channels (direction = O) are to be defined, then the incoming channels
  14505. (direction = I) should be described. The channel numbers are assigned automatically starting with 00th.
  14506. </li>
  14507. <li><a name="gwCmd">gwCmd</a> switching|dimming|setpointShift|setpointBasic|controlVar|fanStage|blindCmd<br>
  14508. Gateway Command Type, see <a href="#Gateway">Gateway</a> profile
  14509. </li>
  14510. <li><a name="EnOcean_humidity">humidity</a> rH/%<br>
  14511. The value of the actual humidity, used by a Room Sensor and Control Unit. Should by
  14512. filled via a notify from a distinct humidity sensor.
  14513. </li>
  14514. <li><a name="EnOcean_humidityRefDev">humidityRefDev</a> &lt;name&gt;<br>
  14515. Name of the device whose reference value is read. The reference values is
  14516. the reading humidity.
  14517. </li>
  14518. <li><a href="#ignore">ignore</a></li>
  14519. <li><a href="#IODev">IODev</a></li>
  14520. <li><a name="EnOcean_keyRcv">keyRcv</a> &lt;private key 16 byte hex&gt;<br>
  14521. Private Key for receive direction
  14522. </li>
  14523. <li><a name="EnOcean_keySnd">keySnd</a> &lt;private key 16 byte hex&gt;<br>
  14524. Private Key for send direction
  14525. </li>
  14526. <li><a name="EnOcean_macAlgo">macAlgo</a> no|3|4<br>
  14527. MAC Algorithm
  14528. </li>
  14529. <li><a name="EnOcean_manufID">manufID</a> &lt;000 ... 7FF&gt;<br>
  14530. Manufacturer ID number
  14531. </li>
  14532. <li><a name="EnOcean_measurementCtrl">measurementCtrl</a> enable|disable<br>
  14533. Enable or disable the temperature measurements (room and feed temperature) of the actuator. If the temperature
  14534. measurements are turned off, an external temperature sensor must be exists, see attribute
  14535. <a href="#temperatureRefDev">temperatureRefDev</a>.
  14536. </li>
  14537. <li><a href="#model">model</a></li>
  14538. <li><a name="EnOcean_observe">observe</a> off|on, [observe] = off is default.<br>
  14539. Observing and repeating the execution of set commands
  14540. </li>
  14541. <li><a name="EnOcean_observeCmdRepetition">observeCmdRepetition</a> 1..5, [observeCmdRepetition] = 2 is default.<br>
  14542. Maximum number of command retries
  14543. </li>
  14544. <li><a name="EnOcean_observeErrorAction">observeErrorAction</a> &lt;command&gt;<br>
  14545. Command being executed after an error. If &lt;command&gt; is enclosed in {},
  14546. then it is a perl expression, if it is enclosed in "", then it is a shell command,
  14547. else it is a "plain" fhem.pl command (chain). In the &lt;command&gt; you can access the set
  14548. command. $TYPE, $NAME, $FAILEDDEV, $EVENT, $EVTPART0, $EVTPART1, $EVTPART2, etc. contains the space separated
  14549. set parts. The <a href="#eventMap">eventMap</a> replacements are taken into account. This data
  14550. is available as a local variable in perl, as environment variable for shell
  14551. scripts, and will be textually replaced for Fhem commands.
  14552. </li>
  14553. <li><a name="EnOcean_observeInterval">observeInterval</a> 1/s ... 255/s, [observeInterval] = 1 is default.<br>
  14554. Interval between two observations
  14555. </li>
  14556. <li><a name="EnOcean_observeLogic">observeLogic</a> and|or, [observeLogic] = or is default.<br>
  14557. Observe logic
  14558. </li>
  14559. <li><a name="EnOcean_observeRefDev">observeRefDev</a> &lt;name&gt; [&lt;name&gt; [&lt;name&gt;]],
  14560. [observeRefDev] = &lt;name of the own device&gt; is default<br>
  14561. Names of the devices to be observed. The list must be separated by spaces.
  14562. </li>
  14563. <li><a name="EnOcean_pidActorCallBeforeSetting">pidActorCallBeforeSetting</a>,
  14564. [pidActorCallBeforeSetting] = not defined is default<br>
  14565. Callback-function, which can manipulate the actorValue. Further information see modul PID20.
  14566. </li>
  14567. <li><a name="EnOcean_pidActorErrorAction">pidActorErrorAction</a> freeze|errorPos,
  14568. [pidActorErrorAction] = freeze is default<br>
  14569. required action on error
  14570. </li>
  14571. <li><a name="EnOcean_pidActorErrorPos">pidActorErrorPos</a> valvePos/%,
  14572. [pidActorErrorPos] = 0...100, 0 is default<br>
  14573. actor's position to be used in case of error
  14574. </li>
  14575. <li><a name="EnOcean_pidActorLimitLower">pidActorLimitLower</a> valvePos/%,
  14576. [pidActorLimitLower] = 0...100, 0 is default<br>
  14577. lower limit for actor
  14578. </li>
  14579. <li><a name="EnOcean_pidActorLimitUpper">pidActorLimitUpper</a> valvePos/%,
  14580. [pidActorLimitUpper] = 0...100, 100 is default<br>
  14581. upper limit for actor
  14582. </li>
  14583. <li><a name="EnOcean_pidCtrl">pidCtrl</a> on|off,
  14584. [pidCtrl] = on is default<br>
  14585. Activate the Fhem PID regulator
  14586. </li>
  14587. <li><a name="EnOcean_pidDeltaTreshold">pidDeltaTreshold</a> &lt;floating-point number&gt;,
  14588. [pidDeltaTreshold] = 0 is default<br>
  14589. if delta < delta-threshold the pid will enter idle state
  14590. </li>
  14591. <li><a name="EnOcean_pidFactor_P">pidFactor_P</a> &lt;floating-point number&gt;,
  14592. [pidFactor_P] = 25 is default<br>
  14593. P value for PID
  14594. </li>
  14595. <li><a name="EnOcean_pidFactor_I">pidFactor_I</a> &lt;floating-point number&gt;,
  14596. [pidFactor_I] = 0.25 is default<br>
  14597. I value for PID
  14598. </li>
  14599. <li><a name="EnOcean_pidFactor_D">pidFactor_D</a> &lt;floating-point number&gt;,
  14600. [pidFactor_D] = 0 is default<br>
  14601. D value for PID
  14602. </li>
  14603. <li><a name="EnOcean_pidIPortionCallBeforeSetting">pidIPortionCallBeforeSetting</a>
  14604. [pidIPortionCallBeforeSetting] = not defined is default<br>
  14605. Callback-function, which can manipulate the value of I-Portion. Further information see modul PID20.
  14606. </li>
  14607. <li><a name="EnOcean_pidSensorTimeout">pidSensorTimeout t/s</a>
  14608. [pidSensorTimeout] = 3600 is default<br>
  14609. number of seconds to wait before sensor <a href="#temperatureRefDev">temperatureRefDev</a> will be recognized n/a
  14610. </li>
  14611. <li><a name="EnOcean_pollInterval">pollInterval</a> t/s, [pollInterval] = 10 is default.<br>
  14612. [pollInterval] = 1 ... 1440.<br>
  14613. pollInterval is supported for roomCtrlPanel.00.
  14614. </li>
  14615. <li><a name="EnOcean_rampTime">rampTime</a> t/s or relative, [rampTime] = 1 is default.<br>
  14616. No ramping or for Eltako dimming speed set on the dimmer if [rampTime] = 0.<br>
  14617. Gateway/dimmung: Ramping time 1 s to 255 s or relative fast to low dimming speed if [rampTime] = 1 ... 255.<br>
  14618. lightCtrl.01: Ramping time 1 s to 65535 s<br>
  14619. rampTime is supported for gateway, command dimming and lightCtrl.01.
  14620. </li>
  14621. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  14622. <li><a name="EnOcean_rcvRespAction">rcvRespAction</a> &lt;command&gt;<br>
  14623. Command being executed after an message from the aktor is received and before an response message is sent.
  14624. If &lt;command&gt; is enclosed in {}, then it is a perl expression, if it is enclosed in "", then it is a shell command,
  14625. else it is a "plain" fhem.pl command (chain). In the &lt;command&gt; you can access the name of the device by using $NAME
  14626. and the current readings $ACTUATORSTATE, $BATTERY, $COVER, $ENERGYINPUT, $ENERGYSTORAGE, $MAINTENANCEMODE, $OPERATIONMODE,
  14627. $ROOMTEMP, $SELFCTRL, $SETPOINT, $SETPOINTTEMP, $SUMMERMODE, $TEMPERATURE, $WINDOW for the subType hvac.01 and $NAME,
  14628. $BATTERY, $FEEDTEMP, $MAINTENANCEMODE, $OPERATIONMODE, $ROOMTEMP, $SETPOINT, $SETPOINTTEMP, $SUMMERMODE, $TEMPERATURE
  14629. for the subType hvac.04.
  14630. This data is available as a local variable in perl, as environment variable for shell
  14631. scripts, and will be textually replaced for Fhem commands.
  14632. </li>
  14633. <li><a name="EnOcean_remoteCode">remoteCode</a> &lt;00000000...FFFFFFFE&gt;<br>
  14634. Remote Management Security Code, 00000000 is interpreted as on code has been set.
  14635. </li>
  14636. <li><a name="EnOcean_remoteEEP">remoteEEP</a> &lt;00...FF&gt;-&lt;00...3F&gt;-&lt;00...7F&gt;<br>
  14637. Remote Management EnOcean Equipment Profile (EEP)
  14638. </li>
  14639. <li><a name="EnOcean_remoteID">remoteID</a> &lt;00000001...FFFFFFFE&gt;<br>
  14640. Remote Management Remote Device ID
  14641. </li>
  14642. <li><a name="EnOcean_remoteManagement">remoteManagement</a> client|manager|off,
  14643. [remoteManagement] = off is default.<br>
  14644. Enable Remote Management for the device.
  14645. </li>
  14646. <li><a name="EnOcean_remoteManufID">remoteManufID</a> &lt;000...7FF&gt;<br>
  14647. Remote Management Manufacturer ID
  14648. </li>
  14649. <li><a name="repeatingAllowed">repeatingAllowed</a> yes|no,
  14650. [repeatingAllowed] = yes is default.<br>
  14651. EnOcean Repeater in the transmission range of Fhem may forward data messages
  14652. of the device, if the attribute is set to yes.
  14653. </li>
  14654. <li><a name="EnOcean_releasedChannel">releasedChannel</a> A|B|C|D|I|0|auto, [releasedChannel] = auto is default.<br>
  14655. Attribute releasedChannel determines via which SenderID (subDefA ... subDef0) the command released is sent.
  14656. If [releasedChannel] = auto, the SenderID the last command A0, AI, B0, BI, C0, CI, D0 or DI is used.
  14657. Attribute releasedChannel is supported for attr switchType = central and attr switchType = channel.
  14658. </li>
  14659. <li><a name="EnOcean_reposition">reposition</a> directly|opens|closes, [reposition] = directly is default.<br>
  14660. Attribute reposition specifies how to adjust the internal positioning tracker before going to the new position.
  14661. </li>
  14662. <li><a name="EnOcean_rlcAlgo">rlcAlgo</a> 2++|3++<br>
  14663. RLC Algorithm
  14664. </li>
  14665. <li><a name="EnOcean_rlcRcv">rlcRcv</a> &lt;rolling code 2 or 3 byte hex&gt;<br>
  14666. Rolling Code for receive direction
  14667. </li>
  14668. <li><a name="EnOcean_rlcSnd">rlcSnd</a> &lt;rolling code 2 or 3 byte hex&gt;<br>
  14669. Rolling Code for send direction
  14670. </li>
  14671. <li><a name="EnOcean_rlcTX">rlcTX</a> false|true<br>
  14672. Rolling Code is expected in the received telegram
  14673. </li>
  14674. <li><a name="EnOcean_rltRepeat">rltRepeat</a> 16|32|64|128|256,
  14675. [rltRepeat] = 16 is default.<br>
  14676. Number of RLT MasterTest messages sent
  14677. </li>
  14678. <li><a name="EnOcean_rltType">rltType</a> 1BS|4BS,
  14679. [rltType] = 4BS is default.<br>
  14680. Type of RLT MasterTest message
  14681. </li>
  14682. <li><a name="scaleDecimals">scaleDecimals</a> 0 ... 9<br>
  14683. Decimal rounding with x digits of the scaled reading setpoint
  14684. </li>
  14685. <li><a name="EnOcean_teachMethod">teachMethod</a> 1BS|4B|confirm|GP|RPS|smartAck|STE|UTE<br>
  14686. teach-in method
  14687. </li>
  14688. <li><a name="scaleMax">scaleMax</a> &lt;floating-point number&gt;<br>
  14689. Scaled maximum value of the reading setpoint
  14690. </li>
  14691. <li><a name="scaleMin">scaleMin</a> &lt;floating-point number&gt;<br>
  14692. Scaled minimum value of the reading setpoint
  14693. </li>
  14694. <li><a name="EnOcean_secLevel">secLevel</a> encapsulation|encryption|off, [secLevel] = off is default<br>
  14695. Security level of the data
  14696. </li>
  14697. <li><a name="EnOcean_secMode">secMode</a> rcv|snd|bidir<br>
  14698. Telegram direction, which is secured
  14699. </li>
  14700. <li><a name="EnOcean_sendDevStatus">sendDevStatus</a> no|yes, [sendDevStatus] = no is default.<br>
  14701. Send new status of the device.
  14702. </li>
  14703. <li><a name="sensorMode">sensorMode</a> switch|pushbutton,
  14704. [sensorMode] = switch is default.<br>
  14705. The status "released" will be shown in the reading state if the
  14706. attribute is set to "pushbutton".
  14707. </li>
  14708. <li><a name="EnOcean_serviceOn">serviceOn</a> no|yes,
  14709. [serviceOn] = no is default.<br>
  14710. Device in Service Mode.
  14711. </li>
  14712. <li><a name="EnOcean_setCmdTrigger">setCmdTrigger</a> man|refDev, [setCmdTrigger] = man is default.<br>
  14713. Operation mode to send set commands<br>
  14714. If the attribute is set to "refDev", a device-specific set command is sent when the reference device is updated.
  14715. For the subType "roomSensorControl.05" and "fanCrtl.00" the reference "temperatureRefDev" is supported.<br>
  14716. For the subType "roomSensorControl.01" the references "humidityRefDev" and "temperatureRefDev" are supported.<br>
  14717. </li>
  14718. <li><a name="EnOcean_setpointRefDev">setpointRefDev</a> &lt;name&gt;<br>
  14719. Name of the device whose reference value is read. The reference values is
  14720. the reading setpoint.
  14721. </li>
  14722. <li><a name="EnOcean_setpointSummerMode">setpointSummerMode</a> valvePos/%,
  14723. [setpointSummerMode] = 0...100, 0 is default<br>
  14724. Valve position in summer operation
  14725. </li>
  14726. <li><a name="EnOcean_setpointTempRefDev">setpointTempRefDev</a> &lt;name&gt;<br>
  14727. Name of the device whose reference value is read. The reference values is
  14728. the reading setpointTemp.
  14729. </li>
  14730. <li><a name="EnOcean_settingAccuracy">settingAccuracy</a> high|low,
  14731. [settingAccuracy] = low is default.<br>
  14732. set setting accurancy.
  14733. </li>
  14734. <li><a href="#showtime">showtime</a></li>
  14735. <li><a name="shutTime">shutTime</a> &lt;channel1&gt;[:&lt;channel2&gt;[:&lt;channel3&gt;[:&lt;channel4&gt;]]]<br>
  14736. subType blindsCtrl.00, blindsCtrl.01: [shutTime] = 5 ... 300, 300 is default.<br>
  14737. subType manufProfile: [shutTime] = 1 ... 255, 255 is default.<br>
  14738. Use the attr shutTime to set the time delay to the position "Halt" in
  14739. seconds. Select a delay time that is at least as long as the shading element
  14740. or roller shutter needs to move from its end position to the other position.<br>
  14741. Notice subType blindsCrtl.00: The attribute can only be set while the actuator is online.
  14742. </li>
  14743. <li><a name="shutTimeCloses">shutTimeCloses</a> t/s, [shutTimeCloses] = 1 ... 255,
  14744. [shutTimeCloses] = [shutTime] is default.<br>
  14745. Set the attr shutTimeCloses to define the runtime used by the commands opens and closes.
  14746. Select a runtime that is at least as long as the value set by the delay switch of the actuator.
  14747. <br>
  14748. shutTimeCloses is supported for shutter.
  14749. </li>
  14750. <li><a name="subDef">subDef</a> &lt;EnOcean SenderID&gt;,
  14751. [subDef] = [DEF] is default.<br>
  14752. SenderID (<a href="#TCM">TCM</a> BaseID + offset) to control a bidirectional switch or actor.<br>
  14753. In order to control devices that send acknowledge telegrams, you cannot reuse the ID of this
  14754. devices, instead you have to create your own, which must be in the
  14755. allowed ID-Range of the underlying IO device. For this first query the
  14756. <a href="#TCM">TCM</a> with the "<code>get &lt;tcm&gt; idbase</code>" command. You can use
  14757. up to 128 IDs starting with the base shown there.<br>
  14758. If [subDef] = getNextID FHEM can assign a free SenderID alternatively. The system configuration
  14759. needs to be reloaded. The assigned SenderID will only displayed after the system configuration
  14760. has been reloaded, e.g. Fhem command rereadcfg.
  14761. </li>
  14762. <li><a name="subDefA">subDefA</a> &lt;EnOcean SenderID&gt;,
  14763. [subDefA] = [subDef] is default.<br>
  14764. SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = A0|AI|released<br>
  14765. Used with switch type "channel". Set attr switchType to channel.<br>
  14766. subDefA is supported for switches.<br>
  14767. Second action is not sent.<br>
  14768. If [subDefA] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
  14769. displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
  14770. </li>
  14771. <li><a name="subDefB">subDefB</a> &lt;EnOcean SenderID&gt;,
  14772. [subDefB] = [subDef] is default.<br>
  14773. SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = B0|BI|released<br>
  14774. Used with switch type "channel". Set attr switchType to channel.<br>
  14775. subDefB is supported for switches.<br>
  14776. Second action is not sent.<br>
  14777. If [subDefB] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
  14778. displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
  14779. </li>
  14780. <li><a name="subDefC">subDefC</a> &lt;EnOcean SenderID&gt;,
  14781. [subDefC] = [subDef] is default.<br>
  14782. SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = C0|CI|released<br>
  14783. Used with switch type "channel". Set attr switchType to channel.<br>
  14784. subDefC is supported for switches.<br>
  14785. Second action is not sent.<br>
  14786. If [subDefC] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
  14787. displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
  14788. </li>
  14789. <li><a name="subDefD">subDefD</a> &lt;EnOcean SenderID&gt;,
  14790. [subDefD] = [subDef] is default.<br>
  14791. SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = D0|DI|released<br>
  14792. Used with switch type "channel". Set attr switchType to channel.<br>
  14793. subDefD is supported for switches.<br>
  14794. Second action is not sent.<br>
  14795. If [subDefD] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
  14796. displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
  14797. </li>
  14798. <li><a name="subDef0">subDef0</a> &lt;EnOcean SenderID&gt;,
  14799. [subDef0] = [subDef] is default.<br>
  14800. SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = A0|B0|C0|D0|released<br>
  14801. Used with switch type "central". Set attr switchType to central.<br>
  14802. Use the sensor type "zentral aus/ein" for Eltako devices.<br>
  14803. subDef0 is supported for switches.<br>
  14804. Second action is not sent.<br>
  14805. If [subDef0] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
  14806. displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
  14807. </li>
  14808. <li><a name="subDefI">subDefI</a> &lt;EnOcean SenderID&gt;,
  14809. [subDefI] = [subDef] is default.<br>
  14810. SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = AI|BI|CI|DI<br>
  14811. Used with switch type "central". Set attr switchType to central.<br>
  14812. Use the sensor type "zentral aus/ein" for Eltako devices.<br>
  14813. subDefI is supported for switches.<br>
  14814. Second action is not sent.<br>
  14815. If [subDefI] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
  14816. displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
  14817. </li>
  14818. <li><a name="EnOcean_subDefH">subDefH</a> &lt;EnOcean SenderID&gt;,
  14819. [subDefH] = undef is default.<br>
  14820. SenderID (<a href="#TCM">TCM</a> BaseID + offset)<br>
  14821. Used with subType "multisensor.00". If the attribute subDefH is set, the position of the window handle as EEP F6-10-00
  14822. (windowHandle) telegram is forwarded.<br>
  14823. If [subDefH] = getNextID FHEM can assign a free SenderID alternatively.
  14824. </li>
  14825. <li><a name="EnOcean_subDefW">subDefW</a> &lt;EnOcean SenderID&gt;,
  14826. [subDefW] = undef is default.<br>
  14827. SenderID (<a href="#TCM">TCM</a> BaseID + offset)<br>
  14828. Used with subType "multisensor.00". If the attribute subDefW is set, the window state as EEP D5-00-01
  14829. (contact) telegram is forwarded.<br>
  14830. If [subDefW] = getNextID FHEM can assign a free SenderID alternatively.
  14831. </li>
  14832. <li><a href="#subType">subType</a></li>
  14833. <li><a name="subTypeSet">subTypeSet</a> &lt;type of device&gt;, [subTypeSet] = [subType] is default.<br>
  14834. Type of device (EEP Profile) used for sending commands. Set the Attribute manually.
  14835. The profile has to fit their basic profile. More information can be found in the basic profiles.
  14836. </li>
  14837. <li><a name="EnOcean_summerMode">summerMode</a> off|on,
  14838. [summerMode] = off is default.<br>
  14839. Put Battery Powered Actuator (hvac.01) or Heating Radiator Actuating Drive (hvac.04) in summer operation
  14840. to reduce energy consumption. If [summerMode] = on, the set commands are not executed.
  14841. </li>
  14842. <li><a name="EnOcean_switchHysteresis">switchHysteresis</a> &lt;value&gt;,
  14843. [switchHysteresis] = 1 is default.<br>
  14844. Switch Hysteresis
  14845. </li>
  14846. <li><a name="switchMode">switchMode</a> switch|pushbutton,
  14847. [switchMode] = switch is default.<br>
  14848. The set command "released" immediately after &lt;value&gt; is sent if the
  14849. attribute is set to "pushbutton".
  14850. </li>
  14851. <li><a name="switchType">switchType</a> direction|universal|central|channel,
  14852. [switchType] = direction is default.<br>
  14853. EnOcean Devices support different types of sensors, e. g. direction
  14854. switch, universal switch or pushbutton, central on/off.<br>
  14855. For Eltako devices these are the sensor types "Richtungstaster",
  14856. "Universalschalter" or "Universaltaster", "Zentral aus/ein".<br>
  14857. With the sensor type <code>direction</code> switch on/off commands are
  14858. accepted, e. g. B0, BI, released. Fhem can control an device with this
  14859. sensor type unique. This is the default function and should be
  14860. preferred.<br>
  14861. Some devices only support the <code>universal switch
  14862. </code> or <code>pushbutton</code>. With a Fhem command, for example,
  14863. B0 or BI is switched between two states. In this case Fhem cannot
  14864. control this device unique. But if the Attribute <code>switchType
  14865. </code> is set to <code>universal</code> Fhem synchronized with
  14866. a bidirectional device and normal on/off commands can be used.
  14867. If the bidirectional device response with the channel B
  14868. confirmation telegrams also B0 and BI commands are to be sent,
  14869. e g. channel A with A0 and AI. Also note that confirmation telegrams
  14870. needs to be sent.<br>
  14871. Partly for the switchType <code>central</code> two different SenderID
  14872. are required. In this case set the Attribute <code>switchType</code> to
  14873. <code>central</code> and define the Attributes
  14874. <a href="#subDef0">subDef0</a> and <a href="#subDefI">subDefI</a>.<br>
  14875. Furthermore, SenderIDs can be used depending on the channel A, B, C or D.
  14876. In this case set the Attribute switchType to <code>channel</code> and define
  14877. the Attributes <a href="#subDefA">subDefA</a>, <a href="#subDefB">subDefB</a>,
  14878. <a href="#subDefC">subDefC</a>, or <a href="#subDefD">subDefD</a>.
  14879. </li>
  14880. <li><a name="temperatureRefDev">temperatureRefDev</a> &lt;name&gt;<br>
  14881. Name of the device whose reference value is read. The reference values is
  14882. the reading temperature.
  14883. </li>
  14884. <li><a name="EnOcean_temperatureScale">temperatureScale</a> F|C|default|no_change, [temperatureScale] = no_change is default.<br>
  14885. temperatureScale is supported for roomCtrlPanel.00.
  14886. </li>
  14887. <li><a name="EnOcean_timeNotation">timeNotation</a> 12|24|default|no_change, [timeNotation] = no_change is default.<br>
  14888. timeNotation is supported for roomCtrlPanel.00.
  14889. </li>
  14890. <li><a name="EnOcean_timeProgram[1-4]">timeProgram[1-4]</a> &lt;period&gt; &lt;starttime&gt; &lt;endtime&gt; &lt;roomCtrlMode&gt;, [timeProgam[1-4]] = &lt;none&gt; is default.<br>
  14891. [period] = FrMo|FrSu|ThFr|WeFr|TuTh|MoWe|SaSu|MoFr|MoSu|Su|Sa|Fr|Th|We|Tu|Mo<br>
  14892. [starttime] = [00..23]:[00|15|30|45]<br>
  14893. [endtime] = [00..23]:[00|15|30|45]<br>
  14894. [roomCtrlMode] = buildingProtection|comfort|economy|preComfort<br>
  14895. The Room Control Panel Kieback & Peter RBW322-FTL supports only [roomCtrlMode] = comfort.<br>
  14896. timeProgram is supported for roomCtrlPanel.00.
  14897. </li>
  14898. <li><a name="EnOcean_trackerWakeUpCycle">trackerWakeUpCycle</a> t/s, [wakeUpCycle] =10 s, 20 s, 30 s, 40 s, 60 s, 120 s, 180 s, 240 s, 3600, 86400 s, 30 s is default.<br>
  14899. Transmission cycle of the tracker.
  14900. </li>
  14901. <li><a name="EnOcean_updateState">updateState</a> default|yes|no, [updateState] = default is default.<br>
  14902. update reading state after set commands
  14903. </li>
  14904. <li><a name="EnOcean_uteResponseRequest">uteResponseRequest</a> yes|no<br>
  14905. request UTE teach-in/teach-out response message, the standard value depends on the EEP profil
  14906. </li>
  14907. <li><a href="#verbose">verbose</a></li>
  14908. <li><a name="EnOcean_wakeUpCycle">wakeUpCycle</a> t/s, [wakeUpCycle] = 10 s ... 151200 s, 300 s is default.<br>
  14909. Transmission cycle of the actuator.
  14910. </li>
  14911. <li><a href="#webCmd">webCmd</a></li>
  14912. </ul>
  14913. </ul>
  14914. <br>
  14915. <a name="EnOceanevents"></a>
  14916. <b>Generated events</b>
  14917. <ul>
  14918. <ul>
  14919. <li><a name="EnOcean_remoteEvents">Remote Management</a><br>
  14920. <ul>
  14921. <li>remoteDevCfg&lt;0000...FFFF&gt;: &lt;device config&gt;</li>
  14922. <li>remoteFunction&lt;01...99&gt;: &lt;remote function number&gt;:&lt;remote manufacturer ID&gt;:&lt;explanation&gt;</li>
  14923. <li>remoteLastFunctionNumber: 001...FFF</li>
  14924. <li>remoteLastStatusReturnCode: 00...FF</li>
  14925. <li>remoteLearn: not_supported|supported</li>
  14926. <li>remoteLinkCfg&lt;in|out&gt;&lt;00...FF&gt;: &lt;data index&gt;:&lt;device config&gt;</li>
  14927. <li>remoteLinkTableDesc&lt;in|out&gt;&lt;00...FF&gt;: &lt;DeviceID&gt;:&lt;EEP&gt;:&lt;channel&gt;</li>
  14928. <li>remoteLinkTableGPDesc&lt;in|out&gt;&lt;00...FF&gt;: &lt;name of channel 00&gt;:&lt;O|I&gt;:&lt;channel type&gt;:&lt;signal type&gt;:&lt;value type&gt;[:&lt;resolution&gt;[:&lt;engineering min&gt;:&lt;scaling min&gt;:&lt;engineering max&gt;:&lt;scaling max&gt;]]</li>
  14929. <li>remoteProductID: 00000000...FFFFFFFF</li>
  14930. <li>remoteRepeaterFilter: AND|OR</li>
  14931. <li>remoteRepeaterFunction: on|off|filter</li>
  14932. <li>remoteRepeaterLevel: 1|2</li>
  14933. <li>remoteTeach: not_supported|supported</li>
  14934. <li>remoteRSSI: LP/dBm</li>
  14935. <li>teach: &lt;result of teach procedure&gt;</li>
  14936. </ul>
  14937. </li>
  14938. <br><br>
  14939. <li>Switch (EEP F6-02-01 ... F6-03-02)<br>
  14940. <ul>
  14941. <li>A0</li>
  14942. <li>AI</li>
  14943. <li>B0</li>
  14944. <li>BI</li>
  14945. <li>C0</li>
  14946. <li>CI</li>
  14947. <li>D0</li>
  14948. <li>DI</li>
  14949. <li>&lt;BtnX,BtnY&gt; First and second action where BtnX and BtnY is
  14950. one of the above, e.g. A0 BI or D0 CI</li>
  14951. <li>buttons: pressed|released</li>
  14952. <li>state: &lt;BtnX&gt;[,&lt;BtnY&gt;]</li>
  14953. </ul><br>
  14954. Switches (remote controls) or actors with more than one
  14955. (pair) keys may have multiple channels e. g. B0/BI, A0/AI with one
  14956. SenderID or with separate addresses.
  14957. </li>
  14958. <br><br>
  14959. <li>Pushbutton Switch, Pushbutton Input Module (EEP F6-02-01 ... F6-02-02, F6-01-01)<br>
  14960. [Eltako FT55, FSM12, FSM61, FTS12]<br>
  14961. <ul>
  14962. <li>A0</li>
  14963. <li>AI</li>
  14964. <li>B0</li>
  14965. <li>BI</li>
  14966. <li>C0</li>
  14967. <li>CI</li>
  14968. <li>D0</li>
  14969. <li>DI</li>
  14970. <li>&lt;BtnX,BtnY&gt; First and second action where BtnX and BtnY is
  14971. one of the above, e.g. A0,BI or D0,CI</li>
  14972. <li>released</li>
  14973. <li>buttons: pressed|released</li>
  14974. <li>state: &lt;BtnX&gt;[,&lt;BtnY&gt;] [released]</li>
  14975. </ul><br>
  14976. The status of the device may become "released", this is not the case for a normal switch.<br>
  14977. Set attr model to FT55|FSM12|FSM61|FTS12 or attr sensorMode to pushbutton manually.
  14978. </li>
  14979. <br><br>
  14980. <li>Pushbutton Switch (EEP F6-3F-7F)<br>
  14981. [Eltako FGW14/FAM14 with internal decryption and RS-485 communication]<br>
  14982. <ul>
  14983. <li>A0</li>
  14984. <li>AI</li>
  14985. <li>B0</li>
  14986. <li>BI</li>
  14987. <li>C0</li>
  14988. <li>CI</li>
  14989. <li>D0</li>
  14990. <li>DI</li>
  14991. <li>&lt;BtnX,BtnY&gt; First and second action where BtnX and BtnY is
  14992. one of the above, e.g. A0,BI or D0,CI</li>
  14993. <li>released</li>
  14994. <li>buttons: pressed|released</li>
  14995. <li>state: &lt;BtnX&gt;[,&lt;BtnY&gt;] [released]</li>
  14996. </ul><br>
  14997. Set attr subType to switch.7F and manufID to 00D.<br>
  14998. The status of the device may become "released", this is not the case for
  14999. a normal switch. Set attr sensorMode to pushbutton manually.
  15000. </li>
  15001. <br><br>
  15002. <li>Pushbutton Switch (EEP D2-03-00)<br>
  15003. [EnOcean PTM 215 Modul]<br>
  15004. <ul>
  15005. <li>A0</li>
  15006. <li>AI</li>
  15007. <li>B0</li>
  15008. <li>BI</li>
  15009. <li>&lt;BtnX,BtnY&gt; First and second action where BtnX and BtnY is
  15010. one of the above, e.g. A0,BI</li>
  15011. <li>pressed</li>
  15012. <li>released</li>
  15013. <li>teach: &lt;result of teach procedure&gt;</li>
  15014. <li>energyBow: pressed|released</li>
  15015. <li>state: &lt;BtnX&gt;|&lt;BtnX&gt;,&lt;BtnY&gt;|released|pressed|teachIn|teachOut</li>
  15016. </ul><br>
  15017. The attr subType must be switch.00. This is done if the device was
  15018. created by autocreate. Set attr sensorMode to pushbutton manually if needed.
  15019. </li>
  15020. <br><br>
  15021. <li>Heating/Cooling Relay (EEP F6-02-01 ... F6-02-02)<br>
  15022. [Eltako FAE14, FHK14, untested]<br>
  15023. <ul>
  15024. <li>controllerMode: auto|off</li>
  15025. <li>energyHoldOff: normal|holdoff</li>
  15026. <li>buttons: pressed|released</li>
  15027. </ul><br>
  15028. Set attr subType to switch and model to FAE14|FHK14 manually. In addition
  15029. every telegram received from a teached-in temperature sensor (e.g. FTR55H)
  15030. is repeated as a confirmation telegram from the Heating/Cooling Relay
  15031. FAE14, FHK14. In this case set attr subType to e. g. roomSensorControl.05
  15032. and attr manufID to 00D.
  15033. </li>
  15034. <br><br>
  15035. <li>Key Card Activated Switch (EEP F6-04-01)<br>
  15036. [Eltako FKC, FKF, FZS, untested]<br>
  15037. <ul>
  15038. <li>keycard_inserted</li>
  15039. <li>keycard_removed</li>
  15040. <li>state: keycard_inserted|keycard_removed</li>
  15041. </ul><br>
  15042. Set attr subType to keycard manually.
  15043. </li>
  15044. <br><br>
  15045. <li>Wind Speed Threshold Detector (EEP F6-05-00)<br>
  15046. <ul>
  15047. <li>on</li>
  15048. <li>off</li>
  15049. <li>alarm: dead_sensor|off</li>
  15050. <li>windSpeed: dead_sensor|on|off</li>
  15051. <li>battery: low|ok</li>
  15052. <li>state: on|off</li>
  15053. </ul><br>
  15054. Set attr subType to windSpeed.00 manually.
  15055. </li>
  15056. <br><br>
  15057. <li>Liquid Leakage Sensor (EEP F6-05-01)<br>
  15058. [untested]<br>
  15059. <ul>
  15060. <li>dry</li>
  15061. <li>wet</li>
  15062. <li>state: dry|wet</li>
  15063. </ul><br>
  15064. Set attr subType to liquidLeakage manually.
  15065. </li>
  15066. <br><br>
  15067. <li>Smoke Detector (EEP F6-05-02)<br>
  15068. [Eltako FRW]<br>
  15069. <ul>
  15070. <li>smoke-alarm</li>
  15071. <li>off</li>
  15072. <li>alarm: dead_sensor|smoke-alarm|off</li>
  15073. <li>battery: low|ok</li>
  15074. <li>state: smoke-alarm|off</li>
  15075. </ul><br>
  15076. Set attr subType to smokeDetector.02 manually.
  15077. </li>
  15078. <br><br>
  15079. <li>Window Handle (EEP F6-10-00, D2-03-10)<br>
  15080. [HOPPE SecuSignal, Eltako FHF, Eltako FTKE]<br>
  15081. <ul>
  15082. <li>closed</li>
  15083. <li>open</li>
  15084. <li>tilted</li>
  15085. <li>open_from_tilted</li>
  15086. <li>state: closed|open|tilted|open_from_tilted</li>
  15087. </ul><br>
  15088. The device windowHandle or windowHandle.10 should be created by autocreate.
  15089. </li>
  15090. <br><br>
  15091. <li>Single Input Contact, Door/Window Contact<br>
  15092. 1BS Telegram (EEP D5-00-01)<br>
  15093. [EnOcean STM 320, STM 329, STM 250, Eltako FTK, Peha D 450 FU]
  15094. <ul>
  15095. <li>closed</li>
  15096. <li>open</li>
  15097. <li>teach: &lt;result of teach procedure&gt;</li>
  15098. <li>state: open|closed</li>
  15099. </ul></li>
  15100. The device should be created by autocreate.
  15101. <br><br>
  15102. <li>Temperature Sensors with with different ranges (EEP A5-02-01 ... A5-02-30)<br>
  15103. [EnOcean STM 330, Eltako FTF55, Thermokon SR65 ...]<br>
  15104. <ul>
  15105. <li>t/&#176C</li>
  15106. <li>temperature: t/&#176C (Sensor Range: t = &lt;t min&gt; &#176C ... &lt;t max&gt; &#176C)</li>
  15107. <li>state: t/&#176C</li>
  15108. </ul><br>
  15109. The attr subType must be tempSensor.01 ... tempSensor.30. This is done if the device was
  15110. created by autocreate.
  15111. </li>
  15112. <br><br>
  15113. <li>Temperatur and Humidity Sensor (EEP A5-04-02)<br>
  15114. [Eltako FAFT60, FIFT63AP]<br>
  15115. <ul>
  15116. <li>T: t/&#176C H: rH/% B: unknown|low|ok</li>
  15117. <li>battery: unknown|low|ok</li>
  15118. <li>energyStorage: unknown|empty|charged|full</li>
  15119. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15120. <li>temperature: t/&#176C (Sensor Range: t = -20 &#176C ... 60 &#176C)</li>
  15121. <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 6.6 V)
  15122. <li>state: T: t/&#176C H: rH/% B: unknown|low|ok</li>
  15123. </ul><br>
  15124. The attr subType must be tempHumiSensor.02 and attr
  15125. manufID must be 00D for Eltako Devices. This is done if the device was
  15126. created by autocreate.
  15127. </li>
  15128. <br><br>
  15129. <li>Temperatur and Humidity Sensor (EEP A5-04-03)<br>
  15130. [untsted]<br>
  15131. <ul>
  15132. <li>T: t/&#176C H: rH/%</li>
  15133. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15134. <li>telegramType: heartbeat|event</li>
  15135. <li>temperature: t/&#176C (Sensor Range: t = -20 &#176C ... 60 &#176C)</li>
  15136. <li>state: T: t/&#176C H: rH/%</li>
  15137. </ul><br>
  15138. The attr subType must be tempHumiSensor.03. This is done if the device was
  15139. created by autocreate.
  15140. </li>
  15141. <br><br>
  15142. <li>Barometric Sensor (EEP A5-05-01)<br>
  15143. [untested]<br>
  15144. <ul>
  15145. <li>P/hPa</li>
  15146. <li>airPressure: P/hPa (Sensor Range: P = 500 hPa ... 1150 hPa</li>
  15147. <li>telegramType: heartbeat|event</li>
  15148. <li>state: P/hPa</li>
  15149. </ul><br>
  15150. The attr subType must be baroSensor.01. This is done if the device was
  15151. created by autocreate.
  15152. </li>
  15153. <br><br>
  15154. <li>Light Sensor (EEP A5-06-01)<br>
  15155. [Eltako FAH60, FAH63, FIH63, Thermokon SR65 LI]<br>
  15156. <ul>
  15157. <li>E/lx</li>
  15158. <li>brightness: E/lx (Sensor Range: 300 lx ... 30 klx, 600 lx ... 60 klx
  15159. , Sensor Range for Eltako: E = 0 lx ... 100 lx, 300 lx ... 30 klx)</li>
  15160. <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
  15161. <li>state: E/lx</li>
  15162. </ul><br>
  15163. Eltako devices only support Brightness.<br>
  15164. The attr subType must be lightSensor.01 and attr manufID must be 00D
  15165. for Eltako Devices. This is done if the device was created by
  15166. autocreate.
  15167. </li>
  15168. <br><br>
  15169. <li>Light Sensor (EEP A5-06-02)<br>
  15170. [untested]<br>
  15171. <ul>
  15172. <li>E/lx</li>
  15173. <li>brightness: E/lx (Sensor Range: 0 lx ... 1020 lx</li>
  15174. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.1 V)</li>
  15175. <li>state: E/lx</li>
  15176. </ul><br>
  15177. The attr subType must be lightSensor.02. This is done if the device was
  15178. created by autocreate.
  15179. </li>
  15180. <br><br>
  15181. <li>Light Sensor (EEP A5-06-03)<br>
  15182. [untested]<br>
  15183. <ul>
  15184. <li>E/lx</li>
  15185. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
  15186. <li>errorCode: 251 ... 255</li>
  15187. <li>state: E/lx</li>
  15188. </ul><br>
  15189. The attr subType must be lightSensor.03. This is done if the device was
  15190. created by autocreate.
  15191. </li>
  15192. <br><br>
  15193. <li>Light Sensor (EEP A5-06-04)<br>
  15194. [untested]<br>
  15195. <ul>
  15196. <li>T: t/&#176C E: E/lx B: ok|low</li>
  15197. <li>battery: ok|low</li>
  15198. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 65535 lx)</li>
  15199. <li>energyStorage: 1/%</li>
  15200. <li>temperature: t/&#176C (Sensor Range: t = -20 &#176C ... 60 &#176C)</li>
  15201. <li>state: T: t/&#176C E: E/lx B: ok|low</li>
  15202. </ul><br>
  15203. The attr subType must be lightSensor.04. This is done if the device was
  15204. created by autocreate.
  15205. </li>
  15206. <br><br>
  15207. <li>Light Sensor (EEP A5-06-05)<br>
  15208. [untested]<br>
  15209. <ul>
  15210. <li>E/lx</li>
  15211. <li>brightness: E/lx (Sensor Range: 0 lx ... 10200 lx</li>
  15212. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.1 V)</li>
  15213. <li>state: E/lx</li>
  15214. </ul><br>
  15215. The attr subType must be lightSensor.05. This is done if the device was created by autocreate.
  15216. </li>
  15217. <br><br>
  15218. <li>Occupancy Sensor (EEP A5-07-01, A5-07-02)<br>
  15219. [EnOcean EOSW]<br>
  15220. <ul>
  15221. <li>on|off</li>
  15222. <li>battery: ok|low</li>
  15223. <li>button: pressed|released</li>
  15224. <li>current: I/&#181;A (Sensor Range: I = 0 V ... 127.0 &#181;A)</li>
  15225. <li>errorCode: 251 ... 255</li>
  15226. <li>motion: on|off</li>
  15227. <li>sensorType: ceiling|wall</li>
  15228. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15229. <li>state: on|off</li>
  15230. </ul><br>
  15231. The attr subType must be occupSensor.<01|02>. This is done if the device was
  15232. created by autocreate. Current is the solar panel current. Some values are
  15233. displayed only for certain types of devices.
  15234. </li>
  15235. <br><br>
  15236. <li>Eltako/PioTek-Tracker TF-TTB (EEP A5-07-01)<br>
  15237. <ul>
  15238. <li>on|off</li>
  15239. <li>battery: ok|low</li>
  15240. <li>button: pressed|released</li>
  15241. <li>motion: on|off</li>
  15242. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15243. <li>state: on|off</li>
  15244. </ul><br>
  15245. The attr subType must be occupSensor.01. This is done if the device was
  15246. created by autocreate. The attr model has to be set manually to tracker.
  15247. Alternatively, the profile will be defined with inofficial EEP G5-07-01.<br>
  15248. The transmission cycle is set using the attribute <a href="#EnOcean_trackerWakeUpCycle">trackerWakeUpCycle</a>.
  15249. </li>
  15250. <br><br>
  15251. <li>Occupancy Sensor (EEP A5-07-03)<br>
  15252. [untested]<br>
  15253. <ul>
  15254. <li>M: on|off E: E/lx U: U/V</li>
  15255. <li>battery: ok|low</li>
  15256. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
  15257. <li>errorCode: 251 ... 255</li>
  15258. <li>motion: on|off</li>
  15259. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15260. <li>state: M: on|off E: E/lx U: U/V</li>
  15261. </ul><br>
  15262. The attr subType must be occupSensor.03. This is done if the device was
  15263. created by autocreate.
  15264. </li>
  15265. <br><br>
  15266. <li>Light, Temperatur and Occupancy Sensor (EEP A5-08-01 ... A5-08-03)<br>
  15267. [Eltako FABH63, FBH55, FBH63, FIBH63, Thermokon SR-MDS, PEHA 482 FU-BM DE]<br>
  15268. <ul>
  15269. <li>M: on|off E: E/lx P: absent|present T: t/&#176C U: U/V</li>
  15270. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 510, 1020, 1530 or 2048 lx)</li>
  15271. <li>motion: on|off</li>
  15272. <li>presence: absent|present</li>
  15273. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 51 &#176C or -30 &#176C ... 50 &#176C)</li>
  15274. <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
  15275. <li>state: M: on|off E: E/lx P: absent|present T: t/&#176C U: U/V</li>
  15276. </ul><br>
  15277. Eltako and PEHA devices only support Brightness and Motion.<br>
  15278. The attr subType must be lightTempOccupSensor.<01|02|03> and attr
  15279. manufID must be 00D for Eltako Devices. This is done if the device was
  15280. created by autocreate.
  15281. </li>
  15282. <br><br>
  15283. <li>Gas Sensor, CO Sensor (EEP A5-09-01)<br>
  15284. [untested]<br>
  15285. <ul>
  15286. <li>CO: c/ppm (Sensor Range: c = 0 ppm ... 255 ppm)</li>
  15287. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 255 &#176C)</li>
  15288. <li>state: c/ppm</li>
  15289. </ul><br>
  15290. The attr subType must be COSensor.01. This is done if the device was created by autocreate.
  15291. </li>
  15292. <br><br>
  15293. <li>Gas Sensor, CO Sensor (EEP A5-09-02)<br>
  15294. [untested]<br>
  15295. <ul>
  15296. <li>CO: c/ppm (Sensor Range: c = 0 ppm ... 1020 ppm)</li>
  15297. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 51.0 &#176C)</li>
  15298. <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
  15299. <li>state: c/ppm</li>
  15300. </ul><br>
  15301. The attr subType must be COSensor.02. This is done if the device was
  15302. created by autocreate.
  15303. </li>
  15304. <br><br>
  15305. <li>Gas Sensor, CO2 Sensor (EEP A5-09-04)<br>
  15306. [Thermokon SR04 CO2 *, Eltako FCOTF63, untested]<br>
  15307. <ul>
  15308. <li>airQuality: high|mean|moderate|low (Air Quality Classes DIN EN 13779)</li>
  15309. <li>CO2: c/ppm (Sensor Range: c = 0 ppm ... 2550 ppm)</li>
  15310. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15311. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 51 &#176C)</li>
  15312. <li>state: T: t/&#176C H: rH/% CO2: c/ppm AQ: high|mean|moderate|low</li>
  15313. </ul><br>
  15314. The attr subType must be tempHumiCO2Sensor.01. This is done if the device was
  15315. created by autocreate.
  15316. </li>
  15317. <br><br>
  15318. <li>Gas Sensor, Volatile organic compounds (VOC) Sensor (EEP A5-09-05, A5-09-0C)<br>
  15319. [untested]<br>
  15320. <ul>
  15321. <li>concentration: c/[unit] (Sensor Range: c = 0 ... 655350</li>
  15322. <li>concentrationUnit: ppb|&mu;/m3</li>
  15323. <li>vocName: Name of last measured VOC</li>
  15324. <li>state: c/[unit]</li>
  15325. </ul><br>
  15326. The attr subType must be vocSensor.01. This is done if the device was
  15327. created by autocreate.
  15328. </li>
  15329. <br><br>
  15330. <li>Gas Sensor, Radon Sensor (EEP A5-09-06)<br>
  15331. [untested]<br>
  15332. <ul>
  15333. <li>Rn: A m3/Bq (Sensor Range: A = 0 Bq/m3 ... 1023 Bq/m3)</li>
  15334. <li>state: A m3/Bq</li>
  15335. </ul><br>
  15336. The attr subType must be radonSensor.01. This is done if the device was
  15337. created by autocreate.
  15338. </li>
  15339. <br><br>
  15340. <li>Gas Sensor, Particles Sensor (EEP A5-09-07)<br>
  15341. [untested]<br>
  15342. Three channels with particle sizes of up to 10 &mu;m, 2.5 &mu;m and 1 &mu;m are supported<br>.
  15343. <ul>
  15344. <li>particles_10: p m3/&mu;g | inactive (Sensor Range: p = 0 &mu;g/m3 ... 511 &mu;g/m3)</li>
  15345. <li>particles_2_5: p m3/&mu;g | inactive (Sensor Range: p = 0 &mu;g/m3 ... 511 &mu;g/m3)</li>
  15346. <li>particles_1: p m3/&mu;g | inactive (Sensor Range: p = 0 &mu;g/m3 ... 511 &mu;g/m3)</li>
  15347. <li>state: PM10: p m3/&mu;g PM2_5: p m3/&mu;g PM1: p m3/&mu;g</li>
  15348. </ul><br>
  15349. The attr subType must be particlesSensor.01. This is done if the device was
  15350. created by autocreate.
  15351. </li>
  15352. <br><br>
  15353. <li>CO2 Sensor (EEP A5-09-08, A5-09-09)<br>
  15354. [untested]<br>
  15355. <ul>
  15356. <li>CO2: c/ppm (Sensor Range: c = 0 ppm ... 2000 ppm)</li>
  15357. <li>powerFailureDetection: detected|not_detected</li>
  15358. <li>state: c/ppm</li>
  15359. </ul><br>
  15360. The attr subType must be CO2Sensor.01. This is done if the device was
  15361. created by autocreate.
  15362. </li>
  15363. <br><br>
  15364. <li>H Sensor (EEP A5-09-0A)<br>
  15365. [untested]<br>
  15366. <ul>
  15367. <li>c/ppm</li>
  15368. <li>voltage: U/V (Sensor Range: U = 2 V ... 5 V)</li>
  15369. <li>H: c/ppm (Sensor Range: c = 0 ppm ... 2000 ppm)</li>
  15370. <li>temperature: t/&#176C (Sensor Range: t = -20 &#176C ... 60 &#176C)</li>
  15371. <li>state: c/ppm</li>
  15372. </ul><br>
  15373. The attr subType must be HSensor.01. This is done if the device was
  15374. created by autocreate.
  15375. </li>
  15376. <br><br>
  15377. <li>Radiation Sensor (EEP A5-09-0B)<br>
  15378. [untested]<br>
  15379. <ul>
  15380. <li>1/[unit]</li>
  15381. <li>radioactivity: 1/[unit] (Sensor Range: c = 0 [unit] ... 65535 [unit])</li>
  15382. <li>unit: uSv/h|cpm|Bq/L|Bq/kg</li>
  15383. <li>voltage: U/V (Sensor Range: U = 2 V ... 5 V)</li>
  15384. <li>state: 1/[unit]</li>
  15385. </ul><br>
  15386. The attr subType must be radiationSensor.01. This is done if the device was
  15387. created by autocreate.
  15388. </li>
  15389. <br><br>
  15390. <li>Room Sensor and Control Unit (EEP A5-10-01 ... A5-10-0D)<br>
  15391. [Eltako FTR55*, Thermokon SR04 *, Thanos SR *]<br>
  15392. <ul>
  15393. <li>T: t/&#176C SP: 0 ... 255 F: 0|1|2|3|auto SW: 0|1</li>
  15394. <li>fanStage: 0|1|2|3|auto</li>
  15395. <li>switch: on|off</li>
  15396. <li>setpoint: 0 ... 255</li>
  15397. <li>setpointScaled: &lt;floating-point number&gt;</li>
  15398. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15399. <li>state: T: t/&#176C SP: 0 ... 255 F: 0|1|2|3|auto SW: on|off</li><br>
  15400. Alternatively for Eltako devices
  15401. <li>T: t/&#176C SPT: t/&#176C NR: t/&#176C</li>
  15402. <li>block: lock|unlock</li>
  15403. <li>nightReduction: t/K</li>
  15404. <li>setpointTemp: t/&#176C</li>
  15405. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15406. <li>state: T: t/&#176C SPT: t/&#176C NR: t/K</li><br>
  15407. </ul><br>
  15408. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  15409. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  15410. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
  15411. setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
  15412. adjust the scaling alternatively.<br>
  15413. The attr subType must be roomSensorControl.05 and attr
  15414. manufID must be 00D for Eltako Devices. This is done if the device was
  15415. created by autocreate.
  15416. </li>
  15417. <br><br>
  15418. <li>Room Sensor and Control Unit (EEP A5-04-01, A5-10-10 ... A5-10-14)<br>
  15419. [Eltako FUTH65D, Thermokon SR04 * rH, Thanos SR *]<br>
  15420. <ul>
  15421. <li>T: t/&#176C H: rH/% SP: 0 ... 255 SW: 0|1</li>
  15422. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15423. <li>switch: 0|1</li>
  15424. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15425. <li>setpoint: 0 ... 255</li>
  15426. <li>setpointScaled: &lt;floating-point number&gt;</li>
  15427. <li>state: T: t/&#176C H: rH/% SP: 0 ... 255 SW: 0|1</li>
  15428. </ul><br>
  15429. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  15430. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  15431. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
  15432. setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
  15433. adjust the scaling alternatively.<br>
  15434. The attr subType must be roomSensorControl.01 and attr
  15435. manufID must be 00D for Eltako Devices. This is
  15436. done if the device was created by autocreate.
  15437. </li>
  15438. <br><br>
  15439. <li>Room Sensor and Control Unit (EEP A5-10-15 ... A5-10-17)<br>
  15440. [untested]<br>
  15441. <ul>
  15442. <li>T: t/&#176C SP: 0 ... 63 P: absent|present</li>
  15443. <li>presence: absent|present</li>
  15444. <li>temperature: t/&#176C (Sensor Range: t = -10 &#176C ... 41.2 &#176C)</li>
  15445. <li>setpoint: 0 ... 63</li>
  15446. <li>setpointScaled: &lt;floating-point number&gt;</li>
  15447. <li>state: T: t/&#176C SP: 0 ... 63 P: absent|present</li>
  15448. </ul><br>
  15449. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  15450. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  15451. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
  15452. setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
  15453. adjust the scaling alternatively.<br>
  15454. The attr subType must be roomSensorControl.02. This is done if the device was
  15455. created by autocreate.
  15456. </li>
  15457. <br><br>
  15458. <li>Room Sensor and Control Unit (EEP A5-10-18)<br>
  15459. [untested]<br>
  15460. <ul>
  15461. <li>T: t/&#176C B: E/lx F: 0|1|2|3|4|5|auto|off SP: t/&#176C P: absent|present|disabled</li>
  15462. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
  15463. <li>fan: 0|1|2|3|4|5|auto|off</li>
  15464. <li>presence: absent|present|disabled</li>
  15465. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15466. <li>setpoint: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15467. <li>state: T: t/&#176C B: E/lx F: 0|1|2|3|4|5|auto|off SP: t/&#176C P: absent|present|disabled</li>
  15468. </ul><br>
  15469. The attr subType must be roomSensorControl.18. This is done if the device was
  15470. created by autocreate.
  15471. </li>
  15472. <br><br>
  15473. <li>Room Sensor and Control Unit (EEP A5-10-19)<br>
  15474. [untested]<br>
  15475. <ul>
  15476. <li>T: t/&#176C H: rH/% F: 0|1|2|3|4|5|auto|off SP: t/&#176C P: absent|present|disabled</li>
  15477. <li>fan: 0|1|2|3|4|5|auto|off</li>
  15478. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15479. <li>presence: absent|present|disabled</li>
  15480. <li>setpoint: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15481. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15482. <li>state: T: t/&#176C H: rH/% F: 0|1|2|3|4|5|auto|off SP: t/&#176C P: absent|present|disabled</li>
  15483. </ul><br>
  15484. The attr subType must be roomSensorControl.19. This is done if the device was
  15485. created by autocreate.
  15486. </li>
  15487. <br><br>
  15488. <li>Room Sensor and Control Unit (EEP A5-10-1A)<br>
  15489. [untested]<br>
  15490. <ul>
  15491. <li>T: t/&#176C F: 0|1|2|3|4|5|auto|off SP: t/&#176C P: absent|present|disabled U: U/V</li>
  15492. <li>errorCode: 251 ... 255</li>
  15493. <li>fan: 0|1|2|3|4|5|auto|off</li>
  15494. <li>presence: absent|present|disabled</li>
  15495. <li>setpoint: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15496. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15497. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15498. <li>state: T: t/&#176C F: 0|1|2|3|4|5|auto|off SP: t/&#176C P: absent|present|disabled U: U/V</li>
  15499. </ul><br>
  15500. The attr subType must be roomSensorControl.1A. This is done if the device was
  15501. created by autocreate.
  15502. </li>
  15503. <br><br>
  15504. <li>Room Sensor and Control Unit (EEP A5-10-1B)<br>
  15505. [untested]<br>
  15506. <ul>
  15507. <li>T: t/&#176C B: E/lx F: 0|1|2|3|4|5|auto|off P: absent|present|disabled U: U/V</li>
  15508. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
  15509. <li>errorCode: 251 ... 255</li>
  15510. <li>fan: 0|1|2|3|4|5|auto|off</li>
  15511. <li>presence: absent|present|disabled</li>
  15512. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15513. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15514. <li>state: T: t/&#176C B: E/lx F: 0|1|2|3|4|5|auto|off P: absent|present|disabled U: U/V</li>
  15515. </ul><br>
  15516. The attr subType must be roomSensorControl.1B. This is done if the device was
  15517. created by autocreate.
  15518. </li>
  15519. <br><br>
  15520. <li>Room Sensor and Control Unit (EEP A5-10-1C)<br>
  15521. [untested]<br>
  15522. <ul>
  15523. <li>T: t/&#176C B: E/lx F: 0|1|2|3|4|5|auto|off SP: E/lx P: absent|present|disabled</li>
  15524. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
  15525. <li>fan: 0|1|2|3|4|5|auto|off</li>
  15526. <li>presence: absent|present|disabled</li>
  15527. <li>setpoint: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
  15528. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15529. <li>state: T: t/&#176C B: E/lx F: 0|1|2|3|4|5|auto|off SP: E/lx P: absent|present|disabled</li>
  15530. </ul><br>
  15531. The attr subType must be roomSensorControl.1C. This is done if the device was
  15532. created by autocreate.
  15533. </li>
  15534. <br><br>
  15535. <li>Room Sensor and Control Unit (EEP A5-10-1D)<br>
  15536. [untested]<br>
  15537. <ul>
  15538. <li>T: t/&#176C H: rH/% F: 0|1|2|3|4|5|auto|off SP: rH/% P: absent|present|disabled</li>
  15539. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15540. <li>fan: 0|1|2|3|4|5|auto|off</li>
  15541. <li>presence: absent|present|disabled</li>
  15542. <li>setpoint: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15543. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15544. <li>state: T: t/&#176C H: rH/% F: 0|1|2|3|4|5|auto|off SP: rH/% P: absent|present|disabled</li>
  15545. </ul><br>
  15546. The attr subType must be roomSensorControl.1D. This is done if the device was
  15547. created by autocreate.
  15548. </li>
  15549. <br><br>
  15550. <li>Room Sensor and Control Unit (EEP A5-10-1F)<br>
  15551. [untested]<br>
  15552. <ul>
  15553. <li>T: t/&#176C F: 0|1|2|3|auto SP: 0 ... 255 P: absent|present|disabled</li>
  15554. <li>fan: 0|1|2|3|auto</li>
  15555. <li>presence: absent|present|disabled</li>
  15556. <li>setpoint: 0 ... 255</li>
  15557. <li>setpointScaled: &lt;floating-point number&gt;</li>
  15558. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15559. <li>state: T: t/&#176C F: 0|1|2|3|auto SP: 0 ... 255 P: absent|present|disabled</li>
  15560. </ul><br>
  15561. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  15562. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  15563. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
  15564. setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
  15565. adjust the scaling alternatively.<br>
  15566. The attr subType must be roomSensorControl.1F. This is done if the device was
  15567. created by autocreate.
  15568. </li>
  15569. <br><br>
  15570. <li>Room Operation Panel (EEP A5-10-20, A5-10-21)<br>
  15571. [untested]<br>
  15572. <ul>
  15573. <li>T: t/&#176C H: rH/% SP: 0 ... 255 B: ok|low</li>
  15574. <li>activity: yes|no</li>
  15575. <li>battery: ok|low</li>
  15576. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15577. <li>setpoint: 0 ... 255</li>
  15578. <li>setpointMode: auto|frostProtect|setpoint</li>
  15579. <li>setpointScaled: &lt;floating-point number&gt;</li>
  15580. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15581. <li>state: t/&#176C H: rH/% SP: 0 ... 255 B: ok|low</li>
  15582. </ul><br>
  15583. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  15584. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  15585. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
  15586. setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
  15587. adjust the scaling alternatively.<br>
  15588. The attr subType must be roomSensorControl.20. This is done if the device was created by autocreate.
  15589. </li>
  15590. <br><br>
  15591. <li>Room Operation Panel (EEP A5-10-22, A5-10-23)<br>
  15592. [untested]<br>
  15593. <ul>
  15594. <li>T: t/&#176C H: rH/% SP: 0 ... 255 F: auto|off|1|2|3 O: occupied|unoccupied</li>
  15595. <li>fanSpeed: auto|off|1|2|3</li>
  15596. <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
  15597. <li>occupancy: occupied|unoccupied</li>
  15598. <li>setpoint: 0 ... 255</li>
  15599. <li>setpointScaled: &lt;floating-point number&gt;</li>
  15600. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  15601. <li>state: t/&#176C H: rH/% SP: 0 ... 255 F: auto|off|1|2|3 O: occupied|unoccupied</li>
  15602. </ul><br>
  15603. The scaling of the setpoint adjustment is device- and vendor-specific. Set the
  15604. attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
  15605. <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
  15606. setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
  15607. adjust the scaling alternatively.<br>
  15608. The attr subType must be roomSensorControl.22.
  15609. This is done if the device was created by autocreate.
  15610. </li>
  15611. <br><br>
  15612. <li>Lighting Controller State (EEP A5-11-01)<br>
  15613. [untested]<br>
  15614. <ul>
  15615. <li>on|off</li>
  15616. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 510 lx)</li>
  15617. <li>contact: open|closed</li>
  15618. <li>daylightHarvesting: enabled|disabled</li>
  15619. <li>dim: 0 ... 255</li>
  15620. <li>presence: absent|present</li>
  15621. <li>illum: 0 ... 255</li>
  15622. <li>mode: switching|dimming</li>
  15623. <li>powerRelayTimer: enabled|disabled</li>
  15624. <li>powerSwitch: on|off</li>
  15625. <li>repeater: enabled|disabled</li>
  15626. <li>state: on|off</li>
  15627. </ul><br>
  15628. The attr subType must be lightCtrlState.01 This is done if the device was
  15629. created by autocreate.
  15630. </li>
  15631. <br><br>
  15632. <li>Temperature Controller Output (EEP A5-11-02)<br>
  15633. [untested]<br>
  15634. <ul>
  15635. <li>t/&#176C</li>
  15636. <li>alarm: on|off</li>
  15637. <li>controlVar: cvar (Sensor Range: cvar = 0 % ... 100 %)</li>
  15638. <li>controllerMode: auto|heating|cooling|off</li>
  15639. <li>controllerState: auto|override</li>
  15640. <li>energyHoldOff: normal|holdoff</li>
  15641. <li>fan: 0 ... 3|auto</li>
  15642. <li>presence: present|absent|standby|frost</li>
  15643. <li>setpointTemp: t/&#176C (Sensor Range: t = 0 &#176C ... 51.2 &#176C)</li>
  15644. <li>state: t/&#176C</li>
  15645. </ul><br>
  15646. The attr subType must be tempCtrlState.01 This is done if the device was
  15647. created by autocreate.
  15648. </li>
  15649. <br><br>
  15650. <li><a name="Blind Status">Blind Status</a> (EEP A5-11-03)<br>
  15651. [untested, experimental status]<br>
  15652. <ul>
  15653. <li>open|closed|not_reached|not_available</li>
  15654. <li>alarm: on|off|no endpoints defined|not used</li>
  15655. <li>anglePos: &alpha;/&#176 (Sensor Range: &alpha; = -180 &#176 ... 180 &#176)</li>
  15656. <li>endPosition: open|closed|not_reached|not_available</li>
  15657. <li>position: pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
  15658. <li>positionMode: normal|inverse</li>
  15659. <li>serviceOn: yes|no</li>
  15660. <li>shutterState: opens|closes|stopped|not_available</li>
  15661. <li>state: open|closed|not_reached|not_available</li>
  15662. </ul><br>
  15663. The attr subType must be shutterCtrlState.01 This is done if the device was
  15664. created by autocreate.<br>
  15665. The profile is linked with <a href="#Blind Command Central">Blind Command Central</a>.
  15666. The profile <a href="#Blind Command Central">Blind Command Central</a>
  15667. controls the devices centrally. For that the attributes subDef, subTypeSet
  15668. and gwCmd have to be set manually.
  15669. </li>
  15670. <br><br>
  15671. <li>Extended Lighting Status (EEP A5-11-04)<br>
  15672. [untested]<br>
  15673. <ul>
  15674. <li>on|off</li>
  15675. <li>alarm: off|lamp_failure|internal_failure|external_periphery_failure</li>
  15676. <li>blue: 0 ... 255</li>
  15677. <li>current: &lt;formula symbol&gt;/&lt;unit&gt; (Sensor range: &lt;formula symbol&gt; = 0 ... 65535 &lt;unit&gt;</li>
  15678. <li>currentUnit: mA|A</li>
  15679. <li>dim: 0 ... 255</li>
  15680. <li>energy: &lt;formula symbol&gt;/&lt;unit&gt; (Sensor range: &lt;formula symbol&gt; = 0 ... 65535 &lt;unit&gt;</li>
  15681. <li>energyUnit: Wh|kWh|MWh|GWh</li>
  15682. <li>green: 0 ... 255</li>
  15683. <li>measuredValue: &lt;formula symbol&gt;/&lt;unit&gt; (Sensor range: &lt;formula symbol&gt; = 0 ... 65535 &lt;unit&gt;</li>
  15684. <li>measureUnit: unknown</li>
  15685. <li>lampOpHours: t/h |unknown (Sensor range: t = 0 h ... 65535 h)</li>
  15686. <li>power: &lt;formula symbol&gt;/&lt;unit&gt; (Sensor range: &lt;formula symbol&gt; = 0 ... 65535 &lt;unit&gt;</li>
  15687. <li>powerSwitch: on|off</li>
  15688. <li>powerUnit: mW|W|kW|MW</li>
  15689. <li>red: 0 ... 255</li>
  15690. <li>rgb: RRGGBB (red (R), green (G) or blue (B) color component values: 00 ... FF)</li>
  15691. <li>serviceOn: yes|no</li>
  15692. <li>voltage: &lt;formula symbol&gt;/&lt;unit&gt; (Sensor range: &lt;formula symbol&gt; = 0 ... 65535 &lt;unit&gt;</li>
  15693. <li>voltageUnit: mV|V</li>
  15694. <li>state: on|off</li>
  15695. </ul><br>
  15696. The attr subType must be lightCtrlState.02 This is done if the device was
  15697. created by autocreate.
  15698. </li>
  15699. <br><br>
  15700. <li>Dual Channel Switch Actuator (EEP A5-11-05)<br>
  15701. [untested]<br>
  15702. <ul>
  15703. <li>1: on|off 2: on|off</li>
  15704. <li>channel1: on|off</li>
  15705. <li>channel2: on|off</li>
  15706. <li>workingMode: 1 ... 4</li>
  15707. <li>state: 1: on|off 2: on|off</li>
  15708. </ul><br>
  15709. The attr subType must be switch.05. This is done if the device was created by autocreate.
  15710. </li>
  15711. <br><br>
  15712. <li>Automated meter reading (AMR), Counter (EEP A5-12-00)<br>
  15713. [Thermokon SR-MI-HS, untested]<br>
  15714. <ul>
  15715. <li>1/s</li>
  15716. <li>currentValue<00 ... 15>: 1/s</li>
  15717. <li>counter<00 ... 15>: 0 ... 16777215</li>
  15718. <li>state: 1/s</li>
  15719. </ul><br>
  15720. The attr subType must be autoMeterReading.00. This is done if the device was
  15721. created by autocreate.
  15722. </li>
  15723. <br><br>
  15724. <li>Automated meter reading (AMR), Electricity (EEP A5-12-01)<br>
  15725. [Eltako FSS12, DSZ14DRS, DSZ14WDRS, Thermokon SR-MI-HS, untested]<br>
  15726. [Eltako FWZ12-16A tested]<br>
  15727. <ul>
  15728. <li>P/W</li>
  15729. <li>power: P/W</li>
  15730. <li>energy<0 ... 15>: E/kWh</li>
  15731. <li>currentTariff: 0 ... 15</li>
  15732. <li>serialNumber: S-&lt;nnnnnn&gt;</li>
  15733. <li>state: P/W</li>
  15734. </ul><br>
  15735. The attr subType must be autoMeterReading.01 and attr
  15736. manufID must be 00D for Eltako Devices. This is done if the device was
  15737. created by autocreate.
  15738. </li>
  15739. <br><br>
  15740. <li>Automated meter reading (AMR), Gas, Water (EEP A5-12-02, A5-12-03)<br>
  15741. [untested]<br>
  15742. <ul>
  15743. <li>Vs/l</li>
  15744. <li>flowrate: Vs/l</li>
  15745. <li>consumption<0 ... 15>: V/m3</li>
  15746. <li>currentTariff: 0 ... 15</li>
  15747. <li>state: Vs/l</li>
  15748. </ul><br>
  15749. The attr subType must be autoMeterReading.02|autoMeterReading.03.
  15750. This is done if the device was created by autocreate.
  15751. </li>
  15752. <br><br>
  15753. <li>Automated meter reading (AMR), Temperatur, Load (EEP A5-12-04)<br>
  15754. [untested]<br>
  15755. <ul>
  15756. <li>T: t/&#176C W: m/g B: full|ok|low|empty</li>
  15757. <li>battery: full|ok|low|empty</li>
  15758. <li>temperature: t/&#176C (Sensor Range: t = -40 &#176C ... 40 &#176C)</li>
  15759. <li>weight: m/g</li>
  15760. <li>state: T: t/&#176C W: m/g B: full|ok|low|empty</li>
  15761. </ul><br>
  15762. The attr subType must be autoMeterReading.04.
  15763. This is done if the device was created by autocreate.
  15764. </li>
  15765. <br><br>
  15766. <li>Automated meter reading (AMR), Temperatur, Container Sensor (EEP A5-12-05)<br>
  15767. [untested]<br>
  15768. <ul>
  15769. <li>T: t/&#176C L: <location0 ... location9> B: full|ok|low|empty</li>
  15770. <li>amount: 0 ... 10</li>
  15771. <li>battery: full|ok|low|empty</li>
  15772. <li>location<0 ... 9>: possessed|not_possessed</li>
  15773. <li>temperature: t/&#176C (Sensor Range: t = -40 &#176C ... 40 &#176C)</li>
  15774. <li>state: T: t/&#176C L: <location0 ... location9> B: full|ok|low|empty</li>
  15775. </ul><br>
  15776. The attr subType must be autoMeterReading.05.
  15777. This is done if the device was created by autocreate.
  15778. </li>
  15779. <br><br>
  15780. <li>Automated meter reading (AMR), Current Meter 16 Channels (EEP A5-12-10)<br>
  15781. [untested]<br>
  15782. <ul>
  15783. <li>I/mA</li>
  15784. <li>current<00 ... 15>: I/mA (Sensor Range: I = 0 mA ... 16777215 mA)</li>
  15785. <li>electricChange<00 ... 15>: Q/Ah (Sensor Range: Q = 0 Ah ... 16777215 Ah)</li>
  15786. <li>currentTariff: 00 ... 15</li>
  15787. <li>state: I/mA</li>
  15788. </ul><br>
  15789. The attr subType must be autoMeterReading.10. This is done if the device was created by autocreate.
  15790. </li>
  15791. <br><br>
  15792. <li>Environmental Applications<br>
  15793. Weather Station (EEP A5-13-01)<br>
  15794. Sun Intensity (EEP A5-13-02)<br>
  15795. [Eltako FWS61]<br>
  15796. <ul>
  15797. <li>T: t/&#176C B: E/lx W: Vs/m IR: yes|no</li>
  15798. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 999 lx)</li>
  15799. <li>dayNight: day|night</li>
  15800. <li>hemisphere: north|south</li>
  15801. <li>isRaining: yes|no</li>
  15802. <li>sunEast: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
  15803. <li>sunSouth: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
  15804. <li>sunWest: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
  15805. <li>temperature: t/&#176C (Sensor Range: t = -40 &#176C ... 80 &#176C)</li>
  15806. <li>windSpeed: Vs/m (Sensor Range: V = 0 m/s ... 70 m/s)</li>
  15807. <li>state:T: t/&#176C B: E/lx W: Vs/m IR: yes|no</li>
  15808. </ul><br>
  15809. Brightness is the strength of the dawn light. SunEast,
  15810. sunSouth and sunWest are the solar radiation from the respective
  15811. compass direction. IsRaining is the rain indicator.<br>
  15812. The attr subType must be environmentApp and attr manufID must be 00D
  15813. for Eltako Devices. This is done if the device was created by
  15814. autocreate.<br>
  15815. The Eltako Weather Station FWS61 supports not the day/night indicator
  15816. (dayNight).<br>
  15817. </li>
  15818. <br><br>
  15819. <li>Environmental Applications<br>
  15820. Data Exchange (EEP A5-13-03)<br>
  15821. Time and Day Exchange (EEP A5-13-04)<br>
  15822. Direction Exchange (EEP A5-13-05)<br>
  15823. Geographic Exchange (EEP A5-13-06)<br>
  15824. <ul>
  15825. <li>azimuth: &alpha;/&deg; (Sensor Range: &alpha; = 0 &deg; ... 359 &deg;)</li>
  15826. <li>date: JJJJ-MM-DD</li>
  15827. <li>elevation: &beta;/&deg; (Sensor Range: &beta; = -90 &deg; ... 90 &deg;)</li>
  15828. <li>latitude: &phi;/&deg; (Sensor Range: &phi; = -90 &deg; ... 90 &deg;)</li>
  15829. <li>longitude: &lambda;/&deg; (Sensor Range: &lambda; = -180 &deg; ... 180 &deg;)</li>
  15830. <li>time: hh:mm:ss [AM|PM]</li>
  15831. <li>timeSource: GPS|RTC</li>
  15832. <li>weekday: Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday</li>
  15833. </ul><br>
  15834. The attr subType must be environmentApp. This is done if the device was created by
  15835. autocreate.
  15836. </li>
  15837. <br><br>
  15838. <li>Environmental Applications<br>
  15839. Sun Position and Radiation (EEP A5-13-10)<br>
  15840. [untested]<br>
  15841. <ul>
  15842. <li>SRA: E m2/W SNA: &alpha;/&deg; SNE: &beta;/&deg;</li>
  15843. <li>dayNight: day|night</li>
  15844. <li>solarRadiation: E m2/W (Sensor Range: E = 0 W/m2 ... 2000 W/m2)</li>
  15845. <li>sunAzimuth: &alpha;/&deg; (Sensor Range: &alpha; = -90 &deg; ... 90 &deg;)</li>
  15846. <li>sunElevation: &beta;/&deg; (Sensor Range: &beta; = 0 &deg; ... 90 &deg;)</li>
  15847. <li>state:SRA: E m2/W SNA: &alpha;/&deg; SNE: &beta;/&deg;</li>
  15848. </ul><br>
  15849. The attr subType must be environmentApp. This is done if the device was created by
  15850. autocreate.
  15851. </li>
  15852. <br><br>
  15853. <li>Wind Sensor (EEP A5-13-07)<br>
  15854. [Hideki, untested]<br>
  15855. <ul>
  15856. <li>Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
  15857. <li>battery: ok|low</li>
  15858. <li>windSpeedAverage: Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
  15859. <li>windSpeedDirection: NNE|NE|ENE|E|ESE|SE|SSE|S|SSW|SW|WSW|W|WNW|NW|NNW|N</li>
  15860. <li>windSpeedMax: Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
  15861. <li>state:Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
  15862. </ul><br>
  15863. The attr subType must be windSensor.01. This is done if the device was created by
  15864. autocreate.<br>
  15865. </li>
  15866. <br><br>
  15867. <li>Rain Sensor (EEP A5-13-08)<br>
  15868. [Hideki, untested]<br>
  15869. <ul>
  15870. <li>H/mm</li>
  15871. <li>battery: ok|low</li>
  15872. <li>rain: H/mm</li>
  15873. <li>state:H/mm</li>
  15874. </ul><br>
  15875. The amount of rainfall is calculated at intervals of 183 s.<br>
  15876. The attr subType must be rainSensor.01. This is done if the device was created by
  15877. autocreate.<br>
  15878. </li>
  15879. <br><br>
  15880. <li>Multi-Func Sensor (EEP A5-14-01 ... A5-14-06)<br>
  15881. [untested]<br>
  15882. <ul>
  15883. <li>C: open|closed V: on|off E: E/lx U: U/V</li>
  15884. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
  15885. <li>contact: open|closed</li>
  15886. <li>errorCode: 251 ... 255</li>
  15887. <li>vibration: on|off</li>
  15888. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15889. <li>state: C: open|closed V: on|off E: E/lx U: U/V</li>
  15890. </ul><br>
  15891. The attr subType must be multiFuncSensor. This is done if the device was
  15892. created by autocreate.
  15893. </li>
  15894. <br><br>
  15895. <li>Dual Door Contact (EEP A5-14-07, A5-14-08)<br>
  15896. [untested]<br>
  15897. <ul>
  15898. <li>C: open|closed B: unlocked|locked V: on|off U: U/V</li>
  15899. <li>alarm: dead_sensor</li>
  15900. <li>block: unlocked|locked</li>
  15901. <li>contact: open|closed</li>
  15902. <li>vibration: on|off</li>
  15903. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15904. <li>state: C: open|closed B: unlocked|locked V: on|off U: U/V</li>
  15905. </ul><br>
  15906. The attr subType must be doorContact. This is done if the device was
  15907. created by autocreate.
  15908. </li>
  15909. <br><br>
  15910. <li>Window/Door Contact (EEP A5-14-09, A5-14-0A)<br>
  15911. [untested]<br>
  15912. <ul>
  15913. <li>W: open|tilt|closed B: unlocked|locked V: on|off U: U/V</li>
  15914. <li>alarm: dead_sensor</li>
  15915. <li>vibration: on|off</li>
  15916. <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
  15917. <li>window: open|tilt|closed</li>
  15918. <li>state: W: open|tilt|closed V: on|off U: U/V</li>
  15919. </ul><br>
  15920. The attr subType must be windowContact. This is done if the device was
  15921. created by autocreate.
  15922. </li>
  15923. <br><br>
  15924. <li>Battery Powered Actuator (EEP A5-20-01)<br>
  15925. [Kieback&Peter MD15-FTL-xx]<br>
  15926. <ul>
  15927. <li>T: t/&#176C SPT: t/&#176C SP: setpoint/%</li>
  15928. <li>actuatorState: obstructed|ok</li>
  15929. <li>alarm: no_response_from_actuator</li>
  15930. <li>battery: ok|low</li>
  15931. <li>cover: open|closed</li>
  15932. <li>delta: &lt;floating-point number&gt;</li>
  15933. <li>energyInput: enabled|disabled</li>
  15934. <li>energyStorage: charged|empty</li>
  15935. <li>maintenanceMode: off|runInit|valveClosed|valveOpend:runInit</li>
  15936. <li>operationMode: off|setpoint|setpointTemp</li>
  15937. <li>p_d: &lt;floating-point number&gt;</li>
  15938. <li>p_i: &lt;floating-point number&gt;</li>
  15939. <li>p_p: &lt;floating-point number&gt;</li>
  15940. <li>pidAlarm: actuator_in_errorPos|dead_sensor|no_temperature_value|setpoint_device_missing</li>
  15941. <li>pidState: alarm|idle|processing|start|stop|</li>
  15942. <li>roomTemp: t/&#176C</li>
  15943. <li>selfCtl: on|off</li>
  15944. <li>setpoint: setpoint/%</li>
  15945. <li>setpointSet: setpoint/%</li>
  15946. <li>setpointCalc: setpoint/%</li>
  15947. <li>setpointTemp: t/&#176C</li>
  15948. <li>setpointTempSet: t/&#176C</li>
  15949. <li>teach: &lt;result of teach procedure&gt;</li>
  15950. <li>temperature: t/&#176C</li>
  15951. <li>waitingCmds: no_change|runInit|setpoint|setpointTemp|valveCloses|valveOpens</li>
  15952. <li>wakeUpCycle: t/s</li>
  15953. <li>window: open|closed</li>
  15954. <li>state: T: t/&#176C SPT: t/&#176C SP: setpoint/%</li>
  15955. </ul><br>
  15956. The internal temperature sensor (roomTemp) of the Micropelt iTRV is not suitable as
  15957. a room thermostat.<br>
  15958. The attr subType must be hvac.01. This is done if the device was created by
  15959. autocreate.
  15960. </li>
  15961. <br><br>
  15962. <li>Heating Radiator Actuating Drive (EEP A5-20-04)<br>
  15963. [Holter SmartDrive MX]<br>
  15964. <ul>
  15965. <li>T: t/&#176C SPT: t/&#176C SP: setpoint/%</li>
  15966. <li>alarm: measurement_error|battery_empty|frost_protection|blocked_valve|end_point_detection_error|no_valve|not_taught_in|no_response_from_controller|teach-in_error</li>
  15967. <li>battery: ok|empty</li>
  15968. <li>blockKey: yes|no</li>
  15969. <li>delta: &lt;floating-point number&gt;</li>
  15970. <li>feedTemp: t/&#176C</li>
  15971. <li>maintenanceMode: off|runInit|valveClosed|valveOpend:runInit</li>
  15972. <li>measurementState: active|inactive</li>
  15973. <li>operationMode: off|setpoint|setpointTemp</li>
  15974. <li>p_d: &lt;floating-point number&gt;</li>
  15975. <li>p_i: &lt;floating-point number&gt;</li>
  15976. <li>p_p: &lt;floating-point number&gt;</li>
  15977. <li>pidAlarm: actuator_in_errorPos|dead_sensor|no_temperature_value|setpoint_device_missing</li>
  15978. <li>pidState: alarm|idle|processing|start|stop|</li>
  15979. <li>roomTemp: t/&#176C</li>
  15980. <li>setpoint: setpoint/%</li>
  15981. <li>setpointSet: setpoint/%</li>
  15982. <li>setpointCalc: setpoint/%</li>
  15983. <li>setpointTemp: t/&#176C</li>
  15984. <li>setpointTempSet: t/&#176C</li>
  15985. <li>teach: &lt;result of teach procedure&gt;</li>
  15986. <li>temperature: t/&#176C</li>
  15987. <li>waitingCmds: no_change|runInit|setpoint|setpointTemp|valveCloses|valveOpens</li>
  15988. <li>state: T: t/&#176C SPT: t/&#176C SP: setpoint/%</li>
  15989. </ul><br>
  15990. The attr subType must be hvac.04. This is done if the device was created by
  15991. autocreate.
  15992. </li>
  15993. <br><br>
  15994. <li>Generic HVAC Interface (EEP A5-20-10)<br>
  15995. [IntesisBox PA-AC-ENO-1i]<br>
  15996. <ul>
  15997. <li>on|off</li>
  15998. <li>ctrl: auto|0...100</li>
  15999. <li>fanSpeed: auto|1...14</li>
  16000. <li>occupancy: occupied|off|standby|unoccupied</li>
  16001. <li>mode: auto|heat|morning_warmup|cool|night_purge|precool|off|test|emergency_heat|fan_only|free_cool|ice|max_heat|eco|dehumidification|calibration|emergency_cool|emergency_stream|max_cool|hvc_load|no_load|auto_heat|auto_cool</li>
  16002. <li>vanePosition: auto|horizontal|position_2|position_3|position_4|vertical|swing|vertical_swing|horizontal_swing|hor_vert_swing|stop_swing</li>
  16003. <li>powerSwitch: on|off</li>
  16004. <li>teach: &lt;result of teach procedure&gt;</li>
  16005. <li>state: on|off</li>
  16006. </ul><br>
  16007. The attr subType must be hvac.10. This is done if the device was created by
  16008. autocreate.
  16009. </li>
  16010. <br><br>
  16011. <li>Generic HVAC Interface - Error Control (EEP A5-20-11)<br>
  16012. [IntesisBox PA-AC-ENO-1i]<br>
  16013. <ul>
  16014. <li>error|ok</li>
  16015. <li>alarm: error|ok</li>
  16016. <li>errorCode: 0...65535</li>
  16017. <li>externalDisable: disable|enable</li>
  16018. <li>keyCardDisable: disable|enable</li>
  16019. <li>otherDisable: disable|enable</li>
  16020. <li>powerSwitch: on|off</li>
  16021. <li>remoteCtrl: disable|enable</li>
  16022. <li>teach: &lt;result of teach procedure&gt;</li>
  16023. <li>window: closed|opened</li>
  16024. <li>windowDisable: disable|enable</li>
  16025. <li>state: error|ok</li>
  16026. </ul><br>
  16027. The attr subType must be hvac.11. This is done if the device was created by
  16028. autocreate.
  16029. </li>
  16030. <br><br>
  16031. <li>Digital Input (EEP A5-30-01, A5-30-02)<br>
  16032. [Thermokon SR65 DI, untested]<br>
  16033. <ul>
  16034. <li>open|closed</li>
  16035. <li>battery: ok|low (only EEP A5-30-01)</li>
  16036. <li>contact: open|closed</li>
  16037. <li>teach: &lt;result of teach procedure&gt;</li>
  16038. <li>state: open|closed</li>
  16039. </ul><br>
  16040. The attr subType must be digitalInput.01 or digitalInput.02. This is done if the device was
  16041. created by autocreate.
  16042. </li>
  16043. <br><br>
  16044. <li>Digital Input (EEP A5-30-03)<br>
  16045. 4 digital Inputs, Wake, Temperature [untested]<br>
  16046. <ul>
  16047. <li>T: t/&#176C I: 0|1 0|1 0|1 0|1 W: 0|1</li>
  16048. <li>in0: 0|1</li>
  16049. <li>in1: 0|1</li>
  16050. <li>in2: 0|1</li>
  16051. <li>in3: 0|1</li>
  16052. <li>teach: &lt;result of teach procedure&gt;</li>
  16053. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  16054. <li>wake: high|low</li>
  16055. <li>state: T: t/&#176C I: 0|1 0|1 0|1 0|1 W: high|low</li>
  16056. </ul><br>
  16057. The attr subType must be digitalInput.03. This is done if the device was
  16058. created by autocreate.
  16059. </li>
  16060. <br><br>
  16061. <li>Digital Input (EEP A5-30-04)<br>
  16062. 3 digital Inputs, 1 digital Input 8 bits [untested]<br>
  16063. <ul>
  16064. <li>0|1 0|1 0|1 0...255</li>
  16065. <li>in0: 0|1</li>
  16066. <li>in1: 0|1</li>
  16067. <li>in2: 0|1</li>
  16068. <li>in3: 0...255</li>
  16069. <li>teach: &lt;result of teach procedure&gt;</li>
  16070. <li>state: 0|1 0|1 0|1 0...255</li>
  16071. </ul><br>
  16072. The attr subType must be digitalInput.04. This is done if the device was
  16073. created by autocreate.
  16074. </li>
  16075. <br><br>
  16076. <li>Digital Input, single input contact, retransmission, battery monitor (EEP A5-30-05)<br>
  16077. [untested]<br>
  16078. <ul>
  16079. <li>error|event|heartbeat</li>
  16080. <li>battery: U/V (Range: U = 0 V ... 3.3 V</li>
  16081. <li>signalIdx: 0 ... 127</li>
  16082. <li>teach: &lt;result of teach procedure&gt;</li>
  16083. <li>telegramType: event|heartbeat</li>
  16084. <li>state: error|event|heartbeat</li>
  16085. </ul><br>
  16086. The attr subType must be digitalInput.05. This is done if the device was
  16087. created by autocreate.
  16088. </li>
  16089. <li>Energy management, demand response (EEP A5-37-01)<br>
  16090. <br>
  16091. <ul>
  16092. <li>on|off|waiting_for_start|waiting_for_stop</li>
  16093. <li>level: 0...15</li>
  16094. <li>powerUsage: powerUsage/%</li>
  16095. <li>powerUsageLevel: max|min</li>
  16096. <li>powerUsageScale: rel|max</li>
  16097. <li>randomEnd: yes|no</li>
  16098. <li>randomStart: yes|no</li>
  16099. <li>setpoint: 0...255</li>
  16100. <li>teach: &lt;result of teach procedure&gt;</li>
  16101. <li>timeout: yyyy-mm-dd hh:mm:ss</li>
  16102. <li>state: on|off|waiting_for_start|waiting_for_stop</li>
  16103. </ul><br>
  16104. The attr subType must be energyManagement.01. This is done if the device was
  16105. created by autocreate.
  16106. </li>
  16107. <br><br>
  16108. <li>Gateway (EEP A5-38-08)<br>
  16109. Switching<br>
  16110. [Eltako FLC61, FSA12, FSR14]<br>
  16111. <ul>
  16112. <li>on</li>
  16113. <li>off</li>
  16114. <li>executeTime: t/s (Sensor Range: t = 0.1 s ... 6553.5 s or 0 if no time specified)</li>
  16115. <li>executeType: duration|delay</li>
  16116. <li>block: lock|unlock</li>
  16117. <li>teach: &lt;result of teach procedure&gt;</li>
  16118. <li>state: on|off</li>
  16119. </ul><br>
  16120. The attr subType must be gateway and gwCmd must be switching. This is done if the device was
  16121. created by autocreate.<br>
  16122. For Eltako devices attributes must be set manually. Eltako devices only send on/off.
  16123. </li>
  16124. <br><br>
  16125. <li>Gateway (EEP A5-38-08)<br>
  16126. Dimming<br>
  16127. [Eltako FUD14, FUD61, FUD70, FSG14, ...]<br>
  16128. <ul>
  16129. <li>on</li>
  16130. <li>off</li>
  16131. <li>block: lock|unlock</li>
  16132. <li>dim: dim/% (Sensor Range: dim = 0 % ... 100 %)</li>
  16133. <li>dimValueLast: dim/%<br>
  16134. Last value received from the bidirectional dimmer.</li>
  16135. <li>dimValueStored: dim/%<br>
  16136. Last value saved by <code>set &lt;name&gt; dim &lt;value&gt;</code>.</li>
  16137. <li>rampTime: t/s (Sensor Range: t = 1 s ... 255 s or 0 if no time specified,
  16138. for Eltako: t = 1 = fast dimming ... 255 = slow dimming or 0 = dimming speed on the dimmer used)</li>
  16139. <li>teach: &lt;result of teach procedure&gt;</li>
  16140. <li>state: on|off</li>
  16141. </ul><br>
  16142. The attr subType must be gateway, gwCmd must be dimming and attr manufID must be 00D
  16143. for Eltako Devices. This is done if the device was created by autocreate.<br>
  16144. For Eltako devices attributes must be set manually. Eltako devices only send on/off and dim.
  16145. </li>
  16146. <br><br>
  16147. <li>Gateway (EEP A5-38-08)<br>
  16148. Setpoint shift<br>
  16149. [untested]<br>
  16150. <ul>
  16151. <li>1/K</li>
  16152. <li>setpointShift: 1/K (Sensor Range: T = -12.7 K ... 12.8 K)</li>
  16153. <li>teach: &lt;result of teach procedure&gt;</li>
  16154. <li>state: 1/K</li>
  16155. </ul><br>
  16156. The attr subType must be gateway, gwCmd must be setpointShift.
  16157. This is done if the device was created by autocreate.
  16158. </li>
  16159. <br><br>
  16160. <li>Gateway (EEP A5-38-08)<br>
  16161. Basic Setpoint<br>
  16162. [untested]<br>
  16163. <ul>
  16164. <li>t/&#176C</li>
  16165. <li>setpoint: t/&#176C (Sensor Range: t = 0 &#176C ... 51.2 &#176C)</li>
  16166. <li>teach: &lt;result of teach procedure&gt;</li>
  16167. <li>state: t/&#176C</li>
  16168. </ul><br>
  16169. The attr subType must be gateway, gwCmd must be setpointBasic.
  16170. This is done if the device was created by autocreate.
  16171. </li>
  16172. <br><br>
  16173. <li>Gateway (EEP A5-38-08)<br>
  16174. Control variable<br>
  16175. [untested]<br>
  16176. <ul>
  16177. <li>auto|heating|cooling|off</li>
  16178. <li>controlVar: cvov (Sensor Range: cvov = 0 % ... 100 %)</li>
  16179. <li>controllerMode: auto|heating|cooling|off</li>
  16180. <li>controllerState: auto|override</li>
  16181. <li>energyHoldOff: normal|holdoff</li>
  16182. <li>presence: present|absent|standby</li>
  16183. <li>teach: &lt;result of teach procedure&gt;</li>
  16184. <li>state: auto|heating|cooling|off</li>
  16185. </ul><br>
  16186. The attr subType must be gateway, gwCmd must be controlVar.
  16187. This is done if the device was created by autocreate.
  16188. </li>
  16189. <br><br>
  16190. <li>Gateway (EEP A5-38-08)<br>
  16191. Fan stage<br>
  16192. [untested]<br>
  16193. <ul>
  16194. <li>0 ... 3|auto</li>
  16195. <li>teach: &lt;result of teach procedure&gt;</li>
  16196. <li>state: 0 ... 3|auto</li>
  16197. </ul><br>
  16198. The attr subType must be gateway, gwCmd must be fanStage.
  16199. This is done if the device was created by autocreate.
  16200. </li>
  16201. <br><br>
  16202. <li>Extended Lighting Control (EEP A5-38-09)<br>
  16203. [untested]<br>
  16204. <ul>
  16205. <li>on</li>
  16206. <li>off</li>
  16207. <li>block: unlock|on|off|local</li>
  16208. <li>blue: &lt;blue channel value&gt; (Range: blue = 0 ... 255)</li>
  16209. <li>dimMax: &lt;maximum dimming value&gt; (Range: dim = 0 ... 255)</li>
  16210. <li>dimMin: &lt;minimum dimming value&gt; (Range: dim = 0 ... 255)</li>
  16211. <li>green: &lt;green channel value&gt; (Range: green = 0 ... 255)</li>
  16212. <li>rampTime: t/s (Range: t = 0 s ... 65535 s)</li>
  16213. <li>red: &lt;red channel value&gt; (Range: red = 0 ... 255)</li>
  16214. <li>rgb: RRGGBB (red (R), green (G) or blue (B) color component values: 00 ... FF)</li>
  16215. <li>teach: &lt;result of teach procedure&gt;</li>
  16216. <li>state: on|off</li>
  16217. </ul><br>
  16218. Another readings, see subtype lightCtrlState.02.<br>
  16219. The attr subType or subTypSet must be lightCtrl.01. This is done if the device was created by autocreate.<br>
  16220. The subType is associated with the subtype lightCtrlState.02.
  16221. </li>
  16222. <br><br>
  16223. <li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
  16224. Wireless Analog Input Module<br>
  16225. [Thermokon SR65 3AI, untested]<br>
  16226. <ul>
  16227. <li>I1: U/V I2: U/V I3: U/V</li>
  16228. <li>input1: U/V (Sensor Range: U = 0 V ... 10 V)</li>
  16229. <li>input2: U/V (Sensor Range: U = 0 V ... 10 V)</li>
  16230. <li>input3: U/V (Sensor Range: U = 0 V ... 10 V)</li>
  16231. <li>teach: &lt;result of teach procedure&gt;</li>
  16232. <li>state: I1: U/V I2: U/V I3: U/V</li>
  16233. </ul><br>
  16234. The attr subType must be manufProfile and attr manufID must be 002
  16235. for Thermokon Devices. This is done if the device was
  16236. created by autocreate.
  16237. </li>
  16238. <br><br>
  16239. <li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
  16240. Thermostat Actuator<br>
  16241. [AWAG omnio UPH230/1x]<br>
  16242. <ul>
  16243. <li>on|off</li>
  16244. <li>emergencyMode&lt;channel&gt;: on|off</li>
  16245. <li>nightReduction&lt;channel&gt;: on|off</li>
  16246. <li>setpointTemp&lt;channel&gt;: t/&#176C</li>
  16247. <li>teach: &lt;result of teach procedure&gt;</li>
  16248. <li>temperature&lt;channel&gt;: t/&#176C</li>
  16249. <li>window&lt;channel&gt;: on|off</li>
  16250. <li>state: on|off</li>
  16251. </ul><br>
  16252. The attr subType must be manufProfile and attr manufID must be 005
  16253. for AWAG omnio Devices. This is done if the device was created by autocreate.
  16254. </li>
  16255. <br><br>
  16256. <li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
  16257. Shutter (EEP F6-02-01 ... F6-02-02)<br>
  16258. [Eltako FSB12, FSB14, FSB61, FSB70]<br>
  16259. <ul>
  16260. <li>open|open_ack<br>
  16261. The status of the device will become "open" after the TOP endpoint is
  16262. reached, or it has finished an "opens" or "position 0" command.</li>
  16263. <li>closed<br>
  16264. The status of the device will become "closed" if the BOTTOM endpoint is
  16265. reached</li>
  16266. <li>stop<br>
  16267. The status of the device become "stop" if stop command is sent.</li>
  16268. <li>not_reached<br>
  16269. The status of the device become "not_reached" between one of the endpoints.</li>
  16270. <li>anglePos: &alpha;/&#176 (Sensor Range: &alpha; = -180 &#176 ... 180 &#176)</li>
  16271. <li>endPosition: open|open_ack|closed|not_reached|not_available</li>
  16272. <li>position: pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
  16273. <li>teach: &lt;result of teach procedure&gt;</li>
  16274. <li>state: open|open_ack|closed|not_reached|stop|teach</li>
  16275. </ul><br>
  16276. The values of the reading position and anglePos are updated automatically,
  16277. if the command position is sent or the reading state was changed
  16278. manually to open or closed.<br>
  16279. Set attr subType file, attr manufID to 00D and attr model to
  16280. FSB14|FSB61|FSB70 manually.
  16281. </li>
  16282. <br><br>
  16283. <li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-12)<br>
  16284. [Telefunken Funktionsstecker, PEHA Easyclick, AWAG Elektrotechnik AG Omnio UPS 230/xx,UPD 230/xx]<br>
  16285. <ul>
  16286. <li>on</li>
  16287. <li>off</li>
  16288. <li>autoOffTime&lt;1...29|All|Input&gt;: 1/s</li>
  16289. <li>channel&lt;0...29|All|Input&gt;: on|off</li>
  16290. <li>delayOffTime&lt;1...29|All|Input&gt;: 1/s</li>
  16291. <li>dayNight: day|night</li>
  16292. <li>defaultState: on|off|last</li>
  16293. <li>devTemp: t/&#176C|invalid</li>
  16294. <li>devTempState: ok|max|warning</li>
  16295. <li>dim&lt;0...29|Input&gt;: dim/% (Sensor Range: dim = 0 % ... 100 %)</li>
  16296. <li>energy&lt;channel&gt;: E/[Ws|Wh|KWh]</li>
  16297. <li>energyUnit&lt;channel&gt;: Ws|Wh|KWh</li>
  16298. <li>error&lt;channel&gt;: ok|warning|failure|not_supported</li>
  16299. <li>extSwitchMode&lt;1...29|All|Input&gt;: unavailable|switch|pushbutton|auto</li>
  16300. <li>extSwitchType&lt;1...29|All|Input&gt;: toggle|direction</li>
  16301. <li>firmwareVersion: [000000 ... FFFFFF]</li>
  16302. <li>loadClassification: no</li>
  16303. <li>localControl&lt;channel&gt;: enabled|disabled</li>
  16304. <li>loadLink: connected|disconnected</li>
  16305. <li>loadOperation: 3-wire</li>
  16306. <li>loadState: on|off</li>
  16307. <li>measurementMode: energy|power</li>
  16308. <li>measurementReport: auto|query</li>
  16309. <li>measurementReset: not_active|trigger</li>
  16310. <li>measurementDelta: E/[Ws|Wh|KWh|W|KW]</li>
  16311. <li>measurementUnit: Ws|Wh|KWh|W|KW</li>
  16312. <li>overCurrentOff&lt;channel&gt;: executed|ready</li>
  16313. <li>overCurrentShutdown&lt;channel&gt;: off|restart</li>
  16314. <li>overCurrentShutdownReset&lt;channel&gt;: not_active|trigger</li>
  16315. <li>power&lt;channel&gt;: P/[W|KW]</li>
  16316. <li>powerFailure&lt;channel&gt;: enabled|disabled</li>
  16317. <li>powerFailureDetection&lt;channel&gt;: detected|not_detected</li>
  16318. <li>powerUnit&lt;channel&gt;: W|KW</li>
  16319. <li>rampTime&lt;1...3l&gt;: 1/s</li>
  16320. <li>responseTimeMax: 1/s</li>
  16321. <li>responseTimeMin: 1/s</li>
  16322. <li>roomCtrlMode: off|comfort|comfort-1|comfort-2|economy|buildingProtection</li>
  16323. <li>serialNumber: [00000000 ... FFFFFFFF]</li>
  16324. <li>taughtInDevID&lt;00...23&gt;: [00000001 ... FFFFFFFE]</li>
  16325. <li>taughtInDevNum: [0 ... 23]</li>
  16326. <li>teach: &lt;result of teach procedure&gt;</li>
  16327. <li>teachInDev: enabled|disabled</li>
  16328. <li>state: on|off</li>
  16329. </ul>
  16330. <br>
  16331. The attr subType must be actuator.01. This is done if the device was
  16332. created by autocreate. To control the device, it must be bidirectional paired,
  16333. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  16334. </li>
  16335. <br><br>
  16336. <li>Blind Control for Position and Angle (D2-05-00)<br>
  16337. [AWAG Elektrotechnik AG OMNIO UPJ 230/12]<br>
  16338. <ul>
  16339. <li>open<br>
  16340. The status of the device will become "open" after the TOP endpoint is
  16341. reached, or it has finished an "opens" or "position 0" command.</li>
  16342. <li>closed<br>
  16343. The status of the device will become "closed" if the BOTTOM endpoint is
  16344. reached</li>
  16345. <li>stop<br>
  16346. The status of the device become "stop" if stop command is sent.</li>
  16347. <li>not_reached<br>
  16348. The status of the device become "not_reached" between one of the endpoints.</li>
  16349. <li>pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
  16350. <li>anglePos&lt;channel&gt;: &alpha;/% (Sensor Range: &alpha; = 0 % ... 100 %)</li>
  16351. <li>block&lt;channel&gt;: unlock|lock|alarm</li>
  16352. <li>endPosition&lt;channel&gt;: open|closed|not_reached|unknown</li>
  16353. <li>position&lt;channel&gt;: unknown|pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
  16354. <li>teach: &lt;result of teach procedure&gt;</li>
  16355. <li>state: open|closed|in_motion|stopped|pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
  16356. </ul>
  16357. <br>
  16358. The attr subType must be blindsCtrl.00 or blindsCtrl.01. This is done if the device was
  16359. created by autocreate. To control the device, it must be bidirectional paired,
  16360. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  16361. </li>
  16362. <br><br>
  16363. <li>Multisensor Window Handle (D2-06-01)<br>
  16364. [Soda GmbH]<br>
  16365. <ul>
  16366. <li>T: t/&#176C H: -|rH/% E: -|E/lx M: off|on|invalid|not_supported|unknown</li>
  16367. <li>alarms: &lt;alarms&gt; (Range: alarms = 00000000 ... FFFFFFFF)</li>
  16368. <li>battery: ok|low</li>
  16369. <li>batteryLowClick: enabled|disabled</li>
  16370. <li>burglaryAlarm: off|on|invalid|not_supported|unknown</li>
  16371. <li>handle: up|down|left|right|invalid|not_supported|unknown</li>
  16372. <li>blinkInterval: t/s|unknown (Range: t = 3 s ... 255 s)</li>
  16373. <li>blinkIntervalSet: t/s|unknown (Range: t = 3 s ... 255 s)</li>
  16374. <li>brightness: E/lx|over_range|invalid|not_supported|unknown (Sensor Range: E = 0 lx ... 60000 lx)</li>
  16375. <li>buttonLeft: pressed|released|invalid|not_supported|unknown</li>
  16376. <li>buttonLeftPresses: &lt;buttonLeftPresses&gt; (Range: buttonLeftPresses = 00000000 ... FFFFFFFF)</li>
  16377. <li>buttonRight: pressed|released|invalid|not_supported|unknown</li>
  16378. <li>buttonRightPresses: &lt;buttonRightPresses&gt; (Range: buttonRightPresses = 00000000 ... FFFFFFFF)</li>
  16379. <li>energyStorage: 1/%|unknown</li>
  16380. <li>handleClosedClick: enabled|disabled</li>
  16381. <li>handleMoveClosed: &lt;handleMoveClosed&gt; (Range: handleMoveClosed = 00000000 ... FFFFFFFF)</li>
  16382. <li>handleMoveOpend: &lt;handleMoveOpend&gt; (Range: handleMoveOpend = 00000000 ... FFFFFFFF)</li>
  16383. <li>handleMoveTilted: &lt;handleMoveTilted&gt; (Range: handleMoveTilted = 00000000 ... FFFFFFFF)</li>
  16384. <li>humidity: rH/%|invalid|not_supported|unknown</li>
  16385. <li>motion: off|on|invalid|not_supported|unknown</li>
  16386. <li>powerOns: &lt;powerOns&gt; (Range: powerOns = 00000000 ... FFFFFFFF)</li>
  16387. <li>presence: absent|present|invalid|not_supported|unknown</li>
  16388. <li>protectionAlarm: off|on|invalid|not_supported|unknown</li>
  16389. <li>temperature: t/&#176C|invalid|not_supported|unknown (Sensor Range: t = -20 &#176C ... 60 &#176C)</li>
  16390. <li>updateInterval: t/s|unknown (Range: t = 5 s ... 65535 s)</li>
  16391. <li>updateIntervalSet: t/s|unknown (Range: t = 5 s ... 65535 s)</li>
  16392. <li>waitingCmds: &lt;integer number&gt;</li>
  16393. <li>window: undef|not_tilted|tilted|invalid|not_supported|unknown</li>
  16394. <li>windowTilts: &lt;windowTilts&gt; (Range: windowTilts = 00000000 ... FFFFFFFF)</li>
  16395. <li>state: T: t/&#176C H: -|rH/% E: -|E/lx M: off|on|invalid|not_supported|unknown</li>
  16396. </ul><br>
  16397. The attr subType must be multisensor.01. This is done if the device was
  16398. created by autocreate. To control the device, it must be bidirectional paired,
  16399. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  16400. </li>
  16401. <br><br>
  16402. <li>Room Control Panels (D2-10-00 - D2-10-02)<br>
  16403. [Kieback & Peter RBW322-FTL]<br>
  16404. <ul>
  16405. <li>T: t/&#176C H: -|rH/% F: 0 ... 100/% SPT: t/&#176C O: -|absent|present M: -|on|off</li>
  16406. <li>battery: ok|low|empty|-</li>
  16407. <li>cooling: auto|on|off|-</li>
  16408. <li>customWarning[1|2]: on|off</li>
  16409. <li>fanSpeed: 0 ... 100/%</li>
  16410. <li>fanSpeedMode: central|local</li>
  16411. <li>heating: auto|on|off|-</li>
  16412. <li>humidity: -|rH/%</li>
  16413. <li>moldWarning: on|off</li>
  16414. <li>motion: on|off|-</li>
  16415. <li>occupancy: -|absent|present</li>
  16416. <li>roomCtrlMode: buildingProtection|comfort|economy|preComfort</li>
  16417. <li>setpointBuildingProtectionTemp: -|t/&#176C (Range: t = 0 &#176C ... 40 &#176C)</li>
  16418. <li>setpointComfortTemp: -|t/&#176C (Range: t = 0 &#176C ... 40 &#176C)</li>
  16419. <li>setpointEconomyTemp: -|t/&#176C (Range: t = 0 &#176C ... 40 &#176C)</li>
  16420. <li>setpointPreComfortTemp: -|t/&#176C (Range: t = 0 &#176C ... 40 &#176C)</li>
  16421. <li>setpointTemp: t/&#176C (Range: t = 0 &#176C ... 40 &#176C)</li>
  16422. <li>solarPowered: yes|no</li>
  16423. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  16424. <li>window: closed|open</li>
  16425. <li>state: T: t/&#176C H: -|rH/% F: 0 ... 100/% SPT: t/&#176C O: -|absent|present M: -|on|off</li>
  16426. </ul><br>
  16427. The attr subType must be roomCtrlPanel.00. This is done if the device was
  16428. created by autocreate. To control the device, it must be bidirectional paired,
  16429. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  16430. </li>
  16431. <br><br>
  16432. <li>Room Control Panels (D2-11-01 - D2-11-08)<br>
  16433. [Thermokon EasySens SR06 LCD-2T/-2T rh -4T/-4T rh]<br>
  16434. <ul>
  16435. <li>T: t/&#176C H: rH/% SPT: t/&#176C F: auto|off|1|2|3</li>
  16436. <li>cooling: on|off</li>
  16437. <li>fanSpeed: auto|off|1|2|3</li>
  16438. <li>heating: on|off</li>
  16439. <li>humidity: rH/%</li>
  16440. <li>occupancy: occupied|unoccupied</li>
  16441. <li>setpointBase: t/&#176C (Range: t = 15 &#176C ... 30 &#176C)</li>
  16442. <li>setpointShift: t/K (Range: t = -10 K ... 10 K)</li>
  16443. <li>setpointShiftMax: t/K (Range: t = 0 K ... 10 K)</li>
  16444. <li>setpointTemp: t/&#176C (Range: t = 5 &#176C ... 40 &#176C)</li>
  16445. <li>setpointType: setpointTemp|setpointShift</li>
  16446. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  16447. <li>trigger: heartbeat|sensor|input</li>
  16448. <li>window: closed|open</li>
  16449. <li>state: T: t/&#176C H: rH/% SPT: t/&#176C F: auto|off|1|2|3</li>
  16450. </ul><br>
  16451. The attr subType must be roomCtrlPanel.01. This is done if the device was
  16452. created by autocreate. To control the device, it must be bidirectional paired by Smart Ack,
  16453. see <a href="#EnOcean_smartAck">SmartAck Learning</a>.
  16454. </li>
  16455. <br><br>
  16456. <li>Fan Control (D2-20-00 - D2-20-02)<br>
  16457. [Maico ECA x RC/RCH, ER 100 RC, untested]<br>
  16458. <ul>
  16459. <li>on|off|not_supported</li>
  16460. <li>fanSpeed: 0 ... 100/%</li>
  16461. <li>error: ok|air_filter|hardware|not_supported</li>
  16462. <li>humidity: rH/%|not_supported</li>
  16463. <li>humidityCtrl: disabled|enabled|not_supported</li>
  16464. <li>roomSize: 0...350/m<sup>2</sup>|max</li>
  16465. <li>roomSizeRef: unsed|not_used|not_supported</li>
  16466. <li>setpointTemp: t/&#176C (Range: t = 0 &#176C ... 40 &#176C)</li>
  16467. <li>teach: &lt;result of teach procedure&gt;</li>
  16468. <li>temperature: t/&#176C (Sensor Range: t = 0 &#176C ... 40 &#176C)</li>
  16469. <li>state: on|off|not_supported</li>
  16470. </ul><br>
  16471. The attr subType must be fanCtrl.00. This is done if the device was
  16472. created by autocreate. To control the device, it must be bidirectional paired,
  16473. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  16474. </li>
  16475. <br><br>
  16476. <li>AC Current Clamp (D2-32-00 - D2-32-02)<br>
  16477. [untested]<br>
  16478. <ul>
  16479. <li>I1: I/A I2: I/A I3: I/A</li>
  16480. <li>current1: I/A (Range: I = 0 A ... 4095 A)</li>
  16481. <li>current2: I/A (Range: I = 0 A ... 4095 A)</li>
  16482. <li>current3: I/A (Range: I = 0 A ... 4095 A)</li>
  16483. <li>teach: &lt;result of teach procedure&gt;</li>
  16484. <li>state: I1: I/A I2: I/A I3: I/A</li>
  16485. </ul><br>
  16486. The attr subType must be currentClamp.00|currentClamp.01|currentClamp.02. This is done if the device was
  16487. created by autocreate.
  16488. </li>
  16489. <br><br>
  16490. <li>LED Controller Status (EEP D2-40-00 - D2-40-01)<br>
  16491. [untested]<br>
  16492. <ul>
  16493. <li>on|off</li>
  16494. <li>blue: 0 % ... 100 %</li>
  16495. <li>daylightHarvesting: on|off</li>
  16496. <li>demandResp: on|off</li>
  16497. <li>dim: 0 % ... 100 %</li>
  16498. <li>green: 0 % ... 100 %</li>
  16499. <li>occupany: unoccupied|occupied|unknown</li>
  16500. <li>powerSwitch: on|off</li>
  16501. <li>red: 0 % ... 100 %</li>
  16502. <li>rgb: RRGGBB (red (R), green (G) or blue (B) color component values: 00 ... FF)</li>
  16503. <li>teach: &lt;result of teach procedure&gt;</li>
  16504. <li>telegramType: event|heartbeat</li>
  16505. <li>state: on|off</li>
  16506. </ul><br>
  16507. The attr subType must be ledCtrlState.00|ledCtrlState.01 This is done if the device was
  16508. created by autocreate.
  16509. </li>
  16510. <br><br>
  16511. <li>Heat Recovery Ventilation (D2-50-00 - D2-50-11)<br>
  16512. [untested]<br>
  16513. <ul>
  16514. <li>off|1...4|auto|demand|supplyAir|exhaustAir</li>
  16515. <li>airQualidity1: 1/%</li>
  16516. <li>airQualidity2: 1/%</li>
  16517. <li>airQualidityThreshold: default|1/%</li>
  16518. <li>CO2Threshold: default|1/%</li>
  16519. <li>coolingProtection: on|off</li>
  16520. <li>defrost: on|off</li>
  16521. <li>deviceMode: master|slave</li>
  16522. <li>drainHeater: on|off</li>
  16523. <li>exhaustAirFlap: closed|opend</li>
  16524. <li>exhaustAirFlow: h/m3 (Sensor Range: Q = 0 m3/h ... 1023 m3/h)</li>
  16525. <li>exhaustFanSpeed: min (Sensor Range: n = 0 / min ... 4095 / min)</li>
  16526. <li>exhaustTemp: t/&#176C (Sensor Range: t = -63 &#176C ... 63 &#176C)</li>
  16527. <li>fault: bbbbbbbb bbbbbbbb bbbbbbbb bbbbbbbb (b = 0|1)</li>
  16528. <li>filterMaintenance: required|not_required</li>
  16529. <li>fireplaceSafetyMode: disabled|enabled</li>
  16530. <li>heatExchangerBypass: closed|opend</li>
  16531. <li>humidityThreshold: default|rH/%</li>
  16532. <li>info: bbbbbbbb bbbbbbbb (b = 0|1)</li>
  16533. <li>input: bbbbbbbb bbbbbbbb (b = 0|1)</li>
  16534. <li>operationHours: [0 ... 589815]</li>
  16535. <li>output: bbbbbbbb bbbbbbbb (b = 0|1)</li>
  16536. <li>outdoorAirHeater: on|off</li>
  16537. <li>outdoorTemp: t/&#176C (Sensor Range: t = -63 &#176C ... 63 &#176C)</li>
  16538. <li>roomTemp: t/&#176C (Sensor Range: t = -63 &#176C ... 63 &#176C)</li>
  16539. <li>roomTempCtrl: on|off</li>
  16540. <li>roomTempSet: default|t/&#176C (Sensor Range: t = -63 &#176C ... 63 &#176C)</li>
  16541. <li>supplyAirFlow: h/m3 (Sensor Range: Q = 0 m3/h ... 1023 m3/h)</li>
  16542. <li>supplyAirFlap: closed|opend</li>
  16543. <li>supplyAirHeater: on|off</li>
  16544. <li>supplyFanSpeed: min (Sensor Range: n = 0 / min ... 4095 / min)</li>
  16545. <li>supplyTemp: t/&#176C (Sensor Range: t = -63 &#176C ... 63 &#176C)</li>
  16546. <li>SWVersion: [0 ... 4095]</li>
  16547. <li>timerMode: on|off</li>
  16548. <li>weeklyTimer: on|off</li>
  16549. <li>state: off|1...4|auto|demand|supplyAir|exhaustAir</li>
  16550. </ul><br>
  16551. The attr subType must be heatRecovery.00. This is done if the device was
  16552. created by autocreate. To control the device, it must be bidirectional paired,
  16553. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  16554. </li>
  16555. <br><br>
  16556. <li>Valve Control (EEP D2-A0-01)<br>
  16557. <ul>
  16558. <li>opens</li>
  16559. <li>open</li>
  16560. <li>closes</li>
  16561. <li>closed</li>
  16562. <li>teach: &lt;result of teach procedure&gt;</li>
  16563. <li>state: opens|open|closes|closed|teachIn|teachOut</li>
  16564. </ul><br>
  16565. The attr subType must be valveCtrl.00. This is done if the device was
  16566. created by autocreate. To control the device, it must be bidirectional paired,
  16567. see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
  16568. </li>
  16569. <br><br>
  16570. <li>Liquid Leakage Sensor (EEP D2-B0-51)<br>
  16571. [untested]<br>
  16572. <ul>
  16573. <li>dry</li>
  16574. <li>wet</li>
  16575. <li>state: dry|wet</li>
  16576. </ul><br>
  16577. The attr subType must be liquidLeakage.51. This is done if the device was
  16578. created by autocreate.
  16579. </li>
  16580. <br><br>
  16581. <li>Generic Profiles<br>
  16582. <ul>
  16583. <li>&lt;00...64&gt;-&lt;channel name&gt;: &lt;value&gt;</li>
  16584. <li>&lt;00...64&gt;-&lt;channel name&gt;Unit: &lt;value&gt;</li>
  16585. <li>&lt;00...64&gt;-&lt;channel name&gt;ValueType: value|setpointAbs|setpointRel</li>
  16586. <li>&lt;00...64&gt;-&lt;channel name&gt;ChannelType: teachIn|data|flag|enum</li>
  16587. <li>teach: &lt;result of teach procedure&gt;</li>
  16588. </ul><br>
  16589. The attr subType must be genericProfile. This is done if the device was
  16590. created by autocreate. If the profile in slave mode is operated, especially the channel
  16591. definition in the gpDef attributes must be entered manually.
  16592. </li>
  16593. <br><br>
  16594. <li>RAW Command<br>
  16595. <ul>
  16596. <li>RORG: 1BS|4BS|ENC|MCS|RPS|SEC|STE|UTE|VLD</li>
  16597. <li>dataSent: data (Range: 1 Byte hex ... 512 Byte hex)</li>
  16598. <li>statusSent: status (Range: 0x00 ... 0xFF)</li>
  16599. <li>state: RORG: rorg DATA: data STATUS: status ODATA: odata</li>
  16600. </ul><br>
  16601. With the help of this command data messages in hexadecimal format can be sent and received.
  16602. The telegram types (RORG) 1BS and RPS are always received protocol-specific.
  16603. For further information, see
  16604. <a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a>.
  16605. <br>
  16606. Set attr subType to raw manually.
  16607. </li>
  16608. <br><br>
  16609. <li>Light and Presence Sensor<br>
  16610. [Omnio Ratio eagle-PM101]<br>
  16611. <ul>
  16612. <li>on</li>
  16613. <li>off</li>
  16614. <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx)</li>
  16615. <li>channel1: on|off<br>
  16616. Motion message in depending on the brightness threshold</li>
  16617. <li>channel2: on|off<br>
  16618. Motion message</li>
  16619. <li>motion: on|off<br>
  16620. Channel 2</li>
  16621. <li>state: on|off<br>
  16622. Channel 2</li>
  16623. </ul><br>
  16624. The sensor also sends switching commands (RORG F6) with the SenderID-1.<br>
  16625. Set attr subType to PM101 manually. Automatic teach-in is not possible,
  16626. since no EEP and manufacturer ID are sent.
  16627. </li>
  16628. <br><br>
  16629. <li>Radio Link Test<br>
  16630. <ul>
  16631. <li>standby|active|stopped</li>
  16632. <li>msgLost: msgLost/%</li>
  16633. <li>rssiMasterAvg: LP/dBm</li>
  16634. <li>state: standby|active|stopped<br></li>
  16635. </ul><br>
  16636. The attr subType must be readioLinkTest. This is done if the device was
  16637. created by autocreate or manually by <code>define &lt;name&gt; EnOcean A5-3F-00</code><br>.
  16638. </li>
  16639. </ul>
  16640. </ul>
  16641. <a name="FBAHA"></a>
  16642. <h3>FBAHA</h3>
  16643. <ul>
  16644. <br>Note: Fritz!OS 6.90 and later does not offer the AHA service needed by
  16645. this module. Use the successor FBAHAHTTP instead of this module.</b><br>
  16646. This module connects to the AHA server (AVM Home Automation) on a FRITZ!Box.
  16647. It serves as the "physical" counterpart to the <a href="#FBDECT">FBDECT</a>
  16648. devices. Note: you have to enable the access to this feature in the FRITZ!Box
  16649. frontend first.
  16650. <br><br>
  16651. <a name="FBAHAdefine"></a>
  16652. <b>Define</b>
  16653. <ul>
  16654. <code>define &lt;name&gt; FBAHA &lt;device&gt;</code>
  16655. <br>
  16656. <br>
  16657. &lt;device&gt; is either a &lt;host&gt;:&lt;port&gt; combination, where
  16658. &lt;host&gt; is normally the address of the FRITZ!Box running the AHA server
  16659. (fritz.box or localhost), and &lt;port&gt; 2002, or
  16660. UNIX:SEQPACKET:/var/tmp/me_avm_home_external.ctl, the latter only works on
  16661. the fritz.box. With FRITZ!OS 5.50 the network port is available, on some
  16662. Labor variants only the UNIX socket is available.<br>
  16663. Example:
  16664. <ul>
  16665. <code>define fb1 FBAHA fritz.box:2002</code><br>
  16666. <code>define fb1 FBAHA UNIX:SEQPACKET:/var/tmp/me_avm_home_external.ctl</code><br>
  16667. </ul>
  16668. </ul>
  16669. <br>
  16670. <a name="FBAHAset"></a>
  16671. <b>Set</b>
  16672. <ul>
  16673. <li>createDevs<br>
  16674. create a FHEM device for each DECT device found on the AHA-Host, see also
  16675. get devList.
  16676. </li>
  16677. <li>reopen<br>
  16678. close and reopen the connection to the AHA server. Debugging only.
  16679. </li>
  16680. <li>reregister<br>
  16681. release existing registration handle, and get a new one. Debugging only.
  16682. </li>
  16683. </ul>
  16684. <br>
  16685. <a name="FBAHAget"></a>
  16686. <b>Get</b>
  16687. <ul>
  16688. <li>devList<br>
  16689. return a list of devices with short info.
  16690. </li>
  16691. </ul>
  16692. <br>
  16693. <a name="FBAHAattr"></a>
  16694. <b>Attributes</b>
  16695. <ul>
  16696. <li><a href="#dummy">dummy</a></li>
  16697. </ul>
  16698. <br>
  16699. <a name="FBAHAevents"></a>
  16700. <b>Generated events:</b>
  16701. <ul>
  16702. <li>UNDEFINED FBDECT_$ahaName_${NR} FBDECT $id"
  16703. </li>
  16704. </ul>
  16705. <br>
  16706. As sometimes the FRITZ!Box reassigns the internal id's of the FBDECT devices,
  16707. the FBAHA module compares upon connect/reconnect the stored names (FBNAME)
  16708. with the current value. This feature will only work, if you assign each
  16709. FBDECT device a unique Name in the FRITZ!Box, and excecute the FHEM "get
  16710. FBDECTDEVICE devInfo" command, which saves the FBNAME reading.<br>
  16711. </ul>
  16712. <a name="FBAHAHTTP"></a>
  16713. <h3>FBAHAHTTP</h3>
  16714. <ul>
  16715. This module connects to the AHA server (AVM Home Automation) on a FRITZ!Box
  16716. via HTTP, it is a successor/drop-in replacement for the FBAHA module. It is
  16717. necessary, as the FBAHA interface is deprecated by AVM. Since the AHA HTTP
  16718. interface do not offer any notification mechanism, the module is regularly
  16719. polling the FRITZ!Box.<br>
  16720. Important: For an existing installation with an FBAHA device, defining a
  16721. new FBAHAHTTP device will change the IODev of all FBDECT devices from the
  16722. old FBAHA to this FBAHAHTTP device, and it will delete the FBAHA device.<br>
  16723. This module serves as the "physical" counterpart to the <a
  16724. href="#FBDECT">FBDECT</a> devices. Note: you have to enable the access to
  16725. Smart Home in the FRITZ!Box frontend for the fritzbox-user, and take care
  16726. to configure the login in the home network with username AND password.
  16727. <br><br>
  16728. <a name="FBAHAHTTPdefine"></a>
  16729. <b>Define</b>
  16730. <ul>
  16731. <code>define &lt;name&gt; FBAHAHTTP &lt;hostname&gt;</code><br>
  16732. <br>
  16733. &lt;hostnamedevice&gt; is most probably fritz.box.
  16734. Example:
  16735. <ul>
  16736. <code>define fb1 FBAHAHTTP fritz.box</code><br>
  16737. </ul>
  16738. </ul>
  16739. <br>
  16740. <a name="FBAHAHTTPset"></a>
  16741. <b>Set</b>
  16742. <ul>
  16743. <li>password &lt;password&gt;<br>
  16744. This is the only way to set the password
  16745. </li>
  16746. <li>refreshstate<br>
  16747. The state of all devices is polled every &lt;polltime&gt; seconds (default
  16748. is 300). This command forces a state-refresh.
  16749. </li>
  16750. </ul>
  16751. <br>
  16752. <a name="FBAHAHTTPget"></a>
  16753. <b>Get</b>
  16754. <ul>N/A</ul>
  16755. <br>
  16756. <a name="FBAHAHTTPattr"></a>
  16757. <b>Attributes</b>
  16758. <ul>
  16759. <li><a href="#disable">disable</a></li>
  16760. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  16761. <li><a href="#dummy">dummy</a></li>
  16762. <li><a href="#fritzbox-user">fritzbox-user</a></li>
  16763. <li><a name="polltime">polltime</a><br>
  16764. measured in seconds, default is 300 i.e. 5 minutes
  16765. </li>
  16766. <li><a href="#async_delay">async_delay</a><br>
  16767. additional delay inserted, when switching more than one device, default
  16768. is 0.2 seconds. Note: even with async_delay 0 there will be a delay, as
  16769. FHEM avoids sending commands in parallel, to avoid malfunctioning of the
  16770. Fritz!BOX AHA server).
  16771. </li>
  16772. </ul>
  16773. <br>
  16774. </ul>
  16775. <a name="FBDECT"></a>
  16776. <h3>FBDECT</h3>
  16777. <ul>
  16778. This module is used to control AVM FRITZ!DECT devices via FHEM, see also the
  16779. <a href="#FBAHA">FBAHA</a> or <a href="#FBAHAHTTP">FBAHAHTTP</a> module for
  16780. the base.
  16781. <br><br>
  16782. <a name="FBDECTdefine"></a>
  16783. <b>Define</b>
  16784. <ul>
  16785. <code>define &lt;name&gt; FBDECT [&lt;FBAHAname&gt;:]&lt;id&gt; props</code>
  16786. <br>
  16787. <br>
  16788. Example:
  16789. <ul>
  16790. <code>define lamp FBDECT 16 switch,powerMeter</code><br>
  16791. </ul>
  16792. <b>Note:</b>Usually the device is created via
  16793. <a href="#autocreate">autocreate</a>. If you rename the corresponding FBAHA
  16794. device, take care to modify the FBDECT definitions, as it is not done
  16795. automatically.
  16796. </ul>
  16797. <br>
  16798. <br>
  16799. <a name="FBDECTset"></a>
  16800. <b>Set</b>
  16801. <ul>
  16802. <li>on/off<br>
  16803. set the device on or off.
  16804. </li>
  16805. <li>desired-temp &lt;value&gt;<br>
  16806. set the desired temp on a Comet DECT (FBAHAHTTP IOdev only)
  16807. </li>
  16808. <li><a href="#setExtensions">set extensions</a> are supported.
  16809. </li>
  16810. <li>msgInterval &lt;sec&gt;<br>
  16811. Number of seconds between the sensor messages (FBAHA IODev only).
  16812. </li>
  16813. </ul>
  16814. <br>
  16815. <a name="FBDECTget"></a>
  16816. <b>Get</b>
  16817. <ul>
  16818. <li>devInfo<br>
  16819. report device information (FBAHA IODev only)
  16820. </li>
  16821. </ul>
  16822. <br>
  16823. <a name="FBDECTattr"></a>
  16824. <b>Attributes</b>
  16825. <ul>
  16826. <li><a href="#IODev">IODev</a></li>
  16827. <li><a href="#disable">disable</a></li>
  16828. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  16829. <li><a href="#do_not_notify">do_not_notify</a></li>
  16830. <li><a href="#ignore">ignore</a></li>
  16831. <li><a href="#dummy">dummy</a></li>
  16832. <li><a href="#showtime">showtime</a></li>
  16833. <li><a href="#model">model</a></li>
  16834. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  16835. </ul>
  16836. <br>
  16837. <a name="FBDECTevents"></a>
  16838. <b>Generated events:</b>
  16839. <ul>
  16840. <li>on</li>
  16841. <li>off</li>
  16842. <li>set_on</li>
  16843. <li>set_off</li>
  16844. <li>current: $v A</li>
  16845. <li>voltage: $v V</li>
  16846. <li>power: $v W</li>
  16847. <li>energy: $v Wh</li>
  16848. <li>powerFactor: $v"</li>
  16849. <li>temperature: $v C (measured)</li>
  16850. <li>tempadjust: $v C</li>
  16851. <li>options: uninitialized</li>
  16852. <li>options: powerOnState:[on|off|last],lock:[none,webUi,remoteFb,button]</li>
  16853. <li>control: disabled</li>
  16854. <li>control: on power < $v delay:$d sec do:state [on|off]</li>
  16855. <li>relaytimes: disabled</li>
  16856. <li>relaytimes: HEX</li>
  16857. </ul>
  16858. </ul>
  16859. <a name="FB_CALLLIST"></a>
  16860. <h3>FB_CALLLIST</h3>
  16861. <ul>
  16862. The FB_CALLLIST module creates a call history list by processing events of a <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a> definition.
  16863. It logs all calls and displays them in a historic table.
  16864. <br><br>
  16865. You need a defined FB_CALLMONITOR instance where you can attach FB_CALLLIST to process the call events.<br><br>
  16866. Depending on your configuration the status will be shown as icons or as text. You need to have the openautomation icon set configured in your corresponding FHEMWEB instance (see FHEMWEB attribute <a href="#iconPath">iconPath</a>).
  16867. <br><br>
  16868. The icons have different colors.<br><br>
  16869. <ul>
  16870. <li><font color="blue"><b>blue</b></font> - incoming call (active or finished)</li>
  16871. <li><font color="green"><b>green</b></font> - outgoing call (active or finished)</li>
  16872. <li><font color="red"><b>red</b></font> - missed incoming call</li>
  16873. </ul>
  16874. <br>
  16875. If you use no icons (see <a href="#FB_CALLLIST_show-icons">show-icons</a>) the following states will be shown:<br><br>
  16876. <ul>
  16877. <li><code><b>&lt;= ((o))</b></code></td><td> - outgoing call (ringing) - icon: <code><b>outgoing.ring</b></code></li>
  16878. <li><code><b>=&gt; ((o))</b></code></td><td> - incoming call (ringing) - icon: <code><b>incoming.ring</b></code></li>
  16879. <br>
  16880. <li><code><b>&lt;= [=]</b></code></td><td> - outgoing call (currently active) - icon: <code><b>outgoing.connected</b></code></li>
  16881. <li><code><b>=&gt; [=]</b></code></td><td> - incoming call (currently active) - icon: <code><b>incoming.connected</b></code></li>
  16882. <br>
  16883. <li><code><b>&lt;= X</b></code></td><td> - outgoing unsuccessful call (nobody picked up) - icon: <code><b>outgoing.missed</b></code></li>
  16884. <li><code><b>=&gt; X</b></code></td><td> - incoming unsuccessful call (missed call) - icon: <code><b>incoming.missed</b></code></li>
  16885. <br>
  16886. <li><code><b>=&gt; O_O</b></code></td><td> - incoming finished call recorded on answering machine - icon: <code><b>incoming.tam</b></code></li>
  16887. <br>
  16888. <li><code><b>&lt;=</b></code></td><td> - outgoing finished call - icon: <code><b>outgoing.done</b></code></li>
  16889. <li><code><b>=&gt;</b></code></td><td> - incoming finished call - icon: <code><b>incoming.done</b></code></li>
  16890. </ul>
  16891. <br>
  16892. The default icon mapping for all states can be changed by the corresponding attribute.
  16893. <br>
  16894. <br>
  16895. <a name="FB_CALLLIST_define"></a>
  16896. <b>Define</b>
  16897. <ul>
  16898. <code>define &lt;name&gt; FB_CALLLIST &lt;FB_CALLMONITOR name&gt;</code><br>
  16899. </ul>
  16900. <br>
  16901. <a name="FB_CALLLIST_set"></a>
  16902. <b>Set</b><br>
  16903. <ul>
  16904. <li><b>clear</b> - clears the list completely</li>
  16905. </ul>
  16906. <br>
  16907. <a name="FB_CALLLIST_get"></a>
  16908. <b>Get</b><br>
  16909. <ul>
  16910. No get commands implemented.
  16911. </ul>
  16912. <br>
  16913. <a name="FB_CALLLIST_attr"></a>
  16914. <b>Attributes</b><br><br>
  16915. <ul>
  16916. <li><a href="#do_not_notify">do_not_notify</a></li>
  16917. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  16918. <br>
  16919. <li><a name="FB_CALLLIST_answMachine-is-missed-call">answMachine-is-missed-call</a> 0,1</li>
  16920. If activated, a incoming call, which is answered by an answering machine, will be treated as a missed call. This is only relevant if <a href="#FB_CALLLIST_list-type">list-type</a> is set to "missed-call".
  16921. <br><br>
  16922. Possible values: 0 =&gt; disabled, 1 =&gt; enabled (answering machine calls will be treated as "missed call").<br>
  16923. Default Value is 0 (disabled)<br><br>
  16924. <li><a name="FB_CALLLIST_connection-mapping">connection-mapping</a> &lt;hash&gt;</li>
  16925. Defines a custom mapping of connection names to custom values. The mapping is performed in a hash table.<br><br>
  16926. e.g.<br>
  16927. <ul>
  16928. <code>attr &lt;name&gt; connection-mapping {'DECT_1' =&gt; 'Mobile Kitchen', 'FON1' =&gt; 'Fax'}</code>
  16929. </ul><br>
  16930. The mapped name will be displayed in the table instead of the original value from FB_CALLMONITOR.
  16931. <br><br>
  16932. Default Value: <i>empty</i> (no mapping is performed)
  16933. <br><br>
  16934. <li><a name="FB_CALLLIST_create-readings">create-readings</a> 0,1</li>
  16935. If enabled, for all visible calls in the list, readings and events will be created. It is recommended to set the attribute <a href="#event-on-change-reading">event-on-change-reading</a> to <code>.*</code> (all readings), to reduce the amount of generated readings for certain call events.<br><br>
  16936. Possible values: 0 =&gt; no readings will be created, 1 =&gt; readings and events will be created.<br>
  16937. Default Value is 0 (no readings will be created)<br><br>
  16938. <li><a name="FB_CALLLIST_disable">disable</a> 0,1</li>
  16939. Optional attribute to disable the call list update. When disabled, call events will be processed and the list wouldn't be updated accordingly.
  16940. <br><br>
  16941. Possible values: 0 =&gt; FB_CALLLIST is activated, 1 =&gt; FB_CALLLIST is deactivated.<br>
  16942. Default Value is 0 (activated)<br><br>
  16943. <li><a name="FB_CALLLIST_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...</li>
  16944. Optional attribute to disable the call list update during a specific time interval. The attribute contains a space separated list of HH:MM tupels.
  16945. If the current time is between any of these time specifications, the callist will be disabled and no longer updated.
  16946. Instead of HH:MM you can also specify HH or HH:MM:SS.
  16947. <br><br>To specify an interval spawning midnight, you have to specify two intervals, e.g.:
  16948. <pre>23:00-24:00 00:00-01:00</pre>
  16949. Default Value is <i>empty</i> (no intervals defined, calllist is always active)<br><br>
  16950. <li><a name="FB_CALLLIST_expire-calls-after">expire-calls-after</a> &lt;time frame&gt;</li>
  16951. Optional attribute to automatically delete finished calls which are older than a given time frame. If a finished call is older than this time frame, it will be deleted from the list.
  16952. <br><br>A time frame can be specified as follows:
  16953. <ul>
  16954. <li>as minutes: <code>1 minute</code> or <code>30 minutes</code></li>
  16955. <li>as hours: <code>1 hour</code> or <code>12 hours</code></li>
  16956. <li>as days: <code>1 day</code> or <code>5 days</code></li>
  16957. <li>as months: <code>1 month</code> or <code>6 months</code> (in this case one month is equal to 30 days)</li>
  16958. <li>as years: <code>1 year</code> or <code>2 years</code> (in this case one year is equal to 365 days)</li>
  16959. </ul>
  16960. <br>
  16961. <b>IMPORTANT:</b> In this case, the ending time of each call is checked, not the beginning time.<br><br>
  16962. If no unit is given, the given number ist interpreted as seconds. Float values can also be used (e.g. <code>0.5 day</code>).
  16963. The value <code>0</code> means no expiry of calls, so no calls will be deleted because of expiry.<br><br>
  16964. Default Value is 0 (no calls will be deleted because of expiry)<br><br>
  16965. <li><a name="FB_CALLLIST_external-mapping">external-mapping</a> &lt;hash&gt;</li>
  16966. Defines a custom mapping of external connection values (reading: external_connection) to custom values. The mapping is performed in a hash table.<br><br>
  16967. e.g.<br>
  16968. <ul>
  16969. <code>attr &lt;name&gt; external-mapping {'ISDN' =&gt; 'Fixed Network', 'SIP0' =&gt; 'Operator A', 'SIP1' =&gt; 'Operator B'}</code>
  16970. </ul><br>
  16971. <li><a name="FB_CALLLIST_icon-mapping">icon-mapping</a> &lt;hash&gt;</li>
  16972. Defines a custom mapping of call states to custom icons. The mapping is performed in a hash table.<br><br>
  16973. e.g.<br>
  16974. <ul>
  16975. <code>attr &lt;name&gt; icon-mapping {'incoming.connected' =&gt; 'phone_ring_in@yellow', 'outgoing.missed' =&gt; 'phone_missed_out@red'}</code>
  16976. </ul><br>
  16977. The mapped name will be displayed in the table instead of the original value from FB_CALLMONITOR. If you use SVG-based icons, you can set the desired color as name or HTML color code via an optional "@<i>color</i>".
  16978. <br><br>
  16979. Possible values and their default icon are:<br><br>
  16980. <ul>
  16981. <li><b>incoming.ring</b> =&gt; phone_ring@blue</li>
  16982. <li><b>outgoing.ring</b> =&gt; phone_ring@green</li>
  16983. <li><b>incoming.connected</b> =&gt; phone_ring_in@blue</li>
  16984. <li><b>outgoing.connected</b> =&gt; phone_ring_in@green</li>
  16985. <li><b>incoming.missed</b> =&gt; phone_missed_in@red</li>
  16986. <li><b>outgoing.missed</b> =&gt; phone_missed_out@green</li>
  16987. <li><b>incoming.done</b> =&gt; phone_call_end_in@blue</li>
  16988. <li><b>outgoing.done</b> =&gt; phone_call_end_out@green</li>
  16989. <li><b>incoming.tam</b> =&gt; phone_answering@blue</li>
  16990. </ul>
  16991. <br><br>
  16992. Default Value: <i>empty</i> (no mapping is performed)<br><br>
  16993. <li><a name="FB_CALLLIST_internal-number-filter">internal-number-filter</a> &lt;hash&gt;</li>
  16994. This attribute accepts a list of comma seperated internal numbers for
  16995. filtering incoming or outgoing calls by a specific list of internal numbers
  16996. or a hash for filtering and mapping numbers to text.<br>
  16997. <br>
  16998. e.g.<br>
  16999. <ul>
  17000. <code>attr &lt;name&gt; internal-number-filter 304050,304060<br><br>
  17001. attr &lt;name&gt; internal-number-filter {'304050' =&gt; 'business', '304060' =&gt; 'private'}</code>
  17002. </ul>
  17003. <br><b>Important:</b> Depending on your provider, the internal number can contain a location area code.
  17004. The internal-number-filter must contain the same number as it is displayed in the call list.
  17005. This can be with or without location area code depending on your provider.
  17006. <br><br>
  17007. If this attribute is set, only the configured internal numbers will be shown in the list. All calls which are not taken via the configured internal numbers, were not be shown in the call list.
  17008. <br><br>
  17009. Default Value: <i>empty</i> (all internal numbers should be used, no exclusions and no mapping is performed)
  17010. <br><br>
  17011. <li><a name="FB_CALLLIST_language">language</a> en,de</li>
  17012. Defines the language of the table header, some keywords and the timestamp format. You need to have the selected locale installed and available in your operating system.<br><br>
  17013. Possible values: en =&gt; English , de =&gt; German<br>
  17014. Default Value is en (English)<br><br>
  17015. <li><a name="FB_CALLLIST_list-type">list-type</a> all,incoming,outgoing,missed-calls,completed,active</li>
  17016. Defines what type of calls should be displayed in the list.<br><br>
  17017. Default Value is "all"<br><br>
  17018. <li><a name="FB_CALLLIST_list-order">list-order</a> descending,ascending</li>
  17019. Defines whether the newest call should be on top of the list (descending) or on the bottom of the list (ascending).<br><br>
  17020. Default Value is descending (first call at top of the list)<br><br>
  17021. <li><a name="FB_CALLLIST_no-heading">no-heading</a> 0,1</li>
  17022. If activated the headline with a link to the detail page of the current definition will be hidden.<br><br>
  17023. Possible values: 0 =&gt; the heading line will be shown , 1 =&gt; the heading line will not be shown<br>
  17024. Default Value is 0 (the heading line will be shown)<br><br>
  17025. <li><a name="FB_CALLLIST_no-table-header">no-table-header</a> 0,1</li>
  17026. If activated the table header containing the name of each column for the current definition will be hidden.<br><br>
  17027. Possible values: 0 =&gt; the table header will be shown , 1 =&gt; the table header will not be shown<br>
  17028. Default Value is 0 (the table header will be shown)<br><br>
  17029. <li><a name="FB_CALLLIST_number-cmd">number-cmd</a> &lt;command&gt;</li>
  17030. Can be set, to execute a specific FHEM command, when clicking on a number in the list. The value can be any valid FHEM command or Perl code (in curly brackets: { ... } ).
  17031. The placeholder <code>$NUMBER</code> will be replaced with the current external number of each row.
  17032. <br><br>
  17033. This can be used for example to initiate a call to this number.
  17034. e.g.:<br><br>
  17035. <ul>
  17036. <li><code>set FRITZBOX call $NUMBER</code></li>
  17037. <li><code>{dialNumber("$NUMBER")}</code></li>
  17038. </ul>
  17039. <br>
  17040. If not set, no link will be shown in the list.<br><br>
  17041. <li><a name="FB_CALLLIST_number-of-calls">number-of-calls</a> 1..40</li>
  17042. Defines the maximum number of displayed call entries in the list.<br><br>
  17043. Default Value is 5 calls<br><br>
  17044. <li><a name="FB_CALLLIST_show-icons">show-icons</a> 0,1</li>
  17045. Normally the call state is shown with icons (used from the openautomation icon set).
  17046. You need to have openautomation in your iconpath attribute of your appropriate FHEMWEB definition to use this icons.
  17047. If you don't want to use icons you can deactivate them with this attribute.<br><br>
  17048. Possible values: 0 =&gt; no icons , 1 =&gt; use icons<br>
  17049. Default Value is 1 (use icons)<br><br>
  17050. <li><a name="FB_CALLLIST_time-format-string">time-format-string</a> &lt;string&gt;</li>
  17051. Defines a format string which should be used to format the timestamp values.
  17052. It contains several placeholders for different elements of a date/time.
  17053. The possible values are standard POSIX strftime() values. Common placeholders are:<br><br>
  17054. <ul>
  17055. <li><code>%a</code> - The abbreviated weekday name</li>
  17056. <li><code>%b</code> - The abbreviated month name</li>
  17057. <li><code>%S</code> - The second as a decimal number</li>
  17058. <li><code>%M</code> - The minutes as a decimal number</li>
  17059. <li><code>%H</code> - The hours as a decimal number</li>
  17060. <li><code>%d</code> - The day of the month as a decimal number</li>
  17061. <li><code>%m</code> - The month as a decimal number</li>
  17062. <li><code>%Y</code> - The year as a decimal number including the century.</li>
  17063. </ul><br>
  17064. There are further placeholders available.
  17065. Please consult the manpage of <code>strftime()</code> or the documentation of your perl interpreter to find out more.
  17066. <br><br>
  17067. Default value is "%a, %d %b %Y %H:%M:%S" ( = "Sun, 07 Jun 2015 12:50:09")<br><br>
  17068. <li><a name="FB_CALLLIST_visible-columns">visible-columns</a> row,state,timestamp,name,number,internal,external,connection,duration</li>
  17069. Defines the visible columns, as well as the order in which these columns are displayed in the call list (from left to right).
  17070. Not all columns must be displayed, you can select only a subset of columns which will be displayed.
  17071. <br><br>
  17072. The possible values represents the corresponding column.
  17073. The column "row" represents the row number within the current list.
  17074. <br><br>
  17075. Possible values: a combination of <code>row,state,timestamp,name,number,internal,external,connection,duration</code><br>
  17076. Default Value is "row,state,timestamp,name,number,internal,external,connection,duration" (show all columns)<br><br>
  17077. </ul>
  17078. <br>
  17079. <a name="FB_CALLLIST_events"></a>
  17080. <b>Generated Events:</b><br><br>
  17081. <ul>
  17082. This module generates only readings if the attribute <a href="#FB_CALLLIST_create-readings">create-readings</a> is activated. The number and names of the readings depends on the selected columns (see attribute <a href="#FB_CALLLIST_visible-columns">visible-columns</a>) and the configured number of calls (see attribute <a href="#FB_CALLLIST_number-of-calls">number-of-calls</a>).
  17083. </ul>
  17084. </ul>
  17085. <a name="FB_CALLMONITOR"></a>
  17086. <h3>FB_CALLMONITOR</h3>
  17087. <ul>
  17088. The FB_CALLMONITOR module connects to a AVM FritzBox Fon and listens for telephone
  17089. <a href="#FB_CALLMONITOR_events">events</a> (Receiving incoming call, Making a call)
  17090. <br><br>
  17091. In order to use this module with fhem you <b>must</b> enable the Callmonitor feature via
  17092. telephone shortcode.<br><br>
  17093. <ul>
  17094. <code>#96*5* - for activating<br>#96*4* - for deactivating</code>
  17095. </ul>
  17096. <br>
  17097. Just dial the shortcode for activating on one of your phones, after 3 seconds just hang up. The feature is now activated.
  17098. <br><br>
  17099. After activating the Callmonitor-Support in your FritzBox, this module is able to
  17100. generate an event for each external call. Internal calls were not be detected by the Callmonitor.
  17101. <br><br>
  17102. This module work with any FritzBox Fon model.
  17103. <br><br>
  17104. <a name="FB_CALLMONITOR_define"></a>
  17105. <b>Define</b>
  17106. <ul>
  17107. <code>define &lt;name&gt; FB_CALLMONITOR &lt;ip-address&gt;[:port]</code><br>
  17108. <br>
  17109. port is 1012 by default.
  17110. <br>
  17111. </ul>
  17112. <br>
  17113. <a name="FB_CALLMONITOR_set"></a>
  17114. <b>Set</b>
  17115. <ul>
  17116. <li><b>reopen</b> - close and reopen the connection</li>
  17117. <li><b>rereadCache</b> - Reloads the cache file if configured (see attribute: <a href="#FB_CALLMONITOR_reverse-search-cache-file">reverse-search-cache-file</a>)</li>
  17118. <li><b>rereadPhonebook</b> - Reloads the FritzBox phonebook (from given file, via telnet or directly if available)</li>
  17119. <li><b>rereadTextfile</b> - Reloads the user given textfile if configured (see attribute: <a href="#FB_CALLMONITOR_reverse-search-text-file">reverse-search-text-file</a>)</li>
  17120. <li><b>password</b> - set the FritzBox password (only available when password is really needed for network access to FritzBox phonebook, see attribute <a href="#FB_CALLMONITOR_fritzbox-remote-phonebook">fritzbox-remote-phonebook</a>)</li>
  17121. </ul>
  17122. <br>
  17123. <a name="FB_CALLMONITOR_get"></a>
  17124. <b>Get</b>
  17125. <ul>
  17126. <li><b>search &lt;phone-number&gt;</b> - returns the name of the given number via reverse-search (internal phonebook, cache or internet lookup)</li>
  17127. <li><b>showPhonebookIds</b> - returns a list of all available phonebooks on the FritzBox (not available when using telnet to retrieve remote phonebook)</li>
  17128. <li><b>showPhonebookEntries</b> - returns a list of all currently known phonebook entries (only available when using phonebook funktionality)</li>
  17129. <li><b>showCacheEntries</b> - returns a list of all currently known cache entries (only available when using reverse search caching funktionality)</li>
  17130. <li><b>showTextfileEntries</b> - returns a list of all known entries from user given textfile (only available when using reverse search caching funktionality)</li>
  17131. </ul>
  17132. <br>
  17133. <a name="FB_CALLMONITOR_attr"></a>
  17134. <b>Attributes</b><br><br>
  17135. <ul>
  17136. <li><a href="#do_not_notify">do_not_notify</a></li>
  17137. <li><a href="#readingFnAttributes">readingFnAttributes</a> 0,1</li><br>
  17138. <li><a name="FB_CALLMONITOR_disable">disable</a> 0,1</li>
  17139. Optional attribute to disable the Callmonitor. When disabled, no phone events can be detected.
  17140. <br><br>
  17141. Possible values: 0 =&gt; Callmonitor is activated, 1 =&gt; Callmonitor is deactivated.<br>
  17142. Default Value is 0 (activated)<br><br>
  17143. <li><a name="FB_CALLMONITOR_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...</li>
  17144. Optional attribute to disable FB_CALLMONITOR during specific time intervals. The attribute contains a space separated list of HH:MM tupels.
  17145. If the current time is between any of these time specifications, no phone events will be processed.
  17146. Instead of HH:MM you can also specify HH or HH:MM:SS.
  17147. <br><br>To specify an interval spawning midnight, you have to specify two intervals, e.g.:
  17148. <pre>23:00-24:00 00:00-01:00</pre>
  17149. Default Value is <i>empty</i> (no intervals defined, FB_CALLMONITOR is always active)<br><br>
  17150. <li><a name="FB_CALLMONITOR_answMachine-is-missed-call">answMachine-is-missed-call</a> 0,1</li>
  17151. If activated, a incoming call, which is answered by an answering machine, will be treated as missed call (see <a href="#FB_CALLMONITOR_events">Generated Events</a>).
  17152. <br><br>
  17153. Possible values: 0 =&gt; disabled, 1 =&gt; enabled (answering machine calls will be treated as "missed call").<br>
  17154. Default Value is 0 (disabled)<br><br>
  17155. <li><a name="FB_CALLMONITOR_reverse-search">reverse-search</a> (phonebook,textfile,klicktel.de,dasoertliche.de,search.ch,dasschnelle.at)</li>
  17156. Enables the reverse searching of the external number (at dial and call receiving).
  17157. This attribute contains a comma separated list of providers which should be used to reverse search a name to a specific phone number.
  17158. The reverse search process will try to lookup the name according to the order of providers given in this attribute (from left to right). The first valid result from the given provider order will be used as reverse search result.
  17159. <br><br>per default, reverse search is disabled.<br><br>
  17160. <li><a name="FB_CALLMONITOR_reverse-search-cache">reverse-search-cache</a> 0,1</li>
  17161. If this attribute is activated each reverse-search result from an internet provider is saved in an internal cache
  17162. and will be used instead of requesting each internet provider every time with the same number. The cache only contains reverse-search results from internet providers.<br><br>
  17163. Possible values: 0 =&gt; off , 1 =&gt; on<br>
  17164. Default Value is 0 (off)<br><br>
  17165. <li><a name="FB_CALLMONITOR_reverse-search-cache-file">reverse-search-cache-file</a> &lt;file&gt;</li>
  17166. Write the internal reverse-search-cache to the given file and use it next time FHEM starts.
  17167. So all reverse search results are persistent written to disk and will be used instantly after FHEM starts.<br><br>
  17168. <li><a name="FB_CALLMONITOR_reverse-search-text-file">reverse-search-text-file</a> &lt;file&gt;</li>
  17169. Define a custom list of numbers and their according names in a textfile. This file uses comma separated values per line in form of:
  17170. <pre>
  17171. &lt;number1&gt;,&lt;name1&gt;
  17172. &lt;number2&gt;,&lt;name2&gt;
  17173. ...
  17174. &lt;numberN&gt;,&lt;nameN&gt;
  17175. </pre>
  17176. You can use the hash sign to comment entries in this file. If the specified file does not exists, it will be created by FHEM.
  17177. <br><br>
  17178. <li><a name="FB_CALLMONITOR_reverse-search-phonebook-file">reverse-search-phonebook-file</a> &lt;file&gt;</li>
  17179. This attribute can be used to specify the (full) path to a phonebook file in FritzBox format (XML structure). Using this option it is possible to use the phonebook of a FritzBox even without FHEM running on a Fritzbox.
  17180. The phonebook file can be obtained by an export via FritzBox web UI<br><br>
  17181. Default value is /var/flash/phonebook (phonebook filepath on FritzBox)<br><br>
  17182. <li><a name="FB_CALLMONITOR_remove-leading-zero">remove-leading-zero</a> 0,1</li>
  17183. If this attribute is activated, a leading zero will be removed from the external number (e.g. in telefon systems).<br><br>
  17184. Possible values: 0 =&gt; off , 1 =&gt; on<br>
  17185. Default Value is 0 (off)<br><br>
  17186. <li><a name="FB_CALLMONITOR_unique-call-ids">unique-call-ids</a> 0,1</li>
  17187. If this attribute is activated, each call will use a biunique call id. So each call can be separated from previous calls in the past.<br><br>
  17188. Possible values: 0 =&gt; off , 1 =&gt; on<br>
  17189. Default Value is 0 (off)<br><br>
  17190. <li><a name="FB_CALLMONITOR_local-area-code">local-area-code</a> &lt;number&gt;</li>
  17191. Use the given local area code for reverse search in case of a local call (e.g. 0228 for Bonn, Germany)<br><br>
  17192. <li><a name="FB_CALLMONITOR_country-code">country-code</a> &lt;number&gt;</li>
  17193. Your local country code. This is needed to identify phonenumbers in your phonebook with your local country code as a national phone number instead of an international one as well as handling Call-By-Call numbers in german speaking countries (e.g. 0049 for Germany, 0043 for Austria or 001 for USA)<br><br>
  17194. Default Value is 0049 (Germany)<br><br>
  17195. <li><a name="FB_CALLMONITOR_check-deflection">check-deflections</a> 0,1</li>
  17196. If this attribute is activated, each incoming call is checked against the configured blocking rules (deflections) of the FritzBox. If an incoming call matches any of these rules, the call will be blocked and no reading/revent will be created for this call. This is only possible, if the phonebook is obtained via TR-064 from the FritzBox (see attributes <a href="#FB_CALLMONITOR_fritzbox-remote-phonebook">fritzbox-remote-phonebook</a> and <a href="#FB_CALLMONITOR_fritzbox-remote-phonebook-via">fritzbox-remote-phonebook-via</a><br><br>
  17197. Possible values: 0 =&gt; off , 1 =&gt; on<br>
  17198. Default Value is 0 (off)<br><br>
  17199. <li><a name="FB_CALLMONITOR_fritzbox-remote-phonebook">fritzbox-remote-phonebook</a> 0,1</li>
  17200. If this attribute is activated, the phonebook should be obtained direct from the FritzBox via remote network connection (in case FHEM is not running on a FritzBox). This is only possible if a password (and depending on configuration a username as well) is configured.<br><br>
  17201. Possible values: 0 =&gt; off , 1 =&gt; on (use remote connection to obtain FritzBox phonebook)<br>
  17202. Default Value is 0 (off)<br><br>
  17203. <li><a name="FB_CALLMONITOR_fritzbox-remote-phonebook-via">fritzbox-remote-phonebook-via</a> tr064,web,telnet</li>
  17204. Set the method how the phonebook should be requested via network. When set to "web", the phonebook is obtained from the web interface via HTTP. When set to "telnet", it uses a telnet connection to login and retrieve the phonebook (telnet must be activated via dial shortcode #96*7*). When set to "tr064" the phonebook is obtained via TR-064 SOAP request.<br><br>
  17205. Possible values: tr064,web,telnet<br>
  17206. Default Value is tr064 (retrieve phonebooks via TR-064 interface)<br><br>
  17207. <li><a name="FB_CALLMONITOR_fritzbox-remote-phonebook-exclude">fritzbox-remote-phonebook-exclude</a> &lt;list&gt;</li>
  17208. A comma separated list of phonebook id's or names which should be excluded when retrieving all possible phonebooks via web or tr064 method (see attribute <a href="#FB_CALLMONITOR_fritzbox-remote-phonebook-via">fritzbox-remote-phonebook-via</a>). All list possible values is provided by <a href="#FB_CALLMONITOR_get">get command</a> <i>showPhonebookIds</i>. This attribute is not applicable when using telnet method to obtain remote phonebook.<br><br>
  17209. Default Value: <i>empty</i> (all phonebooks should be used, no exclusions)<br><br>
  17210. <li><a name="FB_CALLMONITOR_fritzbox-user">fritzbox-user</a> &lt;username&gt;</li>
  17211. Use the given user for remote connect to obtain the phonebook (see <a href="#FB_CALLMONITOR_fritzbox-remote-phonebook">fritzbox-remote-phonebook</a>). This attribute is only needed, if you use multiple users on your FritzBox.<br><br>
  17212. </ul>
  17213. <br>
  17214. <a name="FB_CALLMONITOR_events"></a>
  17215. <b>Generated Events:</b><br><br>
  17216. <ul>
  17217. <li><b>event</b> (call|ring|connect|disconnect) - which event in detail was triggerd</li>
  17218. <li><b>direction</b> (incoming|outgoing) - the call direction in general (incoming or outgoing call)</li>
  17219. <li><b>external_number</b> - The participants number which is calling (event: ring) or beeing called (event: call)</li>
  17220. <li><b>external_name</b> - The result of the reverse lookup of the external_number via internet. Is only available if reverse-search is activated. Special values are "unknown" (no search results found) and "timeout" (got timeout while search request). In case of an timeout and activated caching, the number will be searched again next time a call occurs with the same number</li>
  17221. <li><b>internal_number</b> - The internal number (fixed line, VoIP number, ...) on which the participant is calling (event: ring) or is used for calling (event: call)</li>
  17222. <li><b>internal_connection</b> - The internal connection (FON1, FON2, ISDN, DECT, ...) which is used to take or perform the call</li>
  17223. <li><b>external_connection</b> - The external connection ("POTS" =&gt; fixed line, "SIPx" =&gt; VoIP account, "ISDN", "GSM" =&gt; mobile call via GSM/UMTS stick) which is used to take or perform the call</li>
  17224. <li><b>call_duration</b> - The call duration in seconds. Is only generated at a disconnect event. The value 0 means, the call was not taken by anybody.</li>
  17225. <li><b>call_id</b> - The call identification number to separate events of two or more different calls at the same time. This id number is equal for all events relating to one specific call.</li>
  17226. <li><b>missed_call</b> - This event will be raised in case of a incoming call, which is not answered. If available, also the name of the calling number will be displayed.</li>
  17227. </ul>
  17228. <br>
  17229. <b>Legal Notice:</b><br><br>
  17230. <ul>
  17231. <li>klicktel.de reverse search is powered by telegate MEDIA</li>
  17232. </ul>
  17233. </ul>
  17234. <a name="FHEM2FHEM"></a>
  17235. <h3>FHEM2FHEM</h3>
  17236. <ul>
  17237. FHEM2FHEM is a helper module to connect separate FHEM installations.
  17238. <br><br>
  17239. <a name="FHEM2FHEMdefine"></a>
  17240. <b>Define</b>
  17241. <ul>
  17242. <code>define &lt;name&gt; FHEM2FHEM &lt;host&gt;[:&lt;portnr&gt;][:SSL]
  17243. [LOG:regexp|RAW:devicename] {portpassword}
  17244. </code>
  17245. <br>
  17246. <br>
  17247. Connect to the <i>remote</i> FHEM on &lt;host&gt;. &lt;portnr&gt; is a telnet
  17248. port on the remote FHEM, defaults to 7072. The optional :SSL suffix is
  17249. needed, if the remote FHEM configured SSL for this telnet port. In this case
  17250. the IO::Socket::SSL perl module must be installed for the local host too.<br>
  17251. Note: if the remote FHEM is on a separate host, the telnet port on the remote
  17252. FHEM musst be specified with the global option.<br>
  17253. The next parameter specifies the connection
  17254. type:
  17255. <ul>
  17256. <li>LOG<br>
  17257. Using this type you will receive all events generated by the remote FHEM,
  17258. just like when using the <a href="#inform">inform on</a> command, and you
  17259. can use these events just like any local event for <a
  17260. href="#FileLog">FileLog </a> or <a href="#notify">notify</a>.
  17261. The regexp will prefilter the events distributed locally, for the syntax
  17262. see the notify definition.<br>
  17263. Drawbacks: the remote devices wont be created locally, so list wont
  17264. show them and it is not possible to manipulate them from the local
  17265. FHEM. It is possible to create a device with the same name on both FHEM
  17266. instances, but if both of them receive the same event (e.g. because both
  17267. of them have a CUL attached), then all associated FileLogs/notifys will be
  17268. triggered twice.<br>
  17269. If the remote device is created with the same name locally (e.g. as dummy),
  17270. then the local readings are also updated.
  17271. </li>
  17272. <li>RAW<br>
  17273. By using this type the local FHEM will receive raw events from the remote
  17274. FHEM device <i>devicename</i>, just like if it would be attached to the
  17275. local FHEM.
  17276. Drawback: only devices using the Dispatch function (CUL, FHZ, CM11,
  17277. SISPM, RFXCOM, TCM, TRX, TUL) generate raw messages, and you must create a
  17278. FHEM2FHEM instance for each remote device.<br>
  17279. <i>devicename</i> must exist on the local
  17280. FHEM server too with the same name and same type as the remote device, but
  17281. with the device-node "none", so it is only a dummy device.
  17282. All necessary attributes (e.g. <a href="#rfmode">rfmode</a> if the remote
  17283. CUL is in HomeMatic mode) must also be set for the local device.
  17284. Do not reuse a real local device, else duplicate filtering (see dupTimeout)
  17285. won't work correctly.
  17286. </li>
  17287. </ul>
  17288. The last parameter specifies an optional portpassword, if the remote server
  17289. activated <a href="#portpassword">portpassword</a>.
  17290. <br>
  17291. Examples:
  17292. <ul>
  17293. <code>define ds1 FHEM2FHEM 192.168.178.22:7072 LOG:.*</code><br>
  17294. <br>
  17295. <code>define RpiCUL CUL none 0000</code><br>
  17296. <code>define ds2 FHEM2FHEM 192.168.178.22:7072 RAW:RpiCUL</code><br>
  17297. and on the RPi (192.168.178.22):<br>
  17298. <code>rename CUL_0 RpiCUL</code><br>
  17299. </ul>
  17300. </ul>
  17301. <br>
  17302. <a name="FHEM2FHEMset"></a>
  17303. <b>Set </b>
  17304. <ul>
  17305. <li>reopen<br>
  17306. Reopens the connection to the device and reinitializes it.</li><br>
  17307. </ul>
  17308. <a name="FHEM2FHEMget"></a>
  17309. <b>Get</b> <ul>N/A</ul><br>
  17310. <a name="FHEM2FHEMattr"></a>
  17311. <b>Attributes</b>
  17312. <ul>
  17313. <li><a href="#dummy">dummy</a></li>
  17314. <li><a href="#disable">disable</a></li>
  17315. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  17316. <li><a name="#eventOnly">eventOnly</a><br>
  17317. if set, generate only events, do not set corresponding readings.
  17318. This is a compatibility feature, available only for LOG-Mode.
  17319. </li>
  17320. <li><a name="#addStateEvent">addStateEvent</a><br>
  17321. if set, state events are transmitted correctly. Notes: this is relevant
  17322. only with LOG mode, setting it will generate an additional "reappeared"
  17323. Log entry, and the remote FHEM must support inform onWithState (i.e. must
  17324. be up to date).
  17325. </li>
  17326. <li><a name="#excludeEvents">excludeEvents &lt;regexp&gt;</a>
  17327. do not publish events matching &lt;regexp&gt;
  17328. </li>
  17329. </ul>
  17330. </ul>
  17331. <a name="FHEMWEB"></a>
  17332. <h3>FHEMWEB</h3>
  17333. <ul>
  17334. FHEMWEB is the builtin web-frontend, it also implements a simple web
  17335. server (optionally with Basic-Auth and HTTPS).
  17336. <br> <br>
  17337. <a name="FHEMWEBdefine"></a>
  17338. <b>Define</b>
  17339. <ul>
  17340. <code>define &lt;name&gt; FHEMWEB &lt;tcp-portnr&gt; [global]</code>
  17341. <br><br>
  17342. Enable the webfrontend on port &lt;tcp-portnr&gt;. If global is specified,
  17343. then requests from all interfaces (not only localhost / 127.0.0.1) are
  17344. serviced.<br>
  17345. To enable listening on IPV6 see the comments <a href="#telnet">here</a>.
  17346. <br>
  17347. </ul>
  17348. <br>
  17349. <a name="FHEMWEBset"></a>
  17350. <b>Set</b>
  17351. <ul>
  17352. <li>rereadicons<br>
  17353. reads the names of the icons from the icon path. Use after adding or
  17354. deleting icons.
  17355. </li>
  17356. <li>clearSvgCache<br>
  17357. delete all files found in the www/SVGcache directory, which is used to
  17358. cache SVG data, if the SVGcache attribute is set.
  17359. </li>
  17360. </ul>
  17361. <br>
  17362. <a name="FHEMWEBget"></a>
  17363. <b>Get</b>
  17364. <ul>
  17365. <li>icon &lt;logical icon&gt;<br>
  17366. returns the absolute path to the logical icon. Example:
  17367. <ul>
  17368. <code>get myFHEMWEB icon FS20.on<br>
  17369. /data/Homeautomation/fhem/FHEM/FS20.on.png
  17370. </code>
  17371. </ul>
  17372. </li>
  17373. <li>pathlist<br>
  17374. return FHEMWEB specific directories, where files for given types are
  17375. located
  17376. <br><br>
  17377. </ul>
  17378. <a name="FHEMWEBattr"></a>
  17379. <b>Attributes</b>
  17380. <ul>
  17381. <a name="addHtmlTitle"></a>
  17382. <li>addHtmlTitle<br>
  17383. If set to 0, do not add a title Attribute to the set/get/attr detail
  17384. widgets. This might be necessary for some screenreaders. Default is 1.
  17385. </li><br>
  17386. <li><a href="#addStateEvent">addStateEvent</a></li><br>
  17387. <li>alias_&lt;RoomName&gt;<br>
  17388. If you define a userattr alias_&lt;RoomName&gt; and set this attribute
  17389. for a device assgined to &lt;RoomName&gt;, then this value will be used
  17390. when displaying &lt;RoomName&gt;.<br>
  17391. Note: you can use the userattr alias_.* to allow all rooms, but in this
  17392. case the attribute dropdown in the device detail view won't work for the
  17393. alias_.* attributes.
  17394. </li><br>
  17395. <li><a href="#allowfrom">allowfrom</a></li>
  17396. </li><br>
  17397. <li>allowedCommands, basicAuth, basicAuthMsg<br>
  17398. Please create these attributes for the corresponding <a
  17399. href="#allowed">allowed</a> device, they are deprecated for the FHEMWEB
  17400. instance from now on.
  17401. </li><br>
  17402. <a name="closeConn"></a>
  17403. <li>closeConn<br>
  17404. If set, a TCP Connection will only serve one HTTP request. Seems to
  17405. solve problems on iOS9 for WebApp startup.
  17406. </li><br>
  17407. <a name="column"></a>
  17408. <li>column<br>
  17409. Allows to display more than one column per room overview, by specifying
  17410. the groups for the columns. Example:<br>
  17411. <ul><code>
  17412. attr WEB column LivingRoom:FS20,notify|FHZ,notify DiningRoom:FS20|FHZ
  17413. </code></ul>
  17414. In this example in the LivingRoom the FS20 and the notify group is in
  17415. the first column, the FHZ and the notify in the second.<br>
  17416. Notes: some elements like SVG plots and readingsGroup can only be part of
  17417. a column if they are part of a <a href="#group">group</a>.
  17418. This attribute can be used to sort the groups in a room, just specify
  17419. the groups in one column.
  17420. Space in the room and group name has to be written as %20 for this
  17421. attribute. Both the room name and the groups are regular expressions.
  17422. </li>
  17423. <br>
  17424. <a name="confirmDelete"></a>
  17425. <li>confirmDelete<br>
  17426. confirm delete actions with a dialog. Default is 1, set it to 0 to
  17427. disable the feature.
  17428. </li>
  17429. <br>
  17430. <a name="confirmJSError"></a>
  17431. <li>confirmJSError<br>
  17432. JavaScript errors are reported in a dialog as default.
  17433. Set this attribute to 0 to disable the reporting.
  17434. </li>
  17435. <br>
  17436. <a name="CORS"></a>
  17437. <li>CORS<br>
  17438. If set to 1, FHEMWEB will supply a "Cross origin resource sharing"
  17439. header, see the wikipedia for details.
  17440. </li>
  17441. <br>
  17442. <a name="csrfToken"></a>
  17443. <li>csrfToken<br>
  17444. If set, FHEMWEB requires the value of this attribute as fwcsrf Parameter
  17445. for each command. It is used as countermeasure for Cross Site Resource
  17446. Forgery attacks. If the value is random, then a random number will be
  17447. generated on each FHEMWEB start. If it is set to the literal string
  17448. none, no token is expected. Default is random for featurelevel 5.8 and
  17449. greater, and none for featurelevel below 5.8 </li><br>
  17450. <a name="csrfTokenHTTPHeader"></a>
  17451. <li>csrfTokenHTTPHeader<br>
  17452. If set (default), FHEMWEB sends the token with the X-FHEM-csrfToken HTTP
  17453. header, which is used by some clients. Set it to 0 to switch it off, as
  17454. a measurre against shodan.io like FHEM-detection.</li><br>
  17455. <a name="CssFiles"></a>
  17456. <li>CssFiles<br>
  17457. Space separated list of .css files to be included. The filenames
  17458. are relative to the www directory. Example:
  17459. <ul><code>
  17460. attr WEB CssFiles pgm2/mystyle.css
  17461. </code></ul>
  17462. </li><br>
  17463. <a name="cmdIcon"></a>
  17464. <li>cmdIcon<br>
  17465. Space separated list of cmd:iconName pairs. If set, the webCmd text is
  17466. replaced with the icon. An easy method to set this value is to use
  17467. "Extend devStateIcon" in the detail-view, and copy its value.<br>
  17468. Example:<ul>
  17469. attr lamp cmdIcon on:control_centr_arrow_up off:control_centr_arrow_down
  17470. </ul>
  17471. </li><br>
  17472. <a name="defaultRoom"></a>
  17473. <li>defaultRoom<br>
  17474. show the specified room if no room selected, e.g. on execution of some
  17475. commands. If set hides the <a href="#motd">motd</a>. Example:<br>
  17476. attr WEB defaultRoom Zentrale
  17477. </li>
  17478. <br>
  17479. <a name="devStateIcon"></a>
  17480. <li>devStateIcon<br>
  17481. First form:<br>
  17482. <ul>
  17483. Space separated list of regexp:icon-name:cmd triples, icon-name and cmd
  17484. may be empty.<br>
  17485. If the state of the device matches regexp, then icon-name will be
  17486. displayed as the status icon in the room, and (if specified) clicking
  17487. on the icon executes cmd. If fhem cannot find icon-name, then the
  17488. status text will be displayed.
  17489. Example:<br>
  17490. <ul>
  17491. attr lamp devStateIcon on:closed off:open<br>
  17492. attr lamp devStateIcon on::A0 off::AI<br>
  17493. attr lamp devStateIcon .*:noIcon<br>
  17494. </ul>
  17495. Note: if the image is referencing an SVG icon, then you can use the
  17496. @colorname suffix to color the image. E.g.:<br>
  17497. <ul>
  17498. attr Fax devStateIcon on:control_building_empty@red
  17499. off:control_building_filled:278727
  17500. </ul>
  17501. If the cmd is noFhemwebLink, then no HTML-link will be generated, i.e.
  17502. nothing will happen when clicking on the icon or text.
  17503. </ul>
  17504. Second form:<br>
  17505. <ul>
  17506. Perl code enclosed in {}. If the code returns undef, then the default
  17507. icon is used, if it retuns a string enclosed in <>, then it is
  17508. interpreted as an html string. Else the string is interpreted as a
  17509. devStateIcon of the first fom, see above.
  17510. Example:<br>
  17511. {'&lt;div
  17512. style="width:32px;height:32px;background-color:green"&gt;&lt;/div&gt;'}
  17513. </ul>
  17514. </li>
  17515. <br>
  17516. <a name="devStateStyle"></a>
  17517. <li>devStateStyle<br>
  17518. Specify an HTML style for the given device, e.g.:<br>
  17519. <ul>
  17520. attr sensor devStateStyle style="text-align:left;;font-weight:bold;;"<br>
  17521. </ul>
  17522. </li>
  17523. <br>
  17524. <li>deviceOverview<br>
  17525. Configures if the device line from the room view (device icon, state
  17526. icon and webCmds/cmdIcons) should also be shown in the device detail
  17527. view. Can be set to always, onClick, iconOnly or never. Default is
  17528. always.
  17529. </li><br>
  17530. <a name="editConfig"></a>
  17531. <li>editConfig<br>
  17532. If this FHEMWEB attribute is set to 1, then you will be able to edit
  17533. the FHEM configuration file (fhem.cfg) in the "Edit files" section.
  17534. After saving this file a rereadcfg is executed automatically, which has
  17535. a lot of side effects.<br>
  17536. </li><br>
  17537. <a name="editFileList"></a>
  17538. <li>editFileList<br>
  17539. Specify the list of Files shown in "Edit Files" section. It is a
  17540. newline separated list of triples, the first is the Title, the next is
  17541. the directory to search for, the third the regular expression. Default
  17542. is:
  17543. <ul>
  17544. <code>
  17545. Own modules and helper files:$MW_dir:^(.*sh|[0-9][0-9].*Util.*pm|.*cfg|.*holiday|myUtilsTemplate.pm|.*layout)$<br>
  17546. Gplot files:$FW_gplotdir:^.*gplot$<br>
  17547. Styles:$FW_cssdir:^.*(css|svg)$<br>
  17548. </code>
  17549. </ul>
  17550. NOTE: The directory spec is not flexible: all .js/.css/_defs.svg files
  17551. come from www/pgm2 ($FW_cssdir), .gplot files from $FW_gplotdir
  17552. (www/gplot), everything else from $MW_dir (FHEM).
  17553. </li><br>
  17554. <a name="endPlotNow"></a>
  17555. <li>endPlotNow<br>
  17556. If this FHEMWEB attribute is set to 1, then day and hour plots will
  17557. end at current time. Else the whole day, the 6 hour period starting at
  17558. 0, 6, 12 or 18 hour or the whole hour will be shown. This attribute
  17559. is not used if the SVG has the attribute startDate defined.<br>
  17560. </li><br>
  17561. <a name="endPlotToday"></a>
  17562. <li>endPlotToday<br>
  17563. If this FHEMWEB attribute is set to 1, then week and month plots will
  17564. end today. Else the current week or the current month will be shown.
  17565. <br>
  17566. </li><br>
  17567. <a name="fwcompress"></a>
  17568. <li>fwcompress<br>
  17569. Enable compressing the HTML data (default is 1, i.e. yes, use 0 to switch it off).
  17570. </li>
  17571. <br>
  17572. <a name="hiddengroup"></a>
  17573. <li>hiddengroup<br>
  17574. Comma separated list of groups to "hide", i.e. not to show in any room
  17575. of this FHEMWEB instance.<br>
  17576. Example: attr WEBtablet hiddengroup FileLog,dummy,at,notify
  17577. </li>
  17578. <br>
  17579. <a name="hiddengroupRegexp"></a>
  17580. <li>hiddengroupRegexp<br>
  17581. One regexp for the same purpose as hiddengroup.
  17582. </li>
  17583. <br>
  17584. <a name="hiddenroom"></a>
  17585. <li>hiddenroom<br>
  17586. Comma separated list of rooms to "hide", i.e. not to show. Special
  17587. values are input, detail and save, in which case the input areas, link
  17588. to the detailed views or save button is hidden (although each aspect
  17589. still can be addressed through URL manipulation).<br>
  17590. The list can also contain values from the additional "Howto/Wiki/FAQ"
  17591. block.
  17592. </li>
  17593. <br>
  17594. <a name="hiddenroomRegexp"></a>
  17595. <li>hiddenroomRegexp<br>
  17596. One regexp for the same purpose as hiddenroom. Example:
  17597. <ul>
  17598. attr WEB hiddenroomRegexp .*config
  17599. </ul>
  17600. Note: the special values input, detail and save cannot be specified
  17601. with hiddenroomRegexp.
  17602. </li>
  17603. <br>
  17604. <a name="HTTPS"></a>
  17605. <li>HTTPS<br>
  17606. Enable HTTPS connections. This feature requires the perl module
  17607. IO::Socket::SSL, to be installed with cpan -i IO::Socket::SSL or
  17608. apt-get install libio-socket-ssl-perl; OSX and the FritzBox-7390
  17609. already have this module.<br>
  17610. A local certificate has to be generated into a directory called certs,
  17611. this directory <b>must</b> be in the <a href="#modpath">modpath</a>
  17612. directory, at the same level as the FHEM directory.
  17613. <ul>
  17614. mkdir certs<br>
  17615. cd certs<br>
  17616. openssl req -new -x509 -nodes -out server-cert.pem -days 3650 -keyout server-key.pem
  17617. </ul>
  17618. <br>
  17619. </li>
  17620. <a name="icon"></a>
  17621. <li>icon<br>
  17622. Set the icon for a device in the room overview. There is an
  17623. icon-chooser in FHEMWEB to ease this task. Setting icons for the room
  17624. itself is indirect: there must exist an icon with the name
  17625. ico<ROOMNAME>.png in the iconPath.
  17626. </li>
  17627. <br>
  17628. <a name="iconPath"></a>
  17629. <li>iconPath<br>
  17630. colon separated list of directories where the icons are read from.
  17631. The directories start in the fhem/www/images directory. The default is
  17632. $styleSheetPrefix:default:fhemSVG:openautomation<br>
  17633. Set it to fhemSVG:openautomation to get only SVG images.
  17634. </li>
  17635. <br>
  17636. <a name="JavaScripts"></a>
  17637. <li>JavaScripts<br>
  17638. Space separated list of JavaScript files to be included. The filenames
  17639. are relative to the www directory. For each file an additional
  17640. user-settable FHEMWEB attribute will be created, to pass parameters to
  17641. the script. The name of this additional attribute gets the Param
  17642. suffix, directory and the fhem_ prefix will be deleted. Example:
  17643. <ul><code>
  17644. attr WEB JavaScripts codemirror/fhem_codemirror.js<br>
  17645. attr WEB codemirrorParam { "theme":"blackboard", "lineNumbers":true }
  17646. </code></ul>
  17647. </li><br>
  17648. <a name="longpoll"></a>
  17649. <li>longpoll<br>
  17650. Affects devices states in the room overview only.<br>
  17651. In this mode status update is refreshed more or less instantaneously,
  17652. and state change (on/off only) is done without requesting a complete
  17653. refresh from the server.
  17654. Default is on.
  17655. </li>
  17656. <br>
  17657. <a name="longpollSVG"></a>
  17658. <li>longpollSVG<br>
  17659. Reloads an SVG weblink, if an event should modify its content. Since
  17660. an exact determination of the affected events is too complicated, we
  17661. need some help from the definition in the .gplot file: the filter used
  17662. there (second parameter if the source is FileLog) must either contain
  17663. only the deviceName or have the form deviceName.event or deviceName.*.
  17664. This is always the case when using the <a href="#plotEditor">Plot
  17665. editor</a>. The SVG will be reloaded for <b>any</b> event triggered by
  17666. this deviceName. Default is off.
  17667. </li>
  17668. <br>
  17669. <a name="mainInputLength"></a>
  17670. <li>mainInputLength<br>
  17671. length of the maininput text widget in characters (decimal number).
  17672. </li>
  17673. <br>
  17674. <a name="menuEntries"></a>
  17675. <li>menuEntries<br>
  17676. Comma separated list of name,html-link pairs to display in the
  17677. left-side list. Example:<br>
  17678. attr WEB menuEntries fhem.de,http://fhem.de,culfw.de,http://culfw.de<br>
  17679. attr WEB menuEntries
  17680. AlarmOn,http://fhemhost:8083/fhem?cmd=set%20alarm%20on<br>
  17681. </li>
  17682. <br>
  17683. <a name="nameDisplay"></a>
  17684. <li>nameDisplay<br>
  17685. The argument is perl code, which is executed for each single device in
  17686. the room to determine the name displayed. $DEVICE is the name of the
  17687. current device, and $ALIAS is the value of the alias attribute or the
  17688. name of the device, if no alias is set. E.g. you can add a a global
  17689. userattr named alias_hu for the Hungarian translation, and specify
  17690. nameDisplay for the hungarian FHEMWEB instance as
  17691. <ul>
  17692. AttrVal($DEVICE, "alias_hu", $ALIAS)
  17693. </ul>
  17694. </li>
  17695. <br>
  17696. <a name="nrAxis"></a>
  17697. <li>nrAxis<br>
  17698. the number of axis for which space should be reserved on the left and
  17699. right sides of a plot and optionaly how many axes should realy be used
  17700. on each side, separated by comma: left,right[,useLeft,useRight]. You
  17701. can set individual numbers by setting the nrAxis of the SVG. Default is
  17702. 1,1.
  17703. </li><br>
  17704. <a name="ploteditor"></a>
  17705. <li>ploteditor<br>
  17706. Configures if the <a href="#plotEditor">Plot editor</a> should be shown
  17707. in the SVG detail view.
  17708. Can be set to always, onClick or never. Default is always.
  17709. </li><br>
  17710. <a name="plotEmbed"></a>
  17711. <li>plotEmbed 0<br>
  17712. SVG plots are rendered as part of &lt;embed&gt; tags, as in the past
  17713. this was the only way to display SVG, and it allows to render them in
  17714. parallel, see plotfork.
  17715. Setting plotEmbed to 0 will render SVG in-place, but as a side-effect
  17716. makes the plotfork attribute meaningless.<br>
  17717. </li><br>
  17718. <a name="plotfork"></a>
  17719. <li>plotfork [&lt;&Delta;p&gt;]<br>
  17720. If set to a nonzero value, run part of the processing (e.g. <a
  17721. href="#SVG">SVG</a> plot generation or <a href="#RSS">RSS</a> feeds) in
  17722. parallel processes. Actually, child processes are forked whose
  17723. priorities are the FHEM process' priority plus &Delta;p.
  17724. Higher values mean lower priority. e.g. use &Delta;p= 10 to renice the
  17725. child processes and provide more CPU power to the main FHEM process.
  17726. &Delta;p is optional and defaults to 0.<br>
  17727. Note: do not use it
  17728. on Windows and on systems with small memory footprint.
  17729. </li><br>
  17730. <a name="plotmode"></a>
  17731. <li>plotmode<br>
  17732. Specifies how to generate the plots:
  17733. <ul>
  17734. <li>SVG<br>
  17735. The plots are created with the <a href="#SVG">SVG</a> module.
  17736. This is the default.</li>
  17737. <li>gnuplot-scroll<br>
  17738. The plots are created with the gnuplot program. The gnuplot
  17739. output terminal PNG is assumed. Scrolling to historical values
  17740. is also possible, just like with SVG.</li>
  17741. <li>gnuplot-scroll-svg<br>
  17742. Like gnuplot-scroll, but the output terminal SVG is assumed.</li>
  17743. </ul>
  17744. </li><br>
  17745. <a name="plotsize"></a>
  17746. <li>plotsize<br>
  17747. the default size of the plot, in pixels, separated by comma:
  17748. width,height. You can set individual sizes by setting the plotsize of
  17749. the SVG. Default is 800,160 for desktop, and 480,160 for
  17750. smallscreen.
  17751. </li><br>
  17752. <a name="plotWeekStartDay"></a>
  17753. <li>plotWeekStartDay<br>
  17754. Start the week-zoom of the SVG plots with this day.
  17755. 0 is Sunday, 1 is Monday, etc.<br>
  17756. </li><br>
  17757. <a name="redirectCmds"></a>
  17758. <li>redirectCmds<br>
  17759. Clear the browser URL window after issuing the command by redirecting
  17760. the browser, as a reload for the same site might have unintended
  17761. side-effects. Default is 1 (enabled). Disable it by setting this
  17762. attribute to 0 if you want to study the command syntax, in order to
  17763. communicate with FHEMWEB.
  17764. </li>
  17765. <br>
  17766. <a name="refresh"></a>
  17767. <li>refresh<br>
  17768. If set, a http-equiv="refresh" entry will be genererated with the given
  17769. argument (i.e. the browser will reload the page after the given
  17770. seconds).
  17771. </li><br>
  17772. <a name="reverseLogs"></a>
  17773. <li>reverseLogs<br>
  17774. Display the lines from the logfile in a reversed order, newest on the
  17775. top, so that you dont have to scroll down to look at the latest entries.
  17776. Note: enabling this attribute will prevent FHEMWEB from streaming
  17777. logfiles, resulting in a considerably increased memory consumption
  17778. (about 6 times the size of the file on the disk).
  17779. </li>
  17780. <br>
  17781. <a name="roomIcons"></a>
  17782. <li>roomIcons<br>
  17783. Space separated list of room:icon pairs, to override the default
  17784. behaviour of showing an icon, if there is one with the name of
  17785. "icoRoomName". This is the correct way to remove the icon for the room
  17786. Everything, or to set one for rooms with / in the name (e.g.
  17787. Anlagen/EDV). The first part is treated as regexp, so space is
  17788. represented by a dot. Example:<br>
  17789. attr WEB roomIcons Anlagen.EDV:icoEverything
  17790. </li>
  17791. <br>
  17792. <a name="smallscreenCommands"></a>
  17793. <li>smallscreenCommands<br>
  17794. If set to 1, commands, slider and dropdown menues will appear in
  17795. smallscreen landscape mode.
  17796. </li><br>
  17797. <a name="sortby"></a>
  17798. <li>sortby<br>
  17799. Take the value of this attribute when sorting the devices in the room
  17800. overview instead of the alias, or if that is missing the devicename
  17801. itself. If the sortby value is enclosed in {} than it is evaluated as a
  17802. perl expression. $NAME is set to the device name.
  17803. </li>
  17804. <br>
  17805. <a name="showUsedFiles"></a>
  17806. <li>showUsedFiles<br>
  17807. In the Edit files section, show only the used files.
  17808. Note: currently this is only working for the "Gplot files" section.
  17809. </li>
  17810. <br>
  17811. <a name="sortRooms"></a>
  17812. <li>sortRooms<br>
  17813. Space separated list of rooms to override the default sort order of the
  17814. room links. As the rooms in this attribute are actually regexps, space
  17815. in the roomname has to be specified as dot (.).
  17816. Example:<br>
  17817. attr WEB sortRooms DG OG EG Keller
  17818. </li>
  17819. <br>
  17820. <li>sslVersion<br>
  17821. See the global attribute sslVersion.
  17822. </li><br>
  17823. <a name="stylesheetPrefix"></a>
  17824. <li>stylesheetPrefix<br>
  17825. prefix for the files style.css, svg_style.css and svg_defs.svg. If the
  17826. file with the prefix is missing, the default file (without prefix) will
  17827. be used. These files have to be placed into the FHEM directory, and can
  17828. be selected directly from the "Select style" FHEMWEB menu entry. Example:
  17829. <ul>
  17830. attr WEB stylesheetPrefix dark<br>
  17831. <br>
  17832. Referenced files:<br>
  17833. <ul>
  17834. darksvg_defs.svg<br>
  17835. darksvg_style.css<br>
  17836. darkstyle.css<br>
  17837. </ul>
  17838. <br>
  17839. </ul>
  17840. <b>Note:</b>if the argument contains the string smallscreen or touchpad,
  17841. then FHEMWEB will optimize the layout/access for small screen size (i.e.
  17842. smartphones) or touchpad devices (i.e. tablets)<br>
  17843. The default configuration installs 3 FHEMWEB instances: port 8083 for
  17844. desktop browsers, port 8084 for smallscreen, and 8085 for touchpad.<br>
  17845. If touchpad or smallscreen is specified, then WebApp support is
  17846. activated: After viewing the site on the iPhone or iPad in Safari, you
  17847. can add a link to the home-screen to get full-screen support. Links are
  17848. rendered differently in this mode to avoid switching back to the "normal"
  17849. browser.
  17850. </li>
  17851. <br>
  17852. <a name="SVGcache"></a>
  17853. <li>SVGcache<br>
  17854. if set, cache plots which won't change any more (the end-date is prior
  17855. to the current timestamp). The files are written to the www/SVGcache
  17856. directory. Default is off.<br>
  17857. See also the clearSvgCache command for clearing the cache.
  17858. </li><br>
  17859. <a name="title"></a>
  17860. <li>title<br>
  17861. Sets the title of the page. If enclosed in {} the content is evaluated.
  17862. </li><br>
  17863. <a name="viewport"></a>
  17864. <li>viewport<br>
  17865. Sets the &quot;viewport&quot; attribute in the HTML header. This can for
  17866. example be used to force the width of the page or disable zooming.<br>
  17867. Example: attr WEB viewport
  17868. width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no
  17869. </li><br>
  17870. <a name="webCmd"></a>
  17871. <li>webCmd<br>
  17872. Colon separated list of commands to be shown in the room overview for a
  17873. certain device. Has no effect on smallscreen devices, see the
  17874. devStateIcon command for an alternative.<br>
  17875. Example:
  17876. <ul>
  17877. attr lamp webCmd on:off:on-for-timer 10<br>
  17878. </ul>
  17879. <br>
  17880. The first specified command is looked up in the "set device ?" list
  17881. (see the <a href="#setList">setList</a> attribute for dummy devices).
  17882. If <b>there</b> it contains some known modifiers (colon, followed
  17883. by a comma separated list), then a different widget will be displayed.
  17884. See also the widgetOverride attribute below. Examples:
  17885. <ul>
  17886. define d1 dummy<br>
  17887. attr d1 webCmd state<br>
  17888. attr d1 readingList state<br>
  17889. attr d1 setList state:on,off<br><br>
  17890. define d2 dummy<br>
  17891. attr d2 webCmd state<br>
  17892. attr d2 readingList state<br>
  17893. attr d2 setList state:slider,0,1,10<br><br>
  17894. define d3 dummy<br>
  17895. attr d3 webCmd state<br>
  17896. attr d3 readingList state<br>
  17897. attr d3 setList state:time<br>
  17898. </ul>
  17899. If the command is state, then the value will be used as a command.<br>
  17900. Note: this is an attribute for the displayed device, not for the FHEMWEB
  17901. instance.
  17902. </li>
  17903. <br>
  17904. <a name="webCmdLabel"></a>
  17905. <li>webCmdLabel<br>
  17906. Colon separated list of labels, used to prefix each webCmd. The number
  17907. of labels must exactly match the number of webCmds. To implement
  17908. multiple rows, insert a return character after the text and before the
  17909. colon.</li></br>
  17910. <a name="webname"></a>
  17911. <li>webname<br>
  17912. Path after the http://hostname:port/ specification. Defaults to fhem,
  17913. i.e the default http address is http://localhost:8083/fhem
  17914. </li><br>
  17915. <a name="widgetOverride"></a>
  17916. <li>widgetOverride<br>
  17917. Space separated list of name:modifier pairs, to override the widget
  17918. for a set/get/attribute specified by the module author.
  17919. Following is the list of known modifiers:
  17920. <ul>
  17921. <!-- INSERT_DOC_FROM: www/pgm2/fhemweb.*.js -->
  17922. <li>noArg - show no input field.</li>
  17923. <li>time - show a JavaScript driven timepicker.<br>
  17924. Example: attr FS20dev widgetOverride on-till:time</li>
  17925. <li>textField - show an input field.<br>
  17926. Example: attr WEB widgetOverride room:textField</li>
  17927. <li>textFieldNL - show the input field and hide the label.</li>
  17928. <li>textField-long - show an input-field, but upon
  17929. clicking on the input field open a textArea (60x25).</li>
  17930. <li>textFieldNL-long - the behaviour is the same
  17931. as :textField-long, but no label is displayed.</li>
  17932. <li>slider,&lt;min&gt;,&lt;step&gt;,&lt;max&gt;[,1] - show
  17933. a JavaScript driven slider. The optional ,1 at the end
  17934. avoids the rounding of floating-point numbers.</li>
  17935. <li>multiple,&lt;val1&gt;,&lt;val2&gt;,..." - present a
  17936. multiple-value-selector with an additional textfield. The result is
  17937. comman separated.</li>
  17938. <li>multiple-strict,&lt;val1&gt;,&lt;val2&gt;,... - like :multiple, but
  17939. without the textfield.</li>
  17940. <li>selectnumbers,&lt;min&gt;,&lt;step&gt;,&lt;max&gt;,&lt;number of
  17941. digits after decimal point&gt;,lin|log10" - display a select widget
  17942. generated with values from min to max with step.<br>
  17943. lin generates a constantly increasing series. log10 generates an
  17944. exponentially increasing series to base 10, step is related to the
  17945. exponent, e.g. 0.0625.</li>
  17946. <li>select,&lt;val1&gt;,&lt;val2&gt;,... - show a dropdown with all values.
  17947. <b>NOTE</b>: this is also the fallback, if no modifier is found.</li>
  17948. <li>colorpicker,RGB - create an RGB colorpicker</li>
  17949. <li>colorpicker,HSV - create an HSV colorpicker to set an rgb value</li>
  17950. <li>colorpicker,HSVp - create an HSV popup colorpicker to set an rgb value</li>
  17951. <li>colorpicker,HSV,&lt;hue&gt;,&lt;min&gt;,&lt;step&gt;,&lt;max&gt;,&lt;sat&gt,&lt;min&gt;,&lt;step&gt;,&lt;max&gt;,&lt;bri&gt,&lt;min&gt;,&lt;step&gt;,&lt;max&gt;
  17952. - create an HSV colorpicker that uses &lt;hue&gt;, &lt;sat&gt; and &lt;bri&gt; as commands
  17953. to set the color. can also be used with HSVp to create a popup colorpicker<br>
  17954. if the device has no combined hsv reading it can be create with the following user reading:<code>attr <device> userReadings hsv {ReadingsVal($name,'hue','0').','.ReadingsVal($name,'sat','100').','.ReadingsVal($name,'bri','100')}</code></li>
  17955. <li>colorpicker,CT,&lt;min&gt;,&lt;step&gt;,&lt;max&gt; - create a color temperature colorpicker</li>
  17956. <li>colorpicker,BRI,&lt;min&gt;,&lt;step&gt;,&lt;max&gt; - create a brightness colorpicker</li>
  17957. <li>colorpicker,HUE,&lt;min&gt;,&lt;step&gt;,&lt;max&gt; - create a hue colorpicker</li>
  17958. please see the fhem wiki <a href='https://wiki.fhem.de/wiki/Color#Colorpicker'>Color</a> section for example screenshots.<br><br>
  17959. <br>
  17960. <u>To the icon.* widgets listed below applies:</u><br>
  17961. &lt;color&gt; is specified by a color name or a color number without leading <b>#</b> e.g. FFA500 or orange. Depending on the context <b>@</b> has to be escaped <b>\@</b>.<br>
  17962. &lt;icon&gt; is the icon name.<br>
  17963. [class&lt;classname&gt;@] as prefix in front of the second parameter, assigns a css-class to the icons.<br>
  17964. Examples for import with raw definition, will be found in <a href="https://wiki.fhem.de/wiki/FHEMWEB/Widgets">FHEMWEB-Widgets</a>
  17965. <li>iconRadio,[class&lt;classname&gt;@][use4icon@]&lt;select color&gt;,&lt;value&gt;,&lt;icon&gt;[@&lt;color&gt;][,&lt;value&gt;,&lt;icon&gt;[@&lt;color&gt;]]...
  17966. - displays Icons as radio button and returns value if pushed.<br>
  17967. &lt;value&gt; return or compare value. If a numerical sequence of &lt;value&gt; is specified, the current value will match the next higher &lt;value&gt. It is allowed to place non numerical &lt;value&gt in front of or after the sequence but not in between. The numerical sequence has to be ascendind or descending.<br>
  17968. <u>Example:</u> <code>iconRadio,808080,<b>closed</b>,control_arrow_down,<b>10</b>,fts_shutter_10,<b>20</b>,fts_shutter_20,<b>30</b>,fts_shutter_30,<b>open</b>,control_arrow_up</code><br>
  17969. &lt;select color&gt; the background color of the selected icon or the icon color if the prefix <i>use4icon@</i> is used.<br>
  17970. The widget contains a CSS-class "iconRadio_widget".<br>
  17971. </li>
  17972. <li>
  17973. iconButtons,[class&lt;classname&gt;@][use4icon@]&lt;select color&gt;,&lt;value&gt;,&lt;icon&gt;[@&lt;color&gt;][,&lt;value&gt;,&lt;icon&gt;[@&lt;color&gt;]]...
  17974. - displays Icons as button bar and returns comma separated values of pushed buttons.<br>
  17975. &lt;value&gt; return value.<br>
  17976. &lt;select color&gt; the background color of the selected icon or the icon color if the prefix <i>use4icon@</i> is used.<br>
  17977. The widget contains a CSS-class "iconButtons_widget".<br>
  17978. </li>
  17979. <li>iconLabel[,[class&lt;classname&gt;@]&lt;reference value&gt;,[&lt;icon&gt;][@&lt;color&gt;]][,&lt;reference value&gt;,[&lt;icon&gt;][@&lt;color&gt;]]...
  17980. - displays states by colorized values, labels and icons, if the current
  17981. value fits to the reference value. A state is described by a parameter peer.
  17982. The number of peers is arbitrarily. A peer consists of a &lt;reference
  17983. value&gt; and an optional display value with an optional color value
  17984. &lt;reference value&gt; is a number or a regular expression.<br>
  17985. If &lt;icon&gt; is no icon name, the text will be displayed, otherwise
  17986. the icon. If nothing is specified, the current value will be displayed.<br>
  17987. </li>
  17988. <li>iconSwitch,[class&lt;classname&gt;@]&lt;reference value&gt;,[&lt;icon&gt;][@&lt;color&gt;][,&lt;reference value&gt;,[&lt;icon&gt;][@&lt;color&gt;]]...
  17989. - switches cyclic after actuation to the diplayed state and the actual
  17990. value is set to the reference Value. A state is described by a
  17991. parameter peer. The number of peers is arbitrarily. A peer consists
  17992. of a &lt;reference value&gt; and an optional display value with an
  17993. optional color value [&lt;icon&gt;][@&lt;color&gt;].<br>
  17994. &lt;reference value&gt; is a number or a string.<br>
  17995. If &lt;icon&gt; is no icon name, the text will be displayed, otherwise
  17996. the icon. If nothing is specified, the reference value will be displayed.<br>
  17997. </li>
  17998. <br>
  17999. <li>knob,min:1,max:100,... - shows the jQuery knob widget. The parameters
  18000. are a comma separated list of key:value pairs, where key does not have to
  18001. contain the "data-" prefix. For details see the jQuery-knob
  18002. definition.<br> Example:
  18003. attr dimmer widgetOverride dim:knob,min:1,max:100,step:1,linecap:round
  18004. </li>
  18005. <li>:sortable,val1,val2,... - create a new list from the elements of the
  18006. given list, can add new elements by entering a text, or delete some from
  18007. the list. This new list can be sorted via drag &amp; drop. The result is
  18008. a comma separated list. </li>
  18009. <li>:sortable-strict,val1,val2,... - it behaves like :sortable, without the
  18010. possibility to enter text.</li>
  18011. <li>:sortable-given,val1,val2,... - the specified list can be sorted via drag
  18012. &amp; drop, no elements can be added or deleted. </li>
  18013. <li>uzsuToggle,state1,state2 - dispay a toggle button with two possible
  18014. states. the first is the active state.</li>
  18015. <li>uzsuSelect,val1,val2,... - display a button bar with a button per value
  18016. from which multiple values can be selected. the result is comma
  18017. separated.</li>
  18018. <li>uzsuSelectRadio,val1,val2,... - display a button bar with a button per
  18019. value from which only one value can be selected.</li>
  18020. <li>uzsuDropDown,val1,val2,... - display a dropdown with all values.</li>
  18021. <li>uzsuTimerEntry[,modifier2] - combine uzsuSelect, uzsuDropDown and
  18022. uzsuToggle into a single line display to select a timer entry. an
  18023. optional modifier can be given to select the switching value. see
  18024. examples below. the result is a comma separated list of days followed by
  18025. a time, an enabled indicator and the switching value all separated by a|.
  18026. eg: Mo,Di,Sa,So|00:00|enabled|19.5</li>
  18027. <li>uzsu[,modifier2] - combine multiple uzsuTimerEntry widets to allow the
  18028. setting of multiple switching times an optional modifier can be given to
  18029. select the switching value. see examples below. the result is a space
  18030. separeted list of uzsuTimerEntry results. Examples:
  18031. <ul>
  18032. attr myToggle widgetOverride state:uzsuToggle,123,xyz<br>
  18033. attr mySelect widgetOverride state:uzsuSelect,abc,123,456,xyz<br>
  18034. attr myTemp widgetOverride state:uzsuDropDown,18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23<br>
  18035. attr myTimerEntry widgetOverride state:uzsuTimerEntry<br>
  18036. attr myTimer widgetOverride state:uzsu<br>
  18037. <br>
  18038. the following gives some examples of for the modifier2 parameter of uzsuTimerEntry and uzsu to
  18039. combine the setting of a timer with another widget to select the switching value :
  18040. <pre>
  18041. ... widgetOverride state:uzsu,slider,0,5,100 -> a slider
  18042. ... widgetOverride state:uzsu,uzsuToggle,off,on -> a on/off button
  18043. ... widgetOverride state:uzsu,uzsuDropDown,18,19,20,21,22,23 -> a dropDownMenue
  18044. ... widgetOverride state:uzsu,knob,min:18,max:24,step:0.5,linecap:round,fgColor:red -> a knob widget
  18045. ... widgetOverride state:uzsu,colorpicker -> a colorpicker
  18046. ... widgetOverride state:uzsu,colorpicker,CT,2700,50,5000 -> a colortemperature selector
  18047. </pre>
  18048. </ul>
  18049. </li>
  18050. </ul>
  18051. </li>
  18052. <br>
  18053. </ul>
  18054. </ul>
  18055. <a name="FHT"></a>
  18056. <h3>FHT</h3>
  18057. <ul>
  18058. Fhem can receive FHT radio (868.35 MHz) messages either through an <a
  18059. href="#FHZ">FHZ</a> or an <a href="#CUL">CUL</a> device, so this must be
  18060. defined first.<br><br>
  18061. <a name="FHTdefine"></a>
  18062. <b>Define</b>
  18063. <ul>
  18064. <code>define &lt;name&gt; FHT &lt;fhtaddress&gt;</code>
  18065. <br><br>
  18066. <code>&lt;fhtaddress&gt;</code> is a four digit hex number,
  18067. corresponding to the address of the FHT80b device.
  18068. <br>
  18069. Examples:
  18070. <ul>
  18071. <code>define wz FHT 3232</code><br>
  18072. </ul>
  18073. <br>
  18074. See the FHT section in <a href="#set">set</a> for more.
  18075. </ul>
  18076. <br>
  18077. <a name="FHTset"></a>
  18078. <b>Set </b>
  18079. <ul>
  18080. <code>set &lt;name&gt; &lt;valuetype&gt; &lt;value&gt;</code>
  18081. <br><br>
  18082. where <code>value</code> is one of:<br>
  18083. <ul><code>
  18084. desired-temp<br>
  18085. day-temp night-temp<br>
  18086. report1 report2<br>
  18087. refreshvalues<br>
  18088. mode<br>
  18089. holiday1 holiday2 # see mode holiday_short or holiday<br>
  18090. manu-temp # No clue what it does.<br>
  18091. year month day hour minute<br>
  18092. time date<br>
  18093. lowtemp-offset # Alarm-Temp.-Differenz<br>
  18094. windowopen-temp<br>
  18095. mon-from1 mon-to1 mon-from2 mon-to2<br>
  18096. tue-from1 tue-to1 tue-from2 tue-to2<br>
  18097. wed-from1 wed-to1 wed-from2 wed-to2<br>
  18098. thu-from1 thu-to1 thu-from2 thu-to2<br>
  18099. fri-from1 fri-to1 fri-from2 fri-to2<br>
  18100. sat-from1 sat-to1 sat-from2 sat-to2<br>
  18101. sun-from1 sun-to1 sun-from2 sun-to2<br>
  18102. </code></ul>
  18103. Examples:
  18104. <ul>
  18105. <code>set wz desired-temp 22.5</code><br>
  18106. <code>set fl desired-temp 20.5 day-temp 19.0 night-temp 16.0</code><br>
  18107. </ul>
  18108. <br>
  18109. Notes:
  18110. <ul>
  18111. <li>Following events are reported (more or less regularly) by each FHT
  18112. device: <code>measured-temp actuator actuator1...actuator8
  18113. warnings</code><br>
  18114. You can use these strings for <a href="#notify">notify</a> or
  18115. <a href="#FileLog">FileLog</a> definitions.
  18116. <ul>
  18117. <li>warnings can contain following strings:
  18118. none, Battery low,Temperature too low, Window open,
  18119. Fault on window sensor
  18120. </li>
  18121. <li>actuator (without a suffix) stands for all actuators.</li>
  18122. <li>actuator or actuator1..8 can take following values:
  18123. <ul>
  18124. <li>&lt;value&gt;%<br>
  18125. This is the normal case, the actuator is instructed to
  18126. open to this value.
  18127. </li>
  18128. <li>offset &lt;value&gt;%<br>
  18129. The actuator is running with this offset.
  18130. </li>
  18131. <li>lime-protection<br>
  18132. The actuator was instructed to execute the lime-protection
  18133. procedure.
  18134. </li>
  18135. <li>synctime<br>
  18136. If you select Sond/Sync on the FHT80B, you'll see a count
  18137. down.
  18138. </li>
  18139. <li>test<br>
  18140. The actuator was instructed by the FHT80b to emit a beep.
  18141. </li>
  18142. <li>pair<br>
  18143. The the FHT80b sent a "you-belong-to-me" to this actuator.
  18144. </li>
  18145. </ul></li>
  18146. </ul></li>
  18147. <br>
  18148. <li>The FHT is very economical (or lazy), it accepts one message from the
  18149. FHZ1x00 every 115+x seconds, where x depends on the fhtaddress. Don't
  18150. be surprised if your command is only accepted 10 minutes later by the
  18151. device. FHT commands are buffered in the FHZ1x00/CUL till they are
  18152. sent to the FHT, see the related <code>fhtbuf</code> entry in the
  18153. <code><a href="#get">get</a></code> section.<br> You can send up to 8
  18154. commands in one message at once to the FHT if you specify them all as
  18155. arguments to the same set command, see the example above.
  18156. </li>
  18157. <br>
  18158. <li>time sets hour and minute to local time</li><br>
  18159. <li>date sets year, month and date to local time</li><br>
  18160. <li>refreshvalues is an alias for report1 255 report2 255</li><br>
  18161. <li>All <code>*-temp</code> values need a temperature
  18162. as argument, which will be rounded to 0.5 Celsius.<br>
  18163. Temperature values must between 5.5 and 30.5 Celsius. Value 5.5 sets
  18164. the actuator to OFF, value 30.5 set the actuator to ON</li><br>
  18165. <li><code>mode</code> is one of <code>auto, manual, holiday or
  18166. holiday_short.</code><br>
  18167. If the mode is either holiday or holiday_short, then the mode
  18168. switches back to auto at the specified day and time independent of
  18169. the current mode of the device and the desired temperature will be
  18170. set to the night or day temperature according to the defined weekly
  18171. schedule stored within the device.
  18172. In case of mode holiday
  18173. <ul>
  18174. <li>holiday1 sets the end-day of the holiday (at 00:00)</li>
  18175. <li>holiday2 sets the end-month of the holiday</li>
  18176. </ul>
  18177. For holiday_short (party mode)
  18178. <ul>
  18179. <li>holiday1 sets the absolute hour to switch back from this mode (in
  18180. 10-minute steps, max 144)</li>
  18181. <li>holiday2 sets the day of month to switch back from this mode (can only be today or tomorrow, since holiday1 accepts only 24 hours).</li>
  18182. </ul>
  18183. Example:
  18184. <ul>
  18185. <li>current date is 29 Jan, time is 18:05</li>
  18186. <li>you want to switch to party mode until tomorrow 1:00</li>
  18187. <li>set holiday1 to 6 (6 x 10min = 1hour) and holiday2 to 30</li>
  18188. </ul>
  18189. The temperature for the holiday period is set by the
  18190. desired-temperature parameter.<br>
  18191. Note that you cannot set holiday mode for days earlier than the day
  18192. after tomorrow, for this you must use holiday_short.<br>
  18193. The parameters holiday1 and holiday2 must be set in one command
  18194. together with mode.<br>
  18195. Example:
  18196. <ul>
  18197. set FHT1 mode holiday holiday1 24 holiday2 12 desired-temp 14
  18198. </ul>
  18199. Please note: If the event time specified by the holiday parameters
  18200. has already past, then the device will immediately switch back to
  18201. auto mode including the selection of the corresponding day or night
  18202. temperature. This is valid at least for FHT80b model 2 and 3, Lifetec
  18203. MD12050. For those devices setting holiday_short with a holiday1
  18204. value of 0 and without the parameter holiday2 e.g.
  18205. <ul>
  18206. set FHT1 mode holiday_short holiday1 0
  18207. </ul>
  18208. will immediately switch back the device to mode auto including the
  18209. adjustment of the desired- temp parameter.
  18210. Some elderly FHT models, however, only switch the mode to auto, if
  18211. the event is within the past, but don't adjust the desired
  18212. temperature. In this case specifying appropriate values for the
  18213. parameters holiday1 and holiday2 thus defining an event in the very
  18214. near future (e.g. 10 minutes) could be the solution to force a switch
  18215. back to the correct automatic mode.
  18216. </li>
  18217. <br>
  18218. <li>The <code>*-from1/*-from2/*-to1/*-to2</code> valuetypes need a time
  18219. spec as argument in the HH:MM format. They define the periods, where
  18220. the day-temp is valid. The minute (MM) will be rounded to 10, and
  18221. 24:00 means off.</li><br>
  18222. <li>To synchronize the FHT time and to "wake" muted FHTs it is adviseable
  18223. to schedule following command:<br>
  18224. <code>define fht_sync at +*3:30 set TYPE=FHT time</code>
  18225. </li>
  18226. <br>
  18227. <li><code>report1</code> with parameter 255 requests all settings for
  18228. monday till sunday to be sent. The argument is a bitfield, to request
  18229. unique values add up the following:
  18230. <ul>
  18231. <li> 1: monday</li>
  18232. <li> 2: tuesday</li>
  18233. <li> 4: thursday</li>
  18234. <li> 8: wednesday</li>
  18235. <li>16: friday</li>
  18236. <li>32: saturday</li>
  18237. <li>64: sunday</li>
  18238. </ul>
  18239. measured-temp and actuator is sent along if it is considered
  18240. appropriate
  18241. by the FHT.
  18242. <br><br>
  18243. <b>Note:</b> This command generates a lot of RF traffic, which can
  18244. lead to further problems, especially if the reception is not clear.
  18245. </li><br>
  18246. <li><code>report2</code> with parameter 255 requests the following
  18247. settings to be reported: day-temp night-temp windowopen-temp
  18248. lowtemp-offset desired-temp measured-temp mode warnings.
  18249. The argument is (more or less) a bitfield, to request unique values
  18250. add up the following:
  18251. <ul>
  18252. <li> 1: warnings</li>
  18253. <li> 2: mode</li>
  18254. <li> 4: day-temp, night-temp, windowopen-temp</li>
  18255. <li> 8: desired-temp</li>
  18256. <li>64: lowtemp-offset</li>
  18257. </ul>
  18258. measured-temp and actuator is sent along if it is considered
  18259. appropriate by the FHT.</li>
  18260. <br>
  18261. <li><code>lowtemp-offset</code> needs a temperature as argument, valid
  18262. values must be between 1.0 and 5.0 Celsius.<br> It will trigger a
  18263. warning if <code>desired-temp - measured-temp &gt;
  18264. lowtemp-offset</code> in a room for at least 1.5 hours after the last
  18265. desired-temp change.</li>
  18266. <br>
  18267. <li>FHEM optionally has an internal software buffer for FHT devices.
  18268. This buffer should prevent transmission errors. If there is no
  18269. confirmation for a given period, FHEM resends the command. You can
  18270. see the queued commands with <a href="#list">list</a>
  18271. &lt;fht-device&gt;.
  18272. See the <a href="#fhtsoftbuffer">fhtsoftbuffer</a>,
  18273. <a href="#retrycount">retrycount</a> and
  18274. <a href="#minfhtbuffer">minfhtbuffer</a> attributes for details.
  18275. </li>
  18276. <br>
  18277. <li>If a buffer is still in the softbuffer, it will be sent in the
  18278. following order:<br> <code>desired-temp,mode,report1,report2,
  18279. holiday1,holiday2,day-temp,night-temp, [all other commands]</code>
  18280. </li>
  18281. <br>
  18282. </ul>
  18283. </ul>
  18284. <br>
  18285. <b>Get</b> <ul>N/A</ul><br>
  18286. <a name="FHTattr"></a>
  18287. <b>Attributes</b>
  18288. <ul>
  18289. <li><a href="#attrdummy">dummy</a><br>
  18290. <b>Note:</b>It makes sense to define an FHT device even for an FHT8b,
  18291. else you will receive "unknown FHT device, please define one" message
  18292. for each FHT8b as the CUL is reporting the 8b valve messages. But you
  18293. should set the dummy attribute for these devices, else the internal FHT
  18294. buffer of the CUL will be filled with data for the 8b's which is never
  18295. consumed. If the buffer is full, you'll get "EOB" messages from the CUL,
  18296. and you cannot transmit any data to the 80b's</li><br>
  18297. <a name="retrycount"></a>
  18298. <li>retrycount<br>
  18299. If the <a href="#fhtsoftbuffer">fhtsoftbuffer</a> attribute is set, then
  18300. resend commands <code>retrycount</code> times if after 240 seconds
  18301. no confirmation message is received from the corresponding FHT
  18302. device.<br>
  18303. Default is 1.</li><br>
  18304. <a name="minfhtbuffer"></a>
  18305. <li>minfhtbuffer<br>
  18306. FHEM won't send commands to the FHZ if its fhtbuffer is below
  18307. this value, default is 0. If this value is low, then the ordering of
  18308. fht commands (see the note in the FHT section of <a href="#set">set</a>)
  18309. has little effect, as only commands in the softbuffer can be
  18310. prioritized. The maximum value should be 7 below the hardware maximum
  18311. (see fhtbuf).
  18312. </li><br>
  18313. <a name="lazy"></a>
  18314. <li>lazy<br>
  18315. If the lazy attribute is set, FHEM won't send commands to the FHT if
  18316. the current reading and the value to be set are already identical. This
  18317. may help avoiding conflicts with the max-1%-time-on-air rule in large
  18318. installations. Not set per default.
  18319. </li><br>
  18320. <a name="tmpcorr"></a>
  18321. <li>tmpcorr<br>
  18322. Correct the temperature reported by the FHT by the value specified.
  18323. Note: only the measured-temp value reported by FHEM (used for logging)
  18324. will be modified.
  18325. </li><br>
  18326. <li><a href="#ignore">ignore</a></li>
  18327. <li><a href="#do_not_notify">do_not_notify</a></li>
  18328. <li><a href="#model">model</a> (fht80b)</li>
  18329. <li><a href="#showtime">showtime</a></li>
  18330. <li><a href="#IODev">IODev</a></li>
  18331. <li><a href="#eventMap">eventMap</a></li>
  18332. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  18333. </ul>
  18334. <br>
  18335. <a name="FHTevents"></a>
  18336. <b>Generated events:</b>
  18337. <ul>
  18338. <li>actuator</li>
  18339. <li>actuator1 actuator2 actuator3 actuator4<br>
  18340. actuator5 actuator6 actuator7 actuator8<br>
  18341. (sent if you configured an offset for the associated valve)</li>
  18342. <li>mon-from1 mon-to1 mon-from2 mon-to2</li>
  18343. <li>tue-from1 tue-to1 tue-from2 tue-to2</li>
  18344. <li>wed-from1 wed-to1 wed-from2 wed-to2</li>
  18345. <li>thu-from1 thu-to1 thu-from2 thu-to2</li>
  18346. <li>fri-from1 fri-to1 fri-from2 fri-to2</li>
  18347. <li>sat-from1 sat-to1 sat-from2 sat-to2</li>
  18348. <li>sun-from1 sun-to1 sun-from2 sun-to2</li>
  18349. <li>mode</li>
  18350. <li>holiday1 holiday2</li>
  18351. <li>desired-temp</li>
  18352. <li>measured-temp measured-low measured-high</li>
  18353. <li>warnings</li>
  18354. <li>manu-temp</li>
  18355. <li>year month day hour minute</li>
  18356. <li>day-temp night-temp lowtemp-offset windowopen-temp</li>
  18357. <li>ack can-xmit can-rcv ack2 start-xmit end-xmit
  18358. (only if the CUL is configured to transmit FHT protocol data)</li>
  18359. </ul>
  18360. <br>
  18361. </ul>
  18362. <a name="FHT8V"></a>
  18363. <h3>FHT8V</h3>
  18364. <ul>
  18365. Fhem can directly control FHT8V type valves via a <a href="#CUL">CUL</a>
  18366. device without an intermediate FHT. This paragraph documents one of the
  18367. building blocks, the other is the <a href="#PID">PID</a> device.
  18368. <br>
  18369. <br>
  18370. <a name="FHT8Vdefine"></a>
  18371. <b>Define</b>
  18372. <ul>
  18373. <code>define &lt;name&gt; FHT8V &lt;housecode&gt; [IODev|FHTID]</code>
  18374. <br><br>
  18375. <code>&lt;housecode&gt;</code> is a four digit hex number,
  18376. and must have the following relation to the housecode of the corresponding CUL
  18377. device:
  18378. <ul>given the CUL housecode as AABB, then this housecode must be
  18379. of the form CCBB, where CC is greater or equal to AA, but less then AA+8.
  18380. </ul>
  18381. This form is chosen so that the CUL can update all FHT8V valve states
  18382. within 2 minutes.
  18383. <br>
  18384. <br>
  18385. <code>&lt;IODev&gt;</code> must be specified if the last defined CUL device
  18386. is not the one to use. Usually this is done voa the <a
  18387. href="#IODev">IODev</a> attribute, but as the address checked is performed
  18388. at the definition, we must use an exception here.<br>
  18389. As an alternative you can specify the FHTID of the assigned IODev device
  18390. (instead of the IODev itself), this method is needed if you are using FHT8V
  18391. through FHEM2FHEM.
  18392. <br>
  18393. Examples:
  18394. <ul>
  18395. <code>define wz FHT8V 3232</code><br>
  18396. </ul>
  18397. </ul>
  18398. <br>
  18399. <a name="FHT8Vset"></a>
  18400. <b>Set </b>
  18401. <ul>
  18402. <li>set &lt;name&gt; valve &lt;value;&gt;<br>
  18403. Set the valve to the given value (in percent, from 0 to 100).
  18404. </li>
  18405. <li>set &lt;name&gt; pair<br>
  18406. Pair the valve with the CUL.
  18407. </li>
  18408. <li>set &lt;name&gt; decalc<br>
  18409. Start a decalcifying cycle on the given valve
  18410. </li>
  18411. </ul>
  18412. <br>
  18413. <a name="FHT8Vget"></a>
  18414. <b>Get </b>
  18415. <ul>
  18416. <li>get &lt;name&gt; valve<br>
  18417. Read back the valve position from the CUL FHT buffer, and convert it to percent (from 0 to 100).
  18418. </li>
  18419. </ul>
  18420. <br>
  18421. <a name="FHT8Vattr"></a>
  18422. <b>Attributes</b>
  18423. <ul>
  18424. <li><a href="#IODev">IODev</a></li>
  18425. <li><a href="#dummy">dummy</a></li>
  18426. <li><a href="#ignore">ignore</a></li>
  18427. <li><a href="#eventMap">eventMap</a></li><br>
  18428. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  18429. </ul>
  18430. <br>
  18431. </ul>
  18432. <a name="FHZ"></a>
  18433. <h3>FHZ</h3>
  18434. <ul>
  18435. Note: this module requires the Device::SerialPort or Win32::SerialPort module
  18436. if the devices is connected via USB or a serial port.
  18437. <br><br>
  18438. <a name="FHZdefine"></a>
  18439. <b>Define</b>
  18440. <ul>
  18441. <code>define &lt;name&gt; FHZ &lt;serial-device&gt;</code> <br>
  18442. <br>
  18443. Specifies the serial port to communicate with the FHZ1000PC or FHZ1300PC.
  18444. The name(s) of the serial-device(s) depends on your distribution. <br>
  18445. If the serial-device is called none, then no device will be opened, so you
  18446. can experiment without hardware attached.<br>
  18447. The program can service multiple devices, FS20 and FHT device commands will
  18448. be sent out through the last FHZ device defined before the definition of
  18449. the FS20/FHT device. To change the association, use the IODev attribute.<br>
  18450. <br>
  18451. For GNU/Linux you may want to read our <a href="linux.html">hints for
  18452. GNU/Linux</a> about <a href="linux.html#multipledevices">multiple USB
  18453. devices</a>.<br>
  18454. <b>Note:</b>The firmware of the FHZ1x00 will drop commands if the airtime
  18455. for the last hour would exceed 1% (which corresponds roughly to 163
  18456. commands). For this purpose there is a command counter for the last hour
  18457. (see list FHZDEVICE), which triggers with "TRANSMIT LIMIT EXCEEDED" if
  18458. there were more than 163 commands in the last hour.<br><br>
  18459. If you experience problems (for verbose 4 you get a lot of "Bad CRC
  18460. message" in the log), then try to define your device as <br> <code>define
  18461. &lt;name&gt; FHZ &lt;serial-device&gt; strangetty</code><br>
  18462. </ul>
  18463. <br>
  18464. <a name="FHZset"></a>
  18465. <b>Set </b>
  18466. <ul>
  18467. <code>set FHZ &lt;variable&gt; [&lt;value&gt;]</code>
  18468. <br><br>
  18469. where <code>value</code> is one of:<br>
  18470. <ul>
  18471. FHTcode<br>
  18472. initFS20<br>
  18473. initHMS<br>
  18474. stopHMS<br>
  18475. initfull<br>
  18476. raw<br>
  18477. open<br>
  18478. reopen<br>
  18479. close<br>
  18480. time<br>
  18481. </ul>
  18482. Notes:
  18483. <ul>
  18484. <li>raw is used to send out "raw" FS20/FHT messages (&quot;setters&quot; only - no query messages!).
  18485. See message byte streams in FHEM/00_FHZ.pm and the doc directory for some examples.</li>
  18486. <li>In order to set the time of your FHT's, schedule this command every
  18487. minute:<br>
  18488. <code>define fhz_timer at +*00:01:00 set FHZ time</code><br>
  18489. See the <a href="#verbose">verbose</a> to prevent logging of
  18490. this command.
  18491. </li>
  18492. <li>FHTcode is a two digit hex number (from 00 to 63?) and sets the
  18493. central FHT code, which is used by the FHT devices. After changing
  18494. it, you <b>must</b> reprogram each FHT80b with: PROG (until Sond
  18495. appears), then select CEnt, Prog, Select nA.</li>
  18496. <li>If the FHT ceases to work for FHT devices whereas other devices
  18497. (e.g. HMS, KS300) continue to work, a<ul>
  18498. <code>set FHZ initfull</code></ul> command could help. Try<ul>
  18499. <code>set FHZ reopen</code></ul> if the FHZ
  18500. ceases to work completely. If all else fails, shutdown fhem, unplug
  18501. and replug the FHZ device. Problems with FHZ may also be related to
  18502. long USB cables or insufficient power on the USB - use a powered hub
  18503. to improve this particular part of such issues.
  18504. See <a href="http://fhem.de/USB.html">our USB page</a>
  18505. for detailed USB / electromag. interference troubleshooting.</li>
  18506. <li><code>initfull</code> issues the initialization sequence for the FHZ
  18507. device:<br>
  18508. <ul><code>
  18509. get FHZ init2<br>
  18510. get FHZ serial<br>
  18511. set FHZ initHMS<br>
  18512. set FHZ initFS20<br>
  18513. set FHZ time<br>
  18514. set FHZ raw 04 01010100010000<br>
  18515. </code></ul></li>
  18516. <li><code>reopen</code> closes and reopens the serial device port. This
  18517. implicitly initializes the FHZ and issues the
  18518. <code>initfull</code> command sequence.</li>
  18519. <li><code>stopHMS</code> probably is the inverse of <code>initHMS</code>
  18520. (I don't have authoritative info on what exactly it does).</li>
  18521. <li><code>close</code> closes and frees the serial device port until you open
  18522. it again with <code>open</code>, e.g. useful if you need to temporarily
  18523. unload the ftdi_sio kernel module to use the <a href="http://www.ftdichip.com/Support/Documents/AppNotes/AN232B-01_BitBang.pdf" target="_blank">bit-bang mode</a>.</li>
  18524. </ul>
  18525. </ul>
  18526. <br>
  18527. <a name="FHZget"></a>
  18528. <b>Get</b>
  18529. <ul>
  18530. <code>get FHZ &lt;value&gt;</code>
  18531. <br><br>
  18532. where <code>value</code> is one of:<br>
  18533. <ul>
  18534. init1<br>
  18535. init2<br>
  18536. init3<br>
  18537. serial<br>
  18538. fhtbuf<br>
  18539. </ul>
  18540. Notes:
  18541. <ul>
  18542. <li>The mentioned codes are needed for initializing the FHZ1X00</li>
  18543. <li>The answer for a command is also displayed by <code>list FHZ</code>
  18544. </li>
  18545. <li>
  18546. The FHZ1x00PC has a message buffer for the FHT (see the FHT entry in
  18547. the <a href="#set">set</a> section). If the buffer is full, then newly
  18548. issued commands will be dropped, if the attribute <a
  18549. href="#fhtsoftbuffer">fhtsoftbuffer</a> is not set.
  18550. <code>fhtbuf</code> returns the free memory in this buffer (in hex),
  18551. an empty buffer in the FHZ1000 is 2c (42 bytes), in the FHZ1300 is 4a
  18552. (74 bytes). A message occupies 3 + 2x(number of FHT commands) bytes,
  18553. this is the second reason why sending multiple FHT commands with one
  18554. <a href="#set"> set</a> is a good idea. The first reason is, that
  18555. these FHT commands are sent at once to the FHT.
  18556. </li>
  18557. </ul>
  18558. </ul>
  18559. <br>
  18560. <a name="FHZattr"></a>
  18561. <b>Attributes</b>
  18562. <ul>
  18563. <a name="do_not_notify"></a>
  18564. <li>do_not_notify<br>
  18565. Disable FileLog/notify/inform notification for a device. This affects
  18566. the received signal, the set and trigger commands.</li><br>
  18567. <li><a href="#attrdummy">dummy</a></li><br>
  18568. <li><a href="#showtime">showtime</a></li><br>
  18569. <a name="loglevel"></a>
  18570. <li>loglevel<br>
  18571. <b>Note:</b>Deprecated! The module maintainer is encouraged to replace it
  18572. with verbose.<br><br>
  18573. Set the device loglevel to e.g. 6 if you do not wish messages from a
  18574. given device to appear in the global logfile (FHZ/FS20/FHT). E.g. to
  18575. set the FHT time, you should schedule "set FHZ time" every minute, but
  18576. this in turn makes your logfile unreadable. These messages will not be
  18577. generated if the FHZ attribute loglevel is set to 6.<br>
  18578. On the other hand, if you have to debug a given device, setting its
  18579. loglevel to a smaller value than the value of the global verbose attribute,
  18580. it will output its messages normally seen only with higher global verbose
  18581. levels.
  18582. </li> <br>
  18583. <li><a href="#model">model</a> (fhz1000,fhz1300)</li><br>
  18584. <a name="fhtsoftbuffer"></a>
  18585. <li>fhtsoftbuffer<br>
  18586. As the FHZ command buffer for FHT devices is limited (see fhtbuf),
  18587. and commands are only sent to the FHT device every 120 seconds,
  18588. the hardware buffer may overflow and FHT commands get lost.
  18589. Setting this attribute implements an "unlimited" software buffer.<br>
  18590. Default is disabled (i.e. not set or set to 0).</li><br>
  18591. </ul>
  18592. <br>
  18593. </ul>
  18594. <a name="FLOORPLAN"></a>
  18595. <h3>FLOORPLAN</h3>
  18596. <ul>
  18597. Implements an additional entry "Floorplans" to your fhem menu, leading to a userinterface without fhem-menu, rooms or devicelists.
  18598. Devices can be displayed at a defined coordinate on the screen, usually with a clickable icon allowing to switch
  18599. the device on or off by clicking on it. A background-picture can be used - use e.g. a floorplan of your house, or any picture.
  18600. Use floorplanstyle.css to adapt the representation.<br>
  18601. Step-by-step setup guides are available in
  18602. <a href="http://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/docs/fhem-floorplan-installation-guide.pdf?format=raw">english</a> and
  18603. <a href="http://www.fhemwiki.de/wiki/Floorplan_Installations-Leitfaden" target="_blank">german</a>. <br>
  18604. <br>
  18605. <a name="FLOORPLANdefine"></a>
  18606. <b>Define</b>
  18607. <ul>
  18608. <code>define &lt;name&gt; FLOORPLAN </code>
  18609. <br><br>
  18610. <b>Hint:</b> Store fp_&lt;name&gt;.png in your image folder (www/images/default , www/pgm2 or FHEM) to use it as background picture.<br><br>
  18611. Example:
  18612. <ul>
  18613. <code>
  18614. define Groundfloor FLOORPLAN<br>
  18615. fp_Groundfloor.png
  18616. </code><br>
  18617. </ul>
  18618. </ul>
  18619. <br>
  18620. <a name="FLOORPLANset"></a>
  18621. <b>Set </b>
  18622. <ul>
  18623. <li>N/A</li>
  18624. </ul>
  18625. <br>
  18626. <a name="FLOORPLANget"></a>
  18627. <b>Get</b>
  18628. <ul>
  18629. <code>get &lt;name&gt; config</code>
  18630. <br>
  18631. Displays the configuration of the floorplan <name> with all attributes. Can be used in an include-file.
  18632. </ul>
  18633. <br>
  18634. <a name="FLOORPLANattr"></a>
  18635. <b>Attributes</b>
  18636. <ul>
  18637. <li><a name="fp_fpname">userattr fp_&lt;name&gt; &lt;top&gt;,&lt;left&gt;[,&lt;style&gt;[,&lt;description&gt;]]</a><br><br>
  18638. A <a href="#userattr">userattr</a> fp_&lt;name&gt; will be created automatically if it does not exist yet.<br>
  18639. <ul>
  18640. <li>top = screen-position, pixels from top of screen</li>
  18641. <li>left = screen-position, pixels from left of screen</li>
  18642. <li>style =
  18643. <ul>
  18644. <li>0 icon/state only</li>
  18645. <li>1 devicename and icon/state</li>
  18646. <li>2 devicename, icon/state and commands</li>
  18647. <li>3 device-reading and optional description</li>
  18648. <li>4 S300TH-specific, displays temperature above humidity</li>
  18649. <li>5 icon/state and commands</li>
  18650. <li>6 device-reading, reading-timestamp and optional description</li>
  18651. <li>7 commands only</li>
  18652. <li>8 commands popup</li>
  18653. </ul>
  18654. </li>
  18655. <li>description will be displayed instead of the original devicename</li>
  18656. </ul></li><br>
  18657. Examples:<br>
  18658. <ul>
  18659. <table>
  18660. <tr><td><code>attr lamp1 fp_Groundfloor 100,100</code></td><td><code>#display lamp1 with icon only at screenposition 100,100</code></td></tr>
  18661. <tr><td><code>attr lamp2 fp_Groundfloor 100,140,1,Art-Deco</code></td><td><code>#display lamp2 with description 'Art-Deco-Light' at 100,140</code></td></tr>
  18662. <tr><td><code>attr lamp2 fp_FirstFloor 130,100,1</code></td><td><code>#display the same device at different positions on other floorplans</code></td></tr>
  18663. <tr><td><code>attr myFHT fp_Groundfloor 300,20,10,Temperature</code></td><td><code>#display given Text + FHT-temperature</code></td></tr>
  18664. </table>
  18665. </ul>
  18666. <b>Hint:</b> no blanks between parameters<br><br>
  18667. <li><a name="fp_arrange">fp_arrange</a><br>
  18668. Activates the "arrange mode" which shows an additional menu on the screen to choose style and description.<br>
  18669. When the arrange-mode is activated, devices can be placed freely on the screen by drag&amp;drop.
  18670. allowing to place devices easily on the screen.<br>
  18671. Example:
  18672. <ul>
  18673. <code>attr Groundfloor fp_arrange 1</code><br>
  18674. <code>attr Groundfloor fp_arrange WEB #activates arrange mode for frontend-device WEB only</code><br><br>
  18675. </ul>
  18676. </li>
  18677. <li><a name="stylesheet">stylesheet</a><br>
  18678. Explicitely sets your personal stylesheet for the floorplan. This overrides the standard stylesheet.
  18679. The standard stylesheet for floorplans is <code>floorplanstyle.css</code>. If the <a href="#stylesheetPrefix">stylesheetPrefix</a> is set for the corresponding FHEMWEB instance, this same
  18680. <code>stylesheetPrefix</code> is also prepended to the stylesheet for floorplans.<br>
  18681. All stylesheets must be stored in the stylesheet subfolder of the fhem filesystem hierarchy. Store your personal
  18682. stylesheet along with <code>floorplanstyle.css</code> in the same folder.<br>
  18683. Example:
  18684. <ul>
  18685. <code>attr Groundfloor stylesheet myfloorplanstyle.css</code><br><br>
  18686. </ul>
  18687. </li>
  18688. <li><a name="fp_default">fp_default</a><br>
  18689. The floorplan startscreen is skipped if this attribute is assigned to one of the floorplans in your installation.
  18690. </li>
  18691. Example:
  18692. <ul>
  18693. <code>attr Groundfloor fp_default 1</code><br><br>
  18694. </ul>
  18695. <li><a name="fp_noMenu">fp_noMenu</a><br>
  18696. Suppresses the menu which usually shows the links to all your floorplans.
  18697. </li>
  18698. Example:
  18699. <ul>
  18700. <code>attr Groundfloor fp_noMenu 1</code><br><br>
  18701. </ul>
  18702. <li><a name="commandfield">commandfield</a><br>
  18703. Adds a fhem-commandfield to the floorplan screen.
  18704. </li>
  18705. Example:
  18706. <ul>
  18707. <code>attr Groundfloor commandfield 1</code><br><br>
  18708. </ul>
  18709. <li><a name="fp_backgroundimg">fp_backgroundimg</a><br>
  18710. Allows to choose a background-picture independent of the floorplan-name.
  18711. </li>
  18712. Example:
  18713. <ul>
  18714. <code>attr Groundfloor fp_backgroundimg foobar.png</code><br><br>
  18715. </ul>
  18716. <li><a name="fp_viewport">fp_viewport</a><br>
  18717. Allows usage of a user-defined viewport-value for touchpad.<br>
  18718. Default-viewport-value is "width=768".
  18719. </li>
  18720. <a name="fp_roomIcons"></a>
  18721. <li>fp_roomIcons<br>
  18722. Space separated list of floorplan:icon pairs, to assign icons
  18723. to the floorplan-menu, just like the functionality for rooms
  18724. in FHEMWEB. Example:<br>
  18725. attr Grundriss fp_roomIcons Grundriss:control_building_empty Media:audio_eq
  18726. </li>
  18727. <li><a name="fp_inherited">Inherited from FHEMWEB</a><br>
  18728. The following attributes are inherited from the underlying <a href="#FHEMWEB">FHEMWEB</a> instance:<br>
  18729. <ul>
  18730. <a href="#smallscreen">smallscreen</a><br>
  18731. <a href="#touchpad">touchpad</a><br>
  18732. <a href="#refresh">refresh</a><br>
  18733. <a href="#plotmode">plotmode</a><br>
  18734. <a href="#plotsize">plotsize</a><br>
  18735. <a href="#webname">webname</a><br>
  18736. <a href="#redirectCmds">redirectCmds</a><br>
  18737. <a href="#longpoll">longpoll</a><br>
  18738. <a href="#allowedCommands">allowedCommands</a><br>
  18739. </ul>
  18740. </li><br>
  18741. </ul>
  18742. <br>
  18743. </ul>
  18744. <a name="FRAMEBUFFER"></a>
  18745. <h3>FRAMEBUFFER</h3>
  18746. <ul>
  18747. Provides a device to display arbitrary content on a linux framebuffer device<p>
  18748. You need to have the perl module <code>GD</code> installed. This module is most likely not
  18749. available for small systems like Fritz!Box.<p>
  18750. FRAMEBUFFER uses <a href="#RSS">RSS</a> to create an image that is displayed on the framebuffer.<br>
  18751. The binary program fbvs is required to display the image. You can download it from <a href="https://github.com/kaihs/fbvs">github</a>.
  18752. </p>
  18753. <a name="FRAMEBUFFERdefine"></a>
  18754. <b>Define</b>
  18755. <ul>
  18756. <code>define &lt;name&gt; FRAMEBUFFER &lt;framebuffer_device_name&gt;</code><br><br>
  18757. Defines a framebuffer device. <code>&lt;framebuffer_device_name&gt;</code> is the name of the linux
  18758. device file for the kernel framebuffer device, e.g. /dev/fb1 or /dev/fb0.
  18759. Examples:
  18760. <ul>
  18761. <code>define display FRAMEBUFFER /dev/fb1</code><br>
  18762. <code>define TV FRAMEBUFFER /dev/fb0</code><br>
  18763. </ul>
  18764. <br>
  18765. </ul>
  18766. <a name="FRAMBUFFERset"></a>
  18767. <b>Set</b>
  18768. <ul>
  18769. <code>set &lt;name&gt; absLayoutNo &lt;number&gt;</code>
  18770. <br><br>
  18771. A list of layout files can be defined with <code>attr layoutList</code>, see below.
  18772. This command selects the layout with the given number from this list and displays it.
  18773. This can e.g. be useful if bound to a key of a remote control to display a specific layout.
  18774. <br><br>
  18775. </ul>
  18776. <ul>
  18777. <code>set &lt;name&gt; layoutFilename &lt;name&gt; [&lt;timeout in seconds&gt;]</code>
  18778. <br><br>
  18779. Displays the image described by the layout in file &lt;name&gt;. If &lt;name&gt; is an absolute path
  18780. name it is used as is to access the file. Otherwise the attribute &lt;layoutBasedir&gt; is prepended to
  18781. the &lt;name&gt;.
  18782. If a timeout is given, the image is only displayed for timeout seconds before the previously displayed image
  18783. is displayed again.
  18784. Useful for displaying an image only for a certain time after an event has occured.
  18785. <br><br>
  18786. </ul>
  18787. <ul>
  18788. <code>set &lt;name&gt; relLayoutNo &lt;number&gt;</code>
  18789. <br><br>
  18790. Like absLayoutNo this displays a certain image from the layoutList. Here &lt;number&gt; is added to the current
  18791. layout number.
  18792. So<br>
  18793. <code>set &lt;name&gt; relLayoutNo 1</code>
  18794. displays the next image from the list while<br>
  18795. <code>set &lt;name&gt; relLayoutNo -1</code><br>
  18796. displays the previous one.
  18797. Useful if bound to a next/previous key on a remote control to scroll through all defined layouts.
  18798. <br><br>
  18799. </ul>
  18800. <ul>
  18801. <code>set &lt;name&gt; updateDisplay</code>
  18802. <br><br>
  18803. Refreshes the display defined by the currently active layout.
  18804. <br><br>
  18805. </ul>
  18806. <a name="FRAMEUFFERattr"></a>
  18807. <b>Attributes</b>
  18808. <br>
  18809. <ul>
  18810. <code>size &lt;width&gt;x&lt;height&gt;</code><br>
  18811. The dimensions of the display in pixels.
  18812. Images will generated using this size. If the size is greater than the actual display
  18813. size they will be scaled to fit. As this requires computing performance it should be avoided by
  18814. defining the size to match the display size.
  18815. <br>Example<br>
  18816. <code>attr &lt;name&gt; size 128x160</code>
  18817. <br><br>
  18818. </ul>
  18819. <ul>
  18820. <code>layoutBasedir &lt;directory name&gt;</code><br>
  18821. Directory that contains the layout files. If a layout filename is specified using a relative path
  18822. <code>layoutBasedir</code> will be prepended before accessing the file.
  18823. <br>Example<br>
  18824. <code>attr &lt;name&gt; layoutBasedir /opt/fhem/layouts</code>
  18825. <br><br>
  18826. </ul>
  18827. <ul>
  18828. <code>layoutList &lt;file1&gt; [&lt;file2&gt;] ...</code>
  18829. <br>Space separated list of layout files.
  18830. These will be used by <code>absLayoutNo</code> and <code>relLayoutNo</code>.
  18831. <code>layoutBasedir</code> will be prepended to each file if it is a relative path.
  18832. <br>Example<br>
  18833. <code>attr &lt;name&gt; layoutList standard.txt wetter.txt schalter.txt</code>
  18834. <br><br>
  18835. </ul>
  18836. <ul>
  18837. <code>update_interval &lt;interval&gt;</code>
  18838. <br>Update interval in minutes.
  18839. The currently displayed layout will be refreshed every &lt;interval&gt; minutes. The first
  18840. interval will be scheduled to the beginning of the next minute to help create an accurate
  18841. time display.<br>
  18842. <br>Example<br>
  18843. <code>attr &lt;name&gt; update_interval 1</code>
  18844. <br><br>
  18845. </ul>
  18846. <ul>
  18847. <code>debugFile &lt;file&gt;</code><br>
  18848. Normally the generated image isn't written to a file. To ease debugging of layouts the generated image is written to the
  18849. filename specified by this attribute.
  18850. This attribute shouldn't be set during normal operation.
  18851. <br><br>
  18852. </ul>
  18853. <ul>
  18854. <code>startLayoutNo &lt;number&gt;</code><br>
  18855. The number of the layout to be displayed on startup of the FRAMEBUFFER device.
  18856. <br><br>
  18857. </ul>
  18858. <ul>bgcolor &lt;color&gt;<br>Sets the background color. &lt;color&gt; is
  18859. a 6-digit hex number, every 2 digits determining the red, green and blue
  18860. color components as in HTML color codes (e.g.<code>FF0000</code> for red, <code>C0C0C0</code> for light gray).
  18861. <br><br>
  18862. </ul>
  18863. <ul>enableCmd &lt;fhem cmd&gt;<br>
  18864. if set this command is executed before a layout with a timeout is displayed. This can e.g. be used to enable a backlight.
  18865. <br><br>
  18866. </ul>
  18867. <ul>disableCmd &lt;fhem cmd&gt;<br>
  18868. if set this command is executed after a layout with a timeout has expired. This can e.g. be used to disable a backlight.
  18869. </ul>
  18870. <br><br>
  18871. <b>Usage information</b>
  18872. <br>
  18873. <ul>
  18874. This module requires the binary program fbvs to be installed in /usr/local/bin and it must be executable
  18875. by user fhem.
  18876. fbvs (framebuffer viewer simple) is a stripped down version of fbv that can only display png images. It reads
  18877. the image from stdin, displays it on the framebuffer and terminates afterwards.
  18878. This module generates a png image based on a layout description internally and then pipes it to fbvs for display.
  18879. </ul>
  18880. <br>
  18881. <a name="FRAMEBUFFERlayout"></a>
  18882. <b>Layout definition</b>
  18883. <br>
  18884. <ul>
  18885. FRAMEBUFFER uses the same <a href="#RSSlayout">layout definition</a> as <a href="#RSS">RSS</a>. In fact FRAMEBUFFER calls RSS to generate an image.
  18886. </ul>
  18887. </ul>
  18888. <a name="FRITZBOX"></a>
  18889. <h3>FRITZBOX</h3>
  18890. (en | <a href="http://fhem.de/commandref_DE.html#FRITZBOX">de</a>)
  18891. <div>
  18892. <ul>
  18893. Controls some features of a Fritz!Box router. Connected Fritz!Fon's (MT-F, MT-D, C3, C4) can be used as
  18894. signaling devices. MP3 files and Text2Speech can be played as ring tone or when calling phones.
  18895. <br>
  18896. For detail instructions, look at and please maintain the <a href="http://www.fhemwiki.de/wiki/FRITZBOX"><b>FHEM-Wiki</b></a>.
  18897. <br/><br/>
  18898. The modul switches in local mode if FHEM runs on a Fritz!Box (as root user!). Otherwise, it tries to open a web or telnet connection to "fritz.box", so telnet (#96*7*) has to be enabled on the Fritz!Box. For remote access the password must <u>once</u> be set.
  18899. <br/><br/>
  18900. The box is partly controlled via the official TR-064 interface but also via undocumented interfaces between web interface and firmware kernel. The modul works best with Fritz!OS 6.24. AVM has removed internal interfaces (telnet, webcm) from later Fritz!OS versions without replacement. <b>For these versions, some modul functions are hence restricted or do not work at all (see remarks to required API).</b>
  18901. <br>
  18902. The modul was tested on Fritz!Box 7390 and 7490 with Fritz!OS 6.20 and higher.
  18903. <br>
  18904. Check also the other Fritz!Box moduls: <a href="#SYSMON">SYSMON</a> and <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>.
  18905. <br>
  18906. <i>The modul uses the Perl modul 'Net::Telnet', 'JSON::XS', 'LWP', 'SOAP::Lite' for remote access.</i>
  18907. <br/><br/>
  18908. <a name="FRITZBOXdefine"></a>
  18909. <b>Define</b>
  18910. <ul>
  18911. <br>
  18912. <code>define &lt;name&gt; FRITZBOX [host]</code>
  18913. <br/>
  18914. The attribute <i>host</i> is the web address (name or IP) of the Fritz!Box. If it is missing, the modul switches in local mode or uses the default host address "fritz.box".
  18915. <br/><br/>
  18916. Example: <code>define Fritzbox FRITZBOX</code>
  18917. <br/><br/>
  18918. The FritzOS has a hidden function (easter egg).
  18919. <br>
  18920. <code>define MyEasterEgg weblink htmlCode { FRITZBOX_fritztris("Fritzbox") }</code>
  18921. <br/><br/>
  18922. </ul>
  18923. <a name="FRITZBOXset"></a>
  18924. <b>Set</b>
  18925. <ul>
  18926. <br>
  18927. <li><code>set &lt;name&gt; alarm &lt;number&gt; [on|off] [time] [once|daily|Mo|Tu|We|Th|Fr|Sa|So]</code>
  18928. <br>
  18929. Switches the alarm number (1, 2 or 3) on or off (default is on). Sets the time and weekday. If no state is given it is switched on.
  18930. <br>
  18931. Requires the API: Telnet or webcm.
  18932. </li><br>
  18933. <li><code>set &lt;name&gt; call &lt;number&gt; [duration] [say:text|play:MP3URL]</code>
  18934. <br>
  18935. Calls for 'duration' seconds (default 60) the given number from an internal port (default 1 or attribute 'ringWithIntern'). If the call is taken a text or sound can be played as music on hold (moh). The internal port will also ring.
  18936. Say and play requires the API: Telnet or webcm.
  18937. </li><br>
  18938. <li><code>set &lt;name&gt; checkAPIs</code>
  18939. <br>
  18940. Restarts the initial check of the programming interfaces of the FRITZ!BOX.
  18941. </li><br>
  18942. <li><code>set &lt;name&gt; customerRingTone &lt;internalNumber&gt; &lt;fullFilePath&gt;</code>
  18943. <br>
  18944. Uploads the file fullFilePath on the given handset. Only mp3 or G722 format is allowed.
  18945. <br>
  18946. The file has to be placed on the file system of the fritzbox.
  18947. <br>
  18948. The upload takes about one minute before the tone is available.
  18949. </li><br>
  18950. <li><code>set &lt;name&gt; dect &lt;on|off&gt;</code>
  18951. <br>
  18952. Switches the DECT base of the box on or off. Requires the API: Telnet or webcm.
  18953. </li><br>
  18954. <li><code>set &lt;name&gt; diversity &lt;number&gt; &lt;on|off&gt;</code>
  18955. <br>
  18956. Switches the call diversity number (1, 2 ...) on or off.
  18957. A call diversity for an incoming number has to be created with the Fritz!Box web interface. Requires the API: Telnet, webcm or TR064 (>=6.50).
  18958. <br>
  18959. Note! Only a diversity for a concret home number and <u>without</u> filter for the calling number can be set. Hence, an approbriate <i>diversity</i>-reading must exist.
  18960. </li><br>
  18961. <li><code>set &lt;name&gt; guestWLAN &lt;on|off&gt;</code>
  18962. <br>
  18963. Switches the guest WLAN on or off. The guest password must be set. If necessary, the normal WLAN is also switched on.
  18964. </li><br>
  18965. <li><code>set &lt;name&gt; moh &lt;default|sound|customer&gt; [&lt;MP3FileIncludingPath|say:Text&gt;]</code>
  18966. <br>
  18967. Example: <code>set fritzbox moh customer say:Die Wanne ist voll</code>
  18968. <br>
  18969. <code>set fritzbox moh customer /var/InternerSpeicher/warnung.mp3</code>
  18970. <br>
  18971. Changes the 'music on hold' of the Box. The parameter 'customer' allows to upload a mp3 file. Alternatively a text can be spoken with "say:". The music on hold has <u>always</u> a length of 8.2 s. It is played continousely during the broking of calls or if the modul rings a phone and the call is taken. So, it can be used to transmit little messages of 8 s.
  18972. <br>
  18973. </li><br>
  18974. <li><code>set &lt;name&gt; password &lt;password&gt;</code>
  18975. <br>
  18976. Stores the password for remote telnet access.
  18977. </li><br>
  18978. <li><code>set &lt;name&gt; ring &lt;intNumbers&gt; [duration [ringTone]] [show:Text] [say:Text | play:MP3URL]</code>
  18979. <dt>Example:</dt>
  18980. <dd>
  18981. <code>set fritzbox ring 611,612 5 Budapest show:It is raining</code>
  18982. <br>
  18983. <code>set fritzbox ring 611 8 say:(en)It is raining</code>
  18984. <br>
  18985. <code>set fritzbox ring 610 10 play:http://raspberrypi/sound.mp3</code>
  18986. </dd>
  18987. Rings the internal numbers for "duration" seconds and (on Fritz!Fons) with the given "ring tone" name.
  18988. Different internal numbers have to be separated by a comma (without spaces).
  18989. <br>
  18990. Default duration is 5 seconds. The Fritz!Box can create further delays. Default ring tone is the internal ring tone of the device.
  18991. Ring tone will be ignored for collected calls (9 or 50).
  18992. <br>
  18993. If the call is taken the callee hears the "music on hold" which can also be used to transmit messages.
  18994. <br>
  18995. The parameter <i>ringtone, show:, say:</i> and <i>play:</i> require the API Telnet or webcm.
  18996. <br/><br/>
  18997. If the <a href=#FRITZBOXattr>attribute</a> 'ringWithIntern' is specified, the text behind 'show:' will be shown as the callers name.
  18998. Maximal 30 characters are allowed.
  18999. <br/><br/>
  19000. On Fritz!Fons the parameter 'say:' can be used to let the phone speak a message (max. 100 characters) instead of using the ringtone.
  19001. Alternatively, a MP3 link (from a web server) can be played with 'play:'. This creates the internet radio station 'FHEM' and uses translate.google.com for text2speech. It will <u>always</u> play the complete text/sound. It will than ring with standard ring tone until the end of the 'ring duration' is reached.
  19002. Say and play <u>may</u> work only with one single Fritz!Fon at a time.
  19003. <br>
  19004. The behaviour may vary depending on the Fritz!OS.
  19005. </li><br>
  19006. <li><code>set &lt;name&gt; sendMail [to:&lt;Address&gt;] [subject:&lt;Subject&gt;] [body:&lt;Text&gt;]</code>
  19007. <br>
  19008. Sends an email via the email notification service that is configured in push service of the Fritz!Box.
  19009. Use "\n" for line breaks in the body.
  19010. All parameters can be omitted. Make sure the messages are not classified as junk by your email client.
  19011. <br>
  19012. Requires Telnet access to the box.
  19013. <br>
  19014. </li><br>
  19015. <li><code>set &lt;name&gt; startRadio &lt;internalNumber&gt; [name or number]</code>
  19016. <br>
  19017. Plays the internet radio on the given Fritz!Fon. Default is the current <u>ring tone</u> radio station of the phone.
  19018. So, <b>not</b> the station that is selected at the handset.
  19019. An available internet radio can be selected by its name or (reading) number.
  19020. <br>
  19021. </li><br>
  19022. <li><code>set &lt;name&gt; tam &lt;number&gt; &lt;on|off&gt;</code>
  19023. <br>
  19024. Switches the answering machine number (1, 2 ...) on or off.
  19025. The answering machine has to be created on the Fritz!Box web interface.
  19026. </li><br>
  19027. <li><code>set &lt;name&gt; update</code>
  19028. <br>
  19029. Starts an update of the device readings.
  19030. </li><br>
  19031. <li><code>set &lt;name&gt; wlan &lt;on|off&gt;</code>
  19032. <br>
  19033. Switches WLAN on or off.
  19034. </li><br>
  19035. </ul>
  19036. <a name="FRITZBOXget"></a>
  19037. <b>Get</b>
  19038. <ul>
  19039. <br>
  19040. <li><code>get &lt;name&gt; ringTones</code>
  19041. <br>
  19042. Shows the list of ring tones that can be used.
  19043. </li><br>
  19044. <li><code>get &lt;name&gt; shellCommand &lt;Command&gt;</code>
  19045. <br>
  19046. Runs the given command on the Fritz!Box shell and returns the result.
  19047. Can be used to run shell commands not included in this modul.
  19048. <br>
  19049. Only available if the attribute "allowShellCommand" is set.
  19050. </li><br>
  19051. <li><code>get &lt;name&gt; tr064Command &lt;service&gt; &lt;control&gt; &lt;action&gt; [[argName1 argValue1] ...] </code>
  19052. <br>
  19053. Executes TR-064 actions (see <a href="http://avm.de/service/schnittstellen/">API description</a> of AVM).
  19054. <br>
  19055. argValues with spaces have to be enclosed in quotation marks.
  19056. <br>
  19057. Example: <code>get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1</code>
  19058. <br>
  19059. Only available if the attribute "allowTR064Command" is set.
  19060. </li><br>
  19061. <li><code>get &lt;name&gt; tr064ServiceListe</code>
  19062. <br>
  19063. Shows a list of TR-064 services and actions that are allowed on the device.
  19064. </li><br>
  19065. </ul>
  19066. <a name="FRITZBOXattr"></a>
  19067. <b>Attributes</b>
  19068. <ul>
  19069. <br>
  19070. <li><code>allowShellCommand &lt;0 | 1&gt;</code>
  19071. <br>
  19072. Enables the get command "shellCommand"
  19073. </li><br>
  19074. <li><code>allowTR064Command &lt;0 | 1&gt;</code>
  19075. <br>
  19076. Enables the get command "tr064Command"
  19077. </li><br>
  19078. <li><code>boxUser &lt;user name&gt;</code>
  19079. <br>
  19080. User name that is used for TR064 or other web based access. By default no user name is required to login.
  19081. <br>
  19082. If the Fritz!Box is configured differently, the user name has to be defined with this attribute.
  19083. </li><br>
  19084. <li><code>defaultCallerName &lt;Text&gt;</code>
  19085. <br>
  19086. The default text to show on the ringing phone as 'caller'.
  19087. <br>
  19088. This is done by temporarily changing the name of the calling internal number during the ring.
  19089. <br>
  19090. Maximal 30 characters are allowed. The attribute "ringWithIntern" must also be specified.
  19091. <br>
  19092. Required API: Telnet or webcmd
  19093. </li><br>
  19094. <li><code>defaultUploadDir &lt;fritzBoxPath&gt;</code>
  19095. <br>
  19096. This is the default path that will be used if a file name does not start with / (slash).
  19097. <br>
  19098. It needs to be the name of the path on the Fritz!Box. So, it should start with /var/InternerSpeicher if it equals in Windows \\ip-address\fritz.nas
  19099. </li><br>
  19100. <li><code>forceTelnetConnection &lt;0 | 1&gt;</code>
  19101. <br>
  19102. Always use telnet for remote access (instead of access via the WebGUI or TR-064).
  19103. <br>
  19104. This attribute should be enabled for older boxes/firmwares.
  19105. </li><br>
  19106. <li><code>fritzBoxIP &lt;IP Address&gt;</code>
  19107. <br>
  19108. Depreciated.
  19109. </li><br>
  19110. <li><code>INTERVAL &lt;seconds&gt;</code>
  19111. <br>
  19112. Polling-Interval. Default is 300 (seconds). Smallest possible value is 60.
  19113. </li><br>
  19114. <li><code>m3uFileLocal &lt;/path/fileName&gt;</code>
  19115. <br>
  19116. Can be used as a work around if the ring tone of a Fritz!Fon cannot be changed because of firmware restrictions (missing telnet or webcm).
  19117. <br>
  19118. How it works: If the FHEM server has also a web server running, the FritzFon can play a m3u file from this web server as an internet radio station.
  19119. For this an internet radio station on the FritzFon must point to the server URL of this file and the internal ring tone must be changed to that station.
  19120. <br>
  19121. If the attribute is set, the server file "m3uFileLocal" (local address of the FritzFon URL) will be filled with the URL of the text2speech engine (say:) or a MP3-File (play:). The FritzFon will then play this URL.
  19122. </li><br>
  19123. <li><code>ringWithIntern &lt;1 | 2 | 3&gt;</code>
  19124. <br>
  19125. To ring a fon a caller must always be specified. Default of this modul is 50 "ISDN:W&auml;hlhilfe".
  19126. <br>
  19127. To show a message (default: "FHEM") during a ring the internal phone numbers 1-3 can be specified here.
  19128. The concerned analog phone socket <u>must</u> exist.
  19129. </li><br>
  19130. <li><code>telnetTimeOut &lt;seconds&gt;</code>
  19131. <br>
  19132. Maximal time to wait for an answer during a telnet session. Default is 10 s.
  19133. </li><br>
  19134. <li><code>telnetUser &lt;user name&gt;</code>
  19135. <br>
  19136. User name that is used for telnet access. By default no user name is required to login.
  19137. <br>
  19138. If the Fritz!Box is configured differently, the user name has to be defined with this attribute.
  19139. </li><br>
  19140. <li><code>useGuiHack &lt;0 | 1&gt;</code>
  19141. <br>
  19142. If the APIs do not allow the change of the ring tone (Fritz!OS >6.24), check the <a href="http://www.fhemwiki.de/wiki/FRITZBOX#Klingelton-Einstellung_und_Abspielen_von_Sprachnachrichten_bei_Fritz.21OS-Versionen_.3E6.24">WIKI</a> (German) to understand the use of this attribute.
  19143. </li><br>
  19144. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  19145. </ul>
  19146. <br>
  19147. <a name="FRITZBOXreading"></a>
  19148. <b>Readings</b>
  19149. <ul><br>
  19150. <li><b>alarm</b><i>1</i> - Name of the alarm clock <i>1</i></li>
  19151. <li><b>alarm</b><i>1</i><b>_state</b> - Current state of the alarm clock <i>1</i></li>
  19152. <li><b>alarm</b><i>1</i><b>_target</b> - Internal number of the alarm clock <i>1</i></li>
  19153. <li><b>alarm</b><i>1</i><b>_time</b> - Alarm time of the alarm clock <i>1</i></li>
  19154. <li><b>alarm</b><i>1</i><b>_wdays</b> - Weekdays of the alarm clock <i>1</i></li>
  19155. <br>
  19156. <li><b>box_dect</b> - Current state of the DECT base</li>
  19157. <li><b>box_fwVersion</b> - Firmware version of the box, if outdated then '(old)' is appended</li>
  19158. <li><b>box_guestWlan</b> - Current state of the guest WLAN</li>
  19159. <li><b>box_guestWlanCount</b> - Number of devices connected to guest WLAN</li>
  19160. <li><b>box_guestWlanRemain</b> - Remaining time until the guest WLAN is switched off</li>
  19161. <li><b>box_ipExtern</b> - Internet IP of the Fritz!Box</li>
  19162. <li><b>box_model</b> - Fritz!Box model</li>
  19163. <li><b>box_moh</b> - music-on-hold setting</li>
  19164. <li><b>box_model</b> - Fritz!Box model</li>
  19165. <li><b>box_powerRate</b> - current power in percent of maximal power</li>
  19166. <li><b>box_rateDown</b> - average download rate in the last update interval</li>
  19167. <li><b>box_rateUp</b> - average upload rate in the last update interval</li>
  19168. <li><b>box_stdDialPort</b> - standard caller port when using the dial function of the box</li>
  19169. <li><b>box_tr064</b> - application interface TR-064 (needed by this modul)</li>
  19170. <li><b>box_tr069</b> - provider remote access TR-069 (safety issue!)</li>
  19171. <li><b>box_wlanCount</b> - Number of devices connected via WLAN</li>
  19172. <li><b>box_wlan_2.4GHz</b> - Current state of the 2.4 GHz WLAN</li>
  19173. <li><b>box_wlan_5GHz</b> - Current state of the 5 GHz WLAN</li>
  19174. <br>
  19175. <li><b>dect</b><i>1</i> - Name of the DECT device <i>1</i></li>
  19176. <li><b>dect</b><i>1</i><b>_alarmRingTone</b> - Alarm ring tone of the DECT device <i>1</i></li>
  19177. <li><b>dect</b><i>1</i><b>_custRingTone</b> - Customer ring tone of the DECT device <i>1</i></li>
  19178. <li><b>dect</b><i>1</i><b>_fwVersion</b> - Firmware Version of the DECT device <i>1</i></li>
  19179. <li><b>dect</b><i>1</i><b>_intern</b> - Internal number of the DECT device <i>1</i></li>
  19180. <li><b>dect</b><i>1</i><b>_intRingTone</b> - Internal ring tone of the DECT device <i>1</i></li>
  19181. <li><b>dect</b><i>1</i><b>_manufacturer</b> - Manufacturer of the DECT device <i>1</i></li>
  19182. <li><b>dect</b><i>1</i><b>_model</b> - Model of the DECT device <i>1</i></li>
  19183. <li><b>dect</b><i>1</i><b>_radio</b> - Current internet radio station ring tone of the DECT device <i>1</i></li>
  19184. <br>
  19185. <li><b>diversity</b><i>1</i> - Own (incoming) phone number of the call diversity <i>1</i></li>
  19186. <li><b>diversity</b><i>1</i><b>_dest</b> - Destination of the call diversity <i>1</i></li>
  19187. <li><b>diversity</b><i>1</i><b>_state</b> - Current state of the call diversity <i>1</i></li>
  19188. <br>
  19189. <li><b>fon</b><i>1</i> - Internal name of the analog FON port <i>1</i></li>
  19190. <li><b>fon</b><i>1</i><b>_intern</b> - Internal number of the analog FON port <i>1</i></li>
  19191. <li><b>fon</b><i>1</i><b>_out</b> - Outgoing number of the analog FON port <i>1</i></li>
  19192. <br>
  19193. <li><b>gsm_internet</b> - connection to internet established via GSM stick</li>
  19194. <li><b>gsm_rssi</b> - received signal strength indication (0-100)</li>
  19195. <li><b>gsm_state</b> - state of the connection to the GSM network</li>
  19196. <li><b>gsm_technology</b> - GSM technology used for data transfer (GPRS, EDGE, UMTS, HSPA)</li>
  19197. <br>
  19198. <li><b>mac_</b><i>01_26_FD_12_01_DA</i> - MAC address and name of an active network device.
  19199. <br>
  19200. If connect via WLAN, the term "WLAN" and (from boxes point of view) the down- and upload rate and the signal strength is added. For LAN devices the LAN port and its speed is added. Inactive or removed devices get first the value "inactive" and will be deleted during the next update.</li>
  19201. <br>
  19202. <li><b>radio</b><i>01</i> - Name of the internet radio station <i>01</i></li>
  19203. <br>
  19204. <li><b>tam</b><i>1</i> - Name of the answering machine <i>1</i></li>
  19205. <li><b>tam</b><i>1</i><b>_newMsg</b> - New messages on the answering machine <i>1</i></li>
  19206. <li><b>tam</b><i>1</i><b>_oldMsg</b> - Old messages on the answering machine <i>1</i></li>
  19207. <li><b>tam</b><i>1</i><b>_state</b> - Current state of the answering machine <i>1</i></li>
  19208. <br>
  19209. <li><b>user</b><i>01</i> - Name of user/IP <i>1</i> that is under parental control</li>
  19210. <li><b>user</b><i>01</i>_thisMonthTime - this month internet usage of user/IP <i>1</i> (parental control)</li>
  19211. <li><b>user</b><i>01</i>_todaySeconds - today's internet usage in seconds of user/IP <i>1</i> (parental control)</li>
  19212. <li><b>user</b><i>01</i>_todayTime - today's internet usage of user/IP <i>1</i> (parental control)</li>
  19213. </ul>
  19214. <br>
  19215. </ul>
  19216. </div>
  19217. CHANGES
  19218. 18.12.2015 jensb
  19219. o added sub FRM_is_firmata_connected
  19220. - extended connection check including {FirmataDevice}->{io} (gets
  19221. deleted by FRM_FirmataDevice_Close on TCP disconnect while FHEM
  19222. has still a valid reference to {FirmataDevice} when calling
  19223. I2CWrtFn)
  19224. o modified sub FRM_Set, FRM_Get, FRM_I2C_Write, FRM_poll:
  19225. - use sub FRM_is_firmata_connected to check if Firmata is still
  19226. connected before performing IO operations (to prevent FHEM crash)
  19227. o modified sub FRM_Tcp_Connection_Close:
  19228. - set STATE to listening and delete SocketDevice (to present same
  19229. idle state as FRM_Start)
  19230. o help updated
  19231. =cut
  19232. =pod
  19233. <a name="FRM"></a>
  19234. <h3>FRM</h3>
  19235. <ul>
  19236. connects fhem to <a href="http://www.arduino.cc">Arduino</a> using
  19237. the <a href="http://www.firmata.org">Firmata</a> protocol.
  19238. <br><br>
  19239. A single FRM device can serve multiple FRM-clients.<br><br>
  19240. Clients of FRM are:<br><br>
  19241. <a href="#FRM_IN">FRM_IN</a> for digital input<br>
  19242. <a href="#FRM_OUT">FRM_OUT</a> for digital out<br>
  19243. <a href="#FRM_AD">FRM_AD</a> for analog input<br>
  19244. <a href="#FRM_PWM">FRM_PWM</a> for analog output (pulse_width_modulated)<br>
  19245. <a href="#FRM_RGB">FRM_RGB</a> control multichannel/RGB-LEDs by pwm<br>
  19246. <a href="#FRM_SERVO">FRM_SERVO</a> for pwm-controled servos as being used in modelmaking<br>
  19247. <a href="#FRM_LCD">FRM_LCD</a> output text to LCD attached via I2C<br>
  19248. <a href="#FRM_I2C">FRM_I2C</a> to read data from integrated circutes attached
  19249. to Arduino supporting the <a href="http://en.wikipedia.org/wiki/I%C2%B2C">
  19250. i2c-protocol</a>.<br>
  19251. <a href="#OWX">OWX</a> to read/write sensors and actors on 1-Wire bus.<br><br>
  19252. Each client stands for a Pin of the Arduino configured for a specific use
  19253. (digital/analog in/out) or an integrated circuit connected to Arduino by i2c.<br><br>
  19254. Note: this module is based on <a href="https://github.com/ntruchsess/perl-firmata">Device::Firmata</a> module (perl-firmata).
  19255. perl-firmata is included in FHEM-distributions lib-directory. You can download the latest version <a href="https://github.com/amimoto/perl-firmata/archive/master.zip">as a single zip</a> file from github.<br><br>
  19256. Note: this module may require the Device::SerialPort or Win32::SerialPort
  19257. module if you attach the device via USB and the OS sets strange default
  19258. parameters for serial devices.<br><br>
  19259. <a name="FRMdefine"></a>
  19260. <b>Define</b><br>
  19261. <ul><br>
  19262. <code>define &lt;name&gt; FRM {&lt;device&gt; | &lt;port&gt; [global]}</code> <br>
  19263. Specifies the FRM device.<br>
  19264. <br>
  19265. <li>USB-connected devices:<br><br>
  19266. <code>&lt;device&gt;</code> specifies the serial port to communicate with the Arduino.
  19267. The name of the serial-device depends on your distribution, under
  19268. linux the cdc_acm kernel module is responsible, and usually a
  19269. /dev/ttyACM0 device will be created. If your distribution does not have a
  19270. cdc_acm module, you can force usbserial to handle the Arduino by the
  19271. following command:<br>
  19272. <code>modprobe usbserial vendor=0x03eb product=0x204b</code></br>
  19273. In this case the device is most probably /dev/ttyUSB0.<br><br>
  19274. You can also specify a baudrate if the device name contains the @
  19275. character, e.g.: /dev/ttyACM0@38400<br><br>
  19276. If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
  19277. perl module Device::SerialPort is not needed, and fhem opens the device
  19278. with simple file io. This might work if the operating system uses sane
  19279. defaults for the serial parameters, e.g. some Linux distributions and
  19280. OSX. <br><br>
  19281. The Arduino has to run either 'StandardFirmata' or 'ConfigurableFirmata'.
  19282. StandardFirmata supports Digital and Analog-I/O, Servo and I2C. In addition
  19283. to that ConfigurableFirmata supports 1-Wire and Stepper-motors.<br><br>
  19284. You can find StandardFirmata in the Arduino-IDE under 'Examples->Firmata->StandardFirmata<br><br>
  19285. ConfigurableFirmata has to be installed manualy. See <a href="https://github.com/firmata/arduino/tree/configurable/examples/ConfigurableFirmata">
  19286. ConfigurableFirmata</a> on GitHub or <a href="http://www.fhemwiki.de/wiki/Arduino_Firmata#Installation_ConfigurableFirmata">FHEM-Wiki</a><br>
  19287. </li>
  19288. <br>
  19289. <li>Network-connected devices:<br><br>
  19290. <code>&lt;port&gt;</code> specifies the port the FRM device listens on. If <code>global</code> is
  19291. specified the socket is bound to all local IP addresses, otherwise to localhost
  19292. only.<br><br>
  19293. The Arduino has to run either 'StandardFirmataEthernet' or 'ConfigurableFirmata'.
  19294. StandardFirmataEthernet supports Digital and Analog-I/O, Servo and I2C. In addition
  19295. to that ConfigurableFirmata supports 1-Wire and Stepper-motors.<br><br>
  19296. The connection is initiated by the Arduino in client-mode. Therefore the IP address and port
  19297. of the fhem-server has to be configured in the Arduino, so it knows where to connect to.<br>
  19298. As of now only a single Arduino per FRM-device configured is supported. Multiple
  19299. Arduinos may connect to different FRM-devices configured for different ports.<br><br>
  19300. You can find StandardFirmataEthernet in the Arduino-IDE under 'Examples->Firmata->StandardFirmataEthernet<br><br>
  19301. ConfigurableFirmata has to be installed manually. See <a href="https://github.com/firmata/arduino/tree/configurable/examples/ConfigurableFirmata">
  19302. ConfigurableFirmata</a> on GitHub or <a href="http://www.fhemwiki.de/wiki/Arduino_Firmata#Installation_ConfigurableFirmata">FHEM-Wiki</a><br>
  19303. </li>
  19304. <br>
  19305. <li>
  19306. If the device is called none, then no device will be opened, so you
  19307. can experiment without hardware attached.<br>
  19308. </li>
  19309. </ul>
  19310. <br>
  19311. <a name="FRMset"></a>
  19312. <b>Set</b>
  19313. <ul>
  19314. <li>
  19315. <code>set &lt;name&gt; init</code><br>
  19316. reinitializes the FRM-Client-devices configured for this Arduino
  19317. </li><br>
  19318. <li>
  19319. <code>set &lt;name&gt; reset</code><br>
  19320. does a complete reset of FRM by disconnecting from, reconnecting to and reinitializing the Arduino and FRM internals and all attached FRM-client-devices
  19321. </li>
  19322. </ul>
  19323. <br><br>
  19324. <a name="FRMattr"></a>
  19325. <b>Attributes</b><br>
  19326. <ul>
  19327. <li>i2c-config<br>
  19328. Configure the Arduino for ic2 communication. This will enable i2c on the
  19329. i2c_pins received by the capability-query issued during initialization of FRM.<br>
  19330. As of Firmata 2.3 you can set a delay-time (in microseconds, max. 65535, default 0) that will be
  19331. inserted into i2c protocol when switching from write to read. This may be necessary because Firmata
  19332. i2c write does not block on the fhem side so consecutive i2c write/read operations get queued and
  19333. will be executed on the Firmata device in a different time sequence. Use the maximum operation
  19334. time required by the connected i2c devices (e.g. 30000 for the BMP180 with triple oversampling,
  19335. see i2c device manufacturer documentation for details). <br>
  19336. See: <a href="http://www.firmata.org/wiki/Protocol#I2C">Firmata Protocol details about I2C</a><br>
  19337. </li><br>
  19338. <li>sampling-interval<br>
  19339. Configure the interval Firmata reports analog data to FRM (in milliseconds, max. 65535). <br>
  19340. See: <a href="http://www.firmata.org/wiki/Protocol#Sampling_Interval">Firmata Protocol details about Sampling Interval</a></br>
  19341. </li>
  19342. </ul>
  19343. </ul>
  19344. <br>
  19345. <a name="FRM_AD"></a>
  19346. <h3>FRM_AD</h3>
  19347. <ul>
  19348. represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
  19349. configured for analog input.<br>
  19350. The value read is stored in reading 'state'. Range is from 0 to 1023 (10 Bit)<br>
  19351. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19352. <a name="FRM_ADdefine"></a>
  19353. <b>Define</b>
  19354. <ul>
  19355. <code>define &lt;name&gt; FRM_AD &lt;pin&gt;</code> <br>
  19356. Defines the FRM_AD device. &lt;pin&gt; is the arduino-pin to use.
  19357. </ul>
  19358. <br>
  19359. <a name="FRM_ADset"></a>
  19360. <b>Set</b><br>
  19361. <ul>
  19362. N/A<br>
  19363. </ul><br>
  19364. <a name="FRM_ADget"></a>
  19365. <b>Get</b><br>
  19366. <ul>
  19367. <li>reading<br>
  19368. returns the voltage-level read on the arduino-pin. Values range from 0 to 1023.</li>
  19369. <li>alarm-upper-threshold<br>
  19370. returns the current state of 'alarm-upper-threshold'. Values are 'on' and 'off' (Defaults to 'off')<br>
  19371. 'alarm-upper-threshold' turns 'on' whenever the 'reading' is higher than the attribute 'upper-threshold'<br>
  19372. it turns 'off' again as soon 'reading' falls below 'alarm-upper-threshold'</li>
  19373. <li>alarm-lower-threshold<br>
  19374. returns the current state of 'alarm-lower-threshold'. Values are 'on' and 'off' (Defaults to 'off')<br>
  19375. 'alarm-lower-threshold' turns 'on' whenever the 'reading' is lower than the attribute 'lower-threshold'<br>
  19376. it turns 'off' again as soon 'reading rises above 'alarm-lower-threshold'</li>
  19377. <li>state<br>
  19378. returns the 'state' reading</li>
  19379. </ul><br>
  19380. <a name="FRM_ADattr"></a>
  19381. <b>Attributes</b><br>
  19382. <ul>
  19383. <li>upper-threshold<br>
  19384. sets the 'upper-threshold'. Whenever the 'reading' exceeds this value 'alarm-upper-threshold' is set to 'on'<br>
  19385. As soon 'reading' falls below the 'upper-threshold' 'alarm-upper-threshold' turns 'off' again<br>
  19386. Defaults to 1024.</li>
  19387. <li>lower-threshold<br>
  19388. sets the 'lower-threshold'. Whenever the 'reading' falls below this value 'alarm-lower-threshold' is set to 'on'<br>
  19389. As soon 'reading' rises above the 'lower-threshold' 'alarm-lower-threshold' turns 'off' again<br>
  19390. Defaults to -1.</li>
  19391. <li><a href="#IODev">IODev</a><br>
  19392. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19393. than one FRM-device defined.)
  19394. </li>
  19395. <li><a href="#eventMap">eventMap</a><br></li>
  19396. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19397. </ul>
  19398. </ul>
  19399. <br>
  19400. <a name="FRM_I2C"></a>
  19401. <h3>FRM_I2C</h3>
  19402. <ul>
  19403. represents an integrated curcuit connected to the i2c-pins of an <a href="http://www.arduino.cc">Arduino</a>
  19404. running <a href="http://www.firmata.org">Firmata</a><br>
  19405. Requires a defined <a href="#FRM">FRM</a>-device to work.<br>
  19406. this FRM-device has to be configures for i2c by setting attr 'i2c-config' on the FRM-device<br>
  19407. it reads out the ic-internal storage in intervals of 'sampling-interval' as set on the FRM-device<br><br>
  19408. <a name="FRM_I2Cdefine"></a>
  19409. <b>Define</b>
  19410. <ul>
  19411. <code>define &lt;name&gt; FRM_I2C &lt;i2c-address&gt; &lt;register&gt; &lt;bytes-to-read&gt;</code> <br>
  19412. Specifies the FRM_I2C device.<br>
  19413. <li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
  19414. <li>register is the (device-internal) address to start reading bytes from.</li>
  19415. <li>bytes-to-read is the number of bytes read from the ic</li>
  19416. </ul>
  19417. <br>
  19418. <a name="FRM_I2Cset"></a>
  19419. <b>Set</b><br>
  19420. <ul>
  19421. N/A<br>
  19422. </ul>
  19423. <a name="FRM_I2Cget"></a>
  19424. <b>Get</b><br>
  19425. <ul>
  19426. N/A<br>
  19427. </ul><br>
  19428. <a name="FRM_I2Cattr"></a>
  19429. <b>Attributes</b><br>
  19430. <ul>
  19431. <li><a href="#IODev">IODev</a><br>
  19432. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19433. than one FRM-device defined.)
  19434. </li>
  19435. <li><a href="#eventMap">eventMap</a><br></li>
  19436. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19437. </ul>
  19438. </ul>
  19439. <br>
  19440. <a name="FRM_IN"></a>
  19441. <h3>FRM_IN</h3>
  19442. <ul>
  19443. represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
  19444. configured for digital input.<br>
  19445. The current state of the arduino-pin is stored in reading 'state'. Values are 'on' and 'off'.<br>
  19446. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19447. <a name="FRM_INdefine"></a>
  19448. <b>Define</b>
  19449. <ul>
  19450. <code>define &lt;name&gt; FRM_IN &lt;pin&gt;</code> <br>
  19451. Defines the FRM_IN device. &lt;pin&gt> is the arduino-pin to use.
  19452. </ul>
  19453. <br>
  19454. <a name="FRM_INset"></a>
  19455. <b>Set</b><br>
  19456. <ul>
  19457. <li>alarm on|off<br>
  19458. set the alarm to on or off. Used to clear the alarm.<br>
  19459. The alarm is set to 'on' whenever the count reaches the threshold and doesn't clear itself.</li>
  19460. </ul>
  19461. <a name="FRM_INget"></a>
  19462. <b>Get</b>
  19463. <ul>
  19464. <li>reading<br>
  19465. returns the logical state of the arduino-pin. Values are 'on' and 'off'.<br></li>
  19466. <li>count<br>
  19467. returns the current count. Contains the number of toggles of the arduino-pin.<br>
  19468. Depending on the attribute 'count-mode' every rising or falling edge (or both) is counted.</li>
  19469. <li>alarm<br>
  19470. returns the current state of 'alarm'. Values are 'on' and 'off' (Defaults to 'off')<br>
  19471. 'alarm' doesn't clear itself, has to be set to 'off' eplicitly.</li>
  19472. <li>state<br>
  19473. returns the 'state' reading</li>
  19474. </ul><br>
  19475. <a name="FRM_INattr"></a>
  19476. <b>Attributes</b><br>
  19477. <ul>
  19478. <li>activeLow &lt;yes|no&gt;</li>
  19479. <li>count-mode none|rising|falling|both<br>
  19480. Determines whether 'rising' (transitions from 'off' to 'on') of falling (transitions from 'on' to 'off')<br>
  19481. edges (or 'both') are counted. Defaults to 'none'</li>
  19482. <li>count-threshold &lt;number&gt;<br>
  19483. sets the theshold-value for the counter. Whenever 'count' reaches the 'count-threshold' 'alarm' is<br>
  19484. set to 'on'. Use 'set alarm off' to clear the alarm.</li>
  19485. <li>reset-on-threshold-reached yes|no<br>
  19486. if set to 'yes' reset the counter to 0 when the threshold is reached (defaults to 'no').
  19487. </li>
  19488. <li>internal-pullup on|off<br>
  19489. allows to switch the internal pullup resistor of arduino to be en-/disabled. Defaults to off.
  19490. </li>
  19491. <li><a href="#IODev">IODev</a><br>
  19492. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19493. than one FRM-device defined.)
  19494. </li>
  19495. <li><a href="#eventMap">eventMap</a><br></li>
  19496. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19497. </ul>
  19498. </ul>
  19499. <br>
  19500. <a name="FRM_LCD"></a>
  19501. <h3>FRM_LCD</h3>
  19502. <ul>
  19503. deprecated, use <a href="#I2C_LCD">I2C_LCD</a>
  19504. </ul>
  19505. <a name="FRM_OUT"></a>
  19506. <h3>FRM_OUT</h3>
  19507. <ul>
  19508. represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
  19509. configured for digital output.<br>
  19510. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19511. <a name="FRM_OUTdefine"></a>
  19512. <b>Define</b>
  19513. <ul>
  19514. <code>define &lt;name&gt; FRM_OUT &lt;pin&gt;</code> <br>
  19515. Defines the FRM_OUT device. &lt;pin&gt> is the arduino-pin to use.
  19516. </ul>
  19517. <br>
  19518. <a name="FRM_OUTset"></a>
  19519. <b>Set</b><br>
  19520. <ul>
  19521. <code>set &lt;name&gt; on|off</code><br><br>
  19522. </ul>
  19523. <ul>
  19524. <a href="#setExtensions">set extensions</a> are supported<br>
  19525. </ul>
  19526. <a name="FRM_OUTget"></a>
  19527. <b>Get</b><br>
  19528. <ul>
  19529. N/A
  19530. </ul><br>
  19531. <a name="FRM_OUTattr"></a>
  19532. <b>Attributes</b><br>
  19533. <ul>
  19534. <li>restoreOnStartup &lt;on|off&gt;</li>
  19535. <li>restoreOnReconnect &lt;on|off&gt;</li>
  19536. <li>activeLow &lt;yes|no&gt;</li>
  19537. <li><a href="#IODev">IODev</a><br>
  19538. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19539. than one FRM-device defined.)
  19540. </li>
  19541. <li><a href="#eventMap">eventMap</a><br></li>
  19542. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19543. </ul>
  19544. </ul>
  19545. <br>
  19546. <a name="FRM_PWM"></a>
  19547. <h3>FRM_PWM</h3>
  19548. <ul>
  19549. represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
  19550. configured for analog output.<br>
  19551. The value set will be output by the specified pin as a pulse-width-modulated signal.<br>
  19552. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19553. <a name="FRM_PWMdefine"></a>
  19554. <b>Define</b>
  19555. <ul>
  19556. <code>define &lt;name&gt; FRM_PWM &lt;pin&gt;</code> <br>
  19557. Defines the FRM_PWM device. &lt;pin&gt> is the arduino-pin to use.
  19558. </ul>
  19559. <br>
  19560. <a name="FRM_PWMset"></a>
  19561. <b>Set</b><br>
  19562. <ul>
  19563. <code>set &lt;name&gt; on</code><br>
  19564. sets the pulse-width to 100%<br>
  19565. </ul>
  19566. <ul>
  19567. <code>set &lt;name&gt; off</code><br>
  19568. sets the pulse-width to 0%<br>
  19569. </ul>
  19570. <ul>
  19571. <a href="#setExtensions">set extensions</a> are supported<br>
  19572. </ul>
  19573. <ul>
  19574. <code>set &lt;name&gt; toggle</code><br>
  19575. toggles the pulse-width in between to the last value set by 'value' or 'dim' and 0 respectivly 100%<br>
  19576. </ul>
  19577. <ul>
  19578. <code>set &lt;name&gt; value &lt;value&gt;</code><br>
  19579. sets the pulse-width to the value specified<br>
  19580. Range is from 0 to 255 (for 8-bit resolution) (see <a href="http://arduino.cc/en/Reference/AnalogWrite">analogWrite()</a> for details)<br>
  19581. </ul>
  19582. <ul>
  19583. <code>set &lt;name&gt; dim &lt;value&gt;</code><br>
  19584. sets the pulse-width to the value specified in percent<br>
  19585. Range is from 0 to 100<br>
  19586. </ul>
  19587. <ul>
  19588. <code>set &lt;name&gt; dimUp</code><br>
  19589. increases the pulse-width by 10%<br>
  19590. </ul>
  19591. <ul>
  19592. <code>set &lt;name&gt; dimDown</code><br>
  19593. decreases the pulse-width by 10%<br>
  19594. </ul>
  19595. <a name="FRM_PWMget"></a>
  19596. <b>Get</b><br>
  19597. <ul>
  19598. N/A
  19599. </ul><br>
  19600. <a name="FRM_PWMattr"></a>
  19601. <b>Attributes</b><br>
  19602. <ul>
  19603. <li>restoreOnStartup &lt;on|off&gt;</li>
  19604. <li>restoreOnReconnect &lt;on|off&gt;</li>
  19605. <li><a href="#IODev">IODev</a><br>
  19606. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19607. than one FRM-device defined.)
  19608. </li>
  19609. <li><a href="#eventMap">eventMap</a><br></li>
  19610. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19611. </ul>
  19612. </ul>
  19613. <br>
  19614. <a name="FRM_RGB"></a>
  19615. <h3>FRM_RGB</h3>
  19616. <ul>
  19617. allows to drive LED-controllers and other multichannel-devices that use PWM as input by an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
  19618. <br>
  19619. The value set will be output by the specified pins as pulse-width-modulated signals.<br>
  19620. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19621. <a name="FRM_RGBdefine"></a>
  19622. <b>Define</b>
  19623. <ul>
  19624. <code>define &lt;name&gt; FRM_RGB &lt;pin&gt; &lt;pin&gt; &lt;pin&gt; [pin...]</code> <br>
  19625. Defines the FRM_RGB device. &lt;pin&gt> are the arduino-pin to use.<br>
  19626. For rgb-controlled devices first pin drives red, second pin green and third pin blue.
  19627. </ul>
  19628. <br>
  19629. <a name="FRM_RGBset"></a>
  19630. <b>Set</b><br>
  19631. <ul>
  19632. <code>set &lt;name&gt; on</code><br>
  19633. sets the pulse-width of all configured pins to 100%</ul><br>
  19634. <ul>
  19635. <code>set &lt;name&gt; off</code><br>
  19636. sets the pulse-width of all configured pins to 0%</ul><br>
  19637. <ul>
  19638. <a href="#setExtensions">set extensions</a> are supported</ul><br>
  19639. <ul>
  19640. <code>set &lt;name&gt; toggle</code><br>
  19641. toggles in between the last dimmed value, 0% and 100%. If no dimmed value was set before defaults to pulsewidth 50% on all channels</ul><br>
  19642. <ul>
  19643. <code>set &lt;name&gt; rgb &lt;value&gt;</code><br>
  19644. sets the pulse-width of all channels at once. Also sets the value toggle can switch to<br>
  19645. Value is encoded as hex-string, 2-digigs per channel (e.g. FFFFFF for reguler rgb)</ul><br>
  19646. <ul>
  19647. <code>set &lt;name&gt; pct &lt;value&gt;</code><br>
  19648. dims all channels at once while leving the ratio in between the channels unaltered.<br>
  19649. Range is 0-100 ('pct' stands for 'percent')</ul><br>
  19650. <ul>
  19651. <code>set &lt;name&gt; dimUp</code><br>
  19652. dims up by 10%</ul><br>
  19653. <ul>
  19654. <code>set &lt;name&gt; dimDown</code><br>
  19655. dims down by 10%</ul><br>
  19656. <a name="FRM_RGBget"></a>
  19657. <b>Get</b><br>
  19658. <ul>
  19659. <code>get &lt;name&gt; rgb</code><br>
  19660. returns the values set for all channels. Format is hex, 2 nybbles per channel.
  19661. </ul><br>
  19662. <ul>
  19663. <code>get &lt;name&gt; RGB</code><br>
  19664. returns the values set for all channels in normalized format. Format is hex, 2 nybbles per channel.
  19665. Values are scaled such that the channel with the highest value is set to FF. The real values are calculated
  19666. by multipying each byte with the value of 'pct'.
  19667. </ul><br>
  19668. <ul>
  19669. <code>get &lt;name&gt; pct</code><br>
  19670. returns the value of the channel with the highest value scaled to the range of 0-100 (percent).
  19671. </ul><br>
  19672. <a name="FRM_RGBattr"></a>
  19673. <b>Attributes</b><br>
  19674. <ul>
  19675. <li>restoreOnStartup &lt;on|off&gt;</li>
  19676. <li>restoreOnReconnect &lt;on|off&gt;</li>
  19677. <li><a href="#IODev">IODev</a><br>
  19678. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19679. than one FRM-device defined.)
  19680. </li>
  19681. <li><a href="#eventMap">eventMap</a><br></li>
  19682. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19683. </ul>
  19684. </ul>
  19685. <br>
  19686. <a name="FRM_ROTENC"></a>
  19687. <h3>FRM_ROTENC</h3>
  19688. <ul>
  19689. represents a rotary-encoder attached to two pins of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a><br>
  19690. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19691. <a name="FRM_ROTENCdefine"></a>
  19692. <b>Define</b>
  19693. <ul>
  19694. <code>define &lt;name&gt; FRM_ROTENC &lt;pinA&gt; &lt;pinB&gt; [id]</code> <br>
  19695. Defines the FRM_ROTENC device. &lt;pinA&gt> and &lt;pinA&gt> are the arduino-pins to use.<br>
  19696. [id] is the instance-id of the encoder. Must be a unique number per FRM-device (rages from 0-4 depending on Firmata being used, optional if a single encoder is attached to the arduino).<br>
  19697. </ul>
  19698. <br>
  19699. <a name="FRM_ROTENCset"></a>
  19700. <b>Set</b><br>
  19701. <li>reset<br>
  19702. resets to value of 'position' to 0<br></li>
  19703. <li>offset &lt;value&gt;<br>
  19704. set offset value of 'position'<br></li>
  19705. <a name="FRM_ROTENCget"></a>
  19706. <b>Get</b>
  19707. <ul>
  19708. <li>position<br>
  19709. returns the position of the rotary-encoder attached to pinA and pinB of the arduino<br>
  19710. the 'position' is the sum of 'value' and 'offset'<br></li>
  19711. <li>offset<br>
  19712. returns the offset value<br>
  19713. on shutdown of fhem the latest position-value is saved as new offset.<br></li>
  19714. <li>value<br>
  19715. returns the raw position value as it's reported by the rotary-encoder attached to pinA and pinB of the arduino<br>
  19716. this value is reset to 0 whenever Arduino restarts or Firmata is reinitialized<br></li>
  19717. </ul><br>
  19718. <a name="FRM_ROTENCattr"></a>
  19719. <b>Attributes</b><br>
  19720. <ul>
  19721. <li><a href="#IODev">IODev</a><br>
  19722. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19723. than one FRM-device defined.)
  19724. </li>
  19725. <li><a href="#eventMap">eventMap</a><br></li>
  19726. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19727. </ul>
  19728. </ul>
  19729. <br>
  19730. <a name="FRM_SERVO"></a>
  19731. <h3>FRM_SERVO</h3>
  19732. <ul>
  19733. represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
  19734. configured to drive a pwm-controlled servo-motor.<br>
  19735. The value set will be drive the shaft of the servo to the specified angle. see <a href="http://arduino.cc/en/Reference/ServoWrite">Servo.write</a> for values and range<br>
  19736. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19737. <a name="FRM_SERVOdefine"></a>
  19738. <b>Define</b>
  19739. <ul>
  19740. <code>define &lt;name&gt; FRM_SERVO &lt;pin&gt;</code> <br>
  19741. Defines the FRM_SERVO device. &lt;pin&gt> is the arduino-pin to use.
  19742. </ul>
  19743. <br>
  19744. <a name="FRM_SERVOset"></a>
  19745. <b>Set</b><br>
  19746. <ul>
  19747. <code>set &lt;name&gt; angle &lt;value&gt;</code><br>sets the angle of the servo-motors shaft to the value specified (in degrees).<br>
  19748. </ul>
  19749. <a name="FRM_SERVOget"></a>
  19750. <b>Get</b><br>
  19751. <ul>
  19752. N/A
  19753. </ul><br>
  19754. <a name="FRM_SERVOattr"></a>
  19755. <b>Attributes</b><br>
  19756. <ul>
  19757. <li><a href="#IODev">IODev</a><br>
  19758. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19759. than one FRM-device defined.)
  19760. </li>
  19761. <li>min-pulse<br>
  19762. sets the minimum puls-width to use. Defaults to 544. For most servos this translates into a rotation of 180° counterclockwise.</li>
  19763. <li>max-pulse<br>
  19764. sets the maximum puls-width to use. Defaults to 2400. For most servos this translates into a rotation of 180° clockwise</li>
  19765. <li><a href="#eventMap">eventMap</a><br></li>
  19766. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19767. </ul>
  19768. </ul>
  19769. <br>
  19770. <a name="FRM_STEPPER"></a>
  19771. <h3>FRM_STEPPER</h3>
  19772. <ul>
  19773. represents a stepper-motor attached to digital-i/o pins of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a><br>
  19774. Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
  19775. <a name="FRM_STEPPERdefine"></a>
  19776. <b>Define</b>
  19777. <ul>
  19778. <code>define &lt;name&gt; FRM_STEPPER [DRIVER|TWO_WIRE|FOUR_WIRE] &lt;directionPin&gt &lt;stepPin&gt [motorPin3 motorPin4] stepsPerRev [stepper-id]</code><br>
  19779. Defines the FRM_STEPPER device.
  19780. <li>[DRIVER|TWO_WIRE|FOUR_WIRE] defines the control-sequence being used to drive the motor.
  19781. <ul>
  19782. <li>DRIVER: motor is attached via a smart circuit that is controlled via two lines: 1 line defines the direction to turn, the other triggers one step per impluse.</li>
  19783. <li>FOUR_WIRE: motor is attached via four wires each driving one coil individually.</li>
  19784. <li>TWO_WIRE: motor is attached via two wires. This mode makes use of the fact that at any time two of the four motor
  19785. coils are the inverse of the other two so by using an inverting circuit to drive the motor the number of control connections can be reduced from 4 to 2.</li>
  19786. </ul>
  19787. </li>
  19788. <li>
  19789. <ul>
  19790. <li>The sequence of control signals for 4 control wires is as follows:<br>
  19791. <br>
  19792. <code>
  19793. Step C0 C1 C2 C3<br>
  19794. 1 1 0 1 0<br>
  19795. 2 0 1 1 0<br>
  19796. 3 0 1 0 1<br>
  19797. 4 1 0 0 1<br>
  19798. </code>
  19799. </li>
  19800. <li>The sequence of controls signals for 2 control wires is as follows:<br>
  19801. (columns C1 and C2 from above):<br>
  19802. <br>
  19803. <code>
  19804. Step C0 C1<br>
  19805. 1 0 1<br>
  19806. 2 1 1<br>
  19807. 3 1 0<br>
  19808. 4 0 0<br>
  19809. </code>
  19810. </li>
  19811. </ul>
  19812. </li>
  19813. <li>
  19814. If your stepper-motor does not move or does move but only in a single direction you will have to rearrage the pin-numbers to match the control sequence.<br>
  19815. that can be archived either by rearranging the physical connections, or by mapping the connection to the pin-definitions in FRM_STEPPERS define:<br>
  19816. e.g. the widely used cheap 28byj-48 you can get for few EUR on eBay including a simple ULN2003 driver interface may be defined by<br>
  19817. <code>define stepper FRM_STEPPER FOUR_WIRE 7 5 6 8 64 0</code><br>
  19818. when being connected to the arduio with:<br>
  19819. <code>motor pin1 <-> arduino pin5<br>
  19820. motor pin2 <-> arduino pin6<br>
  19821. motor pin3 <-> arduino pin7<br>
  19822. motor pin4 <-> arduino pin8<br>
  19823. motor pin5 <-> ground</code><br>
  19824. </li>
  19825. </ul>
  19826. <br>
  19827. <a name="FRM_STEPPERset"></a>
  19828. <b>Set</b><br>
  19829. <ul>
  19830. <code>set &lt;name&gt; reset</code>
  19831. <li>resets the reading 'position' to 0 without moving the motor</li>
  19832. <br>
  19833. <code>set &lt;name&gt; position &lt;position&gt; [speed] [acceleration] [deceleration]</code>
  19834. <li>moves the motor to the absolute position specified. positive or negative integer<br>
  19835. speed (10 * revolutions per minute, optional), defaults to 30, higher numbers are faster) At 2048 steps per revolution (28byj-48) a speed of 30 results in 3 rev/min<br>
  19836. acceleration and deceleration are optional.<br>
  19837. </li>
  19838. <br>
  19839. <code>set &lt;name&gt; step &lt;stepstomove&gt; [speed] [accel] [decel]</code>
  19840. <li>moves the motor the number of steps specified. positive or negative integer<br>
  19841. speed, accelleration and deceleration are optional.<br>
  19842. </li>
  19843. </ul>
  19844. <a name="FRM_STEPPERget"></a>
  19845. <b>Get</b><br>
  19846. <ul>
  19847. N/A
  19848. </ul><br>
  19849. <a name="FRM_STEPPERattr"></a>
  19850. <b>Attributes</b><br>
  19851. <ul>
  19852. <li>restoreOnStartup &lt;on|off&gt;</li>
  19853. <li>restoreOnReconnect &lt;on|off&gt;</li>
  19854. <li><a href="#IODev">IODev</a><br>
  19855. Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
  19856. than one FRM-device defined.)
  19857. </li>
  19858. <li>>speed (same meaning as in 'set position')</li>
  19859. <li>acceleration (same meaning as in 'set position')</li>
  19860. <li>deceleration (same meaning as in 'set position')</li>
  19861. <li><a href="#eventMap">eventMap</a><br></li>
  19862. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  19863. </ul>
  19864. </ul>
  19865. <br>
  19866. <a name="FReplacer"></a>
  19867. <h3>FReplacer</h3>
  19868. <ul>
  19869. This module provides a generic way to modify the contents of a file with Readings of other devices or the result of Perl expressions.<br>
  19870. The typical use case is a custom designed SVG graphics template file which contains place holders that will be replaced with actual values.<br>
  19871. The resulting SVG file can then optionally be converted to a PNG file which can be used as an online screensaver for Kindle devices for example.
  19872. <br><br>
  19873. <a name="FReplacerdefine"></a>
  19874. <b>Define</b>
  19875. <ul>
  19876. <br>
  19877. <code>define &lt;name&gt; FReplacer &lt;InputFile&gt; &lt;OutputFile&gt; &lt;Interval&gt;</code>
  19878. <br><br>
  19879. The module reads the given InputFile every Interval seconds, replaces strings with the results of expressions as defined in attributes and writes the result to the OutputFile<br>
  19880. <br>
  19881. Example:<br>
  19882. <ul><code>define fr FReplacer /opt/fhem/www/images/template.svg /opt/fhem/www/images/status.svg 60</code></ul>
  19883. </ul>
  19884. <br>
  19885. <a name="FReplacerconfiguration"></a>
  19886. <b>Configuration of FReplacer Devices</b><br><br>
  19887. <ul>
  19888. Specify pairs of <code>attr FxxRegex</code> and <code>attr FxxReading</code> or <code>attr FxxExpr</code> to define which strings / placeholders in the InputFile should be replaced with which redings / expressions
  19889. <br><br>
  19890. Example:<br>
  19891. <ul><code>
  19892. define fr FReplacer /opt/fhem/www/images/template.svg /opt/fhem/www/images/status.svg 60 <br>
  19893. attr fr Rep01Regex HeizungStat<br>
  19894. attr fr Rep01Reading WP:Status<br>
  19895. attr fr Rep01MaxAge 600:Heizung Aus<br>
  19896. attr fr Rep02Regex AbluftTemp<br>
  19897. attr fr Rep02Reading Lueftung:Temp_Abluft<br>
  19898. attr fr Rep02Format "%.1f"<br>
  19899. attr fr Rep03Regex AussenTemp<br>
  19900. attr fr Rep03Expr sprintf("%.1f", ReadingsVal("Lueftung", "Temp_Aussen", 0))<br>
  19901. </code></ul>
  19902. <br>
  19903. If you want to convert a resulting SVG file to a PNG e.g. for use as online screen saver on a Kindle device, <br>
  19904. you have to specify the external conversion command with the attribute PostCommand, for Example:<br>
  19905. <ul><code>
  19906. attr fr PostCommand convert /opt/fhem/www/images/status.svg -type GrayScale -depth 8 /opt/fhem/www/images/status.png 2>/dev/null &
  19907. </code></ul>
  19908. <br>
  19909. If you want to convert the replacement text from Readings to UTF8, e.g. to make special characters / umlauts display correctly, specify
  19910. <ul><code>
  19911. attr fr ReplacementEncode UTF-8
  19912. </code></ul>
  19913. <br>
  19914. </ul>
  19915. <a name="FReplacerset"></a>
  19916. <b>Set-Commands</b><br>
  19917. <ul>
  19918. <li><b>ReplaceNow</b></li>
  19919. starts a replace without waiting for the interval
  19920. </ul>
  19921. <br>
  19922. <a name="FReplacerget"></a>
  19923. <b>Get-Commands</b><br>
  19924. <ul>
  19925. none
  19926. </ul>
  19927. <br>
  19928. <a name="FReplacerReadings"></a>
  19929. <b>Readings</b><br>
  19930. <ul>
  19931. <li><b>LastUpdate</b></li>
  19932. Date / Time of the last update of the output file / image. This reading is formatted with strftime and the default format string is "%d.%m.%Y %T".<br> This can be changed with the attribute LUTimeFormat.
  19933. </ul>
  19934. <br>
  19935. <a name="FReplacerattr"></a>
  19936. <b>Attributes</b><br><br>
  19937. <ul>
  19938. <li><b>Rep[0-9]+Regex</b></li>
  19939. defines the regex to be used for finding the right string to be replaced with the corresponding Reading / Expr result
  19940. <li><b>Rep[0-9]+Reading</b></li>
  19941. defines a device and reading to be used as replacement value. It is specified as devicename:readingname:default_value.<br>
  19942. The default_value is optional and defaults to 0. If the reading doesn't exist, default_value is used.
  19943. <li><b>Rep[0-9]+Text</b></li>
  19944. Use static text as replacement value.
  19945. <li><b>Rep[0-9]+Tidy</b></li>
  19946. XML encode special characters in this replacement.
  19947. <li><b>Rep[0-9]+MaxAge</b></li>
  19948. this can optionally be used together with RepReading to define a maximum age of the reading. It is specified as seconds:replacement. If the corresponding reading has not been updated for the specified number of seconds, then the replacement is used instead of the reading to do the replacement and further RepExpr or RepFormat attributes will be ignored for this value<br>
  19949. If you specify the replacement as {expr} then it is evaluated as a perl expression instead of a string.<br>
  19950. <li><b>Rep[0-9]+MinValue</b></li>
  19951. this can optionally be used together with RepReading to define a minimum value of the reading. It is specified as min:replacement. If the corresponding reading is too small, then the replacement string is used instead of the reading to do the replacement and further RepExpr or RepFormat attributes will be ignored for this value<br>
  19952. If you specify the replacement as {expr} then it is evaluated as a perl expression instead of a string.<br>
  19953. <li><b>Rep[0-9]+MaxValue</b></li>
  19954. this can optionally be used together with RepReading to define a maximum value of the reading. It is specified as max:replacement. If the corresponding reading is too big, then the replacement string is used instead of the reading to do the replacement and further RepExpr or RepFormat attributes will be ignored for this value<br>
  19955. If you specify the replacement as {expr} then it is evaluated as a perl expression instead of a string.<br>
  19956. <li><b>Rep[0-9]+Expr</b></li>
  19957. defines an optional expression that can be used to compute the replacement value. If RepExpr is used together with RepReading then the expression is evaluated after getting the reading and the value of the reading can be used in the expression as $replacement. <br>
  19958. If only RepExpr is specified then readings can be retrieved with the perl function ReadingsVal() inside the expression. <br>
  19959. If neither RepExpr nor RepReading is specified then the match for the correspondig regex will be replaced with an empty string.
  19960. <li><b>Rep[0-9]+Format</b></li>
  19961. defines an optional format string to be used in a sprintf statement to format the replacement before it is applied.<br>
  19962. Can be used with RepReading or RepExpr or both.
  19963. <li><b>Rep[0-9]+SVG</b></li>
  19964. defines a SVG Plot be used as replacement. It is specified as the name of a defined fhem SVG.<br>
  19965. In order to include this in a SVG template, include e.g. a group in the template with a rect in it and then replace the rect with the SVG Plot data.
  19966. <li><b>LUTimeFormat</b></li>
  19967. defines a time format string (see Posix strftime format) to be used when creating the reading LastUpdate.
  19968. <li><b>PostCommand</b></li>
  19969. Execute an external command after writing the output file, e.g. to convert a resulting SVG file to a PNG file.
  19970. For an eInk Kindle you need a PNG in 8 bit greyscale format. A simple example to call the convert utility from ImageMagick would be <br>
  19971. <code> attr fr PostCommand convert /opt/fhem/www/images/status.svg
  19972. -type GrayScale -depth 8 /opt/fhem/www/images/status.png 2>/dev/null & </code><br>
  19973. a more advanced example that starts inkscape before Imagemagick to make sure that embedded Icons in a SVG file are converted
  19974. correctly could be <br>
  19975. <code> attr fr PostCommand bash -c 'inkscape /opt/fhem/www/images/status.svg -e=tmp.png;; convert tmp.png -type GrayScale -depth 8 /opt/fhem/www/images/status.png' >/dev/null 2>&1 & </code><br>
  19976. or even <br>
  19977. <code> attr fr PostCommand bash -c 'inkscape /opt/fhem/www/images/status.svg -e=tmp.png -b=rgb\(255,255,255\) --export-height=1024 --export-width=758;; convert tmp.png -type GrayScale -depth 8 /opt/fhem/www/images/status.png' >/dev/null 2>&1 & </code><br>
  19978. Inkscape might be needed because ImageMagick seems to have problems convertig SVG files with embedded icons. However a PNG file created by Inkscape is not in 8 bit greyscale so Imagemagick can be run after Inkscape to convert to 8 bit greyscale
  19979. <li><b>ReplacementEncode</b></li>
  19980. defines an encoding to apply to the replacement string, e.g. UTF-8
  19981. <li><b>disable</b></li>
  19982. disables the update timer
  19983. </ul>
  19984. </ul>
  19985. <a name="FS20"></a>
  19986. <h3>FS20</h3>
  19987. <ul>
  19988. The FS20 protocol is used by a wide range of devices, which are either of
  19989. the sender/sensor category or the receiver/actuator category. The radio
  19990. (868.35 MHz) messages are either received through an <a href="#FHZ">FHZ</a>
  19991. or an <a href="#CUL">CUL</a> device, so this must be defined first.
  19992. <br><br>
  19993. <a name="FS20define"></a>
  19994. <b>Define</b>
  19995. <ul>
  19996. <code>define &lt;name&gt; FS20 &lt;housecode&gt; &lt;button&gt;
  19997. [fg &lt;fgaddr&gt;] [lm &lt;lmaddr&gt;] [gm FF] </code>
  19998. <br><br>
  19999. The values of housecode, button, fg, lm, and gm can be either defined as
  20000. hexadecimal value or as ELV-like "quad-decimal" value with digits 1-4. We
  20001. will reference this ELV-like notation as ELV4 later in this document. You
  20002. may even mix both hexadecimal and ELV4 notations, because FHEM can detect
  20003. the used notation automatically by counting the digits.<br>
  20004. <ul>
  20005. <li><code>&lt;housecode&gt;</code> is a 4 digit hex or 8 digit ELV4 number,
  20006. corresponding to the housecode address.</li>
  20007. <li><code>&lt;button&gt;</code> is a 2 digit hex or 4 digit ELV4 number,
  20008. corresponding to a button of the transmitter.</li>
  20009. <li>The optional <code>&lt;fgaddr&gt;</code> specifies the function group.
  20010. It is a 2 digit hex or 4 digit ELV address. The first digit of the hex
  20011. address must be F or the first 2 digits of the ELV4 address must be
  20012. 44.</li>
  20013. <li>The optional <code>&lt;lmaddr&gt;</code> specifies the local
  20014. master. It is a 2 digit hex or 4 digit ELV address. The last digit of the
  20015. hex address must be F or the last 2 digits of the ELV4 address must be
  20016. 44.</li>
  20017. <li>The optional gm specifies the global master, the address must be FF if
  20018. defined as hex value or 4444 if defined as ELV4 value.</li>
  20019. </ul>
  20020. <br>
  20021. Examples:
  20022. <ul>
  20023. <code>define lamp FS20 7777 00 fg F1 gm F</code><br>
  20024. <code>define roll1 FS20 7777 01</code><br>
  20025. <code>define otherlamp FS20 24242424 1111 fg 4412 gm 4444</code><br>
  20026. <code>define otherroll1 FS20 24242424 1114</code>
  20027. </ul>
  20028. </ul>
  20029. <br>
  20030. <a name="FS20set"></a>
  20031. <b>Set </b>
  20032. <ul>
  20033. <code>set &lt;name&gt; &lt;value&gt; [&lt;time&gt]</code>
  20034. <br><br>
  20035. where <code>value</code> is one of:<br>
  20036. <ul><code>
  20037. dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50%<br>
  20038. dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br>
  20039. dimdown<br>
  20040. dimup<br>
  20041. dimupdown<br>
  20042. off<br>
  20043. off-for-timer<br>
  20044. on # dimmer: set to value before switching it off<br>
  20045. on-for-timer # see the note<br>
  20046. on-old-for-timer # set to previous (before switching it on)<br>
  20047. ramp-on-time # time to reach the desired dim value on dimmers<br>
  20048. ramp-off-time # time to reach the off state on dimmers<br>
  20049. reset<br>
  20050. sendstate<br>
  20051. timer<br>
  20052. toggle # between off and previous dim val<br>
  20053. </code></ul>
  20054. The <a href="#setExtensions"> set extensions</a> are also supported.<br>
  20055. <br>
  20056. Examples:
  20057. <ul>
  20058. <code>set lamp on</code><br>
  20059. <code>set lamp1,lamp2,lamp3 on</code><br>
  20060. <code>set lamp1-lamp3 on</code><br>
  20061. <code>set lamp on-for-timer 12</code><br>
  20062. </ul>
  20063. <br>
  20064. Notes:
  20065. <ul>
  20066. <li>Use reset with care: the device forgets even the housecode.
  20067. </li>
  20068. <li>As the FS20 protocol needs about 0.22 seconds to transmit a
  20069. sequence, a pause of 0.22 seconds is inserted after each command.
  20070. </li>
  20071. <li>The FS20ST switches on for dim*%, dimup. It does not respond to
  20072. sendstate.</li>
  20073. <li>If the timer is set (i.e. it is not 0) then on, dim*,
  20074. and *-for-timer will take it into account (at least by the FS20ST).
  20075. </li>
  20076. <li>The <code>time</code> argument ranges from 0.25sec to 4 hours and 16
  20077. minutes. As the time is encoded in one byte there are only 112
  20078. distinct values, the resolution gets coarse with larger values. The
  20079. program will report the used timeout if the specified one cannot be
  20080. set exactly. The resolution is 0.25 sec from 0 to 4 sec, 0.5 sec
  20081. from 4 to 8 sec, 1 sec from 8 to 16 sec and so on. If you need better
  20082. precision for large values, use <a href="#at">at</a> which has a 1
  20083. sec resolution.</li>
  20084. </ul>
  20085. </ul>
  20086. <br>
  20087. <b>Get</b> <ul>N/A</ul><br>
  20088. <a name="FS20attr"></a>
  20089. <b>Attributes</b>
  20090. <ul>
  20091. <a name="IODev"></a>
  20092. <li>IODev<br>
  20093. Set the IO or physical device which should be used for sending signals
  20094. for this "logical" device. An example for the physical device is an FHZ
  20095. or a CUL. Note: Upon startup FHEM assigns each logical device
  20096. (FS20/HMS/KS300/etc) the last physical device which can receive data
  20097. for this type of device. The attribute IODev needs to be used only if
  20098. you attached more than one physical device capable of receiving signals
  20099. for this logical device.</li><br>
  20100. <a name="eventMap"></a>
  20101. <li>eventMap<br>
  20102. Replace event names and set arguments. The value of this attribute
  20103. consists of a list of space separated values, each value is a colon
  20104. separated pair. The first part specifies the "old" value, the second
  20105. the new/desired value. If the first character is slash(/) or komma(,)
  20106. then split not by space but by this character, enabling to embed spaces.
  20107. Examples:<ul><code>
  20108. attr store eventMap on:open off:closed<br>
  20109. attr store eventMap /on-for-timer 10:open/off:closed/<br>
  20110. set store open
  20111. </code></ul>
  20112. </li><br>
  20113. <a name="attrdummy"></a>
  20114. <li>dummy<br>
  20115. Set the device attribute dummy to define devices which should not
  20116. output any radio signals. Associated notifys will be executed if
  20117. the signal is received. Used e.g. to react to a code from a sender, but
  20118. it will not emit radio signal if triggered in the web frontend.
  20119. </li><br>
  20120. <a name="follow-on-for-timer"></a>
  20121. <li>follow-on-for-timer<br>
  20122. schedule a "setstate off;trigger off" for the time specified as argument to
  20123. the on-for-timer command. Or the same with on, if the command is
  20124. off-for-timer.
  20125. </li><br>
  20126. <a name="follow-on-timer"></a>
  20127. <li>follow-on-timer<br>
  20128. Like with follow-on-for-timer schedule a "setstate off;trigger off", but
  20129. this time for the time specified as argument in seconds to this attribute.
  20130. This is used to follow the pre-programmed timer, which was set previously
  20131. with the timer command or manually by pressing the button on the device,
  20132. see your manual for details. Works for on and dim commands.
  20133. </li><br>
  20134. <a name="model"></a>
  20135. <li>model<br>
  20136. The model attribute denotes the model type of the device.
  20137. The attributes will (currently) not be used by the fhem.pl directly.
  20138. It can be used by e.g. external programs or web interfaces to
  20139. distinguish classes of devices and send the appropriate commands
  20140. (e.g. "on" or "off" to a fs20st, "dim..%" to fs20du etc.).
  20141. The spelling of the model names are as quoted on the printed
  20142. documentation which comes which each device. This name is used
  20143. without blanks in all lower-case letters. Valid characters should be
  20144. <code>a-z 0-9</code> and <code>-</code> (dash),
  20145. other characters should be ommited. Here is a list of "official"
  20146. devices:<br><br>
  20147. <b>Sender/Sensor</b>: fs20fms fs20hgs fs20irl fs20kse fs20ls
  20148. fs20pira fs20piri fs20piru fs20s16 fs20s20 fs20s4 fs20s4a fs20s4m
  20149. fs20s4u fs20s4ub fs20s8 fs20s8m fs20sd fs20sn fs20sr fs20ss
  20150. fs20str fs20tc1 fs20tc6 fs20tfk fs20tk fs20uts fs20ze fs20bf fs20si3<br><br>
  20151. <b>Dimmer</b>: fs20di fs20di10 fs20du<br><br>
  20152. <b>Receiver/Actor</b>: fs20as1 fs20as4 fs20ms2 fs20rgbsa fs20rst
  20153. fs20rsu fs20sa fs20sig fs20sm4 fs20sm8 fs20st fs20su fs20sv fs20ue1
  20154. fs20usr fs20ws1
  20155. </li><br>
  20156. <a name="ignore"></a>
  20157. <li>ignore<br>
  20158. Ignore this device, e.g. if it belongs to your neighbour. The device
  20159. won't trigger any FileLogs/notifys, issued commands will silently
  20160. ignored (no RF signal will be sent out, just like for the <a
  20161. href="#attrdummy">dummy</a> attribute). The device won't appear in the
  20162. list command (only if it is explicitely asked for it), nor will it
  20163. appear in commands which use some wildcard/attribute as name specifiers
  20164. (see <a href="#devspec">devspec</a>). You still get them with the
  20165. "ignored=1" special devspec.
  20166. </li><br>
  20167. <li><a href="#do_not_notify">do_not_notify</a></li>
  20168. <li><a href="#showtime">showtime</a></li>
  20169. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  20170. <li>useSetExtensions<br>
  20171. Setting it to 0 you can disable using the Setextensions. Deffault is 1.
  20172. </li><br>
  20173. </ul>
  20174. <br>
  20175. <a name="FS20events"></a>
  20176. <b>Generated events:</b>
  20177. <ul>
  20178. From an FS20 device you can receive one of the following events.
  20179. <li>on</li>
  20180. <li>off</li>
  20181. <li>toggle</li>
  20182. <li>dimdown</li>
  20183. <li>dimup</li>
  20184. <li>dimupdown</li>
  20185. <li>on-for-timer</li>
  20186. Which event is sent is device dependent and can sometimes configured on
  20187. the device.
  20188. </ul>
  20189. </ul>
  20190. <a name="FTUISRV"></a>
  20191. <h3>FTUISRV</h3>
  20192. <ul>
  20193. Provides a mini HTTP server plugin for FHEMWEB for the specific use with FTUI.
  20194. It serves files from a given directory and parses them according to specific rules.
  20195. The goal is to be able to create reusable elements of multiple widgets and surrounding tags on multiple pages and even with different devices or other modifications. Therefore changes to the design have to be done only at one place and not at every occurence of the template (called parts in this doc).
  20196. FTUISRV is an extension to <a href="FTUISRV">FHEMWEB</a> and code is based on HTTPSRV. You must install FHEMWEB to use FTUISRV.</p>
  20197. FTUISRV is able to handled includes and replacements in files before sending the result back to the client (Browser).
  20198. Special handling of files is ONLY done if the filenames include the specific pattern ".ftui." in the filename.
  20199. For example a file named "test.ftui.html" would be handled specifically in FTUISRV.
  20200. <br><br>
  20201. FTUI files can contain the following elements
  20202. <ul><br>
  20203. <li><code>&lt;?ftui-inc="name" varname1="content1" ... varnameN="contentN" ?&gt;</code> <br>
  20204. INCLUDE statement: Including other files that will be embedded in the result at the place of the include statement.
  20205. Additionally in the embedded files the variables listed as varnamex will be replaced by the content
  20206. enclosed in double quotes (").
  20207. <br>
  20208. The quotation marks and the spaces between the variable replacements and before the final ? are significant and can not be ommitted.
  20209. <br>Example: <code>&lt;?ftui-inc="temphum-inline.ftui.part" thdev="sensorWZ" thformat="top-space-2x" thtemp="measured-temp" ?&gt;</code>
  20210. </li><br>
  20211. <li><code>&lt;?ftui-if=( expression ) ?&gt; ... [ &lt;?ftui-else ?&gt; ... ] &lt;?ftui-endif ?&gt; </code> <br>
  20212. IF statement: Allow the inclusion of a block depending on an expression that might again include also variables and expressions in fhem. The else block is optional and can contain a block that is included if the expression is empty or 0 .
  20213. <br>
  20214. Example: <code>&lt;?ftui-if=( [tempdevice:batteryok] ) ?&gt; ... &lt;?ftui-else ?&gt; ... &lt;?ftui-endif ?&gt; </code>
  20215. <br>
  20216. Note: The expression is not automatically evaluated in perl, if this is needed there should be the set-logic for perl expressions being used
  20217. Example: <code>&lt;?ftui-if=( {( ReadingsVal("tempdevice","batteryok","") eq "ok" )} ) ?&gt; ... &lt;?ftui-else ?&gt; ... &lt;?ftui-endif ?&gt; </code>
  20218. </li><br>
  20219. <li><code>&lt;?ftui-loopinc="name" loopvariable=( loop-expression ) varname1="content1" ... varnameN="contentN" ?&gt;</code> <br>
  20220. LOOP-INCLUDE statement: Including other files that will be embedded in the result at the place of the include statement. The include will be executed once for every entry (line) that is returned when evaluating the loop-expression as an fhem command. So the loop expression could be a list command returning multiple devices
  20221. <br>
  20222. The quotation marks and the spaces between the variable replacements and before the final ? are significant and can not be ommitted.
  20223. <br>Example: <code>&lt;?ftui-loopinc="temphum-inline.ftui.part" thdev=( list TYPE=CUL_TX ) thformat="top-space-2x" thtemp="measured-temp" ?&gt;</code>
  20224. </li><br>
  20225. <li><code>&lt;?ftui-key=varname ?&gt;</code> <br>
  20226. VARIABLE specification: Replacement of variables with given parameters in the include statement (or the include header).
  20227. The text specified for the corresponding variable will be inserted at the place of the FTUI-Statement in parentheses.
  20228. There will be no space or other padding added before or after the replacement,
  20229. the replacement will be done exactly as specified in the definition in the include
  20230. <br>Example: <code>&lt;?ftui-key=measured-temp ?&gt;</code>
  20231. </li><br>
  20232. <li><code>&lt;?ftui-header="include name" varname1[="defaultcontent1"] .. varnameN[="defaultcontentN"] ?&gt;</code> <br>
  20233. HEADER definition: Optional header for included files that can be used also to specify which variables are used in the include
  20234. file and optionally specify default content for the variables that will be used if no content is specified in the include statement.
  20235. the header is removed from the output given by FTUISRV.
  20236. Headers are only required if default values should be specified and are helpful in showing the necessary variable names easy for users.
  20237. (The name for the include does not need to be matching the file name)
  20238. <br>Example: <code>&lt;?ftui-header="TempHum inline" thdev thformat thtemp="temperature" ?&gt;</code>
  20239. Headers can also use device readings in for setting default values in the form of <code>[device:reading]</code>(according to the syntax and logic used in the set command)
  20240. <br>Example: <code>&lt;?ftui-header="TempHum inline" thdev thformat thbattery=[temphm:batteryok] thtemp="temperature" ?&gt;</code>
  20241. <br>
  20242. In the special case, where also variable content shall be used in the header part a special escaping for the closing tags for the ftui-key needs to be used. That means for the example above:
  20243. Example: <code>&lt;?ftui-header="TempHum inline" thdev thformat thbattery=[<ftui-key=thdev ?\>:batteryok] thtemp="temperature" ?&gt;</code>
  20244. </li><br>
  20245. </ul>
  20246. <br><br>
  20247. <a name="FTUISRVdefine"></a>
  20248. <b>Define</b>
  20249. <ul>
  20250. <code>define &lt;name&gt; &lt;infix&gt; &lt;directory&gt; &lt;friendlyname&gt;</code><br><br>
  20251. Defines the HTTP server. <code>&lt;infix&gt;</code> is the portion behind the FHEMWEB base URL (usually
  20252. <code>http://hostname:8083/fhem</code>), <code>&lt;directory&gt;</code> is the absolute path the
  20253. files are served from, and <code>&lt;friendlyname&gt;</code> is the name displayed in the side menu of FHEMWEB.<p><p>
  20254. <br>
  20255. </ul>
  20256. <a name="FTUISRVset"></a>
  20257. <b>Set</b>
  20258. <ul>
  20259. n/a
  20260. </ul>
  20261. <br><br>
  20262. <a name="FTUISRVattr"></a>
  20263. <b>Attributes</b>
  20264. <br><br>
  20265. <ul>
  20266. <li><code>validateFiles &lt;0,1,2&gt;</code><br>
  20267. Allows basic validation of HTML/Part files on correct opening/closing tags etc.
  20268. Here the original files from disk are validated (setting to 1 means validation is done / 2 means also the full parsing is logged (Attention very verbose !)
  20269. </li>
  20270. <li><code>validateResult &lt;0,1,2&gt;</code><br>
  20271. Allows basic validation of HTML content on correct opening/closing tags etc. Here the resulting content provided to the browser
  20272. (after parsing) are validated (setting to 1 means validation is done / 2 means also the full parsing is logged (Attention very verbose !)
  20273. </li>
  20274. <li><code>templateFiles &lt;relative paths separated by :&gt;</code><br>
  20275. specify specific files / urls to be handled as templates even if not containing the ftui in the filename. Multiple files can be separated by colon.
  20276. </li>
  20277. </ul>
  20278. <br><br>
  20279. </ul>
  20280. <a name="FULLY"></a>
  20281. <h3>FULLY</h3>
  20282. <ul>
  20283. Module for controlling of Fully browser on Android tablets.
  20284. </br></br>
  20285. <a name="HMCCUdefine"></a>
  20286. <b>Define</b><br/><br/>
  20287. <ul>
  20288. <code>define &lt;name&gt; FULLY &lt;HostOrIP&gt; &lt;password&gt; [&lt;poll-interval&gt;]</code>
  20289. <br/><br/>
  20290. The parameter <i>password</i> is the password set in Fully browser.
  20291. </ul>
  20292. <br/>
  20293. <a name="FULLYset"></a>
  20294. <b>Set</b><br/><br/>
  20295. <ul>
  20296. <li><b>set &lt;name&gt; brightness 0-255</b><br/>
  20297. Adjust screen brightness.
  20298. </li><br/>
  20299. <li><b>set &lt;name&gt; clearCache</b><br/>
  20300. Clear browser cache.
  20301. </li><br/>
  20302. <li><b>set &lt;name&gt; exit</b><br/>
  20303. Terminate Fully.
  20304. </li><br/>
  20305. <li><b>set &lt;name&gt; motionDetection { on | off }</b><br/>
  20306. Turn motion detection by camera on or off.
  20307. </li><br/>
  20308. <li><b>set &lt;name&gt; { lock | unlock }</b><br/>
  20309. Lock or unlock display.
  20310. </li><br/>
  20311. <li><b>set &lt;name&gt; { on | off }</b><br/>
  20312. Turn tablet display on or off.
  20313. </li><br/>
  20314. <li><b>set &lt;name&gt; restart</b><br/>
  20315. Restart Fully.
  20316. </li><br/>
  20317. <li><b>set &lt;name&gt; speak &lt;text&gt;</b><br/>
  20318. Audio output of <i>text</i>. If <i>text</i> contains blanks it must be enclosed
  20319. in double quotes. The text can contain device readings in format [device:reading].
  20320. </li><br/>
  20321. <li><b>set &lt;name&gt; url [&lt;URL&gt;]</b><br/>
  20322. Navigate to <i>URL</i>. If no URL is specified navigate to start URL.
  20323. </li><br/>
  20324. </ul>
  20325. <br/>
  20326. <a name="FULLYget"></a>
  20327. <b>Get</b><br/><br/>
  20328. <ul>
  20329. <li><b>get &lt;name&gt; info</b><br/>
  20330. Display Fully information.
  20331. </li><br/>
  20332. <li><b>get &lt;name&gt; stats</b><br/>
  20333. Show Fully statistics.
  20334. </li><br/>
  20335. <li><b>get &lt;name&gt; update</b><br/>
  20336. Update readings.
  20337. </li><br/>
  20338. </ul>
  20339. <br/>
  20340. <a name="FULLYattr"></a>
  20341. <b>Attributes</b><br/>
  20342. <br/>
  20343. <ul>
  20344. <li><b>pollInterval &lt;seconds&gt;</b><br/>
  20345. Set polling interval for FULLY device information.
  20346. If <i>seconds</i> is 0 polling is turned off. Valid values are from 10 to
  20347. 86400 seconds.
  20348. </li><br/>
  20349. <li><b>requestTimeout &lt;seconds&gt;</b><br/>
  20350. Set timeout for http requests. Default is 4 seconds.
  20351. </li><br/>
  20352. </ul>
  20353. </ul>
  20354. <a name="FileLog"></a>
  20355. <h3>FileLog</h3>
  20356. <ul>
  20357. <br>
  20358. <a name="FileLogdefine"></a>
  20359. <b>Define</b>
  20360. <ul>
  20361. <code>define &lt;name&gt; FileLog &lt;filename&gt; &lt;regexp&gt; [readonly]</code>
  20362. <br><br>
  20363. Log events to <code>&lt;filename&gt;</code>. The log format is
  20364. <ul><code><br>
  20365. YYYY-MM-DD_HH:MM:SS &lt;device&gt; &lt;event&gt;<br>
  20366. <br></code></ul>
  20367. The regexp will be checked against the device name
  20368. devicename:event or timestamp:devicename:event combination.
  20369. The regexp must match the complete string, not just a part of it.
  20370. <br>
  20371. <code>&lt;filename&gt;</code> may contain %-wildcards of the
  20372. POSIX strftime function of the underlying OS (see your strftime manual).
  20373. Common used wildcards are:
  20374. <ul>
  20375. <li><code>%d</code> day of month (01..31)</li>
  20376. <li><code>%m</code> month (01..12)</li>
  20377. <li><code>%Y</code> year (1970...)</li>
  20378. <li><code>%w</code> day of week (0..6); 0 represents Sunday</li>
  20379. <li><code>%j</code> day of year (001..366)</li>
  20380. <li><code>%U</code> week number of year with Sunday as first day of week (00..53)</li>
  20381. <li><code>%W</code> week number of year with Monday as first day of week (00..53)</li>
  20382. </ul>
  20383. FHEM also replaces <code>%L</code> by the value of the global logdir attribute.<br>
  20384. Before using <code>%V</code> for ISO 8601 week numbers check if it is
  20385. correctly supported by your system (%V may not be replaced, replaced by an
  20386. empty string or by an incorrect ISO-8601 week number, especially
  20387. at the beginning of the year)
  20388. If you use <code>%V</code> you will also have to use %G
  20389. instead of %Y for the year!<br>
  20390. If readonly is specified, then the file is used only for visualisation, and
  20391. it is not opened for writing.
  20392. Examples:
  20393. <ul>
  20394. <code>define lamplog FileLog %L/lamp.log lamp</code><br>
  20395. <code>define wzlog FileLog ./log/wz-%Y-%U.log
  20396. wz:(measured-temp|actuator).*</code><br>
  20397. With ISO 8601 week numbers, if supported:<br>
  20398. <code>define wzlog FileLog ./log/wz-%G-%V.log
  20399. wz:(measured-temp|actuator).*</code><br>
  20400. </ul>
  20401. <br>
  20402. </ul>
  20403. <a name="FileLogset"></a>
  20404. <b>Set </b>
  20405. <ul>
  20406. <li>reopen
  20407. <ul>
  20408. Reopen a FileLog after making some manual changes to the
  20409. logfile.
  20410. </ul>
  20411. </li>
  20412. <li>clear
  20413. <ul>
  20414. Clears and reopens the logfile.
  20415. </ul>
  20416. </li>
  20417. <li>addRegexpPart &lt;device&gt; &lt;regexp&gt;
  20418. <ul>
  20419. add a regexp part, which is constructed as device:regexp. The parts
  20420. are separated by |. Note: as the regexp parts are resorted, manually
  20421. constructed regexps may become invalid.
  20422. </ul>
  20423. </li>
  20424. <li>removeRegexpPart &lt;re&gt;
  20425. <ul>
  20426. remove a regexp part. Note: as the regexp parts are resorted, manually
  20427. constructed regexps may become invalid.<br>
  20428. The inconsistency in addRegexpPart/removeRegexPart arguments originates
  20429. from the reusage of javascript functions.
  20430. </ul>
  20431. </li>
  20432. <li>absorb secondFileLog
  20433. <ul>
  20434. merge the current and secondFileLog into one file, add the regexp of the
  20435. secondFileLog to the current one, and delete secondFileLog.<br>
  20436. This command is needed to create combined plots (weblinks).<br>
  20437. <b>Notes:</b>
  20438. <ul>
  20439. <li>secondFileLog will be deleted (i.e. the FHEM definition).</li>
  20440. <li>only the current files will be merged.</li>
  20441. <li>weblinks using secondFilelog will become broken, they have to be
  20442. adopted to the new logfile or deleted.</li>
  20443. </ul>
  20444. </ul>
  20445. </li>
  20446. <br>
  20447. </ul>
  20448. <br>
  20449. <a name="FileLogget"></a>
  20450. <b>Get</b>
  20451. <ul>
  20452. <code>get &lt;name&gt; &lt;infile&gt; &lt;outfile&gt; &lt;from&gt;
  20453. &lt;to&gt; &lt;column_spec&gt; </code>
  20454. <br><br>
  20455. Read data from the logfile, used by frontends to plot data without direct
  20456. access to the file.<br>
  20457. <ul>
  20458. <li>&lt;infile&gt;<br>
  20459. Name of the logfile to open. Special case: "-" is the currently active
  20460. logfile, "CURRENT" opens the file corresponding to the "from"
  20461. parameter.
  20462. </li>
  20463. <li>&lt;outfile&gt;<br>
  20464. If it is "-", you get the data back on the current connection, else it
  20465. is the prefix for the output file. If more than one file is specified,
  20466. the data is separated by a comment line for "-", else it is written in
  20467. separate files, numerated from 0.
  20468. </li>
  20469. <li>&lt;from&gt; &lt;to&gt;<br>
  20470. Used to grep the data. The elements should correspond to the
  20471. timeformat or be an initial substring of it.</li>
  20472. <li>&lt;column_spec&gt;<br>
  20473. For each column_spec return a set of data in a separate file or
  20474. separated by a comment line on the current connection.<br>
  20475. Syntax: &lt;col&gt;:&lt;regexp&gt;:&lt;default&gt;:&lt;fn&gt;<br>
  20476. <ul>
  20477. <li>&lt;col&gt;
  20478. The column number to return, starting at 1 with the date.
  20479. If the column is enclosed in double quotes, then it is a fix text,
  20480. not a column number.</li>
  20481. <li>&lt;regexp&gt;
  20482. If present, return only lines containing the regexp. Case sensitive.
  20483. </li>
  20484. <li>&lt;default&gt;<br>
  20485. If no values were found and the default value is set, then return
  20486. one line containing the from value and this default. We need this
  20487. feature as gnuplot aborts if a dataset has no value at all.
  20488. </li>
  20489. <li>&lt;fn&gt;
  20490. One of the following:
  20491. <ul>
  20492. <li>int<br>
  20493. Extract the integer at the beginning og the string. Used e.g.
  20494. for constructs like 10%</li>
  20495. <li>delta-h or delta-d<br>
  20496. Return the delta of the values for a given hour or a given day.
  20497. Used if the column contains a counter, as is the case for the
  20498. KS300 rain column.</li>
  20499. <li>everything else<br>
  20500. The string is evaluated as a perl expression. @fld is the
  20501. current line splitted by spaces. Note: The string/perl
  20502. expression cannot contain spaces, as the part after the space
  20503. will be considered as the next column_spec.</li>
  20504. </ul></li>
  20505. </ul></li>
  20506. </ul>
  20507. <br><br>
  20508. Example:
  20509. <ul><code><br>
  20510. get outlog out-2008.log - 2008-01-01 2008-01-08 4:IR:int: 9:IR::
  20511. </code></ul>
  20512. <br>
  20513. </ul>
  20514. <a name="FileLogattr"></a>
  20515. <b>Attributes</b>
  20516. <ul>
  20517. <li><a href="#addStateEvent">addStateEvent</a></li><br><br>
  20518. <a name="archivedir"></a>
  20519. <a name="archivecmd"></a>
  20520. <a name="nrarchive"></a>
  20521. <li>archivecmd / archivedir / nrarchive<br>
  20522. When a new FileLog file is opened, the FileLog archiver wil be called.
  20523. This happens only, if the name of the logfile has changed (due to
  20524. time-specific wildcards, see the <a href="#FileLog">FileLog</a>
  20525. section), and there is a new entry to be written into the file.
  20526. <br>
  20527. If the attribute archivecmd is specified, then it will be started as a
  20528. shell command (no enclosing " is needed), and each % in the command
  20529. will be replaced with the name of the old logfile.<br>
  20530. If this attribute is not set, but nrarchive is set, then nrarchive old
  20531. logfiles are kept along the current one while older ones are moved to
  20532. archivedir (or deleted if archivedir is not set).<br>
  20533. Note: "old" means here the first ones in the alphabetically soreted
  20534. list. <br>
  20535. Note: setting these attributes for the global instance will effect the
  20536. <a href="#logfile">FHEM logfile</a> only.
  20537. </li><br>
  20538. <a name="archiveCompress"></a>
  20539. <li>archiveCompress<br>
  20540. If nrarchive, archivedir and archiveCompress is set, then the files
  20541. in the archivedir will be compressed.
  20542. </li><br>
  20543. <a name="createGluedFile"></a>
  20544. <li>createGluedFile<br>
  20545. If set (to 1), and the SVG-Plot requests a time-range wich is stored
  20546. in two files, a temporary file with the content of both files will be
  20547. created, in order to satisfy the request.
  20548. </li><br>
  20549. <li><a href="#disable">disable</a></li>
  20550. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  20551. <br>
  20552. <a name="eventOnThreshold"></a>
  20553. <li>eventOnThreshold<br>
  20554. If set (to a nonzero number), the event linesInTheFile will be
  20555. generated, if the lines in the file is a multiple of the set number.
  20556. Note: the counter is only correct for files created after this
  20557. feature was implemented. A FHEM crash or kill will falsify the counter.
  20558. </li><br>
  20559. <a name="logtype"></a>
  20560. <li>logtype<br>
  20561. Used by the pgm2 webfrontend to offer gnuplot/SVG images made from the
  20562. logs. The string is made up of tokens separated by comma (,), each
  20563. token specifies a different gnuplot program. The token may contain a
  20564. colon (:), the part before the colon defines the name of the program,
  20565. the part after is the string displayed in the web frontend. Currently
  20566. following types of gnuplot programs are implemented:<br>
  20567. <ul>
  20568. <li>fs20<br>
  20569. Plots on as 1 and off as 0. The corresponding filelog definition
  20570. for the device fs20dev is:<br>
  20571. define fslog FileLog log/fs20dev-%Y-%U.log fs20dev
  20572. </li>
  20573. <li>fht<br>
  20574. Plots the measured-temp/desired-temp/actuator lines. The
  20575. corresponding filelog definitions (for the FHT device named
  20576. fht1) looks like:<br>
  20577. <code>define fhtlog1 FileLog log/fht1-%Y-%U.log fht1:.*(temp|actuator).*</code>
  20578. </li>
  20579. <li>temp4rain10<br>
  20580. Plots the temperature and rain (per hour and per day) of a
  20581. ks300. The corresponding filelog definitions (for the KS300
  20582. device named ks300) looks like:<br>
  20583. define ks300log FileLog log/fht1-%Y-%U.log ks300:.*H:.*
  20584. </li>
  20585. <li>hum6wind8<br>
  20586. Plots the humidity and wind values of a
  20587. ks300. The corresponding filelog definition is the same as
  20588. above, both programs evaluate the same log.
  20589. </li>
  20590. <li>text<br>
  20591. Shows the logfile as it is (plain text). Not gnuplot definition
  20592. is needed.
  20593. </li>
  20594. </ul>
  20595. Example:<br>
  20596. attr ks300log1 logtype
  20597. temp4rain10:Temp/Rain,hum6wind8:Hum/Wind,text:Raw-data
  20598. </li><br>
  20599. <li><a href="#mseclog">mseclog</a></li><br>
  20600. <a name="reformatFn"></a>
  20601. <li>reformatFn<br>
  20602. used to convert "foreign" logfiles for the SVG Module, contains the
  20603. name(!) of a function, which will be called with a "raw" line from the
  20604. original file, and has to return a line in "FileLog" format.<br>
  20605. E.g. to visualize the NTP loopstats, set reformatFn to ntpLoopstats, and
  20606. copy the following into your 99_myUtils.pm:
  20607. <pre><code>
  20608. sub
  20609. ntpLoopstats($)
  20610. {
  20611. my ($d) = @_;
  20612. return $d if($d !~ m/^(\d{5}) (\d+)\.(\d{3}) (.*)$/);
  20613. my ($r, $t) = ($4, FmtDateTime(($1-40587)*86400+$2));
  20614. $t =~ s/ /_/;
  20615. return "$t ntpLoopStats $r";
  20616. }</code></pre>
  20617. </li>
  20618. </ul>
  20619. <br>
  20620. </ul>
  20621. <a name="GAEBUS"></a>
  20622. <h3>GAEBUS</h3>
  20623. <ul>
  20624. <table>
  20625. <tr><td>
  20626. The GAEBUS module is the representation of a Ebus connector in FHEM.
  20627. The GAEBUS module is designed to connect to ebusd (ebus daemon) via a socket connection (default is port 8888) <br>
  20628. </td></tr>
  20629. </table>
  20630. <a name="GAEBUS"></a>
  20631. <b>Define</b>
  20632. <ul>
  20633. <code>define &lt;name&gt; GAEBUS &lt;device-addr&gt;[:&lt;port&gt;] [&lt;interval&gt;];</code> <br>
  20634. <br>
  20635. &lt;device-addr&gt;[:&lt;port&gt;] specifies the host:port of the ebusd device. E.g.
  20636. 192.168.0.244:8888 or servername:8888. When using the standard port, the port can be omitted.
  20637. <br><br>
  20638. Example:<br><br>
  20639. <code>define ebus1 GAEBUS localhost 300</code>
  20640. <br><br>
  20641. When initializing the object no device specific commands are known. Please call "get ebusd_find" to read in supported commands from ebusd.<br>
  20642. After fresh restart of ebusd it may take a while until all supported devices and their commands are visible.<br>
  20643. </ul>
  20644. <br>
  20645. <a name="GAEBUS"></a>
  20646. <b>Set </b>
  20647. <ul>
  20648. <li>reopen<br>
  20649. Will close and open the socket connection.
  20650. </li><br>
  20651. <li>[r]~&lt;class&gt; &lt;variable-name&gt;~&lt;comment&gt;<br>
  20652. Will define a attribute with the following syntax:<br>
  20653. [r]~&lt;class&gt;~&lt;variable-name&gt;~<br>
  20654. Valid combinations are read from ebusd (using "get ebusd_find") and are selectable.<br>
  20655. Values from the attributes will be used as the name for the reading which are read from ebusd in the interval specified.<br>
  20656. The content of &lt;comment$gt; is dropped and not added to the attribute name.<br>
  20657. </li><br>
  20658. <li>[w]~&lt;class&gt; &lt;variable-name&gt;~&lt;comment&gt;<br>
  20659. Will define a attribute with the following syntax:<br>
  20660. [w]~&lt;class&gt;~&lt;variable-name&gt;<br>
  20661. They will only appear if the attribute "ebusWritesEnabled" is set to "1"<br>
  20662. Valid combinations are read from ebusd (using "get ebusd_find") and are selectable.<br>
  20663. Values from the attributes will be used for set commands to modify parameters for ebus devices<br>
  20664. Hint: if the values for the attributes are prefixed by "set-" then all possible parameters will be listed in one block<br>
  20665. The content of &lt;comment$gt; is dropped and not added to the attribute name.<br>
  20666. </li><br>
  20667. </ul>
  20668. <a name="GAEBUS"></a>
  20669. <b>Get</b>
  20670. <ul>
  20671. <li>ebusd_info<br>
  20672. Execude <i>info</i> command on ebusd and show result.
  20673. </li><br>
  20674. <li>ebusd_find<br>
  20675. Execude <i>find</i> command on ebusd. Result will be used to display supported "set" and "get" commands.
  20676. </li><br>
  20677. <li>ebusd_hex<br>
  20678. Will pass the input value to the "hex" command of ebusd. See "ebusctl help hex" for valid parameters.<br>
  20679. This command is only available if "ebusWritesEnabled" is set to '1'.<br>
  20680. </li><br>
  20681. <li>reading &lt;reading-name&gt<br>
  20682. Will read the actual value form ebusd and update the reading.
  20683. </li><br>
  20684. <li>[r]~&lt;class&gt; &lt;variable-name&gt;~&lt;comment&gt;<br>
  20685. Will read this variable from the ebusd and show the result as a popup.<br>
  20686. Valid combinations are read from ebusd (using "get ebusd_find") and are selectable.<br>
  20687. </li><br>
  20688. <li>removeCommentFromAttributeNames<br>
  20689. This will migrate the former used attribute names of format "[rw]~&lt;class&gt; &lt;variable-name&gt;~&lt;comment&gt;"
  20690. into the format "[rw]~&lt;class&gt; &lt;variable-name&gt;".<br>
  20691. It is only available if such attributes are defined.<br>
  20692. </li><br>
  20693. </ul>
  20694. <br>
  20695. <a name="GAEBUS"></a>
  20696. <b>Attributes</b>
  20697. <ul>
  20698. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  20699. <li><a href="#attrdummy">disable</a></li><br>
  20700. <li><a href="#attrdummy">dummy</a></li><br>
  20701. <li><a href="#showtime">showtime</a></li><br>
  20702. <li><a href="#loglevel">loglevel</a></li><br>
  20703. <li>ebusWritesEnabled 0,1<br>
  20704. disable (0) or enable (1) that commands can be send to ebus devices<br>
  20705. See also description for Set and Get<br>
  20706. If Attribute is missing, default value is 0 (disable writes)<br>
  20707. </li><br>
  20708. <li>Attributes of the format<br>
  20709. <code>[r]~&lt;class&gt;~&lt;variable-name&gt;</code><br>
  20710. define variables that can be retrieved from the ebusd.
  20711. They will appear when they are defined by a "set" command as described above.<br>
  20712. The value assigned to an attribute specifies the name of the reading for this variable.<br>
  20713. If ebusd returns a list of semicolon separated values then several semicolon separated readings can be defined.<br>
  20714. "dummy" is a placeholder for a reading that will be ignored. (e.g.: temperature;dummy;pressure).<br>
  20715. The name of the reading can be suffixed by "&lt;:number&gt;" which is a multiplicator for
  20716. the evaluation within the specified interval. (eg. OutsideTemp:3 will evaluate this reading every 3-th cycle)<br>
  20717. All text followed the reading seperated by a blank is given as an additional parameter to ebusd.
  20718. This can be used to request a single value if more than one is retrieved from ebus.<br>
  20719. </li><br>
  20720. <li>Attributes of the format<br>
  20721. <code>[w]~&lt;class&gt;~&lt;variable-name&gt;</code><br>
  20722. define parameters that can be changed on ebus devices (using the write command from ebusctl)
  20723. They will appear when they are defined by a "set" command as described above.<br>
  20724. The value assigned to an attribute specifies the name that will be used in set to change a parameter for a ebus device.<br>
  20725. </li><br>
  20726. <li>valueFormat<br>
  20727. Defines a map to format values within GAEBUS.<br>
  20728. All readings can be formated using syntax of sprinf.
  20729. Values returned from ebusd are spearated by ";" and split before valueFormat is processed. This means more than one of the return values can be assigned to one reading.
  20730. <br>
  20731. Example: { "temperature" => "%0.2f"; "from-to" => "%s-%s" }<br>
  20732. </li><br>
  20733. </ul>
  20734. <br>
  20735. </ul>
  20736. <p>
  20737. <a name="GEOFANCY" id="GEOFANCY"></a>
  20738. </p>
  20739. <h3>
  20740. GEOFANCY
  20741. </h3>
  20742. <ul>
  20743. <li>Provides a webhook receiver for geofencing, e.g. via the following apps:<br>
  20744. <br>
  20745. </li>
  20746. <li>
  20747. <a href="https://itunes.apple.com/app/id615538630">Geofency (iOS)</a>
  20748. </li>
  20749. <li>
  20750. <a href="https://itunes.apple.com/app/id725198453">Locative (iOS)</a>
  20751. </li>
  20752. <li>
  20753. <a href="http://www.egigeozone.de">EgiGeoZone (Android)</a>
  20754. </li>
  20755. <li>
  20756. <a href="https://www.microsoft.com/en-us/store/apps/smart-geofences/9nblggh4rk3k">SMART Geofences (Windows 10, Windows 10 Mobile)</a>
  20757. </li>
  20758. <li>
  20759. <p>
  20760. Note: GEOFANCY is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You need to install FHEMWEB to use GEOFANCY.
  20761. </p><a name="GEOFANCYdefine" id="GEOFANCYdefine"></a> <b>Define</b>
  20762. <ul>
  20763. <code>define &lt;name&gt; GEOFANCY &lt;infix&gt;</code><br>
  20764. <br>
  20765. Defines the webhook server. <code>&lt;infix&gt;</code> is the portion behind the FHEMWEB base URL (usually <code>http://hostname:8083/fhem</code>)<br>
  20766. <br>
  20767. Example:
  20768. <ul>
  20769. <code>define geofancy GEOFANCY geo</code><br>
  20770. </ul><br>
  20771. The webhook will be reachable at http://hostname:8083/fhem/geo in that case.<br>
  20772. <br>
  20773. </ul><a name="GEOFANCYset" id="GEOFANCYset"></a> <b>Set</b>
  20774. <ul>
  20775. <li>
  20776. <b>clear</b> &nbsp;&nbsp;readings&nbsp;&nbsp; can be used to cleanup auto-created readings from deprecated devices.
  20777. </li>
  20778. </ul><br>
  20779. <br>
  20780. <a name="GEOFANCYattr" id="GEOFANCYattr"></a> <b>Attributes</b><br>
  20781. <br>
  20782. <ul>
  20783. <li>devAlias: Mandatory attribute to assign device name alias to an UUID in the format DEVICEUUID:Aliasname (most readings will only be created if devAlias was defined).<br>
  20784. Separate using <i>blank</i> to rename multiple device UUIDs.<br>
  20785. <br>
  20786. Should you be using GEOFANCY together with <a href="#ROOMMATE">ROOMMATE</a> or <a href="#GUEST">GUEST</a> you might consider using attribute r*_geofenceUUIDs directly at those devices instead.
  20787. </li>
  20788. </ul><br>
  20789. <br>
  20790. <b>Usage information / Hints on Security</b><br>
  20791. <br>
  20792. <ul>
  20793. Likely your FHEM installation is not reachable directly from the internet (good idea!).<br>
  20794. It is recommended to have a reverse proxy like <a href="http://loredo.me/post/116633549315/geeking-out-with-haproxy-on-pfsense-the-ultimate">HAproxy</a>, <a href="http://www.apsis.ch/pound/">Pound</a> or <a href="https://www.varnish-cache.org/">Varnish</a> in front of FHEM where you can make sure access is only possible to a specific URI like /fhem/geo. Apache or Nginx might do as well. However, in case you have Apache or Nginx running already you should still consider one of the named reverse proxies in front of it for fine-grain security configuration.<br>
  20795. <br>
  20796. You might also want to think about protecting the access by using HTTP Basic Authentication and encryption via TLS/SSL. Using TLS offloading in the reverse proxy software is highly recommended and software like HAproxy provides high control of data flow for TLS.<br>
  20797. <br>
  20798. Also the definition of a dedicated FHEMWEB instance for that purpose together with <a href="#allowed">allowed</a> might help to restrict FHEM's functionality (e.g. set attributes allowedCommands and allowedDevices to ",". Note that attributes <i>hiddengroup</i> and <i>hiddenroom</i> of FHEMWEB do NOT protect from just guessing/knowing the correct URI but would help tremendously to prevent easy inspection of your FHEM setup.)<br>
  20799. <br>
  20800. To make that reverse proxy available from the internet, just forward the appropriate port via your internet router.<br>
  20801. <br>
  20802. The actual solution on how you can securely make your GEOFANCY webhook available to the internet is not part of this documentation and depends on your own skills.
  20803. </ul><br>
  20804. <br>
  20805. <b>Integration with Home Automation</b><br>
  20806. <br>
  20807. <ul>
  20808. You might want to have a look to the module family of <a href="#ROOMMATE">ROOMMATE</a>, <a href="#GUEST">GUEST</a> and <a href="#RESIDENTS">RESIDENTS</a> for an easy processing of GEOFANCY events.
  20809. </ul>
  20810. </li>
  20811. </ul>
  20812. <a name="GHoma"></a>
  20813. <h3>GHoma</h3>
  20814. (en | <a href="commandref_DE.html#GHoma">de</a>)
  20815. <ul>
  20816. <ul>
  20817. Connects fhem to an G-Homa adapter plug<br><br>
  20818. <b>preliminary:</b><br>
  20819. <li>Configure WLAN settings (Firmware <= 1.06):<br>
  20820. bring device in AP mode (press button for more than 3s, repeat this step until the LED is permanently on)<br>
  20821. Now connect with your computer to G-Home network.<br>
  20822. Browse to 10.10.100.254 (username:password = admin:admin)<br>
  20823. In STA Setting insert your WLAN settings<br>
  20824. </li>
  20825. <li>Configure WLAN settings:<br>
  20826. bring device in AP mode (press button for more than 3s, repeat this step until the LED is permanently on)<br>
  20827. Configure WLAN with G-Homa App.<br>
  20828. </li>
  20829. <li>Configure Network Parameters setting (Firmware <= 1.06):<br>
  20830. Other Setting -> Protocol to TCP-Client<br>
  20831. Other Setting -> Port ID (remember value for FHEM settings)<br>
  20832. Other Setting -> Server Address (IP of your FHEM Server)<br>
  20833. </li>
  20834. <li>Configure Network Parameters settings:<br>
  20835. Use <code>set ... ConfigAll</code> from server device to set parameters automaticly.<br>
  20836. </li>
  20837. <li>Optional:<br>
  20838. Block all outgoing connections for G-Homa in your router.<br>
  20839. </li>
  20840. </ul>
  20841. <br><br>
  20842. <a name="GHomadefine"></a>
  20843. <b>Define</b><br>
  20844. <ul>
  20845. <code>define &lt;name&gt; GHoma &lt;port&gt;</code> <br>
  20846. Specifies the GHoma server device.<br>
  20847. New adapters will be added automaticaly after first connection.<br>
  20848. You can also manyally add an adapter:<br>
  20849. <code>define &lt;name&gt; GHoma &lt;Id&gt;</code> <br>
  20850. where <code>Id</code> is the last 6 numbers of the plug's MAC address<br>
  20851. Example: MAC= AC:CF:23:A5:E2:3B -> Id= A5E23B<br>
  20852. <br>
  20853. </ul>
  20854. <a name="GHomaset"></a>
  20855. <b>Set</b>
  20856. <ul>
  20857. <code>set &lt;name&gt; &lt;value&gt;</code>
  20858. <br><br>
  20859. where <code>value</code> is one of:<br>
  20860. <ul><code>
  20861. off<br>
  20862. on<br>
  20863. </code>
  20864. </ul>
  20865. The <a href="#setExtensions"> set extensions</a> are also supported.<br>
  20866. <br>
  20867. For server device:
  20868. <code>set &lt;name&gt; ConfigAll [IP|hostname|FQDN]</code><br>
  20869. Setting all GHoma plugs via UDP broadcast to TCP client of FHEM servers address and port of GHoma server device.<br>
  20870. </ul>
  20871. <a name="GHomaattr"></a>
  20872. <b>Attributes</b><br>
  20873. <ul>
  20874. For plug devices:
  20875. <ul><li>restoreOnStartup<br>
  20876. Restore switch state after reboot<br>
  20877. Default: last, valid values: last, on, off<br><br>
  20878. </li>
  20879. <li>restoreOnReinit<br>
  20880. Restore switch state after reconnect<br>
  20881. Default: last, valid values: last, on, off<br><br>
  20882. </li>
  20883. <li>blocklocal<br>
  20884. Restore switch state to reading state immideately after local switching<br>
  20885. Default: no, valid values: no, yes<br><br>
  20886. </li></ul>
  20887. For server devices:
  20888. <ul><li>allowfrom<br>
  20889. Regexp of allowed ip-addresses or hostnames. If set,
  20890. only connections from these addresses are allowed.<br><br>
  20891. </li></ul>
  20892. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  20893. </ul>
  20894. <br>
  20895. </ul>
  20896. <a name="GOOGLECAST"></a>
  20897. <h3>GOOGLECAST</h3>
  20898. <ul>
  20899. GOOGLECAST is used to control your Google Cast device<br><br>
  20900. <b>Note</b><br>Following packages are required:
  20901. <ul>
  20902. <li>sudo apt-get install libwww-perl python-enum34 python-dev libextutils-makemaker-cpanfile-perl python-pip cpanminus</li>
  20903. <li>sudo pip install netifaces</li>
  20904. <li>sudo pip install enum34</li>
  20905. <li>sudo pip install pychromecast</li>
  20906. <li>sudo pip install youtube-dl</li>
  20907. <li>sudo cpanm Inline::Python</li>
  20908. </ul>
  20909. <br>
  20910. <br>
  20911. <a name="GOOGLECASTdefine" id="GOOGLECASTdefine"></a>
  20912. <b>Define</b>
  20913. <ul>
  20914. <code>define &lt;name&gt; GOOGLECAST &lt;name&gt;</code><br>
  20915. <br>
  20916. Example:
  20917. <ul>
  20918. <code>define livingroom.chromecast GOOGLECAST livingroom</code><br><br>
  20919. Wait a few seconds till presence switches to online...<br><br>
  20920. <code>set livingroom.chromecast play https://www.youtube.com/watch?v=YE7VzlLtp-4</code><br>
  20921. </ul>
  20922. <br>
  20923. Following media types are supported:<br>
  20924. <a href="https://developers.google.com/cast/docs/media">Supported media formats</a><br>
  20925. Play with youtube-dl works for following URLs:<br>
  20926. <a href="https://rg3.github.io/youtube-dl/supportedsites.html">Supported youtube-dl sites</a><br>
  20927. <br>
  20928. </ul>
  20929. <br>
  20930. <a name="GOOGLECASTset" id="GOOGLECASTset"></a>
  20931. <b>Set</b>
  20932. <ul>
  20933. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  20934. The following commands are defined:<br><br>
  20935. <ul>
  20936. <li><code><b>play</b> URL</code> &nbsp;&nbsp;-&nbsp;&nbsp; play from URL</li>
  20937. <li><code><b>play</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; play, like resume if paused previsously</li>
  20938. <li><code><b>playFavorite</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; plays URL from favoriteURL_[1-5]</li>
  20939. <li><code><b>stop</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; stop, stops current playback</li>
  20940. <li><code><b>pause</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; pause</li>
  20941. <li><code><b>quitApp</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; quit current application, like YouTube</li>
  20942. </ul>
  20943. <br>
  20944. </ul>
  20945. <a name="GOOGLECASTattr" id="GOOGLECASTattr"></a>
  20946. <b>Attributes</b>
  20947. <ul>
  20948. <li><code><b>favoriteURL_[1-5]</b></code> &nbsp;&nbsp;-&nbsp;&nbsp; save URL to play afterwards with playFavorite [1-5]</li>
  20949. </ul>
  20950. <br>
  20951. <a name="GOOGLECASTget" id="GOOGLECASTget"></a>
  20952. <b>Get</b>
  20953. <ul>
  20954. <code>n/a</code>
  20955. </ul>
  20956. <br>
  20957. </ul>
  20958. <a name="GUEST" id="GUEST"></a>
  20959. <h3>GUEST</h3>
  20960. <ul>
  20961. <a name="GUESTdefine" id="GUESTdefine"></a> <b>Define</b>
  20962. <ul>
  20963. <code>define &lt;rg_GuestName&gt; GUEST [&lt;device name(s) of resident group(s)&gt;]</code><br>
  20964. <br>
  20965. Provides a special virtual device to represent a guest of your home.<br>
  20966. Based on the current state and other readings, you may trigger other actions within FHEM.<br>
  20967. <br>
  20968. Used by superior module <a href="#RESIDENTS">RESIDENTS</a> but may also be used stand-alone.<br>
  20969. <br />
  20970. Use comma separated list of resident device names for multi-membership (see example below).<br />
  20971. <br>
  20972. Example:<br>
  20973. <ul>
  20974. <code># Standalone<br>
  20975. define rg_Guest GUEST<br>
  20976. <br>
  20977. # Typical group member<br>
  20978. define rg_Guest GUEST rgr_Residents # to be member of resident group rgr_Residents<br>
  20979. <br>
  20980. # Member of multiple groups<br>
  20981. define rg_Guest GUEST rgr_Residents,rgr_Guests # to be member of resident group rgr_Residents and rgr_Guests</code>
  20982. </ul>
  20983. </ul><br>
  20984. <br>
  20985. <a name="GUESTset" id="GUESTset"></a> <b>Set</b>
  20986. <ul>
  20987. <code>set &lt;rg_GuestName&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  20988. <br>
  20989. Currently, the following commands are defined.<br>
  20990. <ul>
  20991. <li>
  20992. <b>location</b> &nbsp;&nbsp;-&nbsp;&nbsp; sets reading 'location'; see attribute rg_locations to adjust list shown in FHEMWEB
  20993. </li>
  20994. <li>
  20995. <b>mood</b> &nbsp;&nbsp;-&nbsp;&nbsp; sets reading 'mood'; see attribute rg_moods to adjust list shown in FHEMWEB
  20996. </li>
  20997. <li>
  20998. <b>state</b> &nbsp;&nbsp;home,gotosleep,asleep,awoken,absent,none&nbsp;&nbsp; switch between states; see attribute rg_states to adjust list shown in FHEMWEB
  20999. </li>
  21000. <li>
  21001. <b>create</b>
  21002. <li><i>locationMap</i>&nbsp;&nbsp; add a pre-configured weblink device using showing a Google Map if readings locationLat+locationLong are present.</li>
  21003. <li><i>wakeuptimer</i>&nbsp;&nbsp; add several pre-configurations provided by RESIDENTS Toolkit. See separate section in <a href="#RESIDENTS">RESIDENTS module commandref</a> for details.</li>
  21004. </li>
  21005. </ul>
  21006. <ul>
  21007. <u>Note:</u> If you would like to restrict access to admin set-commands (-> create) you may set your FHEMWEB instance's attribute allowedCommands like 'set,set-user'.
  21008. The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
  21009. </ul>
  21010. </ul><br>
  21011. <br>
  21012. <ul>
  21013. <u>Possible states and their meaning</u><br>
  21014. <br>
  21015. <ul>
  21016. This module differs between 6 states:<br>
  21017. <br>
  21018. <ul>
  21019. <li>
  21020. <b>home</b> - individual is present at home and awake
  21021. </li>
  21022. <li>
  21023. <b>gotosleep</b> - individual is on it's way to bed
  21024. </li>
  21025. <li>
  21026. <b>asleep</b> - individual is currently sleeping
  21027. </li>
  21028. <li>
  21029. <b>awoken</b> - individual just woke up from sleep
  21030. </li>
  21031. <li>
  21032. <b>absent</b> - individual is not present at home but will be back shortly
  21033. </li>
  21034. <li>
  21035. <b>none</b> - guest device is disabled
  21036. </li>
  21037. </ul>
  21038. </ul>
  21039. </ul><br>
  21040. <br>
  21041. <ul>
  21042. <u>Presence correlation to location</u><br>
  21043. <br>
  21044. <ul>
  21045. Under specific circumstances, changing state will automatically change reading 'location' as well.<br>
  21046. <br>
  21047. Whenever presence state changes from 'absent' to 'present', the location is set to 'home'. If attribute rg_locationHome was defined, first location from it will be used as home location.<br>
  21048. <br>
  21049. Whenever presence state changes from 'present' to 'absent', the location is set to 'underway'. If attribute rg_locationUnderway was defined, first location from it will be used as underway location.
  21050. </ul>
  21051. </ul><br>
  21052. <br>
  21053. <ul>
  21054. <u>Auto Gone</u><br>
  21055. <br>
  21056. <ul>
  21057. Whenever an individual is set to 'absent', a trigger is started to automatically change state to 'gone' after a specific timeframe.<br>
  21058. Default value is 16 hours.<br>
  21059. <br>
  21060. This behaviour can be customized by attribute rg_autoGoneAfter.
  21061. </ul>
  21062. </ul><br>
  21063. <br>
  21064. <ul>
  21065. <u>Synchronizing presence with other ROOMMATE or GUEST devices</u><br>
  21066. <br>
  21067. <ul>
  21068. If you always leave or arrive at your house together with other roommates or guests, you may enable a synchronization of your presence state for certain individuals.<br>
  21069. By setting attribute rg_passPresenceTo, those individuals will follow your presence state changes to 'home', 'absent' or 'gone' as you do them with your own device.<br>
  21070. <br>
  21071. Please note that individuals with current state 'none' or 'gone' (in case of roommates) will not be touched.
  21072. </ul>
  21073. </ul><br>
  21074. <br>
  21075. <ul>
  21076. <u>Location correlation to state</u><br>
  21077. <br>
  21078. <ul>
  21079. Under specific circumstances, changing location will have an effect on the actual state as well.<br>
  21080. <br>
  21081. Whenever location is set to 'home', the state is set to 'home' if prior presence state was 'absent'. If attribute rg_locationHome was defined, all of those locations will trigger state change to 'home' as well.<br>
  21082. <br>
  21083. Whenever location is set to 'underway', the state is set to 'absent' if prior presence state was 'present'. If attribute rg_locationUnderway was defined, all of those locations will trigger state change to 'absent' as well. Those locations won't appear in reading 'lastLocation'.<br>
  21084. <br>
  21085. Whenever location is set to 'wayhome', the reading 'wayhome' is set to '1' if current presence state is 'absent'. If attribute rg_locationWayhome was defined, LEAVING one of those locations will set reading 'wayhome' to '1' as well. So you actually have implicit and explicit options to trigger wayhome.<br>
  21086. Arriving at home will reset the value of 'wayhome' to '0'.<br>
  21087. <br>
  21088. If you are using the <a href="#GEOFANCY">GEOFANCY</a> module, you can easily have your location updated with GEOFANCY events by defining a simple NOTIFY-trigger like this:<br>
  21089. <br>
  21090. <code>define n_rg_Guest.location notify geofancy:currLoc_Guest.* set rg_Guest:FILTER=location!=$EVTPART1 location $EVTPART1</code><br>
  21091. <br>
  21092. By defining geofencing zones called 'home' and 'wayhome' in the iOS app, you automatically get all the features of automatic state changes described above.
  21093. </ul>
  21094. </ul><br>
  21095. <br>
  21096. <a name="GUESTattr" id="GUESTattr"></a> <b>Attributes</b><br>
  21097. <ul>
  21098. <ul>
  21099. <li>
  21100. <b>rg_autoGoneAfter</b> - hours after which state should be auto-set to 'gone' when current state is 'absent'; defaults to 16 hours
  21101. </li>
  21102. <li>
  21103. <b>rg_geofenceUUIDs</b> - comma separated list of device UUIDs updating their location via <a href="#GEOFANCY">GEOFANCY</a>. Avoids necessity for additional notify/DOIF/watchdog devices and can make GEOFANCY attribute <i>devAlias</i> obsolete. (using more than one UUID/device might not be a good idea as location my leap)
  21104. </li>
  21105. <li>
  21106. <b>rg_lang</b> - overwrite global language setting; helps to set device attributes to translate FHEMWEB display text
  21107. </li>
  21108. <li>
  21109. <b>rg_locationHome</b> - locations matching these will be treated as being at home; first entry reflects default value to be used with state correlation; separate entries by space; defaults to 'home'
  21110. </li>
  21111. <li>
  21112. <b>rg_locationUnderway</b> - locations matching these will be treated as being underway; first entry reflects default value to be used with state correlation; separate entries by comma or space; defaults to "underway"
  21113. </li>
  21114. <li>
  21115. <b>rg_locationWayhome</b> - leaving a location matching these will set reading wayhome to 1; separate entries by space; defaults to "wayhome"
  21116. </li>
  21117. <li>
  21118. <b>rg_locations</b> - list of locations to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
  21119. </li>
  21120. <li>
  21121. <b>rg_moodDefault</b> - the mood that should be set after arriving at home or changing state from awoken to home
  21122. </li>
  21123. <li>
  21124. <b>rg_moodSleepy</b> - the mood that should be set if state was changed to gotosleep or awoken
  21125. </li>
  21126. <li>
  21127. <b>rg_moods</b> - list of moods to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
  21128. </li>
  21129. <li>
  21130. <b>rg_noDuration</b> - may be used to disable continuous, non-event driven duration timer calculation (see readings durTimer*)
  21131. </li>
  21132. <li>
  21133. <b>rg_passPresenceTo</b> - synchronize presence state with other GUEST or GUEST devices; separte devices by space
  21134. </li>
  21135. <li>
  21136. <b>rg_presenceDevices</b> - take over presence state from any other FHEM device. Separate more than one device with comma meaning ALL of them need to be either present or absent to trigger update of this ROOMMATE device. You may optionally add a reading name separated by :, otherwise reading name presence and state will be considered.
  21137. </li>
  21138. <li>
  21139. <b>rg_realname</b> - whenever GUEST wants to use the realname it uses the value of attribute alias or group; defaults to group
  21140. </li>
  21141. <li>
  21142. <b>rg_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
  21143. </li>
  21144. <li>
  21145. <b>rg_states</b> - list of states to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces; unsupported states will lead to errors though
  21146. </li>
  21147. <li>
  21148. <b>rg_wakeupDevice</b> - reference to enslaved DUMMY devices used as a wake-up timer (part of RESIDENTS Toolkit's wakeuptimer)
  21149. </li>
  21150. </ul>
  21151. </ul><br>
  21152. <br>
  21153. <br>
  21154. <b>Generated Readings/Events:</b><br>
  21155. <ul>
  21156. <ul>
  21157. <li>
  21158. <b>durTimerAbsence</b> - timer to show the duration of absence from home in human readable format (hours:minutes:seconds)
  21159. </li>
  21160. <li>
  21161. <b>durTimerAbsence_cr</b> - timer to show the duration of absence from home in computer readable format (minutes)
  21162. </li>
  21163. <li>
  21164. <b>durTimerPresence</b> - timer to show the duration of presence at home in human readable format (hours:minutes:seconds)
  21165. </li>
  21166. <li>
  21167. <b>durTimerPresence_cr</b> - timer to show the duration of presence at home in computer readable format (minutes)
  21168. </li>
  21169. <li>
  21170. <b>durTimerSleep</b> - timer to show the duration of sleep in human readable format (hours:minutes:seconds)
  21171. </li>
  21172. <li>
  21173. <b>durTimerSleep_cr</b> - timer to show the duration of sleep in computer readable format (minutes)
  21174. </li>
  21175. <li>
  21176. <b>lastArrival</b> - timestamp of last arrival at home
  21177. </li>
  21178. <li>
  21179. <b>lastAwake</b> - timestamp of last sleep cycle end
  21180. </li>
  21181. <li>
  21182. <b>lastDeparture</b> - timestamp of last departure from home
  21183. </li>
  21184. <li>
  21185. <b>lastDurAbsence</b> - duration of last absence from home in human readable format (hours:minutes:seconds)
  21186. </li>
  21187. <li>
  21188. <b>lastDurAbsence_cr</b> - duration of last absence from home in computer readable format (minutes)
  21189. </li>
  21190. <li>
  21191. <b>lastDurPresence</b> - duration of last presence at home in human readable format (hours:minutes:seconds)
  21192. </li>
  21193. <li>
  21194. <b>lastDurPresence_cr</b> - duration of last presence at home in computer readable format (minutes)
  21195. </li>
  21196. <li>
  21197. <b>lastDurSleep</b> - duration of last sleep in human readable format (hours:minutes:seconds)
  21198. </li>
  21199. <li>
  21200. <b>lastDurSleep_cr</b> - duration of last sleep in computer readable format (minutes)
  21201. </li>
  21202. <li>
  21203. <b>lastLocation</b> - the prior location
  21204. </li>
  21205. <li>
  21206. <b>lastMood</b> - the prior mood
  21207. </li>
  21208. <li>
  21209. <b>lastSleep</b> - timestamp of last sleep cycle begin
  21210. </li>
  21211. <li>
  21212. <b>lastState</b> - the prior state
  21213. </li>
  21214. <li>
  21215. <b>lastWakeup</b> - time of last wake-up timer run
  21216. </li>
  21217. <li>
  21218. <b>lastWakeupDev</b> - device name of last wake-up timer
  21219. </li>
  21220. <li>
  21221. <b>location</b> - the current location
  21222. </li>
  21223. <li>
  21224. <b>mood</b> - the current mood
  21225. </li>
  21226. <li>
  21227. <b>nextWakeup</b> - time of next wake-up program run
  21228. </li>
  21229. <li>
  21230. <b>nextWakeupDev</b> - device name for next wake-up program run
  21231. </li>
  21232. <li>
  21233. <b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
  21234. </li>
  21235. <li>
  21236. <b>state</b> - reflects the current state
  21237. </li>
  21238. <li>
  21239. <b>wakeup</b> - becomes '1' while a wake-up program of this resident is being executed
  21240. </li>
  21241. <li>
  21242. <b>wayhome</b> - depending on current location, it can become '1' if individual is on his/her way back home
  21243. </li>
  21244. <li>
  21245. <br>
  21246. <br>
  21247. The following readings will be set to '-' if state was changed to 'none':<br>
  21248. lastArrival, lastDurAbsence, lastLocation, lastMood, location, mood
  21249. </li>
  21250. </ul>
  21251. </ul>
  21252. </ul>
  21253. <a name="GardenaSmartBridge"></a>
  21254. <h3>GardenaSmartBridge</h3>
  21255. <ul>
  21256. <u><b>Prerequisite</b></u>
  21257. <br><br>
  21258. <li>In combination with GardenaSmartDevice this FHEM Module controls the communication between the GardenaCloud and connected Devices like Mover, Watering_Computer, Temperature_Sensors</li>
  21259. <li>Installation of the following packages: apt-get install libio-socket-ssl-perl</li>
  21260. <li>The Gardena-Gateway and all connected Devices must be correctly installed in the GardenaAPP</li>
  21261. </ul>
  21262. <br>
  21263. <a name="GardenaSmartBridgedefine"></a>
  21264. <b>Define</b>
  21265. <ul><br>
  21266. <code>define &lt;name&gt; GardenaSmartBridge &lt;Account-EMail&gt; &lt;Account-Passwort&gt;</code>
  21267. <br><br>
  21268. Beispiel:
  21269. <ul><br>
  21270. <code>define Gardena_Bridge GardenaSmartBridge me@email.me secret</code><br>
  21271. </ul>
  21272. <br>
  21273. &lt;Account-EMail&gt; Email Adresse which was used in the GardenaAPP<br>
  21274. &lt;Account-Passwort&gt; Passwort which was used in the GardenaAPP<br>
  21275. The GardenaSmartBridge device is created in the room GardenaSmart, then the devices of Your system are recognized automatically and created in FHEM. From now on the devices can be controlled and changes in the GardenaAPP are synchronized with the state and readings of the devices.
  21276. <br><br>
  21277. <a name="GardenaSmartBridgereadings"></a>
  21278. <br><br>
  21279. <b>Readings</b>
  21280. <ul>
  21281. <li>address - your Adress (Longversion)</li>
  21282. <li>authorized_user_ids - </li>
  21283. <li>city - Zip, City</li>
  21284. <li>devices - Number of Devices in the Cloud (Gateway included)</li>
  21285. <li>lastRequestState - Last Status Result</li>
  21286. <li>latitude - Breitengrad des Grundstücks</li>
  21287. <li>longitude - Längengrad des Grundstücks</li>
  21288. <li>name - Name of your Garden – Default „My Garden“</li>
  21289. <li>state - State of the Bridge</li>
  21290. <li>token - SessionID</li>
  21291. <li>zones - </li>
  21292. </ul>
  21293. <br><br>
  21294. <a name="GardenaSmartBridgeset"></a>
  21295. <b>set</b>
  21296. <ul>
  21297. <li>getDeviceState - Starts a Datarequest</li>
  21298. <li>getToken - Gets a new Session-ID</li>
  21299. </ul>
  21300. <br><br>
  21301. <a name="GardenaSmartBridgeattributes"></a>
  21302. <b>Attributes</b>
  21303. <ul>
  21304. <li>debugJSON - </li>
  21305. <li>disable - Disables the Bridge</li>
  21306. <li>interval - Interval in seconds (Default=300)</li>
  21307. </ul>
  21308. </ul>
  21309. <a name="GardenaSmartDevice"></a>
  21310. <h3>GardenaSmartDevice</h3>
  21311. <ul>
  21312. In combination with GardenaSmartBridge this FHEM Module controls the GardenaSmart Device using the GardenaCloud
  21313. <br><br>
  21314. Once the Bridge device is created, the connected devices are automatically recognized and created in FHEM. <br>
  21315. From now on the devices can be controlled and changes in the GardenaAPP are synchronized with the state and readings of the devices.
  21316. <a name="GardenaSmartDevicereadings"></a>
  21317. <br><br><br>
  21318. <b>Readings</b>
  21319. <ul>
  21320. <li>battery-charging - Indicator if the Battery is charged (0/1) or with newer Firmware (false/true)</li>
  21321. <li>battery-level - load percentage of the Battery</li>
  21322. <li>battery-rechargeable_battery_status - healthyness of the battery (out_of_operation/replace_now/low/ok)</li>
  21323. <li>device_info-category - category of device (mower/watering_computer)</li>
  21324. <li>device_info-last_time_online - timestamp of last radio contact</li>
  21325. <li>device_info-manufacturer - manufacturer</li>
  21326. <li>device_info-product - product type</li>
  21327. <li>device_info-serial_number - serial number</li>
  21328. <li>device_info-sgtin - </li>
  21329. <li>device_info-version - firmware version</li>
  21330. <li>firmware-firmware_command - firmware command (idle/firmware_cancel/firmware_upload/unsupported)</li>
  21331. <li>firmware-firmware_status - firmware status </li>
  21332. <li>firmware-firmware_update_start - indicator when a firmwareupload is started</li>
  21333. <li>firmware-firmware_upload_progress - progress indicator of firmware update</li>
  21334. <li>firmware-inclusion_status - inclusion status</li>
  21335. <li>internal_temperature-temperature - internal device temperature</li>
  21336. <li>mower-error - actual error message
  21337. <ul>
  21338. <li>no_message</li>
  21339. <li>outside_working_area</li>
  21340. <li>no_loop_signal</li>
  21341. <li>wrong_loop_signal</li>
  21342. <li>loop_sensor_problem_front</li>
  21343. <li>loop_sensor_problem_rear</li>
  21344. <li>trapped</li>
  21345. <li>upside_down</li>
  21346. <li>low_battery</li>
  21347. <li>empty_battery</li>
  21348. <li>no_drive</li>
  21349. <li>lifted</li>
  21350. <li>stuck_in_charging_station</li>
  21351. <li>charging_station_blocked</li>
  21352. <li>collision_sensor_problem_rear</li>
  21353. <li>collision_sensor_problem_front</li>
  21354. <li>wheel_motor_blocked_right</li>
  21355. <li>wheel_motor_blocked_left</li>
  21356. <li>wheel_drive_problem_right</li>
  21357. <li>wheel_drive_problem_left</li>
  21358. <li>cutting_system_blocked</li>
  21359. <li>invalid_sub_device_combination</li>
  21360. <li>settings_restored</li>
  21361. <li>electronic_problem</li>
  21362. <li>charging_system_problem</li>
  21363. <li>tilt_sensor_problem</li>
  21364. <li>wheel_motor_overloaded_right</li>
  21365. <li>wheel_motor_overloaded_left</li>
  21366. <li>charging_current_too_high</li>
  21367. <li>temporary_problem</li>
  21368. <li>guide_1_not_found</li>
  21369. <li>guide_2_not_found</li>
  21370. <li>guide_3_not_found</li>
  21371. <li>difficult_finding_home</li>
  21372. <li>guide_calibration_accomplished</li>
  21373. <li>guide_calibration_failed</li>
  21374. <li>temporary_battery_problem</li>
  21375. <li>battery_problem</li>
  21376. <li>alarm_mower_switched_off</li>
  21377. <li>alarm_mower_stopped</li>
  21378. <li>alarm_mower_lifted</li>
  21379. <li>alarm_mower_tilted</li>
  21380. <li>connection_changed</li>
  21381. <li>connection_not_changed</li>
  21382. <li>com_board_not_available</li>
  21383. <li>slipped</li>
  21384. </ul>
  21385. </li>
  21386. <li>mower-manual_operation - (0/1) or with newer Firmware (false/true)</li>
  21387. <li>mower-override_end_time - manual override end time</li>
  21388. <li>mower-source_for_next_start - source for the next start
  21389. <ul>
  21390. <li>no_source</li>
  21391. <li>mower_charging</li>
  21392. <li>completed_cutting_autotimer</li>
  21393. <li>week_timer</li>
  21394. <li>countdown_timer</li>
  21395. <li>undefined</li>
  21396. </ul>
  21397. </li>
  21398. <li>mower-status - mower state (see state)</li>
  21399. <li>mower-timestamp_next_start - timestamp of next scheduled start</li>
  21400. <li>radio-connection_status - state of connection</li>
  21401. <li>radio-quality - percentage of the radio quality</li>
  21402. <li>radio-state - radio state (bad/poor/good/undefined)</li>
  21403. <li>state - state of the mower
  21404. <ul>
  21405. <li>paused</li>
  21406. <li>ok_cutting</li>
  21407. <li>ok_searching</li>
  21408. <li>ok_charging</li>
  21409. <li>ok_leaving</li>
  21410. <li>wait_updating</li>
  21411. <li>wait_power_up</li>
  21412. <li>parked_timer</li>
  21413. <li>parked_park_selected</li>
  21414. <li>off_disabled</li>
  21415. <li>off_hatch_open</li>
  21416. <li>unknown</li>
  21417. <li>error</li>
  21418. <li>error_at_power_up</li>
  21419. <li>off_hatch_closed</li>
  21420. <li>ok_cutting_timer_overridden</li>
  21421. <li>parked_autotimer</li>
  21422. <li>parked_daily_limit_reached</li>
  21423. </ul>
  21424. </li>
  21425. </ul>
  21426. <br><br>
  21427. <a name="GardenaSmartDeviceattributes"></a>
  21428. <b>Attributes</b>
  21429. <ul>
  21430. <li>readingValueLanguage - Change the Language of Readings (de,en/if not set the default is english and the global language is not set at german) </li>
  21431. <li>model - </li>
  21432. </ul>
  21433. <br><br>
  21434. <a name="GardenaSmartDeviceset"></a>
  21435. <b>set</b>
  21436. <ul>
  21437. <li>parkUntilFurtherNotice</li>
  21438. <li>parkUntilNextTimer</li>
  21439. <li>startOverrideTimer - 0 to 59 Minutes</li>
  21440. <li>startResumeSchedule</li>
  21441. </ul>
  21442. </ul>
  21443. <a name="GasCalculator"></a>
  21444. <h3>GasCalculator</h3>
  21445. <ul>
  21446. <table>
  21447. <tr>
  21448. <td>
  21449. The GasCalculator Module calculates the gas consumption and costs of one ore more gas counters.<BR>
  21450. It is not a counter module itself but requires a regular expression (regex or regexp) in order to know where retrieve the counting ticks of one or more mechanical gas counter.<BR>
  21451. <BR>
  21452. As soon the module has been defined within the fhem.cfg, the module reacts on every event of the specified counter like myOWDEVICE:counter.* etc.<BR>
  21453. <BR>
  21454. The GasCalculator module provides several current, historical, statistical predictable values around with respect to one or more gas-counter and creates respective readings.<BR>
  21455. <BR>
  21456. To avoid waiting for max. 12 months to have realistic values, the readings <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stDay</code>, <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stMonth</code>, <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stYear</code> and <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stMeter</code> must be corrected with real values by using the <code>setreading</code> - command.
  21457. These real values may be found on the last gas bill. Otherwise it will take 24h for the daily, 30days for the monthly and up to 12 month for the yearly values to become realistic.<BR>
  21458. <BR>
  21459. </td>
  21460. </tr>
  21461. </table>
  21462. <table><tr><td><a name="GasCalculatorDefine"></a><b>Define</b></td></tr></table>
  21463. <table><tr><td><ul><code>define &lt;name&gt; GasCalculator &lt;regex&gt;</code></ul></td></tr></table>
  21464. <ul><ul>
  21465. <table>
  21466. <tr><td><code>&lt;name&gt;</code> : </td><td>The name of the calculation device. Recommendation: "myGasCalculator".</td></tr>
  21467. <tr><td><code>&lt;regex&gt;</code> : </td><td>A valid regular expression (also known as regex or regexp) of the event where the counter can be found</td></tr>
  21468. </table>
  21469. </ul></ul>
  21470. <table><tr><td><ul>Example: <code>define myGasCalculator GasCalculator myGasCounter:countersA.*</code></ul></td></tr></table>
  21471. <BR>
  21472. <table>
  21473. <tr><td><a name="GasCalculatorSet"></a><b>Set</b></td></tr>
  21474. <tr><td>
  21475. <ul>
  21476. The set - function sets individual values for example to correct values after power loss etc.<BR>
  21477. The set - function works only for readings which have been stored in the CalculatorDevice.<BR>
  21478. The Readings being stored in the Counter - Device need to be changed individially with the <code>set</code> - command.<BR>
  21479. </ul>
  21480. </td></tr>
  21481. </table>
  21482. <BR>
  21483. <table>
  21484. <tr><td><a name="GasCalculatorGet"></a><b>Get</b></td></tr>
  21485. <tr><td>
  21486. <ul>
  21487. The get - function just returns the individual value of the reading.<BR>
  21488. The get - function works only for readings which have been stored in the CalculatorDevice.<BR>
  21489. The Readings being stored in the Counter - Device need to be read individially with <code>get</code> - command.<BR>
  21490. </ul>
  21491. </td></tr>
  21492. </table>
  21493. <BR>
  21494. <table>
  21495. <tr><td><a name="GasCalculatorAttr"></a><b>Attributes</b></td></tr>
  21496. <tr><td>
  21497. <ul>
  21498. If the below mentioned attributes have not been pre-defined completly beforehand, the program will create the GasCalculator specific attributes with default values.<BR>
  21499. In addition the global attributes e.g. <a href="#room">room</a> can be used.<BR>
  21500. </ul>
  21501. </td></tr>
  21502. </table>
  21503. <ul><ul>
  21504. <table>
  21505. <tr>
  21506. <td>
  21507. <tr><td><li><code>BasicPricePerAnnum</code> : </li></td><td> A valid float number for basic annual fee in the chosen currency for the gas supply to the home.<BR>
  21508. The value is provided by your local gas provider is shown on your gas bill.<BR>
  21509. For UK users it may known under "Standing Charge". Please make sure it is based on one year<BR>
  21510. The default value is 0.00<BR>
  21511. </td></tr>
  21512. </td>
  21513. </tr>
  21514. </table>
  21515. </ul></ul>
  21516. <ul><ul>
  21517. <table>
  21518. <tr>
  21519. <td>
  21520. <tr><td><li><code>Currency</code> : </li></td><td> One of the pre-defined list of currency symbols [&#8364;,&#163;,&#36;].<BR>
  21521. The default value is &#8364;<BR>
  21522. </td></tr>
  21523. </td>
  21524. </tr>
  21525. </table>
  21526. </ul></ul>
  21527. <ul><ul>
  21528. <table>
  21529. <tr>
  21530. <td>
  21531. <tr><td><li><code>disable</code> : </li></td><td> Disables the current module. The module will not react on any events described in the regular expression.<BR>
  21532. The default value is 0 = enabled.<BR>
  21533. </td></tr>
  21534. </td>
  21535. </tr>
  21536. </table>
  21537. </ul></ul>
  21538. <ul><ul>
  21539. <table>
  21540. <tr>
  21541. <td>
  21542. <tr><td><li><code>GasCounterOffset</code> : </li></td><td> A valid float number of the volume difference = offset (not the difference of the counter ticks!) between the value shown on the mechanic meter for the gas volume and the calculated volume of this device.<BR>
  21543. The value for this offset will be calculated as follows V<sub>Offset</sub> = V<sub>Mechanical</sub> - V<sub>Module</sub><BR>
  21544. The default value is 0.00<BR>
  21545. </td></tr>
  21546. </td>
  21547. </tr>
  21548. </table>
  21549. </ul></ul>
  21550. <ul><ul>
  21551. <table>
  21552. <tr>
  21553. <td>
  21554. <tr><td><li><code>GasCubicPerCounts</code> : </li></td><td> A valid float number of the ammount of volume per ticks.<BR>
  21555. The value is given by the mechanical trigger of the mechanical gas meter. E.g. GasCubicPerCounts = 0.01 means each count is a hundredth of the volume basis unit.<BR>
  21556. The default value is 0.01<BR>
  21557. </td></tr>
  21558. </td>
  21559. </tr>
  21560. </table>
  21561. </ul></ul>
  21562. <ul><ul>
  21563. <table>
  21564. <tr>
  21565. <td>
  21566. <tr><td><li><code>GasNominalHeatingValue</code> : </li></td><td> A valid float number for the gas heating value in [kWh/ chosen Volume].<BR>
  21567. The value is provided by your local gas provider is shown on your gas bill.<BR>
  21568. The default value is 10.00<BR>
  21569. </td></tr>
  21570. </td>
  21571. </tr>
  21572. </table>
  21573. </ul></ul>
  21574. <ul><ul>
  21575. <table>
  21576. <tr>
  21577. <td>
  21578. <tr><td><li><code>GaszValue</code> : </li></td><td> A valid float number for the gas condition based on the local installation of the mechanical gas meter in relation of the gas providers main supply station.<BR>
  21579. The value is provided by your local gas provider is shown on your gas bill.<BR>
  21580. The default value is 1.00<BR>
  21581. </td></tr>
  21582. </td>
  21583. </tr>
  21584. </table>
  21585. </ul></ul>
  21586. <ul><ul>
  21587. <table>
  21588. <tr>
  21589. <td>
  21590. <tr><td><li><code>GasPricePerKWh</code> : </li></td><td> A valid float number for gas price in the chosen currency per kWh for the gas.<BR>
  21591. The value is provided by your local gas provider is shown on your gas bill.<BR>
  21592. The default value is 0.0654<BR>
  21593. </td></tr>
  21594. </td>
  21595. </tr>
  21596. </table>
  21597. </ul></ul>
  21598. <ul><ul>
  21599. <table>
  21600. <tr>
  21601. <td>
  21602. <tr><td><li><code>MonthlyPayment</code> : </li></td><td> A valid float number for monthly advance payments in the chosen currency towards the gas supplier.<BR>
  21603. The default value is 0.00<BR>
  21604. </td></tr>
  21605. </td>
  21606. </tr>
  21607. </table>
  21608. </ul></ul>
  21609. <ul><ul>
  21610. <table>
  21611. <tr>
  21612. <td>
  21613. <tr><td><li><code>MonthOfAnnualReading</code> : </li></td><td> A valid integer number for the month when the mechanical gas meter reading is performed every year.<BR>
  21614. The default value is 5 (May)<BR>
  21615. </td></tr>
  21616. </td>
  21617. </tr>
  21618. </table>
  21619. </ul></ul>
  21620. <ul><ul>
  21621. <table>
  21622. <tr>
  21623. <td>
  21624. <tr><td><li><code>ReadingDestination</code> : </li></td><td> One of the pre-defined list for the destination of the calculated readings: [CalculatorDevice,CounterDevice].<BR>
  21625. The CalculatorDevice is the device which has been created with this module.<BR>
  21626. The CounterDevice is the Device which is reading the mechanical gas-meter.<BR>
  21627. The default value is CalculatorDevice - Therefore the readings will be written into this device.<BR>
  21628. </td></tr>
  21629. </td>
  21630. </tr>
  21631. </table>
  21632. </ul></ul>
  21633. <ul><ul>
  21634. <table>
  21635. <tr>
  21636. <td>
  21637. <tr><td><li><code>Volume</code> : </li></td><td> One of the pre-defined list of volume symbols [m&#179;,ft&#179;].<BR>
  21638. The default value is m&#179;<BR>
  21639. </td></tr>
  21640. </td>
  21641. </tr>
  21642. </table>
  21643. </ul></ul>
  21644. <BR>
  21645. <table>
  21646. <tr><td><a name="GasCalculatorReadings"></a><b>Readings</b></td></tr>
  21647. <tr><td>
  21648. <ul>
  21649. As soon the device has been able to read at least 2 times the counter, it automatically will create a set readings:<BR>
  21650. The placeholder <code>&lt;DestinationDevice&gt;</code> is the device which has been chosen in the attribute <code>ReadingDestination</code> above. This will not appear if CalculatorDevice has been chosen.<BR>
  21651. The placeholder <code>&lt;SourceCounterReading&gt;</code> is the reading based on the defined regular expression.<BR>
  21652. </ul>
  21653. </td></tr>
  21654. </table>
  21655. <ul><ul>
  21656. <table>
  21657. <tr>
  21658. <td>
  21659. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostDayLast</code> : </li></td><td>Energy costs of the last day.<BR>
  21660. </td></tr>
  21661. </td>
  21662. </tr>
  21663. </table>
  21664. </ul></ul>
  21665. <ul><ul>
  21666. <table>
  21667. <tr>
  21668. <td>
  21669. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMeter</code> : </li></td><td> Energy costs in the chosen currency since the beginning of the month of where the last gas-meter reading has been performed by the gas supplier.<BR>
  21670. </td></tr>
  21671. </td>
  21672. </tr>
  21673. </table>
  21674. </ul></ul>
  21675. <ul><ul>
  21676. <table>
  21677. <tr>
  21678. <td>
  21679. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMeterLast</code> : </li></td><td> Energy costs in the chosen currency of the last gas-meter period.<BR>
  21680. </td></tr>
  21681. </td>
  21682. </tr>
  21683. </table>
  21684. </ul></ul>
  21685. <ul><ul>
  21686. <table>
  21687. <tr>
  21688. <td>
  21689. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMonth</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current month.<BR>
  21690. </td></tr>
  21691. </td>
  21692. </tr>
  21693. </table>
  21694. </ul></ul>
  21695. <ul><ul>
  21696. <table>
  21697. <tr>
  21698. <td>
  21699. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostMonthLast</code> : </li></td><td>Energy costs in the chosen currency of the last month.<BR>
  21700. </td></tr>
  21701. </td>
  21702. </tr>
  21703. </table>
  21704. </ul></ul>
  21705. <ul><ul>
  21706. <table>
  21707. <tr>
  21708. <td>
  21709. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostYear</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current year.<BR>
  21710. </td></tr>
  21711. </td>
  21712. </tr>
  21713. </table>
  21714. </ul></ul>
  21715. <ul><ul>
  21716. <table>
  21717. <tr>
  21718. <td>
  21719. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyCostYearLast</code> : </li></td><td>Energy costs of the last calendar year.<BR>
  21720. </td></tr>
  21721. </td>
  21722. </tr>
  21723. </table>
  21724. </ul></ul>
  21725. <ul><ul>
  21726. <table>
  21727. <tr>
  21728. <td>
  21729. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyDay</code> : </li></td><td>Energy consumption in kWh since the beginning of the current day (midnight).<BR>
  21730. </td></tr>
  21731. </td>
  21732. </tr>
  21733. </table>
  21734. </ul></ul>
  21735. <ul><ul>
  21736. <table>
  21737. <tr>
  21738. <td>
  21739. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyDayLast</code> : </li></td><td>Total Energy consumption in kWh of the last day.<BR>
  21740. </td></tr>
  21741. </td>
  21742. </tr>
  21743. </table>
  21744. </ul></ul>
  21745. <ul><ul>
  21746. <table>
  21747. <tr>
  21748. <td>
  21749. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMeter</code> : </li></td><td>Energy consumption in kWh since the beginning of the month of where the last gas-meter reading has been performed by the gas supplier.<BR>
  21750. </td></tr>
  21751. </td>
  21752. </tr>
  21753. </table>
  21754. </ul></ul>
  21755. <ul><ul>
  21756. <table>
  21757. <tr>
  21758. <td>
  21759. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMeterLast</code> : </li></td><td>Total Energy consumption in kWh of the last gas-meter reading period.<BR>
  21760. </td></tr>
  21761. </td>
  21762. </tr>
  21763. </table>
  21764. </ul></ul>
  21765. <ul><ul>
  21766. <table>
  21767. <tr>
  21768. <td>
  21769. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMonth</code> : </li></td><td>Energy consumption in kWh since the beginning of the current month (midnight of the first).<BR>
  21770. </td></tr>
  21771. </td>
  21772. </tr>
  21773. </table>
  21774. </ul></ul>
  21775. <ul><ul>
  21776. <table>
  21777. <tr>
  21778. <td>
  21779. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyMonthLast</code> : </li></td><td>Total Energy consumption in kWh of the last month.<BR>
  21780. </td></tr>
  21781. </td>
  21782. </tr>
  21783. </table>
  21784. </ul></ul>
  21785. <ul><ul>
  21786. <table>
  21787. <tr>
  21788. <td>
  21789. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyYear</code> : </li></td><td>Energy consumption in kWh since the beginning of the current year (midnight of the first).<BR>
  21790. </td></tr>
  21791. </td>
  21792. </tr>
  21793. </table>
  21794. </ul></ul>
  21795. <ul><ul>
  21796. <table>
  21797. <tr>
  21798. <td>
  21799. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_EnergyYearLast</code> : </li></td><td>Total Energy consumption in kWh of the last calendar year.<BR>
  21800. </td></tr>
  21801. </td>
  21802. </tr>
  21803. </table>
  21804. </ul></ul>
  21805. <ul><ul>
  21806. <table>
  21807. <tr>
  21808. <td>
  21809. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_FinanceReserve</code> : </li></td><td>Financial Reserver based on the advanced payments done on the first of every month towards the gas supplier. With negative values, an additional payment is to be excpected.<BR>
  21810. </td></tr>
  21811. </td>
  21812. </tr>
  21813. </table>
  21814. </ul></ul>
  21815. <ul><ul>
  21816. <table>
  21817. <tr>
  21818. <td>
  21819. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_MonthMeterReading</code> : </li></td><td>Number of month since last meter reading. The month when the reading occured is the first month = 1.<BR>
  21820. </td></tr>
  21821. </td>
  21822. </tr>
  21823. </table>
  21824. </ul></ul>
  21825. <ul><ul>
  21826. <table>
  21827. <tr>
  21828. <td>
  21829. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Meter</code> : </li></td><td>Current indicated total volume consumption on mechanical gas meter. Correct Offset-attribute if not identical.<BR>
  21830. </td></tr>
  21831. </td>
  21832. </tr>
  21833. </table>
  21834. </ul></ul>
  21835. <ul><ul>
  21836. <table>
  21837. <tr>
  21838. <td>
  21839. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerCurrent</code> : </li></td><td>Current heating Power. (Average between current and previous measurement.)<BR>
  21840. </td></tr>
  21841. </td>
  21842. </tr>
  21843. </table>
  21844. </ul></ul>
  21845. <ul><ul>
  21846. <table>
  21847. <tr>
  21848. <td>
  21849. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerDayAver</code> : </li></td><td>Average heating Power since midnight.<BR>
  21850. </td></tr>
  21851. </td>
  21852. </tr>
  21853. </table>
  21854. </ul></ul>
  21855. <ul><ul>
  21856. <table>
  21857. <tr>
  21858. <td>
  21859. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerDayMax</code> : </li></td><td>Maximum power peak since midnight.<BR>
  21860. </td></tr>
  21861. </td>
  21862. </tr>
  21863. </table>
  21864. </ul></ul>
  21865. <ul><ul>
  21866. <table>
  21867. <tr>
  21868. <td>
  21869. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_PowerDayMin</code> : </li></td><td>Minimum power peak since midnight.<BR>
  21870. </td></tr>
  21871. </td>
  21872. </tr>
  21873. </table>
  21874. </ul></ul>
  21875. <ul><ul>
  21876. <table>
  21877. <tr>
  21878. <td>
  21879. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stDay</code> : </li></td><td>First volume reading of the current day.<BR>
  21880. </td></tr>
  21881. </td>
  21882. </tr>
  21883. </table>
  21884. </ul></ul>
  21885. <ul><ul>
  21886. <table>
  21887. <tr>
  21888. <td>
  21889. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_VolLastDay</code> : </li></td><td>Volume reading of the previous day.<BR>
  21890. </td></tr>
  21891. </td>
  21892. </tr>
  21893. </table>
  21894. </ul></ul>
  21895. <ul><ul>
  21896. <table>
  21897. <tr>
  21898. <td>
  21899. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stMonth</code> : </li></td><td>First volume reading of the current month.<BR>
  21900. </td></tr>
  21901. </td>
  21902. </tr>
  21903. </table>
  21904. </ul></ul>
  21905. <ul><ul>
  21906. <table>
  21907. <tr>
  21908. <td>
  21909. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_VolLastMonth</code> : </li></td><td>Volume reading of the previous month.<BR>
  21910. </td></tr>
  21911. </td>
  21912. </tr>
  21913. </table>
  21914. </ul></ul>
  21915. <ul><ul>
  21916. <table>
  21917. <tr>
  21918. <td>
  21919. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stYear</code> : </li></td><td>First volume reading of the current year.<BR>
  21920. </td></tr>
  21921. </td>
  21922. </tr>
  21923. </table>
  21924. </ul></ul>
  21925. <ul><ul>
  21926. <table>
  21927. <tr>
  21928. <td>
  21929. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_VolLastYear</code> : </li></td><td>Volume reading of the previous year.<BR>
  21930. </td></tr>
  21931. </td>
  21932. </tr>
  21933. </table>
  21934. </ul></ul>
  21935. <ul><ul>
  21936. <table>
  21937. <tr>
  21938. <td>
  21939. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_Vol1stMeter</code> : </li></td><td>First volume reading of the first day of the month of the current meter reading period.<BR>
  21940. </td></tr>
  21941. </td>
  21942. </tr>
  21943. </table>
  21944. </ul></ul>
  21945. <ul><ul>
  21946. <table>
  21947. <tr>
  21948. <td>
  21949. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_VolLastMeter</code> : </li></td><td>Volume reading of the first day of the month of the last meter reading period.<BR>
  21950. </td></tr>
  21951. </td>
  21952. </tr>
  21953. </table>
  21954. </ul></ul>
  21955. </ul>
  21956. <a name="GoogleAuth"></a>
  21957. <h3>GoogleAuth</h3>
  21958. <ul>
  21959. GoogleAuthenticator provides two-factor-authentication using one-time-passwords (token).<br/>
  21960. These tokens are generated using the mobile app „Google Authenticator“ for example on a smartphone.<br/>
  21961. See <a href="https://en.wikipedia.org/wiki/Google_Authenticator">https://en.wikipedia.org/wiki/Google_Authenticator</a>
  21962. for more informations.<br/>
  21963. <br/>
  21964. <br/>
  21965. <b>Prerequesits</b><br/>
  21966. <br/>
  21967. <li>The fhem implementation of the Google Authenticator is credited to the following publication:<br/>
  21968. <a href="https://blog.darkpan.com/article/6/Perl-and-Google-Authenticator.html">https://blog.darkpan.com/article/6/Perl-and-Google-Authenticator.html</a></li>
  21969. <br/>
  21970. <li>Module uses following additional Perl modules:<br/>
  21971. <br/>
  21972. <ul><code>Convert::Base32 Authen::OATH Crypt::URandom</code></ul>
  21973. <br/>
  21974. If not already installed in your environment, please install them using appropriate commands from your environment.<br/>
  21975. <br/>
  21976. Package installation in debian environments:<br/>
  21977. <br/>
  21978. <ul><code>apt-get install libconvert-base32-perl libauthen-oath-perl libcrypt-urandom-perl</code></ul></li>
  21979. <br/>
  21980. <br/>
  21981. <a name="GoogleAuthdefine"></a>
  21982. <b>Define</b><br/><br/>
  21983. <ul>
  21984. <code>define &lt;name&gt; GoogleAuth</code><br/>
  21985. <br/>
  21986. Example:<br/><br/>
  21987. <ul><code>define googleAuth GoogleAuth</code><br/></ul>
  21988. </ul>
  21989. <br/>
  21990. <br/>
  21991. <a name="GoogleAuthset"></a>
  21992. <b>Set Commands</b><br/><br/>
  21993. <ul>
  21994. <li><code>set &lt;name&gt; new</code><br/>
  21995. <br/>
  21996. Generates a new secret key and displays the corresponding QR image.<br/>
  21997. Using the photo function of the Google Authenticator app,<br/>
  21998. this QR image can be used to transfer the secret key to the app.
  21999. </li>
  22000. <br/>
  22001. <li><code>set &lt;name&gt; revoke</code><br/>
  22002. <br/>
  22003. Remove existing key.<br/>
  22004. <b>You can not create a new key before</b> an existing key was deleted.<br/>
  22005. </li>
  22006. </ul>
  22007. <br/>
  22008. <br/>
  22009. <a name="GoogleAuthget"></a>
  22010. <b>Get Commands</b><br/><br/>
  22011. <ul>
  22012. <li><code>get &lt;name&gt; check &lt;token&gt;</code><br/>
  22013. <br/>
  22014. Check the validity of a given token; return value is 1 for a valid token, otherwise -1.<br/>
  22015. <ul>
  22016. <li>Token always consists of six numerical digits and will change every 30 seconds.</li>
  22017. <li>Token is valid if it matches one of three tokens calculated by FHEM<br/>
  22018. using three timestamps: -30 seconds, now and +30 seconds.<br/>
  22019. This behavior can be changed by attribute ga_strictCheck.</li>
  22020. </ul>
  22021. <br/>
  22022. </li>
  22023. <li><code>gAuth(&lt;name&gt;,&lt;token&gt;)</code><br/>
  22024. <br/>
  22025. For easy use in your own functions you can call function gAuth(),<br/>
  22026. which will return same result codes as the "get" command.
  22027. </li>
  22028. </ul>
  22029. <br/>
  22030. <br/>
  22031. <a name="GoogleAuthattr"></a>
  22032. <b>Attributes</b><br/><br/>
  22033. <ul>
  22034. <li><b>ga_labelName</b> - define a Name to identify PassCode inside the app.<br/>
  22035. <b>Do not use any special characters,</b> except SPACE, in this attribute!</li>
  22036. <li><b>ga_qrSize</b> - select image size of qr code</li>
  22037. <li><b>ga_showKey</b> - show key for manual use if set to 1</li>
  22038. <li><b>ga_showLink</b> - show link to qr code if set to 1</li>
  22039. <li><b>ga_showQR</b> - show qr code if set to 1</li>
  22040. <li><b>ga_strictCheck</b><br/>
  22041. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AttrVal = 1 : check given token against one token<br/>
  22042. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AttrVal = 0 : check given token against three tokens(default)</li>
  22043. </ul>
  22044. <br/>
  22045. <br/>
  22046. <a name="GoogleAuthreadings"></a>
  22047. <b>Generated Readings/Events</b><br/><br/>
  22048. <ul>
  22049. <li><b>lastResult</b> - contains result from last token check</li>
  22050. <li><b>state</b> - "active" if a key is set, otherwise "defined"</li>
  22051. </ul>
  22052. <br/>
  22053. <br/>
  22054. </ul>
  22055. <a name="HCS"></a>
  22056. <h3>HCS</h3>
  22057. <ul>
  22058. Defines a virtual device for monitoring thermostats (FHT, HM-CC-TC, MAX) to control a central
  22059. heating unit.<br><br>
  22060. <a name="HCSdefine"></a>
  22061. <b>Define</b>
  22062. <ul>
  22063. <code>define &lt;name&gt; HCS &lt;device&gt;</code>
  22064. <br><br>
  22065. <ul>
  22066. <li><code>&lt;device&gt;</code> the name of a predefined device to switch.</li>
  22067. </ul>
  22068. <br>
  22069. The HCS (heating control system) device monitors the state of all detected thermostats
  22070. in a free definable interval (by default: 10 min).
  22071. <br><br>
  22072. Regulation for heating requirement or suppression of the request can be controlled by
  22073. valve position or measured temperature (default) using also free definable thresholds.
  22074. In doing so, the HCS device also includes the hysteresis between two states.
  22075. <br><br>
  22076. Example for monitoring measured temperature:
  22077. <ul>
  22078. Threshold temperature for heating requirement: 0.5 (default)<br>
  22079. Threshold temperature for idle: 0.5 (default)<br>
  22080. <br>
  22081. Heating is required when the measured temperature of a thermostat is lower than
  22082. 0.5&deg; Celsius as the desired temperature. HCS then activates the defined device
  22083. until the measured temperature of the thermostat is 0.5&deg; Celsius higher as the
  22084. desired temperature (threshold for idle). In this example, both tresholds are equal.
  22085. </ul>
  22086. <br>
  22087. Example for monitoring valve position:
  22088. <ul>
  22089. Threshold valve position for heating requirement: 40% (default)<br>
  22090. Threshold valve position for idle: 35% (default)<br>
  22091. <br>
  22092. Heating is required when the "open" position of a valve is more than 40%. HCS then
  22093. activates the defined device until the "open" position of the valve has lowered to
  22094. 35% or less (threshold for idle).
  22095. </ul>
  22096. <br>
  22097. The HCS device supports an optional eco mode. The threshold oriented regulation by
  22098. measured temperature or valve position can be overridden by setting economic thresholds.
  22099. <br><br>
  22100. Example:
  22101. <ul>
  22102. Threshold temperature economic mode on: 15&deg; Celsius<br>
  22103. Threshold temperature economic mode off: 25&deg; Celsius<br>
  22104. <br>
  22105. HCS activates the defined device until the measured temperature of one ore more
  22106. thermostats is lower or equal than 15&deg; Celsius. If a measured temperature of one
  22107. or more thermostats is higher or equal than 25&deg; Celsius, HCS switch of the defined
  22108. device (if none of the measured temperatures of all thermostats is lower or equal as
  22109. 15&deg; Celsius).
  22110. </ul>
  22111. <br>
  22112. In addition, the HCS device supports an optional temp-sensor. The threshold and economic
  22113. oriented regulation can be overriden by the reading of the temp-sensor (overdrive mode).
  22114. <br><br>
  22115. Example:
  22116. <ul>
  22117. Threshold temperature reading for heating requirement: 10&deg; Celsius<br>
  22118. Threshold temperature reading for idle: 18&deg; Celsius<br>
  22119. <br>
  22120. Is a measured temperature ore valve position reaching or exceeding the threshold for
  22121. heating requirement, but the temperature reading is more than 18&deg; Celcius, the
  22122. selected device will stay deactivated. The measured temperature or valve-position
  22123. oriented regulation has been overridden by the temperature reading in this example.
  22124. </ul>
  22125. <br>
  22126. The HCS device automatically detects devices which are ignored. Furthermore, certain
  22127. devices can also be excluded of the monitoring manually.
  22128. <br><br>
  22129. To reduce the transmission load, use the attribute event-on-change-reading, e.g.
  22130. <code>attr &lt;name&gt; event-on-change-reading state,devicestate,eco,overdrive</code>
  22131. <br><br>
  22132. To avoid frequent switching "on" and "off" of the device, a timeout (in minutes) can be set
  22133. using the attribute <code>idleperiod</code>.
  22134. <br><br>
  22135. <a name="HCSget"></a>
  22136. <b>Get </b>
  22137. <ul>
  22138. <li><code>values</code><br>
  22139. returns the actual values of each device
  22140. </li>
  22141. </ul>
  22142. <br>
  22143. <a name="HCSset"></a>
  22144. <b>Set</b>
  22145. <ul>
  22146. <li><code>eco &lt;on&gt;|&lt;off&gt;</code><br>
  22147. enable (<code>on</code>) or disable (<code>off</code>) the economic mode.
  22148. </li>
  22149. <li><code>interval &lt;value&gt;</code><br>
  22150. <code>value</code> modifies the interval of reading the actual valve positions.
  22151. The unit is minutes.
  22152. </li>
  22153. <li><code>mode &lt;thermostat&gt;|&lt;valve&gt;</code><br>
  22154. changes the operational mode:<br>
  22155. <code>thermostat</code> controls the heating demand by defined temperature
  22156. thresholds.<br>
  22157. <code>valve</code> controls the heating demand by defined valve position thresholds.
  22158. </li>
  22159. <li><code>on</code><br>
  22160. restarts the monitoring after shutdown by <code>off</code> switch.<br>
  22161. HCS device starts up automatically upon FHEM start or after new device implementation!
  22162. </li>
  22163. <li><code>off</code><br>
  22164. shutdown of monitoring, can be restarted by using the <code>on</code> command.
  22165. </li>
  22166. </ul>
  22167. <br>
  22168. <a name="HCSattr"></a>
  22169. <b>Attributes</b>
  22170. <ul>
  22171. <li><code>deviceCmdOn</code> (mandatory)<br>
  22172. command to activate the device, e.g. <code>on</code>.
  22173. Default value: <code>on</code>
  22174. </li>
  22175. <li><code>deviceCmdOff</code> (mandatory)<br>
  22176. command to deactivate the device, e.g. <code>off</code>.
  22177. Default value: <code>off</code>
  22178. </li>
  22179. <li><code>ecoTemperatureOn</code> (Required by <code>eco</code> mode)<br>
  22180. defines threshold for measured temperature upon which device is allways switched on
  22181. </li>
  22182. <li><code>ecoTemperatureOff</code> (Required by <code>eco</code> mode)<br>
  22183. defines threshold for measured temperature upon which device is switched off
  22184. </li>
  22185. <li><code>exclude</code> (optional)<br>
  22186. space or comma separated list of devices (FHT or HM-CC-TC) for excluding from
  22187. monitoring
  22188. </li>
  22189. <li><code>idleperiod</code> (mandatory)<br>
  22190. locks the device to be switched for the specified period. The unit is minutes.
  22191. Default value: <code>10</code>
  22192. </li>
  22193. <li><code>mode</code> (mandatory)<br>
  22194. defines the operational mode:<br>
  22195. <code>thermostat</code> controls the heating demand by defined temperature
  22196. thresholds.<br>
  22197. <code>valve</code> controls the heating demand by defined valve position thresholds.<br>
  22198. Default value: <code>thermostat</code>
  22199. </li>
  22200. <li><code>sensor</code> (optional)<br>
  22201. device name of the temp-sensor
  22202. </li>
  22203. <li><code>sensorThresholdOn</code> (Required by <code>sensor</code>)<br>
  22204. threshold for temperature reading activating the defined device
  22205. Must be set if <code>sensor</code> has been defined
  22206. </li>
  22207. <li><code>sensorThresholdOff</code> (Required by <code>sensor</code>)<br>
  22208. threshold for temperature reading deactivating the defined device.
  22209. Must be set if <code>sensor</code> has been defined
  22210. </li>
  22211. <li><code>sensorReading</code> (Required by <code>sensor</code>)<br>
  22212. name which is used for saving the "reading" of the defined temp-sensor.
  22213. </li>
  22214. <li><code>thermostatThresholdOn</code> (Required by operational mode <code>thermostat</code>)<br>
  22215. defines delta threshold between desired and measured temperature upon which device
  22216. is switched on (heating required).<br>
  22217. Default value: <code>0.5</code>
  22218. </li>
  22219. <li><code>thermostatThresholdOff</code> (Required by operational mode <code>thermostat</code>)<br>
  22220. defines delta threshold between desired and measured temperature upon which
  22221. device is switched off (idle).<br>
  22222. Default value: <code>0.5</code>
  22223. </li>
  22224. <li><code>valveThresholdOn</code> (Required by operational mode <code>valve</code>)<br>
  22225. defines threshold of valve-position upon which device is switched on (heating
  22226. required).<br>
  22227. Default value: <code>40</code>
  22228. </li>
  22229. <li><code>valveThresholdOff</code> (Required by operational mode <code>valve</code>)<br>
  22230. defines threshold of valve-position upon which device is switched off (idle).<br>
  22231. Default value: <code>35</code>
  22232. </li>
  22233. <li><a href="#disable"><code>disable</code></a></li>
  22234. <li><a href="#do_not_notify"><code>do_not_notify</code></a></li>
  22235. <li><a href="#event-on-change-reading"><code>event-on-change-reading</code></a><br>
  22236. default value: <code>state,devicestate,eco,overdrive</code>
  22237. </li>
  22238. <li><a href="#event-on-update-reading"><code>event-on-update-reading</code></a></li>
  22239. <li><a href="#verbose"><code>verbose</code></a><br>
  22240. verbose 4 (or lower) shows a complete statistic of scanned devices (FHT or HM-CC-TC).<br>
  22241. verbose 3 shows a short summary of scanned devices.<br>
  22242. verbose 2 suppressed the above messages.
  22243. </li>
  22244. </ul>
  22245. <br>
  22246. </ul>
  22247. <br>
  22248. </ul>
  22249. <a name="HEATRONIC"></a>
  22250. <h3>HEATRONIC</h3>
  22251. <ul>
  22252. The HEATRONIC module interprets messages received from the HT-Bus of a Junkers Boiler. <br/>
  22253. Possible Adapters are described in http://www.mikrocontroller.net/topic/317004 (only in german).
  22254. <br/><br/>
  22255. <a name="HEATRONIC_Define"></a>
  22256. <B>Define:</B><br/>
  22257. <ul><code>define &lt;name&gt; HEATRONIC &lt;serial-device | &lt;proxy-server IP-address:port&gt;</code>
  22258. <B>Example for serial-device:</B></br>
  22259. <ul>
  22260. <code> define Boiler HEATRONIC /dev/ttyUSB0@9600</code>
  22261. </ul><br/>
  22262. <B>Example for proxy-server:</B></br>
  22263. <ul>
  22264. <code> define Boiler HEATRONIC 192.168.2.11:8088</code>
  22265. </ul></ul><br/>
  22266. <a name="HEATRONIC_set"><b>Set:</b></a>
  22267. <ul>
  22268. <code>set &lt;name&gt; &lt;param&gt; &lt;value&gt;</code><br/>
  22269. <ul>(only possible with ht_pitiny- or ht_piduino-adapters)</ul><br/>
  22270. where param is one of:
  22271. <ul>
  22272. <li>hc1_Trequired &lt;temp&gt;<br>
  22273. sets the 'heating' temperature-niveau for heating circuit 1 (permanent)<br/>
  22274. 0.5 celsius resolution - temperature between 10 and 30 celsius
  22275. </li>
  22276. <li>hc1_mode [ auto | comfort | eco | frost ]<br>
  22277. sets the working mode for heating circuit 1<br>
  22278. <ul>
  22279. <li>auto : the timer program is active and the summer configuration is in effect</li>
  22280. <li>comfort: manual by 'comfort' working mode, no timer program is in effect</li>
  22281. <li>eco : manual by 'eco' working mode, no timer program is in effect</li>
  22282. <li>frost : manual by 'frost' working mode, no timer program is in effect</li>
  22283. </ul></li>
  22284. </ul><br/>
  22285. Examples:
  22286. <ul>
  22287. <code>set Boiler hc1_Trequired 22.5</code><br>
  22288. <code>set Boiler hc1_mode eco</code>
  22289. </ul><br/>
  22290. </ul><br/>
  22291. <a name="HEATRONIC_attributes"><b>Attributes:</b></a>
  22292. <ul>
  22293. <li><B>interval_ch_time, interval_ch_Tflow_measured, interval_dhw_Tmeasured, interval_dhw_Tcylinder</B><br/>
  22294. interval (in seconds) to update the corresponding values
  22295. </li><br/>
  22296. <li><B>minDiff_ch_Tflow_measured</B><br/>
  22297. minimal difference (in degrees, e.g. 0.2) to update the corresponding values
  22298. </li><br/>
  22299. </ul>
  22300. <a name="HEATRONIC_readings"><b>Readings:</b></a>
  22301. <ul>
  22302. <li><B>ch_Tflow_desired</B><br/>
  22303. required flow temperature (in domestic hot water mode value of max vessel temperature)<br>
  22304. </li><br/>
  22305. <li><B>ch_Tflow_measured</B><br/>
  22306. current measured flow temperature
  22307. </li><br/>
  22308. <li><B>ch_Treturn</B><br/>
  22309. current measured return temperature
  22310. </li><br/>
  22311. <li><B>ch_Tmixer</B><br/>
  22312. current measured mixer temperature
  22313. </li><br/>
  22314. <li><B>ch_mode</B><br/>
  22315. current operation mode (0=off, 1=heating, 2=domestic hot water)
  22316. </li><br/>
  22317. <li><B>ch_code</B><br/>
  22318. current operation code or extended error code (see manual of boiler)
  22319. </li><br/>
  22320. <li><B>ch_code</B><br/>
  22321. error code (see manual of boiler)
  22322. </li><br/>
  22323. <li><B>ch_burner_fan</B><br/>
  22324. status of burner fan (0=off, 1=running)
  22325. </li><br/>
  22326. <li><B>ch_burner_operation</B><br/>
  22327. burner status (0=off, 1=on)
  22328. </li><br/>
  22329. <li><B>ch_pump_heating</B><br/>
  22330. status of the heating pump(0=off, 1=running)
  22331. </li><br/>
  22332. <li><B>ch_pump_cylinder</B><br/>
  22333. status of cylinder loading pump (0=off, 1=running)
  22334. </li><br/>
  22335. <li><B>ch_pump_circulation</B><br/>
  22336. status of circulation pump (0=off, 1=running)
  22337. </li><br/>
  22338. <li><B>ch_burner_power</B><br/>
  22339. burner power in percent
  22340. </li><br/>
  22341. <li><B>ch_pump_heating_power</B><br/>
  22342. power of heating power in percent
  22343. </li><br/>
  22344. <li><B>ch_Toutside</B><br/>
  22345. outside temperature
  22346. </li><br/>
  22347. <li><B>ch_runtime_total</B><br/>
  22348. runtime of burner in minutes (heating and domestic hot water)
  22349. </li><br/>
  22350. <li><B>ch_runtime_ch</B><br/>
  22351. runtime of burner in minutes (heating only)
  22352. </li><br/>
  22353. <li><B>ch_runtime_dhw</B><br/>
  22354. runtime of burner in minutes (domestic hot water only)
  22355. </li><br/>
  22356. <li><B>ch_starts_tot</B><br/>
  22357. count of burner operations (heating and domestic hot water)
  22358. </li><br/>
  22359. <li><B>ch_starts_ch</B><br/>
  22360. count of burner operations (heating only)
  22361. </li><br/>
  22362. <li><B>ch_starts_dhw</B><br/>
  22363. count of burner operations (domestic hot water only)
  22364. </li><br/>
  22365. <li><B>ch_time</B><br/>
  22366. system time of boiler
  22367. </li><br/>
  22368. <li><B>hc1_Tdesired .. hc4_Tdesired</B><br/>
  22369. required room temperature for heating circuit 1-4
  22370. </li><br/>
  22371. <li><B>hc1_Tmeasured .. hc4_Tmeasured</B><br/>
  22372. current measured room temperature for heating circuit 1-4
  22373. </li><br/>
  22374. <li><B>hc1_Tmode .. hc4_Tmode</B><br/>
  22375. operating mode for heating circuit 1-4
  22376. </li><br/>
  22377. <li><B>dhw_Tdesired</B><br/>
  22378. required domestic hot water temperature
  22379. </li><br/>
  22380. <li><B>dhw_Tmeasured</B><br/>
  22381. current measured domestic hot water temperature
  22382. </li><br/>
  22383. <li><B>dhw_Tcylinder</B><br/>
  22384. current measured domestic hot water temperature at the top of the cylinder
  22385. </li><br/>
  22386. <li><B>sol_Tcollector</B><br/>
  22387. temperature of collector groupp 1
  22388. </li><br/>
  22389. <li><B>sol_Tcylinder_bottom</B><br/>
  22390. temperature at the bottom of solar cylinder
  22391. </li><br/>
  22392. <li><B>sol_yield_last_hour</B><br/>
  22393. yield of collector in the last hour
  22394. </li><br/>
  22395. <li><B>sol_yield_2</B><br/>
  22396. This value is unkown at the moment. The name can be changed later.
  22397. </li><br/>
  22398. <li><B>sol_pump</B><br/>
  22399. status of solar circuit pump (0=off, 1=running)
  22400. </li><br/>
  22401. <li><B>sol_runtime</B><br/>
  22402. runtime of solar pump in minutes
  22403. </li><br/>
  22404. </ul>
  22405. </ul>
  22406. <a name="HEOSGroup"></a>
  22407. <h3>HEOSGroup</h3>
  22408. <ul>
  22409. <u><b>HEOSGroup</b></u>
  22410. <br><br>
  22411. In combination with HEOSMaster and HEOSPlayer this FHEM Module controls the Denon multiroom soundsystem using a telnet socket connection and the HEOS Command Line Interface (CLI).
  22412. <br><br>
  22413. Once the master device is created, the players and groups of Your system are automatically recognized and created in FHEM. From now on the players and groups can be controlled and changes in the HEOS app or at the Receiver are synchronized with the state and media readings of the players and groups.
  22414. <br>
  22415. <br>
  22416. Groups can be created from a player with "groupWithMember".
  22417. <br><br>
  22418. Example:
  22419. <ul><br>
  22420. <code>set living groupWithMember kitchen</code><br>
  22421. </ul>
  22422. <br>
  22423. ... creates a group named "living+kitchen" with player "living" as leader and player "kitchen" as member.
  22424. <a name="HEOSGroupreadings"></a>
  22425. <br><br>
  22426. <a name="HEOSGroupreadings"></a>
  22427. <br><br>
  22428. <b>Readings</b>
  22429. <ul>
  22430. <li>channel - nr of now playing favorite</li>
  22431. <li>currentAlbum - name of now playing album</li>
  22432. <li>currentArtist - name of now playing artist</li>
  22433. <li>currentImageUrl - URL of cover art, station logo, etc.</li>
  22434. <li>currentMedia - type of now playing media (song|station|genre|artist|album|container)</li>
  22435. <li>currentMid - media ID</li>
  22436. <li>currentQid - queue ID</li>
  22437. <li>currentSid - source ID</li>
  22438. <li>currentStation - name of now playing station</li>
  22439. <li>currentTitle - name of now playing title</li>
  22440. <li>error - last error</li>
  22441. <li>gid - group ID</li>
  22442. <li>leader - leader of the group</li>
  22443. <li>member - member(s) of the group</li>
  22444. <li>mute - player mute state (on|off)</li>
  22445. <li>name - name of player (received from app)</li>
  22446. <li>playStatus - state of player (play|pause|stop)</li>
  22447. <li>repeat - player repeat state (on_all|on_one|off)</li>
  22448. <li>shuffle - player shuffle state (on|off)</li>
  22449. <li>state - state of player connection (on|off)</li>
  22450. <li>volume - player volume level (0-100)</li>
  22451. <li>volumeDown - player volume step level (1-10, default 5)</li>
  22452. <li>volumeUp - player volume step level (1-10, default 5)</li>
  22453. </ul>
  22454. <br><br>
  22455. <a name="HEOSGroupset"></a>
  22456. <b>set</b>
  22457. <ul>
  22458. <li>channel &ltnr&gt - plays favorite &ltnr&gt created with app</li>
  22459. <li>channelUp - switches to next favorite</li>
  22460. <li>channelDown- switches to previous favorite</li>
  22461. <li>clearGroup - dissolves the group (sets state to off)</li>
  22462. <li>getGroupInfo - get media info of the group</li>
  22463. <li>mute on|off - set mute state on|off</li>
  22464. <li>next - play next title in queue</li>
  22465. <li>pause - set state of player to "pause"</li>
  22466. <li>play - set state of player to "play"</li>
  22467. <li>playPlaylist &ltmyList&gt - play playlist &ltmyList&gt</li>
  22468. <li>prev - play previous title in queue</li>
  22469. <li>repeat - set player repeat state (on_all|on_one|off)</li>
  22470. <li>shuffle - set player shuffle state on|off</li>
  22471. <li>stop - set state of player to "stop"</li>
  22472. <li>volume - set volume 0..100</li>
  22473. <li>volumeDown - reduce volume by &ltvolumeDown&gt</li>
  22474. <li>volumeUp - increase volume by &ltvolumeUp&gt</li>
  22475. </ul>
  22476. <br><br>
  22477. <a name="HEOSGroupstate"></a>
  22478. <b>state</b>
  22479. <ul>
  22480. <li>state of group (on|off)</li>
  22481. </ul>
  22482. </ul>
  22483. <a name="HEOSMaster"></a>
  22484. <h3>HEOSMaster</h3>
  22485. <ul>
  22486. <u><b>HEOSMaster</b></u>
  22487. <br><br>
  22488. In combination with HEOSPlayer and HEOSGroup this FHEM Module controls the Denon multiroom soundsystem using a telnet socket connection and the HEOS Command Line Interface (CLI).
  22489. <br><br>
  22490. <b>Prerequisite</b>
  22491. <ul>
  22492. <li>Installation of the following packages: apt-get install libjson-perl libnet-telnet-perl libencode-perl
  22493. </li>
  22494. </ul>
  22495. <br>
  22496. <a name="HEOSMasterdefine"></a>
  22497. <b>Define</b>
  22498. <ul><br>
  22499. <code>define &lt;name&gt; HEOSMaster &lt;IP address&gt;</code>
  22500. <br><br>
  22501. Example:
  22502. <ul><br>
  22503. <code>define MyMasterBox HEOSMaster 192.168.178.67</code><br>
  22504. </ul>
  22505. <br>
  22506. &ltIP address&gt is the IP address of Your HEOS receiver or HEOS box. The master device is created in the room HEOS, then the players of Your system are recognized automatically and created in FHEM. From now on the players can be controlled and changes in the HEOS app or at the Receiver are synchronized with the state and media readings of the players.
  22507. <a name="HEOSMasterreadings"></a>
  22508. <br><br>
  22509. <b>Readings</b>
  22510. <ul>
  22511. <li>enableChangeEvents - state of the event reproduction at CLI master (on|off)</li>
  22512. <li>heosAccount - signed_out | signed_in as &ltHEOSAccount&gt</li>
  22513. <li>lastCommand - last executed command</li>
  22514. <li>lastPlayerId - player id of the device, which executed the last command</li>
  22515. <li>lastPlayerName - player name of the device, which executed the last command</li>
  22516. <li>lastResult - result of the last executed command</li>
  22517. <li>state - state of the HEOSMaster</li>
  22518. </ul>
  22519. <br><br>
  22520. <a name="HEOSMasterset"></a>
  22521. <b>set</b>
  22522. <ul>
  22523. <li>checkAccount - checks Your HEOS account</li>
  22524. <li>enableChangeEvents - activates the event reproduction at the CLI master</li>
  22525. <li>getGroups - get a list of all groups and creates the devices, if not done already</li>
  22526. <li>getPlayers - get a list of all players and creates the devices, if not yet existing</li>
  22527. <li>password - set the password of Your HEOS account</li>
  22528. <li>reboot - reboot of the CLI interface at HEOSMaster</li>
  22529. <li>reopen - tries to establish a new socket connection with CLI master</li>
  22530. <li>signAccount In|Out - sign in|out Your HEOS account (attr MyMasterBox heosUsername &ltusername&gt)</li>
  22531. </ul>
  22532. <br><br>
  22533. <a name="HEOSMasterget"></a>
  22534. <b>get</b>
  22535. <ul>
  22536. <li>ShowAccount - shows Your HEOS account</li>
  22537. </ul>
  22538. <br><br>
  22539. <a name="HEOSMasterstate"></a>
  22540. <b>state</b>
  22541. <ul>
  22542. <li>connected - the HEOSmaster is connected to the CLI Master</li>
  22543. <li>not connected - the HEOSmaster is not connected to the CLI Master</li>
  22544. </ul>
  22545. <br><br>
  22546. <a name="HEOSMasterattributes"></a>
  22547. <b>attributes</b>
  22548. <ul>
  22549. <li>heosUsername - username of Your HEOS account</li>
  22550. </ul>
  22551. <br><br>
  22552. </ul>
  22553. </ul>
  22554. <a name="HEOSPlayer"></a>
  22555. <h3>HEOSPlayer</h3>
  22556. <ul>
  22557. <u><b>HEOSPlayer</b></u>
  22558. <br><br>
  22559. In combination with HEOSMaster and HEOSGroup this FHEM Module controls the Denon multiroom soundsystem using a telnet socket connection and the HEOS Command Line Interface (CLI).
  22560. <br><br>
  22561. Once the master device is created, the players and groups of Your system are automatically recognized and created in FHEM. From now on the players and groups can be controlled and changes in the HEOS app or at the Receiver are synchronized with the state and media readings of the players and groups.
  22562. <a name="HEOSPlayerreadings"></a>
  22563. <br><br>
  22564. <b>Readings</b>
  22565. <ul>
  22566. <li>channel - nr of now playing favorite</li>
  22567. <li>currentAlbum - name of now playing album</li>
  22568. <li>currentArtist - name of now playing artist</li>
  22569. <li>currentImageUrl - URL of cover art, station logo, etc.</li>
  22570. <li>currentMedia - type of now playing media (song|station|genre|artist|album|container)</li>
  22571. <li>currentMid - media ID</li>
  22572. <li>currentQid - queue ID</li>
  22573. <li>currentSid - source ID</li>
  22574. <li>currentStation - name of now playing station</li>
  22575. <li>currentTitle - name of now playing title</li>
  22576. <li>error - last error</li>
  22577. <li>gid - ID of group, in which player is member</li>
  22578. <li>ip-address - ip address of the player</li>
  22579. <li>lineout - lineout level type (variable|Fixed)</li>
  22580. <li>model - model of HEOS speaker (e.g. HEOS 1)</li>
  22581. <li>mute - player mute state (on|off)</li>
  22582. <li>name - name of player (received from app)</li>
  22583. <li>network - network connection type (wired|wifi)</li>
  22584. <li>playStatus - state of player (play|pause|stop)</li>
  22585. <li>repeat - player repeat state (on_all|on_one|off)</li>
  22586. <li>shuffle - player shuffle state (on|off)</li>
  22587. <li>state - state of player connection (on|off)</li>
  22588. <li>version - software version of HEOS speaker</li>
  22589. <li>volume - player volume level (0-100)</li>
  22590. <li>volumeDown - player volume step level (1-10, default 5)</li>
  22591. <li>volumeUp - player volume step level (1-10, default 5)</li>
  22592. </ul>
  22593. <br><br>
  22594. <a name="HEOSPlayerset"></a>
  22595. <b>set</b>
  22596. <ul>
  22597. <li>aux - uses source at aux-input of player</li>
  22598. <li>channel &ltnr&gt - plays favorite &ltnr&gt created with app</li>
  22599. <li>channelUp - switches to next favorite</li>
  22600. <li>channelDown- switches to previous favorite</li>
  22601. <li>clear queue - clears the queue</li>
  22602. <li>deletePlaylist &ltmyList&gt - clears playlist &ltmyList&gt</li>
  22603. <li>set &lthp1&gt groupWithMember &lthp2&gt - creates group with hp1 as leader and hp2 as member</li>
  22604. <li>input sid[,cid][,mid] - set input source-id[,container-id][,media-id] </li>
  22605. <ul>
  22606. <code>Example: set kitchen input 1027,1772574848,inputs/tvaudio<br>
  22607. starts "tv audio" on player "kitchen"</code>
  22608. </ul>
  22609. <li>mute on|off - set mute state on|off</li>
  22610. <li>next - play next title in queue</li>
  22611. <li>pause - set state of player to "pause"</li>
  22612. <li>play - set state of player to "play"</li>
  22613. <li>playPlaylist &ltmyList&gt - play playlist &ltmyList&gt</li>
  22614. <li>playQueueItem &ltnr&gt - play title &ltnr&gt in queue</li>
  22615. <li>prev - play previous title in queue</li>
  22616. <li>repeat - set player repeat state (on_all|on_one|off)</li>
  22617. <li>saveQueue &ltmyList&gt - save queue as &ltmyList&gt</li>
  22618. <li>shuffle - set player shuffle state on|off</li>
  22619. <li>stop - set state of player to "stop"</li>
  22620. <li>volume - set volume 0..100</li>
  22621. <li>volumeDown - reduce volume by &ltvolumeDown&gt</li>
  22622. <li>volumeUp - increase volume by &ltvolumeUp&gt</li>
  22623. </ul>
  22624. <br><br>
  22625. <a name="HEOSPlayerget"></a>
  22626. <b>get</b>
  22627. <ul>
  22628. <li>ls - list music sources (input, playlists, favorites, music services, ...) </li>
  22629. <li>channelscount - number of favorites</li>
  22630. </ul>
  22631. <br><br>
  22632. <a name="HEOSPlayerstate"></a>
  22633. <b>state</b>
  22634. <ul>
  22635. <li>state of player connection (on|off)</li>
  22636. </ul>
  22637. <br><br>
  22638. <a name="HEOSPlayerattributes"></a>
  22639. <b>attributes</b>
  22640. <ul>
  22641. <li>channelring - when reaching the last favorite ChannelUp/Down switches in circle, i.e. to the first/last favorite again</li>
  22642. <li>mute2play - if mute switch on speaker is pressed, the stream stops</li>
  22643. </ul>
  22644. </ul>
  22645. <a name="HMCCU"></a>
  22646. <h3>HMCCU</h3>
  22647. <ul>
  22648. The module provides an interface between FHEM and a Homematic CCU2. HMCCU is the
  22649. I/O device for the client devices HMCCUDEV and HMCCUCHN. The module requires the
  22650. additional Perl modules IO::File, RPC::XML::Client, RPC::XML::Server and SubProcess
  22651. (part of FHEM).
  22652. </br></br>
  22653. <a name="HMCCUdefine"></a>
  22654. <b>Define</b><br/><br/>
  22655. <ul>
  22656. <code>define &lt;name&gt; HMCCU &lt;HostOrIP&gt; [&lt;ccu-number&gt;] [waitforccu=&lt;timeout&gt;]</code>
  22657. <br/><br/>
  22658. Example:<br/>
  22659. <code>define myccu HMCCU 192.168.1.10</code>
  22660. <br/><br/>
  22661. The parameter <i>HostOrIP</i> is the hostname or IP address of a Homematic CCU2. If you have
  22662. more than one CCU you can specifiy a unique CCU number with parameter <i>ccu-number</i>. With
  22663. option <i>waitforccu</i> HMCCU will wait for the specified time if CCU is not reachable.
  22664. Parameter <i>timeout</i> should be a multiple of 20 in seconds. Warning: This option could
  22665. block the start of FHEM for <i>timeout</i> seconds.
  22666. <br/>
  22667. For automatic update of Homematic device datapoints and FHEM readings one have to:
  22668. <br/><br/>
  22669. <ul>
  22670. <li>Define used RPC interfaces with attribute 'rpcinterfaces'</li>
  22671. <li>Start RPC servers with command 'set rpcserver on'</li>
  22672. <li>Optionally enable automatic start of RPC servers with attribute 'rpcserver'</li>
  22673. </ul><br/>
  22674. Than start with the definition of client devices using modules HMCCUDEV (CCU devices)
  22675. and HMCCUCHN (CCU channels) or with command 'get devicelist create'.<br/>
  22676. Maybe it's helpful to set the following FHEM standard attributes for the HMCCU I/O
  22677. device:<br/><br/>
  22678. <ul>
  22679. <li>Shortcut for RPC server control: eventMap /rpcserver on:on/rpcserver off:off/</li>
  22680. </ul>
  22681. </ul>
  22682. <br/>
  22683. <a name="HMCCUset"></a>
  22684. <b>Set</b><br/><br/>
  22685. <ul>
  22686. <li><b>set &lt;name&gt; cleardefaults</b><br/>
  22687. Clear default attributes imported from file.
  22688. </li><br/>
  22689. <li><b>set &lt;name&gt; datapoint {&lt;[ccu:]ccuobject&gt;|&lt;hmccu:fhemobject&gt;}.
  22690. &lt;datapoint&gt; &lt;value&gt;</b><br/>
  22691. Set datapoint of CCU channel in "raw" mode. The value is not scaled or substituted. If
  22692. target object is preceded by string "hmccu:" the following parameter <i>fhemobject</i>
  22693. must be a FHEM device of type HMCCUDEV or HMCCUCHN. If device type is HMCCUDEV the device
  22694. name must be followed by a ':' and a valid channel number.<br/><br/>
  22695. Examples:<br/>
  22696. <code>set d_ccu datapoint ABC1234567:1.STATE true</code><br/>
  22697. <code>set d_ccu datapoint hmccu:mychndevice.STATE true</code><br/>
  22698. <code>set d_ccu datapoint hmccu:mydevdevice:1.STATE true</code>
  22699. </li><br/>
  22700. <li><b>set &lt;name&gt; defaults</b><br/>
  22701. Set default attributes for I/O device.
  22702. </li><br/>
  22703. <li><b>set &lt;name&gt; delete &lt;ccuobject&gt; [&lt;objecttype&gt;]</b><br/>
  22704. Delete object in CCU. Default object type is OT_VARDP. Valid object types are<br/>
  22705. OT_DEVICE=device, OT_VARDP=variable.
  22706. </li><br/>
  22707. <li><b>set &lt;name&gt; execute &lt;program&gt;</b><br/>
  22708. Execute a CCU program.
  22709. <br/><br/>
  22710. Example:<br/>
  22711. <code>set d_ccu execute PR-TEST</code>
  22712. </li><br/>
  22713. <li><b>set &lt;name&gt; hmscript {&lt;script-file&gt;|'!'&lt;function&gt;|'['&lt;code&gt;']'} [dump]
  22714. [&lt;parname&gt;=&lt;value&gt; [...]]</b><br/>
  22715. Execute Homematic script on CCU. If script code contains parameter in format $parname
  22716. they are substituted by corresponding command line parameters <i>parname</i>.<br/>
  22717. If output of script contains lines in format Object=Value readings in existing
  22718. corresponding FHEM devices will be set. <i>Object</i> can be the name of a CCU system
  22719. variable or a valid channel and datapoint specification. Readings for system variables
  22720. are set in the I/O device. Datapoint related readings are set in client devices. If option
  22721. 'dump' is specified the result of script execution is displayed in FHEM web interface.
  22722. Execute command without parameters will list available script functions.
  22723. </li><br/>
  22724. <li><b>set &lt;name&gt; importdefaults &lt;filename&gt;</b><br/>
  22725. Import default attributes from file.
  22726. </li><br/>
  22727. <li><b>set &lt;name&gt; rpcserver {on | off | restart}</b><br/>
  22728. Start, stop or restart RPC server(s). This command executed with option 'on'
  22729. will fork a RPC server process for each RPC interface defined in attribute 'rpcinterfaces'.
  22730. Until operation is completed only a few set/get commands are available and you
  22731. may get the error message 'CCU busy'.
  22732. </li><br/>
  22733. <li><b>set &lt;name&gt; var &lt;variable&gt; &lt;Value&gt;</b><br/>
  22734. Set CCU system variable value. Special characters \_ in <i>value</i> are
  22735. substituted by blanks.
  22736. </li>
  22737. </ul>
  22738. <br/>
  22739. <a name="HMCCUget"></a>
  22740. <b>Get</b><br/><br/>
  22741. <ul>
  22742. <li><b>get &lt;name&gt; aggregation {&lt;rule&gt;|all}</b><br/>
  22743. Process aggregation rule defined with attribute ccuaggregate.
  22744. </li><br/>
  22745. <li><b>get &lt;name&gt; configdesc {&lt;device&gt;|&lt;channel&gt;}</b><br/>
  22746. Get configuration parameter description of CCU device or channel (similar
  22747. to device settings in CCU). Not every CCU device or channel provides a configuration
  22748. parameter description. So result may be empty.
  22749. </li><br/>
  22750. <li><b>get &lt;name&gt; defaults</b><br/>
  22751. List device types and channels with default attributes available.
  22752. </li><br/>
  22753. <li><b>get &lt;name&gt; deviceinfo &lt;device-name&gt; [{State | <u>Value</u>}]</b><br/>
  22754. List device channels and datapoints. If option 'State' is specified the device is
  22755. queried directly. Otherwise device information from CCU is listed.
  22756. </li><br/>
  22757. <li><b>get &lt;name&gt; devicelist [dump]</b><br/>
  22758. Read list of devices and channels from CCU. This command is executed automatically
  22759. after the definition of an I/O device. It must be executed manually after
  22760. module HMCCU is reloaded or after devices have changed in CCU (added, removed or
  22761. renamed). With option 'dump' devices are displayed in browser window. If a RPC
  22762. server is running HMCCU will raise events "<i>count</i> devices added in CCU" or
  22763. "<i>count</i> devices deleted in CCU". It's recommended to set up a notification
  22764. which reacts with execution of command 'get devicelist' on these events.
  22765. </li><br/>
  22766. <li><b>get &lt;name&gt; devicelist create &lt;devexp&gt; [t={chn|<u>dev</u>|all}]
  22767. [p=&lt;prefix&gt;] [s=&lt;suffix&gt;] [f=&lt;format&gt;] [defattr] [duplicates]
  22768. [save] [&lt;attr&gt;=&lt;value&gt; [...]]</b><br/>
  22769. With option 'create' HMCCU will automatically create client devices for all CCU devices
  22770. and channels matching specified regular expression. With option t=chn or t=dev (default)
  22771. the creation of devices is limited to CCU channels or devices.<br/>
  22772. Optionally a <i>prefix</i> and/or a
  22773. <i>suffix</i> for the FHEM device name can be specified. The parameter <i>format</i>
  22774. defines a template for the FHEM device names. Prefix, suffix and format can contain
  22775. format identifiers which are substituted by corresponding values of the CCU device or
  22776. channel: %n = CCU object name (channel or device), %d = CCU device name, %a = CCU address.
  22777. In addition a list of default attributes for the created client devices can be specified.
  22778. If option 'defattr' is specified HMCCU tries to set default attributes for device.
  22779. With option 'duplicates' HMCCU will overwrite existing devices and/or create devices
  22780. for existing device addresses. Option 'save' will save FHEM config after device definition.
  22781. </li><br/>
  22782. <li><b>get &lt;name&gt; dump {datapoints|devtypes} [&lt;filter&gt;]</b><br/>
  22783. Dump all Homematic devicetypes or all devices including datapoints currently
  22784. defined in FHEM.
  22785. </li><br/>
  22786. <li><b>get &lt;name&gt; dutycycle</b><br/>
  22787. Read CCU interface and gateway information. For each interface/gateway the following
  22788. information is stored in readings:<br/>
  22789. iface_addr_n = interface address<br/>
  22790. iface_type_n = interface type<br/>
  22791. iface_conn_n = interface connection state (1=connected, 0=disconnected)<br/>
  22792. iface_ducy_n = duty cycle of interface (0-100)
  22793. </li><br/>
  22794. <li><b>get &lt;name&gt; exportdefaults &lt;filename&gt;</b><br/>
  22795. Export default attributes into file.
  22796. </li><br/>
  22797. <li><b>get &lt;name&gt; firmware</b><br/>
  22798. Get available firmware downloads from eq-3.de. List FHEM devices with current and available
  22799. firmware version. Firmware versions are only displayed after RPC server has been started.
  22800. </li><br/>
  22801. <li><b>get &lt;name&gt; parfile [&lt;parfile&gt;]</b><br/>
  22802. Get values of all channels / datapoints specified in <i>parfile</i>. The parameter
  22803. <i>parfile</i> can also be defined as an attribute. The file must contain one channel /
  22804. definition per line.
  22805. <br/><br/>
  22806. The syntax of Parfile entries is:
  22807. <br/><br/>
  22808. {[&lt;interface&gt;.]&lt;channel-address&gt; | &lt;channel-name&gt;}
  22809. [.&lt;datapoint-expr&gt;] [&lt;subst-rules&gt;]
  22810. <br/><br/>
  22811. Empty lines or lines starting with a # are ignored.
  22812. </li><br/>
  22813. <li><b>get &lt;name&gt; rpcstate</b><br/>
  22814. Check if RPC server process is running.
  22815. </li><br/>
  22816. <li><b>get &lt;name&gt; update [&lt;devexp&gt; [{State | <u>Value</u>}]]</b><br/>
  22817. Update all datapoints / readings of client devices with <u>FHEM device name</u>(!) matching
  22818. <i>devexp</i>. With option 'State' all CCU devices are queried directly. This can be
  22819. time consuming.
  22820. </li><br/>
  22821. <li><b>get &lt;name&gt; updateccu [&lt;devexp&gt; [{State | <u>Value</u>}]]</b><br/>
  22822. Update all datapoints / readings of client devices with <u>CCU device name</u>(!) matching
  22823. <i>devexp</i>. With option 'State' all CCU devices are queried directly. This can be
  22824. time consuming.
  22825. </li><br/>
  22826. <li><b>get &lt;name&gt; vars &lt;regexp&gt;</b><br/>
  22827. Get CCU system variables matching <i>regexp</i> and store them as readings.
  22828. </li>
  22829. </ul>
  22830. <br/>
  22831. <a name="HMCCUattr"></a>
  22832. <b>Attributes</b><br/>
  22833. <br/>
  22834. <ul>
  22835. <li><b>ccuackstate {0 | <u>1</u>}</b><br/>
  22836. If set to 1 state will be set to result of command (i.e. 'OK').
  22837. </li><br/>
  22838. <li><b>ccuaggregate &lt;rule&gt;[;...]</b><br/>
  22839. Define aggregation rules for client device readings. With an aggregation rule
  22840. it's easy to detect if some or all client device readings are set to a specific
  22841. value, i.e. detect all devices with low battery or detect all open windows.<br/>
  22842. Aggregation rules are automatically executed as a reaction on reading events of
  22843. HMCCU client devices. An aggregation rule consists of several parameters separated
  22844. by comma:<br/><br/>
  22845. <ul>
  22846. <li><b>name:&lt;rule-name&gt;</b><br/>
  22847. Name of aggregation rule</li>
  22848. <li><b>filter:{name|alias|group|room|type}=&lt;incl-expr&gt;[!&lt;excl-expr&gt;]</b><br/>
  22849. Filter criteria, i.e. "type=^HM-Sec-SC.*"</li>
  22850. <li><b>read:&lt;read-expr&gt;</b><br/>
  22851. Expression for reading names, i.e. "STATE"</li>
  22852. <li><b>if:{any|all|min|max|sum|avg|lt|gt|le|ge}=&lt;value&gt;</b><br/>
  22853. Condition, i.e. "any=open" or initial value, i.e. max=0</li>
  22854. <li><b>else:&lt;value&gt;</b><br/>
  22855. Complementary value, i.e. "closed"</li>
  22856. <li><b>prefix:{&lt;text&gt;|RULE}</b><br/>
  22857. Prefix for reading names with aggregation results</li>
  22858. <li><b>coll:{&lt;attribute&gt;|NAME}[!&lt;default-text&gt;]</b><br/>
  22859. Attribute of matching devices stored in aggregation results. Default text in case
  22860. of no matching devices found is optional.</li>
  22861. <li><b>html:&lt;template-file&gt;</b><br/>
  22862. Create HTML code with matching devices.</li>
  22863. </ul><br/>
  22864. Aggregation results will be stored in readings <i>prefix</i>count, <i>prefix</i>list,
  22865. <i>prefix</i>match, <i>prefix</i>state and <i>prefix</i>table.<br/><br/>
  22866. Format of a line in <i>template-file</i> is &lt;keyword&gt;:&lt;html-code&gt;. See
  22867. FHEM Wiki for an example. Valid keywords are:<br/><br/>
  22868. <ul>
  22869. <li><b>begin-html</b>: Start of html code.</li>
  22870. <li><b>begin-table</b>: Start of table (i.e. the table header)</li>
  22871. <li><b>row-odd</b>: HTML code for odd lines. A tag &lt;reading/&gt is replaced by a matching device.</li>
  22872. <li><b>row-even</b>: HTML code for event lines.</li>
  22873. <li><b>end-table</b>: End of table.</li>
  22874. <li><b>default</b>: HTML code for no matches.</li>
  22875. <li><b>end-html</b>: End of html code.</li>
  22876. </ul><br/>
  22877. Example: Find open windows<br/>
  22878. name=lock,filter:type=^HM-Sec-SC.*,read:STATE,if:any=open,else:closed,prefix:lock_,coll:NAME!All windows closed<br/><br/>
  22879. Example: Find devices with low batteries. Generate reading in HTML format.<br/>
  22880. name=battery,filter:name=.*,read:(LOWBAT|LOW_BAT),if:any=yes,else:no,prefix:batt_,coll:NAME!All batteries OK,html:/home/battery.cfg<br/>
  22881. </li><br/>
  22882. <li><b>ccudef-hmstatevals &lt;subst-rule[;...]&gt;</b><br/>
  22883. Set global rules for calculation of reading hmstate.
  22884. </li><br/>
  22885. <li><b>ccudef-readingfilter &lt;filter-rule[;...]&gt;</b><br/>
  22886. Set global reading/datapoint filter. This filter is added to the filter specified by
  22887. client device attribute 'ccureadingfilter'.
  22888. </li><br/>
  22889. <li><b>ccudef-readingformat {name | address | <u>datapoint</u> | namelc | addresslc |
  22890. datapointlc}</b><br/>
  22891. Set global reading format. This format is the default for all readings except readings
  22892. of virtual device groups.
  22893. </li><br/>
  22894. <li><b>ccudef-readingname &lt;old-readingname-expr&gt;:[+]&lt;new-readingname&gt;
  22895. [;...]</b><br/>
  22896. Set global rules for reading name substitution. These rules are added to the rules
  22897. specified by client device attribute 'ccureadingname'.
  22898. </li><br/>
  22899. <li><b>ccudef-substitute &lt;subst-rule&gt;[;...]</b><br/>
  22900. Set global substitution rules for datapoint value. These rules are added to the rules
  22901. specified by client device attribute 'substitute'.
  22902. </li><br/>
  22903. <li><b>ccudefaults &lt;filename&gt;</b><br/>
  22904. Load default attributes for HMCCUCHN and HMCCUDEV devices from specified file. Best
  22905. practice for creating a custom default attribute file is by exporting predefined default
  22906. attributes from HMCCU with command 'get exportdefaults'.
  22907. </li><br/>
  22908. <li><b>ccuflags {extrpc, <u>intrpc</u>}</b><br/>
  22909. Control RPC server process and datapoint validation:<br/>
  22910. intrpc - Use internal RPC server. This is the default.<br/>
  22911. extrpc - Use external RPC server provided by module HMCCURPC. If no HMCCURPC device
  22912. exists HMCCU will create one after command 'set rpcserver on'.<br/>
  22913. dptnocheck - Do not check within set or get commands if datapoint is valid<br/>
  22914. </li><br/>
  22915. <li><b>ccuget {State | <u>Value</u>}</b><br/>
  22916. Set read access method for CCU channel datapoints. Method 'State' is slower than
  22917. 'Value' because each request is sent to the device. With method 'Value' only CCU
  22918. is queried. Default is 'Value'.
  22919. </li><br/>
  22920. <li><b>ccureadings {0 | <u>1</u>}</b><br/>
  22921. If set to 1 values read from CCU will be stored as readings. Otherwise output
  22922. is displayed in browser window.
  22923. </li><br/>
  22924. <li><b>parfile &lt;filename&gt;</b><br/>
  22925. Define parameter file for command 'get parfile'.
  22926. </li><br/>
  22927. <li><b>rpcdevice &lt;devicename&gt;</b><br/>
  22928. Specify name of external RPC device of type HMCCURPC.
  22929. </li><br/>
  22930. <li><b>rpcinterfaces &lt;interface&gt;[,...]</b><br/>
  22931. Specify list of CCU RPC interfaces. HMCCU will register a RPC server for each interface.
  22932. Valid interfaces are:<br/><br/>
  22933. <ul>
  22934. <li>BidCos-Wired (Port 2000)</li>
  22935. <li>BidCos-RF (Port 2001)</li>
  22936. <li>Homegear (Port 2003)</li>
  22937. <li>HmIP-RF (Port 2010)</li>
  22938. <li>CUxD (Port 8701)</li>
  22939. <li>VirtualDevice (Port 9292)</li>
  22940. </ul>
  22941. </li><br/>
  22942. <li><b>rpcinterval &lt;Seconds&gt;</b><br/>
  22943. Specifiy how often RPC queue is read. Default is 5 seconds.
  22944. </li><br/>
  22945. <li><b>rpcport &lt;value[,...]&gt;</b><br/>
  22946. Deprecated, use 'rpcinterfaces' instead. Specify list of RPC ports on CCU. Default is
  22947. 2001. Valid RPC ports are:<br/><br/>
  22948. <ul>
  22949. <li>2000 = Wired components</li>
  22950. <li>2001 = BidCos-RF (wireless 868 MHz components with BidCos protocol)</li>
  22951. <li>2003 = Homegear (experimental)</li>
  22952. <li>2010 = HM-IP (wireless 868 MHz components with IPv6 protocol)</li>
  22953. <li>8701 = CUxD (only supported with external RPC server HMCCURPC)</li>
  22954. <li>9292 = CCU group devices (especially heating groups)</li>
  22955. </ul>
  22956. </li><br/>
  22957. <li><b>rpcqueue &lt;queue-file&gt;</b><br/>
  22958. Specify name of RPC queue file. This parameter is only a prefix (including the
  22959. pathname) for the queue files with extension .idx and .dat. Default is
  22960. /tmp/ccuqueue. If FHEM is running on a SD card it's recommended that the queue
  22961. files are placed on a RAM disk.
  22962. </li><br/>
  22963. <li><b>rpcserver {on | <u>off</u>}</b><br/>
  22964. Specify if RPC server is automatically started on FHEM startup.
  22965. </li><br/>
  22966. <li><b>rpcserveraddr &lt;ip-or-name&gt;</b><br/>
  22967. Specify network interface by IP address or DNS name where RPC server should listen
  22968. on. By default HMCCU automatically detects the IP address. This attribute should be used
  22969. if the FHEM server has more than one network interface.
  22970. </li><br/>
  22971. <li><b>rpcserverport &lt;base-port&gt;</b><br/>
  22972. Specify base port for RPC server. The real listening port of an RPC server is
  22973. calculated by the formula: base-port + rpc-port + (10 * ccu-number). Default
  22974. value for <i>base-port</i> is 5400.<br/>
  22975. The value ccu-number is only relevant if more than one CCU is connected to FHEM.
  22976. Example: If <i>base-port</i> is 5000, protocol is BidCos (rpc-port 2001) and only
  22977. one CCU is connected the resulting RPC server port is 5000+2001+(10*0) = 7001.
  22978. </li><br/>
  22979. <li><b>substitute &lt;subst-rule&gt;:&lt;substext&gt;[,...]</b><br/>
  22980. Define substitions for datapoint values. Syntax of <i>subst-rule</i> is<br/><br/>
  22981. [[&lt;channelno.&gt;]&lt;datapoint&gt;[,...]!]&lt;{#n1-m1|regexp1}&gt;:&lt;text1&gt;[,...]
  22982. <br/>
  22983. Substitutions for parfile values must be specified in parfiles.
  22984. </li><br/>
  22985. <li><b>stripchar &lt;character&gt;</b><br/>
  22986. Strip the specified character from variable or device name in set commands. This
  22987. is useful if a variable should be set in CCU using the reading with trailing colon.
  22988. </li>
  22989. </ul>
  22990. </ul>
  22991. <a name="HMCCUCHN"></a>
  22992. <h3>HMCCUCHN</h3>
  22993. <ul>
  22994. The module implements Homematic CCU channels as client devices for HMCCU. A HMCCU I/O device must
  22995. exist before a client device can be defined. If a CCU channel is not found execute command
  22996. 'get devicelist' in I/O device.
  22997. </br></br>
  22998. <a name="HMCCUCHNdefine"></a>
  22999. <b>Define</b><br/><br/>
  23000. <ul>
  23001. <code>define &lt;name&gt; HMCCUCHN {&lt;channel-name&gt; | &lt;channel-address&gt;}
  23002. [readonly] [defaults] [iodev=&lt;iodev-name&gt;]</code>
  23003. <br/><br/>
  23004. If option 'readonly' is specified no set command will be available. With option 'defaults'
  23005. some default attributes depending on CCU device type will be set. Default attributes are only
  23006. available for some device types.<br/>
  23007. The define command accepts a CCU2 channel name or channel address as parameter.
  23008. <br/><br/>
  23009. Examples:<br/>
  23010. <code>define window_living HMCCUCHN WIN-LIV-1 readonly</code><br/>
  23011. <code>define temp_control HMCCUCHN BidCos-RF.LEQ1234567:1</code>
  23012. <br/><br/>
  23013. The interface part of a channel address must not be specified. The default is 'BidCos-RF'.
  23014. Channel addresses can be found with command 'get deviceinfo &lt;devicename&gt;' executed
  23015. in I/O device.
  23016. </ul>
  23017. <br/>
  23018. <a name="HMCCUCHNset"></a>
  23019. <b>Set</b><br/><br/>
  23020. <ul>
  23021. <li><b>set &lt;name&gt; clear [&lt;reading-exp&gt;]</b><br/>
  23022. Delete readings matching specified reading name expression. Default expression is '.*'.
  23023. Readings 'state' and 'control' are not deleted.
  23024. </li><br/>
  23025. <li><b>set &lt;name&gt; config [device] [&lt;rpcport&gt;] &lt;parameter&gt;=&lt;value&gt;]
  23026. [...]</b><br/>
  23027. Set config parameters of CCU channel. This is equal to setting device parameters in CCU.
  23028. Valid parameters can be listed by using commands 'get configdesc' or 'get configlist'.
  23029. With option 'device' specified parameters are set in device instead of channel.
  23030. </li><br/>
  23031. <li><b>set &lt;name&gt; datapoint &lt;datapoint&gt; &lt;value&gt;</b><br/>
  23032. Set value of a datapoint of a CCU channel. If parameter <i>value</i> contains special
  23033. character \_ it's substituted by blank.
  23034. <br/><br/>
  23035. Examples:<br/>
  23036. <code>set temp_control datapoint SET_TEMPERATURE 21</code>
  23037. </li><br/>
  23038. <li><b>set &lt;name&gt; defaults</b><br/>
  23039. Set default attributes for CCU device type. Default attributes are only available for
  23040. some device types and for some channels of a device type.
  23041. </li><br/>
  23042. <li><b>set &lt;name&gt; devstate &lt;value&gt;</b><br/>
  23043. Set state of a CCU device channel. The state datapoint of a channel must be defined
  23044. by setting attribute 'statedatapoint' to a valid datapoint name.
  23045. <br/><br/>
  23046. Example:<br/>
  23047. <code>set light_entrance devstate true</code>
  23048. </li><br/>
  23049. <li><b>set &lt;name&gt; &lt;statevalue&gt;</b><br/>
  23050. Set state of a CCU device channel to <i>StateValue</i>. The state datapoint of a channel
  23051. must be defined by setting attribute 'statedatapoint'. The available state values must
  23052. be defined by setting attribute 'statevals'.
  23053. <br/><br/>
  23054. Example: Turn switch on<br/>
  23055. <code>
  23056. attr myswitch statedatapoint STATE<br/>
  23057. attr myswitch statevals on:true,off:false<br/>
  23058. set myswitch on
  23059. </code>
  23060. </li><br/>
  23061. <li><b>set &lt;name&gt; toggle</b><br/>
  23062. Toggle state datapoint between values defined by attribute 'statevals'. This command is
  23063. only available if attribute 'statevals' is set. Toggling supports more than two state
  23064. values.
  23065. <br/><br/>
  23066. Example: Toggle blind actor<br/>
  23067. <code>
  23068. attr myswitch statedatapoint LEVEL<br/>
  23069. attr myswitch statevals up:100,down:0<br/>
  23070. set myswitch toggle
  23071. </code>
  23072. </li><br/>
  23073. <li><b>set &lt;name&gt; on-for-timer &lt;ontime&gt;</b><br/>
  23074. Switch device on for specified number of seconds. This command is only available if
  23075. channel contains a datapoint ON_TIME. The attribute 'statevals' must contain at least a
  23076. value for 'on'. The attribute 'statedatapoint' must be set to a writeable datapoint.
  23077. <br/><br/>
  23078. Example: Turn switch on for 300 seconds<br/>
  23079. <code>
  23080. attr myswitch statedatapoint STATE<br/>
  23081. attr myswitch statevals on:true,off:false<br/>
  23082. set myswitch on-for-timer 300
  23083. </code>
  23084. </li><br/>
  23085. <li><b>set &lt;name&gt; on-till &lt;timestamp&gt;</b><br/>
  23086. Switch device on until <i>timestamp</i>. Parameter <i>timestamp</i> can be a time in
  23087. format HH:MM or HH:MM:SS. This command is only available if channel contains a datapoint
  23088. ON_TIME. The attribute 'statevals' must contain at least a value for 'on'. The Attribute
  23089. 'statedatapoint' must be set to a writeable datapoint.
  23090. </li><br/>
  23091. <li><b>set &lt;name&gt; pct &lt;value&gt; [&lt;ontime&gt; [&lt;ramptime&gt;]]</b><br/>
  23092. Set datapoint LEVEL of a channel to the specified <i>value</i>. Optionally a <i>ontime</i>
  23093. and a <i>ramptime</i> (both in seconds) can be specified. This command is only available
  23094. if channel contains at least a datapoint LEVEL and optionally datapoints ON_TIME and
  23095. RAMP_TIME. The parameter <i>ontime</i> can be specified in seconds or as timestamp in
  23096. format HH:MM or HH:MM:SS. If <i>ontime</i> is 0 it's ignored. This syntax can be used to
  23097. modify the ramp time only.
  23098. <br/><br/>
  23099. Example: Turn dimmer on for 600 second. Increase light to 100% over 10 seconds<br>
  23100. <code>
  23101. attr myswitch statedatapoint LEVEL<br/>
  23102. attr myswitch statevals on:100,off:0<br/>
  23103. set myswitch pct 100 600 10
  23104. </code>
  23105. </li><br/>
  23106. </ul>
  23107. <br/>
  23108. <a name="HMCCUCHNget"></a>
  23109. <b>Get</b><br/><br/>
  23110. <ul>
  23111. <li><b>get &lt;name&gt; config [device] [&lt;filter-expr&gt;]</b><br/>
  23112. Get configuration parameters of CCU channel. If attribute 'ccureadings' is 0 results
  23113. are displayed in browser window. Parameters can be filtered by <i>filter-expr</i>.
  23114. Parameters to be stored as readings must be part of 'ccureadingfilter'. If option
  23115. 'device' is specified parameters of device are read.
  23116. </li><br/>
  23117. <li><b>get &lt;name&gt; configdesc [device]</b><br/>
  23118. Get description of configuration parameters of CCU channel or device if option 'device'
  23119. is specified.
  23120. </li><br/>
  23121. <li><b>get &lt;name&gt; configlist [device] [&lt;filter-expr&gt;]</b><br/>
  23122. Get configuration parameters of CCU channel. Parameters can be filtered by
  23123. <i>filter-expr</i>. With option 'device' device parameters are listed.
  23124. </li><br/>
  23125. <li><b>get &lt;name&gt; datapoint &lt;datapoint&gt;</b><br/>
  23126. Get value of a CCU channel datapoint.
  23127. </li><br/>
  23128. <li><b>get &lt;name&gt; defaults</b><br/>
  23129. Display default attributes for CCU device type.
  23130. </li><br/>
  23131. <li><b>get &lt;name&gt; deviceinfo [{State | <u>Value</u>}]</b><br/>
  23132. Display all channels and datapoints of device with datapoint values and types.
  23133. </li><br/>
  23134. <li><b>get &lt;name&gt; devstate</b><br/>
  23135. Get state of CCU device. Default datapoint STATE can be changed by setting
  23136. attribute 'statedatapoint'. Command will fail if state datapoint does not exist in
  23137. channel.
  23138. </li><br/>
  23139. <li><b>get &lt;name&gt; update [{State | <u>Value</u>}]</b><br/>
  23140. Update all datapoints / readings of channel. With option 'State' the device is queried.
  23141. This request method is more accurate but slower then 'Value'.
  23142. </li>
  23143. </ul>
  23144. <br/>
  23145. <a name="HMCCUCHNattr"></a>
  23146. <b>Attributes</b><br/><br/>
  23147. <ul>
  23148. To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
  23149. to '.*'.
  23150. <br/><br/>
  23151. <li><b>ccuackstate {<u>0</u> | 1}</b><br/>
  23152. If set to 1 state will be set to result of command (i.e. 'OK'). Otherwise state is only
  23153. updated if value of state datapoint has changed.
  23154. </li><br/>
  23155. <li><b>ccucalculate &lt;value-type&gt;:&lt;reading&gt;[:&lt;dp-list&gt;[;...]</b><br/>
  23156. Calculate special values like dewpoint based on datapoints specified in
  23157. <i>dp-list</i>. The result is stored in <i>reading</i>. The following <i>values</i>
  23158. are supported:<br/>
  23159. dewpoint = calculate dewpoint, <i>dp-list</i> = &lt;temperature&gt;,&lt;humidity&gt;<br/>
  23160. abshumidity = calculate absolute humidity, <i>dp-list</i> = &lt;temperature&gt;,&lt;humidity&gt;<br/>
  23161. inc = increment datapoint value considering reset of datapoint, <i>dp-list</i> = &lt;counter-datapoint&gt;<br/>
  23162. inc = increment datapoint value considering reset of datapoint, <i>dp-list</i> = &lt;counter-datapoint&gt;<br/>
  23163. min = calculate minimum continuously, <i>dp-list</i> = &lt;datapoint&gt;<br/>
  23164. max = calculate maximum continuously, <i>dp-list</i> = &lt;datapoint&gt;<br/>
  23165. sum = calculate sum continuously, <i>dp-list</i> = &lt;datapoint&gt;<br/>
  23166. avg = calculate average continuously, <i>dp-list</i> = &lt;datapoint&gt;
  23167. Example:<br/>
  23168. <code>dewpoint:taupunkt:1.TEMPERATURE,1.HUMIDITY</code>
  23169. </li><br/>
  23170. <li><b>ccuflags {nochn0, trace}</b><br/>
  23171. Control behaviour of device:<br/>
  23172. nochn0: Prevent update of status channel 0 datapoints / readings.<br/>
  23173. trace: Write log file information for operations related to this device.
  23174. </li><br/>
  23175. <li><b>ccuget {State | <u>Value</u>}</b><br/>
  23176. Set read access method for CCU channel datapoints. Method 'State' is slower than 'Value'
  23177. because each request is sent to the device. With method 'Value' only CCU is queried.
  23178. Default is 'Value'.
  23179. </li><br/>
  23180. <li><b>ccureadings {0 | <u>1</u>}</b><br/>
  23181. If set to 1 values read from CCU will be stored as readings. Default is 1.
  23182. </li><br/>
  23183. <li><b>ccureadingfilter &lt;filter-rule[;...]&gt;</b><br/>
  23184. Only datapoints matching specified expression are stored as readings.<br/>
  23185. Syntax for <i>filter-rule</i> is either:<br/>
  23186. [N:]{&lt;channel-name&gt;|&lt;channel-number&gt;}!&lt;RegExp&gt; or:<br/>
  23187. [N:][&lt;channel-number&gt;.]&lt;RegExp&gt;<br/>
  23188. If <i>channel-name</i> or <i>channel-number</i> is specified the following rule
  23189. applies only to this channel.
  23190. By default all datapoints will be stored as readings. Attribute ccudef-readingfilter
  23191. of I/O device will be checked before this attribute.<br/>
  23192. If a rule starts with 'N:' the filter is negated which means that a reading is
  23193. stored if rule doesn't match.
  23194. </li><br/>
  23195. <li><b>ccureadingformat {address[lc] | name[lc] | datapoint[lc]}</b><br/>
  23196. Set format of reading names. Default for virtual device groups is 'name'. The default for all
  23197. other device types is 'datapoint'. If set to 'address' format of reading names
  23198. is channel-address.datapoint. If set to 'name' format of reading names is
  23199. channel-name.datapoint. If set to 'datapoint' format is channel-number.datapoint. With
  23200. suffix 'lc' reading names are converted to lowercase.
  23201. </li><br/>
  23202. <li><b>ccureadingname &lt;old-readingname-expr&gt;:[+]&lt;new-readingname&gt;[;...]</b><br/>
  23203. Set alternative or additional reading names or group readings. Only part of old reading
  23204. name matching <i>old-readingname-exptr</i> is substituted by <i>new-readingname</i>.
  23205. If <i>new-readingname</i> is preceded by '+' an additional reading is created. If
  23206. <i>old-readingname-expr</i> matches more than one reading the values of these readings
  23207. are stored in one reading. This makes sense only in some cases, i.e. if a device has
  23208. several pressed_short datapoints and a reading should contain a value if any button
  23209. is pressed.<br/><br/>
  23210. Examples:<br/>
  23211. <code>
  23212. # Rename readings 0.LOWBAT and 0.LOW_BAT as battery<br/>
  23213. attr mydev ccureadingname 0.(LOWBAT|LOW_BAT):battery<br/>
  23214. # Add reading battery as a copy of readings LOWBAT and LOW_BAT.<br/>
  23215. # Rename reading 4.SET_TEMPERATURE as desired-temp<br/>
  23216. attr mydev ccureadingname 0.(LOWBAT|LOW_BAT):+battery;1.SET_TEMPERATURE:desired-temp<br/>
  23217. # Store values of readings n.PRESS_SHORT in new reading pressed.<br/>
  23218. # Value of pressed is 1/true if any button is pressed<br/>
  23219. attr mydev ccureadingname [1-4].PRESSED_SHORT:+pressed
  23220. </code>
  23221. </li><br/>
  23222. <li><b>ccuscaleval &lt;datapoint&gt;:&lt;factor&gt;[,...]</b><br/>
  23223. <b>ccuscaleval &lt;[!]datapoint&gt;:&lt;min&gt;:&lt;max&gt;:&lt;minn&gt;:&lt;maxn&gt;[,...]
  23224. </b><br/>
  23225. Scale, spread, shift and optionally reverse values before executing set datapoint commands
  23226. or after executing get datapoint commands / before storing values in readings.<br/>
  23227. If first syntax is used during get the value read from CCU is devided by <i>factor</i>.
  23228. During set the value is multiplied by factor.<br/>
  23229. With second syntax one must specify the interval in CCU (<i>min,max</i>) and the interval
  23230. in FHEM (<i>minn, maxn</i>). The scaling factor is calculated automatically. If parameter
  23231. <i>datapoint</i> starts with a '!' the resulting value is reversed.
  23232. <br/><br/>
  23233. Example: Scale values of datapoint LEVEL for blind actor and reverse values<br/>
  23234. <code>
  23235. attr myblind ccuscale !LEVEL:0:1:0:100
  23236. </code>
  23237. </li><br/>
  23238. <li><b>ccuverify {<u>0</u> | 1 | 2}</b><br/>
  23239. If set to 1 a datapoint is read for verification after set operation. If set to 2 the
  23240. corresponding reading will be set to the new value directly after setting a datapoint
  23241. in CCU without any verification.
  23242. </li><br/>
  23243. <li><b>controldatapoint &lt;datapoint&gt;</b><br/>
  23244. Set datapoint for device control. Can be use to realize user defined control elements for
  23245. setting control datapoint. For example if datapoint of thermostat control is
  23246. SET_TEMPERATURE one can define a slider for setting the destination temperature with
  23247. following attributes:<br/><br/>
  23248. attr mydev controldatapoint SET_TEMPERATURE<br/>
  23249. attr mydev webCmd control<br/>
  23250. attr mydev widgetOverride control:slider,10,1,25
  23251. </li><br/>
  23252. <li><b>disable {<u>0</u> | 1}</b><br/>
  23253. Disable client device.
  23254. </li><br/>
  23255. <li><b>hmstatevals &lt;subst-rule&gt;[;...]</b><br/>
  23256. Define building rules and substitutions for reading hmstate. Syntax of <i>subst-rule</i>
  23257. is<br/>
  23258. [=&lt;reading&gt;;]&lt;datapoint-expr&gt;!&lt;{#n1-m1|regexp}&gt;:&lt;text&gt;[,...]
  23259. <br/><br/>
  23260. The syntax is almost the same as of attribute 'substitute', except there's no channel
  23261. specification possible for datapoint and parameter <i>datapoint-expr</i> is a regular
  23262. expression.<br/>
  23263. The value of the I/O device attribute 'ccudef-hmstatevals' is appended to the value of
  23264. this attribute. The default value of 'ccudef-hmstatevals' is
  23265. '^UNREACH!(1|true):unreachable;LOW_?BAT!(1|true):warn_battery'.
  23266. Normally one should not specify a substitution rule for the "good" value of an error
  23267. datapoint (i.e. 0 for UNREACH). If none of the rules is matching, reading 'hmstate' is set
  23268. to value of reading 'state'.<br/>
  23269. Parameter <i>text</i> can contain variables in format ${<i>varname</i>}. The variable
  23270. $value is substituted by the original datapoint value. All other variables must match
  23271. with a valid datapoint name or a combination of channel number and datapoint name
  23272. seperated by a '.'.<br/>
  23273. Optionally the name of the HomeMatic state reading can be specified at the beginning of
  23274. the attribute in format =&lt;reading&gt;;. The default reading name is 'hmstate'.
  23275. </li><br/>
  23276. <li><b>peer &lt;datapoints&gt;:&lt;condition&gt;:
  23277. {ccu:&lt;object&gt;=&lt;value&gt;|hmccu:&lt;object&gt;=&lt;value&gt;|
  23278. fhem:&lt;command&gt;}</b><br/>
  23279. Logically peer datapoints of a HMCCUCHN or HMCCUDEV device with another device or any
  23280. FHEM command.<br/>
  23281. Parameter <i>datapoints</i> is a comma separated list of datapoints in format
  23282. <i>channelno.datapoint</i> which can trigger the action.<br/>
  23283. Parameter <i>condition</i> is a valid Perl expression which can contain
  23284. <i>channelno.datapoint</i> names as variables. Variables must start with a '$' or a '%'.
  23285. If a variable is preceded by a '$' the variable is substituted by the converted datapoint
  23286. value (i.e. "on" instead of "true"). If variable is preceded by a '%' the raw value
  23287. (i.e. "true") is used. If '$' or '%' is doubled the previous values will be used.<br/>
  23288. If the result of this operation is true, the action specified after the second colon
  23289. is executed. Three types of actions are supported:<br/>
  23290. <b>hmccu</b>: Parameter <i>object</i> refers to a FHEM device/datapoint in format
  23291. &lt;device&gt;:&lt;channelno&gt;.&lt;datapoint&gt;<br/>
  23292. <b>ccu</b>: Parameter <i>object</i> refers to a CCU channel/datapoint in format
  23293. &lt;channel&gt;.&lt;datapoint&gt;. <i>channel</i> can be a channel name or address.<br/>
  23294. <b>fhem</b>: The specified <i>command</i> will be executed<br/>
  23295. If action contains the string $value it is substituted by the current value of the
  23296. datapoint which triggered the action. The attribute supports multiple peering rules
  23297. separated by semicolons and optionally by newline characters.<br/><br/>
  23298. Examples:<br/>
  23299. # Set FHEM device mydummy to value if formatted value of 1.STATE is 'on'<br/>
  23300. <code>attr mydev peer 1.STATE:'$1.STATE' eq 'on':fhem:set mydummy $value</code><br/>
  23301. # Set 2.LEVEL of device myBlind to 100 if raw value of 1.STATE is 1<br/>
  23302. <code>attr mydev peer 1.STATE:'%1.STATE' eq '1':hmccu:myBlind:2.LEVEL=100</code><br/>
  23303. # Set 1.STATE of device LEQ1234567 to true if 1.LEVEL < 100<br/>
  23304. <code>attr mydev peer 1.LEVEL:$1.LEVEL < 100:ccu:LEQ1234567:1.STATE=true</code><br/>
  23305. # Set 1.STATE of device LEQ1234567 to true if current level is different from old level<br/>
  23306. <code>attr mydev peer 1.LEVEL:$1.LEVEL != $$1.LEVEL:ccu:LEQ1234567:1.STATE=true</code><br/>
  23307. </li><br/>
  23308. <li><b>statedatapoint &lt;datapoint&gt;</b><br/>
  23309. Set state datapoint used by some commands like 'set devstate'.
  23310. </li><br/>
  23311. <li><b>statevals &lt;text&gt;:&lt;text&gt;[,...]</b><br/>
  23312. Define substitution for values of set commands. The parameters <i>text</i> are available
  23313. as set commands.
  23314. <br/><br/>
  23315. Example:<br/>
  23316. <code>
  23317. attr my_switch statevals on:true,off:false<br/>
  23318. set my_switch on
  23319. </code>
  23320. </li><br/>
  23321. <li><b>stripnumber [&lt;datapoint-expr&gt;!]{<u>0</u>|1|2|-n}[;...]</b><br/>
  23322. Remove trailing digits or zeroes from floating point numbers and/or round floating
  23323. point numbers. If attribute is negative (-0 is valid) floating point values are rounded
  23324. to the specified number of digits before they are stored in readings. The meaning of
  23325. values 0-2 is:<br/>
  23326. 0 = Floating point numbers are stored as read from CCU (i.e. with trailing zeros)<br/>
  23327. 1 = Trailing zeros are stripped from floating point numbers except one digit.<br/>
  23328. 2 = All trailing zeros are stripped from floating point numbers.<br/>
  23329. If <i>datapoint-expr</i> is specified the formatting applies only to datapoints
  23330. matching the regular expression.
  23331. </li><br/>
  23332. <li><b>substexcl &lt;reading-expr&gt;</b><br/>
  23333. Exclude values of readings matching <i>reading-expr</i> from substitution. This is helpful
  23334. for reading 'control' if the reading is used for a slider widget and the corresponding
  23335. datapoint is assigned to attribute statedatapoint and controldatapoint.
  23336. </li><br/>
  23337. <li><b>substitute &lt;subst-rule&gt;[;...]</b><br/>
  23338. Define substitutions for datapoint/reading values. Syntax of <i>subst-rule</i> is<br/><br/>
  23339. [[&lt;channelno&gt;.]&lt;datapoint&gt;[,...]!]&lt;{#n1-m1|regexp}&gt;:&lt;text&gt;[,...]
  23340. <br/><br/>
  23341. Parameter <i>text</i> can contain variables in format ${<i>varname</i>}. The variable
  23342. ${value} is
  23343. substituted by the original datapoint value. All other variables must match with a valid
  23344. datapoint name or a combination of channel number and datapoint name seperated by a '.'.
  23345. <br/><br/>
  23346. Example: Substitute the value of datapoint TEMPERATURE by the string
  23347. 'T=<i>val</i> deg' and append current value of datapoint 1.HUMIDITY<br/>
  23348. <code>
  23349. attr my_weather substitute TEMPERATURE!.+:T=${value} deg H=${1.HUMIDITY}%
  23350. </code><br/><br/>
  23351. If rule expression starts with a hash sign a numeric datapoint value is substituted if
  23352. it fits in the number range n &lt;= value &lt;= m.
  23353. <br/><br/>
  23354. Example: Interpret LEVEL values 100 and 0 of dimmer as "on" and "off"<br/>
  23355. <code>
  23356. attr my_dim substitute LEVEL!#0-0:off,#1-100:on
  23357. </code>
  23358. </li>
  23359. </ul>
  23360. </ul>
  23361. <a name="HMCCUDEV"></a>
  23362. <h3>HMCCUDEV</h3>
  23363. <ul>
  23364. The module implements Homematic CCU devices as client devices for HMCCU. A HMCCU I/O device must
  23365. exist before a client device can be defined. If a CCU channel is not found execute command
  23366. 'get devicelist' in I/O device.<br/>
  23367. This reference contains only commands and attributes which differ from module
  23368. <a href="#HMCCUCHN">HMCCUCHN</a>.
  23369. </br></br>
  23370. <a name="HMCCUDEVdefine"></a>
  23371. <b>Define</b><br/><br/>
  23372. <ul>
  23373. <code>define &lt;name&gt; HMCCUDEV {&lt;device&gt; | 'virtual'} [&lt;statechannel&gt;]
  23374. [readonly] [defaults] [{group={device|channel}[,...]|groupexp=regexp]
  23375. [iodev=&lt;iodev-name&gt;]</code>
  23376. <br/><br/>
  23377. If option 'readonly' is specified no set command will be available. With option 'defaults'
  23378. some default attributes depending on CCU device type will be set. Default attributes are only
  23379. available for some device types. Parameter <i>statechannel</i> corresponds to attribute
  23380. 'statechannel'.<br/>
  23381. A HMCCUDEV device supports CCU group devices. The CCU devices or channels related to a group
  23382. device are specified by using options 'group' or 'groupexp' followed by the names or
  23383. addresses of the CCU devices or channels. By using 'groupexp' one can specify a regular
  23384. expression for CCU device or channel names.<br/>
  23385. It's also possible to group any kind of CCU devices or channels without defining a real
  23386. group in CCU by using option 'virtual' instead of a CCU device specification.
  23387. <br/><br/>
  23388. Examples:<br/>
  23389. <code>
  23390. # Simple device by using CCU device name<br/>
  23391. define window_living HMCCUDEV WIN-LIV-1<br/>
  23392. # Simple device by using CCU device address and with state channel<br/>
  23393. define temp_control HMCCUDEV BidCos-RF.LEQ1234567 1<br/>
  23394. # Simple read only device by using CCU device address and with default attributes<br/>
  23395. define temp_sensor HMCCUDEV BidCos-RF.LEQ2345678 1 readonly defaults
  23396. # Group device by using CCU group device and 3 group members<br/>
  23397. define heating_living HMCCUDEV GRP-LIV group=WIN-LIV,HEAT-LIV,THERM-LIV
  23398. </code>
  23399. <br/>
  23400. </ul>
  23401. <br/>
  23402. <a name="HMCCUDEVset"></a>
  23403. <b>Set</b><br/><br/>
  23404. <ul>
  23405. <li><b>set &lt;name&gt; clear [&lt;reading-exp&gt;]</b><br/>
  23406. <a href="#HMCCUCHNset">see HMCCUCHN</a>
  23407. </li><br/>
  23408. <li><b>set &lt;name&gt; config [&lt;channel-number&gt;] &lt;parameter&gt;=&lt;value&gt;
  23409. [...]</b><br/>
  23410. Set configuration parameter of CCU device or channel. Valid parameters can be listed by
  23411. using command 'get configdesc'.
  23412. </li><br/>
  23413. <li><b>set &lt;name&gt; datapoint [&lt;channel-number&gt;.]&lt;datapoint&gt;
  23414. &lt;value&gt;</b><br/>
  23415. Set value of a datapoint of a CCU device channel. If channel number is not specified
  23416. state channel is used. String \_ is substituted by blank.
  23417. <br/><br/>
  23418. Example:<br/>
  23419. <code>set temp_control datapoint 1.SET_TEMPERATURE 21</code>
  23420. </li><br/>
  23421. <li><b>set &lt;name&gt; defaults</b><br/>
  23422. Set default attributes for CCU device type. Default attributes are only available for
  23423. some device types.
  23424. </li><br/>
  23425. <li><b>set &lt;name&gt; devstate &lt;value&gt;</b><br/>
  23426. Set state of a CCU device channel. Channel and state datapoint must be defined as
  23427. attribute 'statedatapoint'. If <i>value</i> contains string \_ it is substituted by blank.
  23428. </li><br/>
  23429. <li><b>set &lt;name&gt; on-for-timer &lt;ontime&gt;</b><br/>
  23430. <a href="#HMCCUCHNset">see HMCCUCHN</a>
  23431. </li><br/>
  23432. <li><b>set &lt;name&gt; on-till &lt;timestamp&gt;</b><br/>
  23433. <a href="#HMCCUCHNset">see HMCCUCHN</a>
  23434. </li><br/>
  23435. <li><b>set &lt;name&gt; pct &lt;value;&gt; [&lt;ontime&gt; [&lt;ramptime&gt;]]</b><br/>
  23436. <a href="#HMCCUCHNset">see HMCCUCHN</a>
  23437. </li><br/>
  23438. <li><b>set &lt;name&gt; &lt;statevalue&gt;</b><br/>
  23439. State datapoint of a CCU device channel is set to 'statevalue'. State channel and state
  23440. datapoint must be defined as attribute 'statedatapoint'. Values for <i>statevalue</i>
  23441. are defined by setting attribute 'statevals'.
  23442. <br/><br/>
  23443. Example:<br/>
  23444. <code>
  23445. attr myswitch statedatapoint 1.STATE<br/>
  23446. attr myswitch statevals on:true,off:false<br/>
  23447. set myswitch on
  23448. </code>
  23449. </li><br/>
  23450. <li><b>set &lt;name&gt; toggle</b><br/>
  23451. <a href="#HMCCUCHNset">see HMCCUCHN</a>
  23452. </li><br/>
  23453. <li><b>ePaper Display</b><br/><br/>
  23454. This display has 5 text lines. The lines 1,2 and 4,5 are accessible via config parameters
  23455. TEXTLINE_1 and TEXTLINE_2 in channels 1 and 2. Example:<br/><br/>
  23456. <code>
  23457. define HM_EPDISP HMCCUDEV CCU_EPDISP<br/>
  23458. set HM_EPDISP config 2 TEXTLINE_1=Line1<br/>
  23459. set HM_EPDISP config 2 TEXTLINE_2=Line2<br/>
  23460. set HM_EPDISP config 1 TEXTLINE_1=Line4<br/>
  23461. set HM_EPDISP config 1 TEXTLINE_2=Line5<br/>
  23462. </code>
  23463. <br/>
  23464. The lines 2,3 and 4 of the display can be accessed by setting the datapoint SUBMIT of the
  23465. display to a string containing command tokens in format 'parameter=value'. The following
  23466. commands are allowed:
  23467. <br/><br/>
  23468. <ul>
  23469. <li>text1-3=Text - Content of display line 2-4</li>
  23470. <li>icon1-3=IconCode - Icons of display line 2-4</li>
  23471. <li>sound=SoundCode - Sound</li>
  23472. <li>signal=SignalCode - Optical signal</li>
  23473. <li>pause=Seconds - Pause between signals (1-160)</li>
  23474. <li>repeat=Count - Repeat count for sound (0-15)</li>
  23475. </ul>
  23476. <br/>
  23477. IconCode := ico_off, ico_on, ico_open, ico_closed, ico_error, ico_ok, ico_info,
  23478. ico_newmsg, ico_svcmsg<br/>
  23479. SignalCode := sig_off, sig_red, sig_green, sig_orange<br/>
  23480. SoundCode := snd_off, snd_longlong, snd_longshort, snd_long2short, snd_short, snd_shortshort,
  23481. snd_long<br/><br/>
  23482. Example:<br/>
  23483. <code>
  23484. set HM_EPDISP datapoint 3.SUBMIT text1=Line2,text2=Line3,text3=Line4,sound=snd_short,
  23485. signal=sig_red
  23486. </code>
  23487. </li>
  23488. </ul>
  23489. <br/>
  23490. <a name="HMCCUDEVget"></a>
  23491. <b>Get</b><br/><br/>
  23492. <ul>
  23493. <li><b>get &lt;name&gt; config [&lt;channel-number&gt;] [&lt;filter-expr&gt;]</b><br/>
  23494. Get configuration parameters of CCU device. If attribute 'ccureadings' is set to 0
  23495. parameters are displayed in browser window (no readings set). Parameters can be filtered
  23496. by <i>filter-expr</i>.
  23497. </li><br/>
  23498. <li><b>get &lt;name&gt; configdesc [&lt;channel-number&gt;] [&lt;rpcport&gt;]</b><br/>
  23499. Get description of configuration parameters for CCU device. Default value for Parameter
  23500. <i>rpcport</i> is 2001 (BidCos-RF). Other valid values are 2000 (wired) and 2010 (HMIP).
  23501. </li><br/>
  23502. <li><b>get &lt;name&gt; configlist [&lt;channel-number&gt;] [&lt;filter-expr&gt;]</b><br/>
  23503. Display configuration parameters of CCU device. Parameters can be filtered by
  23504. <i>filter-expr</i>.
  23505. </li><br/>
  23506. <li><b>get &lt;name&gt; datapoint [&lt;channel-number&gt;.]&lt;datapoint&gt;</b><br/>
  23507. Get value of a CCU device datapoint. If <i>channel-number</i> is not specified state
  23508. channel is used.
  23509. </li><br/>
  23510. <li><b>get &lt;name&gt; defaults</b><br/>
  23511. <a href="#HMCCUCHNget">see HMCCUCHN</a>
  23512. </li><br/>
  23513. <li><b>get &lt;name&gt; deviceinfo [{State | <u>Value</u>}]</b><br/>
  23514. Display all channels and datapoints of device with datapoint values and types.
  23515. </li><br/>
  23516. <li><b>get &lt;name&gt; devstate</b><br/>
  23517. Get state of CCU device. Attribute 'statechannel' must be set. Default state datapoint
  23518. STATE can be modified by attribute 'statedatapoint'.
  23519. </li><br/>
  23520. <li><b>get &lt;name&gt; update [{State | <u>Value</u>}]</b><br/>
  23521. <a href="#HMCCUCHNget">see HMCCUCHN</a>
  23522. </li><br/>
  23523. </ul>
  23524. <br/>
  23525. <a name="HMCCUDEVattr"></a>
  23526. <b>Attributes</b><br/><br/>
  23527. <ul>
  23528. To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
  23529. to '.*'.<br/><br/>
  23530. <li><b>ccuackstate {<u>0</u> | 1}</b><br/>
  23531. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23532. </li><br/>
  23533. <li><b>ccucalculate &lt;value-type&gt;:&lt;reading&gt;[:&lt;dp-list&gt;[;...]</b><br/>
  23534. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23535. </li><br/>
  23536. <li><b>ccuflags {nochn0, trace}</b><br/>
  23537. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23538. </li><br/>
  23539. <li><b>ccuget {State | <u>Value</u>}</b><br/>
  23540. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23541. </li><br/>
  23542. <li><b>ccureadings {0 | <u>1</u>}</b><br/>
  23543. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23544. </li><br/>
  23545. <li><b>ccureadingfilter &lt;filter-rule[,...]&gt;</b><br/>
  23546. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23547. </li><br/>
  23548. <li><b>ccureadingformat {address[lc] | name[lc] | datapoint[lc]}</b><br/>
  23549. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23550. </li><br/>
  23551. <li><b>ccureadingname &lt;old-readingname-expr&gt;:&lt;new-readingname&gt;[,...]</b><br/>
  23552. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23553. </li><br/>
  23554. <li><b>ccuscaleval &lt;datapoint&gt;:&lt;factor&gt;[,...]</b><br/>
  23555. ccuscaleval &lt;[!]datapoint&gt;:&lt;min&gt;:&lt;max&gt;:&lt;minn&gt;:&lt;maxn&gt;[,...]<br/>
  23556. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23557. </li><br/>
  23558. <li><b>ccuverify {0 | 1 | 2}</b><br/>
  23559. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23560. </li><br/>
  23561. <li><b>controldatapoint &lt;channel-number.datapoint&gt;</b><br/>
  23562. Set channel number and datapoint for device control.
  23563. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23564. </li><br/>
  23565. <li><b>disable {<u>0</u> | 1}</b><br/>
  23566. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23567. </li><br/>
  23568. <li><b>hmstatevals &lt;subst-rule&gt;[;...]</b><br/>
  23569. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23570. </li><br/>
  23571. <li><b>peer [&lt;datapoints&gt;:&lt;condition&gt;:
  23572. {ccu:&lt;object&gt;=&lt;value&gt;|hmccu:&lt;object&gt;=&lt;value&gt;|fhem:&lt;command&gt;}</b><br/>
  23573. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23574. </li><br/>
  23575. <li><b>statechannel &lt;channel-number&gt;</b><br/>
  23576. Channel for setting device state by devstate command. Deprecated, use attribute
  23577. 'statedatapoint' instead.
  23578. </li><br/>
  23579. <li><b>statedatapoint [&lt;channel-number&gt;.]&lt;datapoint&gt;</b><br/>
  23580. Set state channel and state datapoint for setting device state by devstate command.
  23581. Default is STATE. If 'statedatapoint' is not defined at least attribute 'statechannel'
  23582. must be set.
  23583. </li><br/>
  23584. <li><b>statevals &lt;text&gt;:&lt;text&gt;[,...]</b><br/>
  23585. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23586. </li><br/>
  23587. <li><b>stripnumber {0 | 1 | 2 | -n}</b><br/>
  23588. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23589. </li><br/>
  23590. <li><b>substexcl &lt;reading-expr&gt;</b><br/>
  23591. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23592. </li><br/>
  23593. <li><b>substitute &lt;subst-rule&gt;[;...]</b><br/>
  23594. <a href="#HMCCUCHNattr">see HMCCUCHN</a>
  23595. </li><br/>
  23596. </ul>
  23597. </ul>
  23598. <a name="HMCCURPC"></a>
  23599. <h3>HMCCURPC</h3>
  23600. <ul>
  23601. The module provides thread based RPC servers for receiving events from HomeMatic CCU2.
  23602. A HMCCURPC device acts as a client device for a HMCCU I/O device. Normally RPC servers of
  23603. HMCCURPC are started from HMCCU I/O device.
  23604. </br></br>
  23605. <a name="HMCCURPCdefine"></a>
  23606. <b>Define</b><br/><br/>
  23607. <ul>
  23608. <code>define &lt;name&gt; HMCCURPC {&lt;HostOrIP&gt;|iodev=&lt;DeviceName&gt;|standalone=&lt;
  23609. HostOrIP&gt;}</code>
  23610. <br/><br/>
  23611. Examples:<br/>
  23612. <code>define myccurpc HMCCURPC 192.168.1.10</code><br/>
  23613. <code>define myccurpc HMCCURPC iodev=myccudev</code><br/>
  23614. <code>define myccurpc HMCCURPC standalone=192.168.1.10</code>
  23615. <br/><br/>
  23616. The parameter <i>HostOrIP</i> is the hostname or IP address of a Homematic CCU2.
  23617. The I/O device can also be specified with parameter iodev. If option <b>standalone</b> is
  23618. specified RPC servers will operate without I/O device (for development purposes).
  23619. </ul>
  23620. <br/>
  23621. <a name="HMCCURPCset"></a>
  23622. <b>Set</b><br/><br/>
  23623. <ul>
  23624. <li><b> set &lt;name&gt; rpcrequest &lt;port&gt; &lt;method&gt; [&lt;parameters&gt;]</b><br/>
  23625. Send RPC request to CCU. The result is displayed in FHEM browser window. Parameter
  23626. &lt;port&gt; is a valid RPC port (i.e. 2001 for BidCos).
  23627. </li><br/>
  23628. <li><b>set &lt;name&gt; rpcserver { on | off }</b><br/>
  23629. Start or stop RPC server(s). This command is only available if expert mode is activated.
  23630. </li><br/>
  23631. </ul>
  23632. <a name="HMCCURPCget"></a>
  23633. <b>Get</b><br/><br/>
  23634. <ul>
  23635. <li><b>get &lt;name&gt; rpcevent</b><br/>
  23636. Show RPC server events statistics.
  23637. </li><br/>
  23638. <li><b>get &lt;name&gt; rpcstate</b><br/>
  23639. Show RPC thread states.
  23640. </li><br/>
  23641. </ul>
  23642. <a name="HMCCURPCattr"></a>
  23643. <b>Attributes</b><br/><br/>
  23644. <ul>
  23645. <li><b>ccuflags { expert }</b><br/>
  23646. Set flags for controlling device behaviour. Meaning of flags is:<br/>
  23647. expert - Activate expert mode<br/>
  23648. keepThreads - Do not delete thread objects after RPC server has been stopped<br/>
  23649. reconnect - Try to re-register at CCU if no events received for rpcEventTimeout seconds<br/>
  23650. </li><br/>
  23651. <li><b>rpcAcceptTimeout &lt;seconds&gt;</b><br/>
  23652. Specify timeout for accepting incoming connections. Default is 1 second. Increase this
  23653. value by 1 or 2 seconds on slow systems.
  23654. </li><br/>
  23655. <li><b>rpcConnTimeout &lt;seconds&gt;</b><br/>
  23656. Specify timeout of CCU connection handling. Default is 10 second.
  23657. </li><br/>
  23658. <li><b>rpcEventTimeout &lt;seconds&gt;</b><br/>
  23659. Specify timeout for CCU events. Default is 600 seconds. If timeout occurs an event
  23660. is triggered. If set to 0 the timeout is ignored.
  23661. </li><br/>
  23662. <li><b>rpcInterfaces { BidCos-Wired, BidCos-RF, HmIP-RF, VirtualDevices, CUxD, Homegear }</b><br/>
  23663. Select RPC interfaces. If attribute is missing the corresponding attribute of I/O device
  23664. (HMCCU device) is used. Default is BidCos-RF.
  23665. </li><br/>
  23666. <li><b>rpcMaxEvents &lt;count&gt;</b><br/>
  23667. Specify maximum number of events read by FHEM during one I/O loop. If FHEM performance
  23668. slows down decrease this value. On a fast system this value can be increased to 100.
  23669. Default value is 50.
  23670. </li><br/>
  23671. <li><b>rpcQueueSize &lt;count&gt;</b><br/>
  23672. Specify maximum size of event queue. When this limit is reached no more CCU events
  23673. are forwarded to FHEM. In this case increase this attribute or increase attribute
  23674. <b>rpcMaxEvents</b>. Default value is 500.
  23675. </li><br/>
  23676. <li><b>rpcServer { on | off }</b><br/>
  23677. If set to 'on' start RPC server(s) after FHEM start. Default is 'off'.
  23678. </li><br/>
  23679. <li><b>rpcServerAddr &lt;ip-address&gt;</b><br/>
  23680. Set local IP address of RPC servers on FHEM system. If attribute is missing the
  23681. corresponding attribute of I/O device (HMCCU device) is used or IP address is
  23682. detected automatically. This attribute should be set if FHEM is running on a system
  23683. with multiple network interfaces.
  23684. </li><br/>
  23685. <li><b>rpcServerPort &lt;port&gt;</b><br/>
  23686. Specify TCP port number used for calculation of real RPC server ports.
  23687. If attribute is missing the corresponding attribute of I/O device (HMCCU device)
  23688. is used. Default value is 5400.
  23689. </li><br/>
  23690. <li><b>rpcTriggerTime &lt;seconds&gt;</b><br/>
  23691. Set time to wait before triggering I/O again after an I/O error "no reader" occurred.
  23692. Default value is 10 seconds, 0 will deactivate error handling for this kind of error.
  23693. On fast systems this value can be set to 5 seconds. Higher values Reduce number of
  23694. log messages written if FHEM is busy and not able to read data from CCU.
  23695. </li><br/>
  23696. <li><b>rpcWaitTime &lt;microseconds&gt;</b><br/>
  23697. Specify time to wait for data processing thread after each loop. Default value is
  23698. 100000 microseconds.
  23699. </li><br/>
  23700. <li><b>rpcWriteTimeout &lt;seconds&gt;</b><br/>
  23701. The data processing thread will wait the specified time for FHEM input socket to
  23702. become writeable. Default value is 0.001 seconds.
  23703. </li>
  23704. </ul>
  23705. </ul>
  23706. <a name="HMLAN"></a>
  23707. <h3>HMLAN</h3>
  23708. <ul>
  23709. The HMLAN is the fhem module for the eQ-3 HomeMatic LAN Configurator.<br>
  23710. A description on how to use <a href="https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb">hmCfgUsb</a> can be found follwing the link.<br/>
  23711. <br/>
  23712. The fhem module will emulate a CUL device, so the <a href="#CUL_HM">CUL_HM</a> module can be used to define HomeMatic devices.<br/>
  23713. <br>
  23714. In order to use it with fhem you <b>must</b> disable the encryption first with the "HomeMatic Lan Interface Configurator"<br>
  23715. (which is part of the supplied Windows software), by selecting the device, "Change IP Settings", and deselect "AES Encrypt Lan Communication".<br/>
  23716. <br/>
  23717. This device can be used in parallel with a CCU and (readonly) with fhem. To do this:
  23718. <ul>
  23719. <li>start the fhem/contrib/tcptee.pl program</li>
  23720. <li>redirect the CCU to the local host</li>
  23721. <li>disable the LAN-Encryption on the CCU for the Lan configurator</li>
  23722. <li>set the dummy attribute for the HMLAN device in fhem</li>
  23723. </ul>
  23724. <br/><br/>
  23725. <a name="HMLANdefine"><b>Define</b></a>
  23726. <ul>
  23727. <code>define &lt;name&gt; HMLAN &lt;ip-address&gt;[:port]</code><br>
  23728. <br>
  23729. port is 1000 by default.<br/>
  23730. If the ip-address is called none, then no device will be opened, so you can experiment without hardware attached.
  23731. </ul>
  23732. <br><br>
  23733. <a name="HMLANset"><b>Set</b></a>
  23734. <ul>
  23735. <li><a href="#hmPairForSec">hmPairForSec</a></li>
  23736. <li><a href="#hmPairSerial">hmPairSerial</a></li>
  23737. <li><a href="#hmreopen">reopen</a>
  23738. reconnect the device
  23739. </li>
  23740. <li><a href="#hmrestart">restart</a>
  23741. Restart the device
  23742. </li>
  23743. <li><a href="#HMLANset_reassignIDs">reassignIDs</a>
  23744. Syncs the IDs between HMLAN and the FHEM list.
  23745. Usually this is done automatically and only is recomended if there is a difference in counts.
  23746. </li>
  23747. <br><br>
  23748. </ul>
  23749. <a name="HMLANget"><b>Get</b></a>
  23750. <ul>
  23751. <li><a href="#HMLANgetassignIDs">assignIDs</a>
  23752. Gibt eine Liste aller diesem IO zugewiesenen IOs aus.
  23753. </li>
  23754. </ul>
  23755. <br><br>
  23756. <a name="HMLANattr"><b>Attributes</b></a>
  23757. <ul>
  23758. <li><a href="#addvaltrigger">addvaltrigger</a></li>
  23759. <li><a href="#do_not_notify">do_not_notify</a></li>
  23760. <li><a href="#attrdummy">dummy</a></li>
  23761. <li><a href="#HMLANlogIDs">logIDs</a><br>
  23762. enables selective logging of HMLAN messages. A list of HMIds or names can be
  23763. entered, comma separated, which shall be logged.<br>
  23764. The attribute only allows device-IDs, not channel IDs.
  23765. Channel-IDs will be modified to device-IDs automatically.
  23766. <b>all</b> will log raw messages for all HMIds<br>
  23767. <b>sys</b> will log system related messages like keep-alive<br>
  23768. in order to enable all messages set "<b>all,sys</b>"<br>
  23769. </li>
  23770. <li><a name="HMLANloadLevel">loadLevel</a><br>
  23771. loadlevel will be mapped to reading vaues. <br>
  23772. 0:low,30:mid,40:batchLevel,90:high,99:suspended<br>
  23773. the batchLevel value will be set to 40 if not entered. This is the level at which
  23774. background message generation e.g. for autoReadReg will be stopped<br>
  23775. </li>
  23776. <li><a href="#hmId">hmId</a></li>
  23777. <li><a name="HMLANhmKey">hmKey</a></li>
  23778. <li><a name="HMLANhmKey2">hmKey2</a></li>
  23779. <li><a name="HMLANhmKey3">hmKey3</a></li>
  23780. <li><a name="HMLANhmKey4">hmKey4</a></li>
  23781. <li><a name="HMLANhmKey5">hmKey5</a><br>
  23782. AES keys for the HMLAN adapter. <br>
  23783. The key is converted to a hash. If a hash is given directly it is not converted but taken directly.
  23784. Therefore the original key cannot be converted back<br>
  23785. </li>
  23786. <li><a href="#hmProtocolEvents">hmProtocolEvents</a></li><br>
  23787. <li><a name="HMLANrespTime">respTime</a><br>
  23788. Define max response time of the HMLAN adapter in seconds. Default is 1 sec.<br/>
  23789. Longer times may be used as workaround in slow/instable systems or LAN configurations.</li>
  23790. <li><a name="HMLAN#wdTimer">wdTimer</a><br>
  23791. Time in sec to trigger HMLAN. Values between 5 and 25 are allowed, 25 is default.<br>
  23792. It is <B>not recommended</B> to change this timer. If problems are detected with <br>
  23793. HLMLAN disconnection it is advisable to resolve the root-cause of the problem and not symptoms.</li>
  23794. <li><a name="HMLANhmLanQlen">hmLanQlen</a><br>
  23795. defines queuelength of HMLAN interface. This is therefore the number of
  23796. simultanously send messages. increasing values may cause higher transmission speed.
  23797. It may also cause retransmissions up to data loss.<br>
  23798. Effects can be observed by watching protocol events<br>
  23799. 1 - is a conservatibe value, and is default<br>
  23800. 5 - is critical length, likely cause message loss</li>
  23801. </ul><br>
  23802. <a name="HMLANparameter"><b>parameter</b></a>
  23803. <ul>
  23804. <li><B>assignedIDsCnt</B><br>
  23805. number of IDs that are assigned to HMLAN by FHEM.
  23806. If the number reported by HMLAN differ it will be reported as 'reported'.<br>
  23807. It is recommended to resync HMLAN using the command 'assignIDs'.
  23808. </li>
  23809. <li><B>msgKeepAlive</B><br>
  23810. performance of keep-alive messages. <br>
  23811. <B>dlyMax</B>: maximum delay of sheduled message-time to actual message send.<br>
  23812. <B>bufferMin</B>: minimal buffer left to before HMLAN would likely disconnect
  23813. due to missing keepAlive message. bufferMin will be reset to 30sec if
  23814. attribut wdTimer is changed.<br>
  23815. if dlyMax is high (several seconds) or bufferMin goes to "0" (normal is 4) the system
  23816. suffers on internal delays. Reasons for the delay might be explored. As a quick solution
  23817. wdTimer could be decreased to trigger HMLAN faster.</li>
  23818. <li><B>msgLoadCurrent</B><br>
  23819. Current transmit load of HMLAN. When capacity reaches 100% HMLAN stops sending and waits for
  23820. reduction. See also:
  23821. <a href="#HMLANloadLevel">loadLevel</a><br></li>
  23822. <li><B>msgLoadHistoryAbs</B><br>
  23823. Historical transmition load of IO.</li>
  23824. <li><B>msgParseDly</B><br>
  23825. calculates the delay of messages in ms from send in HMLAN until processing in FHEM.
  23826. It therefore gives an indication about FHEM system performance.
  23827. </li>
  23828. </ul><br>
  23829. <a name="HMLANreadings"><b>parameter and readings</b></a>
  23830. <ul>
  23831. <li><B>prot_disconnect</B> <br>recent HMLAN disconnect</li>
  23832. <li><B>prot_init</B> <br>recent HMLAN init</li>
  23833. <li><B>prot_keepAlive</B> <br>HMLAN disconnect likely do to slow keep-alive sending</li>
  23834. <li><B>prot_ok</B> <br>recent HMLAN ok condition</li>
  23835. <li><B>prot_timeout</B> <br>recent HMLAN timeout</li>
  23836. <li><B>prot_Warning-HighLoad</B> <br>high load condition entered - HMLAN has about 10% performance left</li>
  23837. <li><B>prot_ERROR-Overload</B> <br>overload condition - HMLAN will receive bu tno longer transmitt messages</li>
  23838. <li><B>prot_Overload-released</B><br>overload condition released - normal operation possible</li>
  23839. </ul>
  23840. </ul>
  23841. <a name="HMS"></a>
  23842. <h3>HMS</h3>
  23843. <ul>
  23844. <a name="HMSdefine"></a>
  23845. <b>Define</b>
  23846. <ul>
  23847. <code>define &lt;name&gt; HMS &lt;housecode&gt;</code>
  23848. <br><br>
  23849. <code>&lt;housecode&gt;</code> is a four digit hex number,
  23850. corresponding to the address of the HMS device.
  23851. <br>
  23852. Examples:
  23853. <ul>
  23854. <code>define temp HMS 1234</code><br>
  23855. </ul>
  23856. Notes:<br>
  23857. <ul>
  23858. <li>Currently supported devices are the HMS100-T HMS100-TF HMS100-WD
  23859. HMS100-MG HMS100-TFK HMS100-CO HMS100-FIT RM100-2 RM100-3</li>
  23860. <li>The housecode of the HMS devices may change if the battery is renewed.
  23861. In order to make life easier, you can define a "wildcard" device for each
  23862. type of HMS device. First the real device-id will be checked, then the
  23863. wildcard device id. The wildcards are:
  23864. <ul>
  23865. <li>1000 for the HMS100-TF</li>
  23866. <li>1001 for the HMS100-T</li>
  23867. <li>1002 for the HMS100-WD</li>
  23868. <li>1003 for the RM100-2</li>
  23869. <li>1004 for the HMS100-TFK</li>
  23870. <li>1006 for the HMS100-MG</li>
  23871. <li>1008 for the HMS100-CO</li>
  23872. <li>100e for the HMS100-FIT</li>
  23873. </ul>
  23874. </li>
  23875. <li>Some battery low notifications are not yet implemented (RM100,
  23876. HMS100WD).</li>
  23877. <li>Please test your installation before relying on the
  23878. functionality.</li>
  23879. </ul>
  23880. <br>
  23881. </ul>
  23882. <br>
  23883. <a name="HMSset"></a>
  23884. <b>Set</b> <ul>N/A</ul><br>
  23885. <a name="HMSget"></a>
  23886. <b>Get</b> <ul>N/A</ul><br>
  23887. <a name="HMSattr"></a>
  23888. <b>Attributes</b>
  23889. <ul>
  23890. <li><a href="#ignore">ignore</a></li>
  23891. <li><a href="#do_not_notify">do_not_notify</a></li>
  23892. <li><a href="#showtime">showtime</a></li>
  23893. <li><a href="#IODev">IODev</a></li>
  23894. <li><a href="#eventMap">eventMap</a></li>
  23895. <li><a href="#model">model</a> (hms100-t hms100-tf hms100-wd hms100-mg
  23896. hms100-co hms100-tfk hms100-fit rm100-2)</li>
  23897. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  23898. </ul>
  23899. <br>
  23900. </ul>
  23901. <a name="HMUARTLGW"></a>
  23902. <h3>HMUARTLGW</h3>
  23903. <ul>
  23904. HMUARTLGW provides support for the eQ-3 HomeMatic Wireless LAN Gateway
  23905. (HM-LGW-O-TW-W-EU) and the eQ-3 HomeMatic UART module (HM-MOD-UART), which
  23906. is part of the HomeMatic wireless module for the Raspberry Pi
  23907. (HM-MOD-RPI-PCB).<br>
  23908. <br><br>
  23909. <a name="HMUARTLGHW_define"></a>
  23910. <b>Define</b>
  23911. <ul>
  23912. <code>define &lt;name&gt; HMUARTLGW &lt;device&gt;</code><br><br>
  23913. The &lt;device&gt;-parameter depends on the device-type:
  23914. <ul>
  23915. <li>HM-MOD-UART: &lt;device&gt; specifies the serial port to communicate
  23916. with. The baud-rate is fixed at 115200 and does not need to be
  23917. specified.<br>
  23918. If the HM-MOD-UART is connected to the network by a serial bridge,
  23919. the connection has to be defined in an URL-like format
  23920. (<code>uart://ip:port</code>).</li>
  23921. <li>HM-LGW-O-TW-W-EU: &lt;device&gt; specifies the IP address or hostname
  23922. of the gateway, optionally followed by : and the port number of the
  23923. BidCoS-port (default when not specified: 2000).</li>
  23924. </ul>
  23925. <br><br>
  23926. Examples:<br>
  23927. <ul>
  23928. <li>Local HM-MOD-UART at <code>/dev/ttyAMA0</code>:<br>
  23929. <code>define myHmUART HMUARTLGW /dev/ttyAMA0</code><br>&nbsp;</li>
  23930. <li>LAN Gateway at <code>192.168.42.23</code>:<br>
  23931. <code>define myHmLGW HMUARTLGW 192.168.42.23</code><br>&nbsp;</li>
  23932. <li>Remote HM-MOD-UART using <code>socat</code> on a Raspberry Pi:<br>
  23933. <code>define myRemoteHmUART HMUARTLGW uart://192.168.42.23:12345</code><br><br>
  23934. Remote Raspberry Pi:<br><code>$ socat TCP4-LISTEN:12345,fork,reuseaddr /dev/ttyAMA0,raw,echo=0,b115200</code></li>
  23935. </ul>
  23936. </ul>
  23937. <br>
  23938. <a name="HMUARTLGW_set"></a>
  23939. <p><b>Set</b></p>
  23940. <ul>
  23941. <li>close<br>
  23942. Closes the connection to the device.
  23943. </li>
  23944. <li><a href="#hmPairForSec">hmPairForSec</a></li>
  23945. <li><a href="#hmPairSerial">hmPairSerial</a></li>
  23946. <li>open<br>
  23947. Opens the connection to the device and initializes it.
  23948. </li>
  23949. <li>reopen<br>
  23950. Reopens the connection to the device and reinitializes it.
  23951. </li>
  23952. <li>restart<br>
  23953. Reboots the device.
  23954. </li>
  23955. <li>updateCoPro &lt;/path/to/firmware.eq3&gt;<br>
  23956. Update the coprocessor-firmware (reading D-firmware) from the
  23957. supplied file. Source for firmware-images (version 1.4.1, official
  23958. eQ-3 repository):<br>
  23959. <ul>
  23960. <li>HM-MOD-UART: <a href="https://raw.githubusercontent.com/eq-3/occu/28045df83480122f90ab92f7c6e625f9bf3b61aa/firmware/HM-MOD-UART/coprocessor_update.eq3">coprocessor_update.eq3</a> (version 1.4.1)</li>
  23961. <li>HM-LGW-O-TW-W-EU: <a href="https://raw.githubusercontent.com/eq-3/occu/28045df83480122f90ab92f7c6e625f9bf3b61aa/firmware/coprocessor_update_hm_only.eq3">coprocessor_update_hm_only.eq3</a> (version 1.4.1)<br>
  23962. Please also make sure that D-LANfirmware is at least at version
  23963. 1.1.5. To update to this version, use the eQ-3 CLI tools (see wiki)
  23964. or use the eQ-3 netfinder with this firmware image: <a href="https://github.com/eq-3/occu/raw/28045df83480122f90ab92f7c6e625f9bf3b61aa/firmware/hm-lgw-o-tw-w-eu_update.eq3">hm-lgw-o-tw-w-eu_update.eq3</a><br>
  23965. <b>Do not flash hm-lgw-o-tw-w-eu_update.eq3 with updateCoPro!</b></li>
  23966. </ul>
  23967. </li>
  23968. </ul>
  23969. <br>
  23970. <a name="HMUARTLGW_get"></a>
  23971. <p><b>Get</b></p>
  23972. <ul>
  23973. <li>assignIDs<br>
  23974. Returns the HomeMatic devices currently assigned to this IO-device.
  23975. </li>
  23976. </ul>
  23977. <br>
  23978. <a name="HMUARTLGW_attr"></a>
  23979. <b>Attributes</b>
  23980. <ul>
  23981. <li>csmaCa<br>
  23982. Enable or disable CSMA/CA (Carrier sense multiple access with collision
  23983. avoidance), also known as listen-before-talk.<br>
  23984. Default: 0 (disabled)
  23985. </li>
  23986. <li>dummy<br>
  23987. Do not interact with the device at all, only define it.<br>
  23988. Default: not set
  23989. </li>
  23990. <li>dutyCycle<br>
  23991. Enable or disable the duty-cycle check (1% rule) performed by the
  23992. wireless module.<br>
  23993. Disabling this might be illegal in your country, please check with local
  23994. regulations!<br>
  23995. Default: 1 (enabled)
  23996. </li>
  23997. <li><a href="#hmId">hmId</a></li>
  23998. <li><a name="HMLANhmKey">hmKey</a></li>
  23999. <li><a name="HMLANhmKey2">hmKey2</a></li>
  24000. <li><a name="HMLANhmKey3">hmKey3</a></li>
  24001. <li>lgwPw<br>
  24002. AES password for the eQ-3 HomeMatic Wireless LAN Gateway. The default
  24003. password is printed on the back of the device (but can be changed by
  24004. the user). If AES communication is enabled on the LAN Gateway (default),
  24005. this attribute has to be set to the correct value or communication will
  24006. not be possible. In addition, the perl-module Crypt::Rijndael (which
  24007. provides the AES cipher) must be installed.
  24008. </li>
  24009. <li>loadEvents<br>
  24010. Enables logging of the wireless load (in percent of the allowed maximum
  24011. sending-time) of the interface.
  24012. Default: 0 (disabled)
  24013. </li>
  24014. <li>logIDs<br>
  24015. Enables selective logging of HMUARTLGW messages. A list of comma separated
  24016. HMIds or HM device names/channel names can be entered which shall be logged.<br>
  24017. <ul>
  24018. <li><i>all</i>: will log raw messages for all HMIds</li>
  24019. <li><i>sys</i>: will log system related messages like keep-alive</li>
  24020. </ul>
  24021. In order to enable all messages set: <i>all,sys</i>
  24022. </li>
  24023. <li>qLen<br>
  24024. Maximum number of commands in the internal queue of the HMUARTLGW module.
  24025. New commands when the queue is full are dropped. Each command has a maximum
  24026. lifetime of 3s when active, so the worst-case delay of a command is qLen * 3s
  24027. (3 minutes with default settings).<br>
  24028. Default: 60
  24029. </li>
  24030. </ul>
  24031. <br>
  24032. </ul>
  24033. <a name="HMinfo"></a>
  24034. <h3>HMinfo</h3>
  24035. <ul>
  24036. HMinfo is a module to support getting an overview of
  24037. eQ-3 HomeMatic devices as defines in <a href="#CUL_HM">CUL_HM</a>. <br><br>
  24038. <B>Status information and counter</B><br>
  24039. HMinfo gives an overview on the CUL_HM installed base including current conditions.
  24040. Readings and counter will not be updated automatically due to performance issues. <br>
  24041. Command <a href="#HMinfoupdate">update</a> must be used to refresh the values.
  24042. <ul><code><br>
  24043. set hm update<br>
  24044. </code></ul><br>
  24045. Webview of HMinfo providee details, basically counter about how
  24046. many CUL_HM entities experience exceptional conditions. It contains
  24047. <ul>
  24048. <li>Action Detector status</li>
  24049. <li>CUL_HM related IO devices and condition</li>
  24050. <li>Device protocol events which are related to communication errors</li>
  24051. <li>count of certain readings (e.g. batterie) and conditions - <a href="#HMinfoattr">attribut controlled</a></li>
  24052. <li>count of error condition in readings (e.g. overheat, motorErr) - <a href="#HMinfoattr">attribut controlled</a></li>
  24053. </ul>
  24054. <br>
  24055. It also allows some HM wide commands such
  24056. as store all collected register settings.<br><br>
  24057. Commands are executed on all HM entities.
  24058. If applicable and evident execution is restricted to related entities.
  24059. e.g. rssi is executed on devices only since channels do not support rssi values.<br><br>
  24060. <a name="HMinfoFilter"><b>Filter</b></a>
  24061. <ul> can be applied as following:<br><br>
  24062. <code>set &lt;name&gt; &lt;cmd&gt; &lt;filter&gt; [&lt;param&gt;]</code><br>
  24063. whereby filter has two segments, typefilter and name filter<br>
  24064. [-dcasev] [-f &lt;filter&gt;]<br><br>
  24065. filter for <b>types</b> <br>
  24066. <ul>
  24067. <li>d - device :include devices</li>
  24068. <li>c - channels :include channels</li>
  24069. <li>v - virtual :supress fhem virtual</li>
  24070. <li>p - physical :supress physical</li>
  24071. <li>a - aktor :supress actor</li>
  24072. <li>s - sensor :supress sensor</li>
  24073. <li>e - empty :include results even if requested fields are empty</li>
  24074. <li>2 - alias :display second name alias</li>
  24075. </ul>
  24076. and/or filter for <b>names</b>:<br>
  24077. <ul>
  24078. <li>-f &lt;filter&gt; :regexp to filter entity names </li>
  24079. </ul>
  24080. Example:<br>
  24081. <ul><code>
  24082. set hm param -d -f dim state # display param 'state' for all devices whos name contains dim<br>
  24083. set hm param -c -f ^dimUG$ peerList # display param 'peerList' for all channels whos name is dimUG<br>
  24084. set hm param -dcv expert # get attribut expert for all channels,devices or virtuals<br>
  24085. </code></ul>
  24086. </ul>
  24087. <br>
  24088. <a name="HMinfodefine"><b>Define</b></a>
  24089. <ul>
  24090. <code>define &lt;name&gt; HMinfo</code><br>
  24091. Just one entity needs to be defined without any parameter.<br>
  24092. </ul>
  24093. <br>
  24094. <a name="HMinfoget"><b>Get</b></a>
  24095. <ul>
  24096. <li><a name="#HMinfomodels">models</a><br>
  24097. list all HM models that are supported in FHEM
  24098. </li>
  24099. <li><a name="#HMinfoparam">param</a> <a href="#HMinfoFilter">[filter]</a> &lt;name&gt; &lt;name&gt;...<br>
  24100. returns a table of parameter values (attribute, readings,...)
  24101. for all entities as a table
  24102. </li>
  24103. <li><a name="#HMinforegister">register</a> <a href="#HMinfoFilter">[filter]</a><br>
  24104. provides a tableview of register of an entity
  24105. </li>
  24106. <li><a name="#HMinforegCheck">regCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
  24107. performs a consistency check on register readings for completeness
  24108. </li>
  24109. <li><a name="#HMinfopeerCheck">peerCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
  24110. performs a consistency check on peers. If a peer is set in a channel
  24111. it will check wether the peer also exist on the opposit side.
  24112. </li>
  24113. <li><a name="#HMinfopeerXref">peerXref</a> <a href="#HMinfoFilter">[filter]</a><br>
  24114. provides a cross-reference on peerings, a kind of who-with-who summary over HM
  24115. </li>
  24116. <li><a name="#HMinfoconfigCheck">configCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
  24117. performs a consistency check of HM settings. It includes regCheck and peerCheck
  24118. </li>
  24119. <li><a name="#HMinfoconfigChkResult">configChkResult</a><br>
  24120. returns the results of a previous executed configCheck
  24121. </li>
  24122. <li><a name="#HMinfotemplateList">templateList [&lt;name&gt;]</a><br>
  24123. list defined templates. If no name is given all templates will be listed<br>
  24124. </li>
  24125. <li><a name="#HMinfotemplateUsg">templateUsg</a> &lt;template&gt; [sortPeer|sortTemplate]<br>
  24126. templare usage<br>
  24127. template filters the output
  24128. </li>
  24129. <li><a name="#HMinfomsgStat">msgStat</a> <a href="#HMinfoFilter">[filter]</a><br>
  24130. statistic about message transferes over a week<br>
  24131. </li>
  24132. <li><a name="#HMinfoprotoEvents">protoEvents </a><a href="#HMinfoFilter">[filter]</a> <br>
  24133. <B>important view</B> about pending commands and failed executions for all devices in a single table.<br>
  24134. Consider to clear this statistic use <a name="#HMinfoclear">clear msgEvents</a>.<br>
  24135. </li>
  24136. <li><a name="#HMinforssi">rssi </a><a href="#HMinfoFilter">[filter]</a><br>
  24137. statistic over rssi data for HM entities.<br>
  24138. </li>
  24139. <li><a name="#HMinfotemplateChk">templateChk</a> <a href="#HMinfoFilter">[filter]</a> &lt;template&gt; &lt;peer:[long|short]&gt; [&lt;param1&gt; ...]<br>
  24140. verifies if the register-readings comply to the template <br>
  24141. Parameter are identical to <a href="#HMinfotemplateSet">templateSet</a><br>
  24142. The procedure will check if the register values match the ones provided by the template<br>
  24143. If no peer is necessary use <b>none</b> to skip this entry<br>
  24144. Example to verify settings<br>
  24145. <ul><code>
  24146. set hm templateChk -f RolloNord BlStopUpLg none 1 2 # RolloNord, no peer, parameter 1 and 2 given<br>
  24147. set hm templateChk -f RolloNord BlStopUpLg peerName:long # RolloNord peerName, long only<br>
  24148. set hm templateChk -f RolloNord BlStopUpLg peerName # RolloNord peerName, long and short<br>
  24149. set hm templateChk -f RolloNord BlStopUpLg peerName:all # RolloNord peerName, long and short<br>
  24150. set hm templateChk -f RolloNord BlStopUpLg all:long # RolloNord any peer, long only<br>
  24151. set hm templateChk -f RolloNord BlStopUpLg all # RolloNord any peer,long and short<br>
  24152. set hm templateChk -f Rollo.* BlStopUpLg all # each Rollo* any peer,long and short<br>
  24153. set hm templateChk BlStopUpLg # each entities<br>
  24154. set hm templateChk # all assigned templates<br>
  24155. set hm templateChk sortTemplate # all assigned templates sortiert nach Template<br>
  24156. set hm templateChk sortPeer # all assigned templates sortiert nach Peer<br>
  24157. </code></ul>
  24158. </li>
  24159. </ul>
  24160. <a name="HMinfoset"><b>Set</b></a>
  24161. <ul>
  24162. Even though the commands are a get funktion they are implemented
  24163. as set to allow simple web interface usage<br>
  24164. <li><a name="#HMinfoupdate">update</a><br>
  24165. updates HM status counter.
  24166. </li>
  24167. <li><a name="#HMinfoautoReadReg">autoReadReg</a> <a href="#HMinfoFilter">[filter]</a><br>
  24168. schedules a read of the configuration for the CUL_HM devices with attribut autoReadReg set to 1 or higher.
  24169. </li>
  24170. <li><a name="#HMinfoclear">clear</a> <a href="#HMinfoFilter">[filter]</a> [msgEvents|readings|msgStat|register|rssi]<br>
  24171. executes a set clear ... on all HM entities<br>
  24172. <ul>
  24173. <li>protocol relates to set clear msgEvents</li>
  24174. <li>set clear msgEvents for all device with protocol errors</li>
  24175. <li>readings relates to set clear readings</li>
  24176. <li>rssi clears all rssi counters </li>
  24177. <li>msgStat clear HM general message statistics</li>
  24178. <li>register clears all register-entries in readings</li>
  24179. </ul>
  24180. </li>
  24181. <li><a name="#HMinfosaveConfig">saveConfig</a> <a href="#HMinfoFilter">[filter] [&lt;file&gt;]</a><br>
  24182. performs a save for all HM register setting and peers. See <a href="#CUL_HMsaveConfig">CUL_HM saveConfig</a>.<br>
  24183. <a ref="#HMinfopurgeConfig">purgeConfig</a> will be executed automatically if the stored filesize exceeds 1MByte.<br>
  24184. </li>
  24185. <li><a name="#HMinfoarchConfig">archConfig</a> <a href="#HMinfoFilter">[filter] [&lt;file&gt;]</a><br>
  24186. performs <a href="#HMinfosaveConfig">saveConfig</a> for entities that appeare to have achanged configuration.
  24187. It is more conservative that saveConfig since incomplete sets are not stored.<br>
  24188. Option -a force an archieve for all devices that have a complete set of data<br>
  24189. </li>
  24190. <li><a name="#HMinfoloadConfig">loadConfig</a> <a href="#HMinfoFilter">[filter] [&lt;file&gt;]</a><br>
  24191. loads register and peers from a file saved by <a href="#HMinfosaveConfig">saveConfig</a>.<br>
  24192. It should be used carefully since it will add data to FHEM which cannot be verified. No readings will be replaced, only
  24193. missing readings will be added. The command is mainly meant to be fill in readings and register that are
  24194. hard to get. Those from devices which only react to config may not easily be read. <br>
  24195. Therefore it is strictly up to the user to fill valid data. User should consider using autoReadReg for devices
  24196. that can be read.<br>
  24197. The command will update FHEM readings and attributes. It will <B>not</B> reprogramm any device.
  24198. </li>
  24199. <li><a name="#HMinfopurgeConfig">purgeConfig</a> <a href="#HMinfoFilter">[filter] [&lt;file&gt;]</a><br>
  24200. purge (reduce) the saved config file. Due to the cumulative storage of the register setting
  24201. purge will use the latest stored readings and remove older one.
  24202. See <a href="#CUL_HMsaveConfig">CUL_HM saveConfig</a>.
  24203. </li>
  24204. <li><a name="#HMinfoverifyConfig">verifyConfig</a> <a href="#HMinfoFilter">[filter] [&lt;file&gt;]</a><br>
  24205. Compare date in config file to the currentactive data and report differences.
  24206. Possibly usable with a known-good configuration that was saved before.
  24207. It may make sense to purge the config file before.
  24208. See <a href="#CUL_HMpurgeConfig">CUL_HM purgeConfig</a>.
  24209. </li>
  24210. <br>
  24211. <li><a name="#HMinfotempList">tempList</a> <a href="#HMinfoFilter">[filter] [save|restore|verify|status|genPlot] [&lt;file&gt;]</a><br>
  24212. this function supports handling of tempList for thermstates.
  24213. It allows templists to be saved in a separate file, verify settings against the file
  24214. and write the templist of the file to the devices. <br>
  24215. <ul>
  24216. <li><B>save</B> saves tempList readings of the system to the file. <br>
  24217. Note that templist as available in FHEM is put to the file. It is up to the user to make
  24218. sure the data is actual<br>
  24219. Storage is not cumulative - former content of the file will be removed</li>
  24220. <li><B>restore</B> available templist as defined in the file are written directly
  24221. to the device</li>
  24222. <li><B>verify</B> file data is compared to readings as present in FHEM. It does not
  24223. verify data in the device - user needs to ensure actuallity of present readings</li>
  24224. <li><B>status</B> gives an overview of templates being used by any CUL_HM thermostat. It alls showes
  24225. templates being defined in the relevant files.
  24226. <br></li>
  24227. <li><B>genPlot</B> generates a set of records to display templates graphicaly.<br>
  24228. Out of the given template-file it generates a .log extended file which contains log-formated template data. timestamps are
  24229. set to begin Year 2000.<br>
  24230. A prepared .gplot file will be added to gplot directory.<br>
  24231. Logfile-entity <file>_Log will be added if not already present. It is necessary for plotting.<br>
  24232. SVG-entity <file>_SVG will be generated if not already present. It will display the graph.<br>
  24233. <br></li>
  24234. <li><B>file</B> name of the file to be used. Default: <B>tempList.cfg</B></li>
  24235. <br>
  24236. <li><B>filename</B> is the name of the file to be used. Default ist <B>tempList.cfg</B></li>
  24237. File example<br>
  24238. <ul><code>
  24239. entities:HK1_Climate,HK2_Clima<br>
  24240. tempListFri>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
  24241. tempListMon>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
  24242. tempListSat>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0<br>
  24243. tempListSun>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0<br>
  24244. tempListThu>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
  24245. tempListTue>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 15.0<br>
  24246. tempListWed>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
  24247. entities:hk3_Climate<br>
  24248. tempListFri>06:00 17.0 12:00 21.0 23:00 20.0 24:00 19.5<br>
  24249. tempListMon>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
  24250. tempListSat>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
  24251. tempListSun>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
  24252. tempListThu>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
  24253. tempListTue>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
  24254. tempListWed>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
  24255. </code></ul>
  24256. File keywords<br>
  24257. <li><B>entities</B> comma separated list of entities which refers to the temp lists following.
  24258. The actual entity holding the templist must be given - which is channel 04 for RTs or channel 02 for TCs</li>
  24259. <li><B>tempList...</B> time and temp couples as used in the set tempList commands</li>
  24260. </ul>
  24261. <br>
  24262. </li>
  24263. <br>
  24264. <li><a name="#HMinfocpRegs">cpRegs &lt;src:peer&gt; &lt;dst:peer&gt; </a><br>
  24265. allows to copy register, setting and behavior of a channel to
  24266. another or for peers from the same or different channels. Copy therefore is allowed
  24267. intra/inter device and intra/inter channel. <br>
  24268. <b>src:peer</b> is the source entity. Peer needs to be given if a peer behabior beeds to be copied <br>
  24269. <b>dst:peer</b> is the destination entity.<br>
  24270. Example<br>
  24271. <ul><code>
  24272. set hm cpRegs blindR blindL # will copy all general register (list 1)for this channel from the blindR to the blindL entity.
  24273. This includes items like drive times. It does not include peers related register (list 3/4) <br>
  24274. set hm cpRegs blindR:Btn1 blindL:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindL<br>
  24275. set hm cpRegs blindR:Btn1 blindR:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindR, i.e. inside the same Actor<br>
  24276. </code></ul>
  24277. <br>
  24278. Restrictions:<br>
  24279. <ul>
  24280. cpRegs will <u>not add any peers</u> or read from the devices. It is up to the user to read register in advance<br>
  24281. cpRegs is only allowed between <u>identical models</u><br>
  24282. cpRegs expets that all <u>readings are up-to-date</u>. It is up to the user to ensure data consistency.<br>
  24283. </ul>
  24284. </li>
  24285. <li><a name="#HMinfotemplateDef">templateDef &lt;name&gt; &lt;param&gt; &lt;desc&gt; &lt;reg1:val1&gt; [&lt;reg2:val2&gt;] ...</a><br>
  24286. define a template.<br>
  24287. <b>param</b> gives the names of parameter necesary to execute the template. It is template dependant
  24288. and may be onTime or brightnesslevel. A list of parameter needs to be separated with colon<br>
  24289. param1:param2:param3<br>
  24290. if del is given as parameter the template is removed<br>
  24291. <b>desc</b> shall give a description of the template<br>
  24292. <b>reg:val</b> is the registername to be written and the value it needs to be set to.<br>
  24293. In case the register is from link set and can destinguist between long and short it is necessary to leave the
  24294. leading sh or lg off. <br>
  24295. if parameter are used it is necessary to enter p. as value with p0 first, p1 second parameter
  24296. <br>
  24297. Example<br>
  24298. <ul><code>
  24299. set hm templateDef SwOnCond level:cond "my description" CtValLo:p0 CtDlyOn:p1 CtOn:geLo<br>
  24300. set hm templateDef SwOnCond del # delete a template<br>
  24301. set hm templateDef SwOnCond fromMaster &lt;masterChannel&gt; &lt;peer:[long|short]&gt;# define a template with register as of the example<br>
  24302. set hm templateDef SwOnCond fromMaster myChannel peerChannel:long # <br>
  24303. </code></ul>
  24304. </li>
  24305. <li><a name="#HMinfotemplateSet">templateSet</a> &lt;entity&gt; &lt;template&gt; &lt;peer:[long|short]&gt; [&lt;param1&gt; ...]<br>
  24306. sets a bunch of register accroding to a given template. Parameter may be added depending on
  24307. the template setup. <br>
  24308. templateSet will collect and accumulate all changes. Finally the results are written streamlined.<br>
  24309. <b>entity:</b> peer is the source entity. Peer needs to be given if a peer behabior beeds to be copied <br>
  24310. <b>template:</b> one of the programmed template<br>
  24311. <b>peer:</b> [long|short]:if necessary a peer needs to be given. If no peer is used enter '0'.
  24312. with a peer it should be given whether it is for long or short keypress<br>
  24313. <b>param:</b> number and meaning of parameter depends on the given template<br>
  24314. Example could be (templates not provided, just theoretical)<br>
  24315. <ul><code>
  24316. set hm templateSet Licht1 staircase FB1:short 20 <br>
  24317. set hm templateSet Licht1 staircase FB1:long 100 <br>
  24318. </code></ul>
  24319. Restrictions:<br>
  24320. <ul>
  24321. User must ensure to read configuration prior to execution.<br>
  24322. templateSet may not setup a complete register block but only a part if it. This is up to template design.<br>
  24323. <br>
  24324. </ul>
  24325. </li>
  24326. <li><a name="#HMinfotemplateDel">templateDel</a> &lt;entity&gt; &lt;template&gt; &lt;peer:[long|short]&gt; ]<br>
  24327. remove a template installed by templateSet
  24328. <br>
  24329. </li>
  24330. <li><a name="#HMinfotemplateExe">templateExe</a> &lt;template&gt; <br>
  24331. executes the register write once again if necessary (e.g. a device had a reset)<br>
  24332. </li>
  24333. </ul>
  24334. <br>
  24335. <br><br>
  24336. <a name="HMinfoattr"><b>Attributes</b></a>
  24337. <ul>
  24338. <li><a name="#HMinfosumStatus">sumStatus</a><br>
  24339. Warnings: list of readings that shall be screend and counted based on current presence.
  24340. I.e. counter is the number of entities with this reading and the same value.
  24341. Readings to be searched are separated by comma. <br>
  24342. Example:<br>
  24343. <ul><code>
  24344. attr hm sumStatus battery,sabotageError<br>
  24345. </code></ul>
  24346. will cause a reading like<br>
  24347. W_sum_batterie ok:5 low:3<br>
  24348. W_sum_sabotageError on:1<br>
  24349. <br>
  24350. Note: counter with '0' value will not be reported. HMinfo will find all present values autonomously<br>
  24351. Setting is meant to give user a fast overview of parameter that are expected to be system critical<br>
  24352. </li>
  24353. <li><a name="#HMinfosumERROR">sumERROR</a>
  24354. Similar to sumStatus but with a focus on error conditions in the system.
  24355. Here user can add reading<b>values</b> that are <b>not displayed</b>. I.e. the value is the
  24356. good-condition that will not be counted.<br>
  24357. This way user must not know all error values but it is sufficient to supress known non-ciritical ones.
  24358. <br>
  24359. Example:<br>
  24360. <ul><code>
  24361. attr hm sumERROR battery:ok,sabotageError:off,overheat:off,Activity:alive:unknown<br>
  24362. </code></ul>
  24363. will cause a reading like<br>
  24364. <ul><code>
  24365. ERR_batterie low:3<br>
  24366. ERR_sabotageError on:1<br>
  24367. ERR_overheat on:3<br>
  24368. ERR_Activity dead:5<br>
  24369. </code></ul>
  24370. </li>
  24371. <li><a name="#HMinfoautoUpdate">autoUpdate</a>
  24372. retriggers the command update periodically.<br>
  24373. Example:<br>
  24374. <ul><code>
  24375. attr hm autoUpdate 00:10<br>
  24376. </code></ul>
  24377. will trigger the update every 10 min<br>
  24378. </li>
  24379. <li><a name="#HMinfoautoArchive">autoArchive</a>
  24380. if set fhem will update the configFile each time the new data is available.
  24381. The update will happen with <a ref="#HMinfoautoUpdate">autoUpdate</a>. It will not
  24382. work it autoUpdate is not used.<br>
  24383. see also <a ref="#HMinfoarchConfig">archConfig</a>
  24384. <br>
  24385. </li>
  24386. <li><a name="#HMinfohmAutoReadScan">hmAutoReadScan</a>
  24387. defines the time in seconds CUL_HM tries to schedule the next autoRead
  24388. from the queue. Despite this timer FHEM will take care that only one device from the queue will be
  24389. handled at one point in time. With this timer user can stretch timing even further - to up to 300sec
  24390. min delay between execution. <br>
  24391. Setting to 1 still obeys the "only one at a time" prinzip.<br>
  24392. Note that compressing will increase message load while stretch will extent waiting time.<br>
  24393. </li>
  24394. <li><a name="#HMinfohmIoMaxDly">hmIoMaxDly</a>
  24395. max time in seconds CUL_HM stacks messages if the IO device is not ready to send.
  24396. If the IO device will not reappear in time all command will be deleted and IOErr will be reported.<br>
  24397. Note: commands will be executed after the IO device reappears - which could lead to unexpected
  24398. activity long after command issue.<br>
  24399. default is 60sec. max value is 3600sec<br>
  24400. </li>
  24401. <li><a name="#HMinfoconfigDir">configDir</a>
  24402. default directory where to store and load configuration files from.
  24403. This path is used as long as the path is not given in a filename of
  24404. a given command.<br>
  24405. It is used by commands like <a ref="#HMinfotempList">tempList</a> or <a ref="#HMinfosaveConfig">saveConfig</a><br>
  24406. </li>
  24407. <li><a name="#HMinfoconfigFilename">configFilename</a>
  24408. default filename used by
  24409. <a ref="#HMinfosaveConfig">saveConfig</a>,
  24410. <a ref="#HMinfopurgeConfig">purgeConfig</a>,
  24411. <a ref="#HMinfoloadConfig">loadConfig</a><br>
  24412. <a ref="#HMinfoverifyConfig">verifyConfig</a><br>
  24413. </li>
  24414. <li><a name="#HMinfoconfigTempFile">configTempFile&lt;,configTempFile2&gt;&lt;,configTempFile2&gt; </a>
  24415. Liste of Templfiles (weekplan) which are considered in HMInfo and CUL_HM<br>
  24416. Files are comma separated. The first file is default. Its name may be skipped when setting a tempalte.<br>
  24417. </li>
  24418. <li><a name="#HMinfohmManualOper">hmManualOper</a>
  24419. set to 1 will prevent any automatic operation, update or default settings
  24420. in CUL_HM.<br>
  24421. </li>
  24422. <li><a name="#HMinfohmDefaults">hmDefaults</a>
  24423. set default params for HM devices. Multiple attributes are possible, comma separated.<br>
  24424. example:<br>
  24425. attr hm hmDefaults hmProtocolEvents:0_off,rssiLog:0<br>
  24426. </li>
  24427. <li><a name="#HMinfoautoLoadArchive">autoLoadArchive</a>
  24428. if set the register config will be loaded after reboot automatically. See <a ref="#HMinfoloadConfig">loadConfig</a> for details<br>
  24429. </li>
  24430. </ul>
  24431. <br>
  24432. <a name="HMinfovariables"><b>Variables</b></a>
  24433. <ul>
  24434. <li><b>I_autoReadPend:</b> Info:list of entities which are queued to retrieve config and status.
  24435. This is typically scheduled thru autoReadReg</li>
  24436. <li><b>ERR___rssiCrit:</b> Error:list of devices with RSSI reading n min level </li>
  24437. <li><b>W_unConfRegs:</b> Warning:list of entities with unconfirmed register changes. Execute getConfig to clear this.</li>
  24438. <li><b>I_rssiMinLevel:</b> Info:counts of rssi min readings per device, clustered in blocks</li>
  24439. <li><b>ERR__protocol:</b> Error:count of non-recoverable protocol events per device.
  24440. Those events are NACK, IOerr, ResendFail, CmdDel, CmdPend.<br>
  24441. Counted are the number of device with those events, not the number of events!</li>
  24442. <li><b>ERR__protoNames:</b> Error:name-list of devices with non-recoverable protocol events</li>
  24443. <li><b>I_HM_IOdevices:</b> Info:list of IO devices used by CUL_HM entities</li>
  24444. <li><b>I_actTotal:</b> Info:action detector state, count of devices with ceratin states</li>
  24445. <li><b>ERRactNames:</b> Error:names of devices that are not alive according to ActionDetector</li>
  24446. <li><b>C_sumDefined:</b> Count:defined entities in CUL_HM. Entites might be count as
  24447. device AND channel if channel funtion is covered by the device itself. Similar to virtual</li>
  24448. <li><b>ERR_&lt;reading&gt;:</b> Error:count of readings as defined in attribut
  24449. <a href="#HMinfosumERROR">sumERROR</a>
  24450. that do not match the good-content. </li>
  24451. <li><b>ERR_names:</b> Error:name-list of entities that are counted in any ERR_&lt;reading&gt;
  24452. W_sum_&lt;reading&gt;: count of readings as defined in attribut
  24453. <a href="#HMinfosumStatus">sumStatus</a>. </li>
  24454. Example:<br>
  24455. <ul><code>
  24456. ERR___rssiCrit LightKittchen,WindowDoor,Remote12<br>
  24457. ERR__protocol NACK:2 ResendFail:5 CmdDel:2 CmdPend:1<br>
  24458. ERR__protoNames LightKittchen,WindowDoor,Remote12,Ligth1,Light5<br>
  24459. ERR_battery: low:2;<br>
  24460. ERR_names: remote1,buttonClara,<br>
  24461. I_rssiMinLevel 99&gt;:3 80&lt;:0 60&lt;:7 59&lt;:4<br>
  24462. W_sum_battery: ok:5;low:2;<br>
  24463. W_sum_overheat: off:7;<br>
  24464. C_sumDefined: entities:23 device:11 channel:16 virtual:5;<br>
  24465. </code></ul>
  24466. </ul>
  24467. </ul>
  24468. <a name="HMtemplate"></a><h3>HMtemplate</h3>
  24469. <ul>
  24470. Edit templates for HM entities. Programming register of HM devices can be bundled to templates and then being assigned to the devices. The editor might be instantiated ony once. Templates will be organized, handled and loaded in HMinfo. <br>
  24471. The editor allowes to define, edit, copy and assign and delete templates.
  24472. <br>
  24473. Required: HMinfo needs to be instantiated.
  24474. <a name="HMtemplate"></a><b>Set</b>
  24475. <ul>
  24476. following commands are available:
  24477. <ul>
  24478. <li><B>defTmpl &lt;name&gt;</B><a name="HMtemplate_defTmpl"></a><br>
  24479. Define a new template. Procedure is given in internals once the command is issued.<br>
  24480. <li><B><a href="#HMtemplate_tpl_type">tpl_type</a></B>choose whether the template will be:
  24481. <ul>
  24482. <li><B>basic</B> not peer related register only</li>
  24483. <li><B>peer-both</B> only peer related register, setting short and long press reaction in one template</li>
  24484. <li><B>peer-Short</B> only peer related register, will define one short or long press behavior</li>
  24485. <li><B>peer-Long</B> only peer related register, will define one short or long press behavior</li>
  24486. </ul>
  24487. </li>
  24488. <li><B><a href="#HMtemplate_tpl_source">tpl_source</a></B>select the entity which will be used as master for the template
  24489. </li>
  24490. <li><B><a href="#HMtemplate_tpl_peer">tpl_peer</a></B>select the peer of the entity which will be used as master for the template. This is only necessary for types that require peers.
  24491. </li>
  24492. <li><B><a href="#HMtemplate_tpl_params">tpl_params</a></B>if the template shall have parameter those need to be defined next. <br>
  24493. parameter will allow to use one template with selected registers to be defined upon appling to the entity.
  24494. </li>
  24495. <li><B><a href="#HMtemplate_tpl_description">tpl_description</a></B>enter a free text to describe what the entity is about
  24496. </li>
  24497. <li><B><a href="#HMtemplate_tpl_Reg">tpl_Reg</a></B>a list of attributes will be available after all attribtes above are set. Not edit them. Delete registers which are not used for the template, edit the values as desired.
  24498. </li>
  24499. <li><B><a href="#HMtemplate_save">save</a></B>save the template. After that the template is defined. saveas will allow to define the template with a different name.
  24500. </li>
  24501. </li>
  24502. <li><B>delete &lt;name&gt;</B><a name="HMtemplate_delete"></a><br>
  24503. Delete an existing template<br>
  24504. </li>
  24505. <li><B>edit &lt;name&gt;</B><a name="HMtemplate_edit"></a><br>
  24506. Edit an existing template. Change register, parameter and description by change the attributes. See also defTmpl<br>
  24507. saveAs can be used to create a copy of the template.<br>
  24508. </li>
  24509. <li><B>select &lt;name&gt;</B><a name="HMtemplate_select"></a><br>
  24510. Apply an existing template to a entity<br>
  24511. Once the command is issued it is necessary to select the entity, peer and short/long which the entity shall be applied to.<br>
  24512. If the template has parameter the value needs to be set. <br>
  24513. Finally <B>apply</B> the template to teh entity.
  24514. </li>
  24515. <li><B>dismiss</B><a name="HMtemplate_dismiss"></a><br>
  24516. reset HMtemplate and come back to init status
  24517. </li>
  24518. <li><B>save, saveAs</B><a name="HMtemplate_save"></a><br>
  24519. save a template once it is defined
  24520. </li>
  24521. </ul>
  24522. </ul>
  24523. </ul>
  24524. <a name="HOMBOT"></a>
  24525. <h3>HOMBOT</h3>
  24526. <ul>
  24527. <u><b>HOMBOT - LG Homebot robotic vacuum cleaner</b></u>
  24528. <br>
  24529. After successfully hacking (WiFi-Mod) your Hombot, this Modul enables you to integrate your Hombot to FHEM.
  24530. The Connection-Interface between FHEM and Hombot is served by Luigi HTTP Server.
  24531. With this Module, the following is possible:
  24532. <ul>
  24533. <li>Readings about the Status will be saved.</li>
  24534. <li>Choice of cleaning mode</li>
  24535. <li>Start cleaning</li>
  24536. <li>Stop cleaning</li>
  24537. <li>Return to Homebase</li>
  24538. <li>Assign Nickname</li>
  24539. <li>Schedule Weekprogram</li>
  24540. <li>Activate 'Repeat' and 'Turbo'</li>
  24541. </ul>
  24542. <br>
  24543. You need to set up the device for the Hombot like this.
  24544. <br><br>
  24545. <a name="HOMBOTdefine"></a>
  24546. <b>Define</b>
  24547. <ul><br>
  24548. <code>define &lt;name&gt; HOMBOT &lt;IP-ADRESS&gt;</code>
  24549. <br><br>
  24550. Example:
  24551. <ul><br>
  24552. <code>define Roberta HOMBOT 192.168.0.23</code><br>
  24553. </ul>
  24554. <br>
  24555. This command creates a HOMBOT-Device in room HOMBOT. The parameter &lt;IP-ADRESS&gt; determines the IP-Address of your Hombot.<br>
  24556. The standard query interval is 180 seconds. You can change it with attribute interval. The interval is dynamic in dependency of the workstatus. For example, the status WORKING is 30 seconds.
  24557. <br>
  24558. </ul>
  24559. <br><br>
  24560. <b><u>The first Readings should already appear after setting up the Device entity. </u></b>
  24561. <br><br><br>
  24562. <a name="HOMBOTreadings"></a>
  24563. <b>Readings</b>
  24564. <ul>
  24565. <li>at_* - Reading for the week schedule. Start time for respective day.</li>
  24566. <li>batteryPercent - Battery status in percent %</li>
  24567. <li>cleanMode - Current cleanmode</li>
  24568. <li>cpu_* - Information about CPU load</li>
  24569. <li>currentBumping - Count of collisions with obstacles</li>
  24570. <li>firmware - current installed firmware version</li>
  24571. <li>hombotState - Status of Hombot</li>
  24572. <li>lastClean - Date and Time of last cleaning</li>
  24573. <li>lastSetCommandError - last error message from set command</li>
  24574. <li>lastSetCommandState - last status from set command. Command (un)successfully send</li>
  24575. <li>lastStatusRequestError - last error message from statusRequest command</li>
  24576. <li>lastStatusRequestState - last status from statusRequest command. Command (un)successfully send</li>
  24577. <li>luigiSrvVersion - Version of Luigi HTTP Servers of Hombot</li>
  24578. <li>nickname - Name of Hombot</li>
  24579. <li>num* - Previous started and ended cleanings in corresponding modes</li>
  24580. <li>repeat - Cleaning will repeated Yes/No</li>
  24581. <li>state - Module status</li>
  24582. <li>turbo - Turbo active Yes/No</li>
  24583. </ul>
  24584. <br><br>
  24585. <a name="HOMBOTset"></a>
  24586. <b>Set</b>
  24587. <ul>
  24588. <li>cleanMode - set cleaning mode (ZZ-ZigZag / SB-Cell by Cell / SPOT-Spiralcleaning</li>
  24589. <li>cleanStart - Start cleaning</li>
  24590. <li>homing - Stop cleaning and move Hombot back to Base</li>
  24591. <li>nickname - Sets HomBot's Nickname. Not visible in Reading until restart of Luigi-Server or HomBot itself.</li>
  24592. <li>pause - Will pause the cleaning process</li>
  24593. <li>repeat - Repeat cleaning? (true/false)</li>
  24594. <li>schedule - Set of Week schedule. For example, set Roberta schedule Mo=13:30 Di= Mi=14:00,ZZ Do=15:20 Fr= Sa=11:20 So= therefore you can also add modes!</li>
  24595. <li>statusRequest - Requests new Statusreport from Device</li>
  24596. <li>turbo - Activation of Turbomode (true/false)</li>
  24597. </ul>
  24598. <br><br>
  24599. </ul>
  24600. <a name="HOMEMODE"></a>
  24601. <h3>HOMEMODE</h3>
  24602. <ul>
  24603. <i>HOMEMODE</i> is designed to represent the overall home state(s) in one device.<br>
  24604. It uses the attribute userattr extensively.<br>
  24605. It has been optimized for usage with homebridge as GUI.<br>
  24606. You can also configure CMDs to be executed on specific events.<br>
  24607. There is no need to create notify(s) or DOIF(s) to achieve common tasks depending on the home state(s).<br>
  24608. It's also possible to control ROOMMATE/GUEST devices states depending on their associated presence device.<br>
  24609. If the RESIDENTS device is on state home, the HOMEMODE device can automatically change its mode depending on the local time (morning,day,afternoon,evening,night)<br>
  24610. There is also a daytime reading and associated HomeCMD attributes that will execute the HOMEMODE state CMDs independend of the presence of any RESIDENT.<br>
  24611. A lot of placeholders are available for usage within the HomeCMD or HomeText attributes (see Placeholders).<br>
  24612. All your energy and power measuring sensors can be added and calculated total readings for energy and power will be created.<br>
  24613. You can also add your local outside temperature and humidity sensors and you'll get ice warning e.g.<br>
  24614. If you also add your Yahoo weather device you'll also get short and long weather informations and weather forecast.<br>
  24615. You can monitor added contact and motion sensors and execute CMDs depending on their state.<br>
  24616. A simple alarm system is included, so your contact and motion sensors can trigger alarms depending on the current alarm mode.<br>
  24617. A lot of customizations are possible, e.g. special event (holiday) calendars and locations.<br>
  24618. <p><b>General information:</b></p>
  24619. <ul>
  24620. <li>
  24621. The HOMEMODE device is refreshing itselfs every 5 seconds by calling HOMEMODE_GetUpdate and subfunctions.<br>
  24622. This is the reason why some automations (e.g. daytime or season) are delayed up to 4 seconds.<br>
  24623. All automations triggered by external events (other devices monitored by HOMEMODE) and the execution of the HomeCMD attributes will not be delayed.
  24624. </li>
  24625. <li>
  24626. Each created timer will be created as at device and its name will start with "atTmp_" and end with "_&lt;name of your HOMEMODE device&gt;". You may list them with "list TYPE=at:FILTER=NAME=atTmp_.*_&lt;name of your HOMEMODE device&gt;".
  24627. </li>
  24628. <li>
  24629. Seasons can also be adjusted (date and text) in attribute HomeSeasons
  24630. </li>
  24631. <li>
  24632. There's a special function, which you may use, which is converting given minutes (up to 5999.99) to a timestamp that can be used for creating at devices.<br>
  24633. This function is called HOMEMODE_hourMaker and the only value you need to pass is the number in minutes with max. 2 digits after the dot.
  24634. </li>
  24635. <li>
  24636. Each set command and each updated reading of the HOMEMODE device will create an event within FHEM, so you're able to create additional notify or DOIF devices if needed.
  24637. </li>
  24638. </ul>
  24639. <br>
  24640. <a name="HOMEMODE_define"></a>
  24641. <p><b>define [optional]</b></p>
  24642. <ul>
  24643. <code>define &lt;name&gt; HOMEMODE</code><br><br>
  24644. <code>define &lt;name&gt; HOMEMODE [RESIDENTS-MASTER-DEVICE]</code><br>
  24645. </ul>
  24646. <br>
  24647. <a name="HOMEMODE_set"></a>
  24648. <p><b>set &lt;required&gt;</b></p>
  24649. <ul>
  24650. <li>
  24651. <b><i>anyoneElseAtHome &lt;on/off&gt;</i></b><br>
  24652. turn this on if anyone else is alone at home who is not a registered resident<br>
  24653. e.g. an animal or unregistered guest<br>
  24654. if turned on the alarm mode will be set to armhome instead of armaway while leaving, if turned on after leaving the alarm mode will change from armaway to armhome, e.g. to disable motion sensors alerts<br>
  24655. placeholder %AEAH% is available in all HomeCMD attributes
  24656. </li>
  24657. <li>
  24658. <b><i>dnd &lt;on/off&gt;</i></b><br>
  24659. turn "do not disturb" mode off or on<br>
  24660. e.g. to disable notification or alarms or, or, or...<br>
  24661. placeholder %DND% is available in all HomeCMD attributes
  24662. </li>
  24663. <li>
  24664. <b><i>dnd-for-minutes &lt;MINUTES&gt;</i></b><br>
  24665. turn "do not disturb" mode on for given minutes<br>
  24666. will return to the current (daytime) mode
  24667. </li>
  24668. <li>
  24669. <b><i>location &lt;arrival/home/bed/underway/wayhome&gt;</i></b><br>
  24670. switch to given location manually<br>
  24671. placeholder %LOCATION% is available in all HomeCMD attributes
  24672. </li>
  24673. <li>
  24674. <b><i>mode &lt;morning/day/afternoon/evening/night/gotosleep/asleep/absent/gone/home&gt;</i></b><br>
  24675. switch to given mode manually<br>
  24676. placeholder %MODE% is available in all HomeCMD attributes
  24677. </li>
  24678. <li>
  24679. <b><i>modeAlarm &lt;armaway/armhome/armnight/disarm&gt;</i></b><br>
  24680. switch to given alarm mode manually<br>
  24681. placeholder %AMODE% is available in all HomeCMD attributes
  24682. </li>
  24683. <li>
  24684. <b><i>modeAlarm-for-minutes &lt;armaway/armhome/armnight/disarm&gt; &lt;MINUTES&gt;</i></b><br>
  24685. switch to given alarm mode for given minutes<br>
  24686. will return to the previous alarm mode
  24687. </li>
  24688. <li>
  24689. <b><i>updateHomebridgeMapping</i></b><br>
  24690. will update the attribute homebridgeMapping of the HOMEMODE device depending on the available informations
  24691. </li>
  24692. <li>
  24693. <b><i>updateInternalForce</i></b><br>
  24694. will force update all internals of the HOMEMODE device<br>
  24695. use this if you just reload this module after an update or if you made changes on any HOMEMODE monitored device, e.g. after adding residents/guest or after adding new sensors with the same devspec as before
  24696. </li>
  24697. </ul>
  24698. <br>
  24699. <a name="HOMEMODE_get"></a>
  24700. <p><b>get &lt;required&gt; [optional]</b></p>
  24701. <ul>
  24702. <li>
  24703. <b><i>contactsOpen &lt;all/doorsinside/doorsoutside/doorsmain/outside/windows&gt;</i></b><br>
  24704. get a list of all/doorsinside/doorsoutside/doorsmain/outside/windows open contacts<br>
  24705. placeholders %OPEN% (open contacts outside) and %OPENCT% (open contacts outside count) are available in all HomeCMD attributes
  24706. </li>
  24707. <li>
  24708. <b><i>publicIP</i></b><br>
  24709. get the public IP address<br>
  24710. placeholder %IP% is available in all HomeCMD attributes
  24711. </li>
  24712. <li>
  24713. <b><i>sensorsTampered</i></b><br>
  24714. get a list of all tampered sensors<br>
  24715. placeholder %TAMPERED% is available in all HomeCMD attributes
  24716. </li>
  24717. <li>
  24718. <b><i>weather &lt;long/short&gt;</i></b><br>
  24719. get weather information in given format<br>
  24720. please specify the outputs in attributes HomeTextWeatherLong and HomeTextWeatherShort<br>
  24721. placeholders %WEATHER% and %WEATHERLONG% are available in all HomeCMD attributes
  24722. </li>
  24723. <li>
  24724. <b><i>weatherForecast [DAY]</i></b><br>
  24725. get weather forecast for given day<br>
  24726. if DAY is omitted the forecast for tomorrow (2) will be returned<br>
  24727. please specify the outputs in attributes HomeTextWeatherForecastToday, HomeTextWeatherForecastTomorrow and HomeTextWeatherForecastInSpecDays<br>
  24728. placeholders %FORECAST% (tomorrow) and %FORECASTTODAY% (today) are available in all HomeCMD attributes
  24729. </li>
  24730. </ul>
  24731. <br>
  24732. <a name="HOMEMODE_attr"></a>
  24733. <p><b>Attributes</b></p>
  24734. <ul>
  24735. <li>
  24736. <b><i>HomeAdvancedDetails</i></b><br>
  24737. show more details depending on the monitored devices<br>
  24738. value detail will only show advanced details in detail view, value both will show advanced details also in room view, room will show advanced details only in room view<br>
  24739. values: none, detail, both, room<br>
  24740. default: none
  24741. </li>
  24742. <li>
  24743. <b><i>HomeAdvancedUserAttr</i></b><br>
  24744. more HomeCMD userattr will be provided<br>
  24745. additional attributes for each resident and each calendar event<br>
  24746. values: 0 or 1<br>
  24747. default: 0
  24748. </li>
  24749. <li>
  24750. <b><i>HomeAutoAlarmModes</i></b><br>
  24751. set modeAlarm automatically depending on mode<br>
  24752. if mode is set to "home", modeAlarm will be set to "disarm"<br>
  24753. if mode is set to "absent", modeAlarm will be set to "armaway"<br>
  24754. if mode is set to "asleep", modeAlarm will be set to "armnight"<br>
  24755. modeAlarm "home" can only be set manually<br>
  24756. values 0 or 1, value 0 disables automatically set modeAlarm<br>
  24757. default: 1
  24758. </li>
  24759. <li>
  24760. <b><i>HomeAutoArrival</i></b><br>
  24761. set resident's location to arrival (on arrival) and after given minutes to home<br>
  24762. values from 0 to 5999.9 in minutes, value 0 disables automatically set arrival<br>
  24763. default: 0
  24764. </li>
  24765. <li>
  24766. <b><i>HomeAutoAsleep</i></b><br>
  24767. set user from gotosleep to asleep after given minutes<br>
  24768. values from 0 to 5999.9 in minutes, value 0 disables automatically set asleep<br>
  24769. default: 0
  24770. </li>
  24771. <li>
  24772. <b><i>HomeAutoAwoken</i></b><br>
  24773. force set resident from asleep to awoken, even if changing from alseep to home<br>
  24774. after given minutes awoken will change to home<br>
  24775. values from 0 to 5999.9 in minutes, value 0 disables automatically set awoken after asleep<br>
  24776. default: 0
  24777. </li>
  24778. <li>
  24779. <b><i>HomeAutoDaytime</i></b><br>
  24780. daytime depending home mode<br>
  24781. values 0 or 1, value 0 disables automatically set daytime<br>
  24782. default: 1
  24783. </li>
  24784. <li>
  24785. <b><i>HomeAutoPresence</i></b><br>
  24786. automatically change the state of residents between home and absent depending on their associated presence device<br>
  24787. values 0 or 1, value 0 disables auto presence<br>
  24788. default: 0
  24789. </li>
  24790. <li>
  24791. <b><i>HomeCMDalarmTampered-off</i></b><br>
  24792. cmds to execute if all tamper alarms are fixed
  24793. </li>
  24794. <li>
  24795. <b><i>HomeCMDalarmTampered-on</i></b><br>
  24796. cmds to execute on tamper alarm of any device
  24797. </li>
  24798. <li>
  24799. <b><i>HomeCMDalarmTriggered-off</i></b><br>
  24800. cmds to execute if all alarms are fixed
  24801. </li>
  24802. <li>
  24803. <b><i>HomeCMDalarmTriggered-on</i></b><br>
  24804. cmds to execute on alarm of any device
  24805. </li>
  24806. <li>
  24807. <b><i>HomeCMDanyoneElseAtHome-off</i></b><br>
  24808. cmds to execute if anyoneElseAtHome is set to off
  24809. </li>
  24810. <li>
  24811. <b><i>HomeCMDanyoneElseAtHome-on</i></b><br>
  24812. cmds to execute if anyoneElseAtHome is set to on
  24813. </li>
  24814. <li>
  24815. <b><i>HomeCMDcontact</i></b><br>
  24816. cmds to execute if any contact has been triggered (open/tilted/closed)
  24817. </li>
  24818. <li>
  24819. <b><i>HomeCMDbatteryLow</i></b><br>
  24820. cmds to execute if any battery sensor has low battery
  24821. </li>
  24822. <li>
  24823. <b><i>HomeCMDcontactClosed</i></b><br>
  24824. cmds to execute if any contact has been closed
  24825. </li>
  24826. <li>
  24827. <b><i>HomeCMDcontactOpen</i></b><br>
  24828. cmds to execute if any contact has been opened
  24829. </li>
  24830. <li>
  24831. <b><i>HomeCMDcontactDoormain</i></b><br>
  24832. cmds to execute if any contact of type doormain has been triggered (open/tilted/closed)
  24833. </li>
  24834. <li>
  24835. <b><i>HomeCMDcontactDoormainClosed</i></b><br>
  24836. cmds to execute if any contact of type doormain has been closed
  24837. </li>
  24838. <li>
  24839. <b><i>HomeCMDcontactDoormainOpen</i></b><br>
  24840. cmds to execute if any contact of type doormain has been opened
  24841. </li>
  24842. <li>
  24843. <b><i>HomeCMDcontactOpenWarning1</i></b><br>
  24844. cmds to execute on first contact open warning
  24845. </li>
  24846. <li>
  24847. <b><i>HomeCMDcontactOpenWarning2</i></b><br>
  24848. cmds to execute on second (and more) contact open warning
  24849. </li>
  24850. <li>
  24851. <b><i>HomeCMDcontactOpenWarningLast</i></b><br>
  24852. cmds to execute on last contact open warning
  24853. </li>
  24854. <li>
  24855. <b><i>HomeCMDdaytime</i></b><br>
  24856. cmds to execute on any daytime change
  24857. </li>
  24858. <li>
  24859. <b><i>HomeCMDdaytime-&lt;%DAYTIME%&gt;</i></b><br>
  24860. cmds to execute on specific day time change
  24861. </li>
  24862. <li>
  24863. <b><i>HomeCMDdnd-&lt;off/on&gt;</i></b><br>
  24864. cmds to execute on if dnd is turned off/on
  24865. </li>
  24866. <li>
  24867. <b><i>HomeCMDevent</i></b><br>
  24868. cmds to execute on each calendar event
  24869. </li>
  24870. <li>
  24871. <b><i>HomeCMDevent-&lt;%CALENDAR%&gt;-each</i></b><br>
  24872. cmds to execute on each event of the calendar
  24873. </li>
  24874. <li>
  24875. <b><i>HomeCMDevent-&lt;%CALENDAR%&gt;-&lt;%EVENT%&gt;-begin</i></b><br>
  24876. cmds to execute on start of a specific calendar event
  24877. </li>
  24878. <li>
  24879. <b><i>HomeCMDevent-&lt;%CALENDAR%&gt;-&lt;%EVENT%&gt;-end</i></b><br>
  24880. cmds to execute on end of a specific calendar event
  24881. </li>
  24882. <li>
  24883. <b><i>HomeCMDfhemINITIALIZED</i></b><br>
  24884. cmds to execute on fhem (re)start
  24885. </li>
  24886. <li>
  24887. <b><i>HomeCMDicewarning-&lt;off/on&gt;</i></b><br>
  24888. cmds to execute on if ice warning is turned off/on
  24889. </li>
  24890. <li>
  24891. <b><i>HomeCMDlocation</i></b><br>
  24892. cmds to execute on any location change of the HOMEMODE device
  24893. </li>
  24894. <li>
  24895. <b><i>HomeCMDlocation-&lt;%LOCATION%&gt;</i></b><br>
  24896. cmds to execute on specific location change of the HOMEMODE device
  24897. </li>
  24898. <li>
  24899. <b><i>HomeCMDmode</i></b><br>
  24900. cmds to execute on any mode change of the HOMEMODE device
  24901. </li>
  24902. <li>
  24903. <b><i>HomeCMDmode-absent-belated</i></b><br>
  24904. cmds to execute belated to absent<br>
  24905. belated time can be adjusted with attribute "HomeModeAbsentBelatedTime"
  24906. </li>
  24907. <li>
  24908. <b><i>HomeCMDmode-&lt;%MODE%&gt;</i></b><br>
  24909. cmds to execute on specific mode change of the HOMEMODE device
  24910. </li>
  24911. <li>
  24912. <b><i>HomeCMDmode-&lt;%MODE%&gt;-resident</i></b><br>
  24913. cmds to execute on specific mode change of the HOMEMODE device triggered by any resident
  24914. </li>
  24915. <li>
  24916. <b><i>HomeCMDmode-&lt;%MODE%&gt;-&lt;%RESIDENT%&gt;</i></b><br>
  24917. cmds to execute on specific mode change of the HOMEMODE device triggered by a specific resident
  24918. </li>
  24919. <li>
  24920. <b><i>HomeCMDmodeAlarm</i></b><br>
  24921. cmds to execute on any alarm mode change
  24922. </li>
  24923. <li>
  24924. <b><i>HomeCMDmodeAlarm-&lt;armaway/armhome/armnight/disarm&gt;</i></b><br>
  24925. cmds to execute on specific alarm mode change
  24926. </li>
  24927. <li>
  24928. <b><i>HomeCMDmotion</i></b><br>
  24929. cmds to execute on any recognized motion of any motion sensor
  24930. </li>
  24931. <li>
  24932. <b><i>HomeCMDmotion-&lt;off/on&gt;</i></b><br>
  24933. cmds to execute if any recognized motion of any motion sensor ends/starts
  24934. </li>
  24935. <li>
  24936. <b><i>HomeCMDpresence-&lt;absent/present&gt;</i></b><br>
  24937. cmds to execute on specific presence change of the HOMEMODE device
  24938. </li>
  24939. <li>
  24940. <b><i>HomeCMDpresence-&lt;absent/present&gt;-device</i></b><br>
  24941. cmds to execute on specific presence change of any presence device
  24942. </li>
  24943. <li>
  24944. <b><i>HomeCMDpresence-&lt;absent/present&gt;-resident</i></b><br>
  24945. cmds to execute on specific presence change of a specific resident
  24946. </li>
  24947. <li>
  24948. <b><i>HomeCMDpresence-&lt;absent/present&gt;-&lt;%RESIDENT%&gt;</i></b><br>
  24949. cmds to execute on specific presence change of a specific resident
  24950. </li>
  24951. <li>
  24952. <b><i>HomeCMDpresence-&lt;absent/present&gt;-&lt;%RESIDENT%&gt;-&lt;%DEVICE%&gt;</i></b><br>
  24953. cmds to execute on specific presence change of a specific resident's presence device<br>
  24954. only available if more than one presence device is available for a resident
  24955. </li>
  24956. <li>
  24957. <b><i>HomeCMDseason</i></b><br>
  24958. cmds to execute on any season change
  24959. </li>
  24960. <li>
  24961. <b><i>HomeCMDseason-&lt;%SEASON%&gt;</i></b><br>
  24962. cmds to execute on specific season change
  24963. </li>
  24964. <li>
  24965. <b><i>HomeCMDuwz-warn-&lt;begin/end&gt;</i></b><br>
  24966. cmds to execute on UWZ warning begin/end
  24967. </li>
  24968. <li>
  24969. <b><i>HomeDaytimes</i></b><br>
  24970. space separated list of time|text pairs for possible daytimes starting with the first event of the day (lowest time)<br>
  24971. default: 05:00|morning 10:00|day 14:00|afternoon 18:00|evening 23:00|night
  24972. </li>
  24973. <li>
  24974. <b><i>HomeEventsHolidayDevices</i></b><br>
  24975. devspec of holiday calendars
  24976. </li>
  24977. <li>
  24978. <b><i>HomeIcewarningOnOffTemps</i></b><br>
  24979. 2 space separated temperatures for ice warning on and off<br>
  24980. default: 2 3
  24981. </li>
  24982. <li>
  24983. <b><i>HomeLanguage</i></b><br>
  24984. overwrite language from gloabl device<br>
  24985. default: EN (language setting from global device)
  24986. </li>
  24987. <li>
  24988. <b><i>HomeModeAbsentBelatedTime</i></b><br>
  24989. time in minutes after changing to absent to execute "HomeCMDmode-absent-belated"<br>
  24990. if mode changes back (to home e.g.) in this time frame "HomeCMDmode-absent-belated" will not be executed<br>
  24991. default:
  24992. </li>
  24993. <li>
  24994. <b><i>HomeModeAlarmArmDelay</i></b><br>
  24995. time in seconds for delaying modeAlarm arm... commands<br>
  24996. must be a single number (valid for all modeAlarm arm... commands) or 3 space separated numbers for each modeAlarm arm... command individually (order: armaway armnight armhome)<br>
  24997. values from 0 to 99999<br>
  24998. default: 0
  24999. </li>
  25000. <li>
  25001. <b><i>HomePresenceDeviceAbsentCount-&lt;%RESIDENT%&gt;</i></b><br>
  25002. number of resident associated presence device to turn resident to absent<br>
  25003. default: maximum number of available presence device for each resident
  25004. </li>
  25005. <li>
  25006. <b><i>HomePresenceDevicePresentCount-&lt;%RESIDENT%&gt;</i></b><br>
  25007. number of resident associated presence device to turn resident to home<br>
  25008. default: 1
  25009. </li>
  25010. <li>
  25011. <b><i>HomePresenceDeviceType</i></b><br>
  25012. comma separated list of presence device types<br>
  25013. default: PRESENCE
  25014. </li>
  25015. <li>
  25016. <b><i>HomePublicIpCheckInterval</i></b><br>
  25017. numbers from 1-99999 for interval in minutes for public IP check<br>
  25018. default: 0 (disabled)
  25019. </li>
  25020. <li>
  25021. <b><i>HomeResidentCmdDelay</i></b><br>
  25022. time in seconds to delay the execution of specific residents commands after the change of the residents master device<br>
  25023. normally the resident events occur before the HOMEMODE events, to restore this behavior set this value to 0<br>
  25024. default: 1 (second)
  25025. </li>
  25026. <li>
  25027. <b><i>HomeSeasons</i></b><br>
  25028. space separated list of date|text pairs for possible seasons starting with the first season of the year (lowest date)<br>
  25029. default: 01.01|spring 06.01|summer 09.01|autumn 12.01|winter
  25030. </li>
  25031. <li>
  25032. <b><i>HomeSensorAirpressure</i></b><br>
  25033. main outside airpressure sensor
  25034. </li>
  25035. <li>
  25036. <b><i>HomeSensorWindspeed</i></b><br>
  25037. main outside wind speed sensor
  25038. </li>
  25039. <li>
  25040. <b><i>HomeSensorsBattery</i></b><br>
  25041. devspec of battery sensors with a battery reading<br>
  25042. all sensors with a percentage battery value or a ok/low/nok battery value are applicable
  25043. </li>
  25044. <li>
  25045. <b><i>HomeSensorsBatteryLowPercentage</i></b><br>
  25046. percentage to recognize a sensors battery as low (only percentage based sensors)<br>
  25047. default: 50
  25048. </li>
  25049. <li>
  25050. <b><i>HomeSensorsBatteryReading</i></b><br>
  25051. a single word for the battery reading<br>
  25052. this is only here available as global setting for all devices<br>
  25053. default: battery
  25054. </li>
  25055. <li>
  25056. <b><i>HomeSensorsContact</i></b><br>
  25057. devspec of contact sensors<br>
  25058. each applied contact sensor will get the following attributes, attributes will be removed after removing the contact sensors from the HOMEMODE device.<br>
  25059. <ul>
  25060. <li>
  25061. <b><i>HomeContactType</i></b><br>
  25062. specify each contacts sensor's type, choose one of: doorinside, dooroutside, doormain, window<br>
  25063. while applying contact sensors to the HOMEMODE device, the value of this attribute will be guessed by device name or device alias
  25064. </li>
  25065. <li>
  25066. <b><i>HomeModeAlarmActive</i></b><br>
  25067. specify the alarm mode(s) by regex in which the contact sensor should trigger open/tilted as alerts<br>
  25068. while applying contact sensors to the HOMEMODE device, the value of this attribute will be set to armaway by default<br>
  25069. choose one or a combination of: armaway|armhome|armnight<br>
  25070. default: armaway
  25071. </li>
  25072. <li>
  25073. <b><i>HomeOpenDontTriggerModes</i></b><br>
  25074. specify the HOMEMODE mode(s)/state(s) by regex in which the contact sensor should not trigger open warnings<br>
  25075. choose one or a combination of all available modes of the HOMEMODE device<br>
  25076. if you don't want open warnings while sleeping a good choice would be: gotosleep|asleep<br>
  25077. default:
  25078. </li>
  25079. <li>
  25080. <b><i>HomeOpenDontTriggerModesResidents</i></b><br>
  25081. comma separated list of residents whose state should be the reference for HomeOpenDontTriggerModes instead of the mode of the HOMEMODE device<br>
  25082. if one of the listed residents is in the state given by attribute HomeOpenDontTriggerModes, open warnings will not be triggered for this contact sensor<br>
  25083. default:
  25084. </li>
  25085. <li>
  25086. <b><i>HomeOpenMaxTrigger</i></b><br>
  25087. maximum number how often open warning should be triggered<br>
  25088. default: 0
  25089. </li>
  25090. <li>
  25091. <b><i>HomeReadings</i></b><br>
  25092. 2 space separated readings for contact sensors open state and tamper alert<br>
  25093. this is the device setting which will override the global setting from attribute HomeSensorsContactReadings from the HOMEMODE device<br>
  25094. default: state sabotageError
  25095. </li>
  25096. <li>
  25097. <b><i>HomeValues</i></b><br>
  25098. regex of open, tilted and tamper values for contact sensors<br>
  25099. this is the device setting which will override the global setting from attribute HomeSensorsContactValues from the HOMEMODE device<br>
  25100. default: open|tilted|on
  25101. </li>
  25102. <li>
  25103. <b><i>HomeOpenTimes</i></b><br>
  25104. space separated list of minutes after open warning should be triggered<br>
  25105. first value is for first warning, second value is for second warning, ...<br>
  25106. if less values are available than the number given by HomeOpenMaxTrigger, the very last available list entry will be used<br>
  25107. this is the device setting which will override the global setting from attribute HomeSensorsContactOpenTimes from the HOMEMODE device<br>
  25108. default: 10
  25109. </li>
  25110. <li>
  25111. <b><i>HomeOpenTimesDividers</i></b><br>
  25112. space separated list of trigger time dividers for contact sensor open warnings depending on the season of the HOMEMODE device.<br>
  25113. dividers in same order and same number as seasons in attribute HomeSeasons<br>
  25114. dividers are not used for contact sensors of type doormain and doorinside!<br>
  25115. this is the device setting which will override the global setting from attribute HomeSensorsContactOpenTimeDividers from the HOMEMODE device<br>
  25116. values from 0.001 to 99.999<br>
  25117. default:
  25118. </li>
  25119. </ul>
  25120. </li>
  25121. <li>
  25122. <b><i>HomeSensorsContactReadings</i></b><br>
  25123. 2 space separated readings for contact sensors open state and tamper alert<br>
  25124. this is the global setting, you can also set these readings in each contact sensor individually in attribute HomeReadings once they are added to the HOMEMODE device<br>
  25125. default: state sabotageError
  25126. </li>
  25127. <li>
  25128. <b><i>HomeSensorsContactValues</i></b><br>
  25129. regex of open, tilted and tamper values for contact sensors<br>
  25130. this is the global setting, you can also set these values in each contact sensor individually in attribute HomeValues once they are added to the HOMEMODE device<br>
  25131. default: open|tilted|on
  25132. </li>
  25133. <li>
  25134. <b><i>HomeSensorsContactOpenTimeDividers</i></b><br>
  25135. space separated list of trigger time dividers for contact sensor open warnings depending on the season of the HOMEMODE device.<br>
  25136. dividers in same order and same number as seasons in attribute HomeSeasons<br>
  25137. dividers are not used for contact sensors of type doormain and doorinside!<br>
  25138. this is the global setting, you can also set these dividers in each contact sensor individually in attribute HomeOpenTimesDividers once they are added to the HOMEMODE device<br>
  25139. values from 0.001 to 99.999<br>
  25140. default:
  25141. </li>
  25142. <li>
  25143. <b><i>HomeSensorsContactOpenTimeMin</i></b><br>
  25144. minimal open time for contact sensors open wanings<br>
  25145. default:
  25146. </li>
  25147. <li>
  25148. <b><i>HomeSensorsContactOpenTimes</i></b><br>
  25149. space separated list of minutes after open warning should be triggered<br>
  25150. first value is for first warning, second value is for second warning, ...<br>
  25151. if less values are available than the number given by HomeOpenMaxTrigger, the very last available list entry will be used<br>
  25152. this is the global setting, you can also set these times(s) in each contact sensor individually in attribute HomeOpenTimes once they are added to the HOMEMODE device<br>
  25153. default: 10
  25154. </li>
  25155. <li>
  25156. <b><i>HomeSensorHumidityOutside</i></b><br>
  25157. main outside humidity sensor<br>
  25158. if HomeSensorTemperatureOutside also has a humidity reading, you don't need to add the same sensor here
  25159. </li>
  25160. <li>
  25161. <b><i>HomeSensorTemperatureOutside</i></b><br>
  25162. main outside temperature sensor<br>
  25163. if this sensor also has a humidity reading, you don't need to add the same sensor to HomeSensorHumidityOutside
  25164. </li>
  25165. <li>
  25166. <b><i>HomeSensorsLuminance</i></b><br>
  25167. devspec of sensors with luminance measurement capabilities<br>
  25168. these devices will be used for total luminance calculations<br>
  25169. please set the corresponding reading for luminance in attribute HomeSensorsLuminanceReading (if different to luminance) before applying snesors here
  25170. </li>
  25171. <li>
  25172. <b><i>HomeSensorsLuminanceReading</i></b><br>
  25173. a single word for the luminance reading<br>
  25174. this is only here available as global setting for all devices<br>
  25175. default: luminance
  25176. </li>
  25177. <li>
  25178. <b><i>HomeSensorsMotion</i></b><br>
  25179. devspec of motion sensors<br>
  25180. each applied motion sensor will get the following attributes, attributes will be removed after removing the motion sensors from the HOMEMODE device.<br>
  25181. <ul>
  25182. <li>
  25183. <b><i>HomeModeAlarmActive</i></b><br>
  25184. specify the alarm mode(s) by regex in which the motion sensor should trigger motions as alerts<br>
  25185. while applying motion sensors to the HOMEMODE device, the value of this attribute will be set to armaway by default<br>
  25186. choose one or a combination of: armaway|armhome|armnight<br>
  25187. default: armaway (if sensor is of type inside)
  25188. </li>
  25189. <li>
  25190. <b><i>HomeSensorLocation</i></b><br>
  25191. specify each motion sensor's location, choose one of: inside, outside<br>
  25192. default: inside
  25193. </li>
  25194. <li>
  25195. <b><i>HomeReadings</i></b><br>
  25196. 2 space separated readings for motion sensors open/closed state and tamper alert<br>
  25197. this is the device setting which will override the global setting from attribute HomeSensorsMotionReadings from the HOMEMODE device<br>
  25198. default: state sabotageError
  25199. </li>
  25200. <li>
  25201. <b><i>HomeValues</i></b><br>
  25202. regex of open and tamper values for motion sensors<br>
  25203. this is the device setting which will override the global setting from attribute HomeSensorsMotionValues from the HOMEMODE device<br>
  25204. default: open|on
  25205. </li>
  25206. </ul>
  25207. </li>
  25208. <li>
  25209. <b><i>HomeSensorsMotionReadings</i></b><br>
  25210. 2 space separated readings for motion sensors open/closed state and tamper alert<br>
  25211. this is the global setting, you can also set these readings in each motion sensor individually in attribute HomeReadings once they are added to the HOMEMODE device<br>
  25212. default: state sabotageError
  25213. </li>
  25214. <li>
  25215. <b><i>HomeSensorsMotionValues</i></b><br>
  25216. regex of open and tamper values for motion sensors<br>
  25217. this is the global setting, you can also set these values in each contact sensor individually in attribute HomeValues once they are added to the HOMEMODE device<br>
  25218. default: open|on
  25219. </li>
  25220. <li>
  25221. <b><i>HomeSensorsPowerEnergy</i></b><br>
  25222. devspec of sensors with power and energy readings<br>
  25223. these devices will be used for total calculations
  25224. </li>
  25225. <li>
  25226. <b><i>HomeSensorsPowerEnergyReadings</i></b><br>
  25227. 2 space separated readings for power/energy sensors power and energy readings<br>
  25228. default: power energy
  25229. </li>
  25230. <li>
  25231. <b><i>HomeSpecialLocations</i></b><br>
  25232. comma separated list of additional locations<br>
  25233. default:
  25234. </li>
  25235. <li>
  25236. <b><i>HomeSpecialModes</i></b><br>
  25237. comma separated list of additional modes<br>
  25238. default:
  25239. </li>
  25240. <li>
  25241. <b><i>HomeTextAndAreIs</i></b><br>
  25242. pipe separated list of your local translations for "and", "are" and "is"<br>
  25243. default: and|are|is
  25244. </li>
  25245. <li>
  25246. <b><i>HomeTextClosedOpen</i></b><br>
  25247. pipe separated list of your local translation for "closed" and "open"<br>
  25248. default: closed|open
  25249. </li>
  25250. <li>
  25251. <b><i>HomeTextRisingConstantFalling</i></b><br>
  25252. pipe separated list of your local translation for "rising", "constant" and "falling"<br>
  25253. default: rising|constant|falling
  25254. </li>
  25255. <li>
  25256. <b><i>HomeTextTodayTomorrowAfterTomorrow</i></b><br>
  25257. pipe separated list of your local translations for "today", "tomorrow" and "day after tomorrow"<br>
  25258. this is used by weather forecast<br>
  25259. default: today|tomorrow|day after tomorrow
  25260. </li>
  25261. <li>
  25262. <b><i>HomeTextWeatherForecastInSpecDays</i></b><br>
  25263. your text for weather forecast in specific days<br>
  25264. placeholders can be used!<br>
  25265. default:
  25266. </li>
  25267. <li>
  25268. <b><i>HomeTextWeatherForecastToday</i></b><br>
  25269. your text for weather forecast today<br>
  25270. placeholders can be used!<br>
  25271. default:
  25272. </li>
  25273. <li>
  25274. <b><i>HomeTextWeatherForecastTomorrow</i></b><br>
  25275. your text for weather forecast tomorrow and the day after tomorrow<br>
  25276. placeholders can be used!<br>
  25277. default:
  25278. </li>
  25279. <li>
  25280. <b><i>HomeTextWeatherNoForecast</i></b><br>
  25281. your text for no available weather forecast<br>
  25282. default: No forecast available
  25283. </li>
  25284. <li>
  25285. <b><i>HomeTextWeatherLong</i></b><br>
  25286. your text for long weather information<br>
  25287. placeholders can be used!<br>
  25288. default:
  25289. </li>
  25290. <li>
  25291. <b><i>HomeTextWeatherShort</i></b><br>
  25292. your text for short weather information<br>
  25293. placeholders can be used!<br>
  25294. default:
  25295. </li>
  25296. <li>
  25297. <b><i>HomeTrendCalcAge</i></b><br>
  25298. time in seconds for the max age of the previous measured value for calculating trends<br>
  25299. default: 900
  25300. </li>
  25301. <li>
  25302. <b><i>HomeUWZ</i></b><br>
  25303. your local UWZ device<br>
  25304. default:
  25305. </li>
  25306. <li>
  25307. <b><i>HomeYahooWeatherDevice</i></b><br>
  25308. your local yahoo weather device<br>
  25309. default:
  25310. </li>
  25311. <li>
  25312. <b><i>disable</i></b><br>
  25313. disable HOMEMODE device and stop executing CMDs<br>
  25314. values 0 or 1<br>
  25315. default: 0
  25316. </li>
  25317. <li>
  25318. <b><i>disabledForIntervals</i></b><br>
  25319. disable the HOMEMODE device for intervals
  25320. default:
  25321. </li>
  25322. </ul>
  25323. <br>
  25324. <a name="HOMEMODE_read"></a>
  25325. <p><b>Readings</b></p>
  25326. <ul>
  25327. <li>
  25328. <b><i>alarmState</i></b><br>
  25329. current state of alarm system (includes current alarms - for homebridgeMapping)
  25330. </li>
  25331. <li>
  25332. <b><i>alarmTriggered</i></b><br>
  25333. list of triggered alarm sensors (contact/motion sensors)
  25334. </li>
  25335. <li>
  25336. <b><i>alarmTriggered_ct</i></b><br>
  25337. count of triggered alarm sensors (contact/motion sensors)
  25338. </li>
  25339. <li>
  25340. <b><i>alarmTriggered_hr</i></b><br>
  25341. (human readable) list of triggered alarm sensors (contact/motion sensors)
  25342. </li>
  25343. <li>
  25344. <b><i>anyoneElseAtHome</i></b><br>
  25345. anyoneElseAtHome off or on
  25346. </li>
  25347. <li>
  25348. <b><i>contactsDoorsInsideOpen</i></b><br>
  25349. list of names of open contact sensors of type doorinside
  25350. </li>
  25351. <li>
  25352. <b><i>batteryLow</i></b><br>
  25353. list of names of sensors with low battery
  25354. </li>
  25355. <li>
  25356. <b><i>batteryLow_ct</i></b><br>
  25357. count of sensors with low battery
  25358. </li>
  25359. <li>
  25360. <b><i>batteryLow_hr</i></b><br>
  25361. (human readable) list of sensors with low battery
  25362. </li>
  25363. <li>
  25364. <b><i>contactsDoorsInsideOpen_ct</i></b><br>
  25365. count of open contact sensors of type doorinside
  25366. </li>
  25367. <li>
  25368. <b><i>contactsDoorsInsideOpen_hr</i></b><br>
  25369. (human readable) list of open contact sensors of type doorinside
  25370. </li>
  25371. <li>
  25372. <b><i>contactsDoorsMainOpen</i></b><br>
  25373. list of names of open contact sensors of type doormain
  25374. </li>
  25375. <li>
  25376. <b><i>contactsDoorsMainOpen_ct</i></b><br>
  25377. count of open contact sensors of type doormain
  25378. </li>
  25379. <li>
  25380. <b><i>contactsDoorsMainOpen_hr</i></b><br>
  25381. (human readable) list of open contact sensors of type doormain
  25382. </li>
  25383. <li>
  25384. <b><i>contactsDoorsOutsideOpen</i></b><br>
  25385. list of names of open contact sensors of type dooroutside
  25386. </li>
  25387. <li>
  25388. <b><i>contactsDoorsOutsideOpen_ct</i></b><br>
  25389. count of open contact sensors of type dooroutside
  25390. </li>
  25391. <li>
  25392. <b><i>contactsDoorsOutsideOpen_hr</i></b><br>
  25393. (human readable) list of contact sensors of type dooroutside
  25394. </li>
  25395. <li>
  25396. <b><i>contactsOpen</i></b><br>
  25397. list of names of all open contact sensors
  25398. </li>
  25399. <li>
  25400. <b><i>contactsOpen_ct</i></b><br>
  25401. count of all open contact sensors
  25402. </li>
  25403. <li>
  25404. <b><i>contactsOpen_hr</i></b><br>
  25405. (human readable) list of all open contact sensors
  25406. </li>
  25407. <li>
  25408. <b><i>contactsOutsideOpen</i></b><br>
  25409. list of names of open contact sensors outside (sensor types: dooroutside,doormain,window)
  25410. </li>
  25411. <li>
  25412. <b><i>contactsOutsideOpen_ct</i></b><br>
  25413. count of open contact sensors outside (sensor types: dooroutside,doormain,window)
  25414. </li>
  25415. <li>
  25416. <b><i>contactsOutsideOpen_hr</i></b><br>
  25417. (human readable) list of open contact sensors outside (sensor types: dooroutside,doormain,window)
  25418. </li>
  25419. <li>
  25420. <b><i>contactsWindowsOpen</i></b><br>
  25421. list of names of open contact sensors of type window
  25422. </li>
  25423. <li>
  25424. <b><i>contactsWindowsOpen_ct</i></b><br>
  25425. count of open contact sensors of type window
  25426. </li>
  25427. <li>
  25428. <b><i>contactsWindowsOpen_hr</i></b><br>
  25429. (human readable) list of open contact sensors of type window
  25430. </li>
  25431. <li>
  25432. <b><i>daytime</i></b><br>
  25433. current daytime (as configured in HomeDaytimes) - independent from the mode of the HOMEMODE device<br>
  25434. </li>
  25435. <li>
  25436. <b><i>dnd</i></b><br>
  25437. dnd (do not disturb) off or on
  25438. </li>
  25439. <li>
  25440. <b><i>energy</i></b><br>
  25441. calculated total energy
  25442. </li>
  25443. <li>
  25444. <b><i>event-&lt;%CALENDAR%&gt;</i></b><br>
  25445. current event of the (holiday) CALENDAR device(s)
  25446. </li>
  25447. <li>
  25448. <b><i>humidty</i></b><br>
  25449. current humidty of the Yahoo weather device or of your own sensor (if available)
  25450. </li>
  25451. <li>
  25452. <b><i>humidtyTrend</i></b><br>
  25453. trend of the humidty over the last hour<br>
  25454. possible values: constant, rising, falling
  25455. </li>
  25456. <li>
  25457. <b><i>icawarning</i></b><br>
  25458. ice warning<br>
  25459. values: 0 if off and 1 if on
  25460. </li>
  25461. <li>
  25462. <b><i>lastAbsentByPresenceDevice</i></b><br>
  25463. last presence device which went absent
  25464. </li>
  25465. <li>
  25466. <b><i>lastAbsentByResident</i></b><br>
  25467. last resident who went absent
  25468. </li>
  25469. <li>
  25470. <b><i>lastActivityByPresenceDevice</i></b><br>
  25471. last active presence device
  25472. </li>
  25473. <li>
  25474. <b><i>lastActivityByResident</i></b><br>
  25475. last active resident
  25476. </li>
  25477. <li>
  25478. <b><i>lastAsleepByResident</i></b><br>
  25479. last resident who went asleep
  25480. </li>
  25481. <li>
  25482. <b><i>lastAwokenByResident</i></b><br>
  25483. last resident who went awoken
  25484. </li>
  25485. <li>
  25486. <b><i>lastBatteryLow</i></b><br>
  25487. last sensor with low battery
  25488. </li>
  25489. <li>
  25490. <b><i>lastCMDerror</i></b><br>
  25491. last occured error and command(chain) while executing command(chain)
  25492. </li>
  25493. <li>
  25494. <b><i>lastContact</i></b><br>
  25495. last contact sensor which triggered open
  25496. </li>
  25497. <li>
  25498. <b><i>lastContactClosed</i></b><br>
  25499. last contact sensor which triggered closed
  25500. </li>
  25501. <li>
  25502. <b><i>lastGoneByResident</i></b><br>
  25503. last resident who went gone
  25504. </li>
  25505. <li>
  25506. <b><i>lastGotosleepByResident</i></b><br>
  25507. last resident who went gotosleep
  25508. </li>
  25509. <li>
  25510. <b><i>lastInfo</i></b><br>
  25511. last shown item on infopanel (HomeAdvancedDetails)
  25512. </li>
  25513. <li>
  25514. <b><i>lastMotion</i></b><br>
  25515. last sensor which triggered motion
  25516. </li>
  25517. <li>
  25518. <b><i>lastMotionClosed</i></b><br>
  25519. last sensor which triggered motion end
  25520. </li>
  25521. <li>
  25522. <b><i>lastPresentByPresenceDevice</i></b><br>
  25523. last presence device which came present
  25524. </li>
  25525. <li>
  25526. <b><i>lastPresentByResident</i></b><br>
  25527. last resident who came present
  25528. </li>
  25529. <li>
  25530. <b><i>light</i></b><br>
  25531. current light reading value
  25532. </li>
  25533. <li>
  25534. <b><i>location</i></b><br>
  25535. current location
  25536. </li>
  25537. <li>
  25538. <b><i>luminance</i></b><br>
  25539. average luminance of all motion sensors (if available)
  25540. </li>
  25541. <li>
  25542. <b><i>luminanceTrend</i></b><br>
  25543. trend of the luminance over the last hour<br>
  25544. possible values: constant, rising, falling
  25545. </li>
  25546. <li>
  25547. <b><i>mode</i></b><br>
  25548. current mode
  25549. </li>
  25550. <li>
  25551. <b><i>modeAlarm</i></b><br>
  25552. current mode of alarm system
  25553. </li>
  25554. <li>
  25555. <b><i>motionsInside</i></b><br>
  25556. list of names of open motion sensors of type inside
  25557. </li>
  25558. <li>
  25559. <b><i>motionsInside_ct</i></b><br>
  25560. count of open motion sensors of type inside
  25561. </li>
  25562. <li>
  25563. <b><i>motionsInside_hr</i></b><br>
  25564. (human readable) list of open motion sensors of type inside
  25565. </li>
  25566. <li>
  25567. <b><i>motionsOutside</i></b><br>
  25568. list of names of open motion sensors of type outside
  25569. </li>
  25570. <li>
  25571. <b><i>motionsOutside_ct</i></b><br>
  25572. count of open motion sensors of type outside
  25573. </li>
  25574. <li>
  25575. <b><i>motionsOutside_hr</i></b><br>
  25576. (human readable) list of open motion sensors of type outside
  25577. </li>
  25578. <li>
  25579. <b><i>motionsSensors</i></b><br>
  25580. list of all names of open motion sensors
  25581. </li>
  25582. <li>
  25583. <b><i>motionsSensors_ct</i></b><br>
  25584. count of all open motion sensors
  25585. </li>
  25586. <li>
  25587. <b><i>motionsSensors_hr</i></b><br>
  25588. (human readable) list of all open motion sensors
  25589. </li>
  25590. <li>
  25591. <b><i>power</i></b><br>
  25592. calculated total power
  25593. </li>
  25594. <li>
  25595. <b><i>prevMode</i></b><br>
  25596. previous mode
  25597. </li>
  25598. <li>
  25599. <b><i>presence</i></b><br>
  25600. presence of any resident
  25601. </li>
  25602. <li>
  25603. <b><i>pressure</i></b><br>
  25604. current air pressure of the Yahoo weather device
  25605. </li>
  25606. <li>
  25607. <b><i>prevActivityByResident</i></b><br>
  25608. previous active resident
  25609. </li>
  25610. <li>
  25611. <b><i>prevContact</i></b><br>
  25612. previous contact sensor which triggered open
  25613. </li>
  25614. <li>
  25615. <b><i>prevContactClosed</i></b><br>
  25616. previous contact sensor which triggered closed
  25617. </li>
  25618. <li>
  25619. <b><i>prevLocation</i></b><br>
  25620. previous location
  25621. </li>
  25622. <li>
  25623. <b><i>prevMode</i></b><br>
  25624. previous mode
  25625. </li>
  25626. <li>
  25627. <b><i>prevMotion</i></b><br>
  25628. previous sensor which triggered motion
  25629. </li>
  25630. <li>
  25631. <b><i>prevMotionClosed</i></b><br>
  25632. previous sensor which triggered motion end
  25633. </li>
  25634. <li>
  25635. <b><i>prevModeAlarm</i></b><br>
  25636. previous alarm mode
  25637. </li>
  25638. <li>
  25639. <b><i>publicIP</i></b><br>
  25640. last checked public IP address
  25641. </li>
  25642. <li>
  25643. <b><i>season</i></b><br>
  25644. current season as configured in HomeSeasons<br>
  25645. </li>
  25646. <li>
  25647. <b><i>sensorsTampered</i></b><br>
  25648. list of names of tampered sensors
  25649. </li>
  25650. <li>
  25651. <b><i>sensorsTampered_ct</i></b><br>
  25652. count of tampered sensors
  25653. </li>
  25654. <li>
  25655. <b><i>sensorsTampered_hr</i></b><br>
  25656. (human readable) list of tampered sensors
  25657. </li>
  25658. <li>
  25659. <b><i>state</i></b><br>
  25660. current state
  25661. </li>
  25662. <li>
  25663. <b><i>temperature</i></b><br>
  25664. current temperature of the Yahoo weather device or of your own sensor (if available)
  25665. </li>
  25666. <li>
  25667. <b><i>temperatureTrend</i></b><br>
  25668. trend of the temperature over the last hour<br>
  25669. possible values: constant, rising, falling
  25670. </li>
  25671. <li>
  25672. <b><i>twilight</i></b><br>
  25673. current twilight reading value
  25674. </li>
  25675. <li>
  25676. <b><i>twilightEvent</i></b><br>
  25677. current twilight event
  25678. </li>
  25679. <li>
  25680. <b><i>uwz_warnCount</i></b><br>
  25681. current UWZ warn count
  25682. </li>
  25683. <li>
  25684. <b><i>wind</i></b><br>
  25685. current wind speed of the Yahoo weather
  25686. </li>
  25687. </ul>
  25688. <a name="HOMEMODE_placeholders"></a>
  25689. <p><b>Placeholders</b></p>
  25690. <p>These placeholders can be used in all HomeCMD attributes</p>
  25691. <ul>
  25692. <li>
  25693. <b><i>%ADDRESS%</i></b><br>
  25694. mac address of the last triggered presence device
  25695. </li>
  25696. <li>
  25697. <b><i>%ALIAS%</i></b><br>
  25698. alias of the last triggered resident
  25699. </li>
  25700. <li>
  25701. <b><i>%ALARM%</i></b><br>
  25702. value of the alarmTriggered reading of the HOMEMODE device<br>
  25703. will return 0 if no alarm is triggered or a list of triggered sensors if alarm is triggered
  25704. </li>
  25705. <li>
  25706. <b><i>%ALARMCT%</i></b><br>
  25707. value of the alarmTriggered_ct reading of the HOMEMODE device
  25708. </li>
  25709. <li>
  25710. <b><i>%ALARMHR%</i></b><br>
  25711. value of the alarmTriggered_hr reading of the HOMEMODE device<br>
  25712. will return 0 if no alarm is triggered or a (human readable) list of triggered sensors if alarm is triggered<br>
  25713. can be used for sending msg e.g.
  25714. </li>
  25715. <li>
  25716. <b><i>%AMODE%</i></b><br>
  25717. current alarm mode
  25718. </li>
  25719. <li>
  25720. <b><i>%AEAH%</i></b><br>
  25721. state of anyoneElseAtHome, will return 1 if on and will return 0 if off
  25722. </li>
  25723. <li>
  25724. <b><i>%ARRIVERS%</i></b><br>
  25725. will return a list of aliases of all registered residents/guests with location arrival<br>
  25726. this can be used to welcome residents after main door open/close<br>
  25727. e.g. Peter, Paul and Marry
  25728. </li>
  25729. <li>
  25730. <b><i>%AUDIO%</i></b><br>
  25731. audio device of the last triggered resident (attribute msgContactAudio)<br>
  25732. if attribute msgContactAudio of the resident has no value the value is trying to be taken from device globalMsg (if available)<br>
  25733. can be used to address resident specific msg(s) of type audio, e.g. night/morning wishes
  25734. </li>
  25735. <li>
  25736. <b><i>%BE%</i></b><br>
  25737. is or are of condition reading of monitored Yahoo weather device<br>
  25738. can be used for weather (forecast) output
  25739. </li>
  25740. <li>
  25741. <b><i>%BATTERYLOW%</i></b><br>
  25742. alias (or name if alias is not set) of the last battery sensor which reported low battery
  25743. </li>
  25744. <li>
  25745. <b><i>%BATTERYLOWALL%</i></b><br>
  25746. list if aliases (or names if alias is not set) of all battery sensor which reported low battery currently
  25747. </li>
  25748. <li>
  25749. <b><i>%BATTERYLOWCT%</i></b><br>
  25750. number of battery sensors which reported low battery currently
  25751. </li>
  25752. <li>
  25753. <b><i>%CONDITION%</i></b><br>
  25754. value of the condition reading of monitored Yahoo weather device<br>
  25755. can be used for weather (forecast) output
  25756. </li>
  25757. <li>
  25758. <b><i>%CONTACT%</i></b><br>
  25759. value of the lastContact reading (last opened sensor)
  25760. </li>
  25761. <li>
  25762. <b><i>%DAYTIME%</i></b><br>
  25763. value of the daytime reading of the HOMEMODE device<br>
  25764. can be used to trigger day time specific actions
  25765. </li>
  25766. <li>
  25767. <b><i>%DEVICE%</i></b><br>
  25768. name of the last triggered presence device<br>
  25769. can be used to trigger actions depending on the last present/absent presence device
  25770. </li>
  25771. <li>
  25772. <b><i>%DEVICEA%</i></b><br>
  25773. name of the last triggered absent presence device
  25774. </li>
  25775. <li>
  25776. <b><i>%DEVICEP%</i></b><br>
  25777. name of the last triggered present presence device
  25778. </li>
  25779. <li>
  25780. <b><i>%DND%</i></b><br>
  25781. state of dnd, will return 1 if on and will return 0 if off
  25782. </li>
  25783. <li>
  25784. <b><i>%DURABSENCE%</i></b><br>
  25785. value of the durTimerAbsence_cr reading of the last triggered resident
  25786. </li>
  25787. <li>
  25788. <b><i>%DURABSENCELAST%</i></b><br>
  25789. value of the lastDurAbsence_cr reading of the last triggered resident
  25790. </li>
  25791. <li>
  25792. <b><i>%DURPRESENCE%</i></b><br>
  25793. value of the durTimerPresence_cr reading of the last triggered resident
  25794. </li>
  25795. <li>
  25796. <b><i>%DURPRESENCELAST%</i></b><br>
  25797. value of the lastDurPresence_cr reading of the last triggered resident
  25798. </li>
  25799. <li>
  25800. <b><i>%DURSLEEP%</i></b><br>
  25801. value of the durTimerSleep_cr reading of the last triggered resident
  25802. </li>
  25803. <li>
  25804. <b><i>%DURSLEEPLAST%</i></b><br>
  25805. value of the lastDurSleep_cr reading of the last triggered resident
  25806. </li>
  25807. <li>
  25808. <b><i>%CALENDARNAME%</i></b><br>
  25809. will return the current event of the given calendar name, will return 0 if event is none<br>
  25810. can be used to trigger actions on any event of the given calendar
  25811. </li>
  25812. <li>
  25813. <b><i>%CALENDARNAME-EVENTNAME%</i></b><br>
  25814. will return 1 if given event of given calendar is current, will return 0 if event is not current<br>
  25815. can be used to trigger actions during specific events only (Christmas?)
  25816. </li>
  25817. <li>
  25818. <b><i>%FORECAST%</i></b><br>
  25819. will return the weather forecast for tomorrow<br>
  25820. can be used in msg or tts
  25821. </li>
  25822. <li>
  25823. <b><i>%FORECASTTODAY%</i></b><br>
  25824. will return the weather forecast for today<br>
  25825. can be used in msg or tts
  25826. </li>
  25827. <li>
  25828. <b><i>%HUMIDITY%</i></b><br>
  25829. value of the humidity reading of the HOMEMODE device<br>
  25830. can be used for weather info in HomeTextWeather attributes e.g.
  25831. </li>
  25832. <li>
  25833. <b><i>%HUMIDITYTREND%</i></b><br>
  25834. value of the humidityTrend reading of the HOMEMODE device<br>
  25835. possible values: constant, rising, falling
  25836. </li>
  25837. <li>
  25838. <b><i>%ICE%</i></b><br>
  25839. will return 1 if ice warning is on, will return 0 if ice warning is off<br>
  25840. can be used to send ice warning specific msg(s) in specific situations, e.g. to warn leaving residents
  25841. </li>
  25842. <li>
  25843. <b><i>%IP%</i></b><br>
  25844. value of reading publicIP<br>
  25845. can be used to send msg(s) with (new) IP address
  25846. </li>
  25847. <li>
  25848. <b><i>%LIGHT%</i></b><br>
  25849. value of the light reading of the HOMEMODE device
  25850. </li>
  25851. <li>
  25852. <b><i>%LOCATION%</i></b><br>
  25853. value of the location reading of the HOMEMODE device
  25854. </li>
  25855. <li>
  25856. <b><i>%LOCATIONR%</i></b><br>
  25857. value of the location reading of the last triggered resident
  25858. </li>
  25859. <li>
  25860. <b><i>%LUMINANCE%</i></b><br>
  25861. average luminance of motion sensors (if available)
  25862. </li>
  25863. <li>
  25864. <b><i>%LUMINANCETREND%</i></b><br>
  25865. value of the luminanceTrend reading of the HOMEMODE device<br>
  25866. possible values: constant, rising, falling
  25867. </li>
  25868. <li>
  25869. <b><i>%MODE%</i></b><br>
  25870. current mode of the HOMEMODE device
  25871. </li>
  25872. <li>
  25873. <b><i>%MOTION%</i></b><br>
  25874. value of the lastMotion reading (last opened sensor)
  25875. </li>
  25876. <li>
  25877. <b><i>%OPEN%</i></b><br>
  25878. value of the contactsOutsideOpen_hr reading of the HOMEMODE device<br>
  25879. can be used to send msg(s) in specific situations, e.g. to warn leaving residents of open contact sensors
  25880. </li>
  25881. <li>
  25882. <b><i>%OPENCT%</i></b><br>
  25883. value of the contactsOutsideOpen_ct reading of the HOMEMODE device<br>
  25884. can be used to send msg(s) in specific situations depending on the number of open contact sensors, maybe in combination with placeholder %OPEN%
  25885. </li>
  25886. <li>
  25887. <b><i>%RESIDENT%</i></b><br>
  25888. name of the last triggered resident
  25889. </li>
  25890. <li>
  25891. <b><i>%PRESENT%</i></b><br>
  25892. presence of the HOMEMODE device<br>
  25893. will return 1 if present or 0 if absent
  25894. </li>
  25895. <li>
  25896. <b><i>%PRESENTR%</i></b><br>
  25897. presence of last triggered resident<br>
  25898. will return 1 if present or 0 if absent
  25899. </li>
  25900. <li>
  25901. <b><i>%PRESSURE%</i></b><br>
  25902. value of the pressure reading of the HOMEMODE device<br>
  25903. can be used for weather info in HomeTextWeather attributes e.g.
  25904. </li>
  25905. <li>
  25906. <b><i>%PRESSURETREND%</i></b><br>
  25907. value of the pressure_trend_txt reading of the Yahoo weather device<br>
  25908. can be used for weather info in HomeTextWeather attributes e.g.
  25909. </li>
  25910. <li>
  25911. <b><i>%PREVAMODE%</i></b><br>
  25912. previous alarm mode of the HOMEMODE device
  25913. </li>
  25914. <li>
  25915. <b><i>%PREVCONTACT%</i></b><br>
  25916. previous open contact sensor
  25917. </li>
  25918. <li>
  25919. <b><i>%PREVMODE%</i></b><br>
  25920. previous mode of the HOMEMODE device
  25921. </li>
  25922. <li>
  25923. <b><i>%PREVMODER%</i></b><br>
  25924. previous state of last triggered resident
  25925. </li>
  25926. <li>
  25927. <b><i>%PREVMOTION%</i></b><br>
  25928. previous open motion sensor
  25929. </li>
  25930. <li>
  25931. <b><i>%SEASON%</i></b><br>
  25932. value of the season reading of the HOMEMODE device
  25933. </li>
  25934. <li>
  25935. <b><i>%SELF%</i></b><br>
  25936. name of the HOMEMODE device itself
  25937. </li>
  25938. <li>
  25939. <b><i>%SENSORSBATTERY%</i></b><br>
  25940. all battery sensors from internal SENSORSBATTERY
  25941. </li>
  25942. <li>
  25943. <b><i>%SENSORSCONTACT%</i></b><br>
  25944. all contact sensors from internal SENSORSCONTACT
  25945. </li>
  25946. <li>
  25947. <b><i>%SENSORSENERGY%</i></b><br>
  25948. all energy sensors from internal SENSORSENERGY
  25949. </li>
  25950. <li>
  25951. <b><i>%SENSORSMOTION%</i></b><br>
  25952. all motion sensors from internal SENSORSMOTION
  25953. </li>
  25954. <li>
  25955. <b><i>%TAMPERED%</i></b><br>
  25956. will return all tampered sensors
  25957. </li>
  25958. <li>
  25959. <b><i>%TAMPEREDCT%</i></b><br>
  25960. will return the number of tampered sensors
  25961. </li>
  25962. <li>
  25963. <b><i>%TEMPERATURE%</i></b><br>
  25964. value of the temperature reading of the HOMEMODE device<br>
  25965. can be used for weather info in HomeTextWeather attributes e.g.
  25966. </li>
  25967. <li>
  25968. <b><i>%TEMPERATURETREND%</i></b><br>
  25969. value of the temperatureTrend reading of the HOMEMODE device<br>
  25970. possible values: constant, rising, falling
  25971. </li>
  25972. <li>
  25973. <b><i>%TWILIGHT%</i></b><br>
  25974. value of the twilight reading of the HOMEMODE device
  25975. </li>
  25976. <li>
  25977. <b><i>%TWILIGHTEVENT%</i></b><br>
  25978. current twilight event
  25979. </li>
  25980. <li>
  25981. <b><i>%UWZ%</i></b><br>
  25982. UWZ warnings count
  25983. </li>
  25984. <li>
  25985. <b><i>%UWZLONG%</i></b><br>
  25986. all current UWZ warnings as long text
  25987. </li>
  25988. <li>
  25989. <b><i>%UWZSHORT%</i></b><br>
  25990. all current UWZ warnings as short text
  25991. </li>
  25992. <li>
  25993. <b><i>%WEATHER%</i></b><br>
  25994. value of "get &lt;HOMEMODE&gt; weather short"<br>
  25995. can be used for for msg weather info e.g.
  25996. </li>
  25997. <li>
  25998. <b><i>%WEATHERLONG%</i></b><br>
  25999. value of "get &lt;HOMEMODE&gt; weather long"<br>
  26000. can be used for for msg weather info e.g.
  26001. </li>
  26002. <li>
  26003. <b><i>%WIND%</i></b><br>
  26004. value of the wind reading of the HOMEMODE device<br>
  26005. can be used for weather info in HomeTextWeather attributes e.g.
  26006. </li>
  26007. <li>
  26008. <b><i>%WINDCHILL%</i></b><br>
  26009. value of the wind_chill reading of the Yahoo weather device<br>
  26010. can be used for weather info in HomeTextWeather attributes e.g.
  26011. </li>
  26012. </ul>
  26013. <p>These placeholders can only be used within HomeTextWeatherForecast attributes</p>
  26014. <ul>
  26015. <li>
  26016. <b><i>%CONDITION%</i></b><br>
  26017. value of weather forecast condition
  26018. </li>
  26019. <li>
  26020. <b><i>%DAY%</i></b><br>
  26021. day number of weather forecast
  26022. </li>
  26023. <li>
  26024. <b><i>%HIGH%</i></b><br>
  26025. value of maximum weather forecast temperature
  26026. </li>
  26027. <li>
  26028. <b><i>%LOW%</i></b><br>
  26029. value of minimum weather forecast temperature
  26030. </li>
  26031. </ul>
  26032. <p>These placeholders can only be used within HomeCMDcontact and HomeCMDmotion attributes</p>
  26033. <ul>
  26034. <li>
  26035. <b><i>%ALIAS%</i></b><br>
  26036. alias of the last triggered contact/motion sensor
  26037. </li>
  26038. <li>
  26039. <b><i>%SENSOR%</i></b><br>
  26040. name of the last triggered contact/motion sensor
  26041. </li>
  26042. <li>
  26043. <b><i>%STATE%</i></b><br>
  26044. state of the last triggered contact/motion sensor
  26045. </li>
  26046. </ul>
  26047. <p>These placeholders can only be used within calendar event related HomeCMDevent attributes</p>
  26048. <ul>
  26049. <li>
  26050. <b><i>%CALENDAR%</i></b><br>
  26051. name of the calendar
  26052. </li>
  26053. <li>
  26054. <b><i>%EVENT%</i></b><br>
  26055. current event of the calendar
  26056. </li>
  26057. <li>
  26058. <b><i>%PREVEVENT%</i></b><br>
  26059. previous event of the calendar
  26060. </li>
  26061. </ul>
  26062. </ul>
  26063. <p>
  26064. <a name="HP1000" id="HP1000"></a>
  26065. </p>
  26066. <h3>
  26067. HP1000
  26068. </h3>
  26069. <ul>
  26070. <div>
  26071. <a name="HP1000define" id="HP10000define"></a> <b>Define</b>
  26072. <div>
  26073. <ul>
  26074. <code>define &lt;WeatherStation&gt; HP1000 [&lt;ID&gt; &lt;PASSWORD&gt;]</code><br>
  26075. <br>
  26076. Provides webhook receiver for Wifi-based weather station which support <a href="http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol">PWS protocol</a> from Weather Underground (e.g. HP1000, WH2600, WH2601, WH2621, WH2900, WH2950 of <a href="http://www.foshk.com/Wifi_Weather_Station/">Fine Offset Electronics</a> - sometimes also known as <a href="http://www.ambientweather.com/peorhowest.html">Ambient Weather</a> WS-1001-WIFI or similar). In Germany, these devices are commonly distributed by <a href="http://www.froggit.de/">froggit</a> or by <a href="http://www.conrad.de/">Conrad</a> under it's brand name Renkforce.<br>
  26077. There needs to be a dedicated FHEMWEB instance with attribute webname set to "weatherstation".<br>
  26078. No other name will work as it's hardcoded in the weather station device itself!<br>
  26079. If necessary, this module will create a matching FHEMWEB instance named WEBweatherstation during initial definition.<br>
  26080. <br>
  26081. As the URI has a fixed coding as well there can only be one single instance of this module FHEM installation.<br>
  26082. <br>
  26083. Example:<br>
  26084. <div>
  26085. <code># unprotected instance where ID and PASSWORD will be ignored<br>
  26086. define WeatherStation HP1000<br>
  26087. <br>
  26088. # protected instance: Weather Station needs to be configured<br>
  26089. # to send this ID and PASSWORD for data to be accepted<br>
  26090. define WeatherStation HP1000 MyHouse SecretPassword</code>
  26091. </div><br>
  26092. IMPORTANT: In your hardware device, make sure you use a DNS name as most revisions cannot handle IP addresses correctly.<br>
  26093. You might want to check to install a firmware update from <a href="http://www.foshk.com/support/">here</a>.
  26094. </ul>
  26095. </div><br>
  26096. </div>
  26097. <br>
  26098. <a name="HP1000Attr" id="HP10000Attr"></a> <b>Attributes</b>
  26099. <div>
  26100. <ul>
  26101. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  26102. <br>
  26103. <a name="wu_id"></a><li><b>wu_id</b></li>
  26104. Weather Underground (Wunderground) station ID
  26105. <a name="wu_password"></a><li><b>wu_password</b></li>
  26106. Weather Underground (Wunderground) password
  26107. <a name="wu_dataValues"></a><li><b>wu_dataValues</b></li>
  26108. Add or replace values before pushing data to Weather Underground.<br>
  26109. Format is key=value while value may be of <a href="#set">set magic format</a>
  26110. <a name="wu_indoorValues"></a><li><b>wu_indoorValues</b></li>
  26111. Include indoor values for Weather Underground (defaults to 1=yes)
  26112. <a name="wu_push"></a><li><b>wu_push</b></li>
  26113. Enable or disable to push data forward to Weather Underground (defaults to 0=no)
  26114. <a name="wu_pushValues"></a><li><b>wu_pushValues</b></li>
  26115. Restrict values to be transferred to Weather Underground,
  26116. otherwise all values will be transferred.
  26117. <a name="wu_realtime"></a><li><b>wu_realtime</b></li>
  26118. Send the data to the WU realtime server instead of using the standard server (defaults to 1=yes)
  26119. </ul>
  26120. </div>
  26121. </ul>
  26122. <a name="HTTPMOD"></a>
  26123. <h3>HTTPMOD</h3>
  26124. <ul>
  26125. This module provides a generic way to retrieve information from devices with an HTTP Interface and store them in Readings or send information to such devices.
  26126. It queries a given URL with Headers and data defined by attributes. <br>
  26127. From the HTTP Response it extracts Readings named in attributes using Regexes, JSON or XPath also defined by attributes. <br>
  26128. To send information to a device, set commands can be configured using attributes.
  26129. <br><br>
  26130. <b>Prerequisites</b>
  26131. <ul>
  26132. <br>
  26133. <li>
  26134. This Module uses the non blocking HTTP function HttpUtils_NonblockingGet provided by FHEM's HttpUtils in a new Version published in December 2013.<br>
  26135. If not already installed in your environment, please update FHEM or install it manually using appropriate commands from your environment.<br>
  26136. Please also note that Fhem HttpUtils need the global attribute dnsServer to be set in order to work really non blocking even when dns requests can not be answered.
  26137. </li>
  26138. </ul>
  26139. <br>
  26140. <a name="HTTPMODdefine"></a>
  26141. <b>Define</b>
  26142. <ul>
  26143. <br>
  26144. <code>define &lt;name&gt; HTTPMOD &lt;URL&gt; &lt;Interval&gt;</code>
  26145. <br><br>
  26146. The module connects to the given URL every Interval seconds, sends optional headers
  26147. and data and then parses the response.<br>
  26148. URL can be "none" and Interval can be 0 if you prefer to only query data manually with a get command and not automatically in a defined interval.<br>
  26149. <br>
  26150. Example:<br>
  26151. <br>
  26152. <ul><code>define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60</code></ul>
  26153. </ul>
  26154. <br>
  26155. <a name="HTTPMODconfiguration"></a>
  26156. <b>Simple configuration of HTTP Devices</b><br><br>
  26157. <ul>
  26158. In a simple configuration you don't need to define get or set commands. One common HTTP request is automatically sent in the
  26159. interval specified in the define command and to the URL specified in the define command.<br>
  26160. Optional HTTP headers can be specified as <code>attr requestHeader1</code> to <code>attr requestHeaderX</code>, <br>
  26161. optional POST data as <code>attr requestData</code> and then
  26162. pairs of <code>attr readingXName</code> and <code>attr readingXRegex</code>,
  26163. <code>attr readingXXPath</code>, <code>attr readingXXPath-Strict</code> or <code>attr readingXJSON</code>
  26164. to define how values are parsed from the HTTP response and in which readings they are stored. <br>
  26165. (The old syntax <code>attr readingsNameX</code> and <code>attr readingsRegexX</code> is still supported
  26166. but it can go away in a future version of HTTPMOD so the new one with <code>attr readingXName</code>
  26167. and <code>attr readingXRegex</code> should be preferred.
  26168. <br><br>
  26169. Example for a PoolManager 5:<br><br>
  26170. <ul><code>
  26171. define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60<br>
  26172. attr PM reading01Name PH<br>
  26173. attr PM reading01Regex 34.4001.value":[ \t]+"([\d\.]+)"<br>
  26174. <br>
  26175. attr PM reading02Name CL<br>
  26176. attr PM reading02Regex 34.4008.value":[ \t]+"([\d\.]+)"<br>
  26177. <br>
  26178. attr PM reading03Name3TEMP<br>
  26179. attr PM reading03Regex 34.4033.value":[ \t]+"([\d\.]+)"<br>
  26180. <br>
  26181. attr PM requestData {"get" :["34.4001.value" ,"34.4008.value" ,"34.4033.value", "14.16601.value", "14.16602.value"]}<br>
  26182. attr PM requestHeader1 Content-Type: application/json<br>
  26183. attr PM requestHeader2 Accept: */*<br>
  26184. <br>
  26185. attr PM stateFormat {sprintf("%.1f Grad, PH %.1f, %.1f mg/l Chlor", ReadingsVal($name,"TEMP",0), ReadingsVal($name,"PH",0), ReadingsVal($name,"CL",0))}<br>
  26186. </code></ul>
  26187. <br>
  26188. The regular expressions used will take the value that matches a capture group. This is the part of the regular expression inside ().
  26189. In the above example "([\d\.]+)" refers to numerical digits or points between double quotation marks. Only the string consiting of digits and points
  26190. will match inside (). This piece is assigned to the reading.
  26191. You can also use regular expressions that have several capture groups which might be helpful when parsing tables. In this case an attribute like
  26192. <code><ul>
  26193. reading02Regex something[ \t]+([\d\.]+)[ \t]+([\d\.]+)
  26194. </code></ul>
  26195. could match two numbers. When you specify only one reading02Name like
  26196. <code><ul>
  26197. reading02Name Temp
  26198. </code></ul>
  26199. the name Temp will be used with the extension -1 and -2 thus giving a reading Temp-1 for the first number and Temp-2 for the second.
  26200. You can also specify individual names for several readings that get parsed from one regular expression with several capture groups by
  26201. defining attributes
  26202. <code><ul>
  26203. reading02-1Name<br>
  26204. reading02-2Name
  26205. ...
  26206. </code></ul>
  26207. The same notation can be used for formatting attributes like readingXOMap, readingXFormat and so on.<br>
  26208. <br>
  26209. The usual way to define readings is however to have an individual regular expression with just one capture group per reading as shown in the above example.
  26210. <br>
  26211. </ul>
  26212. <br>
  26213. <a name="HTTPMODformat"></a>
  26214. <b>formating and manipulating values / readings</b><br><br>
  26215. <ul>
  26216. Values that are parsed from an HTTP response can be further treated or formatted with the following attributes:<br>
  26217. <ul><code>
  26218. (reading|get)[0-9]*(-[0-9]+)?OExpr<br>
  26219. (reading|get)[0-9]*(-[0-9]+)?OMap<br>
  26220. (reading|get)[0-9]*(-[0-9]+)?Format<br>
  26221. (reading|get)[0-9]*(-[0-9]+)?Decode<br>
  26222. (reading|get)[0-9]*(-[0-9]+)?Encode
  26223. </code></ul>
  26224. They can all be specified for an individual reading, for all readings in one match (e.g. if a regular expression has several capture groups)
  26225. or for all readings in a get command (defined by getXX) or for all readings in the main reading list (defined by readingXX):
  26226. <ul><code>
  26227. reading01Format %.1f
  26228. </code></ul>
  26229. will format the reading with the name specified by the attribute reading01Name to be numerical with one digit after the decimal point. <br>
  26230. If the attribute reading01Regex is used and contains several capture groups then the format will be applied to all readings thet are parsed
  26231. by this regex unless these readings have their own format specified by reading01-1Format, reading01-2Format and so on.
  26232. <br>
  26233. <ul><code>
  26234. reading01-2Format %.1f
  26235. </code></ul>
  26236. Can be used in cases where a regular expression specified as reading1regex contains several capture groups or an xpath specified
  26237. as reading01XPath creates several readings.
  26238. In this case reading01-2Format specifies the format to be applied to the second match.
  26239. <br>
  26240. <ul><code>
  26241. readingFormat %.1f
  26242. </code></ul>
  26243. applies to all readings defined by a reading-Attribute that have no more specific format.
  26244. <br>
  26245. <br>
  26246. If you need to do some calculation on a raw value before it is used as a reading, you can define the attribute <code>readingOExpr</code>.<br>
  26247. It defines a Perl expression that is used in an eval to compute the readings value. The raw value will be in the variable $val.<br>
  26248. Example:<br>
  26249. <ul><code>
  26250. attr PM reading03OExpr $val * 10<br>
  26251. </code></ul>
  26252. Just like in the above example of the readingFormat attributes, readingOExpr and the other following attributes
  26253. can be applied on several levels.
  26254. <br>
  26255. <br>
  26256. To map a raw numerical value to a name, you can use the readingOMap attribute.
  26257. It defines a mapping from raw values read from the device to visible values like "0:mittig, 1:oberhalb, 2:unterhalb". <br>
  26258. Example:<br>
  26259. <ul><code>
  26260. attr PM reading02-3OMap 0:kalt, 1:warm, 2:sehr warm
  26261. </code></ul>
  26262. <br>
  26263. If the value read from a http response is 1, the above map will transalte it to the string warm and the reading value will be set to warm.<br>
  26264. To convert character sets, the module can first decode a string read from the device and then encode it again. For example:
  26265. <ul><code>
  26266. attr PM getDecode UTF-8
  26267. </code></ul>
  26268. This applies to all readings defined for Get-Commands.
  26269. </ul>
  26270. <br>
  26271. <a name="HTTPMODsetconfiguration"></a>
  26272. <b>Configuration to define a <code>set</code> command and send data to a device</b><br><br>
  26273. <ul>
  26274. When a set option is defined by attributes, the module will use the value given to the set command
  26275. and translate it into an HTTP-Request that sends the value to the device. <br>
  26276. HTTPMOD has a built in replacement that replaces $val in URLs, headers or Post data with the value passed in the set command.<br>
  26277. This value is internally stored in the internal "value" ($hash->{value}) so it can also be used in a user defined replacement.
  26278. <br>
  26279. Extension to the above example for a PoolManager 5:<br><br>
  26280. <ul><code>
  26281. attr PM set01Name HeizungSoll <br>
  26282. attr PM set01URL http://MyPoolManager/cgi-bin/webgui.fcgi?sid=$sid <br>
  26283. attr PM set01Hint 6,10,20,30 <br>
  26284. attr PM set01Min 6 <br>
  26285. attr PM set01Max 30 <br>
  26286. attr PM setHeader1 Content-Type: application/json <br>
  26287. attr PM set01Data {"set" :{"34.3118.value" :"$val" }} <br>
  26288. </code></ul>
  26289. <br>
  26290. This example defines a set option with the name HeizungSoll. <br>
  26291. By issuing <code>set PM HeizungSoll 10</code> in FHEM, the value 10 will be sent in the defined HTTP
  26292. Post to URL <code>http://MyPoolManager/cgi-bin/webgui.fcgi</code> and with Post Data as <br>
  26293. <code>{"set" :{"34.3118.value" :"10" }}</code><br>
  26294. The optional attributes set01Min and set01Max define input validations that will be checked in the set function.<br>
  26295. the optional attribute set01Hint will define the way the Fhemweb GUI shows the input. This might be a slider or a selection list for example.<br>
  26296. <br>
  26297. The HTTP response to such a request will be ignored unless you specify the attribute <code>setParseResponse</code>
  26298. for all set commands or <code>set01ParseResponse</code> for the set command with number 01.<br>
  26299. If the HTTP response to a set command is parsed then this is done like the parsing of responses to get commands and you can use the attributes ending e.g. on
  26300. Format, Encode, Decode, OMap and OExpr to manipulate / format the values read.
  26301. <br>
  26302. If a parameter to a set command is not numeric but should be passed on to the device as text, then you can specify the attribute setTextArg. For example:
  26303. <ul><code>
  26304. attr PM set01TextArg
  26305. </code></ul>
  26306. If a set command should not require a parameter at all, then you can specify the attribute NoArg. For example:
  26307. <ul><code>
  26308. attr PM set03Name On
  26309. attr PM set03NoArg
  26310. </code></ul>
  26311. <br>
  26312. </ul>
  26313. <br>
  26314. <a name="HTTPMODgetconfiguration"></a>
  26315. <b>Configuration to define a <code>get</code> command</b><br><br>
  26316. <ul>
  26317. When a get option is defined by attributes, the module allows querying additional values from the device that require
  26318. individual HTTP-Requests or special parameters to be sent<br><br>
  26319. Extension to the above example:<br><br>
  26320. <ul><code>
  26321. attr PM get01Name MyGetValue <br>
  26322. attr PM get01URL http://MyPoolManager/cgi-bin/directory/webgui.fcgi?special=1?sid=$sid <br>
  26323. attr PM getHeader1 Content-Type: application/json <br>
  26324. attr PM get01Data {"get" :{"30.1234.value"}} <br>
  26325. </code></ul>
  26326. <br>
  26327. This example defines a get option with the name MyGetValue. <br>
  26328. By issuing <code>get PM MyGetValue</code> in FHEM, the defined HTTP request is sent to the device.<br>
  26329. The HTTP response is then parsed using the same readingXXName and readingXXRegex attributes as above so
  26330. additional pairs will probably be needed there for additional values.<br><br>
  26331. If the new get parameter should also be queried regularly, you can define the following optional attributes:<br>
  26332. <ul><code>
  26333. attr PM get01Poll 1<br>
  26334. attr PM get01PollDelay 300<br>
  26335. </code></ul>
  26336. <br>
  26337. The first attribute includes this reading in the automatic update cycle and the second defines an
  26338. alternative lower update frequency. When the interval defined initially in the define is over and the normal readings
  26339. are read from the device, the update function will check for additional get parameters that should be included
  26340. in the update cycle.
  26341. If a PollDelay is specified for a get parameter, the update function also checks if the time passed since it has last read this value
  26342. is more than the given PollDelay. If not, this reading is skipped and it will be rechecked in the next cycle when
  26343. interval is over again. So the effective PollDelay will always be a multiple of the interval specified in the initial define.<br>
  26344. <br>
  26345. Please note that each defined get command that is included in the regular update cycle will create its own HTTP request. So if you want to extract several values from the same request, it is much more efficient to do this by defining readingXXName and readingXXRegex, XPath or JSON attributes and to specify an interval and a URL in the define of the HTTPMOD device.
  26346. </ul>
  26347. <br>
  26348. <a name="HTTPMODsessionconfiguration"></a>
  26349. <b>Handling sessions and logging in</b><br><br>
  26350. <ul>
  26351. In simple cases logging in works with basic authentication. In the case HTTPMOD accepts a username and password as part of the URL
  26352. in the form http://User:Password@192.168.1.18/something<br>
  26353. However basic auth is seldom used. If you need to fill in a username and password in a HTML form and the session is then managed by a session id,
  26354. here is how to configure this:
  26355. when sending data to an HTTP-Device in a set, HTTPMOD will replace any <code>$sid</code> in the URL, Headers and Post data
  26356. with the internal <code>$hash->{sid}</code>.
  26357. To authenticate towards the device and give this internal a value, you can use an optional multi step login procedure
  26358. defined by the following attributes: <br>
  26359. <ul>
  26360. <li>sid[0-9]*URL</li>
  26361. <li>sid[0-9]*Data.*</li>
  26362. <li>sid[0-9]*Header.*</li>
  26363. <li>idRegex</li>
  26364. <li>idJSON</li>
  26365. <li>idXPath</li>
  26366. <li>idXPath-Strict</li>
  26367. <li>(get|set|sid)[0-9]*IdRegex</li>
  26368. <li>(get|set|sid)[0-9]*IdJSON</li>
  26369. <li>(get|set|sid)[0-9]*IdXPath</li>
  26370. <li>(get|set|sid)[0-9]*IdXPath-Strict</li>
  26371. </ul><br>
  26372. Each step can have a URL, Headers and Post Data. To extract the actual session Id, you can use regular expressions, JSON or XPath just like for the parsing of readings but with the attributes (get|set|sid)[0-9]*IdRegex, (get|set|sid)[0-9]*IdJSON, (get|set|sid)[0-9]*IdXPath or (get|set|sid)[0-9]*IdXPath-Strict.<br>
  26373. An extracted session Id will be stored in the internal <code>$hash->{sid}</code>.<br>
  26374. HTTPMOD will create a sorted list of steps (the numbers between sid and URL / Data / Header)
  26375. and the loop through these steps and send the corresponding requests to the device.
  26376. For each step a $sid in a Header or Post Data will be replaced with the current content of <code>$hash->{sid}</code>. <br>
  26377. Using this feature, HTTPMOD can perform a forms based authentication and send user name, password or other necessary data to the device and save the session id for further requests.<br>
  26378. If for one step not all of the URL, Data or Header Attributes are set, then HTTPMOD tries to use a
  26379. <code>sidURL</code>, <code>sidData.*</code> or <code>sidHeader.*</code> Attribue (without the step number after sid).
  26380. This way parts that are the same for all steps don't need to be defined redundantly. <br>
  26381. <br>
  26382. To determine when this login procedure is necessary, HTTPMOD will first try to send a request without
  26383. doing the login procedure. If the result contains an error that authentication is necessary, then a login is performed.
  26384. To detect such an error in the HTTP response, you can again use a regular expression, JSON or XPath, this time with the attributes
  26385. <ul>
  26386. <li>reAuthRegex</li>
  26387. <li>reAuthJSON</li>
  26388. <li>reAuthXPath</li>
  26389. <li>reAuthXPath-Strict</li>
  26390. <li>[gs]et[0-9]*ReAuthRegex</li>
  26391. <li>[gs]et[0-9]*ReAuthJSON</li>
  26392. <li>[gs]et[0-9]*ReAuthXPath</li>
  26393. <li>[gs]et[0-9]*ReAuthXPath-Strict</li>
  26394. </ul>
  26395. <br>
  26396. reAuthJSON or reAuthXPath typically only extract one piece of data from a response.
  26397. If the existance of the specified piece of data is sufficent to start a login procedure, then nothing more needs to be defined to detect this situation.
  26398. If however the indicator is a status code that contains different values depending on a successful request and a failed request if a new authentication is needed,
  26399. then you can combine things like reAuthJSON with reAuthRegex. In this case the regex is only matched to the data extracted by JSON (or XPath).
  26400. This way you can easily extract the status code using JSON parsing and then specify the code that means "authentication needed" as a regular expression. <br>
  26401. <br>
  26402. Example for a multi step login procedure:
  26403. <br><br>
  26404. <ul><code>
  26405. attr PM reAuthRegex /html/dummy_login.htm
  26406. attr PM sidURL http://192.168.70.90/cgi-bin/webgui.fcgi?sid=$sid<br>
  26407. attr PM sidHeader1 Content-Type: application/json<br>
  26408. attr PM sid1IdRegex wui.init\('([^']+)'<br>
  26409. attr PM sid2Data {"set" :{"9.17401.user" :"fhem" ,"9.17401.pass" :"password" }}<br>
  26410. attr PM sid3Data {"set" :{"35.5062.value" :"128" }}<br>
  26411. attr PM sid4Data {"set" :{"42.8026.code" :"pincode" }}<br>
  26412. </ul></code>
  26413. In this case HTTPMOD detects that a login is necessary by looking for the pattern /html/dummy_login.htm in the HTTP response.
  26414. If it matches, it starts a login sequence. In the above example all steps request the same URL. In step 1 only the defined header
  26415. is sent in an HTTP get request. The response will contain a session id that is extraced with the regex wui.init\('([^']+)'.
  26416. In the next step this session id is sent in a post request to the same URL where tha post data contains a username and password.
  26417. The a third and a fourth request follow that set a value and a code. The result will be a valid and authorized session id that can be used in other requests where $sid is part of a URL, header or post data and will be replaced with the session id extracted above.<br>
  26418. <br>
  26419. In the special case where a session id is set as a HTTP-Cookie (with the header Set-cookie: in the HTTP response) HTTPMOD offers an even simpler way. With the attribute enableCookies a very basic cookie handling mechanism is activated that stores all cookies that the server sends to the HTTPMOD device and puts them back as cookie headers in the following requests. <br>
  26420. For such cases no sidIdRegex and no $sid in a user defined header is necessary.
  26421. </ul>
  26422. <br>
  26423. <a name="HTTPMODjsonconfiguration"></a>
  26424. <b>Parsing JSON</b><br><br>
  26425. <ul>
  26426. If a webservice delivers data in JSON format, HTTPMOD can directly parse JSON which might be easier in this case than definig regular expressions.<br>
  26427. The next example shows the data that can be requested from a Poolmanager with the following partial configuration:
  26428. <ul><code>
  26429. define test2 HTTPMOD none 0<br>
  26430. attr test2 get01Name Chlor<br>
  26431. attr test2 getURL http://192.168.70.90/cgi-bin/webgui.fcgi<br>
  26432. attr test2 getHeader1 Content-Type: application/json<br>
  26433. attr test2 getHeader2 Accept: */*<br>
  26434. attr test2 getData {"get" :["34.4008.value"]}<br>
  26435. </ul></code>
  26436. The data in the HTTP response looks like this:
  26437. <ul><pre>
  26438. {
  26439. "data": {
  26440. "34.4008.value": "0.25"
  26441. },
  26442. "status": {
  26443. "code": 0
  26444. },
  26445. "event": {
  26446. "type": 1,
  26447. "data": "48.30000.0"
  26448. }
  26449. }
  26450. </ul></pre>
  26451. the classic way to extract the value 0.25 into a reading with the name Chlor with a regex would have been
  26452. <ul><code>
  26453. attr test2 get01Regex 34.4008.value":[ \t]+"([\d\.]+)"
  26454. </ul></code>
  26455. with JSON you can write
  26456. <ul><code>
  26457. attr test2 get01JSON data_34.4008.value
  26458. </code></ul>
  26459. If you define an explicit json reading with the get01JSON or reading01JSON syntax and there is no full match, HTTPMOD will try to do a regex match using the defined string. If for example the json data contains an array like
  26460. <ul><code>
  26461. "modes":["Off","SimpleColor","RainbowChase","BobblySquares","Blobs","CuriousCat","Adalight","UDP","DMX"],
  26462. </code></ul>
  26463. a Configuration could be
  26464. <ul><code>
  26465. attr test2 get01Name ModesList
  26466. attr test2 get01JSON modes
  26467. </code></ul>
  26468. The result will be treated as a list just like a list of XPath matches or Regex matches.
  26469. So it will create readings ModlesList-1 ModesList-2 and so on as described above (simple Comfiguration).<br>
  26470. You can also define a recombineExpr to recombine the match list into one reading e.g. as
  26471. <ul><code>
  26472. attr test2 reading01RecombineExpr join ",", @matchlist
  26473. </code></ul>
  26474. If you don't care about the naming of your readings, you can simply extract all JSON data with
  26475. <ul><code>
  26476. attr test2 extractAllJSON
  26477. </ul></code>
  26478. which would apply to all data read from this device and create the following readings out of the HTTP response shown above:<br>
  26479. <ul><code>
  26480. data_34.4008.value 0.25 <br>
  26481. event_data 48.30000.0 <br>
  26482. event_type 1 <br>
  26483. status_code 0 <br>
  26484. </ul></code>
  26485. or you can specify
  26486. <ul><code>
  26487. attr test2 get01ExtractAllJSON
  26488. </ul></code>
  26489. which would only apply to all data read as response to the get command defined as get01.
  26490. </ul>
  26491. <br>
  26492. <a name="HTTPMODxpathconfiguration"></a>
  26493. <b>Parsing http / XML using xpath</b><br><br>
  26494. <ul>
  26495. Another alternative to regex parsing is the use of XPath to extract values from HTTP responses.<br>
  26496. The following example shows how XML data can be parsed with XPath-Strict or HTML Data can be parsed with XPath. <br>
  26497. Both work similar and the example uses XML Data parsed with the XPath-Strict option:
  26498. If The XML data in the HTTP response looks like this:
  26499. <ul><code>
  26500. &lt;root xmlns:foo=&quot;http://www.foo.org/&quot; xmlns:bar=&quot;http://www.bar.org&quot;&gt;<br>
  26501. &lt;actors&gt;<br>
  26502. &lt;actor id=&quot;1&quot;&gt;Peter X&lt;/actor&gt;<br>
  26503. &lt;actor id=&quot;2&quot;&gt;Charles Y&lt;/actor&gt;<br>
  26504. &lt;actor id=&quot;3&quot;&gt;John Doe&lt;/actor&gt;<br>
  26505. &lt;/actors&gt;<br>
  26506. &lt;/root&gt;
  26507. </ul></code>
  26508. with XPath you can write
  26509. <ul><code>
  26510. attr htest reading01Name Actor<br>
  26511. attr htest reading01XPath-Strict //actor[2]/text()
  26512. </ul></code>
  26513. This will create a reading with the Name "Actor" and the value "Charles Y".<br>
  26514. <br>
  26515. Since XPath specifications can define several values / matches, HTTPMOD can also interpret these and store them in
  26516. multiple readings:
  26517. <ul><code>
  26518. attr htest reading01Name Actor<br>
  26519. attr htest reading01XPath-Strict //actor/text()
  26520. </ul></code>
  26521. will create the readings
  26522. <ul><code>
  26523. Actor-1 Peter X<br>
  26524. Actor-2 Charles Y<br>
  26525. Actor-3 John Doe
  26526. </ul></code>
  26527. </ul>
  26528. <br>
  26529. <a name="HTTPMODreplacements"></a>
  26530. <b>Further replacements of URL, header or post data</b><br><br>
  26531. <ul>
  26532. sometimes it is helpful to dynamically change parts of a URL, HTTP header or post data depending on existing readings, internals or perl expressions at runtime. <br>
  26533. HTTPMOD has two built in replacements: one for values passed to a set or get command and the other one for the session id.<br>
  26534. Before a request is sent, the placeholder $val is replaced with the value that is passed in a set command or an optional value that can be passed in a get command (see getXTextArg). This value is internally stored in the internal "value" so it can also be used in a user defined replacement as explaind in this section.<br>
  26535. The other built in replacement is for the session id. If a session id is extracted via a regex, JSON or XPath the it is stored in the internal "sid" and the placeholder $sid in a URL, header or post data is replaced by the content of thus internal.
  26536. User defined replacement can exted this functionality and this might be needed to pass further variables to a server, a current date or other things. <br>
  26537. To support this HTTPMOD offers user defined replacements that are as well applied to a request before it is sent to the server.
  26538. A replacement can be defined with the attributes
  26539. <ul><code>
  26540. "replacement[0-9]*Regex "<br>
  26541. "replacement[0-9]*Mode "<br>
  26542. "replacement[0-9]*Value "<br>
  26543. "[gs]et[0-9]*Replacement[0-9]*Value "
  26544. </ul></code>
  26545. <br>
  26546. A replacement always replaces a match of a regular expression.
  26547. The way the replacement value is defined can be specified with the replacement mode. If the mode is <code>reading</code>,
  26548. then the value is interpreted as the name of a reading of the same device or as device:reading to refer to another device.
  26549. If the mode is <code>internal</code>, then the value is interpreted as the name of an internal of the same device or as device:internal to refer to another device.<br>
  26550. The mode <code>text</code> will use the value as a static text and the mode <code>expression</code> will evaluate the value as a perl expression to compute the replacement. Inside such a replacement expression it is possible to refer to capture groups of the replacement regex.<br>
  26551. The mode <code>key</code> will use a value from a key / value pair that is stored in an obfuscated form in the file system with the set storeKeyValue command. This might be useful for storing passwords.<br>
  26552. <br>
  26553. Example:
  26554. <ul><code>
  26555. attr mydevice getData {"get" :["%%value%%.value"]} <br>
  26556. attr mydevice replacement01Mode text <br>
  26557. attr mydevice replacement01Regex %%value%% <br>
  26558. <br>
  26559. attr mydevice get01Name Chlor <br>
  26560. attr mydevice get01Replacement01Value 34.4008 <br>
  26561. <br>
  26562. attr mydevice get02Name Something<br>
  26563. attr mydevice get02Replacement01Value 31.4024 <br>
  26564. <br>
  26565. attr mydevice get05Name profile <br>
  26566. attr mydevice get05URL http://www.mydevice.local/getprofile?password=%%password%% <br>
  26567. attr mydevice replacement02Mode key <br>
  26568. attr mydevice replacement02Regex %%password%% <br>
  26569. attr mydevice get05Replacement02Value password <br>
  26570. </ul></code>
  26571. defines that %%value%% will be replaced by a static text.<br>
  26572. All Get commands will be HTTP post requests of a similar form. Only the %%value%% will be different from get to get.<br>
  26573. The first get will set the reading named Chlor and for the request it will take the generic getData and replace %%value%% with 34.4008.<br>
  26574. A second get will look the same except a different name and replacement value. <br>
  26575. With the command <code>set storeKeyValue password geheim</code> you can store the password geheim in an obfuscated form in the file system. To use this password and send it in a request you can use the above replacement with mode key. The value password will then refer to the ofuscated string stored with the key password.<br>
  26576. <br>
  26577. HTTPMOD has two built in replacements: One for session Ids and another one for the input value in a set command.
  26578. The placeholder $sid is always replaced with the internal <code>$hash->{sid}</code> which contains the session id after it is extracted from a previous HTTP response. If you don't like to use the placeholder $sid the you can define your own replacement for example like:
  26579. <ul><code>
  26580. attr mydevice replacement01Mode internal<br>
  26581. attr mydevice replacement01Regex %session% <br>
  26582. attr mydevice replacement01Value sid<br>
  26583. </ul></code>
  26584. Now the internal <code>$hash->{sid}</code> will be used as a replacement for the placeholder %session%.<br>
  26585. <br>
  26586. In the same way a value that is passed to a set-command can be put into a request with a user defined replacement. In this case the internal <code>$hash->{value}</code> will contain the value passed to the set command. It might even be a string containing several values that could be put into several different positions in a request by using user defined replacements.
  26587. <br>
  26588. The mode expression allows you to define your own replacement syntax:
  26589. <ul><code>
  26590. attr mydevice replacement01Mode expression <br>
  26591. attr mydevice replacement01Regex {{([^}]+)}}<br>
  26592. attr mydevice replacement01Value ReadingsVal("mydevice", $1, "")<br>
  26593. attr mydevice getData {"get" :["{{temp}}.value"]}
  26594. </ul></code>
  26595. In this example any {{name}} in a URL, header or post data will be passed on to the perl function ReadingsVal
  26596. which uses the string between {{}} as second parameter. This way one defined replacement can be used for many different
  26597. readings.
  26598. </ul>
  26599. <br>
  26600. <a name="HTTPMODaging"></a>
  26601. <b>replacing reading values when they have not been updated / the device did not respond</b><br><br>
  26602. <ul>
  26603. If a device does not respond then the values stored in readings will keep the same and only their timestamp shows that they are outdated.
  26604. If you want to modify reading values that have not been updated for a number of seconds, you can use the attributes
  26605. <ul><code>
  26606. (reading|get)[0-9]*(-[0-9]+)?MaxAge<br>
  26607. (reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacementMode<br>
  26608. (reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacement<br>
  26609. </ul></code>
  26610. Every time the module tries to read from a device, it will also check if readings have not been updated
  26611. for longer than the MaxAge attributes allow. If readings are outdated, the MaxAgeReplacementMode defines how the affected
  26612. reading values should be replaced. MaxAgeReplacementMode can be <code>text</code>, <code>expression</code> or <code>delete</code>. <br>
  26613. MaxAge specifies the number of seconds that a reading should remain untouched before it is replaced. <br>
  26614. MaxAgeReplacement contains either a static text that is used as replacement value or a Perl expression that is evaluated to
  26615. give the replacement value. This can be used for example to replace a temperature that has not bee updated for more than 5 minutes
  26616. with the string "outdated - was 12":
  26617. <ul><code>
  26618. attr PM readingMaxAge 300<br>
  26619. attr PM readingMaxAgeReplacement "outdated - was " . $val <br>
  26620. attr PM readingMaxAgeReplacementMode expression
  26621. </ul></code>
  26622. The variable $val contains the value of the reading before it became outdated.<br>
  26623. If the mode is delete then the reading will be deleted if it has not been updated for the defined time.<br>
  26624. If you want to replace or delete a reading immediatley if a device doid not respond, simply set the maximum time to a number smaller than the update interval. Since the max age is checked after a HTTP request was either successful or it failed, the reading will always contain the read value or the replacement after a failed update.
  26625. </ul>
  26626. <br>
  26627. <a name="HTTPMODset"></a>
  26628. <b>Set-Commands</b><br>
  26629. <ul>
  26630. As defined by the attributes set.*Name<br>
  26631. If you set the attribute enableControlSet to 1, the following additional built in set commands are available:<br>
  26632. <ul>
  26633. <li><b>interval</b></li>
  26634. set new interval time in seconds and restart the timer<br>
  26635. <li><b>reread</b></li>
  26636. request the defined URL and try to parse it just like the automatic update would do it every Interval seconds
  26637. without modifying the running timer. <br>
  26638. <li><b>stop</b></li>
  26639. stop interval timer.<br>
  26640. <li><b>start</b></li>
  26641. restart interval timer to call GetUpdate after interval seconds<br>
  26642. <li><b>upgradeAttributes</b></li>
  26643. convert the attributes for this device from the old syntax to the new one.<br>
  26644. atributes with the description "this attribute should not be used anymore" or similar will be translated to the new syntax, e.g. readingsName1 to reading01Name.
  26645. <li><b>storeKeyValue</b></li>
  26646. stores a key value pair in an obfuscated form in the file system. Such values can then be used in replacements where
  26647. the mode is "key" e.g. to avoid storing passwords in the configuration in clear text<br>
  26648. </ul>
  26649. <br>
  26650. </ul>
  26651. <br>
  26652. <a name="HTTPMODget"></a>
  26653. <b>Get-Commands</b><br>
  26654. <ul>
  26655. as defined by the attributes get.*Name
  26656. </ul>
  26657. <br>
  26658. <a name="HTTPMODattr"></a>
  26659. <b>Attributes</b><br><br>
  26660. <ul>
  26661. <li><a href="#do_not_notify">do_not_notify</a></li>
  26662. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  26663. <br>
  26664. <li><b>reading[0-9]+Name</b></li>
  26665. the name of a reading to extract with the corresponding readingRegex, readingJSON, readingXPath or readingXPath-Strict<br>
  26666. Please note that the old syntax <b>readingsName.*</b> does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.
  26667. <li><b>(get|set)[0-9]+Name</b></li>
  26668. Name of a get or set command to be defined. If the HTTP response that is received after the command is parsed with an individual parse option then this name is also used as a reading name. Please note that no individual parsing needs to be defined for a get or set. If no regex, XPath or JSON is specified for the command, then HTTPMOD will try to parse the response using all the defined readingRegex, reading XPath or readingJSON attributes.
  26669. <li><b>(get|set|reading)[0-9]+Regex</b></li>
  26670. If this attribute is specified, the Regex defined here is used to extract the value from the HTTP Response
  26671. and assign it to a Reading with the name defined in the (get|set|reading)[0-9]+Name attribute.<br>
  26672. If this attribute is not specified for an individual Reading or get or set but without the numbers in the middle, e.g. as getRegex or readingRegex, then it applies to all the other readings / get / set commands where no specific Regex is defined.<br>
  26673. The value to extract should be in a capture group / sub expression e.g. ([\d\.]+) in the above example.
  26674. Multiple capture groups will create multiple readings (see explanation above)<br>
  26675. Using this attribute for a set command (setXXRegex) only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26676. Please note that the old syntax <b>readingsRegex.*</b> does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.
  26677. If for get or set commands neither a generic Regex attribute without numbers nor a specific (get|set)[0-9]+Regex attribute is specified and also no XPath or JSON parsing specification is given for the get or set command, then HTTPMOD tries to use the parsing definitions for general readings defined in reading[0-9]+Name, reading[0-9]+Regex or XPath or JSON attributes and assigns the Readings that match here.
  26678. <li><b>(get|set|reading)[0-9]+RegOpt</b></li>
  26679. Lets the user specify regular expression modifiers. For example if the same regular expression should be matched as often as possible in the HTTP response,
  26680. then you can specify RegOpt g which will case the matching to be done as /regex/g<br>
  26681. The results will be trated the same way as multiple capture groups so the reading name will be extended with -number.
  26682. For other possible regular expression modifiers see http://perldoc.perl.org/perlre.html#Modifiers
  26683. <li><b>(get|set|reading)[0-9]+XPath</b></li>
  26684. defines an xpath to one or more values when parsing HTML data (see examples above)<br>
  26685. Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26686. <li><b>get|set|reading[0-9]+XPath-Strict</b></li>
  26687. defines an xpath to one or more values when parsing XML data (see examples above)<br>
  26688. Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26689. <li><b>(get|set|reading)[0-9]+AutoNumLen</b></li>
  26690. In cases where a regular expression or an XPath results in multiple results and these results are stored in a common reading name with extension -number, then
  26691. you can modify the format of this number to have a fixed length with leading zeros. AutoNumLen 3 for example will lead to reading names ending with -001 -002 and so on.
  26692. <li><b>(reading|get|set)[0-9]*AlwaysNum</b></li>
  26693. if set to 1 this attributes forces reading names to end with a -1, -01 (depending on the above described AutoNumLen) even if just one value is parsed.
  26694. <li><b>get|set|reading[0-9]+JSON</b></li>
  26695. defines a path to the JSON object wanted by concatenating the object names. See the above example.<br>
  26696. If you don't know the paths, then start by using extractAllJSON and the use the names of the readings as values for the JSON attribute.<br>
  26697. Please don't forget to also specify a name for a reading, get or set.
  26698. Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26699. <li><b>(get|set|reading)[0-9]*RecombineExpr</b></li>
  26700. defines an expression that is used in an eval to compute one reading value out of the list of matches. <br>
  26701. This is supposed to be used for regexes or xpath specifications that produce multiple results if only one result that combines them is wanted. The list of matches will be in the variable @matchlist.<br>
  26702. Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26703. <li><b>get[0-9]*CheckAllReadings</b></li>
  26704. this attribute modifies the behavior of HTTPMOD when the HTTP Response of a get command is parsed. <br>
  26705. If this attribute is set to 1, then additionally to the matching of get specific regexe (get[0-9]*Regex), XPath or JSON
  26706. also all the reading names and parse definitions defined in Reading[0-9]+Name and Reading[0-9]+Regex, XPath or JSON attributes are checked and if they match, the coresponding Readings are assigned as well.<br>
  26707. This is automatically done if a get or set command is defined without its own parse attributes.
  26708. <br>
  26709. <li><b>(get|reading)[0-9]*OExpr</b></li>
  26710. defines an optional expression that is used in an eval to compute / format a readings value after parsing an HTTP response<br>
  26711. The raw value from the parsing will be in the variable $val.<br>
  26712. If specified as readingOExpr then the attribute value is a default for all other readings that don't specify an explicit reading[0-9]*Expr.<br>
  26713. Please note that the old syntax <b>readingsExpr.*</b> does not work with all features of HTTPMOD and should be avoided. It might go away in a future version of HTTPMOD.
  26714. <li><b>(get|reading)[0-9]*Expr</b></li>
  26715. This is the old syntax for (get|reading)[0-9]*OExpr. It should be replaced by (get|reading)[0-9]*OExpr. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.
  26716. <li><b>(get|reading)[0-9]*OMap</b></li>
  26717. Map that defines a mapping from raw value parsed to visible values like "0:mittig, 1:oberhalb, 2:unterhalb". <br>
  26718. If specified as readingOMap then the attribute value is a default for all other readings that don't specify
  26719. an explicit reading[0-9]*Map.<br>
  26720. The individual options in a map are separated by a komma and an optional space. Spaces are allowed to appear in a visible value however kommas are not possible.
  26721. <li><b>(get|reading)[0-9]*Map</b></li>
  26722. This is the old syntax for (get|reading)[0-9]*OMap. It should be replaced by (get|reading)[0-9]*OMap. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.
  26723. <li><b>(get|set|reading)[0-9]*Format</b></li>
  26724. Defines a format string that will be used in sprintf to format a reading value.<br>
  26725. If specified without the numbers in the middle e.g. as readingFormat then the attribute value is a default for all other readings that don't specify an explicit reading[0-9]*Format.
  26726. Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26727. <li><b>(get|set|reading)[0-9]*Decode</b></li>
  26728. defines an encoding to be used in a call to the perl function decode to convert the raw data string read from the device to a reading.
  26729. This can be used if the device delivers strings in an encoding like cp850 instead of utf8.<br>
  26730. If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.
  26731. Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26732. <li><b>(get|set|reading)[0-9]*Encode</b></li>
  26733. defines an encoding to be used in a call to the perl function encode to convert the raw data string read from the device to a reading.
  26734. This can be used if the device delivers strings in an encoding like cp850 and after decoding it you want to reencode it to e.g. utf8.
  26735. If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.
  26736. Using this attribute for a set command only makes sense if you want to parse the HTTP response to the HTTP request that the set command sent by defining the attribute setXXParseResponse.<br>
  26737. <br>
  26738. <li><b>(get|set)[0-9]*URL</b></li>
  26739. URL to be requested for the get or set command.
  26740. If this option is missing, the URL specified during define will be used.
  26741. <li><b>(get|set)[0-9]*Data</b></li>
  26742. optional data to be sent to the device as POST data when the get oer set command is executed.
  26743. if this attribute is specified, an HTTP POST method will be sent instead of an HTTP GET
  26744. <li><b>(get|set)[0-9]*NoData</b></li>
  26745. can be used to override a more generic attribute that specifies POST data for all get commands.
  26746. With NoData no data is sent and therefor the request will be an HTTP GET.
  26747. <li><b>(get|set)[0-9]*Header.*</b></li>
  26748. optional HTTP Headers to be sent to the device when the get or set command is executed
  26749. <li><b>requestHeader.*</b></li>
  26750. Define an optional additional HTTP Header to set in the HTTP request <br>
  26751. <li><b>requestData</b></li>
  26752. optional POST Data to be sent in the request. If not defined, it will be a GET request as defined in HttpUtils used by this module<br>
  26753. <br>
  26754. <li><b>get[0-9]+Poll</b></li>
  26755. if set to 1 the get is executed automatically during the normal update cycle (after the interval provided in the define command has elapsed)
  26756. <li><b>get[0-9]+PollDelay</b></li>
  26757. if the value should not be read in each iteration (after the interval given to the define command), then a
  26758. minimum delay can be specified with this attribute. This has only an effect if the above Poll attribute has
  26759. also been set. Every time the update function is called, it checks if since this get has been read the last time, the defined delay has elapsed. If not, then it is skipped this time.<br>
  26760. PollDelay can be specified as seconds or as x[0-9]+ which means a multiple of the interval in the define command.
  26761. <br>
  26762. <li><b>(get|set)[0-9]*TextArg</b></li>
  26763. For a get command this defines that the command accepts a text value after the option name.
  26764. By default a get command doesn't accept optional values after the command name.
  26765. If TextArg is specified and a value is passed after the get name then this value can then be used in a request URL, header or data
  26766. as replacement for $val or in a user defined replacement that uses the internal "value" ($hash->{value}).<br>
  26767. If used for a set command then it defines that the value to be set doesn't require any validation / conversion.
  26768. The raw value is passed on as text to the device. By default a set command expects a numerical value or a text value that is converted to a numeric value using a map.
  26769. <li><b>set[0-9]+Min</b></li>
  26770. Minimum value for input validation.
  26771. <li><b>set[0-9]+Max</b></li>
  26772. Maximum value for input validation.
  26773. <li><b>set[0-9]+IExpr</b></li>
  26774. Perl Expression to compute the raw value to be sent to the device from the input value passed to the set.
  26775. <li><b>set[0-9]+Expr</b></li>
  26776. This is the old syntax for (get|reading)[0-9]*IExpr. It should be replaced by (get|reading)[0-9]*IExpr. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.
  26777. <li><b>set[0-9]+IMap</b></li>
  26778. Map that defines a mapping from raw to visible values like "0:mittig, 1:oberhalb, 2:unterhalb". This attribute atomatically creates a hint for FhemWEB so the user can choose one of the visible values and HTTPMOD sends the raw value to the device.
  26779. <li><b>set[0-9]+Map</b></li>
  26780. This is the old syntax for (get|reading)[0-9]*IMap. It should be replaced by (get|reading)[0-9]*IMap. The set command upgradeAttributes which becomes visible when the attribute enableControlSet is set to 1, can do this renaming automatically.
  26781. <li><b>set[0-9]+Hint</b></li>
  26782. Explicit hint for fhemWEB that will be returned when set ? is seen.
  26783. <li><b>set[0-9]*NoArg</b></li>
  26784. Defines that this set option doesn't require arguments. It allows sets like "on" or "off" without further values.
  26785. <li><b>set[0-9]*ParseResponse</b></li>
  26786. defines that the HTTP response to the set will be parsed as if it was the response to a get command.
  26787. <br>
  26788. <li><b>(get|set)[0-9]*URLExpr</b></li>
  26789. Defines a Perl expression to specify the HTTP Headers for this request. This overwrites any other header specification and should be used carefully only if needed. The original Header is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the "replacement" attributes if you want to pass additional variable data to a web service.
  26790. <li><b>(get|set)[0-9]*DatExpr</b></li>
  26791. Defines a Perl expression to specify the HTTP Post data for this request. This overwrites any other post data specification and should be used carefully only if needed. The original Data is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the "replacement" attributes if you want to pass additional variable data to a web service.
  26792. <li><b>(get|set)[0-9]*HdrExpr</b></li>
  26793. Defines a Perl expression to specify the URL for this request. This overwrites any other URL specification and should be used carefully only if needed. The original URL is availabe as $old. Typically this feature is not needed and it might go away in future versions of HTTPMOD. Please use the "replacement" attributes if you want to pass additional variable data to a web service.
  26794. <br>
  26795. <li><b>set[0-9]*ReAuthRegex</b></li>
  26796. Regex that will detect when a session has expired during a set operation and a new login needs to be performed.
  26797. It works like the global reAuthRegex but is used for set operations.
  26798. <li><b>reAuthRegex</b></li>
  26799. regular Expression to match an error page indicating that a session has expired and a new authentication for read access needs to be done.
  26800. This attribute only makes sense if you need a forms based authentication for reading data and if you specify a multi step login procedure based on the sid.. attributes.<br>
  26801. This attribute is used for all requests. For set operations you can however specify individual reAuthRegexes with the set[0-9]*ReAuthRegex attributes.
  26802. <li><b>reAuthAlways</b></li>
  26803. if set to 1 will force authentication requests defined in the sid-attributes to be sent before each getupdate, get or set.
  26804. <br><br>
  26805. <li><b>sid[0-9]*URL</b></li>
  26806. different URLs or one common URL to be used for each step of an optional login procedure.
  26807. <li><b>sid[0-9]*IdRegex</b></li>
  26808. different Regexes per login procedure step or one common Regex for all steps to extract the session ID from the HTTP response
  26809. <li><b>sid[0-9]*Data.*</b></li>
  26810. data part for each step to be sent as POST data to the corresponding URL
  26811. <li><b>sid[0-9]*Header.*</b></li>
  26812. HTTP Headers to be sent to the URL for the corresponding step
  26813. <li><b>sid[0-9]*IgnoreRedirects</b></li>
  26814. tell HttpUtils to not follow redirects for this authentication request
  26815. <li><b>clearSIdBeforeAuth</b></li>
  26816. will set the session id to "" before doing the authentication steps
  26817. <li><b>authRetries</b></li>
  26818. number of retries for authentication procedure - defaults to 1
  26819. <br>
  26820. <li><b>replacement[0-9]*Regex</b></li>
  26821. Defines a replacement to be applied to an HTTP request header, data or URL before it is sent. This allows any part of the request to be modified based on a reading, an internal or an expression.
  26822. The regex defines which part of a header, data or URL should be replaced. The replacement is defined with the following attributes:
  26823. <li><b>replacement[0-9]*Mode</b></li>
  26824. Defines how the replacement should be done and what replacementValue means. Valid options are text, reading, internal and expression.
  26825. <li><b>replacement[0-9]*Value</b></li>
  26826. Defines the replacement. If the corresponding replacementMode is <code>text</code>, then value is a static text that is used as the replacement.<br>
  26827. If replacementMode is <code>reading</code> then Value can be the name of a reading of this device or it can be a reading of a different device referred to by devicename:reading.<br>
  26828. If replacementMode is <code>internal</code> the Value can be the name of an internal of this device or it can be an internal of a different device referred to by devicename:internal.<br>
  26829. If replacementMode is <code>expression</code> the the Value is treated as a Perl expression that computes the replacement value. The expression can use $1, $2 and so on to refer to capture groups of the corresponding regex that is matched against the original URL, header or post data.<br>
  26830. If replacementMode is <code>key</code> then the module will use a value from a key / value pair that is stored in an obfuscated form in the file system with the set storeKeyValue command. This might be useful for storing passwords.
  26831. <li><b>[gs]et[0-9]*Replacement[0-9]*Value</b></li>
  26832. This attribute can be used to override the replacement value for a specific get or set.
  26833. <br>
  26834. <li><b>get|reading[0-9]*MaxAge</b></li>
  26835. Defines how long a reading is valid before it is automatically overwritten with a replacement when the read function is called the next time.
  26836. <li><b>get|reading[0-9]*MaxAgeReplacement</b></li>
  26837. specifies the replacement for MaxAge - either as a static text, the name of a reading / internal or as a perl expression.<br>
  26838. If MaxAgeReplacementMode is <code>reading</code> then the value of MaxAgeReplacement can be the name of a reading of this device or it can be a reading of a different device referred to by devicename:reading.<br>
  26839. If MaxAgeReplacementMode is <code>internal</code> the value of MaxAgeReplacement can be the name of an internal of this device or it can be an internal of a different device referred to by devicename:internal.
  26840. <li><b>get|reading[0-9]*MaxAgeReplacementMode</b></li>
  26841. specifies how the replacement is interpreted: can be text, reading, internal, expression and delete.
  26842. <br>
  26843. <li><b>get|reading[0-9]*DeleteIfUnmatched</b></li>
  26844. If set to 1 this attribute causes certain readings to be deleted when the parsing of the website does not match the specified reading. Internally HTTPMOD remembers which kind of operation created a reading (update, Get01, Get02 and so on). Specified readings will only be deleted if the same operation does not parse this reading again. This is especially useful for parsing that creates several matches / readings and this number of matches can vary from request to request. For example if reading01Regex creates 4 readings in one update cycle and in the next cycle it only matches two times then the readings containing the remaining values from the last round will be deleted.<br>
  26845. Please note that this mechanism will not work in all cases after a restart. Especially when a get definition does not contain its own parsing definition but ExtractAllJSON or relies on HTTPMOD to use all defined reading.* attributes to parse the responsee to a get command, old readings might not be deleted after a restart of fhem.
  26846. <li><b>get|reading[0-9]*DeleteOnError</b></li>
  26847. If set to 1 this attribute causes certain readings to be deleted when the website can not be reached and the HTTP request returns an error. Internally HTTPMOD remembers which kind of operation created a reading (update, Get01, Get02 and so on). Specified readings will only be deleted if the same operation returns an error. <br>
  26848. The same restrictions as for DeleteIfUnmatched apply regarding a fhem restart.
  26849. <br>
  26850. <li><b>httpVersion</b></li>
  26851. defines the HTTP-Version to be sent to the server. This defaults to 1.0.
  26852. <li><b>sslVersion</b></li>
  26853. defines the SSL Version for the negotiation with the server. The attribute is evaluated by HttpUtils. If it is not specified, HttpUtils assumes SSLv23:!SSLv3:!SSLv2
  26854. <li><b>sslArgs</b></li>
  26855. defines a list that is converted to a key / value hash and gets passed to HttpUtils. To avoid certificate validation for broken servers you can for example specify
  26856. <code>attr myDevice sslArgs SSL_verify_mode,SSL_VERIFY_NONE</code>
  26857. <li><b>noShutdown</b></li>
  26858. pass the noshutdown flag to HTTPUtils for webservers that need it (some embedded webservers only deliver empty pages otherwise)
  26859. <li><b>disable</b></li>
  26860. stop communication with the Web_Server with HTTP requests while this attribute is set to 1
  26861. <li><b>enableControlSet</b></li>
  26862. enables the built in set commands interval, stop, start, reread, upgradeAttributes, storeKeyValue.
  26863. <li><b>enableCookies</b></li>
  26864. enables the built cookie handling if set to 1. With cookie handling each HTTPMOD device will remember cookies that the server sets and send them back to the server in the following requests.
  26865. This simplifies session magamenet in cases where the server uses a session ID in a cookie. In such cases enabling Cookies should be sufficient and no sidRegex and no manual definition of a Cookie Header should be necessary.
  26866. <li><b>showMatched</b></li>
  26867. if set to 1 then HTTPMOD will create a reading with the name MATCHED_READINGS
  26868. that contains the names of all readings that could be matched in the last request.
  26869. <li><b>showError</b></li>
  26870. if set to 1 then HTTPMOD will create a reading and event with the Name LAST_ERROR
  26871. that contains the error message of the last error returned from HttpUtils.
  26872. <li><b>removeBuf</b></li>
  26873. if set to 1 then HTTPMOD removes the internal named buf when a HTTP-response has been
  26874. received. $hash->{buf} is used internally be Fhem httpUtils and in some use cases it is desireable to remove this internal after reception because it contains a very long response which looks ugly in Fhemweb.
  26875. <li><b>timeout</b></li>
  26876. time in seconds to wait for an answer. Default value is 2
  26877. <li><b>queueDelay</b></li>
  26878. HTTP Requests will be sent from a queue in order to avoid blocking when several Requests have to be sent in sequence. This attribute defines the delay between calls to the function that handles the send queue. It defaults to one second.
  26879. <li><b>queueMax</b></li>
  26880. Defines the maximum size of the send queue. If it is reached then further HTTP Requests will be dropped and not be added to the queue
  26881. <li><b>minSendDelay</b></li>
  26882. Defines the minimum time between two HTTP Requests.
  26883. <br>
  26884. <li><b>alignTime</b></li>
  26885. Aligns each periodic read request for the defined interval to this base time. This is typcally something like 00:00 (see the Fhem at command)
  26886. <br>
  26887. <li><b>enableXPath</b></li>
  26888. This attribute should no longer be used. Please specify an HTTP XPath in the dedicated attributes shown above.
  26889. <li><b>enableXPath-Strict</b></li>
  26890. This attribute should no longer be used. Please specify an XML XPath in the dedicated attributes shown above.
  26891. <li><b>parseFunction1</b> and <b>parseFunction2</b></li>
  26892. These functions allow an experienced Perl / Fhem developer to plug in his own parsing functions.<br>
  26893. Please look into the module source to see how it works and don't use them if you are not sure what you are doing.
  26894. <li><b>Remarks regarding the automatically created userattr entries</b></li>
  26895. Fhemweb allows attributes to be edited by clicking on them. However this does not work for attributes that match to a wildcard attribute. To circumvent this restriction HTTPMOD automatically adds an entry for each instance of a defined wildcard attribute to the device userattr list. E.g. if you define a reading[0-9]Name attribute as reading01Name, HTTPMOD will add reading01Name to the device userattr list. These entries only have the purpose of making editing in Fhemweb easier.
  26896. </ul>
  26897. <br>
  26898. <b>Author's notes</b><br><br>
  26899. <ul>
  26900. <li>If you don't know which URLs, headers or POST data your web GUI uses, you might try a local proxy like <a href=http://portswigger.net/burp/>BurpSuite</a> to track requests and responses </li>
  26901. </ul>
  26902. </ul>
  26903. <a name="HTTPSRV"></a>
  26904. <h3>HTTPSRV</h3>
  26905. <ul>
  26906. Provides a mini HTTP server plugin for FHEMWEB. It serves files from a given directory.
  26907. It optionally accepts a query string to set readings of this device if an attribute allows the given reading<p>
  26908. HTTPSRV is an extension to <a href="HTTPSRV">FHEMWEB</a>. You must install FHEMWEB to use HTTPSRV.</p>
  26909. <a name="HTTPSRVdefine"></a>
  26910. <b>Define</b>
  26911. <ul>
  26912. <code>define &lt;name&gt; &lt;infix&gt; &lt;directory&gt; &lt;friendlyname&gt;</code><br><br>
  26913. Defines the HTTP server. <code>&lt;infix&gt;</code> is the portion behind the FHEMWEB base URL (usually
  26914. <code>http://hostname:8083/fhem</code>), <code>&lt;directory&gt;</code> is the absolute path the
  26915. files are served from, and <code>&lt;friendlyname&gt;</code> is the name displayed in the side menu of FHEMWEB.<p><p>
  26916. Example:
  26917. <ul>
  26918. <code>define myJSFrontend HTTPSRV jsf /usr/share/jsfrontend My little frontend</code><br>
  26919. or <br>
  26920. <code>
  26921. define kindleweb HTTPSRV kindle /opt/fhem/kindle Kindle Web<br>
  26922. attr kindleweb readings KindleBatt
  26923. </code><br>
  26924. </ul>
  26925. <br>
  26926. </ul>
  26927. <a name="HTTPSRVset"></a>
  26928. <b>Set</b>
  26929. <ul>
  26930. n/a
  26931. </ul>
  26932. <br><br>
  26933. <a name="HTTPSRVattr"></a>
  26934. <b>Attributes</b>
  26935. <br><br>
  26936. <ul>
  26937. <li>directoryindex: if the request is sent with no filename, i.e. the infix (with or without trailing slash) only, the file given in this attribute is loaded. Defaults to <code>index.html</code>.</li>
  26938. <li>readings: a comma separated list of reading names. If the request ends with a querystring like <code>?Batt=43</code> and an attribute is set like <code>attr kindleweb readings Batt</code>, then a reading with the Name of this Attribute (here Batt) is created with the value from the request.</li>
  26939. </ul>
  26940. <br><br>
  26941. <b>Usage information</b>
  26942. <br><br>
  26943. <ul>
  26944. The above example on <code>http://hostname:8083/fhem</code> will return the file
  26945. <code>/usr/share/jsfrontend/foo.html</code> for <code>http://hostname:8083/fhem/jsf/foo.html</code>.
  26946. If no filename is given, the filename prescribed by the <code>directoryindex</code> attribute is returned.<p>
  26947. Notice: All links are relative to <code>http://hostname:8083/fhem</code>.
  26948. </ul>
  26949. <br><br>
  26950. </ul>
  26951. <a name="HUEBridge"></a>
  26952. <h3>HUEBridge</h3>
  26953. <ul>
  26954. Module to access the bridge of the phillips hue lighting system.<br><br>
  26955. The actual hue bulbs, living colors or living whites devices are defined as <a href="#HUEDevice">HUEDevice</a> devices.
  26956. <br><br>
  26957. All newly found devices and groups are autocreated at startup and added to the room HUEDevice.
  26958. <br><br>
  26959. Notes:
  26960. <ul>
  26961. <li>This module needs <code>JSON</code>.<br>
  26962. Please install with '<code>cpan install JSON</code>' or your method of choice.</li>
  26963. </ul>
  26964. <br><br>
  26965. <a name="HUEBridge_Define"></a>
  26966. <b>Define</b>
  26967. <ul>
  26968. <code>define &lt;name&gt; HUEBridge [&lt;host&gt;] [&lt;interval&gt;]</code><br>
  26969. <br>
  26970. Defines a HUEBridge device with address &lt;host&gt;.<br><br>
  26971. If [&lt;host&gt;] is not given the module will try to autodetect the bridge with the hue portal services.<br><br>
  26972. The bridge status will be updated every &lt;interval&gt; seconds. The default and minimum is 60.<br><br>
  26973. After a new bridge is created the pair button on the bridge has to be pressed.<br><br>
  26974. Examples:
  26975. <ul>
  26976. <code>define bridge HUEBridge 10.0.1.1</code><br>
  26977. </ul>
  26978. </ul><br>
  26979. <a name="HUEBridge_Get"></a>
  26980. <b>Get</b>
  26981. <ul>
  26982. <li>lights<br>
  26983. list the lights known to the bridge.</li>
  26984. <li>groups<br>
  26985. list the groups known to the bridge.</li>
  26986. <li>scenes [detail]<br>
  26987. list the scenes known to the bridge.</li>
  26988. <li>rule &lt;id&gt; <br>
  26989. list the rule with &lt;id&gt;.</li>
  26990. <li>rules [detail] <br>
  26991. list the rules known to the bridge.</li>
  26992. <li>sensors [detail] <br>
  26993. list the sensors known to the bridge.</li>
  26994. <li>whitelist<br>
  26995. list the whitlist of the bridge.</li>
  26996. </ul><br>
  26997. <a name="HUEBridge_Set"></a>
  26998. <b>Set</b>
  26999. <ul>
  27000. <li>autocreate<br>
  27001. Create fhem devices for all bridge devices.</li>
  27002. <li>autodetect<br>
  27003. Initiate the detection of new ZigBee devices. After aproximately one minute any newly detected
  27004. devices can be listed with <code>get <bridge> devices</code> and the corresponding fhem devices
  27005. can be created by <code>set <bridge> autocreate</code>.</li>
  27006. <li>delete &lt;name&gt;|&lt;id&gt;<br>
  27007. Deletes the given device in the bridge and deletes the associated fhem device.</li>
  27008. <li>creategroup &lt;name&gt; &lt;lights&gt;<br>
  27009. Create a group out of &lt;lights&gt; in the bridge.
  27010. The lights are given as a comma sparated list of fhem device names or bridge light numbers.</li>
  27011. <li>deletegroup &lt;name&gt;|&lt;id&gt;<br>
  27012. Deletes the given group in the bridge and deletes the associated fhem device.</li>
  27013. <li>savescene &lt;name&gt; &lt;lights&gt;<br>
  27014. Create a scene from the current state of &lt;lights&gt; in the bridge.
  27015. The lights are given as a comma sparated list of fhem device names or bridge light numbers.</li>
  27016. <li>modifyscene &lt;id&gt; &lt;light&gt; &lt;light-args&gt;<br>
  27017. Modifys the given scene in the bridge.</li>
  27018. <li>scene &lt;id&gt;<br>
  27019. Recalls the scene with the given id.</li>
  27020. <li>createrule &lt;name&gt; &lt;conditions&amp;actions json&gt;<br>
  27021. Creates a new rule in the bridge.</li>
  27022. <li>deleterule &lt;id&gt;<br>
  27023. Deletes the given rule in the bridge.</li>
  27024. <li>createsensor &lt;name&gt; &lt;type&gt; &lt;uniqueid&gt; &lt;swversion&gt; &lt;modelid&gt;<br>
  27025. Creates a new CLIP (IP) sensor in the bridge.</li>
  27026. <li>deletesensor &lt;id&gt;<br>
  27027. Deletes the given sensor in the bridge and deletes the associated fhem device.</li>
  27028. <li>configsensor &lt;id&gt; &lt;json&gt;<br>
  27029. Write sensor config data.</li>
  27030. <li>setsensor &lt;id&gt; &lt;json&gt;<br>
  27031. Write CLIP sensor status data.</li>
  27032. <li>deletewhitelist &lt;key&gt;<br>
  27033. Deletes the given key from the whitelist in the bridge.</li>
  27034. <li>touchlink<br>
  27035. perform touchlink action</li>
  27036. <li>checkforupdate<br>
  27037. perform checkforupdate action</li>
  27038. <li>statusRequest<br>
  27039. Update bridge status.</li>
  27040. <li>swupdate<br>
  27041. Update bridge firmware. This command is only available if a new firmware is
  27042. available (indicated by updatestate with a value of 2. The version and release date is shown in the reading swupdate.<br>
  27043. A notify of the form <code>define HUEUpdate notify bridge:swupdate.* {...}</code>
  27044. can be used to be informed about available firmware updates.<br></li>
  27045. <li>inactive<br>
  27046. inactivates the current device. note the slight difference to the
  27047. disable attribute: using set inactive the state is automatically saved
  27048. to the statefile on shutdown, there is no explicit save necesary.<br>
  27049. this command is intended to be used by scripts to temporarily
  27050. deactivate the harmony device.<br>
  27051. the concurrent setting of the disable attribute is not recommended.</li>
  27052. <li>active<br>
  27053. activates the current device (see inactive).</li>
  27054. </ul><br>
  27055. <a name="HUEBridge_Attr"></a>
  27056. <b>Attributes</b>
  27057. <ul>
  27058. <li><a href="#disable">disable</a></li>
  27059. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  27060. <li>pollDevices<br>
  27061. 1 -> the bridge will poll all lights in one go instead of each device polling itself independently<br>
  27062. 2 -> the bridge will poll all devices in one go instead of each device polling itself independently<br>
  27063. default is 1.</li>
  27064. <li>queryAfterSet<br>
  27065. the bridge will request the real device state after a set command. default is 1.</li>
  27066. <li>noshutdown<br>
  27067. Some bridge devcies require a different type of connection handling. raspbee/deconz only works if the connection
  27068. is not immediately closed, the phillips hue bridge works better if the connection is immediately closed. This module
  27069. tries to autodetect the bridge device type. the type of connection handling can be seen in the noshutdown internal
  27070. and can be overwritten with the noshutdown attribute.</li>
  27071. </ul><br>
  27072. </ul><br>
  27073. <a name="HUEDevice"></a>
  27074. <h3>HUEDevice</h3>
  27075. <ul>
  27076. <br>
  27077. <a name="HUEDevice_Define"></a>
  27078. <b>Define</b>
  27079. <ul>
  27080. <code>define &lt;name&gt; HUEDevice [group|sensor] &lt;id&gt; [&lt;interval&gt;]</code><br>
  27081. <br>
  27082. Defines a device connected to a <a href="#HUEBridge">HUEBridge</a>.<br><br>
  27083. This can be a hue bulb, a living colors light or a living whites bulb or dimmer plug.<br><br>
  27084. The device status will be updated every &lt;interval&gt; seconds. 0 means no updates.
  27085. The default and minimum is 60 if the IODev has not set pollDevices to 1.
  27086. The default ist 0 if the IODev has set pollDevices to 1.
  27087. Groups are updated only on definition and statusRequest<br><br>
  27088. Examples:
  27089. <ul>
  27090. <code>define bulb HUEDevice 1</code><br>
  27091. <code>define LC HUEDevice 2</code><br>
  27092. <code>define allLights HUEDevice group 0</code><br>
  27093. </ul>
  27094. </ul><br>
  27095. <a name="HUEDevice_Readings"></a>
  27096. <b>Readings</b>
  27097. <ul>
  27098. <li>bri<br>
  27099. the brightness reported from the device. the value can be betwen 1 and 254</li>
  27100. <li>colormode<br>
  27101. the current colormode</li>
  27102. <li>ct<br>
  27103. the colortemperature in mireds and kelvin</li>
  27104. <li>hue<br>
  27105. the current hue</li>
  27106. <li>pct<br>
  27107. the current brightness in percent</li>
  27108. <li>onoff<br>
  27109. the current on/off state as 0 or 1</li>
  27110. <li>sat<br>
  27111. the current saturation</li>
  27112. <li>xy<br>
  27113. the current xy color coordinates</li>
  27114. <li>state<br>
  27115. the current state</li>
  27116. <br>
  27117. Notes:
  27118. <ul>
  27119. <li>with current bridge firware versions groups have <code>all_on</code> and <code>any_on</code> readings,
  27120. with older firmware versions groups have no readings.</li>
  27121. <li>not all readings show the actual device state. all readings not related to the current colormode have to be ignored.</li>
  27122. <li>the actual state of a device controlled by a living colors or living whites remote can be different and will
  27123. be updated after some time.</li>
  27124. </ul><br>
  27125. </ul><br>
  27126. <a name="HUEDevice_Set"></a>
  27127. <b>Set</b>
  27128. <ul>
  27129. <li>on [&lt;ramp-time&gt;]</li>
  27130. <li>off [&lt;ramp-time&gt;]</li>
  27131. <li>toggle [&lt;ramp-time&gt;]</li>
  27132. <li>statusRequest<br>
  27133. Request device status update.</li>
  27134. <li>pct &lt;value&gt; [&lt;ramp-time&gt;]<br>
  27135. dim to &lt;value&gt;<br>
  27136. Note: the FS20 compatible dimXX% commands are also accepted.</li>
  27137. <li>color &lt;value&gt;<br>
  27138. set colortemperature to &lt;value&gt; kelvin.</li>
  27139. <li>bri &lt;value&gt; [&lt;ramp-time&gt;]<br>
  27140. set brighness to &lt;value&gt;; range is 0-254.</li>
  27141. <li>dimUp [delta]</li>
  27142. <li>dimDown [delta]</li>
  27143. <li>ct &lt;value&gt; [&lt;ramp-time&gt;]<br>
  27144. set colortemperature to &lt;value&gt; in mireds (range is 154-500) or kelvin (rankge is 2000-6493).</li>
  27145. <li>ctUp [delta]</li>
  27146. <li>ctDown [delta]</li>
  27147. <li>hue &lt;value&gt; [&lt;ramp-time&gt;]<br>
  27148. set hue to &lt;value&gt;; range is 0-65535.</li>
  27149. <li>humUp [delta]</li>
  27150. <li>humDown [delta]</li>
  27151. <li>sat &lt;value&gt; [&lt;ramp-time&gt;]<br>
  27152. set saturation to &lt;value&gt;; range is 0-254.</li>
  27153. <li>satUp [delta]</li>
  27154. <li>satDown [delta]</li>
  27155. <li>xy &lt;x&gt;,&lt;y&gt; [&lt;ramp-time&gt;]<br>
  27156. set the xy color coordinates to &lt;x&gt;,&lt;y&gt;</li>
  27157. <li>alert [none|select|lselect]</li>
  27158. <li>effect [none|colorloop]</li>
  27159. <li>transitiontime &lt;time&gt;<br>
  27160. set the transitiontime to &lt;time&gt; 1/10s</li>
  27161. <li>rgb &lt;rrggbb&gt;<br>
  27162. set the color to (the nearest equivalent of) &lt;rrggbb&gt;</li>
  27163. <br>
  27164. <li>delayedUpdate</li>
  27165. <li>immediateUpdate</li>
  27166. <br>
  27167. <li>savescene &lt;id&gt;</li>
  27168. <li>deletescene &lt;id&gt;</li>
  27169. <li>scene</li>
  27170. <br>
  27171. <li>lights &lt;lights&gt;<br>
  27172. Only valid for groups. Changes the list of lights in this group.
  27173. The lights are given as a comma sparated list of fhem device names or bridge light numbers.</li>
  27174. <li>rename &lt;new name&gt;<br>
  27175. Renames the device in the bridge and changes the fhem alias.</li>
  27176. <br>
  27177. <li><a href="#setExtensions"> set extensions</a> are supported.</li>
  27178. <br>
  27179. Note:
  27180. <ul>
  27181. <li>&lt;ramp-time&gt; is given in seconds</li>
  27182. <li>multiple paramters can be set at once separated by <code>:</code><br>
  27183. Examples:<br>
  27184. <code>set LC on : transitiontime 100</code><br>
  27185. <code>set bulb on : bri 100 : color 4000</code><br></li>
  27186. </ul>
  27187. </ul><br>
  27188. <a name="HUEDevice_Get"></a>
  27189. <b>Get</b>
  27190. <ul>
  27191. <li>rgb</li>
  27192. <li>RGB</li>
  27193. <li>devStateIcon<br>
  27194. returns html code that can be used to create an icon that represents the device color in the room overview.</li>
  27195. </ul><br>
  27196. <a name="HUEDevice_Attr"></a>
  27197. <b>Attributes</b>
  27198. <ul>
  27199. <li>color-icon<br>
  27200. 1 -> use lamp color as icon color and 100% shape as icon shape<br>
  27201. 2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
  27202. <li>createActionReadings<br>
  27203. create readings for the last action in group devices</li>
  27204. <li>ignoreReachable<br>
  27205. ignore the reachable state that is reported by the hue bridge. assume the device is allways reachable.</li>
  27206. <li>setList<br>
  27207. The list of know set commands for sensor type devices. one command per line, eg.: <code><br>
  27208. attr mySensor setList present:{&lt;json&gt;}\<br>
  27209. absent:{&lt;json&gt;}</code></li>
  27210. <li>subType<br>
  27211. extcolordimmer -> device has rgb and color temperatur control<br>
  27212. colordimmer -> device has rgb controll<br>
  27213. ctdimmer -> device has color temperature control<br>
  27214. dimmer -> device has brightnes controll<br>
  27215. switch -> device has on/off controll<br></li>
  27216. <li>transitiontime<br>
  27217. default transitiontime for all set commands if not specified directly in the set.</li>
  27218. <li>delayedUpdate<br>
  27219. 1 -> the update of the device status after a set command will be delayed for 1 second. usefull if multiple devices will be switched.
  27220. </li>
  27221. <li>devStateIcon<br>
  27222. will be initialized to <code>{(HUEDevice_devStateIcon($name),"toggle")}</code> to show device color as default in room overview.</li>
  27223. <li>webCmd<br>
  27224. will be initialized to a device specific value according to subType.</li>
  27225. </ul>
  27226. </ul><br>
  27227. <a name="HXB"></a>
  27228. <h3>HXB</h3>
  27229. <ul>
  27230. <br>
  27231. <a name="HXB"></a>
  27232. <b>Define</b>
  27233. <ul>
  27234. <code>define &lt;name&gt; HXB</code><br>
  27235. <br>
  27236. Defines a Hexabus. You need one Hexabus to receive multicast messages from <a href="#HXBDevice">Hexabus devices</a>.
  27237. Have a look at the <a href="https://github.com/mysmartgrid/hexabus/wiki">Hexabus wiki</a> for more information on Hexabus.
  27238. <br><br>
  27239. You need the perl modules IO::Socket::Multicast6 and Digest::CRC. Under Debian and its derivatives they are installed with <code>apt-get install libio-socket-multicast6-perl libdigest-crc-perl</code>.
  27240. </ul>
  27241. </ul>
  27242. <a name="HXBDevice"></a>
  27243. <h3>HXBDevice</h3>
  27244. <ul>
  27245. <br>
  27246. <a name="HXB"></a>
  27247. <b>Define</b>
  27248. <ul>
  27249. <code>define &lt;name&gt; HXB &lt;IPv6Address&gt;</code><br>
  27250. <br>
  27251. Defines a Hexabus device at the IPv6 address &lt;IPv6Address&gt;. You need one <a href="#HXB">Hexabus</a>
  27252. to receive multicast messages from Hexabus devices.
  27253. Have a look at the <a href="https://github.com/mysmartgrid/hexabus/wiki">Hexabus wiki</a> for more information on Hexabus.
  27254. <br><br>
  27255. Example:
  27256. <code>define myPlug fd01:1::50:c4ff:fe04:81ad</code>
  27257. </ul>
  27258. </ul>
  27259. <a name="Heating_Control"></a>
  27260. <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  27261. <h3>Heating Control</h3>
  27262. <ul>
  27263. <br>
  27264. <a name="Heating_Controldefine"></a>
  27265. <b>Define</b>
  27266. <ul>
  27267. <code>define &lt;name&gt; Heating_Control &lt;device&gt; [&lt;language&gt;] [<u>weekdays</u>] &lt;profile&gt; [&lt;command&gt;|&lt;condition&gt;]</code>
  27268. <br><br>
  27269. to set a weekly profile for &lt;device&gt;, eg. a heating sink.<br>
  27270. You can define different switchingtimes for every day.<br>
  27271. The new temperature is sent to the &lt;device&gt; automatically with <br><br>
  27272. <code>set &lt;device&gt; (desired-temp|desiredTemperature) &lt;temp&gt;</code><br><br>
  27273. Because of the fhem-type of structures, a structures of heating sinks is sent "desired-temp":
  27274. Use an explicit command if you have structures of MAX heating thermostats.<br>
  27275. If you have defined a &lt;condition&gt; and this condition is false if the switchingtime has reached, no command will executed.<br>
  27276. A other case is to define an own perl command with &lt;command&gt;.
  27277. <p>
  27278. The following parameter are defined:
  27279. <ul><b>device</b><br>
  27280. The device to switch at the given time.
  27281. </ul>
  27282. <p>
  27283. <ul><b>language</b><br>
  27284. Specifies the language used for definition and profiles.
  27285. de,en,fr are possible. The parameter is optional.
  27286. </ul>
  27287. <p>
  27288. <ul><b>weekdays</b><br>
  27289. Specifies the days for all timer in the <b>Heating_Control</b>.
  27290. The parameter is optional. For details see the weekdays part in profile.
  27291. </ul>
  27292. <p>
  27293. <ul><b>profile</b><br>
  27294. Define the weekly profile. All timings are separated by space. A switchingtime is defined
  27295. by the following example: <br><br>
  27296. <ul><b>[&lt;weekdays&gt;|]&lt;time&gt;|&lt;parameter&gt;</b></ul><br>
  27297. <u>weekdays:</u> optional, if not set every day of the week is used.<br>
  27298. Otherwise you can define a day with its number or its shortname.<br>
  27299. <ul>
  27300. <li>0,su sunday</li>
  27301. <li>1,mo monday</li>
  27302. <li>2,tu tuesday</li>
  27303. <li>3,we wednesday</li>
  27304. <li>4 ...</li>
  27305. <li>7,$we weekend ($we)</li>
  27306. <li>8,!$we weekday (!$we)</li>
  27307. </ul><br>
  27308. It is possible to define $we or !$we in daylist to easily allow weekend an holiday. $we !$we are coded as 7 8, when using a numeric daylist.<br><br>
  27309. <u>time:</u>define the time to switch, format: HH:MM:[SS](HH in 24 hour format) or a Perlfunction like {sunrise_abs()}. Within the {} you can use the variable $date(epoch) to get the exact switchingtimes of the week. Example: {sunrise_abs_dat($date)}<br><br>
  27310. <u>parameter:</u>the temperature to be set, using a float with mask 99.9 or a sybolic value like <b>eco</b> or <b>comfort</b> - whatever your thermostat understands.
  27311. The symbolic value can be added an additional parameter: dayTemp:16 night-temp:15. See examples <br><br>
  27312. </ul>
  27313. <p>
  27314. <ul><b>command</b><br>
  27315. If no condition is set, all the rest is interpreted as a command. Perl-code is setting up
  27316. by the well-known Block with {}.<br>
  27317. Note: if a command is defined only this command is executed. In case of executing
  27318. a "set desired-temp" command, you must define the hole commandpart explicitly by yourself.<br>
  27319. <!----------------------------------------------------------------------------- -->
  27320. <!----------------------------------------------------------------------------- -->
  27321. <!-- -------------------------------------------------------------------------- -->
  27322. The following parameter are replaced:<br>
  27323. <ol>
  27324. <li>$NAME => the device to switch</li>
  27325. <li>$EVENT => the new temperature</li>
  27326. </ol>
  27327. </ul>
  27328. <p>
  27329. <ul><b>condition</b><br>
  27330. if a condition is defined you must declare this with () and a valid perl-code.<br>
  27331. The returnvalue must be boolean.<br>
  27332. The parameter $NAME and $EVENT will be interpreted.
  27333. </ul>
  27334. <p>
  27335. <b>Examples:</b>
  27336. <ul>
  27337. <code>define HCB Heating_Control Bad_Heizung 12345|05:20|21 12345|05:25|comfort 17:20|21 17:25|eco</code><br>
  27338. Mo-Fr are setting the temperature at 05:20 to 21&deg;C, and at 05:25 to <b>comfort</b>.
  27339. Every day will be set the temperature at 17:20 to 21&deg;C and 17:25 to <b>eco</b>.<p>
  27340. <code>define HCW Heating_Control WZ_Heizung 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|12
  27341. {fhem("set dummy on"); fhem("set $NAME desired-temp $EVENT");}</code><br>
  27342. At the given times and weekdays only(!) the command will be executed.<p>
  27343. <code>define HCW Heating_Control WZ_Heizung Sa-Su,We|08:00|21 (ReadingsVal("WeAreThere", "state", "no") eq "yes")</code><br>
  27344. The temperature is only set if the dummy variable WeAreThere is "yes".<p>
  27345. <code>define HCW Heating_Control WZ_Heizung en Su-Fr|{sunrise_abs()}|21 Mo-Fr|{sunset_abs()}|16</code><br>
  27346. The device is switched at sunrise/sunset. Language: english.<p>
  27347. <code>define HCW Heating_Control WZ_Heizung en Mo-Fr|{myFunction}|night-temp:18 Mo-Fr|{myFunction()}|dayTemp:16</code><br>
  27348. The is switched at time myFunction(). It is sent the Command "night-temp 18" and "dayTemp 16".<p>
  27349. If you want to have set all Heating_Controls their current value (after a temperature lowering phase holidays)
  27350. you can call the function <b>Heating_Control_SetTemp("HC-device")</b> or <b>Heating_Control_SetAllTemps()</b>.<br>
  27351. This call can be automatically coupled to a dummy by a notify:<br>
  27352. <code>define HeizStatus2 notify Heating:. * {Heating_Control_SetAllTemps()}</code>
  27353. <br><p>
  27354. Some definitions without comment:
  27355. <code><pre>
  27356. define hc Heating_Control HeizungKueche de 7|23:35|25 34|23:30|22 23:30|16 23:15|22 8|23:45|16
  27357. define hc Heating_Control HeizungKueche de fr,$we|23:35|25 34|23:30|22 23:30|16 23:15|22 12|23:45|16
  27358. define hc Heating_Control HeizungKueche de 20:35|25 34|14:30|22 21:30|16 21:15|22 12|23:00|16
  27359. define hw Heating_Control HeizungKueche de mo-so, $we|{sunrise_abs_dat($date)}|18 mo-so, $we|{sunset_abs_dat($date)}|22
  27360. define ht Heating_Control HeizungKueche de mo-so,!$we|{sunrise_abs_dat($date)}|18 mo-so,!$we|{sunset_abs_dat($date)}|22
  27361. define hh Heating_Control HeizungKueche de {sunrise_abs_dat($date)}|19 {sunset_abs_dat($date)}|21
  27362. define hx Heating_Control HeizungKueche de 22:35|25 23:00|16
  27363. </code></pre>
  27364. the list of days can be set globaly for the whole Heating_Control:<p>
  27365. <code><pre>
  27366. define HeizungWohnen_an_wt Heating_Control HeizungWohnen de !$we 09:00|19 (heizungAnAus("Ein"))
  27367. define HeizungWohnen_an_we Heating_Control HeizungWohnen de $we 09:00|19 (heizungAnAus("Ein"))
  27368. define HeizungWohnen_an_we Heating_Control HeizungWohnen de 78 09:00|19 (heizungAnAus("Ein"))
  27369. define HeizungWohnen_an_we Heating_Control HeizungWohnen de 57 09:00|19 (heizungAnAus("Ein"))
  27370. define HeizungWohnen_an_we Heating_Control HeizungWohnen de fr,$we 09:00|19 (heizungAnAus("Ein"))
  27371. </code></pre>
  27372. An example to be able to temporarily boost the temperature for one hour:
  27373. <code><pre>
  27374. define hc Heating_Control HeatingBath de !$we|05:00|{HC_WithBoost(23,"HeatingBath")} $we|07:00|{HC_WithBoost(23,"HeatingBath")} 23:00|{HC_WithBoost(20,"HeatingBath")}
  27375. </code></pre>
  27376. and using a "HeatingBath_Boost" dummy variable:
  27377. <code><pre>
  27378. define HeatingBath_Boost dummy
  27379. attr HeatingBath_Boost setList state:0,23,24,25
  27380. attr HeatingBath_Boost webCmd state
  27381. define di_ResetBoostBath DOIF ([HeatingBath_Boost] > 0)
  27382. ({Heating_Control_SetAllTemps()}, defmod di_ResetBoostBath_Reset at +01:00:00 set HeatingBath_Boost 0)
  27383. DOELSE
  27384. ({Heating_Control_SetAllTemps()})
  27385. attr di_ResetBoostBath do always
  27386. </code></pre>
  27387. and the perl subroutine in 99_myUtils.pm (or the like)
  27388. <code><pre>
  27389. sub HC_BathWithBoost {
  27390. my $numParams = @_;
  27391. my ($degree, $boostPrefix) = @_;
  27392. if ($numParams > 1)
  27393. {
  27394. my $boost = ReadingsVal($boostPrefix . "_Boost", "state", "0");
  27395. return $boost if ($boost =~ m/^\d+$/) && ($boost > 0); # boost?
  27396. }
  27397. return $degree; # otherwise return given temperature
  27398. }
  27399. </code></pre>
  27400. Now you can set "HeatingBath_Boost" in the web interface for a one-hour boost of 3 degrees in the bath.
  27401. (you can trigger that using the PRESENCE function using your girlfriend's device... grin).
  27402. Easy to extend this with a vacation timer using another dummy variable, here <code>VacationTemp</code>.<br>
  27403. Then you can use the command
  27404. <code>defmod defVacationEnd at 2016-12-30T00:00:00 set VacationTemp off, {Heating_Control_SetAllTemps()}</code>
  27405. to stop the vacation temperature before you return in january 2017 and let the appartment heat up again.
  27406. <code><pre>
  27407. sub HC_BathWithBoost($) {
  27408. my $vacation = ReadingsVal("VacationTemp", "state", "unfortunately not on vacation");
  27409. return $vacation if $vacation =~ /^(\d+|eco)$/; # set vacation temperature if given
  27410. my $numParams = @_;
  27411. my ($degree, $boostPrefix) = @_;
  27412. if ($numParams > 1)
  27413. {
  27414. my $boost = ReadingsVal($boostPrefix . "_Boost", "state", "0");
  27415. return $boost if ($boost =~ m/^\d+$/) && ($boost > 0); # boost?
  27416. }
  27417. }
  27418. </code></pre>
  27419. Pray that the device does not restart during your vacation, as the <code>define defVacationEnd ... at </code> is volatile and will be lost at restart!
  27420. </ul>
  27421. </ul>
  27422. <a name="Heating_Controlset"></a>
  27423. <b>Set</b> <ul>N/A</ul><br>
  27424. <a name="Heating_Controlget"></a>
  27425. <b>Get</b> <ul>N/A</ul><br>
  27426. <a name="Heating_ControlLogattr"></a>
  27427. <b>Attributes</b>
  27428. <ul>
  27429. <li>delayedExecutionCond <br>
  27430. defines a delay Function. When returning true, the switching of the device is delayed until the function retruns a false value. The behavior is just like a windowsensor.
  27431. <br><br>
  27432. <b>Example:</b>
  27433. <pre>
  27434. attr hc delayedExecutionCond isDelayed("%HEATING_CONTROL","%WEEKDAYTIMER","%TIME","%NAME","%EVENT")
  27435. </pre>
  27436. the parameters %HEATING_CONTROL(timer name) %TIME %NAME(device name) %EVENT are replaced at runtime by the correct value.
  27437. <br><br>
  27438. <b>Example of a function:</b>
  27439. <pre>
  27440. sub isDelayed($$$$$) {
  27441. my($hc, $wdt, $tim, $nam, $event ) = @_;
  27442. my $theSunIsStillshining = ...
  27443. return ($tim eq "16:30" && $theSunIsStillshining) ;
  27444. }
  27445. </pre>
  27446. </li>
  27447. <li>switchInThePast<br>
  27448. defines that the depending device will be switched in the past in definition and startup phase when the device is not recognized as a heating.
  27449. Heatings are always switched in the past.
  27450. </li>
  27451. <li><a href="#disable">disable</a></li>
  27452. <li><a href="#event-on-update-reading">event-on-update-reading</a></li>
  27453. <li><a href="#event-on-change-reading">event-on-change-reading</a></li>
  27454. <li><a href="#stateFormat">stateFormat</a></li>
  27455. <li>windowSensor<br>Defines a list of window sensors. When one of its window state readings is <b>open</b> the aktual switch is delayed.</li> </ul><br>
  27456. </ul>
  27457. <a name="Hideki"></a>
  27458. <h3>Hideki</h3>
  27459. <ul>
  27460. The Hideki module is a module for decoding weather sensors, which use the hideki protocol. Known brands are Bresser, Cresta, TFA and Hama.
  27461. <br><br>
  27462. <a name="Hideki_define"></a>
  27463. <b>Supported Brands</b>
  27464. <ul>
  27465. <li>Hama</li>
  27466. <li>Bresser</li>
  27467. <li>TFA Dostman</li>
  27468. <li>Arduinos with remote Sensor lib from Randy Simons</li>
  27469. <li>Cresta</li>
  27470. <li>Hideki (Anemometer | UV sensor | Rain level meter | Thermo/hygro-sensor)</li>
  27471. <li>all other devices, which use the Hideki protocol</li>
  27472. </ul>
  27473. Please note, currently temp/hum devices are implemented. Please report data for other sensortypes.
  27474. <a name="Hideki_define"></a>
  27475. <b>Define</b>
  27476. <ul>
  27477. <code>define &lt;name&gt; Hideki &lt;code&gt; </code> <br>
  27478. <br>
  27479. &lt;code&gt; is the address of the sensor device and
  27480. is build by the sensor type and the channelnumber (1 to 5) or if the attribute longid is specfied an autogenerated address build when inserting
  27481. the battery (this adress will change every time changing the battery).<br>
  27482. If autocreate is enabled, the device will be defined via autocreate. This is also the preferred mode of defining such a device.
  27483. </ul>
  27484. <a name="Hideki_readings"></a>
  27485. <b>Generated readings</b>
  27486. <ul>
  27487. <li>state (T:x H:y B:z)</li>
  27488. <li>temperature (&deg;C)</li>
  27489. <li>humidity (0-100)</li>
  27490. <li>battery (ok or low)</li>
  27491. <li>channel (The Channelnumber (number if)</li>
  27492. <br><i>- Hideki only -</i>
  27493. <li>comfort_level (Status: Humidity OK... , Wet. More than 69% RH, Dry. Less than 40% RH, Temperature and humidity comfortable)</li>
  27494. <li>package_number (reflect the package number in the stream starting at 1)</li><br>
  27495. </ul>
  27496. <a name="Hideki_unset"></a>
  27497. <b>Set</b> <ul>N/A</ul><br>
  27498. <a name="Hideki_unget"></a>
  27499. <b>Get</b> <ul>N/A</ul><br>
  27500. <a name="Hideki_attr"></a>
  27501. <b>Attributes</b>
  27502. <ul>
  27503. <li><a href="#do_not_notify">do_not_notify</a></li>
  27504. <li><a href="#eventMap">eventMap</a></li>
  27505. <li><a href="#ignore">ignore</a></li>
  27506. <li><a href="#showtime">showtime</a></li>
  27507. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  27508. </ul>
  27509. <br>
  27510. </ul>
  27511. <div>
  27512. <a name="HourCounter" id="HourCounter"></a>
  27513. <h3>HourCounter</h3>
  27514. <div>
  27515. <a name="HourCounterdefine" id="HourCounterdefine"></a> <b>Define</b>
  27516. <div>
  27517. <br />
  27518. <code>define &lt;name&gt; HourCounter &lt;pattern_for_ON&gt; [&lt;pattern_for_OFF&gt;]</code><br />
  27519. <br />
  27520. Hourcounter can detect both the activiy-time and the inactivity-time of a property.<br />
  27521. The "pattern_for_ON" identifies the events, that signal the activity of the desired property.<br />
  27522. The "pattern_for_OFF" identifies the events, that signal the inactivity of the desired property.<br />
  27523. <br />
  27524. If "pattern_for_OFF" is not defined, any matching event of "patter_for_ON" will be counted.<br />
  27525. Otherwise only the rising edges of "pattern_for_ON" will be counted.<br />
  27526. This means a "pattern_for_OFF"-event must be detected before a "pattern_for_ON"-event is accepted.<br />
  27527. <br />
  27528. "pattern_for_ON" and "pattern_for_OFF" must be formed using the following structure:<br />
  27529. <br />
  27530. <code>device:[regexp]</code><br />
  27531. <br />
  27532. The forming-rules are the same as for the notify-command.<br />
  27533. <br />
  27534. <b>Example:</b><br />
  27535. <br />
  27536. <div>
  27537. <code>define BurnerCounter HourCounter SHUTTER_TEST:on SHUTTER_TEST:off</code>
  27538. </div>
  27539. </div><br />
  27540. <a name="HourCounterset" id="HourCounterset"></a> <b>Set-Commands</b>
  27541. <div>
  27542. <br />
  27543. <code>set &lt;name&gt; calc</code><br />
  27544. <br />
  27545. <div>
  27546. starts the calculation of pulse/pause-time.<br />
  27547. </div><br />
  27548. <br />
  27549. <code>set &lt;name&gt; clear</code><br />
  27550. <br />
  27551. <div>
  27552. clears the readings countsPerDay, countsOverall,pauseTimeIncrement, pauseTimePerDay, pauseTimeOverall,
  27553. pulseTimeIncrement, pulseTimePerDay, pulseTimeOverall by setting to 0.<br />
  27554. The reading clearDate is set to the current Date/Time.
  27555. </div><br />
  27556. <br />
  27557. <code>set &lt;name&gt; countsOverall &lt;value&gt;</code><br />
  27558. <br />
  27559. <div>
  27560. Sets the reading countsOverall to the given value.This is the total-counter.
  27561. </div><br />
  27562. <br />
  27563. <code>set &lt;name&gt; countsPerDay &lt;value&gt;</code><br />
  27564. <br />
  27565. <div>
  27566. Sets the reading countsPerDay to the given value. This reading will automatically be set to 0, after change
  27567. of day.
  27568. </div><br />
  27569. <br />
  27570. <code>set &lt;name&gt; pauseTimeIncrement &lt;value&gt;</code><br />
  27571. <br />
  27572. <div>
  27573. Sets the reading pauseTimeIncrement to the given value.<br />
  27574. This reading in seconds is automatically set after a rising edge.
  27575. </div><br />
  27576. <br />
  27577. <code>set &lt;name&gt; pauseTimeEdge &lt;value&gt;</code><br />
  27578. <br />
  27579. <div>
  27580. Sets the reading pauseTimeEdge to the given value.<br />
  27581. This reading in seconds is automatically set after a rising edge.
  27582. </div><br />
  27583. <br />
  27584. <code>set &lt;name&gt; pauseTimeOverall &lt;value&gt;</code><br />
  27585. <br />
  27586. <div>
  27587. Sets the reading pauseTimeOverall to the given value.<br />
  27588. This reading in seconds is automatically adjusted after a change of pauseTimeIncrement.
  27589. </div><br />
  27590. <br />
  27591. <code>set &lt;name&gt; pauseTimePerDay &lt;value&gt;</code><br />
  27592. <br />
  27593. <div>
  27594. Sets the reading pauseTimePerDay to the given value.<br />
  27595. This reading in seconds is automatically adjusted after a change of pauseTimeIncrement and set to 0 after
  27596. change of day.
  27597. </div><br />
  27598. <br />
  27599. <code>set &lt;name&gt; pulseTimeIncrement &lt;value&gt;</code><br />
  27600. <br />
  27601. <div>
  27602. Sets the reading pulseTimeIncrement to the given value.<br />
  27603. This reading in seconds is automatically set after a falling edge of the property.
  27604. </div><br />
  27605. <br />
  27606. <code>set &lt;name&gt; pulseTimeEdge &lt;value&gt;</code><br />
  27607. <br />
  27608. <div>
  27609. Sets the reading pulseTimeEdge to the given value.<br />
  27610. This reading in seconds is automatically set after a rising edge.
  27611. </div><br />
  27612. <br />
  27613. <code>set &lt;name&gt; pulseTimeOverall &lt;value&gt;</code><br />
  27614. <br />
  27615. <div>
  27616. Sets the reading pulseTimeOverall to the given value.<br />
  27617. This reading in seconds is automatically adjusted after a change of pulseTimeIncrement.
  27618. </div><br />
  27619. <br />
  27620. <code>set &lt;name&gt; pulseTimePerDay &lt;value&gt;</code><br />
  27621. <br />
  27622. <div>
  27623. Sets the reading pulseTimePerDay to the given value.<br />
  27624. This reading in seconds is automatically adjusted after a change of pulseTimeIncrement and set to 0 after
  27625. change of day.
  27626. </div><br />
  27627. <br />
  27628. <code>set &lt;name&gt; forceHourChange</code><br />
  27629. <br />
  27630. <div>
  27631. This modifies the reading tickHour, which is automatically modified after change of hour.
  27632. </div><br />
  27633. <br />
  27634. <code>set &lt;name&gt; forceDayChange</code><br />
  27635. <br />
  27636. <div>
  27637. This modifies the reading tickDay, which is automatically modified after change of day.
  27638. </div><br />
  27639. <br />
  27640. <code>set &lt;name&gt; forceWeekChange</code><br />
  27641. <br />
  27642. <div>
  27643. This modifies the reading tickWeek, which is automatically modified after change of week.
  27644. </div><br />
  27645. <br />
  27646. <code>set &lt;name&gt; forceMonthChange</code><br />
  27647. <br />
  27648. <div>
  27649. This modifies the reading tickMonth, which is automatically modified after change of month.
  27650. </div><br />
  27651. <br />
  27652. <code>set &lt;name&gt; forceYearChange</code><br />
  27653. <br />
  27654. <div>
  27655. This modifies the reading tickYear, which is automatically modified after change of year.
  27656. </div><br />
  27657. <br />
  27658. <code>set &lt;name&gt; app.* &lt;value&gt;</code><br />
  27659. <br />
  27660. <div>
  27661. Any reading with the leading term "app", can be modified.<br />
  27662. This can be useful for user-readings.
  27663. </div><br />
  27664. </div><br />
  27665. <a name="HourCounterget" id="HourCounterget"></a> <b>Get-Commands</b><br />
  27666. <div>
  27667. <br />
  27668. <code>get &lt;name&gt; version</code><br />
  27669. <br />
  27670. <div>
  27671. Get the current version of the module.
  27672. </div><br />
  27673. </div><br />
  27674. <a name="HourCounterattr" id="HourCounterattr"></a> <b>Attributes</b>
  27675. <br />
  27676. <ul>
  27677. <li><p><b>interval</b><br />
  27678. the update interval for pulse/pause-time in minutes [default 60]</p></li>
  27679. <li><p><a href="#readingFnAttributes">readingFnAttributes</a></p></li>
  27680. </ul>
  27681. <b>Additional information</b>
  27682. <br />
  27683. <ul>
  27684. <li><p><a href="http://forum.fhem.de/index.php/topic,12216.0.html">Discussion in FHEM forum</a></p></li>
  27685. <li><p><a href="http://www.fhemwiki.de/wiki/HourCounter">WIKI information in FHEM Wiki</a></p></li>
  27686. <li><p>The file 99_UtilsHourCounter.pm is a reference implementation for user defined extensions.<br />
  27687. It shows how to create sum values for hours,days, weeks, months and years.<br />
  27688. This file is located in the sub-folder contrib. For further information take a look to FHEM Wiki.</p></li>
  27689. </ul>
  27690. </div>
  27691. </div>
  27692. <a name="Hyperion"></a>
  27693. <h3>Hyperion</h3>
  27694. <ul>
  27695. With <i>Hyperion</i> it is possible to change the color or start an effect on a hyperion server.<br>
  27696. It's also possible to control the complete color calibration (changes are temorary and will not be written to the config file).<br>
  27697. The Hyperion server must have enabled the JSON server.<br>
  27698. You can also restart Hyperion with different configuration files (p.e. switch input/grabber)<br>
  27699. <br>
  27700. <a name="Hyperion_define"></a>
  27701. <p><b>Define</b></p>
  27702. <ul>
  27703. <code>define &lt;name&gt; Hyperion &lt;IP or HOSTNAME&gt; &lt;PORT&gt; [&lt;INTERVAL&gt;]</code><br>
  27704. </ul>
  27705. <br>
  27706. &lt;INTERVAL&gt; is optional for periodically polling.<br>
  27707. <br>
  27708. <i>After defining "get &lt;name&gt; statusRequest" will be called once automatically to get the list of available effects and the current state of the Hyperion server.</i><br>
  27709. <br>
  27710. Example for running Hyperion on local system:
  27711. <br><br>
  27712. <ul>
  27713. <code>define Ambilight Hyperion localhost 19444 10</code><br>
  27714. </ul>
  27715. <br>
  27716. Example for running Hyperion on remote system:
  27717. <br><br>
  27718. <ul>
  27719. <code>define Ambilight Hyperion 192.168.1.4 19444 10</code><br>
  27720. </ul>
  27721. <br><br>
  27722. To change config files on your running Hyperion server or to stop/restart your Hyperion server you have to put the following code into your sudoers file (/etc/sudoers) (visudo):
  27723. <br><br>
  27724. <ul>
  27725. <code>fhem ALL=(ALL) NOPASSWD:/usr/bin/hyperiond,/bin/kill</code>
  27726. </ul>
  27727. <br>
  27728. <a name="Hyperion_set"></a>
  27729. <p><b>set &lt;required&gt; [optional]</b></p>
  27730. <ul>
  27731. <li>
  27732. <i>addEffect &lt;custom_name&gt;</i><br>
  27733. add the current effect with the given name to the custom effects<br>
  27734. can be altered after adding in attribute hyperionCustomEffects<br>
  27735. device has to be in effect mode with a non-custom effect and given name must be a unique effect name
  27736. </li>
  27737. <li>
  27738. <i>adjustBlue &lt;0,0,255&gt;</i><br>
  27739. adjust each color of blue separately (comma separated) (R,G,B)<br>
  27740. values from 0 to 255 in steps of 1
  27741. </li>
  27742. <li>
  27743. <i>adjustGreen &lt;0,255,0&gt;</i><br>
  27744. adjust each color of green separately (comma separated) (R,G,B)<br>
  27745. values from 0 to 255 in steps of 1
  27746. </li>
  27747. <li>
  27748. <i>adjustRed &lt;255,0,0&gt;</i><br>
  27749. adjust each color of red separately (comma separated) (R,G,B)<br>
  27750. values from 0 to 255 in steps of 1
  27751. </li>
  27752. <li>
  27753. <i>binary &lt;restart/stop&gt;</i><br>
  27754. restart or stop the hyperion binary<br>
  27755. only available after successful "get &lt;name&gt; configFiles"
  27756. </li>
  27757. <li>
  27758. <i>blacklevel &lt;0.00,0.00,0.00&gt;</i><br>
  27759. adjust blacklevel of each color separately (comma separated) (R,G,B)<br>
  27760. values from 0.00 to 1.00 in steps of 0.01
  27761. </li>
  27762. <li>
  27763. <i>clear &lt;1000&gt;</i><br>
  27764. clear a specific priority channel
  27765. </li>
  27766. <li>
  27767. <i>clearall</i><br>
  27768. clear all priority channels / switch to Ambilight mode
  27769. </li>
  27770. <li>
  27771. <i>colorTemperature &lt;255,255,255&gt;</i><br>
  27772. adjust temperature of each color separately (comma separated) (R,G,B)<br>
  27773. values from 0 to 255 in steps of 1
  27774. </li>
  27775. <li>
  27776. <i>configFile &lt;filename&gt;</i><br>
  27777. restart the Hyperion server with the given configuration file (files will be listed automatically from the given directory in attribute hyperionConfigDir)<br>
  27778. please omit the double extension of the file name (.config.json)<br>
  27779. only available after successful "get &lt;name&gt; configFiles"
  27780. </li>
  27781. <li>
  27782. <i>correction &lt;255,255,255&gt;</i><br>
  27783. adjust correction of each color separately (comma separated) (R,G,B)<br>
  27784. values from 0 to 255 in steps of 1
  27785. </li>
  27786. <li>
  27787. <i>dim &lt;percent&gt; [duration] [priority]</i><br>
  27788. dim the rgb light to given percentage with optional duration in seconds and optional priority
  27789. </li>
  27790. <li>
  27791. <i>dimDown [delta]</i><br>
  27792. dim down rgb light by steps defined in attribute hyperionDimStep or by given value (default: 10)
  27793. </li>
  27794. <li>
  27795. <i>dimUp [delta]</i><br>
  27796. dim up rgb light by steps defined in attribute hyperionDimStep or by given value (default: 10)
  27797. </li>
  27798. <li>
  27799. <i>effect &lt;effect&gt; [duration] [priority] [effectargs]</i><br>
  27800. set effect (replace blanks with underscore) with optional duration in seconds and priority<br>
  27801. effectargs can also be set as very last argument - must be a JSON string without any whitespace
  27802. </li>
  27803. <li>
  27804. <i>gamma &lt;1.90,1.90,1.90&gt;</i><br>
  27805. adjust gamma of each color separately (comma separated) (R,G,B)<br>
  27806. values from 0.00 to 5.00 in steps of 0.01
  27807. </li>
  27808. <li>
  27809. <i>luminanceGain &lt;1.00&gt;</i><br>
  27810. adjust luminanceGain<br>
  27811. values from 0.00 to 5.00 in steps of 0.01
  27812. </li>
  27813. <li>
  27814. <i>luminanceMinimum &lt;0.00&gt;</i><br>
  27815. adjust luminanceMinimum<br>
  27816. values from 0.00 to 5.00 in steps of 0.01
  27817. </li>
  27818. <li>
  27819. <i>mode &lt;clearall|effect|off|rgb&gt;</i><br>
  27820. set the light in the specific mode with its previous value
  27821. </li>
  27822. <li>
  27823. <i>off</i><br>
  27824. set the light off while the color is black
  27825. </li>
  27826. <li>
  27827. <i>on</i><br>
  27828. set the light on and restore previous state
  27829. </li>
  27830. <li>
  27831. <i>reopen</i><br>
  27832. reopen the connection to the hyperion server
  27833. </li>
  27834. <li>
  27835. <i>rgb &lt;RRGGBB&gt; [duration] [priority]</i><br>
  27836. set color in RGB hex format with optional duration in seconds and priority
  27837. </li>
  27838. <li>
  27839. <i>saturationGain &lt;1.10&gt;</i><br>
  27840. adjust saturationGain<br>
  27841. values from 0.00 to 5.00 in steps of 0.01
  27842. </li>
  27843. <li>
  27844. <i>saturationLGain &lt;1.00&gt;</i><br>
  27845. adjust saturationLGain<br>
  27846. values from 0.00 to 5.00 in steps of 0.01
  27847. </li>
  27848. <li>
  27849. <i>threshold &lt;0.16,0.16,0.16&gt;</i><br>
  27850. adjust threshold of each color separately (comma separated) (R,G,B)<br>
  27851. values from 0.00 to 1.00 in steps of 0.01
  27852. </li>
  27853. <li>
  27854. <i>toggle</i><br>
  27855. toggles the light between on and off
  27856. </li>
  27857. <li>
  27858. <i>toggleMode</i><br>
  27859. toggles through all modes
  27860. </li>
  27861. <li>
  27862. <i>valueGain &lt;1.70&gt;</i><br>
  27863. adjust valueGain<br>
  27864. values from 0.00 to 5.00 in steps of 0.01
  27865. </li>
  27866. <li>
  27867. <i>whitelevel &lt;0.70,0.80,0.90&gt;</i><br>
  27868. adjust whitelevel of each color separately (comma separated) (R,G,B)<br>
  27869. values from 0.00 to 1.00 in steps of 0.01
  27870. </li>
  27871. </ul>
  27872. <br>
  27873. <a name="Hyperion_get"></a>
  27874. <p><b>Get</b></p>
  27875. <ul>
  27876. <li>
  27877. <i>configFiles</i><br>
  27878. get the available config files in directory from attribute hyperionConfigDir<br>
  27879. File names must have no spaces and must end with .config.json .<br>
  27880. For non-local Hyperion servers you have to configure passwordless SSH login for the user running fhem to the Hyperion server host (http://www.linuxproblem.org/art_9.html), with attribute hyperionSshUser you can set the SSH user for login.<br>
  27881. Please watch the log for possible errors while getting config files.
  27882. </li>
  27883. <li>
  27884. <i>devStateIcon</i><br>
  27885. get the current devStateIcon
  27886. </li>
  27887. <li>
  27888. <i>statusRequest</i><br>
  27889. get the state of the Hyperion server,<br>
  27890. get also the internals of Hyperion including available effects
  27891. </li>
  27892. </ul>
  27893. <br>
  27894. <a name="Hyperion_attr"></a>
  27895. <p><b>Attributes</b></p>
  27896. <ul>
  27897. <li>
  27898. <i>disable</i><br>
  27899. stop polling and disconnect<br>
  27900. default: 0
  27901. </li>
  27902. <li>
  27903. <i>disabledForIntervals</i><br>
  27904. stop polling in given time frames<br>
  27905. default:
  27906. </li>
  27907. <li>
  27908. <i>hyperionBin</i><br>
  27909. path to the hyperion daemon<br>
  27910. OpenELEC users may set hyperiond.sh as daemon<br>
  27911. default: /usr/bin/hyperiond
  27912. </li>
  27913. <li>
  27914. <i>hyperionConfigDir</i><br>
  27915. path to the hyperion configuration files<br>
  27916. default: /etc/hyperion/
  27917. </li>
  27918. <li>
  27919. <i>hyperionCustomEffects</i><br>
  27920. space separated list of JSON strings (without spaces - please replace spaces in effect names with underlines)<br>
  27921. must include name (as diplay name), oname (name of the base effect) and args (the different effect args), only this order is allowed (if different an error will be thrown on attribute save and the attribut value will not be saved).<br>
  27922. example: {"name":"Knight_Rider_speed_2","oname":"Knight_rider","args":{"color":[255,0,255],"speed":2}} {"name":"Knight_Rider_speed_4","oname":"Knight_rider","args":{"color":[0,0,255],"speed":4}}
  27923. </li>
  27924. <li>
  27925. <i>hyperionDefaultDuration</i><br>
  27926. default duration<br>
  27927. default: 0 = infinity
  27928. </li>
  27929. <li>
  27930. <i>hyperionDefaultPriority</i><br>
  27931. default priority<br>
  27932. default: 0 = highest priority
  27933. </li>
  27934. <li>
  27935. <i>hyperionDimStep</i><br>
  27936. dim step for dimDown/dimUp<br>
  27937. default: 10 (percent)
  27938. </li>
  27939. <li>
  27940. <i>hyperionGainStep</i><br>
  27941. valueGain step for valueGainDown/valueGainUp<br>
  27942. default: 0.1
  27943. </li>
  27944. <li>
  27945. <i>hyperionNoSudo</i><br>
  27946. disable sudo for non-root ssh user<br>
  27947. default: 0
  27948. </li>
  27949. <li>
  27950. <i>hyperionSshUser</i><br>
  27951. user name for executing SSH commands<br>
  27952. default: pi
  27953. </li>
  27954. <li>
  27955. <i>hyperionToggleModes</i><br>
  27956. modes and order of toggleMode as comma separated list (min. 2 modes, max. 4 modes, each mode only once)<br>
  27957. default: clearall,rgb,effect,off
  27958. </li>
  27959. <li>
  27960. <i>hyperionVersionCheck</i><br>
  27961. disable hyperion version check to (maybe) support prior versions<br>
  27962. DO THIS AT YOUR OWN RISK! FHEM MAY CRASH UNEXPECTEDLY!<br>
  27963. default: 1
  27964. </li>
  27965. <li>
  27966. <i>queryAfterSet</i><br>
  27967. If set to 0 the state of the Hyperion server will not be queried after setting, instead the state will be queried on next interval query.<br>
  27968. This is only used if periodically polling is enabled, without this polling the state will be queried automatically after set.<br>
  27969. default: 1
  27970. </li>
  27971. </ul>
  27972. <br>
  27973. <a name="Hyperion_read"></a>
  27974. <p><b>Readings</b></p>
  27975. <ul>
  27976. <li>
  27977. <i>adjustBlue</i><br>
  27978. each color of blue separately (comma separated) (R,G,B)
  27979. </li>
  27980. <li>
  27981. <i>adjustGreen</i><br>
  27982. each color of green separately (comma separated) (R,G,B)
  27983. </li>
  27984. <li>
  27985. <i>adjustRed</i><br>
  27986. each color of red separately (comma separated) (R,G,B)
  27987. </li>
  27988. <li>
  27989. <i>blacklevel</i><br>
  27990. blacklevel of each color separately (comma separated) (R,G,B)
  27991. </li>
  27992. <li>
  27993. <i>colorTemperature</i><br>
  27994. temperature of each color separately (comma separated) (R,G,B)
  27995. </li>
  27996. <li>
  27997. <i>configFile</i><br>
  27998. active/previously loaded configuration file, double extension (.config.json) will be omitted
  27999. </li>
  28000. <li>
  28001. <i>correction</i><br>
  28002. correction of each color separately (comma separated) (R,G,B)
  28003. </li>
  28004. <li>
  28005. <i>dim</i><br>
  28006. active/previous dim value (rgb light)
  28007. </li>
  28008. <li>
  28009. <i>duration</i><br>
  28010. active/previous/remaining primary duration in seconds or infinite
  28011. </li>
  28012. <li>
  28013. <i>effect</i><br>
  28014. active/previous effect
  28015. </li>
  28016. <li>
  28017. <i>effectArgs</i><br>
  28018. active/previous effect arguments as JSON
  28019. </li>
  28020. <li>
  28021. <i>gamma</i><br>
  28022. gamma for each color separately (comma separated) (R,G,B)
  28023. </li>
  28024. <li>
  28025. <i>id</i><br>
  28026. id of the Hyperion server
  28027. </li>
  28028. <li>
  28029. <i>lastError</i><br>
  28030. last occured error while communicating with the Hyperion server
  28031. </li>
  28032. <li>
  28033. <i>luminanceGain</i><br>
  28034. current luminanceGain
  28035. </li>
  28036. <li>
  28037. <i>luminanceMinimum</i><br>
  28038. current luminanceMinimum
  28039. </li>
  28040. <li>
  28041. <i>mode</i><br>
  28042. current mode
  28043. </li>
  28044. <li>
  28045. <i>mode_before_off</i><br>
  28046. previous mode before off
  28047. </li>
  28048. <li>
  28049. <i>priority</i><br>
  28050. active/previous priority
  28051. </li>
  28052. <li>
  28053. <i>rgb</i><br>
  28054. active/previous rgb
  28055. </li>
  28056. <li>
  28057. <i>saturationGain</i><br>
  28058. active saturationGain
  28059. </li>
  28060. <li>
  28061. <i>saturationLGain</i><br>
  28062. active saturationLGain
  28063. </li>
  28064. <li>
  28065. <i>serverResponse</i><br>
  28066. last Hyperion server response (success/ERROR)
  28067. </li>
  28068. <li>
  28069. <i>state</i><br>
  28070. current state
  28071. </li>
  28072. <li>
  28073. <i>threshold</i><br>
  28074. threshold of each color separately (comma separated) (R,G,B)
  28075. </li>
  28076. <li>
  28077. <i>valueGain</i><br>
  28078. valueGain - gain of the Ambilight
  28079. </li>
  28080. <li>
  28081. <i>whitelevel</i><br>
  28082. whitelevel of each color separately (comma separated) (R,G,B)
  28083. </li>
  28084. </ul>
  28085. </ul>
  28086. <a name="I2C_BH1750"></a>
  28087. <h3>I2C_BH1750</h3>
  28088. <ul>
  28089. <a name="I2C_BH1750"></a>
  28090. <p>
  28091. Module for the I<sup>2</sup>C BH1750 light sensor.
  28092. The BH1750 sensor supports a luminous flux from 0 up to 120k lx
  28093. and a resolution up to 0.11lx.
  28094. It supports different modes to be able to cover this large range of
  28095. data. <br>
  28096. The I2C_BH1750 module tries always to get
  28097. the luminosity data from the sensor as good as possible. To achieve
  28098. this the module first reads flux data in the least sensitive mode and then
  28099. decides which mode to take to get best results.
  28100. <br><br>
  28101. For the I<sup>2</sup>C bus the same things are valid as described in the
  28102. <a href="#I2C_TSL2561">I2C_TSL2561</a> &nbsp;
  28103. module.<br>
  28104. <b>Define</b>
  28105. <ul>
  28106. <code>define BH1750 I2C_BH1750 [I2C address]</code><br><br>
  28107. I2C address must be 0x23 or 0x5C (if omitted default address 0x23 is used)
  28108. <br>
  28109. Examples:
  28110. <pre>
  28111. # define IO-Module:
  28112. define I2C_2 RPII2C 2
  28113. # Use IODev I2C_2 with default i2c address 0x23
  28114. # set poll interval to 1 min
  28115. # generate luminosity value only if difference to last value is at least 10%
  28116. define BH1750 I2C_BH1750
  28117. attr BH1750 IODev I2C_2
  28118. attr BH1750 poll_interval 1
  28119. attr BH1750 percentdelta 10
  28120. </pre>
  28121. </ul>
  28122. <b>Set</b>
  28123. <ul>
  28124. <li><code>set &lt;device name&gt; update</code><br>
  28125. Force immediate illumination measurement and restart a
  28126. new poll_interval.
  28127. Note that the new readings are not yet available after set returns
  28128. because the
  28129. measurement is performed asynchronously. Depending on the flux value
  28130. this may require more than one second to complete.<br>
  28131. </li>
  28132. <li><code>set &lt;device name&gt; deleteminmax</code><br>
  28133. Delete the minimum maximum readings to start new
  28134. min/max measurement
  28135. </li>
  28136. </ul>
  28137. <p>
  28138. <b>Readings</b>
  28139. <ul>
  28140. <li>luminosity<br>
  28141. Illumination measurement in the range of 0 to 121557 lx.<br>
  28142. The generated luminosity value is stored with up to one
  28143. fractional digit for values below 100 and
  28144. rounded to 3 significant digits for all other values.
  28145. Compared with the accuracy of the sensor it makes no
  28146. sense to store the values with more precision.
  28147. </li>
  28148. <li>minimum<br>
  28149. minimum of measured luminosity
  28150. </li>
  28151. <li>maximum<br>
  28152. maximum of measured luminosity
  28153. </li>
  28154. <li>state<br>
  28155. Default: Defined, Ok, Saturated, I2C Error
  28156. </li>
  28157. </ul>
  28158. <p>
  28159. <a name="I2C_BH1750attr"></a>
  28160. <b>Attributes</b>
  28161. <ul>
  28162. <li>IODev<br>
  28163. Set the name of an IODev module like RPII2C<br>
  28164. Default: undefined<br>
  28165. </li>
  28166. <li>poll_interval<br>
  28167. Set the polling interval in minutes to query the sensor for new measured values.
  28168. By changing this attribute a new illumination measurement will be triggered.<br>
  28169. valid values: 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 30, 60<br>
  28170. </li>
  28171. <li>percentdelta<br>
  28172. If set a luminosity reading is only generated if
  28173. the difference between the current luminosity value and the last reading is
  28174. at least percentdelta percents.<br>
  28175. </li>
  28176. <li>correction<br>
  28177. Linear correction factor to be applied to the sensor value.
  28178. Compared with a commercial light meter it seems that the values for my
  28179. BH1750 are about 25% to low in day light (correction 1.25).
  28180. The TLS2561 compares much better with the light meter but has the disadvantage
  28181. that it saturates at about 40k lux.<br>
  28182. The correction factor can also be used if your sensor is behind an opal glass.<br>
  28183. valid range: 0.5 to 2.0<br>
  28184. </li>
  28185. </ul>
  28186. <p>
  28187. <br>
  28188. </ul>
  28189. <a name="I2C_BME280"></a>
  28190. <h3>I2C_BME280</h3>
  28191. (en | <a href="commandref_DE.html#I2C_BME280">de</a>)
  28192. <ul>
  28193. <a name="I2C_BME280"></a>
  28194. Provides an interface to the digital pressure/humidity sensor BME280
  28195. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28196. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28197. <b>attribute IODev must be set</b><br>
  28198. <b>Define</b>
  28199. <ul>
  28200. <code>define BME280 I2C_BME280 [&lt;I2C Address&gt;]</code><br><br>
  28201. without defined <code>&lt;I2C Address&gt;</code> 0x76 will be used as address<br>
  28202. <br>
  28203. Examples:
  28204. <pre>
  28205. define BME280 I2C_BME280 0x77
  28206. attr BME280 poll_interval 5
  28207. </pre>
  28208. </ul>
  28209. <a name="I2C_BME280set"></a>
  28210. <b>Set</b>
  28211. <ul>
  28212. <code>set BME280 &lt;readValues&gt;</code>
  28213. <br><br>
  28214. Reads current temperature, humidity and pressure values from the sensor.<br>
  28215. Normaly this execute automaticly at each poll intervall. You can execute
  28216. this manually if you want query the current values.
  28217. <br><br>
  28218. </ul>
  28219. <a name="I2C_BME280attr"></a>
  28220. <b>Attributes</b>
  28221. <ul>
  28222. <li>oversampling_t,oversampling_h,oversampling_p<br>
  28223. Controls the oversampling settings of the temperature,humidity or pressure measurement in the sensor.<br>
  28224. Default: 1, valid values: 0, 1, 2, 3, 4, 5<br>
  28225. 0 switches the respective measurement off<br>
  28226. 1 to 5 complies to oversampling value 2^value/2<br><br>
  28227. </li>
  28228. <li>poll_interval<br>
  28229. Set the polling interval in minutes to query the sensor for new measured
  28230. values.<br>
  28231. Default: 5, valid values: any whole number<br><br>
  28232. </li>
  28233. <li>roundTemperatureDecimal,roundHumidityDecimal,roundPressureDecimal<br>
  28234. Round temperature, humidity or pressure values to given decimal places.<br>
  28235. Default: 1, valid values: 0, 1, 2<br><br>
  28236. </li>
  28237. <li>altitude<br>
  28238. if set, this altitude is used for calculating the pressure related to sea level (nautic null) NN<br><br>
  28239. Note: this is a global attributes, e.g<br>
  28240. <code>attr global altitude 220</code>
  28241. </li>
  28242. <li><a href="#IODev">IODev</a></li>
  28243. <li><a href="#do_not_notify">do_not_notify</a></li>
  28244. <li><a href="#showtime">showtime</a></li>
  28245. </ul><br>
  28246. </ul>
  28247. <a name="I2C_BMP180"></a>
  28248. <h3>I2C_BMP180</h3>
  28249. <ul>
  28250. <a name="I2C_BMP180"></a>
  28251. <p>
  28252. With this module you can read values from the digital pressure sensors BMP180 and BMP085
  28253. via the i2c bus on Raspberry Pi.<br><br>
  28254. <b>There are two possibilities connecting to I2C bus:</b><br>
  28255. <ul>
  28256. <li><b>via RPII2C module</b><br>
  28257. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28258. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28259. <b>attribute IODev must be set</b><br><br>
  28260. </li>
  28261. <li><b>via HiPi library</b><br>
  28262. Add these two lines to your <b>/etc/modules</b> file to load the I2C relevant kernel modules
  28263. automaticly during booting your Raspberry Pi.<br>
  28264. <code><pre>i2c-bcm2708
  28265. i2c-dev</pre></code>
  28266. Install HiPi perl modules:<br>
  28267. <code><pre>wget http://raspberry.znix.com/hipifiles/hipi-install
  28268. perl hipi-install</pre></code>
  28269. To change the permissions of the I2C device create file:<br>
  28270. <code><pre> /etc/udev/rules.d/98_i2c.rules</pre></code>
  28271. with this content:<br>
  28272. <code><pre>SUBSYSTEM=="i2c-dev", MODE="0666"</pre></code>
  28273. <b>Reboot</b><br><br>
  28274. To use the sensor on the second I2C bus at P5 connector
  28275. (only for version 2 of Raspberry Pi) you must add the bold
  28276. line of following code to your FHEM start script:
  28277. <code><pre> case "$1" in
  28278. 'start')
  28279. <b>sudo hipi-i2c e 0 1</b>
  28280. ...</pre></code>
  28281. </li></ul>
  28282. <p>
  28283. <b>Define</b>
  28284. <ul>
  28285. <code>define BMP180 I2C_BMP180 [&lt;I2C device&gt;]</code><br><br>
  28286. &lt;I2C device&gt; must not be used if you connect via RPII2C module. For HiPi it's mandatory. <br>
  28287. <br>
  28288. Examples:
  28289. <pre>
  28290. define BMP180 I2C_BMP180 /dev/i2c-0
  28291. attr BMP180 oversampling_settings 3
  28292. attr BMP180 poll_interval 5
  28293. </pre>
  28294. <pre>
  28295. define BMP180 I2C_BMP180
  28296. attr BMP180 IODev RPiI2CMod
  28297. attr BMP180 oversampling_settings 3
  28298. attr BMP180 poll_interval 5
  28299. </pre>
  28300. </ul>
  28301. <a name="I2C_BMP180set"></a>
  28302. <b>Set</b>
  28303. <ul>
  28304. <code>set BMP180 &lt;readValues&gt;</code>
  28305. <br><br>
  28306. Reads the current temperature and pressure values from sensor.<br>
  28307. Normaly this execute automaticly at each poll intervall. You can execute
  28308. this manually if you want query the current values.
  28309. <br><br>
  28310. </ul>
  28311. <a name="I2C_BMP180get"></a>
  28312. <b>Get</b>
  28313. <ul>
  28314. N/A
  28315. </ul>
  28316. <br>
  28317. <a name="I2C_BMP180attr"></a>
  28318. <b>Attributes</b>
  28319. <ul>
  28320. <li>oversampling_settings<br>
  28321. Controls the oversampling setting of the pressure measurement in the sensor.<br>
  28322. Default: 3, valid values: 0, 1, 2, 3<br><br>
  28323. </li>
  28324. <li>poll_interval<br>
  28325. Set the polling interval in minutes to query the sensor for new measured
  28326. values.<br>
  28327. Default: 5, valid values: 1, 2, 5, 10, 20, 30<br><br>
  28328. </li>
  28329. <li>roundTemperatureDecimal<br>
  28330. Round temperature values to given decimal places.<br>
  28331. Default: 1, valid values: 0, 1, 2<br><br>
  28332. </li>
  28333. <li>roundPressureDecimal<br>
  28334. Round temperature values to given decimal places.<br>
  28335. Default: 1, valid values: 0, 1, 2<br><br>
  28336. </li>
  28337. <li>altitude<br>
  28338. if set, this altitude is used for calculating the pressure related to sea level (nautic null) NN<br><br>
  28339. Note: this is a global attributes, e.g<br>
  28340. <ul>
  28341. attr global altitude 220
  28342. </ul>
  28343. </li>
  28344. </ul>
  28345. <br>
  28346. <b>Notes</b>
  28347. <ul>
  28348. <li>I2C bus timing<br>
  28349. For all sensor operations an I2C interface with blocking IO is assumed (e.g. RPII2C).
  28350. If you use an I2C interface with non-blocking IO (e.g. FRM over ethernet) operation errors may occur,
  28351. especially if setting the attribute oversampling_settings to a value higher than 1.
  28352. This may be compensated depending on I2C interface used. For Firmata try setting the attribute
  28353. i2c-config in the FRM module to a value of about 30000 microseconds.<br><br>
  28354. </li>
  28355. </ul>
  28356. <br>
  28357. </ul>
  28358. <a name="I2C_DS1307"></a>
  28359. <h3>I2C_DS1307</h3>
  28360. <ul>
  28361. reads a DS1307 real-time clock chip via I2C.
  28362. Requires a defined <a href="#I2C">I2C</a>-device to work.<br>
  28363. <a name="I2C_DS1307define"></a>
  28364. <b>Define</b>
  28365. <ul>
  28366. <code>define &lt;name&gt; I2C_DS1307 &lt;i2c-address&gt;</code> <br>
  28367. Specifies the I2C_DS1307 device.<br>
  28368. <li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
  28369. </ul>
  28370. <br>
  28371. <a name="I2C_DS1307set"></a>
  28372. <b>Set</b><br>
  28373. <ul>
  28374. <li><code>set &lt;name&gt; datetime</code>; set DS1307 time. Format is JJJJ-MM-DD HH:MM:SSdisplayed&gt;<br></li>
  28375. <li><code>set &lt;name&gt; now</code><br></li>
  28376. </ul>
  28377. <a name="I2C_I2Cget"></a>
  28378. <b>Get</b><br>
  28379. <ul>
  28380. N/A<br>
  28381. </ul><br>
  28382. <a name="I2C_DS1307attr"></a>
  28383. <b>Attributes</b><br>
  28384. <ul>
  28385. <li>poll_interval &lt;seconds&gt;</li>
  28386. <li><a href="#IODev">IODev</a><br>
  28387. Specify which <a href="#I2C">I2C</a> to use. (Optional, only required if there is more
  28388. than one I2C-device defined.)
  28389. </li>
  28390. <li><a href="#eventMap">eventMap</a><br></li>
  28391. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  28392. </ul>
  28393. </ul>
  28394. <br>
  28395. <a name="I2C_EEPROM"></a>
  28396. <h3>I2C_EEPROM</h3>
  28397. <ul>
  28398. <a name="I2C_EEPROM"></a>
  28399. Provides an interface to an I2C EEPROM.<br>
  28400. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28401. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28402. <b>attribute IODev must be set</b><br>
  28403. <a name="I2C_EEPROMDefine"></a><br>
  28404. <b>Define</b>
  28405. <ul>
  28406. <code>define &lt;name&gt; I2C_EEPROM &lt;I2C Address&gt;</code><br>
  28407. where <code>&lt;I2C Address&gt;</code> is without direction bit<br>
  28408. </ul>
  28409. <a name="I2C_EEPROMSet"></a>
  28410. <b>Set</b>
  28411. <ul>
  28412. <code>set &lt;name&gt; &lt;byte address&gt; &lt;value&gt;</code><br><br>
  28413. where <code>&lt;byte address&gt;</code> is a number (0..device specific) and <code>&lt;value&gt;</code> is a number (0..255)<br>
  28414. both numbers can be written in decimal or hexadecimal notation.<br>
  28415. <br>
  28416. Example:
  28417. <ul>
  28418. <code>set eeprom1 0x02 0xAA</code><br>
  28419. <code>set eeprom1 2 170</code><br>
  28420. </ul><br>
  28421. </ul>
  28422. <a name="I2C_EEPROMGet"></a>
  28423. <b>Get</b>
  28424. <ul>
  28425. <code>get &lt;name&gt;</code>
  28426. <br><br>
  28427. refreshes all readings
  28428. </ul><br>
  28429. <ul>
  28430. <code>get &lt;name&gt; &lt;byte address&gt; [Bit&lt;bitnumber(0..7)&gt;]</code>
  28431. <br><br>
  28432. returnes actual reading of stated &lt;byte address&gt; or a single bit of &lt;byte address&gt;<br>
  28433. Values are readout from readings, NOT from device!
  28434. </ul><br>
  28435. <a name="I2C_EEPROMAttr"></a>
  28436. <b>Attributes</b>
  28437. <ul>
  28438. <li>poll_interval<br>
  28439. Set the polling interval in minutes to query the EEPROM content<br>
  28440. Default: -, valid values: decimal number<br><br>
  28441. </li>
  28442. <li>EEPROM_size<br>
  28443. Sets the storage size of the EEPROM<br>
  28444. Default: 128, valid values: 128 (128bit), 2k (2048bit)<br><br>
  28445. </li>
  28446. <li><a href="#IODev">IODev</a></li>
  28447. <li><a href="#ignore">ignore</a></li>
  28448. <li><a href="#do_not_notify">do_not_notify</a></li>
  28449. <li><a href="#showtime">showtime</a></li>
  28450. </ul>
  28451. <br>
  28452. </ul>
  28453. <a name="I2C_HDC1008"></a>
  28454. <h3>I2C_HDC1008</h3>
  28455. <ul>
  28456. <a name="I2C_HDC1008"></a>
  28457. Provides an interface to the I2C_HDC1008 I2C Humidity sensor from <a href=" http://www.ti.com">Texas Instruments</a>.
  28458. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28459. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28460. <b>attribute IODev must be set</b><br>
  28461. <a name="I2C_HDC1008Define"></a><br>
  28462. <b>Define</b>
  28463. <ul>
  28464. <code>define &lt;name&gt; I2C_HDC1008 [&lt;I2C Address&gt;]</code><br>
  28465. where <code>&lt;I2C Address&gt;</code> is an 2 digit hexadecimal value<br>
  28466. </ul>
  28467. <a name="I2C_HDC1008Set"></a>
  28468. <b>Set</b>
  28469. <ul>
  28470. <code>set &lt;name&gt; Update</code><br>
  28471. Reads the current temperature and humidity values from sensor.<br><br>
  28472. <code>set &lt;name&gt; Reset</code><br>
  28473. Resets the sensor
  28474. <code>set &lt;name&gt; Heater {on|off}</code><br>
  28475. turns the sensor heater on or off
  28476. </ul>
  28477. <a name="I2C_HDC1008Attr"></a>
  28478. <b>Attributes</b>
  28479. <ul>
  28480. <li>interval<br>
  28481. Set the polling interval in minutes to query data from sensor<br>
  28482. Default: 5, valid values: 1,2,5,10,20,30<br><br>
  28483. </li>
  28484. <li>Resolution_Temperature<br>
  28485. resolution for measurement temperature.<br>
  28486. Standard: 14Bit, valid values: 11Bit, 14Bit<br><br>
  28487. </li>
  28488. <li>Resolution_Humidity<br>
  28489. resolution for measurement humidity.<br>
  28490. Standard: 14Bit, valid values: 8Bit, 11Bit, 14Bit<br><br>
  28491. </li>
  28492. <li>roundHumidityDecimal<br>
  28493. Number of decimal places for humidity value<br>
  28494. Default: 1, valid values: 0 1 2,...<br><br>
  28495. </li>
  28496. <li>roundTemperatureDecimal<br>
  28497. Number of decimal places for temperature value<br>
  28498. Default: 1, valid values: 0,1,2,...<br><br>
  28499. </li>
  28500. <li><a href="#IODev">IODev</a></li>
  28501. </ul><br>
  28502. </ul>
  28503. <a name="I2C_K30"></a>
  28504. <h3>I2C_K30</h3>
  28505. (en | <a href="commandref_DE.html#I2C_K30">de</a>)
  28506. <ul>
  28507. <a name="I2C_K30"></a>
  28508. Provides an interface to the K30 CO2 sensor from <a href="www.senseair.com">SenseAir</a>. This module
  28509. expects the sensor to be connected via I2C (for a quick summary, see
  28510. <a href="http://co2meters.com/Documentation/AppNotes/AN142-RaspberryPi-K_series.pdf">Application Note 142 "K-30/K-33 I2C on Raspberry Pi"</a>
  28511. from co2meters.com).<br>
  28512. On my Raspberry Pi 2, I needed to reduce I2C frequency to 90 kHz, otherwise most read/write cycles failed (add
  28513. "options i2c_bcm2708 baudrate=90000", e.g. to /etc/modprobe.d/i2c-options.conf). I still see sporadic errors (about 5% of all readings
  28514. fail), but this seems to be expected - the datasheet warns that the uC on the sensor will only correctly handle I2C when it's not busy
  28515. doing CO2 measurement.
  28516. The I2C messages are sent through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28517. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28518. <b>attribute IODev must be set</b><br>
  28519. <a name="I2C_K30Define"></a><br>
  28520. <b>Define</b>
  28521. <ul>
  28522. <code>define &lt;name&gt; I2C_K30 [&lt;I2C Address&gt;]</code><br>
  28523. where <code>&lt;I2C Address&gt;</code> is the configured I2C address of the sensor (default: 104, i.e. 0x68) <br>
  28524. </ul>
  28525. <a name="I2C_K30Set"></a>
  28526. <b>Set</b>
  28527. <ul>
  28528. <code>set &lt;name&gt; readValues</code><br>
  28529. Reads the current CO2 value from sensor.<br><br>
  28530. </ul>
  28531. <a name="I2C_K30Attr"></a>
  28532. <b>Attributes</b>
  28533. <ul>
  28534. <li>poll_interval<br>
  28535. Set the polling interval in minutes to query data from sensor<br>
  28536. Default: 5, valid values: 1,2,5,10,20,30<br><br>
  28537. </li>
  28538. <li><a href="#IODev">IODev</a></li>
  28539. <li><a href="#do_not_notify">do_not_notify</a></li>
  28540. <li><a href="#showtime">showtime</a></li>
  28541. </ul><br>
  28542. </ul>
  28543. <a name="I2C_LCD"></a>
  28544. <h3>I2C_LCD</h3>
  28545. <ul>
  28546. drives LiquidCrystal Displays (LCD) that are connected to Firmata (via I2C).
  28547. Supported are Displays that use a PCF8574T as I2C Bridge (as found on eBay when searching for
  28548. 'LCD' and 'I2C'). Tested is the 1602 type (16 characters, 2 Lines), the 2004 type (and other cheap chinise-made
  28549. I2C-LCDs for Arduino) ship with the same library, so they should work as well.
  28550. See <a name="LiquidCrystal tutorial">http://arduino.cc/en/Tutorial/LiquidCrystal</a> for details about
  28551. how to hook up the LCD to the arduino.
  28552. Requires a defined <a href="#I2C">I2C</a>-device to work.<br>
  28553. this I2C-device has to be configures for i2c by setting attr 'i2c-config' on the I2C-device<br>
  28554. <a name="I2C_LCDdefine"></a>
  28555. <b>Define</b>
  28556. <ul>
  28557. <code>define &lt;name&gt; I2C_LCD &lt;size-x&gt; &lt;size-y&gt; &lt;i2c-address&gt;</code> <br>
  28558. Specifies the I2C_LCD device.<br>
  28559. <li>size-x is the number of characters per line</li>
  28560. <li>size-y is the numbers of rows.</li>
  28561. <li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
  28562. </ul>
  28563. <br>
  28564. <a name="I2C_LCDset"></a>
  28565. <b>Set</b><br>
  28566. <ul>
  28567. <li><code>set &lt;name&gt; text &lt;text to be displayed&gt;</code><br></li>
  28568. <li><code>set &lt;name&gt; home</code><br></li>
  28569. <li><code>set &lt;name&gt; clear</code><br></li>
  28570. <li><code>set &lt;name&gt; display on|off</code><br></li>
  28571. <li><code>set &lt;name&gt; cursor &lt;...&gt;</code><br></li>
  28572. <li><code>set &lt;name&gt; scroll left|right</code><br></li>
  28573. <li><code>set &lt;name&gt; backlight on|off</code><br></li>
  28574. <li><code>set &lt;name&gt; reset</code><br></li>
  28575. <li><code>set &lt;name&gt; writeXY x-pos,y-pos,len[,l] &lt;text to be displayed&gt;</code><br></li>
  28576. </ul>
  28577. <a name="I2C_I2Cget"></a>
  28578. <b>Get</b><br>
  28579. <ul>
  28580. N/A<br>
  28581. </ul><br>
  28582. <a name="I2C_LCDattr"></a>
  28583. <b>Attributes</b><br>
  28584. <ul>
  28585. <li>backLight &lt;on|off&gt;</li>
  28586. <li>autoClear &lt;on|off&gt;</li>
  28587. <li>autoBreak &lt;on|off&gt;</li>
  28588. <li>restoreOnStartup &lt;on|off&gt;</li>
  28589. <li>restoreOnReconnect &lt;on|off&gt;</li>
  28590. <li>replaceRegex &auml;=ae,cd+=ef,g=\x{DF}<br/>
  28591. specify find=replace regex pattern eg for non-printable characters. \x{DF} will become char 223, which is &ordm; on my lcd.
  28592. </li>
  28593. <li>customChar&lt;0-7&gt;<br/>
  28594. up to 8 5x8px custom chars, see http://www.quinapalus.com/hd44780udg.html for a generator, use \x{00} to \x{07} to display</li>
  28595. <li><a href="#IODev">IODev</a><br>
  28596. Specify which <a href="#I2C">I2C</a> to use. (Optional, only required if there is more
  28597. than one I2C-device defined.)
  28598. </li>
  28599. <li><a href="#eventMap">eventMap</a><br></li>
  28600. <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
  28601. </ul>
  28602. </ul>
  28603. <br>
  28604. <a name="I2C_LM75A"></a>
  28605. <h3>I2C_LM75A</h3>
  28606. (en | <a href="commandref_DE.html#I2C_LM75A">de</a>)
  28607. <ul>
  28608. <a name="I2C_LM75A"></a>
  28609. Provides an interface to the LM75A I2C Temperature sensor.</a>.
  28610. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28611. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28612. <b>attribute IODev must be set</b><br>
  28613. <a name="I2C_LM75ADefine"></a><br>
  28614. <b>Define</b>
  28615. <ul>
  28616. <code>define &lt;name&gt; I2C_LM75A [&lt;I2C Address&gt;]</code><br>
  28617. where <code>&lt;I2C Address&gt;</code> is an 2 digit hexadecimal value<br>
  28618. </ul>
  28619. <a name="I2C_LM75ASet"></a>
  28620. <b>Set</b>
  28621. <ul>
  28622. <code>set &lt;name&gt; readValues</code><br>
  28623. Reads the current temperature values from sensor.<br><br>
  28624. </ul>
  28625. <a name="I2C_LM75AAttr"></a>
  28626. <b>Attributes</b>
  28627. <ul>
  28628. <li>poll_interval<br>
  28629. Set the polling interval in minutes to query data from sensor<br>
  28630. Default: 5, valid values: 1,2,5,10,20,30<br><br>
  28631. </li>
  28632. <li>roundTemperatureDecimal<br>
  28633. Number of decimal places for temperature value<br>
  28634. Default: 1, valid values: 0 1 2<br><br>
  28635. </li>
  28636. <li><a href="#IODev">IODev</a></li>
  28637. <li><a href="#do_not_notify">do_not_notify</a></li>
  28638. <li><a href="#showtime">showtime</a></li>
  28639. </ul><br>
  28640. </ul>
  28641. <a name="I2C_MCP23008"></a>
  28642. <h3>I2C_MCP23008</h3>
  28643. (en | <a href="commandref_DE.html#I2C_MCP23008">de</a>)
  28644. <ul>
  28645. <a name="I2C_MCP23008"></a>
  28646. Provides an interface to the MCP23008 16 channel port extender IC. On Raspberry Pi the Interrupt Pin's can be connected to an GPIO and <a href="#RPI_GPIO">RPI_GPIO</a> can be used to get the port values if an interrupt occurs.<br>
  28647. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28648. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28649. <b>attribute IODev must be set</b><br>
  28650. <a name="I2C_MCP23008Define"></a><br>
  28651. <b>Define</b>
  28652. <ul>
  28653. <code>define &lt;name&gt; I2C_MCP23008 &lt;I2C Address&gt;</code><br>
  28654. where <code>&lt;I2C Address&gt;</code> is without direction bit<br>
  28655. </ul>
  28656. <a name="I2C_MCP23008Set"></a>
  28657. <b>Set</b>
  28658. <ul>
  28659. <code>set &lt;name&gt; &lt;port[,port[...]]&gt; &lt;value&gt;</code><br><br>
  28660. where <code>&lt;port&gt;</code> is one of PortA0 to PortA7 and <code>&lt;value&gt;</code> is one of:<br>
  28661. <ul>
  28662. <code>
  28663. off<br>
  28664. on<br>
  28665. </code>
  28666. </ul>
  28667. <br>
  28668. Example:
  28669. <ul>
  28670. <code>set mod1 PortA4 on</code><br>
  28671. <code>set mod1 PortA4,PortA6 off</code><br>
  28672. <code>set mod1 PortA4,A6 on</code><br>
  28673. </ul><br>
  28674. </ul>
  28675. <a name="I2C_MCP23008Get"></a>
  28676. <b>Get</b>
  28677. <ul>
  28678. <code>get &lt;name&gt;</code>
  28679. <br><br>
  28680. refreshes all readings
  28681. </ul><br>
  28682. <a name="I2C_MCP23008Attr"></a>
  28683. <b>Attributes</b>
  28684. <ul>
  28685. <li>poll_interval<br>
  28686. Set the polling interval in minutes to query the GPIO's level<br>
  28687. Default: -, valid values: decimal number<br><br>
  28688. </li>
  28689. <li>OutputPorts<br>
  28690. Comma separated list of ports that are used as Output<br>
  28691. Ports not in this list can't be written<br>
  28692. Default: no, valid values: A0-A7<br><br>
  28693. </li>
  28694. <li>OnStartup<br>
  28695. Comma separated list of output ports and their desired state after start<br>
  28696. Without this atribut all output ports will set to last state<br>
  28697. Default: -, valid values: &lt;port&gt;=on|off|last where &lt;port&gt; = A0-A7<br><br>
  28698. </li>
  28699. <li>Pullup<br>
  28700. Comma separated list of input ports which switch on their internal 100k pullup<br>
  28701. Default: -, valid values: A0-A7<br><br>
  28702. </li>
  28703. <li>Interrupt<br>
  28704. Comma separated list of input ports which will trigger the IntA/B pin<br>
  28705. Default: -, valid values: A0-A7<br><br>
  28706. </li>
  28707. <li>invert_input<br>
  28708. Comma separated list of input ports which use inverted logic<br>
  28709. Default: -, valid values: A0-A7<br><br>
  28710. </li>
  28711. <li>InterruptOut<br>
  28712. Configuration options for INT output pin<br>
  28713. Values:<br>
  28714. <ul>
  28715. <li>
  28716. active-low (INT output is active low)
  28717. </li>
  28718. <li>
  28719. active-high (INT output is active high)
  28720. </li>
  28721. <li>
  28722. open-drain (INTA output is open drain)
  28723. </li><br>
  28724. </ul>
  28725. </li>
  28726. <li><a href="#IODev">IODev</a></li>
  28727. <li><a href="#ignore">ignore</a></li>
  28728. <li><a href="#do_not_notify">do_not_notify</a></li>
  28729. <li><a href="#showtime">showtime</a></li>
  28730. </ul>
  28731. <br>
  28732. </ul>
  28733. <a name="I2C_MCP23017"></a>
  28734. <h3>I2C_MCP23017</h3>
  28735. (en | <a href="commandref_DE.html#I2C_MCP23017">de</a>)
  28736. <ul>
  28737. <a name="I2C_MCP23017"></a>
  28738. Provides an interface to the MCP23017 16 channel port extender IC. On Raspberry Pi the Interrupt Pin's can be connected to an GPIO and <a href="#RPI_GPIO">RPI_GPIO</a> can be used to get the port values if an interrupt occurs.<br>
  28739. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28740. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28741. <b>attribute IODev must be set</b><br>
  28742. <a name="I2C_MCP23017Define"></a><br>
  28743. <b>Define</b>
  28744. <ul>
  28745. <code>define &lt;name&gt; I2C_MCP23017 &lt;I2C Address&gt;</code><br>
  28746. where <code>&lt;I2C Address&gt;</code> is without direction bit<br>
  28747. </ul>
  28748. <a name="I2C_MCP23017Set"></a>
  28749. <b>Set</b>
  28750. <ul>
  28751. <code>set &lt;name&gt; &lt;port[,port[...]]&gt; &lt;value&gt;</code><br><br>
  28752. where <code>&lt;port&gt;</code> is one of PortA0 to PortA7 / PortB0 to PortB7 and <code>&lt;value&gt;</code> is one of:<br>
  28753. <ul>
  28754. <code>
  28755. off<br>
  28756. on<br>
  28757. </code>
  28758. </ul>
  28759. <br>
  28760. Example:
  28761. <ul>
  28762. <code>set mod1 PortA4 on</code><br>
  28763. <code>set mod1 PortA4,PortB6 off</code><br>
  28764. <code>set mod1 PortA4,B6 on</code><br>
  28765. </ul><br>
  28766. </ul>
  28767. <a name="I2C_MCP23017Get"></a>
  28768. <b>Get</b>
  28769. <ul>
  28770. <code>get &lt;name&gt;</code>
  28771. <br><br>
  28772. refreshes all readings
  28773. </ul><br>
  28774. <a name="I2C_MCP23017Attr"></a>
  28775. <b>Attributes</b>
  28776. <ul>
  28777. <li>poll_interval<br>
  28778. Set the polling interval in minutes to query the GPIO's level<br>
  28779. Default: -, valid values: decimal number<br><br>
  28780. </li>
  28781. <li>OutputPorts<br>
  28782. Comma separated list of ports that are used as Output<br>
  28783. Ports not in this list can't be written<br>
  28784. Default: no, valid values: A0-A7, B0-B7<br><br>
  28785. </li>
  28786. <li>OnStartup<br>
  28787. Comma separated list of output ports and their desired state after start<br>
  28788. Without this atribut all output ports will set to last state<br>
  28789. Default: -, valid values: &lt;port&gt;=on|off|last where &lt;port&gt; = A0-A7, B0-B7<br><br>
  28790. </li>
  28791. <li>Pullup<br>
  28792. Comma separated list of input ports which switch on their internal 100k pullup<br>
  28793. Default: -, valid values: A0-A7, B0-B7<br><br>
  28794. </li>
  28795. <li>Interrupt<br>
  28796. Comma separated list of input ports which will trigger the IntA/B pin<br>
  28797. Default: -, valid values: A0-A7, B0-B7<br><br>
  28798. </li>
  28799. <li>invert_input<br>
  28800. Comma separated list of input ports which use inverted logic<br>
  28801. Default: -, valid values: A0-A7, B0-B7<br><br>
  28802. </li>
  28803. <li>InterruptOut<br>
  28804. Configuration options for INTA/INTB output pins<br>
  28805. Values:<br>
  28806. <ul>
  28807. <li>
  28808. separate_active-low (INTA/INTB outputs are separate for both ports and active low)
  28809. </li>
  28810. <li>
  28811. separate_active-high (INTA/INTB outputs are separate for both ports and active high)
  28812. </li>
  28813. <li>
  28814. separate_open-drain (INTA/INTB outputs are separate for both ports and open drain)
  28815. </li>
  28816. <li>
  28817. connected_active-low (INTA/INTB outputs are internally connected and active low)
  28818. </li>
  28819. <li>
  28820. connected_active-high (INTA/INTB outputs are internally connected and active high)
  28821. </li>
  28822. <li>
  28823. connected_open-drain (INTA/INTB outputs are internally connected and open drain)
  28824. </li><br>
  28825. </ul>
  28826. </li>
  28827. <li><a href="#IODev">IODev</a></li>
  28828. <li><a href="#ignore">ignore</a></li>
  28829. <li><a href="#do_not_notify">do_not_notify</a></li>
  28830. <li><a href="#showtime">showtime</a></li>
  28831. </ul>
  28832. <br>
  28833. </ul>
  28834. <a name="I2C_MCP342x"></a>
  28835. <h3>I2C_MCP342x</h3>
  28836. (en | <a href="commandref_DE.html#I2C_MCP342x">de</a>)
  28837. <ul>
  28838. <a name="I2C_MCP342x"></a>
  28839. Provides an interface to the MCP3422/3/4 A/D converter.
  28840. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  28841. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  28842. <b>attribute IODev must be set</b><br>
  28843. <a name="I2C_MCP342xDefine"></a><br>
  28844. <b>Define</b>
  28845. <ul>
  28846. <code>define &lt;name&gt; I2C_MCP342x [[&lt;I2C Address&gt;] &lt;n channels&gt;]</code><br>
  28847. where &lt;I2C Address&gt; is without direction bit and &lt;n channels&gt; is the number of A/D channels<br><br>
  28848. </ul>
  28849. <a name="I2C_MCP342xSet"></a>
  28850. <b>Get</b>
  28851. <ul>
  28852. <code>get &lt;name&gt; [[[&lt;channel&gt;] &lt;resolution&gt; ] &lt;gain&gt;]</code><br>
  28853. Returns the level on specific &lt;channel&gt;. &lt;resolution&gt; and &lt;gain&gt; will override attibutes for actual operation.
  28854. Without attributes only the readings will be refreshed.<br><br>
  28855. </ul>
  28856. <a name="I2C_MCP342xAttr"></a>
  28857. <b>Attributes</b>
  28858. <ul>
  28859. <li>poll_interval<br>
  28860. Set the polling interval in minutes to query data from sensor<br>
  28861. Default: 5, valid values: 1,2,5,10,20,30<br><br>
  28862. </li>
  28863. Following attributes are separate for all channels.<br><br>
  28864. <li>ch1resolution<br>
  28865. resolution settings<br>
  28866. the bigger the resolution the longer the conversion time.<br>
  28867. Default: 12, valid values: 12,14,16,18<br><br>
  28868. </li>
  28869. <li>ch1gain<br>
  28870. gain setting<br>
  28871. Important: the gain setting will reduce the measurement range an may produce an overflow. In this case "overflow" will be added to reading<br>
  28872. Default: 1, valid values: 1,2,4,8<br><br>
  28873. </li>
  28874. <li>ch1factor<br>
  28875. correction factor (will be mutiplied to channel value)<br>
  28876. Default: 1, valid values: number<br><br>
  28877. </li>
  28878. <li>ch1roundDecimal<br>
  28879. Number of decimal places for value<br>
  28880. Default: 3, valid values: 0,1,2,3<br><br>
  28881. </li>
  28882. <li><a href="#IODev">IODev</a></li>
  28883. <li><a href="#do_not_notify">do_not_notify</a></li>
  28884. <li><a href="#showtime">showtime</a></li>
  28885. </ul><br>
  28886. </ul>
  28887. <a name="I2C_MMA845X"></a>
  28888. <h3>I2C_MMA845X</h3>
  28889. <ul>
  28890. This modules is a driver for using the Freescale/NXP MMA8451/MMA84512/MMA84513 accelerometer with I2C bus interface (see the <a href="http://www.nxp.com/products/sensors/accelerometers/3-axis-accelerometers/2g-4g-8g-low-g-14-bit-digital-accelerometer:MMA8451Q">NXP product description</a> for full specifications).
  28891. Note that the Freescale/NXP MMA8450 accelerometer, though similar, has a different register set and cannot be addressed by this module.
  28892. <br><br>
  28893. The I2C messages are sent through an interface module like <a href="#RPII2C">RPII2C</a> or <a href="#FRM">FRM</a>,
  28894. so this device must be defined first and assigned as IODev attribute.
  28895. <br><br>
  28896. This module supports the following features:
  28897. <ul>
  28898. <li>read current acceleration (x, y, z)</li>
  28899. <li>calibrate acceleration offsets</li>
  28900. <li>orientation detection</li>
  28901. <li>motion detection (at least one axis above threshold) or freefall detection (all axes below threshold)</li>
  28902. <li>jolt detection (at least one axis change above threshold)</li>
  28903. <li>single and/or double pulse (tap) detection</li>
  28904. <li>detection event latching</li>
  28905. <li>hardware interrupt signalling of detection events</li>
  28906. </ul>
  28907. <br>
  28908. The accelerometer is configured for an output data rate of 200 Hz in normal oversampling mode with the low noise
  28909. filter enabled providing a full scale range of +/-4 g as default. This output data rate can be changed if required.
  28910. <br><br>
  28911. The detection events (orientation, motion/freefall, jolt, pulse) can be signaled by one or two hardware outputs that can
  28912. be used for interrupt driven operations without need for continuous polling. If the event latch is enabled, the events
  28913. and the interrupt signals will remain set until the event source register is read, providing additional event details
  28914. (e.g. axis, direction). With orientation detection the event latch is always enabled.
  28915. <br><br>
  28916. The acceleration measurement output can optionally be passed through a high-pass filter with a selectable cutoff frequency
  28917. effectively eliminating the gravity offset of 1g to provide change detection instead of orientation detection.
  28918. The motion/freefall detection will always bypass the high-pass filter while the jolt and pulse detections will always
  28919. use the high-pass filter with default settings. When using motion detection you would typically not enable the gravity
  28920. axis or set a threshold higher than 1 g.
  28921. <br><br>
  28922. While the orientation detection works well with the default settings the other detection modes typically require fine tuning
  28923. of their parameters. To understand the detection modes and their parameters in detail please refer to the Freescale annotations
  28924. AN4068 (orientation), AN4070 (freefall/motion), AN4071 (jolt) and AN4072 (pulse).
  28925. <br><br>
  28926. Several of the parameters represent a frequency [Hz], a threshold [g]/[°] or a duration [ms]. Their absolute values often
  28927. depend on a combination of register settings requiring lookup tables. This module uses the raw binary values for these
  28928. attributes making fine tuning easier because value granularity is always 1. If you need to translate between binary
  28929. values and absolute values please refer to the device documentation.
  28930. <br><br>
  28931. <a name="I2C_MMA845Xdefine"></a>
  28932. <b>Define</b>
  28933. <ul>
  28934. <code>define &lt;device name&gt I2C_MMA845X &lt;I2C address&gt</code>
  28935. <br><br>
  28936. <code>&lt;I2C address&gt;</code> may be 0x1C or 0x1D
  28937. <br><br>
  28938. Example:
  28939. <pre>
  28940. define MMA8452 I2C_MMA845X 0x1D
  28941. attr MMA8452 IODev I2CModule
  28942. attr MMA8452 pollInterval 5
  28943. </pre>
  28944. Notes:
  28945. <ul>
  28946. <br>
  28947. <li>The I2C bus connection must be kept active between write and read with the MMA8451/MMA84512/MMA84513 devices
  28948. (repeated start alias combined write/read). This communication mode is not the default on most platforms:
  28949. <br><br>
  28950. <u>Raspberry</u>:
  28951. <ul>
  28952. <li>Change parameter 'combined' of BCM2708 driver from N to Y.<br>
  28953. Temporary: <code>sudo su - echo -n 1 > /sys/module/i2c_bcm2708/parameters/combined exit</code>.<br>
  28954. Permanent: add <code>echo -n 1 > /sys/module/i2c_bcm2708/parameters/combined</code> to script
  28955. <code>/etc/init.d/rc.local</code>.
  28956. </li>
  28957. <li>Set attribute <code>useHWLib</code> of your RPII2C device to <code>SMBus</code>
  28958. (RPII2C's ioctl mode currently does not support combined write/read mode).
  28959. </li>
  28960. </ul>
  28961. <br>
  28962. <u>Firmata</u>:
  28963. <ul>
  28964. <li>Make sure to call <code>Wire.endTransmission(false)</code>. Currently requires manually changing the
  28965. <code>ino</code> file (Standard Firmata) or <code>I2CFirmata.h</code> (Configurable Firmata).
  28966. </li>
  28967. </ul>
  28968. </li>
  28969. </ul>
  28970. </ul>
  28971. <br>
  28972. <a name="I2C_MMA845Xset"></a>
  28973. <b>Set</b><br>
  28974. <ul>
  28975. <ul>
  28976. <li><code>set &lt;device name&gt calibrate</code><br>
  28977. Calibrate the acceleration offset based on the next sample assuming 1g gravity on any one axis.<br>
  28978. Prerequisites: Align one axis with gravity and keep device stationary during calibration.
  28979. </li>
  28980. </ul>
  28981. </ul>
  28982. <br>
  28983. <a name="I2C_MMA845Xget"></a>
  28984. <b>Get</b><br>
  28985. <ul>
  28986. <ul>
  28987. <li><code>get &lt;device name&gt update</code><br>
  28988. Request an update of the acceleration readings.
  28989. </li>
  28990. <br>
  28991. <li><code>get &lt;device name&gt orientation</code><br>
  28992. Request an update of the orientation reading.
  28993. </li>
  28994. <li><code>get &lt;device name&gt eventSources</code><br>
  28995. Request an update of the event source readings.
  28996. </li>
  28997. <br>
  28998. <li><code>get &lt;device name&gt update</code><br>
  28999. Perform manual polling, e.g. when attribute <code>pollInterval</code> is set to zero.
  29000. At least one of <code>pollAccelerations</code>, <code>pollOrientation</code> or <code>pollEventSources</code> should be enabled.
  29001. </li>
  29002. </ul>
  29003. </ul>
  29004. <br>
  29005. <a name="I2C_MMA845Xattr"></a>
  29006. <b>Attributes</b>
  29007. <ul>
  29008. <code>attr &lt;device name&gt &lt;attribute name&gt &lt;value&gt</code>
  29009. <br><br>
  29010. Attributes:
  29011. <ul>
  29012. <li><i>IODev</i> &lt;IODev device name&gt<br>
  29013. I2C IODev device name, <i>no default</i>, required
  29014. </li>
  29015. <li><i>pollInterval</i> &lt;seconds&gt<br>
  29016. period for updating acceleration and event source readings, <i>default 10 s</i><br>
  29017. fractional seconds are supported, use 0 to disable polling
  29018. </li>
  29019. <li><i>pollAccelerations</i> 0|1<br>
  29020. include reading of accelerations when polling, <i>default 1</i><br>
  29021. </li>
  29022. <li><i>pollOrientation</i> 0|1<br>
  29023. include reading of orientation when polling, <i>default 1</i><br>
  29024. </li>
  29025. <li><i>pollEventSources</i> 0|1<br>
  29026. include reading of event sources when polling, <i>default 1</i><br>
  29027. </li>
  29028. <li><i>disable</i> 0|1<br>
  29029. disables device (I2C operations), <i>default 0</i>
  29030. </li>
  29031. <li><i>outputDataRate</i> &lt;frequency&gt<br>
  29032. device internal acceleration value output rate, may be one of 1.56, 6.25, 12.5, 50, 100, 200, 400 or 800 Hz, <i>default 200 Hz</i><br>
  29033. affects all timing parameters, is independent of pollInterval
  29034. </li>
  29035. <li><i>highPass</i> &lt;function&gt[,&lt;function&gt]<br>
  29036. select which function should use the high-pass filter, may be any of outputData, jolt or pulse, <i>default jolt,pulse</i><br>
  29037. activating the high-pass filter will remove the 1g offset in the gravity direction
  29038. </li>
  29039. <li><i>highPassCutoffFrequency</i> 0 ... 3<br>
  29040. set the high-pass filter cutoff frequency, changes with on output data rate, <i>default 0</i><br>
  29041. 0 is a higher cutoff frequency (up to 16 Hz) and 3 is a lower cutoff frequency (down to 0.25 Hz), see device manual for details
  29042. </li>
  29043. <li><i>orientation...</i><br>
  29044. orientation detection parameters, see device manual for details
  29045. </li>
  29046. <li><i>motion...</i><br>
  29047. motion/freefall detection parameters, see device manual for details
  29048. </li>
  29049. <li><i>jolt...</i><br>
  29050. jolt detection parameters, see device manual for details
  29051. </li>
  29052. <li><i>pulse...</i><br>
  29053. pulse (tap) detection parameters, see device manual for details
  29054. </li>
  29055. <li><i>...EventLatch</i> 0|1<br>
  29056. if enabled an event (and the hardware output) will stay latched until the event source register is read, <i>default 0</i><br>
  29057. the corresponding event source reading will provide additional information about the event
  29058. </li>
  29059. <li><i>...Interrupt</i> 0|1|2<br>
  29060. an event will also raise one of two hardware outputs, <i>default 0</i><br>
  29061. use 0 to disable linking an event with an hardware outputs
  29062. </li>
  29063. </ul>
  29064. </ul>
  29065. <br>
  29066. <b>Readings</b>
  29067. <ul>
  29068. <ul>
  29069. <li><i>out...</i><br>
  29070. acceleration for x, y and z axes [g]<br>
  29071. the number of decimal places is limited to 3 to remove a significant amount of noise
  29072. </li>
  29073. <li><i>off...</i><br>
  29074. acceleration offset for x, y and z axes from last calibration [g]<br>
  29075. to adjust offsets manually at runtime, change offset readings and toggle disable attribute
  29076. </li>
  29077. <li><i>orientation</i><br>
  29078. current orientation, orientation detection must be enabled, the reading is only updated on change<br>
  29079. P=portrait + U=up/D=down or L=landscape + L=left/R=right, B=back or F=front, X=z-lockout
  29080. </li>
  29081. <li><i>...Event</i><br>
  29082. source of last event, event and event latch must be enabled, the reading is only updated on change<br>
  29083. motion/jolt/pulse: X, Y or Z for the affected axis preceded by a sign for the direction of the the event<br>
  29084. pulse: additional pulse type indicator postfix S=single or D=double
  29085. </li>
  29086. </ul>
  29087. </ul>
  29088. </ul>
  29089. <a name="I2C_PCA9532"></a>
  29090. <h3>I2C_PCA9532</h3>
  29091. (en | <a href="commandref_DE.html#I2C_PCA9532">de</a>)
  29092. <ul>
  29093. <a name="I2C_PCA9532"></a>
  29094. Provides an interface to the PCA9532 I2C 16 channel PWM IC.
  29095. The PCA9532 has 2 independent PWM stages and every channel can be attached to on of these stages or directly turned on or off.
  29096. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  29097. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  29098. <b>attribute IODev must be set</b><br>
  29099. <a name="I2C_PCA9532Define"></a><br>
  29100. <b>Define</b>
  29101. <ul>
  29102. <code>define &lt;name&gt; I2C_PCA9532 &lt;I2C Address&gt;</code><br>
  29103. where <code>&lt;I2C Address&gt;</code> is an 2 digit hexadecimal value<br>
  29104. </ul>
  29105. <a name="I2C_PCA9532Set"></a>
  29106. <b>Set</b>
  29107. <ul>
  29108. <code>set &lt;name&gt; &lt;port&gt; &lt;value&gt;</code><br><br>
  29109. <ul>
  29110. <li>if <code>&lt;port&gt;</code> is one of Port0 to Port15, then <code>&lt;value&gt;</code> will be one of:<br>
  29111. <ul>
  29112. <code>
  29113. off<br>
  29114. on<br>
  29115. PWM0 (output is switched with PWM0 frequency and duty cycle)<br>
  29116. PWM1 (output is switched with PWM1 frequency and duty cycle)<br>
  29117. </code>
  29118. </ul>
  29119. </li>
  29120. <li>
  29121. if <code>&lt;port&gt;</code> is PWM0 or PWM1, then <code>&lt;value&gt;</code> is an value between 0 and 255 and stands for the duty cycle of the PWM stage.
  29122. </li>
  29123. </ul>
  29124. <br>
  29125. Examples:
  29126. <ul>
  29127. <code>set mod1 Port4 PWM1</code><br>
  29128. <code>set mod1 PWM1 128</code><br>
  29129. </ul><br>
  29130. </ul>
  29131. <a name="I2C_PCA9532Get"></a>
  29132. <b>Get</b>
  29133. <ul>
  29134. <code>get &lt;name&gt;</code>
  29135. <br><br>
  29136. refreshes all readings
  29137. </ul><br>
  29138. <a name="I2C_PCA9532Attr"></a>
  29139. <b>Attributes</b>
  29140. <ul>
  29141. <li>poll_interval<br>
  29142. Set the polling interval in minutes to query the GPIO's level<br>
  29143. Default: -, valid values: decimal number<br><br>
  29144. </li>
  29145. <li>OutputPorts<br>
  29146. Comma separated list of Portnumers that are used as Outputs<br>
  29147. Only ports in this list can be written<br>
  29148. Default: no, valid values: 0 1 2 .. 15<br><br>
  29149. </li>
  29150. <li>OnStartup<br>
  29151. Comma separated list of output ports/PWM registers and their desired state after start<br>
  29152. Without this atribut all output ports will set to last state<br>
  29153. Default: -, valid values: &lt;port&gt;=on|off|PWM0|PWM1|last or PWM0|PWM1=0..255|last where &lt;port&gt; = 0 - 15<br><br>
  29154. </li>
  29155. <li>T0/T1<br>
  29156. Sets PWM0/PWM1 to another Frequency. The Formula is: Fx = 152/(Tx + 1) The corresponding frequency value is shown under internals.<br>
  29157. Default: 0 (152Hz), valid values: 0-255<br><br>
  29158. </li>
  29159. <li><a href="#IODev">IODev</a></li>
  29160. <li><a href="#ignore">ignore</a></li>
  29161. <li><a href="#do_not_notify">do_not_notify</a></li>
  29162. <li><a href="#showtime">showtime</a></li>
  29163. </ul>
  29164. <br>
  29165. </ul>
  29166. <a name="I2C_PCA9685"></a>
  29167. <h3>I2C_PCA9685</h3>
  29168. (en | <a href="commandref_DE.html#I2C_PCA9685">de</a>)
  29169. <ul>
  29170. <a name="I2C_PCA9685"></a>
  29171. Provides an interface to the PCA9685 I2C 16 channel PWM IC.
  29172. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  29173. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  29174. <b>attribute IODev must be set</b><br>
  29175. <a name="I2C_PCA9685Define"></a><br>
  29176. <b>Define</b>
  29177. <ul>
  29178. <code>define &lt;name&gt; I2C_PCA9685 &lt;I2C Address&gt; [&lt;I2C Buffer Size&gt;]</code><br>
  29179. where <code>&lt;I2C Address&gt;</code> can be written as decimal value or 0xnn<br>
  29180. <code>&lt;I2C Buffer Size&gt;</code> sets the maximum size of the I2C-Packet.
  29181. Without this option the packet size is 30 Bytes (32 incl. Address and Register number).
  29182. For RPII2C this option has no influence, cause it can deal with arbitrary packet sizes.<br>
  29183. </ul>
  29184. <a name="I2C_PCA9685Set"></a>
  29185. <b>Set</b>
  29186. <ul>
  29187. <code>set &lt;name&gt; &lt;port&gt; &lt;dimvalue&gt; [&lt;delay&gt;]</code><br><br>
  29188. <li>where <code>&lt;port&gt;</code> is one of Port0 to Port15<br>
  29189. and <code>&lt;dimvalue&gt;</code> one of<br>
  29190. <ul>
  29191. <code>
  29192. off<br>
  29193. on<br>
  29194. 0..4095<br>
  29195. </code>
  29196. </ul>
  29197. <code>&lt;delay&gt;</code> defines the switch on time inside the PWM counting loop. It does not have an influence to the duty cycle.
  29198. Default value is 0 and, possible values are 0..4095<br>
  29199. </li><br>
  29200. <li>
  29201. It is also possible to change more than one port at the same time. Just separate them by comma.
  29202. If only the last of the comma separated ports has dimvalue (and delay), all ports will set to the same values.
  29203. Sequently ports will set at once (useful for multi color LED's).<br>
  29204. Also P instead of Port is Possible.
  29205. </li><br>
  29206. <br>
  29207. Examples:
  29208. <ul>
  29209. <code>set mod1 Port04 543</code><br>
  29210. <code>set mod1 Port4 434 765</code><br>
  29211. <code>set mod1 Port1, Port14 434 765</code><br>
  29212. <code>set mod1 Port1 on, P14 434 765</code><br>
  29213. </ul><br>
  29214. </ul>
  29215. <a name="I2C_PCA9685Get"></a>
  29216. <b>Get</b>
  29217. <ul>
  29218. <code>get &lt;name&gt;</code>
  29219. <br><br>
  29220. refreshes all readings
  29221. </ul><br>
  29222. <a name="I2C_PCA9685Attr"></a>
  29223. <b>Attributes</b>
  29224. <ul>
  29225. <li>SUBADR1,SUBADR2,SUBADR3,ALLCALLADR<br>
  29226. Alternative slave addresses, if you want to control more than one PCA9685 with one define
  29227. Respective flag in modereg1 must be set as well<br>
  29228. Default: SUBADR1=113,SUBADR2=114,SUBADR3=116,ALLCALLADR=112, valid values: valid I2C Address <br><br>
  29229. </li>
  29230. <li>OnStartup<br>
  29231. Comma separated list of output ports/PWM registers and their desired state after start<br>
  29232. Without this atribut all output ports will set to last state<br>
  29233. Default: -, valid values: &lt;port&gt;=on|off|0..4095|last where &lt;port&gt; = 0 - 15<br><br>
  29234. </li>
  29235. <li>prescale<br>
  29236. Sets PWM Frequency. The Formula is: Fx = 25MHz/(4096 * (prescale + 1)).
  29237. The corresponding frequency value is shown under internals.
  29238. If provided, attribute extClock will be used for frequency calculation. Otherwise 25MHz<br>
  29239. Default: 30 (200Hz for 25MHz clock), valid values: 0-255<br><br>
  29240. </li>
  29241. <li>modereg1<br>
  29242. Comma separated list of:
  29243. <ul>
  29244. <li>EXTCLK<br>
  29245. If set the an external connected clock will be used instead of the internal 25MHz oscillator.
  29246. Use the attribute extClock to provide the external oscillater value.
  29247. </li>
  29248. <li>SUBADR1<br>
  29249. If set the PCA9685 responds to I2C-bus SUBADR 1.
  29250. </li>
  29251. <li>SUBADR2<br>
  29252. If set the PCA9685 responds to I2C-bus SUBADR 2.
  29253. </li>
  29254. <li>SUBADR3<br>
  29255. If set the PCA9685 responds to I2C-bus SUBADR 3.
  29256. </li>
  29257. <li>ALLCALLADR<br>
  29258. If set the PCA9685 responds to I2C-bus ALLCALLADR address.
  29259. </li>
  29260. </ul>
  29261. </li>
  29262. <li>modereg2<br>
  29263. Comma separated list of:
  29264. <ul>
  29265. <li>INVRT<br>
  29266. If set the Output logic state is inverted.<br>
  29267. </li>
  29268. <li>OCH<br>
  29269. If set the outputs changes on ACK (after every byte sent).<br>
  29270. Otherwise the output changes on STOP command (bus write action finished)<br>
  29271. </li>
  29272. <li>OUTDRV<br>
  29273. If set the outputs are configured with a totem pole structure.<br>
  29274. Otherwise the outputs are configured with open-drain.<br>
  29275. </li>
  29276. Behaviour when OE = 1 (if OE = 0 the output will act according OUTDRV configuration):
  29277. <li>OUTNE0<br>
  29278. If set:<br>
  29279. LEDn = 1 when OUTDRV = 1<br>
  29280. LEDn = high-impedance when OUTDRV = 0<br>
  29281. If not set:
  29282. LEDn = 0.<br>
  29283. </li>
  29284. <li>OUTNE1<br>
  29285. LEDn = high-impedance.<br>
  29286. OUTNE1 overrides OUTNE0<br><br>
  29287. </li>
  29288. </ul>
  29289. </li>
  29290. <li><a href="#IODev">IODev</a></li>
  29291. <li><a href="#ignore">ignore</a></li>
  29292. <li><a href="#do_not_notify">do_not_notify</a></li>
  29293. <li><a href="#showtime">showtime</a></li>
  29294. </ul>
  29295. <br>
  29296. </ul>
  29297. <a name="I2C_PCF8574"></a>
  29298. <h3>I2C_PCF8574</h3>
  29299. (en | <a href="commandref_DE.html#I2C_PCF8574">de</a>)
  29300. <ul>
  29301. <a name="I2C_PCF8574"></a>
  29302. Provides an interface to the PCA9532 8 channel port extender IC. On Raspberry Pi the Interrupt Pin can be connected to an GPIO and <a href="#RPI_GPIO">RPI_GPIO</a> can be used to get the port values if an interrupt occurs.<br>
  29303. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  29304. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  29305. <b>attribute IODev must be set</b><br>
  29306. <a name="I2C_PCF8574Define"></a><br>
  29307. <b>Define</b>
  29308. <ul>
  29309. <code>define &lt;name&gt; I2C_PCF8574 &lt;I2C Address&gt;</code><br>
  29310. where <code>&lt;I2C Address&gt;</code> is without direction bit<br>
  29311. </ul>
  29312. <a name="I2C_PCF8574Set"></a>
  29313. <b>Set</b>
  29314. <ul>
  29315. <code>set &lt;name&gt; &lt;port[,port[...]]&gt; &lt;value&gt;</code><br><br>
  29316. <ul>
  29317. <li><code>&lt;port&gt;</code> is one of Port0 to Port7 and <code>&lt;value&gt;</code> is one of:<br>
  29318. <ul>
  29319. <code>
  29320. off<br>
  29321. on<br>
  29322. </code>
  29323. </ul>
  29324. </li>
  29325. </ul>
  29326. <br>
  29327. Example:
  29328. <ul>
  29329. <code>set mod1 Port4 on</code><br>
  29330. <code>set mod1 Port4,Port6 off</code><br>
  29331. <code>set mod1 Port4,6 on</code><br>
  29332. </ul><br>
  29333. </ul>
  29334. <a name="I2C_PCF8574Get"></a>
  29335. <b>Get</b>
  29336. <ul>
  29337. <code>get &lt;name&gt;</code>
  29338. <br><br>
  29339. refreshes all readings
  29340. </ul><br>
  29341. <a name="I2C_PCF8574Attr"></a>
  29342. <b>Attributes</b>
  29343. <ul>
  29344. <li>poll_interval<br>
  29345. Set the polling interval in minutes to query the GPIO's level<br>
  29346. Default: -, valid values: decimal number<br><br>
  29347. </li>
  29348. <li>InputPorts<br>
  29349. Comma separated list of Portnumers that are used as Inputs<br>
  29350. Ports in this list can't be written<br>
  29351. Default: -, valid values: 0 - 7<br><br>
  29352. </li>
  29353. <li>InvrtPorts<br>
  29354. Comma separated list of Portnumers that will be inverted<br>
  29355. Default: -, valid values: 0 - 7<br><br>
  29356. </li>
  29357. <li>OnStartup<br>
  29358. Comma separated list of output ports and their desired state after start<br>
  29359. Without this atribut all output ports will set to last state<br>
  29360. Default: -, valid values: &lt;port&gt;=on|off|last where &lt;port&gt; = 0 - 7<br><br>
  29361. </li>
  29362. <li><a href="#IODev">IODev</a></li>
  29363. <li><a href="#ignore">ignore</a></li>
  29364. <li><a href="#do_not_notify">do_not_notify</a></li>
  29365. <li><a href="#showtime">showtime</a></li>
  29366. </ul>
  29367. <br>
  29368. </ul>
  29369. <a name="I2C_SHT21"></a>
  29370. <h3>I2C_SHT21</h3>
  29371. (en | <a href="commandref_DE.html#I2C_SHT21">de</a>)
  29372. <ul>
  29373. <a name="I2C_SHT21"></a>
  29374. Provides an interface to the SHT21 I2C Humidity sensor from <a href="www.sensirion.com">Sensirion</a>.
  29375. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  29376. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  29377. <b>attribute IODev must be set</b><br>
  29378. <a name="I2C_SHT21Define"></a><br>
  29379. <b>Define</b>
  29380. <ul>
  29381. <code>define &lt;name&gt; I2C_SHT21 [&lt;I2C Address&gt;]</code><br>
  29382. where <code>&lt;I2C Address&gt;</code> is an 2 digit hexadecimal value<br>
  29383. </ul>
  29384. <a name="I2C_SHT21Set"></a>
  29385. <b>Set</b>
  29386. <ul>
  29387. <code>set &lt;name&gt; readValues</code><br>
  29388. Reads the current temperature and humidity values from sensor.<br><br>
  29389. </ul>
  29390. <a name="I2C_SHT21Attr"></a>
  29391. <b>Attributes</b>
  29392. <ul>
  29393. <li>poll_interval<br>
  29394. Set the polling interval in minutes to query data from sensor<br>
  29395. Default: 5, valid values: 1,2,5,10,20,30<br><br>
  29396. </li>
  29397. <li>roundHumidityDecimal, roundTemperatureDecimal<br>
  29398. Number of decimal places for humidity or temperature value<br>
  29399. Default: 1, valid values: 0 1 2<br><br>
  29400. </li>
  29401. <li><a href="#IODev">IODev</a></li>
  29402. <li><a href="#do_not_notify">do_not_notify</a></li>
  29403. <li><a href="#showtime">showtime</a></li>
  29404. </ul><br>
  29405. </ul>
  29406. <a name="I2C_SHT3x"></a>
  29407. <h3>I2C_SHT3x</h3>
  29408. (en | <a href="commandref_DE.html#I2C_SHT3x">de</a>)
  29409. <ul>
  29410. <a name="I2C_SHT3x"></a>
  29411. Provides an interface to the SHT30/SHT31 I2C Humidity sensor from <a href="http:\\www.sensirion.com">Sensirion</a>.
  29412. The I2C messages are sent through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  29413. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  29414. <b>attribute IODev must be set</b><br>
  29415. <a name="I2C_SHT3xDefine"></a><br>
  29416. <b>Define</b>
  29417. <ul>
  29418. <code>define &lt;name&gt; I2C_SHT3x [&lt;I2C Address&gt;]</code><br>
  29419. where <code>&lt;I2C Address&gt;</code> is an 2 digit hexadecimal value:<br>
  29420. ADDR (pin 2) connected to VSS (supply voltage): 0x44 (default, if <code>&lt;I2C Address&gt;</code> is not set)<br>
  29421. ADDR (pin 2) connected to VDD (ground): 0x45<br>
  29422. For compatible sensors also other values than 0x44 or 0x45 can be set.<br>
  29423. <br>
  29424. </ul>
  29425. <a name="I2C_SHT3xSet"></a>
  29426. <b>Set</b>
  29427. <ul>
  29428. <code>set &lt;name&gt; readValues</code><br>
  29429. Reads the current temperature and humidity values from sensor.<br><br>
  29430. </ul>
  29431. <a name="I2C_SHT3xAttr"></a>
  29432. <b>Attributes</b>
  29433. <ul>
  29434. <li>poll_interval<br>
  29435. Set the polling interval in minutes to query data from sensor<br>
  29436. Default: 5, valid values: 1,2,5,10,20,30<br><br>
  29437. </li>
  29438. <li>roundHumidityDecimal, roundTemperatureDecimal<br>
  29439. Number of decimal places for humidity or temperature value<br>
  29440. Default: 1, valid values: 0 1 2<br><br>
  29441. </li>
  29442. <li><a href="#IODev">IODev</a></li>
  29443. <li><a href="#do_not_notify">do_not_notify</a></li>
  29444. <li><a href="#showtime">showtime</a></li>
  29445. </ul><br>
  29446. </ul>
  29447. <a name="I2C_TSL2561"></a>
  29448. <h3>I2C_TSL2561</h3>
  29449. <ul>
  29450. <a name="I2C_TSL2561"></a>
  29451. <p>
  29452. With this module you can read values from the ambient light sensor TSL2561
  29453. via the i2c bus on Raspberry Pi.<br>
  29454. The luminosity value returned is a good human eye reponse approximation of an
  29455. illumination measurement in the range of 0.1 to 40000+ lux (but not a replacement for a
  29456. precision measurement, relation between measured value and true value may vary by 40%).
  29457. <br><br>
  29458. <b>There are two possibilities connecting to I2C bus:</b><br>
  29459. <ul>
  29460. <li><b>via IODev module</b><br>
  29461. The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
  29462. or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
  29463. <b>attribute IODev must be set</b><br>
  29464. <br>
  29465. </li>
  29466. <li><b>via HiPi library</b><br>
  29467. Add these two lines to your <b>/etc/modules</b> file to load the I2C relevant kernel modules
  29468. automaticly during booting your Raspberry Pi.<br>
  29469. <code><pre>
  29470. i2c-bcm2708
  29471. i2c-dev
  29472. </pre></code>
  29473. Install HiPi perl modules:<br>
  29474. <code><pre> wget http://raspberry.znix.com/hipifiles/hipi-install perl hipi-install</pre></code>
  29475. To change the permissions of the I2C device create file:<br>
  29476. <code><pre> /etc/udev/rules.d/98_i2c.rules</pre></code>
  29477. with this content:<br>
  29478. <code><pre> SUBSYSTEM=="i2c-dev", MODE="0666"</pre></code>
  29479. <b>Reboot</b><br>
  29480. <br>
  29481. To use the sensor on the second I2C bus at P5 connector
  29482. (only for version 2 of Raspberry Pi) you must add the bold
  29483. line of following code to your FHEM start script:
  29484. <code><pre>
  29485. case "$1" in
  29486. 'start')
  29487. <b>sudo hipi-i2c e 0 1</b>
  29488. ...
  29489. </pre></code>
  29490. </li>
  29491. </ul>
  29492. <p>
  29493. <b>Define</b>
  29494. <ul>
  29495. <code>define TSL2561 I2C_TSL2561 [&lt;I2C device&gt;] &lt;I2C address&gt</code><br><br>
  29496. &lt;I2C device&gt; mandatory for HiPi, must be omitted if you connect via IODev<br>
  29497. &lt;I2C address&gt; may be 0x29, 0x39 or 0x49 (and 'AUTO' when using IODev to search for device at startup and after an I2C error)<br>
  29498. <br>
  29499. Examples:
  29500. <pre>
  29501. define TSL2561 I2C_TSL2561 /dev/i2c-0 0x39
  29502. attr TSL2561 poll_interval 5
  29503. </pre>
  29504. <pre>
  29505. define TSL2561 I2C_TSL2561 0x39
  29506. attr TSL2561 IODev I2CModule
  29507. attr TSL2561 poll_interval 5
  29508. </pre>
  29509. <pre>
  29510. define TSL2561 I2C_TSL2561 AUTO
  29511. attr TSL2561 IODev I2CModule
  29512. attr TSL2561 poll_interval 5
  29513. </pre>
  29514. </ul>
  29515. <b>Set</b>
  29516. <ul>
  29517. <code>get &lt;name&gt; update</code><br><br>
  29518. Force immediate illumination measurement and restart a new poll_interval.<br><br>
  29519. Note that the new readings are not yet available after set returns because the
  29520. measurement is performed asynchronously. Depending on the attributes integration time,
  29521. autoGain and autoIntegrationTime this may require more than one second to complete.
  29522. </ul>
  29523. <p>
  29524. <b>Readings</b>
  29525. <ul>
  29526. <li>luminosity<br>
  29527. Good human eye reponse approximation of an illumination measurement in the range of 0.1 to 40000+ lux.<br>
  29528. Rounded to 3 significant digits or one fractional digit.
  29529. </li>
  29530. <li>broadband<br>
  29531. Broadband spectrum sensor sample.<br>
  29532. Enable attribute normalizeRawValues for continuous readings independed of actual gain and integration time settings.
  29533. </li>
  29534. <li>ir<br>
  29535. Infrared spectrum sensor sample.<br>
  29536. Enable attribute normalizeRawValues for continuous readings independed of actual gain and integration time settings.
  29537. </li>
  29538. <li>gain<br>
  29539. sensor gain used for current luminosity measurement (1 or 16)<br>
  29540. </li>
  29541. <li>integrationTime<br>
  29542. integration time in seconds used for current luminosity measurement<br>
  29543. </li>
  29544. <li>state<br>
  29545. Default: Initialized, valid values: Undefined, Defined, Initialized, Saturated, Disabled, I2C Error
  29546. </li>
  29547. </ul>
  29548. <p>
  29549. <a name="I2C_TSL2561attr"></a>
  29550. <b>Attributes</b>
  29551. <ul>
  29552. <li>IODev<br>
  29553. Set the name of an IODev module. If undefined the perl modules HiPi::Device::I2C are required.<br>
  29554. Default: undefined<br>
  29555. </li>
  29556. <li>poll_interval<br>
  29557. Set the polling interval in minutes to query the sensor for new measured values.
  29558. By changing this attribute a new illumination measurement will be triggered.<br>
  29559. Default: 5, valid values: 1, 2, 5, 10, 20, 30<br>
  29560. </li>
  29561. <li>gain<br>
  29562. Set gain factor. Attribute will be ignored if autoGain is enabled.<br>
  29563. Default: 1, valid values: 1, 16
  29564. </li>
  29565. <li>integrationTime<br>
  29566. Set time in ms the sensor takes to measure the light. Attribute will be ignored if autoIntegrationTime is enabled.<br>
  29567. Default: 13, valid values: 13, 101, 402<br>
  29568. See this <a href="https://learn.sparkfun.com/tutorials/tsl2561-luminosity-sensor-hookup-guide/using-the-arduino-library">tutorial</a>
  29569. for more details.
  29570. </li>
  29571. <li>autoGain<br>
  29572. Enable auto gain. If set to 1, the gain parameter is adjusted automatically depending on light conditions.<br>
  29573. Default: 1, valid values: 0, 1<br>
  29574. </li>
  29575. <li>autoIntegrationTime<br>
  29576. Enable auto integration time. If set to 1, the integration time parameter is adjusted automatically depending on light conditions.<br>
  29577. Default: 0, valid values: 0, 1<br>
  29578. </li>
  29579. <li>normalizeRawValues<br>
  29580. Scale the sensor raw values broadband and ir depending on actual gain and integrationTime to the equivalent of the settings for maximum sensitivity (gain=16 and integrationTime=403ms). This feature may be useful when autoGain or autoIntegrationTime is enabled to provide continuous values instead of jumping values when gain or integration time changes.<br>
  29581. Default: 0, valid values: 0, 1<br>
  29582. </li>
  29583. <li>floatArithmetics<br>
  29584. Enable float arithmetics.<br>
  29585. If set to 0, the luminosity is calculated using int arithmetics (for very low powered platforms).<br>
  29586. If set to 1, the luminosity is calculated using float arithmetics, yielding some additional precision.
  29587. Default: 1, valid values: 0, 1<br>
  29588. </li>
  29589. <li>disable<br>
  29590. Disable I2C bus access.<br>
  29591. Default: 0, valid values: 0, 1
  29592. </li>
  29593. </ul>
  29594. <p>
  29595. <b>Notes</b>
  29596. <ul>
  29597. <li>Because the measurement may take several 100 milliseconds a measurement cycle will be executed asynchronously, so
  29598. do not expect to have new values immediately available after "set update" returns. If autoGain or autoIntegrationTime
  29599. are enabled, more than one measurement cycle will be required if light conditions change.
  29600. </li>
  29601. <li>With HiPi and especially IODev there are several I2C interfaces available, some blocking, some non-blocking and
  29602. some with different physical layers. The module has no knowledge of the specific properties of an interface and
  29603. therefore module operation and timing may not be exactly the same with each interface type.
  29604. </li>
  29605. <li>If AUTO is used as device address, one address per measurement cycle will be tested. Depending on your device address
  29606. it may be necessary to execute "set update" several times to find your device.
  29607. </li>
  29608. <li>When using Firmata the I2C write/read delay attribute "i2c-config" of the FRM module can be set to any value.
  29609. </li>
  29610. </ul>
  29611. <br>
  29612. </ul>
  29613. <a name="IF"></a>
  29614. <h3>IF</h3>
  29615. <ul>
  29616. <code>IF (&lt;condition&gt;) (&lt;FHEM commands1&gt;) ELSE (&lt;FHEM commands2&gt;)</code><br>
  29617. <br>
  29618. Executes &lt;FHEM commands1&gt; if &lt;condition&gt; is true, else &lt;FHEM commands2&gt; are executed.<br>
  29619. <br>
  29620. IF can be used anywhere where FHEM commands can be used.<br>
  29621. <br>
  29622. The ELSE-case is optional.<br>
  29623. <br>
  29624. The &lt;condition&gt; is the same as in perl-if.<br>
  29625. <br>
  29626. In addition, readings can be specified in the form:<br>
  29627. <br>
  29628. [&lt;device&gt;:&lt;reading&gt;:&lt;format&gt;|[&lt;regular expression&gt;]]<br>
  29629. <br>
  29630. In addition, internals can be specified with & in the form:<br>
  29631. <br>
  29632. [&lt;device&gt;:&&lt;internal&gt;:&lt;format&gt;|[&lt;regular expression&gt;]]<br>
  29633. <br>
  29634. &lt;format&gt; and [&lt;regular expression&gt;] are filter options und are optional.<br>
  29635. <br>
  29636. possible &lt;format&gt;:<br>
  29637. <br>
  29638. 'd' for decimal number<br>
  29639. <br>
  29640. If only the state of a device is to be used, then only the device can be specified:<br>
  29641. <br>
  29642. <code>[&lt;device&gt;]</code> corresponsed to <code>[&lt;device&gt;:&STATE]</code><br>
  29643. <br>
  29644. <b>Examples:</b><br>
  29645. <br>
  29646. IF in combination with at-module, Reading specified in the condition:<br>
  29647. <br>
  29648. <code>define check at +00:10 IF ([outdoor:humidity] > 70) (set switch1 off) ELSE (set switch1 on)<br></code>
  29649. <br>
  29650. IF state query of the device "outdoor" in the condition:<br>
  29651. <br>
  29652. <code>define check at +00:10 IF ([outdoor] eq "open") (set switch1 on)<br></code>
  29653. <br>
  29654. corresponds with details of the internal:<br>
  29655. <br>
  29656. <code>define check at +00:10 IF ([outdoor:&STATE] eq "open") (set switch1 on)<br></code>
  29657. <br>
  29658. If the reading "state" to be queried, then the name of reading is specified without &:<br>
  29659. <br>
  29660. <code>define check at +00:10 IF ([outdoor:state] eq "open") (set switch1 on)<br></code>
  29661. <br>
  29662. Nested IF commands (It can be entered in the DEF input on multiple lines with indentation for better representation):<br>
  29663. <br>
  29664. <code>define test notify lamp <br>
  29665. IF ([lampe] eq "on") (<br>
  29666. <ol>
  29667. IF ([outdoor:humidity] < 70)<br>
  29668. <ol>(set lamp off)</ol>
  29669. ELSE<br>
  29670. <ol>(set lamp on)</ol>
  29671. </ol>
  29672. ) ELSE<br>
  29673. <ol>(set switch on)</ol><br>
  29674. </code>
  29675. Filter by numbers in Reading "temperature":<br>
  29676. <br>
  29677. <code>define settemp at 22:00 IF ([tempsens:temperature:d] >= 10) (set heating on)<br></code>
  29678. <br>
  29679. Filter by "on" and "off" in the status of the device "move":<br>
  29680. <br>
  29681. <code>define activity notify move IF ([move:&STATE:[(on|off)]] eq "on" and $we) (set lamp off)<br></code>
  29682. <br>
  29683. Example of the use of Readings in the then-case:<br>
  29684. <br>
  29685. <code>define temp at 18:00 IF ([outdoor:temperature] > 10) (set lampe [dummy])<br></code>
  29686. <br>
  29687. If an expression is to be evaluated first in a FHEM command, then it must be enclosed in brackets.<br>
  29688. For example, if at 18:00 clock the outside temperature is higher than 10 degrees, the desired temperature is increased by 1 degree:<br>
  29689. <br>
  29690. <code>define temp at 18:00 IF ([outdoor:temperature] > 10) (set thermostat desired-temp {([thermostat:desired-temp:d]+1)})<br></code>
  29691. <br>
  29692. Multiple commands are separated by a comma instead of a semicolon, thus eliminating the doubling, quadrupling, etc. of the semicolon:<br>
  29693. <br>
  29694. <code>define check at +00:10 IF ([outdoor:humidity] > 10) (set switch1 off,set switch2 on) ELSE (set switch1 on,set switch2 off)<br></code>
  29695. <br>
  29696. If a comma in FHEM expression occurs, this must be additionally bracketed so that the comma is not recognized as a delimiter:<br>
  29697. <br>
  29698. <code>define check at +00:10 IF ([outdoor:humidity] > 10) ((set switch1,switch2 off))<br></code>
  29699. <br>
  29700. IF in combination with a define at multiple set commands:<br>
  29701. <br>
  29702. <code>define check at *10:00 IF ([indoor] eq "on") (define a_test at +00:10 set lampe1 on;;set lampe2 off;;set temp desired 20)<br></code>
  29703. <br>
  29704. The comma can be combined as a separator between the FHEM commands with double semicolon, eg:<br>
  29705. <br>
  29706. <code>define check at *10:00 IF ([indoor] eq "on") (set lamp1 on,define a_test at +00:10 set lampe2 on;;set lampe3 off;;set temp desired 20)<br></code>
  29707. <br>
  29708. sleep can be used with comma, it is not blocking:<br>
  29709. <br>
  29710. <code>define check at *10:00 IF ([indoor] eq "on") (sleep 2,set lampe1 on,sleep 3,set lampe2 on)</code><br>
  29711. <br>
  29712. Time-dependent switch: In the period 20:00 to 22:00 clock the light should go off when it was on and I leave the room:<br>
  29713. <br>
  29714. <code>define n_lamp_off notify sensor IF ($hms gt "20:00" and $hms lt "22:00" and [sensor] eq "absent") (set lamp:FILTER=STATE!=off off)<br></code>
  29715. <br>
  29716. Combination of Perl and FHEM commands ($NAME and $EVENT can also be used):<br>
  29717. <br>
  29718. <code>define mail notify door:open IF ([alarm] eq "on")({system("wmail $NAME:$EVENT")},set alarm_signal on)<br></code>
  29719. </ul>
  29720. <a name="IOhomecontrol"></a>
  29721. <h3>IOhomecontrol</h3>
  29722. <ul>
  29723. <a name="IOhomecontroldefine"></a>
  29724. <b>Define</b><br><br>
  29725. <ul>
  29726. <code>define &lt;name&gt; IOhomecontrol &lt;model&gt; &lt;host&gt; &lt;pwfile&gt; </code><br><br>
  29727. Defines a IOhomecontrol device. <code>&lt;model&gt;</code> is a placeholder for future amendments. <code>&lt;host&gt;</code> is the IP address or hostname of the IOhomecontrol device. <code>&lt;pwfile&gt;</code> is a file that contains the password to log into the device.<br><br>
  29728. Example:
  29729. <ul>
  29730. <code>define velux IOhomecontrol KLF200 192.168.0.91 /opt/fhem/etc/veluxpw.txt</code><br>
  29731. </ul>
  29732. <br><br>
  29733. </ul>
  29734. <a name="IOhomecontrolset"></a>
  29735. <b>Set</b><br><br>
  29736. <ul>
  29737. <code>set &lt;name&gt; scene &lt;id&gt;</code>
  29738. <br><br>
  29739. Runs the scene identified by <code>&lt;id&gt;</code> which can be either the numeric id of the scene or the scene's name.
  29740. <br><br>
  29741. Examples:
  29742. <ul>
  29743. <code>set velux scene 1</code><br>
  29744. <code>set velux scene "all shutters down"</code><br>
  29745. </ul>
  29746. <br>
  29747. Scene names with blanks must be enclosed in double quotes.
  29748. <br><br>
  29749. </ul>
  29750. <a name="IOhomecontrolget"></a>
  29751. <b>Get</b><br><br>
  29752. <ul>
  29753. <code>get &lt;name&gt; scenes</code>
  29754. <br><br>
  29755. Retrieves the ids and names of the scenes from the device.
  29756. <br><br>
  29757. Example:
  29758. <ul>
  29759. <code>get velux scenes</code><br>
  29760. </ul>
  29761. </ul>
  29762. <br><br>
  29763. <a name="IOhomecontrolattr"></a>
  29764. <b>Attributes</b>
  29765. <ul>
  29766. <li>setCmds: a comma-separated list of set command definitions.
  29767. Every definition is of the form <code>&lt;shorthand&gt;=&lt;command&gt;</code>. This defines a new single-word command <code>&lt;shorthand&gt</code> as a substitute for <code>&lt;command&gt;</code>.<br>
  29768. Example: <code>attr velux setCmds up=scene "3.dz.roll2 100%",down=scene "3.dz.roll2 0%"</code><br>
  29769. Substituted commands (and only these) are shown in the state reading. This is useful in conjunction with the <code>devStateIcon</code> attribute, e.g. <code>attr velux devStateIcon down:shutter_closed up:shutter_open</code>.</li>
  29770. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  29771. </ul>
  29772. <br><br>
  29773. </ul>
  29774. <a name="IPCAM"></a>
  29775. <h3>IPCAM</h3>
  29776. <ul>
  29777. <br>
  29778. <a name"IPCAMdefine"></a>
  29779. <strong>Define</strong>
  29780. <ul>
  29781. <code>define &lt;name&gt; IPCAM &lt;ip[:port]&gt;</code>
  29782. <br>
  29783. <br>
  29784. Defines a network camera device to trigger snapshots on events.
  29785. <br>
  29786. <br>
  29787. Network cameras (IP cameras) usually have a build-in function to create
  29788. snapshot images. This module enables the event- or time-controlled
  29789. recording of these images.
  29790. <br>
  29791. In addition, this module allows the recording of many image formats like
  29792. JPEG, PNG, GIF, TIFF, BMP, ICO, PPM, XPM, XBM and SVG. The only requirement
  29793. is that the recorded image must be accessible via a URL.
  29794. <br>
  29795. So it is also possible to record images of e.g. a public Weather Camera
  29796. from the internet or any picture of a website.
  29797. <br>
  29798. Furthermore, it is possible to control the camera via PTZ-mode or custom commands.
  29799. <br>
  29800. <br>
  29801. Examples:
  29802. <br>
  29803. <br>
  29804. A local ip-cam takes 5 snapshots with 10 seconds delay per call:
  29805. <br>
  29806. <ul>
  29807. <code>define ipcam IPCAM 192.168.1.205</code><br>
  29808. <code>attr ipcam delay 10</code><br>
  29809. <code>attr ipcam path snapshot.cgi?user=foo&amp;pwd=bar</code><br>
  29810. <code>attr ipcam snapshots 5</code><br>
  29811. <code>attr ipcam storage /srv/share/surveillance/snapshots</code><br>
  29812. </ul>
  29813. <br>
  29814. A notify on a motion detection of a specified device:
  29815. <br>
  29816. <ul>
  29817. <code>define MOTION.not.01 notify GH.ga.SEC.MD.01:.*on.* get ipcam image</code><br>
  29818. </ul>
  29819. <br>
  29820. Send an eMail after snapshots are taken:
  29821. <br>
  29822. <ul>
  29823. <code>define MOTION.not.02 notify ipcam:.*snapshots.* { myEmailFunction("%NAME") }</code><br>
  29824. </ul>
  29825. <br>
  29826. A public web-cam takes only 1 snapshot per call:
  29827. <br>
  29828. <ul>
  29829. <code>define schloss IPCAM www2.braunschweig.de</code><br>
  29830. <code>attr schloss path webcam/schloss.jpg</code><br>
  29831. <code>attr schloss storage /srv/share/surveillance/snapshots</code><br>
  29832. </ul>
  29833. <br>
  29834. An at-Job takes every hour a snapshot:
  29835. <br>
  29836. <ul>
  29837. <code>define snapshot_schloss at +*00:01:00 get schloss image</code><br>
  29838. </ul>
  29839. <br>
  29840. Move the camera up:
  29841. <br>
  29842. <ul>
  29843. <code>set ipcam tilt up</code>
  29844. </ul>
  29845. <br>
  29846. Move the camera to a the predefined position 4:
  29847. <br>
  29848. <ul>
  29849. <code>set ipcam pos 4</code>
  29850. </ul>
  29851. </ul>
  29852. <br>
  29853. <br>
  29854. <a name="IPCAMset"></a>
  29855. <strong>Set</strong>
  29856. <ul>
  29857. <code>set &lt;name&gt; &lt;value&gt; &lt;argument&gt;</code>
  29858. <br>
  29859. <br>
  29860. where <code>value</code> is one of:
  29861. <br>
  29862. <ul>
  29863. <li><code>cmd 1 .. 15</code><br>
  29864. Sets the camera to a custom defined command. The command must be defined as an
  29865. attribute first.
  29866. <br>
  29867. You can define up to 15 custom commands. The given number always relates to an
  29868. equivalent attribute <code>cmd&lt;number&gt;</code>.
  29869. </li>
  29870. <li><code>pan &lt;direction&gt; [steps]</code><br>
  29871. Move the camera to the given <code>&lt;direction&gt;</code>, where <code>&lt;direction&gt;</code>
  29872. could be <code>left</code> or <code>right</code>.
  29873. <br>
  29874. The command always relates to an equivalent attribute <code>cmdPan&lt;direction&gt;</code>.
  29875. <br>
  29876. Furthermore, a step size can be specified, which relates to the equivalent attribute
  29877. <code>cmdStep</code>.
  29878. </li>
  29879. <li><code>pos 1 .. 15|home</code><br>
  29880. Sets the camera to a custom defined position in PTZ mode. The position must be
  29881. defined as an attribute first.
  29882. <br>
  29883. You can define up to 15 custom positions and a predefined home position. The given
  29884. number always relates to an equivalent attribute <code>cmdPos&lt;number&gt;</code>.
  29885. </li>
  29886. <li><code>tilt &lt;direction&gt; [steps]</code><br>
  29887. Move the camera to the given <code>&lt;direction&gt;</code>, where <code>&lt;direction&gt;</code>
  29888. could be <code>up</code> or <code>down</code>.
  29889. <br>
  29890. The command always relates to an equivalent attribute <code>cmdPan&lt;direction&gt;</code>.
  29891. <br>
  29892. Furthermore, a step size can be specified, which relates to the equivalent attribute
  29893. <code>cmdStep</code>.
  29894. </li>
  29895. <li><code>raw &lt;argument&gt;</code><br>
  29896. Sets the camera to a custom defined <code>argument</code>.
  29897. </li>
  29898. </ul>
  29899. </ul>
  29900. <br>
  29901. <br>
  29902. <a name="IPCAMget"></a>
  29903. <strong>Get</strong>
  29904. <ul>
  29905. <code>get &lt;name&gt; &lt;value&gt;</code>
  29906. <br>
  29907. <br>
  29908. where <code>value</code> is one of:
  29909. <br>
  29910. <ul>
  29911. <li><code>image</code><br>
  29912. Get one or more images of the defined IP-Cam. The number of images<br>
  29913. and the time interval between images can be specified using the<br>
  29914. attributes <code>snapshots</code> and <code>delay</code>.
  29915. </li>
  29916. <li><code>last</code><br>
  29917. Show the name of the last snapshot.
  29918. </li>
  29919. <li><code>snapshots</code><br>
  29920. Show the total number of a image sequence.
  29921. </li>
  29922. </ul>
  29923. </ul>
  29924. <br>
  29925. <a name="IPCAMattr"></a>
  29926. <strong>Attributes</strong>
  29927. <ul>
  29928. <li>
  29929. basicauth<br>
  29930. If your camera supports authentication like <code>http://username:password@domain.com/</code>, you
  29931. can store your creditials within the <code>basicauth</code> attribute.<br>
  29932. If you prefer to store the credentials in a file (take a look at the attribute <code>credentials</code>)
  29933. you have to set the placeholder <code>{USERNAME}</code> and <code>{PASSWORD}</code> in the basicauth string.
  29934. These placeholders will be replaced with the values from the credentials file.<br>
  29935. Example:<br> <code>attr ipcam3 basicauth {USERNAME}:{PASSWORD}</code>
  29936. </li>
  29937. <li>
  29938. cmd01, cmd02, cmd03, .. cmd13, cdm14, cdm15<br>
  29939. It is possible to define up to 15 custom commands.<br>
  29940. Examples:<br>
  29941. <code>attr ipcam cmd01 led_mode=0</code><br>
  29942. <code>attr ipcam cmd02 resolution=8</code><br>
  29943. </li>
  29944. <li>
  29945. cmdPanLeft, cmdPanRight, cmdTiltUp, cmdTiltDown, cmdStep<br>
  29946. Depending of the camera model, are different commands necessary.<br>
  29947. Examples:<br>
  29948. <code>attr ipcam cmdTiltUp command=0</code><br>
  29949. <code>attr ipcam cmdTiltDown command=2</code><br>
  29950. <code>attr ipcam cmdPanLeft command=4</code><br>
  29951. <code>attr ipcam cmdPanRight command=6</code><br>
  29952. <code>attr ipcam cmdStep onstep</code><br>
  29953. </li>
  29954. <li>
  29955. cmdPos01, cmdPos02, cmdPos03, .. cmdPos13, cmdPos14, cmdPos15, cmdPosHome
  29956. It is possible to define up to 15 predefined position in PTZ-mode.<br>
  29957. Examples:<br>
  29958. <code>attr ipcam cmdPosHome command=25</code><br>
  29959. <code>attr ipcam cmdPos01 command=31</code><br>
  29960. <code>attr ipcam cmdPos02 command=33</code><br>
  29961. </li>
  29962. <li>
  29963. credentials<br>
  29964. Defines the location of the credentials file.<br>
  29965. If you prefer to store your cam credentials in a file instead be a part of the
  29966. URI (see attributes <code>path</code> and <code>query</code>), set the full path
  29967. with filename on this attribute.<br>
  29968. Example:<br>
  29969. <code>attr ipcam3 credentials /etc/fhem/ipcam.conf</code><br><br>
  29970. The credentials file has the following structure:<br>
  29971. <pre>
  29972. #
  29973. # Webcam credentials
  29974. #
  29975. $credentials{&lt;name_cam1&gt;}{username} = "&lt;your_username&gt;";
  29976. $credentials{&lt;name_cam1&gt;}{password} = "&lt;your_password&gt;";
  29977. $credentials{&lt;name_cam2&gt;}{username} = "&lt;your_username&gt;";
  29978. $credentials{&lt;name_cam2&gt;}{password} = "&lt;your_password&gt;";
  29979. ...
  29980. </pre>
  29981. Replace <code>&lt;name_cam1&gt;</code> respectively <code>&lt;name_cam2&gt;</code>
  29982. with the names of your defined ip-cams and <code>&lt;your_username&gt;</code> respectively
  29983. <code>&lt;your_password&gt;</code> with your credentials (all without the brackets
  29984. <code>&lt;</code> and <code>&gt;</code>!).
  29985. </li>
  29986. <li>
  29987. delay<br>
  29988. Defines the time interval between snapshots in seconds.<br>
  29989. If more then one snapshot is taken, then it makes sense to define a short delay
  29990. between the snapshots. On the one hand, the camera is not addressed in short intervals
  29991. and the second may be better represented movements between images.<br>
  29992. Example: <code>attr ipcam3 delay 10</code>
  29993. </li>
  29994. <li><a href="#disable">disable</a></li>
  29995. <li><a href="#do_not_notify">do_not_notify</a></li>
  29996. <li><a href="#loglevel">loglevel</a></li>
  29997. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  29998. <li>
  29999. path<br>
  30000. Defines the path and query component of the complete <a href="http://de.wikipedia.org/wiki/Uniform_Resource_Identifier" target="_blank">URI</a> to get a snapshot of the
  30001. camera. Is the full URI of your ip-cam for example <code>http://CAMERA_IP/snapshot.cgi?user=admin&amp;pwd=password</code>,
  30002. then only the path and query part is specified here (without the leading slash (/).<br>
  30003. Example:<br>
  30004. <code>attr ipcam3 path snapshot.cgi?user=admin&amp;pwd=password</code><br><br>
  30005. If you prefer to store the credentials in a file (take a look at the attribute <code>credentials</code>)
  30006. you have to set the placeholder <code>{USERNAME}</code> and <code>{PASSWORD}</code> in the path string. These placeholders
  30007. will be replaced with the values from the credentials file.<br>
  30008. Example:<br>
  30009. <code>attr ipcam3 path snapshot.cgi?user={USERNAME}&amp;pwd={PASSWORD}</code>
  30010. </li>
  30011. <li>
  30012. pathCmd<br>
  30013. Defines a path for the custom commands, if it is necessary.<br>
  30014. Example:<br>
  30015. <code>attr ipcam3 pathCmd set_misc.cgi</code>
  30016. </li>
  30017. <li>
  30018. pathPanTilt<br>
  30019. Defines a path for the PTZ-mode commands <code>pan</code>, <code>tilt</code> and <code>pos</code>,
  30020. if it is necessary.<br>
  30021. Example:<br>
  30022. <code>attr ipcam3 pathPanTilt decoder_control.cgi?user={USERNAME}&amp;pwd={PASSWORD}</code>
  30023. </li>
  30024. <li><a href="#showtime">showtime</a></li>
  30025. <li>
  30026. snapshots<br>
  30027. Defines the total number of snapshots to be taken with the <code>get &lt;name&gt; image</code> command.
  30028. If this attribute is not defined, then the default value is 1.<br>
  30029. The snapshots are stored in the given path of the attribute <code>storage</code> and are
  30030. numbered sequentially (starts with 1) like <code>snapshot_01</code>, <code>snapshot_02</code>, etc.
  30031. Furthermore, an additional file <code>last</code> will be saved, which is identical with
  30032. the last snapshot-image. The module checks the imagetype and stores all these files with
  30033. the devicename and a correct extension, e.g. <code>&lt;devicename&gt;_snapshot_01.jpg</code>.<br>
  30034. If you like a timestamp instead a sequentially number, take a look at the attribute <code>timestamp</code>.<br>
  30035. All files are overwritten on every <code>get &lt;name&gt; image</code> command (except: snapshots
  30036. with a timestamp. So, keep an eye on your diskspace if you use a timestamp extension!).<br>
  30037. Example:<br>
  30038. <code>attr ipcam3 snapshots 5</code>
  30039. </li>
  30040. <li>
  30041. storage<br>
  30042. Defines the location for the file storage of the snapshots.<br>
  30043. Default: <code>$modpath/www/snapshots</code><br>
  30044. Example:<br>
  30045. <code>attr ipcam3 storage /srv/share/surveillance/snapshots</code>
  30046. </li>
  30047. <li>
  30048. timestamp<br>
  30049. If this attribute is unset or set to 0, snapshots are stored with a sequentially number
  30050. like <code>&lt;devicename&gt;_snapshot_01.jpg</code>, <code>&lt;devicename&gt;_snapshot_02.jpg</code>, etc.<br>
  30051. If you like filenames with a timestamp postfix, e.g. <code>&lt;devicename&gt;_20121023_002602.jpg</code>,
  30052. set this attribute to 1.
  30053. </li>
  30054. </ul>
  30055. <br>
  30056. <a name="IPCAMevents"></a>
  30057. <strong>Generated events</strong>
  30058. <ul>
  30059. <li>last: &lt;name_of_device&gt;_snapshot.&lt;image_extension&gt;</li>
  30060. <li>snapshots: &lt;total_number_of_taken_snapshots_at_end&gt;</li>
  30061. </ul>
  30062. <br>
  30063. </ul>
  30064. <a name="IPWE"></a>
  30065. <h3>IPWE</h3>
  30066. <ul>
  30067. <br>
  30068. <a name="IPWEdefine"></a>
  30069. <b>Define</b>
  30070. <ul>
  30071. <code>define &lt;name&gt; IPWE &lt;hostname&gt; [&lt;delay&gt;]</code>
  30072. <br><br>
  30073. Define a IPWE network attached weather data receiver device sold by ELV. Details see <a
  30074. href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=21508">here</a>.
  30075. It's intended to receive the same sensors as WS300 (8 T/H-Sensors and one kombi sensor),
  30076. but can be accessed via http and telnet.
  30077. <br>
  30078. For unknown reason, my try to use the telnet interface was not working neither with raw sockets
  30079. nor with Net::Telnet module. Therefore i choosed here the "easy" way
  30080. to simple readout the http page and extract all data from the offered table. For this reason this module doesnt
  30081. contain any option to configure this device.
  30082. <br><br><b>Note:</b> You should give your sensors a name within the web interface, once they a received the first time.
  30083. <br>To extract a single sensor simply match for this name or sensor id<br>
  30084. <br>
  30085. Attributes:
  30086. <ul>
  30087. <li><code>delay</code>: seconds between read accesses(default 300s)</li>
  30088. </ul>
  30089. <br>
  30090. Example:
  30091. <ul>
  30092. <code>define ipwe IPWE ipwe1 120</code><br>
  30093. </ul>
  30094. <ul>
  30095. <code>attr ipwe delay 600</code> : 10min between readouts<br>
  30096. </ul>
  30097. <br>
  30098. </ul>
  30099. <b>Set</b> <ul>N/A</ul><br>
  30100. <a name="IPWEget"></a>
  30101. <b>Get</b>
  30102. <ul>
  30103. <code>get &lt;name&gt; status</code>
  30104. <br><br>
  30105. Gets actual data from device for sensors with data
  30106. <br><br>
  30107. <code>get &lt;name&gt; &lt;sensorname&gt; </code>
  30108. <br><br>
  30109. will grep output from device for this sensorname
  30110. <br><br>
  30111. </ul>
  30112. <a name="IPWEattr"></a>
  30113. <b>Attributes</b>
  30114. <ul>
  30115. <li><a href="#model">model</a> (ipwe)</li>
  30116. <li>delay</li>
  30117. <li><a href="#loglevel">loglevel</a></li>
  30118. </ul>
  30119. <br>
  30120. </ul>
  30121. <a name="IT"></a>
  30122. <h3>IT - InterTechno</h3>
  30123. <ul>
  30124. The InterTechno 433MHZ protocol is used by a wide range of devices, which are either of
  30125. the sender/sensor or the receiver/actuator category.
  30126. Momentarily, we are able to send and receive InterTechno commands.
  30127. Supported devices are switches, dimmers, etc. through an <a href="#CUL">CUL</a> or <a href="#SIGNALduino">SIGNALduino</a> device (this must be defined first).<br>
  30128. This module supports the version 1 and version 3 of the Intertechno protocol.
  30129. Newly found devices are added into the category "IT" by autocreate.
  30130. Hint: IT protocol 1 devices are only created when pressing the on-button twice within 30 seconds.
  30131. <br><br>
  30132. <a name="ITdefine"></a>
  30133. <b>Define</b>
  30134. <ul>
  30135. <code>define &lt;name&gt; IT &lt;housecode&gt; &lt;on-code&gt; &lt;off-code&gt;
  30136. [&lt;dimup-code&gt;] [&lt;dimdown-code&gt;] </code>
  30137. <br>or<br>
  30138. <code>define &lt;name&gt; IT &lt;ITRotarySwitches|FLS100RotarySwitches&gt; </code>
  30139. <br>or<br>
  30140. <code>define &lt;name&gt; IT &lt;address 26 Bit&gt; &lt;group bit&gt; &lt;unit Code&gt;</code>
  30141. <br>or<br>
  30142. <code>define &lt;name&gt; IT HE800 &lt;Transmitter ID&gt; &lt;Receiver ID&gt;</code>
  30143. <br><br>
  30144. The value of &lt;housecode&gt; is a 10-digit InterTechno Code, consisting of 0/1/F (co called tri-state format). These digits depend on the device you are using.
  30145. <br>
  30146. Bit 11 and 12 are used for switching/dimming. Different manufacturers are using
  30147. different bit-codes. You specifiy here the 2-digit code for off/on/dimup/dimdown
  30148. using the tri state format, i.e., 0/1/F.
  30149. <br>
  30150. The value of ITRotarySwitches consists of the value of the alpha switch A-P and
  30151. the numeric switch 1-16 as set on the intertechno device (for example A1 or G12). Please use the Wiki for more information how
  30152. to decode your device.
  30153. <br>
  30154. The value of FLS100RotarySwitches consist of the value of the I,II,II,IV switch
  30155. and the numeric 1,2,3,4 switch (for example I2 or IV4).
  30156. <br>
  30157. The value of ITRotarySwitches and FLS100RotarySwitches are internaly translated
  30158. into a houscode value.
  30159. <br>
  30160. For the Intertechno protocol 3 the housecode consists of 26 numbers. Additionally 4 numbers are used as unit code as well as
  30161. group code.
  30162. <br>
  30163. To add a new device in Fhem: define IT myITSwitch IT <Adresse 26 Bit> <Group bit> <Unit Code>
  30164. <br><br>
  30165. <b>Intertechno protocol 1 (ITv1)</b>
  30166. <ul>
  30167. <li><code>&lt;housecode&gt;</code> 10 numbers in tri state format (i.e., either 0/1/F) depending on the device.</li>
  30168. <li><code>&lt;on-code&gt; &lt;off-code&gt;</code> 2 numbers in quad state format (0/1/F/D), containing the on-format;
  30169. this number is added to the &lt;housecode&gt; to get the 12-number IT command that is acutally send.</li>
  30170. <li>optional <code>&lt;dimup-code&gt; &lt;dimdown-code&gt;</code> 2 numbers in quad state format (0/1/F/D),
  30171. contains the command for dimming;
  30172. this number is added to the &lt;housecode&gt; to define tha actual 12-number sending command.</li>
  30173. <li>Notice: orginal ITv1 devices are only defined using the on command.</li>
  30174. <li>Devices which are nt orignal ITv1 devices cen be defined as follows:</li><br>
  30175. To autocreate press twice "on" within 30 seconds. The Log gives:<br>
  30176. <code>2016.11.27 11:47:37.753 4: sduinoD IT: 001F001000 not defined (Switch code: <b>11</b>)</code><br>
  30177. <code>2016.11.27 11:47:37.755 2: autocreate: define IT_001F001000 IT 001F001000 0F F0</code><br><br>
  30178. Now press "off" or any other button:<br>
  30179. <code>2016.11.27 11:48:32.004 3: sduinoD IT: Code <b>1D</b> not supported by IT_001F001000.</code><br><br>
  30180. Because this is not original Intertechno, the on/off code in the list is not correct and has to be changed. This can be done as follows<br>
  30181. <code>DEF 001F001000 <b>11 1D</b></code><br><br>
  30182. <li> <b>EV1527</b></li>
  30183. If the housecode does not contain a valid (10) ITv1 tri state code, autocreate will define the deviceas EV1527.<br>
  30184. <code>&lt;housecode&gt;</code> 1527xabcde , abcde is the collected housecode in hex format<br>
  30185. <code>&lt;on-code&gt; &lt;off-code&gt;</code> 4 numbers bin number (0/1) containing the on command;
  30186. this number is added to the housecode to get the entire 12-number sending command.<br>
  30187. optional <code>&lt;dimup-code&gt; &lt;dimdown-code&gt;</code> 4 numbers in bin format (0/1),
  30188. contains the command for dimming up or down;
  30189. this number is added to the housecode to get the entire 12-number sending command.<br><br>
  30190. If the device was autocreated the on/off- as well as the dimcode has to be adapted.<br>
  30191. </ul>
  30192. <br>
  30193. <b>SBC_FreeTec</b><br>
  30194. <ul>
  30195. <li><code>&lt;housecode&gt;</code> 8 numbers in tri state format (0/1/F), depending from the used device.</li>
  30196. <li><code>&lt;on-code&gt;</code> 4 numbers in tri state format, contains the on-command;
  30197. this number is added to the housecode to form the 12-number sending command.</li>
  30198. <li><code>&lt;off-code&gt;</code> 4 numbers in tri state format, contains the off-command;
  30199. this number is added to the housecode to get the 12-number sending command.</li>
  30200. </ul>
  30201. <br>
  30202. <b>HE800</b><br>
  30203. <ul>
  30204. <li><code>&lt;Transmitter ID&gt;</code> unique transmitter ID (1..65535)</li>
  30205. <li><code>&lt;Receiver ID&gt;</code> receiver ID [0]1..15, 0=Broadcast 1-15 (HE844A button# 1-4 & MASTER=0, HE850 UNIT# 1-15, HE853 = 1)</li>
  30206. </ul>
  30207. <br>
  30208. Examples:
  30209. <ul>
  30210. <code>define lamp IT 01FF010101 11 00 01 10</code><br>
  30211. <code>define roll1 IT 111111111F 11 00 01 10</code><br>
  30212. <code>define otherlamp IT 000000000F 11 10 00 00</code><br>
  30213. <code>define otherroll1 IT FFFFFFF00F 11 10</code><br>
  30214. <code>define IT_1527xe0fec IT 1527xe0fec 1001 0000</code><br>
  30215. <code>define SBC_FreeTec_Steck1 IT FFF00FFF 000F 0000</code><br>
  30216. <code>define itswitch1 IT A1</code><br>
  30217. <code>define lamp IT J10</code><br>
  30218. <code>define flsswitch1 IT IV1</code><br>
  30219. <code>define lamp IT II2</code><br>
  30220. <code>define HE800_TID1_SW1 IT HE800 1 1</code><br>
  30221. </ul>
  30222. <br>
  30223. For Intertechno protocol 3 the &lt;housecode&gt; is a 26-digits number.
  30224. Additionaly there is a 4-digits &lt;unit code&gt; and a 1-digit &lt;group code&gt;.
  30225. <ul>
  30226. <li><code>&lt;address&gt;</code> is a 26 digit number (0/1)</li>
  30227. <li><code>&lt;group&gt;</code> is a 1 digit number (0/1)</li>
  30228. <li><code>&lt;unit&gt;</code> is a 4 digit number (0/1)</li>
  30229. </ul>
  30230. <br>
  30231. Examples:
  30232. <ul>
  30233. <code>define myITSwitch IT 00111100110101010110011111 0 0000</code>
  30234. </ul>
  30235. </ul>
  30236. <br>
  30237. <a name="ITset"></a>
  30238. <b>Set </b>
  30239. <ul>
  30240. <code>set &lt;name&gt; &lt;value&gt; [&lt;time&gt]</code>
  30241. <br><br>
  30242. where <code>value</code> is one of:<br>
  30243. <pre>
  30244. dimdown
  30245. dimup
  30246. off
  30247. on
  30248. on-till # Special, see the note
  30249. dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50%
  30250. dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br>
  30251. <li><a href="#setExtensions">set extensions</a> are supported.</li>
  30252. </pre>
  30253. Examples:
  30254. <ul>
  30255. <code>set lamp on</code><br>
  30256. <code>set lamp1,lamp2,lamp3 on</code><br>
  30257. <code>set lamp1-lamp3 on</code><br>
  30258. <code>set lamp off</code><br>
  30259. </ul>
  30260. <br>
  30261. Notes:
  30262. <ul>
  30263. <li>on-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
  30264. or { &lt;perl code&gt; }, where the perl-code returns a time specification).
  30265. If the current time is greater than the specified time, the
  30266. command is ignored, else an "on" command is generated, and for the
  30267. given "till-time" an off command is scheduleld via the at command.
  30268. </li>
  30269. </ul>
  30270. </ul>
  30271. <br>
  30272. <b>Get</b> <ul>N/A</ul><br>
  30273. <a name="ITattr"></a>
  30274. <b>Attributes</b>
  30275. <ul>
  30276. <a name="IODev"></a>
  30277. <li>IODev<br>
  30278. Set the IO device which will be used to send signals
  30279. for this device. An example for the physical device is a CUL or the SIGNALduino.
  30280. Note: On startup, fhem WILL NOT automatically assign an
  30281. IODevice to the Intertechno device! The attribute IODev needs ALLWAYS to be set manually!</li><br>
  30282. <a name="eventMap"></a>
  30283. <li>eventMap<br>
  30284. Replace event names and set arguments. The value of this attribute
  30285. consists of a list of space separated values. Each value is a colon
  30286. separated pair. The first part specifies the value to be replaced, the second
  30287. the new/desired value. In order to use spaces in the new/desired values it is necessary to inform Fhem about the new separating character. This is done by using a slash(/) or comma(,)
  30288. as first character, then the values are not separated by space but by this character.
  30289. Examples:
  30290. <ul><code>
  30291. attr store eventMap on:open off:closed<br>
  30292. attr store eventMap /on-for-timer 10:open/off:closed/<br>
  30293. set store open
  30294. </code></ul>
  30295. </li><br>
  30296. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  30297. <a name="attrdummy"></a>
  30298. <li>dummy<br>
  30299. Set the device attribute dummy to define devices which should not
  30300. output any radio signals. Associated notifys will be executed if
  30301. the signal is received. Used e.g. to react to a code from a sender, but
  30302. it will not emit radio signal if triggered in the web frontend.
  30303. </li><br>
  30304. <li><a href="#loglevel">loglevel</a></li><br>
  30305. <li><a href="#showtime">showtime</a></li><br>
  30306. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  30307. <a name="model"></a>
  30308. <li>model<br>
  30309. The model attribute denotes the type of the device.
  30310. This attribute will (currently) not be used by Fhem directly.
  30311. It can be used by e.g. external programs or web interfaces to
  30312. distinguish classes of devices and send the appropriate commands
  30313. (e.g. "on" or "off" to a switch, "dim..%" to dimmers etc.).
  30314. The spelling of the model should match the modelname used in the
  30315. documentation that comes which the device. The name should consist of
  30316. lower-case characters without spaces. Valid characters are
  30317. <code>a-z 0-9</code> and <code>-</code> (dash),
  30318. other characters should not be used. Here is a list of "official"
  30319. devices:<br>
  30320. <b>Sender/Sensor</b>: itremote<br>
  30321. <b>Dimmer</b>: itdimmer<br>
  30322. <b>Receiver/Actor</b>: itswitch<br>
  30323. <b>EV1527</b>: ev1527
  30324. </li><br>
  30325. <a name="ignore"></a>
  30326. <li>ignore<br>
  30327. Ignore this device, e.g., if it belongs to your neighbour. The device
  30328. will not trigger any FileLogs/notifys, issued commands will be silently
  30329. ignored (no RF signal will be sent out, just like for the <a
  30330. href="#attrdummy">dummy</a> attribute). The device will not appear in the
  30331. list command (only if it is explicitely asked for it), nor will it
  30332. be affected by commands which use wildcards or attributes as name specifiers
  30333. (see <a href="#devspec">devspec</a>). You still get them with the
  30334. "ignored=1" special devspec.
  30335. </li><br>
  30336. <a name="ITclock"></a>
  30337. <li>ITclock<br>
  30338. IT clock is the smallest time length of any pulse while sending the Intertechno V1 protocol.<br>
  30339. Any signal of the IT protocol typically consists of a sequence of HIGHs and LOWs with a particular time length. These lengths usually have a ratio of 1:3 (if, for example, LOW has a pulse length of X then HIGH has a pulse length of 3*X).<br>
  30340. The default value of original IT devices is 250. Other vendors use sometimes a different value; nevertheless ITclock should only be changed if you encounter problems using this device in Fhem.<br>
  30341. - In order to discover the correct ITclock using a SIGNALduino: After pressing a button at a remote the received raw signal can be found in the log as well as in the device view of the IT-device, for example<br>
  30342. MS;P0=357;P2=-1128;P3=1155;P4=-428;P5=-11420;D=05023402020202020202020202020202020202023402340234;CP=0;SP=5;<br>
  30343. The number after "CP=" shows the pattern number of the clock, so e.g. follows from CP=0 --> P0, which defines at the beginning of the message, hence the clock was 357 (microseconds).<br>
  30344. - at the CUL can the ITclock found out from the raw messages (X31).
  30345. </li><br>
  30346. <a name="ITfrequency"></a> </li>
  30347. <li>ITfrequency<br>
  30348. Sets the frequency of the sender.
  30349. </li><br>
  30350. <a name="ITrepetition"></a>
  30351. <li>ITrepetition<br>
  30352. Sets the number of repitions (default=6).
  30353. </li><br>
  30354. <a name="userV1setCodes"></a>
  30355. <li>userV1setCodes<br>
  30356. If an ITv1 protocol is used indivual setcodes can be added. Example:
  30357. <ul><code>
  30358. attr lamp userV1setCodes red:FD blue:1F<br>
  30359. attr lamp userV1setCodes up:1001 down:1000 stop:1011
  30360. </code></ul>
  30361. </li><br>
  30362. <a name="SIGNALduinoProtocolId"></a>
  30363. <li>SIGNALduinoProtocolId<br>
  30364. Using this attribute the protocol ID can be choosen if one uses a SIGNALduino.
  30365. </li><br>
  30366. </ul>
  30367. <br>
  30368. <a name="ITevents"></a>
  30369. <b>Generated events:</b>
  30370. <ul>
  30371. The IT device generates the following events.
  30372. <li>on</li>
  30373. <li>off</li>
  30374. <li>dimdown</li>
  30375. <li>dimup<br></li>
  30376. <li>dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50%<br>
  30377. dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br></li>
  30378. Which event is sent dependents on the device and can sometimes configured on
  30379. the device.
  30380. </ul>
  30381. </ul>
  30382. <a name="InfoPanel"></a>
  30383. <h3>InfoPanel</h3>
  30384. <ul>
  30385. InfoPanel is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You must install FHEMWEB to use InfoPanel.<br/>
  30386. <br/>
  30387. <br/>
  30388. <b>Prerequesits</b><br/>
  30389. <br/>
  30390. <ul>
  30391. <li>InfoPanel is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You must install FHEMWEB to use InfoPanel.</li>
  30392. <br/>
  30393. <li>Module uses following additional Perl modules:<br/><br/>
  30394. <ul><code>MIME::Base64 Image::Info</code></ul><br/>
  30395. If not already installed in your environment, please install them using appropriate commands from your environment.<br/><br/>
  30396. Package installation in debian environments: <code>apt-get install libmime-base64-perl libimage-info-perl</code></li>
  30397. <br/>
  30398. <li>You can use this module without the two additional perl modules, but in this case, you have to accept some limitations:<br/>
  30399. <br/>
  30400. <ul>
  30401. <li>layout tag img can not be used</li>
  30402. <li>layout tag plot can only handle scale = 1 and inline = 0</li>
  30403. </ul>
  30404. </li>
  30405. </ul>
  30406. <br/><br/>
  30407. <a name="InfoPaneldefine"></a>
  30408. <b>Define</b><br/><br/>
  30409. <ul>
  30410. <code>define &lt;name&gt; InfoPanel &lt;layoutFileName&gt;</code><br/>
  30411. <br/>
  30412. Example:<br/><br>
  30413. <ul><code>define myInfoPanel InfoPanel ./FHEM/panel.layout</code><br/></ul>
  30414. </ul>
  30415. <br/><br/>
  30416. <a name="InfoPanelset"></a>
  30417. <b>Set-Commands</b><br/><br/>
  30418. <ul>
  30419. <li><code>set &lt;name&gt; reread</code>
  30420. <ul><br/>
  30421. Rereads the <a href="#InfoPanellayout">layout definition</a> from the file.<br/><br/>
  30422. <b>Important:</b><br/>
  30423. <ul>
  30424. Layout will be reread automatically if edited via fhem's "Edit files" function.<br/>
  30425. Autoread can be disabled via <a href="#InfoPanelattr">attribute</a>.
  30426. </ul>
  30427. </ul></li><br/>
  30428. <li><code>set &lt;name&gt; ovEnable &lt;xconditionName&gt;</code>
  30429. <ul><br/>
  30430. set an override "1" to named xcondition
  30431. </ul>
  30432. </li><br/>
  30433. <li><code>set &lt;name&gt; ovDisable &lt;xconditionName&gt;</code>
  30434. <ul><br/>
  30435. set an override "0" to named xcondition
  30436. </ul>
  30437. </li><br/>
  30438. <li><code>set &lt;name&gt; ovClear &lt;xconditionName&gt|all;</code>
  30439. <ul><br/>
  30440. delete an existing overrides to named xcondition. "all" will clear all overrides.<br/>
  30441. </ul>
  30442. </li>
  30443. </ul>
  30444. <br/><br/>
  30445. <a name="InfoPanelget"></a>
  30446. <b>Get-Commands</b><br/><br/>
  30447. <ul>
  30448. <li><code>get &lt;name&gt; counter</code>
  30449. <ul><br/>
  30450. return value from internal counter<br/>
  30451. </ul></li><br/>
  30452. <li><code>get &lt;name&gt; layout</code>
  30453. <ul><br/>
  30454. return complete layout definition<br/>
  30455. </ul></li><br/>
  30456. <li><code>get &lt;name&gt; overrides</code>
  30457. <ul><br/>
  30458. return list of defined overrides<br/>
  30459. </ul></li><br/>
  30460. <br/>
  30461. </ul>
  30462. <br/><br/>
  30463. <a name="InfoPanelattr"></a>
  30464. <b>Attributes</b><br/><br/>
  30465. <ul>
  30466. <li><b>autoreread</b> - disables automatic layout reread after edit if set to 1</li>
  30467. <li><b>refresh</b> - time (in seconds) after which the HTML page will be reloaded automatically.<br/>
  30468. Any values below 60 seconds will not become valid.</li>
  30469. <li><b>showTime</b> - disables generation timestamp in state if set to 0</li>
  30470. <li><b>size</b> - The dimensions of the picture in the format
  30471. <code>&lt;width&gt;x&lt;height&gt;</code></li>
  30472. <li><b>useViewPort</b> - add viewport meta tag to fit mobile displays</li>
  30473. <li><b>mobileApp</b> - add support for mobile fullscreen experience</li>
  30474. <li><b>title</b> - webpage title to be shown in Browser</li>
  30475. <br/>
  30476. <li><b>bgcenter</b> - background images will not be centered if attribute set to 0. Default: show centered</li>
  30477. <li><b>bgcolor</b> - defines the background color, use html-hexcodes to specify color, eg 00FF00 for green background. Default color is black. You can use bgcolor=none to disable use of any background color</li>
  30478. <li><b>bgdir</b> - directory containing background images</li>
  30479. <li><b>bgopacity</b> - set opacity for background image, values 0...1.0</li>
  30480. <li><b>tmin</b> - background picture will be shown at least <code>tmin</code> seconds,
  30481. no matter how frequently the RSS feed consumer accesses the page.</li>
  30482. <br/>
  30483. <b>Important:</b> bgcolor and bgdir will be evaluated by <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> use quotes for absolute values!<br/>
  30484. </ul>
  30485. <br/><br/>
  30486. <a name="InfoPanelreadings"></a>
  30487. <b>Generated Readings/Events:</b><br/><br/>
  30488. <ul>
  30489. <li>state - show time and date of last layout evaluation</li>
  30490. </ul>
  30491. <br/><br/>
  30492. <a name="InfoPanellayout"></a>
  30493. <b>Layout definition</b><br/>
  30494. <br/>
  30495. <ul>
  30496. All parameters in curly brackets can be evaluated by <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code></br>
  30497. <br/>
  30498. <li><code>area &lt;id&gt; &lt;x1&gt; &lt;y1&gt; &lt;x2&gt; &lt;y2&gt; &lt;{link}&gt;</code><br/>
  30499. <br/>
  30500. <ul>create a responsive area which will call a link when clicked.<br/>
  30501. <br/>
  30502. id = element id<br/>
  30503. x1,y1 = upper left corner<br/>
  30504. x2,y2 = lower right corner<br/>
  30505. link = url to be called<br/>
  30506. </ul></li><br/>
  30507. <br>
  30508. <li><code>boxcolor &lt;{rgba}&gt;</code><br/>
  30509. <br/>
  30510. <ul>define an rgb color code to be used for filling button and textbox<br/>
  30511. </ul></li><br/>
  30512. <br>
  30513. <li><code>button &lt;id&gt; &lt;x1&gt; &lt;y1&gt; &lt;x2&gt; &lt;y2&gt; &lt;r1&gt; &lt;r2&gt; &lt;link&gt; &lt;text&gt;</code><br/>
  30514. <br/>
  30515. <ul>create a responsive colored button which will call a link when clicked.<br/>
  30516. <br/>
  30517. id = element id<br/>
  30518. x1,y1 = upper left corner<br/>
  30519. x2,y2 = lower right corner<br/>
  30520. r1,r2 = radius for rounded corners<br/>
  30521. link = url to be called<br/>
  30522. text = text that will be written onto the button<br/>
  30523. <br/>
  30524. button will be filled with color defined by "boxcolor"<br/>
  30525. text color will be read from "rgb" value<br/>
  30526. </ul></li><br/>
  30527. <br/>
  30528. <li><code>buttonpanel</code><br/>
  30529. <br/>
  30530. <ul>needed once in your layout file if you intend to use buttons in the same layout.<br/>
  30531. </ul></li><br/>
  30532. <br/>
  30533. <li><code>circle &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;r&gt; [&lt;fill&gt;] [&lt;stroke-width&gt;] [&lt;link&gt;]</code><br/>
  30534. <br/>
  30535. <ul>create a circle<br/>
  30536. <br/>
  30537. id = element id<br/>
  30538. x,y = center coordinates of circle<br/>
  30539. r = radius<br/>
  30540. fill = circle will be filled with "rgb" color if set to 1. Default = 0<br/>
  30541. stroke-width = defines stroke width to draw around the circle. Default = 0<br/>
  30542. link = URL to be linked to item<br/>
  30543. </ul></li><br/>
  30544. <br/>
  30545. <li><code>counter &lt;id&gt; &lt;x&gt; &lt;y&gt;</code><br/>
  30546. <br/>
  30547. <ul>print internal counter<br/>
  30548. <br/>
  30549. id = element id<br/>
  30550. x,y = position<br/>
  30551. </ul></li><br/>
  30552. <br/>
  30553. <li><code>date &lt;id&gt; &lt;x&gt; &lt;y&gt;</code><br/>
  30554. <br/>
  30555. <ul>print date<br/>
  30556. <br/>
  30557. id = element id<br/>
  30558. x,y = position<br/>
  30559. </ul></li><br/>
  30560. <br/>
  30561. <li><code>embed &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;width&gt; &lt;height&gt; &lt;{object}&gt;</code><br/>
  30562. <br/>
  30563. <ul>embed any object<br/>
  30564. <br/>
  30565. id = element id<br/>
  30566. x,y = position<br/>
  30567. width,height = containers's dimension<br/>
  30568. object = object to embed<br/>
  30569. </ul></li><br/>
  30570. <br/>
  30571. <li><code>ellipse &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;r1&gt; &lt;r2&gt; [&lt;fill&gt;] [&lt;stroke-width&gt;] [&lt;link&gt;]</code><br/>
  30572. <br/>
  30573. <ul>create an ellipse<br/>
  30574. <br/>
  30575. id = element id<br/>
  30576. x,y = center coordinates of ellipse<br/>
  30577. r1,r2 = radius<br/>
  30578. fill = ellipse will be filled with "rgb" color if set to 1. Default = 0<br/>
  30579. stroke-width = defines stroke width to draw around the ellipse. Default = 0<br/>
  30580. link = URL to be linked to item<br/>
  30581. </ul></li><br/>
  30582. <br/>
  30583. <li><code>font &lt;font-family&gt;</code><br/>
  30584. <br/>
  30585. <ul>define font family used for text elements (text, date, time, seconds ...)<br/>
  30586. <br/>
  30587. Example: <code>font arial</code><br/>
  30588. </ul></li><br/>
  30589. <br/>
  30590. <li><code>group &lt;id&gt; open &lt;x&gt; &lt;y&gt;<br/>
  30591. group - close</code>&nbsp;&nbsp;(id will not be evaluated, just give any value)<br/>
  30592. <br/>
  30593. <ul>group items<br/>
  30594. <br/>
  30595. open|close = define start and end of group<br/>
  30596. x,y = upper left corner as reference for all grouped items, will be inherited to all elements.<br/>
  30597. <br/>
  30598. Examples:<br/>
  30599. <code>
  30600. group - open 150 150<br/>
  30601. rect ...<br/>
  30602. img ...<br/>
  30603. group - close<br/>
  30604. </code>
  30605. </ul></li><br/>
  30606. <br/>
  30607. <li><code>img &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;scale&gt; &lt;link&gt; &lt;sourceType&gt; &lt;{dataSource}&gt;s</code><br/>
  30608. <br/>
  30609. <ul>embed an image into InfoPanel<br/>
  30610. <br/>
  30611. id = element id<br/>
  30612. x,y = upper left corner<br/>
  30613. scale = scale to be used for resizing; may be factor or defined by width or height<br/>
  30614. link = URL to be linked to item, use "" if not needed<br/>
  30615. sourceType = file | url | data<br/>
  30616. dataSource = where to read data from, depends on sourceType<br/>
  30617. </ul></li><br/>
  30618. <br/>
  30619. <li><code>line &lt;id&gt; &lt;x1&gt; &lt;y1&gt; &lt;x2&gt; &lt;y2&gt; [&lt;stroke&gt;]</code><br/>
  30620. <br/>
  30621. <ul>draw a line<br/>
  30622. <br/>
  30623. id = element id<br/>
  30624. x1,y1 = coordinates (start)<br/>
  30625. x2,y2 = coordinates (end)<br/>
  30626. stroke = stroke width for line; if omitted, default = 0<br/>
  30627. </ul></li><br/>
  30628. <br/>
  30629. <li><code>moveby &lt;x&gt; &lt;y&gt;</code><br/>
  30630. <br/>
  30631. <ul>move most recently x- and y-coordinates by given steps<br/>
  30632. </ul></li><br/>
  30633. <br/>
  30634. <li><code>movecalculated &lt;{perlSpecial x}&gt; &lt;{perlSpecial y}&gt;</code><br/>
  30635. <br/>
  30636. <ul>calculate x- and y-coordinates by perlSpecials<br/>
  30637. </ul></li><br/>
  30638. <br/>
  30639. <li><code>moveto &lt;x&gt; &lt;y&gt;</code><br/>
  30640. <br/>
  30641. <ul>move x- and y-coordinates to the given positon<br/>
  30642. </ul></li><br/>
  30643. <br/>
  30644. <li><code>padding &lt;width&gt;</code><br/>
  30645. <br/>
  30646. <ul>border width (in pixel) to be used in textboxes<br/>
  30647. </ul></li><br/>
  30648. <br/>
  30649. <li><code>plot &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;scale&gt; &lt;inline&gt; &lt;{plotName}&gt;</code><br/>
  30650. <br/>
  30651. <ul>embed an SVG plot into InfoPanel<br/>
  30652. <br/>
  30653. id = element id<br/>
  30654. x,y = upper left corner<br/>
  30655. scale = scale to be used for resizing; may be factor or defined by width or height<br/>
  30656. inline = embed plot as data (inline=1) or as link (inline=0)<br/>
  30657. plotName = name of desired SVG device from your fhem installation<br/>
  30658. </ul></li><br/>
  30659. <br/>
  30660. <li><code>pop</code><br/>
  30661. <br/>
  30662. <ul>fetch last parameter set from stack and set it actice<br/>
  30663. </ul></li><br/>
  30664. <br/>
  30665. <li><code>pt &lt;[+-]font-size&gt;</code><br/>
  30666. <br/>
  30667. <ul>define font size used for text elements (text, date, time, seconds ...)<br/>
  30668. can be given as absolute or relative value.<br/>
  30669. <br/>
  30670. Examples:<br/>
  30671. <code>pt 12</code><br/>
  30672. <code>pt +3</code><br/>
  30673. <code>pt -2</code><br/>
  30674. </ul></li><br/>
  30675. <br/>
  30676. <li><code>push</code><br/>
  30677. <br/>
  30678. <ul>push active parameter set onto stack<br/>
  30679. </ul></li><br/>
  30680. <br/>
  30681. <li><code>rect &lt;id&gt; &lt;x1&gt; &lt;y1&gt; &lt;x2&gt; &lt;y2&gt; &lt;r1&gt; &lt;r2&gt; [&lt;fill&gt;] [&lt;stroke-width&gt;] [&lt;link&gt;]</code><br/>
  30682. <br/>
  30683. <ul>create a rectangle<br/>
  30684. <br/>
  30685. id = element id<br/>
  30686. x1,y1 = upper left corner<br/>
  30687. x2,y2 = lower right corner<br/>
  30688. r1,r2 = radius for rounded corners<br/>
  30689. fill = rectangle will be filled with "rgb" color if set to 1. Default = 0<br/>
  30690. stroke-width = defines stroke width to draw around the rectangle. Default = 0<br/>
  30691. link = URL to be linked to item<br/>
  30692. </ul></li><br/>
  30693. <br/>
  30694. <li><code>rgb &lt;{rgb[a]}&gt;</code><br/>
  30695. <br/>
  30696. <ul>define rgba value (hex digits!) used for text, lines, circles, ellipses<br/>
  30697. <br/>
  30698. <code>r = red value</code><br/>
  30699. <code>g = green value</code><br/>
  30700. <code>b = blue value</code><br/>
  30701. <code>a = alpha value used for opacity; optional</code><br/>
  30702. </ul></li><br/>
  30703. <br/>
  30704. <li><code>seconds &lt;id&gt; &lt;x&gt; &lt;y&gt; [&lt;format&gt;]</code><br/>
  30705. <br/>
  30706. <ul>print seconds<br/>
  30707. <br/>
  30708. id = element id<br/>
  30709. x,y = position<br/>
  30710. format = seconds will be preceeded by ':' if set to 'colon'; optional<br/>
  30711. </ul></li><br/>
  30712. <br/>
  30713. <li><code>text &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;{text}&gt;</code><br/>
  30714. <br/>
  30715. <ul>print text<br/>
  30716. <br/>
  30717. id = element id<br/>
  30718. x,y = position<br/>
  30719. text = text content to be printed<br/>
  30720. </ul></li><br/>
  30721. <br/>
  30722. <li><code>textbox &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;boxWidth&gt; &lt;boxHeight&gt; &lt;{link}&gt; &lt;{text}&gt; </code><br/>
  30723. <br/>
  30724. <ul>create a textbox to print text with auto wrapping<br/>
  30725. <br/>
  30726. id = element id<br/>
  30727. x,y = upper left corner<br/>
  30728. boxWidth,boxHeight = dimensions of textbox<br/>
  30729. link = url to be used when clicked; use "" if not needed<br/>
  30730. text = text to be printed in textbox<br/>
  30731. <br/>
  30732. <b>Important:</b> textboxes are not responsive via area tag. Use optional link parameter in textbox tag<br/>
  30733. </ul></li><br/>
  30734. <br/>
  30735. <li><code>textboxalign &lt;align&gt;</code><br/>
  30736. <br/>
  30737. <ul>define horizontal alignment for text inside textboxes<br/>
  30738. <br/>
  30739. valid values: left center right justify<br/>
  30740. </ul></li><br/>
  30741. <br/>
  30742. <li><code>textdesign &lt;align&gt;</code><br/>
  30743. <br/>
  30744. <ul>define comma-separated list for text design and decoration<br/>
  30745. <br/>
  30746. valid values: underline overline line-through bold italic oblique clear<br/>
  30747. <br/>
  30748. Examples:<br/>
  30749. <code>
  30750. textdesign underline<br/>
  30751. textdesign bold,italic,underline
  30752. </code><br/>
  30753. <br/>
  30754. <b>Important:</b> "clear" resets all to default values!<br/>
  30755. </ul></li><br/>
  30756. <br/>
  30757. <li><code>thalign &lt;align&gt;</code><br/>
  30758. <br/>
  30759. <ul>define horizontal alignment for text output<br/>
  30760. <br/>
  30761. valid values: start middle end<br/>
  30762. </ul></li><br/>
  30763. <br/>
  30764. <li><code>ticker &lt;id&gt; &lt;x&gt; &lt;y&gt; &lt;width&gt; &lt;items&gt; &lt;speed&gt; &lt;{data}&gt;</code><br/>
  30765. <br/>
  30766. <ul>create a vertical ticker<br/>
  30767. <br/>
  30768. id = element id<br/>
  30769. x,y = position<br/>
  30770. width = width<br/>
  30771. items = number of items to be displayed simultanously<br/>
  30772. speed = scroll speed<br/>
  30773. data = list of text items, separated by <code>\n</code><br/>
  30774. </ul></li><br/>
  30775. <br/>
  30776. <li><code>time &lt;id&gt; &lt;x&gt; &lt;y&gt;</code><br/>
  30777. <br/>
  30778. <ul>print time<br/>
  30779. <br/>
  30780. id = element id<br/>
  30781. x,y = position<br/>
  30782. </ul></li><br/>
  30783. <br/>
  30784. <li><code>tvalign &lt;align&gt;</code><br/>
  30785. <br/>
  30786. <ul>define vertical alignment for text output<br/>
  30787. <br/>
  30788. valid values: auto baseline middle center hanging<br/>
  30789. </ul></li><br/>
  30790. <br/>
  30791. </ul>
  30792. <br/>
  30793. <b>Author's notes</b><br/>
  30794. <br/>
  30795. <ul>
  30796. <li>Have fun!</li><br/>
  30797. </ul>
  30798. </ul>
  30799. <a name="Itach_IR"></a>
  30800. <h3>Itach_IR</h3>
  30801. <ul>
  30802. Defines a device representing a physical Itach IR. Serves as communication layer for <a href="#Itach_IRDevice">Itach_IRDevice</a>.<br>
  30803. For more information, check the <a href="http://www.fhemwiki.de/wiki/ITach">Wiki page</a>.<br>
  30804. <a name="Itach_IRdefine"></a><br>
  30805. <b>Define</b>
  30806. <ul>
  30807. <code>define &lt;name&gt; Itach_IR &lt;IP-address&gt;</code><br>
  30808. Example:<br>
  30809. <code>define Itach Itach_IR 192.168.1.2</code>
  30810. </ul>
  30811. <a name="Itach_IRset"></a><br>
  30812. <b>Set</b><br><ul>N/A</ul><br>
  30813. <a name="Itach_IRDeviceget"></a><br>
  30814. <b>Get</b><br><ul>N/A</ul><br>
  30815. <a name="Itach_IRDeviceattr"></a><br>
  30816. <b>Attributes</b>
  30817. <ul>
  30818. <li><a href="#verbose">verbose</a></li>
  30819. <li>timeout<br>
  30820. Can be used to change the timeout-value for tcp-communication. Default is 2.0.</li>
  30821. </ul>
  30822. </ul>
  30823. <a name="Itach_IRDevice"></a>
  30824. <h3>Itach_IRDevice</h3>
  30825. <ul>
  30826. Itach IR is a physical device that serves to emit Infrared (IR) commands, hence it is a general IR remote control that can be controlled via WLAN (WF2IR) or LAN (IP2IR).<br>
  30827. Using the iLearn-Software that ships with every Itach IR, record the IR-squences per original remotecontrol-button and store all these IR-codes as an IR-config-file.
  30828. This IR-config-file can then be used directly with this module. All commands stored in the IR-config-file will be available immediately for use.<br>
  30829. For more information, check the <a href="http://www.fhemwiki.de/wiki/ITach">Wiki page</a>.<br>
  30830. <a name="Itach_IRDevicedefine"></a><br>
  30831. <b>Define</b>
  30832. <ul>
  30833. <code>define &lt;name&gt; Itach_IRDevice &lt;IR-config-file&gt;</code><br>
  30834. Store the IR-config-file in the same directory where fhem.cfg resides.<br>
  30835. <b>Hint:</b> define an <a href="#Itach_IR">Itach_IR</a> device first!<br>
  30836. Example:<br>
  30837. <code>define IR_mac Itach_IRDevice IR-codes-mac.txt</code><br>
  30838. <code>define IR_amp Itach_IRDevice IR-codes-media-amplifier.txt</code>
  30839. </ul>
  30840. <a name="Itach_IRDeviceset"></a><br>
  30841. <b>Set</b><br>
  30842. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br><br>
  30843. The list of available commands depends on the content of the IR-config-file.
  30844. <br>There are only two module specific commands:
  30845. <ul>
  30846. <li><code>set &lt;name&gt; rereadIRfile</code><br>
  30847. For performance reasons, the IR-config-File is read into memory upon definition of the device. If you change the configuration within that file, use this set-command to read its content into fhem once again.</li>
  30848. <li><code>set &lt;name&gt; seqsingle &lt;parameter&gt;</code><br>
  30849. Will send the digits of a sequence one after the other. Useful when you have a sequence of digits to be sent, e.g. 123. Each digit must be a valid command in your IR-config-file.</li>
  30850. </ul>
  30851. <a name="Itach_IRDeviceget"></a><br>
  30852. <b>Get</b>
  30853. <ul>
  30854. <li><code>get &lt;name&gt; validcommands</code><br>
  30855. Lists the valid commands for this device according to your IR-config-file.</li>
  30856. </ul>
  30857. <a name="Itach_IRDeviceattr"></a><br>
  30858. <b>Attributes</b>
  30859. <ul>
  30860. <li><a href="#verbose">verbose</a></li>
  30861. <li><a href="#IODev">IODev</a><br>
  30862. Needs to be stated if more than one ItachIR-device is part of your fhem-configuration.</li>
  30863. </ul>
  30864. </ul>
  30865. <a name="Itach_Relay"></a>
  30866. <h3>ITACH_RELAY</h3>
  30867. <ul>
  30868. Note: this module needs the Net::Telnet module.
  30869. <br><br>
  30870. <a name="ITACH_RELAYdefine"></a>
  30871. <b>Define</b>
  30872. <ul>
  30873. <code>define &lt;name&gt; ITACH_RELAY &lt;ip-address&gt; &lt;port&gt;</code>
  30874. <br><br>
  30875. Defines an Global Cache iTach Relay device (Box with 3 relays) via its ip address. <br><br>
  30876. Examples:
  30877. <ul>
  30878. <code>define motor1 ITACH_RELAY 192.168.8.200 1</code><br>
  30879. </ul>
  30880. </ul>
  30881. <br>
  30882. <a name="ITACH_RELAYset"></a>
  30883. <b>Set </b>
  30884. <ul>
  30885. <code>set &lt;name&gt; &lt;value&gt;</code>
  30886. <br><br>
  30887. where <code>value</code> is one of:<br>
  30888. <pre>
  30889. off
  30890. on
  30891. toggle
  30892. </pre>
  30893. Examples:
  30894. <ul>
  30895. <code>set motor1 on</code><br>
  30896. </ul>
  30897. <br>
  30898. Notes:
  30899. <ul>
  30900. <li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
  30901. </ul>
  30902. </ul>
  30903. </ul>
  30904. =item device
  30905. =item summary reads OBIS data from measurement units
  30906. =item summary_DE liest OBIS Daten von Messger&auml;ten
  30907. <a name="JSONMETER"></a>
  30908. <h3>JSONMETER</h3>
  30909. <div>
  30910. <ul>
  30911. This module reads data from a measurement unit (so called smart meters for electricity, gas or heat)
  30912. <br>
  30913. that provides OBIS compliant data in JSON format on a webserver or on the FHEM file system.
  30914. <br>
  30915. It assumes normally, that the structur of the JSON data do not change.
  30916. <br>
  30917. &nbsp;
  30918. <br>
  30919. <b>Define</b>
  30920. <ul>
  30921. <br>
  30922. <code>define &lt;name&gt; JSONMETER &lt;deviceType&gt; [&lt;ip address&gt;] [poll-interval]</code>
  30923. <br>
  30924. Example: <code>define powermeter JSONMETER ITF 192.168.178.20 300</code>
  30925. <br>&nbsp;
  30926. <li><code>&lt;deviceType&gt;</code>
  30927. <br>
  30928. Mandatory. Used to define the path and port to extract the json file.
  30929. <br>
  30930. The attribute 'pathString' can be used to add login information to the URL path of predefined devices.
  30931. <br>&nbsp;
  30932. <ul>
  30933. <li><b>ITF</b> - FROETEC Simplex ME one tariff electrical meter (N-ENERGY) (<a href="http://www.itf-froeschl.de">ITF Fr&ouml;schl</a>)</li>
  30934. <li><b>EFR</b> - <a href="http://www.efr.de">EFR</a> Smart Grid Hub for electrical meter (EON, N-ENERGY and EnBW)
  30935. <br>
  30936. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use the 'pathstring' attribute to specifiy your login information
  30937. <br>
  30938. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>attr <device> pathString ?LogName=<i>user</i>&LogPSWD=<i>password</i></code>
  30939. </li>
  30940. <li><b>LS110</b> - <a href="http://www.youless.nl/productdetails/product/ls110.html">YouLess LS110</a> network sensor (counter) for electro mechanical electricity meter</li>
  30941. <li><b>url</b> - use the URL defined via the attributes 'pathString' and 'port'</li>
  30942. <li><b>file</b> - use the file defined via the attribute 'pathString' (positioned in the FHEM file system)</li>
  30943. </ul>
  30944. </li><br>
  30945. <li><code>[&lt;ip address&gt;]</code>
  30946. <br>
  30947. IP address of the phyisical device. (not needed for 'url' and 'file')
  30948. </li><br>
  30949. <li><code>[poll-interval]</code>
  30950. <br>
  30951. Optional. Default is 300 seconds. Smallest possible value is 10. With 0 it will only update on "manual" request.
  30952. </li>
  30953. </ul>
  30954. <br>
  30955. <b>Set</b>
  30956. <ul>
  30957. <li><code>activeTariff &lt; 0 - 9 &gt;</code>
  30958. <br>
  30959. Allows the separate measurement of the consumption (doStatistics = 1) within different tariffs for all gages that miss this built-in capability (e.g. LS110). Also the possible gain of a change to a time-dependent tariff can be evaluated with this.<br>
  30960. This value must be set at the correct point of time in accordance to the existing or planned tariff <b>by the FHEM command "at"</b>.<br>
  30961. 0 = without separate tariffs
  30962. </li><br>
  30963. <li><code>INTERVAL &lt;polling interval&gt;</code>
  30964. <br>
  30965. Polling interval in seconds
  30966. </li><br>
  30967. <li><code>resetStatistics &lt;statReadings&gt;</code>
  30968. <br>
  30969. Deletes the selected statistic values: <i>all, statElectricityConsumed..., statElectricityConsumedTariff..., statElectricityPower...</i>
  30970. </li><br>
  30971. <li><code>restartJsonAnalysis</code><br>
  30972. Restarts the analysis of the json file for known readings (compliant to the OBIS standard).
  30973. <br>
  30974. This analysis happens normally only once if readings have been found.
  30975. </li><br>
  30976. <li><code>statusRequest</code>
  30977. <br>
  30978. Update device information
  30979. </li>
  30980. </ul>
  30981. <br>
  30982. <b>Get</b>
  30983. <ul>
  30984. <li><code>jsonFile</code>
  30985. <br>
  30986. extracts and shows the json data
  30987. </li><br>
  30988. <li><code>jsonAnalysis</code>
  30989. <br>
  30990. extracts the json data and shows the result of the analysis</li>
  30991. </ul>
  30992. <br>
  30993. <a name="JSONMETERattr"></a>
  30994. <b>Attributes</b>
  30995. <ul>
  30996. <li><code>alwaysAnalyse &lt; 0 | 1 &gt;</code>
  30997. <br>
  30998. Repeats by each update the json analysis - use if structure of json data changes
  30999. <br>
  31000. Normally the once analysed structure is saved to reduce CPU load.
  31001. </li><br>
  31002. <li><code>doStatistics &lt; 0 | 1 &gt;</code>
  31003. <br>
  31004. Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
  31005. <br>
  31006. Logging and visualisation of the statistics should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
  31007. </li><br>
  31008. <li><code>pathString &lt;string&gt;</code>
  31009. <ul>
  31010. <li>if deviceType = 'file': specifies the local file name and path</li>
  31011. <li>if deviceType = 'url': specifies the url path</li>
  31012. <li>other deviceType: can be used to add login information to the url path of predefined devices</li>
  31013. </ul>
  31014. </li><br>
  31015. <li><code>port &lt;number&gt;</code>
  31016. <br>
  31017. Specifies the IP port for the deviceType 'url' (default is 80)
  31018. </li><br>
  31019. <li><code>timeOut &lt;seconds&gt;</code>
  31020. <br>
  31021. Specifies the timeout for the reading of the raw data. (default is 10)
  31022. <br>
  31023. The run time of the reading process can be measured via "get <device> jsonFile".
  31024. </li><br>
  31025. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  31026. </ul>
  31027. </ul>
  31028. </div>
  31029. <a name="Jabber"></a>
  31030. <h3>Jabber</h3>
  31031. <ul>
  31032. This Module allows FHEM to connect to the Jabber Network, send and receiving messages from and to a Jabber server.<br>
  31033. <br>
  31034. Jabber is another description for (XMPP) - a communications protocol for message-oriented middleware based
  31035. on XML and - depending on the server - encrypt the communications channels.<br>
  31036. For the user it is similar to other instant messaging Platforms like Facebook Chat, ICQ or Google's Hangouts
  31037. but free, Open Source and by default encrypted between the Jabber servers.<br>
  31038. <br>
  31039. You need an account on a Jabber Server, you can find free services and more information on <a href="http://www.jabber.org/">jabber.org</a><br>
  31040. Discuss the module in the <a href="http://forum.fhem.de/index.php/topic,18967.0.html">specific thread here</a>.<br>
  31041. <br>
  31042. This Module requires the following perl Modules to be installed (using SSL):<br>
  31043. <ul>
  31044. <li>Net::Jabber</li>
  31045. <li>Net::XMPP</li>
  31046. <li>Authen::SASL</li>
  31047. <li>XML::Stream</li>
  31048. <li>Net::SSLeay</li>
  31049. </ul>
  31050. <br>
  31051. Since version 1.5 it allows FHEM also to join MUC (Multi-User-Channels) and the use of OTR for end to end encryption<br>
  31052. If you want to use OTR you must compile and install Crypt::OTR from CPAN on your own.<br>
  31053. <br>
  31054. <br>
  31055. <a name="JabberDefine"></a>
  31056. <b>Define</b>
  31057. <ul>
  31058. <code>define &lt;name&gt; Jabber &lt;server&gt; &lt;port&gt; &lt;username&gt; &lt;password&gt; &lt;TLS&gt; &lt;SSL&gt;</code><br>
  31059. <br>
  31060. You have to create an account on a free Jabber server or setup your own Jabber server.<br>
  31061. <br>
  31062. Example:
  31063. <ul>
  31064. <code>define JabberClient1 Jabber jabber.org 5222 myusername mypassword 1 0</code>
  31065. </ul>
  31066. <br>
  31067. </ul>
  31068. <br>
  31069. <a name="JabberSet"></a>
  31070. <b>Set</b>
  31071. <ul>
  31072. <li>
  31073. <code>set &lt;name&gt; msg &lt;username&gt; &lt;msg&gt;</code>
  31074. <br>
  31075. sends a message to the specified username
  31076. <br>
  31077. Examples:
  31078. <ul>
  31079. <code>set JabberClient1 msg myname@jabber.org It is working!</code><br>
  31080. </ul>
  31081. </li>
  31082. <br>
  31083. <li>
  31084. <code>set &lt;name&gt; msgmuc &lt;channel&gt; &lt;msg&gt;</code>
  31085. <br>
  31086. sends a message to the specified MUC group channel
  31087. <br>
  31088. Examples:
  31089. <ul>
  31090. <code>set JabberClient1 msgmuc roomname@jabber.org Woot!</code><br>
  31091. </ul>
  31092. </li>
  31093. <br>
  31094. <li>
  31095. <code>set &lt;name&gt; msgotr &lt;username&gt; &lt;msg&gt;</code>
  31096. <br>
  31097. sends an Off-the-Record encrypted message to the specified username, if no OTR session is currently established it is being tried to esablish an OTR session with the specified user.<br>
  31098. If the user does not have OTR support the message is discarded.
  31099. <br>
  31100. Examples:
  31101. <ul>
  31102. <code>set JabberClient1 msgotr myname@jabber.org Meet me at 7pm at the place today :*</code><br>
  31103. </ul>
  31104. </li>
  31105. <br>
  31106. <li>
  31107. <code>set &lt;name&gt; subscribe &lt;username&gt;</code>
  31108. <br>
  31109. asks the username for authorization (not needed normally)
  31110. <br>
  31111. Example:
  31112. <ul>
  31113. <code>set JabberClient1 subscribe myname@jabber.org</code><br>
  31114. </ul>
  31115. </li>
  31116. </ul>
  31117. <br>
  31118. <b>Get</b> <ul>N/A</ul><br>
  31119. <a name="JabberAttr"></a>
  31120. <b>Attributes</b>
  31121. <ul>
  31122. <a name="OnlineStatus"></a>
  31123. <li><code>OnlineStatus available|unavailable</code><br>
  31124. Sets the online status of the client, available (online in Clients) or unavailable (offline in Clients)<br>
  31125. It is possible, on some servers, that FHEM can even recieve messages if the status is unavailable<br>
  31126. <br>
  31127. Default: <code>available</code>
  31128. </li><br>
  31129. <a name="ResourceName"></a>
  31130. <li><code>ResourceName &lt;name&gt;</code><br>
  31131. In XMPP/Jabber you can have multiple clients connected with the same username. <br>
  31132. The resource name finally makes the Jabber-ID unique to each client.<br>
  31133. Here you can define the resource name.<br>
  31134. <br>
  31135. Default: <code>FHEM</code>
  31136. </li><br>
  31137. <a name="PollTimer"></a>
  31138. <li><code>PollTimer &lt;seconds&gt;</code><br>
  31139. This is the interval in seconds at which the jabber server get polled.<br>
  31140. Every interval the client checks if there are messages waiting and checks the connection to the server.<br>
  31141. Don't set it over 10 seconds, as the client could get disconnected.<br>
  31142. <br>
  31143. Default: <code>2</code>
  31144. </li><br>
  31145. <a name="RecvWhitelist"></a>
  31146. <li><code>RecvWhitelist &lt;Regex&gt;</code><br>
  31147. Only if the Regex match, the client accepts and interpret the message. Everything else will be discarded.<br>
  31148. <br>
  31149. Default: <code>.*</code><br>
  31150. Examples:<br>
  31151. <ul>
  31152. <code>myname@jabber.org</code><br>
  31153. <code>(myname1@jabber.org|myname2@xmpp.de)</code><br>
  31154. </ul>
  31155. </li><br>
  31156. <a name="MucJoin"></a>
  31157. <li><code>MucJoin channel1@server.com/mynick[:password]</code><br>
  31158. Allows you to join one or more MUC's (Multi-User-Channel) with a specific Nick and a optional Password<br>
  31159. <br>
  31160. Default: empty (no messages accepted)<br>
  31161. Examples:<br>
  31162. <ul>
  31163. Join a channel: <code>channel1@server.com/mynick</code><br>
  31164. Join more channels: <code>channel1@server.com/mynick,channel2@server.com/myothernick</code><br>
  31165. Join a channel with a password set: <code>channel1@server.com/mynick:password</code><br>
  31166. </ul>
  31167. </li><br>
  31168. <a name="MucRecvWhitelist"></a>
  31169. <li><code>MucRecvWhitelist &lt;Regex&gt;</code><br>
  31170. Same as RecvWhitelist but for MUC: Only if the Regex match, the client accepts and interpret the message. Everything else will be discarded.<br>
  31171. <br>
  31172. Default: empty (no messages accepted)<br>
  31173. Examples:<br>
  31174. <ul>
  31175. All joined channels allowed: <code>.*</code><br>
  31176. Specific channel allowed only: <code>mychannel@jabber.org</code><br>
  31177. Specific Nick in channel allowed only: <code>mychannel@jabber.org/NickOfFriend</code><br>
  31178. </ul>
  31179. </li><br>
  31180. <a name="OTREnable"></a>
  31181. <li><code>OTREnable 1|0</code><br>
  31182. Enabled the use of Crypt::OTR for end to end encryption between a device and FHEM<br>
  31183. You must have Crypt::OTR installed and a private key is being generated the first time you enable this option<br>
  31184. Key generation can take more than 2 hours on a quiet system but will not block FHEM instead it will inform you if it has been finished<br>
  31185. Key generation is a one-time-task<br>
  31186. <br>
  31187. Default: empty (OTR disabled)
  31188. </li><br>
  31189. <a name="OTRSharedSecret"></a>
  31190. <li><code>OTRSharedSecret aSecretKeyiOnlyKnow@@*</code><br>
  31191. Optional shared secret to allow the other end to start a trust verification against FHEM with this shared key.<br>
  31192. If the user starts a trust verification process the fingerprint of the FHEM private key will be saved at the user's device and the connection is trusted.<br>
  31193. This will allow to inform the user if the private key has changed (ex. in Man-in-the-Middle attacks)<br>
  31194. <br>
  31195. Default: empty, please define a shared secret on your own.
  31196. </li><br>
  31197. </ul>
  31198. <br>
  31199. <a name="JabberReadings"></a>
  31200. <b>Generated Readings/Events:</b>
  31201. <ul>
  31202. <li>Private Messages
  31203. <ul>
  31204. <li><b>Message</b> - Complete message including JID and text</li>
  31205. <li><b>LastMessage</b> - Only text portion of the Message</li>
  31206. <li><b>LastSenderJID</b> - Only JID portion of the Message</li>
  31207. </ul>
  31208. </li><br>
  31209. <li>Encrypted Private Messages (if OTREnable=1)
  31210. <ul>
  31211. <li><b>OTRMessage</b> - Complete decrypted message including JID and text</li>
  31212. <li><b>OTRLastMessage</b> - Only text portion of the Message</li>
  31213. <li><b>OTRLastSenderJID</b> - Only JID portion of the Message</li>
  31214. </ul>
  31215. </li><br>
  31216. <li>MUC Room Messages (if MUCJoin is set)
  31217. <ul>
  31218. <li><b>MucMessage</b> - Complete message including room's JID and text</li>
  31219. <li><b>MucLastMessage</b> - Only text portion of the Message</li>
  31220. <li><b>MucLastSenderJID</b> - Only JID portion of the Message</li>
  31221. </ul>
  31222. </li>
  31223. </ul>
  31224. <br>
  31225. <a name="JabberNotes"></a>
  31226. <b>Author's Notes:</b>
  31227. <ul>
  31228. <li>You can react and reply on incoming private messages with a notify like this:<br>
  31229. <pre><code>define Jabber_Notify notify JabberClient1:Message.* {
  31230. my $lastsender=ReadingsVal("JabberClient1","LastSenderJID","0");
  31231. my $lastmsg=ReadingsVal("JabberClient1","LastMessage","0");
  31232. my $temperature=ReadingsVal("BU_Temperatur","temperature","0");
  31233. fhem("set JabberClient1 msg ". $lastsender . " Temp: ".$temperature);
  31234. }
  31235. </code></pre>
  31236. </li>
  31237. <li>You can react and reply on MUC messages with a notify like this, be aware that the nickname in $lastsender is stripped off in the msgmuc function<br>
  31238. <pre><code>define Jabber_Notify notify JabberClient1:MucMessage.* {
  31239. my $lastsender=ReadingsVal("JabberClient1","LastSenderJID","0");
  31240. my $lastmsg=ReadingsVal("JabberClient1","LastMessage","0");
  31241. my $temperature=ReadingsVal("BU_Temperatur","temperature","0");
  31242. fhem("set JabberClient1 msgmuc ". $lastsender . " Temp: ".$temperature);
  31243. }
  31244. </code></pre>
  31245. </li>
  31246. <li>You can react and reply on OTR private messages with a notify like this:<br>
  31247. <pre><code>define Jabber_Notify notify JabberClient1:OTRMessage.* {
  31248. my $lastsender=ReadingsVal("JabberClient1","LastSenderJID","0");
  31249. my $lastmsg=ReadingsVal("JabberClient1","LastMessage","0");
  31250. my $temperature=ReadingsVal("BU_Temperatur","temperature","0");
  31251. fhem("set JabberClient1 msgotr ". $lastsender . " Temp: ".$temperature);
  31252. }
  31253. </code></pre>
  31254. </li>
  31255. </ul>
  31256. </ul>
  31257. <a name="JawboneUp"></a>
  31258. <h3>JawboneUp</h3>
  31259. <ul>
  31260. This module supports the Jawbone Up[24] fitness tracker. The module collects calories, steps and distance walked (and a few other metrics) on a given day.<br><br>
  31261. All communication with the Jawbone services is handled as background-tasks, in order not to interfere with other FHEM services.
  31262. <br><br>
  31263. <b>Installation</b>
  31264. Among the perl modules required for this module are: LWP::UserAgent, IO::Socket::SSL, WWW::Jawbone::Up.<br>
  31265. At least WWW:Jawbone::Up doesn't seem to have a debian equivalent, so you'll need CPAN to install the modules.<br>
  31266. Example: <code>cpan -i WWW::Jawbone::Up</code> should install the required perl modules for the Jawbone up.<br>
  31267. Unfortunately the WWW::Jawbone::Up module relies on quite a number of dependencies, so in case of error, check the CPAN output for missing modules.<br>
  31268. Some dependent modules might fail during self-test, in that case try a forced install: <code>cpan -i -f module-name</code>
  31269. <br><br>
  31270. <b>Error handling</b>
  31271. If there are more than three consecutive API errors, the module disables itself. A "get update" re-enables the module.<br>
  31272. API errors can be caused by wrong credentials or missing internet-connectivity or by a failure of the Jawbone server.<br><br>
  31273. <b>Configuration</b>
  31274. <a name="jawboneUp_Define"></a>
  31275. <b>Define</b>
  31276. <ul>
  31277. <code>define &lt;name&gt; JawboneUp &lt;user&gt; &lt;password&gt; [&lt;interval&gt;] </code><br>
  31278. <br>
  31279. Defines a JawboneUp device.<br>
  31280. <b>Parameters</b>
  31281. <ul>
  31282. <li>name<br>
  31283. A name for your jawbone device.</li>
  31284. <li>user<br>
  31285. Username (email) used as account-name for the jawbone service.</li>
  31286. <li>password<br>
  31287. The password for the jawbone service.</li>
  31288. <li>interval<br>
  31289. Optional polling intervall in seconds. Default is 3600, minimum is 300 (=5min). It is not recommended to go below 900sec.</li>
  31290. </ul><br>
  31291. Example:
  31292. <ul>
  31293. <code>define myJawboneUp JawboneUp me@foo.org myS3cret 3600</code><br>
  31294. <code>attr myJawboneUp room Jawbone</code><br>
  31295. </ul>
  31296. </ul><br>
  31297. <a name="jawboneUp_Readings"></a>
  31298. <b>Readings</b>
  31299. <ul>
  31300. <li>active_time<br>
  31301. (Active time (seconds))</li>
  31302. <li>bg_steps<br>
  31303. (Step count)</li>
  31304. <li>bmr_calories<br>
  31305. (Resting calories)</li>
  31306. <li>bmr_calories_day<br>
  31307. (Average daily calories (without activities))</li>
  31308. <li>calories<br>
  31309. (Activity calories)</li>
  31310. <li>distance<br>
  31311. (Distance in km)</li>
  31312. <li>longest_idle<br>
  31313. (Inactive time in seconds)<br></li>
  31314. <li>sleep_awake<br>
  31315. (Awake time during sleep in seconds)</li>
  31316. <li>sleep_asleep<br>
  31317. (Actual sleep during sleep period, time in seconds)</li>
  31318. <li>awakenings<br>
  31319. (Awakenings)</li>
  31320. <li>light<br>
  31321. (Light sleep during sleep period, time in seconds)</li>
  31322. <li>time_to_sleep<br>
  31323. (Time to fall asleep in seconds)</li>
  31324. <li>bedtime<br>
  31325. (Time in bed)</li>
  31326. <li>deep<br>
  31327. (Deep sleep in seconds)</li>
  31328. <li>awake<br>
  31329. (Time awake in seconds)</li>
  31330. <li>sleep_mode<br>
  31331. (0: sleep mode inactive, 1: sleep mode active) Note: this is not real-time since updates depend on the module's poll-intervall</li>
  31332. <li>stopwatch_mode<br>
  31333. (0: not in stopwatch mode, 1: stopwatch mode active) Note: not suitable for real-time measurements for the reasons above.</li>
  31334. </ul><br>
  31335. <a name="jawboneUp_Get"></a>
  31336. <b>Get</b>
  31337. <ul>
  31338. <li>update<br>
  31339. trigger an update</li>
  31340. </ul><br>
  31341. <a name="jawboneUp_Attr"></a>
  31342. <b>Attributes</b>
  31343. <ul>
  31344. <li>interval<br>
  31345. the interval in seconds for updates. the default ist 3600 (=1h), minimum is 300 (=5min). It is not recommended to go below 900sec.</li>
  31346. <li>disable<br>
  31347. 1 -> disconnect and stop polling</li>
  31348. </ul>
  31349. </ul>
  31350. <a name="JeeLink"></a>
  31351. <h3>JeeLink</h3>
  31352. <ul>
  31353. The JeeLink is a family of RF devices sold by <a href="http://jeelabs.com">jeelabs.com</a>.
  31354. It is possible to attach more than one device in order to get better
  31355. reception, fhem will filter out duplicate messages.<br><br>
  31356. This module provides the IODevice for:
  31357. <ul>
  31358. <li><a href="#PCA301">PCA301</a> modules that implement the PCA301 protocol.</li>
  31359. <li><a href="#LaCrosse">LaCrosse</a> modules that implement the IT+ protocol (Sensors like TX29DTH, TX35, ...).</li>
  31360. <li>LevelSender for measuring tank levels</li>
  31361. <li>EMT7110 energy meter</li>
  31362. <li>Other Sensors like WT440XH (their protocol gets transformed to IT+)</li>
  31363. </ul>
  31364. <br>
  31365. Note: this module may require the Device::SerialPort or Win32::SerialPort module if you attach the device via USB
  31366. and the OS sets strange default parameters for serial devices.
  31367. <br><br>
  31368. <a name="JeeLink_Define"></a>
  31369. <b>Define</b>
  31370. <ul>
  31371. <code>define &lt;name&gt; JeeLink &lt;device&gt;</code> <br>
  31372. <br>
  31373. USB-connected devices:<br><ul>
  31374. &lt;device&gt; specifies the serial port to communicate with the JeeLink.
  31375. The name of the serial-device depends on your distribution, under
  31376. linux the cdc_acm kernel module is responsible, and usually a
  31377. /dev/ttyACM0 device will be created. If your distribution does not have a
  31378. cdc_acm module, you can force usbserial to handle the JeeLink by the
  31379. following command:<ul>modprobe usbserial vendor=0x0403
  31380. product=0x6001</ul>In this case the device is most probably
  31381. /dev/ttyUSB0.<br><br>
  31382. You can also specify a baudrate if the device name contains the @
  31383. character, e.g.: /dev/ttyACM0@57600<br><br>
  31384. If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
  31385. perl module Device::SerialPort is not needed, and fhem opens the device
  31386. with simple file io. This might work if the operating system uses sane
  31387. defaults for the serial parameters, e.g. some Linux distributions and
  31388. OSX. <br>
  31389. </ul>
  31390. <br>
  31391. </ul>
  31392. <a name="JeeLink_Set"></a>
  31393. <b>Set</b>
  31394. <ul>
  31395. <li>raw &lt;data&gt;<br>
  31396. send &lt;data&gt; to the JeeLink. Depending on the sketch running on the JeeLink, different commands are available. Most of the sketches support the v command to get the version info and the ? command to get the list of available commands.
  31397. </li><br>
  31398. <li>reset<br>
  31399. force a device reset closing and reopening the device.
  31400. </li><br>
  31401. <li>LaCrossePairForSec &lt;sec&gt; [ignore_battery]<br>
  31402. enable autocreate of new LaCrosse sensors for &lt;sec&gt; seconds. If ignore_battery is not given only sensors
  31403. sending the 'new battery' flag will be created.
  31404. </li><br>
  31405. <li>flash [firmwareName]<br>
  31406. The JeeLink needs the right firmware to be able to receive and deliver the sensor data to fhem. In addition to the way using the
  31407. arduino IDE to flash the firmware into the JeeLink this provides a way to flash it directly from FHEM.<br><br>
  31408. The firmwareName argument is optional. If not given, set flash checks the firmware type that is currently installed on the JeeLink and
  31409. updates it with the same type.<br><br>
  31410. There are some requirements:
  31411. <ul>
  31412. <li>avrdude must be installed on the host<br>
  31413. On a linux systems like Cubietruck or Raspberry Pi this can be done with: sudo apt-get install avrdude</li>
  31414. <li>the flashCommand attribute must be set.<br>
  31415. This attribute defines the command, that gets sent to avrdude to flash the JeeLink.<br>
  31416. The default is: avrdude -p atmega328P -c arduino -P [PORT] -D -U flash:w:[HEXFILE] 2>[LOGFILE]<br>
  31417. It contains some place-holders that automatically get filled with the according values:<br>
  31418. <ul>
  31419. <li>[PORT]<br>
  31420. is the port the JeeLink is connectd to (e.g. /dev/ttyUSB0)</li>
  31421. <li>[HEXFILE]<br>
  31422. is the .hex file that shall get flashed. There are three options (applied in this order):<br>
  31423. - passed in set flash<br>
  31424. - taken from the hexFile attribute<br>
  31425. - the default value defined in the module<br>
  31426. </li>
  31427. <li>[LOGFILE]<br>
  31428. The logfile that collects information about the flash process. It gets displayed in FHEM after finishing the flash process</li>
  31429. </ul>
  31430. </li>
  31431. </ul>
  31432. </li><br>
  31433. <li>led &lt;on|off&gt;<br>
  31434. Is used to disable the blue activity LED
  31435. </li><br>
  31436. <li>beep<br>
  31437. ...
  31438. </li><br>
  31439. <li>setReceiverMode<br>
  31440. ...
  31441. </li><br>
  31442. </ul>
  31443. <a name="JeeLink_Get"></a>
  31444. <b>Get</b>
  31445. <ul>
  31446. </ul>
  31447. <br>
  31448. <a name="JeeLink_Attr"></a>
  31449. <b>Attributes</b>
  31450. <ul>
  31451. <li>Clients<br>
  31452. The received data gets distributed to a client (e.g. LaCrosse, EMT7110, ...) that handles the data.
  31453. This attribute tells, which are the clients, that handle the data. If you add a new module to FHEM, that shall handle
  31454. data distributed by the JeeLink module, you must add it to the Clients attribute.</li>
  31455. <li>MatchList<br>
  31456. can be set to a perl expression that returns a hash that is used as the MatchList<br>
  31457. <code>attr myJeeLink MatchList {'5:AliRF' => '^\\S+\\s+5 '}</code></li>
  31458. <li>initCommands<br>
  31459. Space separated list of commands to send for device initialization.<br>
  31460. This can be used e.g. to bring the LaCrosse Sketch into the data rate toggle mode. In this case initCommands would be: 30t
  31461. </li>
  31462. <li>flashCommand<br>
  31463. See "Set flash"
  31464. </li>
  31465. <li>timeout<br>
  31466. format: &lt;timeout, checkInterval&gt;
  31467. Checks every 'checkInterval' seconds if the last data reception is longer than 'timout' seconds ago.<br>
  31468. If this is the case, a reset is done for the IO-Device.
  31469. </li><br>
  31470. </ul>
  31471. <br>
  31472. </ul>
  31473. <a name="JsonList"></a>
  31474. <h3>JsonList</h3>
  31475. <ul>
  31476. <b>Note</b>: this command is deprecated, use <a
  31477. href="#JsonList2">jsonlist2</a> instead.<br><br>
  31478. <code>jsonlist [&lt;devspec&gt;|&lt;typespec&gt;|ROOMS]</code>
  31479. <br><br>
  31480. Returns an JSON tree of all definitions, all notify settings and all at
  31481. entries if no parameter is given. Can also be called via HTTP by
  31482. http://fhemhost:8083/fhem?cmd=jsonlist&XHR=1
  31483. <br><br>
  31484. Example:
  31485. <pre><code> fhem> jsonlist
  31486. {
  31487. "ResultSet": "full",
  31488. "Results": [
  31489. {
  31490. "list": "Global",
  31491. "devices": [
  31492. {
  31493. "DEF": "<no definition>",
  31494. "NAME": "global",
  31495. "NR": "1",
  31496. "STATE": "<no definition>",
  31497. "TYPE": "Global",
  31498. "currentlogfile": "/var/log/fhem/fhem-2011-12.log",
  31499. "logfile": "/var/log/fhem/fhem-%Y-%m.log",
  31500. "ATTR": {
  31501. "configfile": "/etc/fhem/fhem.conf",
  31502. "logfile": "/var/log/fhem/fhem-%Y-%m.log",
  31503. "modpath": "/usr/share/fhem",
  31504. "pidfilename": "/var/run/fhem.pid",
  31505. "port": "7072 global",
  31506. "room": "Server",
  31507. "statefile": "/var/cache/fhem/fhem.save",
  31508. "verbose": "4",
  31509. "version": "=VERS= from =DATE= ($Id: 98_JsonList.pm 12275 2016-10-05 14:33:55Z rudolfkoenig $)"
  31510. },
  31511. "READINGS": []
  31512. }
  31513. ]
  31514. },
  31515. {
  31516. "list": "CM11",
  31517. "devices": [
  31518. {
  31519. "DEF": "/dev/cm11",
  31520. "DeviceName": "/dev/cm11",
  31521. "FD": "14",
  31522. "NAME": "CM11",
  31523. "NR": "19",
  31524. "PARTIAL": "null",
  31525. "STATE": "Initialized",
  31526. "TYPE": "CM11",
  31527. "ATTR": {
  31528. "model": "CM11"
  31529. },
  31530. "READINGS": []
  31531. }
  31532. ]
  31533. },
  31534. {
  31535. [...placeholder for more entrys...]
  31536. },
  31537. ],
  31538. "totalResultsReturned": 235
  31539. }
  31540. </code></pre>
  31541. If specifying <code>&lt;devspec&gt;</code>, then a detailed status for
  31542. <code>&lt;devspec&gt;</code> will be displayed, e.g.:
  31543. <pre><code> fhem> jsonlist lamp1
  31544. {
  31545. "ResultSet": {
  31546. "Results": {
  31547. "ATTRIBUTES": {
  31548. "alias": "Lamp on Sideboard",
  31549. "model": "fs20st",
  31550. "room": "Livingroom"
  31551. },
  31552. "BTN": "01",
  31553. "CHANGED": "ARRAY",
  31554. "CHANGETIME": "ARRAY",
  31555. "CODE": {
  31556. "1": "0b0b 01",
  31557. "2": "0b0b 0f",
  31558. "3": "0b0b f0",
  31559. "4": "0b0b ff"
  31560. },
  31561. "DEF": "12341234 1112 lm 1144 fg 4411 gm 4444",
  31562. "IODev": "CUN868",
  31563. "NAME": "lamp1",
  31564. "NR": "155",
  31565. "READINGS": {
  31566. "state": {
  31567. "TIME": "2011-12-01 16:23:01",
  31568. "VAL": "on"
  31569. }
  31570. },
  31571. "STATE": "on",
  31572. "TYPE": "FS20",
  31573. "XMIT": "0b0b"
  31574. }
  31575. }
  31576. }
  31577. </code></pre>
  31578. If specifying <code>&lt;typespec&gt;</code>, then a list with the status for
  31579. the defined <code>&lt;typespec&gt;</code> devices will be displayed, e.g.:
  31580. <pre><code> fhem> jsonlist HMS
  31581. {
  31582. "ResultSet": "devices#HMS",
  31583. "Results": [
  31584. {
  31585. "name": "KG.ga.WD.01",
  31586. "state": "Water Detect: off"
  31587. },
  31588. {
  31589. "name": "KG.hz.GD.01",
  31590. "state": "Gas Detect: off"
  31591. },
  31592. {
  31593. "name": "KG.k1.TF.01",
  31594. "state": "T: 16.6 H: 51.2 Bat: ok"
  31595. },
  31596. {
  31597. "name": "NN.xx.RM.xx",
  31598. "state": "smoke_detect: off"
  31599. }
  31600. ],
  31601. "totalResultsReturned": 4
  31602. }
  31603. </code></pre>
  31604. If specifying <code>ROOMS</code>, then a list with the defined rooms
  31605. will be displayed, e.g.:
  31606. <pre><code> fhem> jsonlist ROOMS
  31607. {
  31608. "ResultSet": "rooms",
  31609. "Results": [
  31610. "Bathroom",
  31611. "Bedroom",
  31612. "Children",
  31613. "Diningroom",
  31614. "Garden",
  31615. "House",
  31616. "Livingroom",
  31617. "Office",
  31618. "hidden"
  31619. ],
  31620. "totalResultsReturned": 15
  31621. }
  31622. </code></pre>
  31623. </ul>
  31624. <a name="JsonList2"></a>
  31625. <h3>JsonList2</h3>
  31626. <ul>
  31627. <code>jsonlist2 [&lt;devspec&gt;] [&lt;value1&gt; &lt;value2&gt; ...]</code>
  31628. <br><br>
  31629. This is a command, to be issued on the command line (FHEMWEB or telnet
  31630. interface). Can also be called via HTTP by
  31631. <ul>
  31632. http://fhemhost:8083/fhem?cmd=jsonlist2&XHR=1
  31633. </ul>
  31634. Returns an JSON tree of the internal values, readings and attributes of the
  31635. requested definitions.<br>
  31636. If valueX is specified, then output only the corresponding internal (like DEF,
  31637. TYPE, etc), reading (actuator, measured-temp) or attribute for all devices
  31638. from the devspec.<br><br>
  31639. <b>Note</b>: the old command jsonlist (without the 2 as suffix) is deprecated
  31640. and will be removed in the future<br>
  31641. </ul>
  31642. <a name="KM271"></a>
  31643. <h3>KM271</h3>
  31644. <ul>
  31645. KM271 is the name of the communication device for the Buderus Logamatic 2105
  31646. or 2107 heating controller. It is connected via a serial line to the fhem
  31647. computer. The fhem module sets the communication device into log-mode, which
  31648. then will generate an event on change of the inner parameters. There are
  31649. about 20.000 events a day, the FHEM module ignores about 90% of them, if the
  31650. <a href="#all_km271_events">all_km271_events</a> attribute is not set.<br>
  31651. <br><br>
  31652. Note: this module requires the Device::SerialPort or Win32::SerialPort module.
  31653. <br><br>
  31654. <a name="KM271define"></a>
  31655. <b>Define</b>
  31656. <ul>
  31657. <code>define &lt;name&gt; KM271 &lt;serial-device-name&gt;</code>
  31658. <br><br>
  31659. Example:
  31660. <ul>
  31661. <code>define KM271 KM271 /dev tyS0@2400</code><br>
  31662. </ul>
  31663. </ul>
  31664. <br>
  31665. <a name="KM271set"></a>
  31666. <b>Set</b>
  31667. <ul>
  31668. <code>set KM271 &lt;param&gt; [&lt;value&gt; [&lt;values&gt;]]</code><br><br>
  31669. where param is one of:
  31670. <ul>
  31671. <li>hk1_tagsoll &lt;temp&gt;<br>
  31672. sets the by day temperature for heating circuit 1<br>
  31673. 0.5 celsius resolution - temperature between 10 and 30 celsius</li>
  31674. <li>hk2_tagsoll &lt;temp&gt;<br>
  31675. sets the by day temperature for heating circuit 2<br>
  31676. (see above)</li>
  31677. <li>hk1_nachtsoll &lt;temp&gt;<br>
  31678. sets the by night temperature for heating circuit 1<br>
  31679. (see above)</li>
  31680. <li>hk2_nachtsoll &lt;temp&gt;<br>
  31681. sets the by night temperature for heating circuit 2<br>
  31682. (see above)</li>
  31683. <li>hk1_urlaubsoll &lt;temp&gt;<br>
  31684. sets the temperature during holiday mode for heating circuit 1<br>
  31685. (see above)</li>
  31686. <li>hk2_urlaubsoll &lt;temp&gt;<br>
  31687. sets the temperature during holiday mode for heating circuit 2<br>
  31688. (see above)</li>
  31689. <li>hk1_aussenhalt_ab &lt;temp&gt;<br>
  31690. sets the threshold for working mode Aussenhalt for heating circuit 1<br>
  31691. 1.0 celsius resolution - temperature between -20 and 10 celsius</li>
  31692. <li>hk2_aussenhalt_ab &lt;temp&gt;<br>
  31693. sets the threshold for working mode Aussenhalt for heating circuit 2<br>
  31694. (see above)</li>
  31695. <li>hk1_betriebsart [automatik|nacht|tag]<br>
  31696. sets the working mode for heating circuit 1<br>
  31697. <ul>
  31698. <li>automatik: the timer program is active and the summer configuration is in effect</li>
  31699. <li>nacht: manual by night working mode, no timer program is in effect</li>
  31700. <li>tag: manual by day working mode, no timer program is in effect</li>
  31701. </ul></li>
  31702. <li>hk2_betriebsart [automatik|nacht|tag]<br>
  31703. sets the working mode for heating circuit 2<br>
  31704. (see above)</li>
  31705. <li>ww_soll &lt;temp&gt;<br>
  31706. sets the hot water temperature<br>
  31707. 1.0 celsius resolution - temperature between 30 and 60 celsius</li>
  31708. <li>ww_betriebsart [automatik|nacht|tag]<br>
  31709. sets the working mode for hot water<br>
  31710. <ul>
  31711. <li>automatik: hot water production according to the working modes of both heating circuits</li>
  31712. <li>nacht: no hot water at all</li>
  31713. <li>tag: manual permanent hot water</li>
  31714. </ul></li>
  31715. <li>ww_on-till [localtime]<br>
  31716. start hot water production till the given time is reached<br>
  31717. localtime must have the format HH:MM[:SS]<br>
  31718. ww_betriebsart is set according to the attribut ww_timermode. For switching-off hot water a single one-time at command is automatically generated which will set ww_betriebsart back to nacht</li>
  31719. <li>ww_zirkulation [count]<br>
  31720. count pumping phases for hot water circulation per hour<br>
  31721. count must be between 0 and 7 with special meaning for<br>
  31722. <ul>
  31723. <li>0: no circulation at all</li>
  31724. <li>7: circulation is always on</li>
  31725. </ul></li>
  31726. <li>sommer_ab &lt;temp&gt;<br>
  31727. temp defines the threshold for switching between summer or winter mode of the heater<br>
  31728. 1.0 celsius resolution - temp must be between 9 and 31 with special meaning for<br>
  31729. <ul>
  31730. <li> 9: fixed summer mode (only hot water and frost protection)</li>
  31731. <li>31: fixed winter mode</li>
  31732. </ul></li>
  31733. <li>frost_ab &lt;temp&gt;<br>
  31734. temp defines the threshold for activation of frost protection of the heater<br>
  31735. 1.0 celsius resolution - temp must be between -20 and 10 celsius</li>
  31736. <li>urlaub [count]<br>
  31737. sets the duration of the holiday mode to count days<br>
  31738. count must be between 0 and 99 with special meaning for<br>
  31739. <ul>
  31740. <li> 0: holiday mode is deactivated</li>
  31741. </ul></li>
  31742. <li>hk1_programm [eigen|familie|frueh|spaet|vormittag|nachmittag|mittag|single|senior]<br>
  31743. sets the timer program for heating circuit 1<br>
  31744. <ul>
  31745. <li>eigen: the custom program defined by the user (see below) is used</li>
  31746. <li>all others: predefined programs from Buderus for various situations (see Buderus manual for details)</li>
  31747. </ul></li>
  31748. <li>hk2_programm [eigen|familie|frueh|spaet|vormittag|nachmittag|mittag|single|senior]<br>
  31749. sets the timer program for heating circuit 2<br>
  31750. (see above)</li>
  31751. <li>hk1_timer [&lt;position&gt; delete|&lt;position&gt; &lt;on-day&gt; &lt;on-time&gt; &lt;off-day&gt; &lt;off-time&gt;]<br>
  31752. sets (or deactivates) a by day working mode time interval for the custom program of heating circuit 1<br>
  31753. <ul>
  31754. <li>position: addresses a slot of the custom timer program and must be between 1 and 21<br>
  31755. The slot will be set to the interval specified by the following on- and off-timepoints or is deactivated when the next argument is <b>delete</b>.</li>
  31756. <li>on-day: first part of the on-timepoint<br>
  31757. valid arguments are [mo|di|mi|do|fr|sa|so]</li>
  31758. <li>on-time: second part of the on-timepoint<br>
  31759. valid arguments have the format HH:MM (supported resolution: 10 min)</li>
  31760. <li>off-day: first part of the off-timepoint<br>
  31761. (see above)</li>
  31762. <li>off-time: second part of the off-timepoint<br>
  31763. valid arguments have the format HH:MM (supported resolution: 10 min)</li>
  31764. </ul>
  31765. As the on-timepoint is reached, the heating circuit is switched to by day working mode and when the off-timepoint is attained, the circuit falls back to by night working mode.
  31766. A program can be build up by chaining up to 21 of these intervals. They are ordered by the position argument. There's no behind the scene magic that will automatically consolidate the list.
  31767. The consistency of the program is in the responsibility of the user.
  31768. <br><br>
  31769. Example:
  31770. <ul>
  31771. <code>set KM271 hk1_timer 1 mo 06:30 mo 08:20</code><br>
  31772. </ul><br>
  31773. This will toogle the by day working mode every Monday at 6:30 and will fall back to by night working mode at 8:20 the same day.</li>
  31774. <li>hk2_timer [&lt;position&gt; delete|&lt;position&gt; &lt;on-day&gt; &lt;on-time&gt; &lt;off-day&gt; &lt;off-time&gt;]<br>
  31775. sets (or deactivates) a by day working mode time interval for the custom program of heating circuit 2<br>
  31776. (see above)</li>
  31777. <li>logmode<br>set to logmode / request all readings again</li>
  31778. </ul>
  31779. </ul>
  31780. <br>
  31781. <a name="KM271get"></a>
  31782. <b>Get</b>
  31783. <ul>
  31784. <code>get KM271 &lt;param&gt;</code><br><br>
  31785. where param is one of:
  31786. <ul>
  31787. <li>l_fehler<br>
  31788. gets the latest active error (code and message)</li>
  31789. <li>l_fehlerzeitpunkt<br>
  31790. gets the timestamp, when the latest active error occured (format of Perl-function 'time')</li>
  31791. <li>l_fehleraktualisierung<br>
  31792. gets the timestamp, of the latest update of an error status (format of Perl-function 'time')</li>
  31793. </ul>
  31794. </ul>
  31795. <br>
  31796. <a name="KM271attr"></a>
  31797. <b>Attributes</b>
  31798. <ul>
  31799. <li><a href="#do_not_notify">do_not_notify</a></li>
  31800. <a name="all_km271_events"></a>
  31801. <li>all_km271_events<br>
  31802. If this attribute is set to 1, do not ignore following events:<br>
  31803. HK1_Vorlaufisttemperatur, HK1_Mischerstellung, HK2_Vorlaufisttemperatur, HK2_Mischerstellung,
  31804. Kessel_Vorlaufisttemperatur, Kessel_Integral, Kessel_Integral1<br>
  31805. These events account for ca. 92% of all events.<br>
  31806. All UNKNOWN events are ignored too, most of them were only seen
  31807. directly after setting the device into logmode.
  31808. </li>
  31809. <a name="ww_timermode"></a>
  31810. <li>ww_timermode [automatik|tag]<br>
  31811. Defines the working mode for the ww_on-till command (default is tag).<br>
  31812. ww_on-till will set the ww_betriebsart of the heater according to this attribute.
  31813. </li>
  31814. <a name="readingsFilter"></a>
  31815. <li>readingsFilter<br>
  31816. Regular expression for selection of desired readings.<br>
  31817. Only readings which will match the regular expression will be used. All other readings are
  31818. suppressed in the device and even in the logfile.
  31819. </li>
  31820. <a name="additionalNotify"></a>
  31821. <li>additionalNotify<br>
  31822. Regular expression for activation of notify for readings with normally suppressed events.<br>
  31823. Useful for *_Vorlaufisttemperatur readings if notification should be activated only for a specific reading
  31824. and not for all like all_km271_events.
  31825. </li>
  31826. </ul>
  31827. <br>
  31828. <a name="KM271events"></a>
  31829. <b>Generated events:</b>
  31830. <ul>
  31831. <li>Abgastemperatur</li>
  31832. <li>Aussentemperatur</li>
  31833. <li>Aussentemperatur_gedaempft</li>
  31834. <li>Brenner_Ansteuerung</li>
  31835. <li>Brenner_Ausschalttemperatur</li>
  31836. <li>Brenner_Einschalttemperatur</li>
  31837. <li>Brenner_Laufzeit1_Minuten2</li>
  31838. <li>Brenner_Laufzeit1_Minuten1</li>
  31839. <li>Brenner_Laufzeit1_Minuten</li>
  31840. <li>Brenner_Laufzeit2_Minuten2</li>
  31841. <li>Brenner_Laufzeit2_Minuten1</li>
  31842. <li>Brenner_Laufzeit2_Minuten</li>
  31843. <li>Brenner_Mod_Stellglied</li>
  31844. <li>ERR_Fehlerspeicher1</li>
  31845. <li>ERR_Fehlerspeicher2</li>
  31846. <li>ERR_Fehlerspeicher3</li>
  31847. <li>ERR_Fehlerspeicher4</li>
  31848. <li>ERR_Alarmstatus</li>
  31849. <li>HK1_Ausschaltoptimierung</li>
  31850. <li>HK1_Aussenhalt_ab</li>
  31851. <li>HK1_Betriebswerte1</li>
  31852. <li>HK1_Betriebswerte2</li>
  31853. <li>HK1_Einschaltoptimierung</li>
  31854. <li>HK1_Heizkennlinie_10_Grad</li>
  31855. <li>HK1_Heizkennlinie_-10_Grad</li>
  31856. <li>HK1_Heizkennlinie_0_Grad</li>
  31857. <li>HK1_Mischerstellung</li>
  31858. <li>HK1_Pumpe</li>
  31859. <li>HK1_Raumisttemperatur</li>
  31860. <li>HK1_Raumsolltemperatur</li>
  31861. <li>HK1_Vorlaufisttemperatur</li>
  31862. <li>HK1_Vorlaufsolltemperatur</li>
  31863. <li>HK2_Ausschaltoptimierung</li>
  31864. <li>HK2_Aussenhalt_ab</li>
  31865. <li>HK2_Betriebswerte1</li>
  31866. <li>HK2_Betriebswerte2</li>
  31867. <li>HK2_Einschaltoptimierung</li>
  31868. <li>HK2_Heizkennlinie_10_Grad</li>
  31869. <li>HK2_Heizkennlinie_-10_Grad</li>
  31870. <li>HK2_Heizkennlinie_0_Grad</li>
  31871. <li>HK2_Mischerstellung</li>
  31872. <li>HK2_Pumpe</li>
  31873. <li>HK2_Raumisttemperatur</li>
  31874. <li>HK2_Raumsolltemperatur</li>
  31875. <li>HK2_Vorlaufisttemperatur</li>
  31876. <li>HK2_Vorlaufsolltemperatur</li>
  31877. <li>Kessel_Betrieb</li>
  31878. <li>Kessel_Fehler</li>
  31879. <li>Kessel_Integral</li>
  31880. <li>Kessel_Integral1</li>
  31881. <li>Kessel_Vorlaufisttemperatur</li>
  31882. <li>Kessel_Vorlaufsolltemperatur</li>
  31883. <li>Modulkennung</li>
  31884. <li>NoData</li>
  31885. <li>Versionsnummer_NK</li>
  31886. <li>Versionsnummer_VK</li>
  31887. <li>WW_Betriebswerte1</li>
  31888. <li>WW_Betriebswerte2</li>
  31889. <li>WW_Einschaltoptimierung</li>
  31890. <li>WW_Isttemperatur</li>
  31891. <li>WW_Pumpentyp</li>
  31892. <li>WW_Solltemperatur</li>
  31893. </ul>
  31894. <br>
  31895. As I cannot explain all the values, I logged data for a period and plotted
  31896. each received value in the following logs:
  31897. <ul>
  31898. <li><a href="km271/km271_Aussentemperatur.png">Aussentemperatur</a></li>
  31899. <li><a href="km271/km271_Betriebswerte.png">Betriebswerte</a></li>
  31900. <li><a href="km271/km271_Brenneransteuerung.png">Brenneransteuerung</a></li>
  31901. <li><a href="km271/km271_Brennerlaufzeit.png">Brennerlaufzeit</a></li>
  31902. <li><a href="km271/km271_Brennerschalttemperatur.png">Brennerschalttemperatur</a></li>
  31903. <li><a href="km271/km271_Heizkennlinie.png">Heizkennlinie</a></li>
  31904. <li><a href="km271/km271_Kesselbetrieb.png">Kesselbetrieb</a></li>
  31905. <li><a href="km271/km271_Kesselintegral.png">Kesselintegral</a></li>
  31906. <li><a href="km271/km271_Ladepumpe.png">Ladepumpe</a></li>
  31907. <li><a href="km271/km271_Raumsolltemperatur_HK1.png">Raumsolltemperatur_HK1</a></li>
  31908. <li><a href="km271/km271_Vorlauftemperatur.png">Vorlauftemperatur</a></li>
  31909. <li><a href="km271/km271_Warmwasser.png">Warmwasser</a></li>
  31910. </ul>
  31911. All of these events are reported directly after initialization (or after
  31912. requesting logmode), along with some 60 configuration records (6byte long
  31913. each). Most parameters from these records are reverse engeneered, they
  31914. all start with CFG_ for configuration and PRG_ for timer program information.
  31915. </ul>
  31916. <a name="KM273"></a>
  31917. <h3>KM273</h3>
  31918. <ul>
  31919. <i>KM273</i> implements the can bus communication with the buderus logatherm wps heat pump<br>
  31920. The software expect an SLCAN compatible module like USBtin
  31921. <br><br>
  31922. <a name="KM273define"></a>
  31923. <b>Define</b>
  31924. <ul>
  31925. <code>define &lt;name&gt; KM273 &lt;device&gt;</code>
  31926. <br><br>
  31927. Example: <code>define myKM273 KM273 /dev/ttyACM0@115200</code>
  31928. <br><br>
  31929. </ul>
  31930. <br>
  31931. <a name="KM273set"></a>
  31932. <b>Set</b><br>
  31933. <ul>
  31934. <code>set &lt;name&gt; &lt;option&gt; &lt;value&gt;</code>
  31935. <br><br>
  31936. Example:<br>
  31937. <code>set myKM273 DHW_TIMEPROGRAM 1</code><br>
  31938. <code>set myKM273 DHW_TIMEPROGRAM Always_On</code><br>
  31939. <br>
  31940. You can <i>set</i> any value to any of the following options.
  31941. <br><br>
  31942. Options:
  31943. <ul>
  31944. <li><i>DHW_CALCULATED_SETPOINT_TEMP</i><br>
  31945. preset hot water temperature</li>
  31946. <li><i>DHW_TIMEPROGRAM</i><br>
  31947. select: '0' or 'Always_On', '1' or 'Program_1', '2' or 'Program_2'</li>
  31948. <li><i>DHW_PROGRAM_MODE</i><br>
  31949. select: '0' or 'Automatic', '1' or 'Always_On', '2' or 'Always_Off'</li>
  31950. <li><i>HEATING_SEASON_MODE</i><br>
  31951. select: '0' or 'Automatic', '1' or 'Always_On', '2' or 'Always_Off'</li>
  31952. <li><i>DHW_PROGRAM_1_1MON .. ROOM_PROGRAM_1_7SUN</i><br>
  31953. value: 06:00 on 21:00 off </li>
  31954. <li><i>DHW_PROGRAM_2_1MON .. ROOM_PROGRAM_2_7SUN</i><br>
  31955. value: 06:00 on 21:00 off </li>
  31956. <li><i>PUMP_DHW_PROGRAM1_START_TIME .. PUMP_DHW_PROGRAM4_STOP_TIME</i><br>
  31957. dayly program for switching on and off the hot water circulation pump<br>
  31958. you can set 4 time ranges where the pump should be switched on
  31959. value: xx:xx</li>
  31960. <li><i>ROOM_TIMEPROGRAM</i><br>
  31961. time program for circuit 1<br>
  31962. select: '0' or 'HP_Optimized', '1' or 'Program_1', '2' or 'Program_2', '3' or 'Family', '4' or 'Morning', '5' or 'Evening', '6' or 'Seniors'</li>
  31963. <li><i>ROOM_PROGRAM_MODE</i><br>
  31964. room program for circuit 1<br>
  31965. select: '0' or 'Automatic', '1' or 'Normal', '2' or 'Exception', '3' or 'HeatingOff'</li>
  31966. <li><i>ROOM_PROGRAM_1_1MON .. ROOM_PROGRAM_1_7SUN</i><br>
  31967. times of Program_1 for circuit 1<br>
  31968. value: 06:00 on 21:00 off </li>
  31969. <li><i>ROOM_PROGRAM_2_1MON .. ROOM_PROGRAM_2_7SUN</i><br>
  31970. times of Program_2 for circuit 1<br>
  31971. value: 06:00 on 21:00 off </li>
  31972. <li><i>MV_E12_EEPROM_TIME_PROGRAM</i><br>
  31973. time program for circuit 2<br>
  31974. select: '0' or 'HP_Optimized', '1' or 'Program_1', '2' or 'Program_2', '3' or 'Family', '4' or 'Morning', '5' or 'Evening', '6' or 'Seniors'</li>
  31975. <li><i>MV_E12_EEPROM_ROOM_PROGRAM_MODE</i><br>
  31976. room program for circuit 2<br>
  31977. select: '0' or 'Automatic', '1' or 'Normal', '2' or 'Exception', '3' or 'HeatingOff'</li>
  31978. <li><i>MV_E12_EEPROM_TIME_PROGRAM_1_1MON .. MV_E12_EEPROM_TIME_PROGRAM_1_7SUN</i><br>
  31979. times of Program_1 for circuit 2<br>
  31980. value: 06:00 on 21:00 off </li>
  31981. <li><i>MV_E12_EEPROM_TIME_PROGRAM_2_1MON .. MV_E12_EEPROM_TIME_PROGRAM_2_7SUN</i><br>
  31982. times of Program_2 for circuit 2<br>
  31983. value: 06:00 on 21:00 off </li>
  31984. <li><i>XDHW_STOP_TEMP</i><br>
  31985. extra hot water temperature</li>
  31986. <li><i>XDHW_TIME</i><br>
  31987. hours for extra hot water</li>
  31988. </ul>
  31989. </ul>
  31990. <br>
  31991. <a name="KM273get"></a>
  31992. <b>Get</b><br>
  31993. <ul>
  31994. <code>get &lt;name&gt; &lt;option&gt;</code>
  31995. <br><br>
  31996. You can <i>get</i> the value of any of the options described in
  31997. <a href="#KM273set">paragraph "Set" above</a>. See
  31998. <a href="http://fhem.de/commandref.html#get">commandref#get</a> for more info about
  31999. the get command.
  32000. </ul>
  32001. <br>
  32002. <a name="KM273attr"></a>
  32003. <b>Attributes</b>
  32004. <ul>
  32005. <code>attr &lt;name&gt; &lt;attribute&gt; &lt;value&gt;</code>
  32006. <br><br>
  32007. See <a href="http://fhem.de/commandref.html#attr">commandref#attr</a> for more info about
  32008. the attr command.
  32009. <br><br>
  32010. Attributes:
  32011. <ul>
  32012. <li><i>DoNotPoll</i> 0|1<br>
  32013. When you set DoNotPoll to "1", the module is only listening to the telegrams on CAN bus. Default is "0".<br>
  32014. </li>
  32015. <li><i>HeatCircuit2Active</i> 0|1<br>
  32016. When you set HeatCircuit2Active to "1", the module read and set also the values for the second heating circuit E12. Default is "0".<br>
  32017. </li>
  32018. <li><i>AddToReadings</i> List of Variables<br>
  32019. additional variables, which are not polled by the module can by added here<br>
  32020. Example: attr myKM273 AddToReadings GT3_STATUS GT5_STATUS GT5_ANSLUTEN<br>
  32021. </li>
  32022. <li><i>AddToGetSet</i> List of Variables<br>
  32023. additional variables, which are not in get/set list definded by the module can by added here<br>
  32024. Example: attr myKM273 AddToGetSet ACCESS_LEVEL GT3_KORRIGERING GT5_KVITTERAD<br>
  32025. </li>
  32026. </ul>
  32027. </ul>
  32028. </ul>
  32029. <a name="KNX"></a>
  32030. <h3>KNX</h3>
  32031. <ul>
  32032. <p>KNX is a standard for building automation / home automation.
  32033. It is mainly based on a twisted pair wiring, but also other mediums (ip, wireless) are specified.</p>
  32034. For getting started, please refer to this document: <a href="http://www.knx.org/media/docs/Flyers/KNX-Basics/KNX-Basics_de.pdf">KNX-Basics</a>
  32035. <p>While the module <a href="#TUL">TUL</a> represents the connection to the KNX network, the KNX modules represent individual KNX devices. This module provides a basic set of operations (on, off, on-until, on-for-timer)
  32036. to switch on/off KNX devices. For numeric DPT you can use value (set &lt;devname&gt; value &lt;177.45&gt;). For string-DPT you can use string (set &lt;devname&gt; string &lt;Hello World&gt;). For other, non-defined
  32037. dpt you can send raw hex values to the network (set &lt;devname&gt; raw &lt;hexval&gt;).<br>
  32038. Sophisticated setups can be achieved by combining a number of KNX module instances. Therefore you can define a number of different GAD/DPT combinations per each device.</p>
  32039. <p>KNX defines a series of Datapoint Type as standard data types used to allow general interpretation of values of devices manufactured by different companies.
  32040. These datatypes are used to interpret the status of a device, so the state in FHEM will then show the correct value. For each received telegram there will be a reading with state, getG&lt;group&gt; and the sender
  32041. address. For every set, there will be a reading with state and setG&lt;group&gt;.</p>
  32042. <p><a name="KNXdefine"></a> <b>Define</b></p>
  32043. <ul>
  32044. <code>define &lt;name&gt; KNX &lt;group&gt;:&lt;DPT&gt;:&lt[;readingName]&gt; [&lt;group&gt;:&lt;DPT&gt; ..] [IODev]</code>
  32045. <p>A KNX device need a concrete DPT. Please refer to <a href="#KNXdpt">Available DPT</a>. Otherwise the system cannot en- or decode the messages. Furthermore you can supply a IO-Device directly at startup. This can be done later on via attribute as well.</p>
  32046. <p>Define an KNX device, connected via a <a href="#TUL">TUL</a>. The &lt;group&gt; parameters are either a group name notation (0-15/0-15/0-255) or the hex representation of the value (0-f0-f0-ff).
  32047. All of the defined groups can be used for bus-communication. Without further attributes, all incoming messages are translated into state. Per default, the first group is used for sending. If you want to send
  32048. via a different group, you have to index it (set &lt;devname&gt; value &lt;17.0&gt; &lt;g2&gt;).<br>
  32049. If you use the readingName, readings are based on this name (e.g. hugo-set, hugo-get for name hugo).</p>
  32050. <p>The module <a href="#autocreate">autocreate</a> is creating a new definition for any unknown sender. The device itself will be NOT fully available, until you added a DPT to the definition. The name will be
  32051. KNX_nnmmooo where nn is the line adress, mm the area and ooo the device.</p>
  32052. <p>Example:</p>
  32053. <pre>
  32054. define lamp1 KNX 0/10/12:dpt1
  32055. define lamp1 KNX 0/10/12:dpt1:meinName 0/0/5:dpt1.001
  32056. define lamp1 KNX 0A0C:dpt1.003 myTul
  32057. </pre>
  32058. One hint regarding dpt1 (binary): all the sub-types have to be used with keyword value. Received telegrams are already encoded to their representation. This mechanism does not work for send-telegrams.
  32059. Here on/off has to be supplied.<br>
  32060. Having the on/off button (for send values) without keyword value is an absolutely special use-case and only valid for dpt1 and its sub-types.<br>
  32061. <p>Example:</p>
  32062. <pre>
  32063. define rollo KNX 0/10/12:dpt1.008
  32064. set rollo value off
  32065. set rollo value on
  32066. </pre>
  32067. </ul>
  32068. <p><a name="KNXset"></a> <b>Set</b></p>
  32069. <ul>
  32070. <code>set &lt;name&gt; &lt;on, off&gt;</code> [g&lt;groupnr&gt;]
  32071. <code>set &lt;name&gt; &lt;on-for-timer, on-until&gt; &lt;time&gt; [g&lt;groupnr&gt;]</code>
  32072. <code>set &lt;name&gt; &lt;value&gt; [g&lt;groupnr&gt;]</code>
  32073. <code>set &lt;name&gt; &lt;string&gt; [g&lt;groupnr&gt;]</code>
  32074. <code>set &lt;name&gt; &lt;raw&gt; [g&lt;groupnr&gt;]</code>
  32075. <p>Example:</p>
  32076. <pre>
  32077. set lamp1 on
  32078. set lamp1 off
  32079. set lamp1 on-for-timer 10
  32080. set lamp1 on-until 13:15:00
  32081. set foobar raw 234578
  32082. set thermo value 23.44
  32083. set message value Hallo Welt
  32084. </pre>
  32085. <p>When as last argument a g&lt;groupnr&gt; is present, the command will be sent
  32086. to the KNX group indexed by the groupnr (starting by 1, in the order as given in define).</p>
  32087. <pre>
  32088. define lamp1 KNX 0/10/01:dpt1 0/10/02:dpt1
  32089. set lamp1 on g2 (will send "on" to 0/10/02)
  32090. </pre>
  32091. <p>A dimmer can be used with a slider as shown in following example:</p>
  32092. <pre>
  32093. define dim1 KNX 0/0/5:dpt5.001
  32094. attr dim1 slider 0,1,100
  32095. attr dim1 webCmd value
  32096. </pre>
  32097. <p>The current date and time can be sent to the bus by the following settings:</p>
  32098. <pre>
  32099. define timedev KNX 0/0/7:dpt10
  32100. attr timedev webCmd value now
  32101. define datedev KNX 0/0/8:dpt11
  32102. attr datedev webCmd value now
  32103. # send every midnight the new date
  32104. define dateset at *00:00:00 set datedev value now
  32105. # send every hour the current time
  32106. define timeset at +*01:00:00 set timedev value now
  32107. </pre>
  32108. </ul>
  32109. <p><a name="KNXget"></a> <b>Get</b></p>
  32110. <ul>
  32111. <p>If you execute get for a KNX-Element the status will be requested a state from the device. The device has to be able to respond to a read - this is not given for all devices.<br>
  32112. The answer from the bus-device is not shown in the toolbox, but is treated like a regular telegram.</p>
  32113. </ul>
  32114. <p><a name="KNXattr"></a> <b>Attributes</b></p>
  32115. <ul><br>
  32116. Common attributes:<br>
  32117. <a href="#DbLogInclude">DbLogInclude</a><br>
  32118. <a href="#DbLogExclude">DbLogExclude</a><br>
  32119. <a href="#IODev">IODev</a><br>
  32120. <a href="#alias">alias</a><br>
  32121. <a href="#comment">comment</a><br>
  32122. <a href="#devStateIcon">devStateIcon</a><br>
  32123. <a href="#devStateStyle">devStateStyle</a><br>
  32124. <a href="#do_not_notify">do_not_notify</a><br>
  32125. <a href="#readingFnAttributes">readingFnAttributes</a><br>
  32126. <a href="#event-aggregator">event-aggregator</a><br>
  32127. <a href="#event-min-interval">event-min-interval</a><br>
  32128. <a href="#event-on-change-reading">event-on-change-reading</a><br>
  32129. <a href="#event-on-update-reading">event-on-update-reading</a><br>
  32130. <a href="#eventMap">eventMap</a><br>
  32131. <a href="#group">group</a><br>
  32132. <a href="#icon">icon</a><br>
  32133. <a href="#room">room</a><br>
  32134. <a href="#showtime">showtime</a><br>
  32135. <a href="#sortby">sortby</a><br>
  32136. <a href="#stateFormat">stateFormat</a><br>
  32137. <a href="#userReadings">userReadings</a><br>
  32138. <a href="#userattr">userattr</a><br>
  32139. <a href="#verbose">verbose</a><br>
  32140. <a href="#webCmd">webCmd</a><br>
  32141. <a href="#widgetOverride">widgetOverride</a><br>
  32142. <br>
  32143. </ul>
  32144. <p><a name="KNXformat"></a> <b>format</b></p>
  32145. <ul>
  32146. The content of this attribute is added to every received value, before this is copied to state.
  32147. <p>Example:</p>
  32148. <pre>
  32149. define myTemperature KNX 0/1/1:dpt5
  32150. attr myTemperature format &degC;
  32151. </pre>
  32152. </ul>
  32153. <p><a name="KNXstateRegex"></a> <b>stateRegex</b></p>
  32154. <ul>
  32155. You can pass n pairs of regex-pattern and string to replace, seperated by a slash. Internally the "new" state is always in the format getG&lt;group&gt;:&lt;state-value&gt;. The substitution is done every time,
  32156. a new object is received. You can use this function for converting, adding units, having more fun with icons, ...
  32157. This function has only an impact on the content of state - no other functions are disturbed. It is executed directly after replacing the reading-names and setting the formats, but before stateCmd
  32158. <p>Example:</p>
  32159. <pre>
  32160. define myLamp KNX 0/1/1:dpt1 0/1/2:dpt1 0/1/2:dpt1
  32161. attr myLamp stateRegex /getG1:/steuern:/ /getG2:/status:/ /getG3:/sperre:/ /setG[13]:/steuern:/ /setG[3]://
  32162. attr myLamp devStateIcon status.on:general_an status.off:general_aus sperre.on:lock steuern.*:hourglass
  32163. </pre>
  32164. </ul>
  32165. <p><a name="KNXstateCmd"></a> <b>stateCmd</b></p>
  32166. <ul>
  32167. You can supply a perl-command for modifying state. This command is executed directly before updating the reading - so after renaming, format and regex.
  32168. Please supply a valid perl command like using the attribute stateFormat.
  32169. Unlike stateFormat the stateCmd modifies also the content of the reading, not only the hash-conten for visualization.
  32170. <p>Example:</p>
  32171. <pre>
  32172. define myLamp KNX 0/1/1:dpt1 0/1/2:dpt1 0/1/2:dpt1
  32173. attr myLamp stateCmd {$state = sprintf("%s", ReadingsVal($name,"getG2","undef"))}
  32174. </pre>
  32175. </ul>
  32176. <p><a name="KNXanswerReading"></a> <b>answerReading</b></p>
  32177. <ul>
  32178. If enabled, FHEM answers on read requests. The content of state is send to the bus as answer.
  32179. <p>If set to 1, read-requests are answered</p>
  32180. </ul>
  32181. <p><a name="KNXlistenonly"></a> <b>listenonly</b></p>
  32182. <ul>
  32183. If set to 1, the device may not send any messages. As well answering requests although get is prohibited.
  32184. </ul>
  32185. <p><a name="KNXreadonly"></a> <b>readonly</b></p>
  32186. <ul>
  32187. If set to 1, the device may not send any messages. Answering requests are prohibited.Get is allowed.
  32188. </ul>
  32189. <p><a name="KNXslider"></a> <b>slider</b></p>
  32190. <ul>
  32191. slider &lt;min&gt;,&lt;step&gt;,&lt;max&gt;<br>
  32192. With this attribute you can add a slider to any device.
  32193. <p>Example:</p>
  32194. <pre>
  32195. define myDimmer KNX 0/1/1:dpt5
  32196. attr myDimmer slider 0,1,100
  32197. attr myDimmer webCmd value
  32198. </pre>
  32199. </ul>
  32200. <p><a name="KNXdpt"></a> <b>DPT - datapoint-types</b></p>
  32201. <ul>
  32202. <p>The following dpt are implemented and have to be assigned within the device definition.</p>
  32203. dpt1 on, off<br>
  32204. dpt1.001 on, off<br>
  32205. dpt1.002 true, false<br>
  32206. dpt1.003 enable, disable<br>
  32207. dpt1.004 no ramp, ramp<br>
  32208. dpt1.005 no alarm, alarm<br>
  32209. dpt1.006 low, high<br>
  32210. dpt1.007 decrease, increase<br>
  32211. dpt1.008 up, down<br>
  32212. dpt1.009 open, closed<br>
  32213. dpt1.010 start, stop<br>
  32214. dpt1.011 inactive, active<br>
  32215. dpt1.012 not inverted, inverted<br>
  32216. dpt1.013 start/stop, ciclically<br>
  32217. dpt1.014 fixed, calculated<br>
  32218. dpt1.015 no action, reset<br>
  32219. dpt1.016 no action, acknowledge<br>
  32220. dpt1.017 trigger, trigger<br>
  32221. dpt1.018 not occupied, occupied<br>
  32222. dpt1.019 closed, open<br>
  32223. dpt1.020 logical or, logical and<br>
  32224. dpt1.021 scene A, scene B<br>
  32225. dpt1.022 move up/down, move and step mode<br>
  32226. dpt2 value on, value off, value forceOn, value forceOff<br>
  32227. dpt3 -100..+100<br>
  32228. dpt5 0..255<br>
  32229. dpt5.001 0..100 %<br>
  32230. dpt5.003 0..360 &deg;<br>
  32231. dpt5.004 0..255 %<br>
  32232. dpt6 -127..+127<br>
  32233. dpt6.001 0..100 %<br>
  32234. dpt7 0..65535<br>
  32235. dpt7.001 0..65535 s<br>
  32236. dpt7.005 0..65535 s<br>
  32237. dpt7.005 0..65535 m<br>
  32238. dpt7.012 0..65535 mA<br>
  32239. dpt7.013 0..65535 lux<br>
  32240. dpt8 -32768..32768<br>
  32241. dpt8.005 -32768..32768 s<br>
  32242. dpt8.010 -32768..32768 %<br>
  32243. dpt8.011 -32768..32768 &deg;<br>
  32244. dpt9 -670760.0..+670760.0<br>
  32245. dpt9.001 -670760.0..+670760.0 &deg;<br>
  32246. dpt9.004 -670760.0..+670760.0 lux<br>
  32247. dpt9.005 -670760.0..+670760.0 m/s<br>
  32248. dpt9.006 -670760.0..+670760.0 Pa<br>
  32249. dpt9.007 -670760.0..+670760.0 %<br>
  32250. dpt9.008 -670760.0..+670760.0 ppm<br>
  32251. dpt9.009 -670760.0..+670760.0 m³/h<br>
  32252. dpt9.010 -670760.0..+670760.0 s<br>
  32253. dpt9.021 -670760.0..+670760.0 mA<br>
  32254. dpt9.024 -670760.0..+670760.0 kW<br>
  32255. dpt9.025 -670760.0..+670760.0 l/h<br>
  32256. dpt9.026 -670760.0..+670760.0 l/h<br>
  32257. dpt9.028 -670760.0..+670760.0 km/h<br>
  32258. dpt10 01:00:00<br>
  32259. dpt11 01.01.2000<br>
  32260. dpt12 0..+Inf<br>
  32261. dpt13 -Inf..+Inf<br>
  32262. dpt13.010 -Inf..+Inf Wh<br>
  32263. dpt13.013 -Inf..+Inf kWh<br>
  32264. dpt14 -Inf.0..+Inf.0<br>
  32265. dpt14.019 -Inf.0..+Inf.0 A<br>
  32266. dpt14.027 -Inf.0..+Inf.0 V<br>
  32267. dpt14.056 -Inf.0..+Inf.0 W<br>
  32268. dpt14.068 -Inf.0..+Inf.0 &degC;<br>
  32269. dpt14.076 -Inf.0..+Inf.0 m&sup3;<br>
  32270. dpt16 String;<br>
  32271. dpt16.000 ASCII-String;<br>
  32272. dpt16.001 ISO-8859-1-String (Latin1);<br>
  32273. dpt232 RGB-Value RRGGBB<br>
  32274. </ul>
  32275. </ul>
  32276. <a name="KODI"></a>
  32277. <h3>KODI</h3>
  32278. <ul>
  32279. <a name="XBMCdefine"></a>
  32280. <b>Define</b>
  32281. <ul>
  32282. <code>define &lt;name&gt; KODI &lt;ip[:port]&gt; &lt;http|tcp&gt; [&lt;username&gt;] [&lt;password&gt;]</code>
  32283. <br><br>
  32284. This module allows you to control Kodi and receive events from Kodi. It can also be used to control Plex (see attribute <i>compatibilityMode</i>).<br><br>
  32285. <b>Prerequisites</b>
  32286. <ul>
  32287. <li>Requires XBMC "Frodo" 12.0.</li>
  32288. <li>To use this module you will have to enable JSON-RPC. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.</li>
  32289. <li>The Perl module JSON is required. <br>
  32290. On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
  32291. Via CPAN: <code>cpan install JSON</code>
  32292. To get it working on a Fritzbox the JSON module has to be installed manually.</li>
  32293. </ul>
  32294. To receive events it is necessary to use TCP. The default TCP port is 9090. Username and password are optional for TCP. Be sure to enable JSON-RPC
  32295. for TCP. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC>here</a>.<br><br>
  32296. If you just want to control Kodi you can use the HTTP instead of tcp. The username and password are required for HTTP. Be sure to enable JSON-RPC for HTTP.
  32297. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br><br>
  32298. Example:<br><br>
  32299. <ul>
  32300. <code>
  32301. define htpc KODI 192.168.0.10 tcp
  32302. <br><br>
  32303. define htpc KODI 192.168.0.10:9000 tcp # With custom port
  32304. <br><br>
  32305. define htpc KODI 192.168.0.10 http # Use HTTP instead of TCP - Note: to receive events use TCP!
  32306. <br><br>
  32307. define htpc KODI 192.168.0.10 http kodi passwd # Use HTTP with credentials - Note: to receive events use TCP!
  32308. </code>
  32309. </ul><br><br>
  32310. Remote control:<br>
  32311. There is an simple remote control layout for Kodi which contains the most basic buttons. To add the remote control to the webinterface execute the
  32312. following commands:<br><br>
  32313. <ul>
  32314. <code>
  32315. define &lt;rc_name&gt; remotecontrol #adds the remote control
  32316. <br><br>
  32317. set &lt;rc_name&gt; layout KODI_RClayout #sets the layout for the remote control
  32318. <br><br>
  32319. set &lt;rc_name&gt; makenotify &lt;KODI_device&gt; #links the buttons to the actions
  32320. </code>
  32321. </ul><br><br>
  32322. Known issues:<br>
  32323. Kodi sometimes creates events twices. For example the Player.OnPlay event is created twice if play a song. Unfortunately this
  32324. is a issue of Kodi. The fix of this bug is included in future version of Kodi (> 12.2).
  32325. </ul>
  32326. <a name="KODIset"></a>
  32327. <b>Set</b>
  32328. <ul>
  32329. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code>
  32330. <br><br>
  32331. This module supports the following commands:<br>
  32332. Player related commands:<br>
  32333. <ul>
  32334. <li><b>play [&lt;all|audio|video|picture&gt;]</b> - starts the playback (might only work if previously paused). The second argument defines which player should be started. By default the active players will be started</li>
  32335. <li><b>pause [&lt;all|audio|video|picture&gt;]</b> - pauses the playback</li>
  32336. <li><b>playpause [&lt;all|audio|video|picture&gt;]</b> - toggles between play and pause for the given player</li>
  32337. <li><b>stop [&lt;all|audio|video|picture&gt;]</b> - stop the playback</li>
  32338. <li><b>next [&lt;all|audio|video|picture&gt;]</b> - jump to the next track</li>
  32339. <li><b>prev [&lt;all|audio|video|picture&gt;]</b> - jump to the previous track or the beginning of the current track.</li>
  32340. <li><b>goto &lt;position&gt; [&lt;audio|video|picture&gt;]</b> - Goes to the <position> in the playlist. <position> has to be a number.</li>
  32341. <li><b>shuffle [&lt;toggle|on|off&gt;] [&lt;audio|video|picture&gt;]</b> - Enables/Disables shuffle mode. Without furhter parameters the shuffle mode is toggled.</li>
  32342. <li><b>repeat &lt;one|all|off&gt; [&lt;audio|video|picture&gt;]</b> - Sets the repeat mode.</li>
  32343. <li><b>open &lt;URI&gt;</b> - Plays the resource located at the URI (can be a url or a file)</li>
  32344. <li><b>opendir &lt;path&gt;</b> - Plays the content of the directory</li>
  32345. <li><b>openmovieid &lt;path&gt;</b> - Plays a movie by id</li>
  32346. <li><b>openepisodeid &lt;path&gt;</b> - Plays an episode by id</li>
  32347. <li><b>openchannelid &lt;path&gt;</b> - Switches to channel by id</li>
  32348. <li><b>addon &lt;addonid&gt; &lt;parametername&gt; &lt;parametervalue&gt;</b> - Executes addon with one Parameter, for example set kodi addon script.json-cec command activate</li>
  32349. <li><b>seek &lt;hh:mm:ss&gt;</b> - seek to the specified time</li>
  32350. </ul>
  32351. <br>Input related commands:<br>
  32352. <ul>
  32353. <li><b>back</b> - Back-button</li>
  32354. <li><b>down</b> - Down-button</li>
  32355. <li><b>up</b> - Up-button</li>
  32356. <li><b>left</b> - Left-button</li>
  32357. <li><b>right</b> - Right-button</li>
  32358. <li><b>home</b> - Home-button</li>
  32359. <li><b>select</b> - Select-button</li>
  32360. <li><b>info</b> - Info-button</li>
  32361. <li><b>showosd</b> - Opens the OSD (On Screen Display)</li>
  32362. <li><b>showcodec</b> - Shows Codec information</li>
  32363. <li><b>exec &lt;action&gt;</b> - Execute an input action. All available actions are listed <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Input.Action">here</a></li>
  32364. <li><b>send &lt;text&gt;</b> - Sends &lt;text&gt; as input to Kodi</li>
  32365. <li><b>jsonraw</b> - Sends raw JSON data to Kodi</li>
  32366. </ul>
  32367. <br>Libary related commands:<br>
  32368. <ul>
  32369. <li><b>videolibrary clean</b> - Removes non-existing files from the video libary</li>
  32370. <li><b>videolibrary scan</b> - Scan for new video files</li>
  32371. <li><b>audiolibrary clean</b> - Removes non-existing files from the audio libary</li>
  32372. <li><b>audiolibrary scan</b> - Scan for new audio files</li>
  32373. </ul>
  32374. <br>Application related commands:<br>
  32375. <ul>
  32376. <li><b>activatewindow &lt;name&gt;</b> - activates the window "name" of the following list:
  32377. <ul><li>AddonSearch</li><li>Addons</li><li>Albums</li><li>AndroidApps</li><li>Artists</li><li>Compilations</li><li>EventLog</li><li>FileManager</li><li>Genres</li><li>InProgressTvShows</li><li>MovieActors</li><li>MovieCountries</li><li>MovieDirectors</li><li>MovieGenres</li><li>MovieInformation</li><li>MovieSets</li><li>MovieStudios</li><li>MovieTags</li><li>MovieTitles</li><li>MovieYears</li><li>Movies</li><li>MusicAddons</li><li>MusicFiles</li><li>MusicPlaylists</li><li>MusicRoot</li><li>MusicVideoAlbums</li><li>MusicVideoArtists</li><li>MusicVideoDirectors</li><li>MusicVideoGenres</li><li>MusicVideoStudios</li><li>MusicVideoTitles</li><li>MusicVideoYears</li><li>MusicVideos</li><li>ProgramAddons</li><li>RecentlyAddedAlbums</li><li>RecentlyAddedEpisodes</li><li>RecentlyAddedMovies</li><li>RecentlyAddedMusicVideos</li><li>RecentlyPlayedAlbums</li><li>Settings</li><li>Singles</li><li>Song</li><li>SubTitles</li><li>Top100</li><li>Top100Albums</li><li>Top100Songs</li><li>TvShowActors</li><li>TvShowGenres</li><li>TvShowStudios</li><li>TvShowTitles</li><li>TvShowYears</li><li>TvShows</li><li>VideoAddons</li><li>VideoFiles</li><li>VideoPlaylists</li><li>VideoRoot</li><li>Years</li></ul>
  32378. </li>
  32379. <li><b>mute [&lt;0|1&gt;]</b> - 1 for mute; 0 for unmute; by default the mute status will be toggled</li>
  32380. <li><b>volume &lt;n&gt;</b> - sets the volume to &lt;n&gt;. &lt;n&gt; must be a number between 0 and 100</li>
  32381. <li><b>volumeDown &lt;n&gt;</b> - volume down</li>
  32382. <li><b>volumeUp &lt;n&gt;</b> - volume up</li>
  32383. <li><b>quit</b> - closes Kodi</li>
  32384. <li><b>off</b> - depending on the value of the attribute &quot;offMode&quot; Kodi will be closed (see quit) or the system will be shut down, put into hibernation or stand by. Default is quit.</li>
  32385. </ul>
  32386. <br>System related commands:<br>
  32387. <ul>
  32388. <li><b>eject</b> - will eject the optical drive</li>
  32389. <li><b>shutdown</b> - the Kodi host will be shut down</li>
  32390. <li><b>suspend</b> - the Kodi host will be put into stand by</li>
  32391. <li><b>hibernate</b> - the Kodi host will be put into hibernation</li>
  32392. <li><b>reboot</b> - the Kodi host will be rebooted</li>
  32393. <li><b>connect</b> - try to connect to the Kodi host immediately</li>
  32394. </ul>
  32395. </ul>
  32396. <br><br>
  32397. <u>Messaging</u>
  32398. <ul>
  32399. To show messages on Kodi (little message PopUp at the bottom right egde of the screen) you can use the following commands:<br>
  32400. <code>set &lt;KODI_device&gt; msg &lt;title&gt; &lt;msg&gt; [&lt;duration&gt;] [&lt;icon&gt;]</code><br>
  32401. The default duration of a message is 5000 (5 seconds). The minimum duration is 1500 (1.5 seconds). By default no icon is shown. Kodi provides three
  32402. different icon: error, info and warning. You can also use an uri to define an icon. Please enclose title and/or message into quotes (" or ') if it consists
  32403. of multiple words.
  32404. </ul>
  32405. <br>
  32406. <b>Generated Readings/Events:</b><br>
  32407. <ul>
  32408. <li><b>audiolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
  32409. <li><b>currentAlbum</b> - album of the current song/musicvideo</li>
  32410. <li><b>currentArtist</b> - artist of the current song/musicvideo</li>
  32411. <li><b>currentMedia</b> - file/URL of the media item being played</li>
  32412. <li><b>currentTitle</b> - title of the current media item</li>
  32413. <li><b>currentTrack</b> - track of the current song/musicvideo</li>
  32414. <li><b>episode</b> - episode number</li>
  32415. <li><b>episodeid</b> - id of the episode in the video library</li>
  32416. <li><b>fullscreen</b> - indicates if Kodi runs in fullscreen mode (on/off)</li>
  32417. <li><b>label</b> - label of the current media item</li>
  32418. <li><b>movieid</b> - id of the movie in the video library</li>
  32419. <li><b>musicvideoid</b> - id of the musicvideo in the video library</li>
  32420. <li><b>mute</b> - indicates if Kodi is muted (on/off)</li>
  32421. <li><b>name</b> - software name (e.g. Kodi)</li>
  32422. <li><b>originaltitle</b> - original title of the movie being played</li>
  32423. <li><b>partymode</b> - indicates if Kodi runs in party mode (on/off) (not available for Plex)</li>
  32424. <li><b>playlist</b> - Possible values: add, clear, remove</li>
  32425. <li><b>playStatus</b> - Indicates the player status: playing, paused, stopped</li>
  32426. <li><b>repeat</b> - current repeat mode (one/all/off)</li>
  32427. <li><b>season</b> - season of the current episode</li>
  32428. <li><b>showtitle</b> - title of the show being played</li>
  32429. <li><b>shuffle</b> - indicates if the playback is shuffled (on/off)</li>
  32430. <li><b>skin</b> - current skin of Kodi</li>
  32431. <li><b>songid</b> - id of the song in the music library</li>
  32432. <li><b>system</b> - Possible values: lowbattery, quit, restart, sleep, wake</li>
  32433. <li><b>time</b> - current position in the playing media item (only updated on play/pause)</li>
  32434. <li><b>totaltime</b> - total run time of the current media item</li>
  32435. <li><b>type</b> - type of the media item. Possible values: episode, movie, song, musicvideo, picture, unknown</li>
  32436. <li><b>version</b> - version of Kodi</li>
  32437. <li><b>videolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
  32438. <li><b>volume</b> - value between 0 and 100 stating the current volume setting</li>
  32439. <li><b>year</b> - year of the movie being played</li>
  32440. <li><b>3dfile</b> - is a 3D movie according to filename</li>
  32441. <li><b>sd_<type><n>_<reading></b> - stream details of the current medium. type can be video, audio or subtitle, n is the stream index (a stream can have multiple audio/video streams)</li>
  32442. </ul>
  32443. <br><br>
  32444. <u>Remarks on the events</u><br><br>
  32445. <ul>
  32446. The event <b>playStatus = playing</b> indicates a playback of a media item. Depending on the event <b>type</b> different events are generated:
  32447. <ul>
  32448. <li><b>type = song</b> generated events are: <b>album, artist, file, title</b> and <b>track</b></li>
  32449. <li><b>type = musicvideo</b> generated events are: <b>album, artist, file</b> and <b>title</b></li>
  32450. <li><b>type = episode</b> generated events are: <b>episode, file, season, showtitle,</b> and <b>title</b></li>
  32451. <li><b>type = movie</b> generated events are: <b>originaltitle, file, title,</b> and <b>year</b></li>
  32452. <li><b>type = picture</b> generated events are: <b>file</b></li>
  32453. <li><b>type = unknown</b> generated events are: <b>file</b></li>
  32454. </ul>
  32455. </ul>
  32456. <br><br>
  32457. <a name="KODIattr"></a>
  32458. <b>Attributes</b>
  32459. <ul>
  32460. <li>compatibilityMode<br>
  32461. This module can also be used to control Plex, since the JSON Api is mostly the same, but there are some differences.
  32462. If you want to control Plex set the attribute <i>compatibilityMode</i> to <i>plex</i>.</li>
  32463. <li>offMode<br>
  32464. Declares what should be down if the off command is executed. Possible values are <i>quit</i> (closes Kodi), <i>hibernate</i> (puts system into hibernation),
  32465. <i>suspend</i> (puts system into stand by), and <i>shutdown</i> (shuts down the system). Default value is <i>quit</i></li>
  32466. <li>fork<br>
  32467. If Kodi does not run all the time it used to be the case that FHEM blocks because it cannot reach Kodi (only happened
  32468. if TCP was used). If you encounter problems like FHEM not responding for a few seconds then you should set <code>attr &lt;KODI_device&gt; fork enable</code>
  32469. which will move the search for Kodi into a separate process.</li>
  32470. <li>updateInterval<br>
  32471. The interval which is used to check if Kodi is still alive (by sending a JSON ping) and also it is used to update current player item.</li>
  32472. <li>disable<br>
  32473. Disables the device. All connections will be closed immediately.</li>
  32474. <li>jsonResponseReading<br>
  32475. When enabled then every received JSON message from Kodi will be saved into the reading <i>jsonResponse</i> so the last received message is always available.
  32476. Also an event is triggered upon each update.</li>
  32477. </ul>
  32478. </ul>
  32479. <a name="KOPP_FC"></a>
  32480. <h3>Kopp Free Control protocol</h3>
  32481. <ul>
  32482. <b>Please take into account: this protocol is under construction. Commands may change </b>
  32483. <br><br>
  32484. The Kopp Free Control protocol is used by Kopp receivers/actuators and senders.
  32485. This module is able to send commands to Kopp actuators and receive commands from Kopp transmitters. Currently supports devices: dimmers, switches and blinds.
  32486. The communication is done via a <a href="#CUL">CUL</a> or compatible device (e.g. CCD...).
  32487. This devices must be defined before using this protocol.
  32488. <br><br>
  32489. <b>Assign the Kopp Free Control protocol to a CUL or compatible device</b>
  32490. <ul>
  32491. <code>define CUL_0 CUL /dev/ttyAMA0@38400 1234</code><br>
  32492. <code>attr CUL_0 rfmode KOPP_FC</code>
  32493. <br>
  32494. This attribute ("rfmode KOPP_FC") assigns the Kopp protocol to device CUL_0<br>
  32495. You may <b>not</b> assign/use a second protocol on this device
  32496. <br>
  32497. </ul>
  32498. <br>
  32499. <a name="KOPP_FCdefine"></a>
  32500. <b>Define</b>
  32501. <ul>
  32502. <code>define &lt;name&gt; KOPP_FC &lt;Keycode&gt; &lt;Transmittercode1&gt; &lt;Transmittercode2&gt; [&lt;Keycode2&gt] [&lt;Keycode3&gt]</code>
  32503. <br>
  32504. <br><li><code>&lt;name&gt;</code></li>
  32505. name is the identifier (name) you plan to assign to your specific device (actuator) as done for any other FHEM device
  32506. <br><br><li><code>&lt;Keycode&gt;</code></li>
  32507. Keycode is a 2 digit hex code (1Byte) which reflects the transmitters key
  32508. <br><br><li><code>&lt;Transmittercode1&gt;</code></li>
  32509. Transmittercode1 is a 4 digit hex code. This code is specific for the transmitter itself.
  32510. <br><br><li><code>&lt;Transmittercode2&gt;</code></li>
  32511. Transmittercode2 is a 2 digit hex code and also specific for the transmitter, but I didn't see any difference while modifying this code.
  32512. (seems this code don't matter the receiver).
  32513. <br>Both codes (Transmittercode1/2) are also used to pair the transmitter with the receivers (remote switch, dimmer, blind..)
  32514. <br><br><li><code>[&lt;Keycode2&gt;]</code></li>
  32515. Keycode2 is an opional 2 digit hex code (1Byte) which reflects a second transmitters key
  32516. <br><br><li><code>[&lt;Keycode3&gt;]</code></li>
  32517. Keycode3 is an opional 2 digit hex code (1Byte) which reflects a third transmitters key
  32518. <br>
  32519. Some receivers like dimmers can be paired with two addional keys, which allow to switch the dimmer directly on or off.
  32520. That means FHEM will always know the current state, which is not the case in one key mode (toggling between on and off)
  32521. <br><br>
  32522. Pairing is done by setting the receiver in programming mode by pressing the program button at the receiver<br>
  32523. (small buttom, typically inside a hole).<br>
  32524. Once the receiver is in programming mode send a command (or two, see dimmer above) from within FHEM to complete the pairing.
  32525. For more details take a look to the data sheet of the corresponding receiver type.
  32526. <br>
  32527. You are now able to control the receiver from FHEM, the receiver handles FHEM just linke another remote control.
  32528. </ul>
  32529. <br>
  32530. <a name="KOPP_FCset"></a>
  32531. <b>Set</b>
  32532. <ul>
  32533. <code>set &lt;name&gt; &lt;value&gt</code>
  32534. <br>
  32535. <br><li><code>&lt;value&gt;</code></li>
  32536. value is one of:
  32537. <ul>
  32538. <code>on</code><br>
  32539. <code>off</code><br>
  32540. <code>dimm</code><br>
  32541. <code>stop</code><br>
  32542. </ul>
  32543. <pre>Examples:
  32544. <code>set Dimmer on</code> # will toggle dimmer device on/off for 1Key remote control,
  32545. <code> </code> will switch on for 3 key remote control
  32546. <code>set Dimmer off</code> # will switch dimmer device off (3 key remote control)
  32547. <code>set Dimmer dimm</code> # will start dimming process
  32548. <code>set Dimmer stop</code> # will stop dimming process
  32549. </pre>
  32550. </ul>
  32551. <a name="KOPP_FCattrib"></a>
  32552. <b>Attributes</b>
  32553. <ul>
  32554. <code>attr &lt;name&gt; model &lt;value&gt</code>
  32555. <br>
  32556. <br><li><code>&lt;value&gt;</code></li>
  32557. value is one of:
  32558. <ul>
  32559. <code>Switch_8080_01</code><br>
  32560. <code>Switch_8080_01_2Key</code><br>
  32561. <code>Blind_8080_02</code><br>
  32562. <code>Timer_8080_04</code><br>
  32563. <code>Dimm_8011_00</code><br>
  32564. <code>Dimm_8011_00_3Key</code><br>
  32565. </ul>
  32566. </ul>
  32567. <br>
  32568. <b>Examples</b>
  32569. <ul>
  32570. <br>FHEM Config for Dimmer via 1 Key remote control:
  32571. <ul>
  32572. <code>define Dimmer KOPP_FC 65 FA5E 02</code><br>
  32573. <code>attr Dimmer IODev CUL_0</code><br>
  32574. <code>attr Dimmer devStateIcon OnOff:toggle:dimm dimm:dim50%:stop stop:on:dimm off:toggle:dimm</code><br>
  32575. <code>attr Dimmer eventMap on:OnOff dimm:dimm stop:stop</code><br>
  32576. <code>attr Dimmer group TestGroup</code><br>
  32577. <code>attr Dimmer model Dimm_8011_00</code><br>
  32578. <code>attr Dimmer room TestRoom</code><br>
  32579. <code>attr Dimmer webCmd OnOff:dimm:stop</code><br>
  32580. </ul>
  32581. <br>FHEM Config for Dimmer via 3 Key remote control:
  32582. <ul>
  32583. <code>define SDimmer KOPP_FC 65 FA5E 02 55 75</code><br>
  32584. <code>attr SDimmer IODev CUL_0</code><br>
  32585. <code>attr SDimmer devStateIcon dimm:dim50%:stop stop:on:off on:on:off off:off:on</code><br>
  32586. <code>attr SDimmer group TestGroup</code><br>
  32587. <code>attr SDimmer icon light_pendant_light</code><br>
  32588. <code>attr SDimmer model Dimm_8011_00_3Key</code><br>
  32589. <code>attr SDimmer room TestRoom</code><br>
  32590. <code>attr SDimmer webCmd on:dimm:stop:off</code><br>
  32591. </ul>
  32592. </ul>
  32593. <br><br>
  32594. <b>Additional Information you can find in corresponding FHEM Wiki</b>
  32595. <ul><li><a href="http://www.fhemwiki.de/w/index.php?title=Kopp_Allgemein&redirect=no">Kopp Allgemein</a></li></ul>
  32596. <br><br>
  32597. </ul>
  32598. <a name="KOSTALPIKO"></a>
  32599. <h3>KOSTALPIKO</h3>
  32600. <div>
  32601. <a name="KOSTALPIKOdefine" id="KOSTALPIKOdefine"></a> <b>Define</b>
  32602. <div>
  32603. <br />
  32604. <code>define &lt;name&gt; KOSTALPIKO &lt;ip-address&gt; &lt;user&gt; &lt;password&gt;</code><br />
  32605. <br />
  32606. The module reads the current values from web page of a Kostal Piko inverter.<br />
  32607. It can also be used, to capture the values of global radiation, UV-index and sunshine duration<br />
  32608. from a special web-site (proplanta) regardless of the existence of the inverter.<br />
  32609. <br />
  32610. <b>Parameters:</b><br />
  32611. <ul>
  32612. <li><b>&lt;ip-address&gt;</b> - the ip address of the inverter</li>
  32613. <li><b>&lt;user&gt;</b> - the login-user for the inverter's web page</li>
  32614. <li><b>&lt;password&gt;</b> - the login-password for the inverter's web page</li>
  32615. </ul><br />
  32616. <br />
  32617. <b>Example:</b><br />
  32618. <div>
  32619. <code>define Kostal KOSTALPIKO 192.168.2.4 pvserver pvwr</code><br />
  32620. </div>
  32621. </div><br />
  32622. <a name="KOSTALPIKOset" id="KOSTALPIKOset"></a> <b>Set-Commands</b>
  32623. <div>
  32624. <br />
  32625. <code>set &lt;name&gt; captureGlobalRadiation</code><br />
  32626. <div>
  32627. The values for global radiation, UV-index and sunshine duration are immediately polled.
  32628. </div><br />
  32629. <br />
  32630. <code>set &lt;name&gt; captureKostalData</code><br />
  32631. <div>
  32632. All values of the inverter are immediately polled.
  32633. </div><br />
  32634. </div><a name="KOSTALPIKOattr" id="KOSTALPIKOattr"></a> <b>Attributes</b><br />
  32635. <br />
  32636. <ul>
  32637. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  32638. <li><b>BAEnable</b> - if 1, data from ../BA.fhtml site is captured</li>
  32639. <li><b>GR.Interval</b> - poll interval for global radiation in seconds</li>
  32640. <li><b>GR.Link</b> - regionalised link the to the proplanta web page (global radiation, UV-index and sunshine
  32641. duration)<br />
  32642. (see Wiki for further information)</li>
  32643. <li><b>delay</b> - poll interval for the values of the inverter in seconds</li>
  32644. <li>
  32645. <b>delayCounter</b> - delay counter for poll of invert's values beside AC.Power;<br />
  32646. needed for fast acquisition scenarios to limit the log-output.
  32647. </li>
  32648. <li><b>disable</b> - if disable=1, the poll of inverter's values is disabled,<br /> ut not the the poll of proplanta-values</li>
  32649. </ul><br />
  32650. <br />
  32651. <a name="KOSTALPIKOreading" id="KOSTALPIKOreading"></a> <b>Generated Readings/Events</b><br />
  32652. <br />
  32653. <ul>
  32654. <li><b>AC.Power</b> - the current power, captured only if the internal delayCounter = 0</li>
  32655. <li><b>AC.Power.Fast</b> - the current power, on each poll cycle; used for fast acquisition scenarios</li>
  32656. <li><b>Daily.Energie</b> - the current procduced energie of the day</li>
  32657. <li><b>Daily.Energie.Last</b> - the value of daily energy at 23:00 clock</li>
  32658. <li><b>Global.Radiation</b> - the value of global radiation (proplanta);useful for determing the expected energy amount of the day</li>
  32659. <li><b>ModeNum</b> - the current processing state of the inverter (1=off 2=idle 3=active)</li>
  32660. <li><b>Mode</b> - the german term for the current ModeNum</li>
  32661. <li><b>Total.Energy</b> - the total produced energie</li>
  32662. <li><b>generator.1.current</b> - the electrical current at string 1</li>
  32663. <li><b>generator.2.current</b> - the electrical current at string 2</li>
  32664. <li><b>generator.3.current</b> - the electrical current at string 3</li>
  32665. <li><b>generator.1.voltage</b> - the voltage at string 1</li>
  32666. <li><b>generator.2.voltage</b> - the voltage at string 2</li>
  32667. <li><b>generator.3.voltage</b> - the voltage at string 3</li>
  32668. <li><b>output.1.voltage</b> - the voltage at output 1</li>
  32669. <li><b>output.2.voltage</b> - the voltage at output 2</li>
  32670. <li><b>output.3.voltage</b> - the voltage at output 3</li>
  32671. <li><b>output.1.power</b> - the power at output 1</li>
  32672. <li><b>output.2.power</b> - the power at output 2</li>
  32673. <li><b>output.3.power</b> - the power at output 3</li>
  32674. <li><b>sensor.1</b> - the voltage at analog input 1</li>
  32675. <li><b>sensor.2</b> - the voltage at analog input 2</li>
  32676. <li><b>sensor.3</b> - the voltage at analog input 3</li>
  32677. <li><b>sensor.4</b> - the voltage at analog input 4</li>
  32678. <li><b>UV.Index</b> - the UV Index (proplanta)</li>
  32679. <li><b>sunshine.duration</b> - the sunshine duration (proplanta)</li>
  32680. </ul><br />
  32681. <b>Additional Readings/Events, if BAEnable=1</b><br />
  32682. <br />
  32683. <ul>
  32684. <li><b>Battery.CycleCount</b> - count of charge cycles</li>
  32685. <li><b>Battery.StateOfCharge</b> - State of charge for the battery in percent</li>
  32686. <li><b>Battery.Voltage</b> - the voltage of the battery</li>
  32687. <li><b>Battery.ChargeCurrent</b> - the charge current of the battery</li>
  32688. <li><b>Battery.Temperature</b> - the temperature of the battery</li>
  32689. <li><b>Power.Solar</b> - the sum of the power produced by the solarinverter</li>
  32690. <li><b>Power.Battery</b> - the power drawn from the battery</li>
  32691. <li><b>Power.Net</b> - the power drawn from the main</li>
  32692. <li><b>Power.Phase1</b> - the power used on phase L1</li>
  32693. <li><b>Power.Phase2</b> - the power used on phase L2</li>
  32694. <li><b>Power.Phase3</b> - the power used on phase L3</li>
  32695. </ul><br />
  32696. <br />
  32697. <b>Additional information</b><br />
  32698. <br />
  32699. <ul>
  32700. <li><a href="http://forum.fhem.de/index.php/topic,24409.msg175253.html#msg175253">Discussion in FHEM forum</a></li>
  32701. <li><a href="http://www.fhemwiki.de/wiki/KostalPiko#FHEM-Modul">Information in FHEM Wiki</a></li>
  32702. </ul>
  32703. </div>
  32704. <a name="KS300"></a>
  32705. <h3>KS300</h3>
  32706. <ul>
  32707. Fhem can receive the KS300 or KS555 radio messages through the <a
  32708. href="#FHZ">FHZ</a>, <a href="WS300">WS300</a> or <a href="#CUL">CUL</a>, so
  32709. one of them must be defined first.<br> This module services messages received
  32710. by the FHZ or CUL.<br> <br>
  32711. <a name="KS300define"></a>
  32712. <b>Define</b>
  32713. <ul>
  32714. <code>define &lt;name&gt; KS300 &lt;housecode&gt; [ml/raincounter [wind-factor]]</code>
  32715. <br><br>
  32716. <code>&lt;housecode&gt;</code> is a four digit hex number, it must be
  32717. specified foir historic reasons, and it is ignored.
  32718. The ml/raincounter defaults to 255 ml, and it must be specified if you wish
  32719. to set the wind factor, which defaults to 1.0. <br>
  32720. Examples:
  32721. <ul>
  32722. <code>define ks1 KS300 1234</code><br>
  32723. </ul>
  32724. </ul>
  32725. <br>
  32726. <a name="KS300set"></a>
  32727. <b>Set </b>
  32728. <ul>
  32729. N/A
  32730. </ul>
  32731. <br>
  32732. <a name="KS300get"></a>
  32733. <b>Get</b>
  32734. <ul>
  32735. N/A
  32736. </ul>
  32737. <br>
  32738. <a name="KS300attr"></a>
  32739. <b>Attributes</b>
  32740. <ul>
  32741. <li><a href="#ignore">ignore</a></li>
  32742. <li><a href="#IODev">IODev</a></li>
  32743. <li><a href="#eventMap">eventMap</a></li><br>
  32744. <li><a href="#do_not_notify">do_not_notify</a></li>
  32745. <li><a href="#showtime">showtime</a></li>
  32746. <li><a href="#model">model</a> (ks300)</li>
  32747. <li>rainadjustment<br>
  32748. If this attribute is set, fhem automatically considers rain counter
  32749. resets after a battery change and random counter switches as
  32750. experienced by some users. Default is 0 (off).</li>
  32751. </ul>
  32752. <br>
  32753. </ul>
  32754. <a name="KeyValueProtocol"></a>
  32755. <h3>KeyValueProtocol</h3>
  32756. <ul>
  32757. A generic module to receive key-value-pairs from an IODevice like JeeLink.<br>
  32758. The data source can send any key/value pairs, which will get converted into readings.<br>
  32759. The protocol that the sketch must send is: OK VALUES Key1=Value1,Key2=Value2, ...<br>
  32760. <br>
  32761. <a name="KeyValueProtocol_Define"></a>
  32762. <b>Define</b>
  32763. <ul>
  32764. <code>define &lt;name&gt; KeyValueProtocol &lt;Type&gt &lt;ID&gt;</code> <br>
  32765. <br>
  32766. </ul>
  32767. <a name="KeyValueProtocol_Set"></a>
  32768. <b>Set</b>
  32769. <ul>
  32770. </ul>
  32771. <br>
  32772. <a name="KeyValueProtocol_Get"></a>
  32773. <b>Get</b>
  32774. <ul>
  32775. </ul>
  32776. <br>
  32777. <a name="KeyValueProtocol_Attr"></a>
  32778. <b>Attributes</b>
  32779. <ul>
  32780. <li>Mapping<br>
  32781. The Mapping attribute can optionally be used to translate the Keys.<br>
  32782. The format is: ReceivedKey1=NewKey1,ReceivedKey2=NewKey2, ...<br>
  32783. The Sketch can then send short Keys, which will get translated to long names.<br>
  32784. Example: attr myKVP Mapping T=Temperature,H=Humidity<br>
  32785. If the sketch then sends: OK VALUES T=12,H=70<br>
  32786. you will get the readings Temperature and Humidity with the Values 12 and 70<br>
  32787. </li>
  32788. </ul>
  32789. <br>
  32790. <a name="KeyValueProtocol_Readings"></a>
  32791. <b>Readings</b><br>
  32792. <ul>
  32793. Depending on the received data
  32794. </ul>
  32795. <br>
  32796. </ul>
  32797. <a name="LGTV"></a>
  32798. <h3>LGTV</h3>
  32799. <ul>
  32800. <a name="LGTVdefine"></a>
  32801. <b>Define</b>
  32802. <ul>
  32803. <code>define &lt;name&gt; LGTV</code>
  32804. <br><br>
  32805. This module is expected to work with <a href="#xxLG7000">xxLG7000</a> as it's
  32806. IODev. With LGTV and a compatible hardware module (currently, there's only
  32807. xxLG7000), you are able to power your TV set on and off, query it's power state,
  32808. select the input (AV, RGB, Composites, analogue TV, DVB-T, HDMI) or mute/unmute
  32809. the volume.<br>
  32810. Defining a LGTV device will schedule an internal task, which periodically reads
  32811. the status of the TV set (power state; if power is on, query the selected input)
  32812. and triggers notify/filelog commands.<br><br>
  32813. Example:
  32814. <ul>
  32815. <code>define 47LG7000 LGTV</code><br>
  32816. <code>attr 47LG7000 IODev <a href="#xxLG7000">myLG7k</a></code>
  32817. </ul>
  32818. <br>
  32819. </ul>
  32820. <a name="LGTVset"></a>
  32821. <b>Set </b>
  32822. <ul>
  32823. <code>set &lt;name&gt; &lt;what&gt; &lt;value&gt;</code>
  32824. <br><br>
  32825. Currently, the following commands are defined; not all may be available on a
  32826. given TV set. An error messages should be recorded if e. g. the input in question
  32827. is not usable.
  32828. <pre>power on
  32829. power off
  32830. input AV1
  32831. input AV2
  32832. input AV3
  32833. input AV3
  32834. input Component
  32835. input RGB
  32836. input HDMI1
  32837. input HDMI2
  32838. input HDMI3
  32839. input HDMI4
  32840. input DVBT
  32841. input PAL
  32842. audio mute
  32843. audio normal</pre>
  32844. </ul>
  32845. <a name="LGTVget"></a>
  32846. <b>Get</b>
  32847. <ul>
  32848. <code>get &lt;name&gt; &lt;what&gt;</code>
  32849. <br><br>
  32850. Currently, the following commands are defined; not all may be available on a
  32851. given TV set. An error messages should be recorded if e. g. the input in question
  32852. is not usable.
  32853. <pre>power
  32854. input
  32855. audio</pre>
  32856. </ul>
  32857. <a name="LGTVattr"></a>
  32858. <b>Attributes</b>
  32859. <ul>
  32860. <li><a href="#attrdummy">dummy</a></li><br>
  32861. <li><a href="#loglevel">loglevel</a></li>
  32862. <!-- <li><a href="#model">model</a> (M232Counter)</li> -->
  32863. </ul>
  32864. <br>
  32865. <b>Implementator's note</b>
  32866. <ul>
  32867. The commands listed above are send 1:1 to the underlying IODev (e. g. xxLG7000); that IODev
  32868. is responsible for translation into <i>whatever means</i> to invoke the function on the TV.
  32869. It is my hope that other's will adopt this idea and write compatible low level drivers for other
  32870. TV sets, to make this module (even ;)) more useful.
  32871. </ul>
  32872. <br>
  32873. </ul>
  32874. <a name="LGTV_IP12"></a>
  32875. <h3>LGTV_IP12</h3>
  32876. <ul>
  32877. This module controls LG SmartTV's which were released between 2012 - 2014 via network connection. You are able
  32878. to switch query it's power state, control the TV channels, open and close apps and send all remote control commands.
  32879. <br><br>
  32880. For a list of supported models see the compatibility list for <a href="https://itunes.apple.com/de/app/lg-tv-remote/id509979485?mt=8" target="_new">LG TV Remote</a> smartphone app.
  32881. <br><br>
  32882. <a name="LGTV_IP12_define"></a>
  32883. <b>Define</b>
  32884. <ul>
  32885. <code>
  32886. define &lt;name&gt; LGTV_IP12 &lt;ip-address&gt; [&lt;status_interval&gt;]
  32887. <br><br>
  32888. define &lt;name&gt; LGTV_IP12 &lt;ip-address&gt; [&lt;off_status_interval&gt;] [&lt;on_status_interval&gt;]
  32889. </code>
  32890. <br><br>
  32891. Defining a LGTV_IP12 device will schedule an internal task (interval can be set
  32892. with optional parameter &lt;status_interval&gt; in seconds, if not set, the value is 30
  32893. seconds), which periodically reads the status of the TV (power state, current channel, input, ...)
  32894. and triggers notify/FileLog commands.
  32895. <br><br>
  32896. Different status update intervals depending on the power state can be given also.
  32897. If two intervals are given to the define statement, the first interval statement represents the status update
  32898. interval in seconds in case the device is off. The second
  32899. interval statement is used when the device is on.
  32900. Example:<br><br>
  32901. <ul><code>
  32902. define TV LGTV_IP12 192.168.0.10
  32903. <br><br>
  32904. # With custom status interval of 60 seconds<br>
  32905. define TV LGTV_IP12 192.168.0.10 60
  32906. <br><br>
  32907. # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
  32908. define TV LGTV_IP12 192.168.0.10 60 10
  32909. </code></ul>
  32910. </ul>
  32911. <br><br>
  32912. <a name="LGTV_IP12_set"></a>
  32913. <b>Set </b>
  32914. <ul>
  32915. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code>
  32916. <br><br>
  32917. Currently, the following commands are defined.
  32918. <br><br>
  32919. <ul>
  32920. <li><b>channel</b> &nbsp;&nbsp;-&nbsp;&nbsp; set the current channel</li>
  32921. <li><b>channelUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches to next channel</li>
  32922. <li><b>channelDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches to previous channel</li>
  32923. <li><b>removePairing</b> &nbsp;&nbsp;-&nbsp;&nbsp; deletes the pairing with the device</li>
  32924. <li><b>showPairCode</b> &nbsp;&nbsp;-&nbsp;&nbsp; requests the TV to display the pair code on the TV screen. This pair code must be set in the attribute <a href="#LGTV_IP12_pairingcode">pairingcode</a></li>
  32925. <li><b>startApp</b> &nbsp;&nbsp;-&nbsp;&nbsp; start a installed app on the TV</li>
  32926. <li><b>stopApp</b> &nbsp;&nbsp;-&nbsp;&nbsp; stops a running app on the TV</li>
  32927. <li><b>statusRequest</b> &nbsp;&nbsp;-&nbsp;&nbsp; requests the current status of the device</li>
  32928. <li><b>remoteControl</b> up,down,... &nbsp;&nbsp;-&nbsp;&nbsp; sends remote control commands</li>
  32929. </ul>
  32930. </ul>
  32931. <br><br>
  32932. <a name="LGTV_IP12get"></a>
  32933. <b>Get</b>
  32934. <ul>
  32935. <code>get &lt;name&gt; &lt;reading&gt;</code>
  32936. <br><br>
  32937. Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
  32938. <br><br>
  32939. </ul>
  32940. <br><br>
  32941. <a name="LGTV_IP12_attr"></a>
  32942. <b>Attributes</b>
  32943. <ul>
  32944. <li><a href="#do_not_notify">do_not_notify</a></li>
  32945. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  32946. <li><a name="LGTV_IP12_disable">disable</a></li>
  32947. Optional attribute to disable the internal cyclic status update of the TV. Manual status updates via statusRequest command is still possible.
  32948. <br><br>
  32949. Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.<br><br>
  32950. <li><a name="LGTV_IP12_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...</li>
  32951. Optional attribute to disable the internal cyclic status update of the TV during a specific time interval. The attribute contains a space separated list of HH:MM tupels.
  32952. If the current time is between any of these time specifications, the cyclic update will be disabled.
  32953. Instead of HH:MM you can also specify HH or HH:MM:SS.
  32954. <br><br>To specify an interval spawning midnight, you have to specify two intervals, e.g.:
  32955. <pre>23:00-24:00 00:00-01:00</pre>
  32956. Default Value is <i>empty</i> (no intervals defined, cyclic update is always active)<br><br>
  32957. <li><a name="LGTV_IP12_request-timeout">request-timeout</a></li>
  32958. Optional attribute change the response timeout in seconds for all queries to the TV.
  32959. <br><br>
  32960. Possible values: 1-5 seconds. Default value is 4 seconds.<br><br>
  32961. <li><a name="LGTV_IP12_pairingcode">pairingcode</a></li>
  32962. This attribute contains the pairing code to authenticate FHEM as trusted controller. The pairing code can be displayed via <a href="#LGTV_IP12_set">set command</a> <code>showPairCode</code>
  32963. </ul>
  32964. <br><br>
  32965. <b>Generated Readings/Events:</b><br>
  32966. <ul>
  32967. <li><b>3D</b> - The status of 3D playback (can be "true" or "false")</li>
  32968. <li><b>channel</b> - The number of the current channel</li>
  32969. <li><b>channelName</b> - The name of the current channel</li>
  32970. <li><b>currentProgram</b> - The name of the running program of the current channel</li>
  32971. <li><b>input</b> - The current input source (e.g. Antenna, Sattelite, HDMI1, ...)</li>
  32972. <li><b>inputLabel</b> - The user defined name of the current input source</li>
  32973. <li><b>mute</b> - Reports the current mute state (can be "on" or "off")</li>
  32974. <li><b>power</b> - The power status (can be "on" or "off")</li>
  32975. <li><b>volume</b> - Reports the volume state.</li>
  32976. </ul>
  32977. </ul>
  32978. <a name="LGTV_WebOS"></a>
  32979. <h3>LGTV_WebOS</h3>
  32980. <ul>
  32981. This module controls SmartTVs from LG based on WebOS as operation system via network. It offers to swtich the TV channel, start and switch applications, send remote control commands, as well as to query the actual status.<p><br /><br />
  32982. <strong>Definition </strong><code>define &lt;name&gt; LGTV_WebOS &lt;IP-Address&gt;</code>
  32983. </p>
  32984. <ul>
  32985. <ul>
  32986. When an LGTV_WebOS-Module is defined, an internal routine is triggered which queries the TV's status every 15s and triggers respective Notify / FileLog Event definitions.
  32987. </ul>
  32988. </ul>
  32989. </p>
  32990. <ul>
  32991. <ul>
  32992. Example:
  32993. </ul>
  32994. <ul>
  32995. <code>define TV LGTV_WebOS 192.168.0.10 <br /></code><br /><br /></p>
  32996. </ul>
  32997. </ul>
  32998. <p><code><strong>Set-Commands </strong><code>set &lt;Name&gt; &lt;Command&gt; [&lt;Parameter&gt;]</code></code></p>
  32999. <ul>
  33000. <ul>
  33001. The following commands are supported in the actual version:
  33002. </ul>
  33003. </ul>
  33004. <ul>
  33005. <ul>
  33006. <ul>
  33007. <li><strong>connect&nbsp;</strong> -&nbsp; Connects to the TV at the defined address. When triggered the first time, a pairing is conducted</li>
  33008. <li><strong>pairing&nbsp;</strong> -&nbsp;&nbsp; Sends a pairing request to the TV which needs to be confirmed by the user with remote control</li>
  33009. <li><strong>screenMsg</strong> &lt;Text&gt;&nbsp;&nbsp;-&nbsp;&nbsp; Displays a message for 3-5s on the TV in the top right corner of the screen</li>
  33010. <li><strong>mute</strong> on, off&nbsp; -&nbsp; Turns volume to mute. Depending on the audio connection, this needs to be set on the AV Receiver (see volume) </li>
  33011. <li><strong>volume </strong>0-100, Slider -&nbsp;&nbsp; Sets the volume. Depending on the audio connection, this needs to be set on the AV Receiver (see mute)</li>
  33012. <li><strong>volumeUp</strong>&nbsp; -&nbsp;&nbsp; Increases the volume by 1</li>
  33013. <li><strong>volumeDown</strong>&nbsp; -&nbsp;&nbsp; Decreases the volume by 1</li>
  33014. <li><strong>channelUp</strong> &nbsp;&nbsp;-&nbsp;&nbsp; Switches the channel to the next one</li>
  33015. <li><strong>channelDown</strong> &nbsp;&nbsp;-&nbsp;&nbsp; Switches the channel to the previous one</li>
  33016. <li><strong>getServiceList&nbsp;</strong> -&nbsp; Queries the running services on WebOS (in beta phase)</li>
  33017. <li><strong>on</strong> - Turns the TV on, depending on type of device. Only working when LAN or Wifi connection remains active during off state.</li>
  33018. <li><strong>off</strong> - Turns the TV off, when an active connection is established</li>
  33019. <li><strong>launchApp</strong> &lt;Application&gt;&nbsp;&nbsp;-&nbsp;&nbsp; Activates an application out of the following list (Maxdome, AmazonVideo, YouTube, Netflix, TV, GooglePlay, Browser, Chili, TVCast, Smartshare, Scheduler, Miracast, TV)&nbsp; <br />Note: TV is an application in LG's terms and not an input connection</li>
  33020. <li><strong>3D</strong> on,off&nbsp; -&nbsp; 3D Mode is turned on and off. Depending on type of TV there might be different modes (e.g. Side-by-Side, Top-Bottom)</li>
  33021. <li><strong>stop</strong>&nbsp; -&nbsp;&nbsp; Stop command (depending on application)</li>
  33022. <li><strong>play&nbsp; </strong>-&nbsp;&nbsp; Play command (depending on application)</li>
  33023. <li><strong>pause&nbsp; </strong>-&nbsp;&nbsp; Pause command (depending on application)</li>
  33024. <li><strong>rewind&nbsp; </strong>-&nbsp;&nbsp; Rewind command (depending on application)</li>
  33025. <li><strong>fastForward&nbsp; </strong>-&nbsp;&nbsp; Fast Forward command (depending on application)</li>
  33026. <li><strong>clearInputList&nbsp;</strong> -&nbsp;&nbsp; Clears list of Inputs</li>
  33027. <li><strong>input&nbsp;</strong> - Selects the input connection (depending on the actual TV type and connected devices) <br />e.g.: extInput_AV-1, extInput_HDMI-1, extInput_HDMI-2, extInput_HDMI-3)</li>
  33028. </ul>
  33029. </ul>
  33030. </ul><br /><br /></p>
  33031. <p><strong>Get-Command</strong> <code>get &lt;Name&gt; &lt;Readingname&gt;</code><br /></p>
  33032. <ul>
  33033. <ul>
  33034. Currently, GET reads back the values of the current readings. Please see below for a list of Readings / Generated Events.
  33035. </ul>
  33036. </ul>
  33037. <p><br /><strong>Attributes</strong></p>
  33038. <ul>
  33039. <ul>
  33040. <li>disable</li>
  33041. Optional attribute to deactivate the recurring status updates. Manual trigger of update is alsways possible.</br>
  33042. Valid Values: 0 =&gt; recurring status updates, 1 =&gt; no recurring status updates.</p>
  33043. </ul>
  33044. </ul>
  33045. <ul>
  33046. <ul>
  33047. <li>channelGuide</li>
  33048. Optional attribute to deactivate the recurring TV Guide update. Depending on TV and FHEM host, this causes significant network traffic and / or CPU load</br>
  33049. Valid Values: 0 =&gt; no recurring TV Guide updates, 1 =&gt; recurring TV Guide updates.
  33050. </ul>
  33051. </ul>
  33052. <ul>
  33053. <ul>
  33054. <li>pingPresence</li>
  33055. current state of ping presence from TV. create a reading presence with values absent or present.
  33056. </ul>
  33057. </ul>
  33058. <ul>
  33059. <ul>
  33060. <li>wakeOnLanMAC</li>
  33061. Network MAC Address of the LG TV Networkdevice.
  33062. </ul>
  33063. </ul>
  33064. <ul>
  33065. <ul>
  33066. <li>wakeOnLanBroadcast</li>
  33067. Broadcast Address of the Network - wakeOnLanBroadcast &lt;network&gt;.255
  33068. </ul>
  33069. </ul>
  33070. </ul>
  33071. <a name="LIGHTIFY"></a>
  33072. <h3>LIGHTIFY</h3>
  33073. <ul>
  33074. Module to integrate a OSRAM LIGHTIFY gateway into FHEM;.<br><br>
  33075. The actual LIGHTIFY lights are defined as <a href="#HUEDevice">HUEDevice</a> devices.
  33076. <br><br>
  33077. All newly found devices and groups are autocreated at startup and added to the room LIGHTIFY.
  33078. <br><br>
  33079. Notes:
  33080. <ul>
  33081. <li>Autocreate only works for the first gateway. Devices on other gateways have to be manualy defined.</li>
  33082. </ul>
  33083. <br><br>
  33084. <a name="LIGTHIFY_Define"></a>
  33085. <b>Define</b>
  33086. <ul>
  33087. <code>define &lt;name&gt; LIGHTIFY &lt;host&gt;</code><br>
  33088. <br>
  33089. Defines a LIGHTIFY gateway device with address &lt;host&gt;.<br><br>
  33090. Examples:
  33091. <ul>
  33092. <code>define gateway LIGHTIFY 10.0.1.100</code><br>
  33093. </ul>
  33094. </ul><br>
  33095. <a name="LIGHTIFY_Get"></a>
  33096. <b>Get</b>
  33097. <ul>
  33098. </ul><br>
  33099. <a name="LIGHTIFY_Set"></a>
  33100. <b>Set</b>
  33101. <ul>
  33102. <li>on</li>
  33103. <li>off</li>
  33104. <li>goToScene &lt;sceneId&gt;</li>
  33105. <li>setSoftOn &lt;addr&gt; &lt;transitiontime&gt;</li>
  33106. <li>setSoftOff &lt;addr&gt; &lt;transitiontime&gt;</li>
  33107. <li>reconnect<br>
  33108. Closes and reopens the connection to the gateway.</li>
  33109. <li>statusRequest<br>
  33110. Update light status.</li>
  33111. </ul><br>
  33112. <a name="LIGHTIFY_Attr"></a>
  33113. <b>Attributes</b>
  33114. <ul>
  33115. <li><a href="#disable">disable</a></li>
  33116. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  33117. </ul><br>
  33118. </ul><br>
  33119. <a name="LINDY_HDMI_SWITCH"></a>
  33120. <h3>LINDY_HDMI_SWITCH</h3>
  33121. <ul>
  33122. Note: this module needs the Net::Telnet module.
  33123. <br><br>
  33124. <a name="LINDY_HDMI_SWITCHdefine"></a>
  33125. <b>Define</b>
  33126. <ul>
  33127. <code>define &lt;name&gt; LINDY_HDMI_SWITCH &lt;ip-address&gt; &lt;port&gt;</code>
  33128. <br><br>
  33129. Defines an Lindy 4:2 HDMI Switch serial connected to a transparent ethernet to serial adapter via the ip address of the adapter. Lindy partnumber: 38054 <br><br>
  33130. Examples:
  33131. <ul>
  33132. <code>define livingroom.hdmi LINDY_HDMI_SWITCH 192.168.1.64 4999</code><br>
  33133. </ul>
  33134. </ul>
  33135. <br>
  33136. <a name="LINDY_HDMI_SWITCHset"></a>
  33137. <b>Set </b>
  33138. <ul>
  33139. <code>set &lt;name&gt; &lt;value&gt;</code>
  33140. <br><br>
  33141. where <code>value</code> is one of:<br>
  33142. <pre>
  33143. 11
  33144. 12
  33145. 13
  33146. 14
  33147. 21
  33148. 22
  33149. 23
  33150. 24
  33151. </pre>
  33152. First digit is the output port, second digit is the input port.
  33153. Example:
  33154. <ul>
  33155. <code>set livingroom.hdmi 12</code><br>
  33156. </ul>
  33157. <br>
  33158. </ul>
  33159. </ul>
  33160. <a name="LIRC"></a>
  33161. <h3>LIRC</h3>
  33162. <ul>
  33163. Generate FHEM-events when an LIRC device receives infrared signals.
  33164. <br><br>
  33165. Note: this module needs the Lirc::Client perl module.
  33166. <br><br>
  33167. <a name="LIRCdefine"></a>
  33168. <b>Define</b>
  33169. <ul>
  33170. define &lt;name&gt; LIRC &lt;lircrc_file&gt;<br>
  33171. Example:<br>
  33172. <ul>
  33173. define Lirc LIRC /etc/lirc/lircrc
  33174. </ul>
  33175. Note: In the lirc configuration file you have to define each possible event.
  33176. If you have this configuration
  33177. <pre>
  33178. begin
  33179. prog = fhem
  33180. button = pwr
  33181. config = IrPower
  33182. end</pre>
  33183. and you press the pwr button the IrPower toggle event occures at fhem.
  33184. <pre>
  33185. define IrPower01 notify Lirc:IrPower set lamp toggle</pre>
  33186. turns the lamp on and off.
  33187. If you want a faster reaction to keypresses you have to change the
  33188. defaultvalue of readytimeout from 5 seconds to e.g. 1 second in fhem.pl
  33189. </ul>
  33190. <br>
  33191. <a name="LIRCset"></a>
  33192. <b>Set</b> <ul>N/A</ul><br>
  33193. <a name="LIRCget"></a>
  33194. <b>Get</b> <ul>N/A</ul><br>
  33195. <a name="LIRCattr"></a>
  33196. <b>Attributes</b>
  33197. <ul>
  33198. </ul><br>
  33199. </ul>
  33200. <a name="LUXTRONIK2"></a>
  33201. <h3>LUXTRONIK2</h3>
  33202. <div>
  33203. <ul>
  33204. Luxtronik 2.0 is a heating controller used in <a href="http://www.alpha-innotec.de">Alpha Innotec</a>, Siemens Novelan (WPR NET) and Wolf Heiztechnik (BWL/BWS) heat pumps.
  33205. <br>
  33206. It has a built-in ethernet port, so it can be directly integrated into a local area network (LAN).
  33207. <br>
  33208. <i>The modul is reported to work with firmware: V1.51, V1.54C, V1.60, V1.64, V1.69, V1.70, V1.73, V1.77.</i>
  33209. <br>
  33210. More Info on the particular <a href="http://www.fhemwiki.de/wiki/Luxtronik_2.0">page of FHEM-Wiki</a> (in German).
  33211. <br>
  33212. &nbsp;
  33213. <br>
  33214. <a name="LUXTRONIK2define"></a>
  33215. <b>Define</b>
  33216. <ul>
  33217. <code>define &lt;name&gt; LUXTRONIK2 &lt;IP-address[:Port]&gt; [poll-interval]</code><br>
  33218. If the pool interval is omitted, it is set to 300 (seconds). Smallest possible value is 10.
  33219. <br>
  33220. Usually, the port needs not to be defined.
  33221. <br>
  33222. Example: <code>define Heizung LUXTRONIK2 192.168.0.12 600</code>
  33223. </ul>
  33224. <br>
  33225. <a name="LUXTRONIK2set"></a>
  33226. <b>Set</b>
  33227. <ul>A firmware check assures before each set operation that a heat pump with untested firmware is not damaged accidently.
  33228. <li><code>activeTariff &lt; 0 - 9 &gt;</code>
  33229. <br>
  33230. Allows the separate measurement of the consumption (doStatistics = 1) within different tariffs.<br>
  33231. This value must be set at the correct point of time in accordance to the existing or planned tariff <b>by the FHEM command "at"</b>.<br>
  33232. 0 = without separate tariffs
  33233. </li><br>
  33234. <li><code>INTERVAL &lt;polling interval&gt;</code><br>
  33235. Polling interval in seconds
  33236. </li><br>
  33237. <li><code>hotWaterTemperatureTarget &lt;temperature&gt;</code><br>
  33238. Target temperature of domestic hot water boiler in &deg;C
  33239. </li><br>
  33240. <li><code>hotWaterCircPumpDeaerate &lt;on | off&gt;</code><br>
  33241. Switches the external circulation pump for the hot water on or off. The circulation prevents a cool down of the hot water in the pipes but increases the heat consumption drastically.
  33242. <br>
  33243. NOTE! It uses the deaerate function of the controller. So, the pump alternates always 5 minutes on and 5 minutes off.
  33244. </li><br>
  33245. <li><code>opModeHotWater &lt;Mode&gt;</code><br>
  33246. Operating Mode of domestic hot water boiler (Auto | Party | Off)
  33247. </li><br>
  33248. <li><code>resetStatistics &lt;statReadings&gt;</code>
  33249. <br>
  33250. Deletes the selected statistic values <i>all, statBoilerGradientCoolDownMin, statAmbientTemp..., statElectricity..., statHours..., statHeatQ...</i>
  33251. </li><br>
  33252. <li><code>returnTemperatureHyst &lt;Temperature&gt;</code>
  33253. <br>
  33254. Hysteresis of the returnTemperatureTarget of the heating controller . 0.5 K till 3 K. Adjustable in 0.1 steps.
  33255. </li><br>
  33256. <li><code>returnTemperatureSetBack &lt;Temperature&gt;</code>
  33257. <br>
  33258. Decreasing or increasing of the returnTemperatureTarget by -5 K till + 5 K. Adjustable in 0.1 steps.
  33259. </li><br>
  33260. <li><code>statusRequest</code><br>
  33261. Update device information
  33262. </li><br>
  33263. <li><code>synchClockHeatPump</code><br>
  33264. Synchronizes controller clock with FHEM time. <b>!! This change is lost in case of controller power off!!</b></li>
  33265. </ul>
  33266. <br>
  33267. <a name="LUXTRONIK2get"></a>
  33268. <b>Get</b>
  33269. <ul>
  33270. No get implemented yet ...
  33271. </ul>
  33272. <br>
  33273. <a name="LUXTRONIK2attr"></a>
  33274. <b>Attributes</b>
  33275. <ul>
  33276. <li><code>allowSetParameter &lt; 0 | 1 &gt;</code>
  33277. <br>
  33278. The <a href="#LUXTRONIK2set">parameters</a> of the heat pump controller can only be changed if this attribut is set to 1.
  33279. </li><br>
  33280. <li><code>autoSynchClock &lt;delay&gt;</code>
  33281. <br>
  33282. Corrects the clock of the heatpump automatically if a certain <i>delay</i> (10 s - 600 s) against the FHEM time is exeeded. Does a firmware check before.
  33283. <br>
  33284. <i>(A 'delayDeviceTimeCalc' &lt;= 2 s can be caused by the internal calculation interval of the heat pump controller.)</i>
  33285. </li><br>
  33286. <li><code>compressor2ElectricalPowerWatt</code><br>
  33287. Electrical power of the 2nd compressor to calculated the COP and estimate electrical consumption (calculations not implemented yet)
  33288. </li><br>
  33289. <li><code>doStatistics &lt; 0 | 1 &gt;</code>
  33290. <br>
  33291. Calculates statistic values: <i>statBoilerGradientHeatUp, statBoilerGradientCoolDown, statBoilerGradientCoolDownMin (boiler heat loss)</i>
  33292. <br>
  33293. Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
  33294. <br>
  33295. Logging and visualisation of the statistic should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
  33296. </li><br>
  33297. <li><code>heatPumpElectricalPowerWatt</code><br>
  33298. Electrical power of the heat pump by a flow temperature of 35&deg;C to calculated coefficency factor and estimate electrical consumption
  33299. </li><br>
  33300. <li><code>heatPumpElectricalPowerFactor</code><br>
  33301. Change of electrical power consumption per 1 K flow temperature differenz to 35&deg;C (e.g. 2% per 1 K = 0,02)
  33302. </li><br>
  33303. <li><code>heatRodElectricalPowerWatt</code><br>
  33304. Electrical power of the heat rods (2nd heat source) to estimate electrical consumption
  33305. </li><br>
  33306. <li><code>ignoreFirmwareCheck &lt; 0 | 1 &gt;</code>
  33307. <br>
  33308. A firmware check assures before each set operation that a heatpump controller with untested firmware is not damaged accidently.
  33309. <br>
  33310. If this attribute is set to 1, the firmware check is ignored and new firmware can be tested for compatibility.
  33311. </li><br>
  33312. <li><code>statusHTML</code>
  33313. <br>
  33314. If set, a HTML-formatted reading named "floorplanHTML" is created. It can be used with the <a href="#FLOORPLAN">FLOORPLAN</a> module.
  33315. <br>
  33316. Currently, if the value of this attribute is not NULL, the corresponding reading consists of the current status of the heat pump and the temperature of the water.
  33317. </li><br>
  33318. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  33319. </ul>
  33320. </ul>
  33321. </div>
  33322. <a name="LaCrosse"></a>
  33323. <h3>LaCrosse</h3>
  33324. <ul>
  33325. FHEM module for LaCrosse Temperature and Humidity sensors and weather stations like WS 1600 (TX22 sensor).<br><br>
  33326. It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
  33327. The JeeNode sketch required for this module can be found in .../contrib/36_LaCrosse-pcaSerial.zip.<br><br>
  33328. <a name="LaCrosseDefine"></a>
  33329. <b>Define</b>
  33330. <ul>
  33331. <code>define &lt;name&gt; LaCrosse &lt;addr&gt; [corr1...corr2]</code> <br>
  33332. <br>
  33333. addr is a 2 digit hex number to identify the LaCrosse device.<br>
  33334. corr1..corr2 are up to 2 numerical correction factors (corr1 for the temperature and corr2 for the humidity), which will be added to the respective value to calibrate the device.<br><br>
  33335. Note: devices are autocreated only if LaCrossePairForSec is active for the <a href="#JeeLink">JeeLink</a> IODevice device.<br>
  33336. </ul>
  33337. <br>
  33338. <a name="LaCrosse_Set"></a>
  33339. <b>Set</b>
  33340. <ul>
  33341. <li>replaceBatteryForSec &lt;sec&gt; [ignore_battery]<br>
  33342. sets the device for &lt;sec&gt; seconds into replace battery mode. the first unknown address that is
  33343. received will replace the current device address. this can be partly automated with a readings group configured
  33344. to show the battery state of all LaCrosse devices and a link/command to set replaceBatteryForSec on klick.
  33345. </li>
  33346. </ul><br>
  33347. <a name="LaCrosse_Get"></a>
  33348. <b>Get</b>
  33349. <ul>
  33350. </ul><br>
  33351. <a name="LaCrosse_Readings"></a>
  33352. <b>Readings</b>
  33353. <ul>
  33354. <li>battery[]<br>
  33355. ok or low</li>
  33356. <li>temperature (°C)<br>
  33357. Notice: see the filterThreshold attribute.</li>
  33358. <li>humidity (%rH)</li>
  33359. <li>Wind speed (m/s), gust (m/s) and direction (degree)</li>
  33360. <li>Rain (mm)</li>
  33361. </ul><br>
  33362. <a name="LaCrosse_Attr"></a>
  33363. <b>Attributes</b>
  33364. <ul>
  33365. <li>doAverage<br>
  33366. use an average of the last 4 values for temperature and humidity readings</li>
  33367. <li>doDewpoint<br>
  33368. calculate dewpoint</li>
  33369. <li>filterThreshold<br>
  33370. if the difference between the current and previous temperature is greater than filterThreshold degrees
  33371. the readings for this channel are not updated. the default is 10.</li>
  33372. <li>resolution<br>
  33373. the resolution in 1/10 degree for the temperature reading</li>
  33374. <li>ignore<br>
  33375. 1 -> ignore this device.</li>
  33376. </ul><br>
  33377. <b>Logging and autocreate</b><br>
  33378. <ul>
  33379. <li>If autocreate is not active (not defined or disabled) and LaCrosse is not contained in the ignoreTypes attribute of autocreate then
  33380. the <i>Unknown device xx, please define it</i> messages will be logged with loglevel 3. In all other cases they will be logged with loglevel 4. </li>
  33381. <li>The autocreateThreshold attribute of the autocreate module (see <a href="#autocreate">autocreate</a>) is respected. The default is 2:120, means, that
  33382. autocreate will create a device for a sensor only, if the sensor was received at least two times within two minutes.</li>
  33383. </ul>
  33384. </ul>
  33385. <a name="LaCrosseGateway"></a>
  33386. <h3>LaCrosseGateway</h3>
  33387. <ul>
  33388. For more information about the LaCrosseGateway see here: <a href="http://www.fhemwiki.de/wiki/LaCrosseGateway">FHEM wiki</a>
  33389. <br><br>
  33390. <a name="LaCrosseGateway_Define"></a>
  33391. <b>Define</b>
  33392. <ul>
  33393. <code>define &lt;name&gt; LaCrosseGateway &lt;device&gt;</code> <br>
  33394. <br>
  33395. USB-connected devices:<br><ul>
  33396. &lt;device&gt; specifies the serial port to communicate with the LaCrosseGateway.
  33397. The name of the serial-device depends on your distribution, under
  33398. linux it is something like /dev/ttyACM0 or /dev/ttyUSB0.<br><br>
  33399. </ul>
  33400. Network-connected devices:<br><ul>
  33401. &lt;device&gt; specifies the network device<br>
  33402. Normally this is the IP-address and the port in the form ip:port<br>
  33403. Example: 192.168.1.100:81<br>
  33404. You must define the port number on the setup page of the LaCrosseGateway and use the same number here.<br>
  33405. The default is 81
  33406. <br><br>
  33407. </ul>
  33408. <br>
  33409. </ul>
  33410. <a name="LaCrosseGateway_Set"></a>
  33411. <b>Set</b>
  33412. <ul>
  33413. <li>raw &lt;data&gt;<br>
  33414. send &lt;data&gt; to the LaCrosseGateway. The possible command can be found in the wiki.
  33415. </li><br>
  33416. <li>connect<br>
  33417. tries to (re-)connect to the LaCrosseGateway. It does not reset the LaCrosseGateway but only try to get a connection to it.
  33418. </li><br>
  33419. <li>reboot<br>
  33420. Reboots the ESP8266. Works only if we are connected (state is opened or initialized)
  33421. </li><br>
  33422. <li>LaCrossePairForSec &lt;sec&gt; [ignore_battery]<br>
  33423. enable autocreate of new LaCrosse sensors for &lt;sec&gt; seconds. If ignore_battery is not given only sensors
  33424. sending the 'new battery' flag will be created.
  33425. </li><br>
  33426. <li>flash<br>
  33427. The LaCrosseGateway needs the right firmware to be able to receive and deliver the sensor data to fhem.<br>
  33428. This provides a way to flash it directly from FHEM.
  33429. </li><br>
  33430. <li>nextionUpload<br>
  33431. Requires LaCrosseGateway V1.24 or newer.<br>
  33432. Sends a Nextion firmware file (.tft) to the LaCrosseGateway. The LaCrosseGateway then distributes it to a connected Nextion display.<br>
  33433. You can define the .tft file that shall be uploaded in the tftFile attribute. If this attribute does not exists, it will try to use FHEM/firmware/nextion.tft
  33434. </li><br>
  33435. </ul>
  33436. <a name="LaCrosseGateway_Get"></a>
  33437. <b>Get</b>
  33438. <ul>
  33439. ---
  33440. </ul>
  33441. <br>
  33442. <a name="LaCrosseGateway_Attr"></a>
  33443. <b>Attributes</b>
  33444. <ul>
  33445. <li>Clients<br>
  33446. The received data gets distributed to a client (e.g. LaCrosse, EMT7110, ...) that handles the data.
  33447. This attribute tells, which are the clients, that handle the data. If you add a new module to FHEM, that shall handle
  33448. data distributed by the LaCrosseGateway module, you must add it to the Clients attribute.
  33449. </li><br>
  33450. <li>MatchList<br>
  33451. Can be set to a perl expression that returns a hash that is used as the MatchList
  33452. </li><br>
  33453. <li>initCommands<br>
  33454. Space separated list of commands to send for device initialization.
  33455. </li><br>
  33456. <li>timeout<br>
  33457. format: &lt;timeout&gt<br>
  33458. Asks the LaCrosseGateway every timeout seconds if it is still alive. If there is no response it reconnects to the LaCrosseGateway.<br>
  33459. Can be combined with the watchdog attribute. If the watchdog attribute is set, the LaCrosseGateway also will check if it gets
  33460. a request within watchdog seconds and if not, it will reboot.
  33461. watchdog must be longer than timeout and does only work in combination with timeout.<br>
  33462. Both should not be too short because the LaCrosseGateway needs enough time to boot before the next check.<br>
  33463. Good values are: timeout 60 and watchdog 300<br>
  33464. This mode needs LaCrosseGateway V1.24 or newer.
  33465. <br><br><u>Old version (still working):</u><br>
  33466. format: &lt;timeout, checkInterval&gt;<br>
  33467. Checks every 'checkInterval' seconds if the last data reception is longer than 'timeout' seconds ago.<br>
  33468. If this is the case, a new connect will be tried.
  33469. </li><br>
  33470. <li>watchdog<br>
  33471. see timeout attribute.
  33472. </li><br>
  33473. <li>disable<br>
  33474. if disabled, it does not try to connect and does not dispatch data
  33475. </li><br>
  33476. <li>kvp<br>
  33477. defines how the incoming KVP-data of the LaCrosseGateway is handled<br>
  33478. dispatch: (default) dispatch it to a KVP device<br>
  33479. readings: create readings (e.g. RSSI, ...) in this device<br>
  33480. both: dispatch and create readings
  33481. </li><br>
  33482. <li>ownSensors<br>
  33483. defines how the incoming data of the internal LaCrosseGateway sensors is handled<br>
  33484. dispatch: (default) dispatch it to a LaCrosse device<br>
  33485. readings: create readings (e.g. temperature, humidity, ...) in this device<br>
  33486. both: dispatch and create readings
  33487. </li><br>
  33488. <li>mode<br>
  33489. USB, WiFi or Cable<br>
  33490. Depending on how the LaCrosseGateway is connected, it must be handled differently (init, ...)
  33491. </li><br>
  33492. <li>tftFile<br>
  33493. defines the .tft file that shall be used by the Nextion firmware upload (set nextionUpload)
  33494. </li><br>
  33495. <li>filter<br>
  33496. defines a filter (regular expression) that is applied to the incoming data. If the regex matches, the data will be discarded.<br>
  33497. This allows to suppress sensors, for example those of the neighbour.<br>
  33498. The data of different kinds of sensors starts with (where xx is the ID):<br>
  33499. LaCrosse sensor: OK 9 xx<br>
  33500. EnergyCount 3000: OK 22 xx xx<br>
  33501. EMT7110: OK EMT7110 xx xx<br>
  33502. LevelSender: OK LS xx<br>
  33503. Example: set lgw filter ^OK 22 117 196|^OK 9 49<br>
  33504. will filter the LaCrosse sensor with ID "49" and the EC3000 with ID "117 196"
  33505. </li><br>
  33506. </ul>
  33507. <br>
  33508. </ul>
  33509. <a name="Level"></a>
  33510. <h3>Level</h3>
  33511. <ul>
  33512. FHEM module for Level.<br><br>
  33513. It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
  33514. The JeeNode sketch required for this module can be found in .../contrib/36_LaCrosse-LaCrosseITPlusReader.zip. It must be at least version 10.0c<br><br>
  33515. For more information see: http://forum.fhem.de/index.php/topic,23217.msg165163.html#msg165163<br><br>
  33516. <a name="Level_Define"></a>
  33517. <b>Define</b>
  33518. <ul>
  33519. <code>define &lt;name&gt; Level &lt;addr&gt;</code> <br>
  33520. addr is a 1 digit hex number (0 .. F) to identify the Level device.
  33521. <br><br>
  33522. </ul>
  33523. <a name="Level_Readings"></a>
  33524. <b>Readings</b>
  33525. <ul>
  33526. <li>liters<br>
  33527. Calculated liters based on distanceToBottom, distance and litersPerCm</li>
  33528. <li>temperature<br>
  33529. Measured temperature</li>
  33530. <li>voltage<br>
  33531. Measured battery voltage</li>
  33532. <li>distance<br>
  33533. Measured distance from the sensor to the fluid</li>
  33534. <li>level<br>
  33535. Calculated level based on the distanceToBottom attribute</li>
  33536. </ul><br>
  33537. <a name="Level_Attr"></a>
  33538. <b>Attributes</b>
  33539. <ul>
  33540. <li>distanceToBottom<br>
  33541. Distance from the ultra sonic sensor to the bottom of the tank</li>
  33542. <li>litersPerCm<br>
  33543. Liters for each cm level</li>
  33544. </ul><br>
  33545. </ul>
  33546. <a name="LightScene"></a>
  33547. <h3>LightScene</h3>
  33548. <ul>
  33549. Allows to store the state of a group of lights and other devices and recall it later.
  33550. Multiple states for one group can be stored.
  33551. <br><br>
  33552. <a name="LightScene_Define"></a>
  33553. <b>Define</b>
  33554. <ul>
  33555. <code>define &lt;name&gt; LightScene [&lt;dev1&gt;] [&lt;dev2&gt;] [&lt;dev3&gt;] ... </code><br>
  33556. <br>
  33557. Examples:
  33558. <ul>
  33559. <code>define light_group LightScene Lampe1 Lampe2 Dimmer1</code><br>
  33560. <code>define kino_group LightScene LampeDecke LampeFernseher Fernseher Verstaerker</code><br>
  33561. <code>define Wohnzimmer LightScene Leinwand Beamer TV Leselampe Deckenlampe</code><br>
  33562. </ul>
  33563. </ul><br>
  33564. The device detail view will show an html overview of the current state of all included devices and all
  33565. configured scenes with the device states for each. The column heading with the device names is clickable
  33566. to go to detail view of this device. The first row that displays the current device state is clickable
  33567. and should react like a click on the device icon in a room overview would. this can be used to interactively
  33568. configure a new scene and save it with the command menu of the detail view. The first column of the table with
  33569. the scene names ic clickable to activate the scene.<br><br>
  33570. A weblink with a scene overview that can be included in any room or a floorplan can be created with:
  33571. <ul><code>define wlScene weblink htmlCode {LightScene_2html("LightSceneName")}</code></ul>
  33572. <a name="LightScene_Set"></a>
  33573. <b>Set</b>
  33574. <ul>
  33575. <li>all &lt;command&gt;<br>
  33576. execute set &lt;command&gt; for alle devices in this LightScene</li>
  33577. <li>save &lt;scene_name&gt;<br>
  33578. save current state for alle devices in this LightScene to &lt;scene_name&gt;</li>
  33579. <li>scene &lt;scene_name&gt;<br>
  33580. shows scene &lt;scene_name&gt; - all devices are switched to the previously saved state</li>
  33581. <li>nextScene [nowrap]<br>
  33582. activates the next scene in alphabetical order after the current scene or the first if no current scene is set.</li>
  33583. <li>previousScene [nowrap]<br>
  33584. activates the previous scene in alphabetical order before the current scene or the last if no current scene is set.</li>
  33585. <li>set &lt;scene_name&gt; &lt;device&gt; [&lt;cmd&gt;]<br>
  33586. set the saved state of &lt;device&gt; in &lt;scene_name&gt; to &lt;cmd&gt;</li>
  33587. <li>setcmd &lt;scene_name&gt; &lt;device&gt; [&lt;cmd&gt;]<br>
  33588. set command to be executed for &lt;device&gt; in &lt;scene_name&gt; to &lt;cmd&gt;.
  33589. &lt;cmd&gt; can be any commandline that fhem understands including multiple commands separated by ;;
  33590. <ul>
  33591. <li>set kino_group setcmd allOff LampeDecke sleep 30 ;; set LampeDecke off</li>
  33592. <li>set light_group setcmd test Lampe1 sleep 10 ;; set Lampe1 on ;; sleep 5 ;; set Lampe1 off</li>
  33593. </ul></li>
  33594. <li>remove &lt;scene_name&gt;<br>
  33595. remove &lt;scene_name&gt; from list of saved scenes</li>
  33596. <li>rename &lt;scene_old_name&gt; &lt;scene_new_name&gt;<br>
  33597. rename &lt;scene_old_name&gt; to &lt;scene_new_name&gt;</li>
  33598. </ul><br>
  33599. <a name="LightScene_Get"></a>
  33600. <b>Get</b>
  33601. <ul>
  33602. <li>scenes</li>
  33603. <li>scene &lt;scene_name&gt;</li>
  33604. </ul><br>
  33605. <a name="LightScene_Attr"></a>
  33606. <b>Attributes</b>
  33607. <ul>
  33608. <a name="async_delay"></a>
  33609. <li>async_delay<br>
  33610. If this attribute is defined, unfiltered set commands will not be
  33611. executed in the clients immediately. Instead, they are added to a queue
  33612. to be executed later. The set command returns immediately, whereas the
  33613. clients will be set timer-driven, one at a time. The delay between two
  33614. timercalls is given by the value of async_delay (in seconds) and may be
  33615. 0 for fastest possible execution.
  33616. </li>
  33617. <li>lightSceneParamsToSave<br>
  33618. this attribute can be set on the devices to be included in a scene. it is set to a comma separated list of readings
  33619. that will be saved. multiple readings separated by : are collated in to a single set command (this has to be supported
  33620. by the device). each reading can have a perl expression appended with '@' that will be used to alter the $value used for
  33621. the set command. this can for example be used to strip a trailing % from a dimmer state. this perl expression must not contain
  33622. spaces,colons or commas.<br>
  33623. in addition to reading names the list can also contain expressions of the form <code>abc -> xyz</code>
  33624. or <code>get cba -> set uvw</code> to map reading abc to set xyz or get cba to set uvw. the list can be given as a
  33625. string or as a perl expression enclosed in {} that returns this string.<br>
  33626. <code>attr myReceiver lightSceneParamsToSave volume,channel</code><br>
  33627. <code>attr myHueDevice lightSceneParamsToSave {(Value($DEVICE) eq "off")?"state":"bri : xy"}</code></li>
  33628. <code>attr myDimmer lightSceneParamsToSave state@{if($value=~m/(\d+)/){$1}else{$value}}</code><br>
  33629. <li>lightSceneRestoreOnlyIfChanged<br>
  33630. this attribute can be set on the lightscene and/or on the individual devices included in a scene.
  33631. the device settings have precedence over the scene setting.<br>
  33632. 1 -> for each device do nothing if current device state is the same as the saved state<br>
  33633. 0 -> always set the state even if the current state is the same as the saved state. this is the default</li>
  33634. <li>followDevices<br>
  33635. the LightScene tries to follow the switching state of the devices set its state to the name of the scene that matches.<br>
  33636. 1 -> if no match is found state will be unchanged and a nomatch event will be triggered.<br>
  33637. 2 -> if no match is found state will be set to unknown. depending on the scene and devices state can toggle multiple
  33638. times. use a watchdog if you want to handle this.</li>
  33639. <li>showDeviceCurrentState<br>
  33640. show the current state of member devices in weblink</li>
  33641. <li>switchingOrder<br>
  33642. space separated list of &lt;scene&gt;:&lt;deviceList&gt; items that will give a per scene order
  33643. in which the devices should be switched.<br>
  33644. the devices from &lt;deviceList&gt; will come before all other devices of this LightScene;
  33645. if the first character of the &lt;deviceList&gt; ist a ! the devices from the list will come after
  33646. all other devices from this lightScene.<br>
  33647. &lt;scene&gt; and each element of &lt;deviceList&gt; are treated as a regex.<br>
  33648. Example: To switch a master power outlet before every other device at power on and after every device on power off:<br>
  33649. <code>define media LightScene TV,DVD,Amplifier,masterPower<br>
  33650. attr media switchingOrder .*On:masterPower,.* allOff:!.*,masterPower</code>
  33651. </li>
  33652. <li>traversalOrder<br>
  33653. comma separated list of scene names that should be traversed by the prevoiusScene and nextScene commands.<br>
  33654. default not set -> all scenes will be traversed in alphabetical order
  33655. </li>
  33656. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  33657. </ul><br>
  33658. </ul>
  33659. <a name="Log2Syslog"></a>
  33660. <h3>Log2Syslog</h3>
  33661. <ul>
  33662. Send FHEM system log entries and/or FHEM events to an external syslog server. <br>
  33663. The syslog protocol has been implemented according the specifications of <a href="https://tools.ietf.org/html/rfc5424"> RFC5424 (IETF)</a>,
  33664. <a href="https://tools.ietf.org/html/rfc3164"> RFC3164 (BSD)</a> and the TLS transport protocol according to
  33665. <a href="https://tools.ietf.org/pdf/rfc5425.pdf"> RFC5425</a>. <br>
  33666. <br>
  33667. <b>Prerequisits</b>
  33668. <ul>
  33669. <br/>
  33670. The additional perl module "IO::Socket::INET" must be installed on your system. <br>
  33671. Install this package from cpan or by <br><br>
  33672. <code>apt-get install libio-socket-multicast-perl (only on Debian based installations) </code><br>
  33673. </ul>
  33674. <br>
  33675. <a name="Log2Syslogdefine"></a>
  33676. <b>Define</b>
  33677. <ul>
  33678. <br>
  33679. <code>define &lt;name&gt; Log2Syslog &lt;destination host&gt; [ident:&lt;ident&gt;] [event:&lt;regexp&gt;] [fhem:&lt;regexp&gt;]</code><br>
  33680. <br>
  33681. &lt;destination host&gt; = host where the syslog server is running <br>
  33682. [ident:&lt;ident&gt;] = optional program identifier. If not set the device name will be used as default <br>
  33683. [event:&lt;regexp&gt;] = optional regex to filter events for logging <br>
  33684. [fhem:&lt;regexp&gt;] = optional regex to filter fhem system log for logging <br><br>
  33685. After definition the new device sends all new appearing fhem systemlog entries and events to the destination host,
  33686. port=514/UDP format:IETF, immediately without further settings if the regex for fhem or event were set. <br>
  33687. Without setting regex no fhem system log or event log will be forwarded. <br><br>
  33688. The verbose level of FHEM system logs will convert into equivalent syslog severity level. <br>
  33689. Thurthermore the message text will be scanned for signal terms "warning" and "error" (with case insensitivity).
  33690. Dependent off the severity will be set equivalent as well. If a severity is already set by verbose level, it wil be overwritten
  33691. by the level according to the signal term found in the message text. <br><br>
  33692. <b>Lookup table Verbose-Level to Syslog severity level: </b><br><br>
  33693. <ul>
  33694. <table>
  33695. <colgroup> <col width=40%> <col width=60%> </colgroup>
  33696. <tr><td> <b>verbose-Level</b> </td><td> <b>Severity in Syslog</b> </td></tr>
  33697. <tr><td> 0 </td><td> Critical </td></tr>
  33698. <tr><td> 1 </td><td> Error </td></tr>
  33699. <tr><td> 2 </td><td> Warning </td></tr>
  33700. <tr><td> 3 </td><td> Notice </td></tr>
  33701. <tr><td> 4 </td><td> Informational </td></tr>
  33702. <tr><td> 5 </td><td> Debug </td></tr>
  33703. </table>
  33704. </ul>
  33705. <br>
  33706. <br>
  33707. Example to log anything: <br>
  33708. <br/>
  33709. <code>define splunklog Log2Syslog fhemtest 192.168.2.49 ident:Test event:.* fhem:.* </code><br>
  33710. <br/>
  33711. will produce output like this raw example of a splunk syslog server:<br/>
  33712. <pre>Aug 18 21:06:46 fhemtest.myds.me 1 2017-08-18T21:06:46 fhemtest.myds.me Test_event 13339 FHEM - : LogDB sql_processing_time: 0.2306
  33713. Aug 18 21:06:46 fhemtest.myds.me 1 2017-08-18T21:06:46 fhemtest.myds.me Test_event 13339 FHEM - : LogDB background_processing_time: 0.2397
  33714. Aug 18 21:06:45 fhemtest.myds.me 1 2017-08-18T21:06:45 fhemtest.myds.me Test_event 13339 FHEM - : LogDB CacheUsage: 21
  33715. Aug 18 21:08:27 fhemtest.myds.me 1 2017-08-18T21:08:27.760 fhemtest.myds.me Test_fhem 13339 FHEM - : 4: CamTER - Informations of camera Terrasse retrieved
  33716. Aug 18 21:08:27 fhemtest.myds.me 1 2017-08-18T21:08:27.095 fhemtest.myds.me Test_fhem 13339 FHEM - : 4: CamTER - CAMID already set - ignore get camid
  33717. </pre>
  33718. The structure of the payload differs dependent of the used logFormat. <br><br>
  33719. <b>logFormat IETF:</b> <br><br>
  33720. "&lt;PRIVAL&gt;1 TIME MYHOST IDENT PID MID - : MESSAGE" <br><br>
  33721. <ul>
  33722. <table>
  33723. <colgroup> <col width=10%> <col width=90%> </colgroup>
  33724. <tr><td> PRIVAL </td><td> priority value (coded from "facility" and "severity") </td></tr>
  33725. <tr><td> TIME </td><td> timestamp according to RFC5424 </td></tr>
  33726. <tr><td> MYHOST </td><td> Internal MYHOST </td></tr>
  33727. <tr><td> IDENT </td><td> ident-Tag from DEF if set, or else the own device name. The statement will be completed by "_fhem" (FHEM-Log) respectively "_event" (Event-Log). </td></tr>
  33728. <tr><td> PID </td><td> sequential Payload-ID </td></tr>
  33729. <tr><td> MID </td><td> fix value "FHEM" </td></tr>
  33730. <tr><td> MESSAGE </td><td> the dataset to transfer </td></tr>
  33731. </table>
  33732. </ul>
  33733. <br>
  33734. <b>logFormat BSD:</b> <br><br>
  33735. "&lt;PRIVAL&gt;MONAT TAG TIME MYHOST IDENT: : MESSAGE" <br><br>
  33736. <ul>
  33737. <table>
  33738. <colgroup> <col width=10%> <col width=90%> </colgroup>
  33739. <tr><td> PRIVAL </td><td> priority value (coded from "facility" and "severity") </td></tr>
  33740. <tr><td> MONAT </td><td> month according to RFC3164 </td></tr>
  33741. <tr><td> TAG </td><td> day of month according to RFC3164 </td></tr>
  33742. <tr><td> TIME </td><td> timestamp according to RFC3164 </td></tr>
  33743. <tr><td> MYHOST </td><td> Internal MYHOST </td></tr>
  33744. <tr><td> IDENT </td><td> ident-Tag from DEF if set, or else the own device name. The statement will be completed by "_fhem" (FHEM-Log) respectively "_event" (Event-Log). </td></tr>
  33745. <tr><td> MESSAGE </td><td> the dataset to transfer </td></tr>
  33746. </table>
  33747. </ul>
  33748. <br>
  33749. </ul>
  33750. <br>
  33751. <a name="Log2SyslogGet"></a>
  33752. <b>Get</b>
  33753. <ul>
  33754. <br>
  33755. <li><code>certinfo</code><br>
  33756. <br>
  33757. Show informations about the server certificate if a TLS-session was created (Reading "SSL_Version" isn't "n.a.").
  33758. </li><br>
  33759. </ul>
  33760. <br>
  33761. <a name="Log2Syslogattr"></a>
  33762. <b>Attributes</b>
  33763. <ul>
  33764. <br/>
  33765. <a name="addTimestamp"></a>
  33766. <li><code>addTimestamp [0|1]</code><br>
  33767. <br/>
  33768. If set to 1, fhem timestamps will be logged too.<br/>
  33769. Default behavior is to not log these timestamps, because syslog uses own timestamps.<br/>
  33770. Maybe useful if mseclog is activated in fhem.<br/>
  33771. <br/>
  33772. Example output (raw) of a Splunk syslog server: <br>
  33773. <pre>Aug 18 21:26:55 fhemtest.myds.me 1 2017-08-18T21:26:55 fhemtest.myds.me Test_event 13339 FHEM - : 2017-08-18 21:26:55 USV state: OL
  33774. Aug 18 21:26:54 fhemtest.myds.me 1 2017-08-18T21:26:54 fhemtest.myds.me Test_event 13339 FHEM - : 2017-08-18 21:26:54 Bezug state: done
  33775. Aug 18 21:26:54 fhemtest.myds.me 1 2017-08-18T21:26:54 fhemtest.myds.me Test_event 13339 FHEM - : 2017-08-18 21:26:54 recalc_Bezug state: Next: 21:31:59
  33776. </pre>
  33777. </li><br>
  33778. <li><code>addStateEvent [0|1]</code><br>
  33779. <br>
  33780. If set to 1, events will be completed with "state" if a state-event appears.<br/>
  33781. Default behavior is without getting "state".
  33782. </li><br>
  33783. <li><code>disable [0|1]</code><br>
  33784. <br>
  33785. disables the device.
  33786. </li><br>
  33787. <li><code>logFormat [BSD|IETF]</code><br>
  33788. <br>
  33789. Set the syslog protocol format. <br>
  33790. Default value is "IETF" if not specified.
  33791. </li><br>
  33792. <li><code>protocol [TCP|UDP]</code><br>
  33793. <br>
  33794. Sets the socket protocol which should be used. You can choose UDP or TCP. <br>
  33795. Default value is "UDP" if not specified.
  33796. </li><br>
  33797. <li><code>port</code><br>
  33798. <br>
  33799. The port of the syslog server is listening. (default 514)
  33800. </li><br>
  33801. <li><code>rateCalcRerun</code><br>
  33802. <br>
  33803. Rerun cycle for calculation of log transfer rate (Reading "Transfered_logs_per_minute") in seconds.
  33804. Default is 60 seconds.
  33805. </li><br>
  33806. <li><code>timeout</code><br>
  33807. <br>
  33808. Timeout for connection to the syslog server (TCP).
  33809. </li><br>
  33810. <li><code>verbose</code><br>
  33811. <br>
  33812. To avoid loops, the output of verbose level of the Log2Syslog-Devices will only be reported into the local FHEM Logfile and
  33813. no forwarded.
  33814. </li><br>
  33815. </ul>
  33816. <br>
  33817. <a name="Log2Syslogreadings"></a>
  33818. <b>Readings</b>
  33819. <ul>
  33820. <br>
  33821. <table>
  33822. <colgroup> <col width=40%> <col width=60%> </colgroup>
  33823. <tr><td><b>SSL_Algorithm</b> </td><td> used SSL algorithm if SSL is enabled and active </td></tr>
  33824. <tr><td><b>SSL_Version</b> </td><td> the used TLS-version if encryption is enabled and is active</td></tr>
  33825. <tr><td><b>Transfered_logs_per_minute</b> </td><td> the average number of forwarded logs/events per minute </td></tr>
  33826. </table>
  33827. <br>
  33828. </ul>
  33829. </ul>
  33830. <a name="LuftdatenInfo"></a>
  33831. <h3>LuftdatenInfo</h3>
  33832. (en | <a href="commandref_DE.html#LuftdatenInfo"><u>de</u></a>)
  33833. <div>
  33834. <ul>
  33835. LuftdatenInfo is the FHEM module to read particulate matter, temperature
  33836. and humidity values ​​from the self-assembly particulate matter sensors
  33837. from <a href="http://Luftdaten.info"><u>Luftdaten.info</u></a>.<br>
  33838. The values ​​can be queried directly from the server or locally.<br>
  33839. There is an
  33840. <a href="https://forum.fhem.de/index.php/topic,73879">
  33841. <u>alternative Firmware</u>
  33842. </a>
  33843. to support more sensors.<br>
  33844. <br>
  33845. <b>Prerequisites</b>
  33846. <ul>
  33847. The Perl module "JSON" is required.<br>
  33848. Under Debian (based) system, this can be installed using
  33849. <code>"apt-get install libjson-perl"</code>.
  33850. </ul>
  33851. <br>
  33852. <a name="LuftdatenInfodefine"></a>
  33853. <b>Define</b>
  33854. <ul>
  33855. <code>
  33856. define &lt;name&gt; LuftdatenInfo remote
  33857. &lt;SENSORID1&gt; [&lt;SENSORID2&gt; ..]<br>
  33858. define &lt;name&gt; LuftdatenInfo local &lt;IP&gt;<br>
  33859. define &lt;name&gt; LuftdatenInfo
  33860. slave &lt;master-name&gt; &lt;sensor1 sensor2 ...&gt;
  33861. </code><br>
  33862. To query the data from the server, all affected SensorIDs must be
  33863. specified. The IDs of the SDS01 stands right at
  33864. <a href="http://maps.luftdaten.info/">
  33865. <u>http://maps.luftdaten.info/</u>
  33866. </a>
  33867. . The DHT22 SensorID is usually the SDS011 SensorID + 1. While parsing
  33868. the data the location values from all sensors will be compared and a
  33869. message will be written into the log if they differ.<br>
  33870. For a local query of the data, the IP address or hostname must be
  33871. specified.<br>
  33872. If several similar sensors are used, the duplicate values can be written
  33873. in another device.
  33874. </ul><br>
  33875. <a name="LuftdatenInfoset"></a>
  33876. <b>Set</b>
  33877. <ul>
  33878. <li>
  33879. <code>statusRequest</code><br>
  33880. Starts a status request.
  33881. </li>
  33882. </ul><br>
  33883. <a name="LuftdatenInfoget"></a>
  33884. <b>Get</b>
  33885. <ul>
  33886. <li>
  33887. <code>sensors</code><br>
  33888. Lists all senors.
  33889. </li>
  33890. </ul><br>
  33891. <a name="LuftdatenInforeadings"></a>
  33892. <b>Readings</b><br>
  33893. <ul>
  33894. <li>
  33895. <code>altitude</code>
  33896. </li>
  33897. <li>
  33898. <code>humidity</code><br>
  33899. Relative humidity in %
  33900. </li>
  33901. <li>
  33902. <code>illuminanceFull</code><br>
  33903. Illuminace of the full spectrum in lux
  33904. </li>
  33905. <li>
  33906. <code>illuminanceIR</code><br>
  33907. Iilluminace of the IR spectrum in lux
  33908. </li>
  33909. <li>
  33910. <code>illuminanceUV</code><br>
  33911. Iilluminace of the UV spectrum in lux
  33912. </li>
  33913. <li>
  33914. <code>illuminanceVisible</code><br>
  33915. Iilluminace of the visible spectrum in lux
  33916. </li>
  33917. <li>
  33918. <code>latitude</code>
  33919. </li>
  33920. <li>
  33921. <code>location</code><br>
  33922. location as "postcode city"<br>
  33923. Only available with remote query.
  33924. </li>
  33925. <li>
  33926. <code>longitude</code>
  33927. </li>
  33928. <li>
  33929. <code>PM1</code><br>
  33930. Quantity of particles with a diameter of less than 1 μm in μg/m³
  33931. </li>
  33932. <li>
  33933. <code>PM2.5</code><br>
  33934. Quantity of particles with a diameter of less than 2.5 μm in μg/m³
  33935. </li>
  33936. <li>
  33937. <code>PM10</code><br>
  33938. Quantity of particles with a diameter of less than 10 μm in μg/m³
  33939. </li>
  33940. <li>
  33941. <code>pressure</code><br>
  33942. Pressure in hPa
  33943. </li>
  33944. <li>
  33945. <code>pressureNN</code><br>
  33946. Pressure at sea level in hPa<br>
  33947. Is calculated if pressure and temperature sensor are active and the
  33948. sensor is not at sea level.<br>
  33949. The height, can be determined by maps or SmartPhone, needs to be
  33950. specified at the configuration page.
  33951. </li>
  33952. <li>
  33953. <code>signal</code><br>
  33954. WLAN signal strength in dBm<br>
  33955. Only available with local query.
  33956. </li>
  33957. <li>
  33958. <code>temperature</code><br>
  33959. Temperature in °C
  33960. </li>
  33961. <li>
  33962. <code>UVIntensity</code><br>
  33963. UV intensity in W
  33964. </li>
  33965. <li>
  33966. <code>UVRisk</code><br>
  33967. UV risk from 1 to 5
  33968. </li>
  33969. </ul><br>
  33970. <a name="LuftdatenInfoattr"></a>
  33971. <b>Attribute</b>
  33972. <ul>
  33973. <li>
  33974. <code>disable 1</code><br>
  33975. No queries are started.
  33976. </li>
  33977. <li>
  33978. <a href="#disabledForIntervals">
  33979. <u><code>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM ...</code></u>
  33980. </a>
  33981. </li>
  33982. <li>
  33983. <code>interval &lt;seconds&gt;</code><br>
  33984. Interval in seconds in which queries are performed.<br>
  33985. The default and minimum value is 300 seconds.
  33986. </li>
  33987. <li>
  33988. <code>timeout &lt;seconds&gt;</code><br>
  33989. Timeout in seconds for the queries.<br>
  33990. The default and minimum value is 5 seconds.
  33991. </li>
  33992. </ul>
  33993. </ul>
  33994. </div>
  33995. <a name="M232"></a>
  33996. <h3>M232</h3>
  33997. <ul>
  33998. <br>
  33999. <a name="M232define"></a>
  34000. <b>Define</b>
  34001. <ul>
  34002. <code>define &lt;name&gt; M232 &lt;m232-device&gt;</code>
  34003. <br><br>
  34004. Define a M232 device. You can attach as many M232 devices as you like. A
  34005. M232 device provides 6 analog inputs (voltage 0..5V with 10 bit resolution)
  34006. and 8 bidirectional digital ports. The eighth digital port can be used as a
  34007. 16 bit counter (maximum frequency 3kHz). The M232 device needs to be
  34008. connected to a 25pin sub-d RS232 serial port. A USB-to-serial converter
  34009. works fine if no serial port is available.<br><br>
  34010. Examples:
  34011. <ul>
  34012. <code>define m232 M232 /dev/ttyUSB2</code><br>
  34013. </ul>
  34014. <br>
  34015. </ul>
  34016. <a name="M232set"></a>
  34017. <b>Set </b>
  34018. <ul>
  34019. <code>set &lt;name&gt; stop</code>
  34020. <br><br>
  34021. Stops the counter.
  34022. <br><br>
  34023. <code>set &lt;name&gt; start</code>
  34024. <br><br>
  34025. Resets the counter to zero and starts it.
  34026. <br><br>
  34027. <code>set &lt;name&gt; octet <value></code>
  34028. <br><br>
  34029. Sets the state of all digital ports at once, value is 0..255.
  34030. <br><br>
  34031. <code>set &lt;name&gt; io0..io7 0|1</code>
  34032. <br><br>
  34033. Turns digital port 0..7 off or on.
  34034. <br><br>
  34035. </ul>
  34036. <a name="M232get"></a>
  34037. <b>Get</b>
  34038. <ul>
  34039. <code>get &lt;name&gt; [an0..an5]</code>
  34040. <br><br>
  34041. Gets the reading of analog input 0..5 in volts.
  34042. <br><br>
  34043. <code>get &lt;name&gt; [io0..io7]</code>
  34044. <br><br>
  34045. Gets the state of digital ports 0..7, result is 0 or 1.
  34046. <br><br>
  34047. <code>get &lt;name&gt; octet</code>
  34048. <br><br>
  34049. Gets the state of all digital ports at once, result is 0..255.
  34050. <br><br>
  34051. <code>get &lt;name&gt; counter</code>
  34052. <br><br>
  34053. Gets the number of ticks of the counter since the last reset. The counter
  34054. wraps around from 65,535 to 0 and <i>then stops</i>.
  34055. See <a href="#M232Counter">M232Counter</a> for how we care about this.
  34056. <br><br>
  34057. </ul>
  34058. <a name="M232attr"></a>
  34059. <b>Attributes</b>
  34060. <ul>
  34061. <li><a href="#model">model</a> (m232)</li>
  34062. </ul>
  34063. <br>
  34064. </ul>
  34065. <a name="M232Counter"></a>
  34066. <h3>M232Counter</h3>
  34067. <ul>
  34068. <a name="M232Counterdefine"></a>
  34069. <b>Define</b>
  34070. <ul>
  34071. <code>define &lt;name&gt; M232Counter [unit [factor [deltaunit [deltafactor]]]]</code>
  34072. <br><br>
  34073. Define at most one M232Counter for a M232 device. Defining a M232Counter
  34074. will schedule an internal task, which periodically reads the status of the
  34075. counter, and triggers notify/filelog commands. <code>unit</code> is the unit
  34076. name, <code>factor</code> is used to calculate the reading of the counter
  34077. from the number of ticks. <code>deltaunit</code> is the unit name of the counter
  34078. differential per second, <code>deltafactor</code> is used to calculate the
  34079. counter differential per second from the number of ticks per second.<br><br>
  34080. Default values:
  34081. <ul>
  34082. <li>unit: ticks</li>
  34083. <li>factor: 1.0</li>
  34084. <li>deltaunit: ticks per second</li>
  34085. <li>deltafactor: 1.0</li>
  34086. </ul>
  34087. <br>Note: the parameters in square brackets are optional. If you wish to
  34088. specify an optional parameter, all preceding parameters must be specified
  34089. as well.
  34090. <br><br>Examples:
  34091. <ul>
  34092. <code>define counter M232Counter turns</code><br>
  34093. <code>define counter M232Counter kWh 0.0008 kW 2.88</code>
  34094. (one tick equals 1/1250th kWh)<br>
  34095. </ul>
  34096. <br>
  34097. Do not forget to start the counter (with <code>set .. start</code> for
  34098. M232) or to start the counter and set the reading to a specified value
  34099. (with <code>set ... value</code> for M232Counter).<br><br>
  34100. To avoid issues with the tick count reaching the end point, the device's
  34101. internal counter is automatically reset to 0 when the tick count is 64,000
  34102. or above and the reading <i>basis</i> is adjusted accordingly.
  34103. <br><br>
  34104. </ul>
  34105. <a name="M232Counterset"></a>
  34106. <b>Set </b>
  34107. <ul>
  34108. <code>set &lt;name&gt; value &lt;value&gt;</code>
  34109. <br><br>
  34110. Sets the reading of the counter to the given value. The counter is reset
  34111. and started and the offset is adjusted to value/unit.
  34112. <br><br>
  34113. <code>set &lt;name&gt; interval &lt;interval&gt;</code>
  34114. <br><br>
  34115. Sets the status polling interval in seconds to the given value. The default
  34116. is 60 seconds.
  34117. <br><br>
  34118. </ul>
  34119. <a name="M232Counterget"></a>
  34120. <b>Get</b>
  34121. <ul>
  34122. <code>get &lt;name&gt; status</code>
  34123. <br><br>
  34124. Gets the reading of the counter multiplied by the factor from the
  34125. <code>define</code> statement. Wraparounds of the counter are accounted for
  34126. by an offset (see reading <code>basis</code> in the output of the
  34127. <code>list</code> statement for the device).
  34128. <br><br>
  34129. </ul>
  34130. <a name="M232Counterattr"></a>
  34131. <b>Attributes</b>
  34132. <ul>
  34133. <li><a href="#attrdummy">dummy</a></li><br>
  34134. <li><a href="#model">model</a> (M232Counter)</li>
  34135. </ul>
  34136. <br>
  34137. </ul>
  34138. <a name="M232Voltage"></a>
  34139. <h3>M232Voltage</h3>
  34140. <ul>
  34141. <br>
  34142. <a name="M232Voltagedefine"></a>
  34143. <b>Define</b>
  34144. <ul>
  34145. <code>define &lt;name&gt; M232Voltage [an0..an5] [unit [factor]]</code>
  34146. <br><br>
  34147. Define as many M232Voltages as you like for a M232 device. Defining a
  34148. M232Voltage will schedule an internal task, which reads the status of the
  34149. analog input every minute, and triggers notify/filelog commands.
  34150. <code>unit</code> is the unit name, <code>factor</code> is used to
  34151. calibrate the reading of the analog input.<br><br>
  34152. Note: the unit defaults to the string "volts", but it must be specified
  34153. if you wish to set the factor, which defaults to 1.0. <br><br>
  34154. Example:
  34155. <ul>
  34156. <code>define volt M232Voltage an0</code><br>
  34157. <code>define brightness M232Voltage an5 lx 200.0</code><br>
  34158. </ul>
  34159. <br>
  34160. </ul>
  34161. <b>Set</b> <ul>N/A</ul><br>
  34162. <a name="M232Voltageget"></a>
  34163. <b>Get</b>
  34164. <ul>
  34165. <code>get &lt;name&gt; status</code>
  34166. <br><br>
  34167. </ul>
  34168. <a name="M232Voltageattr"></a>
  34169. <b>Attributes</b>
  34170. <ul>
  34171. <li><a href="#attrdummy">dummy</a></li><br>
  34172. <li><a href="#model">model</a> (M232Voltage)</li>
  34173. </ul>
  34174. <br>
  34175. </ul>
  34176. <a name="MAX"></a>
  34177. <h3>MAX</h3>
  34178. <ul>
  34179. Devices from the eQ-3 MAX! group.<br>
  34180. When heating thermostats show a temperature of zero degrees, they didn't yet send any data to the cube. You can
  34181. force the device to send data to the cube by physically setting a temperature directly at the device (not through fhem).
  34182. <br><br>
  34183. <a name="MAXdefine"></a>
  34184. <b>Define</b>
  34185. <ul>
  34186. <code>define &lt;name&gt; MAX &lt;type&gt; &lt;addr&gt;</code>
  34187. <br><br>
  34188. Define an MAX device of type &lt;type&gt; and rf address &lt;addr&gt.
  34189. The &lt;type&gt; is one of HeatingThermostat, HeatingThermostatPlus, WallMountedThermostat, ShutterContact, PushButton.
  34190. The &lt;addr&gt; is a 6 digit hex number.
  34191. You should never need to specify this by yourself, the <a href="#autocreate">autocreate</a> module will do it for you.<br>
  34192. It's advisable to set event-on-change-reading, like
  34193. <code>attr MAX_123456 event-on-change-reading .*</code>
  34194. because the polling mechanism will otherwise create events every 10 seconds.<br>
  34195. Example:
  34196. <ul>
  34197. <code>define switch1 MAX PushButton ffc545</code><br>
  34198. </ul>
  34199. </ul>
  34200. <br>
  34201. <a name="MAXset"></a>
  34202. <b>Set</b>
  34203. <ul>
  34204. <li>desiredTemperature auto [&lt;temperature&gt;]<br>
  34205. For devices of type HeatingThermostat only. If &lt;temperature&gt; is omitted,
  34206. the current temperature according to the week profile is used. If &lt;temperature&gt; is provided,
  34207. it is used until the next switch point of the week porfile. It maybe one of
  34208. <ul>
  34209. <li>degree celcius between 4.5 and 30.5 in 0.5 degree steps</li>
  34210. <li>"on" or "off" set the thermostat to full or no heating, respectively</li>
  34211. <li>"eco" or "comfort" using the eco/comfort temperature set on the device (just as the right-most physical button on the device itself does)</li>
  34212. </ul></li>
  34213. <li>desiredTemperature [manual] &lt;value&gt; [until &lt;date&gt;]<br>
  34214. For devices of type HeatingThermostat only. &lt;value&gt; maybe one of
  34215. <ul>
  34216. <li>degree celcius between 4.5 and 30.5 in 0.5 degree steps</li>
  34217. <li>"on" or "off" set the thermostat to full or no heating, respectively</li>
  34218. <li>"eco" or "comfort" using the eco/comfort temperature set on the device (just as the right-most physical button on the device itself does)</li>
  34219. </ul>
  34220. The optional "until" clause, with &lt;data&gt; in format "dd.mm.yyyy HH:MM" (minutes may only be "30" or "00"!),
  34221. sets the temperature until that date/time. Make sure that the cube/device has a correct system time.
  34222. If the keepAuto attribute is 1 and the device is currently in auto mode, 'desiredTemperature &lt;value&gt;'
  34223. behaves as 'desiredTemperature auto &lt;value&gt;'. If the 'manual' keyword is used, the keepAuto attribute is ignored
  34224. and the device goes into manual mode.</li>
  34225. <li>desiredTemperature boost<br>
  34226. For devices of type HeatingThermostat only.
  34227. Activates the boost mode, where for boostDuration minutes the valve is opened up boostValveposition percent.</li>
  34228. <li>groupid &lt;id&gt;<br>
  34229. For devices of type HeatingThermostat only.
  34230. Writes the given group id the device's memory. To sync all devices in one room, set them to the same groupid greater than zero.</li>
  34231. <li>ecoTemperature &lt;value&gt;<br>
  34232. For devices of type HeatingThermostat only. Writes the given eco temperature to the device's memory. It can be activated by pressing the rightmost physical button on the device.</li>
  34233. <li>comfortTemperature &lt;value&gt;<br>
  34234. For devices of type HeatingThermostat only. Writes the given comfort temperature to the device's memory. It can be activated by pressing the rightmost physical button on the device.</li>
  34235. <li>measurementOffset &lt;value&gt;<br>
  34236. For devices of type HeatingThermostat only. Writes the given temperature offset to the device's memory. If the internal temperature sensor is not well calibrated, it may produce a systematic error. Using measurementOffset, this error can be compensated. The reading temperature is equal to the measured temperature at sensor + measurementOffset. Usually, the internally measured temperature is a bit higher than the overall room temperature (due to closeness to the heater), so one uses a small negative offset. Must be between -3.5 and 3.5 degree celsius.</li>
  34237. <li>minimumTemperature &lt;value&gt;<br>
  34238. For devices of type HeatingThermostat only. Writes the given minimum temperature to the device's memory. It confines the temperature that can be manually set on the device.</li>
  34239. <li>maximumTemperature &lt;value&gt;<br>
  34240. For devices of type HeatingThermostat only. Writes the given maximum temperature to the device's memory. It confines the temperature that can be manually set on the device.</li>
  34241. <li>windowOpenTemperature &lt;value&gt;<br>
  34242. For devices of type HeatingThermostat only. Writes the given window open temperature to the device's memory. That is the temperature the heater will temporarily set if an open window is detected. Setting it to 4.5 degree or "off" will turn off reacting on open windows.</li>
  34243. <li>windowOpenDuration &lt;value&gt;<br>
  34244. For devices of type HeatingThermostat only. Writes the given window open duration to the device's memory. That is the duration the heater will temporarily set the window open temperature if an open window is detected by a rapid temperature decrease. (Not used if open window is detected by ShutterControl. Must be between 0 and 60 minutes in multiples of 5.</li>
  34245. <li>decalcification &lt;value&gt;<br>
  34246. For devices of type HeatingThermostat only. Writes the given decalcification time to the device's memory. Value must be of format "Sat 12:00" with minutes being "00". Once per week during that time, the HeatingThermostat will open the valves shortly for decalcification.</li>
  34247. <li>boostDuration &lt;value&gt;<br>
  34248. For devices of type HeatingThermostat only. Writes the given boost duration to the device's memory. Value must be one of 5, 10, 15, 20, 25, 30, 60. It is the duration of the boost function in minutes.</li>
  34249. <li>boostValveposition &lt;value&gt;<br>
  34250. For devices of type HeatingThermostat only. Writes the given boost valveposition to the device's memory. It is the valve position in percent during the boost function.</li>
  34251. <li>maxValveSetting &lt;value&gt;<br>
  34252. For devices of type HeatingThermostat only. Writes the given maximum valveposition to the device's memory. The heating thermostat will not open the valve more than this value (in percent).</li>
  34253. <li>valveOffset &lt;value&gt;<br>
  34254. For devices of type HeatingThermostat only. Writes the given valve offset to the device's memory. The heating thermostat will add this to all computed valvepositions during control.</li>
  34255. <li>factoryReset<br>
  34256. Resets the device to factory values. It has to be paired again afterwards.<br>
  34257. ATTENTION: When using this on a ShutterContact using the MAXLAN backend, the ShutterContact has to be triggered once manually to complete
  34258. the factoryReset.</li>
  34259. <li>associate &lt;value&gt;<br>
  34260. Associated one device to another. &lt;value&gt; can be the name of MAX device or its 6-digit hex address.<br>
  34261. Associating a ShutterContact to a {Heating,WallMounted}Thermostat makes it send message to that device to automatically lower temperature to windowOpenTemperature while the shutter is opened. The thermostat must be associated to the ShutterContact, too, to accept those messages.
  34262. <b>!Attention: After sending this associate command to the ShutterContact, you have to press the button on the ShutterContact to wake it up and accept the command. See the log for a message regarding this!</b>
  34263. Associating HeatingThermostat and WallMountedThermostat makes them sync their desiredTemperature and uses the measured temperature of the
  34264. WallMountedThermostat for control.</li>
  34265. <li>deassociate &lt;value&gt;<br>
  34266. Removes the association set by associate.</li>
  34267. <li>weekProfile [&lt;day&gt; &lt;temp1&gt;,&lt;until1&gt;,&lt;temp2&gt;,&lt;until2&gt;] [&lt;day&gt; &lt;temp1&gt;,&lt;until1&gt;,&lt;temp2&gt;,&lt;until2&gt;] ...<br>
  34268. Allows setting the week profile. For devices of type HeatingThermostat or WallMountedThermostat only. Example:<br>
  34269. <code>set MAX_12345 weekProfile Fri 24.5,6:00,12,15:00,5 Sat 7,4:30,19,12:55,6</code><br>
  34270. sets the profile <br>
  34271. <code>Friday: 24.5 &deg;C for 0:00 - 6:00, 12 &deg;C for 6:00 - 15:00, 5 &deg;C for 15:00 - 0:00<br>
  34272. Saturday: 7 &deg;C for 0:00 - 4:30, 19 &deg;C for 4:30 - 12:55, 6 &deg;C for 12:55 - 0:00</code><br>
  34273. while keeping the old profile for all other days.
  34274. </li>
  34275. </ul>
  34276. <br>
  34277. <a name="MAXget"></a>
  34278. <b>Get</b> <ul>N/A</ul><br>
  34279. <a name="MAXattr"></a>
  34280. <b>Attributes</b>
  34281. <ul>
  34282. <li><a href="#eventMap">eventMap</a></li>
  34283. <li><a href="#IODev">IODev</a></li>
  34284. <li><a href="#loglevel">loglevel</a></li>
  34285. <li><a href="#do_not_notify">do_not_notify</a></li>
  34286. <li><a href="#ignore">ignore</a></li>
  34287. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  34288. <li>keepAuto<br>Default: 0. If set to 1, it will stay in the auto mode when you set a desiredTemperature while the auto (=weekly program) mode is active.</li>
  34289. </ul>
  34290. <br>
  34291. <a name="MAXevents"></a>
  34292. <b>Generated events:</b>
  34293. <ul>
  34294. <li>desiredTemperature<br>Only for HeatingThermostat and WallMountedThermostat</li>
  34295. <li>valveposition<br>Only for HeatingThermostat</li>
  34296. <li>battery</li>
  34297. <li>temperature<br>The measured temperature (= measured temperature at sensor + measurementOffset), only for HeatingThermostat and WallMountedThermostat</li>
  34298. </ul>
  34299. </ul>
  34300. <a name="MAXLAN"></a>
  34301. <h3>MAXLAN</h3>
  34302. <ul>
  34303. The MAXLAN is the fhem module for the eQ-3 MAX! Cube LAN Gateway.
  34304. <br><br>
  34305. The fhem module makes the MAX! "bus" accessible to fhem, automatically detecting paired MAX! devices. It also represents properties of the MAX! Cube. The other devices are handled by the <a href="#MAX">MAX</a> module, which uses this module as its backend.<br>
  34306. <br>
  34307. <a name="MAXLANdefine"></a>
  34308. <b>Define</b>
  34309. <ul>
  34310. <code>define &lt;name&gt; MAXLAN &lt;ip-address&gt;[:port] [&lt;pollintervall&gt; [ondemand]]</code><br>
  34311. <br>
  34312. port is 62910 by default. (If your Cube listens on port 80, you have to update the firmware with
  34313. the official MAX! software).
  34314. If the ip-address is called none, then no device will be opened, so you
  34315. can experiment without hardware attached.<br>
  34316. The optional parameter &lt;pollintervall&gt; defines the time in seconds between each polling of data from the cube.<br>
  34317. You may provide the option <code>ondemand</code> forcing the MAXLAN module to tear-down the connection as often as possible
  34318. thus making the cube usable by other applications or the web portal.
  34319. </ul>
  34320. <br>
  34321. <a name="MAXLANset"></a>
  34322. <b>Set</b>
  34323. <ul>
  34324. <li>pairmode [&lt;n&gt;,cancel]<br>
  34325. Sets the cube into pairing mode for &lt;n&gt; seconds (default is 60s ) where it can be paired with other devices (Thermostats, Buttons, etc.). You also have to set the other device into pairing mode manually. (For Thermostats, this is pressing the "Boost" button for 3 seconds, for example).
  34326. Setting pairmode to "cancel" puts the cube out of pairing mode.</li>
  34327. <li>raw &lt;data&gt;<br>
  34328. Sends the raw &lt;data&gt; to the cube.</li>
  34329. <li>clock<br>
  34330. Sets the internal clock in the cube to the current system time of fhem's machine (uses timezone attribute if set). You can add<br>
  34331. <code>attr ml set-clock-on-init</code><br>
  34332. to your fhem.cfg to do this automatically on startup.</li>
  34333. <li>factorReset<br>
  34334. Reset the cube to factory defaults.</li>
  34335. <li>reconnect<br>
  34336. FHEM will terminate the current connection to the cube and then reconnect. This allows
  34337. re-reading the configuration data from the cube, as it is only send after establishing a new connection.</li>
  34338. </ul>
  34339. <br>
  34340. <a name="MAXLANget"></a>
  34341. <b>Get</b>
  34342. <ul>
  34343. N/A
  34344. </ul>
  34345. <br>
  34346. <br>
  34347. <a name="MAXLANattr"></a>
  34348. <b>Attributes</b>
  34349. <ul>
  34350. <li>set-clock-on-init<br>
  34351. (Default: 1). Automatically call "set clock" after connecting to the cube.</li>
  34352. <li><a href="#do_not_notify">do_not_notify</a></li>
  34353. <li><a href="#attrdummy">dummy</a></li>
  34354. <li><a href="#loglevel">loglevel</a></li>
  34355. <li><a href="#addvaltrigger">addvaltrigger</a></li>
  34356. <li>timezone<br>
  34357. (Default: CET-CEST). Set MAX Cube timezone (requires "set clock" to take effect).<br>
  34358. <b>NB.</b>Cube time and cubeTimeDifference will not change until Cube next connects.<br>
  34359. <ul>
  34360. <li>GMT-BST - (UTC +0, UTC+1)</li>
  34361. <li>CET-CEST - (UTC +1, UTC+2)</li>
  34362. <li>EET-EEST - (UTC +2, UTC+3)</li>
  34363. <li>FET-FEST - (UTC +3)</li>
  34364. <li>MSK-MSD - (UTC +4)</li>
  34365. </ul>
  34366. The following are settings with no DST (daylight saving time)
  34367. <ul>
  34368. <li>GMT - (UTC +0)</li>
  34369. <li>CET - (UTC +1)</li>
  34370. <li>EET - (UTC +2)</li>
  34371. </ul>
  34372. </li>
  34373. </ul>
  34374. </ul>
  34375. <a name="MEDIAPORTAL"></a>
  34376. <h3>MEDIAPORTAL</h3>
  34377. <p>Connects to a running MediaPortal instance via the WifiRemote plugin</p>
  34378. <h4>Example</h4>
  34379. <p>
  34380. <code>define wohnzimmer_Mediaportal MEDIAPORTAL 192.168.0.47:8017</code>
  34381. </p>
  34382. <a name="MEDIAPORTALdefine"></a>
  34383. <h4>Define</h4>
  34384. <b><code>define &lt;name&gt; MEDIAPORTAL host[:port]</code></b>
  34385. <br /><br /> Define a Mediaportal interface to communicate with a Wifiremote-Plugin of a Mediaportal-System.<br />
  34386. <p>
  34387. <b><code>host[:port]</code></b><br />The name and port of the Mediaportal-Wifiremote-Plugin. If Port is not given, the default of <code>8017</code> will be used.</p>
  34388. <a name="MEDIAPORTALset"></a>
  34389. <h4>Set</h4>
  34390. <ul>
  34391. <li><b>Common Tasks</b><ul>
  34392. <li><a name="MEDIAPORTAL_setter_connect">
  34393. <b><code>connect</code></b></a>
  34394. <br />Connects to Mediaportal immediately without waiting for the normal Fhem-Timeout for reconnect (30s).</li>
  34395. <li><a name="MEDIAPORTAL_setter_powermode">
  34396. <b><code>powermode &lt;mode&gt;</code></b></a>
  34397. <br />One of (logoff, suspend, hibernate, reboot, shutdown, exit). Sets the powermode, e.g. shutdown, for shutdown the computersystem of the Mediaportal-System.</li>
  34398. <li><a name="MEDIAPORTAL_setter_reconnect">
  34399. <b><code>reconnect</code></b></a>
  34400. <br />Re-Connects to Mediaportal immediately.</li>
  34401. </ul></li>
  34402. <li><b>Control-Commands</b><ul>
  34403. <li><a name="MEDIAPORTAL_setter_command">
  34404. <b><code>command &lt;command&gt;</code></b></a>
  34405. <br />One of (stop, record, pause, play, rewind, forward, replay, skip, back, info, menu, up, down, left, right, ok, volup, voldown, volmute, chup, chdown, dvdmenu, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, clear, enter, teletext, red, blue, yellow, green, home, basichome, nowplaying, tvguide, tvrecs, dvd, playlists, first, last, fullscreen, subtitles, audiotrack, screenshot). Sends the given command to the player.</li>
  34406. <li><a name="MEDIAPORTAL_setter_key">
  34407. <b><code>key &lt;keyvalue&gt;</code></b></a>
  34408. <br />Sends the given key to the player.</li>
  34409. <li><a name="MEDIAPORTAL_setter_sleep">
  34410. <b><code>sleep</code></b></a>
  34411. <br />Sends the hinernate-signal to Mediaportal. This command is a shortcut for "powermode hibernate"</li>
  34412. <li><a name="MEDIAPORTAL_setter_wakeup">
  34413. <b><code>wakeup</code></b></a>
  34414. <br />Wakes the Mediaportal-System up (WakeUp-On-LAN).</li>
  34415. </ul></li>
  34416. <li><b>Play-Commands</b><ul>
  34417. <li><a name="MEDIAPORTAL_setter_playchannel">
  34418. <b><code>playchannel &lt;channelID&gt;</code></b></a>
  34419. <br />Plays the channel with the given ID.</li>
  34420. <li><a name="MEDIAPORTAL_setter_playfile">
  34421. <b><code>playfile &lt;fileType&gt; &lt;filePath&gt;</code></b></a>
  34422. <br />Plays the given file with the given type. FileType can be one of (audio, video).</li>
  34423. <li><a name="MEDIAPORTAL_setter_playlist">
  34424. <b><code>playlist &lt;command&gt; &lt;param&gt;</code></b></a>
  34425. <br />Sends the given playlistcommand with the given parameter. Command can be one of (play, loadlist, loadlist_shuffle, loadfrompath, loadfrompath_shuffle).</li>
  34426. <li><a name="MEDIAPORTAL_setter_Volume">
  34427. <b><code>Volume &lt;volumelevel&gt;</code></b></a>
  34428. <br />Sets the Volume to the given value.</li>
  34429. </ul></li>
  34430. </ul>
  34431. <a name="MEDIAPORTALget"></a>
  34432. <h4>Get</h4>
  34433. <ul>
  34434. <li><b>Common Tasks</b><ul>
  34435. <li><a name="MEDIAPORTAL_getter_status">
  34436. <b><code>status</code></b></a>
  34437. <br />Call for the answer of a <code>status</code>-Message. e.g. Asynchronously retrieves the information of "Title" and "PlayStatus".</li>
  34438. <li><a name="MEDIAPORTAL_getter_nowplaying">
  34439. <b><code>nowplaying</code></b></a>
  34440. <br />Call for the answer of a <code>nowplaying</code>-Message. e.g. Asynchronously retrieves the information of "Duration", "Position" and "File"".</li>
  34441. </ul></li>
  34442. </ul>
  34443. <a name="MEDIAPORTALattr"></a>
  34444. <h4>Attributes</h4>
  34445. <ul>
  34446. <li><b>Common</b><ul>
  34447. <li><a name="MEDIAPORTAL_attribut_disable"><b><code>disable &lt;value&gt;</code></b>
  34448. </a><br />One of (0, 1). With this attribute you can disable the module.</li>
  34449. <li><a name="MEDIAPORTAL_attribut_generateNowPlayingUpdateEvents"><b><code>generateNowPlayingUpdateEvents &lt;value&gt;</code></b>
  34450. </a><br />One of (0, 1). With this value you can disable (or enable) the generation of <code>NowPlayingUpdate</code>-Events. If set, Fhem generates an event per second with the updated time-values for the current playing. Defaults to "0".</li>
  34451. <li><a name="MEDIAPORTAL_attribut_HeartbeatInterval"><b><code>HeartbeatInterval &lt;interval&gt;</code></b>
  34452. </a><br />In seconds. Defines the heartbeat interval in seconds which is used for testing the correct work of the connection to Mediaportal. A value of 0 deactivate the heartbeat-check. Defaults to "15".</li>
  34453. <li><a name="MEDIAPORTAL_attribut_macaddress"><b><code>macaddress &lt;address&gt;</code></b>
  34454. </a><br />Sets the MAC-Address for the Player. This is needed for WakeUp-Function. e.g. "90:E6:BA:C2:96:15"</li>
  34455. </ul></li>
  34456. <li><b>Authentication</b><ul>
  34457. <li><a name="MEDIAPORTAL_attribut_authmethod"><b><code>authmethod &lt;value&gt;</code></b>
  34458. </a><br />One of (none, userpassword, passcode, both). With this value you can set the authentication-mode.</li>
  34459. <li><a name="MEDIAPORTAL_attribut_password"><b><code>password &lt;value&gt;</code></b>
  34460. </a><br />With this value you can set the password for authentication.</li>
  34461. <li><a name="MEDIAPORTAL_attribut_username"><b><code>username &lt;value&gt;</code></b>
  34462. </a><br />With this value you can set the username for authentication.</li>
  34463. </ul></li>
  34464. </ul>
  34465. <a name="MPD"></a>
  34466. <h3>MPD</h3>
  34467. FHEM module to control a MPD (or Mopidy) like the MPC (MPC = Music Player Command, the command line interface to the <a href='http://en.wikipedia.org/wiki/Music_Player_Daemon'>Music Player Daemon</a> )<br>
  34468. To install a MPD on a Raspberry Pi you will find a lot of documentation at the web e.g. http://www.forum-raspberrypi.de/Thread-tutorial-music-player-daemon-mpd-und-mpc-auf-dem-raspberry-pi in german<br>
  34469. FHEM Forum : <a href='http://forum.fhem.de/index.php/topic,18517.0.html'>Modul f&uuml;r MPD</a> ( in german )<br>
  34470. Modul requires JSON -> sudo apt-get install libjson-perl <br>
  34471. If you are using Mopidy with Spotify support you may also need LWP::UserAgent -> sudo apt-get install libwww-perl<br>
  34472. <ul>
  34473. <a name="MPDdefine"></a>
  34474. <b>Define</b>
  34475. <ul>
  34476. define &lt;name&gt; MPD &lt;IP MPD Server | default localhost&gt; &lt;Port MPD Server | default 6600&gt;<br>
  34477. Example:<br>
  34478. <pre>
  34479. define myMPD MPD 192.168.0.99 7000
  34480. </pre>
  34481. if FHEM and MPD a running on the same device :
  34482. <pre>
  34483. define myMPD MPD
  34484. </pre>
  34485. </ul>
  34486. <br>
  34487. <a name="MPDset"></a>
  34488. <b>Set</b><ul>
  34489. <code>set &lt;name&gt; &lt;what&gt;</code>
  34490. <br>&nbsp;<br>
  34491. Currently, the following commands are defined.<br>
  34492. &nbsp;<br>
  34493. play => like MPC play , start playing song in playlist<br>
  34494. clear => like MPC clear , delete MPD playlist<br>
  34495. stop => like MPC stop, stops playing <br>
  34496. pause => like MPC pause<br>
  34497. previous => like MPC previous, play previous song in playlist<br>
  34498. next => like MPC next, play next song in playlist<br>
  34499. random => like MPC random, toggel on/off<br>
  34500. repeat => like MPC repeat, toggel on/off<br>
  34501. toggle => toggles from play to stop or from stop/pause to play<br>
  34502. updateDb => like MPC update<br>
  34503. volume (%) => like MPC volume %, 0 - 100<br>
  34504. volumeUp => inc volume ( + attr volumeStep size )<br>
  34505. volumeDown => dec volume ( - attr volumeStep size )<br>
  34506. playlist (playlistname|songnumber|position) set playlist on MPD Server. If songnumber and/or postion not defined<br>
  34507. MPD starts playing with the first song at position 0<br>
  34508. playfile (file) => create playlist + add file to playlist + start playing<br>
  34509. IdleNow => send Idle command to MPD and wait for events to return<br>
  34510. reset => reset MPD Modul<br>
  34511. mpdCMD (cmd) => send a command to MPD Server ( <a href='http://www.musicpd.org/doc/protocol/'>MPD Command Ref</a> )<br>
  34512. mute => on,off,toggle<br>
  34513. seekcur (time) => Format: [[hh:]mm:]ss. Not before MPD version 0.20.<br>
  34514. forward => jump forward in the current track as far as defined in the <i>seekStep</i> Attribute, default 7%<br>
  34515. rewind => jump backwards in the current track, as far as defined in the <i>seekStep</i> Attribute, default 7%<br>
  34516. channel (no) => loads the playlist with the given number<br>
  34517. channelUp => loads the next playlist<br>
  34518. channelDown => loads the previous playlist<br>
  34519. save_bookmark => saves the current state of the playlist (track number and position inside the track) for the currently loaded playlist
  34520. This will only work if the playlist was loaded through the module and if the attribute bookmarkDir is set. (not on radio streams !)<br>
  34521. load_bookmark <name> => resumes the previously saved state of the currently loaded playlist and jumps to the associated tracknumber and position inside the track<br>
  34522. </ul>
  34523. <br>
  34524. <a name="MPDget"></a>
  34525. <b>Get</b><ul>
  34526. <code>get &lt;name&gt; &lt;what&gt;</code>
  34527. <br>&nbsp;<br>
  34528. Currently, the following commands are defined.<br>
  34529. music => list all MPD music files in MPD databse<br>
  34530. playlists => list all MPD playlist in MPD databse<br>
  34531. playlistsinfo => show current playlist informations<br>
  34532. webrc => HTML output for a simple Remote Control on FHEM webpage e.g :.<br>
  34533. <pre>
  34534. define &lt;name&gt; weblink htmlCode {fhem("get &lt;name&gt; webrc", 1)}
  34535. attr &lt;name&gt; room MPD
  34536. </pre>
  34537. statusRequest => get MPD status<br>
  34538. currentsong => get infos from current song in playlist<br>
  34539. outputs => get name,id,status about all MPD output devices in /etc/mpd.conf<br>
  34540. bookmarks => list all stored bookmarks<br>
  34541. </ul>
  34542. <br>
  34543. <a name="MPDattr"></a>
  34544. <b>Attributes</b>
  34545. <ul>
  34546. <li>password <pwd>, if password in mpd.conf is set</li>
  34547. <li>loadMusic 1|0 => load titles from MPD database at startup (not supported by modipy)</li>
  34548. <li>loadPlaylists 1|0 => load playlist names from MPD database at startup</li>
  34549. <li>volumeStep 1|2|5|10 => Step size for Volume +/- (default 5)</li>
  34550. <li>titleSplit 1|0 => split title to artist and title if no artist is given in songinfo (e.g. radio-stream default 1)</li>
  34551. <li>timeout (default 1) => timeout in seconds for TCP connection timeout</li>
  34552. <li>waits (default 60) => if idle process ends with error, seconds to wait</li>
  34553. <li>stateMusic 1|0 => show Music DropDown box in web frontend</li>
  34554. <li>statePlaylists 1|0 => show Playlists DropDown box in web frontend</li>
  34555. <li>player mpd|mopidy|forked-daapd => which player is controlled by the module</li>
  34556. <li>Cover Art functions from <a href="http://www.last.fm/"><b>Last.fm</b></a> :</li>
  34557. <li>image_size -1|0|1|2|3 (default -1 = don't use artist images and album cover from Last.fm)<br>
  34558. Last.fm is using diffrent image sizes :<br>
  34559. 0 = 32x32 , 1 = 64x64 , 2 = 174x174 , 3 = 300x300</li>
  34560. <li>artist_content 0|1 => store artist informations in Reading artist_content</li>
  34561. <li>artist_summary 0|1 => stote more artist informations in Reading artist_summary<br>
  34562. Example with readingsGroup :<br>
  34563. <pre>
  34564. define rg_artist readingsGroup &ltMPD name&gt:artist,artist_image_html,artist_summary
  34565. attr rg_artist room MPD
  34566. </pre></li>
  34567. <li>cache (default lfm => /fhem/www/lfm) store artist image and album cover in a local directory</li>
  34568. <li>unknown_artist_image => show this image if no other image is avalible (default : /fhem/icons/1px-spacer)</li>
  34569. <li>bookmarkDir => set a writeable directory here to enable saving and restoring of playlist states using the set bookmark and get bookmark commands</li>
  34570. <li>autoBookmark => set this to 1 to enable automatic loading and saving of playlist states whenever the playlist is changed using this module</li>
  34571. <li>seekStep => set this to define how far the forward and rewind commands jump in the current track. Defaults to 7 if not set</li>
  34572. <li>seekStepSmall (default 1) => set this on top of seekStep to define a smaller step size, if the current playing position is below seekStepThreshold percent. This is useful to skip intro music, e.g. in radio plays or audiobooks.</li>
  34573. <li>seekStepSmallThreshold (default 0) => used to define when seekStep or seekStepSmall is applied. Defaults to 0. If set e.g. to 10, then during the first 10% of a track, forward and rewind are using the seekStepSmall value.</li>
  34574. <li>no_playlistcollection (default 0) => if set to 1 , dont create reading playlistcollection</li>
  34575. </ul>
  34576. <br>
  34577. <b>Readings</b>
  34578. <ul>
  34579. all MPD internal values<br>
  34580. artist_image : (if using Last.fm)<br>
  34581. artist_image_html : (if using Last.fm)<br>
  34582. album_image : (if using Last.fm)<br>
  34583. album_image_html : (if using Last.fm)<br>
  34584. artist_content : (if using Last.fm)<br>
  34585. artist_summary : (if using Last.fm)<br>
  34586. currentTrackProvider : Radio / Bibliothek<br>
  34587. playlistinfo : (TabletUI Medialist)<br>
  34588. playlistcollection : (TabletUI)<br>
  34589. playlistname : (TabletUI) current playlist name<br>
  34590. playlist_num : current playlist number<br>
  34591. playlist_json : (Medialist Modul)<br>
  34592. rawTitle : Title information without changes from the modul
  34593. </ul>
  34594. </ul>
  34595. <a name="MQTT"></a>
  34596. <h3>MQTT</h3>
  34597. <ul>
  34598. <p>connects fhem to <a href="http://mqtt.org">mqtt</a>.</p>
  34599. <p>A single MQTT device can serve multiple <a href="#MQTT_DEVICE">MQTT_DEVICE</a> and <a href="#MQTT_BRIDGE">MQTT_BRIDGE</a> clients.<br/>
  34600. Each <a href="#MQTT_DEVICE">MQTT_DEVICE</a> acts as a bridge in between an fhem-device and mqtt.<br/>
  34601. Note: this module is based on <a href="https://metacpan.org/pod/distribution/Net-MQTT/lib/Net/MQTT.pod">Net::MQTT</a> which needs to be installed from CPAN first.</p>
  34602. <a name="MQTTdefine"></a>
  34603. <p><b>Define</b></p>
  34604. <ul>
  34605. <p><code>define &lt;name&gt; MQTT &lt;ip:port&gt; [&lt;username&gt;] [&lt;password&gt;]</code></p>
  34606. <p>Specifies the MQTT device.</p>
  34607. </ul>
  34608. <a name="MQTTset"></a>
  34609. <p><b>Set</b></p>
  34610. <ul>
  34611. <li>
  34612. <p><code>set &lt;name&gt; connect</code><br/>
  34613. (re-)connects the MQTT-device to the mqtt-broker</p>
  34614. </li>
  34615. <li>
  34616. <p><code>set &lt;name&gt; disconnect</code><br/>
  34617. disconnects the MQTT-device from the mqtt-broker</p>
  34618. </li>
  34619. <li>
  34620. <p><code>set &lt;name&gt; publish [qos:?] [retain:?] &lt;topic&gt; &lt;message&gt;</code><br/>
  34621. sends message to the specified topic</p>
  34622. </li>
  34623. </ul>
  34624. <a name="MQTTattr"></a>
  34625. <p><b>Attributes</b></p>
  34626. <ul>
  34627. <li>
  34628. <p>keep-alive<br/>
  34629. sets the keep-alive time (in seconds).</p>
  34630. </li>
  34631. <li>
  34632. <p><code>attr &lt;name&gt; last-will [qos:?] [retain:?] &lt;topic&gt; &lt;message&gt;</code><br/>
  34633. Support for MQTT feature "last will"
  34634. </p>
  34635. <p>example:<br/>
  34636. <code>attr mqtt last-will /fhem/status crashed</code>
  34637. </p>
  34638. </li>
  34639. <li>
  34640. <p>on-connect, on-disconnect<br/>
  34641. <code>attr &lt;name&gt; on-connect {Perl-expression} &lt;topic&gt; &lt;message&gt;</code><br/>
  34642. Publish the specified message to a topic at connect / disconnect (counterpart to lastwill) and / or evaluation of Perl expression<br/>
  34643. If a Perl expression is provided, the message is sent only if expression returns true (for example, 1) or undef.<br/>
  34644. The following variables are passed to the expression at evaluation: $hash, $name, $qos, $retain, $topic, $message.
  34645. </p>
  34646. <p>examples:<br/>
  34647. <code>attr mqtt on-connect /topic/status connected</code><br/>
  34648. <code>attr mqtt on-connect {Log3("abc",1,"on-connect")} /fhem/status connected</code>
  34649. </p>
  34650. </li>
  34651. <li>
  34652. <p>on-timeout<br/>
  34653. <code>attr &lt;name&gt; on-timeout {Perl-expression}</code>
  34654. evaluate the given Perl expression on timeout<br/>
  34655. </p>
  34656. </li>
  34657. </ul>
  34658. </ul>
  34659. <a name="MQTT_BRIDGE"></a>
  34660. <h3>MQTT_BRIDGE</h3>
  34661. <ul>
  34662. <p>acts as a bridge in between an fhem-device and <a href="http://mqtt.org/">mqtt</a>-topics.</p>
  34663. <p>requires a <a href="#MQTT">MQTT</a>-device as IODev<br/>
  34664. Note: this module is based on <a href="https://metacpan.org/pod/distribution/Net-MQTT/lib/Net/MQTT.pod">Net::MQTT</a> which needs to be installed from CPAN first.</p>
  34665. <a name="MQTT_BRIDGEdefine"></a>
  34666. <p><b>Define</b></p>
  34667. <ul>
  34668. <p><code>define &lt;name&gt; MQTT_BRIDGE &lt;fhem-device-name&gt;</code></p>
  34669. <p>Specifies the MQTT device.<br/>
  34670. &lt;fhem-device-name&gt; is the fhem-device this MQTT_BRIDGE is linked to.</p>
  34671. </ul>
  34672. <a name="MQTT_BRIDGEget"></a>
  34673. <p><b>Get</b></p>
  34674. <ul>
  34675. <li>
  34676. <p><code>get &lt;name&gt; readings</code><br/>
  34677. retrieves all existing readings from fhem-device and configures (default-)topics for them.<br/>
  34678. attribute 'publish-topic-base' is prepended if set.</p>
  34679. </li>
  34680. </ul>
  34681. <a name="MQTT_BRIDGEattr"></a>
  34682. <p><b>Attributes</b></p>
  34683. <ul>
  34684. <li>
  34685. <p><code>attr &lt;name&gt; subscribeSet [{Perl-expression}] [qos:?] [retain:?] &lt;topic&gt;</code><br/>
  34686. configures a topic that will issue a 'set &lt;message&gt; whenever a message is received<br/>
  34687. QOS and ratain can be optionally defined for this topic. <br/>
  34688. Furthermore, a Perl statement can be provided which is executed when the message is received. The following variables are available for the expression: $hash, $name, $topic, $message, $device (linked device). Return value decides whether reading is set (true (e.g., 1) or undef) or discarded (false (e.g., 0)).
  34689. </p>
  34690. <p>Example:<br/>
  34691. <code>attr mqttest subscribeSet {fhem("do somethin")} /topic/cmd</code>
  34692. </p>
  34693. </li>
  34694. <li>
  34695. <p><code>attr &lt;name&gt; subscribeSet_&lt;reading&gt; [{Perl-expression}] [qos:?] [retain:?] &lt;topic&gt;</code><br/>
  34696. configures a topic that will issue a 'set &lt;reading&gt; &lt;message&gt; whenever a message is received. see above
  34697. for Perl-Expression/QOS/retain</p>
  34698. <p>Example:<br/>
  34699. <code>attr mqttest subscribeSet_cmd {if ($message eq "config") fhem("set $device getconfig");; 0} /topic/cmd</code>
  34700. </p>
  34701. </li>
  34702. <li>
  34703. <p><code>attr &lt;name&gt; publishState &lt;topic&gt;</code><br/>
  34704. configures a topic such that a message is sent to topic whenever the device state changes.</p>
  34705. </li>
  34706. <li>
  34707. <p><code>attr &lt;name&gt; publishReading_&lt;reading&gt; &lt;topic&gt;</code><br/>
  34708. configures a topic such that a message is sent to topic whenever the device readings value changes.</p>
  34709. </li>
  34710. <li>
  34711. <p><code>attr &lt;name&gt; publish-topic-base &lt;topic&gt;</code><br/>
  34712. this is used as base path when issueing 'get &lt;device&gt; readings' to construct topics to publish to based on the devices existing readings</p>
  34713. </li>
  34714. <li>
  34715. <p><code>attr &lt;name&gt; retain &lt;flags&gt; ...</code><br/>
  34716. Specifies the retain flag for all or specific readings. Possible values are 0, 1</p>
  34717. <p>Examples:<br/>
  34718. <code>attr mqttest retain 0</code><br/>
  34719. defines retain 0 for all readings/topics (due to downward compatibility)<br>
  34720. <code> retain *:0 1 test:1</code><br/>
  34721. defines retain 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
  34722. </p>
  34723. </li>
  34724. <li>
  34725. <p><code>attr &lt;name&gt; qos &lt;flags&gt; ...</code><br/>
  34726. Specifies the QOS flag for all or specific readings. Possible values are 0, 1 or 2. Constants may be also used: at-most-once = 0, at-least-once = 1, exactly-once = 2</p>
  34727. <p>Examples:<br/>
  34728. <code>attr mqttest qos 0</code><br/>
  34729. defines QOS 0 for all readings/topics (due to downward compatibility)<br>
  34730. <code> retain *:0 1 test:1</code><br/>
  34731. defines QOS 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
  34732. </p>
  34733. </li>
  34734. </ul>
  34735. </ul>
  34736. <a name="MQTT_DEVICE"></a>
  34737. <h3>MQTT_DEVICE</h3>
  34738. <ul>
  34739. <p>acts as a fhem-device that is mapped to <a href="http://mqtt.org/">mqtt</a>-topics.</p>
  34740. <p>requires a <a href="#MQTT">MQTT</a>-device as IODev<br/>
  34741. Note: this module is based on <a href="https://metacpan.org/pod/distribution/Net-MQTT/lib/Net/MQTT.pod">Net::MQTT</a> which needs to be installed from CPAN first.</p>
  34742. <a name="MQTT_DEVICEdefine"></a>
  34743. <p><b>Define</b></p>
  34744. <ul>
  34745. <p><code>define &lt;name&gt; MQTT_DEVICE</code><br/>
  34746. Specifies the MQTT device.</p>
  34747. </ul>
  34748. <a name="MQTT_DEVICEset"></a>
  34749. <p><b>Set</b></p>
  34750. <ul>
  34751. <li>
  34752. <p><code>set &lt;name&gt; &lt;command&gt;</code><br/>
  34753. sets reading 'state' and publishes the command to topic configured via attr publishSet</p>
  34754. </li>
  34755. <li>
  34756. <p><code>set &lt;name&gt; &lt;reading&gt; &lt;value&gt;</code><br/>
  34757. sets reading &lt;reading&gt; and publishes the command to topic configured via attr publishSet_&lt;reading&gt;</p>
  34758. </li>
  34759. </ul>
  34760. <a name="MQTT_DEVICEattr"></a>
  34761. <p><b>Attributes</b></p>
  34762. <ul>
  34763. <li>
  34764. <p><code>attr &lt;name&gt; publishSet [[&lt;reading&gt;:]&lt;commands_or_options&gt;] &lt;topic&gt;</code><br/>
  34765. configures set commands and UI-options e.g. 'slider' that may be used to both set given reading ('state' if not defined) and publish to configured topic</p>
  34766. <p>example:<br/>
  34767. <code>attr mqttest publishSet on off switch:on,off level:slider,0,1,100 /topic/123</code>
  34768. </p>
  34769. </li>
  34770. <li>
  34771. <p><code>attr &lt;name&gt; publishSet_&lt;reading&gt; [&lt;values&gt;]* &lt;topic&gt;</code><br/>
  34772. configures reading that may be used to both set 'reading' (to optionally configured values) and publish to configured topic</p>
  34773. </li>
  34774. <li>
  34775. <p><code>attr &lt;name&gt; autoSubscribeReadings &lt;topic&gt;</code><br/>
  34776. specify a mqtt-topic pattern with wildcard (e.c. 'myhouse/kitchen/+') and MQTT_DEVICE automagically creates readings based on the wildcard-match<br/>
  34777. e.g a message received with topic 'myhouse/kitchen/temperature' would create and update a reading 'temperature'</p>
  34778. </li>
  34779. <li>
  34780. <p><code>attr &lt;name&gt; subscribeReading_&lt;reading&gt; [{Perl-expression}] [qos:?] [retain:?] &lt;topic&gt;</code><br/>
  34781. mapps a reading to a specific topic. The reading is updated whenever a message to the configured topic arrives.<br/>
  34782. QOS and ratain can be optionally defined for this topic. <br/>
  34783. Furthermore, a Perl statement can be provided which is executed when the message is received. The following variables are available for the expression: $hash, $name, $topic, $message. Return value decides whether reading is set (true (e.g., 1) or undef) or discarded (false (e.g., 0)).
  34784. </p>
  34785. <p>Example:<br/>
  34786. <code>attr mqttest subscribeReading_cmd {fhem("set something off")} /topic/cmd</code>
  34787. </p>
  34788. </li>
  34789. <li>
  34790. <p><code>attr &lt;name&gt; retain &lt;flags&gt; ...</code><br/>
  34791. Specifies the retain flag for all or specific readings. Possible values are 0, 1</p>
  34792. <p>Examples:<br/>
  34793. <code>attr mqttest retain 0</code><br/>
  34794. defines retain 0 for all readings/topics (due to downward compatibility)<br>
  34795. <code> retain *:0 1 test:1</code><br/>
  34796. defines retain 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
  34797. </p>
  34798. </li>
  34799. <li>
  34800. <p><code>attr &lt;name&gt; qos &lt;flags&gt; ...</code><br/>
  34801. Specifies the QOS flag for all or specific readings. Possible values are 0, 1 or 2. Constants may be also used: at-most-once = 0, at-least-once = 1, exactly-once = 2</p>
  34802. <p>Examples:<br/>
  34803. <code>attr mqttest qos 0</code><br/>
  34804. defines QOS 0 for all readings/topics (due to downward compatibility)<br>
  34805. <code> retain *:0 1 test:1</code><br/>
  34806. defines QOS 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
  34807. </p>
  34808. </li>
  34809. </ul>
  34810. </ul>
  34811. <a name="MSG"></a>
  34812. <h3>msg</h3>
  34813. <ul>
  34814. <code>msg [&lt;type&gt;] [&lt;@device&gt;|&lt;e-mail address&gt;] [&lt;priority&gt;] [|&lt;title&gt;|] &lt;message&gt;</code>
  34815. <br>
  34816. <br>
  34817. No documentation here yet, sorry.<br>
  34818. <a href="http://forum.fhem.de/index.php/topic,39983.0.html">FHEM Forum</a>
  34819. </ul>
  34820. <a name="MSGFile"></a>
  34821. <h3>MSGFile</h3>
  34822. <ul>
  34823. The MSGFile device is used to write arbitrary data to a file on disk
  34824. or other media accessable through the filesystem. In order to write to a file,
  34825. the access rights of the FHEM process to the specified file and path are relevant.
  34826. To set the rights for a directory, please use OS related commands.
  34827. <br><br>
  34828. <a name="MSGFileDefine"></a>
  34829. <b>Define</b>
  34830. <ul><br>
  34831. <code>define &lt;name&gt; MSGFile &lt;filename&gt;</code><br><br>
  34832. Specifies the MSGFile device. At definition the message counter is set to 0.
  34833. A filename must be specified at definition.
  34834. </ul>
  34835. <br>
  34836. Examples:
  34837. <ul>
  34838. <code>define myFile MSGFile</code>
  34839. </ul><br>
  34840. <a name="MSGFileSet"></a>
  34841. <b>Set</b><br>
  34842. <ul><code>set &lt;name&gt; add|clear|list|write [text]</code><br>
  34843. Set is used to manipulate the message buffer of the device. The message
  34844. buffer is an array of lines of data, stored serial based on the incoming
  34845. time into the buffer. Lines of data inside the buffer could not be deleted
  34846. anymore, except of flashing the whole buffer.<br>
  34847. <ul><b>add</b><br> to add lines of data to the message buffer. All data behind
  34848. "add" will be interpreted as text message. To add a carriage return to the data,
  34849. please use the CR attribute.
  34850. </ul>
  34851. <ul><b>clear</b><br> to flash the message buffer and set the line counter to 0.
  34852. All the lines of data are deleted and the buffer is flushed.</ul>
  34853. <ul><b>list</b><br> to list the message buffer.</ul><br>
  34854. <ul><b>write</b><br> to write the message buffer to the associated file.</ul><br>
  34855. </ul><br>
  34856. Examples:
  34857. <ul>
  34858. <code>set myFile add Dies ist Textzeile 1</code><br>
  34859. <code>set myFile add Dies ist Textzeile 2</code><br>
  34860. <code>set myFile clear</code><br>
  34861. <br>
  34862. Full working example to write two lines of data to a file:<br>
  34863. <code>define myFile MSGFile /tmp/fhemtest.txt</code><br>
  34864. <code>attr myFile filemode append</code><br>
  34865. <code>set myFile add Textzeile 1</code><br>
  34866. <code>set myFile add Textzeile 2</code><br>
  34867. <code>set myFile write</code><br>
  34868. <code>set myFile clear</code><br>
  34869. </ul><br>
  34870. <a name="MSGFileVattr"></a>
  34871. <b>Attributes</b>
  34872. <ul>
  34873. <li><a href="MSGFilefilename">filename</a><br>
  34874. sets the filename, must be a fully qualified filename.
  34875. FHEM must have the rights to write this file to the directory</li>
  34876. <li><a href="MSGFilefilemode">filemode</a><br>
  34877. sets the filemode, valid are "new" or "append"<br>
  34878. new creates a new, empty file and writes the data to this file. Existing files are cleared, the data is lost!<br>
  34879. append uses, if available, an existing file and writes the
  34880. buffer data to the end of the file. If the file do not exist, it will
  34881. be created</li>
  34882. <li><a href="MSGFilenameCR">CR</a><br>
  34883. set the option to write a carriage return at the end of the line.
  34884. CR could be set to 0 or 1, 1 enables this feature</li>
  34885. <li><a href="#loglevel">loglevel</a></li>
  34886. </ul>
  34887. </ul>
  34888. <a name="MSGMail"></a>
  34889. <h3>MSGMail</h3>
  34890. <ul>
  34891. The MSGMail device is used to send mail messages to a recipient by connecting
  34892. to a SMTP server. Currently MSGMail supports only servers, that allow SSL secured connections
  34893. like Googlemail, GMX, Yahoo or 1und1.
  34894. MSGMail requires the perl pacakge <b>MAIL::Lite</b>.
  34895. For SSL support, Net::SMTP version 3.06 is required. On systems with an older version of Net::SMTP,
  34896. MSGMail requires the package <b>Net::SMTP::SSL</b>.
  34897. <br><br>
  34898. <a name="MSGMailDefine"></a>
  34899. <b>Define</b>
  34900. <ul><br>
  34901. <code>define &lt;name&gt; MSGMail &lt;from&gt; &lt;to&gt; &lt;smtphost&gt; &lt;authfile&gt;</code><br><br>
  34902. Specifies the MSGMail device. At definition the message counter is set to 0.
  34903. From, To, SMTPHost and the authfile (see attributes below) need to be defined
  34904. at definition time.
  34905. </ul>
  34906. <br>
  34907. Examples:
  34908. <ul>
  34909. <code>define myMail MSGMail from@address.com to@address.com smtp.provider.host /etc/msgauthfile</code>
  34910. </ul><br>
  34911. <a name="MSGMailSet"></a>
  34912. <b>Set</b><br>
  34913. <ul><code>set &lt;name&gt; add|clear|list|send [text]</code><br>
  34914. Set is used to manipulate the message buffer of the device. The message
  34915. buffer is an array of lines of data, stored serial based on the incoming
  34916. time into the buffer. Lines of data inside the buffer could not be deleted
  34917. anymore, except of flashing the whole buffer.<br>
  34918. <ul><b>add</b><br> to add lines of data to the message buffer. All data behind
  34919. "add" will be interpreted as text message. To add a carriage return to the data,
  34920. please use the CR attribute.
  34921. </ul>
  34922. <ul><b>clear</b><br> to flush the message buffer and set the line counter to 0.
  34923. All the lines of data are deleted and the buffer is flushed.</ul>
  34924. <ul><b>list</b><br> to list the message buffer.<br></ul>
  34925. <ul><b>send</b><br> to send the message buffer.<br></ul>
  34926. <br>
  34927. Examples:
  34928. <ul>
  34929. <code>set myMail add Dies ist Textzeile 1</code><br>
  34930. <code>set myMail add Dies ist Textzeile 2</code><br>
  34931. <code>set myMail clear</code><br><br>
  34932. Full working example to send two lines of data to a recipent:<br>
  34933. <code>define myMail MSGMail donald.duck@entenhausen.com dagobert.duck@duck-banking.com smtp.entenhausen.net /etc/fhem/msgmailauth</code><br>
  34934. <code>attr myMail smtpport 9999</code><br>
  34935. <code>attr myMail subject i need more money</code><br>
  34936. <code>attr myMail CR 0</code><br>
  34937. <code>set myMail add Please send me </code><br>
  34938. <code>set myMail add 1.000.000 Taler</code><br>
  34939. <code>set myMail send</code><br>
  34940. <code>set myMail clear</code><br>
  34941. </ul><br>
  34942. </ul>
  34943. <a name="MSGMailattr"></a>
  34944. <b>Attributes</b>
  34945. <ul>
  34946. Almost all of these attributes are not optional, most of them could set at definition.<br>
  34947. <li><a href="MSGMailFrom">from</a><br>
  34948. sets the mail address of the sender</li>
  34949. <li><a href="MSGMailTo">to</a><br>
  34950. sets the mail address of the recipent</li>
  34951. <li><a href="MSGMailsmtphost">smtphost</a><br>
  34952. sets the name of the smtphost, for example for GMX
  34953. you could use mail.gmx.net or for Googlemail the smtphost is
  34954. smtp.googlemail.com</li>
  34955. <li><a href="MSGMailsmtphost">smtpport</a> (optional)<br>
  34956. sets the port of the smtphost, for example for GMX
  34957. or for Googlemail the smtport is 465, which is also
  34958. the default and do not need to be set</li>
  34959. <li><a href="MSGMailsubject">subject</a> (optional)<br>
  34960. sets the subject of this email. Per default the subject is set to "FHEM"<br>
  34961. </li>
  34962. <li><a href="MSGMailauthfile">authfile</a><br>
  34963. sets the authfile for the SSL connection to the SMTP host<br>
  34964. the authfile is a simple textfile with the userid in line 1 and
  34965. the password in line 2.<br>
  34966. Example:<br>
  34967. <code>123user45</code><br>
  34968. <code>strenggeheim</code><br>
  34969. It is a good behaviour to protect this data and put the file, for
  34970. example into the /etc directory and set the rights to 440
  34971. (chmod 440 /etc/msgmailauthfile), so that not everyone could see the contents
  34972. of the file. FHEM must have access to this file to read the userid and password.
  34973. <br>
  34974. </li>
  34975. <li><a href="MSGMailmailtype">mailtype</a> plain|html<br>
  34976. Use this attribute to select the contenttype to text/plain or text/html.
  34977. If text/html is selected, valid html code must be provided as content. No checks are applied!
  34978. Per default this attribute is 'plain'</li>
  34979. <li><a href="MSGMailCR">CR</a><br>
  34980. set the option to write a carriage return at the end of the line.
  34981. CR could be set to 0 or 1, 1 enables this feature.
  34982. Per default this attribute is enabled</li>
  34983. <li><a href="#loglevel">loglevel</a></li>
  34984. </ul>
  34985. </ul>
  34986. <a name="MYSENSORS"></a>
  34987. <h3>MYSENSORS</h3>
  34988. <ul>
  34989. <p>connects fhem to <a href="http://MYSENSORS.org">MYSENSORS</a>.</p>
  34990. <p>A single MYSENSORS device can serve multiple <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> clients.<br/>
  34991. Each <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> represents a mysensors node.<br/>
  34992. <a name="MYSENSORSdefine"></a>
  34993. <p><b>Define</b></p>
  34994. <ul>
  34995. <p><code>define &lt;name&gt; MYSENSORS &lt;serial device&gt|&lt;ip:port&gt;</code></p>
  34996. <p>Specifies the MYSENSORS device.</p>
  34997. </ul>
  34998. <a name="MYSENSORSset"></a>
  34999. <p><b>Set</b></p>
  35000. <ul>
  35001. <li>
  35002. <p><code>set &lt;name&gt; connect</code><br/>
  35003. (re-)connects the MYSENSORS-device to the MYSENSORS-gateway</p>
  35004. </li>
  35005. <li>
  35006. <p><code>set &lt;name&gt; disconnect</code><br/>
  35007. disconnects the MYSENSORS-device from the MYSENSORS-gateway</p>
  35008. </li>
  35009. <li>
  35010. <p><code>set &lt;name&gt; inclusion-mode on|off</code><br/>
  35011. turns the gateways inclusion-mode on or off</p>
  35012. </li>
  35013. </ul>
  35014. <a name="MYSENSORSattr"></a>
  35015. <p><b>Attributes</b></p>
  35016. <ul>
  35017. <li>
  35018. <p><code>att &lt;name&gt; autocreate</code><br/>
  35019. enables auto-creation of MYSENSOR_DEVICE-devices on receival of presentation-messages</p>
  35020. </li>
  35021. <li>
  35022. <p><code>att &lt;name&gt; requestAck</code><br/>
  35023. request acknowledge from nodes.<br/>
  35024. if set the Readings of nodes are updated not before requested acknowledge is received<br/>
  35025. if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).
  35026. May also be configured for individual nodes if not set for gateway.</p>
  35027. </li>
  35028. <li>
  35029. <p><code>att &lt;name&gt; first-sensorid <&lt;number &lth; 255&gt;></code><br/>
  35030. configures the lowest node-id assigned to a mysensor-node on request (defaults to 20)</p>
  35031. </li>
  35032. </ul>
  35033. </ul>
  35034. <a name="MYSENSORS_DEVICE"></a>
  35035. <h3>MYSENSORS_DEVICE</h3>
  35036. <ul>
  35037. <p>represents a mysensors sensor attached to a mysensor-node</p>
  35038. <p>requires a <a href="#MYSENSOR">MYSENSOR</a>-device as IODev</p>
  35039. <a name="MYSENSORS_DEVICEdefine"></a>
  35040. <p><b>Define</b></p>
  35041. <ul>
  35042. <p><code>define &lt;name&gt; MYSENSORS_DEVICE &lt;Sensor-type&gt; &lt;node-id&gt;</code><br/>
  35043. Specifies the MYSENSOR_DEVICE device.</p>
  35044. </ul>
  35045. <a name="MYSENSORS_DEVICEset"></a>
  35046. <p><b>Set</b></p>
  35047. <ul>
  35048. <li>
  35049. <p><code>set &lt;name&gt; clear</code><br/>
  35050. clears routing-table of a repeater-node</p>
  35051. </li>
  35052. <li>
  35053. <p><code>set &lt;name&gt; time</code><br/>
  35054. sets time for nodes (that support it)</p>
  35055. </li>
  35056. <li>
  35057. <p><code>set &lt;name&gt; reboot</code><br/>
  35058. reboots a node (requires a bootloader that supports it).<br/>
  35059. Attention: Nodes that run the standard arduino-bootloader will enter a bootloop!<br/>
  35060. Dis- and reconnect the nodes power to restart in this case.</p>
  35061. </li>
  35062. </ul>
  35063. <a name="MYSENSORS_DEVICEattr"></a>
  35064. <p><b>Attributes</b></p>
  35065. <ul>
  35066. <li>
  35067. <p><code>attr &lt;name&gt; config [&lt;M|I&gt;]</code><br/>
  35068. configures metric (M) or inch (I). Defaults to 'M'</p>
  35069. </li>
  35070. <li>
  35071. <p><code>attr &lt;name&gt; setCommands [&lt;command:reading:value&gt;]*</code><br/>
  35072. configures one or more commands that can be executed by set.<br/>
  35073. e.g.: <code>attr &lt;name&gt; setCommands on:switch_1:on off:switch_1:off</code><br/>
  35074. if list of commands contains both 'on' and 'off' <a href="#setExtensions">set extensions</a> are supported</p>
  35075. </li>
  35076. <li>
  35077. <p><code>attr &lt;name&gt; setReading_&lt;reading&gt; [&lt;value&gt;]*</code><br/>
  35078. configures a reading that can be modified by set-command<br/>
  35079. e.g.: <code>attr &lt;name&gt; setReading_switch_1 on,off</code></p>
  35080. </li>
  35081. <li>
  35082. <p><code>attr &lt;name&gt; mapReading_&lt;reading&gt; &lt;childId&gt; &lt;readingtype&gt; [&lt;value&gt;:&lt;mappedvalue&gt;]*</code><br/>
  35083. configures the reading-name for a given childId and sensortype<br/>
  35084. E.g.: <code>attr xxx mapReading_aussentemperatur 123 temperature</code></p>
  35085. </li>
  35086. <li>
  35087. <p><code>att &lt;name&gt; requestAck</code><br/>
  35088. request acknowledge from nodes.<br/>
  35089. if set the Readings of nodes are updated not before requested acknowledge is received<br/>
  35090. if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).<br/>
  35091. May also be configured on the gateway for all nodes at once</p>
  35092. </li>
  35093. <li>
  35094. <p><code>attr &lt;name&gt; mapReadingType_&lt;reading&gt; &lt;new reading name&gt; [&lt;value&gt;:&lt;mappedvalue&gt;]*</code><br/>
  35095. configures reading type names that should be used instead of technical names<br/>
  35096. E.g.: <code>attr xxx mapReadingType_LIGHT switch 0:on 1:off</code>
  35097. to be used for mysensor Variabletypes that have no predefined defaults (yet)</p>
  35098. </li>
  35099. </ul>
  35100. </ul>
  35101. <a name="MaxScanner"></a>
  35102. <h3>MaxScanner</h3>
  35103. <p>The MaxScanner-Module enables FHEM to capture temperature and valve-position of thermostats in regular intervals. <p/>
  35104. <ul>
  35105. <a name="MaxScannerdefine"></a>
  35106. <b>Define</b>
  35107. <ul>
  35108. <br/>
  35109. <code>define &lt;name&gt; MaxScanner </code>
  35110. <br/>
  35111. </ul>
  35112. <br>
  35113. <a name="MaxScannerset"></a>
  35114. <b>Set-Commands</b>
  35115. <ul>
  35116. <code>set &lt;name&gt; run</code>
  35117. <br/><br/>
  35118. <ul>
  35119. Runs the scanner loop immediately. (Is usually done by timer)
  35120. </ul><br/>
  35121. </ul>
  35122. <a name="MaxScannerget"></a>
  35123. <b>Get-Commands</b>
  35124. <ul>
  35125. <code>get &lt;name&gt; associatedDevices</code><br/><br/>
  35126. <ul>Gets the asscociated devices (thermostats, shutterContacts)</ul><br/>
  35127. </ul>
  35128. <a name="MaxScannerattr"></a>
  35129. <b>Attributes for the Scanner-Device</b><br/><br/>
  35130. <ul>
  35131. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  35132. <li><p><b>disable</b><br/>When value=1, then the scanner device is disabled; possible values: 0,1; default: 0</p></li>
  35133. <li><p><b>scnCreditThreshold</b><br/>the minimum value of available credits; when lower, the scanner will remain inactive; possible values: 150..600; default: 300</p></li>
  35134. <li><p><b>scnMinInterval</b><br/>scan interval in minutes, when the calculated interval is lower,
  35135. then scnMinintervall will be used instead;possible values: 3..60; default: 3</p></li>
  35136. </ul>
  35137. <br/>
  35138. <a name="MaxScannerthermoattr"></a>
  35139. <b>User-Attributes for the Thermostat-Device</b><br/>
  35140. <ul>
  35141. <li><p><b>scanTemp</b><br/>When value=1, then scanner will use the thermostat; possible values: 0,1; default: 0</p></li>
  35142. <li><p><b>scnProcessByDesiChange</b><br/>When value=1, then scanner will use method "desired change" instead of "mode change"; possible values: 0,1; default: 0</p></li>
  35143. <li><p><b>scnModeHandling</b><br/>When scnProcessByDesiChange is active, this attribute select the way of handling the mode of the thermostat; possible values: [NOCHANGE,AUTO,MANUAL];default: AUTO</p></li>
  35144. <li><p><b>scnShutterList</b><br/>comma-separated list of shutterContacts associated with the thermostat</p></li>
  35145. </ul>
  35146. <br/>
  35147. <b>Additional information</b><br/><br/>
  35148. <ul>
  35149. <li><a href="http://forum.fhem.de/index.php/topic,11624.0.html">Discussion in FHEM forum</a></li><br/>
  35150. <li><a href="http://www.fhemwiki.de/wiki/MAX!_Temperatur-Scanner">WIKI information in FHEM Wiki</a></li><br/>
  35151. </ul>
  35152. </ul>
  35153. <a name="MediaList"></a>
  35154. <h3>MediaList</h3>
  35155. <ul>
  35156. This module can support you to navigate trough you local connected
  35157. music library. It can compile complex playlists and als an quick playing of
  35158. an selected whole path.
  35159. <br>
  35160. Note: this module needs the following additional modules:<br>
  35161. <ul>
  35162. <li>libmp3-tag-perl</li>
  35163. <li>libjson-xs-perl</li>
  35164. <li>libmp3-info-perl</li>
  35165. <li>libmath-round-perl</li>
  35166. </ul>
  35167. <br>
  35168. <br>
  35169. <a name="MediaList define"></a>
  35170. <b>Define</b>
  35171. <ul>
  35172. <code>define &lt;name&gt; MediaList &lt;RootPath&gt; </code>
  35173. <br><br>
  35174. Defines a new instanze of MediaList. The Rootpath defines your start directory.
  35175. <br>
  35176. Examples:
  35177. <ul>
  35178. <code>define MyMediaList MediaList /media/music</code><br>
  35179. </ul>
  35180. </ul>
  35181. <br>
  35182. <a name="MediaListReadings"></a>
  35183. <b>Readings</b><br>
  35184. <ul>
  35185. <li><b>CurrentDir</b>:your navigated current directory</li>
  35186. <li><b>FolderContent</b>:the folder content of CurrentDir</li>
  35187. <li><b>SelectedItem</b>:the last selected Item from FolderContent</li>
  35188. <li><b>currentdir_playlist</b>:playlist of CurrentDir</li>
  35189. <li><b>currentdir_playlistduration</b>:duration of currentdir_playlist</li>
  35190. <li><b>playlist</b>:your playlist ;)</li>
  35191. <li><b>playlistduration</b>:duration of your playlist</li>
  35192. </ul>
  35193. <br>
  35194. <a name="MediaListset"></a>
  35195. <b>Set</b>
  35196. <ul>
  35197. <li><b>RequestedDirectory</b><br>
  35198. Moving to given relative directory. An record of Reading <i>FolderContent</i> must be used.
  35199. <br>Example:<br>
  35200. <ul>
  35201. <code>set &lt;MyMediaList&gt; RequestedDirectory AbbaMusic</code><br>
  35202. </ul>
  35203. </li>
  35204. <li><b>Play</b><br>
  35205. Submit the Playlist to your defined Targetdevice. You has to select which playlist you want to submit<br>
  35206. <li><b>currentdir</b>: Submit the playlist of current directory, see Reading <i>currentdir_playlist</i></li>
  35207. <li><b>playlist</b>: Submit the real playlist, see Reading <i>playlist</i></li>
  35208. <br>Example:<br>
  35209. <ul>
  35210. <code>set &lt;MyMediaList&gt; Play currentdir</code><br>
  35211. <code>set &lt;MyMediaList&gt; Play playlist</code><br>
  35212. </ul>
  35213. </li>
  35214. <li><b>Playlist_New</b><br>
  35215. Creates an new playlist.
  35216. <br>Example:<br>
  35217. <ul>
  35218. <code>set &lt;MyMediaList&gt; Playlist_New MyNewPlaylist</code><br>
  35219. </ul>
  35220. </li>
  35221. <li><b>Playlist_Add</b><br>
  35222. Add an Track or complete currentdir to your playlist<br>
  35223. <br>Example:
  35224. <ul>
  35225. <code>set &lt;MyMediaList&gt; Playlist_Add 0</code><br>
  35226. Add first Track from Reading <i>currentdir_playlist</i> to your playlist<br>
  35227. <code>set &lt;MyMediaList&gt; Playlist_Add</code><br>
  35228. Add all Tracks from Reading <i>currentdir_playlist</i> to your playlist<br>
  35229. </ul>
  35230. </li>
  35231. <li><b>Playlist_Del</b><br>
  35232. Deletes an Track from your playlist.
  35233. <br>Example:<br>
  35234. <ul>
  35235. <code>set &lt;MyMediaList&gt; Playlist_Del 0</code><br>
  35236. Drops first Track from your Playlist
  35237. </ul>
  35238. </li>
  35239. <li><b>Playlist_Empty</b><br>
  35240. Makes your playlist empty.
  35241. <br>Example:<br>
  35242. <ul>
  35243. <code>set &lt;MyMediaList&gt; Playlist_Empty</code><br>
  35244. </ul>
  35245. </li>
  35246. </ul>
  35247. <br>
  35248. <a name="MediaListget"></a>
  35249. <b>Get</b>
  35250. <ul>N/A</ul><br>
  35251. <a name="MediaListattr"></a>
  35252. <b>Attributes</b>
  35253. <ul>
  35254. <li><b>MediaList_PlayerDevice</b><br>
  35255. Definition of your Traget Player Device
  35256. <br>Example:
  35257. <ul>
  35258. <code>attr &lt;MyMediaList&gt; MediaList_PlayerDevice Sonos_LivingRoom</code><br>
  35259. <br>
  35260. </ul>
  35261. </li>
  35262. <li><b>MediaList_PathReplaceFrom</b><br>
  35263. Rewrite the local mediapath to an accessible path by Targetdevice. This Attribut define the FROM pattern.
  35264. <br>Example:
  35265. <ul>
  35266. <code>attr &lt;MyMediaList&gt; MediaList_PathReplaceFrom /media/music/</code><br>
  35267. <br>
  35268. </ul>
  35269. </li>
  35270. <li><b>MediaList_PathReplaceTo</b><br>
  35271. Rewrite the local mediapath to an accessible path by Targetdevice. This Attribut define the TO pattern.
  35272. <br>Example:
  35273. <ul>
  35274. <code>attr &lt;MyMediaList&gt; MediaList_PathReplaceTo \\NAS/music/</code><br>
  35275. <br>
  35276. </ul>
  35277. </li>
  35278. <li><b>MediaList_PathReplaceToPic</b><br>
  35279. Rewrites the local Cover path to an accessible path your Webbrowser, TabletUI. This Attribut define the TO pattern.
  35280. The FROM pattern are defined by <i>MediaList_PathReplaceFrom</i>
  35281. <br>Example:
  35282. <ul>
  35283. <code>attr &lt;MyMediaList&gt; MediaList_PathReplaceToPic https://192.168.1.30/music/</code><br>
  35284. <br>For this example you has to share your music directory via Webserver
  35285. </ul>
  35286. </li>
  35287. <li><b>MediaList_PlayerStartCommand</b><br>
  35288. Definition of the Startcommand for your Targetdevice.
  35289. <br>Example:
  35290. <ul>
  35291. <code>attr &lt;MyMediaList&gt; MediaList_PlayerStartCommand StartPlaylist file:&lt;fullfile&gt;</code><br>
  35292. <br> Command to insert the playlist into your Targetdevice ans starts playing. The definition of <i>fullfile</i>
  35293. defines a internal dummy to rewrite it by a real playlistname
  35294. </ul>
  35295. </li>
  35296. <li><b>MediaList_CacheFileDir</b><br>
  35297. Definition of your cachefiledir. In this directory the playlist.m3u will be created. In cases of symlinks or
  35298. music-copies, this directory will be used
  35299. <br>Example:
  35300. <ul>
  35301. <code>attr &lt;MyMediaList&gt; MediaList_CacheFileDir /var/lib/mpd/playlists/</code><br>
  35302. <code>attr &lt;MyMediaList&gt; MediaList_CacheFileDir cache/</code><br>
  35303. </ul>
  35304. </li>
  35305. <li><b>MediaList_mkTempCopy</b><br>
  35306. Definition if you want a playlist with remote files or local accessible files.<br>
  35307. In case of using an sonos device, an remote file based playlist is sufficient.<br>
  35308. In case of using an MPD, local files in MPD music directory must be used
  35309. <br>Example:
  35310. <ul>
  35311. <code>attr &lt;MyMediaList&gt; MediaList_mkTempCopy none</code><br>
  35312. In case of an Sonos Device<br>
  35313. <code>attr &lt;MyMediaList&gt; MediaList_mkTempCopy symlink</code><br>
  35314. In case of an MPD Device
  35315. </ul>
  35316. </li>
  35317. </ul>
  35318. </ul>
  35319. <a name="MilightBridge"></a>
  35320. <h3>MilightBridge</h3>
  35321. <ul>
  35322. <p>This module is the interface to a Milight Bridge which is connected to the network using a Wifi connection. It uses a UDP protocal with no acknowledgement so there is no guarantee that your command was received.</p>
  35323. <p>The Milight system is sold under various brands around the world including "LimitlessLED, EasyBulb, AppLamp"</p>
  35324. <p>The API documentation is available here: <a href="http://www.limitlessled.com/dev/">http://www.limitlessled.com/dev/</a></p>
  35325. <a name="MilightBridge_define"></a>
  35326. <p><b>Define</b></p>
  35327. <ul>
  35328. <p><code>define &lt;name&gt; MilightBridge &lt;host/ip:port&gt;</code></p>
  35329. <p>Specifies the MilightBridge device.<br/>
  35330. &lt;host/ip&gt; is the hostname or IP address of the Bridge with optional port (defaults to 8899 if not defined, use 50000 for V1,V2 bridges)</p>
  35331. </ul>
  35332. <a name="MilightBridge_readings"></a>
  35333. <p><b>Readings</b></p>
  35334. <ul>
  35335. <li>
  35336. <b>state</b><br/>
  35337. [Initialized|ok|unreachable]: Shows reachable status of bridge using "ping" check every 10 (checkInterval) seconds.
  35338. </li>
  35339. <li>
  35340. <b>sendFail</b><br/>
  35341. 0 if everything is OK. 1 if the send function was unable to send the command - this would indicate a problem with your network and/or host/port parameters.
  35342. </li>
  35343. <li>
  35344. <b>slot[0|1|2|3|4|5|6|7|8]</b><br/>
  35345. The slotX reading will display the name of the <a href="#MilightDevice">MilightDevice</a> that is defined with this Bridge as it's <a href="#IODev">IODev</a>. It will be blank if no device is defined for that slot.
  35346. </li>
  35347. </ul>
  35348. <a name="MilightBridge_attr"></a>
  35349. <p><b>Attributes</b></p>
  35350. <ul>
  35351. <li>
  35352. <b>sendInterval</b><br/>
  35353. Default: 100ms. The bridge has a minimum send delay of 100ms between commands.
  35354. </li>
  35355. <li>
  35356. <b>checkInterval</b><br/>
  35357. Default: 10s. Time after the bridge connection is re-checked.<br>
  35358. If this is set to 0 checking is disabled and state = "Initialized".
  35359. </li>
  35360. <li>
  35361. <b>protocol</b><br/>
  35362. Default: udp. Change to tcp if you have enabled tcp mode on your bridge.
  35363. </li>
  35364. <li>
  35365. <b>tcpPing</b><br/>
  35366. If this attribute is defined, ping will use TCP instead of UDP.
  35367. </li>
  35368. </ul>
  35369. </ul>
  35370. <a name="MilightDevice"></a>
  35371. <h3>MilightDevice</h3>
  35372. <ul>
  35373. <p>This module represents a Milight LED Bulb or LED strip controller. It is controlled by a <a href="#MilightBridge">MilightBridge</a>.</p>
  35374. <p>The Milight system is sold under various brands around the world including "LimitlessLED, EasyBulb, AppLamp"</p>
  35375. <p>The API documentation is available here: <a href="http://www.limitlessled.com/dev/">http://www.limitlessled.com/dev/</a></p>
  35376. <p>Requires perl module Math::Round</p>
  35377. <a name="MilightDevice_define"></a>
  35378. <p><b>Define</b></p>
  35379. <ul>
  35380. <p><code>define &lt;name&gt; MilightDevice &lt;devType(RGB|RGBW|White)&gt; &lt;IODev&gt; &lt;slot&gt;</code></p>
  35381. <p>Specifies the Milight device.<br/>
  35382. &lt;devType&gt; One of RGB, RGBW, White depending on your device.<br/>
  35383. &lt;IODev&gt; The <a href="#MilightBridge">MilightBridge</a> which the device is paired with.<br/>
  35384. &lt;slot&gt; The slot on the <a href="#MilightBridge">MilightBridge</a> that the device is paired with or 'A' to group all slots.</p>
  35385. </ul>
  35386. <a name="MilightDevice_readings"></a>
  35387. <p><b>Readings</b></p>
  35388. <ul>
  35389. <li>
  35390. <b>state</b><br/>
  35391. [on xxx|off|night]: Current state of the device / night mode (xxx = 0-100%).
  35392. </li>
  35393. <li>
  35394. <b>brightness</b><br/>
  35395. [0-100]: Current brightness level in %.
  35396. </li>
  35397. <li>
  35398. <b>brightness_on</b><br/>
  35399. [0-100]: The brightness level before the off command was sent. This allows the light to turn back on to the last brightness level.
  35400. </li>
  35401. <li>
  35402. <b>rgb</b><br/>
  35403. [FFFFFF]: HEX value for RGB.
  35404. </li>
  35405. <li>
  35406. <b>previousState</b><br/>
  35407. [hsv]: hsv value before last change. Can be used with <b>restorePreviousState</b> set command.
  35408. </li>
  35409. <li>
  35410. <b>savedState</b><br/>
  35411. [hsv]: hsv value that was saved using <b>saveState</b> set function
  35412. </li>
  35413. <li>
  35414. <b>hue</b><br/>
  35415. [0-360]: Current hue value.
  35416. </li>
  35417. <li>
  35418. <b>saturation</b><br/>
  35419. [0-100]: Current saturation value.
  35420. </li>
  35421. <li>
  35422. <b>transitionInProgress</b><br/>
  35423. [0|1]: Set to 1 if a transition is currently in progress for this device (eg. fade).
  35424. </li>
  35425. <li>
  35426. <b>discoMode</b><br/>
  35427. [0|1]: 1 if discoMode is enabled, 0 otherwise.
  35428. </li>
  35429. <li>
  35430. <b>discoSpeed</b><br/>
  35431. [0|1]: 1 if discoSpeed is increased, 0 if decreased. Does not mean much for RGBW
  35432. </li>
  35433. <li>
  35434. <b>lastPreset</b><br/>
  35435. [0..X]: Last selected preset.
  35436. </li>
  35437. <li>
  35438. <b>ct</b><br/>
  35439. [1-10]: Current colour temperature (3000=Warm,6500=Cold) for White devices.
  35440. </li>
  35441. </ul>
  35442. <a name="MilightDevice_set"></a>
  35443. <p><b>Set</b></p>
  35444. <ul>
  35445. <li>
  35446. <b>on &lt;ramp_time (seconds)></b>
  35447. </li>
  35448. <li>
  35449. <b>off &lt;ramp_time (seconds)></b>
  35450. </li>
  35451. <li>
  35452. <b>toggle</b>
  35453. </li>
  35454. <li>
  35455. <b>night</b>
  35456. </li>
  35457. <li>
  35458. <b>dim &lt;percent(0..100)&gt; [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
  35459. Will be replaced by <i>brightness</i> at some point
  35460. </li>
  35461. <li>
  35462. <b>dimup &lt;percent change(0..100)&gt; [seconds(0..x)]</b><br/>
  35463. Special case: If percent change=100, seconds will be adjusted for actual change to go from current brightness.
  35464. </li>
  35465. <li>
  35466. <b>dimdown &lt;percent change(0..100)&gt; [seconds(0..x)]</b><br/>
  35467. Special case: If percent change=100, seconds will be adjusted for actual change to go from current brightness.
  35468. </li>
  35469. <li>
  35470. <b>pair</b><br/>
  35471. May not work properly. Sometimes it is necessary to use a remote to clear pairing first.
  35472. </li>
  35473. <li>
  35474. <b>unpair</b><br/>
  35475. May not work properly. Sometimes it is necessary to use a remote to clear pairing first.
  35476. </li>
  35477. <li>
  35478. <b>restorePreviousState</b><br/>
  35479. Set device to previous hsv state as stored in <b>previousState</b> reading.
  35480. </li>
  35481. <li>
  35482. <b>saveState</b><br/>
  35483. Save current hsv state to <b>savedState</b> reading.
  35484. </li>
  35485. <li>
  35486. <b>restoreState</b><br/>
  35487. Set device to saved hsv state as stored in <b>savedState</b> reading.
  35488. </li>
  35489. <li>
  35490. <b>preset (0..X|+)</b><br/>
  35491. Load preset (+ for next preset).
  35492. </li>
  35493. <li>
  35494. <b>hsv &lt;h(0..360)&gt;,&lt;s(0..100)&gt;,&lt;v(0..100)&gt; [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
  35495. Set hsv value directly
  35496. </li>
  35497. <li>
  35498. <b>rgb RRGGBB [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
  35499. Set rgb value directly or using colorpicker.
  35500. </li>
  35501. <li>
  35502. <b>hue &lt;(0..360)&gt; [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
  35503. Set hue value.
  35504. </li>
  35505. <li>
  35506. <b>saturation &lt;s(0..100)&gt; [seconds(0..x)] [flags(q=don't clear queue)]</b><br/>
  35507. Set saturation value directly
  35508. </li>
  35509. <li>
  35510. <b>discoModeUp</b><br/>
  35511. Next disco Mode setting (for RGB and RGBW).
  35512. </li>
  35513. <li>
  35514. <b>discoModeDown</b><br/>
  35515. Previous disco Mode setting (for RGB).
  35516. </li>
  35517. <li>
  35518. <b>discoSpeedUp</b><br/>
  35519. Increase speed of disco mode (for RGB and RGBW).
  35520. </li>
  35521. <li>
  35522. <b>discoSpeedDown</b><br/>
  35523. Decrease speed of disco mode (for RGB and RGBW).
  35524. </li>
  35525. <li>
  35526. <b>ct &lt;3000-6500&gt;</b><br/>
  35527. Colour temperature 3000=Warm White,6500=Cold White (10 steps) (for White devices only).
  35528. </li>
  35529. <li>
  35530. <a href="#setExtensions"> set extensions</a> are supported.
  35531. </li>
  35532. </ul>
  35533. <a name="MilightDevice_get"></a>
  35534. <p><b>Get</b></p>
  35535. <ul>
  35536. <li>
  35537. <b>rgb</b>
  35538. </li>
  35539. <li>
  35540. <b>hsv</b>
  35541. </li>
  35542. </ul>
  35543. <a name="MilightDevice_attr"></a>
  35544. <p><b>Attributes</b></p>
  35545. <ul>
  35546. <li>
  35547. <b>dimStep</b><br/>
  35548. Allows you to modify the default dimStep if required.
  35549. </li>
  35550. <li>
  35551. <b>defaultRampOn</b><br/>
  35552. Set the default ramp time if not specified for on command.
  35553. </li>
  35554. <li>
  35555. <b>defaultRampOff</b><br/>
  35556. Set the default ramp time if not specified for off command.
  35557. </li>
  35558. <li>
  35559. <b>presets</b><br/>
  35560. List of hsv presets separated by spaces (eg 0,0,100 9,0,50).
  35561. </li>
  35562. <li>
  35563. <b>colorCast</b><br/>
  35564. Color shift values for red,yellow,green,cyan,blue,magenta (-29..29) for HSV color correction (eg 0,5,10,-5,0,0)
  35565. </li>
  35566. <li>
  35567. <b>gamma</b><br/>
  35568. Set gamma correction value for device (eg 0.8)
  35569. </li>
  35570. <li>
  35571. <b>dimOffWhite</b><br/>
  35572. Use a different switching logic for White bulbs to better handle packet loss.
  35573. </li>
  35574. <li>
  35575. <b>updateGroupDevices</b><br/>
  35576. Update the state of single devices switched with slot 'A'.
  35577. </li>
  35578. <li>
  35579. <b>restoreAtStart</b><br/>
  35580. Restore the state of devices at startup. Default 0 for slot 'A', 1 otherwise.
  35581. </li>
  35582. <li>
  35583. <b>defaultBrightness</b><br/>
  35584. Set the default brightness if not known. (Default: 36)
  35585. </li>
  35586. </ul>
  35587. </ul>
  35588. <a name="Modbus"></a>
  35589. <h3>Modbus</h3>
  35590. <ul>
  35591. Modbus defines a physical modbus interface and functions to be called from other logical modules / devices.
  35592. This low level module takes care of the communication with modbus devices and provides Get, Set and cyclic polling
  35593. of Readings as well as formatting and input validation functions.
  35594. The logical device modules for individual machines only need to define the supported modbus function codes and objects of the machine with the modbus interface in data structures. These data structures are then used by this low level module to implement Set, Get and automatic updateing of readings in a given interval.
  35595. <br>
  35596. This version of the Modbus module supports Modbus RTU and ASCII over serial / RS485 lines as well as Modbus TCP and Modbus RTU or RTU over TCP.
  35597. It defines read / write functions for Modbus holding registers, input registers, coils and discrete inputs.
  35598. <br><br>
  35599. <b>Prerequisites</b>
  35600. <ul>
  35601. <li>
  35602. This module requires the Device::SerialPort or Win32::SerialPort module.
  35603. </li>
  35604. </ul>
  35605. <br>
  35606. <a name="ModbusDefine"></a>
  35607. <b>Define</b>
  35608. <ul>
  35609. <code>define &lt;name&gt; Modbus &lt;device&gt; </code>
  35610. <br><br>
  35611. A define of a physical device based on this module is only necessary if a shared physical device like a RS485 USB adapter is used. In the case of Modbus TCP this module will be used as a library for other modules that define all the data objects and no define of the base module is needed.
  35612. <br>
  35613. Example:<br>
  35614. <br>
  35615. <ul><code>define ModBusLine Modbus /dev/ttyUSB1@9600</code></ul>
  35616. <br>
  35617. In this example the module opens the given serial interface and other logical modules can access several Modbus devices connected to this bus concurrently.
  35618. If your device needs special communications parameters like even parity you can add the number of data bits, the parity and the number of stopbits separated by commas after the baudrate e.g.:
  35619. <br>
  35620. <ul><code>define ModBusLine Modbus /dev/ttyUSB2@38400,8,E,2</code></ul>
  35621. <br>
  35622. </ul>
  35623. <br>
  35624. <a name="ModbusSet"></a>
  35625. <b>Set-Commands</b><br>
  35626. <ul>
  35627. this low level device module doesn't provide set commands for itself but implements set
  35628. for logical device modules that make use of this module. See ModbusAttr for example.
  35629. </ul>
  35630. <br>
  35631. <a name="ModbusGet"></a>
  35632. <b>Get-Commands</b><br>
  35633. <ul>
  35634. this low level device module doesn't provide get commands for itself but implements get
  35635. for logical device modules that make use of this module.
  35636. </ul>
  35637. <br>
  35638. <a name="ModbusAttr"></a>
  35639. <b>Attributes</b><br><br>
  35640. <ul>
  35641. <li><a href="#do_not_notify">do_not_notify</a></li>
  35642. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  35643. <br>
  35644. <li><b>queueDelay</b></li>
  35645. modify the delay used when sending requests to the device from the internal queue, defaults to 1 second <br>
  35646. <li><b>busDelay</b></li>
  35647. defines a delay that is always enforced between the last read from the bus and the next send to the bus for all connected devices<br>
  35648. <li><b>clientSwitchDelay</b></li>
  35649. defines a delay that is always enforced between the last read from the bus and the next send to the bus for all connected devices but only if the next send goes to a different device than the last one<br>
  35650. <li><b>dropQueueDoubles</b></li>
  35651. prevents new request to be queued if the same request is already in the send queue<br>
  35652. <li><b>skipGarbage</b></li>
  35653. if set to 1 this attribute will enhance the way the module treats Modbus response frames (RTU over serial lines) that look as if they have a wrong Modbus id as their first byte. If skipGarbage is set to 1 then the module will skip all bytes until a byte with the expected modbus id is seen. Under normal circumstances this behavior should not do any harm and lead to more robustness. However since it changes the original behavior of this module it has to be turned on explicitely.<br>
  35654. For Modbus ASCII it skips bytes until the expected starting byte ":" is seen.
  35655. <li><b>profileInterval</b></li>
  35656. if set to something non zero it is the time period in seconds for which the module will create bus usage statistics.
  35657. Please note that this number should be at least twice as big as the interval used for requesting values in logical devices that use this physical device<br>
  35658. The bus usage statistics create the following readings:
  35659. <ul>
  35660. <li><b>Profiler_Delay_sum</b></li>
  35661. seconds used as delays to implement the defined sendDelay and commDelay
  35662. <li><b>Profiler_Fhem_sum</b></li>
  35663. seconds spend processing in the module
  35664. <li><b>Profiler_Idle_sum</b></li>
  35665. idle time
  35666. <li><b>Profiler_Read_sum</b></li>
  35667. seconds spent reading and validating the data read
  35668. <li><b>Profiler_Send_sum</b></li>
  35669. seconds spent preparing and sending data
  35670. <li><b>Profiler_Wait_sum</b></li>
  35671. seconds waiting for a response to a request
  35672. <li><b>Statistics_Requests</b></li>
  35673. number of requests sent
  35674. <li><b>Statistics_Timeouts</b></li>
  35675. timeouts encountered
  35676. </ul>
  35677. </ul>
  35678. <br>
  35679. </ul>
  35680. <a name="ModbusAttr"></a>
  35681. <h3>ModbusAttr</h3>
  35682. <ul>
  35683. ModbusAttr uses the low level Modbus module 98_Modbus.pm to provide a generic Modbus module for devices that can be defined by attributes similar to the way HTTPMOD works for devices with a web interface.
  35684. <br><br>
  35685. <b>Prerequisites</b>
  35686. <ul>
  35687. <li>
  35688. This module requires the basic Modbus module which itsef requires DevIO which again requires Device::SerialPort or Win32::SerialPort module if you connect devices to a serial port.
  35689. </li>
  35690. </ul>
  35691. <br>
  35692. <a name="ModbusAttrDefine"></a>
  35693. <b>Define</b>
  35694. <ul>
  35695. <code>define &lt;name&gt; ModbusAttr &lt;Id&gt; &lt;Interval&gt;</code><br>
  35696. or<br>
  35697. <code>define &lt;name&gt; ModbusAttr &lt;Id&gt; &lt;Interval&gt; &lt;Address:Port&gt; &lt;RTU|ASCII|TCP&gt;</code><br>
  35698. <br>
  35699. The module connects to the Modbus device with Modbus Id &lt;Id&gt; through an already defined serial modbus device (RS232 or RS485) or directly through Modbus TCP or Modbus RTU or ASCII over TCP and actively requests data from that device every &lt;Interval&gt; seconds <br>
  35700. <br>
  35701. Examples:<br>
  35702. <br>
  35703. <ul><code>define WP ModbusAttr 1 60</code></ul><br>
  35704. to go through a serial interface managed by an already defined basic modbus device. The protocol defaults to Modbus RTU<br>
  35705. or <br>
  35706. <ul><code>define WP ModbusAttr 20 0 ASCII</code></ul><br>
  35707. to go through a serial interface managed by an already defined basic modbus device with Modbus ASCII. Use Modbus Id 20 and don't query the device in a defined interval. Instead individual SET / GET options have to be used for communication.<br>
  35708. or <br>
  35709. <ul><code>define WP ModbusAttr 5 60 192.168.1.122:504 TCP</code></ul><br>
  35710. to talk Modbus TCP <br>
  35711. or <br>
  35712. <ul><code>define WP ModbusAttr 3 60 192.168.1.122:8000 RTU</code></ul><br>
  35713. to talk Modbus RTU over TCP<br>
  35714. </ul>
  35715. <br>
  35716. <a name="ModbusAttrConfiguration"></a>
  35717. <b>Configuration of the module</b><br><br>
  35718. <ul>
  35719. The data objects (holding registers, input registers, coils or discrete inputs) of the device to be queried are defined using attributes.
  35720. The attributes assign objects with their address to readings inside fhem and control
  35721. how these readings are calculated from the raw values and how they are formatted.<br>
  35722. Objects can also be written to the device and attributes define how this is done.<br><br>
  35723. Example:<br>
  35724. <pre>
  35725. define PWP ModbusAttr 5 30
  35726. attr PWP obj-h256-reading Temp_Wasser_ein
  35727. attr PWP obj-h256-expr $val/10
  35728. attr PWP obj-h258-reading Temp_Wasser_Aus
  35729. attr PWP obj-h258-expr $val/10
  35730. attr PWP obj-h262-reading Temp_Luft
  35731. attr PWP obj-h262-expr $val / 10
  35732. attr PWP obj-h770-reading Temp_Soll
  35733. attr PWP obj-h770-expr $val / 10
  35734. attr PWP obj-h770-set 1
  35735. attr PWP obj-h770-setexpr $val * 10
  35736. attr PWP obj-h770-max 32
  35737. attr PWP obj-h770-min 10
  35738. attr PWP obj-h770-hint 8,10,20,25,28,29,30,30.5,31,31.5,32
  35739. attr PWP dev-h-combine 5
  35740. attr PWP dev-h-defPoll 1
  35741. attr PWP room Pool-WP
  35742. attr PWP stateFormat {sprintf("%.1f Grad", ReadingsVal($name,"Temp_Wasser_Ein",0))}
  35743. attr PWP webCmd Temp_Soll
  35744. </pre>
  35745. Attributes to define data objects start with obj- followed by a code that identifies the type and address
  35746. of the data object. <br>
  35747. Modbus devices offer the following types of data objects:
  35748. <ul>
  35749. <li> holding registers (16 bit objects that can be read and written)</li>
  35750. <li> input registers (16 bit objects that can only be read)</li>
  35751. <li> coils (single bit objects that can be read and written)</li>
  35752. <li> discrete inputs (single bit objects that can only be read)</li>
  35753. </ul>
  35754. <br>
  35755. The module uses the first character of these data object types to define attributes.
  35756. Thus h770 refers to a holding register with the decimal address 770 and c120 refers to a coil with address 120.
  35757. The address has to be specified as pure decimal number. The address counting starts at address 0<br><br>
  35758. <code>attr PWP obj-h258-reading Temp_Wasser_Aus</code> defines a reading with the name Temp_Wasser_Aus that is read from the Modbus holding register at address 258.<br>
  35759. With the attribute ending on <code>-expr</code> you can define a perl expression to do some conversion or calculation on the raw value read from the device.
  35760. In the above example the raw value has to be devided by 10 to get the real value. If the raw value is also the final value then no <code>-expr</code> attribute is necessary. <br><br>
  35761. An object attribute ending on <code>-set</code> creates a fhem set option.
  35762. In the above example the reading Temp_Soll can be changed to 12 degrees by the user with the fhem command <code>set PWP Temp_Soll 12</code><br>
  35763. The object attributes ending on <code>-min</code> and <code>-max</code> define min and max values for input validation
  35764. and the attribute ending on <code>-hint</code> will tell fhem to create a selection list so the user can graphically select the defined values.<br><br>
  35765. To define general properties of the device you can specify attributes starting with <code>dev-</code>.
  35766. E.g. with <code>dev-timing-timeout</code> you can specify the timeout when waiting for a response from the device.
  35767. With <code>dev-h-</code> you can specify several default values or general settings for all holding registers
  35768. like the function code to be used when reading or writing holding registers.
  35769. These attributes are optional and the module will use defaults that work in most cases. <br>
  35770. <code>dev-h-combine 5</code> for example allows the module to combine read requests to objects having an address that differs 5 or less into one read request.
  35771. Without setting this attribute the module will start individual read requests for each object.
  35772. Typically the documentation for the modbus interface of a given device states the maximum number of objects that can be read in one function code 3 request.
  35773. </ul>
  35774. <a name="ModbusAttrSet"></a>
  35775. <b>Set-Commands</b><br>
  35776. <ul>
  35777. are created based on the attributes defining the data objects.<br>
  35778. Every object for which an attribute like <code>obj-xy-set</code> is set to 1 will create a valid set option.<br>
  35779. Additionally the attribute <code>enableControlSet</code> enables the set options <code>interval</code>, <code>stop</code>, <code>start</code>, <code>reread</code> as well as <code>scanModbusObjects</code>, <code>scanStop</code> and <code>scanModbusIds</code> (for devices connected with RTU / ASCII over a serial line).
  35780. <ul>
  35781. <li><code>interval &lt;Interval&gt;</code></li>
  35782. modifies the interval that was set during define.
  35783. <li><code>stop</code></li>
  35784. stops the interval timer that is used to automatically poll objects through modbus.
  35785. <li><code>start</code></li>
  35786. starts the interval timer that is used to automatically poll objects through modbus. If an interval is specified during the define command then the interval timer is started automatically. However if you stop it with the command <code>set &lt;mydevice&gt; stop</code> then you can start it again with <code>set &lt;mydevice&gt; start</code>.
  35787. <li><code>reread</code></li>
  35788. causes a read of all objects that are set to be polled in the defined interval. The interval timer is not modified.
  35789. <br>
  35790. <li><code>scanModbusObjects &lt;startObj&gt; - &lt;endObj&gt; &lt;reqLen&gt;</code></li>
  35791. scans the device objects and automatically creates attributes for each reply it gets. This might be useful for exploring devices without proper documentation. The following example starts a scan and queries the
  35792. holding registers with addresses between 100 and 120. <br>
  35793. <code>set MyModbusAttrDevice scanModbusObjects h100-120</code><br>
  35794. For each reply it gets, the module creates a reading like<br>
  35795. <code>scan-h100 hex=0021, string=.!, s=8448, s>=33, S=8448, S>=33</code><br>
  35796. the representation of the result as hex is 0021 and
  35797. the ASCII representation is .!. s, s>, S and S> are different representations with their Perl pack-code.
  35798. <li><code>scanModbusIds &lt;startId&gt; - &lt;endId&gt; &lt;knownObj&gt;</code></li>
  35799. scans for Modbus Ids on an RS485 Bus. The following set command for example starts a scan:<br>
  35800. <code>set Device scanModbusId 1-7 h770</code><br>
  35801. since many modbus devices don't reply at all if an object is requested that does not exist, scanModbusId
  35802. needs the adress of an object that is known to exist.
  35803. If a device with Id 5 replies to a read request for holding register 770, a reading like the following will be created:<br>
  35804. <code>scanId-5-Response-h770 hex=0064, string=.d, s=25600, s>=100, S=25600, S>=100</code>
  35805. <li><code>scanStop</code></li>
  35806. stops any running scans.
  35807. <li><code>saveAsModule &lt;name&gt;</code></li>
  35808. experimental: saves the definitions of obj- and dev- attributes in a new fhem module file as /tmp/98_ModbusGen&lt;name&gt;.pm.<br>
  35809. if this file is copied into the fhem module subdirectory (e.g. /opt/fhem/FHEM) and fhem is restarted then instead of defining a device
  35810. as ModbusAttr with all the attributes to define objects, you can just define a device of the new type ModbusGen&lt;name&gt; and all the
  35811. objects will be there by default. However all definitions can still be changed / overriden with the attribues defined in ModbusAttr if needed.
  35812. </ul>
  35813. </ul>
  35814. <br>
  35815. <a name="ModbusAttrGet"></a>
  35816. <b>Get-Commands</b><br>
  35817. <ul>
  35818. All readings are also available as Get commands. Internally a Get command triggers the corresponding
  35819. request to the device and then interprets the data and returns the right field value.
  35820. To avoid huge option lists in FHEMWEB, the objects visible as Get in FHEMWEB can be defined by setting an attribute <code>obj-xy-showGet</code> to 1.
  35821. </ul>
  35822. <br>
  35823. <a name="ModbusAttrattr"></a>
  35824. <b>Attributes</b><br><br>
  35825. <ul>
  35826. <li><a href="#do_not_notify">do_not_notify</a></li>
  35827. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  35828. <br>
  35829. <li><b>alignTime</b></li>
  35830. Aligns each periodic read request for the defined interval to this base time. This is typcally something like 00:00 (see the Fhem at command)
  35831. <li><b>enableControlSet</b></li>
  35832. enables the built in set commands like interval, stop, start and reread (see above)
  35833. <br>
  35834. please also notice the attributes for the physical modbus interface as documented in 98_Modbus.pm
  35835. <br>
  35836. the following list of attributes can be applied to any data object by specifying the objects type and address in the variable part.
  35837. For many attributes you can also specify default values per object type (see dev- attributes later) or you can specify an object attribute without type and address
  35838. (e.g. obj-len) which then applies as default for all objects:
  35839. <li><b>obj-[cdih][1-9][0-9]*-reading</b></li>
  35840. define the name of a reading that corresponds to the modbus data object of type c,d,i or h and a decimal address (e.g. obj-h225-reading).
  35841. <br>
  35842. <li><b>obj-[cdih][1-9][0-9]*-name</b></li>
  35843. defines an optional internal name of this data object (this has no meaning for fhem and serves mainly documentation purposes.
  35844. <br>
  35845. <li><b>obj-[cdih][1-9][0-9]*-set</b></li>
  35846. if set to 1 then this data object can be changed (works only for holding registers and coils since discrete inputs and input registers can not be modified by definition.
  35847. <br>
  35848. <li><b>obj-[cdih][1-9][0-9]*-min</b></li>
  35849. defines a lower limit to the value that can be written to this data object. This ist just used for input validation.
  35850. <br>
  35851. <li><b>obj-[cdih][1-9][0-9]*-max</b></li>
  35852. defines an upper limit to the value that can be written to this data object. This ist just used for input validation.
  35853. <br>
  35854. <li><b>obj-[cdih][1-9][0-9]*-hint</b></li>
  35855. this is used for set options and tells fhemweb what selection to display for the set option (list or slider etc.)
  35856. <br>
  35857. <li><b>obj-[cdih][1-9][0-9]*-expr</b></li>
  35858. defines a perl expression that converts the raw value read from the device.
  35859. <br>
  35860. <li><b>obj-[cdih][1-9][0-9]*-ignoreExpr</b></li>
  35861. defines a perl expression that returns 1 if a value should be ignored and the existing reading should not be modified
  35862. <br>
  35863. <li><b>obj-[cdih][1-9][0-9]*-map</b></li>
  35864. defines a map to convert values read from the device to more convenient values when the raw value is read from the device
  35865. or back when the value to write has to be converted from the user value to a raw value that can be written.
  35866. Example: 0:mittig, 1:oberhalb, 2:unterhalb
  35867. <br>
  35868. <li><b>obj-[cdih][1-9][0-9]*-setexpr</b></li>
  35869. defines a perl expression that converts the user specified value in a set to a raw value that can be sent to the device.
  35870. This is typically the inversion of -expr above.
  35871. <br>
  35872. <li><b>obj-[cdih][1-9][0-9]*-format</b></li>
  35873. defines a format string to format the value read e.g. %.1f
  35874. <br>
  35875. <li><b>obj-[cdih][1-9][0-9]*-len</b></li>
  35876. defines the length of the data object in registers. It defaults to 1.
  35877. Some devices store 32 bit floating point values in two registers. In this case you should set this attribute to two.
  35878. <br>
  35879. <li><b>obj-[cdih][1-9][0-9]*-unpack</b></li>
  35880. defines the unpack code to convert the raw data string read from the device to a reading.
  35881. For an unsigned integer in big endian format this would be "n",
  35882. for a signed 16 bit integer in big endian format this would be "s>"
  35883. and for a 32 bit big endian float value this would be "f>". (see the perl documentation of the pack function).<br>
  35884. Please note that you also have to set a -len attribute (for this object or for the device) if you specify an unpack code that consumes data from more than one register.<br>
  35885. For a 32 bit float len should be at least 2.
  35886. <br>
  35887. <li><b>obj-[cdih][1-9][0-9]*-revRegs</b></li>
  35888. this is only applicable to objects that span several input registers or holding registers. <br>
  35889. when they are read then the order of the registers will be reversed before
  35890. further interpretation / unpacking of the raw register string. The same happens before the object is written with a set command.
  35891. <br>
  35892. <li><b>obj-[cdih][1-9][0-9]*-bswapRegs</b></li>
  35893. this is applicable to objects that span several input or holding registers. <br>
  35894. After the registers have been read and before they are writtem, all 16-bit values are treated big-endian and are reversed to little-endian by swapping the two 8 bit bytes.
  35895. This functionality is most likely used for reading (ASCII) strings from the device that are stored as big-endian 16-bit values. <br>
  35896. example: original reading is "324d3130203a57577361657320722020". After applying bswapRegs, the value will be "4d3230313a2057576173736572202020"
  35897. which will result in the ASCII string "M201: WWasser ". Should be used with "(a*)" as -unpack value.
  35898. <br>
  35899. <li><b>obj-[cdih][1-9][0-9]*-decode</b></li>
  35900. defines an encoding to be used in a call to the perl function decode to convert the raw data string read from the device to a reading.
  35901. This can be used if the device delivers strings in an encoding like cp850 instead of utf8.
  35902. <br>
  35903. <li><b>obj-[cdih][1-9][0-9]*-encode</b></li>
  35904. defines an encoding to be used in a call to the perl function encode to convert the raw data string read from the device to a reading.
  35905. This can be used if the device delivers strings in an encoding like cp850 and after decoding it you want to reencode it to e.g. utf8.
  35906. <br>
  35907. <li><b>obj-[ih][1-9][0-9]*-type</b></li>
  35908. defines that this object has a user defined data type. Data types can be defined using the dev-type- attribues.<br>
  35909. If a device with many objects uses for example floating point values that span two swapped registers with the unpack code f>, then instead of specifying the -unpack, -revRegs, -len, -format and other attributes over and over again, you could define a data type with attributes that start with dev-type-VT_R4- and then
  35910. use this definition for each object as e.g. obj-h1234-type VT_R4<br>
  35911. example:<br>
  35912. <pre>
  35913. attr WP dev-type-VT_R4-format %.1f
  35914. attr WP dev-type-VT_R4-len 2
  35915. attr WP dev-type-VT_R4-revRegs 1
  35916. attr WP dev-type-VT_R4-unpack f>
  35917. attr WP obj-h1234-reading Temp_Ist
  35918. attr WP obj-h1234-type VT_R4
  35919. </pre>
  35920. <br>
  35921. <li><b>obj-[cdih][1-9][0-9]*-showGet</b></li>
  35922. every reading can also be requested by a get command. However these get commands are not automatically offered in fhemweb.
  35923. By specifying this attribute, the get will be visible in fhemweb.
  35924. <br>
  35925. <li><b>obj-[cdih][1-9][0-9]*-poll</b></li>
  35926. if set to 1 then this obeject is included in the cyclic update request as specified in the define command.
  35927. If not set, then the object can manually be requested with a get command, but it is not automatically updated each interval.
  35928. Note that this setting can also be specified as default for all objects with the dev- atributes described later.
  35929. <br>
  35930. <li><b>obj-[cdih][1-9][0-9]*-polldelay</b></li>
  35931. this attribute allows to poll objects at a lower rate than the interval specified in the define command.
  35932. You can either specify a time in seconds or number prefixed by "x" which means a multiple of the interval of the define command.<br>
  35933. If you specify a normal numer then it is interpreted as minimal time between the last read and another automatic read.
  35934. Please note that this does not create an additional interval timer.
  35935. Instead the normal interval timer defined by the interval of the define command will check if this reading is due or not yet.
  35936. So the effective interval will always be a multiple of the interval of the define.
  35937. <br>
  35938. <br>
  35939. <li><b>dev-([cdih]-)*read</b></li>
  35940. specifies the function code to use for reading this type of object.
  35941. The default is 3 for holding registers, 1 for coils, 2 for discrete inputs and 4 for input registers.
  35942. <br>
  35943. <li><b>dev-([cdih]-)*write</b></li>
  35944. specifies the function code to use for writing this type of object.
  35945. The default is 6 for holding registers and 5 for coils. Discrete inputs and input registers can not be written by definition.
  35946. <br>
  35947. <li><b>dev-([cdih]-)*combine</b></li>
  35948. defines how many adjacent objects can be read in one request. If not specified, the default is 1
  35949. <br>
  35950. <li><b>dev-([cdih]-)*defLen</b></li>
  35951. defines the default length for this object type. If not specified, the default is 1
  35952. <br>
  35953. <li><b>dev-([cdih]-)*defFormat</b></li>
  35954. defines a default format string to use for this object type in a sprintf function on the values read from the device.
  35955. <br>
  35956. <li><b>dev-([cdih]-)*defExpr</b></li>
  35957. defines a default Perl expression to use for this object type to convert raw values read.
  35958. <br>
  35959. <li><b>dev-([cdih]-)*defIgnoreExpr</b></li>
  35960. defines a default Perl expression to decide when values should be ignored.
  35961. <br>
  35962. <li><b>dev-([cdih]-)*defUnpack</b></li>
  35963. defines the default unpack code for this object type.
  35964. <br>
  35965. <li><b>dev-([cdih]-)*defRevRegs</b></li>
  35966. defines that the order of registers for objects that span several registers will be reversed before
  35967. further interpretation / unpacking of the raw register string
  35968. <br>
  35969. <li><b>dev-([cdih]-)*defBswapRegs</b></li>
  35970. per device default for swapping the bytes in Registers (see obj-bswapRegs above)
  35971. <br>
  35972. <li><b>dev-([cdih]-)*defDecode</b></li>
  35973. defines a default for decoding the strings read from a different character set e.g. cp850
  35974. <br>
  35975. <li><b>dev-([cdih]-)*defEncode</b></li>
  35976. defines a default for encoding the strings read (or after decoding from a different character set) e.g. utf8
  35977. <br>
  35978. <li><b>dev-([cdih]-)*defPoll</b></li>
  35979. if set to 1 then all objects of this type will be included in the cyclic update by default.
  35980. <br>
  35981. <li><b>dev-([cdih]-)*defShowGet</b></li>
  35982. if set to 1 then all objects of this type will have a visible get by default.
  35983. <br>
  35984. <li><b>dev-type-XYZ-unpack, -len, -encode, -decode, -revRegs, -bswapRegs, -format, -expr, -map</b></li>
  35985. define the unpack code, length and other details of a user defined data type. XYZ has to be replaced with the name of a user defined data type.
  35986. use obj-h123-type XYZ to assign this type to an object.
  35987. <br>
  35988. <li><b>dev-([cdih]-)*allowShortResponses</b></li>
  35989. if set to 1 the module will accept a response with valid checksum but data lengh < lengh in header
  35990. <br>
  35991. <li><b>dev-h-brokenFC3</b></li>
  35992. if set to 1 the module will change the parsing of function code 3 and 4 responses for devices that
  35993. send the register address instead of the length in the response
  35994. <br>
  35995. <li><b>dev-c-brokenFC5</b></li>
  35996. if set the module will use the hex value specified here instead of ff00 as value 1 for setting coils
  35997. <br>
  35998. <li><b>dev-timing-timeout</b></li>
  35999. timeout for the device (defaults to 2 seconds)
  36000. <br>
  36001. <li><b>dev-timing-sendDelay</b></li>
  36002. delay to enforce between sending two requests to the device. Default ist 0.1 seconds.
  36003. <br>
  36004. <li><b>dev-timing-commDelay</b></li>
  36005. delay between the last read and a next request. Default ist 0.1 seconds.
  36006. <br>
  36007. <li><b>queueMax</b></li>
  36008. max length of the send queue, defaults to 100
  36009. <br>
  36010. <li><b>nextOpenDelay</b></li>
  36011. delay for Modbus-TCP connections. This defines how long the module should wait after a failed TCP connection attempt before the next reconnection attempt. This defaults to 60 seconds.
  36012. <li><b>openTimeout</b></li>
  36013. timeout to be used when opening a Modbus TCP connection (defaults to 3)
  36014. <li><b>timeoutLogLevel</b></li>
  36015. log level that is used when logging a timeout. Defaults to 3.
  36016. <li><b>silentReconnect</b></li>
  36017. if set to 1, then it will set the loglevel for "disconnected" and "reappeared" messages to 4 instead of 3
  36018. <li><b>maxTimeoutsToReconnect</b></li>
  36019. this attribute is only valid for TCP connected devices. In such cases a disconnected device might stay undetected and lead to timeouts until the TCP connection is reopened. This attribute specifies after how many timeouts an automatic reconnect is tried.
  36020. <li><b>nonPrioritizedSet</b></li>
  36021. if set to 1, then set commands will not be sent on the bus before other queued requests and the response will not be waited for.
  36022. <li><b>sortUpdate</b></li>
  36023. if set to 1, the requests during a getUpdate cycle will be sorted before queued.
  36024. <li><b>disable</b></li>
  36025. stop communication with the device while this attribute is set to 1. For Modbus over TCP this also closes the TCP connection.
  36026. <br>
  36027. </ul>
  36028. <br>
  36029. </ul>
  36030. <a name="ModbusSET"></a>
  36031. <h3>ModbusSET</h3>
  36032. <ul>
  36033. ModbusSET uses the low level Modbus module to provide a way to communicate with Silent 10 heat pumps from SET.
  36034. It probably works with other heat pumps from SET as well and since the control device used in these heat pumps
  36035. is an iChill IC121 from Dixell, it could even work for other heat pumps with this controller as well or with few
  36036. changes. It defines the modbus holding registers for the temperature sensors and reads them in a defined interval.
  36037. <br>
  36038. <b>Prerequisites</b>
  36039. <ul>
  36040. <li>
  36041. This module requires the basic Modbus module which itsef requires Device::SerialPort or Win32::SerialPort module.
  36042. </li>
  36043. </ul>
  36044. <br>
  36045. <a name="ModbusSETDefine"></a>
  36046. <b>Define</b>
  36047. <ul>
  36048. <code>define &lt;name&gt; ModbusSET &lt;Id&gt; &lt;Interval&gt;</code>
  36049. <br><br>
  36050. The module connects to the heat pump with Modbus Id &lt;Id&gt; through an already defined modbus device and actively requests data from the heat pump every &lt;Interval&gt; seconds <br>
  36051. <br>
  36052. Example:<br>
  36053. <br>
  36054. <ul><code>define WP ModbusSET 1 60</code></ul>
  36055. </ul>
  36056. <br>
  36057. <a name="ModbusSETConfiguration"></a>
  36058. <b>Configuration of the module</b><br><br>
  36059. <ul>
  36060. apart from the modbus id and the interval which both are specified in the define command there is nothing that needs to be defined.
  36061. However there are some attributes that can optionally be used to modify the behavior of the module. <br><br>
  36062. The attributes that control which messages are sent / which data is requested every &lt;Interval&gt; seconds are:
  36063. <pre>
  36064. poll-Hyst_Mode
  36065. poll-Temp_Luft
  36066. poll-Temp_Wasser_Aus_Off
  36067. poll-Temp_Wasser_Ein_Off
  36068. poll-Temp_Wasser_Aus
  36069. poll-Hysterese
  36070. poll-Temp_Wasser_Ein
  36071. poll-Temp_Soll
  36072. poll-Temp_Luft_Off
  36073. poll-Temp_Verdampfer
  36074. poll-Temp_Verdampfer_Off
  36075. </pre>
  36076. if the attribute is set to 1, the corresponding data is requested every &lt;Interval&gt; seconds. If it is set to 0, then the data is not requested.
  36077. by default the temperatures are requested if no attributes are set.<br>
  36078. if some readings should be polled, but less frequently than the normal interval, you can specify a pollDelay-
  36079. Attribute for the reading. <br>
  36080. The pollDelay attribute allows to poll objects at a lower rate than the interval specified in the define command. you can either specify a time in seconds or number prefixed by "x" which means a multiple of the interval of the define command.<br>
  36081. if you specify a normal numer then it is interpreted as minimal time between the last read and another automatic read. Please note that this does not create an individual interval timer. Instead the normal interval timer defined by the interval of the define command will check if this reading is due or not yet. So the effective interval will always be a multiple of the interval of the define.
  36082. <br><br>
  36083. Example:
  36084. <pre>
  36085. define WP ModbusSET 1 60
  36086. attr WP poll-Temp_Soll 0
  36087. attr WP pollDelay-Hysterese 300
  36088. </pre>
  36089. </ul>
  36090. <a name="ModbusSETSet"></a>
  36091. <b>Set-Commands</b><br>
  36092. <ul>
  36093. The following set options are available:
  36094. <pre>
  36095. Hysterese (defines the hysterese in Kelvin)
  36096. Hyst_Mode (defines the interpretation of hysterese for the heating and can be set to mittig, oberhalb or unterhalb)
  36097. Temp_Wasser_Aus_Off (offset of sensor in Kelvin - used to kalibrate)
  36098. Temp_Wasser_Ein_Off (offset of sensor in Kelvin - used to kalibrate)
  36099. Temp_Luft_Off (offset of sensor in Kelvin - used to kalibrate)
  36100. Temp_Verdampfer_Off (offset of sensor in Kelvin - used to kalibrate)
  36101. Temp_Soll (target temperature of the heating pump)
  36102. </pre>
  36103. </ul>
  36104. <br>
  36105. <a name="ModbusSETGet"></a>
  36106. <b>Get-Commands</b><br>
  36107. <ul>
  36108. All readings are also available as Get commands. Internally a Get command triggers the corresponding
  36109. request to the device and then interprets the data and returns the right field value. To avoid huge option lists in FHEMWEB, only the most important Get options
  36110. are visible in FHEMWEB. However this can easily be changed since all the readings and protocol messages are internally defined in the modue in a data structure
  36111. and to make a Reading visible as Get option only a little option (e.g. <code>showget => 1</code> has to be added to this data structure
  36112. </ul>
  36113. <br>
  36114. <a name="ModbusSETattr"></a>
  36115. <b>Attributes</b><br><br>
  36116. <ul>
  36117. <li><a href="#do_not_notify">do_not_notify</a></li>
  36118. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  36119. <br>
  36120. <li><b>poll-Hyst_Mode</b></li>
  36121. <li><b>poll-Temp_Luft</b></li>
  36122. <li><b>poll-Temp_Wasser_Aus_Off</b></li>
  36123. <li><b>poll-Temp_Wasser_Ein_Off</b></li>
  36124. <li><b>poll-Temp_Wasser_Aus</b></li>
  36125. <li><b>poll-Hysterese</b></li>
  36126. <li><b>poll-Temp_Wasser_Ein</b></li>
  36127. <li><b>poll-Temp_Soll</b></li>
  36128. <li><b>poll-Temp_Luft_Off</b></li>
  36129. <li><b>poll-Temp_Verdampfer</b></li>
  36130. <li><b>poll-Temp_Verdampfer_Off</b></li>
  36131. include a read request for the corresponding registers when sending requests every interval seconds <br>
  36132. <li><b>pollDelay-*</b></li>
  36133. set a delay for polling individual Readings. In case some readings should be polled less frequently than the
  36134. normal delay specified during define. Specifying a pollDelay will not create an individual timer for
  36135. polling this reading but check if the delay is over when the normal update interval is handled.<br>
  36136. You can either specify a time in seconds or number prefixed by "x" which means a multiple of the interval of the define command.<br>
  36137. If you specify a normal numer then it is interpreted as minimal time between the last read and another automatic read. Please note that this does not create an individual interval timer. Instead the normal interval timer defined by the interval of the define command will check if this reading is due or not yet. So the effective interval will always be a multiple of the interval of the define.
  36138. <li><b>dev-timing-timeout</b></li>
  36139. set the timeout for reads, defaults to 2 seconds <br>
  36140. <li><b>dev-timing-minSendDelay</b></li>
  36141. minimal delay between two requests sent to this device
  36142. <li><b>dev-timing-minCommDelay</b></li>
  36143. minimal delay between requests or receptions to/from this device
  36144. </ul>
  36145. <br>
  36146. </ul>
  36147. <a name="ModbusTrovis5576"></a>
  36148. <h3>ModbusTrovis5576</h3>
  36149. <ul>
  36150. ModbusTrovis5576 uses the low level Modbus module to provide a way to communicate with the Samson Trovis 5576 Heating Management.
  36151. It defines the modbus holding registers for the different values and reads them in a defined interval.
  36152. <br /><br />
  36153. <b>Prerequisites</b>
  36154. <ul>
  36155. <b>This module requires the basic <a href="#Modbus">Modbus</a> module which itsef requires Device::SerialPort or Win32::SerialPort module.</b>
  36156. </ul><br />
  36157. <b>Hardware Connection</b>
  36158. <ul>
  36159. The <a href="https://www.samson.de/pdf_de/e55760de.pdf">Manual</a> shows on page 124 a diagram of the correct pins for connecting to the serial port. The RS232-Port is <b>not</b> the one on the front side, but, as seen from the front, on the left side of the heating management. This port is covered with a small plastic-shield which can easily be removed.<br />
  36160. Only the usual pins for serial communication (TD, RD and Ground) are needed.
  36161. </ul><br />
  36162. <b>Special meanings with Readings and the Heating Management System</b>
  36163. <ul>
  36164. If you change the value of "Betriebsart" ("Operating Mode") the rotary switch at the heating management doesn't change. To reflect this fact the display shows "GLT" (in German "Gebäudeleittechnik" - Building Control Center) and the corresponding so-called Ebenen-Bit ("_EBN" - Level-Bit) is set to "GLT".<br />
  36165. If you want to switch back to autonomous mode you can set the appropriate Ebenen-Bit to "Autark".<br /><br />
  36166. If you change the value of "Betriebsart" to standby it could be happen that it is automatically (re-)changed to "Mond" ("Moon"). This happens if the outside temperature is lower than 3°C and it's shown with the value of "Frostschutzbetrieb" ("Frost Protection Mode").<br /><br />
  36167. <b>Suggestion:</b><br />
  36168. It is hardly recommended to set the Attribute <code>event-on-change-reading</code> to <code>.*</code>. Otherwise the system will generate many senseless events.
  36169. </ul><br />
  36170. <a name="ModbusTrovis5576Define"></a>
  36171. <b>Define</b>
  36172. <ul>
  36173. <code>define &lt;name&gt; ModbusTrovis5576 &lt;ID&gt; &lt;Interval&gt;</code><br /><br />
  36174. The module connects to the Samson Trovis 5576 Heating Management with the Modbus Id &lt;ID&gt; through an already defined Modbus device and actively requests data from the system every &lt;Interval&gt; seconds.<br /><br />
  36175. Example:<br>
  36176. <code>define heizung ModbusTrovis5576 255 60</code>
  36177. </ul><br />
  36178. <a name="ModbusTrovis5576Set"></a>
  36179. <b>Set-Commands</b>
  36180. <ul>
  36181. The following set options are available:
  36182. <ul>
  36183. <li>Regelkreis 1 (Usually Wallmounted-Heatings):<ul>
  36184. <li><b>RK1_Betriebsart</b>: Operating mode of Regelkreis 1. Possible values are Standby, Mond or Sonne.</li>
  36185. <li><b>RK1_Betriebsart_EBN</b>: The Ebenen-Bit according to the Operating Mode. Possible values are GLT or Autark.</li>
  36186. <li><b>RK1_Stellsignal</b>: The percent value of opening of the heat transportation valve.</li>
  36187. <li><b>RK1_Stellsignal_EBN</b>: The Ebenen-Bit according to the heat transportation valve. Possible values are GLT or Autark.</li>
  36188. <li><b>RK1_Umwaelzpumpe</b>: The on/off state of thr circulation pump. Possible values are An or Aus.</li>
  36189. <li><b>RK1_Umwaelzpumpe_EBN</b>: The Ebenen-Bit according to the circulation pump. Possible values are GLT or Autark.</li>
  36190. </ul></li>
  36191. <li>Regelkreis 2 (Usually Floor Heating System):<ul>
  36192. <li><b>RK2_Betriebsart</b>: Operating mode of Regelkreis 2. Possible values are Standby, Mond or Sonne.</li>
  36193. <li><b>RK2_Betriebsart_EBN</b>: The Ebenen-Bit according to the Operating Mode. Possible values are GLT or Autark.</li>
  36194. <li><b>RK2_Stellsignal</b>: The percent value of opening of the heat transportation valve.</li>
  36195. <li><b>RK2_Stellsignal_EBN</b>: The Ebenen-Bit according to the heat transportation valve. Possible values are GLT or Autark.</li>
  36196. <li><b>RK2_Umwaelzpumpe</b>: The on/off state of the circulation pump. Possible values are An or Aus.</li>
  36197. <li><b>RK2_Umwaelzpumpe_EBN</b>: The Ebenen-Bit according to the circulation pump. Possible values are GLT or Autark.</li>
  36198. </ul></li>
  36199. <li>Drinkable Water Reservoir:<ul>
  36200. <li><b>Wasser_Betriebsart</b>: Operating mode of the drinkable water system. Possible values are Standby, Mond or Sonne.</li>
  36201. <li><b>Wasser_Betriebsart_EBN</b>: The Ebenen-Bit according to the Operating Mode. Possible values are GLT or Autark.</li>
  36202. <li><b>Wasser_Speicherladepumpe</b>: The on/off state of the reservoir loading pump. Possible values are An or Aus.</li>
  36203. <li><b>Wasser_Speicherladepumpe_EBN</b>: The Ebenen-Bit according to the Speicherladepumpe. Possible values are GLT or Autark.</li>
  36204. <li><b>Wasser_Zirkulationspumpe</b>: The on/off state of the circular pump. Possible values are An or Aus.</li>
  36205. <li><b>Wasser_Zirkulationspumpe_EBN</b>: The Ebenen-Bit according to the circular pump. Possible values are GLT or Autark.</li>
  36206. <li><b>Wasser_ThermischeDesinfektion</b>: On/off state of the thermal disinfection. Possible values are An or Aus.</li>
  36207. <li><b>Wasser_Temp_Soll</b>: The desired temperature for the drinkabke water reservoir.</li>
  36208. <li><b>Wasser_Temp_Minimum</b>: The lowest temperature for the drinkable water reservoir.</li>
  36209. <li><b>Wasser_Temp_Desinfektion</b>: The desired temperature of the thermal disinfection system.</li>
  36210. </ul></li>
  36211. </ul><br />
  36212. All other Readings (along with their Meanings) which can only be read:<br />
  36213. <ul>
  36214. <li>Common Data:<ul>
  36215. <li><b>Modellnummer</b>: Shows the modelnumber. Should be "5576".</li>
  36216. <li><b>Aussen_Temp</b>: Shows the currently measured outside temperature in °C.</li>
  36217. <li><b>Fehlerstatusregister_CL1</b>: Shows the current status register (CL1).</li>
  36218. </ul></li>
  36219. <li>Regelkreis 1 (Usually Wallmounted-Heatings):<ul>
  36220. <li><b>RK1_Schalter</b>: Represent the current value of the rotary switch. Possible values are PA, Auto, Standby, Hand, Sonne or Mond.</li>
  36221. <li><b>RK1_Frostschutzbetrieb</b>: On/off state of the frost protection mode of Regelkreis 1.</li>
  36222. <li><b>RK1_Vorlauf_Temp</b>: Shows the currently measured flow temperature in °C of Regelkreis 1.</li>
  36223. <li><b>RK1_Ruecklauf_Temp</b>: Shows the currently measured return temperature in °C of Regelkreis 1.</li>
  36224. </ul></li>
  36225. <li>Regelkreis 2 (Usually Floor Heating System):<ul>
  36226. <li><b>RK2_Schalter</b>: Represent the current value of the rotary switch. Possible values are PA, Auto, Standby, Hand, Sonne or Mond.</li>
  36227. <li><b>RK2_Frostschutzbetrieb</b>: On/off state of the frost protection mode of Regelkreis 2.</li>
  36228. <li><b>RK2_Vorlauf_Temp</b>: Shows the currently measured flow temperature in °C of Regelkreis 2.</li>
  36229. <li><b>RK2_Ruecklauf_Temp</b>: Shows the currently measured return temperature in °C of Regelkreis 2.</li>
  36230. </ul></li>
  36231. <li>Drinkable Water Reservoir:<ul>
  36232. <li><b>Wasser_Schalter</b>: Represent the current value of the rotary switch. Possible values are PA, Auto, Standby, Hand, Sonne or Mond.</li>
  36233. <li><b>Wasser_Frostschutzbetrieb</b>: On/off state of the frost protection mode of the drinkable water heating system.</li>
  36234. <li><b>Wasser_Temp</b>: Shows the currently measured return temperature in °C of the drinkablr water reservoir.</li>
  36235. </ul></li>
  36236. </ul>
  36237. </ul><br />
  36238. <a name="ModbusTrovis5576Get"></a>
  36239. <b>Get-Commands</b>
  36240. <ul>
  36241. All readings are also available as Get commands. Internally a Get command triggers the corresponding request to the device and then interprets the data and returns the correct field value. This is a good way for getting a new current value from the Heating Management System.
  36242. </ul><br />
  36243. <a name="ModbusTrovis5576attr"></a>
  36244. <b>Attribute</b>
  36245. <ul>
  36246. Only centralized Attributes are in use. Especially:
  36247. <ul>
  36248. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  36249. </ul>
  36250. </ul><br />
  36251. </ul>
  36252. <a name="N4HBUS"></a>
  36253. <h3>N4HBUS</h3>
  36254. This module connects fhem to the net4home Bus. You need to define ojects with <a href="#N4MODULE">N4MODULE</a> to set or read
  36255. data of th net4home bus.
  36256. <br /><br />
  36257. Further technical information can be found at the <a href="http://www.net4home.de">net4home.de</a> Homepage
  36258. <br /><br />
  36259. <a name="N4HBUS_Define"></a>
  36260. <b>Define</b>
  36261. <ul>
  36262. <code>define &lt;name&gt; N4HBUS &lt;device&gt;</code>
  36263. <br /> <br />
  36264. &lt;device&gt; is a combination of &lt;host&gt;:&lt;port&gt;, where &lt;host&gt; is the IP address of the net4home Busconnector and &lt;port&gt; (default:3478).
  36265. <br /> <br />
  36266. Example:
  36267. <ul>
  36268. <code>define net4home N4HBUS 192.168.1.69:3478</code>
  36269. </ul>
  36270. <br />
  36271. The device can also be connected to the busconnector on the same machine. <br />
  36272. Default Port for communication is 3478. In case you need to change this please change also the Port in the conf of busconnector service.
  36273. </ul>
  36274. <br />
  36275. <a name="N4HBUS_Readings"></a>
  36276. <b>Readings</b>
  36277. <ul>
  36278. <li>state - current state of the Bus connection</li>
  36279. </ul><br />
  36280. <a name="N4HBUS_Attr"></a>
  36281. <b>Attributes</b>
  36282. <ul>
  36283. <li>MI - a unique MI in the net4home environment (default:65281)</li>
  36284. <li>OBJADR - a unique OBJADR in the net4home environment (default:32700)</li>
  36285. </ul>
  36286. <a name="N4HMODULE"></a>
  36287. <h3>N4HMODULE</h3>
  36288. fhem-Module to communicate with net4home modules via IP
  36289. <br /><br />
  36290. <ul>
  36291. <br />
  36292. <a name="N4HMODULE_Define"></a>
  36293. <b>Define</b>
  36294. <ul>
  36295. <code>define &lt;name&gt; N4HMODULE &lt;device&gt; &lt;type&gt; &lt;objectaddress&gt;</code><br />
  36296. <br />
  36297. Defines a net4home device connected to a <a href="#N4HBUS">N4HBUS</a> device <br /><br />
  36298. Examples:
  36299. <ul>
  36300. <code>define n4h_28204 N4HMODULE n4h 24 28204</code><br />
  36301. </ul>
  36302. Currently the following values are supported:<br />
  36303. <b>Measurement</b><br />
  36304. <ul>
  36305. <li> 24 - Measurement,Temperature</li>
  36306. <li> 25 - Measurement,Brightness</li>
  36307. <li> 26 - Measurement,Humidity</li>
  36308. <li>240 - Measurement,Wind</li>
  36309. <li>242 - Measurement,Pressure</li>
  36310. <li>245 - Measurement,Rain</li>
  36311. </ul>
  36312. </ul><br />
  36313. <a name="N4HMODULE_Readings"></a>
  36314. <b>Readings</b>
  36315. <ul>
  36316. <li>The readings are dependent of the object of the net4home bus module.<br /></li>
  36317. </ul><br />
  36318. <a name="N4HMODULE_Attr"></a>
  36319. <b>Attributes</b>
  36320. <ul>
  36321. <li>interval<br>
  36322. the interval in seconds used to send values to bus.</li>
  36323. </ul>
  36324. </ul>
  36325. <p>
  36326. <a name="NEUTRINO" id="NEUTRINO"></a>
  36327. </p>
  36328. <h3>
  36329. NEUTRINO
  36330. </h3>
  36331. <ul>
  36332. <a name="NEUTRINOdefine" id="NEUTRINOdefine"></a> <b>Define</b>
  36333. <ul>
  36334. <code>define &lt;name&gt; NEUTRINO &lt;ip-address-or-hostname&gt; [[[[&lt;port&gt;] [&lt;poll-interval&gt;]] [&lt;http-user&gt;]] [&lt;http-password&gt;]]</code><br>
  36335. <br>
  36336. This module controls NEUTRINO based devices like Coolstream receiver via network connection.<br>
  36337. <br>
  36338. Defining an NEUTRINO device will schedule an internal task (interval can be set with optional parameter &lt;poll-interval&gt; in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
  36339. <br>
  36340. Example:<br>
  36341. <ul>
  36342. <code>define SATReceiver NEUTRINO 192.168.0.10<br>
  36343. <br>
  36344. # With custom port<br>
  36345. define SATReceiver NEUTRINO 192.168.0.10 8080<br>
  36346. <br>
  36347. # With custom interval of 20 seconds<br>
  36348. define SATReceiver NEUTRINO 192.168.0.10 80 20<br>
  36349. <br>
  36350. # With HTTP user credentials<br>
  36351. define SATReceiver NEUTRINO 192.168.0.10 80 20 root secret</code>
  36352. </ul>
  36353. </ul>
  36354. <br>
  36355. <br>
  36356. <a name="NEUTRINOset" id="NEUTRINOset"></a> <b>Set</b>
  36357. <ul>
  36358. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  36359. <br>
  36360. Currently, the following commands are defined.<br>
  36361. <ul>
  36362. <li>
  36363. <b>on</b> &nbsp;&nbsp;-&nbsp;&nbsp; powers on the device (standby mode)
  36364. </li>
  36365. <li>
  36366. <b>off</b> &nbsp;&nbsp;-&nbsp;&nbsp; turns the device in standby mode
  36367. </li>
  36368. <li>
  36369. <b>toggle</b> &nbsp;&nbsp;-&nbsp;&nbsp; switch between on and off (standby mode)
  36370. </li>
  36371. <li>
  36372. <b>shutdown</b> &nbsp;&nbsp;-&nbsp;&nbsp; poweroff the device
  36373. </li>
  36374. <li>
  36375. <b>reboot</b> &nbsp;&nbsp;-&nbsp;&nbsp;reboots the device
  36376. </li>
  36377. <li>
  36378. <b>channel</b> &nbsp;&nbsp;-&nbsp;&nbsp; zap to specific channel
  36379. </li>
  36380. <li>
  36381. <b>volume</b> 0...100 &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in percentage
  36382. </li>
  36383. <li>
  36384. <b>mute</b> on,off,toggle &nbsp;&nbsp;-&nbsp;&nbsp; controls volume to mute
  36385. </li>
  36386. <li>
  36387. <b>statusRequest</b> &nbsp;&nbsp;-&nbsp;&nbsp; requests the current status of the device
  36388. </li>
  36389. <li>
  36390. <b>remoteControl</b> UP,DOWN,... &nbsp;&nbsp;-&nbsp;&nbsp; sends remote control command<br />
  36391. </li>
  36392. <li>
  36393. <b>showText</b> text &nbsp;&nbsp;-&nbsp;&nbsp; sends info messages to be displayed on screen
  36394. </li>
  36395. <li>
  36396. <b>showtextwithbutton</b> &nbsp;&nbsp;-&nbsp;&nbsp; sends info messagees to be displayed on screen with OK button
  36397. </li>
  36398. <br>
  36399. <br>
  36400. <br>
  36401. </ul>
  36402. </ul>
  36403. <a name="NEUTRINOget" id="NEUTRINOget"></a> <b>Get</b>
  36404. <ul>
  36405. <code>get &lt;name&gt; &lt;what&gt;</code><br>
  36406. <br>
  36407. Currently, the following commands are defined:<br>
  36408. <br>
  36409. <ul>
  36410. <code>channel<br>
  36411. channelurl<br>
  36412. currentTitle<br>
  36413. input<br>
  36414. mute<br>
  36415. power<br>
  36416. volume<br></code>
  36417. </ul>
  36418. </ul><br>
  36419. <br>
  36420. <a name="NEUTRINOattr" id="NEUTRINOattr"></a> <b>Attributes</b><br>
  36421. <ul>
  36422. <ul>
  36423. <li>
  36424. <b>disable</b> - Disable polling (true/false)
  36425. </li>
  36426. <li>
  36427. <b>http-noshutdown</b> - Set FHEM-internal HttpUtils connection close behaviour (defaults=0)
  36428. </li>
  36429. <li>
  36430. <b>https</b> - Access box via secure HTTP (true/false)
  36431. </li>
  36432. <li>
  36433. <b>timeout</b> - Set different polling timeout in seconds (default=2)
  36434. </li>
  36435. </ul>
  36436. </ul><br>
  36437. <br>
  36438. <br>
  36439. <b>Generated Readings:</b><br>
  36440. <ul>
  36441. <ul>
  36442. <li>
  36443. <b>ber</b> - Shows Bit Error Rate for current channel
  36444. </li>
  36445. <li>
  36446. <b>bouquetnr</b> - Shows bouquet number for current channel
  36447. </li>
  36448. <li>
  36449. <b>channel</b> - Shows the service name of current channel
  36450. </li>
  36451. <li>
  36452. <b>channel_id</b> - Shows the channel id of current channel
  36453. </li>
  36454. <li>
  36455. <b>channel_name</b> - Shows the channel name of current channel
  36456. </li>
  36457. <li>
  36458. <b>channel_url</b> - Shows the channel url of current channel (use with vlc player)
  36459. </li>
  36460. <li>
  36461. <b>currentTitle</b> - Shows the title of the running event
  36462. </li>
  36463. <li>
  36464. <b>epg_current_channel_id</b> - Shows the channel id of epg information
  36465. </li>
  36466. <li>
  36467. <b>epg_current_date</b> - Shows the date of epg information
  36468. </li>
  36469. <li>
  36470. <b>egp_current_description</b> - Shows the current description of the current program
  36471. </li>
  36472. <li>
  36473. <b>egp_current_duration_min</b> - Shows the current duration of the current program
  36474. </li>
  36475. <li>
  36476. <b>egp_current_info1</b> - Displays the current information of the current program
  36477. </li>
  36478. <li>
  36479. <b>egp_current_info2</b> - Displays the current information of the current program
  36480. </li>
  36481. <li>
  36482. <b>egp_current_number</b> - Displays the current number(epg) of the current program
  36483. </li>
  36484. <li>
  36485. <b>egp_current_start_sec</b> - Shows the current start time of the current program (ticks)
  36486. </li>
  36487. <li>
  36488. <b>egp_current_start_t</b> - Shows the current start time of the current program
  36489. </li>
  36490. <li>
  36491. <b>egp_current_stop_sec</b> - Shows the current stop time of the current program (ticks)
  36492. </li>
  36493. <li>
  36494. <b>egp_current_stop_t</b> - Shows the current stop time of the current program
  36495. </li>
  36496. <li>
  36497. <b>eventid</b> - Shows the current event id of the current program
  36498. </li>
  36499. <li>
  36500. <b>image_*</b> - Shows image information of NEUTRINO
  36501. </li>
  36502. <li>
  36503. <b>input</b> - Shows currently used input
  36504. </li>
  36505. <li>
  36506. <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
  36507. </li>
  36508. <li>
  36509. <b>power</b> - Reports the power status of the device (can be "on" or "off")
  36510. </li>
  36511. <li>
  36512. <b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present").
  36513. </li>
  36514. <li>
  36515. <b>recordmode</b> - Reports the record mode of the device (can be "on" or "off")
  36516. </li>
  36517. <li>
  36518. <b>recordmodetitle</b> - Reports the last record title
  36519. </li>
  36520. <li>
  36521. <b>sig</b> - Shows signal for current channel in percent
  36522. </li>
  36523. <li>
  36524. <b>snr</b> - Shows signal to noise for current channel in percent
  36525. </li>
  36526. <li>
  36527. <b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "standby")
  36528. </li>
  36529. <li>
  36530. <b>time_now</b> - Reports current time
  36531. </li>
  36532. <li>
  36533. <b>time_raw_now</b> - Reports current time (ticks)
  36534. </li>
  36535. <li>
  36536. <b>timerX</b> - Shows complete timer (Report from NEUTRINO)
  36537. </li>
  36538. <li>
  36539. <b>timerXannounceTime</b> - Shows announce time of the timer
  36540. </li>
  36541. <li>
  36542. <b>timerXname</b> - Shows channel name of the timer
  36543. </li>
  36544. <li>
  36545. <b>timerXnumber</b> - Shows timer number
  36546. </li>
  36547. <li>
  36548. <b>timerXrepcount</b> - Shows rep count of the timer
  36549. </li>
  36550. <li>
  36551. <b>timerXrepeat</b> - Shows repeat time of the timer
  36552. </li>
  36553. <li>
  36554. <b>timerXstartTime</b> - Shows start time of the timer
  36555. </li>
  36556. <li>
  36557. <b>timerXstopTime</b> - Shows stop time of the timer
  36558. </li>
  36559. <li>
  36560. <b>timerXtyp</b> - Shows type of the timer
  36561. </li>
  36562. <li>
  36563. <b>timer_count</b> - Shows the number of timers
  36564. </li>
  36565. <li>
  36566. <b>timer_count</b> - Shows the maximum number of timers
  36567. </li>
  36568. <li>
  36569. <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
  36570. </li>
  36571. </ul>
  36572. </ul>
  36573. </ul>
  36574. <a name="NUKIBridge"></a>
  36575. <h3>NUKIBridge</h3>
  36576. <ul>
  36577. <u><b>NUKIBridge - controls the Nuki Smartlock over the Nuki Bridge</b></u>
  36578. <br>
  36579. The Nuki Bridge module connects FHEM to the Nuki Bridge and then reads all the smartlocks available on the bridge. Furthermore, the detected Smartlocks are automatically created as independent devices.
  36580. <br><br>
  36581. <a name="NUKIBridgedefine"></a>
  36582. <b>Define</b>
  36583. <ul><br>
  36584. <code>define &lt;name&gt; NUKIBridge &lt;HOST&gt; &lt;API-TOKEN&gt;</code>
  36585. <br><br>
  36586. Example:
  36587. <ul><br>
  36588. <code>define NBridge1 NUKIBridge 192.168.0.23 F34HK6</code><br>
  36589. </ul>
  36590. <br>
  36591. This statement creates a NUKIBridge device with the name NBridge1 and the IP 192.168.0.23 as well as the token F34HK6.<br>
  36592. After the bridge device is created, all available Smartlocks are automatically placed in FHEM.
  36593. </ul>
  36594. <br><br>
  36595. <a name="NUKIBridgereadings"></a>
  36596. <b>Readings</b>
  36597. <ul>
  36598. <li>0_nukiId - ID of the first found Nuki Smartlock</li>
  36599. <li>0_name - Name of the first found Nuki Smartlock</li>
  36600. <li>smartlockCount - number of all found Smartlocks</li>
  36601. <li>bridgeAPI - API Version of bridge</li>
  36602. <li>bridgeType - Hardware bridge / Software bridge</li>
  36603. <li>currentTime - Current timestamp</li>
  36604. <li>firmwareVersion - Version of the bridge firmware</li>
  36605. <li>hardwareId - Hardware ID</li>
  36606. <li>lastError - Last connected error</li>
  36607. <li>serverConnected - Flag indicating whether or not the bridge is connected to the Nuki server</li>
  36608. <li>serverId - Server ID</li>
  36609. <li>uptime - Uptime of the bridge in seconds</li>
  36610. <li>wifiFirmwareVersion- Version of the WiFi modules firmware</li>
  36611. <br>
  36612. The preceding number is continuous, starts with 0 und returns the properties of <b>one</b> Smartlock.
  36613. </ul>
  36614. <br><br>
  36615. <a name="NUKIBridgeset"></a>
  36616. <b>Set</b>
  36617. <ul>
  36618. <li>autocreate - Prompts to re-read all Smartlocks from the bridge and if not already present in FHEM, create the autimatic.</li>
  36619. <li>callbackRemove - Removes a previously added callback</li>
  36620. <li>clearLog - Clears the log of the Bridge (only hardwarebridge)</li>
  36621. <li>factoryReset - Performs a factory reset (only hardwarebridge)</li>
  36622. <li>fwUpdate - Immediately checks for a new firmware update and installs it (only hardwarebridge)</li>
  36623. <li>info - Returns all Smart Locks in range and some device information of the bridge itself</li>
  36624. <li>reboot - reboots the bridge (only hardwarebridge)</li>
  36625. <br>
  36626. </ul>
  36627. <br><br>
  36628. <a name="NUKIBridgeget"></a>
  36629. <b>Get</b>
  36630. <ul>
  36631. <li>callbackList - List of register url callbacks. The Bridge register up to 3 url callbacks.</li>
  36632. <li>logFile - Retrieves the log of the Bridge</li>
  36633. <br>
  36634. </ul>
  36635. <br><br>
  36636. <a name="NUKIBridgeattribut"></a>
  36637. <b>Attributes</b>
  36638. <ul>
  36639. <li>disable - disables the Nuki Bridge</li>
  36640. <br>
  36641. </ul>
  36642. </ul>
  36643. <a name="NUKIDevice"></a>
  36644. <h3>NUKIDevice</h3>
  36645. <ul>
  36646. <u><b>NUKIDevice - Controls the Nuki Smartlock</b></u>
  36647. <br>
  36648. The Nuki module connects FHEM over the Nuki Bridge with a Nuki Smartlock. After that, it´s possible to lock and unlock the Smartlock.<br>
  36649. Normally the Nuki devices are automatically created by the bridge module.
  36650. <br><br>
  36651. <a name="NUKIDevicedefine"></a>
  36652. <b>Define</b>
  36653. <ul><br>
  36654. <code>define &lt;name&gt; NUKIDevice &lt;Nuki-Id&gt; &lt;IODev-Device&gt;</code>
  36655. <br><br>
  36656. Example:
  36657. <ul><br>
  36658. <code>define Frontdoor NUKIDevice 1 NBridge1</code><br>
  36659. </ul>
  36660. <br>
  36661. This statement creates a NUKIDevice with the name Frontdoor, the NukiId 1 and the IODev device NBridge1.<br>
  36662. After the device has been created, the current state of the Smartlock is automatically read from the bridge.
  36663. </ul>
  36664. <br><br>
  36665. <a name="NUKIDevicereadings"></a>
  36666. <b>Readings</b>
  36667. <ul>
  36668. <li>state - Status of the Smartlock or error message if any error.</li>
  36669. <li>lockState - current lock status uncalibrated, locked, unlocked, unlocked (lock ‘n’ go), unlatched, locking, unlocking, unlatching, motor blocked, undefined.</li>
  36670. <li>name - name of the device</li>
  36671. <li>paired - paired information false/true</li>
  36672. <li>rssi - value of rssi</li>
  36673. <li>succes - true, false Returns the status of the last closing command. Ok or not Ok.</li>
  36674. <li>batteryCritical - Is the battery in a critical state? True, false</li>
  36675. <li>battery - battery status, ok / low</li>
  36676. </ul>
  36677. <br><br>
  36678. <a name="NUKIDeviceset"></a>
  36679. <b>Set</b>
  36680. <ul>
  36681. <li>statusRequest - retrieves the current state of the smartlock from the bridge.</li>
  36682. <li>lock - lock</li>
  36683. <li>unlock - unlock</li>
  36684. <li>unlatch - unlock / open Door</li>
  36685. <li>unpair - Removes the pairing with a given Smart Lock</li>
  36686. <li>locknGo - lock when gone</li>
  36687. <li>locknGoWithUnlatch - lock after the door has been opened</li>
  36688. <br>
  36689. </ul>
  36690. <br><br>
  36691. <a name="NUKIDeviceattribut"></a>
  36692. <b>Attributes</b>
  36693. <ul>
  36694. <li>disable - disables the Nuki device</li>
  36695. <li>webhookFWinstance - Webinstanz of the Callback</li>
  36696. <li>webhookHttpHostname - IP or FQDN of the FHEM Server Callback</li>
  36697. <br>
  36698. </ul>
  36699. </ul>
  36700. <a name="NUT"></a>
  36701. <h3>NUT</h3>
  36702. <ul>
  36703. The Network UPS Tools (<a href="http://www.networkupstools.org">www.networkupstools.org</a>) provide support for Uninterruptable Power Supplies and the like.
  36704. This module gives access to a running nut server. You can read data (status, runtime, input voltage, sometimes even temperature and so on). In the future it will
  36705. also be possible to control the UPS (start test, switch off).<br>
  36706. Which values you can use as readings is set with <a href="#NUT_asReadings">asReadings</a>. Which values are available with this UPS, you can check with
  36707. <code>list theUPS</code>. Only ups.status is always read and used as the status of the device.<br>
  36708. <br><br>
  36709. <a name=NUTdefine"></a>
  36710. <b>Define</b>
  36711. <ul>
  36712. <code>define &lt;name&gt; NUT &lt;ups&gt; [&lt;host&gt;[:&lt;port&gt;]]</code> <br>
  36713. <br>
  36714. &lt;ups&gt; is the name of a ups defined in the nut server.
  36715. <br>
  36716. [&lt;host&gt;[:&lt;port&gt;]] is the host of the nut server. If omitted, <code>localhost:3493</code> is used.
  36717. <br><br>
  36718. Example: <br>
  36719. <code>define theUPS NUT myups otherserver</code>
  36720. <br>
  36721. </ul>
  36722. <br>
  36723. <a name="NUTset"></a>
  36724. <b>Set</b> <ul>N/A</ul><br>
  36725. <a name="NUTget"></a>
  36726. <b>Get</b> <ul>N/A</ul><br>
  36727. <a name="NUTattr"></a>
  36728. <b>Attributes</b>
  36729. <ul>
  36730. <li><a href="#disable">disable</a></li><br>
  36731. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  36732. <li><a name="">pollState</a><br>
  36733. Polling interval in seconds for the state of the ups. Default: 10</li><br>
  36734. <li><a name="">pollVal</a><br>
  36735. Polling interval in seconds of the other Readings. This should be a multiple of pollState. Default: 60</li><br>
  36736. <li><a name="#NUT_asReadings">asReadings</a><br>
  36737. Values of the UPS which are used as Readings (ups.status is read anyway)<br>
  36738. Example:<br>
  36739. <code>attr theUPS asReadings battery.charge,battery.runtime,input.voltage,ups.load,ups.power,ups.realpower</code> </li><br>
  36740. </ul>
  36741. </ul>
  36742. <a name="Nello"></a>
  36743. <h3>Nello</h3>
  36744. <ul>
  36745. The <i>Nello</i> module enables you to control your intercom using the <a target="_blank" rel="nofollow" href="https://www.nello.io/en/">nello one</a> module.<br>
  36746. To set it up, you need to <b>add a new user with admin rights</b> via the nello app just for use with fhem. You cannot use your main account since only one session at a time is possible.<br>
  36747. After that, you can define the device and continue with login.<br>
  36748. <b>ATTENTION:</b> If the login fails, try resetting your password using the recoverPassword function.<br>
  36749. <b>Recommendation:</b> To receive instant events, call the detectDeviceID function after login.<br>
  36750. <br>
  36751. <p><b>Required Packages</b></p>
  36752. <code>
  36753. sudo apt-get install libcpan-meta-yaml-perl<br>
  36754. sudo cpan -i Net::MQTT::Simple
  36755. </code>
  36756. <br>
  36757. <br>
  36758. <br>
  36759. <a name="Nello_define"></a>
  36760. <p><b>Define</b></p>
  36761. <ul>
  36762. <code>define &lt;name&gt; Nello</code><br>
  36763. </ul>
  36764. <br>
  36765. <ul>
  36766. Example: <code>define nello Nello</code><br>
  36767. </ul>
  36768. <br>
  36769. <br>
  36770. <a name="Nello_set"></a>
  36771. <p><b>set &lt;required&gt; [ &lt;optional&gt; ]</b></p>
  36772. <ul>
  36773. <li>
  36774. <i>login &lt;username&gt; &lt;password&gt;</i><br>
  36775. login to your created account
  36776. </li>
  36777. <li>
  36778. <i>recoverPassword &lt;username&gt;</i><br>
  36779. recovers the password
  36780. </li>
  36781. <li>
  36782. <i>detectDeviceID</i><br>
  36783. detects your device ID by opening the door and creates MQTT helper (used for event hooks)
  36784. </li>
  36785. <li>
  36786. <i>open [ &lt;location_id&gt; ]</i><br>
  36787. opens the door for a given location (if the account has only access to one location the default one will be used automatically).
  36788. </li>
  36789. <li>
  36790. <i>update</i><br>
  36791. updates your locations and activities
  36792. </li>
  36793. </ul>
  36794. <br>
  36795. <a name="Nello_get"></a>
  36796. <p><b>Get</b></p>
  36797. <ul>
  36798. N/A
  36799. </ul>
  36800. <br>
  36801. <a name="Nello_attr"></a>
  36802. <p><b>Attributes</b></p>
  36803. <ul>
  36804. <li>
  36805. <i>updateInterval</i><br>
  36806. the interval to fetch new activites in seconds<br>
  36807. default: 900 (if deviceID is available), 15 otherwise
  36808. </li>
  36809. </ul>
  36810. </ul>
  36811. <a name="NetIO230B"></a>
  36812. <h3>NetIO230B</h3>
  36813. <ul>
  36814. <p>
  36815. fhem-module for NetIO 230B Power Distribution Unit &nbsp;&nbsp; (see: <a
  36816. href="http://www.koukaam.se/showproduct.php?article_id=1502">NetIO 230B
  36817. (koukaam.se)</a>)
  36818. </p>
  36819. Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
  36820. <br />
  36821. Please also note: the PDU must use firmware 3.1 or later and set to unencrypted mode.
  36822. <br /><br />
  36823. <a name="NETIO230Bdefine"></a>
  36824. <b>Define</b>
  36825. <ul>
  36826. <li><code>define &lt;name&gt; NetIO230B &lt;ip-address&gt; &lt;socket number(s)
  36827. &gt; [&lt;user name&gt; &lt;password&gt;]</code></li>
  36828. <li><code>define &lt;name&gt; NetIO230B &lt;ip-address&gt; &lt;socket number(s)
  36829. &gt; [&lt;config file path&gt;]</code></li>
  36830. <p>
  36831. Defines a switching device, where sockets can be switched
  36832. </p>
  36833. <ul>
  36834. <li>separately (just use 0-4 as socket number)</li>
  36835. <li>all together (use 1234 as socket number)</li>
  36836. <li>in arbitrary groups (e.g 13 switches socket 1 and 3, 42
  36837. switches socket 2 and 4, etc...), invalid numbers are
  36838. ignored</li>
  36839. </ul>
  36840. <p>
  36841. User name and password are optional. When no user name or
  36842. password is passed, the module looks for a configfile at
  36843. '/var/log/fhem/netio.conf'. If no config file is found, it
  36844. uses 'admin/admin' as user/pass, since this is the default
  36845. configuration for the device.
  36846. <p>
  36847. Alternatively you can pass a path to a configfile instead of
  36848. the user/pass combo. (e.g. /var/tmp/tmp.conf)
  36849. Configfile-Format:<br />
  36850. <ul>
  36851. <code>
  36852. %config= (<br />
  36853. &nbsp;&nbsp;&nbsp;host => "192.168.61.40",<br />
  36854. &nbsp;&nbsp;&nbsp;user => "admin",<br />
  36855. &nbsp;&nbsp;&nbsp;password => "admin"<br />
  36856. );</code>
  36857. <br /><br /><small>(All settings optional)</small>
  36858. </ul>
  36859. </p>
  36860. <p>Examples:</p>
  36861. <ul>
  36862. <li><code>define Socket3 NetIO230B 192.168.178.10 3</code></li>
  36863. <li><code>define Socket1_and_4 NetIO230B 192.168.178.10 14</code></li>
  36864. <li><code>define coffeemaker NetIO230B 192.168.178.10 1 username secretpassword</code></li>
  36865. <li><code>define coffeemaker_and_light NetIO230B 192.168.178.10 23 /var/log/kitchen.conf</code></li>
  36866. </ul>
  36867. </ul>
  36868. <br>
  36869. <a name="NETIO230Bget"></a>
  36870. <b>Get </b>
  36871. <ul>
  36872. <code>get &lt;name&gt; state</code>
  36873. <br><br>
  36874. returns the state of the socket(s)<br>
  36875. Example:
  36876. <ul>
  36877. <code>get coffeemaker_and_light</code>&nbsp;&nbsp; => <code>on or off</code><br>
  36878. </ul>
  36879. <br>
  36880. </ul>
  36881. <a name="NETIO230Bset"></a>
  36882. <b>Set </b>
  36883. <ul>
  36884. <code>set &lt;name&gt; &lt;value&gt;</code>
  36885. <br><br>
  36886. where <code>value</code> is one of:<br>
  36887. <pre>
  36888. on
  36889. off
  36890. </pre>
  36891. Examples:
  36892. <ul>
  36893. <code>set coffeemaker_and_light on</code><br>
  36894. </ul>
  36895. <br>
  36896. </ul>
  36897. </ul>
  36898. <a name="Netzer"></a>
  36899. <h3>Netzer</h3>
  36900. <ul>
  36901. The <a href="http://www.mobacon.de/wiki/doku.php/en/netzer/index">Netzer</a> realizes an Ethernet interface on a PIC-based platform. As a gateway module it enables communication between standard TCP/IP sockets and serial busses like I2C, SPI and UART.
  36902. Also up to 13 GPIO pins can be accessed. This Modul provides access to these GPIO pins on a Netzer running IO_base in Version 1.5.
  36903. There are two pins usable as ADC channel, two as PMW outputs, three as counter and three can generate an interrupt.
  36904. The GPIO pins are configured a input per default. Before a port can be used as output it must be <a href="http://www.mobacon.de/wiki/doku.php/en/netzer/io">configured</a> via the embedded webpage.
  36905. If one of the input ports is configured to send interrupt events on GPIO Server, on every event all port values will be updated.
  36906. All ports can be read and controlled individually by the function readingsProxy.
  36907. <br><br>
  36908. <a name="NetzerDefine"></a>
  36909. <b>Define</b>
  36910. <ul>
  36911. <code>define &lt;name&gt; Netzer &lt;host:port&gt;</code>
  36912. <br><br>
  36913. </ul>
  36914. <a name="NetzerSet"></a>
  36915. <b>Set</b>
  36916. <ul>
  36917. <code>set &lt;name&gt; &lt;port[_counter]&gt; &lt;value&gt;</code>
  36918. <br>
  36919. Where &lt;value&gt is a character between <code>a</code> and <code>m</code> <br> according to the port. If Port attr is <code>cnt</code> an aditional value &lt;port_counter&gt; can be set.<br>
  36920. Only ports with corresponding attr Port_[a-m] set to <code>PWM</code> or <code>out</code> can be used.<br>
  36921. If Port attr is:<ul>
  36922. <li>PWM &lt;value&gt can be a number between 0 and 1023</li>
  36923. <li>out &lt;value&gt can be a number between 0 and 1</li>
  36924. <li>cnt &lt;port_counter&gt; &lt;value&gt can be a number between 0 and 32767</li>
  36925. <br></ul>
  36926. </ul>
  36927. <b>Get</b>
  36928. <ul>
  36929. <code>get &lt;name&gt; [&lt;port[_counter]&gt;]</code>
  36930. <br>
  36931. If no &lt;port&gt; is set, all readings will be updated.<br>
  36932. &lt;port&gt is a character between <code>a</code> and <code>m</code><br> according to the port. If Port attr is <code>cnt</code> an aditional reading &lt;port_counter&gt; can be read.
  36933. <br><br>
  36934. </ul>
  36935. <a name="NetzerAttr"></a>
  36936. <b>Attributes</b>
  36937. <ul>
  36938. <a name="poll_interval"></a>
  36939. <li>poll_interval<br>
  36940. Set the polling interval in minutes to query the sensor for new measured values.
  36941. Default: 5, valid values: decimal number</li><br>
  36942. <a name="Port_&lt;port&gt;"></a>
  36943. <li>Port_&lt;port&gt;<br>
  36944. <ul>
  36945. Configuration for Netzer port.<br>
  36946. &lt;port&gt; is a character between <code>a</code> and <code>m</code>.<br>
  36947. <li><code>in</code>: Port is defined as input. Same behavior as no attribute. Set is not avaliable for this port.<br>
  36948. Can be used for all ports</li>
  36949. <li><code>out</code>: Port is defined as output. Set is avaliable for this port with &lt;value&gt; between 0 and 1.<br>
  36950. Can be used for all ports</li>
  36951. <li><code>cnt</code>: Port is defined as input. Set is not avaliable for this port.<br>
  36952. An second reading: Port_&lt;port&gt;_counter is avaiable.
  36953. It can be updated with <code>get</code> an changed with <code>set</code>.<br>
  36954. Port_&lt;port&gt;_counter &lt;value&gt; = 0-32767 or overflow if outside this range.<br>
  36955. Can be used for ports a,b,c</li>
  36956. <li><code>ADC</code>: Port is defined as analog input. <code>Get</code> &lt;value&gt; is 0-1023 according the voltage on port. Set is not avaliable for this port.<br>
  36957. Can be used for ports e,f</li>
  36958. <li><code>PWM</code>: Port is defined as PWM output. <code>Set</code> and <code>get</code> &lt;value&gt; is 0-1023 according the duty cycle on the port.<br>
  36959. Can be used for ports d,j</li>
  36960. </ul>
  36961. </li><br>
  36962. </ul>
  36963. <br>
  36964. </ul>
  36965. <a name="NetzerI2C"></a>
  36966. <h3>NetzerI2C</h3>
  36967. <ul>
  36968. <a name="NetzerI2C"></a>
  36969. Provides access to <a href="http://www.mobacon.de/wiki/doku.php/en/netzer/index">Netzer's</a> I2C interfaces for some logical modules and also directly.<br><br>
  36970. <b>preliminary:</b><br>
  36971. Serial Server of Netzer must be <a href="http://www.mobacon.de/wiki/doku.php/en/netzer/serialserveraktiviert"> activated and configured for I2C </a>.<br>
  36972. <a name="NetzerI2CDefine"></a><br>
  36973. <b>Define</b>
  36974. <ul>
  36975. <code>define &lt;name&gt; NetzerI2C &lt;Device-Address:Port&gt;</code><br>
  36976. where <code>&lt;Device-Address:Port&gt;</code> Device Address/ IP-Address and Serial Server TCP Port of the Netzer<br><br>
  36977. </ul>
  36978. <a name="NetzerI2CSet"></a>
  36979. <b>Set</b>
  36980. <ul>
  36981. <li>
  36982. Write one byte (or more bytes sequentially) directly to an I2C device (for devices that have only one register to write):<br>
  36983. <code>set &lt;name&gt; writeByte &lt;I2C Address&gt; &lt;value&gt;</code><br><br>
  36984. </li>
  36985. <li>
  36986. Write one byte (or more bytes sequentially) to the specified register of an I2C device:<br>
  36987. <code>set &lt;name&gt; writeByteReg &lt;I2C Address&gt; &lt;Register Address&gt; &lt;value&gt;</code><br><br>
  36988. </li>
  36989. <li>
  36990. Write n-bytes to an register range, beginning at the specified register:<br>
  36991. <code>set &lt;name&gt; writeBlock &lt;I2C Address&gt; &lt;Register Address&gt; &lt;value&gt;</code><br><br>
  36992. </li>
  36993. Examples:
  36994. <ul>
  36995. Write 0xAA to device with I2C address 0x60<br>
  36996. <code>set test1 writeByte 60 AA</code><br>
  36997. Write 0xAA to register 0x01 of device with I2C address 0x6E<br>
  36998. <code>set test1 writeByteReg 6E 01 AA</code><br>
  36999. Write 0xAA to register 0x01 of device with I2C address 0x6E, after it write 0x55 to register 0x02<br>
  37000. <code>set test1 writeByteReg 6E 01 AA 55</code><br>
  37001. Write 0xA4 to register 0x03, 0x00 to register 0x04 and 0xDA to register 0x05 of device with I2C address 0x60 as block operation<br>
  37002. <code>set test1 writeBlock 60 03 A4 00 DA</code><br>
  37003. </ul><br>
  37004. </ul>
  37005. <a name="NetzerI2CGet"></a>
  37006. <b>Get</b>
  37007. <ul>
  37008. <code>get &lt;name&gt; read &lt;I2C Address&gt; [&lt;Register Address&gt; [&lt;number of registers&gt;]] </code>
  37009. <br>
  37010. gets value of I2C device's registers<br><br>
  37011. Examples:
  37012. <ul>
  37013. Reads byte from device with I2C address 0x60<br>
  37014. <code>get test1 writeByte 60</code><br>
  37015. Reads register 0x01 of device with I2C address 0x6E.<br>
  37016. <code>get test1 read 6E 01 AA 55</code><br>
  37017. Reads register 0x03 to 0x06 of device with I2C address 0x60.<br>
  37018. <code>get test1 read 60 03 4</code><br>
  37019. </ul><br>
  37020. </ul><br>
  37021. <a name="NetzerI2CAttr"></a>
  37022. <b>Attributes</b>
  37023. <ul>
  37024. <li><a href="#ignore">ignore</a></li>
  37025. <li><a href="#do_not_notify">do_not_notify</a></li>
  37026. <li><a href="#showtime">showtime</a></li>
  37027. </ul>
  37028. <br>
  37029. </ul>
  37030. <a name="Nextion"></a>
  37031. <h3>Nextion</h3>
  37032. <ul>
  37033. This module connects remotely to a Nextion display that is connected through a ESP8266 or similar serial to network connection
  37034. <a href="http://wiki.iteadstudio.com/Nextion_HMI_Solution">Nextion</a> devices are relatively inexpensive tft touch displays, that include also a controller that can hold a user interface and communicates via serial protocol to the outside world.
  37035. <br>
  37036. A description of the Hardwarelayout for connecting the ESP8266 module and the Nextion Dispaly is in the correspdong forum thread <a href="https://forum.fhem.de/index.php/topic,51267.0.html">https://forum.fhem.de/index.php/topic,51267.0.html</a>.
  37037. <br><br>
  37038. <a name="Nextiondefine"></a>
  37039. <b>Define</b>
  37040. <ul>
  37041. <code>define &lt;name&gt; Nextion &lt;hostname/ip&gt;:23 </code>
  37042. <br><br>
  37043. Defines a Nextion device on the given hostname / ip and port (should be port 23/telnetport normally)
  37044. <br><br>
  37045. Example: <code>define nxt Nextion 10.0.0.1:23</code><br>
  37046. <br>
  37047. </ul>
  37048. <br><br>
  37049. <a name="Nextionset"></a>
  37050. <b>Set</b>
  37051. <ul>
  37052. <code>set &lt;name&gt; &lt;what&gt; [&lt;value&gt;]</code>
  37053. <br><br>
  37054. where &lt;what&gt; / &lt;value&gt; is one of
  37055. <br><br>
  37056. <li><code>raw &lt;nextion command&gt;</code><br>Sends the given raw message to the nextion display. The supported commands are described with the Nextion displays: <a href="http://wiki.iteadstudio.com/Nextion_Instruction_Set">http://wiki.iteadstudio.com/Nextion_Instruction_Set</a>
  37057. <br>
  37058. Examples:<br>
  37059. <dl>
  37060. <dt><code>set nxt raw page 0</code></dt>
  37061. <dd> switch the display to page 0 <br> </dd>
  37062. <dt><code>set nxt raw b0.txt</code></dt>
  37063. <dd> get the text for button 0 <br> </dd>
  37064. <dl>
  37065. </li>
  37066. <li><code>cmd &lt;nextion command&gt;</code><br>same as raw
  37067. </li>
  37068. <li><code>page &lt;0 - 9&gt;</code><br>set the page number given as new page on the nextion display.
  37069. </li>
  37070. <li><code>pageCmd &lt;one or multiple page numbers separated by ,&gt; &lt;cmds&gt;</code><br>Execute the given commands if the current page on the screen is in the list given as page number.
  37071. </li>
  37072. </ul>
  37073. <br><br>
  37074. <a name="Nextionattr"></a>
  37075. <b>Attributes</b>
  37076. <br><br>
  37077. <ul>
  37078. <li><code>hasSendMe &lt;0 or 1&gt;</code><br>Specify if the display definition on the Nextion display is using the "send me" checkbox to send current page on page changes. This will then change the reading currentPage accordingly
  37079. </li>
  37080. <li><code>initCommands &lt;series of commands&gt;</code><br>Display will be initialized with these commands when the connection to the device is established (or reconnected). Set logic for executing perl or getting readings can be used. Multiple commands will be separated by ;<br>
  37081. Example<br>
  37082. &nbsp;&nbsp;<code>t1.txt="Hallo";p1.val=1;</code>
  37083. </li>
  37084. <li><code>initPage1 &lt;series of commands&gt;</code> to <code>initPage9 &lt;series of commands&gt;</code><br>When the corresponding page number will be displayed the given commands will be sent to the display. See also initCommands.<br>
  37085. Example<br>
  37086. &nbsp;&nbsp;<code>t1.txt="Hallo";p1.val=1;</code>
  37087. </li>
  37088. <li><code>expectAnswer &lt;1 or 0&gt;</code><br>Specify if an answer from display is expected. If set to zero no answer is expected at any time on a command.
  37089. </li>
  37090. </ul>
  37091. <br><br>
  37092. <a name="Nextionreadings"></a>
  37093. <b>Readings</b>
  37094. <ul>
  37095. <li><code>received &lt;Hex values of the last received message from the display&gt;</code><br> The message is converted in hex values (old messages are stored in the readings old1 ... old5). Example for a message is <code>H65(e) H00 H04 H00</code> </li>
  37096. <li><code>rectext &lt;text or empty&gt;</code><br> Translating the received message into text form if possible. Beside predefined data that is sent from the display on specific changes, custom values can be sent in the form <code>$name=value</code>. This can be sent by statements in the Nextion display event code <br>
  37097. <code>print "$bt0="<br>
  37098. get bt0.val</code>
  37099. </li>
  37100. <li><code>currentPage &lt;page number on the display&gt;</code><br> Shows the number of the UI screen as configured on the Nextion display that is currently shown.<br>This is only valid if the attribute <code>hasSendMe</code> is set to 1 and used also in the display definition of the Nextion.</li>
  37101. <li><code>cmdSent &lt;cmd&gt;</code><br> Last cmd sent to the Nextion Display </li>
  37102. <li><code>cmdResult &lt;result text&gt;</code><br> Result of the last cmd sent to the display (or empty)</li>
  37103. </ul>
  37104. <br><br>
  37105. </ul>
  37106. <a name="Nmap"></a>
  37107. <h3>Nmap</h3>
  37108. ( en | <a href="commandref_DE.html#Nmap"><u>de</u></a> )
  37109. <div>
  37110. <ul>
  37111. Nmap is the FHEM module to perform a network scan with Nmap and to display information about the available network devices.<br>
  37112. If a new device is detected, an event
  37113. <code>"&lt;name&gt; new host: &lt;hostname&gt; (&lt;IPv4&gt;)"</code>
  37114. is generated.<br>
  37115. If a device with a known MAC address has been given a new IP, an event
  37116. <code>"&lt;name&gt; new IP: &lt;hostname&gt; (&lt;IPv4&gt;)"</code>
  37117. is generated.<br>
  37118. <br>
  37119. Prerequisites:
  37120. <ul>
  37121. The "Nmap" program and the Perl module "Nmap::Parser" are required.<br>
  37122. Under Debian (based) system, these can be installed using
  37123. <code>"apt-get install nmap libnmap-parser-perl"</code>
  37124. .
  37125. </ul>
  37126. <br>
  37127. <a name="Nmapdefine"></a>
  37128. <b>Define</b>
  37129. <ul>
  37130. <code>define &lt;name&gt; Nmap &lt;target specification&gt;</code><br>
  37131. In the &lt;target specification&gt; are all target hosts, which are to be
  37132. scanned.<br>
  37133. The simplest case is the description of an IP destination address or a
  37134. target host name for scanning.<br>
  37135. To scan an entire network of neighboring hosts, Nmap supports CIDR-style
  37136. addresses. Numbits can be appended to an IPv4 address or hostname, and
  37137. Nmap will scan all IP addresses where the first numbits match those of
  37138. the given IP or host name. For example, 192.168.10.0/24 would scan the
  37139. 256 hosts between 192.168.10.0 and 192.168.10.255. 192.168.10.40/24 would
  37140. scan exactly the same targets. It's also possible to scan multiple
  37141. networks at the same time. For example 192.168.1.0/24 192.168.2.0/24
  37142. would scan the 512 hosts between 192.168.1.0 and 192.168.2.255.<br>
  37143. See
  37144. <a href="https://nmap.org/man/de/man-target-specification.html">
  37145. <u>Nmap Manpage (Specifying Destinations)</u>
  37146. </a>.
  37147. </ul><br>
  37148. <a name="Nmapset"></a>
  37149. <b>Set</b>
  37150. <ul>
  37151. <li>
  37152. <code>clear readings</code><br>
  37153. Deletes all readings except "state".
  37154. </li>
  37155. <li>
  37156. <code>deleteOldReadings &lt;s&gt;</code><br>
  37157. Deletes all readings older than &lt;s&gt; seconds.
  37158. </li>
  37159. <li>
  37160. <code>interrupt</code><br>
  37161. Cancels a running scan.
  37162. </li>
  37163. <li>
  37164. <code>statusRequest</code><br>
  37165. Starts a network scan.
  37166. </li>
  37167. </ul><br>
  37168. <a name="Nmapreadings"></a>
  37169. <b>Readings</b><br>
  37170. <ul>
  37171. General Readings:
  37172. <ul>
  37173. <li>
  37174. <code>NmapVersion</code><br>
  37175. The version number of the installed Nmap program.
  37176. </li>
  37177. <li>
  37178. <code>hostsScanned</code><br>
  37179. The number of scanned addresses.
  37180. </li>
  37181. <li>
  37182. <code>hostsUp</code><br>
  37183. The number of available network devices.
  37184. </li>
  37185. <li>
  37186. <code>knownHosts</code><br>
  37187. The number of known network devices.
  37188. </li>
  37189. <li>
  37190. <code>scanDuration</code><br>
  37191. The scan time in seconds.
  37192. </li>
  37193. <li>
  37194. <code>state</code><br>
  37195. <ul>
  37196. <li>
  37197. <code>Initialized</code><br>
  37198. Nmap has been defined or enabled.
  37199. </li>
  37200. <li>
  37201. <code>running</code><br>
  37202. A network scan is running.
  37203. </li>
  37204. <li>
  37205. <code>done</code><br>
  37206. Network scan completed successfully.
  37207. </li>
  37208. <li>
  37209. <code>aborted</code><br>
  37210. The network scan was aborted due to a timeout or by the user.
  37211. </li>
  37212. <li>
  37213. <code>disabled</code><br>
  37214. Nmap has been disabled.
  37215. </li>
  37216. </ul>
  37217. </li>
  37218. </ul>
  37219. <br>
  37220. Host-specific readings:
  37221. <ul>
  37222. <li>
  37223. <code>&lt;metaReading&gt;_alias</code><br>
  37224. Alias ​​which is specified under the attribute "devAlias" for the
  37225. network device. If no alias is specified, the hostname is displayed.
  37226. </li>
  37227. <li>
  37228. <code>&lt;metaReading&gt;_hostname</code><br>
  37229. Hostname of the network device. If this can not be determined, the IPv4
  37230. address is displayed.
  37231. </li>
  37232. <li>
  37233. <code>&lt;metaReading&gt;_ip</code><br>
  37234. IPv4 address of the network device.
  37235. </li>
  37236. <li>
  37237. <code>&lt;metaReading&gt;_lastSeen</code><br>
  37238. The time at which the network device was last seen as.
  37239. </li>
  37240. <li>
  37241. <code>&lt;metaReading&gt;_macAddress</code><br>
  37242. MAC address of the network device. This can only be determined if the
  37243. scan is executed with root privileges.
  37244. </li>
  37245. <li>
  37246. <code>&lt;metaReading&gt;_macVendor</code><br>
  37247. Probable manufacturer of the network device. This can only be
  37248. determined if the scan is executed with root privileges.
  37249. </li>
  37250. <li>
  37251. <code>&lt;metaReading&gt;_state</code><br>
  37252. State of the network device. Can be either "absent" or "present".
  37253. </li>
  37254. <li>
  37255. <code>&lt;metaReading&gt;_uptime</code><br>
  37256. Time in seconds since the network device is reachable.
  37257. </li>
  37258. <li>
  37259. <code>&lt;metaReading&gt;_uptimeText</code><br>
  37260. Time in "d days, hh hours, mm minutes, ss seconds" since the network
  37261. device is reachable.
  37262. </li>
  37263. </ul>
  37264. </ul><br>
  37265. <a name="Nmapattr"></a>
  37266. <b>Attribute</b>
  37267. <ul>
  37268. <li>
  37269. <code>absenceThreshold &lt;n&gt;</code><br>
  37270. The number of network cans that must result in "absent" before the
  37271. state of a network device changes to "absent". With this function you
  37272. can verify the absence of a device before the status is changed to
  37273. "absent". If this attribute is set to a value &gt;1, the reading
  37274. "&lt;metaReading&gt;_state" remains on "present" until the final status
  37275. changes to "absent".
  37276. </li>
  37277. <li>
  37278. <code>args &lt;args&gt;</code><br>
  37279. Arguments for the Nmap scan.<br>
  37280. The default is "-sn".
  37281. </li>
  37282. <li>
  37283. <code>deleteOldReadings &lt;s&gt;</code><br>
  37284. After a network scan, all host-specific readings older than &lt;s&gt;
  37285. seconds are deleted
  37286. </li>
  37287. <li>
  37288. <code>
  37289. devAlias &lt;ID&gt;:&lt;ALIAS&gt; &lt;ID2&gt;:&lt;ALIAS2&gt; ...
  37290. </code><br>
  37291. A whitespace separated list of &lt;ID&gt;:&lt;ALIAS&gt; pairs that can be used to give an alias to network devices.<br>
  37292. The ID can be MAC address, hostname or IPv4 address.<br>
  37293. Examples:
  37294. <ul>
  37295. MAC address:
  37296. <code>
  37297. attr &lt;name&gt; devAlias 5C:51:88:A5:94:1F:Michaels_Handy_byMAC
  37298. </code><br>
  37299. Hostname:
  37300. <code>
  37301. attr &lt;name&gt; devAlias
  37302. android-87c7a6221093d830:Michaels_Handy_byHOST
  37303. </code><br>
  37304. IPv4 address:
  37305. <code>
  37306. attr &lt;name&gt; devAlias 192.168.1.130:Michaels_Handy_byIP
  37307. </code><br>
  37308. </ul>
  37309. </li>
  37310. <li>
  37311. <code>disable 1</code><br>
  37312. A running scan is canceled and no new scans are started.
  37313. </li>
  37314. <li>
  37315. <code>excludeHosts &lt;target specification&gt;</code><br>
  37316. All target hosts in the &lt;target specification&gt; are skipped during the scan.
  37317. </li>
  37318. <li>
  37319. <code>interval &lt;seconds&gt;</code><br>
  37320. Interval in seconds in which the scan is performed.<br>
  37321. The default value is 900 seconds and the minimum value is 30 seconds.
  37322. </li>
  37323. <li>
  37324. <code>keepReadings 1</code><br>
  37325. If a new IP address is recognized for a device with a known MAC
  37326. address, the invalid readings are deleted unless this attribute is set.
  37327. </li>
  37328. <li>
  37329. <code>leadingZeros 1</code><br>
  37330. For the readings, the IPv4 addresses are displayed with leading zeros.
  37331. </li>
  37332. <li>
  37333. <code>metaReading &lt;metaReading&gt;</code><br>
  37334. You can specify "alias", "hostname", "ip" or "macAddress" as
  37335. &lt;metaReading&gt; and is the identifier for the readings.<br>
  37336. The default is "ip".
  37337. </li>
  37338. <li>
  37339. <code>path</code><br>
  37340. Path under which the Nmap program is to be reached.<br>
  37341. The default is "/urs/bin/nmap".
  37342. </li>
  37343. <li>
  37344. <a href="#readingFnAttributes">
  37345. <u><code>readingFnAttributes</code></u>
  37346. </a>
  37347. </li>
  37348. <li>
  37349. <code>sudo 1</code><br>
  37350. The scan runs with root privileges.<br>
  37351. The prerequisite is that the user has these rights under the FHEM. For
  37352. the user "fhem", on a Debian (based) system, they can be set in the
  37353. "/etc/sudoers" file. For this, the line "fhem ALL=(ALL) NOPASSWD:
  37354. /usr/bin/nmap" must be inserted in the section "#User privilege
  37355. specification".
  37356. </li>
  37357. </ul>
  37358. </ul>
  37359. </div>
  37360. <a name="OBIS"></a>
  37361. <h3>OBIS</h3>
  37362. This module is for SmartMeters, that report their data in OBIS-Standard. It dosen't matter, wether the data comes as PlainText or SML-encoded.
  37363. <br>
  37364. <b>Define</b>
  37365. <code>define &lt;name&gt; OBIS device|none [MeterType] </code><br>
  37366. <br>
  37367. &lt;device&gt; specifies the serial port to communicate with the smartmeter.
  37368. Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
  37369. For example /dev/ttyUSB0. You may specify the baudrate used after the @ char.<br>
  37370. <br><br>
  37371. Optional:MeterType can be of
  37372. <ul><li>VSM102 -&gt; Voltcraft VSM102</li>
  37373. <li>E110 -&gt; Landis&&;Gyr E110</li>
  37374. <li>E350USB -&gt; Landis&&;Gyr E350 USB-Version</li>
  37375. <li>Standard -&gt; Data comes as plainText</li>
  37376. <li>SML -&gt; Smart Message Language</li></ul>
  37377. <br>
  37378. Example: <br>
  37379. <code>define myPowerMeter OBIS /dev/ttyPlugwise@@9600,7,E,1 VSM102</code>
  37380. <br>
  37381. <br>
  37382. <b>Attributes</b>
  37383. <ul><li>
  37384. <code>offset_feed <br>offset_energy</code><br>
  37385. If your smartmeter is BEHIND the meter of your powersupplier, then you can hereby adjust
  37386. the total-reading of your SM to that of your official one.
  37387. <br><br>
  37388. </li>
  37389. <li>
  37390. <code>channels</code><br>
  37391. With this, you can rename the reported channels.
  37392. <code>attr myOBIS channels {"1.0.96.5.5.255"=>"Status","1.0.0.0.0.255"=>"Info","16.7"=>"Verbrauch"}></code>
  37393. <br><br></li>
  37394. <li><code>directions</code><br>
  37395. Some Meters report feeding/comnsuming of power in a statusword.
  37396. If this is set, you get an extra reading dir_total_consumption which defaults to "in" and "out"
  37397. Here, you can change this text with:
  37398. <code>attr myOBIS directions {">" => "pwr consuming", "<"=>"pwr feeding"}</code>
  37399. </li>
  37400. <li>
  37401. <code>interval</code><br>
  37402. The polling-interval in seconds. (Only useful in Polling-Mode)
  37403. </li>
  37404. <li>
  37405. <code>alignTime</code><br>
  37406. Aligns the intervals to a given time. Each interval is repeatedly calculated.
  37407. So if alignTime=00:00 and interval=600 aligns the interval to xx:00:00, xx:10:00, xx:20:00 etc....
  37408. <code>pollingMode</code><br>
  37409. Changes from direct-read to polling-mode.
  37410. Useful with meters, that send a continous datastream.
  37411. Reduces CPU-load.
  37412. <code>unitReadings</code><br>
  37413. Adds the units to the readings like w, wH, A etc.
  37414. <code>valueBracket</code><br>
  37415. Sets, weather to use the value from the first or the second bracket, if applicable.
  37416. Standard is "second"
  37417. </li>
  37418. <br>
  37419. </ul>
  37420. <p>
  37421. <a name="ONKYO_AVR" id="ONKYO_AVR"></a>
  37422. </p>
  37423. <h3>
  37424. ONKYO_AVR
  37425. </h3>
  37426. <ul>
  37427. <a name="ONKYO_AVRdefine" id="ONKYO_AVRdefine"></a> <b>Define</b>
  37428. <ul>
  37429. <code>define &lt;name&gt; ONKYO_AVR &lt;ip-address-or-hostname[:PORT]&gt; [&lt;protocol-version&gt;]</code><br>
  37430. <code>define &lt;name&gt; ONKYO_AVR &lt;devicename[@baudrate]&gt; [&lt;protocol-version&gt;]</code><br>
  37431. <br>
  37432. This module controls ONKYO A/V receivers in real-time via network connection.<br>
  37433. Some newer Pioneer A/V models seem to run ONKYO's ISCP protocol as well and therefore should be fully supported by this module.<br>
  37434. Use <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a> to control slave zones.<br>
  37435. <br>
  37436. Instead of IP address or hostname you may set a serial connection format for direct connectivity.<br>
  37437. <br>
  37438. <br>
  37439. Example:<br>
  37440. <ul>
  37441. <code>
  37442. define avr ONKYO_AVR 192.168.0.10<br>
  37443. <br>
  37444. # With explicit port<br>
  37445. define avr ONKYO_AVR 192.168.0.10:60128<br>
  37446. <br>
  37447. # With explicit protocol version 2013 and later<br>
  37448. define avr ONKYO_AVR 192.168.0.10 2013<br>
  37449. <br>
  37450. # With protocol version prior 2013<br>
  37451. define avr ONKYO_AVR 192.168.0.10 pre2013
  37452. <br>
  37453. # With protocol version prior 2013 and serial connection<br>
  37454. define avr ONKYO_AVR /dev/ttyUSB1@9600 pre2013
  37455. </code>
  37456. </ul>
  37457. </ul><br>
  37458. <br>
  37459. <a name="ONKYO_AVRset" id="ONKYO_AVRset"></a> <b>Set</b>
  37460. <ul>
  37461. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  37462. <br>
  37463. Currently, the following commands are defined:<br>
  37464. <ul>
  37465. <li>
  37466. <b>channel</b> &nbsp;&nbsp;-&nbsp;&nbsp; set active network service (e.g. Spotify)
  37467. </li>
  37468. <li>
  37469. <b>currentTrackPosition</b> &nbsp;&nbsp;-&nbsp;&nbsp; seek to specific time for current track
  37470. </li>
  37471. <li>
  37472. <b>input</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches between inputs
  37473. </li>
  37474. <li>
  37475. <b>inputDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one input down
  37476. </li>
  37477. <li>
  37478. <b>inputUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one input up
  37479. </li>
  37480. <li>
  37481. <b>mute</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; controls volume mute
  37482. </li>
  37483. <li>
  37484. <b>muteT</b> &nbsp;&nbsp;-&nbsp;&nbsp; toggle mute state
  37485. </li>
  37486. <li>
  37487. <b>next</b> &nbsp;&nbsp;-&nbsp;&nbsp; skip track
  37488. </li>
  37489. <li>
  37490. <b>off</b> &nbsp;&nbsp;-&nbsp;&nbsp; turns the device in standby mode
  37491. </li>
  37492. <li>
  37493. <b>on</b> &nbsp;&nbsp;-&nbsp;&nbsp; powers on the device
  37494. </li>
  37495. <li>
  37496. <b>pause</b> &nbsp;&nbsp;-&nbsp;&nbsp; pause current playback
  37497. </li>
  37498. <li>
  37499. <b>play</b> &nbsp;&nbsp;-&nbsp;&nbsp; start playback
  37500. </li>
  37501. <li>
  37502. <b>power</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; set power mode
  37503. </li>
  37504. <li>
  37505. <b>preset</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches between presets
  37506. </li>
  37507. <li>
  37508. <b>presetDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one preset down
  37509. </li>
  37510. <li>
  37511. <b>presetUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one preset up
  37512. </li>
  37513. <li>
  37514. <b>previous</b> &nbsp;&nbsp;-&nbsp;&nbsp; back to previous track
  37515. </li>
  37516. <li>
  37517. <b>remoteControl</b> Send specific remoteControl command to device
  37518. </li>
  37519. <li>
  37520. <b>repeat</b> off,all,all-folder,one &nbsp;&nbsp;-&nbsp;&nbsp; set repeat setting
  37521. </li>
  37522. <li>
  37523. <b>repeatT</b> &nbsp;&nbsp;-&nbsp;&nbsp; toggle repeat state
  37524. </li>
  37525. <li>
  37526. <b>shuffle</b> off,on,on-album,on-folder &nbsp;&nbsp;-&nbsp;&nbsp; set shuffle setting
  37527. </li>
  37528. <li>
  37529. <b>shuffleT</b> &nbsp;&nbsp;-&nbsp;&nbsp; toggle shuffle state
  37530. </li>
  37531. <li>
  37532. <b>sleep</b> 1..90,off &nbsp;&nbsp;-&nbsp;&nbsp; sets auto-turnoff after X minutes
  37533. </li>
  37534. <li>
  37535. <b>stop</b> &nbsp;&nbsp;-&nbsp;&nbsp; stop current playback
  37536. </li>
  37537. <li>
  37538. <b>toggle</b> &nbsp;&nbsp;-&nbsp;&nbsp; switch between on and off
  37539. </li>
  37540. <li>
  37541. <b>volume</b> 0...100 &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in percentage
  37542. </li>
  37543. <li>
  37544. <b>volumeUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; increases the volume level
  37545. </li>
  37546. <li>
  37547. <b>volumeDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; decreases the volume level
  37548. </li>
  37549. </ul>
  37550. <ul>
  37551. <br>
  37552. Other set commands may appear dynamically based on previously used "get avr remoteControl"-commands and resulting readings.<br>
  37553. See "get avr remoteControl &lt;Set-name&gt; help" to get more information about possible readings and set values.
  37554. </ul>
  37555. </ul><br>
  37556. <br>
  37557. <a name="ONKYO_AVRget" id="ONKYO_AVRget"></a> <b>Get</b>
  37558. <ul>
  37559. <code>get &lt;name&gt; &lt;what&gt;</code><br>
  37560. <br>
  37561. Currently, the following commands are defined:<br>
  37562. <br>
  37563. <ul>
  37564. <li>
  37565. <b>createZone</b> &nbsp;&nbsp;-&nbsp;&nbsp; creates a separate <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a> device for available zones of the device
  37566. </li>
  37567. <li>
  37568. <b>remoteControl</b> &nbsp;&nbsp;-&nbsp;&nbsp; sends advanced remote control commands based on current zone; you may use "get avr remoteControl &lt;Get-command&gt; help" to see details about possible values and resulting readings. In Case the device does not support the command, just nothing happens as normally the device does not send any response. In case the command is temporarily not available you may see according feedback from the log file using attribute verbose=4.
  37569. </li>
  37570. <li>
  37571. <b>statusRequest</b> &nbsp;&nbsp;-&nbsp;&nbsp; clears cached settings and re-reads device XML configurations
  37572. </li>
  37573. </ul>
  37574. </ul><br>
  37575. <br>
  37576. <a name="ONKYO_AVRattr" id="ONKYO_AVRattr"></a> <b>Attributes</b>
  37577. <ul>
  37578. <ul>
  37579. <li>
  37580. <b>connectionCheck</b> &nbsp;&nbsp;1..120,off&nbsp;&nbsp; Pings the device every X seconds to verify connection status. Defaults to 60 seconds.
  37581. </li>
  37582. <li>
  37583. <b>inputs</b> &nbsp;&nbsp;-&nbsp;&nbsp; List of inputs, auto-generated after first connection to the device. Inputs may be deleted or re-ordered as required. To rename an input, one needs to put a comma behind the current name and enter the new name.
  37584. </li>
  37585. <li>
  37586. <b>model</b> &nbsp;&nbsp;-&nbsp;&nbsp; Contains the model name of the device. Cannot not be changed manually as it is going to be overwritten be the module.
  37587. </li>
  37588. <li>
  37589. <b>volumeSteps</b> &nbsp;&nbsp;-&nbsp;&nbsp; When using set commands volumeUp or volumeDown, the volume will be increased or decreased by these steps. Defaults to 1.
  37590. </li>
  37591. <li>
  37592. <b>volumeMax</b> &nbsp;&nbsp;1...100&nbsp;&nbsp; When set, any volume higher than this is going to be replaced by this value.
  37593. </li>
  37594. <li>
  37595. <b>wakeupCmd</b> &nbsp;&nbsp;-&nbsp;&nbsp; In case the device is unreachable and one is sending set command "on", this FHEM command will be executed before the actual "on" command is sent. E.g. may be used to turn on a switch before the device becomes available via network.
  37596. </li>
  37597. </ul>
  37598. </ul><br>
  37599. <br>
  37600. <b>Generated Readings/Events:</b><br>
  37601. <ul>
  37602. <li>
  37603. <b>audin_*</b> - Shows technical details about current audio input
  37604. </li>
  37605. <li>
  37606. <b>brand</b> - Shows brand name of the device manufacturer
  37607. </li>
  37608. <li>
  37609. <b>channel</b> - Shows current network service name when (e.g. streaming services like Spotify); part of FHEM-4-AV-Devices compatibility
  37610. </li>
  37611. <li>
  37612. <b>currentAlbum</b> - Shows current Album information; part of FHEM-4-AV-Devices compatibility
  37613. </li>
  37614. <li>
  37615. <b>currentArtist</b> - Shows current Artist information; part of FHEM-4-AV-Devices compatibility
  37616. </li>
  37617. <li>
  37618. <b>currentMedia</b> - currently no in use
  37619. </li>
  37620. <li>
  37621. <b>currentTitle</b> - Shows current Title information; part of FHEM-4-AV-Devices compatibility
  37622. </li>
  37623. <li>
  37624. <b>currentTrack*</b> - Shows current track timer information; part of FHEM-4-AV-Devices compatibility
  37625. </li>
  37626. <li>
  37627. <b>deviceid</b> - Shows device name as set in device settings
  37628. </li>
  37629. <li>
  37630. <b>deviceyear</b> - Shows model device year
  37631. </li>
  37632. <li>
  37633. <b>firmwareversion</b> - Shows current firmware version
  37634. </li>
  37635. <li>
  37636. <b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
  37637. </li>
  37638. <li>
  37639. <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
  37640. </li>
  37641. <li>
  37642. <b>playStatus</b> - Shows current network service playback status; part of FHEM-4-AV-Devices compatibility
  37643. </li>
  37644. <li>
  37645. <b>power</b> - Reports the power status of the device (can be "on" or "off")
  37646. </li>
  37647. <li>
  37648. <b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present"). In case of an absent device, control is not possible.
  37649. </li>
  37650. <li>
  37651. <b>repeat</b> - Shows current network service repeat status; part of FHEM-4-AV-Devices compatibility
  37652. </li>
  37653. <li>
  37654. <b>screen*</b> - Experimental: Gives some information about text that is being shown via on-screen menu
  37655. </li>
  37656. <li>
  37657. <b>shuffle</b> - Shows current network service shuffle status; part of FHEM-4-AV-Devices compatibility
  37658. </li>
  37659. <li>
  37660. <b>sleep</b> - Reports current sleep state (can be "off" or shows timer in minutes)
  37661. </li>
  37662. <li>
  37663. <b>state</b> - Reports current network connection status to the device
  37664. </li>
  37665. <li>
  37666. <b>stateAV</b> - Zone status from user perspective combining readings presence, power, mute and playStatus to a useful overall status.
  37667. </li>
  37668. <li>
  37669. <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
  37670. </li>
  37671. <li>
  37672. <b>vidin_*</b> - Shows technical details about current video input before image processing
  37673. </li>
  37674. <li>
  37675. <b>vidout_*</b> - Shows technical details about current video output after image processing
  37676. </li>
  37677. <li>
  37678. <b>zones</b> - Shows total available zones of device
  37679. </li>
  37680. </ul>
  37681. <br>
  37682. Using remoteControl get-command might result in creating new readings in case the device sends any data.<br>
  37683. </ul>
  37684. <p>
  37685. <a name="ONKYO_AVR_ZONE" id="ONKYO_AVR_ZONE"></a>
  37686. </p>
  37687. <h3>
  37688. ONKYO_AVR_ZONE
  37689. </h3>
  37690. <ul>
  37691. <a name="ONKYO_AVR_ZONEdefine" id="ONKYO_AVR_ZONEdefine"></a> <b>Define</b>
  37692. <ul>
  37693. <code>define &lt;name&gt; ONKYO_AVR_ZONE [&lt;zone-id&gt;]</code><br>
  37694. <br>
  37695. This is a supplement module for <a href="#ONKYO_AVR">ONKYO_AVR</a> representing zones.<br>
  37696. <br>
  37697. Example:<br>
  37698. <ul>
  37699. <code>
  37700. define avr ONKYO_AVR_ZONE<br>
  37701. <br>
  37702. # For zone2<br>
  37703. define avr ONKYO_AVR_ZONE 2<br>
  37704. <br>
  37705. # For zone3<br>
  37706. define avr ONKYO_AVR_ZONE 3<br>
  37707. <br>
  37708. # For zone4<br>
  37709. define avr ONKYO_AVR_ZONE 4
  37710. </code>
  37711. </ul>
  37712. </ul><br>
  37713. <br>
  37714. <a name="ONKYO_AVRset" id="ONKYO_AVRset"></a> <b>Set</b>
  37715. <ul>
  37716. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  37717. <br>
  37718. Currently, the following commands are defined:<br>
  37719. <ul>
  37720. <li>
  37721. <b>channel</b> &nbsp;&nbsp;-&nbsp;&nbsp; set active network service (e.g. Spotify)
  37722. </li>
  37723. <li>
  37724. <b>input</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches between inputs
  37725. </li>
  37726. <li>
  37727. <b>inputDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one input down
  37728. </li>
  37729. <li>
  37730. <b>inputUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one input up
  37731. </li>
  37732. <li>
  37733. <b>mute</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; controls volume mute
  37734. </li>
  37735. <li>
  37736. <b>muteT</b> &nbsp;&nbsp;-&nbsp;&nbsp; toggle mute state
  37737. </li>
  37738. <li>
  37739. <b>next</b> &nbsp;&nbsp;-&nbsp;&nbsp; skip track
  37740. </li>
  37741. <li>
  37742. <b>off</b> &nbsp;&nbsp;-&nbsp;&nbsp; turns the device in standby mode
  37743. </li>
  37744. <li>
  37745. <b>on</b> &nbsp;&nbsp;-&nbsp;&nbsp; powers on the device
  37746. </li>
  37747. <li>
  37748. <b>pause</b> &nbsp;&nbsp;-&nbsp;&nbsp; pause current playback
  37749. </li>
  37750. <li>
  37751. <b>play</b> &nbsp;&nbsp;-&nbsp;&nbsp; start playback
  37752. </li>
  37753. <li>
  37754. <b>power</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; set power mode
  37755. </li>
  37756. <li>
  37757. <b>preset</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches between presets
  37758. </li>
  37759. <li>
  37760. <b>presetDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one preset down
  37761. </li>
  37762. <li>
  37763. <b>presetUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; switches one preset up
  37764. </li>
  37765. <li>
  37766. <b>previous</b> &nbsp;&nbsp;-&nbsp;&nbsp; back to previous track
  37767. </li>
  37768. <li>
  37769. <b>remoteControl</b> Send specific remoteControl command to device
  37770. </li>
  37771. <li>
  37772. <b>repeat</b> off,all,all-folder,one &nbsp;&nbsp;-&nbsp;&nbsp; set repeat setting
  37773. </li>
  37774. <li>
  37775. <b>repeatT</b> &nbsp;&nbsp;-&nbsp;&nbsp; toggle repeat state
  37776. </li>
  37777. <li>
  37778. <b>shuffle</b> off,on,on-album,on-folder &nbsp;&nbsp;-&nbsp;&nbsp; set shuffle setting
  37779. </li>
  37780. <li>
  37781. <b>shuffleT</b> &nbsp;&nbsp;-&nbsp;&nbsp; toggle shuffle state
  37782. </li>
  37783. <li>
  37784. <b>sleep</b> 1..90,off &nbsp;&nbsp;-&nbsp;&nbsp; sets auto-turnoff after X minutes
  37785. </li>
  37786. <li>
  37787. <b>stop</b> &nbsp;&nbsp;-&nbsp;&nbsp; stop current playback
  37788. </li>
  37789. <li>
  37790. <b>toggle</b> &nbsp;&nbsp;-&nbsp;&nbsp; switch between on and off
  37791. </li>
  37792. <li>
  37793. <b>volume</b> 0...100 &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in percentage
  37794. </li>
  37795. <li>
  37796. <b>volumeUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; increases the volume level
  37797. </li>
  37798. <li>
  37799. <b>volumeDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; decreases the volume level
  37800. </li>
  37801. </ul>
  37802. <ul>
  37803. <br>
  37804. Other set commands may appear dynamically based on previously used "get avr remoteControl"-commands and resulting readings.<br>
  37805. See "get avr remoteControl &lt;Set-name&gt; help" to get more information about possible readings and set values.
  37806. </ul>
  37807. </ul><br>
  37808. <br>
  37809. <a name="ONKYO_AVRget" id="ONKYO_AVRget"></a> <b>Get</b>
  37810. <ul>
  37811. <code>get &lt;name&gt; &lt;what&gt;</code><br>
  37812. <br>
  37813. Currently, the following commands are defined:<br>
  37814. <br>
  37815. <ul>
  37816. <li>
  37817. <b>createZone</b> &nbsp;&nbsp;-&nbsp;&nbsp; creates a separate <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a> device for available zones of the device
  37818. </li>
  37819. <li>
  37820. <b>remoteControl</b> &nbsp;&nbsp;-&nbsp;&nbsp; sends advanced remote control commands based on current zone; you may use "get avr remoteControl &lt;Get-command&gt; help" to see details about possible values and resulting readings. In Case the device does not support the command, just nothing happens as normally the device does not send any response. In case the command is temporarily not available you may see according feedback from the log file using attribute verbose=4.
  37821. </li>
  37822. </ul>
  37823. </ul><br>
  37824. <br>
  37825. <a name="ONKYO_AVRattr" id="ONKYO_AVRattr"></a> <b>Attributes</b>
  37826. <ul>
  37827. <ul>
  37828. <li>
  37829. <b>inputs</b> &nbsp;&nbsp;-&nbsp;&nbsp; List of inputs, auto-generated after first connection to the device. Inputs may be deleted or re-ordered as required. To rename an input, one needs to put a comma behind the current name and enter the new name.
  37830. </li>
  37831. <li>
  37832. <b>volumeSteps</b> &nbsp;&nbsp;-&nbsp;&nbsp; When using set commands volumeUp or volumeDown, the volume will be increased or decreased by these steps. Defaults to 1.
  37833. </li>
  37834. <li>
  37835. <b>volumeMax</b> &nbsp;&nbsp;1...100&nbsp;&nbsp; When set, any volume higher than this is going to be replaced by this value.
  37836. </li>
  37837. <li>
  37838. <b>wakeupCmd</b> &nbsp;&nbsp;-&nbsp;&nbsp; In case the device is unreachable and one is sending set command "on", this FHEM command will be executed before the actual "on" command is sent. E.g. may be used to turn on a switch before the device becomes available via network.
  37839. </li>
  37840. </ul>
  37841. </ul><br>
  37842. <br>
  37843. <b>Generated Readings/Events:</b><br>
  37844. <ul>
  37845. <li>
  37846. <b>channel</b> - Shows current network service name when (e.g. streaming services like Spotify); part of FHEM-4-AV-Devices compatibility
  37847. </li>
  37848. <li>
  37849. <b>currentAlbum</b> - Shows current Album information; part of FHEM-4-AV-Devices compatibility
  37850. </li>
  37851. <li>
  37852. <b>currentArtist</b> - Shows current Artist information; part of FHEM-4-AV-Devices compatibility
  37853. </li>
  37854. <li>
  37855. <b>currentMedia</b> - currently no in use
  37856. </li>
  37857. <li>
  37858. <b>currentTitle</b> - Shows current Title information; part of FHEM-4-AV-Devices compatibility
  37859. </li>
  37860. <li>
  37861. <b>currentTrack*</b> - Shows current track timer information; part of FHEM-4-AV-Devices compatibility
  37862. </li>
  37863. <li>
  37864. <b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
  37865. </li>
  37866. <li>
  37867. <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
  37868. </li>
  37869. <li>
  37870. <b>playStatus</b> - Shows current network service playback status; part of FHEM-4-AV-Devices compatibility
  37871. </li>
  37872. <li>
  37873. <b>power</b> - Reports the power status of the device (can be "on" or "off")
  37874. </li>
  37875. <li>
  37876. <b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present"). In case of an absent device, control is not possible.
  37877. </li>
  37878. <li>
  37879. <b>repeat</b> - Shows current network service repeat status; part of FHEM-4-AV-Devices compatibility
  37880. </li>
  37881. <li>
  37882. <b>shuffle</b> - Shows current network service shuffle status; part of FHEM-4-AV-Devices compatibility
  37883. </li>
  37884. <li>
  37885. <b>state</b> - Reports current network connection status to the device
  37886. </li>
  37887. <li>
  37888. <b>stateAV</b> - Zone status from user perspective combining readings presence, power, mute and playStatus to a useful overall status.
  37889. </li>
  37890. <li>
  37891. <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
  37892. </li>
  37893. </ul>
  37894. <br>
  37895. Using remoteControl get-command might result in creating new readings in case the device sends any data.<br>
  37896. </ul>
  37897. <a name="OPENWEATHER"></a>
  37898. <h3>OPENWEATHER</h3>
  37899. <div>
  37900. <ul>
  37901. The module extracts weather data via the <a href="http://www.wetter.com/apps_und_mehr/website/api/dokumentation">openweather API</a> of <a href="http://www.wetter.com">www.wetter.com</a>.
  37902. <br>
  37903. It requires a registration on this website to obtain the necessary parameters.
  37904. <br>
  37905. It uses the perl moduls HTTP::Request, LWP::UserAgent, HTML::Parse and Digest::MD5.
  37906. <br/><br/>
  37907. <a name="OPENWEATHERdefine"></a>
  37908. <b>Define</b>
  37909. <ul>
  37910. <br>
  37911. <code>define &lt;name&gt; OPENWEATHER &lt;project&gt; &lt;cityCode&gt; &lt;apiKey&gt; [language]</code>
  37912. <br>
  37913. Example:
  37914. <br>
  37915. <code>define wetter OPENWEATHER projectx DE0001020 3c551bc20819c19ee88d</code>
  37916. <br/><br/>
  37917. To obtain the below parameter you have to create a new project on <a href="http://www.wetter.com/apps_und_mehr/website/api/projekte/">www.wetter.com</a>.
  37918. <br/><br/>
  37919. <li><code>&lt;project&gt;</code>
  37920. <br>
  37921. Name of the 'openweather' project (create with a user account on wetter.com).
  37922. </li><br>
  37923. <li><code>&lt;cityCode&gt;</code>
  37924. <br>
  37925. Code of the location for which the forecast is requested.
  37926. The code is part of the URL of the weather forecast page. For example <i>DE0009042</i> in:
  37927. <br>
  37928. <i>http://www.wetter.com/wetter_aktuell/aktuelles_wetter/deutschland/rostock/<u>DE0009042</u>.html</i>
  37929. </li><br>
  37930. <li><code>&lt;apiKey&gt;</code>
  37931. <br>
  37932. Secret key that is provided when the user creates a 'openweather' project on wetter.com.
  37933. </li><br>
  37934. <li><code>[language]</code>
  37935. <br>
  37936. Optional. Default language of weather description is German. Change with <i>en</i> to English or <i>es</i> to Spanish.
  37937. </li><br>
  37938. The function <code>OPENWEATHER_Html</code> creates a HTML code for a vertically arranged weather forecast.
  37939. <br>
  37940. Example:
  37941. <br>
  37942. <code>define MyForecast weblink htmlCode { OPENWEATHER_Html("MyWeather") }</code>
  37943. <br/><br/>
  37944. </ul>
  37945. <a name="OPENWEATHERset"></a>
  37946. <b>Set</b>
  37947. <ul>
  37948. <br>
  37949. <li><code>set &lt;name&gt; update</code>
  37950. <br>
  37951. The weather data are immediately polled from the website.
  37952. </li><br>
  37953. </ul>
  37954. <a name="OPENWEATHERget"></a>
  37955. <b>Get</b>
  37956. <ul>
  37957. <br>
  37958. <li><code>get &lt;name&gt; apiResponse</code>
  37959. <br>
  37960. Shows the response of the web site.
  37961. </li><br>
  37962. </ul>
  37963. <a name="OPENWEATHERattr"></a>
  37964. <b>Attributes</b>
  37965. <ul>
  37966. <br>
  37967. <li><code>disable &lt;0 | 1&gt;</code>
  37968. <br>
  37969. Automatic update is stopped if set to 1.
  37970. </li><br>
  37971. <li><code>INTERVAL &lt;seconds&gt;</code>
  37972. <br>
  37973. Polling interval for weather data in seconds (default and smallest value is 3600 = 1 hour). 0 will stop automatic updates.
  37974. </li><br>
  37975. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  37976. </ul>
  37977. <br>
  37978. <a name="OPENWEATHERreading"></a>
  37979. <b>Forecast readings</b>
  37980. <ul>
  37981. Note! The forecast values (in brackets) have first to be selected on the project setup page on wetter.com.
  37982. <br/>&nbsp;<br/>
  37983. <li><b>fc</b><i>0|1|2</i><b>_...</b> - forecast values for <i>today|tommorrow|in 2 days</i></li>
  37984. <li><b>fc</b><i>0</i><b>_...<i>06|11|17|23</i></b> - forecast values for <i>today</i> at <i>06|11|17|23</i> o'clock</li>
  37985. <li><b>fc</b><i>1</i><b>_temp</b><i>Min|Max</i> - <i>minimal|maximal</i> temperature for <i>tommorrow</i> in &deg;C (tn,tx)</li>
  37986. <li><b>fc</b><i>0</i><b>_temp</b><i>Min06</i> - <i>minimal</i> temperatur <i>today</i> at <i>06:00</i> o'clock in &deg;C</li>
  37987. <li><b>fc</b><i>0</i><b>_chOfRain</b> - chance of rain <i>today</i> in % (pc)</li>
  37988. <li><b>fc</b><i>0</i><b>_valHours</b><i>06</i> - validity period in hours of the forecast values starting at <i>06:00</i> o'clock (p)</li>
  37989. <li><b>fc</b><i>0</i><b>_weather</b> - weather situation <i>today</i> in German (w_txt)</li>
  37990. <li><b>fc</b><i>0</i><b>_weatherCode</b> - code of weather situation <i>today</i> (w)</li>
  37991. <li><b>fc</b><i>0</i><b>_wday</b> - German abbreviation of week day of <i>today</i> (d)</li>
  37992. <li><b>fc</b><i>0</i><b>_wind</b> - wind speed <i>today</i> in km/h (ws)</li>
  37993. <li><b>fc</b><i>0</i><b>_windDir</b> - wind direction <i>today</i> in &deg; (degree) (wd)</li>
  37994. <li><b>fc</b><i>0</i><b>_windDirTxt</b> - wind direction <i>today</i> in text form (wd_txt</li>
  37995. <li>etc.</li>
  37996. </ul>
  37997. <br>
  37998. </ul>
  37999. </div>
  38000. <a name="OREGON"></a>
  38001. <h3>OREGON</h3>
  38002. <ul>
  38003. The OREGON module interprets Oregon sensor messages received by a RFXCOM or SIGNALduino or CUx receiver. You need to define a receiver (RFXCOM, SIGNALduino or CUx) first.
  38004. See <a href="#RFXCOM">RFXCOM</a>.
  38005. See <a href="#SIGNALduino">SIGNALduino</a>.
  38006. <br><br>
  38007. <a name="OREGONdefine"></a>
  38008. <b>Define</b>
  38009. <ul>
  38010. <code>define &lt;name&gt; OREGON &lt;deviceid&gt;</code> <br>
  38011. <br>
  38012. &lt;deviceid&gt; is the device identifier of the Oregon sensor. It consists of the sensors name and a one byte hex string (00-ff) that identifies the sensor. The define statement with the deviceid is generated automatically by autocreate. The following sensor names are used:
  38013. BTHR918, BTHR918N, PCR800 RGR918, RTGR328N, THN132N, THGR228N, THGR328N, THGR918, THR128, THWR288A, THGR810, UV138, UVN800, WGR918, WGR800, WTGR800_A, WTGR800_T.
  38014. <br>
  38015. The one byte hex string is generated by the Oregon sensor when is it powered on. The value seems to be randomly generated. This has the advantage that you may use more than one Oregon sensor of the same type even if it has no switch to set a sensor id. For exampple the author uses three BTHR918 sensors at the same time. All have different deviceids. The drawback is that the deviceid changes after changing batteries.
  38016. <br><br>
  38017. Example: <br>
  38018. <code>define Kaminzimmer OREGON BTHR918N_ab</code>
  38019. <br>
  38020. </ul>
  38021. <br>
  38022. <a name="OREGONset"></a>
  38023. <b>Set</b> <ul>N/A</ul><br>
  38024. <a name="OREGONget"></a>
  38025. <b>Get</b> <ul>N/A</ul><br>
  38026. <a name="OREGONattr"></a>
  38027. <b>Attributes</b>
  38028. <ul>
  38029. <li><a href="#IODev">IODev</a></li>
  38030. <li><a href="#do_not_notify">do_not_notify</a></li>
  38031. <li><a href="#ignore">ignore</a></li>
  38032. <li><a href="#showtime">showtime</a></li>
  38033. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38034. </ul>
  38035. </ul>
  38036. <a name="OWAD"></a>
  38037. <h3>OWAD</h3>
  38038. <p>FHEM module to commmunicate with 1-Wire A/D converters<br /><br />
  38039. <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
  38040. (prerequisite: Add this module's name to the list of clients in OWServer).
  38041. Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br/></p>
  38042. <br /><h4>Example</h4>
  38043. <p>
  38044. <code>define OWX_AD OWAD 724610000000 45</code>
  38045. <br />
  38046. <code>attr OWX_AD DAlarm high</code>
  38047. <br />
  38048. <code>attr OWX_AD DName humidity</code>
  38049. <br />
  38050. <code>attr OWX_AD DUnit %</code>
  38051. <br />
  38052. <code>attr OWX_AD DFunction VD*31.907097-0.8088</code>
  38053. <br />
  38054. <code>attr OWX_AD DHigh 50.0</code>
  38055. <br />
  38056. </p><br />
  38057. <a name="OWADdefine"></a>
  38058. <h4>Define</h4>
  38059. <p>
  38060. <code>define &lt;name&gt; OWAD [&lt;model&gt;] &lt;id&gt; [&lt;interval&gt;]</code> or <br/>
  38061. <code>define &lt;name&gt; OWAD &lt;fam&gt;.&lt;id&gt; [&lt;interval&gt;]</code>
  38062. <br /><br /> Define a 1-Wire A/D converter.<br /><br /></p>
  38063. <ul>
  38064. <li>
  38065. <code>[&lt;model&gt;]</code><br /> Defines the A/D converter model (and thus 1-Wire
  38066. family id), currently the following values are permitted: <ul>
  38067. <li>model DS2450 with family id 20 (default if the model parameter is
  38068. omitted)</li>
  38069. </ul>
  38070. </li>
  38071. <li>
  38072. <code>&lt;fam&gt;</code>
  38073. <br />2-character unique family id, see above
  38074. </li>
  38075. <li>
  38076. <code>&lt;id&gt;</code>
  38077. <br />12-character unique ROM id of the converter device without family id and CRC
  38078. code </li>
  38079. <li>
  38080. <code>&lt;interval&gt;</code>
  38081. <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
  38082. </ul>
  38083. <br />
  38084. <a name="OWADset"></a>
  38085. <h4>Set</h4>
  38086. <ul>
  38087. <li><a name="owad_interval">
  38088. <code>set &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38089. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
  38090. </ul>
  38091. <br />
  38092. <a name="OWADget"></a>
  38093. <h4>Get</h4>
  38094. <ul>
  38095. <li><a name="owad_id">
  38096. <code>get &lt;name&gt; id</code></a>
  38097. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  38098. <li><a name="owad_reading">
  38099. <code>get &lt;name&gt; reading</code></a><br />Obtain the measuement values. </li>
  38100. <li><a name="owad_alarm">
  38101. <code>get &lt;name&gt; alarm</code></a><br />Obtain the alarm values. </li>
  38102. <li><a name="owad_status">
  38103. <code>get &lt;name&gt; status</code></a><br />Obtain the i/o status values.
  38104. </li>
  38105. </ul>
  38106. <br />
  38107. <a name="OWADattr"></a>
  38108. <h4>Attributes</h4>
  38109. <ul>
  38110. <li><a name="owad_stateAL0"><code>attr &lt;name&gt; stateAL0 &lt;string&gt;</code></a>
  38111. <br />character string for denoting low normal condition, default is empty </li>
  38112. <li><a name="owad_stateAH0"><code>attr &lt;name&gt; stateAH0 &lt;string&gt;</code></a>
  38113. <br />character string for denoting high normal condition, default is empty </li>
  38114. <li><a name="owad_stateAL1"><code>attr &lt;name&gt; stateAL1 &lt;string&gt;</code></a>
  38115. <br />character string for denoting low alarm condition, default is ↓</li>
  38116. <li><a name="owad_stateAH1"><code>attr &lt;name&gt; stateAH1 &lt;string&gt;</code></a>
  38117. <br />character string for denoting high alarm condition, default is ↑</li>
  38118. <li><a name="owad_interval2">
  38119. <code>attr &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38120. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
  38121. </ul> For each of the following attributes, the channel identification A,B,C,D may be used. <ul>
  38122. <li><a name="owad_cname"><code>attr &lt;name&gt; &lt;channel&gt;Name
  38123. &lt;string&gt;[|&lt;string&gt;]</code></a>
  38124. <br />name for the channel [|short name used in state reading]. </li>
  38125. <li><a name="owad_cunit"><code>attr &lt;name&gt; &lt;channel&gt;Unit
  38126. &lt;string&gt;</code></a>
  38127. <br />unit of measurement for this channel used in state reading (default "V", set to "none" for empty). </li>
  38128. <li><a name="owad_cfunction"> <code>attr &lt;name&gt; &lt;channel&gt;Function
  38129. &lt;string&gt;</code></a>
  38130. <br />arbitrary functional expression involving the variables VA,VB,VC,VD. VA is replaced by
  38131. the (raw) measured voltage in channel A, etc. This attribute allows linearization of measurement
  38132. curves as well as the mixing of various channels. </li>
  38133. <li><a name="owad_calarm"><code>attr &lt;name&gt; &lt;channel&gt;Alarm
  38134. &lt;string&gt;</code></a>
  38135. <br />alarm setting in this channel, either both, low, high or none (default). </li>
  38136. <li><a name="owad_clow"><code>attr &lt;name&gt; &lt;channel&gt;Low
  38137. &lt;float&gt;</code></a>
  38138. <br />measurement value for low alarm. </li>
  38139. <li><a name="owad_chigh"><code>attr &lt;name&gt; &lt;channel&gt;High
  38140. &lt;float&gt;</code></a>
  38141. <br />measurement value for highalarm. </li>
  38142. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38143. </ul>
  38144. <a name="OWCOUNT"></a>
  38145. <h3>OWCOUNT</h3>
  38146. <p>FHEM module to commmunicate with 1-Wire Counter/RAM DS2423 or its emulation DS2423emu <br />
  38147. <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
  38148. (prerequisite: Add this module's name to the list of clients in OWServer).
  38149. Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br/><p/>
  38150. <br /><h4>Example</h4><br />
  38151. <code>define OWC OWCOUNT 1D.CE780F000000 60</code>
  38152. <br />
  38153. <code>attr OWC AName energy|W</code>
  38154. <br />
  38155. <code>attr OWC AUnit kWh</code>
  38156. <br />
  38157. <code>attr OWC APeriod hour</code>
  38158. <br />
  38159. <code>attr OWC ARate power|P</code>
  38160. <br />
  38161. <code>attr OWX_AMode daily</code>
  38162. <br />
  38163. <br />
  38164. <a name="OWCOUNTdefine"></a>
  38165. <h4>Define</h4>
  38166. <p>
  38167. <code>define &lt;name&gt; OWCOUNT [&lt;model&gt;] &lt;id&gt; [&lt;interval&gt;]</code> or <br/>
  38168. <code>define &lt;name&gt; OWCOUNT &lt;fam&gt;.&lt;id&gt; [&lt;interval&gt;]</code>
  38169. <br /><br /> Define a 1-Wire counter.<br /><br /></p>
  38170. <ul>
  38171. <li>
  38172. <code>[&lt;model&gt;]</code><br /> Defines the counter model (and thus 1-Wire family
  38173. id), currently the following values are permitted: <ul>
  38174. <li>model DS2423 with family id 1D (default if the model parameter is
  38175. omitted)</li>
  38176. <li>model DS2423enew with family id 1D - emulator, works like DS2423</li>
  38177. <li>model DS2423eold with family id 1D - emulator, works like DS2423 except that the internal memory is not present</li>
  38178. </ul>
  38179. </li>
  38180. <li>
  38181. <code>&lt;fam&gt;</code>
  38182. <br />2-character unique family id, see above
  38183. </li>
  38184. <li>
  38185. <code>&lt;id&gt;</code>
  38186. <br />12-character unique ROM id of the converter device without family id and CRC
  38187. code </li>
  38188. <li>
  38189. <code>&lt;interval&gt;</code>
  38190. <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
  38191. </ul>
  38192. <br />
  38193. <a name="OWCOUNTset"></a>
  38194. <h4>Set</h4>
  38195. <ul>
  38196. <li><a name="owcount_interval">
  38197. <code>set &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38198. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.
  38199. Log line after each interval &lt;date&gt; &lt;name&gt; &lt;channel&gt;: &lt;value&gt; &lt;unit&gt; &lt;value&gt; /
  38200. &lt;unit&gt;/&lt;period&gt; &lt;channel&gt;: &lt;value&gt; &lt;unit&gt; / &lt;value&gt; &lt;unit&gt;/&lt;period&gt; <br />
  38201. example: 2012-07-30_00:07:55 OWX_C Taste: 17.03 p 28.1 p/h B: 7.0 cts 0.0 cts/min
  38202. </li>
  38203. <li><a name="owcount_memory">
  38204. <code>set &lt;name&gt; memory &lt;page&gt; &lt;string&gt;</code></a><br />Write 32 bytes to
  38205. memory page 0..13 </li>
  38206. <li><a name="owcount_midnight">
  38207. <code>set &lt;name&gt; midnight &lt;channel-name&gt; &lt;val&gt;</code></a><br />Write the
  38208. day's starting value for counter &lt;channel&gt; (A, B or named channel, see
  38209. below)</li>
  38210. <li><a name="owcount_counter">
  38211. <code>set &lt;name&gt; counter &lt;channel-name&gt; &lt;val&gt;</code></a><br />Correct the midnight
  38212. value such that counter &lt;channel&gt; (A, B or named channel, see
  38213. below) displays value &lt;val&gt;</li>
  38214. </ul>
  38215. <br />
  38216. <a name="OWCOUNTget"></a>
  38217. <h4>Get</h4>
  38218. <ul>
  38219. <li><a name="owcount_id">
  38220. <code>get &lt;name&gt; id</code></a>
  38221. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  38222. <li><a name="owcount_memory2">
  38223. <code>get &lt;name&gt; memory &lt;page&gt;</code></a><br />Obtain 32 bytes from
  38224. memory page 0..13 and store in cache <i>$hash->{owg_str}->[page]</i> as well as in reading "memory"</li>
  38225. <li><a name="owcount_mcache">
  38226. <code>get &lt;name&gt; mcache &lt;page&gt;</code></a><br />Obtain 32 bytes from
  38227. cache <i>$hash->{owg_str}->[page]</i> and display.</li>
  38228. <li><a name="owcount_midnight2">
  38229. <code>get &lt;name&gt; midnight &lt;channel-name&gt;</code></a><br />Obtain the
  38230. day's starting value for counter &lt;channel&gt; (A, B or named channel, see
  38231. below)</li>
  38232. <li><a name="owcount_month">
  38233. <code>get &lt;name&gt; month</code></a><br />Returns cumulated and averaged monthly value if mode=daily, otherwise last day's and averaged value </li>
  38234. <li><a name="owcount_year">
  38235. <code>get &lt;name&gt; year</code></a><br />Returns cumulated and averaged yearly value if mode=daily, otherwise last months's and averaged value </li>
  38236. <li><a name="owcount_raw">
  38237. <code>get &lt;name&gt; raw &lt;channel-name&gt;</code></a><br />Obtain the
  38238. current raw value for counter &lt;channel&gt; (A, B or named channel, see below)</li>
  38239. <li><a name="owcount_counters">
  38240. <code>get &lt;name&gt; counters</code></a><br />Obtain the current value both
  38241. counters</li>
  38242. </ul>
  38243. <br />
  38244. <a name="OWCOUNTattr"></a>
  38245. <h4>Attributes</h4>
  38246. <ul>
  38247. <li><a name="owcount_logm"><code>attr &lt;name&gt; LogM
  38248. &lt;string&gt;</code></a>
  38249. <br />device name (not file name) of monthly log file.
  38250. Log line after midnight &lt;new date&gt; &lt;name&gt; &lt;old day&gt; &lt;old date&gt; &lt;channel&gt;: &lt;value&gt; &lt;unit&gt; &lt;channel&gt;: &lt;value&gt; &lt;unit&gt;
  38251. <br /> example: 2012-07-30_00:00:57 OWX_C D29: 2012-7-29_23:59:59 Taste: 110.0 p, B: 7.0 cts
  38252. </li>
  38253. <li><a name="owcount_logy"><code>attr &lt;name&gt; LogY
  38254. &lt;string&gt;</code></a>
  38255. <br />device name (not file name) of yearly log file.</li>
  38256. <li><a name="owcount_interval2">
  38257. <code>attr &lt;name&gt; interval &lt;int&gt;</code></a>
  38258. <br /> Measurement
  38259. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
  38260. <li><a name="owcount_nomemory"><code>attr &lt;name&gt; nomemory
  38261. 0|1</code></a>
  38262. <br />when set to 1, midnight values will be stored in files instead of the internal memory.</li>
  38263. </ul>
  38264. <p>For each of the following attributes, the channel identification A,B may be used.</p>
  38265. <ul>
  38266. <li><a name="owcount_cname"><code>attr &lt;name&gt; &lt;channel&gt;Name
  38267. &lt;string&gt;[|&lt;string&gt;]</code></a>
  38268. <br />name for the channel [|short name used in state reading]. </li>
  38269. <li><a name="owcount_cunit"><code>attr &lt;name&gt; &lt;channel&gt;Unit
  38270. &lt;string&</code></a>
  38271. <br />unit of measurement used in state reading (default "cts", set to "none" for empty).</li>
  38272. <li><a name="owcount_crate"><code>attr &lt;name&gt; &lt;channel&gt;Rate
  38273. &lt;string&gt;[|&lt;string&gt;]</code></a>
  38274. <br />name for the channel rate [|short name used in state reading]</li>
  38275. <li><a name="owcount_coffset"><code>attr &lt;name&gt; &lt;channel&gt;Offset
  38276. &lt;float&gt;</code></a>
  38277. <br />offset added to the reading in this channel. </li>
  38278. <li><a name="owcount_cfactor"><code>attr &lt;name&gt; &lt;channel&gt;Factor
  38279. &lt;float&gt;</code></a>
  38280. <br />factor multiplied to (reading+offset) in this channel. </li>
  38281. <li><a name="owcount_cmode"><code>attr &lt;name&gt; &lt;channel&gt;Mode daily |
  38282. normal</code></a>
  38283. <br />determines whether counter is nulled at start of day or running continuously </li>
  38284. <li><a name="owcount_cperiod"><code>attr &lt;name&gt; &lt;channel&gt;Period hour(default) | minute |
  38285. second</code></a>
  38286. <br />period for rate calculation </li>
  38287. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38288. </ul>
  38289. <a name="OWDevice"></a>
  38290. <h3>OWDevice</h3>
  38291. <ul>
  38292. <br>
  38293. <a name="OWDevicedefine"></a>
  38294. <b>Define</b>
  38295. <ul>
  38296. <code>define &lt;name&gt; OWDevice &lt;address&gt; [&lt;interval&gt;]</code>
  38297. <br><br>
  38298. Defines a 1-wire device. The 1-wire device is identified by its &lt;address&gt;. It is
  38299. served by the most recently defined <a href="#OWServer">OWServer</a>.
  38300. <br><br>
  38301. Devices beyond 1-wire hubs (DS2409, address family 1F) need to be addressed by the full path, e.g.
  38302. <code>1F.0AC004000000/main/26.A157B6000000</code> (no leading slash). They are
  38303. not automatically detected.
  38304. <br><br>
  38305. If &lt;interval&gt; is given, the OWServer is polled every &lt;interval&gt; seconds for
  38306. a subset of readings.
  38307. <br><br>
  38308. OWDevice is a generic device. Its characteristics are retrieved at the time of the device's
  38309. definition. The available readings that you can get or set as well as those that are
  38310. regularly retrieved by polling can be seen when issuing the
  38311. <code><a href="#list">list</a> &lt;name&gt;</code> command.
  38312. <br><br>
  38313. The following devices are currently supported:
  38314. <ul>
  38315. <li>DS2401 - Silicon Serial Number</li>
  38316. <li>DS1990A - Serial Number iButton</li>
  38317. <li>DS2405 - Addressable Switch</li>
  38318. <li>DS18S20 - High-Precision 1-Wire Digital Thermometer</li>
  38319. <li>DS1920 - iButton version of the thermometer</li>
  38320. <li>DS2406, DS2407 - Dual Addressable Switch with 1kbit Memory</li>
  38321. <li>DS2436 - Battery ID/Monitor Chip</li>
  38322. <li>DS2423 - 4kbit 1-Wire RAM with Counter</li>
  38323. <li>DS2450 - Quad A/D Converter</li>
  38324. <li>DS1822 - Econo 1-Wire Digital Thermometer</li>
  38325. <li>DS2433 - 4kbit 1-Wire RAM</li>
  38326. <li>DS2415 - 1-Wire Time Chip</li>
  38327. <li>DS1904 - RTC iButton</li>
  38328. <li>DS2438 - Smart Battery Monitor</li>
  38329. <li>DS2417 - 1-Wire Time Chip with Interrupt</li>
  38330. <li>DS18B20 - Programmable Resolution 1-Wire Digital Thermometer</li>
  38331. <li>DS2408 - 1-Wire 8 Channel Addressable Switch</li>
  38332. <li>DS2413 - Dual Channel Addressable Switch</li>
  38333. <li>DS1825 - Programmable Resolution 1-Wire Digital Thermometer with ID</li>
  38334. <li>DS2409 - Microlan Coupler (no function implemented)</li>
  38335. <li>EDS0066 - Multisensor for temperature and pressure</li>
  38336. <li>LCD - LCD controller by Louis Swart</li>
  38337. </ul>
  38338. <br><br>
  38339. Adding more devices is simple. Look at the code (subroutine <code>OWDevice_GetDetails</code>).
  38340. <br><br>
  38341. This module is completely unrelated to the 1-wire modules with names all in uppercase.
  38342. <br><br>
  38343. <b>Note:</b>The state reading never triggers events to avoid confusion.<br><br>
  38344. Example:
  38345. <ul>
  38346. <code>
  38347. define myOWServer OWServer localhost:4304<br><br>
  38348. get myOWServer devices<br>
  38349. 10.487653020800 DS18S20<br><br>
  38350. define myT1 OWDevice 10.487653020800<br><br>
  38351. list myT1 10.487653020800<br>
  38352. Internals:<br>
  38353. ...<br>
  38354. Readings:<br>
  38355. 2012-12-22 20:30:07 temperature 23.1875<br>
  38356. Fhem:<br>
  38357. ...<br>
  38358. getters:<br>
  38359. address<br>
  38360. family<br>
  38361. id<br>
  38362. power<br>
  38363. type<br>
  38364. temperature<br>
  38365. templow<br>
  38366. temphigh<br>
  38367. polls:<br>
  38368. temperature<br>
  38369. setters:<br>
  38370. alias<br>
  38371. templow<br>
  38372. temphigh<br>
  38373. ...<br>
  38374. </code>
  38375. </ul>
  38376. <br>
  38377. </ul>
  38378. <a name="OWDeviceset"></a>
  38379. <b>Set</b>
  38380. <ul>
  38381. <li><code>set &lt;name&gt; interval &lt;value&gt;</code>
  38382. <br><br>
  38383. <code>value</code> modifies the interval for polling data. The unit is in seconds.
  38384. </li>
  38385. <li><code>set &lt;name&gt; &lt;reading&gt; &lt;value&gt;</code>
  38386. <br><br>
  38387. Sets &lt;reading&gt; to &lt;value&gt; for the 1-wire device &lt;name&gt;. The permitted values are defined by the underlying
  38388. 1-wire device type.
  38389. <br><br>
  38390. Example:
  38391. <ul>
  38392. <code>set myT1 templow 5</code><br>
  38393. </ul>
  38394. <br>
  38395. </li>
  38396. </ul>
  38397. <a name="OWDeviceget"></a>
  38398. <b>Get</b>
  38399. <ul>
  38400. <code>get &lt;name&gt; &lt;reading&gt; &lt;value&gt;</code>
  38401. <br><br>
  38402. Gets &lt;reading&gt; for the 1-wire device &lt;name&gt;. The permitted values are defined by the underlying
  38403. 1-wire device type.
  38404. <br><br>
  38405. Example:
  38406. <ul>
  38407. <code>get myT1 temperature</code><br>
  38408. </ul>
  38409. <br>
  38410. </ul>
  38411. <a name="OWDeviceattr"></a>
  38412. <b>Attributes</b>
  38413. <ul>
  38414. <a name="IODev"></a>
  38415. <li>IODev:
  38416. Set the OWServer device which should be used for sending and receiving data
  38417. for this OWDevice. Note: Upon startup fhem assigns each OWDevice
  38418. to the last previously defined OWServer. Thus it is best if you define OWServer
  38419. and OWDevices in blocks: first define the first OWServer and the OWDevices that
  38420. belong to it, then continue with the next OWServer and the attached OWDevices, and so on.
  38421. </li>
  38422. <li>trimvalues: removes leading and trailing whitespace from readings. Default is 1 (on).</li>
  38423. <li>cstrings: interprets reading as C-style string, i.e. stops reading on the first zero byte. Default is 0 (off).</li>
  38424. <li>polls: a comma-separated list of readings to poll. This supersedes the list of default readings to poll.</li>
  38425. <li>interfaces: supersedes the interfaces exposed by that device.</li>
  38426. <li>model: preset with device type, e.g. DS18S20.</li>
  38427. <li>resolution: resolution of temperature reading in bits, can be 9, 10, 11 or 12.
  38428. Lower resolutions allow for faster retrieval of values from the bus.
  38429. Particularly reasonable for large 1-wire installations to reduce busy times for FHEM.</li>
  38430. <li><a href="#eventMap">eventMap</a></li>
  38431. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38432. </ul>
  38433. <br><br>
  38434. </ul>
  38435. <a name="OWFS"></a>
  38436. <h3>OWFS</h3>
  38437. <ul>
  38438. OWFS is a suite of programs that designed to make the 1-wire bus and its
  38439. devices easily accessible. The underlying priciple is to create a virtual
  38440. filesystem, with the unique ID being the directory, and the individual
  38441. properties of the device are represented as simple files that can be read
  38442. and written.<br><br>
  38443. Note: You need the owperl module from
  38444. <a href="http://owfs.org/index.php?page=owperl">http://owfs.org/</a>.
  38445. <br><br>
  38446. <a name="OWFSdefine"></a>
  38447. <b>Define</b>
  38448. <ul>
  38449. <code>define &lt;name&gt; OWFS &lt;owserver-ip:port&gt; &lt;model&gt; [&lt;id&gt;]</code>
  38450. <br><br>
  38451. Define a 1-wire device to communicate with an OWFS-Server.<br><br>
  38452. <code>&lt;owserver-ip:port&gt;</code>
  38453. <ul>
  38454. IP-address:port from OW-Server.
  38455. </ul>
  38456. <code>&lt;model&gt;</code>
  38457. <ul>
  38458. Define the <a href="#owfs_type">type</a> of the input device.
  38459. Currently supportet: <code>DS1420, DS9097 (for passive Adapter)</code>
  38460. </ul>
  38461. <code>&lt;id&gt;</code>
  38462. <ul>
  38463. Corresponding to the <a href="#owfs_id">id</a> of the input device. Only for active Adapter.
  38464. <br><br>
  38465. </ul>
  38466. Note:<br>
  38467. If the <code>owserver-ip:port</code> is called <code>none</code>, then
  38468. no device will be opened, so you can experiment without hardware attached.<br><br>
  38469. Example:
  38470. <ul>
  38471. <code>#define an active Adapter:<br>
  38472. define DS9490R OWFS 127.0.0.1:4304 DS1420 93302D000000</code><br>
  38473. </ul>
  38474. <br>
  38475. <ul>
  38476. <code>#define a passive Adapter:<br>
  38477. define DS9097 OWFS 127.0.0.1:4304 DS9097</code><br>
  38478. </ul>
  38479. <br>
  38480. </ul>
  38481. <b>Set</b> <ul>N/A</ul><br>
  38482. <a name="OWFSget"></a>
  38483. <b>Get</b>
  38484. <ul>
  38485. <code>get &lt;name&gt; &lt;value&gt;</code>
  38486. <br><br>
  38487. where <code>value</code> is one of (not supported by passive Devices e.g. DS9097):<br>
  38488. <ul>
  38489. <li><a name="owfs_address"></a>
  38490. <code>address</code> (read-only)<br>
  38491. The entire 64-bit unique ID. address starts with the family code.<br>
  38492. Given as upper case hexidecimal digits (0-9A-F).
  38493. </li>
  38494. <li><a name="owfs_crc8"></a>
  38495. <code>crc8</code> (read-only)<br>
  38496. The 8-bit error correction portion. Uses cyclic redundancy check. Computed
  38497. from the preceeding 56 bits of the unique ID number.<br>
  38498. Given as upper case hexidecimal digits (0-9A-F).
  38499. </li>
  38500. <li><a name="owfs_family"></a>
  38501. <code>family</code> (read-only)<br>
  38502. The 8-bit family code. Unique to each type of device.<br>
  38503. Given as upper case hexidecimal digits (0-9A-F).
  38504. </li>
  38505. <li><a name="owfs_id"></a>
  38506. <code>id</code> (read-only)<br>
  38507. The 48-bit middle portion of the unique ID number. Does not include the
  38508. family code or CRC.<br>
  38509. Given as upper case hexidecimal digits (0-9A-F).
  38510. </li>
  38511. <li><a name="owfs_locator"></a>
  38512. <code>locator</code> (read-only)<br>
  38513. Uses an extension of the 1-wire design from iButtonLink company that
  38514. associated 1-wire physical connections with a unique 1-wire code. If
  38515. the connection is behind a Link Locator the locator will show a unique
  38516. 8-byte number (16 character hexidecimal) starting with family code FE.<br>
  38517. If no Link Locator is between the device and the master, the locator
  38518. field will be all FF.
  38519. </li>
  38520. <li><a name="owfs_present"></a>
  38521. <code>present</code> (read-only)<br>
  38522. Is the device currently present on the 1-wire bus?
  38523. </li>
  38524. <li><a name="owfs_type"></a>
  38525. <code>type</code> (read-only)<br>
  38526. Part name assigned by Dallas Semi. E.g. DS2401 Alternative packaging
  38527. (iButton vs chip) will not be distiguished.
  38528. </li>
  38529. <br>
  38530. </ul>
  38531. Examples:
  38532. <ul>
  38533. <code>get DS9490R type</code><br>
  38534. <code>DS9490R type => DS1420</code><br><br>
  38535. <code>get DS9490R address</code><br>
  38536. <code>DS9490R address => 8193302D0000002B</code>
  38537. </ul>
  38538. <br>
  38539. </ul>
  38540. <a name="OWFSattr"></a>
  38541. <b>Attributes</b>
  38542. <ul>
  38543. <li><a href="#attrdummy">dummy</a></li>
  38544. <li><a href="#do_not_notify">do_not_notify</a></li>
  38545. <li><a href="#loglevel">loglevel</a></li>
  38546. <li><a href="#showtime">showtime</a></li>
  38547. <li><a name="owfs_temp-scale"></a>
  38548. temp-scale<br>
  38549. Specifies the temperature-scale unit:
  38550. <ul>
  38551. <li><code>C</code><br>
  38552. Celsius. This is the default.</li>
  38553. <li><code>F</code><br>
  38554. Fahrenheit</li>
  38555. <li><code>K</code><br>
  38556. Kelvin</li>
  38557. <li><code>R</code><br>
  38558. Rankine</li>
  38559. </ul>
  38560. </li>
  38561. </ul>
  38562. <br>
  38563. </ul>
  38564. <a name="OWID"></a>
  38565. <h3>OWID</h3>
  38566. <p>FHEM module for 1-Wire devices that know only their unique ROM ID<br />
  38567. <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
  38568. Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br /></p>
  38569. <br /><h4>Example</h4><br />
  38570. <p>
  38571. <code>define ROM1 OWX_ID OWCOUNT 09.CE780F000000 10</code>
  38572. <br />
  38573. </p><br />
  38574. <a name="OWIDdefine"></a>
  38575. <h4>Define</h4>
  38576. <p>
  38577. <code>define &lt;name&gt; OWID &lt;fam&gt; &lt;id&gt; [&lt;interval&gt;]</code> or <br/>
  38578. <code>define &lt;name&gt; OWID &lt;fam&gt;.&lt;id&gt; [&lt;interval&gt;]</code>
  38579. <br /><br /> Define a 1-Wire device.<br /><br />
  38580. </p>
  38581. <ul>
  38582. <li>
  38583. <code>&lt;fam&gt;</code>
  38584. <br />2-character unique family id, see above
  38585. </li>
  38586. <li>
  38587. <code>&lt;id&gt;</code>
  38588. <br />12-character unique ROM id of the converter device without family id and CRC
  38589. code
  38590. </li>
  38591. <li>
  38592. <code>&lt;interval&gt;</code>
  38593. <br />Interval in seconds for checking the presence of the device. The default is 300 seconds. </li>
  38594. </ul>
  38595. <br />
  38596. <a name="OWIDset"></a>
  38597. <h4>Set</h4>
  38598. <ul>
  38599. <li><a name="owid_interval">
  38600. <code>set &lt;name&gt; interval &lt;int&gt;</code></a><br />
  38601. Interval in seconds for checking the presence of the device. The default is 300 seconds. </li>
  38602. </ul>
  38603. <br />
  38604. <a name="OWIDget"></a>
  38605. <h4>Get</h4>
  38606. <ul>
  38607. <li><a name="owid_id">
  38608. <code>get &lt;name&gt; id</code></a>
  38609. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  38610. <li><a name="owid_present">
  38611. <code>get &lt;name&gt; present</code>
  38612. </a>
  38613. <br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
  38614. </ul>
  38615. <h4>Attributes</h4>
  38616. <ul><li><a name="owtherm_interval2">
  38617. <code>attr &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38618. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
  38619. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38620. </ul>
  38621. <a name="OWLCD"></a>
  38622. <h3>OWLCD</h3>
  38623. <p>FHEM module to commmunicate with the <a
  38624. href="http://www.louisswart.co.za/1-Wire_Overview.html">1-Wire LCD controller</a>
  38625. from Louis Swart (1-Wire family id FF). See also the corresponding <a
  38626. href="http://fhemwiki.de/wiki/1-Wire_Textdisplay">Wiki page.</a><br /><br />
  38627. Note:<br /> This 1-Wire module so far works only with the OWX interface module. Please
  38628. define an <a href="#OWX">OWX</a> device first. <br /></p>
  38629. <br /><h4>Example</h4>
  38630. <p>
  38631. <code>define OWX_LCD OWLCD 9F0700000100</code>
  38632. <br />
  38633. </p>
  38634. <br />
  38635. <a name="OWLCDdefine"></a>
  38636. <h4>Define</h4>
  38637. <p>
  38638. <code>define &lt;name&gt; OWLCD &lt;id&gt;</code> or <br/>
  38639. <code>define &lt;name&gt; OWLCD FF.&lt;id&gt;</code>
  38640. <br /><br /> Define a 1-Wire LCD device.<br /><br /></p>
  38641. <ul>
  38642. <li>
  38643. <code>&lt;id&gt;</code>
  38644. <br />12-character unique ROM id of the converter device without family id and CRC
  38645. code </li>
  38646. </ul>
  38647. <br />
  38648. <a name="OWLCDset"></a>
  38649. <h4>Set</h4>
  38650. <ul>
  38651. <li><a name="owlcd_icon">
  38652. <code>set &lt;name&gt; icon &lt;int&gt; on|off|blink</code></a><br /> Set one of
  38653. the icons 0..14 on, off or blinking</li>
  38654. <li><a name="owlcd_icon2">
  38655. <code>set &lt;name&gt; icon 15 0..6</code></a><br /> Set icon 15 to one of its
  38656. values</li>
  38657. <li><a name="owlcd_icon3">
  38658. <code>set &lt;name&gt; icon none</code></a><br /> Set all icons off</li>
  38659. <li><a name="owlcd_line">
  38660. <code>set &lt;name&gt; line &lt;int&gt; &lt;string&gt;</code></a><br /> Write
  38661. LCD line 0..3 with some content </li>
  38662. <li><a name="owlcd_memory">
  38663. <code>set &lt;name&gt; memory &lt;page&gt; &lt;string&gt;</code></a><br />Write
  38664. memory page 0..6</li>
  38665. <li><a name="owlcd_gpio">
  38666. <code>set &lt;name&gt; gpio &lt;value&gt;</code></a><br />Write state for all
  38667. three gpio pins (value = 0..7, for each bit 0=ON, 1=OFF)</li>
  38668. <li><a name="owlcd_gpiobit">
  38669. <code>set &lt;name&gt; gpiobit &lt;bit&gt; &lt;value&gt;</code></a><br />Write state for gpio pin no. 1..3,
  38670. possible values are 0=ON, 1=OFF</li>
  38671. <li><a name="owlcd_bl">
  38672. <code>set &lt;name&gt; backlight ON|OFF</code></a><br />Switch backlight on or
  38673. off</li>
  38674. <li><a name="owlcd_lcd">
  38675. <code>set &lt;name&gt; lcd ON|OFF</code></a><br />Switch LCD power on or
  38676. off</li>
  38677. <li><a name="owlcd_reset">
  38678. <code>set &lt;name&gt; reset</code></a><br />Reset the display</li>
  38679. <li><a name="owlcd_test">
  38680. <code>set &lt;name&gt; test</code></a><br />Test the display</li>
  38681. </ul>
  38682. <br />
  38683. <a name="owlcdget"></a>
  38684. <h4>Get</h4>
  38685. <ul>
  38686. <li><a name="owlcd_id">
  38687. <code>get &lt;name&gt; id</code></a>
  38688. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  38689. <li><a name="owlcd_memory2">
  38690. <code>get &lt;name&gt; memory &lt;page&gt;</code></a><br />Read memory page 0..6 </li>
  38691. <li><a name="owlcd_gpio2">
  38692. <code>get &lt;name&gt; gpio</code></a><br />Obtain state of all four input
  38693. channels (15 = all off, 0 = all on)</li>
  38694. <li><a name="owlcd_counter">
  38695. <code>get &lt;name&gt; counter</code></a><br />Obtain state of all four input
  38696. counters (4 x 16 Bit)</li>
  38697. <li><a name="owlcd_version">
  38698. <code>get &lt;name&gt; version</code></a><br />Obtain firmware version of the
  38699. controller</li>
  38700. </ul>
  38701. <br />
  38702. <a name="owlcdattr"></a>
  38703. <h4>Attributes</h4>
  38704. <ul>
  38705. <li><a name="owlcd_lcdgeometry">
  38706. <code>attr &lt;name&gt; lcdgeometry &lt;string&gt;</code></a><br />
  38707. LCD geometry, values are 0-32-64-96 (default) or 0-64-20-84</li>
  38708. <li><a name="owlcd_lcdgcontroller">
  38709. <code>attr &lt;name&gt; lcdcontroller &lt;string&gt;</code></a><br />
  38710. LCD geometry, values are KS0073 (default) HD44780</li>
  38711. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38712. </ul>
  38713. <a name="OWMULTI"></a>
  38714. <h3>OWMULTI</h3>
  38715. <p>FHEM module to commmunicate with 1-Wire multi-sensors, currently the DS2438 smart battery
  38716. monitor<br /> <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
  38717. (prerequisite: Add this module's name to the list of clients in OWServer).
  38718. Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first.</p>
  38719. <h4>Example</h4>
  38720. <p>
  38721. <code>define OWX_M OWMULTI 7C5034010000 45</code>
  38722. <br />
  38723. <code>attr OWX_M VName humidity|rH</code>
  38724. <br />
  38725. <code>attr OWX_M VUnit %</code>
  38726. <br />
  38727. <code>attr OWX_M VFunction (161.29 * V / VDD - 25.8065)/(1.0546 - 0.00216 * T)</code>
  38728. </p>
  38729. <a name="OWMULTIdefine"></a>
  38730. <h4>Define</h4>
  38731. <p>
  38732. <code>define &lt;name&gt; OWMULTI [&lt;model&gt;] &lt;id&gt; [&lt;interval&gt;]</code> or <br/>
  38733. <code>define &lt;name&gt; OWMULTI &lt;fam&gt;.&lt;id&gt; [&lt;interval&gt;]</code>
  38734. <br /><br /> Define a 1-Wire multi-sensor</p>
  38735. <ul>
  38736. <li>
  38737. <code>[&lt;model&gt;]</code><br /> Defines the sensor model (and thus 1-Wire family
  38738. id), currently the following values are permitted: <ul>
  38739. <li>model DS2438 with family id 26 (default if the model parameter is omitted).
  38740. Measured is a temperature value, an external voltage and the current supply
  38741. voltage</li>
  38742. </ul>
  38743. </li>
  38744. <li>
  38745. <code>&lt;fam&gt;</code>
  38746. <br />2-character unique family id, see above
  38747. </li>
  38748. <li>
  38749. <code>&lt;id&gt;</code>
  38750. <br />12-character unique ROM id of the converter device without family id and CRC
  38751. code </li>
  38752. <li>
  38753. <code>&lt;interval&gt;</code>
  38754. <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
  38755. </ul>
  38756. <a name="OWMULTIset"></a>
  38757. <h4>Set</h4>
  38758. <ul>
  38759. <li><a name="owmulti_interval">
  38760. <code>set &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38761. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
  38762. </ul>
  38763. <a name="OWMULTIget"></a>
  38764. <h4>Get</h4>
  38765. <ul>
  38766. <li><a name="owmulti_id">
  38767. <code>get &lt;name&gt; id</code></a>
  38768. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  38769. <li><a name="owmulti_reading">
  38770. <code>get &lt;name&gt; reading</code></a><br />Obtain all three measurement values. </li>
  38771. <li><a name="owmulti_temperature">
  38772. <code>get &lt;name&gt; temperature</code></a><br />Obtain the temperature value. </li>
  38773. <li><a name="owmulti_vdd">
  38774. <code>get &lt;name&gt; VDD</code></a><br />Obtain the current supply voltage. </li>
  38775. <li><a name="owmulti_raw">
  38776. <code>get &lt;name&gt; raw</code></a><br />Obtain the raw readings for V and W.</li>
  38777. </ul>
  38778. <a name="OWMULTIattr"></a>
  38779. <h4>Attributes</h4>
  38780. <ul><li><a name="owtherm_interval2">
  38781. <code>attr &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38782. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
  38783. <li><a name="owmulti_vname"><code>attr &lt;name&gt; VName
  38784. &lt;string&gt;[|&lt;string&gt;]</code></a>
  38785. <br />name for the voltage channel [|short name used in state reading]. </li>
  38786. <li><a name="owmulti_vunit"><code>attr &lt;name&gt; VUnit
  38787. &lt;string&gt;</code></a>
  38788. <br />unit of measurement for the voltage channel used in state reading (default "V", set to "none" for empty).</li>
  38789. <li><a name="owmulti_vfunction"><code>attr &lt;name&gt; VFunction
  38790. &lt;string&gt;</code></a>
  38791. <br />arbitrary functional expression involving the values VDD, V, W and T. Example see
  38792. above. <ul>
  38793. <li>VDD is replaced by the measured supply voltage in Volt,</li>
  38794. <li>V by the measured external voltage channel,</li>
  38795. <li>W by the measured external sense channel,</li>
  38796. <li>T by the measured and corrected temperature in its unit</li>
  38797. </ul></li>
  38798. <li><a name="owmulti_wname"><code>attr &lt;name&gt; WName
  38799. &lt;string&gt;[|&lt;string&gt;]</code></a>
  38800. <br />name for the sense channel [|short name used in state reading]. </li>
  38801. <li><a name="owmulti_wunit"><code>attr &lt;name&gt; WUnit
  38802. &lt;string&gt;</code></a>
  38803. <br />unit of measurement for the sense channel used in state reading (default “V", set to "none" for empty).</li>
  38804. <li><a name="owmulti_wfunction"><code>attr &lt;name&gt; WFunction
  38805. &lt;string&gt;</code></a>
  38806. <br />arbitrary functional expression involving the values VDD, V, W and T. Example and usage see
  38807. above.</li>
  38808. <li><a name="owmulti_tempOffset"><code>attr &lt;name&gt; tempOffset &lt;float&gt;</code>
  38809. </a>
  38810. <br />temperature offset in &deg;C added to the raw temperature reading. </li>
  38811. <li><a name="owmulti_tempUnit"><code>attr &lt;name&gt; tempUnit
  38812. Celsius|Kelvin|Fahrenheit</code>
  38813. </a>
  38814. <br />unit of measurement (temperature scale), default is Celsius = &deg;C </li>
  38815. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38816. </ul>
  38817. <a name="OWSWITCH"></a>
  38818. <h3>OWSWITCH</h3>
  38819. <p>FHEM module to commmunicate with 1-Wire Programmable Switches <br />
  38820. <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
  38821. (prerequisite: Add this module's name to the list of clients in OWServer).
  38822. Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first.</p>
  38823. <h4>Example</h4>
  38824. <p>
  38825. <code>define OWX_S OWSWITCH DS2413 B5D502000000 60</code>
  38826. <br />
  38827. <code>attr OWX_S AName light-a|la</code>
  38828. <br />
  38829. <code>attr OWX_S AUnit AN|AUS</code>
  38830. </p>
  38831. <a name="OWSWITCHdefine"></a>
  38832. <h4>Define</h4>
  38833. <p>
  38834. <code>define &lt;name&gt; OWSWITCH [&lt;model&gt;] &lt;id&gt; [&lt;interval&gt;]</code> or <br/>
  38835. <code>define &lt;name&gt; OWSWITCH &lt;fam&gt;.&lt;id&gt; [&lt;interval&gt;]</code>
  38836. <br /><br /> Define a 1-Wire switch.<br /><br />
  38837. <ul>
  38838. <li>
  38839. <code>[&lt;model&gt;]</code><br /> Defines the switch model (and thus 1-Wire family
  38840. id), currently the following values are permitted: <ul>
  38841. <li>model DS2413 with family id 3A (default if the model parameter is omitted).
  38842. 2 Channel switch with onboard memory</li>
  38843. <li>model DS2406 with family id 12. 2 Channel switch </li>
  38844. <li>model DS2408 with family id 29. 8 Channel switch</li>
  38845. </ul>
  38846. </li>
  38847. <li>
  38848. <code>&lt;fam&gt;</code>
  38849. <br />2-character unique family id, see above
  38850. </li>
  38851. <li>
  38852. <code>&lt;id&gt;</code>
  38853. <br />12-character unique ROM id of the device without family id and CRC
  38854. code </li>
  38855. <li>
  38856. <code>&lt;interval&gt;</code>
  38857. <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
  38858. </ul>
  38859. <a name="OWSWITCHset"></a>
  38860. <h4>Set</h4>
  38861. <ul>
  38862. <li><a name="owswitch_interval">
  38863. <code>set &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38864. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
  38865. <li><a name="owswitch_output">
  38866. <code>set &lt;name&gt; output &lt;channel-name&gt; on | off | on-for-timer &lt;time&gt; | off-for-timer &lt;time&gt;</code>
  38867. </a><br />Set
  38868. value for channel (A,B,... or defined channel name). 1 = off, 0 = on in normal
  38869. usage. See also the note above.<br/>
  38870. on-for-timer/off-for-timer will set the desired value only for the given time,
  38871. either given as hh:mm:ss or as integers seconds
  38872. and then will return to the opposite value.</li>
  38873. <li><a name="owswitch_gpio">
  38874. <code>set &lt;name&gt; gpio &lt;value&gt;</code></a><br />Set values for
  38875. channels (For 2 channels: 3 = A and B off, 1 = B on 2 = A on 0 = both on)</li>
  38876. <li><a name="owswitch_init">
  38877. <code>set &lt;name&gt; init yes</code></a><br /> Re-initialize the device</li>
  38878. </ul>
  38879. <a name="OWSWITCHget"></a>
  38880. <h4>Get</h4>
  38881. <ul>
  38882. <li><a name="owswitch_id">
  38883. <code>get &lt;name&gt; id</code></a>
  38884. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  38885. <li><a name="owswitch_input">
  38886. <code>get &lt;name&gt; input &lt;channel-name&gt;</code></a><br /> state for
  38887. channel (A,B, ... or defined channel name) This value reflects the measured value,
  38888. not necessarily the one set as output state, because the output transistors are open
  38889. collector switches. A measured state of 1 = OFF therefore corresponds to an output
  38890. state of 1 = OFF, but a measured state of 0 = ON can also be due to an external
  38891. shortening of the output, it will be signaled by appending the value of the attribute stateS to the reading.</li>
  38892. <li><a name="owswitch_gpio">
  38893. <code>get &lt;name&gt; gpio</code></a><br />Obtain state of all channels</li>
  38894. </ul>
  38895. <a name="OWSWITCHattr"></a>
  38896. <h4>Attributes</h4>
  38897. <ul><li><a name="owswitch_interval2">
  38898. <code>attr &lt;name&gt; interval &lt;int&gt;</code></a><br /> Measurement
  38899. interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
  38900. </ul>For each of the following attributes, the channel identification A,B,...
  38901. may be used. <ul>
  38902. <li><a name="owswitch_states"><code>&lt;name&gt; stateS &lt;string&gt;</code></a>
  38903. <br/> character string denoting external shortening condition (default is X, set to "none" for empty).</li>
  38904. <li><a name="owswitch_cname"><code>attr &lt;name&gt; &lt;channel&gt;Name
  38905. &lt;string&gt;[|&lt;string&gt;]</code></a>
  38906. <br />name for the channel [|short name used in state reading] </li>
  38907. <li><a name="owswitch_cunit"><code>attr &lt;name&gt; &lt;channel&gt;Unit
  38908. &lt;string&gt;|&lt;string&gt;</code></a>
  38909. <br />display for on | off condition </li>
  38910. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  38911. </ul>
  38912. <a name="OWServer"></a>
  38913. <h3>OWServer</h3>
  38914. <ul>
  38915. <br>
  38916. <a name="OWServerdefine"></a>
  38917. <b>Define</b>
  38918. <ul>
  38919. <code>define &lt;name&gt; OWServer &lt;protocol&gt;</code>
  38920. <br><br>
  38921. Defines a logical OWServer device. OWServer is the server component of the
  38922. <a href="http://owfs.org">1-Wire Filesystem</a>. It serves as abstraction layer
  38923. for any 1-wire devices on a host. &lt;protocol&gt; has
  38924. format &lt;hostname&gt;:&lt;port&gt;. For details see
  38925. <a href="http://owfs.org/index.php?page=owserver_protocol">owserver documentation</a>.
  38926. <p>
  38927. You need <a href="http://owfs.cvs.sourceforge.net/viewvc/owfs/owfs/module/ownet/perl5/OWNet/lib/OWNet.pm">OWNet.pm from owfs.org on Sourceforge</a>, which is normally deployed with FHEM. As at 2012-12-23 the OWNet module
  38928. on CPAN has an issue which renders it useless for remote connections.
  38929. <p>
  38930. The ow* version 2.9 packages provided with Debian Jessie in combination with OWNet.pm as deployed with FHEM have issues.
  38931. For Debian Jessie please either unzip
  38932. <a href="http://forum.fhem.de/index.php?action=dlattach;topic=12219.0;attach=2463">owfs_2.8p17-1_all.zip</a> and install
  38933. owserver, dependencies and what else you require with <code>dpkg -i &lt;package&gt;.deb</code> or use the latest OWNet.pm from Sourceforge.
  38934. <p>
  38935. A typical working configuration file <code>/etc/owfs.conf</code> looks as follows:<p>
  38936. <code>
  38937. # server uses device /dev/onewire<br>
  38938. server: device = /dev/onewire<br>
  38939. # clients other than server use server<br>
  38940. ! server: server = localhost:4304<br>
  38941. # port<br>
  38942. server: port = 4304<br>
  38943. # owhttpd<br>
  38944. http: port = 2121<br>
  38945. # owftpd<br>
  38946. ftp: port = 2120<br>
  38947. </code>
  38948. <p>
  38949. The actual 1-wire devices are defined as <a href="#OWDevice">OWDevice</a> devices.
  38950. If <a href="#autocreate">autocreate</a> is enabled, all the devices found are created at
  38951. start of FHEM automatically.
  38952. <br><br>
  38953. This module is completely unrelated to the 1-wire modules with names all in uppercase.
  38954. <br><br>
  38955. Examples:
  38956. <ul>
  38957. <code>define myLocalOWServer OWServer localhost:4304</code><br>
  38958. <code>define myRemoteOWServer OWServer raspi:4304</code><br>
  38959. </ul>
  38960. <br><br>
  38961. Notice: if you get no devices add both <code>localhost</code> and the FQDN of your owserver as server directives
  38962. to the owserver configuration file
  38963. on the remote host.
  38964. <br><br>
  38965. </ul>
  38966. <a name="OWServerset"></a>
  38967. <b>Set</b>
  38968. <ul>
  38969. <code>set &lt;name&gt; &lt;value&gt;</code>
  38970. <br><br>
  38971. where <code>value</code> is one of<br><br>
  38972. <li><code>reopen</code><br>
  38973. Reopens the connection to the owserver.
  38974. </li>
  38975. <li>owserver (OWFS) specific settings:
  38976. <ul>
  38977. <li><code>timeout/directory</code></li>
  38978. <li><code>timeout/ftp</code></li>
  38979. <li><code>timeout/ha7</code></li>
  38980. <li><code>timeout/network</code></li>
  38981. <li><code>timeout/presence</code></li>
  38982. <li><code>timeout/serial</code></li>
  38983. <li><code>timeout/server</code></li>
  38984. <li><code>timeout/stable</code></li>
  38985. <li><code>timeout/uncached</code></li>
  38986. <li><code>timeout/usb</code></li>
  38987. <li><code>timeout/volatile</code></li>
  38988. <li><code>timeout/w1</code></li>
  38989. <li><code>units/pressure_scale</code></li>
  38990. <li><code>units/temperature_scale</code></li>
  38991. </ul>
  38992. </li>
  38993. For further informations have look on <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver manual</a>).
  38994. <br>
  38995. </ul>
  38996. <br><br>
  38997. <a name="OWServerget"></a>
  38998. <b>Get</b>
  38999. <ul>
  39000. <code>get &lt;name&gt; &lt;value&gt;</code>
  39001. <br><br>
  39002. where <code>value</code> is one of<br><br>
  39003. <li><code>devices</code><br>
  39004. Lists the addresses and types of all 1-wire devices provided by the owserver. Also shows
  39005. the corresponding <a href="#OWDevice">OWDevice</a> if one is defined for the respective 1-wire devices.
  39006. </li>
  39007. <li><code>errors</code><br>
  39008. List a view of error statistics.</li>
  39009. <li>owserver (OWFS) specific settings:
  39010. <ul>
  39011. <li><code>/settings/timeout/directory</code></li>
  39012. <li><code>/settings/timeout/ftp</code></li>
  39013. <li><code>/settings/timeout/ha7</code></li>
  39014. <li><code>/settings/timeout/network</code></li>
  39015. <li><code>/settings/timeout/presence</code></li>
  39016. <li><code>/settings/timeout/serial</code></li>
  39017. <li><code>/settings/timeout/server</code></li>
  39018. <li><code>/settings/timeout/stable</code></li>
  39019. <li><code>/settings/timeout/uncached</code></li>
  39020. <li><code>/settings/timeout/usb</code></li>
  39021. <li><code>/settings/timeout/volatile</code></li>
  39022. <li><code>/settings/timeout/w1</code></li>
  39023. <li><code>/settings/units/pressure_scale</code></li>
  39024. <li><code>/settings/units/temperature_scale</code></li>
  39025. </ul>
  39026. </li>
  39027. For further informations have look on <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver manual</a>).
  39028. <br>
  39029. </ul>
  39030. <br><br>
  39031. <a name="OWServerattr"></a>
  39032. <b>Attributes</b>
  39033. <ul>
  39034. <li>nonblocking<br>
  39035. Get all readings (OWServer / <a href="#OWDevice">OWDevice</a>) via a child process. This ensures, that FHEM
  39036. is not blocked during communicating with the owserver.<br>
  39037. Example:<br>
  39038. <code> attr &lt;name&gt; nonblocking 1</code>
  39039. </li>
  39040. <li><a href="#eventMap">eventMap</a></li>
  39041. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  39042. </ul>
  39043. <br><br>
  39044. Note: unset <code>nonblocking</code> if you experience lockups of FHEM.
  39045. </ul>
  39046. <a name="OWTEMP"></a>
  39047. <h3>OWTEMP</h3>
  39048. <ul>
  39049. High-Precision 1-Wire Digital Thermometer.
  39050. <br><br>
  39051. Note:<br>
  39052. Please define an <a href="#OWFS">OWFS</a> device first.
  39053. <br><br>
  39054. <a name="OWTEMPdefine"></a>
  39055. <b>Define</b>
  39056. <ul>
  39057. <code>define &lt;name&gt; OWTEMP &lt;id&gt; [&lt;interval&gt;] [&lt;alarminterval&gt;]</code>
  39058. <br><br>
  39059. Define a 1-wire Digital Thermometer device.<br><br>
  39060. <code>&lt;id&gt;</code>
  39061. <ul>
  39062. Corresponding to the <a href="#owfs_id">id</a> of the input device.<br>
  39063. Set &lt;id&gt; to <code>none</code>for demo mode.
  39064. </ul>
  39065. <code>&lt;interval&gt;</code>
  39066. <ul>
  39067. Sets the status polling intervall in seconds to the given value. The default is 300 seconds.
  39068. </ul>
  39069. <code>&lt;alarminterval&gt;</code>
  39070. <ul>
  39071. Sets the alarm polling intervall in seconds to the given value. The default is 300 seconds.
  39072. <br><br>
  39073. </ul>
  39074. Note:<br>
  39075. Currently supported <a href="#owfs_type">type</a>: <code>DS18S20</code>.<br><br>
  39076. Example:
  39077. <ul>
  39078. <code>define KG.hz.TF.01 OWTEMP 14B598010800 300 60</code><br>
  39079. </ul>
  39080. <br>
  39081. </ul>
  39082. <a name="OWTEMPset"></a>
  39083. <b>Set</b>
  39084. <ul>
  39085. <code>set &lt;name&gt; &lt;value&gt;</code>
  39086. <br><br>
  39087. where <code>value</code> is one of:<br>
  39088. <ul>
  39089. <li><a name="owtemp_templow"></a>
  39090. <code>templow</code> (read-write)<br>
  39091. The upper limit for the low temperature alarm state.
  39092. </li>
  39093. <li><a name="owtemp_temphigh"></a>
  39094. <code>temphigh</code> (read-write)<br>
  39095. The lower limit for the high temperature alarm state.
  39096. </li>
  39097. <li><a name="owtemp_ALARMINT"></a>
  39098. <code>ALARMINT</code> (write-only)<br>
  39099. Sets the alarm polling intervall in seconds to the given value.
  39100. </li>
  39101. <li><a name="owtemp_INTERVAL"></a>
  39102. <code>INTERVAL</code> (write-only)<br>
  39103. Sets the status polling intervall in seconds to the given value.
  39104. </li>
  39105. </ul>
  39106. </ul><br>
  39107. <a name="OWTEMPget"></a>
  39108. <b>Get</b>
  39109. <ul>
  39110. <code>get &lt;name&gt; &lt;value&gt;</code>
  39111. <br><br>
  39112. where <code>value</code> is one of:<br>
  39113. <ul>
  39114. <li><a href="#owfs_address">address</a> (read-only)</li>
  39115. <li><a href="#owfs_crc8">crc8</a> (read-only)</li>
  39116. <li><a href="#owfs_family">family</a> (read-only)</li>
  39117. <li><a href="#owfs_id">id</a> (read-only)</li>
  39118. <li><a href="#owfs_locator">locator</a> (read-only)</li>
  39119. <li><a href="#owfs_present">present</a> (read-only)</li>
  39120. <li><a name="owtemp_temperature"></a>
  39121. <code>temperature</code> (read-only)<br>
  39122. Read by the chip at high resolution (~12 bits). Units are selected from
  39123. the defined OWFS Device. See <a href="#owfs_temp-scale">temp-scale</a> for choices.
  39124. </li>
  39125. <li><a href="#owtemp_templow">templow</a> (read-write)</li>
  39126. <li><a href="#owtemp_temphigh">temphigh</a> (read-write)</li>
  39127. <li><a href="#owfs_type">type</a> (read-only)</li>
  39128. <br>
  39129. </ul>
  39130. Examples:
  39131. <ul>
  39132. <code>get KG.hz.TF.01 type</code><br>
  39133. <code>KG.hz.TF.01 type => DS18S20</code><br><br>
  39134. <code>get KG.hz.TF.01 temperature</code><br>
  39135. <code>KG.hz.TF.01 temperature => 38.2500 (Celsius)</code>
  39136. </ul>
  39137. <br>
  39138. </ul>
  39139. <a name="OWTEMPattr"></a>
  39140. <b>Attributes</b>
  39141. <ul>
  39142. <li><a href="#do_not_notify">do_not_notify</a></li>
  39143. <li><a href="#loglevel">loglevel</a></li>
  39144. <li><a href="#showtime">showtime</a></li>
  39145. <li><a href="#IODev">IODev</a></li>
  39146. </ul>
  39147. <br>
  39148. </ul>
  39149. <a name="OWTHERM"></a>
  39150. <h3>OWTHERM</h3>
  39151. <p>FHEM module to commmunicate with 1-Wire bus digital thermometer devices<br />
  39152. <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
  39153. (prerequisite: Add this module's name to the list of clients in OWServer).
  39154. Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br />
  39155. </p>
  39156. <h4>Example</h4>
  39157. <p>
  39158. <code>define OWX_T OWTHERM DS18B20 E8D09B030000 300</code>
  39159. <br />
  39160. <code>attr OWX_T tempUnit Kelvin</code>
  39161. <br />
  39162. </p><br />
  39163. <a name="OWTHERMdefine"></a>
  39164. <h4>Define</h4>
  39165. <p>
  39166. <code>define &lt;name&gt; OWTHERM [&lt;model&gt;] &lt;id&gt; [&lt;interval&gt;]</code> or <br/>
  39167. <code>define &lt;name&gt; OWTHERM &lt;fam&gt;.&lt;id&gt; [&lt;interval&gt;]</code>
  39168. <br /><br /> Define a 1-Wire digital thermometer device.</p>
  39169. <ul>
  39170. <li>
  39171. <code>[&lt;model&gt;]</code><br /> Defines the thermometer model (and thus 1-Wire family
  39172. id) currently the following values are permitted: </p>
  39173. <ul>
  39174. <li>model DS1820 with family id 10 (default if the model parameter is omitted)</li>
  39175. <li>model DS1822 with family id 22</li>
  39176. <li>model DS18B20 with family id 28</li>
  39177. </ul>
  39178. </li>
  39179. <li>
  39180. <code>&lt;fam&gt;</code>
  39181. <br />2-character unique family id, see above </li>
  39182. <li>
  39183. <code>&lt;id&gt;</code>
  39184. <br />12-character unique ROM id of the thermometer device without family id and CRC
  39185. code
  39186. </li>
  39187. <li>
  39188. <code>&lt;interval&gt;</code>
  39189. <br /> Temperature measurement interval in seconds. The default is 300 seconds.
  39190. </li>
  39191. </ul>
  39192. <a name="OWTHERMset"></a>
  39193. <h4>Set</h4>
  39194. <ul>
  39195. <li><a name="owtherm_interval">
  39196. <code>set &lt;name&gt; interval &lt;int&gt;</code></a><br /> Temperature
  39197. readout interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. <b>Attention:</b>This is the
  39198. readout interval. Whether an actual temperature measurement is performed, is determined by the
  39199. tempConv attribute </li>
  39200. <li><a name="owtherm_tempHigh">
  39201. <code>set &lt;name&gt; tempHigh &lt;float&gt;</code></a>
  39202. <br /> The high alarm temperature (on the temperature scale chosen by the attribute
  39203. value) </li>
  39204. <li><a name="owtherm_tempLow">
  39205. <code>set &lt;name&gt; tempLow &lt;float&gt;</code></a>
  39206. <br /> The low alarm temperature (on the temperature scale chosen by the attribute
  39207. value) </li>
  39208. </ul>
  39209. <br />
  39210. <a name="OWTHERMget"></a>
  39211. <h4>Get</h4>
  39212. <ul>
  39213. <li><a name="owtherm_id">
  39214. <code>get &lt;name&gt; id</code></a>
  39215. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  39216. <li><a name="owtherm_temperature">
  39217. <code>get &lt;name&gt; temperature</code></a><br />Obtain the temperature. </li>
  39218. <li><a name="owtherm_alarm">
  39219. <code>get &lt;name&gt; alarm</code></a><br />Obtain the alarm temperature
  39220. values. </li>
  39221. </ul>
  39222. <br />
  39223. <a name="OWTHERMattr"></a>
  39224. <h4>Attributes</h4>
  39225. <ul>
  39226. <li><a name="owtherm_stateAL"><code>attr &lt;name&gt; stateAL &lt;string&gt;</code>
  39227. </a>
  39228. <br />character string for denoting low alarm condition, default is ↓</li>
  39229. <li><a name="owtherm_stateAH"><code>attr &lt;name&gt; stateAH &lt;string&gt;</code>
  39230. </a>
  39231. <br />character string for denoting high alarm condition, default is ↑</li>
  39232. <li><a name="owtherm_tempConv">
  39233. <code>attr &lt;name&gt; tempConv onkick|onread</code>
  39234. </a>
  39235. <br /> determines, whether a temperature measurement will happen when "kicked"
  39236. through the OWX backend module (all temperature sensors at the same time), or on
  39237. reading the sensor (1 second waiting time, default). </li>
  39238. <li><a name="owtherm_tempOffset"><code>attr &lt;name&gt; tempOffset &lt;float&gt;</code>
  39239. </a>
  39240. <br />temperature offset in °C added to the raw temperature reading. </li>
  39241. <li><a name="owtherm_tempUnit"><code>attr &lt;name&gt; tempUnit
  39242. none|Celsius|Kelvin|Fahrenheit</code>
  39243. </a>
  39244. <br />unit of measurement (temperature scale) for state reading (default is Celsius = °C, use "none" for empty).</li>
  39245. <li><a name="owtherm_resolution">
  39246. <code>attr &lt;name&gt; resolution 9|10|11|12</code></a><br /> Temperature
  39247. resolution in bit, only relevant for DS18B20 </li>
  39248. <li><a name="owtherm_interval2">
  39249. <code>attr &lt;name&gt; interval &lt;int&gt;</code></a><br /> Temperature
  39250. readout interval in seconds. The default is 300 seconds. <b>Attention:</b>This is the
  39251. readout interval. Whether an actual temperature measurement is performed, is determined by the
  39252. tempConv attribute </li>
  39253. <li><a name="owtherm_tempHigh2">
  39254. <code>attr &lt;name&gt; tempHigh &lt;float&gt;</code>
  39255. </a>
  39256. <br /> high alarm temperature (on the temperature scale chosen by the attribute
  39257. value). </li>
  39258. <li><a name="owtherm_tempLow2">
  39259. <code>attr &lt;name&gt; tempLow &lt;float&gt;</code>
  39260. </a>
  39261. <br /> low alarm temperature (on the temperature scale chosen by the attribute
  39262. value). </li>
  39263. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  39264. </ul>
  39265. <a name="OWVAR"></a>
  39266. <h3>OWVAR</h3>
  39267. <p>FHEM module to commmunicate with 1-Wire bus digital potentiometer devices of type DS2890<br />
  39268. <br />This 1-Wire module works with the OWX interface module, but not yet with the OWServer interface module.
  39269. </p>
  39270. <a name="OWVARexample"></a>
  39271. <h4>Example</h4>
  39272. <p>
  39273. <code>define OWX_P OWVAR E8D09B030000 </code>
  39274. <br />
  39275. <code>attr OWX_P Function 1.02 * V + 0.58 | (U-0.58) / 1.02</code>
  39276. <br />
  39277. </p><br />
  39278. <a name="OWVARdefine"></a>
  39279. <h4>Define</h4>
  39280. <p>
  39281. <code>define &lt;name&gt; OWVAR &lt;id&gt;</code> or <br/>
  39282. <code>define &lt;name&gt; OWVAR &lt;fam&gt;.&lt;id&gt; </code>
  39283. <br /><br /> Define a 1-Wire digital potentiometer device.</p>
  39284. <ul>
  39285. <li>
  39286. <code>&lt;fam&gt;</code>
  39287. <br />2-character unique family id, must be 2C </li>
  39288. <li>
  39289. <code>&lt;id&gt;</code>
  39290. <br />12-character unique ROM id of the thermometer device without family id and CRC
  39291. code
  39292. </li>
  39293. </ul>
  39294. <a name="OWVARset"></a>
  39295. <h4>Set</h4>
  39296. <ul>
  39297. <li><a name="owvar_value">
  39298. <code>set &lt;name&gt; value &lt;float&gt;</code></a>
  39299. <br /> The value of the potentiometer resistance against ground. Arguments may be in the
  39300. range of [0,100] without a Function attribute, or in the range needed for a <a href="#owvar_function">Function</a> </li>
  39301. </ul>
  39302. <br />
  39303. <a name="OWVARget"></a>
  39304. <h4>Get</h4>
  39305. <ul>
  39306. <li><a name="owvar_id">
  39307. <code>get &lt;name&gt; id</code></a>
  39308. <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
  39309. </ul>
  39310. <br />
  39311. <a name="OWVARattr"></a>
  39312. <h4>Attributes</h4>
  39313. <ul>
  39314. <li><a name="owvar_cname"><code>attr &lt;name&gt; Name
  39315. &lt;string&gt;[|&lt;string&gt;]</code></a>
  39316. <br />name for the reading [|name used in state reading]. </li>
  39317. <li><a name="owvar_cunit"><code>attr &lt;name&gt; Unit
  39318. &lt;string&gt;[|&lt;string&gt;]</code></a>
  39319. <br />unit of measurement used in state reading. </li>
  39320. <li><a name="owvar_cfunction"> <code>attr &lt;name&gt; Function
  39321. &lt;string&gt;|&lt;string&gt;</code></a>
  39322. <br />The first string is an arbitrary functional expression u(V) involving the variable V. V is replaced by
  39323. the raw potentiometer reading (in the range of [0,100]). The second string must be the inverse
  39324. function v(U) involving the variable U, such that U can be replaced by the value given in the
  39325. <a href="#OWVARset">Set</a> argument. Care has to taken that v(U) is in the range [0,100].
  39326. No check on the validity of these functions is performed,
  39327. <b>singularities may crash FHEM.</b> <a href="#OWVARexample">Example see above</a>.
  39328. </li>
  39329. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  39330. </ul>
  39331. <a name="OWX"></a>
  39332. <h3>OWX</h3>
  39333. <p> Backend module to commmunicate with 1-Wire bus devices</p>
  39334. <ul>
  39335. <li>via an active DS2480/DS9097U bus master interface attached to an USB
  39336. port or </li>
  39337. <li>via an active DS2480 bus master interface attached to a TCP/IP-UART interface </li>
  39338. <li>via a network-attached CUNO or through a COC on the RaspBerry Pi</li>
  39339. <li>via an Arduino running OneWireFirmata</li>
  39340. </ul> Internally these interfaces are vastly different, read the corresponding <a
  39341. href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire"> Wiki pages </a>.
  39342. The passive DS9097 interface is no longer suppoorted.
  39343. <a name="OWXdefine"></a>
  39344. <h4>Define</h4>
  39345. <p>To define a 1-Wire interface to communicate with a 1-Wire bus, several possibilities exist:
  39346. <ul>
  39347. <li><code>define &lt;name&gt; OWX &lt;serial-device&gt;</code>, i.e. specify the serial device (e.g. USB port) to which the
  39348. 1-Wire bus is attached, for example<br/><code>define OWio1 OWX /dev/ttyUSB1</code></li>
  39349. <li><code>define &lt;name&gt; OWX &lt;tcpip&gt;[:&lt;port&gt;]</code>, i.e. specify the IP address and port to which the 1-Wire bus is attached. Attention: no socat program needed.
  39350. Example:<br/><code>define OWio1 OWX 192.168.0.1:23</code></li>
  39351. <li><code>define &lt;name&gt; OWX &lt;cuno/coc-device&gt;</code>, i.e. specify the previously defined COC/CUNO to which the 1-Wire bus
  39352. is attached, for example<br/><code>define OWio2 OWX COC</code></li>
  39353. <li><code>define &lt;name&gt; OWX &lt;firmata-device&gt;:&lt;firmata-pin&gt;</code>, i.e. specify the name and 1-Wire pin of the previously defined <a href="#FRM">FRM</a>
  39354. device to which the 1-Wire bus is attached, for example<br/><code>define OWio3 OWX FIRMATA:10</code></li>
  39355. </ul>
  39356. <a name="OWXset"></a>
  39357. <h4>Set</h4>
  39358. <ul>
  39359. <li><a name="owx_reopen">
  39360. <code>set &lt;name&gt; reopen</code>
  39361. </a>
  39362. <br />re-opens the interface ans re-initializes the 1-Wire bus.
  39363. </li>
  39364. </ul>
  39365. <br />
  39366. <a name="OWXget"></a>
  39367. <h4>Get</h4>
  39368. <ul>
  39369. <li><a name="owx_alarms"></a>
  39370. <code>get &lt;name&gt; alarms</code>
  39371. <br />performs an "alarm search" for devices on the 1-Wire bus and, if found,
  39372. generates an event in the log (not with all interface types). </li>
  39373. <li><a name="owx_devices"></a>
  39374. <code>get &lt;name&gt; devices</code>
  39375. <br />redicovers all devices on the 1-Wire bus. If a device found has a
  39376. previous definition, this is automatically used. If a device is found but has no
  39377. definition, it is autocreated. If a defined device is not on the 1-Wire bus, it is
  39378. autodeleted. </li>
  39379. <li><a name="owx_version"></a>
  39380. <code>get &lt;name&gt; version</code>
  39381. <br />internal version number</li>
  39382. </ul>
  39383. <br />
  39384. <a name="OWXattr"></a>
  39385. <h4>Attributes</h4>
  39386. <ul>
  39387. <li><a name="OWXasynchronous"><code>attr &lt;name&gt; asynchronous 0(default)|1</code></a>
  39388. <br />if 1 the interface will run asynchronously;if 0 (default) then not</li>
  39389. <li><a name="OWXtimeout"><code>attr &lt;name&gt; timeout &lt;number&gt;</code></a>
  39390. <br />time in seconds waiting for response of any 1-Wire device, or 1-Wire interface,default 5 s</li>
  39391. <li><a name="OWXopendelay"><code>attr &lt;name&gt; opendelay &lt;number&gt; </code></a>
  39392. <br />time in seconds waiting until a reopen ist attempted, default 60 s</li>
  39393. <li><a name="OWXdokick"><code>attr &lt;name&gt; dokick 0|1</code></a>
  39394. <br />if 1, the interface regularly kicks thermometers on the bus to do a temperature conversion,
  39395. and to make an alarm check; if 0 (default) then not</li>
  39396. <li><a name="OWXinterval"><code>attr &lt;name&gt; interval &lt;number&gt;</code></a>
  39397. <br />time interval in seconds for kicking temperature sensors and checking for alarms, default 300 s</li>
  39398. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  39399. </ul>
  39400. <a name="OWX_ASYNC"></a>
  39401. <h3>OWX_ASYNC</h3>
  39402. <p> FHEM module to commmunicate with 1-Wire bus devices</p>
  39403. <ul>
  39404. <li>via an active DS2480 bus master interface attached to an USB port or </li>
  39405. <li>via an Arduino running ConfigurableFirmata attached to USB</li>
  39406. <li>via an Arduino running ConfigurableFirmata connecting to FHEM via Ethernet</li>
  39407. </ul>
  39408. <p>Internally these interfaces are vastly different, read the corresponding <a
  39409. href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire"> Wiki pages </a></p>
  39410. <p>OWX_ASYNC does pretty much the same job as <a href="#OWX">OWX</a> does, but using
  39411. an asynchronous mode of communication</p>
  39412. <br />
  39413. <br />
  39414. <h4>Example</h4><br />
  39415. <p>
  39416. <code>define OWio1 OWX_ASYNC /dev/ttyUSB1</code>
  39417. <br />
  39418. <code>define OWio3 OWX_ASYNC 10</code>
  39419. <br />
  39420. </p>
  39421. <br />
  39422. <a name="OWX_ASYNCdefine"></a>
  39423. <h4>Define</h4>
  39424. <p>
  39425. <code>define &lt;name&gt; OWX_ASYNC &lt;serial-device&gt;</code> or <br />
  39426. <code>define &lt;name&gt; OWX_ASYNC &lt;cuno/coc-device&gt;</code> or <br />
  39427. <code>define &lt;name&gt; OWX_ASYNC &lt;arduino-pin&gt;</code>
  39428. <br /><br /> Define a 1-Wire interface to communicate with a 1-Wire bus.<br />
  39429. <br />
  39430. </p>
  39431. <ul>
  39432. <li>
  39433. <code>&lt;serial-device&gt;</code> The serial device (e.g. USB port) to which the
  39434. 1-Wire bus is attached.</li>
  39435. <li>
  39436. <code>&lt;cuno-device&gt;</code> The previously defined CUNO to which the 1-Wire bus
  39437. is attached. </li>
  39438. <li>
  39439. <code>&lt;arduino-pin&gt;</code> The pin of the previous defined <a href="#FRM">FRM</a>
  39440. to which the 1-Wire bus is attached. If there is more than one FRM device defined
  39441. use <a href="#IODev">IODev</a> attribute to select which FRM device to use.</li>
  39442. </ul>
  39443. <br />
  39444. <a name="OWX_ASYNCset"></a>
  39445. <h4>Set</h4>
  39446. <ul>
  39447. <li><a name="owx_async_interval">
  39448. <code>set &lt;name&gt; interval &lt;value&gt;</code>
  39449. </a>
  39450. <br />sets the time period in seconds for "kicking" the 1-Wire bus when the <a href="#OWX_ASYNCdokick">dokick attribute</a> is set (default
  39451. is 300 seconds).
  39452. </li>
  39453. <li><a name="owx_async_followAlarms">
  39454. <code>set &lt;name&gt; followAlarms on|off</code>
  39455. </a>
  39456. <br /><br /> instructs the module to start an alarm search in case a reset pulse
  39457. discovers any 1-Wire device which has the alarm flag set. </li>
  39458. </ul>
  39459. <br />
  39460. <a name="OWX_ASYNCget"></a>
  39461. <h4>Get</h4>
  39462. <ul>
  39463. <li><a name="owx_async_alarms"></a>
  39464. <code>get &lt;name&gt; alarms</code>
  39465. <br /><br /> performs an "alarm search" for devices on the 1-Wire bus and, if found,
  39466. generates an event in the log (not with CUNO). </li>
  39467. <li><a name="owx_async_devices"></a>
  39468. <code>get &lt;name&gt; devices</code>
  39469. <br /><br /> redicovers all devices on the 1-Wire bus. If a device found has a
  39470. previous definition, this is automatically used. If a device is found but has no
  39471. definition, it is autocreated. If a defined device is not on the 1-Wire bus, it is
  39472. autodeleted. </li>
  39473. </ul>
  39474. <br />
  39475. <a name="OWX_ASYNCattr"></a>
  39476. <h4>Attributes</h4>
  39477. <ul>
  39478. <li><a name="OWX_ASYNCdokick"><code>attr &lt;name&gt; dokick 0|1</code></a>
  39479. <br />1 if the interface regularly kicks thermometers on the bus to do a temperature conversion,
  39480. and to perform an alarm check, 0 if not</li>
  39481. <li><a name="OWX_ASYNCbuspower"><code>attr &lt;name&gt; buspower real|parasitic</code></a>
  39482. <br />parasitic if there are any devices on the bus that steal power from the data line.
  39483. <br />Ensures that never more than a single device on the bus is talked to (throughput is throttled noticable!)
  39484. <br />Automatically disables attribute 'dokick'.</li>
  39485. <li><a name="OWX_ASYNCIODev"><code>attr &lt;name&gt; IODev &lt;FRM-device&gt;</code></a>
  39486. <br />assignes a specific FRM-device to OWX_ASYNC when working through an Arduino.
  39487. <br />Required only if there is more than one FRM defined.</li>
  39488. <li><a name="OWX_ASYNCmaxtimeouts"><code>attr &lt;name&gt; maxtimeouts &lt;number&gt;</code></a>
  39489. <br />maximum number of timeouts (in a row) before OWX_ASYNC disconnects itself from the
  39490. busmaster and tries to establish a new connection</li>
  39491. <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
  39492. href="#event-on-update-reading">event-on-update-reading</a>, <a
  39493. href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
  39494. >room</a>, <a href="#eventMap">eventMap</a>,
  39495. <a href="#webCmd">webCmd</a></li>
  39496. </ul>
  39497. <a name="OWX_CCC"></a>
  39498. <h3>OWX_CCC</h3>
  39499. See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
  39500. <a name="OWX_FRM"></a>
  39501. <h3>OWX_FRM</h3>
  39502. See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
  39503. <a name="OWX_SER"></a>
  39504. <h3>OWX_SER</h3>
  39505. See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
  39506. <a name="OWX_TCP"></a>
  39507. <h3>OWX_TCP</h3>
  39508. See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
  39509. <a name="PCA301"></a>
  39510. <h3>PCA301</h3>
  39511. <ul>
  39512. The PCA301 is a RF controlled AC mains plug with integrated power meter functionality from ELV.<br><br>
  39513. It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
  39514. The JeeNode sketch required for this module can be found in .../contrib/arduino/36_PCA301-pcaSerial.zip.<br><br>
  39515. <a name="PCA301Define"></a>
  39516. <b>Define</b>
  39517. <ul>
  39518. <code>define &lt;name&gt; PCA301 &lt;addr&gt; &lt;channel&gt;</code> <br>
  39519. <br>
  39520. addr is a 6 digit hex number to identify the PCA301 device.
  39521. channel is a 2 digit hex number to identify the PCA301 device.<br><br>
  39522. Note: devices are autocreated on reception of the first message.<br>
  39523. </ul>
  39524. <br>
  39525. <a name="PCA301_Set"></a>
  39526. <b>Set</b>
  39527. <ul>
  39528. <li>on</li>
  39529. <li>off</li>
  39530. <li>identify<br>
  39531. Blink the status led for ~5 seconds.</li>
  39532. <li>reset<br>
  39533. Reset consumption counters</li>
  39534. <li>statusRequest<br>
  39535. Request device status update.</li>
  39536. <li><a href="#setExtensions"> set extensions</a> are supported.</li>
  39537. </ul><br>
  39538. <a name="PCA301_Get"></a>
  39539. <b>Get</b>
  39540. <ul>
  39541. </ul><br>
  39542. <a name="PCA301_Readings"></a>
  39543. <b>Readings</b>
  39544. <ul>
  39545. <li>power</li>
  39546. <li>consumption</li>
  39547. <li>consumptionTotal<br>
  39548. will be created as a default user reading to have a continous consumption value that is not influenced
  39549. by the regualar reset or overflow of the normal consumption reading</li>
  39550. </ul><br>
  39551. <a name="PCA301_Attr"></a>
  39552. <b>Attributes</b>
  39553. <ul>
  39554. <li>forceOn<br>
  39555. try to switch on the device whenever an off status is received.</li>
  39556. <li>offLevel<br>
  39557. a power level less or equal <code>offLevel</code> is considered to be off. used only in conjunction with readonly.</li>
  39558. <li>readonly<br>
  39559. if set to a value != 0 all switching commands (on, off, toggle, ...) will be disabled.</li>
  39560. <li>ignore<br>
  39561. 1 -> ignore this device.</li>
  39562. </ul><br>
  39563. </ul>
  39564. <a name="PHILIPS_AUDIO"></a>
  39565. <h3>PHILIPS_AUDIO</h3>
  39566. <ul>
  39567. <a name="PHILIPS_AUDIOdefine"></a>
  39568. <b>Define</b>
  39569. <br><br>
  39570. <ul>
  39571. <code>
  39572. define &lt;name&gt; PHILIPS_AUDIO &lt;device model&gt; &lt;ip-address&gt; [&lt;status_interval&gt;]<br><br>
  39573. define &lt;name&gt; PHILIPS_AUDIO &lt;device model&gt; [&lt;off_status_interval&gt;] [&lt;on_status_interval&gt;]
  39574. </code>
  39575. <br><br>
  39576. This module controls a Philips Audio Player e.g. MCi, Streamium or Fidelio and potentially any other device controlled by the "myRemote" app.<br>
  39577. You might also check, opening the following URL in the browser: http://[ip number of your device]:8889/index
  39578. <br><br>
  39579. (Tested on: AW9000, NP3500, NP3700 and NP3900)
  39580. <br><br>
  39581. Example:<br><br>
  39582. <ul>
  39583. <code>
  39584. define player PHILIPS_AUDIO NP3900 192.168.0.15<br><br>
  39585. # With custom status interval of 60 seconds<br>
  39586. define PHAUDIO_player PHILIPS_AUDIO NP3900 192.168.0.15 <b>60</b><br><br>
  39587. # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
  39588. define PHAUDIO_player PHILIPS_AUDIO NP3900 192.168.0.15 <b>60 10</b><br>
  39589. </code>
  39590. <br>
  39591. <i>Note: Due to slow command processing by the player itself the minimum interval is <b>limited to 5 seconds</b>. More frequent polling might cause device freezes.</i>
  39592. </ul>
  39593. </ul>
  39594. <br>
  39595. <a name="PHILIPS_AUDIOset"></a>
  39596. <b>Set</b>
  39597. <ul>
  39598. <code>
  39599. set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]
  39600. </code><br><br>
  39601. <i>Note: Commands and parameters are case sensitive.</i><br>
  39602. <ul><br>
  39603. <li><b>favoriteAdd</b> &ndash; Adds currently played Internet Radio stream to favorites</li>
  39604. <li><b>favoriteRemove</b> &ndash; Removes currently played Internet Radio stream from favorites</li>
  39605. <li><b>getFavorites</b> &ndash; Reads stored favorites from the device (may take some time...)</li>
  39606. <li><b>getMediaRendererDesc</b> &ndash; Reads device specific information (stored in the deviceInfo reading)</li>
  39607. <li><b>getPresets</b> &ndash; Reads stored presets from the device (may take some time...)</li>
  39608. <li><b>input</b> &ndash; Selects the following input</li>
  39609. <ul>
  39610. <li><b>analogAux</b> &ndash; Selects the analog AUX input (AW9000 only)</li>
  39611. <li><b>digital1Coaxial</b> &ndash; Selects the digital coaxial input (AW9000 only)</li>
  39612. <li><b>digital2Optical</b> &ndash; Selects the digital optical input (AW9000 only)</li>
  39613. <li><b>internetRadio</b> &ndash; Selects the Internet Radio input</li>
  39614. <li><b>mediaLibrary</b> &ndash; Selects the Media Library input (UPnP/DLNA server) (not available on AW9000)</li>
  39615. <li><b>mp3Link</b> &ndash; Selects the analog MP3 Link input (not available on AW9000)</li>
  39616. <li><b>onlineServices</b> &ndash; Selects the Online Services input</li>
  39617. </ul>
  39618. <li><b>mute [ on | off ]</b> &ndash; Mutes/unmutes the device</li>
  39619. <li><b>player</b> &ndash; Player related commands</li>
  39620. <ul>
  39621. <li><b>next</b> &ndash; Selects next audio stream</li>
  39622. <li><b>prev</b> &ndash; Selects previous audio stream</li>
  39623. <li><b>play-pause</b> &ndash; Plays/pauses the current audio stream</li>
  39624. <li><b>stop</b> &ndash; Stops the current audio stream</li>
  39625. </ul>
  39626. <li><b>repeat [ single | all | off]</b> &ndash; Selects the repeate mode</li>
  39627. <li><b>selectFavorite [ name ]</b> &ndash; Selects a favorite. Empty if no favorites found. (see also getFavorites)</li>
  39628. <li><b>selectFavoriteByNumber [ number ]</b> &ndash; Selects a favorite by its number. Empty if no favorites found. (see also getFavorites)</li>
  39629. <li><b>selectPreset [ name ]</b> &ndash; Selects a preset. Empty if no presets found. (see also getPresets)</li>
  39630. <li><b>selectPresetByNumber [ number ]</b> &ndash; Selects a preset by its number. Empty if no presets found. (see also getPresets)</li>
  39631. <li><b>selectStream [ name ]</b> &ndash; Context-sensitive. Selects a stream depending on the current input and player list content. A 'c'-prefix represents a 'container' (directory). An 'i'-prefix represents an 'item' (audio stream).</li>
  39632. <li><b>shuffle [ on | off ]</b> &ndash; Sets the shuffle mode</li>
  39633. <li><b>standbyButton</b> &ndash; Emulates the standby button. Toggles between standby and power on</li>
  39634. <li><b>volume</b> &ndash; Sets the relative volume 0...100%</li>
  39635. <li><b>volumeDown</b> &ndash; Sets the device specific volume by one decrement</li>
  39636. <li><b>volumeStraight</b> &ndash; Sets the device specific absolute volume 0...64</li>
  39637. <li><b>volumeUp</b> &ndash; Sets the device specific volume by one increment</li>
  39638. </ul>
  39639. </ul>
  39640. <br>
  39641. <a name="PHILIPS_AUDIOget"></a>
  39642. <b>Get</b>
  39643. <ul>
  39644. <code>
  39645. get &lt;name&gt; &lt;reading&gt &lt;reading name&gt;
  39646. </code>
  39647. <ul>
  39648. <br>
  39649. <li><b>deviceInfo</b> &ndash; Returns device specific information</li>
  39650. <li><b>reading</b></li>
  39651. <ul>
  39652. <li><b>input</b> &ndash; Returns current input or '-' if not playing</li>
  39653. <li><b>listItem_xxx</b> &ndash; Returns player list item (limited to 999 entries)</li>
  39654. <li><b>networkError</b> &ndash; Shows an occured current network error</li>
  39655. <li><b>networkRequest</b> &ndash; Shows current network activity (idle/busy)</li>
  39656. <li><b>power</b> &ndash; Returns power status (on/off)</li>
  39657. <li><b>playerAlbum</b> &ndash; Returns the album name of played stream</li>
  39658. <li><b>playerAlbumArt</b> &ndash; Returns the album art of played audio stream</li>
  39659. <li><b>playerListStatus</b> &ndash; Returns current player list status (busy/ready)</li>
  39660. <li><b>playerListTotalCount</b> &ndash; Returns number of player list entries</li>
  39661. <li><b>playerPlayTime</b> &ndash; Returns audio stream duration</li>
  39662. <li><b>playerPlaying</b> &ndash; Returns current player playing state (yes/no)</li>
  39663. <li><b>playerRadioStation</b> &ndash; Returns the name of played radio station</li>
  39664. <li><b>playerRadioStationInfo</b> &ndash; Returns additional info of the played radio station</li>
  39665. <li><b>playerRepeat</b> &ndash; Returns current repeat mode (off/single/all)</li>
  39666. <li><b>playerShuffle</b> &ndash; Returns current shuffle mode (on/off)</li>
  39667. <li><b>playerState</b> &ndash; Returns current player state (home/browsing/playing)</li>
  39668. <li><b>playerStreamFavorite</b> &ndash; Shows if audio stream is a favorite (yes/no)</li>
  39669. <li><b>playerStreamRating</b> &ndash; Shows rating of the audio stream</li>
  39670. <li><b>playerTitle</b> &ndash; Returns audio stream's title</li>
  39671. <li><b>playerTotalTime</b> &ndash; Shows audio stream's total time</li>
  39672. <li><b>presence</b> &ndash; Returns peresence status (present/absent)</li>
  39673. <li><b>state</b> &ndash; Returns current state (on/off)</li>
  39674. <li><b>totalFavorites</b> &ndash; Returns total number of stored favorites (see getFavorites)</li>
  39675. <li><b>totalPresets</b> &ndash; Returns total number of stored presets (see getPresets)</li>
  39676. <li><b>volume</b> &ndash; Returns current relative volume (0...100%)</li>
  39677. <li><b>volumeStraight</b> &ndash; Returns current device absolute volume (0...64)</li>
  39678. </ul>
  39679. </ul>
  39680. <br>
  39681. </ul>
  39682. <a name="PHILIPS_AUDIOattr"></a>
  39683. <b>Attributes</b><br><br>
  39684. <ul>
  39685. <ul>
  39686. <li><b>autoGetFavorites</b> &ndash; Automatically read favorites from device if none available (default off)</li>
  39687. <li><b>autoGetPresets</b> &ndash; Automatically read presets from device if none available (default off)</li>
  39688. <li><b>do_not_notify</b></li>
  39689. <li><b>httpBufferTimeout</b> &ndash; Optional attribute defing the internal http buffer timeount (default 10)</li>
  39690. <li><b>maxListItems</b> &ndash; Defines max. number of player list items (default 100)</li>
  39691. <li><b>playerBrowsingTimeout</b> &ndash; Defines the inactivity timeout for browsing. After that timeout the player returns to the state 'home' in which the readings are updated automaically again. (default 180 seconds)</li>
  39692. <li><b>readingFnAttributes</b></li>
  39693. <li><b>requestTimeout</b> &ndash; Optional attribute defining the http response timeout (default 4 seconds)</li>
  39694. </ul>
  39695. </ul>
  39696. <br>
  39697. </ul>
  39698. <a name="PHTV"></a>
  39699. <h3>PHTV</h3>
  39700. <ul>
  39701. <a name="PHTVdefine"></a>
  39702. <b>Define</b>
  39703. <ul>
  39704. <code>define &lt;name&gt; PHTV &lt;ip-address-or-hostname&gt; [&lt;poll-interval&gt;]</code>
  39705. <br><br>
  39706. This module controls Philips TV devices and their Ambilight via network connection.<br><br>
  39707. Defining a PHTV device will schedule an internal task (interval can be set
  39708. with optional parameter &lt;poll-interval&gt; in seconds, if not set, the value is 45
  39709. seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br><br>
  39710. Example:<br>
  39711. <ul><code>
  39712. define PhilipsTV PHTV 192.168.0.10
  39713. <br><br>
  39714. # With custom interval of 20 seconds<br>
  39715. define PhilipsTV PHTV 192.168.0.10 20
  39716. </code></ul>
  39717. <br>
  39718. <br>
  39719. <i>Note:</i> Some older devices might need to have the API activated first. If you get no response from your
  39720. device, try to input "5646877223" on the remote while watching TV (which spells jointspace on the digits).
  39721. A popup might appear stating the API was successfully enabled.
  39722. </ul>
  39723. <br>
  39724. <br>
  39725. <a name="PHTVset"></a>
  39726. <b>Set </b>
  39727. <ul>
  39728. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code>
  39729. <br><br>
  39730. Currently, the following commands are defined.<br>
  39731. <ul>
  39732. <li><b>on</b> &nbsp;&nbsp;-&nbsp;&nbsp; powers on the device and send a WoL magic package if needed</li>
  39733. <li><b>off</b> &nbsp;&nbsp;-&nbsp;&nbsp; turns the device in standby mode</li>
  39734. <li><b>toggle</b> &nbsp;&nbsp;-&nbsp;&nbsp; switch between on and off</li>
  39735. <li><b>channel</b> channel,0...999,sRef &nbsp;&nbsp;-&nbsp;&nbsp; zap to specific channel or service reference</li>
  39736. <li><b>channelUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; zap to next channel</li>
  39737. <li><b>channelDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; zap to previous channel</li>
  39738. <li><b>volume</b> 0...100 &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in percentage</li>
  39739. <li><b>volumeStraight</b> 1...60 &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in device specific range</li>
  39740. <li><b>volumeUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; increases the volume level</li>
  39741. <li><b>volumeDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; decreases the volume level</li>
  39742. <li><b>mute</b> on,off,toggle &nbsp;&nbsp;-&nbsp;&nbsp; controls volume mute</li>
  39743. <li><b>input</b> ... &nbsp;&nbsp;-&nbsp;&nbsp; switches between inputs</li>
  39744. <li><b>statusRequest</b> &nbsp;&nbsp;-&nbsp;&nbsp; requests the current status of the device</li>
  39745. <li><b>remoteControl</b> UP,DOWN,... &nbsp;&nbsp;-&nbsp;&nbsp; sends remote control commands; see remoteControl help</li>
  39746. <li><b>ambiHue</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; activates/disables Ambilight+Hue function</li>
  39747. <li><b>ambiMode</b> internal,manual,expert &nbsp;&nbsp;-&nbsp;&nbsp; set source register for Ambilight</li>
  39748. <li><b>ambiPreset</b> &nbsp;&nbsp;-&nbsp;&nbsp; set Ambilight to predefined state</li>
  39749. <li><b>rgb</b> HEX,LED address &nbsp;&nbsp;-&nbsp;&nbsp; set an RGB value for Ambilight</li>
  39750. <li><b>hue</b> 0-65534 &nbsp;&nbsp;-&nbsp;&nbsp; set the color hue value Ambilight</li>
  39751. <li><b>sat</b> 0-255 &nbsp;&nbsp;-&nbsp;&nbsp; set the saturation value for Ambilight</li>
  39752. <li><b>bri</b> 0-255 &nbsp;&nbsp;-&nbsp;&nbsp; set the brightness value for Ambilight</li>
  39753. <li><b>play</b> &nbsp;&nbsp;-&nbsp;&nbsp; starts/resumes playback</li>
  39754. <li><b>pause</b> &nbsp;&nbsp;-&nbsp;&nbsp; starts/resumes playback</li>
  39755. <li><b>stop</b> &nbsp;&nbsp;-&nbsp;&nbsp; stops current playback</li>
  39756. <li><b>record</b> &nbsp;&nbsp;-&nbsp;&nbsp; starts recording of current channel</li>
  39757. </ul>
  39758. </ul>
  39759. <ul>
  39760. <u>Note:</u> If you would like to restrict access to admin set-commands (-> statusRequest) you may set your FHEMWEB instance's attribute allowedCommands like 'set,set-user'.
  39761. The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
  39762. </ul>
  39763. <br>
  39764. <br>
  39765. <ul>
  39766. <u>Advanced Ambilight Control</u><br>
  39767. <br>
  39768. <ul>
  39769. If you would like to specificly control color for individual sides or even individual LEDs, you may use special addressing to be used with set command 'rgb':<br>
  39770. <br><br>
  39771. LED addressing format:<br>
  39772. <code>&lt;Layer&gt;&lt;Side&gt;&lt;LED number&gt;</code>
  39773. <br><br>
  39774. <u>Examples:</u><br>
  39775. <ul>
  39776. <code># set LED 0 on left side within layer 1 to color RED<br>
  39777. set PhilipsTV rgb L1L0:FF0000
  39778. <br><br>
  39779. # set LED 0, 2 and 4 on left side within layer 1 to color RED<br>
  39780. set PhilipsTV rgb L1L0:FF0000 L1L2:FF0000 L1L4:FF0000
  39781. <br><br>
  39782. # set complete right side within layer 1 to color GREEN<br>
  39783. set PhilipsTV rgb L1R:00FF00
  39784. <br><br>
  39785. # set complete layer 1 to color BLUE
  39786. set PhilipsTV rgb L1:0000FF</code>
  39787. </ul><br>
  39788. </ul>
  39789. </ul>
  39790. <br>
  39791. <br>
  39792. <br>
  39793. <br>
  39794. <ul>
  39795. <u>Advanced Ambilight+HUE Control</u><br>
  39796. <br>
  39797. <ul>
  39798. Linking to your HUE devices within attributes ambiHueLeft, ambiHueTop, ambiHueRight and ambiHueBottom uses some defaults to calculate the actual color.<br>
  39799. More than one HUE device may be added using blank.<br>
  39800. The following settings can be fine tuned for each HUE device:<br>
  39801. <br>
  39802. <li>LED(s) to be used as color source<br>
  39803. either 1 single LED or a few in a raw like 2-4. Defaults to use the middle LED and it's left and right partners. Counter starts at 1. See readings ambiLED* for how many LED's your TV has.</li>
  39804. <li>saturation in percent of the original value (1-99, default=100)</li>
  39805. <li>brightness in percent of the original value (1-99, default=100)</li>
  39806. <br><br>
  39807. Use the following addressing format for fine tuning:<br>
  39808. <code>devicename:&lt;LEDs$gt;:&lt;saturation$gt;:&lt;brightness$gt;</code>
  39809. <br><br>
  39810. <u>Examples:</u><br>
  39811. <ul>
  39812. <code># to push color from top to 2 HUE devices<br>
  39813. attr PhilipsTV ambiHueTop HUEDevice0 HUEDevice1
  39814. <br><br>
  39815. # to use only LED 4 from the top as source<br>
  39816. attr PhilipsTV ambiHueTop HUEDevice0:4
  39817. <br><br>
  39818. # to use a combination of LED's 1+2 as source<br>
  39819. attr PhilipsTV ambiHueTop HUEDevice0:1-2
  39820. <br><br>
  39821. # to use LED's 1+2 and only 90% of their saturation<br>
  39822. attr PhilipsTV ambiHueTop HUEDevice0:1-2:90
  39823. <br><br>
  39824. # to use LED's 1+2 and only 50% of their brightness<br>
  39825. attr PhilipsTV ambiHueTop HUEDevice0:1-2::50
  39826. <br><br>
  39827. # to use LED's 1+2, 90% saturation and 50% brightness<br>
  39828. attr PhilipsTV ambiHueTop HUEDevice0:1-2:90:50
  39829. <br><br>
  39830. # to use default LED settings but only adjust their brightness to 50%<br>
  39831. attr PhilipsTV ambiHueTop HUEDevice0:::50</code>
  39832. </ul><br>
  39833. </ul>
  39834. </ul>
  39835. <br>
  39836. <br>
  39837. <a name="PHTVget"></a>
  39838. <b>Get</b>
  39839. <ul>
  39840. <code>get &lt;name&gt; &lt;what&gt;</code>
  39841. <br><br>
  39842. Currently, the following commands are defined:<br><br>
  39843. <ul><code>channel<br>
  39844. mute<br>
  39845. power<br>
  39846. input<br>
  39847. volume<br>
  39848. rgb<br>
  39849. </code></ul>
  39850. </ul>
  39851. <br>
  39852. <br>
  39853. <a name="PHTVattr"></a>
  39854. <b>Attributes</b><br>
  39855. <ul><ul>
  39856. <li><b>ambiHueLeft</b> - HUE devices that should get the color from left Ambilight.</li>
  39857. <li><b>ambiHueTop</b> - HUE devices that should get the color from top Ambilight.</li>
  39858. <li><b>ambiHueRight</b> - HUE devices that should get the color from right Ambilight.</li>
  39859. <li><b>ambiHueBottom</b> - HUE devices that should get the color from bottom Ambilight.</li>
  39860. <li><b>ambiHueLatency</b> - Controls the update interval for HUE devices in milliseconds; defaults to 200 ms.</li>
  39861. <li><b>channelsMax</b> - Maximum amount of channels shown in FHEMWEB. Defaults to 80.</li>
  39862. <li><b>disable</b> - Disable polling (true/false)</li>
  39863. <li><b>drippyFactor</b> - Adds some delay in seconds after low-performance devices came up to allow more time to become responsive (default=0)</li>
  39864. <li><b>inputs</b> - Presents the inputs read from device. Inputs can be renamed by adding <code>,NewName</code> right after the original name.</li>
  39865. <li><b>jsversion</b> - JointSpace protocol version; e.g. pre2014 devices use 1, 2014 devices use 5 and >=2015 devices use 6. defaults to 1</li>
  39866. <li><b>sequentialQuery</b> - avoid parallel queries for low-performance devices</li>
  39867. <li><b>timeout</b> - Set different polling timeout in seconds (default=7)</li>
  39868. </ul></ul>
  39869. <br>
  39870. <br>
  39871. <br>
  39872. <b>Generated Readings/Events:</b><br>
  39873. <ul><ul>
  39874. <li><b>ambiHue</b> - Ambilight+Hue status</li>
  39875. <li><b>ambiLEDBottom</b> - Number of LEDs of bottom Ambilight</li>
  39876. <li><b>ambiLEDLayers</b> - Number of physical LED layers</li>
  39877. <li><b>ambiLEDLeft</b> - Number of LEDs of left Ambilight</li>
  39878. <li><b>ambiLEDRight</b> - Number of LEDs of right Ambilight</li>
  39879. <li><b>ambiLEDTop</b> - Number of LEDs of top Ambilight</li>
  39880. <li><b>ambiMode</b> - current Ambilight color source</li>
  39881. <li><b>channel</b> - Shows the service name of current channel; part of FHEM-4-AV-Devices compatibility</li>
  39882. <li><b>country</b> - Set country</li>
  39883. <li><b>currentMedia</b> - The preset number of this channel; part of FHEM-4-AV-Devices compatibility</li>
  39884. <li><b>frequency</b> - Shows current channels frequency</li>
  39885. <li><b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility</li>
  39886. <li><b>language</b> - Set menu language</li>
  39887. <li><b>model</b> - Device model</li>
  39888. <li><b>mute</b> - Reports the mute status of the device (can be "on" or "off")</li>
  39889. <li><b>onid</b> - The ON ID</li>
  39890. <li><b>power</b> - Reports the power status of the device (can be "on" or "off")</li>
  39891. <li><b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present"). In case of an absent device, control is basically limited to turn it on again. This will only work if the device supports Wake-On-LAN packages, otherwise command "on" will have no effect.</li>
  39892. <li><b>receiveMode</b> - Receiving mode (analog or DVB)</li>
  39893. <li><b>rgb</b> - Current Ambilight color if ambiMode is not set to internal and all LEDs have the same color</li>
  39894. <li><b>rgb_X</b> - Current Ambilight color of a specific LED if ambiMode is not set to internal</li>
  39895. <li><b>serialnumber</b> - Device serial number</li>
  39896. <li><b>servicename</b> - Name for current channel</li>
  39897. <li><b>sid</b> - The S-ID</li>
  39898. <li><b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "absent")</li>
  39899. <li><b>systemname</b> - Device system name</li>
  39900. <li><b>tsid</b> - The TS ID</li>
  39901. <li><b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)</li>
  39902. <li><b>volumeStraight</b> - Reports current volume level of the receiver in device specific range</li>
  39903. </ul></ul>
  39904. </ul>
  39905. <a name="PID20"></a>
  39906. <h3>PID20</h3>
  39907. <ul>
  39908. <a name="PID20define"></a>
  39909. <b>Define</b>
  39910. <ul>
  39911. <br/>
  39912. <code>define &lt;name&gt; PID20 &lt;sensor[:reading[:regexp]]&gt; &lt;actor:cmd &gt;</code>
  39913. <br/><br/>
  39914. This module provides a PID device, using &lt;sensor&gt; and &lt;actor&gt;<br/>
  39915. </ul>
  39916. <br/><br/>
  39917. <a name="PID20set"></a>
  39918. <b>Set-Commands</b><br/>
  39919. <ul>
  39920. <br/>
  39921. <code>set &lt;name&gt; desired &lt;value&gt;</code>
  39922. <br/><br/>
  39923. <ul>Set desired value for PID</ul>
  39924. <br/>
  39925. <br/>
  39926. <code>set &lt;name&gt; start</code>
  39927. <br/><br/>
  39928. <ul>Start PID processing again, using frozen values from former stop.</ul>
  39929. <br/>
  39930. <br/>
  39931. <code>set &lt;name&gt; stop</code>
  39932. <br/><br/>
  39933. <ul>PID stops processing, freezing all values.</ul>
  39934. <br/>
  39935. <br/>
  39936. <code>set &lt;name&gt; restart &lt;value&gt;</code>
  39937. <br/><br/>
  39938. <ul>Same as start, but uses value as start value for actor</ul>
  39939. <br/>
  39940. </ul>
  39941. <br/><br/>
  39942. <a name="PID20get"></a>
  39943. <b>Get-Commands</b><br/>
  39944. <ul>
  39945. <br/>
  39946. <code>get &lt;name&gt; params</code>
  39947. <br/><br/>
  39948. <ul>Get list containing current parameters.</ul>
  39949. <br/>
  39950. </ul>
  39951. <br/><br/>
  39952. <a name="PID20attr"></a>
  39953. <b>Attributes</b><br/><br/>
  39954. <ul>
  39955. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  39956. <br/>
  39957. <li><b>disable</b> - disable the PID device, possible values: 0,1; default: 0</li>
  39958. <li><b>pidActorValueDecPlaces</b> - number of demicals, possible values: 0..5; default: 0</li>
  39959. <li><b>pidActorInterval</b> - number of seconds to wait between to commands sent to actor; default: 180</li>
  39960. <li><b>pidActorTreshold</b> - threshold to be reached before command will be sent to actor; default: 1</li>
  39961. <li><b>pidActorErrorAction</b> - required action on error, possible values: freeze,errorPos; default: freeze</li>
  39962. <li><b>pidActorErrorPos</b> - actor's position to be used in case of error; default: 0</li>
  39963. <li><b>pidActorKeepAlive</b> - number of seconds to force command to be sent to actor; default: 1800</li>
  39964. <li><b>pidActorLimitLower</b> - lower limit for actor; default: 0</li>
  39965. <li><b>pidActorLimitUpper</b> - upper limit for actor; default: 100</li>
  39966. <li><b>pidCalcInterval</b> - interval (seconds) to calculate new pid values; default: 60</li>
  39967. <li><b>pidDeltaTreshold</b> - if delta < delta-threshold the pid will enter idle state; default: 0</li>
  39968. <li><b>pidDesiredName</b> - reading's name for desired value; default: desired</li>
  39969. <li><b>pidFactor_P</b> - P value for PID; default: 25</li>
  39970. <li><b>pidFactor_I</b> - I value for PID; default: 0.25</li>
  39971. <li><b>pidFactor_D</b> - D value for PID; default: 0</li>
  39972. <li><b>pidMeasuredName</b> - reading's name for measured value; default: measured</li>
  39973. <li><b>pidSensorTimeout</b> - number of seconds to wait before sensor will be recognized n/a; default: 3600</li>
  39974. <li><b>pidReverseAction</b> - reverse PID operation mode, possible values: 0,1; default: 0</li>
  39975. <li><b>pidUpdateInterval</b> - number of seconds to wait before an update will be forced for plotting; default: 300</li>
  39976. <li><b>pidActorCallBeforeSetting</b> - an optional callback-function,which can manipulate the actorValue; default: not defined
  39977. <pre>
  39978. # Exampe for callback-function
  39979. # 1. argument = name of PID20
  39980. # 2. argument = current actor value
  39981. sub PIDActorSet($$)
  39982. {
  39983. my ( $name, $actValue ) = @_;
  39984. if ($actValue>70)
  39985. {
  39986. $actValue=100;
  39987. }
  39988. return $actValue;
  39989. }</pre>
  39990. </li>
  39991. <li><b>pidIPortionCallBeforeSetting</b> - an optional callback-function, which can manipulate the value of I-Portion; default: not defined
  39992. <pre>
  39993. # Exampe for callback-function
  39994. # 1. argument = name of PID20
  39995. # 2. argument = current i-portion value
  39996. sub PIDIPortionSet($$)
  39997. {
  39998. my ( $name, $actValue ) = @_;
  39999. if ($actValue>70)
  40000. {
  40001. $actValue=70;
  40002. }
  40003. return $actValue;
  40004. }</pre>
  40005. </li>
  40006. </ul>
  40007. <br/><br/>
  40008. <b>Generated Readings/Events:</b>
  40009. <br/><br/>
  40010. <ul>
  40011. <li><b>actuation</b> - real actuation set to actor</li>
  40012. <li><b>actuationCalc</b> - internal actuation calculated without limits</li>
  40013. <li><b>delta</b> - current difference desired - measured</li>
  40014. <li><b>desired</b> - desired value</li>
  40015. <li><b>measured</b> - measured value</li>
  40016. <li><b>p_p</b> - p value of pid calculation</li>
  40017. <li><b>p_i</b> - i value of pid calculation</li>
  40018. <li><b>p_d</b> - d value of pid calculation</li>
  40019. <li><b>state</b> - current device state</li>
  40020. <br/>
  40021. Names for desired and measured readings can be changed by corresponding attributes (see above).<br/>
  40022. </ul>
  40023. <br/><br/>
  40024. <b>Additional information</b><br/><br/>
  40025. <ul>
  40026. <li><a href="http://forum.fhem.de/index.php/topic,17067.0.html">Discussion in FHEM forum</a></li><br/>
  40027. <li><a href="http://www.fhemwiki.de/wiki/PID20_-_Der_PID-Regler">Information in FHEM wiki</a></li><br/>
  40028. </ul>
  40029. </ul>
  40030. <a name="PIFACE"></a>
  40031. <h3>PIFACE</h3>
  40032. <ul>
  40033. The PIFACE module managed the <a href=http://www.raspberrypi.org/>Raspberry Pi</a> extension board <a href=http://www.piface.org.uk/products/piface_digital/>PiFace Digital</a>.<br>
  40034. PIFACE controls the input ports 0..7 and output ports 0..7.
  40035. <ul>
  40036. <li>The relays 0 and 1 have corresponding output port 0 and 1.</li>
  40037. <li>The switches 0..3 have corresponding input ports 0..3 and must be read with attr portMode<0..7> = up</li>
  40038. </ul>
  40039. The status of the ports can be displayed periodically. The update of the states via interrupt is not supported.<br>
  40040. The module can be periodically monitored by a watchdog function.<br>
  40041. The ports can be read and controlled individually by the function <a href="#readingsProxy">readingsProxy</a>.<br>
  40042. PIFACE is tested with the Raspbian OS.<br><br>
  40043. <b>Preparatory Work</b><br>
  40044. The use of PIFACE module requires some preparatory work. The module needs the <a href=http://wiringpi.com>Wiring Pi</a> tool.
  40045. <ul>
  40046. <br>
  40047. Raspbian Wheezy<br>
  40048. <li>Install it with<br>
  40049. <code>git clone git://git.drogon.net/wiringPi<br>
  40050. cd wiringPi<br>
  40051. ./build</code><br>
  40052. </li>
  40053. Raspbian Jessie<br>
  40054. <li>Install it with<br>
  40055. <code>sudo apt-get install wiringpi</code><br>
  40056. </li>
  40057. <li>PiFace Digital need the SPI pins on the Raspberry Pi to be enabled in order to function.
  40058. Start <code>sudo raspi-config</code>, select <code>Advanced Options</code>
  40059. and set the <code>A5 SPI</code> option to "Yes".
  40060. </li>
  40061. <li>The function of the PiFace Digital can be tested at OS command line. For example:<br>
  40062. <code>gpio -p readall</code><br>
  40063. <code>gpio -p read 200</code><br>
  40064. <code>gpio -p write 201 0</code> or <code>gpio -p write 201 1</code><br>
  40065. </li>
  40066. <li>The watchdog function monitors the input port 7 and the output port 7.<br>
  40067. If the watchdog is enabled, this ports can not be used for other tasks.
  40068. In order to monitor the input port 7, it must be connected to the ground!<br>
  40069. The OS command "shutdown" must be enable for fhem if an OS restart is to
  40070. be executed in case of malfunction. For example, with <code>chmod +s /sbin/shutdown</code>
  40071. or <code>sudo chmod +s /sbin/shutdown</code>.<br>
  40072. </li>
  40073. </ul>
  40074. <ul>
  40075. <br>
  40076. Raspbian Jessie<br>
  40077. <li>PiFace Digital need the SPI pins on the Raspberry Pi to be enabled in order to function.
  40078. Start <code>sudo raspi-config</code>, select <code>9 Advanced Options</code>
  40079. and set the <code>A6 SPI</code> option to "Yes".
  40080. </li>
  40081. <li>The function of the PiFace Digital can be tested at OS command line. For example:<br>
  40082. <code>gpio -p readall</code><br>
  40083. <code>gpio -p read 200</code><br>
  40084. <code>gpio -p write 201 0</code> or <code>gpio -p write 201 1</code><br>
  40085. </li>
  40086. <li>The watchdog function monitors the input port 7 and the output port 7.<br>
  40087. If the watchdog is enabled, this ports can not be used for other tasks.
  40088. In order to monitor the input port 7, it must be connected to the ground!<br>
  40089. The OS command "shutdown" must be enable for fhem if an OS restart is to
  40090. be executed in case of malfunction. For example, with <code>chmod +s /sbin/shutdown</code>
  40091. or <code>sudo chmod +s /sbin/shutdown</code>.<br>
  40092. </li>
  40093. </ul>
  40094. <br>
  40095. <a name="PIFACEdefine"></a>
  40096. <b>Define</b>
  40097. <ul><br>
  40098. <code>define &lt;name&gt; PIFACE</code><br>
  40099. </ul><br>
  40100. <a name="PIFACEset"></a>
  40101. <b>Set</b><br/>
  40102. <ul>
  40103. <br/>
  40104. <code>set &lt;name&gt; &lt;port&gt; &lt;value&gt;</code>
  40105. <br/><br/>
  40106. <ul>
  40107. <li>set single port n to 1 (on) or 0 (off)<br/><br/>
  40108. Examples:<br/>
  40109. set &lt;name&gt; 3 1 =&gt; set port 3 on<br/>
  40110. set &lt;name&gt; 5 0 =&gt; set port 5 off<br/></li>
  40111. <br/>
  40112. <li>set all ports in one command by bitmask<br/><br/>
  40113. Example:<br/>
  40114. set &lt;name&gt; all 255 =&gt; set all ports on<br/>
  40115. set &lt;name&gt; all 0 =&gt; set all ports off<br/>
  40116. set &lt;name&gt; all 170 =&gt; bitmask(170) = 10101010 =&gt; set ports 1 3 5 7 on, ports 0 2 4 6 off<br/>
  40117. <br/>
  40118. <ul>
  40119. <code>port 76543210<br/>
  40120. bit&nbsp; 10101010</code>
  40121. </ul></li>
  40122. </ul>
  40123. </ul>
  40124. <br>
  40125. <a name="PIFACEget"></a>
  40126. <b>Get</b><br/>
  40127. <ul>
  40128. <br/>
  40129. <code>get &lt;name&gt; &lt;port&gt;</code>
  40130. <br/><br/>
  40131. <ul>
  40132. <li>get state of single port<br/><br/>
  40133. Example:<br/>
  40134. get &lt;name&gt; 3 =&gt; get state of port 3<br/>
  40135. </li>
  40136. <br/>
  40137. <li>get state of input ports and update changed readings<br/><br/>
  40138. Example:<br/>
  40139. get &lt;name&gt; in =&gt; get state of all input ports<br/>
  40140. </li>
  40141. <br/>
  40142. <li>get state of out ports and update changed readings<br/><br/>
  40143. Example:<br/>
  40144. get &lt;name&gt; out =&gt; get state of all output ports<br/>
  40145. </li>
  40146. <br/>
  40147. <li>get state of input and out ports and update all readings<br/><br/>
  40148. Example:<br/>
  40149. get &lt;name&gt; all =&gt; get state of all ports<br/>
  40150. </li>
  40151. </ul>
  40152. </ul>
  40153. <br>
  40154. <a name="PIFACEattr"></a>
  40155. <b>Attributes</b><br/><br/>
  40156. <ul>
  40157. <li><a name="PIFACE_defaultState">defaultState</a> last|off|0|1,
  40158. [defaultState] = off is default.<br>
  40159. Restoration of the status of the output port after a Fhem reboot.
  40160. </li>
  40161. <li><a href="#PIFACE_disable">disable</a> 0|1<br>
  40162. If applied set commands will not be executed.
  40163. </li>
  40164. <li><a href="#PIFACE_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...<br>
  40165. Space separated list of HH:MM tupels. If the current time is between
  40166. the two time specifications, set commands will not be executed. Instead of
  40167. HH:MM you can also specify HH or HH:MM:SS. To specify an interval
  40168. spawning midnight, you have to specify two intervals, e.g.:
  40169. <ul>
  40170. 23:00-24:00 00:00-01:00
  40171. </ul>
  40172. </li>
  40173. <li><a name="PIFACE_pollInterval">pollInterval</a> off|1,2,...,9,10,
  40174. [pollInterval] = off is default.<br>
  40175. Define the polling interval of the input ports in seconds.
  40176. </li>
  40177. <li><a name="PIFACE_portMode&lt;0..7&gt;">portMode&lt;0..7&gt;</a> tri|up,
  40178. [portMode&lt;0..7&gt;] = tri is default.<br>
  40179. This enables (up) or disables (tri) the internal pull-up resistor on the given input port.
  40180. You need to enable the pull-up if you want to read any of the on-board switches on the PiFace board.
  40181. </li>
  40182. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  40183. <li><a name="PIFACE_watchdog">watchdog</a> off|on|silent,
  40184. [watchdog] = off is default.<br>
  40185. The function of the PiFace extension can be monitored periodically.
  40186. The watchdog module checks the function of ports in7 and out7.
  40187. If the watchdog function is to be used, ports in7 and out7 are reserved for this purpose.
  40188. The port 7 must be connected to ground.<br>
  40189. If [watchdog] = on, the result of which is periodically logged and written to the reading watchdog.<br>
  40190. If [watchdog] = silent, FHEM is restarted after the first error detected.
  40191. If the error could not be eliminated, then the Raspberry operating system is restarted.
  40192. If the error is not corrected as well, the monitoring function is disabled and the error is logged.
  40193. </li>
  40194. <li><a name="PIFACE_watchdogInterval">watchdogInterval</a> 10..65535,
  40195. [watchdogInterval] = 60 is default.<br>
  40196. Interval between two monitoring tests in seconds.
  40197. </li>
  40198. </ul>
  40199. <br>
  40200. <b>Generated Readings/Events:</b>
  40201. <br/><br/>
  40202. <ul>
  40203. <li>&lt;out0..out7&gt;: 0|1<br>
  40204. state of output port 0..7</li>
  40205. <li>&lt;in0..in7&gt;: 0|1<br>
  40206. state of input port 0..7</li>
  40207. <li>watchdog: off|ok|error|restart|start<br>
  40208. state of the watchdog function</li>
  40209. <li>state: active|error</li><br>
  40210. </ul>
  40211. </ul>
  40212. <a name="PIONEERAVR"></a>
  40213. <h3>PIONEERAVR</h3>
  40214. <ul>
  40215. This module allows to remotely control a Pioneer AV receiver (only the Main zone, other zones are controlled by the module PIONEERAVRZONE)
  40216. equipped with an Ethernet interface or a RS232 port.
  40217. It enables Fhem to
  40218. <ul>
  40219. <li>switch ON/OFF the receiver</li>
  40220. <li>adjust the volume</li>
  40221. <li>set the input source</li>
  40222. <li>and configure some other parameters</li>
  40223. </ul>
  40224. <br><br>
  40225. This module is based on the <a href="http://www.pioneerelectronics.com/StaticFiles/PUSA/Files/Home%20Custom%20Install/Elite%20&%20Pioneer%20FY14AVR%20IP%20&%20RS-232%207-31-13.zip">Pioneer documentation</a>
  40226. and tested with a Pioneer AV receiver VSX-923 from <a href="http://www.pioneer.de">Pioneer</a>.
  40227. <br><br>
  40228. Note: this module requires the Device::SerialPort or Win32::SerialPort module
  40229. if the module is connected via serial Port or USB.
  40230. <br><br>
  40231. This module tries to
  40232. <ul>
  40233. <li>keep the data connection between Fhem and the Pioneer AV receiver open. If the connection is lost, this module tries to reconnect once</li>
  40234. <li>forwards data to the module PIONEERAVRZONE to control the ZONEs of a Pioneer AV receiver</li>
  40235. </ul>
  40236. As long as Fhem is connected to the Pioneer AV receiver no other device (e.g. a smart phone) can connect to the Pioneer AV receiver on the same port.
  40237. Some Pioneer AV receivers offer more than one port though. From Pioneer recommend port numbers:00023,49152-65535, Invalid port numbers:00000,08102
  40238. <br><br>
  40239. <a name="PIONEERAVRdefine"></a>
  40240. <b>Define</b>
  40241. <ul>
  40242. <code>define &lt;name&gt; PIONEERAVR telnet &lt;IPAddress:Port&gt;</code><br><br>
  40243. or<br><br>
  40244. <code>define &lt;name&gt; PIONEERAVR serial &lt;SerialDevice&gt;[&lt;@BaudRate&gt;]</code>
  40245. <br><br>
  40246. Defines a Pioneer AV receiver device (communication interface and main zone control). The keywords <code>telnet</code> or
  40247. <code>serial</code> are fixed. Default port on Pioneer AV receivers is 23 (according to the above mentioned Pioneer documetation) or 8102 (according to posts in the Fhem forum)<br>
  40248. Note: PIONEERAVRZONE devices to control zone2, zone3 and/or HD-zone are autocreated on reception of the first message for those zones.<br><br>
  40249. Examples:
  40250. <ul>
  40251. <code>define VSX923 PIONEERAVR telnet 192.168.0.91:23</code><br>
  40252. <code>define VSX923 PIONEERAVR serial /dev/ttyS0</code><br>
  40253. <code>define VSX923 PIONEERAVR serial /dev/ttyUSB0@9600</code><br>
  40254. </ul>
  40255. <br>
  40256. </ul>
  40257. <a name="PIONEERAVRset"></a>
  40258. <b>Set</b>
  40259. <ul>
  40260. <code>set &lt;name&gt; &lt;what&gt; [&lt;value&gt;]</code>
  40261. <br><br>
  40262. where &lt;what&gt; is one of
  40263. <li><b>bass <-6 ... 6></b> - Bass from -6dB to + 6dB (is only available if tone = on and the ListeningMode supports it)</li>
  40264. <li><b>channel <1 ... 9></b> - To change the tuner preset. Only available for input = 2 (Tuner)</li>
  40265. <li><b>channelDown</b> - Changes to the next lower tuner preset. Only available for input = 2 (Tuner)</li>
  40266. <li><b>channelStraight <A1...G9></b> - </li> To change the tuner preset with values as they are shown in the display of the Pioneer AV receiver eg. "A1". Only available for input = 2 (Tuner)
  40267. <li><b>channelUp</b> - Changes to the next higher tuner preset. Only available for input = 2 (Tuner)</li>
  40268. <li><b>down</b> - "arrow key down". Available for the same inputs as "play"</li>
  40269. <li><b>enter</b> - "Enter key". Available for the same inputs as "play" </li>
  40270. <li><b>eq <on|off></b> - Turns the equalizer on or off</li>
  40271. <li><b>fwd</b> - Fast forward. Available for the same inputs as "play"</li>
  40272. <li><b>hdmiOut <1+2|1|2|off></b> - Switches the HDMI output 1 and/or 2 of the Pioneer AV Receivers on or off.</li>
  40273. <li><b>input <not on the Pioneer hardware deactivated input></b> The list of possible (i.e. not deactivated)
  40274. inputs is read in during Fhem start and with <code>get <name> statusRequest</code>. Renamed inputs are shown with their new (renamed) name</li>
  40275. <li><b>inputDown</b> - Select the next lower input for the Main Zone</li>
  40276. <li><b>inputUp</b> - Select the next higher input for the Main Zone</li>
  40277. <li><b>left</b> - "Arrow key left". Available for the same inputs as "play"</li>
  40278. <li><b>listeningMode</b> - Sets a ListeningMode e.g. autoSourround, direct, action,...</li>
  40279. <li><b>mcaccMemory <1...6></b> - Sets one of the 6 predefined MCACC settings for the Main Zone</li>
  40280. <li><b>menu</b> - "Menu-key" of the remote control. Available for the same inputs as "play"</li>
  40281. <li><b>mute <on|off|toggle></b> - Mute the Main Zone of the Pioneer AV Receiver. "mute = on" means: Zero volume</li>
  40282. <li><b>networkStandby <on|off></b> - Turns Network standby on or off. To turn on a Pioneer AV Receiver with this module from standby, Network Standby must be "on". <code>set &lt;name&gt; networkStandby on</code> should do this</li>
  40283. <li><b>next</b> - Available for the same inputs as "play"</li>
  40284. <li><b>off</b> - Switch the Main Zone to standby</li>
  40285. <li><b>on</b> - Switch the Main Zone on from standby. This can only work if "Network Standby" is "on" in the Pioneer AV Receiver. Refer to "networkStandby" above.</li>
  40286. <li><b>pause</b> - Pause replay. Available for the same inputs as "play"</li>
  40287. <li><b>play</b> - Starts replay for the following inputs:
  40288. <ul>
  40289. <li>usbDac</li>
  40290. <li>ipodUsb</li>
  40291. <li>xmRadio</li>
  40292. <li>homeMediaGallery</li>
  40293. <li>sirius</li>
  40294. <li>adapterPort</li>
  40295. <li>internetRadio</li>
  40296. <li>pandora</li>
  40297. <li>mediaServer</li>
  40298. <li>favorites</li>
  40299. <li>mhl</li>
  40300. </ul>
  40301. </li>
  40302. <li><b>prev</b> - Changes to the previous title. Available for the same inputs as "play".</li>
  40303. <li><b>raw <PioneerKommando></b> - Sends the command <code>&lt;PioneerCommand&gt;</code> unchanged to the Pioneer AV receiver. A list of all available commands is available in the Pioneer documentation mentioned above</li>
  40304. <li><b>remoteControl <attr></b> - where <attr> is one of:
  40305. <ul>
  40306. <li>cursorDown</li>
  40307. <li>cursorRight</li>
  40308. <li>cursorLeft</li>
  40309. <li>cursorEnter</li>
  40310. <li>cursorReturn</li>
  40311. <li>homeMenu</li>
  40312. <li>statusDisplay</li>
  40313. <li>audioParameter</li>
  40314. <li>hdmiOutputParameter</li>
  40315. <li>videoParameter</li>
  40316. <li>homeMenu</li>
  40317. Simulates the keys of the remote control. Warning: The cursorXX keys cannot change the inputs -> set <name> up ... can be used for this
  40318. </ul>
  40319. </li>
  40320. <li><b>reopen</b> - Tries to reconnect Fhem to the Pioneer AV Receiver</li>
  40321. <li><b>repeat</b> - Repeat for the following inputs: AdapterPort, Ipod, Favorites, InternetRadio, MediaServer. Cycles between
  40322. <ul>
  40323. <li>no repeat</li>
  40324. <li>repeat current title</li>
  40325. <li>repeat all titles</li>
  40326. </ul>
  40327. </li>
  40328. <li><b>return</b> - "Return key". Available for the same inputs as "play"</li>
  40329. <li><b>rev</b> - "rev key". Available for the same inputs as "play"</li>
  40330. <li><b>right</b> - "Arrow key right". Available for the same inputs as "play"</li>
  40331. <li><b>selectLine01 - selectLine08</b> - Available for the same inputs as "play". If there is an OSD you can select the lines directly</li>
  40332. <li><b>shuffle</b> - Random replay. For the same inputs available as "repeat". Toggles between random on and off</li>
  40333. <li><b>signalSelect <auto|analog|digital|hdmi|cycle></b> - Signal select function </li>
  40334. <li><b>speakers <off|A|B|A+B></b> - Turns speaker A and or B on or off.</li>
  40335. <li><b>standingWave <on|off></b> - Turns Standing Wave on or off for the Main Zone</li>
  40336. <li><b>statusRequest</b> - Asks the Pioneer AV Receiver for information to update the modules readings</li>
  40337. <li><b>stop</b> - Stops replay. Available for the same inputs as "play"</li>
  40338. <li><b>toggle</b> - Toggle the Main Zone to/from Standby</li>
  40339. <li><b>tone <on|bypass></b> - Turns tone on or in bypass</li>
  40340. <li><b>treble <-6 ... 6></b> - Treble from -6dB to + 6dB (works only if tone = on and the ListeningMode permits it)</li>
  40341. <li><b>up</b> - "Arrow key up". Available for the same inputs as "play"</li>
  40342. <li><b>volume <0 ... 100></b> - Volume of the Main Zone in % of the maximum volume</li>
  40343. <li><b>volumeDown</b> - Reduce the volume of the Main Zone by 0.5dB</li>
  40344. <li><b>volumeUp</b> - Increase the volume of the Main Zone by 0.5dB</li>
  40345. <li><b>volumeStraight<-80.5 ... 12></b> - Set the volume of the Main Zone with values from -80 ... 12 (As it is displayed on the Pioneer AV receiver</li>
  40346. <li><a href="#setExtensions">set extensions</a> are supported (except <code>&lt;blink&gt;</code> )</li>
  40347. <br><br>
  40348. Example:
  40349. <ul>
  40350. <code>set VSX923 on</code><br>
  40351. </ul>
  40352. <br>
  40353. <code>set &lt;name&gt; reopen</code>
  40354. <br><br>
  40355. Closes and reopens the device. Could be handy if the connection between Fhem and the Pioneer AV receiver is lost and cannot be
  40356. reestablished automatically.
  40357. <br><br>
  40358. </ul>
  40359. <a name="PIONEERAVRget"></a>
  40360. <b>Get</b>
  40361. does not return any value but asks the Pioneer AVR for the current status (e.g. of the volume). As soon as the Pioneer AVR replies (the time, till the Pioneer AVR replies is unpredictable), the readings or internals of this pioneerAVR modul are updated.
  40362. <ul>
  40363. <li><b>loadInputNames</b> - reads the names of the inputs from the Pioneer AV receiver and checks if those inputs are enabled</li>
  40364. <li><b>audioInfo</b> - get the current audio parameters from the Pioneer AV receiver (e.g. audioInputSignal, audioInputFormatXX, audioOutputFrequency)</li>
  40365. <li><b>display</b> - updates the reading 'display' and 'displayPrevious' with what is shown on the display of the Pioneer AV receiver</li>
  40366. <li><b>bass</b> - updates the reading 'bass'</li>
  40367. <li><b>channel</b> - </li>
  40368. <li><b>currentListIpod</b> - updates the readings currentAlbum, currentArtist, etc. </li>
  40369. <li><b>currentListNetwork</b> - </li>
  40370. <li><b>display</b> - </li>
  40371. <li><b>input</b> - </li>
  40372. <li><b>listeningMode</b> - </li>
  40373. <li><b>listeningModePlaying</b> - </li>
  40374. <li><b>macAddress</b> - </li>
  40375. <li><b>avrModel</b> - get the model of the Pioneer AV receiver, eg. VSX923 </li>
  40376. <li><b>mute</b> - </li>
  40377. <li><b>networkPorts</b> - get the open tcp/ip ports of the Pioneer AV Receiver</li>
  40378. <li><b>networkSettings</b> - get the IP network settings (ip, netmask, gateway,dhcp, dns1, dns2, proxy) of the Pioneer AV Receiver. The values are stored as INTERNALS not as READINGS </li>
  40379. <li><b>networkStandby</b> - get the current setting of networkStandby -> the value of networkStandby (on|off) is stored as an INTERNAL not as a READING</li>
  40380. <li><b>power</b> - get the Power state of the Pioneer AV receiver </li>
  40381. <li><b>signalSelect</b> - </li>
  40382. <li><b>softwareVersion</b> - get the software version of the software currently running in the Pioneer AV receiver. The value is stored as INTERNAL</li>
  40383. <li><b>speakers</b> - </li>
  40384. <li><b>speakerSystem</b> - </li>
  40385. <li><b>tone</b> - </li>
  40386. <li><b>tunerFrequency</b> - get the current frequency the tuner is set to</li>
  40387. <li><b>tunerChannelNames</b> - </li>
  40388. <li><b>treble</b> - </li>
  40389. <li><b>volume</b> - </li>
  40390. </ul>
  40391. <br><br>
  40392. <a name="PIONEERAVRattr"></a>
  40393. <b>Attributes</b>
  40394. <br><br>
  40395. <ul>
  40396. <li>
  40397. <b>connectionCheck</b> &nbsp;&nbsp;1..120,off&nbsp;&nbsp; Pings the Pioneer AVR every X seconds to verify connection status. Defaults to 60 seconds.
  40398. </li>
  40399. <li>
  40400. <b>timeout</b> &nbsp;&nbsp;1,2,3,4,5,7,10,15&nbsp;&nbsp; Max time in seconds till the Pioneer AVR replies to a ping. Defaults to 3 seconds.
  40401. </li>
  40402. <li><b>checkStatusStart &lt;enable|disable&gt;</b> - Enables/disables the status update (read all values from the Pioneer AV receiver, can take up to one minute) when the module is loaded.(Default: enable)</li>
  40403. <li><b>checkStatusReconnect &lt;enable|disable&gt;</b> - Enables/disables the status update (read all values from the Pioneer AV receiver, can take up to one minute) when the connection to the Pioneer AV receiver is reestablished.(Default: enable)</li>
  40404. <li><b>logTraffic &lt;loglevel&gt;</b> - Enables logging of sent and received datagrams with the given loglevel.
  40405. Control characters in the logged datagrams are escaped, i.e. a double backslash is shown for a single backslash,
  40406. \n is shown for a line feed character,...</li>
  40407. <li><b><a href="#verbose">verbose</a></b> - 0: log es less as possible, 5: log as much as possible</li>
  40408. <li><b>volumeLimit &lt;0 ... 100&gt;</b> - limits the volume to the given value</li>
  40409. <li><b>volumeLimitStraight &lt;-80 ... 12&gt;</b> - limits the volume to the given value</li>
  40410. </ul>
  40411. <br><br>
  40412. <b>Generated Readings/Events:</b>
  40413. <br/><br/>
  40414. <ul>
  40415. <li><b>audioAutoPhaseControlMS</b> - currently configured Auto Phase Control in ms</li>
  40416. <li><b>audioAutoPhaseControlRevPhase</b> - acurrently configured Auto Phase Control reverse Phase -> 1 means: reverse phase</li>
  40417. <li><b>audioInputFormat<XXX></b> - Shows if the channel XXX is available in the audio input signal (1 means: is available)</li>
  40418. <li><b>audioInputFrequency</b> - Frequency of the input signal</li>
  40419. <li><b>audioInputSignal</b> - Type of the input signal (z.B. ANALOG, PCM, DTS,...)</li>
  40420. <li><b>audioOutputFormat<XXX></b> - Shows if the channel XXX is available in the audio output sgnal (1 means: is available)</li>
  40421. <li><b>audioOutputFrequency</b> - Frequency of the audio output signal</li>
  40422. <li><b>bass</b> - currently set bass</li>
  40423. <li><b>channel</b> - Tuner Preset (1...9)</li>
  40424. <li><b>channelStraight</b> - Tuner Preset as diplayed in the display of the Pioneer AV Receiver, e.g. A2</li>
  40425. <li><b>display</b> - Currently dispayed text in the display of the Pioneer AV Receiver</li>
  40426. <li><b>displayPrevious</b> - Previous displayed text</li>
  40427. <li><b>eq</b> - Equalizer status of the Pioneer AV Receiver (on|off)</li>
  40428. <li><b>hdmiOut</b> - Shows the currently selected HDMI-output(s)?</li>
  40429. <li><b>input</b> - shows the currently selected input</li>
  40430. <li><b>inputsList</b> - ":" separated list of all activated inputs</li>
  40431. <li><b>listeningMode</b> - Currently set Listening Mode</li>
  40432. <li><b>listeningModePlaying</b> - Currently used Listening Mode</li>
  40433. <li><b>mcaccMemory</b> - MCACC Setting</li>
  40434. <li><b>mute</b> - Mute (on|off)</li>
  40435. <li><b>power</b> - Main Zone on or standby?</li>
  40436. <li><b>pqlsWorking</b> - currently set PQLS</li>
  40437. <li><b>presence</b> - Is the Pioneer AV Receiver reachable via ethernet?</li>
  40438. <li><b>screenHirarchy</b> - Hirarchy of the currently shown On Screen Displays (OSD)</li>
  40439. <li><b>screenLine01...08</b> - Content of the lines 01...08 of the OSD</li>
  40440. <li><b>screenLineHasFocus</b> - Which line of the OSD has the focus?</li>
  40441. <li><b>screenLineNumberFirst</b> - Long lists are shown in the OSD in smaller pages with 8 lines. This shows which elemnt of the lang list is the currently shown first line.</li>
  40442. <li><b>screenLineNumberLast</b> - Long lists are shown in the OSD in smaller pages with 8 lines. This shows which elemnt of the lang list is the currently shown last line.</li>
  40443. <li><b>screenLineNumbersTotal</b> - How many lines has the full list</li>
  40444. <li><b>screenLineNumbers</b> - How many lines has the OSD</li>
  40445. <li><b>screenLineType01...08</b> - Which type has line 01...08? E.g. "directory", "Now playing", "current Artist",...</li>
  40446. <li><b>screenName</b> - Name of the OSD</li>
  40447. <li><b>screenReturnKey</b> - Is the "Return-Key" in this OSD available?</li>
  40448. <li><b>screenTopMenuKey</b> - Is the "Menu-Key" in this OSD available?</li>
  40449. <li><b>screenToolsKey</b> - Is the "Tools-Key" (Menu, edit, ipod control) in this OSD available?</li>
  40450. <li><b>screenType</b> - Type of the OSD, e.g. "message", "List", "playing(play)",...</li>
  40451. <li><b>speakerSystem</b> - Shows how the rear surround speaker connectors and the B-speaker connectors are used</li>
  40452. <li><b>speakers</b> - Which speaker output connectors are active?</li>
  40453. <li><b>standingWave</b> - Standing wave</li>
  40454. <li>
  40455. <b>state</b> - Is set while connecting from fhem to the Pioneer AV Receiver (disconnected|innitialized|off|on|opened)
  40456. </li>
  40457. <li>
  40458. <b>stateAV</b> - Status from user perspective combining readings presence, power, mute and playStatus to a useful overall status (on|off|absent|stopped|playing|paused|fast-forward|fast-rewind).
  40459. </li>
  40460. <li><b>tone</b> - Is the tone control turned on?</li>
  40461. <li><b>treble</b> - Current value of treble</li>
  40462. <li><b>tunerFrequency</b> - Tuner frequency</li>
  40463. <li><b>volume</b> - Current value of volume (0%-100%)</li>
  40464. <li><b>volumeStraight</b> - Current value of volume os displayed in the display of the Pioneer AV Receiver</li>
  40465. </ul>
  40466. <br><br>
  40467. </ul>
  40468. <a name="PIONEERAVRZONE"></a>
  40469. <h3>PIONEERAVRZONE</h3>
  40470. <ul>
  40471. <br>
  40472. <a name="PIONEERAVRZONEdefine"></a>
  40473. <b>Define</b>
  40474. <ul>
  40475. <code>define &lt;name&gt; PIONEERAVRZONE &lt;zone&gt; </code>
  40476. <br><br>
  40477. Defines a Zone (zone2, zone3 or hdZone) of a PioneerAVR device.<br>
  40478. Note: devices to control zone2, zone3 and/or HD-zone are autocreated on reception of the first message for those zones.<br><br>
  40479. Normally, the PIONEERAVRZONE device is attached to the latest previously defined PIONEERAVR device
  40480. for I/O. Use the <code>IODev</code> attribute of the PIONEERAVRZONE device to attach to any
  40481. PIONEERAVR device, e.g. <code>attr myPioneerAvrZone2 IODev myPioneerAvr</code>.
  40482. <br><br>
  40483. Examples:
  40484. <ul>
  40485. <code>define myPioneerAvrZone2 PIONEERAVRZONE zone2</code><br>
  40486. <code>attr myPioneerAvrZone2 IODev myPIONEERAVR</code>
  40487. </ul>
  40488. <br>
  40489. </ul>
  40490. <a name="PIONEERAVRZONEset"></a>
  40491. <b>Set</b>
  40492. <ul>
  40493. <code>set &lt;name&gt; &lt;what&gt; [&lt;value&gt;]</code>
  40494. <br><br>
  40495. where &lt;what&gt; is one of
  40496. <li>reopen</li>
  40497. <li>off <br>put zone into standby</li>
  40498. <li>on <br>turn zone on from standby</li>
  40499. <li>toggle <br>toggles zone power</li>
  40500. <li>volume <0 ... 100><br>zone volume in % of the maximum volume</li>
  40501. <li>volumeUp<br>increases the zone volume by 0.5dB</li>
  40502. <li>volumeDown<br>decreases the zone volume by 0.5dB</li>
  40503. <li>volumeStraight<-80.5 ... 12><br>same values for zone volume as shown on the display of the Pioneer AV receiver</li>
  40504. <li>mute <on|off|toggle></li>
  40505. <li>input <not on the Pioneer hardware deactivated input><br>the list of possible (i.e. not deactivated)
  40506. inputs is read in during Fhem start and with <code>get <name> statusRequest</code></li>
  40507. <li>inputUp<br>change zone input to next input</li>
  40508. <li>inputDown<br>change zone input to previous input</li>
  40509. <li><a href="#setExtensions">set extensions</a> are supported (except <code>&lt;name&gt;</code>)</li>
  40510. <br><br>
  40511. Example:
  40512. <ul>
  40513. <code>set VSX923Zone2 on</code><br>
  40514. </ul>
  40515. <br><br>
  40516. </ul>
  40517. <a name="PIONEERAVRZONEget"></a>
  40518. <b>Get</b>
  40519. <ul>
  40520. <li><code>get &lt;name&gt; input</code>
  40521. <br><br>
  40522. Update the reading for the zone input
  40523. </li>
  40524. </ul>
  40525. <br><br>
  40526. <a name="PIONEERAVRattr"></a>
  40527. <b>Attributes</b>
  40528. <br><br>
  40529. <ul>
  40530. <li>IOdev Name of the device which communicates with the phisical Pioneer AV receiver via ethernet or rs232</li>
  40531. <li><a href="#verbose">verbose</a></li>
  40532. </ul>
  40533. <br><br>
  40534. </ul>
  40535. <a name="PLAYBULB"></a>
  40536. <h3>MiPow Playbulb</h3>
  40537. <p><span style="text-decoration: underline;"><strong>PLAYBULB -Smart Light from MIPOW.COM</strong></span></p>
  40538. <p>This module integrates different smart lights from MIPOW into FHEM and displays several settings</p>
  40539. <p>&nbsp;</p>
  40540. <p><a name="PLAYBULBdefine"></a><strong>Define</strong><br /><code>define &lt;name&gt; PLAYBULB &lt;MAC-ADDRESS&gt;</code></p>
  40541. <p>Example: <code>define PlaybulbCandle PLAYBULB 0B:0B:0C:D0:E0:F0</code></p>
  40542. <p>&nbsp;</p>
  40543. <p>With this command a new PLAYBULB device in a room called PLAYBULB is created. The parameter &lt;MAC-ADDRESS&gt; defines the bluetooth MAC address of your mipow smart light.</p>
  40544. <p>&nbsp;</p>
  40545. <p style="padding-left: 90px;"><strong>pre-requesites</strong>: a BT LE 4.0 key and a working bluez installation or equivalent is necessary. (find a good guide at <a href="http://www.elinux.org/RPi_Bluetooth_LE)">http://www.elinux.org/RPi_Bluetooth_LE)</a></p>
  40546. <p style="padding-left: 90px;">It seems like the devices accept only one active connection.</p>
  40547. <p><br /><a name="PLAYBULBreadings"></a><strong>Readings</strong></p>
  40548. <ul>
  40549. <ul>
  40550. <ul>
  40551. <li>powerLevel - percentage of batterylevel</li>
  40552. <li>powerCharge - state of charging (Playbulb Garden only)</li>
  40553. <li>color - indicates if colormode is on or off</li>
  40554. <li>devicename - given name of the device</li>
  40555. <li>effect - indicates which effect is selected (Flash; Pulse; RainbowJump; RainbowFade; Candle; none)</li>
  40556. <li>onoff - indicates if the device is turned on (1) or off (0)</li>
  40557. <li>rgb - shows the selected color in hex by rgb (example: FF0000 is full red)</li>
  40558. <li>sat - shows the selected saturation from 0 to 255 (seems to be inverted; 0 is full saturation)</li>
  40559. <li>speed - shows the selected effect speed (possible: 20; 70; 120; 170)</li>
  40560. <li>state - current state of PLAYBULB device</li>
  40561. </ul>
  40562. </ul>
  40563. </ul>
  40564. <p><a name="PLAYBULBset"></a><strong>Set</strong></p>
  40565. <ul>
  40566. <ul>
  40567. <ul>
  40568. <li>on - turns device on</li>
  40569. <li>off - turns device off</li>
  40570. <li>rgb - colorpicker,RGB; gives the possibility to set any hue, saturation, brightness</li>
  40571. <li>sat - saturation slider from 0 to 255 steps 5</li>
  40572. <li>effect - Flash,Pulse,RainbowJump,RainbowFade,Candle,none; activates the selected effect</li>
  40573. <li>speed - slider: values are 170, 120, 70, 20</li>
  40574. <li>color - on,of; switches the device to rgb or white</li>
  40575. <li>statusRequest - is necessary to request state of the device</li>
  40576. <li>deviceName - changes the name of the bluetoothdevice e.g. "PlaybulbCandle"</li>
  40577. </ul>
  40578. </ul>
  40579. </ul>
  40580. <p><br /><strong>Get na</strong></p>
  40581. <p>&nbsp;</p>
  40582. <p><strong>Attributes&nbsp; </strong></p>
  40583. <ul>
  40584. <ul>
  40585. <ul>
  40586. <li>model<br />BTL300_v5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Candle Firmware 5<br />BTL300_v6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Candle Firmware 6<br />BTL201_v2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Smart<br />BTL201M_V16&nbsp; # Smart (1/2017)<br />BTL505_v1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Stripe<br />BTL400M_v18&nbsp; # Garden<br />BTL100C_v10&nbsp; # Color LED</li>
  40587. <li>sshHost - IP or FQDN for SSH remote control</li>
  40588. </ul>
  40589. </ul>
  40590. </ul>
  40591. <p><br /><a name="PLAYBULBstate"></a><strong>state</strong></p>
  40592. <ul>
  40593. <ul>
  40594. <ul>
  40595. <li>set attribut model&nbsp;- is shown after initial define</li>
  40596. <li>on - device is on</li>
  40597. <li>off - device is off</li>
  40598. <li>unreachable - connection to device lost</li>
  40599. </ul>
  40600. </ul>
  40601. </ul>
  40602. <p><br /><br /><br /><span style="text-decoration: underline;"><strong>Further examples and readings:</strong></span><br /><a href="https://forum.fhem.de/index.php/topic,60829.msg522226.html#msg522226">Forum thread (german only)</a><br /><br /></p>
  40603. <a name="POKEYS"></a>
  40604. <h3>POKEYS</h3>
  40605. <ul>
  40606. The POKEYS module is used to control the LAN POKEYS device (<a href="http://www.poscope.com/pokeys56e">POKEYS56e</a>) which supports
  40607. up to 56 digital input, analog inputs, counter inputs and digital outputs.
  40608. Each port/pin has to be configured before it can be used.
  40609. <br>
  40610. <br>
  40611. <a name="POKEYSdefine"></a>
  40612. <b>Define</b>
  40613. <ul>
  40614. <code>define &lt;name&gt; POKEYS &lt;ip-address&gt; &lt;pin&gt; &lt;io-state&gt; [&lt;time in ms&gt;]</code> <br>
  40615. <br>
  40616. <code>&lt;ip-address&gt;</code> the IP address where the POKEYS device can be accessed<br>
  40617. <code>&lt;pin&gt;</code> the pin number which should be configured<br>
  40618. <code>&lt;io-state&gt;</code> the new io state of the pin <code>Obsolete(=undef) DigIn DigOut AdcIn DigInCtRise DigInCtFall ExtDigOut GetBasic </code> <br>
  40619. <code>&lt;time in ms&gt;</code> optional else 1000ms: cyclic update time for Input pin <br>
  40620. <br>
  40621. Example:
  40622. <ul>
  40623. <code>define PoInfo POKEYS 192.168.178.34 0 GetBasic</code><br>
  40624. # creates a virtual pin for getting infos about the device with the <code>get</code> command<br>
  40625. <code>define Pin44in POKEYS 192.168.178.34 44 DigIn 200</code><br>
  40626. # creates a digitial input port on pin 44<br>
  40627. <code>define Pin25out POKEYS 192.168.178.34 25 DigOut</code><br>
  40628. # creates a digial output port on pin 25<br>
  40629. </ul>
  40630. </ul> <br>
  40631. <a name="POKEYSset"></a>
  40632. <b>Set</b>
  40633. <ul>
  40634. <code>set &lt;name&gt; &lt;state&gt; [&lt;time in ms&gt;]</code> <br>
  40635. <br>
  40636. <code>&lt;state&gt;</code> can be <code>OFF ON OFF_PULSE ON_PULSE </code><br>
  40637. <code>&lt;time in ms&gt;</code> optional else 1000ms hold time for the <code>ON_PULSE OFF_PULSE</code> state<br>
  40638. <br>
  40639. Example:
  40640. <ul>
  40641. <code>set Pin25out ON</code><br>
  40642. # sets Pin25out to ON (0V)<br>
  40643. </ul>
  40644. </ul><br>
  40645. <a name="POKEYSget"></a>
  40646. <b>Get</b>
  40647. <ul>
  40648. <code>get &lt;name&gt; &lt;type&gt; </code> <br>
  40649. <br>
  40650. only supported for pins of type <code>GetBasic</code><br>
  40651. <code>&lt;type&gt;</code> can be <code>Version DevName Serial User CPUload</code><br>
  40652. <br>
  40653. Example:
  40654. <ul>
  40655. <code>get PoInfo Version</code><br>
  40656. # gets the version of the POKEYS device<br>
  40657. </ul>
  40658. </ul><br>
  40659. <a name="POKEYSattr"></a>
  40660. <b>Attributes</b>
  40661. <ul>
  40662. todo <br>
  40663. </ul>
  40664. <br>
  40665. </ul>
  40666. <a name="PRESENCE"></a>
  40667. <h3>PRESENCE</h3>
  40668. <ul>
  40669. The PRESENCE module provides several possibilities to check the presence of mobile phones or similar mobile devices such as tablets.
  40670. <br><br>
  40671. This module provides several operational modes to serve your needs. These are:<br><br>
  40672. <ul>
  40673. <li><b>lan-ping</b> - A presence check of a device via network ping in your LAN/WLAN.</li>
  40674. <li><b>fritzbox</b> - A presence check by requesting the device state from the FritzBox internals (only available when running FHEM on a FritzBox!).</li>
  40675. <li><b>local-bluetooth</b> - A presence check by searching directly for a given bluetooth device nearby.</li>
  40676. <li><b>function</b> - A presence check by using your own perl function which returns a presence state.</li>
  40677. <li><b>shellscript</b> - A presence check by using an self-written script or binary which returns a presence state.</li>
  40678. <li><b>event</b> - A presence check by listening to FHEM events of other definitions.</li>
  40679. <li><b>lan-bluetooth</b> - A presence check of a bluetooth device via LAN network by connecting to a presenced or collectord instance.</li>
  40680. </ul>
  40681. <br>
  40682. Each mode can be optionally configured with a specific check interval and a present check interval.<br><br>
  40683. <ul>
  40684. <li>check-interval - The interval in seconds between each presence check. Default value: 30 seconds</li>
  40685. <li>present-check-interval - The interval in seconds between each presence check in case the device is <i>present</i>. Otherwise the normal check-interval will be used.</li>
  40686. </ul>
  40687. <br><br>
  40688. <a name="PRESENCEdefine"></a>
  40689. <b>Define</b><br><br>
  40690. <ul><b>Mode: lan-ping</b><br><br>
  40691. <code>define &lt;name&gt; PRESENCE lan-ping &lt;ip-address&gt; [ &lt;check-interval&gt; [ &lt;present-check-interval&gt; ] ]</code><br>
  40692. <br>
  40693. Checks for a network device via PING requests and reports its presence state.<br><br>
  40694. <u>Example</u><br><br>
  40695. <code>define iPhone PRESENCE lan-ping 192.168.179.21</code><br>
  40696. <br>
  40697. <b>Mode: fritzbox</b><br><br>
  40698. <code>define &lt;name&gt; PRESENCE fritzbox &lt;device-name/mac-address&gt; [ &lt;check-interval&gt; [ &lt;present-check-interval&gt; ] ]</code><br>
  40699. <br>
  40700. Checks for a network device by requesting the internal state on a FritzBox via ctlmgr_ctl. The device-name must be the same as shown in the network overview of the FritzBox or can be substituted by the MAC address with the format XX:XX:XX:XX:XX:XX<br><br>
  40701. <i>This check is only applicable when FHEM is running on a FritzBox! The detection of absence can take about 10-15 minutes!</i><br><br>
  40702. <u>Example</u><br><br>
  40703. <code>define iPhone PRESENCE fritzbox iPhone-6</code><br>
  40704. <code>define iPhone PRESENCE fritzbox 00:06:08:05:0D:00</code><br><br>
  40705. <b>Mode: local-bluetooth</b><br><br>
  40706. <code>define &lt;name&gt; PRESENCE local-bluetooth &lt;bluetooth-address&gt; [ &lt;check-interval&gt; [ &lt;present-check-interval&gt; ] ]</code><br>
  40707. <br>
  40708. Checks for a bluetooth device and reports its presence state. For this mode the shell command "hcitool" is required (provided with a <a href="http://www.bluez.org" target="_new">bluez</a> installation under Debian via APT), as well
  40709. as a functional bluetooth device directly attached to your machine.<br><br>
  40710. <u>Example</u><br><br>
  40711. <code>define iPhone PRESENCE local-bluetooth 0a:8d:4f:51:3c:8f</code><br><br>
  40712. <b>Mode: function</b><br><br>
  40713. <code>define &lt;name&gt; PRESENCE function {...} [ &lt;check-interval&gt; [ &lt;present-check-interval&gt; ] ]</code><br>
  40714. <br>
  40715. Checks for a presence state via perl-code. You can use a self-written perl function to obtain the presence state of a specific device (e.g. via SNMP check).<br><br>
  40716. The function must return 0 (absent) or 1 (present). An example can be found in the <a href="http://www.fhemwiki.de/wiki/Anwesenheitserkennung" target="_new">FHEM-Wiki</a>.<br><br>
  40717. <u>Example</u><br><br>
  40718. <code>define iPhone PRESENCE function {snmpCheck("10.0.1.1","0x44d77429f35c")}</code><br><br>
  40719. <b>Mode: shellscript</b><br><br>
  40720. <code>define &lt;name&gt; PRESENCE shellscript "&lt;path&gt; [&lt;arg1&gt;] [&lt;argN&gt;]..." [ &lt;check-interval&gt; [ &lt;present-check-interval&gt; ] ]</code><br>
  40721. <br>
  40722. Checks for a presence state via shell script. You can use a self-written script or binary in any language to obtain the presence state of a specific device (e.g. via SNMP check).<br><br>
  40723. The shell must return 0 (absent) or 1 (present) on <u>console (STDOUT)</u>. Any other values will be treated as an error<br><br>
  40724. <u>Example</u><br><br>
  40725. <code>define iPhone PRESENCE shellscript "/opt/check_device.sh iPhone"</code><br><br>
  40726. <b>Mode: event</b><br><br>
  40727. <code>define &lt;name&gt; PRESENCE evemt &lt;absent-regexp&gt; &lt;present-regexp&gt;</code><br>
  40728. <br>
  40729. Listens for events of other FHEM definitions to determine a presence state. You must provide two event regexp's in the same style as for the <a href="#notify">notify</a> module.<br><br>
  40730. If an event matches one of the provides regexps, the presence state will be changed.<br><br>
  40731. <u>Example</u><br><br>
  40732. <code>define Presence_John PRESENCE event Door_Switch:off Door_Switch:on</code><br><br>
  40733. <b>Mode: lan-bluetooth</b><br><br>
  40734. Checks for a bluetooth device with the help of presenced or collectord. They can be installed where-ever you like, just must be accessible via network.
  40735. The given device will be checked for presence status.<br>
  40736. <br>
  40737. <code>define &lt;name&gt; PRESENCE lan-bluetooth &lt;bluetooth-address&gt; &lt;ip-address&gt;[:port] [ &lt;check-interval&gt; ]</code><br>
  40738. <br>
  40739. The default port is 5111 (presenced). Alternatly you can use port 5222 (collectord)<br>
  40740. <br>
  40741. <u>Example</u><br><br>
  40742. <code>define iPhone PRESENCE lan-bluetooth 0a:4f:36:d8:f9:89 127.0.0.1:5222</code><br><br>
  40743. <u>presenced</u><br><br>
  40744. <ul>The presence is a perl network daemon, which provides presence checks of multiple bluetooth devices over network.
  40745. It listens on TCP port 5111 for incoming connections from a FHEM PRESENCE instance or a running collectord.<br>
  40746. <PRE>
  40747. Usage:
  40748. presenced [-d] [-p &lt;port&gt;] [-P &lt;filename&gt;]
  40749. presenced [-h | --help]
  40750. Options:
  40751. -p, --port
  40752. TCP Port which should be used (Default: 5111)
  40753. -P, --pid-file
  40754. PID file for storing the local process id (Default: /var/run/presenced.pid)
  40755. -d, --daemon
  40756. detach from terminal and run as background daemon
  40757. -v, --verbose
  40758. Print detailed log output
  40759. -h, --help
  40760. Print detailed help screen
  40761. </PRE>
  40762. It uses the hcitool command (provided by a <a href="http://www.bluez.org" target="_new">bluez</a> installation)
  40763. to make a paging request to the given bluetooth address (like 01:B4:5E:AD:F6:D3). The devices must not be visible, but
  40764. still activated to receive bluetooth requests.<br><br>
  40765. If a device is present, this is send to FHEM, as well as the device name as reading.<br><br>
  40766. The presenced is available as:<br><br>
  40767. <ul>
  40768. <li>direct perl script file: <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/presenced" target="_new">presenced</a></li>
  40769. <li>.deb package for Debian (noarch): <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/deb/presenced-1.4.deb" target="_new">presenced-1.4.deb</a></li>
  40770. <li>.deb package for Raspberry Pi (raspbian): <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/deb/presenced-rpi-1.4.deb" target="_new">presenced-rpi-1.4.deb</a></li>
  40771. </ul>
  40772. </ul><br><br>
  40773. <u>lepresenced</u><br><br>
  40774. <ul>lepresenced is a Perl network daemon that provides presence checks of
  40775. multiple bluetooth devices over network. In contrast to presenced,
  40776. lepresenced covers <u>Bluetooth 4.0 (low energy) devices, i. e.
  40777. Gigaset G-Tags, FitBit Charges.</u>
  40778. lepresenced listens on TCP port 5333 for connections of a PRESENCE definition
  40779. or collectord.<br>
  40780. <PRE>
  40781. Usage:
  40782. lepresenced --bluetoothdevice &lt;bluetooth device&gt; --listenaddress &lt;listen address&gt; --listenport &lt;listen port&gt; --loglevel &lt;log level&gt; --daemon
  40783. lepresenced -b &lt;bluetooth device&gt; -a &lt;listen address&gt; -p &lt;listen port> -l &lt;log level&gt; -d
  40784. valid log levels:
  40785. LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG. Default: LOG_INFO
  40786. Examples:
  40787. lepresenced --bluetoothdevice hci0 --listenaddress 127.0.0.1 --listenport 5333 --daemon
  40788. lepresenced --loglevel LOG_DEBUG --daemon
  40789. </PRE>
  40790. To detect the presence of a device, it uses the command <i>hcitool lescan</i> (package:
  40791. <a href="http://www.bluez.org" target="_new">bluez</a>) to continuously listen to
  40792. beacons of Bluetooth LE devices.
  40793. <br><br>
  40794. If a device is present, this is send to FHEM, as well as the device name as reading.<br><br>
  40795. The presenced is available as:<br><br>
  40796. <ul>
  40797. <li>Perl script: <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/lepresenced" target="_new">lepresenced</a></li>
  40798. <li>.deb package (noarch): <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/deb/" target="_new">contrib/PRESENCE/deb/</a></li>
  40799. </ul>
  40800. </ul><br><br>
  40801. <u>collectord</u><br><br>
  40802. <ul>
  40803. The collectord is a perl network daemon, which handles connections to several presenced installations to search for multiple bluetooth devices over network.<br><br>
  40804. It listens on TCP port 5222 for incoming connections from a FHEM presence instance.
  40805. <PRE>
  40806. Usage:
  40807. collectord -c &lt;configfile&gt; [-d] [-p &lt;port&gt;] [-P &lt;pidfile&gt;]
  40808. collectord [-h | --help]
  40809. Options:
  40810. -c, --configfile &lt;configfile&gt;
  40811. The config file which contains the room and timeout definitions
  40812. -p, --port
  40813. TCP Port which should be used (Default: 5222)
  40814. -P, --pid-file
  40815. PID file for storing the local process id (Default: /var/run/collectord.pid)
  40816. -d, --daemon
  40817. detach from terminal and run as background daemon
  40818. -v, --verbose
  40819. Print detailed log output
  40820. -l, --logfile &lt;logfile&gt;
  40821. log to the given logfile
  40822. -h, --help
  40823. Print detailed help screen
  40824. </PRE>
  40825. Before the collectord can be used, it needs a config file, where all different rooms, which have a presenced detector, will be listed. This config file looks like:
  40826. <br><br>
  40827. <PRE>
  40828. # room definition
  40829. # ===============
  40830. #
  40831. [room-name] # name of the room
  40832. address=192.168.0.10 # ip-address or hostname
  40833. port=5111 # tcp port which should be used (5111 is default)
  40834. presence_timeout=120 # timeout in seconds for each check when devices are present
  40835. absence_timeout=20 # timeout in seconds for each check when devices are absent
  40836. [living room]
  40837. address=192.168.0.11
  40838. port=5111
  40839. presence_timeout=180
  40840. absence_timeout=20
  40841. </PRE>
  40842. If a device is present in any of the configured rooms, this is send to FHEM, as well as the device name as reading and the room which has detected the device.<br><br>
  40843. The collectord is available as:<br><br>
  40844. <ul>
  40845. <li>direct perl script file: <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/collectord" target="_new">collectord</a></li>
  40846. <li>.deb package for Debian (noarch): <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/deb/collectord-1.7.deb" target="_new">collectord-1.7.deb</a></li>
  40847. </ul>
  40848. </ul><br><br>
  40849. </ul>
  40850. <br>
  40851. <a name="PRESENCEset"></a>
  40852. <b>Set</b>
  40853. <ul>
  40854. <li><b>statusRequest</b> - Schedules an immediatly check.</li>
  40855. <li><b>power</b> - Executes the given power command which is set as attribute to power (on or off) the device (only when attribute "powerCmd" is set)</li>
  40856. </ul>
  40857. <br>
  40858. <a name="PRESENCEget"></a>
  40859. <b>Get</b>
  40860. <ul>
  40861. N/A
  40862. </ul>
  40863. <br>
  40864. <a name="PRESENCE_attr"></a>
  40865. <b>Attributes</b><br><br>
  40866. <ul>
  40867. <li><a href="#do_not_notify">do_not_notify</a></li>
  40868. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  40869. <li><a name="PRESENCE_disable">disable</a></li>
  40870. If this attribute is activated, an active check will be disabled.<br><br>
  40871. Possible values: 0 => not disabled , 1 => disabled<br>
  40872. Default Value is 0 (not disabled)<br><br>
  40873. <li><a name="PRESENCE_absenceThreshold">absenceThreshold</a></li><br> <i>(Not in Mode "event" applicable)</i><br>
  40874. The number of checks that have to result in "absent" before the state of the PRESENCE definition is changed to "absent".
  40875. This can be used to verify the absence of a device with multiple check runs before the state is finally changed to "absent".
  40876. If this attribute is set to a value &gt;1, the reading state and presence will be set to "maybe absent" during the absence verification.<br><br>
  40877. Default Value is 1 (no absence verification)<br><br>
  40878. <li><a name="PRESENCE_presenceThreshold">presenceThreshold</a></li><br> <i>(Not in Mode "event" applicable)</i><br>
  40879. The number of checks that have to result in "present" before the state of the PRESENCE definition is changed to "present".
  40880. This can be used to verify the permanent presence of a device with multiple check runs before the state is finally changed to "present".
  40881. If this attribute is set to a value &gt;1, the reading state and presence will be set to "maybe present" during the presence verification.<br><br>
  40882. Default Value is 1 (no presence verification)<br><br>
  40883. <li><a name="PRESENCE_absenceTimeout">absenceTimeout</a></li><br> <i>(Only in Mode "event" applicable)</i><br>
  40884. The timeout after receiving an "absent" event, before the state of the PRESENCE definition is switched to "absent".
  40885. This can be used to verify the permanent absence by waiting a specific time frame to not receive an "present" event.
  40886. If this timeout is reached with no "present" event received in the meantime, the presence state will finally be set to "absent".
  40887. The timeout is given in HH:MM:SS format, where hours and minutes are optional.
  40888. If this attribute is set to a valid value, the reading state and presence will be set to "maybe absent" during the absence verification.<br><br>
  40889. Default Value is 0 (no absence verification)<br><br>
  40890. <li><a name="PRESENCE_presenceTimeout">presenceTimeout</a></li><br> <i>(Only in Mode "event" applicable)</i><br>
  40891. The timeout after receiving an "present" event, before the state of the PRESENCE definition is switched to "present".
  40892. This can be used to verify the permanent presence by waiting a specific time frame to not receive an "absent" event.
  40893. If this timeout is reached with no "absent" event received in the meantime, the presence state will finally be set to "present".
  40894. The timeout is given in HH:MM:SS format, where hours and minutes are optional.
  40895. If this attribute is set to a valid value, the reading state and presence will be set to "maybe present" during the presence verification.<br><br>
  40896. Default Value is 0 (no presence verification)<br><br>
  40897. <li><a name="PRESENCE_ping_count">ping_count</a></li> (Only in Mode "ping" applicable)<br>
  40898. Changes the count of the used ping packets to recognize a present state. Depending on your network performance sometimes a packet can be lost or blocked.<br><br>
  40899. Default Value is 4 (packets)<br><br>
  40900. <li><a name="PRESENCE_bluetooth_hci_device">bluetooth_hci_device</a></li> (Only in Mode "local-bluetooth" applicable)<br>
  40901. Set a specific bluetooth HCI device to use for scanning. If you have multiple bluetooth modules connected, you can select a specific one to use for scanning (e.g. hci0, hci1, ...).<br><br>
  40902. <li><a name="PRESENCE_fritzbox_speed">fritzbox_speed</a></li> (Only in Mode "fritzbox" applicable)<br>
  40903. When this attribute is enabled, the network speed is checked in addition to the device state.<br>
  40904. This only makes sense for wireless devices connected directly to the FritzBox.
  40905. <br><br>
  40906. Possible values: 0 => do not check speed, 1 => check speed when device is active<br>
  40907. Default value is 0 (no speed check)
  40908. <br><br>
  40909. <li><a name="PRESENCE_powerCmd">powerCmd</a></li><br>
  40910. Define a FHEM command, which powers on or off the device.<br><br>
  40911. When executing the powerCmd (set command: power) following placeholders will be replaced by there corresponding values:<br><br>
  40912. <ul>
  40913. <li><code>$NAME</code> - name of the PRESENCE definition</li>
  40914. <li><code>$ADDRESS</code> - the address of the PRESENCE definition as given in the define statement</li>
  40915. <li><code>$ARGUMENT</code> - the argument given to the power set command (e.g. "on" or "off)</li>
  40916. </ul>
  40917. <br>
  40918. Example FHEM commands:<br><br>
  40919. <ul>
  40920. <li><code>set PowerSwitch_1 on</code></li>
  40921. <li><code>set PowerSwitch_1 $ARGUMENT</code></li>
  40922. <li><code>"/opt/power_on.sh $ADDRESS"</code></li>
  40923. <li><code>{powerOn("$ADDRESS", "username", "password")}</code></li>
  40924. </ul>
  40925. </ul>
  40926. <br>
  40927. <a name="PRESENCEevents"></a>
  40928. <b>Generated Events:</b><br><br>
  40929. <ul>
  40930. <u>General Events:</u><br><br>
  40931. <ul>
  40932. <li><b>state</b>: (absent|maybe absent|present|disabled|error|timeout) - The state of the device, check errors or "disabled" when the <a href="#PRESENCE_disable">disable</a> attribute is enabled</li>
  40933. <li><b>presence</b>: (absent|maybe absent|present) - The state of the device. The value "maybe absent" only occurs if <a href="#PRESENCE_absenceThreshold">absenceThreshold</a> is activated.</li>
  40934. <li><b>powerCmd</b>: (executed|failed) - power command was executed or has failed</li>
  40935. </ul><br><br>
  40936. <u>Bluetooth specific events:</u><br><br>
  40937. <ul>
  40938. <li><b>device_name</b>: $name - The name of the Bluetooth device in case it's present</li>
  40939. </ul><br><br>
  40940. <u>presenced/collectord specific events:</u><br><br>
  40941. <ul>
  40942. <li><b>command_accepted</b>: $command_accepted (yes|no) - Was the last command acknowleged and accepted by the presenced or collectord?</li>
  40943. <li><b>room</b>: $room - If the module is connected with a collector daemon this event shows the room, where the device is located (as defined in the collectord config file)</li>
  40944. </ul>
  40945. </ul>
  40946. </ul>
  40947. <a name="PROPLANTA"></a>
  40948. <h3>PROPLANTA</h3>
  40949. <div>
  40950. <ul>
  40951. The module extracts weather data from <a href="http://www.proplanta.de">www.proplanta.de</a>.
  40952. <br>
  40953. The website provides a forecast for 12 days, for the first 7 days in a 3-hours-interval.
  40954. <br>
  40955. This modul causes a high CPU load. It is recommended to reduce the number of captured forecast days.
  40956. <br>
  40957. It uses the perl moduls HTTP::Request, LWP::UserAgent and HTML::Parse.
  40958. <br/><br/>
  40959. <a name="PROPLANTAdefine"></a>
  40960. <b>Define</b>
  40961. <ul>
  40962. <br>
  40963. <code>define &lt;name&gt; PROPLANTA [City] [CountryCode]</code>
  40964. <br>
  40965. Example:
  40966. <br>
  40967. <code>define wetter PROPLANTA Bern ch</code>
  40968. <br>
  40969. <code>define wetter PROPLANTA Wittingen+(Niedersachsen)</code>
  40970. <br>&nbsp;
  40971. <li><code>[City]</code>
  40972. <br>
  40973. Optional. The city must be selectable on <a href="http://www.proplanta.de">www.proplanta.de</a>.
  40974. <br>
  40975. Please pay attention to the <b>Capital</b> letters in the city names.
  40976. Spaces within the name are replaced by a + (plus).
  40977. </li><br>
  40978. <li><code>[CountryCode]</code>
  40979. <br>
  40980. Optional. Possible values: de (default), at, ch, fr, it
  40981. </li><br>
  40982. The function <code>PROPLANTA_Html</code> creates a HTML code for a weather forecast for the given days (default is 3).
  40983. <br>
  40984. Example:
  40985. <br>
  40986. <code>define HTMLForecast weblink htmlCode { PROPLANTA_Html("ProPlanta_Wetter"[, days])}</code>
  40987. <br/><br/>
  40988. </ul>
  40989. <br>
  40990. <a name="PROPLANTAset"></a>
  40991. <b>Set</b>
  40992. <ul>
  40993. <br>
  40994. <li><code>set &lt;name&gt; update</code>
  40995. <br>
  40996. The weather data are immediately polled from the website.
  40997. </li><br>
  40998. </ul>
  40999. <br>
  41000. <a name="PROPLANTAattr"></a>
  41001. <b>Attributes</b>
  41002. <ul>
  41003. <br>
  41004. <li><code>forecastDays &lt;4-14&gt;</code>
  41005. <br>
  41006. Number of days for which the forecast data shall be fetched. Default is 14 days (incl. today).
  41007. </li><br>
  41008. <li><code>INTERVAL &lt;seconds&gt;</code>
  41009. <br>
  41010. Poll interval for weather data in seconds (default 3600 = 1 hour)
  41011. </li><br>
  41012. <li><code>URL &lt;internet address&gt;</code>
  41013. <br>
  41014. URL to extract information from. Overwrites the values in the 'define' term.
  41015. </li><br>
  41016. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  41017. </ul>
  41018. <br>
  41019. <a name="PROPLANTAreading"></a>
  41020. <b>Forecast readings</b>
  41021. <ul>
  41022. <br>
  41023. <li><b>fc</b><i>0|1|2|3|...|13</i><b>_...</b> - forecast values for <i>today|tommorrow|in 2|3|...|13 days</i></li>
  41024. <li><b>fc</b><i>0</i><b>_...<i>00|03|06|09|12|15|18|21</i></b> - forecast values for <i>today</i> at <i>00|03|06|09|12|15|18|21</i> o'clock</li>
  41025. <li><b>fc</b><i>0</i><b>_chOfRain</b><i>Day|Night</i> - chance of rain <i>today</i> by <i>day|night</i> in %</li>
  41026. <li><b>fc</b><i>0</i><b>_chOfRain</b><i>15</i> - chance of rain <i>today</i> at <i>15:00</i> in %</li>
  41027. <li><b>fc</b><i>0</i><b>_cloud</b><i>15</i> - cloud coverage <i>today</i> at <i>15:00</i> in %</li>
  41028. <li><b>fc</b><i>0</i><b>_dew</b> - dew formation <i>today</i> (0=none, 1=small, 2=medium, 3=strong)</li>
  41029. <li><b>fc</b><i>0</i><b>_evapor</b> - evaporation <i>today</i> (0=none, 1=small, 2=medium, 3=strong)</li>
  41030. <li><b>fc</b><i>0</i><b>_frost</b> - ground frost <i>today</i> (0=no, 1=yes)</li>
  41031. <li><b>fc</b><i>0</i><b>_moon</b><i>Rise|Set</i> - moon <i>rise|set today</i></li>
  41032. <li><b>fc</b><i>0</i><b>_rad</b> - global radiation <i>today</i></li>
  41033. <li><b>fc</b><i>0</i><b>_rain</b><i>15</i> - amount of rainfall <i>today</i> at <i>15:00</i> o'clock in mm</li>
  41034. <li><b>fc</b><i>0</i><b>_sun</b> - relative sun shine duration <i>today</i> in % (between sun rise and set)</li>
  41035. <li><b>fc</b><i>0</i><b>_temp</b><i>Min|Max</i> - <i>minimal|maximal</i> temperature <i>today</i> in &deg;C</li>
  41036. <li><b>fc</b><i>0</i><b>_temp</b><i>15</i> - temperatur <i>today</i> at <i>15:00</i> o'clock in &deg;C</li>
  41037. <li><b>fc</b><i>0</i><b>_uv</b> - UV-Index <i>today</i></li>
  41038. <li><b>fc</b><i>0</i><b>_weather</b><i>Morning|Day|Evening|Night</i> - weather situation <i>today morning|during day|in the evening|during night</i></li>
  41039. <li><b>fc</b><i>0</i><b>_weather</b><i>Day</i><b>Icon</b> - icon of weather situation <i>today</i> by <i>day</i></li>
  41040. <li><b>fc</b><i>0</i><b>_wind</b><i>15</i> - wind speed <i>today</i> at <i>15</i>:00 Uhr in km/h</li>
  41041. <li><b>fc</b><i>0</i><b>_windDir</b><i>15</i> - wind direction <i>today</i> at <i>15</i>:00 Uhr in &deg;</li>
  41042. <li>etc.</li>
  41043. </ul>
  41044. <br>
  41045. </ul>
  41046. </div>
  41047. <a name="PWM"></a>
  41048. <h3>PWM</h3>
  41049. <ul>
  41050. <table>
  41051. <tr><td>
  41052. The PMW module implements temperature regulation for heating systems only capeable of switching on/off.<br><br>
  41053. PWM is based on Pulse Width Modulation which means valve position 70% is implemented in switching the device on for 70% and off for 30% in a given timeframe.<br>
  41054. PWM defines a calculation unit and depents on objects based on PWMR which define the rooms to be heated.<br>
  41055. <br>
  41056. </td></tr>
  41057. </table>
  41058. <b>Define</b>
  41059. <ul>
  41060. <code>define &lt;name&gt; PWM [&lt;interval&gt;] [&lt;cycletime&gt;] [&lt;minonofftime&gt;] [&lt;maxPulse&gt;] [&lt;maxSwitchOnPerCycle&gt;,&lt;maxSwitchOffPerCycle&gt;] [&lt;roomStayOn&gt;,&lt;roomStayOff&gt;,&lt;stayOnThreshold&gt;] [&lt;overallHeatingSwitch&gt;[,&lt;pulseThreshold&gt;[,&lt;followUpTime&gt;[,&lt;h_regexp_on&gt;[,&lt;delayTimeOn&gt;]]]]]<br></code>
  41061. <br>
  41062. eg. define fb PWM 60 900 120 1 99,99 0,0,0 pumpactor<br>
  41063. <br>
  41064. Define a calculation object with the following parameters:<br>
  41065. <ul>
  41066. <li>interval<br>
  41067. Calculate the pulses every <i>interval</i> seconds. Default is 60 seconds.<br>
  41068. </li>
  41069. <li>cycletime<br>
  41070. Timeframe to which the pulses refere to. Default is 900 seconds (=15 Minutes). "valve position" of 100% calculates to "on" for this period.<br>
  41071. </li>
  41072. <li>minonofftime<br>
  41073. Default is 120 seconds.
  41074. Floor heating systems are driven by thermomechanic elements which react very slow. on/off status changes for lower periods are ignored.<br>
  41075. </li>
  41076. <li>maxPulse<br>
  41077. Default is 1, which means that a device can be switched on for the full <i>cylcetime</i> period.<br>
  41078. For energy saving reasons it may be wanted to prevent situations were all rooms are switched on (high energy usage) and afterwards off.<br>
  41079. In this case <i>maxPulse</i> is set to 0.85 (=12:45 minutes) which forces a room with a pulse of 1 (=100%) to be switched off after 12:45 minutes to give another
  41080. room the chance to be switched on.
  41081. <br>
  41082. </li>
  41083. <li>maxSwitchOnPerCycle,maxSwitchoffPerCycle<br>
  41084. Defaults are 99 for both values. This means that 99 PWMR object can be switched on or off at the same time.<br>
  41085. To prevent energy usage peaks followend by "no energy consumption" situations set both values to "1".<br>
  41086. This means after the room the the least energy required is switched off the next will be switched off.<br>
  41087. Rooms are switched on or off one after the other (in <interval> cycles) and not all at one time.<br>
  41088. Waiting times are honored by a addon to the pulse.<br>
  41089. <br>
  41090. </li>
  41091. <li>roomStayOn,roomStayOff,stayOnThreshold<br>
  41092. Defauts: <br>
  41093. <i>roomStayOn</i> = 0 ... all rooms can be switched off at the same time.<br>
  41094. <i>roomStayOff</i> = 0 ... all rooms can be switched on at the same time.<br>
  41095. <i>stayOnThreshold</i> = 0 ... no impact.<br>
  41096. For energy saving reasons the following may be set: "4,1,0.25". This means:<br>
  41097. The room with the least pulse will be kept off (<i>roomsStayOff</i>=1)<br>
  41098. If the average pulse for the (<i>roomsStayOn</i>=4) rooms with the most heating required is greater than (<i>stayOnThreshold</i>=0.25) then <i>maxRoomStayOn</i> will be kept in state "on", even if the time for the current pulse is reached.
  41099. If the threshold is not reached (not so much heating required) then all rooms can be switched off at the same time.<br>
  41100. <br>
  41101. </li>
  41102. <li>&lt;overallHeatingSwitch&gt[,&lt;pulseThreshold&gt[,&lt;followUpTime&gt;[,&lt;regexp_on&gt;[,&lt;delayTimeOn&gt;]]]]<br>
  41103. Universal switch to controll eg. pumps or the heater itself. It will be set to "off" if no heating is required and otherwise "on".<br>
  41104. <i>pulseThreshold</i> defines a threshold which is applied to reading <i>pulseMax</i>, <i>pulseSum</i>, <i>pulseAvg</i>, <i>pulseAvg2</i> or <i>pulseAvg3</i> of the PWM object to decide if heating is required. If (calculated pulse > threshold) then actor is set to "on", otherwise "off".<br>
  41105. If <i>pulseThreshold</i> is set to 0 (or is not defined) then the decision is based on <i>roomsOn</i>. If (roomsOn > 0) then actor is set to "on", otherwise "off".<br>
  41106. <i>followUpTime</i> defines a number of seconds which is used to delay the status change from "on" to "off". This can be used to prevent a toggling switch.<br>
  41107. <i>regexp_on</i> defines a regular expression to be applied to the state of the actor. Default is "on". If state matches the regular expression it is handled as "on", otherwise "off".<br>
  41108. <i>delayTimeOn</i> defines a number of seconds which is used to delay the status change from "off" to "on". This can be used to give the valves time to open before switching..<br>
  41109. The pulse used for comparision is defined by attribute <i>overallHeatingSwitchRef</i>. Default is <i>maxPulse</i>.<br>
  41110. <br>
  41111. </li>
  41112. </ul>
  41113. <br>
  41114. Example:<br>
  41115. <br>
  41116. <code>define fh PWM</code>
  41117. <br>which is equal to<br>
  41118. <code>define fh PWM 60 900 120 1 99,99 0,0,0</code>
  41119. <br>Energy saving definition might be<br>
  41120. <code>define fh PWM 60 900 120 0.85 1,1 4,1,0.25</code>
  41121. <br><br>
  41122. </ul>
  41123. <br>
  41124. <b>Set </b>
  41125. <ul>
  41126. <li>cycletime<br>
  41127. Temporary change of parameter <i>cycletime</i>.
  41128. </li><br>
  41129. <li>interval<br>
  41130. Temporary change of parameter <i>interval</i>.
  41131. </li><br>
  41132. <li>recalc<br>
  41133. Cause recalculation that normally appeary every <i>interval</i> seconds.
  41134. </li><br>
  41135. </ul>
  41136. <b>Get</b>
  41137. <ul>
  41138. <li>status<br>
  41139. Retrieve content of variable <i>STATE</i>.
  41140. </li><br>
  41141. <li>timers<br>
  41142. Retrieve values from the readings "timer?_??" from the attached rooms..<br>
  41143. The readings define start and end times for different room temperatures.<br>
  41144. This funktion will retrieve the first start and the last end time. <i>STATE</i>.
  41145. </li><br>
  41146. </ul>
  41147. <br>
  41148. <b>Attributes</b>
  41149. <ul>
  41150. <li>disable<br>
  41151. Set to 1 will disable all calculations and STATE will be set to "disabled".<br>
  41152. </li><br>
  41153. <li>valveProtectIdlePeriod<br>
  41154. Protect Valve by switching on actor for 300 seconds.<br>
  41155. After <i>valveProtectIdlePeriod</i> number of days without switching the valve the actor is set to "on" for 300 seconds.
  41156. overallHeatingSwitch is not affected.
  41157. </li><br>
  41158. <li>overallHeatingSwitchRef<br>
  41159. Defines which reading is used for threshold comparision for <i>OverallHeatingSwitch</i> calculation. Possible values are:<br>
  41160. <i>pulseMax</i>,
  41161. <i>pulseSum</i>,
  41162. <i>pulseAvg</i>,
  41163. <i>pulseAvg2</i>,
  41164. <i>pulseAvg3</i>,
  41165. <i>avgPulseRoomsOn</i><br>
  41166. pulseAvg is an average pulse of all rooms which should be switched to "on".<br>
  41167. pulseAvg2 and pulseAvg3 refer to the 2 or 3 romms with highest pulses.
  41168. </li><br>
  41169. <li>overallHeatingSwitchThresholdTemp<br>
  41170. Defines a reading for a temperature and a maximum value that prevents the overallHeatingSwitch from switching to "on".<br>
  41171. Value has the following format: tsensor[:reading[:t_regexp]],maxValue.<br>
  41172. <i>tsensor</i> defines the temperature sensor for the actual temperature.<br>
  41173. <i>reading</i> defines the reading of the temperature sensor. Default is "temperature"<br>
  41174. <i>t_regexp</i> defines a regular expression to be applied to the reading. Default is '(\d[\d\.]+)'.<br>
  41175. if <i>maxValue</i> is reached as a temperature from tsensor then overallHeatingSwitch will not be switch to "on".<br>
  41176. Example: tsensor,44 or tsensor:temperature,44 or tsensor:temperature:(\d+).*,44<br>
  41177. The reading OverallHeatingSwitchTT_Off will be set to 1 if temperature from tsensor prevents <i>overallHeatingSwitch</i> from switching to "on".<br>
  41178. Please be aware that temperatures raising to high will seriously harm your heating system and this parameter should not be used as the only protection feature.<br>
  41179. Using this parameter is on your own risk. Please test your settings very carefully.<br>
  41180. </li>
  41181. </ul>
  41182. <br>
  41183. </ul>
  41184. <a name="PWMR"></a>
  41185. <h3>PWMR</h3>
  41186. <ul>
  41187. <table>
  41188. <tr><td>
  41189. The PMWR module defines rooms to be used for calculation within module PWM.<br><br>
  41190. PWM is based on Pulse Width Modulation which means valve position 70% is implemented in switching the device on for 70% and off for 30% in a given timeframe.<br>
  41191. PWM defines a calculation unit and depents on objects based on PWMR which define the rooms to be heated.<br>
  41192. PWMR objects calculate a desired temperature for a room based on several rules, define windows, a temperature sensor and an actor to be used to switch on/off heating.
  41193. <br>
  41194. </td></tr>
  41195. </table>
  41196. <b>Define</b>
  41197. <ul>
  41198. <code>define &lt;name&gt; PWMR &lt;IODev&gt; &lt;factor[,offset]&gt; &lt;tsensor[:reading:[t_regexp]]&gt; &lt;actor&gt;[:&lt;a_regexp_on&gt;] [&lt;window|dummy&gt;[,&lt;window&gt;[:&lt;w_regexp&gt;]] [ &lt;usePID=0&gt; | &lt;usePID=1&gt;:&lt;PFactor&gt;:&lt;IFactor&gt;[,&lt;ILookBackCnt&gt;]:&lt;DFactor&gt;[,&lt;DLookBackCnt&gt;] | &lt;usePID=2&gt;:&lt;PFactor&gt;:&lt;IFactor&gt;:&lt;DFactor&gt[,&lt;DLookBackCnt&gt;] ] <br></code>
  41199. <br>
  41200. Define a calculation object with the following parameters:<br>
  41201. <ul>
  41202. <li>IODev<br>
  41203. Reference to an object of TYPE PWM. This object will switch on/off heating.<br>
  41204. </li>
  41205. <li>factor[,offset]<br>
  41206. Pulse for PWM will be calculated as ((delta-temp * factor) ** 2) + offset.<br>
  41207. <i>offset</i> defaults to 0.11<br>
  41208. <i>factor</i> can be used to weight rooms.<br>
  41209. </li>
  41210. <li>tsensor[:reading[:t_regexp]]<br>
  41211. <i>tsensor</i> defines the temperature sensor for the actual room temperature.<br>
  41212. <i>reading</i> defines the reading of the temperature sensor. Default is "temperature"<br>
  41213. <i>t_regexp</i> defines a regular expression to be applied to the reading. Default is '(\d[\d\.]+)'.<br>
  41214. </li>
  41215. <li>actor[:&lt;a_regexp_on&gt;]<br>
  41216. The actor will be set to "on" of "off" to turn on/off heating.<br>
  41217. <i>a_regexp_on</i> defines a regular expression to be applied to the state of the actor. Default is 'on". If state matches the regular expression it is handled as "on", otherwise "off"<br>
  41218. </li>
  41219. <li>&lt;window|dummy&gt;[,&lt;window&gt;[:&lt;w_regexp&gt;]<br>
  41220. <i>window</i> defines several window devices that can prevent heating to be turned on.<br>
  41221. If STATE matches the regular expression then the desired-temp will be decreased to frost-protect temperature.<br>
  41222. 'dummy' can be used as a neutral value for window and will be ignored when processing the configuration.<br>
  41223. <i>w_regexp</i> defines a regular expression to be applied to the reading. Default is '.*Open.*'.<br>
  41224. </li>
  41225. <li>
  41226. <code>&lt;usePID=0&gt;</code><br>
  41227. <i>usePID 0</i>: calculate Pulse based on parameters factor and offset.<br>
  41228. Internals c_factor and c_foffset will reflect the values used for calculatio. Defaults are 1 and 0.11 (if not specified)<br>
  41229. Readings PWMOnTime and PWMPulse will reflect the actual calculated Pulse.<br>
  41230. </li>
  41231. <li>
  41232. <code>&lt;usePID=1&gt;:&lt;PFactor&gt;:&lt;IFactor&gt;[,&lt;ILookBackCnt&gt;]:&lt;DFactor&gt;[,&lt;DLookBackCnt&gt;]</code><br>
  41233. <i>PFactor</i>: Konstant for P. Default is 0.8.<br>
  41234. <i>IFactor</i>: Konstant for I. Default is 0.3<br>
  41235. <i>DFactor</i>: Konstant for D. Default is 0.5<br>
  41236. <i>ILookBackCnt</i>: Buffer size to store previous temperatures. For I calculation all values will be used. Default is 5.<br>
  41237. <i>DLookBackCnt</i>: Buffer size to store previous temperatures. For D calculation actual and oldest temperature will be used. Default is 10.<br>
  41238. Internals c_PID_PFactor, c_PID_IFactor, c_PID_ILookBackCnt, c_PID_DFactor, c_PID_DLookBackCnt and c_PID_useit will reflect the above configuration values.<br>
  41239. Readings PID_DVal, PID_IVal, PID_PVal, PID_PWMOnTime and PID_PWMPulse will reflect the actual calculated PID values and Pulse.<br>
  41240. </li>
  41241. <li>
  41242. <code>&lt;usePID=2&gt;:&lt;PFactor&gt;:&lt;IFactor&gt;:&lt;DFactor&gt;[,&lt;DLookBackCnt&gt;]</code><br>
  41243. <i>PFactor</i>: Konstant for P. Default is 0.8.<br>
  41244. <i>IFactor</i>: Konstant for I. Default is 0.01<br>
  41245. <i>DFactor</i>: Konstant for D. Default is 0<br>
  41246. <i>DLookBackCnt</i>: Buffer size to store previous temperatures. For D calculation actual and oldest temperature will be used. Default is 10.<br>
  41247. Internals c_PID_PFactor, c_PID_IFactor, c_PID_DFactor, c_PID_DLookBackCnt and c_PID_useit will reflect the above configuration values.<br>
  41248. Readings PID_DVal, PID_IVal, PID_PVal, PID_PWMOnTime and PID_PWMPulse will reflect the actual calculated PID values and Pulse.<br>
  41249. </li>
  41250. </ul>
  41251. <br>
  41252. Example:<br>
  41253. <br>
  41254. <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen</code><br>
  41255. <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen windowKitchen1,windowKitchen2</code><br>
  41256. <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen windowKitchen1,windowKitchen2:.*Open.*</code><br>
  41257. <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen windowKitchen1,windowKitchen2</code><br>
  41258. <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen dummy 0</code><br>
  41259. <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 1:0.8:0.3:0.5</code><br>
  41260. <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 1:0.8:0.3,5:0.5,10</code><br>
  41261. <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 2:0.8:0.01:00</code><br>
  41262. <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 2:0.8:0.01:0.1,10</code><br>
  41263. <br>
  41264. </ul>
  41265. <br>
  41266. <b>Set </b>
  41267. <ul>
  41268. <li>factor<br>
  41269. Temporary change of parameter <i>factor</i>.
  41270. </li><br>
  41271. <li>actor<br>
  41272. Set the actor state for this room to <i>on</i> or <i>off</i>. This is only a temporary change that will be overwritten by PWM object.
  41273. </li><br>
  41274. <li>desired-temp<br>
  41275. If <i>desired-temp</i> is automatically calculated (attribute <i>autoCalcTemp</i> not set or 1) then the desired temperature is set for a defined time.<br>
  41276. Default for this period is 60 minutes, but it can be changed by attribute <i>autoCalcTemp</i>.<br>
  41277. If <i>desired-temp</i> is not automatically calculated (attribute <i>autoCalcTemp</i> is 0) then this will set the actual target temperature.<br>
  41278. </li><br>
  41279. <li>manualTempDuration<br>
  41280. Define the period how long <i>desired-temp</i> manually set will be valid. Default is 60 Minutes.<br>
  41281. </li><br>
  41282. <li>interval<br>
  41283. Temporary change <i>INTERVAL</i> which defines how often <i>desired-temp</i> is calculated in autoCalcMode. Default is 300 seconds (5:00 Minutes).
  41284. </li><br>
  41285. <li>frostProtect<br>
  41286. Sets attribute frostProtect to 1 (on) or 0 (off).
  41287. </li><br>
  41288. </ul>
  41289. <b>Get </b>
  41290. <ul>
  41291. <li>previousTemps<br>
  41292. Get conent of buffers defined by <i>ILookBackCnt</i> and <i>DLookBackCnt</i>.
  41293. </li><br>
  41294. </ul>
  41295. <b>Attributes</b>
  41296. <ul>
  41297. <li>disable<br>
  41298. PWMR objects with attribute disable set to <i>1</i> will be excluded in the calculation loop of the PWM object.
  41299. </li><br>
  41300. <li>frostProtect<br>
  41301. Switch on (1) of off (0) frostProtectMode. <i>desired-temp</i> will be set to <i>tempFrostProtect</i> in autoCalcMode.
  41302. </li><br>
  41303. <li>autoCalcTemp<br>
  41304. Switch on (1) of off (0) autoCalcMode. <i>desired-temp</i> will be set based on the below temperatures and rules in autoCalcMode.<br>
  41305. Default is on.
  41306. </li><br>
  41307. <li>tempDay<br>
  41308. Define day temperature. This will be referenced as "D" in the rules.
  41309. </li><br>
  41310. <li>tempNight<br>
  41311. Define night temperature. This will be referenced as "N" in the rules.
  41312. </li><br>
  41313. <li>tempCosy<br>
  41314. Define cosy temperature. This will be referenced as "C" in the rules.
  41315. </li><br>
  41316. <li>tempEnergy<br>
  41317. Define energy saving temperature. This will be referenced as "E" in the rules.
  41318. </li><br>
  41319. <li>tempFrostProtect<br>
  41320. Define temperature for frostProtectMode. See also <i>frostProtect</i>.
  41321. </li><br>
  41322. <li>tempRule1 ... tempRule5<br>
  41323. Rule to calculate the <i>desired-temp</i> in autoCalcMode.<br>
  41324. Format is: &lt;weekday&gt;[-&lt;weekday] &lt;time&gt;,&lt;temperatureSelector&gt;<br>
  41325. weekday is one of Mo,Di,Mi,Do,Fr,Sa,So<br>
  41326. time is in format hh:mm, e.g. 7:00 or 07:00<br>
  41327. temperatureSelector is one of D,N,C,E<br>
  41328. <br>
  41329. Predefined are:<br>
  41330. tempRule1: Mo-Fr 6:00,D 22:00,N<br>
  41331. tempRule2: Sa-So 8:00,D 22:00,N<br>
  41332. This results in tempDay 6:00-22:00 from Monday to Friday and tempNight outside this time window.<br>
  41333. </li><br>
  41334. <li>desiredTempFrom<br>
  41335. This can be used as an alternative instead of the calculation of desired-temp based on the tempRules - which will happen when autoCalcTemp is set to '1'.<br>
  41336. (Either by removing the attribute autoCalcTemp or explicitly setting it to '1'.).<br>
  41337. If set correctly the desired-temp will be read from a reading of another device.<br>
  41338. Format is &lt;device&gt;[:&lt;reading&gt;[:&lt;regexp&gt;]]<br>
  41339. <i>device</i> defines the reference to the other object.<br>
  41340. <i>reading</i> defines the reading that contains the value for desired-temp. Default is 'desired-temp'.<br>
  41341. <i>regexp</i> defines a regular expression to extract the value used for 'desired-temp'. Default is '(\d[\d\.]+)'.
  41342. If <i>regexp</i> does not match (e.g. reading is 'off') then tempFrostProtect is used.<br>
  41343. Internals c_desiredTempFrom reflects the actual setting and d_name, d_reading und d_regexpTemp the values used.<br>
  41344. If this attribute is used then state will change from "Calculating" to "From &lt;device&gt;".<br>
  41345. Calculation of desired-temp is (like when using tempRules) based on the interval specified for this device (default is 300 seconds).
  41346. </li><br>
  41347. <li>valueFormat<br>
  41348. Defines a map to format values within PWMR.<br>
  41349. The following reading can be formated using syntax of sprinf: temperature
  41350. <br>
  41351. Example: { "temperature" => "%0.2f" }
  41352. </li><br>
  41353. </ul>
  41354. <br>
  41355. </ul>
  41356. <a name="PW_Circle"></a>
  41357. <h3>PW_Circles</h3>
  41358. <ul>
  41359. The PW_Circles module is invoked by Plugwise. You need to define a Plugwise-Stick first.
  41360. See <a href="#Plugwise">Plugwise</a>.
  41361. <br>
  41362. <a name="PW_Circle define"></a>
  41363. <br>
  41364. <b>Define</b>
  41365. <ul>
  41366. <code>define &lt;name&gt; PW_Circle &lt;ShortAddress&gt;</code> <br>
  41367. <br>
  41368. <code>&lt;ShortAddress&gt;</code>
  41369. <ul>
  41370. specifies the short (last 4 Bytes) of the Circle received by the Plugwise-Stick. <br>
  41371. </ul>
  41372. <br><br>
  41373. </ul>
  41374. <b>Set</b>
  41375. <ul>
  41376. <code>on / off</code> <br>
  41377. <ul>
  41378. Turns the circle on or off<br><br>
  41379. </ul>
  41380. <code>on-for-timer / off-for-timer sec</code> <br>
  41381. <ul>
  41382. Turns the circle on or off for a given interval<br><br>
  41383. </ul>
  41384. <code>syncTime</code> <br>
  41385. <ul>
  41386. Syncronises the internal clock of the Circle with your PC's clock<br><br>
  41387. </ul>
  41388. <code>removeNode</code> <br>
  41389. <ul>
  41390. Removes this device from your Plugwise-network<br><br>
  41391. </ul>
  41392. <code>ping</code> <br>
  41393. <ul>
  41394. Ping the circle and write the Ping-Runtime to reading "ping" in format "q_in - q_out - pingTime"<br><br>
  41395. </ul>
  41396. <code>status</code> <br>
  41397. <ul>
  41398. Gets the current state of this cirle.<br><br>
  41399. </ul>
  41400. </ul>
  41401. <br><br>
  41402. <b>Attributes</b>
  41403. <ul>
  41404. <code>interval</code> <br>
  41405. <ul>
  41406. specifies the polling time for this circle<br>
  41407. </ul>
  41408. </ul>
  41409. <br><br>
  41410. <b>Example</b> <br>
  41411. <ul><code>define Circle_2907CC9 PW_Circle 2907CC9</code></ul>
  41412. <br>
  41413. <br>
  41414. </ul>
  41415. <a name="PW_Scan"></a>
  41416. <h3>PW_Scan</h3>
  41417. <ul>
  41418. The PW_Scan module is invoked by Plugwise. You need to define a Plugwise-Stick first.
  41419. See <a href="#PW_Scan">PW_Scan</a>.
  41420. <br>
  41421. <a name="PW_Scan define"></a>
  41422. <br>
  41423. <b>Define</b>
  41424. <ul>
  41425. <code>define &lt;name&gt; PW_Scan &lt;ShortAddress&gt;</code> <br>
  41426. <br>
  41427. <code>&lt;ShortAddress&gt;</code>
  41428. <ul>
  41429. specifies the short (last 4 Bytes) of the PW_Scan received by the Plugwise-Stick. <br>
  41430. </ul>
  41431. <br>
  41432. Example: <br>
  41433. <code>define PW_Scan_2907CC9 PW_Scan 2907CC9</code>
  41434. <br>
  41435. </ul>
  41436. <br>
  41437. </ul>
  41438. <a name="PW_Sense"></a>
  41439. <h3>PW_Sense</h3>
  41440. <ul>
  41441. The PW_Sense module is invoked by Plugwise. You need to define a Plugwise-Stick first.
  41442. See <a href="#PW_Sense">PW_Sense</a>.
  41443. <br>
  41444. <a name="PW_Sense define"></a>
  41445. <br>
  41446. <b>Define</b>
  41447. <ul>
  41448. <code>define &lt;name&gt; PW_Sense &lt;ShortAddress&gt;</code> <br>
  41449. <br>
  41450. <code>&lt;ShortAddress&gt;</code>
  41451. <ul>
  41452. specifies the short (last 4 Bytes) of the PW_Sense received by the Plugwise-Stick. <br>
  41453. </ul>
  41454. <br>
  41455. Example: <br>
  41456. <code>define PW_Sense_2907CC9 PW_Sense 2907CC9</code>
  41457. <br>
  41458. </ul>
  41459. <br>
  41460. </ul>
  41461. <a name="PW_Switch"></a>
  41462. <h3>PW_Switch</h3>
  41463. <ul>
  41464. The PW_Switch module is invoked by Plugwise. You need to define a Plugwise-Stick first.
  41465. See <a href="#PW_Switch">PW_Switch</a>.
  41466. <br>
  41467. <a name="PW_Switch define"></a>
  41468. <br>
  41469. <b>Define</b>
  41470. <ul>
  41471. <code>define &lt;name&gt; PW_Switch &lt;ShortAddress&gt;</code> <br>
  41472. <br>
  41473. <code>&lt;ShortAddress&gt;</code>
  41474. <ul>
  41475. specifies the short (last 4 Bytes) of the Circle received by the Plugwise-Stick. <br>
  41476. </ul>
  41477. <br>
  41478. Example: <br>
  41479. <code>define PW_Switch_2907CC9 PW_Switch 2907CC9</code>
  41480. <br>
  41481. </ul>
  41482. <b>Set</b>
  41483. <ul>
  41484. <code>syncTime</code> <br>
  41485. <ul>
  41486. Syncronises the internal clock of the Circle with your PC's clock<br><br>
  41487. </ul>
  41488. <code>removeNode</code> <br>
  41489. <ul>
  41490. Removes this device from your Plugwise-network<br><br>
  41491. </ul>
  41492. <code>ping</code> <br>
  41493. <ul>
  41494. Ping the circle and write the Ping-Runtime to reading "ping" in format "q_in - q_out - pingTime"<br><br>
  41495. </ul>
  41496. </ul>
  41497. <br>
  41498. </ul>
  41499. <a name="PachLog"></a>
  41500. <h3>PachLog</h3>
  41501. <ul>
  41502. The PachLog-Module Logs SensorData like (temperature and humidity) to <a href=http://www.pachube.com>www.pachube.com</a>.
  41503. <br><br>
  41504. Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
  41505. <br><br>
  41506. <a name="PachLogdefine"></a>
  41507. <b>Define</b>
  41508. <ul>
  41509. <br><code>define &lt;name&gt; PachLog &lt;Pachube-API-Key&gt;</code> <br>
  41510. <br>
  41511. &lt;Pachube-API-Key&gt;:<br>
  41512. The Pachube-API-Key however is what you need in your code to authenticate your application's access the Pachube service.<br>
  41513. Don't share this with anyone: it's just like any other password.<br>
  41514. <a href=http://www.pachube.com>www.pachube.com</a><br>
  41515. </ul>
  41516. <br>
  41517. <a name="PachLogset"></a>
  41518. <b>Set</b>
  41519. <ul>
  41520. <br>
  41521. Add a new Device for Logging to www.pachube.com<br><br>
  41522. <code>set &lt;NAME&gt; ADD &lt;FHEM-DEVICENAME&gt; FEED-NR:ID:READING:ID:READING</code><br><br>
  41523. Example: KS300-Weather-Data<br><br>
  41524. READINGS: temperature humidity wind rain<br><br>
  41525. 1. Generate Input-Feed on www.pachube.com => Yout get your FEED-NR: 1234<br>
  41526. 2. Add Datastreams to the Feed:<br>
  41527. <ul>
  41528. <table>
  41529. <tr><td>ID</td><td>0</td><td>temperature</td></tr>
  41530. <tr><td>ID</td><td>1</td><td>humidity</td></tr>
  41531. <tr><td>ID</td><td>2</td><td>wind</td></tr>
  41532. <tr><td>ID</td><td>3</td><td>rain</td></tr></table><br>
  41533. </ul>
  41534. 3. Add the KS300 to your PachLog-Device<br><br>
  41535. <code>set &lt;NAME&gt; ADD &lt;My-KS300&gt; 1234:0temperature:1:humidity:2:wind:3:rain</code><br><br>
  41536. Delete a Device form Logging to www.pachube.com<br><br>
  41537. <code>set &lt;NAME&gt; DEL &lt;FHEM-DEVICENAME&gt;</code><br><br>
  41538. </ul>
  41539. <br>
  41540. <a name="PachLogget"></a>
  41541. <b>Get</b> <ul>N/A</ul><br>
  41542. <a name="PachLogattr"></a>
  41543. <b>Attributes</b>
  41544. <ul>
  41545. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  41546. <li>disable<br>
  41547. Disables PachLog.
  41548. Nor more Logging to www.pachube.com
  41549. </li>
  41550. </ul><br>
  41551. </ul>
  41552. <a name="Plugwise"></a>
  41553. <h3>Plugwise</h3>
  41554. <ul>
  41555. This module is for the Plugwise-System.
  41556. <br>
  41557. Note: this module requires the Device::SerialPort or Win32::SerialPort module
  41558. if the devices is connected via USB or a serial port.
  41559. Also needed: digest:CRC
  41560. You can install these modules using CPAN.
  41561. <br><br>
  41562. <b>Define</b>
  41563. <ul>
  41564. <code>define &lt;name&gt; Plugwise &lt;device&gt; </code><br>
  41565. </ul>
  41566. <br>
  41567. &lt;device&gt; specifies the serial port to communicate with the Plugwise-Stick.
  41568. Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
  41569. For example /dev/ttyUSB0. Please note that the Plugwise-Stick normally operates at 115200 baud. You may specify the baudrate used after the @ char.<br>
  41570. <br>
  41571. Example: <br>
  41572. <code>define myPlugwise Plugwise /dev/ttyPlugwise@115200</code>
  41573. <br>
  41574. </ul>
  41575. <br>
  41576. <a name="PLUGWISEset"></a>
  41577. <b>Set</b>
  41578. <ul>
  41579. <code>Scan_Circles</code>
  41580. <ul>
  41581. Initiates a scan for new devices and defines them.
  41582. </ul><br><br>
  41583. <code>syncTime</code>
  41584. <ul>
  41585. Syncs all reachable devices to the system-time.
  41586. </ul><br><br>
  41587. <code>reOpen</code>
  41588. <ul>
  41589. Closes and reopens the serial-Port. (useful in case of to many Errors)
  41590. </ul><br><br>
  41591. </ul>
  41592. <br><br>
  41593. <b>Attributes</b>
  41594. <ul>
  41595. <code>circlecount</code><br>
  41596. <ul>
  41597. Max. Number of Circles to be found by the Scan-Command
  41598. <br><br>
  41599. </ul>
  41600. <code>interval</code><br>
  41601. <ul>standard polling-interval for new Circles
  41602. </ul><br><br>
  41603. <code>autosync</code><br>
  41604. <ul>Sends every n seconds a SyncTime to each device
  41605. </ul><br><br>
  41606. <code>WattFormat</code><br>
  41607. <ul>A string representing the format of the power-readings.
  41608. If not defined, it defaults to %0.f
  41609. </ul><br><br>
  41610. <code>showCom</code><br>
  41611. <ul>Writes the complete communication matching a RegEx into the reading "communication"
  41612. (can be viewed in EventMonitor or used with a FileLog)
  41613. </ul><br><br>
  41614. <br>
  41615. </ul>
  41616. <a name="PostMe"></a>
  41617. <h3>PostMe</h3>
  41618. <p> FHEM module to set up a system of sticky notes, similar to Post-Its&trade;</p>
  41619. <a name="PostMedefine"></a>
  41620. <h4>Define</h4>
  41621. <p>
  41622. <code>define &lt;postit&gt; PostMe</code>
  41623. <br />Defines the PostMe system, &lt;postit&gt; is an arbitrary name for the system. </p>
  41624. <a name="PostMeusage"></a>
  41625. <h4>Usage</h4>
  41626. See <a href="http://www.fhemwiki.de/wiki/Modul_PostMe">German Wiki page</a>
  41627. <br/>
  41628. An arbitrary number of lists may be added to the system with the <i>create</i> command.<br/>
  41629. List items may consist of one or more words, and are added/removed by the <i>add</i> and
  41630. <i>remove</i> command, but no separator characters are allowed in one item<br/>
  41631. Attention: A comma "," is the <i>default</i> separator for list items, see attributes below.</br/>
  41632. <p/>
  41633. Meta data for items (=annotations)may be included in the items by using "[" and "]"; characters, e.g.<br/>
  41634. <code>set &lt;postit&gt; add &lt;name&gt; &lt;item&gt; [&lt;attribute1&gt;="&lt;data1&gt;" ...</code><br/>
  41635. These attribute-value pairs may be added, modified and removed with the <i>modify</i> command.
  41636. <p/>
  41637. <b>Special annotations</b> will be evaluated further, either on creation or manually by executing the commands<br/>
  41638. <code>get &lt;postit&gt; special &lt;name&gt;</code> resp. <code>get &lt;postit&gt; allspecial</code>
  41639. <ul>
  41640. <li>The attribute <i>at="&lt;timespec/datespec&gt;"</i>, when given a timespec/datespec value, will result in a single or multiple
  41641. reminding messages for this item. The syntax for this timespec/datespec value is<br/>
  41642. <code>(&lt;HH:MM&gt;|&lt;HH:MM:SS&gt;|&lt;YYYY-MM-DD&gt;T&lt;HH:MM:SS&gt;)[-&lt;HH:MM&gt;[P&lt;number&gt;]]</code>
  41643. <br/>
  41644. The first part is the time/date specification when the item is <i>due</i>.
  41645. <br/>The second optional part beginning with a "-"-sign
  41646. denotes how much time befor this date you want to be alerted.
  41647. <br/>The third optional part beginning with a "P" character
  41648. allows to specify a &lt;number&gt; of periodic reminders, the period given by the second part.<br/>
  41649. Processing this attribute means, that several <i>at</i> devices will be set up in the room <i>hidden</i>
  41650. that are triggered when at the specified times.
  41651. See documentation in Wiki for examples.
  41652. </li>
  41653. <li>The attribute <i>notify="&lt;eventspec&gt;"</i>, when given an eventspec value, will result in a single or multiple
  41654. reminding messages for this item.<br/>
  41655. Processing this attribute means, that a <i>notify</i> device will be set up in the room <i>hidden</i>
  41656. that is triggered when the event is detected.</li>
  41657. </ul>
  41658. The sticky notes may be integrated into any Web page by simply embedding the following tags
  41659. <ul>
  41660. <li> <code>&lt;embed src="/fhem/PostMe_widget?type=pins&amp;postit=&lt;postit&gt;"/&gt;</code> <br/>
  41661. to produce an interactive list of all PostMe names with pins from system &lt;postit&gt;.</li>
  41662. <li> <code>&lt;embed src="/fhem/PostMe_widget?type=pin&amp;postit=&lt;postit&gt;&amp;name=&lt;name&gt;"/&gt;</code> <br/>
  41663. to produce an interactive entry for PostMe &lt;name&gt;from system &lt;postit&gt;</li>
  41664. </ul>
  41665. <br/>
  41666. The module provides interface routines that may be called from your own Perl programs, see documentation in the Wiki.
  41667. <br/>
  41668. <a name="PostMeset"></a>
  41669. <h4>Set</h4>
  41670. <ul>
  41671. <li><code>set &lt;postit&gt; create &lt;name&gt;</code>
  41672. <br />creates a sticky note named &lt;name&gt;</li>
  41673. <li><code>set &lt;postit&gt; rename &lt;name&gt; &lt;newname&gt;</code>
  41674. <br />renames the sticky note named &lt;name&gt; as &lt;newname&gt;</li>
  41675. <li><code>set &lt;postit&gt; delete &lt;name&gt;</code>
  41676. <br />deletes the sticky note named &lt;name&gt;</li>
  41677. <li><code>set &lt;postit&gt; add &lt;name&gt; &lt;item&gt;</code>
  41678. <br />adds to the sticky note named &lt;name&gt; an item &lt;item&gt;</li>
  41679. <li><code>set &lt;postit&gt; modify &lt;name&gt; &lt;item&gt; &lt;attribute&gt; &lt;data&gt;</code>
  41680. <br />adds/modifies/removes and attribute-value-pair &lt;attribute&gt;="&lt;data&gt;" to the item &lt;item&gt; on the sticky note named &lt;name&gt;<br/>
  41681. adding, if this attribute is not yet present; modification, if it is present - &lt;data&gt; will then be overwritten; removal, if no &lt;data&gt; is given</li>
  41682. <li><code>set &lt;postit&gt; remove &lt;name&gt; &lt;item&gt;</code><br />
  41683. <code>set &lt;postit&gt; remove &lt;name&gt; item&lt;number&gt;</code>
  41684. <br />removes from the sticky note named &lt;name&gt; an item &lt;item&gt; or the one numbered &lt;number&gt; (starting at 0)</li>
  41685. <li><code>set &lt;postit&gt; clear &lt;name&gt;</code>
  41686. <br />clears the sticky note named &lt;name&gt; from all items </li>
  41687. </ul>
  41688. <a name="PostMeget"></a>
  41689. <h4>Get</h4>
  41690. <ul>
  41691. <li><code>get &lt;postit&gt; list &lt;name&gt;</code>
  41692. <br />Show the sticky note named &lt;name&gt; and its content</li>
  41693. <li><code>get &lt;postit&gt; special &lt;name&gt;</code>
  41694. <br />Process the special annotations (see above) of the sticky note named &lt;name&gt;</li>
  41695. <li><code>get &lt;postit&gt; mail &lt;name&gt;</code>
  41696. <br />Send the sticky note named &lt;name&gt; and its content via eMail to a predefined
  41697. recipient (e.g. sticky note &lt;postme01Name&gt; is sent to &lt;postme01MailRec&gt;).<br/> The mailing
  41698. subroutine <postmeMsgFun> is called with three parameters for recipient, subject
  41699. and text. </li>
  41700. <li><code>get &lt;postit&gt; message &lt;name&gt;</code>
  41701. <br />Send the sticky note named &lt;name&gt; and its content via instant messenger to a predefined
  41702. recipient (e.g. sticky note &lt;postme01Name&gt; is sent to &lt;postme01MsgRec&gt;).<br/> The messenger
  41703. subroutine <postmeMsgFun> is called with three parameters for recipient, subject
  41704. and text. </li>
  41705. <li><code>get &lt;postit&gt; TTS &lt;name&gt;</code>
  41706. <br />Speak the sticky note named &lt;name&gt; and its content. The TTS
  41707. subroutine <postmeTTSFun> is called with one parameter text. </li>
  41708. <li><code>get &lt;postit&gt; JSON &lt;name&gt;</code>
  41709. <br />Return the sticky note named &lt;name&gt; in JSON format</li>
  41710. <li><code>get &lt;postit&gt; all</code>
  41711. <br />Show all sticky notes and their content</li>
  41712. <li><code>get &lt;postit&gt; allspecial</code>
  41713. <br />Process the special annotations (see above) of all sticky notes</li>
  41714. <li><code>get &lt;postit&gt; version</code>
  41715. <br />Display the version of the module</li>
  41716. </ul>
  41717. <a name="PostMeattr"></a>
  41718. <h4>Attributes</h4>
  41719. <ul>
  41720. <li><code>attr &lt;postit&gt; postmeStd &lt;name1,name2,...&gt;</code>
  41721. <br />Comma separated list of standard sticky notes that will be created on device start.</li>
  41722. <li><code>attr &lt;postit&gt; postmeClick 1|0 (default)</code>
  41723. <br />If 0, embedded sticky notes will pop up on mouseover-events and vanish on mouseout-events (default).<br/>
  41724. If 1, embedded sticky notes will pop up on click events and vanish after closing the note</li>
  41725. <li><code>attr &lt;postit&gt; postmeIcon &lt;string&gt;</code>
  41726. <br />Icon for display of a sticky note</li>
  41727. <li><code>attr &lt;postit&gt; postmeStyle SVG|HTML|jQuery (default)</code>
  41728. <br />If jQuery, embedded sticky notes will produce jQuery code (default) <br/>
  41729. If HTML, embedded sticky notes will produce HTML code <br/>
  41730. If SVG, embedded sticky notes will produce SVG code</li>
  41731. <li><code>attr &lt;postit&gt; listseparator &lt;character&gt;</code>
  41732. <br />Character used to separate list items (default ',')</li>
  41733. </ul>
  41734. Note, that in the parameters sent to the following functions, ":" serves as separator between list name and items,
  41735. and "," serves as separator between items. They may be exchanged with simple regular expression operations.
  41736. <ul>
  41737. <li><code>attr &lt;postit&gt; postmeMailFun &lt;string&gt;</code>
  41738. <br />Function name for the eMail function. This subroutine
  41739. is called with three parameters for recipient, subject
  41740. and text.</li>
  41741. <li><code>attr &lt;postit&gt; postmeMailRec(01|02|...) &lt;string&gt;</code>
  41742. recipient addresses for the above eMail function (per PostMe).</li>
  41743. <li><code>attr &lt;postit&gt; postmeMsgFun &lt;string&gt;</code>
  41744. <br />Function name for the instant messenger function. This subroutine
  41745. is called with three parameters for recipient, subject
  41746. and text.</li>
  41747. <li><code>attr &lt;postit&gt; postmeMsgRec(01|02|...) &lt;string&gt;</code>
  41748. recipient addresses for the above instant messenger function (per PostMe).</li>
  41749. <li><code>attr &lt;postit&gt; postmeTTSFun &lt;string&gt;</code>
  41750. <br />Function name for the text-to-speech function. This subroutine
  41751. is called with two parameters, the device name and the composite text.
  41752. </li>
  41753. <li><code>attr &lt;postit&gt; postmeTTSDev(01|02|...) &lt;string&gt;</code>
  41754. device name for the above TTS function.</li>
  41755. <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
  41756. href="#event-on-update-reading">event-on-update-reading</a>, <a
  41757. href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
  41758. >room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
  41759. <a href="#webCmd">webCmd</a></li>
  41760. </ul>
  41761. <a name="PrecipitationSensor"></a>
  41762. <h3>PrecipitationSensor</h3>
  41763. <ul>
  41764. For more information about the PrecipitationSensor see here: <a href="https://forum.fhem.de/index.php?topic=73016.0">FHEM thread</a>
  41765. <br><br>
  41766. <a name="PrecipitationSensor_Define"></a>
  41767. <b>Define</b>
  41768. <ul>
  41769. <code>define &lt;name&gt; PrecipitationSensor &lt;device&gt;</code> <br>
  41770. &lt;device&gt; specifies the network device<br>
  41771. Normally this is the IP-address and the port in the form ip:port<br>
  41772. Example: 192.168.1.100:81<br>
  41773. <br>
  41774. </ul>
  41775. <a name="PrecipitationSensor_Set"></a>
  41776. <b>Set</b>
  41777. <ul>
  41778. <li>raw &lt;data&gt;<br>
  41779. send &lt;data&gt; to the PrecipitationSensor.
  41780. </li><br>
  41781. <li>connect<br>
  41782. tries to (re-)connect to the PrecipitationSensor. It does not reset the PrecipitationSensor but only try to get a connection to it.
  41783. </li><br>
  41784. <li>reboot<br>
  41785. Reboots the PrecipitationSensor. Works only if we are connected (state is opened or initialized)
  41786. </li><br>
  41787. <li>calibrate<br>
  41788. Calibrates and saves the threshold levels of the PrecipitationSensor. Works only if we are connected (state is opened or initialized)</br>
  41789. How to perform a calibration:</br>
  41790. 1.) Place the sensor in a location with absolutely no motion within a radius of at least 3 meters<br>
  41791. 2.) Set the "Publish interval" on the web interface to 60 seconds</br>
  41792. 3.) Wait for at least 120 seconds before calling the "calibrate" command</br>
  41793. 4.) The calibrated threshold levels "GroupMagThresh" will be updated after the next Publish interval cycle
  41794. </li><br>
  41795. <li>restPreciAmount<br>
  41796. Resets the amount of precipitation. Works only if we are connected (state is opened or initialized)
  41797. </li><br>
  41798. <li>savesettings<br>
  41799. Saves the changes to flash. Works only if we are connected (state is opened or initialized)
  41800. </li><br>
  41801. <li>flash<br>
  41802. This provides a way to flash it directly from FHEM.
  41803. </li><br>
  41804. </ul>
  41805. <a name="PrecipitationSensor_Get"></a>
  41806. <b>Get</b>
  41807. <ul>
  41808. ---
  41809. </ul>
  41810. <br>
  41811. <a name="PrecipitationSensor_Attr"></a>
  41812. <b>Attributes</b>
  41813. <ul>
  41814. <li>initCommands<br>
  41815. Space separated list of commands to send for initialization.
  41816. </li><br>
  41817. <li>timeout<br>
  41818. format: &lt;timeout&gt<br>
  41819. Asks the PrecipitationSensor every timeout seconds if it is still alive. If there is no response it reconnects to the PrecipitationSensor.<br>
  41820. </li><br>
  41821. <li>disable<br>
  41822. if disabled, it does not try to connect
  41823. </li><br>
  41824. </ul>
  41825. <br>
  41826. </ul>
  41827. <a name="PushNotifier"></a>
  41828. <h3>PushNotifier</h3>
  41829. <ul>
  41830. PushNotifier is a service to receive instant push notifications on your
  41831. phone or tablet from a variety of sources.<br>
  41832. You need an account to use this module.<br>
  41833. For further information about the service see <a href="http://www.fhemwiki.de/wiki/PushNotifier">FhemWiki PushNotifier</a>.<br>
  41834. <br>
  41835. Discuss the module <a href="http://forum.fhem.de/index.php/topic,25440.0.html">here</a>.<br>
  41836. <br>
  41837. <br>
  41838. <a name="PushNotifierDefine"></a>
  41839. <b>Define</b>
  41840. <ul>
  41841. <code>define &lt;name&gt; PushNotifier &lt;apiToken&gt; &lt;appName&gt; &lt;user&gt; &lt;password&gt; &lt;deviceID&gt;</code><br>
  41842. <br>
  41843. You have to create an account to get the apiToken.<br>
  41844. And you have to create an application to get the appToken.<br>
  41845. <br>
  41846. Example:
  41847. <ul>
  41848. <code>define PushNotifier1 PushNotifier 01234 appname user password 012</code>
  41849. </ul>
  41850. </ul>
  41851. <br>
  41852. <a name="PushNotifierSet"></a>
  41853. <b>Set</b>
  41854. <ul>
  41855. <code>set &lt;PushNotifier_device&gt; message</code>
  41856. <br>
  41857. <br>
  41858. Examples:
  41859. <ul>
  41860. <code>set PushNotifier1 message This is a text.</code><br>
  41861. </ul>
  41862. Linebreak:
  41863. <ul>
  41864. <code>set PushNotifier1 message This is a text._New Line.</code><br>
  41865. </ul>
  41866. </ul>
  41867. <br>
  41868. <a name="PushNotifierEvents"></a>
  41869. <b>Generated events:</b>
  41870. <ul>
  41871. N/A
  41872. </ul>
  41873. </ul>
  41874. <a name="Pushalot"></a>
  41875. <h3>Pushalot</h3>
  41876. <ul>
  41877. Pushalot is a service to receive instant push notifications on your
  41878. Windows Phone device from a variety of sources.<br>
  41879. You need an account to use this module.<br>
  41880. For further information about the service see <a href="https://pushalot.com" target="_blank">pushalot.com</a>.<br>
  41881. <br>
  41882. Discuss the module <a href="http://forum.fhem.de/index.php/topic,37775.0.html" target="_blank">here</a>.<br>
  41883. <br>
  41884. <br>
  41885. <a name="PushalotDefine"></a>
  41886. <b>Define</b>
  41887. <ul>
  41888. <code>define &lt;name&gt; Pushalot &lt;token&gt; [&lt;source&gt;]</code><br>
  41889. <br>
  41890. <table>
  41891. <colgroup>
  41892. <col style="width: 100px";"></col>
  41893. <col></col>
  41894. </colgroup>
  41895. <tr>
  41896. <td>&lt;token&gt;</td>
  41897. <td>The token that identifies a pushalot-account. You need to create if no account yet.</td>
  41898. </tr>
  41899. <tr>
  41900. <td>&lt;source&gt;</td>
  41901. <td>The source defines what will be shown in the 'from'-field of the message (the sender).</td>
  41902. </tr>
  41903. </table>
  41904. <br>
  41905. Example:
  41906. <ul>
  41907. <code>define PushNotification Pushalot 123234 FHEM</code>
  41908. </ul>
  41909. </ul>
  41910. <br>
  41911. <a name="PushalotSet"></a>
  41912. <b>Set</b>
  41913. <ul>
  41914. <code>set &lt;Pushalot_device&gt; "&lt;message&gt;" ["&lt;title&gt;"] ["&lt;image&gt;"] ["&lt;link&gt;"] ["&lt;link_title&gt;"] ["&lt;important&gt;"] ["&lt;silent&gt;"]</code>
  41915. <br>
  41916. <br>
  41917. <table>
  41918. <colgroup>
  41919. <col style="width: 100px";"></col>
  41920. <col></col>
  41921. </colgroup>
  41922. <tr>
  41923. <td>&lt;message&gt;</td>
  41924. <td>The message body that should appear in the message.</td>
  41925. </tr>
  41926. <tr>
  41927. <td>&lt;title&gt;</td>
  41928. <td>The title of the message.</td>
  41929. </tr>
  41930. <tr>
  41931. <td>&lt;image&gt;</td>
  41932. <td>An optional image URL that is shown in the message.</td>
  41933. </tr>
  41934. <tr>
  41935. <td>&lt;link&gt;</td>
  41936. <td>An optional link that should be appended to the message body.</td>
  41937. </tr>
  41938. <tr>
  41939. <td>&lt;link_title&gt;</td>
  41940. <td>An optional link title. If no title is set, the URL is shown as title in the message.</td>
  41941. </tr>
  41942. <tr>
  41943. <td>&lt;important&gt;</td>
  41944. <td>True|False: True if the message should be marked as 'important', otherwise False (Default)</td>
  41945. </tr>
  41946. <tr>
  41947. <td>&lt;silent&gt;</td>
  41948. <td>True|False: True if the message should be delivered silently (no notify sound is played), otherwise False (Default)</td>
  41949. </tr>
  41950. <tr>
  41951. <td>&lt;time_to_live&gt;</td>
  41952. <td>The time in minutes after which the message is automatically purged</td>
  41953. </tr>
  41954. </table>
  41955. <br>
  41956. Examples:
  41957. <ul>
  41958. <code>set PushNotification message "This is my message."</code><br>
  41959. <code>set PushNotification message "This is my message." "With Title"</code><br>
  41960. <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png"</code><br>
  41961. <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png" "http://www.xyz.com"</code><br>
  41962. <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png" "http://www.xyz.com" "Link Title" </code><br>
  41963. <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png" "http://www.xyz.com" "Link Title" True</code><br>
  41964. <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png" "http://www.xyz.com" "Link Title" True False</code><br>
  41965. <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png" "http://www.xyz.com" "Link Title" True False 5</code><br>
  41966. </ul>
  41967. <br>
  41968. </ul>
  41969. <br>
  41970. <b>Get</b> <ul>N/A</ul><br>
  41971. <a name="PushalotAttr"></a>
  41972. <b>Attributes</b> <ul>N/A</ul><br>
  41973. <ul>
  41974. </ul>
  41975. <br>
  41976. <a name="PushalotEvents"></a>
  41977. <b>Generated events:</b>
  41978. <ul>
  41979. N/A
  41980. </ul>
  41981. </ul>
  41982. <a name="Pushbullet"></a>
  41983. <h3>Pushbullet</h3>
  41984. <ul>
  41985. Pushbullet is a service to send instant push notifications to different devices. There are
  41986. apps for iPhone, Android, Windows (Beta), Mac OS X and plugins for Chrome Firefox and Safari.<br>
  41987. For further information about the service see <a target="_blank" href="https://pushbullet.com">pushbullet.com</a>.<br>
  41988. <br>
  41989. Discuss the module <a target="_blank" href="http://forum.fhem.de/index.php/topic,29796.0.html">here</a>.<br> <br><br>
  41990. <a name="Pushbullet_Define"></a>
  41991. <b>Define</b>
  41992. <ul>
  41993. <code>define &lt;name&gt; Pushbullet &lt;accessToken&gt;</code><br>
  41994. <br>
  41995. Note:<br>
  41996. <ul>
  41997. <li>JSON has to be installed on the FHEM host.</li>
  41998. <li>Register on pushbullet.com to get your accessToken.</li>
  41999. </ul>
  42000. </ul><br>
  42001. <a name="Pushbullet_Set"></a>
  42002. <b>Set</b>
  42003. <ul>
  42004. <li>clear<br>
  42005. clear device readings</li>
  42006. <li>contactAdd name | email<br>
  42007. adds a contact. Spaces in name are allowed</li>
  42008. <li>deviceDelete deviceName<br>
  42009. deletes a device</li>
  42010. <li>deviceRename deviceName | newDeviceName<br>
  42011. renames a device</li>
  42012. <li>link [| title | device]<br>
  42013. sends a link with optional title and device. If no device is given, push goes to all your devices.</li>
  42014. <li>list item1[, item2, item3, ... | title | device]<br>
  42015. sends a list with one or more items, optional title and device. If no device is given, push goes to all your devices.</li>
  42016. <li>message [| title | device]<br>
  42017. sends a push notification with optional title and device. If no device is given, push goes to all your devices.</li>
  42018. <br>
  42019. Examples:<br>
  42020. <ul>
  42021. <code>set Pushbullet message This is a message.</code><br>
  42022. sends a push notification with message "This is a message" without a title to all <b>your</b> devices.<br><br>
  42023. <code>set Pushbullet message This is a message | A title</code><br>
  42024. sends a push notification with message "This is a message" and title "A title" to all <b>your</b> devices.<br><br>
  42025. <code>set Pushbullet message This is a message | A title | iPhone</code><br>
  42026. sends a push notification with message "This is a message" and title "A title" to Device iPhone.<br><br>
  42027. <code>set Pushbullet message This is a message | A title | Max Mustermann</code><br>
  42028. sends a push notification with message "This is a message" and title "A title" to your contact Max Mustermann.<br>
  42029. </ul>
  42030. <br>
  42031. Note:<br>
  42032. Spaces before and after | are not needed.
  42033. </ul><br>
  42034. <a name="Pushbullet_Get"></a>
  42035. <b>Get</b>
  42036. <ul>
  42037. <li>devices<br>
  42038. reads your device list (devices + contacts) and set device readings</li>
  42039. </ul><br>
  42040. <a name="Pushbullet_Attr"></a>
  42041. <b>Attributes</b>
  42042. <ul>
  42043. <li>defaultDevice<br>
  42044. default device for pushmessages</li>
  42045. <li>defaultTitle<br>
  42046. default title for pushmessages. If it is undefined the defaultTitle will be FHEM</li>
  42047. </ul>
  42048. </ul>
  42049. <a name="Pushover"></a>
  42050. <h3>Pushover</h3>
  42051. <ul>
  42052. Pushover is a service to receive instant push notifications on your
  42053. phone or tablet from a variety of sources.<br>
  42054. You need an account to use this module.<br>
  42055. For further information about the service see <a href="https://pushover.net">pushover.net</a>.<br>
  42056. <br>
  42057. Installation of Perl module IO::Socket::SSL is mandatory to use this module (i.e. via 'cpan -i IO::Socket::SSL').<br>
  42058. It is recommended to install Perl-JSON to make use of advanced functions like supplementary URLs.<br>
  42059. <br>
  42060. Discuss the module <a href="http://forum.fhem.de/index.php/topic,16215.0.html">here</a>.<br>
  42061. <br>
  42062. <br>
  42063. <a name="PushoverDefine"></a>
  42064. <b>Define</b>
  42065. <ul>
  42066. <code>define &lt;name&gt; Pushover &lt;token&gt; &lt;user&gt; [&lt;infix&gt;]</code><br>
  42067. <br>
  42068. You have to <a href="https://pushover.net/login">create an account</a> to get the user key.<br>
  42069. And you have to <a href="https://pushover.net/apps/build">create an application</a> to get the API token.<br>
  42070. <br>
  42071. Attribute infix is optional to define FHEMWEB uri name for Pushover API callback function.<br>
  42072. Callback URL may be set using attribute callbackUrl (see below).<br>
  42073. Note: A uri name can only be used once within each FHEM instance!<br>
  42074. <br>
  42075. Example:
  42076. <ul>
  42077. <code>define Pushover1 Pushover 01234 56789</code>
  42078. </ul>
  42079. <ul>
  42080. <code>define Pushover1 Pushover 01234 56789 pushCallback1</code>
  42081. </ul>
  42082. </ul>
  42083. <br>
  42084. <a name="PushoverSet"></a>
  42085. <b>Set</b>
  42086. <ul><b>msg</b><ul>
  42087. <code>set &lt;Pushover_device&gt; msg &lt;text&gt; [&lt;option1&gt;=&lt;value&gt; &lt;option2&gt;="&lt;value with space in it&gt;" ...]</code>
  42088. <br>
  42089. <br>
  42090. The following options may be used to adjust message content and delivery behavior:<br>
  42091. <br>
  42092. <code><b>message</b>&nbsp;&nbsp;&nbsp;</code> - type: text - Your message text. Using this option takes precedence; non-option text content will be discarded.<br>
  42093. <code><b>device</b>&nbsp;&nbsp;&nbsp;&nbsp;</code> - type: text - Your user's device name to send the message directly to that device, rather than all of the user's devices (multiple devices may be separated by a comma). May also be set to a specific User or Group Key. To address a specific device for a specific User/Group, use User/Group Key first and add device name separated by colon.<br>
  42094. <code><b>title</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> - type: text - Your message's title, otherwise your Pushover API app's name is used.<br>
  42095. <code><b>action</b>&nbsp;&nbsp;&nbsp;&nbsp;</code> - type: text - Either a FHEM command to run when user taps link or a <a href="https://pushover.net/api#urls">supplementary URL</a> to show with your message.<br>
  42096. <code><b>url_title</b>&nbsp;</code> - type: text - A title for your FHEM command or supplementary URL, otherwise just the URL is shown.<br>
  42097. <code><b>priority</b>&nbsp;&nbsp;</code> - type: integer - Send as -2 to generate no notification/alert, -1 to always send as a quiet notification, 1 to display as <a href="https://pushover.net/api#priority">high-priority</a> and bypass the user's quiet hours, or 2 to also require confirmation from the user.<br>
  42098. <code><b>retry</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> - type: integer - Mandatory in combination with message priority &gt;= 2.<br>
  42099. <code><b>expire</b>&nbsp;&nbsp;&nbsp;&nbsp;</code> - type: integer - Mandatory in combination with message priority &gt;= 2.<br>
  42100. <code><b>cancel_id</b>&nbsp;</code> - type: text - Custom ID to immediate expire messages with priority &gt;=2 and disable reoccuring notification.<br>
  42101. <code><b>timestamp</b>&nbsp;</code> - type: integer - A Unix timestamp of your message's date and time to display to the user, rather than the time your message is received by the Pushover servers. Takes precendence over attribute timestamp=1.<br>
  42102. <code><b>sound</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> - type: text - The name of one of the <a href="https://pushover.net/api#sounds">sounds</a> supported by device clients to override the user's default sound choice.<br>
  42103. <br>
  42104. Examples:
  42105. <ul>
  42106. <code>set Pushover1 msg My first Pushover message.</code><br>
  42107. <code>set Pushover1 msg My second Pushover message.\nThis time with two lines.</code><br>
  42108. <code>set Pushover1 msg "Another Pushover message in double quotes."</code><br>
  42109. <code>set Pushover1 msg 'Another Pushover message in single quotes.'</code><br>
  42110. <code>set Pushover1 msg message="Pushover message using explicit option for text content." This part of the text will be ignored.</code><br>
  42111. <code>set Pushover1 msg This is a message with a title. title="This is a subject"</code><br>
  42112. <code>set Pushover1 msg title="This is a subject, too!" This is another message with a title set at the beginning of the command.</code><br>
  42113. <code>set Pushover1 msg title=Emergency priority=2 retry=30 expire=3600 Security issue in living room.</code><br>
  42114. <code>set Pushover1 msg title=Link Have a look to this website: url_title="Open" action="http://fhem.de/" expire=3600</code><br>
  42115. <code>set Pushover1 msg title=Hint expire=3600 This is a reminder to do something. Action will expire in 1h. url_title="Click here for action" action="set device something"</code><br>
  42116. <code>set Pushover1 msg title=Emergency priority=2 retry=30 expire=3600 Security issue in living room. sound=siren url_title="Click here for action" action="set device something"</code><br>
  42117. </ul>
  42118. <br>
  42119. </ul></ul>
  42120. <br>
  42121. <br>
  42122. <ul><b>msgCancel</b><ul>
  42123. <code>set &lt;Pushover_device&gt; msgCancel &lt;ID&gt;</code>
  42124. <br>
  42125. <br>
  42126. Prematurely stopps reoccuring confirmation request for messages with priority &gt;= 2.<br>
  42127. <br>
  42128. Example:
  42129. <ul>
  42130. <code>set Pushover1 msg title=Emergency priority=2 retry=30 expire=3600 Security Alarm in Living room. sound=siren cancel_id=SecurityAlarm</code><br>
  42131. <code>set Pushover1 msgCancel SecurityAlarm</code>
  42132. </ul>
  42133. </ul></ul>
  42134. <br>
  42135. <br>
  42136. <ul><b>msg</b> <u>(deprecated format)</u><ul>
  42137. <code>set &lt;Pushover_device&gt; msg [title] &lt;msg&gt; [&lt;device&gt; &lt;priority&gt; &lt;sound&gt; [&lt;retry&gt; &lt;expire&gt; [&lt;url_title&gt; &lt;action&gt;]]]</code>
  42138. <br>
  42139. <br>
  42140. Examples:
  42141. <ul>
  42142. <code>set Pushover1 msg 'This is a text.'</code><br>
  42143. <code>set Pushover1 msg 'Title' 'This is a text.'</code><br>
  42144. <code>set Pushover1 msg 'Title' 'This is a text.' '' 0 ''</code><br>
  42145. <code>set Pushover1 msg 'Emergency' 'Security issue in living room.' '' 2 'siren' 30 3600</code><br>
  42146. <code>set Pushover1 msg 'Hint' 'This is a reminder to do something' '' 0 '' 0 3600 'Click here for action' 'set device something'</code><br>
  42147. <code>set Pushover1 msg 'Emergency' 'Security issue in living room.' '' 2 'siren' 30 3600 'Click here for action' 'set device something'</code><br>
  42148. </ul>
  42149. <br>
  42150. Notes:
  42151. <ul>
  42152. <li>For the first and the second example the corresponding default attributes for the missing arguments must be defined for the device (see attributes section)
  42153. </li>
  42154. <li>If device is empty, the message will be sent to all devices.
  42155. </li>
  42156. <li>If device has a User or Group Key, the message will be sent to this recipient instead. Should you wish to address a specific device here, add it at the end separated by colon.
  42157. </li>
  42158. <li>If sound is empty, the default setting in the app will be used.
  42159. </li>
  42160. <li>If priority is higher or equal 2, retry and expire must be defined.
  42161. </li>
  42162. </ul>
  42163. </ul></ul>
  42164. <br>
  42165. <br>
  42166. <ul><b>glance</b><ul>
  42167. <code>set &lt;Pushover_device&gt; glance [&lt;text&gt;] [&lt;option1&gt;=&lt;value&gt; &lt;option2&gt;="&lt;value with space in it&gt;" ...]</code>
  42168. <br>
  42169. <br>
  42170. Update <a href="https://pushover.net/api/glances">Pushover's glances</a> on Apple Watch.<br>
  42171. The following options may be used to adjust message content and delivery behavior:<br>
  42172. <br>
  42173. <code><b>title</b>&nbsp;&nbsp;&nbsp;</code> - type: text(100 characters) - A description of the data being shown, such as "Widgets Sold".<br>
  42174. <code><b>text</b>&nbsp;&nbsp;&nbsp;&nbsp;</code> - type: text(100 characters) - The main line of data, used on most screens. Using this option takes precedence; non-option text content will be discarded.<br>
  42175. <code><b>subtext</b>&nbsp;</code> - type: text(100 characters) - A second line of data.<br>
  42176. <code><b>count</b>&nbsp;&nbsp;&nbsp;</code> - type: integer(may be negative) - Shown on smaller screens; useful for simple counts.<br>
  42177. <code><b>percent</b>&nbsp;</code> - type: integer(0-100) - Shown on some screens as a progress bar/circle.<br>
  42178. <code><b>device</b>&nbsp;&nbsp;</code> - type: text - Your user's device name to send the message directly to that device, rather than all of the user's devices (multiple devices may be separated by a comma). May also be set to a specific User or Group Key. To address a specific device for a specific User/Group, use User/Group Key first and add device name separated by colon.<br>
  42179. <br>
  42180. </ul></ul>
  42181. <br>
  42182. <b>Get</b> <ul>N/A</ul><br>
  42183. <a name="PushoverAttr"></a>
  42184. <b>Attributes</b>
  42185. <ul>
  42186. <li>
  42187. <a href="#do_not_notify">do_not_notify</a>
  42188. </li>
  42189. <li>
  42190. <a href="#disabledForIntervals">disabledForIntervals</a>
  42191. </li>
  42192. <li>
  42193. <a href="#readingFnAttributes">readingFnAttributes</a>
  42194. </li>
  42195. <li>
  42196. <a name="PushoverAttrcallbackUrl"></a><code>callbackUrl</code><br>
  42197. Set the callback URL to be used to acknowledge messages with emergency priority or supplementary URLs.
  42198. </li>
  42199. <li><a name="PushoverAttrtimestamp"></a><code>timestamp</code><br>
  42200. Send the unix timestamp with each message.
  42201. </li>
  42202. <li><a name="PushoverAttrtitle"></a><code>title</code><br>
  42203. Will be used as title if title is not specified as an argument.
  42204. </li>
  42205. <li><a name="PushoverAttrdevice"></a><code>device</code><br>
  42206. Will be used for the device name if device is not specified as an argument. If left blank, the message will be sent to all devices.
  42207. </li>
  42208. <li><a name="PushoverAttrpriority"></a><code>priority</code><br>
  42209. Will be used as priority value if priority is not specified as an argument. Valid values are -1 = silent / 0 = normal priority / 1 = high priority
  42210. </li>
  42211. <li><a name="PushoverAttrexpire"></a><code>expire</code><br>
  42212. When message priority is 2, this default value will be used for expire when not provided in the message. Needs to be 30 or higher.
  42213. </li>
  42214. <li><a name="PushoverAttrretry"></a><code>retry</code><br>
  42215. When message priority is 2, this default value will be used for retry when not provided in the message.
  42216. </li>
  42217. <li><a name="PushoverAttrsound"></a><code>sound</code><br>
  42218. Will be used as the default sound if sound argument is missing. If left blank the adjusted sound of the app will be used.
  42219. </li>
  42220. </ul>
  42221. <br>
  42222. <a name="PushoverEvents"></a>
  42223. <b>Generated events:</b>
  42224. <ul>
  42225. N/A
  42226. </ul>
  42227. </ul>
  42228. <a name="Pushsafer"></a>
  42229. <h3>Pushsafer</h3>
  42230. <ul>
  42231. Pushsafer is a web service to receive instant push notifications on your
  42232. iOS, Android or Windows 10 Phone or Desktop device from a variety of sources.<br>
  42233. You need a Pushsafer account to use this module.<br>
  42234. For further information about the service see <a href="https://www.pushsafer.com" target="_new">pushsafer.com</a>.<br>
  42235. <br>
  42236. This module is only capable to send messages via Pushsafer.<br>
  42237. <br>
  42238. <a name="PushsaferDefine"></a>
  42239. <b>Define</b>
  42240. <ul>
  42241. <code>define &lt;name&gt; Pushsafer &lt;key&gt;</code><br>
  42242. <br>
  42243. The parameter &lt;key&gt; must be a alphanumeric string. This can be a regular private key (20 digits) from your Pushsafer account or an E-Mail alias key (15 digits) which needs to be setup in your account.<br>
  42244. <br>
  42245. Example:
  42246. <ul>
  42247. <code>define PushsaferAccount Pushsafer A1b2c3D4E5F6g7h8i9J0</code>
  42248. </ul>
  42249. </ul>
  42250. <br>
  42251. <a name="PushsaferSet"></a>
  42252. <b>Set</b>
  42253. <ul>
  42254. <code>set &lt;name&gt; message &lt;text&gt; [&lt;option1&gt;=&lt;value&gt; &lt;option2&gt;=&lt;value&gt; ...]</code><br>
  42255. <br>
  42256. Currently only the message command is available to sent a message.<br>
  42257. <br>
  42258. So the very basic use case is to send a simple text message like the following example:<br>
  42259. <br>
  42260. <code>set PushsaferAccount message "My first Pushsafer message."</code><br>
  42261. <br>
  42262. To send a multiline message, use the placeholder "\n" to indicate a newline:<br>
  42263. <br>
  42264. <code>set PushsaferAccount message "My second Pushsafer message.\nThis time with two lines."</code><br>
  42265. <br>
  42266. <u>Optional Modifiers</u><br>
  42267. <br>
  42268. It is possible to customize a message with special options that can be given in the message command after the message text. Several options can be combined together. The possible options are:<br>
  42269. <br>
  42270. <code><b>title</b>&nbsp;&nbsp;&nbsp;&nbsp;</code> - short: <code>t&nbsp;</code> - type: text - A special title for the message text.<br>
  42271. <code><b>device</b>&nbsp;&nbsp;&nbsp;</code> - short: <code>d&nbsp;</code> - type: text - The device ID as number, to send the message to a specific device, or "gs" + group ID to send to a device group (e.g. "gs23" for group id 23). By default the message will be send to all registered devices.<br>
  42272. <code><b>sound</b>&nbsp;&nbsp;&nbsp;&nbsp;</code> - short: <code>s&nbsp;</code> - type: number - The ID of a specific sound to play on the target device upon reception (see <a href="https://www.pushsafer.com/en/pushapi" target="_new">Pushsafer.com</a> for a complete list of values and their meaning).<br>
  42273. <code><b>icon</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> - short: <code>i&nbsp;</code> - type: number - The ID of a specific icon to show on the target device for this text (see <a href="https://www.pushsafer.com/en/pushapi" target="_new">Pushsafer.com</a> for a complete list of values and their meaning).<br>
  42274. <code><b>vibration</b></code> - short: <code>v&nbsp;</code> - type: number - The number of times the device should vibrate upon reception (maximum: 3 times; iOS/Android only). If not set, the default behavior of the device is used.<br>
  42275. <code><b>url</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> - short: <code>u&nbsp;</code> - type: text - A URL that should be included in the message. This can be regular http:// URL's but also specific app schemas. See <a href="https://www.pushsafer.com/en/url_schemes" target="_new">Pushsafer.com</a> for a complete list of supported URL schemas.<br>
  42276. <code><b>urlText</b>&nbsp;&nbsp;</code> - short: <code>ut</code> - type: text - A text that should be used to display a URL from the "url" option.<br>
  42277. <code><b>key</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> - short: <code>k&nbsp;</code> - type: text - Overrides the private key given in the define statement. Also an alias key can be used.<br>
  42278. <code><b>ttl</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> - short: <code>l&nbsp;</code> - type: number - Defines a "time-to-live" given in minutes after the message will be deleted on the target device(s). Possible range is between 1 - 43200 minutes (30 days).<br>
  42279. <code><b>picture</b>&nbsp;&nbsp;</code> - short: <code>p&nbsp;</code> - type: text - Attach a image to the message. This can be a file path located in your filesystem (e.g. <code>picture=/home/user/picture.jpg</code>) or the name of a IPCAM instance (like <code>picture=IPCAM:<i>&lt;name&gt;</i></code>) to send the last snapshot image (e.g. <code>picture=IPCAM:IpCam_Front_House</code>). The supported image formats are JPG, PNG and GIF.<br>
  42280. <code><b>picture2</b>&nbsp;</code> - short: <code>p2</code> - type: text - same syntax as for option <code>"picture"</code><br>
  42281. <code><b>picture3</b>&nbsp;</code> - short: <code>p3</code> - type: text - same syntax as for option <code>"picture"</code><br>
  42282. <br>
  42283. Examples:<br>
  42284. <br>
  42285. <ul>
  42286. <code>set PushsaferAccount message "This is a message with a title." title="Super important"</code><br>
  42287. <code>set PushsaferAccount message "Get down here\nWe're waiting" title="Lunch is ready" device=100</code><br>
  42288. <code>set PushsaferAccount message "Server is down" sound=25 icon=5 vibration=3</code><br>
  42289. <code>set PushsaferAccount message "Look at my photos" url="http://www.foo.com/myphotos" urlText="Summer Vacation"</code><br>
  42290. <br>
  42291. It is also possible to use the short-term versions of options:<br>
  42292. <br>
  42293. <code>set PushsaferAccount message "This is a message with a title." t="Super important"</code><br>
  42294. <code>set PushsaferAccount message "Get down here\nWe're waiting" t="Lunch is ready" d=100</code><br>
  42295. <code>set PushsaferAccount message "Server is down" s=25 i=5 v=3</code><br>
  42296. <code>set PushsaferAccount message "Look at my photos" u="http://www.foo.com/myphotos" ut="Summer Vacation"</code><br>
  42297. </ul>
  42298. <br>
  42299. </ul>
  42300. <br>
  42301. <b>Get</b> <ul>N/A</ul><br>
  42302. <a name="PushsaferAttr"></a>
  42303. <b>Attributes</b>
  42304. <ul>
  42305. <li><a href="#do_not_notify">do_not_notify</a></li>
  42306. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  42307. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  42308. </ul>
  42309. <br>
  42310. <a name="PushsaferEvents"></a>
  42311. <b>Generated Readings/Events:</b><br>
  42312. <ul>
  42313. <li><b>lastSuccess</b> - The last successful status message received by the Pushsafer server</li>
  42314. <li><b>lastError</b> - The last errur message received by the Pushsafer server</li>
  42315. <li><b>availableMessages-<i>&lt;device ID&gt;</i>-<i>&lt;device name&gt;</i></b> - The remaining messages that can be send to this device</li>
  42316. </ul>
  42317. </ul>
  42318. <a name="QRCode"></a>
  42319. <h3>QRCode</h3>
  42320. <ul>
  42321. Devices of this module are used to generate an URL that will be used to generate
  42322. and receive a QRCode from the service of TEC-IT<br/>
  42323. The device will also display the generated QRCode in the device details. It can
  42324. also provide the HTML-code used for display for other purposes (e.g. weblink devices)
  42325. <br/><br/>
  42326. <b>ATTENTION:</b>The sevice provider does not allow more than 30 QRCode generations / minute
  42327. without special permission<br/><br/>
  42328. See terms of sevice on TEC-IT homepage: http://qrcode.tec-it.com/de#TOS
  42329. <br/><br/>
  42330. <a name="QRCodedefine"></a>
  42331. <b>Define</b><br/>
  42332. <ul>
  42333. <code>define &lt;name&gt; QRCode</code>
  42334. <br/><br/>
  42335. </ul>
  42336. <br/>
  42337. <a name="QRCodeset"></a>
  42338. <b>Set</b><br/>
  42339. <ul>
  42340. <code>set &lt;name&gt; update</code><br/>
  42341. Refreshes the QRCode-URL for Image generation.
  42342. </ul>
  42343. <br/>
  42344. <a name="QRCodeattr"></a>
  42345. <b>Attributes</b><br/><br/>
  42346. <ul>
  42347. <b>QRCode-URL relevant attributes</b>
  42348. <br/><br/>
  42349. The following attributes take influence on the QRCode generation.
  42350. <br/><br/>
  42351. If one of those attributes is changed, per default an auto update of the QRCode-URL is performed.
  42352. <br/><br/>
  42353. <li><a name="qrData">qrData</a><br/>
  42354. This attribute is used to set the data that will be encoded in the QRCode.<br/>
  42355. If this attribute is not set an error message is generatet.
  42356. <br/><br/>
  42357. </li>
  42358. <li><a name="qrSize">qrSize</a><br/>
  42359. Defines the size of the generated QRCode image<br/>
  42360. Possible values are small, medium (default), large.
  42361. <br/><br/>
  42362. </li>
  42363. <li><a name="qrResolutionDPI">qrResolutionDPI</a><br/>
  42364. Defines the resolution for QRCode generaation<br/>
  42365. Valid values are between 96 and 600 (Default is 300dpi)
  42366. <br/><br/>
  42367. </li>
  42368. <li><a name="qrColor">qrColor</a><br/>
  42369. Defines the foreground color of the genereted QRCode image<br/>
  42370. This is a RGB color value in hex format (eg. FF0000 = red)
  42371. Default is 000000 (black)
  42372. <br/><br/>
  42373. </li>
  42374. <li><a name="qrBackColor">qrBackColor</a><br/>
  42375. Defines the background color of the genereted QRCode image<br/>
  42376. This is a RGB color value in hex format (eg. 0000FF = blue)
  42377. Default is FFFFFF (white).
  42378. <br/><br/>
  42379. </li>
  42380. <li><a name="qrTransparent">qrTransparent</a><br/>
  42381. Defines that the background of the generated QRCode will be transparent<br/>
  42382. Possible values are False (non-tranparent background) or True (transparent background)<br/>
  42383. default is non-transparent.
  42384. <br/><br/>
  42385. </li>
  42386. <li><a name="qrQuietZone">qrQuietZone</a><br/>
  42387. defines the size of a quiet zone around the QRCode in the image.<br/>
  42388. This is a blank zone making it easier to scan the QRCode for some scanners.<br/>
  42389. Default ist 0, if attribute is not set.
  42390. <br/><br/>
  42391. </li>
  42392. <li><a name="qrQuietUnit">qrQuietUnit</a><br/>
  42393. specifies the unit for qrQuietZone attribute<br/>
  42394. Possible values are mm (default), in (=inch), mil (=mils), mod (=Module) or px (=Pixel).
  42395. <br/><br/>
  42396. </li>
  42397. <li><a name="qrCodepage">qrCodepage</a><br/>
  42398. Used Codepage for QRCode generation.<br/>
  42399. Possible values are UTF8 (default), Cyrillic or Ansi
  42400. <br/><br/>
  42401. </li>
  42402. <li><a name="qrErrorCorrection">qrErrorCorrection</a><br/>
  42403. Error correction used in generated QRCode image.<br/>
  42404. Possible values are L (default), M,Q or H
  42405. <br/><br/>
  42406. </li>
  42407. <b>Display relevant attributes</b>
  42408. <br/><br/>
  42409. The followin Attribute change the behaviour and display parameters for the detail view<br/>
  42410. of QRCode devices in FHEMWEB. Therfore it changes the result of QRCode_getHtml function<br/>
  42411. (see below.)<br/><br/>
  42412. In cas of an error, neither QRCode, nor qrDisplayText will be displayed. Instead<br/>
  42413. an error message is displayed.
  42414. <br/><br/>
  42415. <li><a name="qrDisplayWidth">qrDisplayWidth</a><br/>
  42416. display width of the QRCode image<br/>
  42417. Default is 200
  42418. <br/><br/>
  42419. </li>
  42420. <li><a name="qrDisplayHeigth">qrDisplayHeight</a><br/>
  42421. Display height of the QRCode image<br/>
  42422. Default is 200
  42423. <br/><br/>
  42424. </li>
  42425. <li><a name="qrDisplayData">qrDisplayData</a><br/>
  42426. If set the contents or the reading data is displayed below the QRCode image<br/>
  42427. Usually this is the contents of attribute qrData.
  42428. <br/><br/>
  42429. </li>
  42430. <li><a name="qrDisplayNoImage">qrDisplaNoImage</a><br/>
  42431. If set, the QRCode image will not be displayed
  42432. <br/><br/>
  42433. </li>
  42434. <li><a name="qrDisplayText">qrDisplaText</a><br/>
  42435. user defined text to be displayed below QRCode image
  42436. <br/><br/>
  42437. </li>
  42438. <li><a name="qrDisplayNoText">qrDisplaNoText</a><br/>
  42439. If this attribute is set, the text specified in qrDisplayText will not be displayed<br/>
  42440. below QRCode image. So qrDisplayText doesn't have to be deleted.
  42441. <br/><br/>
  42442. </li>
  42443. <li><a name="qrNoAutoUpdate">qrNoAutoUpdate</a><br/>
  42444. If set not auto update will be processed for QRCode relevant attributes.
  42445. <br/><br/>
  42446. </li>
  42447. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  42448. </ul>
  42449. <br/><br/>
  42450. <a name="QRCodereadings"></a>
  42451. <b>Generated Readings</b>
  42452. <br/><br/>
  42453. <ul>
  42454. <br/>
  42455. <li>data<br/>
  42456. This reading contains the data to be encoded by the QRCode<br/>
  42457. Usually this is the contents of attribute qrData.<br/>
  42458. In case of an error it contains the error message.
  42459. <br/><br/>
  42460. </li>
  42461. <li>qrcode_url<br/>
  42462. By <code>set update</code> generated URL, used to get the QRCode image<br/>
  42463. <br/><br/>
  42464. </li>
  42465. <li>state<br/>
  42466. The state of the device<br/>
  42467. Initially this is <code>defined</code> or the timestamp of last <code>set update</code>, or auto-update
  42468. <br/><br/>
  42469. </li>
  42470. </ul>
  42471. <br/><br/>
  42472. <a name="QRCodefunctions"></a>
  42473. <b>Usefull Funktionen</b>
  42474. <br/><br/>
  42475. The module comes with a useful function to provide the HTML code used for display in detail view of the<br/>
  42476. QRCode device in FHEMWEB for other purposes, e.g. weblink.
  42477. <br/><br/>
  42478. <ul>
  42479. <br/>
  42480. <li><code>QRCode_getHtml($;$$)</code><br/><br/>
  42481. Returns the HTML code for the specified QRCode device
  42482. <br/><br/>
  42483. Arguments:
  42484. <br/><br/>
  42485. <ul>
  42486. <li>QRCodeDevice<br/>
  42487. Name of the QRCode device as a string.
  42488. </li>
  42489. <li>noImage (Optional)<br/>
  42490. The same as attribute qrDisplayNoImage<br/>
  42491. </li>
  42492. <li>noText (Optional)<br/>
  42493. The same as attribute qrDisplayNoText<br/>
  42494. </li>
  42495. </ul>
  42496. <br/><br/>
  42497. Example:
  42498. <br/><br/>
  42499. <code>QRCode_getHtml('MyQRCode',1,0)</code>
  42500. <br/><br/>
  42501. Generate HTML code of (QRCode-) device named MyQRCode with QRCode image but not with the<br/>
  42502. user defined Text (qrDisplayText).
  42503. </li>
  42504. </ul>
  42505. </ul>
  42506. <p>
  42507. <a name="RESIDENTS" id="RESIDENTS"></a>
  42508. </p>
  42509. <h3>
  42510. RESIDENTS
  42511. </h3>
  42512. <ul>
  42513. <a name="RESIDENTSdefine" id="RESIDENTSdefine"></a> <b>Define</b>
  42514. <ul>
  42515. <code>define &lt;rgr_ResidentsName&gt; RESIDENTS</code><br>
  42516. <br>
  42517. Provides a special virtual device to represent a group of individuals living at your home.<br>
  42518. It locically combines individual states of <a href="#ROOMMATE">ROOMMATE</a> and <a href="#GUEST">GUEST</a> devices and allows state changes for all members.<br>
  42519. Based on the current state and other readings, you may trigger other actions within FHEM.<br>
  42520. <br>
  42521. Example:<br>
  42522. <ul>
  42523. <code># Standalone<br>
  42524. define rgr_Residents RESIDENTS</code>
  42525. </ul>
  42526. </ul><br>
  42527. <br>
  42528. <a name="RESIDENTSset" id="RESIDENTSset"></a> <b>Set</b>
  42529. <ul>
  42530. <code>set &lt;rgr_ResidentsName&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  42531. <br>
  42532. Currently, the following commands are defined.<br>
  42533. <ul>
  42534. <li>
  42535. <b>addGuest</b> &nbsp;&nbsp;-&nbsp;&nbsp; creates a new GUEST device and adds it to the current RESIDENTS group. Just enter the dummy name and there you go.
  42536. </li>
  42537. <li>
  42538. <b>addRoommate</b> &nbsp;&nbsp;-&nbsp;&nbsp; creates a new ROOMMATE device and adds it to the current RESIDENTS group. Just enter the first name and there you go.
  42539. </li>
  42540. <li>
  42541. <b>removeGuest</b> &nbsp;&nbsp;-&nbsp;&nbsp; shows all GUEST members and allows to delete their dummy devices easily.
  42542. </li>
  42543. <li>
  42544. <b>removeRoommate</b> &nbsp;&nbsp;-&nbsp;&nbsp; shows all ROOMMATE members and allows to delete their dummy devices easily.
  42545. </li>
  42546. <li>
  42547. <b>state</b> &nbsp;&nbsp;home,gotosleep,asleep,awoken,absent,gone&nbsp;&nbsp; switch between states for all group members at once; see attribute rgr_states to adjust list shown in FHEMWEB
  42548. </li>
  42549. <li>
  42550. <b>create</b> &nbsp;&nbsp;wakeuptimer&nbsp;&nbsp; add several pre-configurations provided by RESIDENTS Toolkit. See separate section for details.
  42551. </li>
  42552. </ul>
  42553. <ul>
  42554. <u>Note:</u> If you would like to restrict access to admin set-commands (-> addGuest, addRoommate, removeGuest, create) you may set your FHEMWEB instance's attribute allowedCommands like 'set,set-user'.
  42555. The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
  42556. </ul>
  42557. </ul><br>
  42558. <br>
  42559. <ul>
  42560. <u>Possible states and their meaning</u><br>
  42561. <br>
  42562. <ul>
  42563. This module differs between 7 states:<br>
  42564. <br>
  42565. <ul>
  42566. <li>
  42567. <b>home</b> - residents are present at home and at least one of them is not asleep
  42568. </li>
  42569. <li>
  42570. <b>gotosleep</b> - present residents are on their way to bed (if they are not asleep already)
  42571. </li>
  42572. <li>
  42573. <b>asleep</b> - all present residents are currently sleeping
  42574. </li>
  42575. <li>
  42576. <b>awoken</b> - at least one resident just woke up from sleep
  42577. </li>
  42578. <li>
  42579. <b>absent</b> - no resident is currently at home but at least one will be back shortly
  42580. </li>
  42581. <li>
  42582. <b>gone</b> - all residents left home for longer period
  42583. </li>
  42584. <li>
  42585. <b>none</b> - no active member
  42586. </li>
  42587. </ul><br>
  42588. <br>
  42589. Note: State 'none' cannot explicitly be set. Setting state to 'gone' will be handled as 'none' for GUEST member devices.
  42590. </ul>
  42591. </ul><br>
  42592. <br>
  42593. <a name="RESIDENTSattr" id="RESIDENTSattr"></a> <b>Attributes</b><br>
  42594. <ul>
  42595. <ul>
  42596. <li>
  42597. <b>rgr_lang</b> - overwrite global language setting; helps to set device attributes to translate FHEMWEB display text
  42598. </li>
  42599. <li>
  42600. <b>rgr_noDuration</b> - may be used to disable continuous, non-event driven duration timer calculation (see readings durTimer*)
  42601. </li>
  42602. <li>
  42603. <b>rgr_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
  42604. </li>
  42605. <li>
  42606. <b>rgr_states</b> - list of states to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces; unsupported states will lead to errors though
  42607. </li>
  42608. <li>
  42609. <b>rgr_wakeupDevice</b> - reference to enslaved DUMMY devices used as a wake-up timer (part of RESIDENTS Toolkit's wakeuptimer)
  42610. </li>
  42611. </ul>
  42612. </ul><br>
  42613. <br>
  42614. <br>
  42615. <b>Generated Readings/Events:</b><br>
  42616. <ul>
  42617. <ul>
  42618. <li>
  42619. <b>lastActivity</b> - the last state change of one of the group members
  42620. </li>
  42621. <li>
  42622. <b>lastActivityBy</b> - the realname of the last group member with changed state
  42623. </li>
  42624. <li>
  42625. <b>lastArrival</b> - timestamp of last arrival at home
  42626. </li>
  42627. <li>
  42628. <b>lastAwake</b> - timestamp of last sleep cycle end
  42629. </li>
  42630. <li>
  42631. <b>lastDeparture</b> - timestamp of last departure from home
  42632. </li>
  42633. <li>
  42634. <b>lastDurAbsence</b> - duration of last absence from home in human readable format (hours:minutes:seconds)
  42635. </li>
  42636. <li>
  42637. <b>lastDurAbsence_cr</b> - duration of last absence from home in computer readable format (minutes)
  42638. </li>
  42639. <li>
  42640. <b>lastDurPresence</b> - duration of last presence at home in human readable format (hours:minutes:seconds)
  42641. </li>
  42642. <li>
  42643. <b>lastDurPresence_cr</b> - duration of last presence at home in computer readable format (minutes)
  42644. </li>
  42645. <li>
  42646. <b>lastDurSleep</b> - duration of last sleep in human readable format (hours:minutes:seconds)
  42647. </li>
  42648. <li>
  42649. <b>lastDurSleep_cr</b> - duration of last sleep in computer readable format (minutes)
  42650. </li>
  42651. <li>
  42652. <b>lastSleep</b> - timestamp of last sleep cycle begin
  42653. </li>
  42654. <li>
  42655. <b>lastState</b> - the prior state
  42656. </li>
  42657. <li>
  42658. <b>lastWakeup</b> - time of last wake-up timer run
  42659. </li>
  42660. <li>
  42661. <b>lastWakeupDev</b> - device name of last wake-up timer
  42662. </li>
  42663. <li>
  42664. <b>nextWakeup</b> - time of next wake-up program run
  42665. </li>
  42666. <li>
  42667. <b>nextWakeupDev</b> - device name for next wake-up program run
  42668. </li>
  42669. <li>
  42670. <b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
  42671. </li>
  42672. <li>
  42673. <b>residentsAbsent</b> - number of residents with state 'absent'
  42674. </li>
  42675. <li>
  42676. <b>residentsAbsentDevs</b> - device name of residents with state 'absent'
  42677. </li>
  42678. <li>
  42679. <b>residentsAbsentNames</b> - device alias of residents with state 'absent'
  42680. </li>
  42681. <li>
  42682. <b>residentsAsleep</b> - number of residents with state 'asleep'
  42683. </li>
  42684. <li>
  42685. <b>residentsAsleepDevs</b> - device name of residents with state 'asleep'
  42686. </li>
  42687. <li>
  42688. <b>residentsAsleepNames</b> - device alias of residents with state 'asleep'
  42689. </li>
  42690. <li>
  42691. <b>residentsAwoken</b> - number of residents with state 'awoken'
  42692. </li>
  42693. <li>
  42694. <b>residentsAwokenDevs</b> - device name of residents with state 'awoken'
  42695. </li>
  42696. <li>
  42697. <b>residentsAwokenNames</b> - device alias of residents with state 'awoken'
  42698. </li>
  42699. <li>
  42700. <b>residentsGone</b> - number of residents with state 'gone'
  42701. </li>
  42702. <li>
  42703. <b>residentsGoneDevs</b> - device name of residents with state 'gone'
  42704. </li>
  42705. <li>
  42706. <b>residentsGoneNames</b> - device alias of residents with state 'gone'
  42707. </li>
  42708. <li>
  42709. <b>residentsGotosleep</b> - number of residents with state 'gotosleep'
  42710. </li>
  42711. <li>
  42712. <b>residentsGotosleepDevs</b> - device name of residents with state 'gotosleep'
  42713. </li>
  42714. <li>
  42715. <b>residentsGotosleepNames</b> - device alias of residents with state 'gotosleep'
  42716. </li>
  42717. <li>
  42718. <b>residentsHome</b> - number of residents with state 'home'
  42719. </li>
  42720. <li>
  42721. <b>residentsHomeDevs</b> - device name of residents with state 'home'
  42722. </li>
  42723. <li>
  42724. <b>residentsHomeNames</b> - device alias of residents with state 'home'
  42725. </li>
  42726. <li>
  42727. <b>residentsTotal</b> - total number of all active residents despite their current state
  42728. </li>
  42729. <li>
  42730. <b>residentsTotalAbsent</b> - number of all residents who are currently underway
  42731. </li>
  42732. <li>
  42733. <b>residentsTotalAbsentDevs</b> - device name of all residents who are currently underway
  42734. </li>
  42735. <li>
  42736. <b>residentsTotalAbsentNames</b> - device alias of all residents who are currently underway
  42737. </li>
  42738. <li>
  42739. <b>residentsTotalGuests</b> - number of active guests who are currently treated as part of the residents scope
  42740. </li>
  42741. <li>
  42742. <b>residentsTotalGuestsAbsent</b> - number of all active guests who are currently underway
  42743. </li>
  42744. <li>
  42745. <b>residentsTotalGuestsAbsentDevs</b> - device name of all active guests who are currently underway
  42746. </li>
  42747. <li>
  42748. <b>residentsTotalGuestsAbsentNames</b> - device alias of all active guests who are currently underway
  42749. </li>
  42750. <li>
  42751. <b>residentsTotalGuestsPresent</b> - number of all active guests who are currently at home
  42752. </li>
  42753. <li>
  42754. <b>residentsTotalGuestsPresentDevs</b> - device name of all active guests who are currently at home
  42755. </li>
  42756. <li>
  42757. <b>residentsTotalGuestsPresentNames</b> - device alias of all active guests who are currently at home
  42758. </li>
  42759. <li>
  42760. <b>residentsTotalRoommates</b> - number of residents treated as being a permanent resident
  42761. </li>
  42762. <li>
  42763. <b>residentsTotalRoommatesAbsent</b> - number of all roommates who are currently underway
  42764. </li>
  42765. <li>
  42766. <b>residentsTotalRoommatesAbsentDevs</b> - device name of all roommates who are currently underway
  42767. </li>
  42768. <li>
  42769. <b>residentsTotalRoommatesAbsentNames</b> - device alias of all roommates who are currently underway
  42770. </li>
  42771. <li>
  42772. <b>residentsTotalRoommatesPresent</b> - number of all roommates who are currently at home
  42773. </li>
  42774. <li>
  42775. <b>residentsTotalRoommatesPresentDevs</b> - device name of all roommates who are currently at home
  42776. </li>
  42777. <li>
  42778. <b>residentsTotalRoommatesPresentNames</b> - device alias of all roommates who are currently at home
  42779. </li>
  42780. <li>
  42781. <b>residentsTotalPresent</b> - number of all residents who are currently at home
  42782. </li>
  42783. <li>
  42784. <b>residentsTotalPresentDevs</b> - device name of all residents who are currently at home
  42785. </li>
  42786. <li>
  42787. <b>residentsTotalPresentNames</b> - device alias of all residents who are currently at home
  42788. </li>
  42789. <li>
  42790. <b>residentsTotalWakeup</b> - number of all residents which currently have a wake-up program being executed
  42791. </li>
  42792. <li>
  42793. <b>residentsTotalWakeupDevs</b> - device name of all residents which currently have a wake-up program being executed
  42794. </li>
  42795. <li>
  42796. <b>residentsTotalWakeupNames</b> - device alias of all residents which currently have a wake-up program being executed
  42797. </li>
  42798. <li>
  42799. <b>residentsTotalWayhome</b> - number of all active residents who are currently on their way back home
  42800. </li>
  42801. <li>
  42802. <b>residentsTotalWayhomeDevs</b> - device name of all active residents who are currently on their way back home
  42803. </li>
  42804. <li>
  42805. <b>residentsTotalWayhomeNames</b> - device alias of all active residents who are currently on their way back home
  42806. </li>
  42807. <li>
  42808. <b>residentsTotalWayhomeDelayed</b> - number of all residents who are delayed on their way back home
  42809. </li>
  42810. <li>
  42811. <b>residentsTotalWayhomeDelayedDevs</b> - device name of all delayed residents who are currently on their way back home
  42812. </li>
  42813. <li>
  42814. <b>residentsTotalWayhomeDelayedNames</b> - device alias of all delayed residents who are currently on their way back home
  42815. </li>
  42816. <li>
  42817. <b>state</b> - reflects the current state
  42818. </li>
  42819. <li>
  42820. <b>wakeup</b> - becomes '1' while a wake-up program of this resident group is being executed
  42821. </li>
  42822. </ul>
  42823. </ul>
  42824. <br>
  42825. <br>
  42826. <b>RESIDENTS Toolkit</b><br>
  42827. <ul>
  42828. <ul>
  42829. Using set-command <code>create</code> you may add pre-configured configurations to your RESIDENTS, <a href="#ROOMMATE">ROOMMATE</a> or <a href="#GUEST">GUEST</a> devices for your convenience.<br>
  42830. The following commands are currently available:<br>
  42831. <br>
  42832. <li>
  42833. <b>wakeuptimer</b> &nbsp;&nbsp;-&nbsp;&nbsp; adds a wake-up timer dummy device with enhanced functions to start with wake-up automations
  42834. <ul>
  42835. A notify device is created to be used as a Macro to carry out your actual automations. The macro is triggered by a normal at device you may customize as well. However, a special RESIDENTS Toolkit function is handling the wake-up trigger event for you.<br>
  42836. The time of activated wake-up timers may be relatively increased or decreased by using +<MINUTES> or -<MINUTES> respectively. +HH:MM can be used as well.<br>
  42837. <br>
  42838. The wake-up behaviour may be influenced by the following device attributes:<br>
  42839. <li>
  42840. <i>wakeupAtdevice</i> - backlink the at device (mandatory)
  42841. </li>
  42842. <li>
  42843. <i>wakeupDays</i> - only trigger macro at these days. Mon=1,Tue=2,Wed=3,Thu=4,Fri=5,Sat=6,Sun=0 (optional)
  42844. </li>
  42845. <li>
  42846. <i>wakeupDefaultTime</i> - after triggering macro reset the wake-up time to this default value (optional)
  42847. </li>
  42848. <li>
  42849. <i>wakeupEnforced</i> - Enforce wake-up (optional; 0=no, 1=yes, 2=if wake-up time is not wakeupDefaultTime, 3=if wake-up time is earlier than wakeupDefaultTime)
  42850. </li>
  42851. <li>
  42852. <i>wakeupHolidays</i> - May trigger macro on holidays or non-holidays (optional; andHoliday=on holidays also considering wakeupDays, orHoliday=on holidays independently of wakeupDays, andNoHoliday=on non-holidays also considering wakeupDays, orNoHoliday=on non-holidays independently of wakeupDays)
  42853. </li>
  42854. <li>
  42855. <i>wakeupMacro</i> - name of the notify macro device (mandatory)
  42856. </li>
  42857. <li>
  42858. <i>wakeupOffset</i> - value in minutes to trigger your macro earlier than the user requested to be woken up, e.g. if you have a complex wake-up program over 30 minutes (defaults to 0)
  42859. </li>
  42860. <li>
  42861. <i>wakeupResetSwitcher</i> - DUMMY device to quickly turn on/off reset function (optional, device will be auto-created)
  42862. </li>
  42863. <li>
  42864. <i>wakeupResetdays</i> - if wakeupDefaultTime is set you may restrict timer reset to specific days only. Mon=1,Tue=2,Wed=3,Thu=4,Fri=5,Sat=6,Sun=0 (optional)
  42865. </li>
  42866. <li>
  42867. <i>wakeupUserdevice</i> - backlink to RESIDENTS, ROOMMATE or GUEST device to check it's status (mandatory)
  42868. </li>
  42869. <li>
  42870. <i>wakeupWaitPeriod</i> - waiting period threshold in minutes until wake-up program may be triggered again, e.g. if you manually set an earlier wake-up time than normal while using wakeupDefaultTime. Does not apply in case wake-up time was changed during this period; defaults to 360 minutes / 6h (optional)
  42871. </li>
  42872. </ul>
  42873. </li>
  42874. </ul>
  42875. </ul>
  42876. </ul>
  42877. <a name="RFHEM"></a>
  42878. <h3>RFHEM</h3>
  42879. <ul>This module is a easy helper module to connect separate FHEM installations</ul>
  42880. <ul>You can send commands to other installations or send them automatically.</ul>
  42881. <b>Define</b>
  42882. <ul><code>define &lt;Name&gt; RFHEM &lt;hostname[:port]&gt; &lt;[pw]&gt;</code></ul><br>
  42883. <ul><code>define remotePI RFHEM christian-pi test123</code></ul><br>
  42884. <a name="RFHEM set"></a>
  42885. <b>Set</b>
  42886. <ul><code>set &lt;Name&gt; cmd &lt;fhem command&gt;</code></ul><br>
  42887. <ul><code>set remotePI cmd set lampe on</code></ul>
  42888. <b>Attribute</b>
  42889. <li>RFHEMdevs<br>
  42890. a list of devices separated by comma
  42891. all events of this devices will be set on the remote installation automatically
  42892. there must be device with the same nameon the other side (dummys)
  42893. </li><br>
  42894. <li>RFHEMevents<br>
  42895. a list of events separated by comma
  42896. all events of RFHEMdevs will be set on the remote installation automatically
  42897. </li><br>
  42898. <ul>this modul can be perfectly used with notify:</ul>
  42899. <ul><code>define LichtschlauchNotify notify wz.LichtschlauchDummy { fhem "set RemotePI cmd set Wohnzimmer.Lichtschlauch $EVENT" }</code></ul><br>
  42900. <a name="RFXCOM"></a>
  42901. <h3>RFXCOM</h3>
  42902. <ul>
  42903. This module is for the old <a href="http://www.rfxcom.com">RFXCOM</a> USB or LAN based 433 Mhz RF receivers and transmitters (order order code 80002 and others). It does not support the new RFXtrx433 transmitter because it uses a different protocol. See <a href="#RFXTRX">RFXTRX</a> for support of the RFXtrx433 transmitter.<br>
  42904. These receivers supports many protocols like Oregon Scientific weather sensors, RFXMeter devices, X10 security and lighting devices and others. <br>
  42905. Currently the following parser modules are implemented: <br>
  42906. <ul>
  42907. <li> 41_OREGON.pm (see device <a href="#OREGON">OREGON</a>): Process messages Oregon Scientific weather sensors.
  42908. See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> of
  42909. Oregon Scientific weather sensors that could be received by the RFXCOM receivers.
  42910. Until now the following Oregon Scientific weather sensors have been tested successfully: BTHR918, BTHR918N, PCR800, RGR918, THGR228N, THGR810, THR128, THWR288A, WTGR800, WGR918. It will probably work with many other Oregon sensors supported by RFXCOM receivers. Please give feedback if you use other sensors.<br>
  42911. </li>
  42912. <li> 42_RFXMETER.pm (see device <a href="#RFXMETER">RFXMETER</a>): Process RFXCOM RFXMeter devices. See <a href="http://www.rfxcom.com/sensors.htm">http://www.rfxcom.com/sensors.htm</a>.</li>
  42913. <li> 43_RFXX10REC.pm (see device <a href="#RFXX10REC">RFXX10REC</a>): Process X10 security and X10 lighting devices. </li>
  42914. </ul>
  42915. <br>
  42916. Note: this module requires the Device::SerialPort or Win32::SerialPort module
  42917. if the devices is connected via USB or a serial port.
  42918. <br><br>
  42919. <a name="RFXCOMdefine"></a>
  42920. <b>Define</b>
  42921. <ul>
  42922. <code>define &lt;name&gt; RFXCOM &lt;device&gt; [noinit] </code><br>
  42923. </ul>
  42924. <br>
  42925. USB-connected (80002):<br><ul>
  42926. &lt;device&gt; specifies the USB port to communicate with the RFXCOM receiver.
  42927. Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
  42928. For example /dev/ttyUSB0.<br>
  42929. <br>
  42930. Example: <br>
  42931. <code>define RFXCOMUSB RFXCOM /dev/ttyUSB0</code>
  42932. <br>
  42933. </ul>
  42934. <br>
  42935. Network-connected devices:
  42936. <br><ul>
  42937. &lt;device&gt; specifies the host:port of the device. E.g.
  42938. 192.168.1.5:10001
  42939. </ul>
  42940. <ul>
  42941. noninit is optional and issues that the RFXCOM device should not be
  42942. initialized. This is useful if you share a RFXCOM device. It is also useful
  42943. for testing to simulate a RFXCOM receiver via netcat or via FHEM2FHEM.
  42944. <br>
  42945. <br>
  42946. Example: <br>
  42947. <code>define RFXCOMTCP RFXCOM 192.168.1.5:10001</code>
  42948. <br>
  42949. <code>define RFXCOMTCP2 RFXCOM 192.168.1.121:10001 noinit</code>
  42950. <br>
  42951. </ul>
  42952. <br>
  42953. <ul>
  42954. <li><a href="#attrdummy">dummy</a></li><br>
  42955. <li>longids<br>
  42956. Comma separated list of device-types for RFXCOM that should be handled using long IDs. This additional ID is a one byte hex string and is generated by the Oregon sensor when is it powered on. The value seems to be randomly generated. This has the advantage that you may use more than one Oregon sensor of the same type even if it has no switch to set a sensor id. For example the author uses two BTHR918N sensors at the same time. All have different deviceids. The drawback is that the deviceid changes after changing batteries. All devices listed as longids will get an additional one byte hex string appended to the device name.<br>
  42957. Default is to use long IDs for all devices.
  42958. <br><br>
  42959. Examples:<PRE>
  42960. # Do not use any long IDs for any devices:
  42961. attr RFXCOMUSB longids 0
  42962. # Use any long IDs for all devices (this is default):
  42963. attr RFXCOMUSB longids 1
  42964. # Use longids for BTHR918N devices.
  42965. # Will generate devices names like BTHR918N_f3.
  42966. attr RFXCOMUSB longids BTHR918N
  42967. # Use longids for TX3_T and TX3_H devices.
  42968. # Will generate devices names like TX3_T_07, TX3_T_01 ,TX3_H_07.
  42969. attr RFXCOMUSB longids TX3_T,TX3_H</PRE>
  42970. </li><br>
  42971. </ul>
  42972. </ul>
  42973. <a name="RFXMETER"></a>
  42974. <h3>RFXMETER</h3>
  42975. <ul>
  42976. The RFXMETER module interprets RFXCOM RFXMeter messages received by a RFXCOM receiver. You need to define an RFXCOM receiver first.
  42977. See the <a href="#RFXCOM">RFXCOM</a>.
  42978. <br><br>
  42979. <a name="RFXMETERdefine"></a>
  42980. <b>Define</b>
  42981. <ul>
  42982. <code>define &lt;name&gt; RFXMETER &lt;deviceid&gt; [&lt;scalefactor&gt;] [&lt;unitname&gt;]</code> <br>
  42983. <br>
  42984. &lt;deviceid&gt; is the device identifier of the RFXMeter sensor and is a one byte hexstring (00-ff).
  42985. <br>
  42986. &lt;scalefactor&gt; is an optional scaling factor. It is multiplied to the value that is received from the RFXmeter sensor.
  42987. <br>
  42988. &lt;unitname&gt; is an optional string that describes the value units. It is added to the Reading generated to describe the values.
  42989. <br><br>
  42990. Example: <br>
  42991. <code>define RFXWater RFXMETER 00 0.5 ltr</code>
  42992. <br>
  42993. <code>define RFXPower RFXMETER 01 0.001 kwh</code>
  42994. <br>
  42995. <code>define RFXGas RFXMETER 02 0.01 cu_m</code>
  42996. <br>
  42997. </ul>
  42998. <br>
  42999. <a name="RFXMETERset"></a>
  43000. <b>Set</b> <ul>N/A</ul><br>
  43001. <a name="RFXMETERget"></a>
  43002. <b>Get</b> <ul>N/A</ul><br>
  43003. <a name="RFXMETERattr"></a>
  43004. <b>Attributes</b>
  43005. <ul>
  43006. <li><a href="#ignore">ignore</a></li><br>
  43007. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  43008. </ul>
  43009. </ul>
  43010. <a name="RFXX10REC"></a>
  43011. <h3>RFXX10REC</h3>
  43012. <ul>
  43013. The RFXX10REC module interprets X10 security and X10 lighting messages received by a RFXCOM RF receiver. Reported also to work with KlikAanKlikUit. You need to define an RFXCOM receiver first.
  43014. See <a href="#RFXCOM">RFXCOM</a>.
  43015. <br><br>
  43016. <a name="RFXX10RECdefine"></a>
  43017. <b>Define</b>
  43018. <ul>
  43019. <code>define &lt;name&gt; RFXX10REC &lt;type&gt; &lt;deviceid&gt; &lt;devicelog&gt; [&lt;deviceid&gt; &lt;devicelog&gt;] </code> <br>
  43020. <br>
  43021. <code>&lt;type&gt;</code>
  43022. <ul>
  43023. specifies the type of the X10 device: <br>
  43024. X10 security devices:
  43025. <ul>
  43026. <li> <code>ds10a</code> (X10 security ds10a Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed], status of the delay switch [min|max]], and battery status [ok|low].)</li>
  43027. <li> <code>ms10a</code> (X10 security ms10a motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
  43028. <li> <code>sd90</code> (Marmitek sd90 smoke detector. This device type reports the status of the smoke detector [normal|alert] and battery status [ok|low].)</li>
  43029. <li> <code>kr18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
  43030. </ul>
  43031. X10 lighting devices:
  43032. <ul>
  43033. <li> <code>ms14a</code> (X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor)) </li>
  43034. <li> <code>x10</code> (All other x10 devices. Report [on|off] on both deviceids.)</li>
  43035. </ul>
  43036. </ul>
  43037. <br>
  43038. <code>&lt;deviceid&gt;</code>
  43039. <ul>
  43040. specifies the first device id of the device. X10 security have a a 16-Bit device id which has to be written as a hex-string (example "5a54").
  43041. A X10 lighting device has a house code A..P followed by a unitcode 1..16 (example "B1").
  43042. </ul>
  43043. <br>
  43044. <code>&lt;devicelog&gt;</code>
  43045. <ul>
  43046. is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "Smoke" for sd90.
  43047. </ul>
  43048. <br>
  43049. <code>&lt;deviceid2&gt;</code>
  43050. <ul>
  43051. is optional and specifies the second device id of the device if it exists. For example sd90 smoke sensors can be configured to report two device ids. ms14a motion sensors report motion status on the first deviceid and the status of the light sensor on the second deviceid.
  43052. </ul>
  43053. <br>
  43054. <code>&lt;devicelog2&gt;</code>
  43055. <ul>
  43056. is optional for the name used for the Reading of <code>&lt;deviceid2&gt;</code>.
  43057. </ul>
  43058. <br>
  43059. Example: <br>
  43060. <code>define livingroom_window RFXX10REC ds10a 72cd Window</code>
  43061. <br>
  43062. <code>define motion_sensor1 RFXX10REC ms10a 55c6 motion</code>
  43063. <br>
  43064. <code>define smoke_sensor1 RFXX10REC sd90 54d3 Smoke 54d3 Smoketest</code>
  43065. <br>
  43066. <code>define motion_sensor2 RFXX10REC ms14a A1 motion A2 light</code>
  43067. <br>
  43068. </ul>
  43069. <br>
  43070. <a name="RFXX10RECset"></a>
  43071. <b>Set</b> <ul>N/A</ul><br>
  43072. <a name="RFXX10RECget"></a>
  43073. <b>Get</b> <ul>N/A</ul><br>
  43074. <a name="RFXX10RECattr"></a>
  43075. <b>Attributes</b>
  43076. <ul>
  43077. <li><a href="#ignore">ignore</a></li><br>
  43078. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  43079. </ul>
  43080. </ul>
  43081. <a name="ROOMMATE" id="ROOMMATE"></a>
  43082. <h3>ROOMMATE</h3>
  43083. <ul>
  43084. <a name="ROOMMATEdefine" id="ROOMMATEdefine"></a> <b>Define</b>
  43085. <ul>
  43086. <code>define &lt;rr_FirstName&gt; ROOMMATE [&lt;device name(s) of resident group(s)&gt;]</code><br>
  43087. <br>
  43088. Provides a special virtual device to represent a resident of your home.<br>
  43089. Based on the current state and other readings, you may trigger other actions within FHEM.<br>
  43090. <br>
  43091. Used by superior module <a href="#RESIDENTS">RESIDENTS</a> but may also be used stand-alone.<br>
  43092. <br />
  43093. Use comma separated list of resident device names for multi-membership (see example below).<br />
  43094. <br>
  43095. Example:<br>
  43096. <ul>
  43097. <code># Standalone<br>
  43098. define rr_Manfred ROOMMATE<br>
  43099. <br>
  43100. # Typical group member<br>
  43101. define rr_Manfred ROOMMATE rgr_Residents # to be member of resident group rgr_Residents<br>
  43102. <br>
  43103. # Member of multiple groups<br>
  43104. define rr_Manfred ROOMMATE rgr_Residents,rgr_Parents # to be member of resident group rgr_Residents and rgr_Parents<br>
  43105. <br>
  43106. # Complex family structure<br>
  43107. define rr_Manfred ROOMMATE rgr_Residents,rgr_Parents # Parent<br>
  43108. define rr_Lisa ROOMMATE rgr_Residents,rgr_Parents # Parent<br>
  43109. define rr_Rick ROOMMATE rgr_Residents,rgr_Children # Child1<br>
  43110. define rr_Alex ROOMMATE rgr_Residents,rgr_Children # Child2</code>
  43111. </ul>
  43112. </ul><br>
  43113. <br>
  43114. <br>
  43115. <a name="ROOMMATEset" id="ROOMMATEset"></a> <b>Set</b>
  43116. <ul>
  43117. <code>set &lt;rr_FirstName&gt; &lt;command&gt; [&lt;parameter&gt;]</code><br>
  43118. <br>
  43119. Currently, the following commands are defined.<br>
  43120. <ul>
  43121. <li>
  43122. <b>location</b> &nbsp;&nbsp;-&nbsp;&nbsp; sets reading 'location'; see attribute rr_locations to adjust list shown in FHEMWEB
  43123. </li>
  43124. <li>
  43125. <b>mood</b> &nbsp;&nbsp;-&nbsp;&nbsp; sets reading 'mood'; see attribute rr_moods to adjust list shown in FHEMWEB
  43126. </li>
  43127. <li>
  43128. <b>state</b> &nbsp;&nbsp;home,gotosleep,asleep,awoken,absent,gone&nbsp;&nbsp; switch between states; see attribute rr_states to adjust list shown in FHEMWEB
  43129. </li>
  43130. <li>
  43131. <b>create</b>
  43132. <li><i>locationMap</i>&nbsp;&nbsp; add a pre-configured weblink device using showing a Google Map if readings locationLat+locationLong are present.</li>
  43133. <li><i>wakeuptimer</i>&nbsp;&nbsp; add several pre-configurations provided by RESIDENTS Toolkit. See separate section in <a href="#RESIDENTS">RESIDENTS module commandref</a> for details.</li>
  43134. </li>
  43135. </ul>
  43136. <ul>
  43137. <u>Note:</u> If you would like to restrict access to admin set-commands (-> create) you may set your FHEMWEB instance's attribute allowedCommands like 'set,set-user'.
  43138. The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
  43139. </ul>
  43140. </ul><br>
  43141. <br>
  43142. <ul>
  43143. <u>Possible states and their meaning</u><br>
  43144. <br>
  43145. <ul>
  43146. This module differs between 6 states:<br>
  43147. <br>
  43148. <ul>
  43149. <li>
  43150. <b>home</b> - individual is present at home and awake
  43151. </li>
  43152. <li>
  43153. <b>gotosleep</b> - individual is on it's way to bed
  43154. </li>
  43155. <li>
  43156. <b>asleep</b> - individual is currently sleeping
  43157. </li>
  43158. <li>
  43159. <b>awoken</b> - individual just woke up from sleep
  43160. </li>
  43161. <li>
  43162. <b>absent</b> - individual is not present at home but will be back shortly
  43163. </li>
  43164. <li>
  43165. <b>gone</b> - individual is away from home for longer period
  43166. </li>
  43167. </ul>
  43168. </ul>
  43169. </ul><br>
  43170. <br>
  43171. <ul>
  43172. <u>Presence correlation to location</u><br>
  43173. <br>
  43174. <ul>
  43175. Under specific circumstances, changing state will automatically change reading 'location' as well.<br>
  43176. <br>
  43177. Whenever presence state changes from 'absent' to 'present', the location is set to 'home'. If attribute rr_locationHome was defined, first location from it will be used as home location.<br>
  43178. <br>
  43179. Whenever presence state changes from 'present' to 'absent', the location is set to 'underway'. If attribute rr_locationUnderway was defined, first location from it will be used as underway location.
  43180. </ul>
  43181. </ul><br>
  43182. <br>
  43183. <ul>
  43184. <u>Auto Gone</u><br>
  43185. <br>
  43186. <ul>
  43187. Whenever an individual is set to 'absent', a trigger is started to automatically change state to 'gone' after a specific timeframe.<br>
  43188. Default value is 36 hours.<br>
  43189. <br>
  43190. This behaviour can be customized by attribute rr_autoGoneAfter.
  43191. </ul>
  43192. </ul><br>
  43193. <br>
  43194. <ul>
  43195. <u>Synchronizing presence with other ROOMMATE or GUEST devices</u><br>
  43196. <br>
  43197. <ul>
  43198. If you always leave or arrive at your house together with other roommates or guests, you may enable a synchronization of your presence state for certain individuals.<br>
  43199. By setting attribute rr_passPresenceTo, those individuals will follow your presence state changes to 'home', 'absent' or 'gone' as you do them with your own device.<br>
  43200. <br>
  43201. Please note that individuals with current state 'gone' or 'none' (in case of guests) will not be touched.
  43202. </ul>
  43203. </ul><br>
  43204. <br>
  43205. <ul>
  43206. <u>Location correlation to state</u><br>
  43207. <br>
  43208. <ul>
  43209. Under specific circumstances, changing location will have an effect on the actual state as well.<br>
  43210. <br>
  43211. Whenever location is set to 'home', the state is set to 'home' if prior presence state was 'absent'. If attribute rr_locationHome was defined, all of those locations will trigger state change to 'home' as well.<br>
  43212. <br>
  43213. Whenever location is set to 'underway', the state is set to 'absent' if prior presence state was 'present'. If attribute rr_locationUnderway was defined, all of those locations will trigger state change to 'absent' as well. Those locations won't appear in reading 'lastLocation'.<br>
  43214. <br>
  43215. Whenever location is set to 'wayhome', the reading 'wayhome' is set to '1' if current presence state is 'absent'. If attribute rr_locationWayhome was defined, LEAVING one of those locations will set reading 'wayhome' to '1' as well. So you actually have implicit and explicit options to trigger wayhome.<br>
  43216. Arriving at home will reset the value of 'wayhome' to '0'.<br>
  43217. <br>
  43218. If you are using the <a href="#GEOFANCY">GEOFANCY</a> module, you can easily have your location updated with GEOFANCY events by defining a simple NOTIFY-trigger like this:<br>
  43219. <br>
  43220. <code>define n_rr_Manfred.location notify geofancy:currLoc_Manfred.* set rr_Manfred:FILTER=location!=$EVTPART1 location $EVTPART1</code><br>
  43221. <br>
  43222. By defining geofencing zones called 'home' and 'wayhome' in the iOS app, you automatically get all the features of automatic state changes described above.
  43223. </ul>
  43224. </ul><br>
  43225. <br>
  43226. <a name="ROOMMATEattr" id="ROOMMATEattr"></a> <b>Attributes</b><br>
  43227. <ul>
  43228. <ul>
  43229. <li>
  43230. <b>rr_autoGoneAfter</b> - hours after which state should be auto-set to 'gone' when current state is 'absent'; defaults to 36 hours
  43231. </li>
  43232. <li>
  43233. <b>rr_geofenceUUIDs</b> - comma separated list of device UUIDs updating their location via <a href="#GEOFANCY">GEOFANCY</a>. Avoids necessity for additional notify/DOIF/watchdog devices and can make GEOFANCY attribute <i>devAlias</i> obsolete. (using more than one UUID/device might not be a good idea as location my leap)
  43234. </li>
  43235. <li>
  43236. <b>rr_lang</b> - overwrite global language setting; helps to set device attributes to translate FHEMWEB display text
  43237. </li>
  43238. <li>
  43239. <b>rr_locationHome</b> - locations matching these will be treated as being at home; first entry reflects default value to be used with state correlation; separate entries by space; defaults to 'home'
  43240. </li>
  43241. <li>
  43242. <b>rr_locationUnderway</b> - locations matching these will be treated as being underway; first entry reflects default value to be used with state correlation; separate entries by comma or space; defaults to "underway"
  43243. </li>
  43244. <li>
  43245. <b>rr_locationWayhome</b> - leaving a location matching these will set reading wayhome to 1; separate entries by space; defaults to "wayhome"
  43246. </li>
  43247. <li>
  43248. <b>rr_locations</b> - list of locations to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
  43249. </li>
  43250. <li>
  43251. <b>rr_moodDefault</b> - the mood that should be set after arriving at home or changing state from awoken to home
  43252. </li>
  43253. <li>
  43254. <b>rr_moodSleepy</b> - the mood that should be set if state was changed to gotosleep or awoken
  43255. </li>
  43256. <li>
  43257. <b>rr_moods</b> - list of moods to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
  43258. </li>
  43259. <li>
  43260. <b>rr_noDuration</b> - may be used to disable continuous, non-event driven duration timer calculation (see readings durTimer*)
  43261. </li>
  43262. <li>
  43263. <b>rr_passPresenceTo</b> - synchronize presence state with other ROOMMATE or GUEST devices; separte devices by space
  43264. </li>
  43265. <li>
  43266. <b>rr_presenceDevices</b> - take over presence state from any other FHEM device. Separate more than one device with comma meaning ALL of them need to be either present or absent to trigger update of this ROOMMATE device. You may optionally add a reading name separated by :, otherwise reading name presence and state will be considered.
  43267. </li>
  43268. <li>
  43269. <b>rr_realname</b> - whenever ROOMMATE wants to use the realname it uses the value of attribute alias or group; defaults to group
  43270. </li>
  43271. <li>
  43272. <b>rr_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
  43273. </li>
  43274. <li>
  43275. <b>rr_states</b> - list of states to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces; unsupported states will lead to errors though
  43276. </li>
  43277. <li>
  43278. <b>rr_wakeupDevice</b> - reference to enslaved DUMMY devices used as a wake-up timer (part of RESIDENTS Toolkit's wakeuptimer)
  43279. </li>
  43280. </ul>
  43281. </ul><br>
  43282. <br>
  43283. <br>
  43284. <b>Generated Readings/Events:</b><br>
  43285. <ul>
  43286. <ul>
  43287. <li>
  43288. <b>durTimerAbsence</b> - timer to show the duration of absence from home in human readable format (hours:minutes:seconds)
  43289. </li>
  43290. <li>
  43291. <b>durTimerAbsence_cr</b> - timer to show the duration of absence from home in computer readable format (minutes)
  43292. </li>
  43293. <li>
  43294. <b>durTimerPresence</b> - timer to show the duration of presence at home in human readable format (hours:minutes:seconds)
  43295. </li>
  43296. <li>
  43297. <b>durTimerPresence_cr</b> - timer to show the duration of presence at home in computer readable format (minutes)
  43298. </li>
  43299. <li>
  43300. <b>durTimerSleep</b> - timer to show the duration of sleep in human readable format (hours:minutes:seconds)
  43301. </li>
  43302. <li>
  43303. <b>durTimerSleep_cr</b> - timer to show the duration of sleep in computer readable format (minutes)
  43304. </li>
  43305. <li>
  43306. <b>lastArrival</b> - timestamp of last arrival at home
  43307. </li>
  43308. <li>
  43309. <b>lastAwake</b> - timestamp of last sleep cycle end
  43310. </li>
  43311. <li>
  43312. <b>lastDeparture</b> - timestamp of last departure from home
  43313. </li>
  43314. <li>
  43315. <b>lastDurAbsence</b> - duration of last absence from home in human readable format (hours:minutes:seconds)
  43316. </li>
  43317. <li>
  43318. <b>lastDurAbsence_cr</b> - duration of last absence from home in computer readable format (minutes)
  43319. </li>
  43320. <li>
  43321. <b>lastDurPresence</b> - duration of last presence at home in human readable format (hours:minutes:seconds)
  43322. </li>
  43323. <li>
  43324. <b>lastDurPresence_cr</b> - duration of last presence at home in computer readable format (minutes)
  43325. </li>
  43326. <li>
  43327. <b>lastDurSleep</b> - duration of last sleep in human readable format (hours:minutes:seconds)
  43328. </li>
  43329. <li>
  43330. <b>lastDurSleep_cr</b> - duration of last sleep in computer readable format (minutes)
  43331. </li>
  43332. <li>
  43333. <b>lastLocation</b> - the prior location
  43334. </li>
  43335. <li>
  43336. <b>lastMood</b> - the prior mood
  43337. </li>
  43338. <li>
  43339. <b>lastSleep</b> - timestamp of last sleep cycle begin
  43340. </li>
  43341. <li>
  43342. <b>lastState</b> - the prior state
  43343. </li>
  43344. <li>
  43345. <b>lastWakeup</b> - time of last wake-up timer run
  43346. </li>
  43347. <li>
  43348. <b>lastWakeupDev</b> - device name of last wake-up timer
  43349. </li>
  43350. <li>
  43351. <b>location</b> - the current location
  43352. </li>
  43353. <li>
  43354. <b>mood</b> - the current mood
  43355. </li>
  43356. <li>
  43357. <b>nextWakeup</b> - time of next wake-up program run
  43358. </li>
  43359. <li>
  43360. <b>nextWakeupDev</b> - device name for next wake-up program run
  43361. </li>
  43362. <li>
  43363. <b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
  43364. </li>
  43365. <li>
  43366. <b>state</b> - reflects the current state
  43367. </li>
  43368. <li>
  43369. <b>wakeup</b> - becomes '1' while a wake-up program of this resident is being executed
  43370. </li>
  43371. <li>
  43372. <b>wayhome</b> - depending on current location, it can become '1' if individual is on his/her way back home
  43373. </li>
  43374. </ul>
  43375. </ul>
  43376. </ul>
  43377. <a name="RPII2C"></a>
  43378. <h3>RPII2C</h3>
  43379. (en | <a href="commandref_DE.html#RPII2C">de</a>)
  43380. <ul>
  43381. <a name="RPII2C"></a>
  43382. Provides access to Raspberry Pi's I2C interfaces for some logical modules and also directly.<br>
  43383. This modul will basically work on every linux system that provides <code>/dev/i2c-x</code>.<br><br>
  43384. <b>preliminary:</b><br>
  43385. <ul>
  43386. <li>
  43387. load I2C kernel modules (choose <b>one</b> of the following options):<br>
  43388. <ul>
  43389. <li>
  43390. open /etc/modules<br>
  43391. <ul><code>sudo nano /etc/modules</code></ul><br>
  43392. add these lines<br>
  43393. <ul><code>
  43394. i2c-dev<br>
  43395. i2c-bcm2708<br>
  43396. </code></ul>
  43397. </li>
  43398. <li>
  43399. Since Kernel 3.18.x on raspberry pi and maybe on other boards too, device tree support was implemented and enabled by default.
  43400. To enable I2C support just add
  43401. <ul><code>device_tree_param=i2c0=on,i2c1=on</code></ul> to /boot/config.txt
  43402. You can also enable just one of the I2C. In this case remove the unwantet one from the line.
  43403. </li>
  43404. <li>
  43405. On Raspbian images since 2015 just start <code>sudo raspi-config</code> and enable I2C there. Parameters will be added automaticly to /boot/config.txt
  43406. </li>
  43407. reboot
  43408. </ul>
  43409. </li><br>
  43410. <li>Choose <b>only one</b> of the three follwing methodes do grant access to <code>/dev/i2c-*</code> for FHEM user:
  43411. <ul>
  43412. <li>
  43413. <code>sudo apt-get install i2c-tools<br>
  43414. sudo adduser fhem i2c<br>
  43415. sudo reboot</code><br>
  43416. </li><br>
  43417. <li>
  43418. Add following lines into <code>/etc/init.d/fhem</code> before <code>perl fhem.pl</code> line in start or into <code>/etc/rc.local</code>:<br>
  43419. <code>
  43420. sudo chown fhem /dev/i2c-*<br>
  43421. sudo chgrp dialout /dev/i2c-*<br>
  43422. sudo chmod +t /dev/i2c-*<br>
  43423. sudo chmod 660 /dev/i2c-*<br>
  43424. </code>
  43425. </li><br>
  43426. <li>
  43427. Alternatively for Raspberry Pi you can install the gpio utility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a> library change access rights of I2C-Interface<br>
  43428. WiringPi installation is described here: <a href="#RPI_GPIO">RPI_GPIO.</a><br>
  43429. gpio utility will be automaticly used, if installed.<br>
  43430. Important: to use I2C-0 at P5 connector you must use attribute <code>swap_i2c0</code>.<br>
  43431. </li>
  43432. </ul>
  43433. </li><br>
  43434. <li>
  43435. <b>Optional</b>: access via IOCTL will be used (RECOMMENDED) if Device::SMBus is not present.<br>
  43436. To access the I2C-Bus via the Device::SMBus module, following steps are necessary:<br>
  43437. <ul><code>sudo apt-get install libmoose-perl<br>
  43438. sudo cpan Device::SMBus</code></ul><br>
  43439. </li>
  43440. <li>
  43441. <b>For Raspbian users only</b><br>
  43442. If you are using I2C-0 at P5 connector on Raspberry Pi model B with newer raspbian versions, including support for Raspberry Pi model B+, you must add following line to <code>/boot/cmdline.txt</code>:<br>
  43443. <ul><code>bcm2708.vc_i2c_override=1</code></ul><br>
  43444. </li>
  43445. </ul>
  43446. <a name="RPII2CDefine"></a><br>
  43447. <b>Define</b>
  43448. <ul>
  43449. <code>define &lt;name&gt; RPII2C &lt;I2C Bus Number&gt;</code><br>
  43450. where <code>&lt;I2C Bus Number&gt;</code> is the number of the I2C bus that should be used (0 or 1)<br><br>
  43451. </ul>
  43452. <a name="RPII2CSet"></a>
  43453. <b>Set</b>
  43454. <ul>
  43455. <li>
  43456. Write one byte (or more bytes sequentially) directly to an I2C device (for devices that have only one register to write):<br>
  43457. <code>set &lt;name&gt; writeByte &lt;I2C Address&gt; &lt;value&gt;</code><br><br>
  43458. </li>
  43459. <li>
  43460. Write n-bytes to an register range (as an series of single register write operations), beginning at the specified register:<br>
  43461. <code>set &lt;name&gt; writeByteReg &lt;I2C Address&gt; &lt;Register Address&gt; &lt;value&gt; [&lt;value&gt; [..]]</code><br><br>
  43462. </li>
  43463. <li>
  43464. Write n-bytes directly to an I2C device (as an block write operation):<br>
  43465. <code>set &lt;name&gt; writeBlock &lt;I2C Address&gt; &lt;Register Address&gt; &lt;value&gt; [&lt;value&gt; [..]]</code><br><br>
  43466. </li>
  43467. <li>
  43468. Write n-bytes to an register range (as an block write operation), beginning at the specified register:<br>
  43469. <code>set &lt;name&gt; writeBlockReg &lt;I2C Address&gt; &lt;Register Address&gt; &lt;value&gt; [&lt;value&gt; [..]]</code><br><br>
  43470. </li><br>
  43471. Examples:
  43472. <ul>
  43473. Write 0xAA to device with I2C address 0x60<br>
  43474. <code>set test1 writeByte 60 AA</code><br>
  43475. Write 0xAA to register 0x01 of device with I2C address 0x6E<br>
  43476. <code>set test1 writeByteReg 6E 01 AA</code><br>
  43477. Write 0xAA to register 0x01 of device with I2C address 0x6E, after it write 0x55 to 0x02 as two separate commands<br>
  43478. <code>set test1 writeByteReg 6E 01 AA 55</code><br>
  43479. Write 0xA4 to register 0x03, 0x00 to register 0x04 and 0xDA to register 0x05 of device with I2C address 0x60 as an block command<br>
  43480. <code>set test1 writeBlock 60 03 A4 00 DA</code><br>
  43481. </ul><br>
  43482. </ul>
  43483. <a name="RPII2CGet"></a>
  43484. <b>Get</b>
  43485. <ul>
  43486. <li>
  43487. Gets value of I2C device's registers:<br>
  43488. <code>get &lt;name&gt; read &lt;I2C Address&gt; [&lt;Register Address&gt; [&lt;number of registers&gt;]]</code><br><br>
  43489. </li>
  43490. <li>
  43491. Gets value of I2C device in blockwise mode:<br>
  43492. <code>get &lt;name&gt; readblock &lt;I2C Address&gt; [&lt;number of registers&gt;]</code><br><br>
  43493. </li>
  43494. <li>
  43495. Gets value of I2C device's registers in blockwise mode:<br>
  43496. <code>get &lt;name&gt; readblockreg &lt;I2C Address&gt; &lt;Register Address&gt; [&lt;number of registers&gt;]</code><br><br>
  43497. </li><br>
  43498. Examples:
  43499. <ul>
  43500. Reads byte from device with I2C address 0x60<br>
  43501. <code>get test1 read 60</code><br>
  43502. Reads register 0x01 of device with I2C address 0x6E.<br>
  43503. <code>get test1 read 6E 01 AA 55</code><br>
  43504. Reads register 0x03 to 0x06 of device with I2C address 0x60.<br>
  43505. <code>get test1 read 60 03 4</code><br>
  43506. </ul><br>
  43507. </ul><br>
  43508. <a name="RPII2CAttr"></a>
  43509. <b>Attributes</b>
  43510. <ul>
  43511. <li>swap_i2c0<br>
  43512. Swap Raspberry Pi's I2C-0 from J5 to P5 rev. B<br>
  43513. This attribute is for Raspberry Pi only and needs gpio utility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a> library.<br>
  43514. Default: none, valid values: on, off<br><br>
  43515. </li>
  43516. <li>useHWLib<br>
  43517. Change hardware access method.<br>
  43518. Attribute exists only if both access methods are usable<br>
  43519. Default: IOCTL, valid values: IOCTL, SMBus<br><br>
  43520. </li>
  43521. <li><a href="#ignore">ignore</a></li>
  43522. <li><a href="#do_not_notify">do_not_notify</a></li>
  43523. <li><a href="#showtime">showtime</a></li>
  43524. </ul>
  43525. <br>
  43526. </ul>
  43527. <a name="RPI_GPIO"></a>
  43528. <h3>RPI_GPIO</h3>
  43529. (en | <a href="commandref_DE.html#RPI_GPIO">de</a>)
  43530. <ul>
  43531. <a name="RPI_GPIO"></a>
  43532. Raspberry Pi offers direct access to several GPIO via header P1 (and P5 on V2). The Pinout is shown in table under define.
  43533. With this module you are able to access these GPIO's directly as output or input. For input you can use either polling or interrupt mode<br>
  43534. In addition to the Raspberry Pi, also BBB, Cubie, Banana Pi and almost every linux system which provides gpio access in userspace is supported.<br>
  43535. <b>Warning: Never apply any external voltage to an output configured pin! GPIO's internal logic operate with 3,3V. Don't exceed this Voltage!</b><br><br>
  43536. <b>preliminary:</b><br>
  43537. GPIO Pins accessed by sysfs. The files are located in folder <code>/system/class/gpio</code> and belong to the gpio group (on actual Raspbian distributions since jan 2014). It will work even on an Jessie version but NOT if you perform an kerlen update<br>
  43538. After execution of following commands, GPIO's are usable whithin PRI_GPIO:<br>
  43539. <ul><code>
  43540. sudo adduser fhem gpio<br>
  43541. sudo reboot
  43542. </code></ul><br>
  43543. If attribute <code>pud_resistor</code> shall be used and on older Raspbian distributions, aditionally gpio utility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a>
  43544. library must be installed to set the internal pullup/down resistor or export and change access rights of GPIO's (for the second case active_low does <b>not</b> work).<br>
  43545. Installation WiringPi:<br>
  43546. <ul><code>
  43547. sudo apt-get update<br>
  43548. sudo apt-get upgrade<br>
  43549. sudo apt-get install git-core<br>
  43550. git clone git://git.drogon.net/wiringPi<br>
  43551. cd wiringPi
  43552. ./build
  43553. </code></ul><br>
  43554. On Linux systeme where <code>/system/class/gpio</code> can only accessed as root, GPIO's must exported and their access rights changed before FHEM starts.<br>
  43555. This can be done in <code>/etc/rc.local</code> (Examole for GPIO22 and 23):<br>
  43556. <ul><code>
  43557. echo 22 > /sys/class/gpio/export<br>
  43558. echo 23 > /sys/class/gpio/export<br>
  43559. chown -R fhem:root /sys/devices/virtual/gpio/* (or chown -R fhem:gpio /sys/devices/platform/gpio-sunxi/gpio/* for Banana Pi)<br>
  43560. chown -R fhem:root /sys/class/gpio/*<br>
  43561. </code></ul><br>
  43562. <a name="RPI_GPIODefine"></a>
  43563. <b>Define</b>
  43564. <ul>
  43565. <code>define <name> RPI_GPIO &lt;GPIO number&gt;[ &lt;GPIO-Basedir&gt;[ &lt;WiringPi-gpio-utility&gt;]]</code><br><br>
  43566. all usable <code>GPIO number</code> can be found <a href="http://www.panu.it/raspberry/">here</a><br><br>
  43567. Examples:
  43568. <pre>
  43569. define Pin12 RPI_GPIO 18
  43570. attr Pin12 poll_interval 5
  43571. define Pin12 RPI_GPIO 18 /sys/class/gpio /usr/somewhere/bin/gpio
  43572. </pre>
  43573. </ul>
  43574. <a name="RPI_GPIOSet"></a>
  43575. <b>Set</b>
  43576. <ul>
  43577. <code>set &lt;name&gt; &lt;value&gt;</code>
  43578. <br><br>
  43579. where <code>value</code> is one of:<br>
  43580. <ul><li>for output configured GPIO
  43581. <ul><code>
  43582. off<br>
  43583. on<br>
  43584. toggle<br>
  43585. </code>
  43586. </ul>
  43587. The <a href="#setExtensions"> set extensions</a> are also supported.<br>
  43588. </li>
  43589. <li>for input configured GPIO
  43590. <ul><code>
  43591. readval
  43592. </code></ul>
  43593. readval refreshes the reading Pinlevel and, if attr toggletostate not set, the state value
  43594. </ul>
  43595. </li><br>
  43596. Examples:
  43597. <ul>
  43598. <code>set Pin12 off</code><br>
  43599. <code>set Pin11,Pin12 on</code><br>
  43600. </ul><br>
  43601. </ul>
  43602. <a name="RPI_GPIOGet"></a>
  43603. <b>Get</b>
  43604. <ul>
  43605. <code>get &lt;name&gt;</code>
  43606. <br><br>
  43607. returns "high" or "low" regarding the actual status of the pin and writes this value to reading <b>Pinlevel</b>
  43608. </ul><br>
  43609. <a name="RPI_GPIOAttr"></a>
  43610. <b>Attributes</b>
  43611. <ul>
  43612. <li>direction<br>
  43613. Sets the GPIO direction to input or output.<br>
  43614. Default: input, valid values: input, output<br><br>
  43615. </li>
  43616. <li>active_low<br>
  43617. Inverts logical value<br>
  43618. Default: off, valid values: on, off<br><br>
  43619. </li>
  43620. <li>interrupt<br>
  43621. <b>can only be used with GPIO configured as input</b><br>
  43622. enables edge detection for GPIO pin<br>
  43623. on each interrupt event readings Pinlevel and state will be updated<br>
  43624. Default: none, valid values: none, falling, rising, both<br>
  43625. For "both" the reading Longpress will be added and set to on as long as kes hold down longer than 1s<br>
  43626. For "falling" and "rising" the reading Toggle will be added an will be toggled at every interrupt and the reading Counter that increments at every interrupt<br><br>
  43627. </li>
  43628. <li>poll_interval<br>
  43629. Set the polling interval in minutes to query the GPIO's level<br>
  43630. Default: -, valid values: decimal number<br><br>
  43631. </li>
  43632. <li>toggletostate<br>
  43633. <b>works with interrupt set to falling or rising only</b><br>
  43634. if yes, state will be toggled at each interrupt event<br>
  43635. Default: no, valid values: yes, no<br><br>
  43636. </li>
  43637. <li>pud_resistor<br>
  43638. Sets the internal pullup/pulldown resistor<br>
  43639. <b>Works only with installed gpio urility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a> Library.</b><br>
  43640. Default: -, valid values: off, up, down<br><br>
  43641. </li>
  43642. <li>debounce_in_ms<br>
  43643. readout of pin value x ms after an interrupt occured. Can be used for switch debouncing<br>
  43644. Default: 0, valid values: decimal number<br><br>
  43645. </li>
  43646. <li>restoreOnStartup<br>
  43647. Restore Readings and sets after reboot<br>
  43648. Default: last, valid values: last, on, off, no<br><br>
  43649. </li>
  43650. <li>unexportpin<br>
  43651. do an unexport to /sys/class/gpio/unexport if the pin definition gets cleared (e.g. by rereadcmd, delete,...)<br>
  43652. Default: yes, valid values: yes, no<br><br>
  43653. </li>
  43654. <li>longpressinterval<br>
  43655. <b>works with interrupt set to both only</b><br>
  43656. time in seconds, a port need to be high to set reading longpress to on<br>
  43657. Default: 1, valid values: 0.1 - 10<br><br>
  43658. </li>
  43659. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  43660. </ul>
  43661. <br>
  43662. </ul>
  43663. <a name="RSS"></a>
  43664. <h3>RSS</h3>
  43665. <ul>
  43666. Provides a freely configurable RSS feed and HTML page.<p>
  43667. The media RSS feed delivers status pictures either in JPEG or PNG format.
  43668. This media RSS feed can be used to feed a status display to a
  43669. network-enabled photo frame.<p>
  43670. In addition, a periodically refreshing HTML page is generated that shows the picture
  43671. with an optional HTML image map.<p>
  43672. You need to have the perl module <code>GD</code> installed. This module is most likely not
  43673. available for small systems like Fritz!Box.<p>
  43674. RSS is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You must install FHEMWEB to use RSS.<p>
  43675. Beginners might find the <a href="http://forum.fhem.de/index.php/topic,22520.0.html">RSS Workshop</a> useful.<p>
  43676. A note on colors: Colors are specified as 6- or 8-digit hex numbers,
  43677. every 2 digits determining the red, green and blue color components as in HTML
  43678. color codes. The optional 7th and 8th digit code the alpha channel (transparency from
  43679. 00 to 7F). Examples: <code>FF0000</code> for red, <code>C0C0C0</code> for light
  43680. gray, <code>1C1C1C40</code> for semi-transparent gray.<p>
  43681. <a name="RSSdefine"></a>
  43682. <b>Define</b>
  43683. <ul>
  43684. <code>define &lt;name&gt; RSS jpg|png &lt;hostname&gt; &lt;filename&gt;</code><br><br>
  43685. Defines the RSS feed. <code>jpg</code> and <code>png</code> are fixed literals to select output format.
  43686. <code>&lt;hostname&gt;</code> is the hostname of the fhem server as
  43687. seen from the consumer of the RSS feed. <code>&lt;filename&gt;</code> is the
  43688. name of the file that contains the <a href="RSSlayout">layout definition</a>.<p>
  43689. Examples
  43690. <ul>
  43691. <code>define FrameRSS RSS jpg host.example.org /etc/fhem/layout</code><br>
  43692. <code>define MyRSS RSS png 192.168.1.222 /var/fhem/conf/layout.txt</code><br>
  43693. </ul>
  43694. <br>
  43695. The RSS feeds are at
  43696. <ul>
  43697. <code>http://host.example.org:8083/fhem/rss/FrameRSS.rss</code><br>
  43698. <code>http://192.168.1.222:8083/fhem/rss/MyRSS.rss</code><br>
  43699. </ul>
  43700. <br>
  43701. The pictures are at
  43702. <ul>
  43703. <code>http://host.example.org:8083/fhem/rss/FrameRSS.jpg</code><br>
  43704. <code>http://192.168.1.222:8083/fhem/rss/MyRSS.png</code><br>
  43705. </ul>
  43706. <br>
  43707. The HTML pages are at
  43708. <ul>
  43709. <code>http://host.example.org:8083/fhem/rss/FrameRSS.html</code><br>
  43710. <code>http://192.168.1.222:8083/fhem/rss/MyRSS.html</code><br>
  43711. </ul>
  43712. <br>
  43713. </ul>
  43714. <a name="RSSset"></a>
  43715. <b>Set</b>
  43716. <ul>
  43717. <code>set &lt;name&gt; rereadcfg</code>
  43718. <br><br>
  43719. Rereads the <a href="RSSlayout">layout definition</a> from the file. Useful to enable
  43720. changes in the layout on-the-fly.
  43721. <br><br>
  43722. </ul>
  43723. <a name="RSSattr"></a>
  43724. <b>Attributes</b>
  43725. <br><br>
  43726. <ul>
  43727. <li>autoreread<br>If set to 1, layout is automatically reread when layout file has been changed
  43728. by FHEMWEB file editor.</li><br>
  43729. <li>size<br>The dimensions of the picture in the format
  43730. <code>&lt;width&gt;x&lt;height&gt;</code>.</li><br>
  43731. <li>bg<br>The directory that contains the background pictures (must be in JPEG, GIF or PNG format, file
  43732. format is guessed from file name extension).</li><br>
  43733. <li>bgcolor &lt;color&gt;<br>Sets the background color. </li><br>
  43734. <li>tmin<br>The background picture is shown at least <code>tmin</code> seconds,
  43735. no matter how frequently the RSS feed consumer accesses the page.</li><br>
  43736. <li>refresh &lt;interval&gt;<br>Time in seconds after which the HTML page is automatically reloaded. Defaults to 60.
  43737. Set &lt;interval&gt; to 0 to disable reloading.</li><br>
  43738. <li>viewport<br>Adds a viewport directive to the HTML header.<br>
  43739. Example: <code>attr FrameRSS viewport width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0</code><br>
  43740. This scales the image to fit to the browser's viewport and inhibits zooming in or out on tablets.
  43741. </li><br>
  43742. <li>noscroll</br>Suppresses scrollbars in browsers, if set to 1.
  43743. </li><br>
  43744. <li>areas<br>HTML code that goes into the image map.<br>
  43745. Example: <code>attr FrameRSS areas &lt;area shape="rect" coords="0,0,200,200" href="http://fhem.de"/&gt;&lt;area shape="rect" coords="600,400,799,599" href="http://has:8083/fhem" target="_top"/&gt;</code>
  43746. </li><br>
  43747. <li>itemtitle</br>Adds a title tag to the RSS item that contains the specified text.
  43748. </li><br>
  43749. <li>urlOverride<br>Overrides the URL in the generated feed.
  43750. If you specify
  43751. <code>attr &lt;name&gt; http://otherhost.example.org:8083/foo/bar</code>, the
  43752. JPEG picture that is at
  43753. <code>http://host.example.org:8083/fhem/rss/FrameRSS.jpg</code>
  43754. will be referenced as
  43755. <code>http://otherhost.example.org:8083/foo/bar/rss/FrameRSS.jpg</code>. This is useful when
  43756. your FHEM URLs are rewritten, e.g. if FHEM is accessed by a Reverse Proxy.</li>
  43757. <br>
  43758. </ul>
  43759. <br><br>
  43760. <b>Usage information</b>
  43761. <br><br>
  43762. <ul>
  43763. If a least one RSS feed is defined, the menu entry <code>RSS</code> appears in the FHEMWEB
  43764. side menu. If you click it you get a list of all defined RSS feeds. The URL of any such is
  43765. RSS feed is <code>http://hostname:port/fhem/rss/name.rss</code> with <code>hostname</code> and
  43766. <code>name</code> from the RSS feed's <a href="RSSdefine">definition</a> and the <code>port</code>
  43767. (usually 8083) and literal <code>/fhem</code> from the underlying <a href="#FHEMWEB">FHEMWEB</a>
  43768. definition.<p>
  43769. Example:
  43770. <ul><code>http://host.example.org:8083/fhem/rss/FrameRSS.rss</code></ul><p>
  43771. The media RSS feed points to a dynamically generated picture. The URL of the picture
  43772. belonging to the RSS can be found by replacing the extension ".rss" in feed's URL by ".jpg" or ".png"
  43773. depending on defined output format,<p>
  43774. Example:
  43775. <ul><code>http://host.example.org:8083/fhem/rss/FrameRSS.jpg</code></ul><p>
  43776. <ul><code>http://192.168.100.200:8083/fhem/rss/FrameRSS.png</code></ul><p>
  43777. To render the picture the current, or, if <code>tmin</code> seconds have elapsed, the next
  43778. JPEG picture from the directory <code>bg</code> is chosen and scaled to the dimensions given
  43779. in <code>size</code>. The background is black if no usable JPEG picture can be found. Next the
  43780. script in the <a href="RSSlayout">layout definition</a> is used to superimpose items on
  43781. the background.<p>
  43782. You can directly access the URL of the picture in your browser. Reload the page to see
  43783. how it works.<p>
  43784. The media RSS feed advertises to refresh after 1 minute (ttl). Some photo frames ignore it and
  43785. use their preset refresh rate. Go for a photo frame with an adjustable refresh rate (e.g
  43786. every 5 seconds) if you have the choice!<p>
  43787. This is how the fhem config part might look like:<p>
  43788. <code>
  43789. define ui FHEMWEB 8083 global<br><br>
  43790. define FrameRSS RSS jpg host.example.org /etc/fhem/layout<br>
  43791. attr FrameRSS size 800x600<br>
  43792. attr FrameRSS bg /usr/share/pictures<br>
  43793. attr FrameRSS tmin 10<br>
  43794. </code>
  43795. </ul>
  43796. <a name="RSSlayout"></a>
  43797. <b>Layout definition</b>
  43798. <br><br>
  43799. <ul>
  43800. The layout definition is a script for placing items on the background. It is read top-down.
  43801. It consists of layout control commands and items placement commands. Layout control
  43802. commands define the appearance of subsequent items. Item placement commands actually
  43803. render items.<p>
  43804. Everything after a # is treated as a comment and ignored. You can fold long lines by
  43805. putting a \ at the end.<p>
  43806. <i>General notes</i><br>
  43807. <ol>
  43808. <li>Use double quotes to quote literal text if perl specials are allowed.</li>
  43809. <li>Text alignment requires the Perl module GD::Text::Align to be installed. Text wrapping (in text boxes) require GD::Text::Wrap to be installed. Debian-based systems can install both with <code>apt-get install libgd-text-perl</code>.</li>
  43810. </ol>
  43811. <p>
  43812. <i>Notes on coordinates</i><br>
  43813. <ol>
  43814. <li>(0,0) is the upper left corner.</li>
  43815. <li>Coordinates equal or greater than 1 are considered to be absolute pixels, coordinates between 0 and 1 are considered to
  43816. be relative to the total width or height of the picture.</li>
  43817. <li>Literal <code>x</code> and <code>y</code> evaluate to the most recently used x- and y-coordinate. See also moveto and moveby below.</li>
  43818. <!--<li>You can use <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> for x and for y.</li>-->
  43819. </ol>
  43820. <p>
  43821. <i>Layout control commands</i><p>
  43822. <ul>
  43823. <li>moveto &lt;x&gt; &lt;y&gt;<br>Moves most recently used x- and y-coordinate to the given absolute or relative position.</li><br>
  43824. <li>moveby &lt;x&gt; &lt;y&gt;<br>Moves most recently used x- and y-coordinate by the given absolute or relative amounts.</li><br>
  43825. <li>font "&lt;font&gt;"<br>Sets the font. &lt;font&gt; is the name of a TrueType font (e.g.
  43826. <code>Arial</code>) or the full path to a TrueType font
  43827. (e.g. <code>/usr/share/fonts/truetype/arial.ttf</code>),
  43828. whatever works on your system.</li><br>
  43829. <a name="rss_rgb"></a>
  43830. <li>rgb "&lt;color&gt;"<br>Sets the color. You can use
  43831. <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> for &lt;color&gt.</li><br>
  43832. <li>pt &lt;pt&gt;<br>Sets the font size in points. A + or - sign in front of the the number given
  43833. for &lt;pt&gt signifies a change of the font size relative to the current size. Otherwise the absolute
  43834. size is set. You can use
  43835. <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> for &lt;pt&gt.</li><br>
  43836. <li>thalign|ihalign|halign "left"|"center"|"right"<br>Sets the horizontal alignment of text, image or both. Defaults to left-aligned. You can use
  43837. <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> instead of the literal alignment control word.</li><br>
  43838. <li>tvalign|ivalign|valign "top"|"center"|"base"|"bottom"<br>Sets the vertical alignment of text, image or both. Defaults to base-aligned for text and
  43839. top-aligned for image. You can use
  43840. <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> instead of the literal alignment control word.</li><br>
  43841. <li>linespace &lt;space&gt;<br>Sets the line spacing in pixels for text boxes (see textbox item below).</li><br>
  43842. <li>condition &lt;condition&gt;<br>Subsequent layout control and item placement commands except for another condition command are ignored if and only if &lt;condition&gt; evaluates to false.</li><br>
  43843. <li>push<br>The current parameter set (position, color, font name and size, text alignment and line spacing) is
  43844. put (saved) on top of a stack.</li><br>
  43845. <li>pop<br>The most recently saved (pushed) current parameter set is pulled from the top of the stack and restored.</li><br>
  43846. </ul>
  43847. <i>Item placement commands</i><p>
  43848. <ul>
  43849. <li>text &lt;x&gt; &lt;y&gt; &lt;text&gt;<br>Renders the text &lt;text&gt; at the
  43850. position (&lt;x&gt;, &lt;y&gt;) using the current font, font size and color.
  43851. You can use
  43852. <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> for &lt;text&gt; to fully
  43853. access device readings and do some programming on the fly. See below for examples.</li><br>
  43854. <li>textbox &lt;x&gt; &lt;y&gt; &lt;boxwidth&gt; &lt;text&gt;<br>Same as before but text is rendered
  43855. in a box of horizontal width &lt;boxwidth&gt;.</li><br>
  43856. <li>textboxf &lt;x&gt; &lt;y&gt; &lt;boxwidth&gt; &lt;bgcolor&gt; &lt;text&gt;<br>Same as before but
  43857. the textbox will be filled with the given background color &lt;bgcolor&gt; before drawing the text.
  43858. &lt;bgcolor&gt; can be used with <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> to evalute <a href="#rss_rgb">RGB</a> value.</li><br>
  43859. <li>time &lt;x&gt; &lt;y&gt;<br>Renders the current time in HH:MM format.</li><br>
  43860. <li>seconds &lt;x&gt; &lt;y&gt; &lt;format&gt<br>Renders the curent seconds. Maybe useful for a RSS Clock.</li><br>
  43861. <li>date &lt;x&gt; &lt;y&gt;<br>Renders the current date in DD.MM.YYYY format.</li><br>
  43862. <li>line &lt;x1&gt; &lt;y1&gt; &lt;x2&gt; &lt;y2&gt; [&lt;thickness&gt;]<br>Draws a line from position (&lt;x1&gt;, &lt;y1&gt;) to position (&lt;x2&gt;, &lt;y2&gt;) with optional thickness (default=1).</li><br>
  43863. <li>rect &lt;x1&gt; &lt;y1&gt; &lt;x2&gt; &lt;y2&gt; [&lt;filled&gt;]<br>Draws a rectangle with corners at positions (&lt;x1&gt;, &lt;y1&gt;) and (&lt;x2&gt;, &lt;y2&gt;), which is filled if the &lt;filled&gt; parameter is set and not zero.<br>If x2 or y2 is preceeded with a + (plus sign) then the coordinate is relative to x1 or y1, or in other words, it is the width-1 or height-1 of the rectangle, respectively.</li><br>
  43864. <li>img &lt;x&gt; &lt;y&gt; &lt;['w' or 'h']s&gt; &lt;imgtype&gt; &lt;srctype&gt; &lt;arg&gt; <br>Renders a picture at the
  43865. position (&lt;x&gt;, &lt;y&gt;). The &lt;imgtype&gt; is one of <code>gif</code>, <code>jpeg</code>, <code>png</code>.
  43866. The picture is scaled by the factor &lt;s&gt; (a decimal value). If 'w' or 'h' is in front of scale-value the value is used to set width or height to the value in pixel. If &lt;srctype&gt; is <code>file</code>, the picture
  43867. is loaded from the filename &lt;arg&gt;, if &lt;srctype&gt; is <code>url</code> or <code>urlq</code>, the picture
  43868. is loaded from the URL &lt;arg&gt; (with or without logging the URL), if &lt;srctype&gt; is <code>data</code>, the picture
  43869. is piped in from data &lt;arg&gt;. You can use
  43870. <code>{ <a href="#perl">&lt;perl special&gt;</a> }</code> for &lt;arg&gt. See below for example.<br>
  43871. <b>Warning</b>: do not load the image from URL that is served by fhem as it leads to a deadlock.</li><br>
  43872. <li>embed &lt;x&gt; &lt;y&gt; &lt;z&gt; &lt;position&gt; &lt;id&gt; &lt;element&gt;<br>
  43873. For HTML output: embeds a <code>div</code> element into the HTML page at (&lt;x&gt;,&lt;y&gt;) with z-order &lt;z&gt; and positioning &lt;position&gt; (use <code>absolute</code>). &lt;id&gt; is the <code>id</code> attribute of the
  43874. <code>div</code> element and &lt;element&gt; is its content.<br>
  43875. <b>Note:</b> There are several issues with different browsers when using this.</li><br>
  43876. </ul>
  43877. <i>Example</i><p>
  43878. This is how a layout definition might look like:<p>
  43879. <code>
  43880. font /usr/share/fonts/truetype/arial.ttf # must be a TrueType font<br>
  43881. rgb "c0c0c0" # HTML color notation, RGB<br>
  43882. pt 48 # font size in points<br>
  43883. time 0.10 0.90<br>
  43884. pt 24<br>
  43885. text 0.10 0.95 { ReadingsVal("MyWeather","temperature","?"). "C" }<br>
  43886. moveby 0 -25<br>
  43887. text x y "Another text"<br>
  43888. img 20 530 0.5 png file { "/usr/share/fhem/www/images/weather/" . ReadingsVal("MyWeather","icon","") . ".png" }<br>
  43889. embed 0 0 2 absolute plot1 { plotFromUrl('mySVG') }
  43890. embed 10 200 2 absolute iframe1 "&lt;iframe width=\"420\" height=\"315\" src=\"//www.youtube.com/embed/9HShl_ufOFI\" frameborder=\"0\" allowfullscreen&gt;&lt;/iframe&gt;"
  43891. </code>
  43892. <p>
  43893. <i>Special uses</i><p>
  43894. You can display <a href="#SVG">SVG</a> plots with the aid of the helper function <code>plotAsPng(&lt;name&gt;[,&lt;zoom&gt;[,&lt;offset&gt;]])</code> (in 98_SVG.pm). Examples:<p>
  43895. <code>
  43896. img 20 30 0.6 png data { plotAsPng("mySVGPlot") }<BR>
  43897. img 20 30 0.6 png data { plotAsPng("mySVGPlot","qday",-1) }
  43898. </code>
  43899. <p>
  43900. This requires the perl module Image::LibRSVG and librsvg. Debian-based systems can install these with <code>apt-get install libimage-librsvg-perl</code>.<p>
  43901. For HTML output, you can use <code>plotFromURL(&lt;name&gt;[,&lt;zoom&gt;[,&lt;offset&gt;]])</code> instead.
  43902. </ul>
  43903. </ul>
  43904. <a name="RandomTimer"></a>
  43905. <h1>RandomTimer</h1>
  43906. <h2>Define</h2>
  43907. <ul>
  43908. <code><font size="+2">define &lt;name&gt; RandomTimer &lt;timespec_start&gt; &lt;device&gt; &lt;timespec_stop&gt; [&lt;timeToSwitch&gt;]</font></code><br>
  43909. <br>
  43910. Defines a device, that imitates the random switch functionality of a timer clock, like a <b>FS20 ZSU</b>.
  43911. The idea to create it, came from the problem, that is was always a little bit tricky to install a timer clock before
  43912. holiday: finding the manual, testing it the days before and three different timer clocks with three different manuals - a horror.<br>
  43913. By using it in conjunction with a dummy and a <a href="#disableCond">disableCond</a>, I'm able to switch the always defined timer on every weekend easily from all over the world.
  43914. <br><br>
  43915. <h3>Descrition</h3>
  43916. a RandomTimer device starts at timespec_start switching device. Every (timeToSwitch
  43917. seconds +-10%) it trys to switch device on/off. The switching period stops when the
  43918. next time to switch is greater than timespec_stop.
  43919. <br><br>
  43920. </ul>
  43921. <h3>Parameter</h3>
  43922. <ul>
  43923. <b>timespec_start</b>
  43924. <br>
  43925. The parameter <b>timespec_start</b> defines the start time of the timer with format: HH:MM:SS.
  43926. It can be a Perlfunction as known from the <a href="#at">at</a> timespec &nbsp;.
  43927. <br><br>
  43928. <b>device</b>
  43929. <br>
  43930. The parameter <b>device</b> defines the fhem device that should be switched.
  43931. <br><br>
  43932. <b>timespec_stop</b>
  43933. <br>
  43934. The parameter <b>timespec_stop</b> defines the stop time of the timer with format: HH:MM:SS.
  43935. It can be a Perlfunction as known from the timespec <a href="#at">at</a> &nbsp;.
  43936. <br><br>
  43937. <b>timeToSwitch</b>
  43938. <br>
  43939. The parameter <b>timeToSwitch</b> defines the time in seconds between two on/off switches.
  43940. <br><br>
  43941. </ul>
  43942. <h3>Examples</h3>
  43943. <ul>
  43944. <li>
  43945. <code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch +03:00:00 500</code><br>
  43946. defines a timer that starts at sunset an ends 3 hous later. The timer trys to switch every 500 seconds(+-10%).
  43947. </li><br><br>
  43948. <li>
  43949. <code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch *{sunset_abs(3*3600)} 480</code><br>
  43950. defines a timer that starts at sunset and stops after sunset + 3 hours. The timer trys to switch every 480 seconds(+-10%).
  43951. </li><br><br>
  43952. <li>
  43953. <code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch 22:30:00 300</code><br>
  43954. defines a timer that starts at sunset an ends at 22:30. The timer trys to switch every 300 seconds(+-10%).
  43955. </li><br><br>
  43956. </ul>
  43957. <!-- -------------------------------------------------------------------------- -->
  43958. <!-- Set ------------------------------------------------------------------ -->
  43959. <!-- -------------------------------------------------------------------------- -->
  43960. <a name="RandomTimerSet"></a>
  43961. <h3>Set</h3>
  43962. <ul>
  43963. N/A
  43964. </ul>
  43965. <!-- ----------------------------- -->
  43966. <!-- Get ------------------------- -->
  43967. <!-- Get ------------------------------------------------------------------ -->
  43968. <!-- -------------------------------------------------------------------------- -->
  43969. <a name="RandomTimerGet"></a>
  43970. <h3>Get</h3>
  43971. <ul>
  43972. N/A
  43973. </ul>
  43974. <!-- -------------------------------------------------------------------------- -->
  43975. <!-- Attributes --------------------------------------------------------------- -->
  43976. <!-- -------------------------------------------------------------------------- -->
  43977. <a name="RandomTimerAttributes"></a>
  43978. <h3>Attributes</h3>
  43979. <ul>
  43980. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  43981. <li><a name="disableCond">disableCond</a><br>
  43982. The default behavior of a RandomTimer is, that it works.
  43983. To set the Randomtimer out of work, you can specify in the disableCond attibute a condition in perlcode that must evaluate to true.
  43984. The Condition must be put into round brackets. The best way is to define
  43985. a function in 99_utils.
  43986. <br>
  43987. <b>Examples</b>
  43988. <pre>
  43989. attr ZufallsTimerZ disableCond (!isVerreist())
  43990. attr ZufallsTimerZ disableCond (Value("presenceDummy") ne "present")
  43991. </pre>
  43992. </li>
  43993. <li><a name="keepDeviceAlive">keepDeviceAlive</a><br>
  43994. The default behavior of a RandomTimer is, that it shuts down the device after stoptime is reached.
  43995. The <b>keepDeviceAlive</b> attribute changes the behavior. If set, the device status is not changed when the stoptime is reached.
  43996. <br>
  43997. <b>Example</b>
  43998. <pre>
  43999. attr ZufallsTimerZ keepDeviceAlive
  44000. </pre>
  44001. </li>
  44002. <li><a name="onOffCmd">onCmd, offCmd</a><br>
  44003. Setting the on-/offCmd changes the command sent to the device. Standard is: "set &lt;device&gt; on".
  44004. The device can be specified by a @.
  44005. <br>
  44006. <b>Examples</b>
  44007. <pre>
  44008. attr Timer oncmd {fhem("set @ on-for-timer 14")}
  44009. attr Timer offCmd {fhem("set @ off 16")}
  44010. attr Timer oncmd set @ on-for-timer 12
  44011. attr Timer offCmd set @ off 12
  44012. </pre>
  44013. </li>
  44014. the decision to switch on or off depends on the state of the device and is evaluated by the funktion Value(<device>). Value() must
  44015. evaluate one of the values "on" or "off". The behavior of devices that do not evaluate one of those values can be corrected by defining a statFormat:
  44016. <pre>
  44017. attr stateFormat EDIPlug_01 {(ReadingsVal("EDIPlug_01","state","nF") =~ m/(ON|on)/i) ? "on" : "off" }
  44018. </pre>
  44019. if a devices Value() funktion does not evalute to on or off(like WLAN-Steckdose von Edimax) you get the message:
  44020. <pre>
  44021. [EDIPlug] result of function Value(EDIPlug_01) must be 'on' or 'off'
  44022. </pre>
  44023. <li><a name="switchmode">switchmode</a><br>
  44024. Setting the switchmode you can influence the behavior of switching on/off.
  44025. The parameter has the Format 999/999 and the default ist 800/200. The values are in "per mill".
  44026. The first parameter sets the value of the probability that the device will be switched on when the device is off.
  44027. The second parameter sets the value of the probability that the device will be switched off when the device is off.
  44028. <b>Examples</b>
  44029. <pre>
  44030. attr ZufallsTimerZ switchmode 400/400
  44031. </pre>
  44032. </li>
  44033. </ul>
  44034. <a name="Revolt"></a>
  44035. <h3>Revolt NC-5462</h3>
  44036. <ul>
  44037. Provides voltage, current, frequency, power, pf, energy readings for Revolt NC-5462 devices via CUL.
  44038. <br><br>
  44039. <a name="RevoltDefine"></a>
  44040. <b>Define</b>
  44041. <ul>
  44042. <code>define &lt;name&gt; Revolt &lt;id&gt;</code>
  44043. <br><br>
  44044. &lt;id&gt; is a 4 digit hex number to identify the NC-5462 device.<br>
  44045. Note: devices are autocreated on reception of the first message.<br>
  44046. </ul>
  44047. <br>
  44048. <a name="RevoltReadings"></a>
  44049. <b>Readings</b>
  44050. <ul>
  44051. <li>energy [kWh]</li>
  44052. <li>power [W]</li>
  44053. <li>voltage [V]</li>
  44054. <li>current [A]</li>
  44055. <li>frequency [Hz]</li>
  44056. <li>Pf</li>
  44057. </ul>
  44058. </ul>
  44059. <a name="Robonect"></a>
  44060. <h3>Robonect</h3>
  44061. <ul>
  44062. <p>Robonect is a after-market wifi-module for robomowers based on the husky G3-control. It was developed by Fabian H. and can be optained at www.robonect.de. This module gives you access to the basic commands. This module will not work without libjson-perl! Do not forget to install it first!</p>
  44063. <p><a name="RobonectDefine"></a> <b>Define</b></p>
  44064. <ul>
  44065. <code>define &lt;name&gt; Robonect &lt;ip-adress or name&gt;</code>
  44066. <p>Setting Winterschlaf prevents communicating with the mower.</p>
  44067. <p>The authentication can be supplied in the definition as plaine text or in a differen way - see the attributes. Per default the status is polled every 90s.</p>
  44068. <p>Example:</p>
  44069. <pre>
  44070. define myMower Robonect 192.168.13.5
  44071. define myMower Robonect myMowersDNSName
  44072. </pre>
  44073. </ul>
  44074. <p><a name="RobonectSet"></a> <b>Set</b></p>
  44075. <ul>
  44076. <b>Set</b>
  44077. <ul>
  44078. <li>auto<br>
  44079. Sets the mower to automatic mode. The mower follows the internal timer, until another mode is chosen. The mower can be stopped with stop at any time. After using stop: be aware, that it continues
  44080. mowing only if the timer supplies an active slot AND start is executed before.
  44081. </li>
  44082. <li>manuell<br>
  44083. This sets the mower to manual mode. The internal timer is ignored. Mowing starts with start and ends with stop.
  44084. </li>
  44085. <li>home<br>
  44086. This sends the mower directly home. Until you switch to auto or manuell, no further mowing work is done.
  44087. </li>
  44088. <li>feierabend<br>
  44089. This sends the mower home for the rest of the actual timeslot. At the next active timeslot mowing is continued automatically.
  44090. </li>
  44091. <li>start<br>
  44092. Start mowing in manual mode or in automatic mode at active timer-slot.
  44093. </li>
  44094. <li>stop<br>
  44095. Stops mowing immediately. The mower does not drive home. It stands there, until battery is empty. Use with care!
  44096. </li>
  44097. <li>maehauftrag<br>
  44098. This command starts a single mowing-task. It can be applied as much parameters as you want. For example you can influence start-/stop-time and duration.<br>
  44099. The parameters have to be named according the robonect-API (no doublechecking!).<br>
  44100. <br>
  44101. Example:<br>
  44102. Lauch at 15:00, Duration 120 minutes, do not use a remote-start-point, do not change mode after finishing task
  44103. <pre>
  44104. set myMower maehauftrag start=15:00 duration=120 remotestart=0 after=4
  44105. </pre>
  44106. </li>
  44107. <li>winterschlaf &lt;on, off&gt;<br>
  44108. If set to on, no polling is executet. Please use this during winter.
  44109. </li>
  44110. <li>user &ltuser&gt;<br>
  44111. One alternative to store authentication: username for robonect-logon is stored in FhemUtils or database (not encrypted).<br
  44112. If set, the attributes regarding authentication are ignored.
  44113. </li>
  44114. <li>password &lt;password&gt;<br>
  44115. One alternative to store authentication: password for robonect-logon is stored in FhemUtils or database (not encrypted).<br
  44116. If set, the attributes regarding authentication are ignored.
  44117. </li>
  44118. </ul>
  44119. </ul>
  44120. <p><a name="RobonectGet"></a> <b>Get</b></p>
  44121. <ul>
  44122. <b>Get</b>
  44123. <ul>
  44124. <li>status<br>
  44125. Gets the actual state of the mower - normally not needed, because the status is polled cyclic.
  44126. </li>
  44127. <li>health<br>
  44128. This one gets more detailed information - like voltages and temperatures. It is NOT SUPPORTED BY ALL MOWERS!!!<br>
  44129. If enabled via attribute, health is polled accordingly status.
  44130. </li>
  44131. </ul>
  44132. </ul>
  44133. <p><a name="RobonectAttr"></a> <b>Attributes</b></p>
  44134. <ul><br>
  44135. Common attributes:<br>
  44136. <a href="#DbLogInclude">DbLogInclude</a><br>
  44137. <a href="#DbLogExclude">DbLogExclude</a><br>
  44138. <a href="#IODev">IODev</a><br>
  44139. <a href="#alias">alias</a><br>
  44140. <a href="#comment">comment</a><br>
  44141. <a href="#devStateIcon">devStateIcon</a><br>
  44142. <a href="#devStateStyle">devStateStyle</a><br>
  44143. <a href="#do_not_notify">do_not_notify</a><br>
  44144. <a href="#readingFnAttributes">readingFnAttributes</a><br>
  44145. <a href="#event-aggregator">event-aggregator</a><br>
  44146. <a href="#event-min-interval">event-min-interval</a><br>
  44147. <a href="#event-on-change-reading">event-on-change-reading</a><br>
  44148. <a href="#event-on-update-reading">event-on-update-reading</a><br>
  44149. <a href="#eventMap">eventMap</a><br>
  44150. <a href="#group">group</a><br>
  44151. <a href="#icon">icon</a><br>
  44152. <a href="#room">room</a><br>
  44153. <a href="#showtime">showtime</a><br>
  44154. <a href="#sortby">sortby</a><br>
  44155. <a href="#stateFormat">stateFormat</a><br>
  44156. <a href="#userReadings">userReadings</a><br>
  44157. <a href="#userattr">userattr</a><br>
  44158. <a href="#verbose">verbose</a><br>
  44159. <a href="#webCmd">webCmd</a><br>
  44160. <a href="#widgetOverride">widgetOverride</a><br>
  44161. <br>
  44162. </ul>
  44163. <p><a name="RobonectCredentials"></a> <b>credentials</b></p>
  44164. <ul>
  44165. If you supply a valid path to a credentials file, this combination is used to log in at robonect. This mechism overrules basicAuth.
  44166. </ul>
  44167. <p><a name="RobonectBasicAuth"></a> <b>basicAuth</b></p>
  44168. <ul>
  44169. You can supply username and password plain or base-64-encoded. For a base64-encoder, use google.
  44170. <p>Example:</p>
  44171. <pre>
  44172. define myMower Robonect 192.168.5.1
  44173. attr myMower basicAuth me:mySecret
  44174. </pre>
  44175. <pre>
  44176. define myMower Robonect 192.168.5.1
  44177. attr myMower basicAuth bWU6bXlTZWNyZXQ=
  44178. </pre>
  44179. </ul>
  44180. <p><a name="RobonectPollInterval"></a> <b>pollInterval</b></p>
  44181. <ul>
  44182. Supplies the interval top poll the robonect in seconds. Per default 90s is set.
  44183. </ul>
  44184. <p><a name="RobonectTimeout"></a> <b>timeout</b></p>
  44185. <ul>
  44186. Timeout for httpData to recive data. Default is 4s.
  44187. </ul>
  44188. <p><a name="RobonectHealth"></a> <b>useHealth</b></p>
  44189. <ul>
  44190. If set to 1, the health-status of the mower will be polled. Be aware NOT ALL MOWERS ARE SUPPORTED!<br>
  44191. Please refer to logfile or LAST_COMM_STATUS if the function does not seem to be working.
  44192. </ul>
  44193. </ul>
  44194. <p><a name="S7"></a></p>
  44195. <h3>S7</h3>
  44196. <ul>
  44197. <ul>
  44198. <ul>This module connects a SIEMENS PLC (S7,S5,SIEMENS Logo!). The TCP communication (S7, Siemens LOGO!) module is based on settimino (http://settimino.sourceforge.net). The serial Communication is based on a libnodave portation.</ul>
  44199. </ul>
  44200. </ul>
  44201. <p>&nbsp;</p>
  44202. <ul>
  44203. <ul>You can found a german wiki here: httl://www.fhemwiki.de/wiki/S7</ul>
  44204. </ul>
  44205. <p><br /><br /></p>
  44206. <ul>
  44207. <ul>For the communication the following modules have been implemented:
  44208. <ul>
  44209. <li>S7 &hellip; sets up the communication channel to the PLC</li>
  44210. <li>S7_ARead &hellip; Is used for reading integer Values from the PLC</li>
  44211. <li>S7_AWrite &hellip; Is used for write integer Values to the PLC</li>
  44212. <li>S7_DRead &hellip; Is used for read bits</li>
  44213. <li>S7_DWrite &hellip; Is used for writing bits.</li>
  44214. </ul>
  44215. </ul>
  44216. </ul>
  44217. <p><br /><br /></p>
  44218. <ul>
  44219. <ul>Reading work flow:</ul>
  44220. </ul>
  44221. <p><br /><br /></p>
  44222. <ul>
  44223. <ul>The S7 module reads periodically the configured DB areas from the PLC and stores the data in an internal buffer. Then all reading client modules are informed. Each client module extracts his data and the corresponding readings are set. Writing work flow:</ul>
  44224. </ul>
  44225. <p><br /><br /></p>
  44226. <ul>
  44227. <ul>At the S7 module you need to configure the PLC writing target. Also the S7 module holds a writing buffer. Which contains a master copy of the data needs to send.</ul>
  44228. </ul>
  44229. <p>&nbsp;</p>
  44230. <ul>
  44231. <ul>(Note: after configuration of the writing area a copy from the PLC is read and used as initial fill-up of the writing buffer)</ul>
  44232. </ul>
  44233. <p>&nbsp;</p>
  44234. <ul>
  44235. <ul>Note: The S7 module will send always the whole data block to the PLC. When data on the clients modules is set then the client module updates the internal writing buffer on the S7 module and triggers the writing to the PLC.</ul>
  44236. </ul>
  44237. <p><br /><br /><a name="S7define"></a><strong>Define</strong><code>define &lt;name&gt; S7 &lt;PLC_address&gt; &lt;rack&gt; &lt;slot&gt; [&lt;Interval&gt;] </code><br /><br /><code>define logo S7 10.0.0.241 2 0 </code></p>
  44238. <ul>
  44239. <ul>
  44240. <ul>
  44241. <ul>
  44242. <li>PLC_address &hellip; IP address of the S7 PLC (For S5 see below)</li>
  44243. <li>rack &hellip; rack of the PLC</li>
  44244. <li>slot &hellip; slot of the PLC</li>
  44245. <li>Interval &hellip; Intervall how often the modul should check if a reading is required</li>
  44246. </ul>
  44247. </ul>
  44248. </ul>
  44249. </ul>
  44250. <p>&nbsp;</p>
  44251. <ul>
  44252. <ul>
  44253. <ul>Note: For Siemens logo you should use a alternative (more simply configuration method):</ul>
  44254. </ul>
  44255. </ul>
  44256. <p>&nbsp;</p>
  44257. <ul>
  44258. <ul>
  44259. <ul><code>define logo S7 LOGO7 10.0.0.241</code></ul>
  44260. </ul>
  44261. </ul>
  44262. <p>&nbsp;</p>
  44263. <ul>
  44264. <ul>
  44265. <ul>Note: For Siemens S5 you must use a alternative (more simply configuration method):</ul>
  44266. </ul>
  44267. </ul>
  44268. <p>&nbsp;</p>
  44269. <ul>
  44270. <ul>
  44271. <ul>define logo S7 S5 /dev/tty1 in this case the PLC_address is the serial port number</ul>
  44272. </ul>
  44273. </ul>
  44274. <p><br /><br /><strong>Attr</strong></p>
  44275. <ul>
  44276. <ul>The following attributes are supported:</ul>
  44277. </ul>
  44278. <p>&nbsp;</p>
  44279. <ul>
  44280. <ul>
  44281. <ul>
  44282. <li>MaxMessageLength</li>
  44283. <li>receiveTimeoutMs</li>
  44284. <li>Intervall</li>
  44285. </ul>
  44286. </ul>
  44287. </ul>
  44288. <p>&nbsp;</p>
  44289. <ul>
  44290. <ul>MaxMessageLength ... restricts the packet length if lower than the negioated PDULength. This could be used to increate the processing speed. 2 small packages may be smaler than one large package</ul>
  44291. <ul>receiveTimeoutMs ... timeout in ms for TCP receiving packages. Default Value 500ms.&nbsp;</ul>
  44292. <ul>Intervall ... polling&nbsp;intervall in s&nbsp;</ul>
  44293. </ul>
  44294. <a name="S7_ARead"></a>
  44295. <h3>S7_ARead</h3>
  44296. <ul>
  44297. This module is a logical module of the physical module S7. <br>
  44298. This module provides analog data (signed / unsigned integer Values).<br>
  44299. Note: you have to configure a PLC reading at the physical module (S7) first.<br>
  44300. <br><br>
  44301. <b>Define</b><br>
  44302. <code>define &lt;name&gt; S7_ARead {inputs|outputs|flags|db} &lt;DB&gt; &lt;start&gt; {u8|s8|u16|s16|u32|s32}</code>
  44303. <br><br>
  44304. <ul>
  44305. <li>inputs|outputs|flags|db … defines where to read.</li>
  44306. <li>DB … Number of the DB</li>
  44307. <li>start … start byte of the reading</li>
  44308. <li>{u8|s8|u16|s16|u32|s32} … defines the datatype: </li>
  44309. <ul>
  44310. <li>u8 …. unsigned 8 Bit integer</li>
  44311. <li>s8 …. signed 8 Bit integer</li>
  44312. <li>u16 …. unsigned 16 Bit integer</li>
  44313. <li>s16 …. signed 16 Bit integer</li>
  44314. <li>u32 …. unsigned 32 Bit integer</li>
  44315. <li>s32 …. signed 32 Bit integer</li>
  44316. </ul>
  44317. Note: the required memory area (start – start + datatypelength) need to be with in the configured PLC reading of the physical module.
  44318. </ul>
  44319. <br>
  44320. <b>Attr</b><br>
  44321. The following parameters are used to scale every reading<br>
  44322. <ul>
  44323. <li>multiplicator</li>
  44324. <li>offset</li>
  44325. </ul>
  44326. newValue = &lt;multiplicator&gt; * Value + &lt;offset&gt;
  44327. </ul>
  44328. <p><a name="S7_AWrite"></a></p>
  44329. <h3>S7_AWrite</h3>
  44330. <ul>
  44331. <ul>This module is a logical module of the physical module S7.</ul>
  44332. </ul>
  44333. <ul>
  44334. <ul>This module provides sending analog data (unsigned integer Values) to the PLC.</ul>
  44335. </ul>
  44336. <ul>
  44337. <ul>Note: you have to configure a PLC writing at the physical modul (S7) first.</ul>
  44338. </ul>
  44339. <p><br /><br /><strong>Define</strong><br /><code>define &lt;name&gt; S7_AWrite {inputs|outputs|flags|db} &lt;DB&gt; &lt;start&gt; {u8|s8|u16|s16|u32|s32|float}</code><br /><br /></p>
  44340. <ul>
  44341. <ul>
  44342. <ul>
  44343. <ul>
  44344. <li>db &hellip; defines where to read. Note currently only writing in to DB are supported.</li>
  44345. <li>DB &hellip; Number of the DB</li>
  44346. <li>start &hellip; start byte of the reading</li>
  44347. <li>{u8|s8|u16|s16|u32|s32} &hellip; defines the datatype:</li>
  44348. <ul>
  44349. <li>u8 &hellip;. unsigned 8 Bit integer</li>
  44350. <li>s8 &hellip;. signed 8 Bit integer</li>
  44351. <li>u16 &hellip;. unsigned 16 Bit integer</li>
  44352. <li>s16 &hellip;. signed 16 Bit integer</li>
  44353. <li>u32 &hellip;. unsigned 32 Bit integer</li>
  44354. <li>s32 &hellip;. signed 32 Bit integer</li>
  44355. <li>float &hellip;. 4 byte float</li>
  44356. </ul>
  44357. </ul>
  44358. Note: the required memory area (start &ndash; start + datatypelength) need to be with in the configured PLC writing of the physical module.</ul>
  44359. </ul>
  44360. </ul>
  44361. <p>Logo 7 / Logo 8</p>
  44362. <p style="padding-left: 60px;">For Logo7 / Logo 8 also a short notation is supportet:</p>
  44363. <p><code>define &lt;name&gt; S7_AWrite {AI|AM|AQ|NAI|NAQ}X</code></p>
  44364. <p><strong>Set</strong><br /><br /><code>set &lt;name&gt; S7_AWrite &lt;value&gt;</code></p>
  44365. <ul>
  44366. <ul>
  44367. <ul>
  44368. <li>value &hellip; an numeric value</li>
  44369. </ul>
  44370. </ul>
  44371. </ul>
  44372. <p><a name="S7_Client"></a></p>
  44373. <h3>S7_Client</h3>
  44374. <ul>
  44375. <ul>abstract interface layer S7 / S5</ul>
  44376. </ul>
  44377. <a name="S7_DRead"></a>
  44378. <h3>S7_DRead</h3>
  44379. <ul>
  44380. This module is a logical module of the physical module S7. <br>
  44381. This module provides digital data (ON/OFF).<br>
  44382. Note: you have to configure a PLC reading at the physical modul (S7) first.<br>
  44383. <br><br>
  44384. <b>Define</b>
  44385. <ul>
  44386. <code>define &lt;name&gt; S7_DRead {inputs|outputs|flags|db} &lt;DB&gt; &lt;address&gt;</code>
  44387. <ul>
  44388. <li>inputs|outputs|flags|db … defines where to read.</li>
  44389. <li>DB … Number of the DB</li>
  44390. <li>address … address you want to read. bit number to read. Example: 10.3</li>
  44391. </ul>
  44392. Note: the required memory area need to be with in the configured PLC reading of the physical module.
  44393. </ul>
  44394. </ul>
  44395. <p><a name="S7_DWrite"></a></p>
  44396. <h3>S7_DWrite</h3>
  44397. <ul>
  44398. <ul>This module is a logical module of the physical module S7.</ul>
  44399. </ul>
  44400. <ul>
  44401. <ul>This module is used to set/unset a Bit in ad DB of the PLC.</ul>
  44402. </ul>
  44403. <ul>
  44404. <ul>Note: you have to configure a PLC writing at the physical modul (S7) first.</ul>
  44405. </ul>
  44406. <p><br /><br /><br /><strong>Define</strong><code>define &lt;name&gt; S7_DWrite {db} &lt;DB&gt; &lt;address&gt;</code></p>
  44407. <ul>
  44408. <ul>
  44409. <ul>
  44410. <ul>
  44411. <li>db &hellip; defines where to read. Note currently only writing in to DB are supported.</li>
  44412. <li>DB &hellip; Number of the DB</li>
  44413. <li>address &hellip; address you want to write. bit number to read. Example: 10.6</li>
  44414. </ul>
  44415. Note: the required memory area need to be with in the configured PLC reading of the physical module.</ul>
  44416. </ul>
  44417. </ul>
  44418. <p><strong>Set</strong><code>set &lt;name&gt; S7_AWrite {ON|OFF|TRIGGER};</code></p>
  44419. <ul>
  44420. <ul>Note: TRIGGER sets the bit for 1s to ON than it will set to OFF.</ul>
  44421. </ul>
  44422. <p><strong>Attr</strong><br /> The following parameters are used to scale every reading</p>
  44423. <ul>
  44424. <li>trigger_length ... sets the on-time of a trigger in Seconds. Note out can also use trigger_length less than 1</li>
  44425. </ul>
  44426. <p><a name="S7_S5Client"></a></p>
  44427. <h3>S7_S5Client</h3>
  44428. <ul>
  44429. <ul>low level interface to S5</ul>
  44430. </ul>
  44431. <p><a name="S7_S7Client"></a></p>
  44432. <h3>S7_S7Client</h3>
  44433. <ul>
  44434. <ul>low level interface to S7</ul>
  44435. </ul>
  44436. <a name="SCIVT"></a>
  44437. <h3>SCIVT</h3>
  44438. <ul>
  44439. <br>
  44440. <a name="SCIVTdefine"></a>
  44441. <b>Define</b>
  44442. <ul>
  44443. <code>define &lt;name&gt; SCIVT &lt;SCD-device&gt;</code>
  44444. <br><br>
  44445. Define a SCD series solar controler device. Details see <a
  44446. href="http://english.ivt-hirschau.de/content.php?parent_id=CAT_64&doc_id=DOC_118">here</a>.
  44447. You probably need a Serial to USB controller like the PL2303.
  44448. <br>
  44449. Defining an SCIVT device will schedule an internal task, which reads the
  44450. status of the device every 5 minutes, and triggers notify/filelog commands.
  44451. <br>Note: Currently this device does not support a "set" function, only
  44452. a single get function which reads the device status immediately.
  44453. <br><br>
  44454. Example:
  44455. <ul>
  44456. <code>define scd SCIVT /dev/ttyUSB2</code><br>
  44457. </ul>
  44458. <br>
  44459. </ul>
  44460. <a name="SVICTset"></a>
  44461. <b>Set</b> <ul>N/A</ul><br>
  44462. <a name="SVICTget"></a>
  44463. <b>Get</b>
  44464. <ul>
  44465. <code>get SCVIT data</code>
  44466. <br>
  44467. </ul>
  44468. <br>
  44469. <a name="SVICTattr"></a>
  44470. <b>Attributes</b>
  44471. <ul>
  44472. <li><a href="#model">model</a> (SCD)</li>
  44473. </ul>
  44474. <br>
  44475. </ul>
  44476. <a name="SD_RSL"></a>
  44477. <h3>RSL</h3>
  44478. The SD_RSL module decrypts and sends Conrad RSL messages sent by the SIGNALduino.<br>
  44479. <br>
  44480. <a name="SD_RSL_Define"></a>
  44481. <b>Define</b>
  44482. <ul>
  44483. <p><code>define &lt;name&gt; SD_RSL &lt;code&gt;_&lt;channel&gt;_&lt;button&gt;</code>
  44484. <br>
  44485. <br>
  44486. <code>&lt;name&gt;</code> is any name assigned to the device.
  44487. For a better overview it is recommended to use a name in the form &quot;RSL_B1A800_1_2&quot;
  44488. <br /><br />
  44489. <code>&lt;code&gt;</code> The code is 00000-FFFFFF
  44490. <br /><br />
  44491. <code>&lt;channel&gt;</code> The channel is 1-4
  44492. <br /><br />
  44493. <code>&lt;button&gt;</code> The button is 1-4
  44494. <br /><br />
  44495. </ul>
  44496. <a name="SD_RSL_Set"></a>
  44497. <b>Set</b>
  44498. <ul>
  44499. <code>set &lt;name&gt; &lt;value&gt;</code>
  44500. <br /><br />
  44501. <code>&lt;value&gt;</code> can be one of the following values:<br>
  44502. <pre>
  44503. off
  44504. on
  44505. </pre>
  44506. </ul>
  44507. <a name="SD_RSL_Get"></a>
  44508. <b>Get</b>
  44509. <ul>
  44510. N/A
  44511. </ul>
  44512. <a name="SD_RSL_Attr"></a>
  44513. <b>Attribute</b>
  44514. <ul>
  44515. <li><a href="#IODev">IODev</a></li>
  44516. <li><a href="#do_not_notify">do_not_notify</a></li>
  44517. <li><a href="#eventMap">eventMap</a></li>
  44518. <li><a href="#ignore">ignore</a></li>
  44519. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  44520. <li>RSLrepetition<br>
  44521. Set the repeats for sending signal.
  44522. </li>
  44523. </ul>
  44524. <a name="SD_WS"></a>
  44525. <h3>Weather Sensors various protocols</h3>
  44526. <ul>
  44527. The SD_WS module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
  44528. <br>
  44529. <b>Known models:</b>
  44530. <ul>
  44531. <li>Bresser 7009994</li>
  44532. <li>Opus XT300</li>
  44533. <li>BresserTemeo</li>
  44534. <li>WH2 (TFA Dostmann/Wertheim 30.3157(Temperature only!) (sold in Germany), Agimex Rosenborg 66796 (sold in Denmark),ClimeMET CM9088 (Sold in UK)</li>
  44535. <li>PV-8644 infactory Poolthermometer</li>
  44536. </ul>
  44537. <br>
  44538. New received device are add in fhem with autocreate.
  44539. <br><br>
  44540. <a name="SD_WS_Define"></a>
  44541. <b>Define</b>
  44542. <ul>The received devices created automatically.<br>
  44543. The ID of the defice is the cannel or, if the longid attribute is specified, it is a combination of channel and some random generated bits at powering the sensor and the channel.<br>
  44544. If you want to use more sensors, than channels available, you can use the longid option to differentiate them.
  44545. </ul>
  44546. <br>
  44547. <a name="SD_WS Events"></a>
  44548. <b>Generated readings:</b>
  44549. <br>Some devices may not support all readings, so they will not be presented<br>
  44550. <ul>
  44551. <li>State (T: H:)</li>
  44552. <li>temperature (&deg;C)</li>
  44553. <li>humidity: (The humidity (1-100 if available)</li>
  44554. <li>battery: (low or ok)</li>
  44555. <li>channel: (The Channelnumber (number if)</li>
  44556. </ul>
  44557. <br>
  44558. <b>Attributes</b>
  44559. <ul>
  44560. <li><a href="#do_not_notify">do_not_notify</a></li>
  44561. <li><a href="#ignore">ignore</a></li>
  44562. <li><a href="#showtime">showtime</a></li>
  44563. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  44564. </ul>
  44565. <a name="SD_WS_Set"></a>
  44566. <b>Set</b> <ul>N/A</ul><br>
  44567. <a name="SD_WS_Parse"></a>
  44568. <b>Set</b> <ul>N/A</ul><br>
  44569. </ul>
  44570. <a name="SD_WS07"></a>
  44571. <h3>Weather Sensors protocol #7</h3>
  44572. <ul>
  44573. The SD_WS07 module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
  44574. <br>
  44575. <b>Known models:</b>
  44576. <ul>
  44577. <li>Eurochon EAS800z</li>
  44578. <li>Technoline WS6750/TX70DTH</li>
  44579. </ul>
  44580. <br>
  44581. New received devices are added in FHEM with autocreate.
  44582. <br><br>
  44583. <a name="SD_WS07_Define"></a>
  44584. <b>Define</b>
  44585. <ul>The received devices are created automatically.<br>
  44586. The ID of the defice is the cannel or, if the longid attribute is specified, it is a combination of channel and some random generated bits at powering the sensor and the channel.<br>
  44587. If you want to use more sensors, than channels available, you can use the longid option to differentiate them.
  44588. </ul>
  44589. <br>
  44590. <a name="SD_WS07 Events"></a>
  44591. <b>Generated readings:</b>
  44592. <br>Some devices may not support all readings, so they will not be presented<br>
  44593. <ul>
  44594. <li>state (T: H:)</li>
  44595. <li>temperature (&deg;C)</li>
  44596. <li>humidity: (the humidity 1-100)</li>
  44597. <li>battery: (low or ok)</li>
  44598. <li>channel: (the channelnumberf)</li>
  44599. </ul>
  44600. <br>
  44601. <b>Attributes</b>
  44602. <ul>
  44603. <li><a href="#do_not_notify">do_not_notify</a></li>
  44604. <li><a href="#ignore">ignore</a></li>
  44605. <li><a href="#showtime">showtime</a></li>
  44606. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  44607. </ul>
  44608. <a name="SD_WS07_Set"></a>
  44609. <b>Set</b> <ul>N/A</ul><br>
  44610. <a name="SD_WS07_Get"></a>
  44611. <b>Get</b> <ul>N/A</ul><br>
  44612. </ul>
  44613. <a name="SD_WS09"></a>
  44614. <h3>Wether Sensors protocol #9</h3>
  44615. <ul>
  44616. The SD_WS09 module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
  44617. Requires Perl-Modul Digest::CRC. <br>
  44618. <br>
  44619. cpan install Digest::CRC or sudo apt-get install libdigest-crc-perl <br>
  44620. <br>
  44621. <br>
  44622. <b>Known models:</b>
  44623. <ul>
  44624. <li>WS-0101 --> Model: WH1080</li>
  44625. <li>TFA 30.3189 / WH1080 --> Model: WH1080</li>
  44626. <li>1073 (WS1080) --> Model: WH1080</li>
  44627. <li>WH3080 --> Model: WH1080</li>
  44628. <li>CTW600 --> Model: CTW600 (??) </li>
  44629. </ul>
  44630. <br>
  44631. New received device are add in fhem with autocreate.
  44632. <br><br>
  44633. <a name="SD_WS09_Define"></a>
  44634. <b>Define</b>
  44635. <ul>The received devices created automatically.<br>
  44636. The ID of the defice is the model or, if the longid attribute is specified, it is a combination of model and some random generated bits at powering the sensor.<br>
  44637. If you want to use more sensors, you can use the longid option to differentiate them.
  44638. </ul>
  44639. <br>
  44640. <a name="SD_WS09 Events"></a>
  44641. <b>Generated readings:</b>
  44642. <br>Some devices may not support all readings, so they will not be presented<br>
  44643. <ul>
  44644. <li>State (T: H: Ws: Wg: Wd: R: ) temperature, humidity, windSpeed, windGuest, windDirection, Rain</li>
  44645. <li>Temperature (&deg;C)</li>
  44646. <li>Humidity: (The humidity (1-100 if available)</li>
  44647. <li>Battery: (low or ok)</li>
  44648. <li>ID: (The ID-Number (number if)</li>
  44649. <li>windSpeed/windGuest (Unit_of_Wind)) and windDirection (N-O-S-W)</li>
  44650. <li>Rain (mm)</li>
  44651. <li>windDirectionAverage<br>
  44652. As a result, the wind direction is returned, which are calculated from the current and past values
  44653. via a kind of exponential mean value.
  44654. The respective wind speed is additionally taken into account (higher speed means higher weighting)</li>
  44655. <b>WH3080:</b>
  44656. <li>UV Index</li>
  44657. <li>Lux</li>
  44658. </ul>
  44659. <br>
  44660. <b>Attributes</b>
  44661. <ul>
  44662. <li><a href="#do_not_notify">do_not_notify</a></li>
  44663. <li><a href="#ignore">ignore</a></li>
  44664. <li><a href="#showtime">showtime</a></li>
  44665. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  44666. <li>Model: WH1080,CTW600
  44667. </li>
  44668. <li>windKorrektur: -3,-2,-1,0,1,2,3
  44669. </li>
  44670. <li>Unit_of_Wind<br>
  44671. Unit of windSpeed and windGuest. State-Format: Value + Unit.
  44672. <br>m/s,km/h,ft/s,mph,bft,knot
  44673. </li><br>
  44674. <li>WindDirAverageTime<br>
  44675. default is 600s, time span to be considered for the calculation
  44676. </li><br>
  44677. <li>WindDirAverageMinSpeed<br>
  44678. since the wind direction is usually not clear at very low wind speeds,
  44679. minspeed can be used to specify a threshold value.
  44680. <br>The (weighted) mean velocity < minspeed is returned undef
  44681. </li><br>
  44682. <li>WindDirAverageDecay<br>
  44683. 1 -> all values ​​are weighted equally <br>
  44684. 0 -> only the current value is used. <br>
  44685. in practice, you will take values ​​around 0.75
  44686. </li><br>
  44687. <li>WS09_CRCAUS (set in Signalduino-Modul 00_SIGNALduino.pm)
  44688. <br>0: CRC-Check WH1080 CRC-Summe = 0 on, default
  44689. <br>2: CRC-Summe = 49 (x031) WH1080, set OK
  44690. </li>
  44691. </ul> <br>
  44692. <a name="SD_WS09_Set"></a>
  44693. <b>Set</b> <ul>N/A</ul><br>
  44694. <a name="SD_WS09_Parse"></a>
  44695. <b>Parse</b> <ul>N/A</ul><br>
  44696. </ul>
  44697. <a name="SD_WS_Maverick"></a>
  44698. <h3>Wether Sensors protocol #7</h3>
  44699. <ul>
  44700. The SD_WS_Maverick module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
  44701. <br>
  44702. <b>Known models:</b>
  44703. <ul>
  44704. <li>Eurochon EAS800z</li>
  44705. <li>Technoline WS6750/TX70DTH</li>
  44706. </ul>
  44707. <br>
  44708. New received device are add in fhem with autocreate.
  44709. <br><br>
  44710. <a name="SD_WS_Maverick_Define"></a>
  44711. <b>Define</b>
  44712. <ul>The received devices created automatically.<br>
  44713. The ID of the defice is the cannel or, if the longid attribute is specified, it is a combination of channel and some random generated bits at powering the sensor and the channel.<br>
  44714. If you want to use more sensors, than channels available, you can use the longid option to differentiate them.
  44715. </ul>
  44716. <br>
  44717. <a name="SD_WS_Maverick Events"></a>
  44718. <b>Generated readings:</b>
  44719. <br>Some devices may not support all readings, so they will not be presented<br>
  44720. <ul>
  44721. <li>State (T: H:)</li>
  44722. <li>temperature (&deg;C)</li>
  44723. <li>humidity: (The humidity (1-100 if available)</li>
  44724. <li>battery: (low or ok)</li>
  44725. <li>channel: (The Channelnumber (number if)</li>
  44726. </ul>
  44727. <br>
  44728. <b>Attributes</b>
  44729. <ul>
  44730. <li><a href="#do_not_notify">do_not_notify</a></li>
  44731. <li><a href="#ignore">ignore</a></li>
  44732. <li><a href="#model">model</a> ()</li>
  44733. <li><a href="#showtime">showtime</a></li>
  44734. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  44735. </ul>
  44736. <a name="SD_WS_Maverick_Set"></a>
  44737. <b>Set</b> <ul>N/A</ul><br>
  44738. <a name="SD_WS_Maverick_Parse"></a>
  44739. <b>Set</b> <ul>N/A</ul><br>
  44740. </ul>
  44741. <a name="SHC"></a>
  44742. <h3>SHC</h3>
  44743. <ul>
  44744. SHC is the basestation module that supports a family of RF devices available
  44745. at <a href="http://http://www.smarthomatic.org">www.smarthomatic.org</a>.
  44746. This module provides the IODevice for the <a href="#SHCdev">SHCdev</a>
  44747. modules that implement the SHCdev protocol.<br><br>
  44748. Note: this module may require the Device::SerialPort or Win32::SerialPort
  44749. module if you attach the device via USB and the OS sets strange default
  44750. parameters for serial devices.<br><br>
  44751. <a name="SHC_Define"></a>
  44752. <b>Define</b>
  44753. <ul>
  44754. <code>define &lt;name&gt; SHC &lt;device&gt;</code><br>
  44755. <br>
  44756. &lt;device&gt; specifies the serial port to communicate with the SHC.
  44757. The name of the serial-device depends on your distribution, under
  44758. linux usually a /dev/ttyUSB0 device will be created.<br><br>
  44759. You can also specify a baudrate if the device name contains the @
  44760. character, e.g.: /dev/ttyUSB0@57600. Please note that the default
  44761. baudrate for the SHC base station is 19200 baud.<br><br>
  44762. Example:<br>
  44763. <ul>
  44764. <code>define shc_base SHC /dev/ttyUSB0</code><br><br>
  44765. </ul>
  44766. </ul>
  44767. <a name="SHC_Set"></a>
  44768. <b>Set</b>
  44769. <ul>
  44770. <li>raw &lt;data&gt;<br>
  44771. not supported yet
  44772. </li><br>
  44773. </ul>
  44774. <a name="SHC_Get"></a>
  44775. <b>Get</b>
  44776. <ul>
  44777. <li>
  44778. N/A
  44779. </li><br>
  44780. </ul>
  44781. <a name="SHC_Attr"></a>
  44782. <b>Attributes</b>
  44783. <ul>
  44784. <li>
  44785. N/A
  44786. </li><br>
  44787. </ul>
  44788. </ul>
  44789. <a name="SHCdev"></a>
  44790. <h3>SHCdev</h3>
  44791. <ul>
  44792. SHC is the device module that supports several device types available
  44793. at <a href="http://www.smarthomatic.org">www.smarthomatic.org</a>.<br><br>
  44794. These device are connected to the FHEM server through the SHC base station (<a href="#SHC">SHC</a>).<br><br>
  44795. Currently supported are:<br>
  44796. <ul>
  44797. <li>EnvSensor</li>
  44798. <li>PowerSwitch</li>
  44799. <li>Dimmer</li>
  44800. <li>RGBDimmer</li>
  44801. <li>SoilMoistureMeter</li>
  44802. </ul><br>
  44803. <a name="SHCdev_Define"></a>
  44804. <b>Define</b>
  44805. <ul>
  44806. <code>define &lt;name&gt; SHCdev &lt;SenderID&gt; [&lt;AesKey&gt;]</code><br>
  44807. <br>
  44808. &lt;SenderID&gt;<br>
  44809. is a number ranging from 0 .. 4095 to identify the SHCdev device.<br><br>
  44810. &lt;AesKey&gt;<br>
  44811. is a optional number ranging from 0 .. 15 to select an encryption key.
  44812. It is required for the basestation to communicate with remote devides
  44813. The default value is 0.<br><br>
  44814. Note: devices are autocreated on reception of the first message.<br>
  44815. </ul>
  44816. <br>
  44817. <a name="SHCdev_Set"></a>
  44818. <b>Set</b>
  44819. <ul>
  44820. <li>on<br>
  44821. Supported by Dimmer and PowerSwitch (on always refers to pin1).
  44822. </li><br>
  44823. <li>off<br>
  44824. Supported by Dimmer and PowerSwitch (off always refers to pin1).
  44825. </li><br>
  44826. <li>pct &lt;0..100&gt;<br>
  44827. Sets the brightness in percent. Supported by Dimmer.
  44828. </li><br>
  44829. <li>ani &lt;AnimationMode&gt; &lt;TimeoutSec&gt; &lt;StartBrightness&gt; &lt;EndBrightness&gt;<br>
  44830. Description and details available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#Dimmer_Animation">www.smarthomatic.org</a>
  44831. Supported by Dimmer.
  44832. </li><br>
  44833. <li>statusRequest<br>
  44834. Supported by Dimmer and PowerSwitch.
  44835. </li><br>
  44836. <li>Color &lt;ColorNumber&gt;<br>
  44837. A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#Dimmer_Color">www.smarthomatic.org</a>
  44838. The color palette can be found <a href="http://www.smarthomatic.org/devices/rgb_dimmer.html">here</a>
  44839. Supported by RGBDimmer.
  44840. </li><br>
  44841. <li>ColorAnimation &lt;Repeat&gt; &lt;AutoReverse&gt; &lt;Time0&gt; &lt;ColorNumber0&gt; &lt;Time1&gt; &lt;ColorNumber1&gt; ... up to 10 time/color pairs<br>
  44842. A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#Dimmer_ColorAnimation">www.smarthomatic.org</a>
  44843. The color palette can be found <a href="http://www.smarthomatic.org/devices/rgb_dimmer.html">here</a>
  44844. Supported by RGBDimmer.
  44845. </li><br>
  44846. <li>DigitalPin &lt;Pos&gt; &lt;On&gt;<br>
  44847. A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPin">www.smarthomatic.org</a>
  44848. Supported by PowerSwitch.
  44849. </li><br>
  44850. <li>DigitalPinTimeout &lt;Pos&gt; &lt;On&gt; &lt;Timeout&gt;<br>
  44851. A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPinTimeout">www.smarthomatic.org</a>
  44852. Supported by PowerSwitch.
  44853. </li><br>
  44854. <li>DigitalPort &lt;On&gt;<br>
  44855. &lt;On&gt;<br>
  44856. is a bit array (0 or 1) describing the port state. If less than eight bits were provided zero is assumed.
  44857. Example: set SHC_device DigitalPort 10110000 will set pin0, pin2 and pin3 to 1.<br>
  44858. A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPort">www.smarthomatic.org</a>
  44859. Supported by PowerSwitch.
  44860. </li><br>
  44861. <li>DigitalPortTimeout &lt;On&gt; &lt;Timeout0&gt; .. &lt;Timeout7&gt;<br>
  44862. &lt;On&gt;<br>
  44863. is a bit array (0 or 1) describing the port state. If less than eight bits were provided zero is assumed.
  44864. Example: set SHC_device DigitalPort 10110000 will set pin0, pin2 and pin3 to 1.<br>
  44865. &lt;Timeout0&gt; .. &lt;Timeout7&gt;<br>
  44866. are the timeouts for each pin. If no timeout is provided zero is assumed.
  44867. A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPortTimeout">www.smarthomatic.org</a>
  44868. Supported by PowerSwitch.
  44869. </li><br>
  44870. <li><a href="#setExtensions"> set extensions</a><br>
  44871. Supported by Dimmer and PowerSwitch.</li>
  44872. </ul><br>
  44873. <a name="SHCdev_Get"></a>
  44874. <b>Get</b>
  44875. <ul>
  44876. <li>din &lt;pin&gt;<br>
  44877. Returns the state of the specified digital input pin for pin = 1..8. Or the state of all pins for pin = all.
  44878. Supported by EnvSensor.
  44879. </li><br>
  44880. <li>ain &lt;pin&gt;<br>
  44881. Returns the state of the specified analog input pin for pin = 1..5. Or the state of all pins for pin = all.
  44882. If the voltage of the pin is over the specied trigger threshold) it return 1 otherwise 0.
  44883. Supported by EnvSensor.
  44884. </li><br>
  44885. <li>ain &lt;pin&gt;<br>
  44886. Returns the state of the specified analog input pin for pin = 1..5. Or the state of all pins for pin = all.
  44887. If the voltage of the pin is over the specied trigger threshold) it return 1 otherwise 0.
  44888. Supported by EnvSensor.
  44889. </li><br>
  44890. <li>ain_volt &lt;pin&gt;<br>
  44891. Returns the voltage of the specified analog input pin for pin = 1..5 in millivolts, ranging from 0 .. 1100 mV.
  44892. Supported by EnvSensor.
  44893. </li><br>
  44894. </ul><br>
  44895. <a name="SHCdev_Attr"></a>
  44896. <b>Attributes</b>
  44897. <ul>
  44898. <li>devtype<br>
  44899. The device type determines the command set, default web commands and the
  44900. default devStateicon. Currently supported are: EnvSensor, Dimmer, PowerSwitch, RGBDimmer, SoilMoistureMeter.<br><br>
  44901. Note: If the device is not set manually, it will be determined automatically
  44902. on reception of a device type specific message. For example: If a
  44903. temperature message is received, the device type will be set to EnvSensor.
  44904. </li><br>
  44905. <li>readonly<br>
  44906. if set to a value != 0 all switching commands (on, off, toggle, ...) will be disabled.
  44907. </li><br>
  44908. <li>forceOn<br>
  44909. try to switch on the device whenever an off status is received.
  44910. </li><br>
  44911. </ul><br>
  44912. </ul>
  44913. <a name="SIGNALduino"></a>
  44914. <h3>SIGNALduino</h3>
  44915. <table>
  44916. <tr><td>
  44917. The SIGNALduino ia based on an idea from mdorenka published at <a
  44918. href="http://forum.fhem.de/index.php/topic,17196.0.html">FHEM Forum</a>.
  44919. With the opensource firmware (see this <a
  44920. href="https://github.com/RFD-FHEM/SIGNALduino">link</a>) it is capable
  44921. to receive and send different protocols over different medias. Currently are 433Mhz protocols implemented.
  44922. <br><br>
  44923. The following device support is currently available:
  44924. <br><br>
  44925. Wireless switches <br>
  44926. ITv1 & ITv3/Elro and other brands using pt2263 or arctech protocol--> uses IT.pm<br><br>
  44927. In the ITv1 protocol is used to sent a default ITclock from 250 and it may be necessary in the IT-Modul to define the attribute ITclock<br>
  44928. <br><br>
  44929. Temperatur / humidity senso
  44930. <ul>
  44931. <li>PEARL NC7159, LogiLink WS0002,GT-WT-02,AURIOL,TCM97001, TCM27 and many more -> 14_CUL_TCM97001 </li>
  44932. <li>Oregon Scientific v2 and v3 Sensors -> 41_OREGON.pm</li>
  44933. <li>Temperatur / humidity sensors suppored -> 14_SD_WS07</li>
  44934. <li>technoline WS 6750 and TX70DTH -> 14_SD_WS07</li>
  44935. <li>Eurochon EAS 800z -> 14_SD_WS07</li>
  44936. <li>CTW600, WH1080 -> 14_SD_WS09 </li>
  44937. <li>Hama TS33C, Bresser Thermo/Hygro Sensor -> 14_Hideki</li>
  44938. <li>FreeTec Aussenmodul NC-7344 -> 14_SD_WS07</li>
  44939. </ul>
  44940. <br><br>
  44941. It is possible to attach more than one device in order to get better
  44942. reception, fhem will filter out duplicate messages.<br><br>
  44943. Note: this module require the Device::SerialPort or Win32::SerialPort
  44944. module. It can currently only attatched via USB.
  44945. </td>
  44946. </tr>
  44947. </table>
  44948. <br>
  44949. <a name="SIGNALduinodefine"></a>
  44950. <b>Define</b><br>
  44951. <code>define &lt;name&gt; SIGNALduino &lt;device&gt; </code> <br>
  44952. <br>
  44953. USB-connected devices (SIGNALduino):<br>
  44954. <ul><li>
  44955. &lt;device&gt; specifies the serial port to communicate with the SIGNALduino.
  44956. The name of the serial-device depends on your distribution, under
  44957. linux the cdc_acm kernel module is responsible, and usually a
  44958. /dev/ttyACM0 or /dev/ttyUSB0 device will be created. If your distribution does not have a
  44959. cdc_acm module, you can force usbserial to handle the SIGNALduino by the
  44960. following command:
  44961. <ul>
  44962. modprobe usbserial
  44963. vendor=0x03eb
  44964. product=0x204b
  44965. </ul>In this case the device is most probably
  44966. /dev/ttyUSB0.<br><br>
  44967. You can also specify a baudrate if the device name contains the @
  44968. character, e.g.: /dev/ttyACM0@57600<br><br>This is also the default baudrate
  44969. It is recommended to specify the device via a name which does not change:
  44970. e.g. via by-id devicename: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0@57600
  44971. If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
  44972. perl module Device::SerialPort is not needed, and fhem opens the device
  44973. with simple file io. This might work if the operating system uses sane
  44974. defaults for the serial parameters, e.g. some Linux distributions and
  44975. OSX. <br><br>
  44976. </li>
  44977. </ul>
  44978. <a name="SIGNALduinoattr"></a>
  44979. <b>Attributes</b>
  44980. <ul>
  44981. <li><a name="addvaltrigger">addvaltrigger</a><br>
  44982. Create triggers for additional device values. Right now these are RSSI, RAWMSG and DMSG.
  44983. </li>
  44984. <li>blacklist_IDs<br>
  44985. The blacklist works only if a whitelist not exist.
  44986. </li>
  44987. <li>cc1101_frequency<br>
  44988. Since the PA table values ​​are frequency-dependent, is at 868 MHz a value greater 800 required.
  44989. </li>
  44990. <li><a href="#do_not_notify">do_not_notify</a></li>
  44991. <li><a href="#attrdummy">dummy</a></li>
  44992. <li>debug<br>
  44993. This will bring the module in a very verbose debug output. Usefull to find new signals and verify if the demodulation works correctly.
  44994. </li>
  44995. <li>development<br>
  44996. With development you can enable protocol decoding for protocolls witch are still in development and may not be very accurate implemented.
  44997. This can result in crashes or throw high amount of log entrys in your logfile, so be careful to use this. <br><br>
  44998. Protocols flagged with a developID flag are not loaded unless specified to do so.<br>
  44999. If the flag developId => 'y' is set in the protocol defintion then the protocol is still in development. You can enable it with the attribute:<br>
  45000. Specify "y" followed with the protocol id to enable it.<br><br>
  45001. If the protocoll is developed well, but the logical module is not ready, developId => 'm' is set.<br>
  45002. You can enable it with the attribute:<br>
  45003. Specify "m" followed with the protocol id to enable it.<br>
  45004. </li>
  45005. <li>doubleMsgCheck_IDs<br>
  45006. This attribute allows it, to specify protocols which must be received two equal messages to call dispatch to the modules.<br>
  45007. You can specify multiple IDs wih a colon : 0,3,7,12<br>
  45008. </li>
  45009. <li>flashCommand<br>
  45010. This is the command, that is executed to performa the firmware flash. Do not edit, if you don't know what you are doing.<br>
  45011. The default is: avrdude -p atmega328P -c arduino -P [PORT] -D -U flash:w:[HEXFILE] 2>[LOGFILE]<br>
  45012. It contains some place-holders that automatically get filled with the according values:<br>
  45013. <ul>
  45014. <li>[PORT]<br>
  45015. is the port the Signalduino is connectd to (e.g. /dev/ttyUSB0) and will be used from the defenition</li>
  45016. <li>[HEXFILE]<br>
  45017. is the .hex file that shall get flashed. There are three options (applied in this order):<br>
  45018. - passed in set flash as first argument<br>
  45019. - taken from the hexFile attribute<br>
  45020. - the default value defined in the module<br>
  45021. </li>
  45022. <li>[LOGFILE]<br>
  45023. The logfile that collects information about the flash process. It gets displayed in FHEM after finishing the flash process</li>
  45024. </ul>
  45025. </li>
  45026. <li>hardware<br>
  45027. When using the flash command, you should specify what hardware you have connected to the usbport. Doing not, can cause failures of the device.
  45028. </li>
  45029. <li>minsecs<br>
  45030. This is a very special attribute. It is provided to other modules. minsecs should act like a threshold. All logic must be done in the logical module.
  45031. If specified, then supported modules will discard new messages if minsecs isn't past.
  45032. </li>
  45033. <li>noMsgVerbose<br>
  45034. With this attribute you can control the logging of debug messages from the io device.
  45035. If set to 3, this messages are logged if global verbose is set to 3 or higher.
  45036. </li>
  45037. <li>longids<br>
  45038. Comma separated list of device-types for SIGNALduino that should be handled using long IDs. This additional ID allows it to differentiate some weather sensors, if they are sending on the same channel. Therfor a random generated id is added. If you choose to use longids, then you'll have to define a different device after battery change.<br>
  45039. Default is to not to use long IDs for all devices.
  45040. <br><br>
  45041. Examples:<PRE>
  45042. # Do not use any long IDs for any devices:
  45043. attr sduino longids 0
  45044. # Use any long IDs for all devices (this is default):
  45045. attr sduino longids 1
  45046. # Use longids for BTHR918N devices.
  45047. # Will generate devices names like BTHR918N_f3.
  45048. attr sduino longids BTHR918N
  45049. </PRE></li>
  45050. <li>rawmsgEvent<br>
  45051. When set to "1" received raw messages triggers events
  45052. </li>
  45053. <li>suppressDeviceRawmsg<br>
  45054. When set to 1, the internal "RAWMSG" will not be updated with the received messages
  45055. </li>
  45056. <li>whitelistIDs<br>
  45057. This attribute allows it, to specify whichs protocos are considured from this module.
  45058. Protocols which are not considured, will not generate logmessages or events. They are then completly ignored.
  45059. This makes it possible to lower ressource usage and give some better clearnes in the logs.
  45060. You can specify multiple whitelistIDs wih a colon : 0,3,7,12<br>
  45061. With a # at the beginnging whitelistIDs can be deactivated.
  45062. </li><br>
  45063. <li>WS09_CRCAUS<br>
  45064. <br>0: CRC-Check WH1080 CRC = 0 on, default
  45065. <br>2: CRC = 49 (x031) WH1080, set OK
  45066. </li>
  45067. </ul>
  45068. <a name="SIGNALduinoget"></a>
  45069. <b>Get</b>
  45070. <ul>
  45071. <li>version<br>
  45072. return the SIGNALduino firmware version
  45073. </li><br>
  45074. <li>raw<br>
  45075. Issue a SIGNALduino firmware command, and wait for one line of data returned by
  45076. the SIGNALduino. See the SIGNALduino firmware code for details on SIGNALduino
  45077. commands. With this line, you can send almost any signal via a transmitter connected
  45078. </li><br>
  45079. <li>cmds<br>
  45080. Depending on the firmware installed, SIGNALduinos have a different set of
  45081. possible commands. Please refer to the sourcecode of the firmware of your
  45082. SIGNALduino to interpret the response of this command. See also the raw-
  45083. command.
  45084. </li><br>
  45085. <li>protocolIDs<br>
  45086. display a list of the protocol IDs
  45087. </li><br>
  45088. <li>ccconf<br>
  45089. Only with cc1101 receiver.
  45090. Read some CUL radio-chip (cc1101) registers (frequency, bandwidth, etc.),
  45091. and display them in human readable form.
  45092. </li><br>
  45093. <li>ccpatable<br>
  45094. read cc1101 PA table (power amplification for RF sending)
  45095. </li><br>
  45096. <li>ccreg<br>
  45097. read cc1101 registers (99 reads all cc1101 registers)
  45098. </li><br>
  45099. </ul>
  45100. <a name="SIGNALduinoset"></a>
  45101. <b>SET</b>
  45102. <ul>
  45103. <li>raw<br>
  45104. Issue a SIGNALduino firmware command, without waiting data returned by
  45105. the SIGNALduino. See the SIGNALduino firmware code for details on SIGNALduino
  45106. commands. With this line, you can send almost any signal via a transmitter connected
  45107. To send some raw data look at these examples:
  45108. P<protocol id>#binarydata#R<num of repeats>#C<optional clock> (#C is optional)
  45109. <br>Example 1: set sduino raw SR;R=3;P0=500;P1=-9000;P2=-4000;P3=-2000;D=0302030 sends the data in raw mode 3 times repeated
  45110. <br>Example 2: set sduino raw SM;R=3;P0=500;C=250;D=A4F7FDDE sends the data manchester encoded with a clock of 250uS
  45111. <br>Example 3: set sduino raw SC;R=3;SR;P0=5000;SM;P0=500;C=250;D=A4F7FDDE sends a combined message of raw and manchester encoded repeated 3 times
  45112. <br>;
  45113. </p>
  45114. </li><br>
  45115. <li>reset<br>
  45116. This will do a reset of the usb port and normaly causes to reset the uC connected.
  45117. </li><br>
  45118. <li>close<br>
  45119. Closes the connection to the device.
  45120. </li><br>
  45121. <li>flash [hexFile|url]<br>
  45122. The SIGNALduino needs the right firmware to be able to receive and deliver the sensor data to fhem. In addition to the way using the
  45123. arduino IDE to flash the firmware into the SIGNALduino this provides a way to flash it directly from FHEM.
  45124. You can specify a file on your fhem server or specify a url from which the firmware is downloaded
  45125. There are some requirements:
  45126. <ul>
  45127. <li>avrdude must be installed on the host<br>
  45128. On a Raspberry PI this can be done with: sudo apt-get install avrdude</li>
  45129. <li>the hardware attribute must be set if using any other hardware as an Arduino nano<br>
  45130. This attribute defines the command, that gets sent to avrdude to flash the uC.<br></li>
  45131. <br>
  45132. </ul>
  45133. </li>
  45134. <li>sendMsg<br>
  45135. This command will create the needed instructions for sending raw data via the signalduino. Insteaf of specifying the signaldata by your own you specify
  45136. a protocol and the bits you want to send. The command will generate the needed command, that the signalduino will send this.
  45137. <br><br>
  45138. Please note, that this command will work only for MU or MS protocols. You can't transmit manchester data this way.
  45139. <br><br>
  45140. Input args are:
  45141. <p>
  45142. P<protocol id>#binarydata#R<num of repeats>#C<optional clock> (#C is optional)
  45143. <br>Example: P0#0101#R3#C500
  45144. <br>Will generate the raw send command for the message 0101 with protocol 0 and instruct the arduino to send this three times and the clock is 500.
  45145. <br>SR;R=3;P0=500;P1=-9000;P2=-4000;P3=-2000;D=03020302;
  45146. </p>
  45147. </li><br>
  45148. <li>enableMessagetype<br>
  45149. Allows you to enable the message processing for
  45150. <ul>
  45151. <li>messages with sync (syncedMS),</li>
  45152. <li>messages without a sync pulse (unsyncedMU) </li>
  45153. <li>manchester encoded messages (manchesterMC) </li>
  45154. </ul>
  45155. The new state will be saved into the eeprom of your arduino.
  45156. </li><br>
  45157. <li>disableMessagetype<br>
  45158. Allows you to disable the message processing for
  45159. <ul>
  45160. <li>messages with sync (syncedMS),</li>
  45161. <li>messages without a sync pulse (unsyncedMU)</li>
  45162. <li>manchester encoded messages (manchesterMC) </li>
  45163. </ul>
  45164. The new state will be saved into the eeprom of your arduino.
  45165. </li><br><br>
  45166. <li>freq / bWidth / patable / rAmpl / sens<br>
  45167. Only with CC1101 receiver.<br>
  45168. Set the sduino frequency / bandwidth / PA table / receiver-amplitude / sensitivity<br>
  45169. Use it with care, it may destroy your hardware and it even may be
  45170. illegal to do so. Note: The parameters used for RFR transmission are
  45171. not affected.<br>
  45172. <ul>
  45173. <li>freq sets both the reception and transmission frequency. Note:
  45174. Although the CC1101 can be set to frequencies between 315 and 915
  45175. MHz, the antenna interface and the antenna of the CUL is tuned for
  45176. exactly one frequency. Default is 868.3 MHz (or 433 MHz)</li>
  45177. <li>bWidth can be set to values between 58 kHz and 812 kHz. Large values
  45178. are susceptible to interference, but make possible to receive
  45179. inaccurately calibrated transmitters. It affects tranmission too.
  45180. Default is 325 kHz.</li>
  45181. <li>patable change the PA table (power amplification for RF sending)
  45182. </li>
  45183. <li>rAmpl is receiver amplification, with values between 24 and 42 dB.
  45184. Bigger values allow reception of weak signals. Default is 42.
  45185. </li>
  45186. <li>sens is the decision boundary between the on and off values, and it
  45187. is 4, 8, 12 or 16 dB. Smaller values allow reception of less clear
  45188. signals. Default is 4 dB.</li>
  45189. </ul>
  45190. </li><br>
  45191. </ul>
  45192. <a name="SIGNALduino_un"></a>
  45193. <h3>SIGNALduino_un</h3>
  45194. <ul>
  45195. The SIGNALduino_un module is a testing and debugging module to decode some devices, it will not create any devices, it will catch only all messages from the signalduino which can't be send to another module
  45196. <br><br>
  45197. <a name="SIGNALduino_undefine"></a>
  45198. <b>Define</b>
  45199. <ul>
  45200. <code>define &lt;name&gt; SIGNALduino_un &lt;code&gt; ]</code> <br>
  45201. <br>
  45202. You can define a Device, but currently you can do nothing with it.
  45203. Autocreate is also not enabled for this module.
  45204. The function of this module is only to output some logging at verbose 4 or higher. May some data is decoded correctly but it's also possible that this does not work.
  45205. The Module will try to process all messages, which where not handled by other modules.
  45206. </ul>
  45207. <br>
  45208. <a name="SIGNALduino_unset"></a>
  45209. <b>Set</b> <ul>N/A</ul><br>
  45210. <a name="SIGNALduino_unget"></a>
  45211. <b>Get</b> <ul>N/A</ul><br>
  45212. <a name="SIGNALduino_unattr"></a>
  45213. <b>Attributes</b>
  45214. <ul>
  45215. <li><a href="#verbose">Verbose</a></li>
  45216. </ul>
  45217. <br>
  45218. </ul>
  45219. <a name="SIP"></a>
  45220. <h3>SIP</h3>
  45221. <ul>
  45222. Define a SIP-Client device.
  45223. <br><br>
  45224. <a name="SIPdefine"></a>
  45225. <b>Define</b>
  45226. <ul>
  45227. <code>define &lt;name&gt; SIP</code>
  45228. <br><br>
  45229. Example:
  45230. <ul>
  45231. <code>define MySipClient SIP</code><br>
  45232. </ul>
  45233. </ul>
  45234. <br>
  45235. <a name="SIPset"></a>
  45236. <b>Set</b>
  45237. <ul>
  45238. <li>
  45239. <code>set &lt;name&gt; &lt;SIP password&gt;</code><br>
  45240. Stores the password for the SIP users. Without stored password the functions set call and set listen are blocked !<br>
  45241. IMPORTANT : if you rename the fhem Device you must set the password again!
  45242. </li>
  45243. <li>
  45244. <code>set &lt;name&gt; reset</code><br>
  45245. Stop any listen process and initialize device.<br>
  45246. </li>
  45247. <li>
  45248. <code>set &lt;name&gt; call &lt;number&gt [&lt;maxtime&gt;] [&lt;message&gt;]</code><br>
  45249. Start a call to the given number.<br>
  45250. Optionally you can supply a max time. Default is 30.
  45251. Optionally you can supply a message which is either a full path to an audio file or a relativ path starting from the home directory of the fhem.pl.
  45252. </li>
  45253. <li>
  45254. <code>set &lt;name&gt; listen</code><br>
  45255. attr sip_listen = dtmf :<br>
  45256. Start a listening process that receives calls. The device goes into an echo mode when a call comes in. If you press # on the keypad followed by 2 numbers and hang up the reading <b>dtmf</b> will reflect that number.<br>
  45257. attr sip_listen = wfp :<br>
  45258. Start a listening process that waits for incoming calls. If a call comes in for the SIP-Client the state will change to <b>ringing</b>. If you manually set the state to <b>fetch</b> the call will be picked up and the sound file given in attribute sip_audiofile will be played to the caller. After that the devive will go gack into state <b>listenwfp</b>.<br>
  45259. </li>
  45260. </ul>
  45261. <br>
  45262. <a name="SIPattr"></a>
  45263. <b>Attributes</b>
  45264. <ul>
  45265. <li><a href="#sip_audiofile_wfp">sip_audiofile_wfp</a><br>
  45266. Audio file that will be played after <b>fetch</b> command. The audio file has to be generated via <br>
  45267. sox &lt;file&gt;.wav -t raw -r 8000 -c 1 -e a-law &lt;file&gt;.al<br>
  45268. since only raw audio format is supported.
  45269. </li>
  45270. <li><a href="#sip_audiofile_call">sip_audiofile_call</a></li>
  45271. <li><a href="#sip_audiofile_dtmf">sip_audiofile_dtmf</a></li>
  45272. <li><a href="#sip_audiofile_ok">sip_audiofile_ok</a></li>
  45273. <li><a href="#sip_listen">sip_listen</a>(none , dtmf , wfp)</li>
  45274. <li><a name="#sip_from">sip_from</a><br>
  45275. My sip client info, defaults to sip:620@fritz.box
  45276. </li>
  45277. <li><a name="#sip_ip">sip_ip</a><br>
  45278. external IP address of the FHEM server.
  45279. </li>
  45280. <li><a name="#sip_port">sip_port</a><br>
  45281. Optionally portnumber used for sip client<br>
  45282. If attribute is not set a random port number between 44000 and 45000 will be used
  45283. </li>
  45284. <li><a name="#sip_registrar">sip_registrar</a><br>
  45285. Hostname or IP address of the SIP server you are connecting to, defaults to fritz.box.
  45286. </li>
  45287. <li><a name="#sip_ringtime">sip_ringtime</a><br>
  45288. Ringtime for incomming calls (dtmf &wfp)
  45289. </li>
  45290. <li><a name="#sip_user">sip_user</a><br>
  45291. User name of the SIP client, defaults to 620.
  45292. </li>
  45293. <li><a name="#sip_waittime">sip_waittime</a><br>
  45294. Maximum waiting time in state listen_for_wfp it will wait to pick up the call.
  45295. </li>
  45296. <li><a name="#sip_dtmf_size">sip_dtmf_size</a><br>
  45297. 1 to 4 , default is 2 ...
  45298. </li>
  45299. <li><a name="#sip_dtmf_loop">sip_dtmf_loop</a><br>
  45300. once or loop , default once ...
  45301. </li>
  45302. </ul>
  45303. <br>
  45304. </ul>
  45305. <a name="SISPM"></a>
  45306. <h3>SISPM</h3>
  45307. <ul>
  45308. <br>
  45309. <a name="SISPMdefine"></a>
  45310. <b>Define</b>
  45311. <ul>
  45312. <code>define &lt;name&gt; SISPM &lt;/path/to/sispmctl&gt;</code>
  45313. <br><br>
  45314. <!--<div style="background-color: #ffaaaa;"> -->
  45315. <div>
  45316. When <i>using multiple SIS PMs on one host</i>, sispmctl up to and including V 2.7 has a bug:
  45317. <pre>plug-2:# sispmctl -v -s -d 1 -g all -d 2 -g all
  45318. SiS PM Control for Linux 2.7
  45319. (C) 2004, 2005, 2006, 2007, 2008 by Mondrian Nuessle, (C) 2005, 2006 by Andreas Neuper.
  45320. This program is free software.
  45321. [...]
  45322. Gembird #0 is USB device 013.This device is a 4-socket SiS-PM.
  45323. [...]
  45324. Gembird #1 is USB device 015.This device is a 4-socket SiS-PM.
  45325. [...]
  45326. Accessing Gembird #1 USB device 015
  45327. Status of outlet 1: on
  45328. Status of outlet 2: on
  45329. Status of outlet 3: on
  45330. Status of outlet 4: on
  45331. Error performing requested action
  45332. Libusb error string: error sending control message: Invalid argument
  45333. Terminating
  45334. *** glibc detected *** sispmctl: double free or corruption (fasttop): 0x000251e0 ***
  45335. [...]</pre>
  45336. Well, the fix is simple and will be sent upstream, but in case it's not incorporated
  45337. at the time you need it, here it is; it's easy to apply even by hand ;-)
  45338. <pre>
  45339. --- src/main.c-old 2010-01-19 16:56:15.000000000 +0100
  45340. +++ src/main.c 2010-01-19 16:54:56.000000000 +0100
  45341. @@ -441,7 +441,7 @@
  45342. }
  45343. break;
  45344. case 'd': // replace previous (first is default) device by selected one
  45345. - if(udev!=NULL) usb_close (udev);
  45346. + if(udev!=NULL) { usb_close (udev); udev=NULL; }
  45347. devnum = atoi(optarg);
  45348. if(devnum>=count) devnum=count-1;
  45349. break;
  45350. </pre></div><br>
  45351. Defines a path to the program "sispmctl", which is used to control (locally attached)
  45352. "Silver Shield Power Manager" devices. Usually these are connected to the local computer
  45353. via USB, more than one "sispm" device per computer is supported. (Please note that, due
  45354. to neglections in their USB driver, AVM's Fritz!Box 7170 (and derivates, like Deutsche
  45355. Telekom's Speedport W901V) <b>is not</b> able to talk to these devices ... The Fritz!Box
  45356. 72xx and 73xx should be fine.)
  45357. The communication between FHEM and the Power Manager device is done by using the open
  45358. source <a href="http://sispmctl.sourceforge.net/">sispmctl</a> program. Thus, for the
  45359. time being, THIS functionality is only available running FHEM on Linux (or any other platform
  45360. where you can get the sispmctl program compiled and running). On the bright side: by
  45361. interfacing via commandline, it is possible to define multiple SISPM devices, e. g. with
  45362. a wrapper that does execute sispmctl on a remote (Linux) system. And: sispmctl runs happily
  45363. on Marvells SheevaPlug ;) <i>Please note:</i> if you're not running FHEM as root, you most likely
  45364. have to make sispmctl setuid root (<code>chmod 4755 /path/to/sispmctl</code>) or fiddle with
  45365. udev so that the devices of the Power Manager are owned by the user running FHEM.
  45366. After defining a SISPM device, a first test is done, identifying attached PMs. If this
  45367. succeeds, an internal task is scheduled to read the status every 30 seconds. (Reason
  45368. being that someone else could have switched sockets externally to FHEM.)
  45369. To actually control any power sockets, you need to define a <a href="#SIS_PMS">SIS_PMS</a>
  45370. device ;) If autocreate is enabled, those should be autocreated for your convenience as
  45371. soon as the first scan took place (30 seconds after the define).
  45372. Implementation of SISPM.pm tries to be nice, that is it reads from the pipe only
  45373. non-blocking (== if there is data), so it should be safe even to use it via ssh or
  45374. a netcat-pipe over the Internet, but this, as well, has not been tested extensively yet.
  45375. <br><br>
  45376. Attributes:
  45377. <ul>
  45378. <li><code>model</code>: <code>SISPM</code> (ignored for now)</li>
  45379. </ul>
  45380. <br>
  45381. Example:
  45382. <ul>
  45383. <code>define PMS_Terrarium SISPM /usr/bin/sispmctl</code><br>
  45384. </ul>
  45385. <br>
  45386. </ul>
  45387. <a name="SISPMset"></a>
  45388. <b>Set</b> <ul>N/A</ul><br>
  45389. <a name="SISPMget"></a>
  45390. <b>Get</b> <ul>N/A</ul><br>
  45391. <a name="SISPMattr"></a>
  45392. <b>Attributes</b>
  45393. <ul>
  45394. <li><a href="#model">model</a> (SISPM)</li>
  45395. </ul>
  45396. <br>
  45397. </ul>
  45398. <a name="SIS_PMS"></a>
  45399. <h3>SIS_PMS</h3>
  45400. <ul>
  45401. This module is responsible for handling the actual sockets (power on,
  45402. power off, toggle) on a "Silver Shield Power Manager", see <a href="#SISPM">SISPM</a>
  45403. for how to define access to one (SIS_PMS stands for "Silver Shield Power Manager Socket").
  45404. <br><br>
  45405. <a name="SIS_PMSdefine"></a>
  45406. <b>Define</b>
  45407. <ul>
  45408. <code>define &lt;name&gt; SIS_PMS &lt;serial&gt; &lt;socket&gt;</code>
  45409. <br><br>
  45410. To securely distinguish multiple attached Power Manager devices, the
  45411. serial number of those is used. You get these with "sispmctl -s"&nbsp;- or
  45412. just let autocreate define the sockets attached for you.<br>
  45413. <ul>
  45414. <li><code>&lt;serial&gt;</code> is the serial number of the Power Manager device, see above.</li>
  45415. <li><code>&lt;socket&gt;</code> is a number between 1 and 4 (for a 4 socket model)</li>
  45416. </ul>
  45417. <br>
  45418. Examples:
  45419. <ul>
  45420. <code>define lamp SIS_PMS 01:02:03:04:05 1</code><br>
  45421. <code>define otherlamp SIS_PMS 01:02:03:04:05 3</code><br>
  45422. <code>define tv SIS_PMS 01:01:38:44:55 1</code>
  45423. </ul>
  45424. </ul>
  45425. <br>
  45426. <a name="SIS_PMSset"></a>
  45427. <b>Set </b>
  45428. <ul>
  45429. <code>set &lt;name&gt; &lt;value&gt; [&lt;time&gt;]</code>
  45430. <br><br>
  45431. where <code>value</code> is one of:<br>
  45432. <pre>
  45433. off
  45434. on
  45435. toggle
  45436. on-till # Special, see the note
  45437. off-till # Special, see the note
  45438. </pre>
  45439. Examples:
  45440. <ul>
  45441. <code>set lamp on</code><br>
  45442. <code>set lamp1,lamp2,lamp3 on</code><br>
  45443. <code>set lamp1-lamp3 on</code><br>
  45444. <code>set hql_lamp on-till 18:45</code><br>
  45445. </ul>
  45446. <br>
  45447. Notes:
  45448. <ul>
  45449. <li>As an external program is used, a noticeable delay may occur.</li>
  45450. <li>*-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
  45451. or { &lt;perl code&gt; }, where the perl-code returns a time
  45452. specification).
  45453. If the current time is greater than the specified time, then the
  45454. command is ignored, else an "on" or "off" command, respectively, is
  45455. generated, and for the given time an "off"/"on" command is
  45456. scheduleld via the at command.</li>
  45457. </ul>
  45458. </ul>
  45459. <br>
  45460. <b>Get</b> <ul>N/A</ul><br>
  45461. <a name="SIS_PMSattributes"></a>
  45462. <b>Attributes</b>
  45463. <ul>
  45464. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  45465. <a name="attrdummy"></a>
  45466. <li>dummy<br>
  45467. Set the device attribute dummy to define devices which should not
  45468. output any signals. Associated notifys will be executed if the signal
  45469. is received. Used e.g. to react to a code from a sender, but it will
  45470. not actually switch if triggered in the web frontend.
  45471. </li><br>
  45472. <li><a href="#loglevel">loglevel</a></li><br>
  45473. </ul>
  45474. </ul>
  45475. <a name="SMAEM"></a>
  45476. <h3>SMAEM</h3>
  45477. <br>
  45478. <a name="SMAEMdefine"></a>
  45479. <b>Define</b>
  45480. <ul>
  45481. <code>define &lt;name&gt; SMAEM </code><br>
  45482. <br>
  45483. Defines a SMA Energy Meter (SMAEM), a bidirectional energy meter/counter used in photovoltaics.
  45484. <br><br>
  45485. You need at least one SMAEM on your local subnet or behind a multicast enabled network of routers to receive multicast messages from the SMAEM over the
  45486. multicast group 239.12.255.254 on udp/9522. Multicast messages are sent by SMAEM once a second (firmware 1.02.04.R, March 2016).
  45487. <br><br>
  45488. The update interval will be set by attribute "interval". If not set, it defaults to 60s. Since the SMAEM sends updates once a second, you can
  45489. update the readings once a second by lowering the interval to 1 (Not recommended, since it puts FHEM under heavy load).
  45490. <br><br>
  45491. The parameter "disableSernoInReading" changes the way readings are named: if disableSernoInReading is false or unset, the readings will be named
  45492. "SMAEM&lt;serialnumber_&gt;.....".
  45493. If set to true, the prefix "SMAEM&lt;serialnumber_&gt;" is skipped.
  45494. Set this to true if you only have one SMAEM device on your network and you want shorter reading names.
  45495. If unsure, leave it unset.
  45496. <br><br>
  45497. You need the perl module IO::Socket::Multicast. Under Debian (based) systems it can be installed with <code>apt-get install libio-socket-multicast-perl</code>.
  45498. </ul>
  45499. <br>
  45500. <br>
  45501. <a name="SMAEMattr"></a>
  45502. <b>Attribute</b>
  45503. <ul>
  45504. <li><b>disableSernoInReading</b> : prevents the prefix "SMAEM&lt;serialnumber_&gt;....." </li>
  45505. <li><b>feedinPrice</b> : the individual amount of refund of one kilowatt hour</li>
  45506. <li><b>interval</b> : evaluation interval in seconds </li>
  45507. <li><b>disable</b> : 1 = the module is disabled </li>
  45508. <li><b>diffAccept</b> : diffAccept determines the threshold, up to that a calaculated difference between two
  45509. straight sequently meter readings (Readings with *_Diff) should be commenly accepted (default = 10). <br>
  45510. Hence faulty DB entries with a disproportional high difference values will be eliminated, don't
  45511. tamper the result and the measure cycles will be discarded. </li>
  45512. <li><b>powerCost</b> : the individual amount of power cost per kWh </li>
  45513. <li><b>timeout</b> : adjustment timeout of backgound processing (default 60s). The value of timeout has to be higher than the value of "interval". </li>
  45514. </ul>
  45515. <br>
  45516. <a name="SMAEMreadings"></a>
  45517. <b>Readings</b> <br><br>
  45518. The created readings of SMAEM mostly are self-explanatory.
  45519. However there are readings what maybe need some explanation. <br>
  45520. <ul>
  45521. <li><b>&lt;Phase&gt;_THD</b> : (Total Harmonic Distortion) - Proportion or quota of total effective value
  45522. of all harmonic component to effective value of fundamental component.
  45523. Total ratio of harmonic component and interference of pure sinusoidal wave
  45524. in %.
  45525. It is a rate of interferences. d is 0, if sinusoidal voltage exists and a sinusoidal
  45526. current exists as well. As larger d, as more harmonic component are existing.
  45527. According EN 50160/1999 the value mustn't exceed 8 %.
  45528. If a current interference is so powerful that it is causing a voltage interference of
  45529. more than 5 % (THD), that points to an issue with electrical potential. </li>
  45530. </ul>
  45531. <br>
  45532. <a name="SMAInverter"></a>
  45533. <h3>SMAInverter</h3>
  45534. Module for the integration of a SMA Inverter over it's Speedwire (=Ethernet) Interface.<br>
  45535. Tested on Sunny Tripower 6000TL-20 and Sunny Island 4.4 with Speedwire/Webconnect Piggyback.
  45536. <br><br>
  45537. Questions and discussions about this module you can find in the FHEM-Forum link:<br>
  45538. <a href="https://forum.fhem.de/index.php/topic,56080.msg476525.html#msg476525">76_SMAInverter.pm - Abfrage von SMA Wechselrichter</a>.
  45539. <br><br>
  45540. <b>Requirements</b>
  45541. <br><br>
  45542. This module requires:
  45543. <ul>
  45544. <li>Perl Module: IO::Socket::INET (apt-get install libio-socket-multicast-perl) </li>
  45545. <li>Perl Module: Date::Time (apt-get install libdatetime-perl) </li>
  45546. <li>Perl Module: Time::HiRes</li>
  45547. <li>FHEM Module: 99_SUNRISE_EL.pm</li>
  45548. <li>FHEM Module: Blocking.pm</li>
  45549. </ul>
  45550. <br>
  45551. <br>
  45552. <b>Define</b>
  45553. <ul>
  45554. <code>define &lt;name&gt; SMAInverter &lt;pin&gt; &lt;hostname/ip&gt; </code><br>
  45555. <br>
  45556. <li>pin: User-Password of the SMA Inverter. Default is 0000. Can be changed by "Sunny Explorer" Windows Software</li>
  45557. <li>hostname/ip: Hostname or IP-Adress of the inverter (or it's speedwire piggyback module).</li>
  45558. <li>Port of the inverter is 9522 by default. Firewall has to allow connection on this port !</li>
  45559. </ul>
  45560. <b>Operation method</b>
  45561. <ul>
  45562. The module sends commands to the inverter and checks if they are supported by the inverter.<br>
  45563. In case of a positive answer the data is collected and displayed in the readings according to the detail-level. <br>
  45564. If more than one inverter is installed, set attributes "target-susyid" and "target-serial" with an appropriate value. <br><br>
  45565. The normal operation time of the inverter is supposed from sunrise to sunset. In that time period the inverter will be polled.
  45566. The time of sunrise and sunset will be calculated by functions of FHEM module 99_SUNRISE_EL.pm which is loaded automatically by default.
  45567. Therefore the global attribute "longitude" and "latitude" should be set to determine the position of the solar system
  45568. (see <a href="#SUNRISE_EL">Commandref SUNRISE_EL</a>). <br><br>
  45569. By the attribute "suppressSleep" the sleep mode between sunset and sunrise can be suppressed. Using attribute "offset" you may prefer the sunrise and
  45570. defer the sunset virtually. So the working period of the inverter will be extended. <br><br>
  45571. In operating mode "automatic" the inverter will be requested periodically corresponding the preset attribute "interval". The operating mode can be
  45572. switched to "manual" to realize the retrieval manually (e.g. to synchronize the requst with a SMA energy meter by notify). <br><br>
  45573. During inverter operating time the average energy production of the last 5, 10 and 15 minutes will be calculated and displayed in the readings
  45574. "avg_power_lastminutes_05", "avg_power_lastminutes_10" and "avg_power_lastminutes_15". <b>Note:</b> To permit a precise calculation, you should
  45575. also set the real request interval into the attribute "interval" although you would use the "manual" operation mode ! <br><br>
  45576. The retrieval of the inverter will be executed non-blocking. You can adjust the timeout value for this background process by attribute "timeout". <br>
  45577. </ul>
  45578. <b>Get</b>
  45579. <br>
  45580. <ul>
  45581. <code>get &lt;name&gt; data</code>
  45582. <br><br>
  45583. The request of the inverter will be executed. Those possibility is especifically created for the "manual" operation mode (see attribute "mode").
  45584. </ul>
  45585. <b>Attributes</b>
  45586. <ul>
  45587. <li><b>interval</b> : Queryintreval in seconds </li>
  45588. <li><b>detail-level</b> : "0" - Only Power and Energy / "1" - Including Voltage and Current / "2" - All values </li>
  45589. <li><b>disable</b> : 1 = the module is disabled </li>
  45590. <li><b>mode</b> : automatic = the inverter will be polled by preset interval, manual = query only by command "get &lt;name&gt; data" </li>
  45591. <li><b>offset</b> : time in seconds to prefer the sunrise respectively defer the sunset virtualy (0 ... 7200). You will be able to extend the working
  45592. period of the module. </li>
  45593. <li><b>SBFSpotComp</b> : 1 = the readings are created like SBFSpot-style </li>
  45594. <li><b>suppressSleep</b> : the sleep mode (after sunset, before sunrise) is deactivated and the inverter will be polled continuously. </li>
  45595. <li><b>showproctime</b> : shows processing time in background and wasted time to retrieve inverter data </li>
  45596. <li><b>target-susyid</b> : In case of a Multigate the target SUSyID can be defined. If more than one inverter is installed you have to
  45597. set the inverter-SUSyID to assign the inverter to the device definition.
  45598. Default is 0xFFFF, means any SUSyID</li>
  45599. <li><b>target-serial</b> : In case of a Multigate the target Serialnumber can be defined. If more than one inverter is installed you have to
  45600. set the inverter-Serialnumber to assign the inverter to the device definition.
  45601. Default is 0xFFFFFFFF, means any Serialnumber</li>
  45602. <li><b>timeout</b> : setup timeout of inverter data request (default 60s) </li>
  45603. </ul>
  45604. <b>Readings</b>
  45605. <ul>
  45606. <li><b>BAT_CYCLES / bat_cycles</b> : Battery recharge cycles </li>
  45607. <li><b>BAT_IDC / bat_idc</b> : Battery Current </li>
  45608. <li><b>BAT_TEMP / bat_temp</b> : Battery temperature </li>
  45609. <li><b>BAT_UDC / bat_udc</b> : Battery Voltage </li>
  45610. <li><b>ChargeStatus / chargestatus</b> : Battery Charge status </li>
  45611. <li><b>CLASS / device_class</b> : Inverter Class </li>
  45612. <li><b>PACMAX1 / pac_max_phase_1</b> : Nominal power in Ok Mode </li>
  45613. <li><b>PACMAX1_2 / pac_max_phase_1_2</b> : Maximum active power device (Some inverters like SB3300/SB1200) </li>
  45614. <li><b>PACMAX2 / pac_max_phase_2</b> : Nominal power in Warning Mode </li>
  45615. <li><b>PACMAX3 / pac_max_phase_3</b> : Nominal power in Fault Mode </li>
  45616. <li><b>Serialnumber / serial_number</b> : Inverter Serialnumber </li>
  45617. <li><b>SPOT_ETODAY / etoday</b> : Today yield </li>
  45618. <li><b>SPOT_ETOTAL / etotal</b> : Total yield </li>
  45619. <li><b>SPOT_FEEDTM / feed-in_time</b> : Feed-in time </li>
  45620. <li><b>SPOT_FREQ / grid_freq.</b> : Grid Frequency </li>
  45621. <li><b>SPOT_IAC1 / phase_1_iac</b> : Grid current phase L1 </li>
  45622. <li><b>SPOT_IAC2 / phase_2_iac</b> : Grid current phase L2 </li>
  45623. <li><b>SPOT_IAC3 / phase_3_iac</b> : Grid current phase L3 </li>
  45624. <li><b>SPOT_IDC1 / string_1_idc</b> : DC current input </li>
  45625. <li><b>SPOT_IDC2 / string_2_idc</b> : DC current input </li>
  45626. <li><b>SPOT_OPERTM / operation_time</b> : Operation Time </li>
  45627. <li><b>SPOT_PAC1 / phase_1_pac</b> : Power L1 </li>
  45628. <li><b>SPOT_PAC2 / phase_2_pac</b> : Power L2 </li>
  45629. <li><b>SPOT_PAC3 / phase_3_pac</b> : Power L3 </li>
  45630. <li><b>SPOT_PACTOT / total_pac</b> : Total Power </li>
  45631. <li><b>SPOT_PDC1 / string_1_pdc</b> : DC power input 1 </li>
  45632. <li><b>SPOT_PDC2 / string_2_pdc</b> : DC power input 2 </li>
  45633. <li><b>SPOT_UAC1 / phase_1_uac</b> : Grid voltage phase L1 </li>
  45634. <li><b>SPOT_UAC2 / phase_2_uac</b> : Grid voltage phase L2 </li>
  45635. <li><b>SPOT_UAC3 / phase_3_uac</b> : Grid voltage phase L3 </li>
  45636. <li><b>SPOT_UDC1 / string_1_udc</b> : DC voltage input </li>
  45637. <li><b>SPOT_UDC2 / string_2_udc</b> : DC voltage input </li>
  45638. <li><b>SUSyID / susyid</b> : Inverter SUSyID </li>
  45639. <li><b>INV_TEMP / device_temperature</b> : Inverter temperature </li>
  45640. <li><b>INV_TYPE / device_type</b> : Inverter Type </li>
  45641. <li><b>POWER_IN / power_in</b> : Battery Charging power </li>
  45642. <li><b>POWER_OUT / power_out</b> : Battery Discharging power </li>
  45643. <li><b>INV_GRIDRELAY / gridrelay_status</b> : Grid Relay/Contactor Status </li>
  45644. <li><b>INV_STATUS / device_status</b> : Inverter Status </li>
  45645. <li><b>opertime_start</b> : Begin of iverter operating time corresponding the calculated time of sunrise with consideration of the
  45646. attribute "offset" (if set) </li>
  45647. <li><b>opertime_stop</b> : End of iverter operating time corresponding the calculated time of sunrise with consideration of the
  45648. attribute "offset" (if set) </li>
  45649. <li><b>modulstate</b> : shows the current module state "normal" or "sleep" if the inverter won't be requested at the time. </li>
  45650. <li><b>avg_power_lastminutes_05</b> : average power of the last 5 minutes. </li>
  45651. <li><b>avg_power_lastminutes_10</b> : average power of the last 10 minutes. </li>
  45652. <li><b>avg_power_lastminutes_15</b> : average power of the last 15 minutes. </li>
  45653. <li><b>inverter_processing_time</b> : wasted time to retrieve the inverter data </li>
  45654. <li><b>background_processing_time</b> : total wasted time by background process (BlockingCall) </li>
  45655. </ul>
  45656. <br><br>
  45657. <!-- ================================ -->
  45658. <a name="SMARTMON"></a>
  45659. <h3>SMARTMON</h3>
  45660. <ul>
  45661. This module is a FHEM frontend to the Linux tool smartctl.
  45662. It provides various information on the SMART System of the hard drive.
  45663. <br><br>
  45664. <b>Define</b>
  45665. <br><br>
  45666. <code>define &lt;name&gt; SMARTMON &lt;device&gt; [&lt;Interval&gt;]</code><br>
  45667. <br>
  45668. This statement creates a new SMARTMON instance.
  45669. The parameters specify a device to be monitored and the update interval in minutes.<br>
  45670. <br>
  45671. Example: <code>define sm SMARTMON /dev/sda 60</code>
  45672. <br>
  45673. <br>
  45674. <b>Readings:</b>
  45675. <br><br>
  45676. <ul>
  45677. <li>last_exit_code<br>
  45678. Exit code of smartctl.
  45679. </li>
  45680. <li>overall_health_test<br>
  45681. Specifies the general condition of the HDD (PASSED or FAILED).
  45682. </li>
  45683. <br>
  45684. <li>warnings<br>
  45685. Specifies the number of stored alerts.
  45686. </li>
  45687. <br>
  45688. Furthermore, the available SMART parameters can be displayed as Readings (RAW and / or (partially) interpreted).
  45689. </ul>
  45690. <br>
  45691. <b>Get:</b><br><br>
  45692. <ul>
  45693. <li>version<br>
  45694. Displays the module version.
  45695. </li>
  45696. <br>
  45697. <li>update<br>
  45698. Updates all readings.
  45699. </li>
  45700. <br>
  45701. <li>list<br>
  45702. Displays various information:
  45703. <ul>
  45704. <li>devices:<br>List of available devices in the system.</li>
  45705. </ul><br>
  45706. <ul>
  45707. <li>info:<br>Information about the current device.</li>
  45708. </ul><br>
  45709. <ul>
  45710. <li>data:<br>List of SMART parameters for the current device.</li>
  45711. </ul><br>
  45712. <ul>
  45713. <li>health:<br>Information about overall health status for the device.</li>
  45714. </ul><br>
  45715. For the Last 3 commands can also be another Device specified (as an additional parameter).
  45716. </li>
  45717. <br>
  45718. </ul><br>
  45719. <b>Attributes:</b><br><br>
  45720. <ul>
  45721. <li>show_raw<br>
  45722. Valid values: 0: no RAW Readings (default), 1: show all, are not included in interpreted Readings, 2: show all.
  45723. </li>
  45724. <br>
  45725. <li>include<br>
  45726. Comma separated list of IDs for desired SMART parameters. If nothing passed, all available values are displayed.
  45727. </li>
  45728. <br>
  45729. <li>disable<br>
  45730. Valid values: 0: Module active (default), 1: module is disabled (no updates).
  45731. </li>
  45732. <br>
  45733. <li>parameters<br>
  45734. Additional values for smartctl.
  45735. </li>
  45736. <br>
  45737. </ul><br>
  45738. For more information see cmartctrl documentation.
  45739. </ul>
  45740. <!-- ================================ -->
  45741. <a name="SMASTP"></a>
  45742. <h3>SMASTP</h3>
  45743. Module for the integration of a Sunny Tripower Inverter build by SMA over it's Speedwire (=Ethernet) Interface.<br>
  45744. Tested on Sunny Tripower 6000TL-20, 10000-TL20 and 10000TL-10 with Speedwire/Webconnect Piggyback.
  45745. <p>
  45746. <b>Define</b>
  45747. <ul>
  45748. <code>define &lt;name&gt; SMASTP &lt;pin&gt; &lt;hostname/ip&gt; [port]</code><br>
  45749. <br>
  45750. <li>pin: User-Password of the SMA STP Inverter. Default is 0000. Can be changed by "Sunny Explorer" Windows Software</li>
  45751. <li>hostname/ip: Hostname or IP-Adress of the inverter (or it's speedwire piggyback module).</li>
  45752. <li>port: Port of the inverter. 9522 by default.</li>
  45753. </ul>
  45754. <p>
  45755. <b>Modus</b>
  45756. <ul>
  45757. The module automatically detects the inactvity of the inverter due to a lack of light (night). <br>
  45758. This inactivity is therefore called "nightmode". During nightmode, the inverter is not queried over the network.<br>
  45759. By default nightmode is between 9pm and 5am. This can be changed by "starttime" (start of inverter <br>
  45760. operation, end of nightmode) and "endtime" (end of inverter operation, start of nightmode).<br>
  45761. Further there is the inactivitymode: in inactivitymode, the inverter is queried but readings are not updated.
  45762. </ul>
  45763. <b>Parameter</b>
  45764. <ul>
  45765. <li>interval: Queryintreval in seconds </li>
  45766. <li>suppress-night-mode: The nightmode is deactivated </li>
  45767. <li>suppress-inactivity-mode: The inactivitymode is deactivated </li>
  45768. <li>starttime: Starttime of inverter operation (default 5am) </li>
  45769. <li>endtime: Endtime of inverter operation (default 9pm) </li>
  45770. <li>force-sleepmode: The nightmode is activated on inactivity, even the endtime is not reached </li>
  45771. <li>enable-modulstate: Turns the reading "modulstate" (normal / inactive / sleeping) on </li>
  45772. <li>alarm1-value, alarm2-value, alarm3-value: Set an alarm on the reading SpotP in watt.<br>
  45773. The readings Alarm1..Alarm3 are set accordingly: -1 for SpotP < alarmX-value and 1 for SpotP >= alarmX-value </li>
  45774. </ul>
  45775. <b>Readings</b>
  45776. <ul>
  45777. <li>SpotP: spotpower - Current power in watt delivered by the inverter </li>
  45778. <li>AvP01: average power 1 minute: average power in watt of the last minute </li>
  45779. <li>AvP05: average power 5 minutes: average power in watt of the five minutes </li>
  45780. <li>AvP15: average power 15 minutes: average power in watt of the fifteen minutes </li>
  45781. <li>SpotPDC1: current d.c. voltage delivered by string 1 </li>
  45782. <li>SpotPDC2: current d.c. voltage delivered by string 2 </li>
  45783. <li>TotalTodayP: generated power in Wh of the current day </li>
  45784. <li>AlltimeTotalP: all time generated power in Wh </li>
  45785. <li>Alarm1..3: alrm trigger 1..3. Set by parameter alarmN-value </li>
  45786. </ul>
  45787. <a name="SML"></a>
  45788. <h3>SML</h3>
  45789. <ul><p>
  45790. This module supports "Intelligenter Strom Zhler"(ENBW) and "Sparzhler" (Yellow Strom).<br>
  45791. The electricity meter will be polled in a defined interval (1-100) for new values.
  45792. </p>
  45793. <b>Define</b><br>
  45794. <code>define &lt;name&gt; SML &lt;host&gt; &lt;port&gt; [&lt;interval&gt; &lt;timeout&gt;]</code><br>
  45795. <p>
  45796. Example:<br>
  45797. define StromZ1 SML 192.168.178.20 <br>
  45798. define StromZ2 SML 192.168.10.25 60 60 <br>
  45799. </p>
  45800. <b>Set</b><br>
  45801. set &lt;name&gt; &lt;value&gt; &lt;nummber&gt;<br>where value is one of:<br><br>
  45802. <ul>
  45803. <li><code>TOTALPOWER</code> </li>
  45804. <li><code>YEARPOWER </code> </li>
  45805. <li><code>MONTHPOWER</code> </li>
  45806. <li><code>DAYPOWER </code> </li>
  45807. <li><code>Interval </code> </li>
  45808. </ul>
  45809. <br>Example:<br>
  45810. set &lt;name&gt; TOTALPOWER 12345 <br><br>
  45811. <b>Get</b><br>
  45812. get &lt;name&gt; &lt;value&gt; <br>where value is one of:<br>
  45813. <ul>
  45814. <li><code>TOTALPOWER</code></li>
  45815. <li><code>YEARPOWER </code></li>
  45816. <li><code>MONTHPOWER</code></li>
  45817. <li><code>DAYPOWER </code></li>
  45818. <li><code>Interval </code> </li>
  45819. </ul>
  45820. <br>Example:<br>
  45821. get &lt;name&gt; DAYPOWER<br>
  45822. get &lt;name&gt; YEARPOWER<br><br>
  45823. </ul>
  45824. <a name="SOMFY"></a>
  45825. <h3>SOMFY - Somfy RTS / Simu Hz protocol</h3>
  45826. <ul>
  45827. The Somfy RTS (identical to Simu Hz) protocol is used by a wide range of devices,
  45828. which are either senders or receivers/actuators.
  45829. Right now only SENDING of Somfy commands is implemented in the CULFW, so this module currently only
  45830. supports devices like blinds, dimmers, etc. through a <a href="#CUL">CUL</a> device (which must be defined first).
  45831. Reception of Somfy remotes is only supported indirectly through the usage of an FHEMduino
  45832. <a href="http://www.fhemwiki.de/wiki/FHEMduino">http://www.fhemwiki.de/wiki/FHEMduino</a>
  45833. which can then be used to connect to the SOMFY device.
  45834. <br><br>
  45835. <a name="SOMFYdefine"></a>
  45836. <b>Define</b>
  45837. <ul>
  45838. <code>define &lt;name&gt; SOMFY &lt;address&gt; [&lt;encryption-key&gt;] [&lt;rolling-code&gt;] </code>
  45839. <br><br>
  45840. The address is a 6-digit hex code, that uniquely identifies a single remote control channel.
  45841. It is used to pair the remote to the blind or dimmer it should control.
  45842. <br>
  45843. Pairing is done by setting the blind in programming mode, either by disconnecting/reconnecting the power,
  45844. or by pressing the program button on an already associated remote.
  45845. <br>
  45846. Once the blind is in programming mode, send the "prog" command from within FHEM to complete the pairing.
  45847. The blind will move up and down shortly to indicate completion.
  45848. <br>
  45849. You are now able to control this blind from FHEM, the receiver thinks it is just another remote control.
  45850. <ul>
  45851. <li><code>&lt;address&gt;</code> is a 6 digit hex number that uniquely identifies FHEM as a new remote control channel.
  45852. <br>You should use a different one for each device definition, and group them using a structure.
  45853. </li>
  45854. <li>The optional <code>&lt;encryption-key&gt;</code> is a 2 digit hex number (first letter should always be A)
  45855. that can be set to clone an existing remote control channel.</li>
  45856. <li>The optional <code>&lt;rolling-code&gt;</code> is a 4 digit hex number that can be set
  45857. to clone an existing remote control channel.<br>
  45858. If you set one of them, you need to pick the same address as an existing remote.
  45859. Be aware that the receiver might not accept commands from the remote any longer,<br>
  45860. if you used FHEM to clone an existing remote.
  45861. <br>
  45862. This is because the code is original remote's codes are out of sync.</li>
  45863. </ul>
  45864. <br>
  45865. Examples:
  45866. <ul>
  45867. <code>define rollo_1 SOMFY 000001</code><br>
  45868. <code>define rollo_2 SOMFY 000002</code><br>
  45869. <code>define rollo_3_original SOMFY 42ABCD A5 0A1C</code><br>
  45870. </ul>
  45871. </ul>
  45872. <br>
  45873. <a name="SOMFYset"></a>
  45874. <b>Set </b>
  45875. <ul>
  45876. <code>set &lt;name&gt; &lt;value&gt; [&lt;time&gt]</code>
  45877. <br><br>
  45878. where <code>value</code> is one of:<br>
  45879. <pre>
  45880. on
  45881. off
  45882. go-my
  45883. stop
  45884. pos value (0..100) # see note
  45885. prog # Special, see note
  45886. on-for-timer
  45887. off-for-timer
  45888. </pre>
  45889. Examples:
  45890. <ul>
  45891. <code>set rollo_1 on</code><br>
  45892. <code>set rollo_1,rollo_2,rollo_3 on</code><br>
  45893. <code>set rollo_1-rollo_3 on</code><br>
  45894. <code>set rollo_1 off</code><br>
  45895. <code>set rollo_1 pos 50</code><br>
  45896. </ul>
  45897. <br>
  45898. Notes:
  45899. <ul>
  45900. <li>prog is a special command used to pair the receiver to FHEM:
  45901. Set the receiver in programming mode (eg. by pressing the program-button on the original remote)
  45902. and send the "prog" command from FHEM to finish pairing.<br>
  45903. The blind will move up and down shortly to indicate success.
  45904. </li>
  45905. <li>on-for-timer and off-for-timer send a stop command after the specified time,
  45906. instead of reversing the blind.<br>
  45907. This can be used to go to a specific position by measuring the time it takes to close the blind completely.
  45908. </li>
  45909. <li>pos value<br>
  45910. The position is variying between 0 completely open and 100 for covering the full window.
  45911. The position must be between 0 and 100 and the appropriate
  45912. attributes drive-down-time-to-100, drive-down-time-to-close,
  45913. drive-up-time-to-100 and drive-up-time-to-open must be set. See also positionInverse attribute.<br>
  45914. </li>
  45915. </ul>
  45916. The position reading distinuishes between multiple cases
  45917. <ul>
  45918. <li>Without timing values (see attributes) set only generic values are used for status and position: <pre>open, closed, moving</pre> are used
  45919. </li>
  45920. <li>With timing values set but drive-down-time-to-close equal to drive-down-time-to-100 and drive-up-time-to-100 equal 0
  45921. the device is considered to only vary between 0 and 100 (100 being completely closed)
  45922. </li>
  45923. <li>With full timing values set the device is considerd a window shutter (Rolladen) with a difference between
  45924. covering the full window (position 100) and being completely closed (position 200)
  45925. </li>
  45926. </ul>
  45927. </ul>
  45928. <br>
  45929. <b>Get</b> <ul>N/A</ul><br>
  45930. <a name="SOMFYattr"></a>
  45931. <b>Attributes</b>
  45932. <ul>
  45933. <a name="IODev"></a>
  45934. <li>IODev<br>
  45935. Set the IO or physical device which should be used for sending signals
  45936. for this "logical" device. An example for the physical device is a CUL.<br>
  45937. Note: The IODev has to be set, otherwise no commands will be sent!<br>
  45938. If you have both a CUL868 and CUL433, use the CUL433 as IODev for increased range.
  45939. </li><br>
  45940. <a name="positionInverse"></a>
  45941. <li>positionInverse<br>
  45942. Inverse operation for positions instead of 0 to 100-200 the positions are ranging from 100 to 10 (down) and then to 0 (closed). The pos set command will point in this case to the reversed pos values. This does NOT reverse the operation of the on/off command, meaning that on always will move the shade down and off will move it up towards the initial position.
  45943. </li><br>
  45944. <a name="additionalPosReading"></a>
  45945. <li>additionalPosReading<br>
  45946. Position of the shutter will be stored in the reading <code>pos</code> as numeric value.
  45947. Additionally this attribute might specify a name for an additional reading to be updated with the same value than the pos.
  45948. </li><br>
  45949. <a name="rolling-code"></a>
  45950. <li>rolling-code &lt; 4 digit hex &gt; <br>
  45951. Can be used to overwrite the rolling-code manually with a new value (rolling-code will be automatically increased with every command sent)
  45952. This requires also setting enc-key: only with bot attributes set the value will be accepted for the internal reading
  45953. </li><br>
  45954. <a name="enc-key"></a>
  45955. <li>enc-key &lt; 2 digit hex &gt; <br>
  45956. Can be used to overwrite the enc-key manually with a new value
  45957. This requires also setting rolling-code: only with bot attributes set the value will be accepted for the internal reading
  45958. </li><br>
  45959. <a name="eventMap"></a>
  45960. <li>eventMap<br>
  45961. Replace event names and set arguments. The value of this attribute
  45962. consists of a list of space separated values, each value is a colon
  45963. separated pair. The first part specifies the "old" value, the second
  45964. the new/desired value. If the first character is slash(/) or comma(,)
  45965. then split not by space but by this character, enabling to embed spaces.
  45966. Examples:<ul><code>
  45967. attr store eventMap on:open off:closed<br>
  45968. attr store eventMap /on-for-timer 10:open/off:closed/<br>
  45969. set store open
  45970. </code></ul>
  45971. </li><br>
  45972. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  45973. <a name="attrdummy"></a>
  45974. <li>dummy<br>
  45975. Set the device attribute dummy to define devices which should not
  45976. output any radio signals. Associated notifys will be executed if
  45977. the signal is received. Used e.g. to react to a code from a sender, but
  45978. it will not emit radio signal if triggered in the web frontend.
  45979. </li><br>
  45980. <li><a href="#loglevel">loglevel</a></li><br>
  45981. <li><a href="#showtime">showtime</a></li><br>
  45982. <a name="model"></a>
  45983. <li>model<br>
  45984. The model attribute denotes the model type of the device.
  45985. The attributes will (currently) not be used by the fhem.pl directly.
  45986. It can be used by e.g. external programs or web interfaces to
  45987. distinguish classes of devices and send the appropriate commands
  45988. (e.g. "on" or "off" to a switch, "dim..%" to dimmers etc.).<br>
  45989. The spelling of the model names are as quoted on the printed
  45990. documentation which comes which each device. This name is used
  45991. without blanks in all lower-case letters. Valid characters should be
  45992. <code>a-z 0-9</code> and <code>-</code> (dash),
  45993. other characters should be ommited.<br>
  45994. Here is a list of "official" devices:<br>
  45995. <b>Receiver/Actor</b>: somfyblinds<br>
  45996. </li><br>
  45997. <a name="ignore"></a>
  45998. <li>ignore<br>
  45999. Ignore this device, e.g. if it belongs to your neighbour. The device
  46000. won't trigger any FileLogs/notifys, issued commands will silently
  46001. ignored (no RF signal will be sent out, just like for the <a
  46002. href="#attrdummy">dummy</a> attribute). The device won't appear in the
  46003. list command (only if it is explicitely asked for it), nor will it
  46004. appear in commands which use some wildcard/attribute as name specifiers
  46005. (see <a href="#devspec">devspec</a>). You still get them with the
  46006. "ignored=1" special devspec.
  46007. </li><br>
  46008. <a name="drive-down-time-to-100"></a>
  46009. <li>drive-down-time-to-100<br>
  46010. The time the blind needs to drive down from "open" (pos 0) to pos 100.<br>
  46011. In this position, the lower edge touches the window frame, but it is not completely shut.<br>
  46012. For a mid-size window this time is about 12 to 15 seconds.
  46013. </li><br>
  46014. <a name="drive-down-time-to-close"></a>
  46015. <li>drive-down-time-to-close<br>
  46016. The time the blind needs to drive down from "open" (pos 0) to "close", the end position of the blind.<br>
  46017. Note: If set, this value always needs to be higher than drive-down-time-to-100
  46018. This is about 3 to 5 seonds more than the "drive-down-time-to-100" value.
  46019. </li><br>
  46020. <a name="drive-up-time-to-100"></a>
  46021. <li>drive-up-time-to-100<br>
  46022. The time the blind needs to drive up from "close" (endposition) to "pos 100".<br>
  46023. This usually takes about 3 to 5 seconds.
  46024. </li><br>
  46025. <a name="drive-up-time-to-open"></a>
  46026. <li>drive-up-time-to-open<br>
  46027. The time the blind needs drive up from "close" (endposition) to "open" (upper endposition).<br>
  46028. Note: If set, this value always needs to be higher than drive-down-time-to-100
  46029. This value is usually a bit higher than "drive-down-time-to-close", due to the blind's weight.
  46030. </li><br>
  46031. </ul>
  46032. </ul>
  46033. <a name="SONOS"></a>
  46034. <h3>SONOS</h3>
  46035. <p>FHEM-Module to communicate with the Sonos-System via UPnP</p>
  46036. <p>For more informations have also a closer look at the wiki at <a href="http://www.fhemwiki.de/wiki/SONOS">http://www.fhemwiki.de/wiki/SONOS</a></p>
  46037. <p>For correct functioning of this module it is neccessary to have some Perl-Modules installed, which are eventually installed already manually:<ul>
  46038. <li><code>LWP::Simple</code></li>
  46039. <li><code>LWP::UserAgent</code></li>
  46040. <li><code>SOAP::Lite</code></li>
  46041. <li><code>HTTP::Request</code></li></ul>
  46042. Installation e.g. as Debian-Packages (via "sudo apt-get install &lt;packagename&gt;"):<ul>
  46043. <li>LWP::Simple-Packagename (incl. LWP::UserAgent and HTTP::Request): libwww-perl</li>
  46044. <li>SOAP::Lite-Packagename: libsoap-lite-perl</li></ul>
  46045. <br />Installation e.g. as Windows ActivePerl (via Perl-Packagemanager)<ul>
  46046. <li>Install Package LWP (incl. LWP::UserAgent and HTTP::Request)</li>
  46047. <li>Install Package SOAP::Lite</li>
  46048. <li>SOAP::Lite-Special for Versions after 5.18:<ul>
  46049. <li>Add another Packagesource from suggestions or manual: Bribes de Perl (http://www.bribes.org/perl/ppm)</li>
  46050. <li>Install Package: SOAP::Lite</li></ul></li></ul>
  46051. <b>Windows ActivePerl 5.20 does currently not work due to missing SOAP::Lite</b></p>
  46052. <p><b>Attention!</b><br />This Module will not work on any platform, because of the use of Threads and the neccessary Perl-modules.</p>
  46053. <p>More information is given in a (german) Wiki-article: <a href="http://www.fhemwiki.de/wiki/SONOS">http://www.fhemwiki.de/wiki/SONOS</a></p>
  46054. <p>The system consists of two different components:<br />
  46055. 1. A UPnP-Client which runs as a standalone process in the background and takes the communications to the sonos-components.<br />
  46056. 2. The FHEM-module itself which connects to the UPnP-client to make fhem able to work with sonos.<br /><br />
  46057. The client will be started by the module itself if not done in another way.<br />
  46058. You can start this client on your own (to let it run instantly and independent from FHEM):<br />
  46059. <code>perl 00_SONOS.pm 4711</code>: Starts a UPnP-Client in an independant way who listens to connections on port 4711. This process can run a long time, FHEM can connect and disconnect to it.</p>
  46060. <h4>Example</h4>
  46061. <p>
  46062. Simplest way to define:<br />
  46063. <b><code>define Sonos SONOS</code></b>
  46064. </p>
  46065. <p>
  46066. Example with control over the used port and the isalive-checker-interval:<br />
  46067. <b><code>define Sonos SONOS localhost:4711 45</code></b>
  46068. </p>
  46069. <a name="SONOSdefine"></a>
  46070. <h4>Define</h4>
  46071. <b><code>define &lt;name&gt; SONOS [upnplistener [interval [waittime [delaytime]]]]</code></b>
  46072. <br /><br /> Define a Sonos interface to communicate with a Sonos-System.<br />
  46073. <p>
  46074. <b><code>[upnplistener]</code></b><br />The name and port of the external upnp-listener. If not given, defaults to <code>localhost:4711</code>. The port has to be a free portnumber on your system. If you don't start a server on your own, the script does itself.<br />If you start it yourself write down the correct informations to connect.</p>
  46075. <p>
  46076. <b><code>[interval]</code></b><br /> The interval is for alive-checking of Zoneplayer-device, because no message come if the host disappear :-)<br />If omitted a value of 10 seconds is the default.</p>
  46077. <p>
  46078. <b><code>[waittime]</code></b><br /> With this value you can configure the waiting time for the starting of the Subprocess.</p>
  46079. <p>
  46080. <b><code>[delaytime]</code></b><br /> With this value you can configure a delay time before starting the network-part.</p>
  46081. <a name="SONOSset"></a>
  46082. <h4>Set</h4>
  46083. <ul>
  46084. <li><b>Common Tasks</b><ul>
  46085. <li><a name="SONOS_setter_RefreshShareIndex">
  46086. <b><code>RefreshShareIndex</code></b></a>
  46087. <br />Starts the refreshing of the library.</li>
  46088. <li><a name="SONOS_setter_RescanNetwork">
  46089. <b><code>RescanNetwork</code></b></a>
  46090. <br />Restarts the player discovery.</li>
  46091. </ul></li>
  46092. <li><b>Control-Commands</b><ul>
  46093. <li><a name="SONOS_setter_Mute">
  46094. <b><code>Mute &lt;state&gt;</code></b></a>
  46095. <br />Sets the mute-state on all players.</li>
  46096. <li><a name="SONOS_setter_PauseAll">
  46097. <b><code>PauseAll</code></b></a>
  46098. <br />Pause all Zoneplayer.</li>
  46099. <li><a name="SONOS_setter_Pause">
  46100. <b><code>Pause</code></b></a>
  46101. <br />Alias for PauseAll.</li>
  46102. <li><a name="SONOS_setter_StopAll">
  46103. <b><code>StopAll</code></b></a>
  46104. <br />Stops all Zoneplayer.</li>
  46105. <li><a name="SONOS_setter_Stop">
  46106. <b><code>Stop</code></b></a>
  46107. <br />Alias for StopAll.</li>
  46108. </ul></li>
  46109. <li><b>Bookmark-Commands</b><ul>
  46110. <li><a name="SONOS_setter_DisableBookmark">
  46111. <b><code>DisableBookmark &lt;Groupname&gt;</code></b></a>
  46112. <br />Disables the group with the given name.</li>
  46113. <li><a name="SONOS_setter_EnableBookmark">
  46114. <b><code>EnableBookmark &lt;Groupname&gt;</code></b></a>
  46115. <br />Enables the group with the given name.</li>
  46116. <li><a name="SONOS_setter_LoadBookmarks">
  46117. <b><code>LoadBookmarks [Groupname]</code></b></a>
  46118. <br />Loads the given group (or all if parameter not set) from the filesystem.</li>
  46119. <li><a name="SONOS_setter_SaveBookmarks">
  46120. <b><code>SaveBookmarks [Groupname]</code></b></a>
  46121. <br />Saves the given group (or all if parameter not set) to the filesystem.</li>
  46122. </ul></li>
  46123. <li><b>Group-Commands</b><ul>
  46124. <li><a name="SONOS_setter_Groups">
  46125. <b><code>Groups &lt;GroupDefinition&gt;</code></b></a>
  46126. <br />Sets the current groups on the whole Sonos-System. The format is the same as retreived by getter 'Groups'.<br >A reserved word is <i>Reset</i>. It can be used to directly extract all players out of their groups.</li>
  46127. </ul></li>
  46128. </ul>
  46129. <a name="SONOSget"></a>
  46130. <h4>Get</h4>
  46131. <ul>
  46132. <li><b>Group-Commands</b><ul>
  46133. <li><a name="SONOS_getter_Groups">
  46134. <b><code>Groups</code></b></a>
  46135. <br />Retreives the current group-configuration of the Sonos-System. The format is a comma-separated List of Lists with devicenames e.g. <code>[Sonos_Kueche], [Sonos_Wohnzimmer, Sonos_Schlafzimmer]</code>. In this example there are two groups: the first consists of one player and the second consists of two players.<br />
  46136. The order in the sublists are important, because the first entry defines the so-called group-coordinator (in this case <code>Sonos_Wohnzimmer</code>), from which the current playlist and the current title playing transferred to the other member(s).</li>
  46137. </ul></li>
  46138. </ul>
  46139. <a name="SONOSattr"></a>
  46140. <h4>Attributes</h4>
  46141. '''Attention'''<br />The most of the attributes can only be used after a restart of fhem, because it must be initially transfered to the subprocess.
  46142. <ul>
  46143. <li><b>Common</b><ul>
  46144. <li><a name="SONOS_attribut_coverLoadTimeout"><b><code>coverLoadTimeout &lt;value&gt;</code></b>
  46145. </a><br />One of (0..10,15,20,25,30). Defines the timeout for waiting of the Sonosplayer for Cover-Downloads. Defaults to 5.</li>
  46146. <li><a name="SONOS_attribut_deviceRoomView"><b><code>deviceRoomView &lt;Both|DeviceLineOnly&gt;</code></b>
  46147. </a><br /> Defines the style of the Device in the room overview. <code>Both</code> means "normal" Deviceline incl. Cover-/Titleview and maybe the control area, <code>DeviceLineOnly</code> means only the "normal" Deviceline-view.</li>
  46148. <li><a name="SONOS_attribut_disable"><b><code>disable &lt;value&gt;</code></b>
  46149. </a><br />One of (0,1). With this value you can disable the whole module. Works immediatly. If set to 1 the subprocess will be terminated and no message will be transmitted. If set to 0 the subprocess is again started.<br />It is useful when you install new Sonos-Components and don't want any disgusting devices during the Sonos setup.</li>
  46150. <li><a name="SONOS_attribut_getFavouritesListAtNewVersion"><b><code>getFavouritesListAtNewVersion &lt;value&gt;</code></b>
  46151. </a><br />One of (0,1). With this attribute set, the module will refresh the Favourites-List automatically upon changes (if the Attribute <code>getListsDirectlyToReadings</code> is set).</li>
  46152. <li><a name="SONOS_attribut_getPlaylistsListAtNewVersion"><b><code>getPlaylistsListAtNewVersion &lt;value&gt;</code></b>
  46153. </a><br />One of (0,1). With this attribute set, the module will refresh the Playlists-List automatically upon changes (if the Attribute <code>getListsDirectlyToReadings</code> is set).</li>
  46154. <li><a name="SONOS_attribut_getQueueListAtNewVersion"><b><code>getQueueListAtNewVersion &lt;value&gt;</code></b>
  46155. </a><br />One of (0,1). With this attribute set, the module will refresh the current Queue-List automatically upon changes (if the Attribute <code>getListsDirectlyToReadings</code> is set).</li>
  46156. <li><a name="SONOS_attribut_getRadiosListAtNewVersion"><b><code>getRadiosListAtNewVersion &lt;value&gt;</code></b>
  46157. </a><br />One of (0,1). With this attribute set, the module will refresh the Radios-List automatically upon changes (if the Attribute <code>getListsDirectlyToReadings</code> is set).</li>
  46158. <li><a name="SONOS_attribut_getListsDirectlyToReadings"><b><code>getListsDirectlyToReadings &lt;value&gt;</code></b>
  46159. </a><br />One of (0,1). With this attribute you can define that the module fills the readings for the lists of Favourites, Playlists, Radios and the Queue directly without the need of userReadings.</li>
  46160. <li><a name="SONOS_attribut_getLocalCoverArt"><b><code>getLocalCoverArt &lt;value&gt;</code></b>
  46161. </a><br />One of (0,1). With this attribute the loads and saves the Coverart locally (default till now).</li>
  46162. <li><a name="SONOS_attribut_ignoredIPs"><b><code>ignoredIPs &lt;IP-Address&gt;[,IP-Address]</code></b>
  46163. </a><br />With this attribute you can define IP-addresses, which has to be ignored by the UPnP-System of this module. e.g. "192.168.0.11,192.168.0.37"</li>
  46164. <li><a name="SONOS_attribut_pingType"><b><code>pingType &lt;string&gt;</code></b>
  46165. </a><br /> One of (none,tcp,udp,icmp,syn). Defines which pingType for alive-Checking has to be used. If set to 'none' no checks will be done.</li>
  46166. <li><a name="SONOS_attribut_reusePort"><b><code>reusePort &lt;int&gt;</code></b>
  46167. </a><br /> One of (0,1). If defined the socket-Attribute 'reuseport' will be used for SSDP Discovery-Port. Can solve restart-problems. If you don't have such problems don't use this attribute.</li>
  46168. <li><a name="SONOS_attribut_SubProcessLogfileName"><b><code>SubProcessLogfileName &lt;Path&gt;</code></b>
  46169. </a><br /> If given, the subprocess logs into its own logfile. Under Windows this is a recommended way for logging, because the two Loggings (Fehm and the SubProcess) overwrite each other. If "-" is given, the logging goes to STDOUT (and therefor in the Fhem-log) as usual. The main purpose of this attribute is the short-use of separated logging. No variables are substituted. The value is used as configured.</li>
  46170. <li><a name="SONOS_attribut_usedonlyIPs"><b><code>usedonlyIPs &lt;IP-Adresse&gt;[,IP-Adresse]</code></b>
  46171. </a><br />With this attribute you can define IP-addresses, which has to be exclusively used by the UPnP-System of this module. e.g. "192.168.0.11,192.168.0.37"</li>
  46172. </ul></li>
  46173. <li><b>Bookmark Configuration</b><ul>
  46174. <li><a name="SONOS_attribut_bookmarkSaveDir"><b><code>bookmarkSaveDir &lt;path&gt;</code></b>
  46175. </a><br /> Defines a directory where the saved bookmarks can be placed. If not defined, "." will be used.</li>
  46176. <li><a name="SONOS_attribut_bookmarkTitleDefinition"><b><code>bookmarkTitleDefinition &lt;Groupname&gt;:&lt;PlayerdeviceRegEx&gt;:&lt;TrackURIRegEx&gt;:&lt;MinTitleLength&gt;:&lt;RemainingLength&gt;:&lt;MaxAge&gt;:&lt;ReadOnly&gt;</code></b>
  46177. </a><br /> Definition of Bookmarks for titles.</li>
  46178. <li><a name="SONOS_attribut_bookmarkPlaylistDefinition"><b><code>bookmarkPlaylistDefinition &lt;Groupname&gt;:&lt;PlayerdeviceRegEx&gt;:&lt;MinListLength&gt;:&lt;MaxListLength&gt;:&lt;MaxAge&gt;</code></b>
  46179. </a><br /> Definition of bookmarks for playlists.</li>
  46180. </ul></li>
  46181. <li><b>Proxy Configuration</b><ul>
  46182. <li><a name="SONOS_attribut_generateProxyAlbumArtURLs"><b><code>generateProxyAlbumArtURLs &lt;int&gt;</code></b>
  46183. </a><br />One of (0, 1). If defined, all Cover-Links (the readings "currentAlbumArtURL" and "nextAlbumArtURL") are generated as links to the internal Sonos-Module-Proxy. It can be useful if you access Fhem over an external proxy and therefore have no access to the local network (the URLs are direct URLs to the Sonosplayer instead).</li>
  46184. <li><a name="SONOS_attribut_proxyCacheDir"><b><code>proxyCacheDir &lt;Path&gt;</code></b>
  46185. </a><br />Defines a directory where the cached Coverfiles can be placed. If not defined "/tmp" will be used.</li>
  46186. <li><a name="SONOS_attribut_proxyCacheTime"><b><code>proxyCacheTime &lt;int&gt;</code></b>
  46187. </a><br />A time in seconds. With a definition other than "0" the caching mechanism of the internal Sonos-Module-Proxy will be activated. If the filetime of the chached cover is older than this time, it will be reloaded from the Sonosplayer.</li>
  46188. <li><a name="SONOS_attribut_webname"><b><code>webname &lt;String&gt;</code></b>
  46189. </a><br /> With the attribute you can define the used webname for coverlinks. Defaults to 'fhem' if not given.</li>
  46190. </ul></li>
  46191. <li><b>Speak Configuration</b><ul>
  46192. <li><a name="SONOS_attribut_targetSpeakDir"><b><code>targetSpeakDir &lt;string&gt;</code></b>
  46193. </a><br /> Defines, which Directory has to be used for the Speakfiles</li>
  46194. <li><a name="SONOS_attribut_targetSpeakMP3FileConverter"><b><code>targetSpeakMP3FileConverter &lt;string&gt;</code></b>
  46195. </a><br /> Defines an MP3-File converter, which properly converts the resulting speaking-file. With this option you can avoid timedisplay problems. Please note that the waittime before the speaking starts can increase with this option be set.</li>
  46196. <li><a name="SONOS_attribut_targetSpeakMP3FileDir"><b><code>targetSpeakMP3FileDir &lt;string&gt;</code></b>
  46197. </a><br /> The directory which should be used as a default for text-embedded MP3-Files.</li>
  46198. <li><a name="SONOS_attribut_targetSpeakURL"><b><code>targetSpeakURL &lt;string&gt;</code></b>
  46199. </a><br /> Defines, which URL has to be used for accessing former stored Speakfiles as seen from the SonosPlayer</li>
  46200. <li><a name="SONOS_attribut_targetSpeakFileTimestamp"><b><code>targetSpeakFileTimestamp &lt;int&gt;</code></b>
  46201. </a><br /> One of (0, 1). Defines, if the Speakfile should have a timestamp in his name. That makes it possible to store all historical Speakfiles.</li>
  46202. <li><a name="SONOS_attribut_targetSpeakFileHashCache"><b><code>targetSpeakFileHashCache &lt;int&gt;</code></b>
  46203. </a><br /> One of (0, 1). Defines, if the Speakfile should have a hash-value in his name. If this value is set to one an already generated file with the same hash is re-used and not newly generated.</li>
  46204. <li><a name="SONOS_attribut_Speak1"><b><code>Speak1 &lt;Fileextension&gt;:&lt;Commandline&gt;</code></b>
  46205. </a><br />Defines a systemcall commandline for generating a speaking file out of the given text. If such an attribute is defined, an associated setter at the Sonosplayer-Device is available. The following placeholders are available:<br />'''%language%''': Will be replaced by the given language-parameter<br />'''%filename%''': Will be replaced by the complete target-filename (incl. fileextension).<br />'''%text%''': Will be replaced with the given text.<br />'''%textescaped%''': Will be replaced with the given url-encoded text.</li>
  46206. <li><a name="SONOS_attribut_Speak2"><b><code>Speak2 &lt;Fileextension&gt;:&lt;Commandline&gt;</code></b>
  46207. </a><br />See Speak1</li>
  46208. <li><a name="SONOS_attribut_Speak3"><b><code>Speak3 &lt;Fileextension&gt;:&lt;Commandline&gt;</code></b>
  46209. </a><br />See Speak1</li>
  46210. <li><a name="SONOS_attribut_Speak4"><b><code>Speak4 &lt;Fileextension&gt;:&lt;Commandline&gt;</code></b>
  46211. </a><br />See Speak1</li>
  46212. <li><a name="SONOS_attribut_SpeakCover"><b><code>SpeakCover &lt;Filename&gt;</code></b>
  46213. </a><br />Defines a Cover for use by the speak generation process. If not defined the Fhem-logo will be used.</li>
  46214. <li><a name="SONOS_attribut_Speak1Cover"><b><code>Speak1Cover &lt;Filename&gt;</code></b>
  46215. </a><br />See SpeakCover</li>
  46216. <li><a name="SONOS_attribut_Speak2Cover"><b><code>Speak2Cover &lt;Filename&gt;</code></b>
  46217. </a><br />See SpeakCover</li>
  46218. <li><a name="SONOS_attribut_Speak3Cover"><b><code>Speak3Cover &lt;Filename&gt;</code></b>
  46219. </a><br />See SpeakCover</li>
  46220. <li><a name="SONOS_attribut_Speak4Cover"><b><code>Speak4Cover &lt;Filename&gt;</code></b>
  46221. </a><br />See SpeakCover</li>
  46222. <li><a name="SONOS_attribut_SpeakGoogleURL"><b><code>SpeakGoogleURL &lt;GoogleURL&gt;</code></b>
  46223. </a><br />The google-speak-url that has to be used. If empty a default will be used. You have to define placeholders for replacing the language- and text-value: %1$s -> Language, %2$s -> Text<br />The Default-URL is currently: <code>http://translate.google.com/translate_tts?tl=%1$s&client=tw-ob&q=%2$s</code></li>
  46224. </ul></li>
  46225. </ul>
  46226. <a name="SONOSPLAYER"></a>
  46227. <h3>SONOSPLAYER</h3>
  46228. <p>FHEM module to work with a Sonos Zoneplayer</p>
  46229. <p>For more informations have also a closer look at the wiki at <a href="http://www.fhemwiki.de/wiki/SONOS">http://www.fhemwiki.de/wiki/SONOS</a></p>
  46230. <p>Normally you don't have to define a Sonosplayer-Device on your own, because the Sonos-Device will do this for you during the discovery-process.</p>
  46231. <h4>Example</h4>
  46232. <p>
  46233. <code>define Sonos_Wohnzimmer SONOSPLAYER RINCON_000EFEFEFEF401400_MR</code>
  46234. </p>
  46235. <a name="SONOSPLAYERdefine"></a>
  46236. <h4>Define</h4>
  46237. <b><code>define &lt;name&gt; SONOSPLAYER &lt;udn&gt;</code></b>
  46238. <p>
  46239. <b><code>&lt;udn&gt;</code></b><br /> MAC-Address based identifier of the zoneplayer</p>
  46240. <a name="SONOSPLAYERset"></a>
  46241. <h4>Set</h4>
  46242. <ul>
  46243. <li><b>Common Tasks</b><ul>
  46244. <li><a name="SONOSPLAYER_setter_Alarm">
  46245. <b><code>Alarm (Create|Update|Delete|Enable|Disable) &lt;ID[,ID]|All&gt; &lt;Datahash&gt;</code></b></a>
  46246. <br />Can be used for working on alarms:<ul><li><b>Create:</b> Creates an alarm-entry with the given datahash.</li><li><b>Update:</b> Updates the alarm-entry with the given id(s) and datahash.</li><li><b>Delete:</b> Deletes the alarm-entry with the given id(s).</li><li><b>Enable:</b> Enables the alarm-entry with the given id(s).</li><li><b>Disable:</b> Disables the alarm-entry with the gven id(s).</li></ul>If the Word 'All' is given as ID, all alarms of this player are changed.<br /><b>The Datahash:</b><br />The Format is a perl-hash and is interpreted with the eval-function.<br />e.g.: { Repeat =&gt; 1 }<br /><br />The following entries are allowed/neccessary:<ul><li>StartTime</li><li>Duration</li><li>Recurrence_Once</li><li>Recurrence_Monday</li><li>Recurrence_Tuesday</li><li>Recurrence_Wednesday</li><li>Recurrence_Thursday</li><li>Recurrence_Friday</li><li>Recurrence_Saturday</li><li>Recurrence_Sunday</li><li>Enabled</li><li>ProgramURI</li><li>ProgramMetaData</li><li>Shuffle</li><li>Repeat</li><li>Volume</li><li>IncludeLinkedZones</li></ul><br />e.g.:<ul><li>set Sonos_Wohnzimmer Alarm Create 0 { Enabled =&gt; 1, Volume =&gt; 35, StartTime =&gt; '00:00:00', Duration =&gt; '00:15:00', Repeat =&gt; 0, Shuffle =&gt; 0, ProgramURI =&gt; 'x-rincon-buzzer:0', ProgramMetaData =&gt; '', Recurrence_Once =&gt; 0, Recurrence_Monday =&gt; 1, Recurrence_Tuesday =&gt; 1, Recurrence_Wednesday =&gt; 1, Recurrence_Thursday =&gt; 1, Recurrence_Friday =&gt; 1, Recurrence_Saturday =&gt; 0, Recurrence_Sunday =&gt; 0, IncludeLinkedZones =&gt; 0 }</li><li>set Sonos_Wohnzimmer Alarm Update 17 { Shuffle =&gt; 1 }</li><li>set Sonos_Wohnzimmer Alarm Delete 17 {}</li></ul></li>
  46247. <li><a name="SONOSPLAYER_setter_AudioDelay">
  46248. <b><code>AudioDelay &lt;Level&gt;</code></b></a>
  46249. <br /> Sets the audiodelay of the player to the given value. The value can range from 0 to 5.</li>
  46250. <li><a name="SONOSPLAYER_setter_AudioDelayLeftRear">
  46251. <b><code>AudioDelayLeftRear &lt;Level&gt;</code></b></a>
  46252. <br /> Sets the audiodelayleftrear of the player to the given value. The value can range from 0 to 2. The values has the following meanings: 0: >3m, 1: >0.6m und <3m, 2: <0.6m</li>
  46253. <li><a name="SONOSPLAYER_setter_AudioDelayRightRear">
  46254. <b><code>AudioDelayRightRear &lt;Level&gt;</code></b></a>
  46255. <br /> Sets the audiodelayrightrear of the player to the given value. The value can range from 0 to 2. The values has the following meanings: 0: >3m, 1: >0.6m und <3m, 2: <0.6m</li>
  46256. <li><a name="SONOSPLAYER_setter_ButtonLockState">
  46257. <b><code>ButtonLockState &lt;int&gt;</code></b></a>
  46258. <br />One of (0, 1) Sets the current state of the ButtonLockState.</li>
  46259. <li><a name="SONOSPLAYER_setter_DailyIndexRefreshTime">
  46260. <b><code>DailyIndexRefreshTime &lt;Timestring&gt;</code></b></a>
  46261. <br />Sets the current DailyIndexRefreshTime for the whole bunch of Zoneplayers.</li>
  46262. <li><a name="SONOSPLAYER_setter_DialogLevel">
  46263. <b><code>DialogLevel &lt;State&gt;</code></b></a>
  46264. <br /> Sets the dialoglevel for playbar-systems.</li>
  46265. <li><a name="SONOSPLAYER_setter_ExportSonosBibliothek">
  46266. <b><code>ExportSonosBibliothek &lt;filename&gt;</code></b></a>
  46267. <br />Exports a file with a textual representation of a structure- and titlehash of the complete Sonos-Bibliothek. Warning: Will use a large amount of CPU-Time and RAM!</li>
  46268. <li><a name="SONOSPLAYER_setter_Name">
  46269. <b><code>Name &lt;Zonename&gt;</code></b></a>
  46270. <br />Sets the Name for this Zone</li>
  46271. <li><a name="SONOSPLAYER_setter_NightMode">
  46272. <b><code>NightMode &lt;State&gt;</code></b></a>
  46273. <br /> Sets the nightmode for playbar-systems.</li>
  46274. <li><a name="SONOSPLAYER_setter_OutputFixed">
  46275. <b><code>OutputFixed &lt;State&gt;</code></b></a>
  46276. <br /> Sets the outputfixed-state. Retrieves the new state as the result.</li>
  46277. <li><a name="SONOSPLAYER_setter_Reboot">
  46278. <b><code>Reboot</code></b></a>
  46279. <br />Initiates a reboot on the Zoneplayer.</li>
  46280. <li><a name="SONOSPLAYER_setter_ResetAttributesToDefault">
  46281. <b><code>ResetAttributesToDefault &lt;DeleteAllOtherAttributes&gt;</code></b></a>
  46282. <br />Sets the attributes to the inital state. If the parameter "DeleteAllOtherAttributes" is set to "1" or "on", all attributes will be deleted before the defaults will be newly retrieved from the player and set.</li>
  46283. <li><a name="SONOSPLAYER_setter_RoomIcon">
  46284. <b><code>RoomIcon &lt;Iconname&gt;</code></b></a>
  46285. <br />Sets the Icon for this Zone</li>
  46286. <li><a name="SONOSPLAYER_setter_SnoozeAlarm">
  46287. <b><code>SnoozeAlarm &lt;Timestring|Seconds&gt;</code></b></a>
  46288. <br />Snoozes a currently playing alarm for the given time</li>
  46289. <li><a name="SONOSPLAYER_setter_SubEnable">
  46290. <b><code>SubEnable &lt;State&gt;</code></b></a>
  46291. <br /> Sets the substate for sub-systems.</li>
  46292. <li><a name="SONOSPLAYER_setter_SubGain">
  46293. <b><code>SubGain &lt;Level&gt;</code></b></a>
  46294. <br /> Sets the sub-gain for sub-systems. The value can range from -15 to 15.</li>
  46295. <li><a name="SONOSPLAYER_setter_SubPolarity">
  46296. <b><code>SubPolarity &lt;Level&gt;</code></b></a>
  46297. <br /> Sets the sub-polarity for sub-systems. The value can range from 0 to 2.</li>
  46298. <li><a name="SONOSPLAYER_setter_SurroundEnable">
  46299. <b><code>SurroundEnable &lt;State&gt;</code></b></a>
  46300. <br /> Sets the surround-state for surround-systems (like playbars).</li>
  46301. <li><a name="SONOSPLAYER_setter_SurroundLevel">
  46302. <b><code>SurroundLevel &lt;Level&gt;</code></b></a>
  46303. <br /> Sets the surround-level for surround-systems (like playbars). The value can range from -15 to 15.</li>
  46304. <li><a name="SONOSPLAYER_setter_TruePlay">
  46305. <b><code>TruePlay &lt;State&gt;</code></b></a>
  46306. <br />Sets the TruePlay-State of the given player.</li>
  46307. <li><a name="SONOSPLAYER_setter_Wifi">
  46308. <b><code>Wifi &lt;State&gt;</code></b></a>
  46309. <br />Sets the WiFi-State of the given Player. Can be 'off', 'persist-off' or 'on'.</li>
  46310. </ul></li>
  46311. <li><b>Playing Control-Commands</b><ul>
  46312. <li><a name="SONOSPLAYER_setter_CurrentTrackPosition">
  46313. <b><code>CurrentTrackPosition &lt;TimePosition&gt;</code></b></a>
  46314. <br /> Sets the current timeposition inside the title to the given timevalue (e.g. 0:01:15) or seconds (e.g. 81). You can make relative jumps like '+0:00:10' or just '+10'. Additionally you can make a call with a percentage value like '+10%'. This relative value can be negative.</li>
  46315. <li><a name="SONOSPLAYER_setter_Pause">
  46316. <b><code>Pause</code></b></a>
  46317. <br /> Pause the playing</li>
  46318. <li><a name="SONOSPLAYER_setter_Previous">
  46319. <b><code>Previous</code></b></a>
  46320. <br /> Jumps to the beginning of the previous title.</li>
  46321. <li><a name="SONOSPLAYER_setter_Play">
  46322. <b><code>Play</code></b></a>
  46323. <br /> Starts playing</li>
  46324. <li><a name="SONOSPLAYER_setter_PlayURI">
  46325. <b><code>PlayURI &lt;songURI&gt; [Volume]</code></b></a>
  46326. <br />Plays the given MP3-File with the optional given volume.</li>
  46327. <li><a name="SONOSPLAYER_setter_PlayURITemp">
  46328. <b><code>PlayURITemp &lt;songURI&gt; [Volume]</code></b></a>
  46329. <br />Plays the given MP3-File with the optional given volume as a temporary file. After playing it, the whole state is reconstructed and continues playing at the former saved position and volume and so on. If the file given is a stream (exactly: a file where the running time could not be determined), the call would be identical to <code>,PlayURI</code>, e.g. nothing is restored after playing.</li>
  46330. <li><a name="SONOSPLAYER_setter_Next">
  46331. <b><code>Next</code></b></a>
  46332. <br /> Jumps to the beginning of the next title</li>
  46333. <li><a name="SONOSPLAYER_setter_Speak">
  46334. <b><code>Speak &lt;Volume&gt; &lt;Language&gt; &lt;Text&gt;</code></b></a>
  46335. <br />Uses the Google Text-To-Speech-Engine for generating MP3-Files of the given text and plays it on the SonosPlayer. Possible languages can be obtained from Google. e.g. "de", "en", "fr", "es"...</li>
  46336. <li><a name="SONOSPLAYER_setter_StartFavourite">
  46337. <b><code>StartFavourite &lt;Favouritename&gt; [NoStart]</code></b></a>
  46338. <br /> Starts the named sonos-favorite. The parameter should be URL-encoded for proper naming of lists with special characters. If the Word 'NoStart' is given as second parameter, than the Loading will be done, but the playing-state is leaving untouched e.g. not started.<br />Additionally it's possible to use a regular expression as the name. The first hit will be used. The format is e.g. <code>/meine.hits/</code>.</li>
  46339. <li><a name="SONOSPLAYER_setter_StartPlaylist">
  46340. <b><code>StartPlaylist &lt;Playlistname&gt; [EmptyQueueBeforeImport]</code></b></a>
  46341. <br /> Loads the given Playlist and starts playing immediately. For all Options have a look at "LoadPlaylist".</li>
  46342. <li><a name="SONOSPLAYER_setter_StartRadio">
  46343. <b><code>StartRadio &lt;Radiostationname&gt;</code></b></a>
  46344. <br /> Loads the named radiostation (favorite) and starts playing immediately. For all Options have a look at "LoadRadio".</li>
  46345. <li><a name="SONOSPLAYER_setter_StartSearchlist">
  46346. <b><code>StartSearchlist &lt;Categoryname&gt; &lt;CategoryElement&gt; [[TitlefilterRegEx]/[AlbumfilterRegEx]/[ArtistfilterRegEx] [maxElem]]</code></b></a>
  46347. <br /> Loads the searchlist and starts playing immediately. For all Options have a look at "LoadSearchlist".</li>
  46348. <li><a name="SONOSPLAYER_setter_Stop">
  46349. <b><code>Stop</code></b></a>
  46350. <br /> Stops the playing</li>
  46351. <li><a name="SONOSPLAYER_setter_Track">
  46352. <b><code>Track &lt;TrackNumber|Random&gt;</code></b></a>
  46353. <br /> Sets the track with the given tracknumber as the current title. If the tracknumber is the word <code>Random</code> a random track will be selected.</li>
  46354. </ul></li>
  46355. <li><b>Playing Settings</b><ul>
  46356. <li><a name="SONOSPLAYER_setter_Balance">
  46357. <b><code>Balance &lt;BalanceValue&gt;</code></b></a>
  46358. <br /> Sets the balance to the given value. The value can range from -100 (full left) to 100 (full right). Retrieves the new balancevalue as the result.</li>
  46359. <li><a name="SONOSPLAYER_setter_Bass">
  46360. <b><code>Bass &lt;BassValue&gt;</code></b></a>
  46361. <br /> Sets the bass to the given value. The value can range from -10 to 10. Retrieves the new bassvalue as the result.</li>
  46362. <li><a name="SONOSPLAYER_setter_CrossfadeMode">
  46363. <b><code>CrossfadeMode &lt;State&gt;</code></b></a>
  46364. <br /> Sets the crossfade-mode. Retrieves the new mode as the result.</li>
  46365. <li><a name="SONOSPLAYER_setter_LEDState">
  46366. <b><code>LEDState &lt;State&gt;</code></b></a>
  46367. <br /> Sets the LED state. Retrieves the new state as the result.</li>
  46368. <li><a name="SONOSPLAYER_setter_Loudness">
  46369. <b><code>Loudness &lt;State&gt;</code></b></a>
  46370. <br /> Sets the loudness-state. Retrieves the new state as the result.</li>
  46371. <li><a name="SONOSPLAYER_setter_Mute">
  46372. <b><code>Mute &lt;State&gt;</code></b></a>
  46373. <br /> Sets the mute-state. Retrieves the new state as the result.</li>
  46374. <li><a name="SONOSPLAYER_setter_MuteT">
  46375. <b><code>MuteT</code></b></a>
  46376. <br /> Toggles the mute state. Retrieves the new state as the result.</li>
  46377. <li><a name="SONOSPLAYER_setter_Repeat">
  46378. <b><code>Repeat &lt;State&gt;</code></b></a>
  46379. <br /> Sets the repeat-state. Retrieves the new state as the result.</li>
  46380. <li><a name="SONOSPLAYER_setter_RepeatOne">
  46381. <b><code>RepeatOne &lt;State&gt;</code></b></a>
  46382. <br /> Sets the repeatOne-state. Retrieves the new state as the result.</li>
  46383. <li><a name="SONOSPLAYER_setter_RepeatOneT">
  46384. <b><code>RepeatOneT</code></b></a>
  46385. <br /> Toggles the repeatOne-state. Retrieves the new state as the result.</li>
  46386. <li><a name="SONOSPLAYER_setter_RepeatT">
  46387. <b><code>RepeatT</code></b></a>
  46388. <br /> Toggles the repeat-state. Retrieves the new state as the result.</li>
  46389. <li><a name="SONOSPLAYER_setter_Shuffle">
  46390. <b><code>Shuffle &lt;State&gt;</code></b></a>
  46391. <br /> Sets the shuffle-state. Retrieves the new state as the result.</li>
  46392. <li><a name="SONOSPLAYER_setter_ShuffleT">
  46393. <b><code>ShuffleT</code></b></a>
  46394. <br /> Toggles the shuffle-state. Retrieves the new state as the result.</li>
  46395. <li><a name="SONOSPLAYER_setter_SleepTimer">
  46396. <b><code>SleepTimer &lt;Timestring|Seconds&gt;</code></b></a>
  46397. <br /> Sets the Sleeptimer to the given Time. It must be in the full format of "HH:MM:SS". Deactivate with "00:00:00" or "off".</li>
  46398. <li><a name="SONOSPLAYER_setter_Treble">
  46399. <b><code>Treble &lt;TrebleValue&gt;</code></b></a>
  46400. <br /> Sets the treble to the given value. The value can range from -10 to 10. Retrieves the new treblevalue as the result.</li>
  46401. <li><a name="SONOSPLAYER_setter_Volume">
  46402. <b><code>Volume &lt;VolumeLevel&gt; [RampType]</code></b></a>
  46403. <br /> Sets the volume to the given value. The value could be a relative value with + or - sign. In this case the volume will be increased or decreased according to this value. Retrieves the new volume as the result.<br />Optional can be a RampType defined with a value between 1 and 3 which describes different templates defined by the Sonos-System.</li>
  46404. <li><a name="SONOSPLAYER_setter_VolumeD">
  46405. <b><code>VolumeD</code></b></a>
  46406. <br /> Turns the volume by volumeStep-ticks down.</li>
  46407. <li><a name="SONOSPLAYER_setter_VolumeRestore">
  46408. <b><code>VolumeRestore</code></b></a>
  46409. <br /> Restores the volume of a formerly saved volume.</li>
  46410. <li><a name="SONOSPLAYER_setter_VolumeSave">
  46411. <b><code>VolumeSave &lt;VolumeLevel&gt;</code></b></a>
  46412. <br /> Sets the volume to the given value. The value could be a relative value with + or - sign. In this case the volume will be increased or decreased according to this value. Retrieves the new volume as the result. Additionally it saves the old volume to a reading for restoreing.</li>
  46413. <li><a name="SONOSPLAYER_setter_VolumeU">
  46414. <b><code>VolumeU</code></b></a>
  46415. <br /> Turns the volume by volumeStep-ticks up.</li>
  46416. </ul></li>
  46417. <li><b>Control the current Playlist</b><ul>
  46418. <li><a name="SONOSPLAYER_setter_AddURIToQueue">
  46419. <b><code>AddURIToQueue &lt;songURI&gt;</code></b></a>
  46420. <br />Adds the given MP3-File at the current position into the queue.</li>
  46421. <li><a name="SONOSPLAYER_setter_CurrentPlaylist">
  46422. <b><code>CurrentPlaylist</code></b></a>
  46423. <br /> Sets the current playing to the current queue, but doesn't start playing (e.g. after hearing of a radiostream, where the current playlist still exists but is currently "not in use")</li>
  46424. <li><a name="SONOSPLAYER_setter_DeleteFromQueue">
  46425. <b><code>DeleteFromQueue <index_of_elems></code></b></a>
  46426. <br /> Deletes the elements from the current queue with the given indices. You can use the ususal perl-array-formats like "1..12,17,20..22". The indices reference to the position in the current view of the list (this usually differs between the normal playmode and the shuffleplaymode).</li>
  46427. <li><a name="SONOSPLAYER_setter_DeletePlaylist">
  46428. <b><code>DeletePlaylist</code></b></a>
  46429. <br /> Deletes the Sonos-Playlist with the given name. According to the possibilities of the playlistname have a close look at LoadPlaylist.</li>
  46430. <li><a name="SONOSPLAYER_setter_EmptyPlaylist">
  46431. <b><code>EmptyPlaylist</code></b></a>
  46432. <br /> Clears the current queue</li>
  46433. <li><a name="SONOSPLAYER_setter_LoadFavourite">
  46434. <b><code>LoadFavourite &lt;Favouritename&gt;</code></b></a>
  46435. <br /> Loads the named sonos-favorite. The parameter should be URL-encoded for proper naming of lists with special characters.<br />Additionally it's possible to use a regular expression as the name. The first hit will be used. The format is e.g. <code>/meine.hits/</code>.</li>
  46436. <li><a name="SONOSPLAYER_setter_LoadPlaylist">
  46437. <b><code>LoadPlaylist &lt;Playlistname|Fhem-Devicename&gt; [EmptyQueueBeforeImport]</code></b></a>
  46438. <br /> Loads the named playlist to the current playing queue. The parameter should be URL-encoded for proper naming of lists with special characters. The Playlistnamen can be an Fhem-Devicename, then the current playlist of this referenced player will be copied. The Playlistname can also be a filename and then must be startet with 'file:' (e.g. 'file:c:/Test.m3u')<br />If EmptyQueueBeforeImport is given and set to 1, the queue will be emptied before the import process. If not given, the parameter will be interpreted as 1.<br />Additionally it's possible to use a regular expression as the name. The first hit will be used. The format is e.g. <code>/hits.2014/</code>.</li>
  46439. <li><a name="SONOSPLAYER_setter_LoadRadio">
  46440. <b><code>LoadRadio &lt;Radiostationname&gt;</code></b></a>
  46441. <br /> Loads the named radiostation (favorite). The current queue will not be touched but deactivated. The parameter should be URL-encoded for proper naming of lists with special characters.<br />Additionally it's possible to use a regular expression as the name. The first hit will be used. The format is e.g. <code>/radio/</code>.</li>
  46442. <li><a name="SONOSPLAYER_setter_LoadSearchlist">
  46443. <b><code>LoadSearchlist &lt;Categoryname&gt; &lt;CategoryElement&gt; [[TitlefilterRegEx]/[AlbumfilterRegEx]/[ArtistfilterRegEx] [[*]maxElem[+|-]]]</code></b></a>
  46444. <br /> Loads titles from the Sonos-Bibliothek into the current playlist according to the given category and filtervalues. Please consult the (german) Wiki for detailed informations.</li>
  46445. <li><a name="SONOSPLAYER_setter_SavePlaylist">
  46446. <b><code>SavePlaylist &lt;Playlistname&gt;</code></b></a>
  46447. <br /> Saves the current queue as a playlist with the given name. An existing playlist with the same name will be overwritten. The parameter should be URL-encoded for proper naming of lists with special characters. The Playlistname can be a filename and then must be startet with 'file:' (e.g. 'file:c:/Test.m3u')</li>
  46448. </ul></li>
  46449. <li><b>Groupcontrol</b><ul>
  46450. <li><a name="SONOSPLAYER_setter_AddMember">
  46451. <b><code>AddMember &lt;devicename&gt;</code></b></a>
  46452. <br />Adds the given devicename to the current device as a groupmember. The current playing of the current device goes on and will be transfered to the given device (the new member).</li>
  46453. <li><a name="SONOSPLAYER_setter_CreateStereoPair">
  46454. <b><code>CreateStereoPair &lt;rightPlayerDevicename&gt;</code></b></a>
  46455. <br />Adds the given devicename to the current device as the right speaker of a stereopair. The current playing of the current device goes on (as left-side speaker) and will be transfered to the given device (as right-side speaker).</li>
  46456. <li><a name="SONOSPLAYER_setter_GroupMute">
  46457. <b><code>GroupMute &lt;State&gt;</code></b></a>
  46458. <br />Sets the mute state of the complete group in one step. The value can be on or off.</li>
  46459. <li><a name="SONOSPLAYER_setter_GroupVolume">
  46460. <b><code>GroupVolume &lt;VolumeLevel&gt;</code></b></a>
  46461. <br />Sets the group-volume in the way the original controller does. This means, that the relative volumelevel between the different players will be saved during change.</li>
  46462. <li><a name="SONOSPLAYER_setter_GroupVolumeD">
  46463. <b><code>GroupVolumeD</code></b></a>
  46464. <br /> Turns the group volume by volumeStep-ticks down.</li>
  46465. <li><a name="SONOSPLAYER_setter_GroupVolumeU">
  46466. <b><code>GroupVolumeU</code></b></a>
  46467. <br /> Turns the group volume by volumeStep-ticks up.</li>
  46468. <li><a name="SONOSPLAYER_setter_MakeStandaloneGroup">
  46469. <b><code>MakeStandaloneGroup</code></b></a>
  46470. <br />Makes this Player a standalone group.</li>
  46471. <li><a name="SONOSPLAYER_setter_RemoveMember">
  46472. <b><code>RemoveMember &lt;devicename&gt;</code></b></a>
  46473. <br />Removes the given device, so that they both are not longer a group. The current playing of the current device goes on normally. The cutted device stops his playing and has no current playlist anymore (since Sonos Version 4.2 the old playlist will be restored).</li>
  46474. <li><a name="SONOSPLAYER_setter_SeparateStereoPair">
  46475. <b><code>SeparateStereoPair</code></b></a>
  46476. <br />Divides the stereo-pair into two independant devices.</li>
  46477. <li><a name="SONOSPLAYER_setter_SnapshotGroupVolume">
  46478. <b><code>SnapshotGroupVolume</code></b></a>
  46479. <br /> Save the current volume-relation of all players of the same group. It's neccessary for the use of "GroupVolume" and is stored until the next call of "SnapshotGroupVolume".</li>
  46480. </ul></li>
  46481. </ul>
  46482. <a name="SONOSPLAYERget"></a>
  46483. <h4>Get</h4>
  46484. <ul>
  46485. <li><b>Common</b><ul>
  46486. <li><a name="SONOSPLAYER_getter_Alarm">
  46487. <b><code>Alarm &lt;ID&gt;</code></b></a>
  46488. <br /> It's an exception to the normal getter semantics. Returns directly a Perl-Hash with the Alarm-Informations to the given id. It's just a shorthand for <code>eval(ReadingsVal(&lt;Devicename&gt;, 'Alarmlist', ()))->{&lt;ID&gt;};</code>.</li>
  46489. <li><a name="SONOSPLAYER_getter_EthernetPortStatus">
  46490. <b><code>EthernetPortStatus &lt;PortNumber&gt;</code></b></a>
  46491. <br /> Gets the Ethernet-Portstatus of the given Port. Can be 'Active' or 'Inactive'.</li>
  46492. <li><a name="SONOSPLAYER_getter_PossibleRoomIcons">
  46493. <b><code>PossibleRoomIcons</code></b></a>
  46494. <br /> Retreives a list of all possible Roomiconnames for the use with "set RoomIcon".</li>
  46495. <li><a name="SONOSPLAYER_getter_SupportLinks">
  46496. <b><code>SupportLinks</code></b></a>
  46497. <br /> Shows a list with direct links to the player-support-sites.</li>
  46498. </ul></li>
  46499. <li><b>Lists</b><ul>
  46500. <li><a name="SONOSPLAYER_getter_Favourites">
  46501. <b><code>Favourites</code></b></a>
  46502. <br /> Retrieves a list with the names of all sonos favourites. This getter retrieves the same list on all Zoneplayer. The format is a comma-separated list with quoted names of favourites. e.g. "Liste 1","Entry 2","Test"</li>
  46503. <li><a name="SONOSPLAYER_getter_FavouritesWithCovers">
  46504. <b><code>FavouritesWithCovers</code></b></a>
  46505. <br /> Retrieves a list with the stringrepresentation of a perl-hash which can easily be converted with "eval". It consists of the names and coverlinks of all of the favourites stored in Sonos e.g. {'FV:2/22' => {'Cover' => 'urlzumcover', 'Title' => '1. Favorit'}}</li>
  46506. <li><a name="SONOSPLAYER_getter_Playlists">
  46507. <b><code>Playlists</code></b></a>
  46508. <br /> Retrieves a list with the names of all saved queues (aka playlists). This getter retrieves the same list on all Zoneplayer. The format is a comma-separated list with quoted names of playlists. e.g. "Liste 1","Liste 2","Test"</li>
  46509. <li><a name="SONOSPLAYER_getter_PlaylistsWithCovers">
  46510. <b><code>PlaylistsWithCovers</code></b></a>
  46511. <br /> Retrieves a list with the stringrepresentation of a perl-hash which can easily be converted with "eval". It consists of the names and coverlinks of all of the playlists stored in Sonos e.g. {'SQ:14' => {'Cover' => 'urlzumcover', 'Title' => '1. Playlist'}}</li>
  46512. <li><a name="SONOSPLAYER_getter_Queue">
  46513. <b><code>Queue</code></b></a>
  46514. <br /> Retrieves a list with the names of all titles in the current queue. This getter retrieves the same list on all Zoneplayer. The format is a comma-separated list with quoted names of the titles. e.g. "1. Liste 1 [0:02:14]","2. Eintrag 2 [k.A.]","3. Test [0:14:00]"</li>
  46515. <li><a name="SONOSPLAYER_getter_QueueWithCovers">
  46516. <b><code>QueueWithCovers</code></b></a>
  46517. <br /> Retrieves a list with the stringrepresentation of a perl-hash which can easily be converted with "eval". It consists of the names and coverlinks of all of the titles in the current queue. e.g.: {'Q:0/22' => {'Cover' => 'urlzumcover', 'Title' => '1. Titel'}}.</li>
  46518. <li><a name="SONOSPLAYER_getter_Radios">
  46519. <b><code>Radios</code></b></a>
  46520. <br /> Retrieves a list with the names of all saved radiostations (favorites). This getter retrieves the same list on all Zoneplayer. The format is a comma-separated list with quoted names of radiostations. e.g. "Sender 1","Sender 2","Test"</li>
  46521. <li><a name="SONOSPLAYER_getter_RadiosWithCovers">
  46522. <b><code>RadiosWithCovers</code></b></a>
  46523. <br /> Retrieves a list with the stringrepresentation of a perl-hash which can easily be converted with "eval". It consists of the names and coverlinks of all of the radiofavourites stored in Sonos e.g. {'R:0/0/2' => {'Cover' => 'urlzumcover', 'Title' => '1. Radiosender'}}</li>
  46524. <li><a name="SONOSPLAYER_getter_SearchlistCategories">
  46525. <b><code>SearchlistCategories</code></b></a>
  46526. <br /> Retrieves a list with the possible categories for the setter "LoadSearchlist". The Format is a comma-separated list with quoted names of categories.</li>
  46527. </ul></li>
  46528. <li><b>Informations on the current Title</b><ul>
  46529. <li><a name="SONOSPLAYER_getter_CurrentTrackPosition">
  46530. <b><code>CurrentTrackPosition</code></b></a>
  46531. <br /> Retrieves the current timeposition inside a title</li>
  46532. </ul></li>
  46533. </ul>
  46534. <a name="SONOSPLAYERattr"></a>
  46535. <h4>Attributes</h4>
  46536. '''Attention'''<br />The attributes can only be used after a restart of fhem, because it must be initially transfered to the subprocess.
  46537. <ul>
  46538. <li><b>Common</b><ul>
  46539. <li><a name="SONOSPLAYER_attribut_disable"><b><code>disable &lt;int&gt;</code></b>
  46540. </a><br /> One of (0,1). Disables the event-worker for this Sonosplayer.</li>
  46541. <li><a name="SONOSPLAYER_attribut_generateSomethingChangedEvent"><b><code>generateSomethingChangedEvent &lt;int&gt;</code></b>
  46542. </a><br /> One of (0,1). 1 if a 'SomethingChanged'-Event should be generated. This event is thrown every time an event is generated. This is useful if you wants to be notified on every change with a single event.</li>
  46543. <li><a name="SONOSPLAYER_attribut_generateVolumeEvent"><b><code>generateVolumeEvent &lt;int&gt;</code></b>
  46544. </a><br /> One of (0,1). Enables an event generated at volumechanges if minVolume or maxVolume is set.</li>
  46545. <li><a name="SONOSPLAYER_attribut_generateVolumeSlider"><b><code>generateVolumeSlider &lt;int&gt;</code></b>
  46546. </a><br /> One of (0,1). Enables a slider for volumecontrol in detail view.</li>
  46547. <li><a name="SONOSPLAYER_attribut_getAlarms"><b><code>getAlarms &lt;int&gt;</code></b>
  46548. </a><br /> One of (0..1). Initializes a callback-method for Alarms. This included the information of the DailyIndexRefreshTime.</li>
  46549. <li><a name="SONOSPLAYER_attribut_suppressControlButtons"><b><code>suppressControlButtons &lt;int&gt;</code></b>
  46550. </a><br /> One of (0,1). Enables the control-section shown under the Cover-/Titleview.</li>
  46551. <li><a name="SONOSPLAYER_attribut_volumeStep"><b><code>volumeStep &lt;int&gt;</code></b>
  46552. </a><br /> One of (0..100). Defines the stepwidth for subsequent calls of <code>VolumeU</code> and <code>VolumeD</code>.</li>
  46553. </ul></li>
  46554. <li><b>Information Generation</b><ul>
  46555. <li><a name="SONOSPLAYER_attribut_generateInfoSummarize1"><b><code>generateInfoSummarize1 &lt;string&gt;</code></b>
  46556. </a><br /> Generates the reading 'InfoSummarize1' with the given format. More Information on this in the examples-section.</li>
  46557. <li><a name="SONOSPLAYER_attribut_generateInfoSummarize2"><b><code>generateInfoSummarize2 &lt;string&gt;</code></b>
  46558. </a><br /> Generates the reading 'InfoSummarize2' with the given format. More Information on this in the examples-section.</li>
  46559. <li><a name="SONOSPLAYER_attribut_generateInfoSummarize3"><b><code>generateInfoSummarize3 &lt;string&gt;</code></b>
  46560. </a><br /> Generates the reading 'InfoSummarize3' with the given format. More Information on this in the examples-section.</li>
  46561. <li><a name="SONOSPLAYER_attribut_generateInfoSummarize4"><b><code>generateInfoSummarize4 &lt;string&gt;</code></b>
  46562. </a><br /> Generates the reading 'InfoSummarize4' with the given format. More Information on this in the examples-section.</li>
  46563. <li><a name="SONOSPLAYER_attribut_getTitleInfoFromMaster"><b><code>getTitleInfoFromMaster &lt;int&gt;</code></b>
  46564. </a><br /> One of (0, 1). Gets the current Playing-Informations from the Masterplayer (if one is present).</li>
  46565. <li><a name="SONOSPLAYER_attribut_simulateCurrentTrackPosition"><b><code>simulateCurrentTrackPosition &lt;int&gt;</code></b>
  46566. </a><br /> One of (0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60). Starts an internal Timer which refreshs the current trackposition into the Readings <code>currentTrackPositionSimulated</code> and <code>currentTrackPositionSimulatedSec</code>. At the same time the Reading <code>currentTrackPositionSimulatedPercent</code> (between 0.0 and 100.0) will also be refreshed.</li>
  46567. <li><a name="SONOSPLAYER_attribut_simulateCurrentTrackPositionPercentFormat"><b><code>simulateCurrentTrackPositionPercentFormat &lt;Format&gt;</code></b>
  46568. </a><br /> Defines the format of the percentformat in the Reading <code>currentTrackPositionSimulatedPercent</code>.</li>
  46569. <li><a name="SONOSPLAYER_attribut_stateVariable"><b><code>stateVariable &lt;string&gt;</code></b>
  46570. </a><br /> One of (TransportState,NumberOfTracks,Track,TrackURI,TrackDuration,Title,Artist,Album,OriginalTrackNumber,AlbumArtist,<br />Sender,SenderCurrent,SenderInfo,StreamAudio,NormalAudio,AlbumArtURI,nextTrackDuration,nextTrackURI,nextAlbumArtURI,<br />nextTitle,nextArtist,nextAlbum,nextAlbumArtist,nextOriginalTrackNumber,Volume,Mute,Shuffle,Repeat,RepeatOne,CrossfadeMode,Balance,<br />HeadphoneConnected,SleepTimer,Presence,RoomName,SaveRoomName,PlayerType,Location,SoftwareRevision,SerialNum,InfoSummarize1,<br />InfoSummarize2,InfoSummarize3,InfoSummarize4). Defines, which variable has to be copied to the content of the state-variable.</li>
  46571. </ul></li>
  46572. <li><b>Controloptions</b><ul>
  46573. <li><a name="SONOSPLAYER_attribut_maxVolume"><b><code>maxVolume &lt;int&gt;</code></b>
  46574. </a><br /> One of (0..100). Define a maximal volume for this Zoneplayer</li>
  46575. <li><a name="SONOSPLAYER_attribut_minVolume"><b><code>minVolume &lt;int&gt;</code></b>
  46576. </a><br /> One of (0..100). Define a minimal volume for this Zoneplayer</li>
  46577. <li><a name="SONOSPLAYER_attribut_maxVolumeHeadphone"><b><code>maxVolumeHeadphone &lt;int&gt;</code></b>
  46578. </a><br /> One of (0..100). Define a maximal volume for this Zoneplayer for use with headphones</li>
  46579. <li><a name="SONOSPLAYER_attribut_minVolumeHeadphone"><b><code>minVolumeHeadphone &lt;int&gt;</code></b>
  46580. </a><br /> One of (0..100). Define a minimal volume for this Zoneplayer for use with headphones</li>
  46581. <li><a name="SONOSPLAYER_attribut_buttonEvents"><b><code>buttonEvents &lt;Time:Pattern&gt;[ &lt;Time:Pattern&gt; ...]</code></b>
  46582. </a><br /> Defines that after pressing a specified sequence of buttons at the player an event has to be thrown. The definition itself is a tupel: the first part (before the colon) is the time in seconds, the second part (after the colon) is the button sequence of this event.<br />
  46583. The following button-shortcuts are possible: <ul><li><b>M</b>: The Mute-Button</li><li><b>H</b>: The Headphone-Connector</li><li><b>U</b>: Up-Button (Volume Up)</li><li><b>D</b>: Down-Button (Volume Down)</li></ul><br />
  46584. The event thrown is named <code>ButtonEvent</code>, the value is the defined button-sequence.<br />
  46585. E.G.: <code>2:MM</code><br />
  46586. Here an event is defined, where in time of 2 seconds the Mute-Button has to be pressed 2 times. The created event is named <code>ButtonEvent</code> and has the value <code>MM</code>.</li>
  46587. </ul></li>
  46588. <li><a name="SONOSPLAYER_attribut_saveSleeptimerInAction"><b><code>saveSleeptimerInAction &lt;int&gt;</code></b>
  46589. </a><br /> One of (0..1). If set, a possibly set Attribute "stopSleeptimerInAction" will be ignored.</li>
  46590. <li><a name="SONOSPLAYER_attribut_stopSleeptimerInAction"><b><code>stopSleeptimerInAction &lt;int&gt;</code></b>
  46591. </a><br /> One of (0..1). If set, a change of the current transportState to "PAUSED_PLAYBACK" or "STOPPED" will cause a stopping of an eventually running SleepTimer.</li>
  46592. </ul>
  46593. <a name="SONOSPLAYERexamples"></a>
  46594. <h4>Examples / Tips</h4>
  46595. <ul>
  46596. <li><a name="SONOSPLAYER_examples_InfoSummarize">Format of InfoSummarize:</a><br />
  46597. <code>infoSummarizeX := &lt;NormalAudio&gt;:summarizeElem:&lt;/NormalAudio&gt; &lt;StreamAudio&gt;:summarizeElem:&lt;/StreamAudio&gt;|:summarizeElem:</code><br />
  46598. <code>:summarizeElem: := &lt;:variable:[ prefix=":text:"][ suffix=":text:"][ instead=":text:"][ ifempty=":text:"]/[ emptyVal=":text:"]&gt;</code><br />
  46599. <code>:variable: := TransportState|NumberOfTracks|Track|TrackURI|TrackDuration|Title|Artist|Album|OriginalTrackNumber|AlbumArtist|<br />Sender|SenderCurrent|SenderInfo|StreamAudio|NormalAudio|AlbumArtURI|nextTrackDuration|nextTrackURI|nextAlbumArtURI|<br />nextTitle|nextArtist|nextAlbum|nextAlbumArtist|nextOriginalTrackNumber|Volume|Mute|Shuffle|Repeat|RepeatOne|CrossfadeMode|Balance|<br />HeadphoneConnected|SleepTimer|Presence|RoomName|SaveRoomName|PlayerType|Location|SoftwareRevision|SerialNum|InfoSummarize1|<br />InfoSummarize2|InfoSummarize3|InfoSummarize4</code><br />
  46600. <code>:text: := [Any text without double-quotes]</code><br /></li>
  46601. </ul>
  46602. <a name="SSCam"></a>
  46603. <h3>SSCam</h3>
  46604. <ul>
  46605. Using this Module you are able to operate cameras which are defined in Synology Surveillance Station (SVS) and execute
  46606. functions of the SVS. It is based on the SVS API and supports the SVS version 7 and above.<br>
  46607. At present the following functions are available: <br><br>
  46608. <ul>
  46609. <ul>
  46610. <li>Start a Recording</li>
  46611. <li>Stop a Recording (using command or automatically after the &lt;RecordTime&gt; period</li>
  46612. <li>Trigger a Snapshot </li>
  46613. <li>Deaktivate a Camera in Synology Surveillance Station</li>
  46614. <li>Activate a Camera in Synology Surveillance Station</li>
  46615. <li>Control of the exposure modes day, night and automatic </li>
  46616. <li>switchover the motion detection by camera, by SVS or to deactivate </li>
  46617. <li>control of motion detection parameters sensitivity, threshold, object size and percentage for release </li>
  46618. <li>Retrieval of Camera Properties (also by Polling) as well as informations about the installed SVS-package</li>
  46619. <li>Move to a predefined Preset-position (at PTZ-cameras) </li>
  46620. <li>Start a predefined Patrol (at PTZ-cameras) </li>
  46621. <li>Positioning of PTZ-cameras to absolute X/Y-coordinates </li>
  46622. <li>continuous moving of PTZ-camera lense </li>
  46623. <li>trigger of external events 1-10 (action rules in SVS) </li>
  46624. <li>start and stop of camera livestreams, show the last recording and snapshot embedded </li>
  46625. <li>fetch of livestream-Url's with key (login not needed in that case) </li>
  46626. <li>playback of last recording and playback the last snapshot </li>
  46627. <li>switch the Surveillance Station HomeMode on/off and retrieve the HomeModeState </li>
  46628. <li>show the stored credentials of a device </li>
  46629. <li>fetch the Surveillance Station Logs, exploit the newest entry as reading </li>
  46630. <li>create a gallery of the last 1-10 snapshots (as a Popup or permanent weblink-Device) </li><br>
  46631. </ul>
  46632. </ul>
  46633. The recordings and snapshots will be stored in Synology Surveillance Station (SVS) and are managed like the other (normal) recordings / snapshots defined by Surveillance Station rules.<br>
  46634. For example the recordings are stored for a defined time in Surveillance Station and will be deleted after that period.<br><br>
  46635. If you like to discuss or help to improve this module please use FHEM-Forum with link: <br>
  46636. <a href="http://forum.fhem.de/index.php/topic,45671.msg374390.html#msg374390">49_SSCam: Fragen, Hinweise, Neuigkeiten und mehr rund um dieses Modul</a>.<br><br>
  46637. <b> Prerequisites </b> <br><br>
  46638. This module uses the Perl-module JSON. <br>
  46639. On Debian-Linux based systems this module can be installed by: <br><br>
  46640. <code>sudo apt-get install libjson-perl</code> <br><br>
  46641. SSCam is completely using the nonblocking functions of HttpUtils respectively HttpUtils_NonblockingGet. <br>
  46642. In DSM respectively in Synology Surveillance Station an User has to be created. The login credentials are needed later when using a set-command to assign the login-data to a device. <br>
  46643. Further informations could be find among <a href="#SSCam_Credentials">Credentials</a>. <br><br>
  46644. Overview which Perl-modules SSCam is using: <br><br>
  46645. JSON <br>
  46646. Data::Dumper <br>
  46647. MIME::Base64 <br>
  46648. Time::HiRes <br>
  46649. HttpUtils (FHEM-module) <br><br>
  46650. <a name="SSCamdefine"></a>
  46651. <b>Define</b>
  46652. <ul>
  46653. <br>
  46654. There is a distinction between the definition of a camera-device and the definition of a Surveillance Station (SVS)
  46655. device. Dependend on the kind of the defined device the internal MODEL will be set to CAM or SVS and a proper
  46656. subset of the described set/get-commands are assigned to the device. <br>
  46657. The scope of application of set/get-commands is denoted to every particular command (valid for CAM, SVS, CAM/SVS).
  46658. <br><br>
  46659. A camera-device will be defined by: <br><br>
  46660. <code>define &lt;name&gt; SSCAM &lt;camera name in SVS&gt; &lt;ServerAddr&gt; [Port] </code> <br><br>
  46661. At first the devices have to be set up and has to be operable in Synology Surveillance Station 7.0 and above. <br><br>
  46662. A SVS-device to control functions of the Surveillance Station (SVS) will be defined by: <br><br>
  46663. <code>define &lt;name&gt; SSCAM SVS &lt;ServerAddr&gt; [Port] </code> <br><br>
  46664. In that case the term &lt;camera name in SVS&gt; become replaced by <b>SVS</b> only. <br><br>
  46665. The Modul SSCam ist based on functions of Synology Surveillance Station API. <br>
  46666. Currently the HTTP-protocol is supported to call Synology Disk Station. <br><br>
  46667. The parameters are in detail:
  46668. <br>
  46669. <br>
  46670. <table>
  46671. <colgroup> <col width=15%> <col width=85%> </colgroup>
  46672. <tr><td>name: </td><td>the name of the new device to use in FHEM</td></tr>
  46673. <tr><td>Cameraname: </td><td>camera name as defined in Synology Surveillance Station if camera-device, "SVS" if SVS-Device. Spaces are not allowed in camera name. </td></tr>
  46674. <tr><td>ServerAddr: </td><td>IP-address of Synology Surveillance Station Host. <b>Note:</b> avoid using hostnames because of DNS-Calls are not unblocking in FHEM </td></tr>
  46675. <tr><td>Port: </td><td>optional - the port of synology surveillance station, if not set the default of 5000 (HTTP only) is used</td></tr>
  46676. </table>
  46677. <br><br>
  46678. <b>Example:</b>
  46679. <pre>
  46680. <code>define CamCP SSCAM Carport 192.168.2.20 [5000]</code>
  46681. creates a new camera device CamCP
  46682. <code>define DS1 SSCAM SVS 192.168.2.20 [5000]</code>
  46683. creares a new SVS device DS1
  46684. </pre>
  46685. When a new Camera is defined, as a start the recordingtime of 15 seconds will be assigned to the device.<br>
  46686. Using the <a href="#SSCamattr">attribute</a> "rectime" you can adapt the recordingtime for every camera individually.<br>
  46687. The value of "0" for rectime will lead to an endless recording which has to be stopped by a "set &lt;name&gt; off" command.<br>
  46688. Due to a Log-Entry with a hint to that circumstance will be written. <br><br>
  46689. If the <a href="#SSCamattr">attribute</a> "rectime" would be deleted again, the default-value for recording-time (15s) become active.<br><br>
  46690. With <a href="#SSCamset">command</a> <b>"set &lt;name&gt; on [rectime]"</b> a temporary recordingtime is determinded which would overwrite the dafault-value of recordingtime <br>
  46691. and the attribute "rectime" (if it is set) uniquely. <br><br>
  46692. In that case the command <b>"set &lt;name&gt; on 0"</b> leads also to an endless recording as well.<br><br>
  46693. If you have specified a pre-recording time in SVS it will be considered too. <br><br><br>
  46694. <a name="SSCam_Credentials"></a>
  46695. <b>Credentials </b><br><br>
  46696. After a camera-device is defined, firstly it is needed to save the credentials. This will be done with command:
  46697. <pre>
  46698. set &lt;name&gt; credentials &lt;username&gt; &lt;password&gt;
  46699. </pre>
  46700. The password length has a maximum of 20 characters. <br>
  46701. The operator can, dependend on what functions are planned to execute, create an user in DSM respectively in Synology Surveillance Station as well. <br>
  46702. If the user is member of admin-group, he has access to all module functions. Without this membership the user can only execute functions with lower need of rights. <br>
  46703. The required minimum rights to execute functions are listed in a table further down. <br>
  46704. Alternatively to DSM-user a user created in SVS can be used. Also in that case a user of type "manager" has the right to execute all functions, <br>
  46705. whereat the access to particular cameras can be restricted by the privilege profile (please see help function in SVS for details). <br>
  46706. As best practice it is proposed to create an user in DSM as well as in SVS too: <br><br>
  46707. <ul>
  46708. <li>DSM-User as member of admin group: unrestricted test of all module functions -&gt; session: DSM </li>
  46709. <li>SVS-User as Manager or observer: adjusted privilege profile -&gt; session: SurveillanceStation </li>
  46710. </ul>
  46711. <br>
  46712. Using the <a href="#SSCamattr">Attribute</a> "session" can be selected, if the session should be established to DSM or the SVS instead. <br>
  46713. If the session will be established to DSM, SVS Web-API methods are available as well as further API methods of other API's what possibly needed for processing. <br><br>
  46714. After device definition the default is "login to DSM", that means credentials with admin rights can be used to test all camera-functions firstly. <br>
  46715. After this the credentials can be switched to a SVS-session with a restricted privilege profile as needed on dependency what module functions are want to be executed. <br><br>
  46716. The following list shows the minimum rights what the particular module function needs. <br><br>
  46717. <ul>
  46718. <table>
  46719. <colgroup> <col width=20%> <col width=80%> </colgroup>
  46720. <tr><td><li>set ... on </td><td> session: ServeillanceStation - observer with enhanced privilege "manual recording" </li></td></tr>
  46721. <tr><td><li>set ... off </td><td> session: ServeillanceStation - observer with enhanced privilege "manual recording" </li></td></tr>
  46722. <tr><td><li>set ... snap </td><td> session: ServeillanceStation - observer </li></td></tr>
  46723. <tr><td><li>set ... disable </td><td> session: ServeillanceStation - manager </li></td></tr>
  46724. <tr><td><li>set ... enable </td><td> session: ServeillanceStation - manager </li></td></tr>
  46725. <tr><td><li>set ... expmode </td><td> session: ServeillanceStation - manager </li></td></tr>
  46726. <tr><td><li>set ... extevent </td><td> session: DSM - user as member of admin-group </li></td></tr>
  46727. <tr><td><li>set ... goPreset </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
  46728. <tr><td><li>set ... homeMode </td><td> ssession: ServeillanceStation - observer with privilege Home Mode switch </li></td></tr>
  46729. <tr><td><li>set ... motdetsc </td><td> session: ServeillanceStation - manager </li></td></tr>
  46730. <tr><td><li>set ... runPatrol </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
  46731. <tr><td><li>set ... goAbsPTZ </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
  46732. <tr><td><li>set ... move </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
  46733. <tr><td><li>set ... runView </td><td> session: ServeillanceStation - observer with privilege liveview of camera </li></td></tr>
  46734. <tr><td><li>set ... snapGallery </td><td> session: ServeillanceStation - observer </li></td></tr>
  46735. <tr><td><li>set ... stopView </td><td> - </li></td></tr>
  46736. <tr><td><li>set ... credentials </td><td> - </li></td></tr>
  46737. <tr><td><li>get ... caminfo[all] </td><td> session: ServeillanceStation - observer </li></td></tr>
  46738. <tr><td><li>get ... eventlist </td><td> session: ServeillanceStation - observer </li></td></tr>
  46739. <tr><td><li>get ... listLog </td><td> session: ServeillanceStation - observer </li></td></tr>
  46740. <tr><td><li>get ... scanVirgin </td><td> session: ServeillanceStation - observer </li></td></tr>
  46741. <tr><td><li>get ... svsinfo </td><td> session: ServeillanceStation - observer </li></td></tr>
  46742. <tr><td><li>get ... snapfileinfo </td><td> session: ServeillanceStation - observer </li></td></tr>
  46743. <tr><td><li>get ... snapinfo </td><td> session: ServeillanceStation - observer </li></td></tr>
  46744. <tr><td><li>get ... stmUrlPath </td><td> session: ServeillanceStation - observer </li></td></tr>
  46745. </table>
  46746. </ul>
  46747. <br><br>
  46748. <a name="SSCam_HTTPTimeout"></a>
  46749. <b>HTTP-Timeout Settings</b><br><br>
  46750. All functions of SSCam use HTTP-calls to SVS Web API. <br>
  46751. The default-value of HTTP-Timeout amounts 4 seconds. You can set the <a href="#SSCamattr">attribute</a> "httptimeout" > 0 to adjust the value as needed in your technical environment. <br>
  46752. </ul>
  46753. <br><br><br>
  46754. <a name="SSCamset"></a>
  46755. <b>Set </b>
  46756. <ul>
  46757. <br>
  46758. The specified set-commands are available for CAM/SVS-devices or only valid for CAM-devices or rather for SVS-Devices.
  46759. They can be selected in the drop-down-menu of the particular device. <br><br>
  46760. <ul>
  46761. <li><b> set &lt;name&gt; credentials &lt;username&gt; &lt;password&gt; </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM/SVS)</li> <br>
  46762. set username / password combination for access the Synology Surveillance Station.
  46763. See <a href="#SSCam_Credentials">Credentials</a><br> for further informations.
  46764. <br><br>
  46765. </ul>
  46766. <ul>
  46767. <li><b> set &lt;name&gt; createSnapGallery </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46768. A snapshot gallery will be created as a permanent (weblink)Device. The device will be provided in room "SnapGallery".
  46769. With the "snapGallery..."-<a href="#SSCamattr">attributes</a> respectively the weblink-device specific attributes (which was created)
  46770. you are able to manipulate the properties of the new snapshot gallery device. <br>
  46771. <br><br>
  46772. </ul>
  46773. <ul>
  46774. <li><b> set &lt;name&gt; [enable|disable] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46775. For <b>deactivating / activating</b> a list of cameras or all cameras by Regex-expression, subsequent two
  46776. examples using "at":
  46777. <pre>
  46778. define a13 at 21:46 set CamCP1,CamFL,CamHE1,CamTER disable (enable)
  46779. define a14 at 21:46 set Cam.* disable (enable)
  46780. </pre>
  46781. A bit more convenient is it to use a dummy-device for enable/disable all available cameras in Surveillance Station.<br>
  46782. At first the Dummy will be created.
  46783. <pre>
  46784. define allcams dummy
  46785. attr allcams eventMap on:enable off:disable
  46786. attr allcams room Cams
  46787. attr allcams webCmd enable:disable
  46788. </pre>
  46789. With combination of two created notifies, respectively one for "enable" and one for "diasble", you are able to switch all cameras into "enable" or "disable" state at the same time if you set the dummy to "enable" or "disable".
  46790. <pre>
  46791. define all_cams_disable notify allcams:.*off set CamCP1,CamFL,CamHE1,CamTER disable
  46792. attr all_cams_disable room Cams
  46793. define all_cams_enable notify allcams:on set CamCP1,CamFL,CamHE1,CamTER enable
  46794. attr all_cams_enable room Cams
  46795. </pre>
  46796. </ul>
  46797. <br><br>
  46798. <ul>
  46799. <li><b> set &lt;name&gt; expmode [day|night|auto] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46800. With this command you are able to control the exposure mode and can set it to day, night or automatic mode.
  46801. Thereby, for example, the behavior of camera LED's will be suitable controlled.
  46802. The successful switch will be reported by the reading CamExposureMode (command "get ... caminfoall"). <br><br>
  46803. <b> Note: </b><br>
  46804. The successfully execution of this function depends on if SVS supports that functionality of the connected camera.
  46805. Is the field for the Day/Night-mode shown greyed in SVS -&gt; IP-camera -&gt; optimization -&gt; exposure mode, this function will be probably unsupported.
  46806. </ul>
  46807. <br><br>
  46808. <ul>
  46809. <li><b> set &lt;name&gt; extevent [ 1-10 ] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for SVS)</li> <br>
  46810. This command triggers an external event (1-10) in SVS.
  46811. The actions which will are used have to be defined in the actionrule editor of SVS at first. There are the events 1-10 possible.
  46812. In the message application of SVS you may select Email, SMS or Mobil (DS-Cam) messages to release if an external event has been triggerd.
  46813. Further informations can be found in the online help of the actionrule editor.
  46814. The used user needs to be a member of the admin-group and DSM-session is needed too.
  46815. </ul>
  46816. <br><br>
  46817. <ul>
  46818. <li><b> set &lt;name&gt; goAbsPTZ [ X Y | up | down | left | right ] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46819. This command can be used to move a PTZ-camera to an arbitrary absolute X/Y-coordinate, or to absolute position using up/down/left/right.
  46820. The option is only available for cameras which are having the Reading "CapPTZAbs=true". The property of a camera can be requested with "get &lt;name&gt; caminfoall" .
  46821. <br><br>
  46822. Example for a control to absolute X/Y-coordinates: <br>
  46823. <pre>
  46824. set &lt;name&gt; goAbsPTZ 120 450
  46825. </pre>
  46826. In this example the camera lense moves to position X=120 und Y=450. <br>
  46827. The valuation is:
  46828. <pre>
  46829. X = 0 - 640 (0 - 319 moves lense left, 321 - 640 moves lense right, 320 don't move lense)
  46830. Y = 0 - 480 (0 - 239 moves lense down, 241 - 480 moves lense up, 240 don't move lense)
  46831. </pre>
  46832. The lense can be moved in smallest steps to very large steps into the desired direction.
  46833. If necessary the procedure has to be repeated to bring the lense into the desired position. <br><br>
  46834. If the motion should be done with the largest possible increment the following command can be used for simplification:
  46835. <pre>
  46836. set &lt;name&gt; goAbsPTZ up [down|left|right]
  46837. </pre>
  46838. In this case the lense will be moved with largest possible increment into the given absolute position.
  46839. Also in this case the procedure has to be repeated to bring the lense into the desired position if necessary.
  46840. </ul>
  46841. <br><br>
  46842. <ul>
  46843. <li><b> set &lt;name&gt; goPreset &lt;Preset&gt; </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46844. Using this command you can move PTZ-cameras to a predefined position. <br>
  46845. The Preset-positions have to be defined first of all in the Synology Surveillance Station. This usually happens in the PTZ-control of IP-camera setup in SVS.
  46846. The Presets will be read ito FHEM with command "get &lt;name&gt; caminfoall" (happens automatically when FHEM restarts). The import process can be repeated regular by camera polling.
  46847. A long polling interval is recommendable in this case because of the Presets are only will be changed if the user change it in the IP-camera setup itself.
  46848. <br><br>
  46849. Here it is an example of a PTZ-control depended on IR-motiondetector event:
  46850. <pre>
  46851. define CamFL.Preset.Wandschrank notify MelderTER:on.* set CamFL goPreset Wandschrank, ;; define CamFL.Preset.record at +00:00:10 set CamFL on 5 ;;;; define s3 at +*{3}00:00:05 set CamFL snap ;; define CamFL.Preset.back at +00:00:30 set CamFL goPreset Home
  46852. </pre>
  46853. Operating Mode: <br>
  46854. The IR-motiondetector registers a motion. Hereupon the camera "CamFL" moves to Preset-posion "Wandschrank". A recording with the length of 5 seconds starts 10 seconds later.
  46855. Because of the prerecording time of the camera is set to 10 seconds (cf. Reading "CamPreRecTime"), the effectice recording starts when the camera move begins. <br>
  46856. When the recording starts 3 snapshots with an interval of 5 seconds will be taken as well. <br>
  46857. After a time of 30 seconds in position "Wandschrank" the camera moves back to postion "Home". <br><br>
  46858. An extract of the log illustrates the process:
  46859. <pre>
  46860. 2016.02.04 15:02:14 2: CamFL - Camera Flur_Vorderhaus has moved to position "Wandschrank"
  46861. 2016.02.04 15:02:24 2: CamFL - Camera Flur_Vorderhaus Recording with Recordtime 5s started
  46862. 2016.02.04 15:02:29 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
  46863. 2016.02.04 15:02:30 2: CamFL - Camera Flur_Vorderhaus Recording stopped
  46864. 2016.02.04 15:02:34 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
  46865. 2016.02.04 15:02:39 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
  46866. 2016.02.04 15:02:44 2: CamFL - Camera Flur_Vorderhaus has moved to position "Home"
  46867. </pre>
  46868. </ul>
  46869. <br><br>
  46870. <ul>
  46871. <li><b> set &lt;name&gt; homeMode [on|off] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for SVS)</li> <br>
  46872. Switch the HomeMode of the Surveillance Station on or off.
  46873. Further informations about HomeMode you can find in the <a href="https://www.synology.com/en-global/knowledgebase/Surveillance/help/SurveillanceStation/home_mode">Synology Onlinehelp</a>.
  46874. <br><br>
  46875. </ul>
  46876. <ul>
  46877. <li><b> set &lt;name&gt; motdetsc [camera|SVS|disable] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46878. The command "motdetsc" (stands for "motion detection source") switchover the motion detection to the desired mode.
  46879. If motion detection will be done by camera / SVS without any parameters, the original camera motion detection settings are kept.
  46880. The successful execution of that opreration one can retrace by the state in SVS -&gt; IP-camera -&gt; event detection -&gt; motion. <br><br>
  46881. For the motion detection further parameter can be specified. The available options for motion detection by SVS are "sensitivity" and "threshold". <br><br>
  46882. <ul>
  46883. <table>
  46884. <colgroup> <col width=50%> <col width=50%> </colgroup>
  46885. <tr><td>set &lt;name&gt; motdetsc SVS [sensitivity] [threshold] </td><td># command pattern </td></tr>
  46886. <tr><td>set &lt;name&gt; motdetsc SVS 91 30 </td><td># set the sensitivity to 91 and threshold to 30 </td></tr>
  46887. <tr><td>set &lt;name&gt; motdetsc SVS 0 40 </td><td># keep the old value of sensitivity, set threshold to 40 </td></tr>
  46888. <tr><td>set &lt;name&gt; motdetsc SVS 15 </td><td># set the sensitivity to 15, threshold keep unchanged </td></tr>
  46889. </table>
  46890. </ul>
  46891. <br><br>
  46892. If the motion detection is used by camera, there are the options "sensitivity", "object size", "percentage for release" available. <br><br>
  46893. <ul>
  46894. <table>
  46895. <colgroup> <col width=50%> <col width=50%> </colgroup>
  46896. <tr><td>set &lt;name&gt; motdetsc camera [sensitivity] [threshold] [percentage] </td><td># command pattern </td></tr>
  46897. <tr><td>set &lt;name&gt; motdetsc camera 89 0 20 </td><td># set the sensitivity to 89, percentage to 20 </td></tr>
  46898. <tr><td>set &lt;name&gt; motdetsc camera 0 40 10 </td><td># keep old value for sensitivity, set threshold to 40, percentage to 10 </td></tr>
  46899. <tr><td>set &lt;name&gt; motdetsc camera 30 </td><td># set the sensitivity to 30, other values keep unchanged </td></tr>
  46900. </table>
  46901. </ul>
  46902. <br><br>
  46903. Please consider always the sequence of parameters. Unwanted options have to be set to "0" if further options which have to be changed are follow (see example above).
  46904. The numerical values are between 1 - 99 (except special case "0"). <br><br>
  46905. The each available options are dependend of camera type respectively the supported functions by SVS. Only the options can be used they are available in
  46906. SVS -&gt; edit camera -&gt; motion detection. Further informations please read in SVS online help. <br><br>
  46907. With the command "get &lt;name&gt; caminfoall" the <a href="#SSCamreadings">Reading</a> "CamMotDetSc" also will be updated which documents the current setup of motion detection.
  46908. Only the parameters and parameter values supported by SVS at present will be shown. The camera itself may offer further options to adjust. <br><br>
  46909. Example:
  46910. <pre>
  46911. CamMotDetSc SVS, sensitivity: 76, threshold: 55
  46912. </pre>
  46913. </ul>
  46914. <br><br>
  46915. <ul>
  46916. <li><b> set &lt;name&gt; move [ right | up | down | left | dir_X ] [Sekunden] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM up to SVS version 7.1)</li>
  46917. <b> set &lt;name&gt; move [ right | upright | up | upleft | left | downleft | down | downright ] [Sekunden] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM and SVS Version 7.2 and above) <br><br>
  46918. With this command a continuous move of a PTZ-camera will be started. In addition to the four basic directions up/down/left/right is it possible to use angular dimensions
  46919. "dir_X". The grain size of graduation depends on properties of the camera and can be identified by the Reading "CapPTZDirections". <br><br>
  46920. The radian measure of 360 degrees will be devided by the value of "CapPTZDirections" and describes the move drections starting with "0=right" counterclockwise.
  46921. That means, if a camera Reading is "CapPTZDirections = 8" it starts with dir_0 = right, dir_2 = top, dir_4 = left, dir_6 = bottom and respectively dir_1, dir_3, dir_5 and dir_7
  46922. the appropriate directions between. The possible moving directions of cameras with "CapPTZDirections = 32" are correspondingly divided into smaller sections. <br><br>
  46923. In opposite to the "set &lt;name&gt; goAbsPTZ"-command starts "set &lt;name&gt; move" a continuous move until a stop-command will be received.
  46924. The stop-command will be generated after the optional assignable time of [seconds]. If that retention period wouldn't be set by the command, a time of 1 second will be set implicit. <br><br>
  46925. Examples: <br>
  46926. <pre>
  46927. set &lt;name&gt; move up 0.5 : moves PTZ 0,5 Sek. (plus processing time) to the top
  46928. set &lt;name&gt; move dir_1 1.5 : moves PTZ 1,5 Sek. (plus processing time) to top-right
  46929. set &lt;name&gt; move dir_20 0.7 : moves PTZ 1,5 Sek. (plus processing time) to left-bottom ("CapPTZDirections = 32)"
  46930. </pre>
  46931. </ul>
  46932. <br><br>
  46933. <ul>
  46934. <li><b>set &lt;name&gt; [on|off] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46935. The command "set &lt;name&gt; on" starts a recording. The default recording time takes 15 seconds. It can be changed by the <a href="#SSCamattr">attribute</a> "rectime" individualy.
  46936. With the <a href="#SSCamattr">attribute</a> (respectively the default value) provided recording time can be overwritten once by "set &lt;name&gt; on [rectime]".
  46937. The recording will be stopped after processing time "rectime"automatically.<br>
  46938. A special case is the start using "set &lt;name&gt; on 0" respectively the attribute value "rectime = 0". In that case a endless-recording will be started. One have to stop this recording
  46939. by command "set &lt;name&gt; off" explicitely.<br>
  46940. The recording behavior can be impacted with <a href="#SSCamattr">attribute</a> "recextend" furthermore as explained as follows.<br><br>
  46941. <b>Attribute "recextend = 0" or not set (default):</b><br><br>
  46942. <ul>
  46943. <li> if, for example, a recording with rectimeme=22 is started, no other startcommand (for a recording) will be accepted until this started recording is finished.
  46944. A hint will be logged in case of verboselevel = 3. </li>
  46945. </ul>
  46946. <br>
  46947. <b>Attribute "recextend = 1" is set:</b><br><br>
  46948. <ul>
  46949. <li> a before started recording will be extend by the recording time "rectime" if a new start command is received. That means, the timer for the automatic stop-command will be
  46950. renewed to "rectime" given bei the command, attribute or default value. This procedure will be repeated every time a new start command for recording is received.
  46951. Therefore a running recording will be extended until no start command will be get. </li>
  46952. <li> a before started endless-recording will be stopped after recordingtime 2rectime" if a new "set <name> on"-command is received (new set of timer). If it is unwanted make sure you
  46953. don't set the <a href="#SSCamattr">attribute</a> "recextend" in case of endless-recordings. </li>
  46954. </ul>
  46955. <br>
  46956. Examples for simple <b>Start/Stop a Recording</b>: <br><br>
  46957. <table>
  46958. <colgroup> <col width=20%> <col width=80%> </colgroup>
  46959. <tr><td>set &lt;name&gt; on [rectime] </td><td>starts a recording of camera &lt;name&gt;, stops automatically after [rectime] (default 15s or defined by <a href="#SSCamattr">attribute</a>) </td></tr>
  46960. <tr><td>set &lt;name&gt; off </td><td>stops the recording of camera &lt;name&gt;</td></tr>
  46961. </table>
  46962. </ul>
  46963. <br><br>
  46964. <ul>
  46965. <li><b> set &lt;name&gt; optimizeParams [mirror:&lt;value&gt;] [flip:&lt;value&gt;] [rotate:&lt;value&gt;] [ntp:&lt;value&gt;]</b> &nbsp;&nbsp;&nbsp;&nbsp;(gilt für CAM)</li> <br>
  46966. Set one or several properties of the camera. The video can be mirrored (mirror), turned upside down (flip) or
  46967. rotated (rotate). Specified properties must be supported by the camera type. With "ntp" you can set a time server the camera
  46968. use for time synchronization. <br><br>
  46969. &lt;value&gt; can be for: <br>
  46970. <ul>
  46971. <li> <b>mirror, flip, rotate: </b> true | false </li>
  46972. <li> <b>ntp: </b> the name or the IP-address of time server </li>
  46973. </ul>
  46974. <br><br>
  46975. <b>Examples:</b> <br>
  46976. <code> set &lt;name&gt; optimizeParams mirror:true flip:true ntp:time.windows.com </code><br>
  46977. # The video will be mirrored, turned upside down and the time server is set to "time.windows.com".<br>
  46978. <code> set &lt;name&gt; optimizeParams ntp:Surveillance%20Station </code><br>
  46979. # The Surveillance Station is set as time server. (NTP-service has to be activated in DSM) <br>
  46980. <code> set &lt;name&gt; optimizeParams mirror:true flip:false rotate:true </code><br>
  46981. # The video will be mirrored and rotated round 90 degrees. <br>
  46982. <br><br>
  46983. </ul>
  46984. <ul>
  46985. <li><b> set &lt;name&gt; runPatrol &lt;Patrolname&gt; </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46986. This commans starts a predefined patrol (tour) of a PTZ-camera. <br>
  46987. At first the patrol has to be predefined in the Synology Surveillance Station. It can be done in the PTZ-control of IP-Kamera Setup -&gt; PTZ-control -&gt; patrol.
  46988. The patrol tours will be read with command "get &lt;name&gt; caminfoall" which is be executed automatically when FHEM restarts.
  46989. The import process can be repeated regular by camera polling. A long polling interval is recommendable in this case because of the patrols are only will be changed
  46990. if the user change it in the IP-camera setup itself.
  46991. Further informations for creating patrols you can get in the online-help of Surveillance Station.
  46992. </ul>
  46993. <br><br>
  46994. <ul>
  46995. <li><b> set &lt;name&gt; runView [live_fw | live_link | live_open [&lt;room&gt;] | lastrec_fw | lastrec_open [&lt;room&gt;] | lastsnap_fw] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  46996. With "live_fw, live_link, live_open" a livestream (mjpeg-stream) of a camera will be started, either as embedded image
  46997. or as a generated link. <br>
  46998. The option "live_open" starts a new browser window. If the optional &lt;room&gt; was set, the window will only be
  46999. started if the specified room is currently opend in a browser session. <br><br>
  47000. The command <b>"set &lt;name&gt; runView lastsnap_fw"</b> shows the last snapshot of the camera embedded in room- or detailview. <br><br>
  47001. Access to the last recording of a camera can be done using "lastrec_fw" respectively "lastrec_open".
  47002. The recording will be opened in iFrame. So there are some control elements available, e.g. to increase/descrease
  47003. reproduce speed. <br>
  47004. The kind of windows in FHEMWEB can be affected by HTML-tags in <a href="#SSCamattr">attribute</a> "htmlattr".
  47005. <br><br>
  47006. <b>Examples:</b><br>
  47007. <pre>
  47008. attr &lt;name&gt; htmlattr width="500" height="375"
  47009. attr &lt;name&gt; htmlattr width="700",height="525",top="200",left="300"
  47010. </pre>
  47011. The command <b>"set &lt;name&gt; runView live_open"</b> starts the stream immediately in a new browser window (longpoll=1
  47012. must be set for WEB).
  47013. A browser window will be initiated to open for every FHEM session which is active. If you want to change this behavior,
  47014. you can use command <b>"set &lt;name&gt; runView live_open &lt;room&gt;"</b>. It initiates open a browser window in that
  47015. FHEM session which has just opend the room &lt;room&gt;.
  47016. The settings of <a href="#SSCamattr">attribute</a> "livestreamprefix" overwrites the data for protocol, servername and
  47017. port in <a href="#SSCamreadings">reading</a> "LiveStreamUrl".
  47018. By "livestreamprefix" the LivestreamURL (is shown if <a href="#SSCamattr">attribute</a> "showStmInfoFull" is set) can
  47019. be modified and used for distribution and external access to SVS livestream. <br><br>
  47020. <b>Example:</b><br>
  47021. <pre>
  47022. attr &lt;name&gt; livestreamprefix https://&lt;Servername&gt;:&lt;Port&gt;
  47023. </pre>
  47024. The livestream can be stopped again by command <b>"set &lt;name&gt; stopView"</b>.
  47025. </ul>
  47026. <br><br>
  47027. <ul>
  47028. <li><b> set &lt;name&gt; snap </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  47029. A snapshot can be triggered with:
  47030. <pre>
  47031. set &lt;name&gt; snap
  47032. </pre>
  47033. Subsequent some Examples for <b>taking snapshots</b>: <br><br>
  47034. If a serial of snapshots should be released, it can be done using the following notify command.
  47035. For the example a serial of snapshots are to be triggerd if the recording of a camera starts. <br>
  47036. When the recording of camera "CamHE1" starts (Attribut event-on-change-reading -> "Record" has to be set), then 3 snapshots at intervals of 2 seconds are triggered.
  47037. <pre>
  47038. define he1_snap_3 notify CamHE1:Record.*on define h3 at +*{3}00:00:02 set CamHE1 snap
  47039. </pre>
  47040. Release of 2 Snapshots of camera "CamHE1" at intervals of 6 seconds after the motion sensor "MelderHE1" has sent an event, <br>
  47041. can be done e.g. with following notify-command:
  47042. <pre>
  47043. define he1_snap_2 notify MelderHE1:on.* define h2 at +*{2}00:00:06 set CamHE1 snap
  47044. </pre>
  47045. The ID and the filename of the last snapshot will be displayed as value of variable "LastSnapId" respectively "LastSnapFilename" in the device-Readings. <br><br>
  47046. </ul>
  47047. <br><br>
  47048. <ul>
  47049. <li><b> set &lt;name&gt; snapGallery [1-10] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  47050. The command is only available if the attribute "snapGalleryBoost=1" is set. <br>
  47051. It creates an output of the last [x] snapshots as well as "get ... snapGallery". But differing from "get" with
  47052. <a href="#SSCamattr">attribute</a> "snapGalleryBoost=1" no popup will be created. The snapshot gallery will be depicted as
  47053. an browserpage instead. All further functions and attributes are appropriate the <a href="#SSCamget">"get &lt;name&gt; snapGallery"</a>
  47054. command. <br>
  47055. If you want create a snapgallery output by triggering, e.g. with an "at" or "notify", you should use the
  47056. <a href="#SSCamget">"get &lt;name&gt; snapGallery"</a> command instead of "set".
  47057. </ul>
  47058. <br><br>
  47059. </ul>
  47060. <br>
  47061. <a name="SSCamget"></a>
  47062. <b>Get</b>
  47063. <ul>
  47064. <br>
  47065. With SSCam the properties of SVS and defined Cameras could be retrieved. <br>
  47066. The specified get-commands are available for CAM/SVS-devices or only valid for CAM-devices or rather for SVS-Devices.
  47067. They can be selected in the drop-down-menu of the particular device. <br><br>
  47068. <ul>
  47069. <li><b> get &lt;name&gt; caminfoall </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM/SVS)</li>
  47070. <b> get &lt;name&gt; caminfo </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM) <br><br>
  47071. Dependend of the type of camera (e.g. Fix- or PTZ-Camera) the available properties are retrieved and provided as Readings.<br>
  47072. For example the Reading "Availability" will be set to "disconnected" if the camera would be disconnected from Synology
  47073. Surveillance Station and can't be used for further processing like creating events. <br>
  47074. "getcaminfo" retrieves a subset of "getcaminfoall".
  47075. </ul>
  47076. <br><br>
  47077. <ul>
  47078. <li><b> get &lt;name&gt; eventlist </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  47079. The <a href="#SSCamreadings">Reading</a> "CamEventNum" and "CamLastRecord" will be refreshed which containes the total number
  47080. of in SVS registered camera events and the path/name of the last recording.
  47081. This command will be implicit executed when "get &lt;name&gt; caminfoall" is running. <br>
  47082. The <a href="#SSCamattr">attribute</a> "videofolderMap" replaces the content of reading "VideoFolder". You can use it for
  47083. example if you have mounted the videofolder of SVS under another name or path and want to access by your local pc.
  47084. </ul>
  47085. <br><br>
  47086. <ul>
  47087. <li><b> get &lt;name&gt; homeModeState </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for SVS)</li> <br>
  47088. HomeMode-state of the Surveillance Station will be retrieved.
  47089. </ul>
  47090. <br><br>
  47091. <ul>
  47092. <li><b> get &lt;name&gt; listLog [severity:&lt;Loglevel&gt;] [limit:&lt;Number of lines&gt;] [match:&lt;Searchstring&gt;] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for SVS)</li> <br>
  47093. Fetches the Surveillance Station Log from Synology server. Without any further options the whole log will be retrieved. <br>
  47094. You can specify all or any of the following options: <br><br>
  47095. <ul>
  47096. <li> &lt;Loglevel&gt; - Information, Warning or Error. Only datasets having this severity are retrieved (default: all) </li>
  47097. <li> &lt;Number of lines&gt; - the specified number of lines (newest) of the log are retrieved (default: all) </li>
  47098. <li> &lt;Searchstring&gt; - only log entries containing the searchstring are retrieved (Note: no Regex possible, the searchstring will be given into the call to SVS) </li>
  47099. </ul>
  47100. <br>
  47101. <b>Examples</b> <br>
  47102. <ul>
  47103. <code>get &lt;name&gt; listLog severity:Error limit:5 </code> <br>
  47104. Reports the last 5 Log entries with severity "Error" <br>
  47105. <code>get &lt;name&gt; listLog severity:Information match:Carport </code> <br>
  47106. Reports all Log entries with severity "Information" and containing the string "Carport" <br>
  47107. <code>get &lt;name&gt; listLog severity:Warning </code> <br>
  47108. Reports all Log entries with severity "Warning" <br><br>
  47109. </ul>
  47110. If the polling of SVS is activated by setting the <a href="#SSCamattr">attribute</a> "pollcaminfoall", the <a href="#SSCamreadings">reading</a>
  47111. "LastLogEntry" will be created. <br>
  47112. In the protocol-setup of the SVS you can adjust what data you want to log. For further informations please have a look at
  47113. <a href="https://www.synology.com/en-uk/knowledgebase/Surveillance/help/SurveillanceStation/log_advanced">Synology Online-Help</a>.
  47114. </ul>
  47115. <br><br>
  47116. <ul>
  47117. <li><b> get &lt;name&gt; scanVirgin </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM/SVS)</li> <br>
  47118. This command is similar to get caminfoall, informations relating to SVS and the camera will be retrieved.
  47119. In difference to caminfoall in either case a new session ID will be generated (do a new login), the camera ID will be
  47120. new identified and all necessary API-parameters will be new investigated.
  47121. </ul>
  47122. <br><br>
  47123. <ul>
  47124. <li><b> get &lt;name&gt; snapGallery [1-10] </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  47125. A popup with the last [x] snapshots will be created. If the <a href="#SSCamattr">attribute</a> "snapGalleryBoost" is set,
  47126. the last snapshots (default 3) are requested by polling and they will be stored in the FHEM-servers main memory.
  47127. This method is helpful to speed up the output especially in case of full size images, but it can be possible
  47128. that NOT the newest snapshots are be shown if they have not be initialized by the SSCAm-module itself. <br>
  47129. The function can also be triggered, e.g. by an "at" or "notify". In that case the snapshotgallery will be displayed on all
  47130. connected FHEMWEB instances as a popup. <br><br>
  47131. To control this function behavior there are further <a href="#SSCamattr">attributes</a>: <br><br>
  47132. <ul>
  47133. <li>snapGalleryBoost </li>
  47134. <li>snapGalleryColumns </li>
  47135. <li>snapGalleryHtmlAttr </li>
  47136. <li>snapGalleryNumber </li>
  47137. <li>snapGallerySize </li>
  47138. </ul> <br>
  47139. available.
  47140. </ul> <br>
  47141. <ul>
  47142. <b>Note:</b><br>
  47143. Depended from quantity and resolution (quality) of the snapshot images adequate CPU and/or main memory
  47144. ressources are needed.
  47145. </ul>
  47146. <br><br>
  47147. <ul>
  47148. <li><b> get &lt;name&gt; snapfileinfo </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  47149. The filename of the last snapshot will be retrieved. This command will be executed with <b>"get &lt;name&gt; snap"</b>
  47150. automatically.
  47151. </ul>
  47152. <br><br>
  47153. <ul>
  47154. <li><b> get &lt;name&gt; snapinfo </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  47155. Informations about snapshots will be retrieved. Heplful if snapshots are not triggerd by SSCam, but by motion detection of the camera or surveillance
  47156. station instead.
  47157. </ul>
  47158. <br><br>
  47159. <ul>
  47160. <li><b> get &lt;name&gt; stmUrlPath </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM)</li> <br>
  47161. This command is to fetch the streamkey information and streamurl using that streamkey. The reading "StmKey" will be filled when this command will be executed and can be used
  47162. to send it and run by your own application like a browser (see example).
  47163. If the <a href="#SSCamattr">attribute</a> "showStmInfoFull" is set, additional stream readings like "StmKeyUnicst", "StmKeymjpegHttp" will be shown and can be used to run the
  47164. appropriate livestream without session id. Is the attribute "livestreamprefix" (usage: "http(s)://&lt;hostname&gt;&lt;port&gt;) used, the servername / port will be replaced if necessary.
  47165. The strUrlPath function will be included automatically if polling is used.
  47166. <br><br>
  47167. Example to create an http-call to a livestream using StmKey: <br>
  47168. <pre>
  47169. http(s)://&lt;hostname&gt;&lt;port&gt;/webapi/entry.cgi?api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=5&StmKey="31fd87279976d89bb98409728cced890"
  47170. </pre>
  47171. cameraId (Internal CAMID) and StmKey has to be replaced by valid values. <br><br>
  47172. <b>Note:</b> <br>
  47173. If you use the stream-call from external and replace hostname / port with valid values and open your router ip ports, please
  47174. make shure that no unauthorized person could get this sensible data !
  47175. </ul>
  47176. <br><br>
  47177. <ul>
  47178. <li><b> get &lt;name&gt; storedCredentials </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM/SVS)</li> <br>
  47179. Shows the stored login credentials in a popup as plain text.
  47180. </ul>
  47181. <br><br>
  47182. <ul>
  47183. <li><b> get &lt;name&gt; svsinfo </b> &nbsp;&nbsp;&nbsp;&nbsp;(valid for CAM/SVS)</li> <br>
  47184. Determines common informations about the installed SVS-version and other properties. <br>
  47185. </ul>
  47186. <br><br>
  47187. <b>Polling of Camera/SVS-Properties</b><br><br>
  47188. <ul>
  47189. Retrieval of Camera-Properties can be done automatically if the attribute "pollcaminfoall" will be set to a value &gt; 10. <br>
  47190. As default that attribute "pollcaminfoall" isn't be set and the automatic polling isn't be active. <br>
  47191. The value of that attribute determines the interval of property-retrieval in seconds. If that attribute isn't be set or &lt; 10 the automatic polling won't be started <br>
  47192. respectively stopped when the value was set to &gt; 10 before. <br><br>
  47193. The attribute "pollcaminfoall" is monitored by a watchdog-timer. Changes of the attribute-value will be checked every 90 seconds and transact corresponding. <br>
  47194. Changes of the pollingstate and pollinginterval will be reported in FHEM-Logfile. The reporting can be switched off by setting the attribute "pollnologging=1". <br>
  47195. Thereby the needless growing of the logfile can be avoided. But if verbose level is set to 4 or above even though the attribute "pollnologging" is set as well, the polling <br>
  47196. will be actived due to analysis purposes. <br><br>
  47197. If FHEM will be restarted, the first data retrieval will be done within 60 seconds after start. <br><br>
  47198. The state of automatic polling will be displayed by reading "PollState": <br><br>
  47199. <ul>
  47200. <li><b> PollState = Active </b> - automatic polling will be executed with interval correspondig value of attribute "pollcaminfoall" </li>
  47201. <li><b> PollState = Inactive </b> - automatic polling won't be executed </li>
  47202. </ul>
  47203. <br>
  47204. The readings are described <a href="#SSCamreadings">here</a>. <br><br>
  47205. <b>Notes:</b> <br><br>
  47206. If polling is used, the interval should be adjusted only as short as needed due to the detected camera values are predominantly static. <br>
  47207. A feasible guide value for attribute "pollcaminfoall" could be between 600 - 1800 (s). <br>
  47208. Per polling call and camera approximately 10 - 20 Http-calls will are stepped against Surveillance Station. <br>
  47209. Because of that if HTTP-Timeout (pls. refer <a href="#SSCamattr">Attribut</a> "httptimeout") is set to 4 seconds, the theoretical processing time couldn't be higher than 80 seconds. <br>
  47210. Considering a safety margin, in that example you shouldn't set the polling interval lower than 160 seconds. <br><br>
  47211. If several Cameras are defined in SSCam, attribute "pollcaminfoall" of every Cameras shouldn't be set exactly to the same value to avoid processing bottlenecks <br>
  47212. and thereby caused potential source of errors during request Synology Surveillance Station. <br>
  47213. A marginal difference between the polling intervals of the defined cameras, e.g. 1 second, can already be faced as
  47214. sufficient value. <br><br>
  47215. </ul>
  47216. </ul>
  47217. <a name="SSCaminternals"></a>
  47218. <b>Internals</b> <br><br>
  47219. <ul>
  47220. The meaning of used Internals is depicted in following list: <br><br>
  47221. <ul>
  47222. <li><b>CAMID</b> - the ID of camera defined in SVS, the value will be retrieved automatically on the basis of SVS-cameraname </li>
  47223. <li><b>CAMNAME</b> - the name of the camera in SVS </li>
  47224. <li><b>CREDENTIALS</b> - the value is "Set" if Credentials are set </li>
  47225. <li><b>NAME</b> - the cameraname in FHEM </li>
  47226. <li><b>MODEL</b> - distinction between camera device (CAM) and Surveillance Station device (SVS) </li>
  47227. <li><b>OPMODE</b> - the last executed operation of the module </li>
  47228. <li><b>SERVERADDR</b> - IP-Address of SVS Host </li>
  47229. <li><b>SERVERPORT</b> - SVS-Port </li>
  47230. <br><br>
  47231. </ul>
  47232. </ul>
  47233. <a name="SSCamattr"></a>
  47234. <b>Attributes</b>
  47235. <br><br>
  47236. <ul>
  47237. <ul>
  47238. <li><b>debugactivetoken</b><br>
  47239. if set the state of active token will be logged - only for debugging, don't use it in normal operation ! </li><br>
  47240. <li><b>disable</b><br>
  47241. deactivates the module (device definition) </li><br>
  47242. <li><b>httptimeout</b><br>
  47243. Timeout-Value of HTTP-Calls to Synology Surveillance Station, Default: 4 seconds (if httptimeout = "0"
  47244. or not set) </li><br>
  47245. <li><b>htmlattr</b><br>
  47246. additional specifications to inline oictures to manipulate the behavior of stream, e.g. size of the image. </li><br>
  47247. <ul>
  47248. <b>Example:</b><br>
  47249. attr &lt;name&gt; htmlattr width="500" height="325" top="200" left="300"
  47250. </ul>
  47251. <br>
  47252. </li>
  47253. <li><b>livestreamprefix</b><br>
  47254. overwrites the specifications of protocol, servername and port for further use of the livestream address, e.g.
  47255. as an link to external use. It has to be specified as "http(s)://&lt;servername&gt;:&lt;port&gt;" </li><br>
  47256. <li><b>loginRetries</b><br>
  47257. set the amount of login-repetitions in case of failure (default = 1) </li><br>
  47258. <li><b>noQuotesForSID</b><br>
  47259. this attribute may be helpfull in some cases to avoid errormessage "402 - permission denied" and makes login
  47260. possible. </li><br>
  47261. <li><b>pollcaminfoall</b><br>
  47262. Interval of automatic polling the Camera properties (if < 10: no polling, if &gt; 10: polling with interval) </li><br>
  47263. <li><b>pollnologging</b><br>
  47264. "0" resp. not set = Logging device polling active (default), "1" = Logging device polling inactive</li><br>
  47265. <li><b>rectime</b><br>
  47266. determines the recordtime when a recording starts. If rectime = 0 an endless recording will be started. If
  47267. it isn't defined, the default recordtime of 15s is activated </li><br>
  47268. <li><b>recextend</b><br>
  47269. "rectime" of a started recording will be set new. Thereby the recording time of the running recording will be
  47270. extended </li><br>
  47271. <li><b>session</b><br>
  47272. selection of login-Session. Not set or set to "DSM" -&gt; session will be established to DSM (Sdefault).
  47273. "SurveillanceStation" -&gt; session will be established to SVS </li><br>
  47274. <li><b>simu_SVSversion</b><br>
  47275. simulates another SVS version. (only a lower version than the installed one is possible !) </li><br>
  47276. <li><b>snapGalleryBoost</b><br>
  47277. If set, the last snapshots (default 3) will be retrieved by Polling, will be stored in the FHEM-servers main memory
  47278. and can be displayed by the "set/get ... snapGallery" command. <br>
  47279. This mode is helpful if many or full size images shall be displayed.
  47280. If the attribute is set, you can't specify arguments in addition to the "set/get ... snapGallery" command.
  47281. (see also attribut "snapGalleryNumber") </li><br>
  47282. <li><b>snapGalleryColumns</b><br>
  47283. The number of snapshots which shall appear in one row of the gallery popup (default 3). </li><br>
  47284. <li><b>snapGalleryHtmlAttr</b><br>
  47285. the image parameter can be controlled by this attribute. <br>
  47286. If the attribute isn't set, the value of attribute "htmlattr" will be used. <br>
  47287. If "htmlattr" is also not set, default parameters are used instead (width="500" height="325"). <br><br>
  47288. <ul>
  47289. <b>Example:</b><br>
  47290. attr &lt;name&gt; snapGalleryHtmlAttr width="325" height="225"
  47291. </ul>
  47292. <br>
  47293. </li>
  47294. <li><b>snapGalleryNumber</b><br>
  47295. The number of snapshots to retrieve (default 3). </li><br>
  47296. <li><b>snapGallerySize</b><br>
  47297. By this attribute the quality of the snapshot images can be controlled (default "Icon"). <br>
  47298. If mode "Full" is set, the images are retrieved with their original available resolution. That requires more ressources
  47299. and may slow down the display. By setting attribute "snapGalleryBoost=1" the display may accelerated, because in that case
  47300. the images will be retrieved by continuous polling and need only bring to display. </li><br>
  47301. <li><b>showStmInfoFull</b><br>
  47302. additional stream informations like LiveStreamUrl, StmKeyUnicst, StmKeymjpegHttp will be created </li><br>
  47303. <li><b>showPassInLog</b><br>
  47304. if set the used password will be shown in logfile with verbose 4. (default = 0) </li><br>
  47305. <li><b>videofolderMap</b><br>
  47306. replaces the content of reading "VideoFolder", Usage if e.g. folders are mountet with different names than original
  47307. (SVS) </li><br>
  47308. <li><b>verbose</b></li><br>
  47309. <ul>
  47310. Different Verbose-Level are supported.<br>
  47311. Those are in detail:
  47312. <table>
  47313. <colgroup> <col width=5%> <col width=95%> </colgroup>
  47314. <tr><td> 0 </td><td>- Start/Stop-Event will be logged </td></tr>
  47315. <tr><td> 1 </td><td>- Error messages will be logged </td></tr>
  47316. <tr><td> 2 </td><td>- messages according to important events were logged </td></tr>
  47317. <tr><td> 3 </td><td>- sended commands will be logged </td></tr>
  47318. <tr><td> 4 </td><td>- sended and received informations will be logged </td></tr>
  47319. <tr><td> 5 </td><td>- all outputs will be logged for error-analyses. <b>Caution:</b> a lot of data could be written into logfile ! </td></tr>
  47320. </table>
  47321. </ul>
  47322. <br>
  47323. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  47324. </ul>
  47325. </ul>
  47326. <br><br>
  47327. <a name="SSCamreadings"></a>
  47328. <b>Readings</b>
  47329. <ul>
  47330. <br>
  47331. Using the polling mechanism or retrieval by "get"-call readings are provieded, The meaning of the readings are listed in subsequent table: <br>
  47332. The transfered Readings can be deversified dependend on the type of camera.<br><br>
  47333. <ul>
  47334. <table>
  47335. <colgroup> <col width=5%> <col width=95%> </colgroup>
  47336. <tr><td><li>Availability</li> </td><td>- Availability of Camera (disabled, enabled, disconnected, other) </td></tr>
  47337. <tr><td><li>CamEventNum</li> </td><td>- delivers the total number of in SVS registered events of the camera </td></tr>
  47338. <tr><td><li>CamExposureControl</li> </td><td>- indicating type of exposure control </td></tr>
  47339. <tr><td><li>CamExposureMode</li> </td><td>- current exposure mode (Day, Night, Auto, Schedule, Unknown) </td></tr>
  47340. <tr><td><li>CamForceEnableMulticast</li> </td><td>- Is the camera forced to enable multicast. </td></tr>
  47341. <tr><td><li>CamIP</li> </td><td>- IP-Address of Camera </td></tr>
  47342. <tr><td><li>CamLastRec</li> </td><td>- Path / name of the last recording </td></tr>
  47343. <tr><td><li>CamLastRecTime</li> </td><td>- date / starttime / endtime of the last recording </td></tr>
  47344. <tr><td><li>CamLiveMode</li> </td><td>- Source of Live-View (DS, Camera) </td></tr>
  47345. <tr><td><li>CamModel</li> </td><td>- Model of camera </td></tr>
  47346. <tr><td><li>CamMotDetSc</li> </td><td>- state of motion detection source (disabled, by camera, by SVS) and their parameter </td></tr>
  47347. <tr><td><li>CamNTPServer</li> </td><td>- set time server </td></tr>
  47348. <tr><td><li>CamPort</li> </td><td>- IP-Port of Camera </td></tr>
  47349. <tr><td><li>CamPreRecTime</li> </td><td>- Duration of Pre-Recording (in seconds) adjusted in SVS </td></tr>
  47350. <tr><td><li>CamRecShare</li> </td><td>- shared folder on disk station for recordings </td></tr>
  47351. <tr><td><li>CamRecVolume</li> </td><td>- Volume on disk station for recordings </td></tr>
  47352. <tr><td><li>CamVendor</li> </td><td>- Identifier of camera producer </td></tr>
  47353. <tr><td><li>CamVideoFlip</li> </td><td>- Is the video flip </td></tr>
  47354. <tr><td><li>CamVideoMirror</li> </td><td>- Is the video mirror </td></tr>
  47355. <tr><td><li>CamVideoRotate</li> </td><td>- Is the video rotate </td></tr>
  47356. <tr><td><li>CapAudioOut</li> </td><td>- Capability to Audio Out over Surveillance Station (false/true) </td></tr>
  47357. <tr><td><li>CapChangeSpeed</li> </td><td>- Capability to various motion speed </td></tr>
  47358. <tr><td><li>CapPTZAbs</li> </td><td>- Capability to perform absolute PTZ action </td></tr>
  47359. <tr><td><li>CapPTZAutoFocus</li> </td><td>- Capability to perform auto focus action </td></tr>
  47360. <tr><td><li>CapPTZDirections</li> </td><td>- the PTZ directions that camera support </td></tr>
  47361. <tr><td><li>CapPTZFocus</li> </td><td>- mode of support for focus action </td></tr>
  47362. <tr><td><li>CapPTZHome</li> </td><td>- Capability to perform home action </td></tr>
  47363. <tr><td><li>CapPTZIris</li> </td><td>- mode of support for iris action </td></tr>
  47364. <tr><td><li>CapPTZPan</li> </td><td>- Capability to perform pan action </td></tr>
  47365. <tr><td><li>CapPTZTilt</li> </td><td>- mode of support for tilt action </td></tr>
  47366. <tr><td><li>CapPTZZoom</li> </td><td>- Capability to perform zoom action </td></tr>
  47367. <tr><td><li>DeviceType</li> </td><td>- device type (Camera, Video_Server, PTZ, Fisheye) </td></tr>
  47368. <tr><td><li>Error</li> </td><td>- message text of last error </td></tr>
  47369. <tr><td><li>Errorcode</li> </td><td>- error code of last error </td></tr>
  47370. <tr><td><li>HomeModeState</li> </td><td>- HomeMode-state (SVS-version 8.1.0 and above) </td></tr>
  47371. <tr><td><li>LastLogEntry</li> </td><td>- the neweset entry of Surveillance Station Log (only if SVS-device and if attribute pollcaminfoall is set) </td></tr>
  47372. <tr><td><li>LastSnapFilename</li> </td><td>- the filename of the last snapshot </td></tr>
  47373. <tr><td><li>LastSnapId</li> </td><td>- the ID of the last snapshot </td></tr>
  47374. <tr><td><li>LastSnapTime</li> </td><td>- timestamp of the last snapshot </td></tr>
  47375. <tr><td><li>LastUpdateTime</li> </td><td>- date / time the last update of readings by "caminfoall" </td></tr>
  47376. <tr><td><li>LiveStreamUrl </li> </td><td>- the livestream URL if stream is started (is shown if <a href="#SSCamattr">attribute</a> "showStmInfoFull" is set) </td></tr>
  47377. <tr><td><li>Patrols</li> </td><td>- in Synology Surveillance Station predefined patrols (at PTZ-Cameras) </td></tr>
  47378. <tr><td><li>PollState</li> </td><td>- shows the state of automatic polling </td></tr>
  47379. <tr><td><li>Presets</li> </td><td>- in Synology Surveillance Station predefined Presets (at PTZ-Cameras) </td></tr>
  47380. <tr><td><li>Record</li> </td><td>- if recording is running = Start, if no recording is running = Stop </td></tr>
  47381. <tr><td><li>StmKey</li> </td><td>- current streamkey. it can be used to open livestreams without session id </td></tr>
  47382. <tr><td><li>StmKeyUnicst</li> </td><td>- Uni-cast stream path of the camera. (<a href="#SSCamattr">attribute</a> "showStmInfoFull" has to be set) </td></tr>
  47383. <tr><td><li>StmKeymjpegHttp</li> </td><td>- Mjpeg stream path(over http) of the camera (<a href="#SSCamattr">attribute</a> "showStmInfoFull" has to be set) </td></tr>
  47384. <tr><td><li>SVScustomPortHttp</li> </td><td>- Customized port of Surveillance Station (HTTP) (to get with "svsinfo") </td></tr>
  47385. <tr><td><li>SVScustomPortHttps</li> </td><td>- Customized port of Surveillance Station (HTTPS) (to get with "svsinfo") </td></tr>
  47386. <tr><td><li>SVSlicenseNumber</li> </td><td>- The total number of installed licenses (to get with "svsinfo") </td></tr>
  47387. <tr><td><li>SVSuserPriv</li> </td><td>- The effective rights of the user used for log in (to get with "svsinfo") </td></tr>
  47388. <tr><td><li>SVSversion</li> </td><td>- package version of the installed Surveillance Station (to get with "svsinfo") </td></tr>
  47389. <tr><td><li>UsedSpaceMB</li> </td><td>- used disk space of recordings by Camera </td></tr>
  47390. <tr><td><li>VideoFolder</li> </td><td>- Path to the recorded video </td></tr>
  47391. </table>
  47392. </ul>
  47393. <br><br>
  47394. </ul>
  47395. </ul>
  47396. <a name="STACKABLE"></a>
  47397. <h3>STACKABLE</h3>
  47398. <ul>
  47399. This module is a more generic version of the STACKABLE_CC module, and is used
  47400. for stacked IO devices like the Busware SCC. It works by adding/removing a
  47401. prefix (default is *) to the command, and redirecting the output to the
  47402. module, which is using it.
  47403. <a name="STACKABLEdefine"></a>
  47404. <b>Define</b>
  47405. <ul>
  47406. <code>define &lt;name&gt; STACKABLE &lt;baseDevice&gt;</code> <br>
  47407. <br>
  47408. &lt;baseDevice&gt; is the name of the unterlying device.<br>
  47409. Example:
  47410. <ul><code>
  47411. define CUL_1 CUL /dev/ttyAMA0@38400<br>
  47412. attr CUL_1 rfmode SlowRF<br><br>
  47413. define CUL_1_SCC STACKABLE CUL1<br>
  47414. define CUL_2 CUL FHEM:DEVIO:CUL_1_SCC:9600 0000<br>
  47415. attr CUL_2 rfmode HomeMatic<br><br>
  47416. define CUL_2_SCC STACKABLE CUL2<br>
  47417. define CUL_3 ZWCUL FHEM:DEVIO:CUL_2_SCC:9600 12345678 01<br>
  47418. </code></ul>
  47419. <b>Note:</b>If you rename the base CUL or a STACKABLE, which is a base for
  47420. another one, the definition of the next one has to be adjusted, and FHEM
  47421. has to be restarted.
  47422. </ul>
  47423. <a name="STACKABLEset"></a>
  47424. <b>Set</b> <ul>N/A</ul><br>
  47425. <a name="STACKABLEget"></a>
  47426. <b>Get</b> <ul>N/A</ul><br>
  47427. <a name="STACKABLEattr"></a>
  47428. <b>Attributes</b>
  47429. <ul>
  47430. <li><a name="#writePrefix">writePrefix</a><br>
  47431. The prefix used when writing data, default is *.
  47432. "readPrefix" is hardcoded to *.
  47433. </li><br>
  47434. <li><a name="#binary">binary</a><br>
  47435. If set to true, read data is converted to binary from hex before offering
  47436. it to the client IO device (e.g. TCM). Default is 0 (off).
  47437. </li><br>
  47438. </ul>
  47439. </ul>
  47440. <a name="STACKABLE_CC"></a>
  47441. <h3>STACKABLE_CC</h3>
  47442. <ul>
  47443. This module handles the stackable CC1101 devices for the Raspberry PI from
  47444. busware.de. You can attach a lot of CUL-Type devices to a single RPi this way.
  47445. The first device is defined as a CUL, the rest of them as STACKABLE_CC.
  47446. <br><br>
  47447. <a name="STACKABLE_CCdefine"></a>
  47448. <b>Define</b>
  47449. <ul>
  47450. <code>define &lt;name&gt; STACKABLE_CC &lt;Base-Device-Name&gt;</code> <br>
  47451. <br>
  47452. &lt;Base-Device-Name&gt; is the name of the device, which this device is
  47453. attached on, the first one has to be defined as a CUL device<br>
  47454. Example:
  47455. <ul><code>
  47456. define SCC0 CUL /dev/ttyAMA0@38400<br>
  47457. attr SCC0 rfmode SlowRF<br>
  47458. define SCC1 STACKABLE_CC SCC0<br>
  47459. attr SCC1 rfmode HomeMatic<br>
  47460. define SCC2 STACKABLE_CC SCC1<br>
  47461. attr SCC2 rfmode Max<br>
  47462. </code></ul>
  47463. <b>Important:</b>
  47464. <ul>
  47465. <li>The rfmode has to be specified explicitely (valid for the STACKABLE_CC
  47466. types only, not for the first, which is defined as a CUL).</li>
  47467. <li>In case of SlowRF, the FHTID has to be specified explicitely with the
  47468. command "set SCCX raw T01HHHH". Again, this is valid for the STACKABLE_CC
  47469. types only.</li>
  47470. <li>If you rename the base CUL or a STACKABLE_CC, which is a base for
  47471. another one, the define of the next one has to be adjusted, and FHEM has to be
  47472. restarted.</li>
  47473. </ul>
  47474. </ul>
  47475. <a name="STACKABLE_CCset"></a>
  47476. <b>Set</b> <ul>Same as for the <a href="#CULset">CUL</a>.</ul><br>
  47477. <a name="STACKABLE_CCget"></a>
  47478. <b>Get</b> <ul>Same as for the <a href="#CULget">CUL</a>.</ul><br>
  47479. <a name="STACKABLE_CCattr"></a>
  47480. <b>Attributes</b>
  47481. <ul>
  47482. <li><a href="#IODev">IODev</a></li><br>
  47483. <li><a href="#ignore">ignore</a></li><br>
  47484. The rest of the attributes is the same as for the <a href="#CULattr">CUL</a>.
  47485. </ul>
  47486. </ul>
  47487. <a name="STOCKQUOTES"></a>
  47488. <h3>STOCKQUOTES</h3>
  47489. (en | <a href="commandref_DE.html#STOCKQUOTES">de</a>)
  47490. <ul>
  47491. <a name="STOCKQUOTES"></a>
  47492. Fetching actual stock quotes from various sources<br>
  47493. <b>Preliminary</b><br>
  47494. Perl module Finance::Quote must be installed:<br>
  47495. <code>cpan install Finance::Quote</code> or <code>sudo apt-get install libfinance-quote-perl</code><br><br>
  47496. <b>Define</b>
  47497. <ul>
  47498. <code>define Depot STOCKQUOTES</code><br><br>
  47499. </ul>
  47500. <a name="STOCKQUOTESset"></a>
  47501. <b>Set</b>
  47502. <ul>
  47503. &lt;Symbol&gt; depends on source. May also an WKN.<br><br>
  47504. <li><code>set &lt;name&gt; buy &lt;Symbol&gt; &lt;Amount&gt; &lt;Value of amount&gt;</code><br>
  47505. Add a stock exchange security. If stock exchange security already exists, new values will be added to old values.<br><br>
  47506. </li>
  47507. <li><code>set &lt;name&gt; sell &lt;Symbol&gt; &lt;Amount&gt; &lt;Value of amount&gt;</code><br>
  47508. Remove a stock exchange security (or an part of it).<br><br>
  47509. </li>
  47510. <li><code>set &lt;name&gt; add &lt;Symbol&gt;</code><br>
  47511. Watch only<br><br>
  47512. </li>
  47513. <li><code>set &lt;name&gt; remove &lt;Symbol&gt;</code><br>
  47514. Remove watched stock exchange security.<br><br>
  47515. </li>
  47516. <li><code>set &lt;name&gt; clearReadings</code><br>
  47517. Clears all readings.<br><br>
  47518. </li>
  47519. <li><code>set &lt;name&gt; update</code><br>
  47520. Refresh all readings.<br><br>
  47521. </li>
  47522. </ul>
  47523. <a name="STOCKQUOTESget"></a>
  47524. <b>Get</b>
  47525. <ul>
  47526. <li><code>get &lt;name&gt; sources</code><br>
  47527. Lists all avaiable data sources.<br><br>
  47528. </li>
  47529. <li><code>get &lt;name&gt; currency &lt;Symbol&gt;</code><br>
  47530. Get currency of stock exchange securities<br><br>
  47531. </li>
  47532. </ul>
  47533. <a name="STOCKQUOTESattr"></a>
  47534. <b>Attributes</b>
  47535. <ul>
  47536. <li>currency<br>
  47537. All stock exchange securities will shown in this currency.<br>
  47538. Default: EUR<br><br>
  47539. </li>
  47540. <li>defaultSource<br>
  47541. Default source for stock exchange securities values.<br>
  47542. Default: europe, valid values: from <code>get &lt;name&gt; sources</code><br><br>
  47543. </li>
  47544. <li>queryTimeout<br>
  47545. Fetching timeout in seconds.<br>
  47546. Standard: 120, valid values: Number<br><br>
  47547. </li>
  47548. <li>pollInterval<br>
  47549. Refresh interval in seconds.<br>
  47550. Standard: 300, valid values: Number<br><br>
  47551. </li>
  47552. <li>sources<br>
  47553. An individual data source can be set for every single stock exchange securities.<br>
  47554. Data sources can be fetched with: <code>get &lt;name&gt; sources</code>.<br>
  47555. Format: &lt;Symbol&gt;:&lt;Source&gt;[,&lt;Symbol&gt;:&lt;Source&gt;...]<br>
  47556. Example: <code>A0M16S:vwd,532669:unionfunds,849104:unionfunds</code><br>
  47557. Stock exchange securities not listed in sources will be updated from defaultSource.<br><br>
  47558. </li>
  47559. <li>stocks<br>
  47560. Will be created/modified via buy/sell/add/remove<br>
  47561. Contains stock exchange securities informations in format: &lt;Symbol&gt;:&lt;Anzahl&gt;:&lt;Einstandswert&gt;[,&lt;Symbol&gt;:&lt;Anzahl&gt;:&lt;Einstandswert&gt;...]<br><br>
  47562. </li>
  47563. </ul><br>
  47564. </ul>
  47565. <a name="STV"></a>
  47566. <h3>STV</h3>
  47567. <ul><p>
  47568. This module supports Samsung TV devices.<br>
  47569. LEXXBXX (B Series) use port 52235 <br>
  47570. LEXXCXX (C|D Series) use port 55000 <br>
  47571. </p>
  47572. <b>Define</b><br>
  47573. <code>define &lt;name&gt; STV &lt;host&gt;]</code><br>
  47574. <p>
  47575. Example:<br>
  47576. define Television1 STV 192.168.178.20 <br> or
  47577. define Television2 STV 192.168.178.20 52235 <br>
  47578. define Television2 STV 192.168.178.20 55000 <br>
  47579. </p>
  47580. <b>Set</b><br>
  47581. set &lt;name&gt; &lt;value&gt; &lt;nummber&gt;<br>where value is one of:<br><br>
  47582. <ul>
  47583. <li><code>mute</code> </li>
  47584. <li><code>volume </code> </li>
  47585. <li><code>call</code> </li>
  47586. <li><code>sms </code> </li>
  47587. <li><code>date </code> </li>
  47588. </ul>
  47589. <br>Example:<br>
  47590. set &lt;name&gt; mute <br>
  47591. set &lt;name&gt; volume 20 <br>
  47592. set &lt;name&gt; call Peter 012345678 Phone 87654321 <br><br>
  47593. <b>Get</b><br>
  47594. <ul>N/A</ul><br>
  47595. </ul>
  47596. <a name="SUNRISE_EL"></a>
  47597. <h3>SUNRISE_EL</h3>
  47598. <ul>
  47599. This module is used to define the functions<pre>
  47600. sunrise, sunset,
  47601. sunrise_rel, sunset_rel
  47602. sunrise_abs, sunset_abs
  47603. isday</pre>
  47604. perl functions, to be used in <a href="#at">at</a> or FS20 on-till commands.
  47605. <br>
  47606. First you should set the longitude and latitude global attributes to the
  47607. exact longitude and latitude values (see e.g. maps.google.com for the exact
  47608. values, which should be in the form of a floating point value). The default
  47609. value is Frankfurt am Main, Germany.
  47610. <br><br>
  47611. The default altitude ($defaultaltit in SUNRISE_EL.pm) defines the
  47612. sunrise/sunset for Civil twilight (i.e. one can no longer read outside
  47613. without artificial illumination), which differs from sunrise/sunset times
  47614. found on different websites. See perldoc "DateTime::Event::Sunrise" for
  47615. alternatives. <br><br>
  47616. sunrise()/sunset() returns the absolute time of the next sunrise/sunset,
  47617. adding 24 hours if the next event is tomorrow, to use it in the timespec of
  47618. an at device or for the on-till command for FS20 devices.<br>
  47619. sunrise_rel()/sunset_rel() returns the relative time to the next
  47620. sunrise/sunset. <br>
  47621. sunrise_abs()/sunset_abs() return the absolute time of the corresponding
  47622. event today (no 24 hours added).<br>
  47623. sunrise_abs_dat()/sunset_abs_dat() return the absolute time of the
  47624. corresponding event to a given date(no 24 hours added).<br>
  47625. All functions take up to three arguments:<br>
  47626. <ul>
  47627. <li>The first specifies an offset (in seconds), which will be added to the
  47628. event.</li>
  47629. <li>The second and third specify min and max values (format: "HH:MM").</li>
  47630. </ul>
  47631. <br>
  47632. isday() can be used in some notify or at commands to check if the sun is up
  47633. or down. isday() ignores the seconds parameter, but respects min and max.
  47634. If min < max, than the day starts not before min, and ends not after max.
  47635. If min > max, than the day starts not after max, and ends not before min.
  47636. <br><br>
  47637. Optionally, for all functions you can set first argument which defines a
  47638. horizon value which then is used instead of the $defaultaltit in
  47639. SUNRISE_EL.pm.<br> Possible values are: "REAL", "CIVIL", "NAUTIC",
  47640. "ASTRONOMIC" or a positive or negative number preceded by "HORIZON="<br> REAL
  47641. is 0, CIVIL is -6, NATUIC is -12, ASTRONOMIC is -18 degrees above
  47642. horizon.<br><br>
  47643. Examples:<br>
  47644. <ul>
  47645. <PRE>
  47646. # When sun is 6 degrees below horizon - same as sunrise();
  47647. sunrise("CIVIL");
  47648. # When sun is 3 degrees below horizon (between real and civil sunset)
  47649. sunset("HORIZON=-3");
  47650. # When sun is 1 degree above horizon
  47651. sunset("HORIZON=1");
  47652. # Switch lamp1 on at real sunset, not before 18:00 and not after 21:00
  47653. define a15 at *{sunset("REAL",0,"18:00","21:00")} set lamp1 on
  47654. </PRE>
  47655. </ul>
  47656. The functions sunrise_abs_dat()/sunset_abs_dat() need as a very first
  47657. parameter the date(format epoch: time()) for which the events should be
  47658. calculated.
  47659. <br><br>
  47660. Examples:
  47661. <br>
  47662. <ul>
  47663. <PRE>
  47664. # to calculate the sunrise of today + 7 days
  47665. my $date = time() + 7*86400;
  47666. sunrise_abs_dat($date);
  47667. # to calculate the sunrise of today + 7 days 6 degrees below horizon
  47668. my $date = time() + 7*86400;
  47669. sunrise_abs_dat($date, "CIVIL");
  47670. </ul>
  47671. </PRE>
  47672. <b>Define</b> <ul>N/A</ul><br>
  47673. <b>Set</b> <ul>N/A</ul><br>
  47674. <b>Get</b> <ul>N/A</ul><br>
  47675. <b>Attributes</b><br>
  47676. <ul>
  47677. <a name="latitude"></a>
  47678. <li>latitude<br>
  47679. If set, this latitude is used to calculate sunset/sunrise<br>
  47680. Notation need to be in decimal format (for example Berlin = 52.666)
  47681. As default Frankfurt/Main, Germany (50.112) is used.
  47682. </li><br>
  47683. <a name="longitude"></a>
  47684. <li>longitude<br>
  47685. If set, this longitude is used to calculate sunset/sunrise<br>
  47686. Notation need to be in decimal format (for example Berlin = 13.400)
  47687. As default Frankfurt/Main, Germany (8.686) is used.
  47688. </li><br>
  47689. <a name="altitude"></a>
  47690. <li>altitude<br>
  47691. Used by other modules.
  47692. </li><br>
  47693. Note: these are global attributes, e.g.<br>
  47694. <ul>
  47695. attr global latitude 50.112<br>
  47696. attr global longitude 8.686<br>
  47697. </ul>
  47698. </ul><br>
  47699. </ul>
  47700. <a name="SVG"></a>
  47701. <h3>SVG</h3>
  47702. <ul>
  47703. <a name="SVGlinkdefine"></a>
  47704. <b>Define</b>
  47705. <ul>
  47706. <code>define &lt;name&gt; SVG
  47707. &lt;logDevice&gt;:&lt;gplotfile&gt;:&lt;logfile&gt;</code>
  47708. <br><br>
  47709. This is the Plotting/Charting device of FHEMWEB
  47710. Examples:
  47711. <ul>
  47712. <code>define MyPlot SVG inlog:temp4hum4:CURRENT</code><br>
  47713. </ul>
  47714. <br>
  47715. Notes:
  47716. <ul>
  47717. <li>Normally you won't define an SVG device manually, as
  47718. FHEMWEB makes it easy for you, just plot a logfile (see <a
  47719. href="#logtype">logtype</a>) and click on "Create SVG instance".
  47720. Specifying CURRENT as a logfilename will always access the current
  47721. logfile, even if its name changes regularly.</li>
  47722. <li>For historic reasons this module uses a Gnuplot file description
  47723. to store different attributes. Some special commands (beginning with
  47724. #FileLog or #DbLog) are used additionally, and not all gnuplot
  47725. attribtues are implemented.</li>
  47726. </ul>
  47727. </ul>
  47728. <a name="SVGset"></a>
  47729. <b>Set</b>
  47730. <ul>
  47731. <li>copyGplotFile<br>
  47732. Copy the currently specified gplot file to a new file, which is named
  47733. after the SVG device, existing files will be overwritten.
  47734. This operation is needed in order to use the plot editor (see below)
  47735. without affecting other SVG instances using the same gplot file.
  47736. Creating the SVG instance from the FileLog detail menu will also
  47737. create a unique gplot file, in this case this operation is not needed.
  47738. </li>
  47739. </ul><br>
  47740. <a name="SVGget"></a>
  47741. <b>Get</b> <ul>N/A</ul><br>
  47742. <a name="SVGattr"></a>
  47743. <b>Attributes</b>
  47744. <ul>
  47745. <li><a href="#endPlotNow">endPlotNow</a></li><br>
  47746. <li><a href="#endPlotToday">endPlotToday</a></li><br>
  47747. <a name="captionLeft"></a>
  47748. <li>captionLeft<br>
  47749. Show the legend on the left side (deprecated, will be autoconverted to
  47750. captionPos)
  47751. </li><br>
  47752. <a name="captionPos"></a>
  47753. <li>captionPos<br>
  47754. right - Show the legend on the right side (default)<br>
  47755. left - Show the legend on the left side<br>
  47756. auto - Show the legend labels on the left or on the right side depending
  47757. on the axis it belongs to<br>
  47758. </li><br>
  47759. <a name="fixedrange"></a>
  47760. <li>fixedrange [offset]<br>
  47761. Contains two time specs in the form YYYY-MM-DD separated by a space.
  47762. In plotmode gnuplot-scroll(-svg) or SVG the given time-range will be
  47763. used, and no scrolling for this SVG will be possible. Needed e.g. for
  47764. looking at last-years data without scrolling.<br><br> If the value is
  47765. one of hour, day, &lt;N&gt;days, week, month, year than set the zoom
  47766. level for this SVG independently of the user specified zoom-level. This
  47767. is useful for pages with multiple plots: one of the plots is best
  47768. viewed in with the default (day) zoom, the other one with a week
  47769. zoom.<br>
  47770. If given, the optional integer parameter offset refers to a different
  47771. period (e.g. last year: fixedrange year -1, 2 days ago: fixedrange day
  47772. -2).
  47773. </li><br>
  47774. <a name="fixedoffset"></a>
  47775. <li>fixedoffset &lt;nDays&gt;<br>
  47776. Set an fixed offset (in days) for the plot.
  47777. </li><br>
  47778. <a name="label"></a>
  47779. <li>label<br>
  47780. Double-Colon separated list of values. The values will be used to replace
  47781. &lt;L#&gt; type of strings in the .gplot file, with # beginning at 1
  47782. (&lt;L1&gt;, &lt;L2&gt;, etc.). Each value will be evaluated as a perl
  47783. expression, so you have access e.g. to the Value functions.<br><br>
  47784. If the plotmode is gnuplot-scroll(-svg) or SVG, you can also use the min,
  47785. max, mindate, maxdate, avg, cnt, sum, firstval, firstdate, currval (last
  47786. value) and currdate (last date) values of the individual curves, by
  47787. accessing the corresponding values from the data hash, see the example
  47788. below:<br>
  47789. <ul>
  47790. <li>Fixed text for the right and left axis:<br>
  47791. <ul>
  47792. <li>Fhem config:<br>
  47793. attr wl_1 label "Temperature"::"Humidity"</li>
  47794. <li>.gplot file entry:<br>
  47795. set ylabel &lt;L1&gt;<br>
  47796. set y2label &lt;L2&gt;</li>
  47797. </ul></li>
  47798. <li>Title with maximum and current values of the 1st curve (FileLog)
  47799. <ul>
  47800. <li>Fhem config:<br>
  47801. attr wl_1 label "Max $data{max1}, Current $data{currval1}"</li>
  47802. <li>.gplot file entry:<br>
  47803. set title &lt;L1&gt;<br></li>
  47804. </ul></li>
  47805. </ul>
  47806. The value minAll and maxAll (representing the minimum/maximum over all
  47807. values) is also available from the data hash.
  47808. <br>Deprecated, see plotReplace.
  47809. </li><br>
  47810. <li><a href="#nrAxis">nrAxis</a></li><br>
  47811. <a name="plotfunction"></a>
  47812. <li>plotfunction<br>
  47813. Space value separated list of values. The value will be used to replace
  47814. &lt;SPEC#&gt; type of strings in the .gplot file, with # beginning at 1
  47815. (&lt;SPEC1&gt;, &lt;SPEC2&gt;, etc.) in the #FileLog or #DbLog directive.
  47816. With this attribute you can use the same .gplot file for multiple devices
  47817. with the same logdevice.
  47818. <ul><b>Example:</b><br>
  47819. <li>#FileLog <SPEC1><br>
  47820. with: attr <SVGdevice> plotfunction "4:IR\x3a:0:"<br>
  47821. instead of<br>
  47822. #FileLog 4:IR\x3a:0:
  47823. </li>
  47824. <li>#DbLog <SPEC1><br>
  47825. with: attr <SVGdevice> plotfunction
  47826. "Garage_Raumtemp:temperature::"<br> instead of<br>
  47827. #DbLog Garage_Raumtemp:temperature::
  47828. </li>
  47829. </ul>
  47830. Deprecated, see plotReplace.
  47831. </li><br>
  47832. <li><a href="#plotmode">plotmode</a></li><br>
  47833. <a name="plotReplace"></a>
  47834. <li>plotReplace<br>
  47835. space separated list of key=value pairs. value may contain spaces if
  47836. enclosed in "" or {}. value will be evaluated as a perl expression, if it
  47837. is enclosed in {}.
  47838. <br>
  47839. In the .gplot file &lt;key&gt; is replaced with the corresponding value,
  47840. the evaluation of {} takes place <i>after</i> the input file is
  47841. processed, so $data{min1} etc can be used.
  47842. <br>
  47843. %key% will be repaced <i>before</i> the input file is processed, this
  47844. expression can be used to replace parameters for the input processing.
  47845. </li><br>
  47846. <li><a href="#plotsize">plotsize</a></li><br>
  47847. <li><a href="#plotWeekStartDay">plotWeekStartDay</a></li><br>
  47848. <a name="startDate"></a>
  47849. <li>startDate<br>
  47850. Set the start date for the plot. Used for demo installations.
  47851. </li><br>
  47852. <a name="title"></a>
  47853. <li>title<br>
  47854. A special form of label (see above), which replaces the string &lt;TL&gt;
  47855. in the .gplot file. It defaults to the filename of the logfile.
  47856. <br>Deprecated, see plotReplace.
  47857. </li><br>
  47858. </ul>
  47859. <br>
  47860. <a name="plotEditor"></a>
  47861. <b>Plot-Editor</b>
  47862. <br>
  47863. This editor is visible on the detail screen of the SVG instance.
  47864. Most features are obvious here, up to some exceptions:
  47865. <ul>
  47866. <li>if you want to omit the title for a Diagram label, enter notitle in the
  47867. input field.</li>
  47868. <li>if you want to specify a fixed value (not taken from a column) if a
  47869. string found (e.g. 1 if the FS20 switch is on and 0 if it is off), then
  47870. you have to specify the Tics first, and write the .gplot file, before you
  47871. can select this value from the dropdown.<br>
  47872. Example:
  47873. <ul>
  47874. Enter in the Tics field: ("On" 1, "Off" 0)<br>
  47875. Write .gplot file<br>
  47876. Select "1" from the column dropdown (note the double quote!) for the
  47877. regexp switch.on, and "0" for the regexp switch.off.<br>
  47878. Write .gplot file again<br>
  47879. </ul></li>
  47880. <li>If the range is of the form {...}, then it will be evaluated with perl.
  47881. The result is a string, and must have the form [min:max]
  47882. </li>
  47883. </ul>
  47884. The visibility of the ploteditor can be configured with the FHEMWEB attribute
  47885. <a href="#ploteditor">ploteditor</a>.
  47886. <br>
  47887. </ul>
  47888. <a name="SWAP"></a>
  47889. <h3>SWAP</h3>
  47890. <ul>
  47891. The SWAP protocoll is used by panStamps (<a href="http://www.panstamp.com">panstamp.com</a>).<br><br>
  47892. This is a generic module that will handle all SWAP devices with known device description files via
  47893. a <a href="#panStamp">panStick</a> as the IODevice.<br><br>
  47894. All communication is done on the SWAP register level. FHEM readings are created for all user registers
  47895. and userReadings are created to map low level SWAP registers to 'human readable' format with the
  47896. mapping from the device descriprion files.<br><br>
  47897. For higher level features like "on,off,on-for-timer,..." specialized modules have to be used.<br><br>
  47898. Messages for devices in power-down-state are queued and send when the device enters SYNC state.
  47899. This typicaly happens during device startup after a reset.
  47900. <br><br>
  47901. Notes:
  47902. <ul>
  47903. <li> This module requires XML::Simple.</li>
  47904. <li>Devices with the default address FF will be changed to the first free address in the range F0-FE.</li>
  47905. <li>For power-down devices the default transmit interval of FFFF will be changed to 0384 (900 seconds).</li>
  47906. </ul>
  47907. <br>
  47908. <br>
  47909. <a name="SWAPDefine"></a>
  47910. <b>Define</b>
  47911. <ul>
  47912. <code>define &lt;name&gt; SWAP &lt;ID&gt;</code> <br>
  47913. <br>
  47914. The ID is a 2 digit hex number to identify the moth in the panStamp network.
  47915. </ul>
  47916. <br>
  47917. <a name="SWAP_Set"></a>
  47918. <b>Set</b>
  47919. <ul>
  47920. <li>regGet &lt;reg&gt;<br>
  47921. request status message for register id &lt;reg&gt;.
  47922. for system registers the register name can be used instead if the two digit register id in hex.
  47923. </li><br>
  47924. <li>regSet &lt;reg&gt; &lt;data&gt;<br>
  47925. write &lt;data&gt; to register id &lt;reg&gt;.
  47926. for system registers the register name can be used instead if the twi digit register id in hex.
  47927. </li><br>
  47928. <li>regSet &lt;reg&gt;.&lt;ep&gt &lt;data&gt;<br>
  47929. write &lt;data&gt; to endpoint &lt;ep&gt of register &lt;reg&gt;. will not work if no reading for register &lt;reg&gt; is available as all nibbles that are not part of endpoint &lt;ep&gt will be filled from this reading.
  47930. </li><br>
  47931. <li>statusRequest<br>
  47932. request transmision of all registers.
  47933. </li><br>
  47934. <li>readDeviceXML<br>
  47935. reload the device description xml file.
  47936. </li><br>
  47937. <li>clearUnconfirmed<br>
  47938. clears the list of unconfirmed messages.
  47939. </li><br>
  47940. <li>flash [&lt;productCode&gt|&lt;firmwareFile&gt;]<br>
  47941. will initiate an ota firmware update. only possible for panStamp NRG devices.<br>
  47942. no params -> will use the <code>SWAP_&lt;current productCode&gt;.hex</code> file from the FHEM/firmware directory.<br>
  47943. &lt;productCode&gt -> will use the <code>SWAP_&lt;productCode&gt;.hex</code> file from the FHEM/firmware directory.<br>
  47944. &lt;firmwareFile&gt; -> will use &lt;firmwareFile&gt; as the absolute file name of the hex file.<br>
  47945. </li><br>
  47946. </ul>
  47947. <a name="SWAP_Get"></a>
  47948. <b>Get</b>
  47949. <ul>
  47950. <li>regList<br>
  47951. list all non-system registers of this device.
  47952. </li><br>
  47953. <li>regListAll<br>
  47954. list all registers of this device.
  47955. </li><br>
  47956. <li>listUnconfirmed<br>
  47957. list all unconfirmed messages.
  47958. </li><br>
  47959. <li>products<br>
  47960. dumps all known devices.
  47961. </li><br>
  47962. <li>deviceXML<br>
  47963. dumps the device xml data.
  47964. </li><br>
  47965. </ul>
  47966. <a name="SWAP_Attr"></a>
  47967. <b>Attributes</b>
  47968. <ul>
  47969. <li>createUnknownReadings<br>
  47970. Create readings for unknown registers, i.e. registers not defined in the device xml file.
  47971. </li><br>
  47972. <li>ProductCode<br>
  47973. ProductCode of the device. used to read the register configuration from the device definition file.
  47974. hast to be set manualy for devices that are in sleep mode during definition.
  47975. </li><br>
  47976. </ul>
  47977. <br>
  47978. </ul>
  47979. <a name="SWAP_0000002200000003"></a>
  47980. <h3>SWAP_0000002200000003</h3>
  47981. <ul>
  47982. Module for the justme version of the panstamp rgb driver board with ir (sketch product code 0000002200000003).
  47983. <br><br>
  47984. to learn an ir command the simplest way ist to use 'learnIR #'. the on board led will start to blink indicating ir learning mode. after an ir command is received the blinking will switch to slow and the boards waits for a fhem command (on/off/...) and will link the ir command to the fhem command.
  47985. <br><br>
  47986. received ir commands that will not trigger one of the 16 possible learned commands will be send as SWAP register 0C to fhem and can be used in notifys.
  47987. <br><br>
  47988. SWAP register 0E will configure the power on state of the board: off, configured color, last color before power down.
  47989. <br><br>
  47990. <a name="SWAP_0000002200000003_Define"></a>
  47991. <b>Define</b>
  47992. <ul>
  47993. <code>define &lt;name&gt; SWAP_0000002200000003 &lt;ID&gt; 0000002200000003</code> <br>
  47994. <br>
  47995. </ul>
  47996. <br>
  47997. <a name="SWAP_0000002200000003_Set"></a>
  47998. <b>Set </b>
  47999. all SWAP set commands and:
  48000. <ul>
  48001. <li>on<br>
  48002. </li>
  48003. <li>on-for-timer &lt;time&gt;<br>
  48004. </li>
  48005. <li>off<br>
  48006. </li>
  48007. <li>toggle<br>
  48008. </li><br>
  48009. <li>rgb &lt;RRGGBB&gt;<br>
  48010. set the led color
  48011. </li><br>
  48012. <li>dimUP<br>
  48013. </li>
  48014. <li>dimDown<br>
  48015. </li><br>
  48016. <li>setIR # &lt;code&gt;<br>
  48017. </li>
  48018. <li>learnIR #<br>
  48019. </li>
  48020. <li>storeIR # &lt;code&gt; &lt;command&gt;<br>
  48021. </li><br>
  48022. <li>getIR # | all<br>
  48023. read content of IR regisgter # or all IR registers
  48024. </li><br>
  48025. <li>setFade &lt;RRGGBB&gt; &lt;time&gt;<br>
  48026. stores color and time in fede register #
  48027. </li><br>
  48028. <li>startFade &lt;#1&gt; &lt;#2&gt;<br>
  48029. starts an endless fading loop over all fading registers [#1..#2]
  48030. </li><br>
  48031. <li>getFade # | all<br>
  48032. read content of fade regisgter # or all fade regisgters
  48033. </li><br>
  48034. <li><a href="#setExtensions"> set extensions</a> are supported.</li>
  48035. </ul><br>
  48036. <a name="SWAP_0000002200000003_Get"></a>
  48037. <b>Get</b>
  48038. all SWAP get commands and:
  48039. <ul>
  48040. <li>rgb<br>
  48041. returns the current led color
  48042. </li><br>
  48043. <li>listIR<br>
  48044. list all IR registers of this device. use getIR first.
  48045. </li><br>
  48046. <li>listFade<br>
  48047. list all fade registers. use getFade first.
  48048. </li><br>
  48049. </ul><br>
  48050. <a name="SWAP_0000002200000003_Attr"></a>
  48051. <b>Attributes</b>
  48052. <ul>
  48053. <li>color-icon<br>
  48054. 1 -> use lamp color as icon color and 100% shape as icon shape<br>
  48055. 2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
  48056. <li>ProductCode<br>
  48057. must be 0000002200000003</li><br>
  48058. </ul><br>
  48059. </ul>
  48060. <a name="SWAP_0000002200000008"></a>
  48061. <h3>SWAP_0000002200000008</h3>
  48062. <ul>
  48063. Module for the justme version of the panstamp indoor multi sensor board (sketch product code 0000002200000008).
  48064. <br><br>
  48065. <a name="SWAP_0000002200000008_Define"></a>
  48066. <b>Define</b>
  48067. <ul>
  48068. <code>define &lt;name&gt; SWAP_0000002200000008 &lt;ID&gt; 0000002200000008</code> <br>
  48069. <br>
  48070. </ul>
  48071. <br>
  48072. <a name="SWAP_0000002200000008_Set"></a>
  48073. <b>Set </b>
  48074. all SWAP set commands and:
  48075. <ul>
  48076. <li>desired &lt;value&gt;<br>
  48077. sets the desired temperature to &lt;value&gt;</li>
  48078. <li>text &lt;text&gt;<br>
  48079. displays text</li>
  48080. </ul><br>
  48081. <a name="SWAP_0000002200000008_Get"></a>
  48082. <b>Get</b>
  48083. all SWAP get commands and:
  48084. <ul>
  48085. </ul><br>
  48086. <a name="SWAP_0000002200000008_Attr"></a>
  48087. <b>Attributes</b>
  48088. <ul>
  48089. <li>ProductCode<br>
  48090. must be 0000002200000008</li><br>
  48091. </ul><br>
  48092. </ul>
  48093. <!-- ================================ -->
  48094. <a name="SYSMON"></a>
  48095. <h3>SYSMON</h3>
  48096. (en | <a href="commandref_DE.html#SYSMON">de</a>)
  48097. <ul>
  48098. This module provides statistics about the system running FHEM server. Furthermore, remote systems can be accessed (Telnet). Only Linux-based systems are supported.
  48099. Some informations are hardware specific and are not available on every platform.
  48100. So far, this module has been tested on the following systems:
  48101. Raspberry Pi (Debian Wheezy), BeagleBone Black, FritzBox 7390, WR703N under OpenWrt, CubieTruck and some others.
  48102. <br><br>
  48103. For more information on a FritzBox check other moduls: <a href="#FRITZBOX">FRITZBOX</a> and <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>.
  48104. <br>
  48105. <i>The modul uses the Perl modul 'Net::Telnet' for remote access. Please make sure that this module is installed.</i>
  48106. <br><br>
  48107. <b>Define</b>
  48108. <br><br>
  48109. <code>define &lt;name&gt; SYSMON [MODE[:[USER@]HOST][:PORT]] [&lt;M1&gt;[ &lt;M2&gt;[ &lt;M3&gt;[ &lt;M4&gt;]]]]</code><br>
  48110. <br>
  48111. This statement creates a new SYSMON instance. The parameters M1 to M4 define the refresh interval for various Readings (statistics). The parameters are to be understood as multipliers for the time defined by INTERVAL_BASE. Because this time is fixed at 60 seconds, the Mx-parameter can be considered as time intervals in minutes.<br>
  48112. If one (or more) of the multiplier is set to zero, the corresponding readings is deactivated.
  48113. <br>
  48114. <br>
  48115. The parameters are responsible for updating the readings according to the following scheme:
  48116. <ul>
  48117. <li>M1: (Default: 1)<br>
  48118. cpu_freq, cpu_temp, cpu_temp_avg, loadavg, stat_cpu, stat_cpu_diff, stat_cpu_percent, stat_cpu_text, power readings<br><br>
  48119. </li>
  48120. <li>M2: (Default: M1)<br>
  48121. ram, swap<br>
  48122. </li>
  48123. <li>M3: (Default: M1)<br>
  48124. eth0, eth0_diff, wlan0, wlan0_diff<br><br>
  48125. </li>
  48126. <li>M4: (Default: 10*M1)<br>
  48127. Filesystem informations<br><br>
  48128. </li>
  48129. <li>The following parameters are always updated with the base interval (regardless of the Mx-parameter):<br>
  48130. fhemuptime, fhemuptime_text, idletime, idletime_text, uptime, uptime_text, starttime, starttime_text<br><br>
  48131. </li>
  48132. </ul>
  48133. To query a remote system at least the address (HOST) must be specified. Accompanied by the port and / or user name, if necessary. The password (if needed) has to be defined once with the command 'set password &lt;password&gt;'. For MODE parameter are 'telnet', 'ssh' and 'local' only allowed. 'local' does not require any other parameters and can also be omitted.
  48134. <br>
  48135. For SSH login with password, 'sshpass' must be installed (note: not recommended! Use public key authentication instead).
  48136. For SSH login to work, a manual SSH connection to the remote machine from the FHEM-Acount may need to be done once
  48137. (under whose rights FHEM runs) the fingerprint must be confirmed.
  48138. <br>
  48139. <br>
  48140. <b>Readings:</b>
  48141. <br><br>
  48142. <ul>
  48143. <li>cpu_core_count<br>
  48144. CPU core count
  48145. </li>
  48146. <li>cpu_model_name<br>
  48147. CPU model name
  48148. </li>
  48149. <li>cpu_bogomips<br>
  48150. CPU Speed: BogoMIPS
  48151. </li>
  48152. <li>cpu_freq (and cpu1_freq for dual core systems)<br>
  48153. CPU frequency
  48154. </li>
  48155. <br>
  48156. <li>cpu_temp<br>
  48157. CPU temperature
  48158. </li>
  48159. <br>
  48160. <li>cpu_temp_avg<br>
  48161. Average of the CPU temperature, formed over the last 4 values.
  48162. </li>
  48163. <br>
  48164. <li>fhemuptime<br>
  48165. Time (in seconds) since the start of FHEM server.
  48166. </li>
  48167. <br>
  48168. <li>fhemuptime_text<br>
  48169. Time since the start of the FHEM server: human-readable output (text representation).
  48170. </li>
  48171. <br>
  48172. <li>fhemstarttime<br>
  48173. Start time (in seconds since 1.1.1970 1:00:00) of FHEM server.
  48174. </li>
  48175. <br>
  48176. <li>fhemstarttime_text<br>
  48177. Start time of the FHEM server: human-readable output (text representation).
  48178. </li>
  48179. <br>
  48180. <li>idletime<br>
  48181. Time spent by the system since the start in the idle mode (period of inactivity).
  48182. </li>
  48183. <br>
  48184. <li>idletime_text<br>
  48185. The inactivity time of the system since system start in human readable form.
  48186. </li>
  48187. <br>
  48188. <li>loadavg<br>
  48189. System load (load average): 1 minute, 5 minutes and 15 minutes.
  48190. </li>
  48191. <br>
  48192. <li>ram<br>
  48193. memory usage.
  48194. </li>
  48195. <br>
  48196. <li>swap<br>
  48197. swap usage.
  48198. </li>
  48199. <br>
  48200. <li>uptime<br>
  48201. System uptime.
  48202. </li>
  48203. <br>
  48204. <li>uptime_text<br>
  48205. System uptime (human readable).
  48206. </li>
  48207. <br>
  48208. <li>starttime<br>
  48209. System starttime.
  48210. </li>
  48211. <br>
  48212. <li>starttime_text<br>
  48213. System starttime (human readable).
  48214. </li>
  48215. <br>
  48216. <li>Network statistics<br>
  48217. Statistics for the specified network interface about the data volumes transferred and the difference since the previous measurement.
  48218. <br>
  48219. Examples:<br>
  48220. Amount of the transmitted data via interface eth0.<br>
  48221. <code>eth0: RX: 940.58 MB, TX: 736.19 MB, Total: 1676.77 MB</code><br>
  48222. Change of the amount of the transferred data in relation to the previous call (for eth0).<br>
  48223. <code>eth0_diff: RX: 0.66 MB, TX: 0.06 MB, Total: 0.72 MB</code><br>
  48224. IP and IP v6 adresses
  48225. <code>eth0_ip 192.168.0.15</code><br>
  48226. <code>eth0_ip6 fe85::49:4ff:fe85:f885/64</code><br>
  48227. </li>
  48228. <br>
  48229. <li>Network Speed (if avialable)<br>
  48230. speed of the network connection.
  48231. <br>
  48232. Examples:<br>
  48233. <code>eth0_speed 100</code><br>
  48234. </li>
  48235. <br>
  48236. <li>File system information<br>
  48237. Usage of the desired file systems.<br>
  48238. Example:<br>
  48239. <code>fs_root: Total: 7340 MB, Used: 3573 MB, 52 %, Available: 3425 MB at /</code>
  48240. </li>
  48241. <br>
  48242. <li>CPU utilization<br>
  48243. Information about the utilization of CPUs.<br>
  48244. Example:<br>
  48245. <code>stat_cpu: 10145283 0 2187286 90586051 542691 69393 400342</code><br>
  48246. <code>stat_cpu_diff: 2151 0 1239 2522 10 3 761</code><br>
  48247. <code>stat_cpu_percent: 4.82 0.00 1.81 93.11 0.05 0.00 0.20</code><br>
  48248. <code>stat_cpu_text: user: 32.17 %, nice: 0.00 %, sys: 18.53 %, idle: 37.72 %, io: 0.15 %, irq: 0.04 %, sirq: 11.38 %</code>
  48249. </li>
  48250. <br>
  48251. <li>user defined<br>
  48252. These readings provide output of commands, which are passed to the operating system or delivered by user defined functions.
  48253. </li>
  48254. <br>
  48255. <b>FritzBox specific Readings</b>
  48256. <li>wlan_state<br>
  48257. WLAN state: on/off
  48258. </li>
  48259. <br>
  48260. <li>wlan_guest_state<br>
  48261. GuestWLAN state: on/off
  48262. </li>
  48263. <br>
  48264. <li>internet_ip<br>
  48265. current IP-Adresse
  48266. </li>
  48267. <br>
  48268. <li>internet_state<br>
  48269. state of the Internet connection: connected/disconnected
  48270. </li>
  48271. <br>
  48272. <li>night_time_ctrl<br>
  48273. state night time control (do not disturb): on/off
  48274. </li>
  48275. <br>
  48276. <li>num_new_messages<br>
  48277. Number of new Voice Mail messages
  48278. </li>
  48279. <br>
  48280. <li>fw_version_info<br>
  48281. Information on the installed firmware version: &lt;VersionNum&gt; &lt;creation date&gt; &lt;time&gt;
  48282. </li>
  48283. <br>
  48284. <b>DSL Informations (FritzBox)</b>
  48285. <li>dsl_rate<br>
  48286. Information about the down und up stream rate
  48287. </li>
  48288. <br>
  48289. <li>dsl_synctime<br>
  48290. sync time with DSLAM
  48291. </li>
  48292. <br>
  48293. <li>dsl_crc_15<br>
  48294. number of uncorrectable errors (CRC) for the last 15 minutes
  48295. </li>
  48296. <br>
  48297. <li>dsl_fec_15<br>
  48298. number of correctable errors (FEC) for the last 15 minutes
  48299. </li>
  48300. <br>
  48301. <b>Power Supply Readings</b>
  48302. <li>power_ac_stat<br>
  48303. status information to the AC socket: online (0|1), present (0|1), voltage, current<br>
  48304. Example:<br>
  48305. <code>power_ac_stat: 1 1 4.807 264</code><br>
  48306. </li>
  48307. <br>
  48308. <li>power_ac_text<br>
  48309. human readable status information to the AC socket<br>
  48310. Example:<br>
  48311. <code>power_ac_text ac: present / online, voltage: 4.807 V, current: 264 mA</code><br>
  48312. </li>
  48313. <br>
  48314. <li>power_usb_stat<br>
  48315. status information to the USB socket
  48316. </li>
  48317. <br>
  48318. <li>power_usb_text<br>
  48319. human readable status information to the USB socket
  48320. </li>
  48321. <br>
  48322. <li>power_battery_stat<br>
  48323. status information to the battery (if installed): online (0|1), present (0|1), voltage, current, actual capacity<br>
  48324. Example:<br>
  48325. <code>power_battery_stat: 1 1 4.807 264 100</code><br>
  48326. </li>
  48327. <br>
  48328. <li>power_battery_text<br>
  48329. human readable status information to the battery (if installed)
  48330. </li>
  48331. <br>
  48332. <li>power_battery_info<br>
  48333. human readable additional information to the battery (if installed): technology, capacity, status, health, total capacity<br>
  48334. Example:<br>
  48335. <code>power_battery_info: battery info: Li-Ion , capacity: 100 %, status: Full , health: Good , total capacity: 2100 mAh</code><br>
  48336. The capacity must be defined in script.bin (e.g. ct-hdmi.bin). Parameter name pmu_battery_cap. Convert with bin2fex (bin2fex -> script.fex -> edit -> fex2bin -> script.bin).<br>
  48337. </li>
  48338. <br>
  48339. <li>cpuX_freq_stat<br>
  48340. Frequency statistics for CPU X: minimum, maximum and average values<br>
  48341. Example:<br>
  48342. <code>cpu0_freq_stat: 100 1000 900</code><br>
  48343. </li>
  48344. <br>
  48345. <li>cpuX_idle_stat<br>
  48346. Idle statistik for CPU X: minimum, maximum and average values<br>
  48347. Example:<br>
  48348. <code>cpu0_freq_stat: 23.76 94.74 90.75</code><br>
  48349. </li>
  48350. <br>
  48351. <li>cpu[X]_temp_stat<br>
  48352. Temperature statistik for CPU: minimum, maximum and average values<br>
  48353. Example:<br>
  48354. <code>cpu_temp_stat: 41.00 42.50 42.00</code><br>
  48355. </li>
  48356. <br>
  48357. <li>ram_used_stat<br>
  48358. RAM usage statistics: minimum, maximum and average values<br>
  48359. Example:<br>
  48360. <code>ram_used_stat: 267.55 1267.75 855.00</code><br>
  48361. </li>
  48362. <br>
  48363. <li>swap_used_stat<br>
  48364. SWAP usage statistics: minimum, maximum and average values<br>
  48365. Example:<br>
  48366. <code>swap_used_stat: 0 1024.00 250.00</code><br>
  48367. </li>
  48368. <br>
  48369. <br>
  48370. </ul>
  48371. <br>
  48372. <b>Get:</b><br><br>
  48373. <ul>
  48374. <li>interval_base<br>
  48375. Lists the specified polling intervalls.
  48376. </li>
  48377. <br>
  48378. <li>interval_multipliers<br>
  48379. Displays update intervals.
  48380. </li>
  48381. <br>
  48382. <li>list<br>
  48383. Lists all readings.
  48384. </li>
  48385. <br>
  48386. <li>update<br>
  48387. Refreshs all readings.
  48388. </li>
  48389. <br>
  48390. <li>version<br>
  48391. Displays the version of SYSMON module.
  48392. </li>
  48393. <br>
  48394. <li>list_lan_devices<br>
  48395. Displays known LAN Devices (FritzBox only).
  48396. </li>
  48397. <br>
  48398. </ul>
  48399. <br>
  48400. <b>Set:</b><br><br>
  48401. <ul>
  48402. <li>interval_multipliers<br>
  48403. Defines update intervals (as in the definition of the device).
  48404. </li>
  48405. <br>
  48406. <li>clean<br>
  48407. Clears user-definable Readings. After an update (manual or automatic) new readings are generated.<br>
  48408. </li>
  48409. <br>
  48410. <li>clear &lt;reading name&gt;<br>
  48411. Deletes the Reading entry with the given name. After an update this entry is possibly re-created (if defined). This mechanism allows the selective deleting unnecessary custom entries.<br>
  48412. </li>
  48413. <br>
  48414. <li>password &lt;Passwort&gt;<br>
  48415. Specify the password for remote access (usually only necessary once).
  48416. </li>
  48417. <br>
  48418. </ul>
  48419. <br>
  48420. <b>Attributes:</b><br><br>
  48421. <ul>
  48422. <li>filesystems &lt;reading name&gt;[:&lt;mountpoint&gt;[:&lt;comment&gt;]],...<br>
  48423. Specifies the file system to be monitored (a comma-separated list). <br>
  48424. Reading-name is used in the display and logging, the mount point is the basis of the evaluation, comment is relevant to the HTML display (see SYSMON_ShowValuesHTML)<br>
  48425. Examples: <br>
  48426. <code>/boot,/,/media/usb1</code><br>
  48427. <code>fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick</code><br>
  48428. </li>
  48429. <br>
  48430. <li>network-interfaces &lt;name&gt;[:&lt;interface&gt;[:&lt;comment&gt;]],...<br>
  48431. Comma-separated list of network interfaces that are to be monitored. Each entry consists of the Reading-name, the name of the Netwerk adapter and a comment for the HTML output (see SYSMON_ShowValuesHTML). If no colon is used, the value is used simultaneously as a Reading-name and interface name.<br>
  48432. Example <code>ethernet:eth0:Ethernet,wlan:wlan0:WiFi</code><br>
  48433. </li>
  48434. <br>
  48435. <li>user-defined &lt;readingsName&gt;:&lt;Interval_Minutes&gt;:&lt;Comment&gt;:&lt;Cmd&gt;,...<br>
  48436. This comma-separated list defines user defined Readings with the following data: Reading name, refresh interval (in minutes), a Comment, and operating system command.
  48437. <br>The os commands are executed according to the specified Intervals and are noted as Readings with the specified name. Comments are used for the HTML output (see SYSMON_ShowValuesHTML)..
  48438. <br>All parameter parts are required!
  48439. <br>It is important that the specified commands are executed quickly, because at this time the entire FHEM server is blocked!<br>
  48440. If results of the long-running operations required, these should be set up as a CRON job and store results as a text file.<br><br>
  48441. Example: Display of package updates for the operating system:<br>
  48442. cron-Job:<br>
  48443. <code> sudo apt-get update 2>/dev/null >/dev/null</code>
  48444. <code> apt-get upgrade --dry-run| perl -ne '/(\d*)\s[upgraded|aktualisiert]\D*(\d*)\D*install|^ \S+.*/ and print "$1 aktualisierte, $2 neue Pakete"' 2>/dev/null &gt; /opt/fhem/data/updatestatus.txt</code>
  48445. <br>
  48446. <code>uder-defined</code> attribute<br><code>sys_updates:1440:System Aktualisierungen:cat /opt/fhem/data/updatestatus.txt</code><br>
  48447. the number of available updates is daily recorded as 'sys_updates'.
  48448. </li>
  48449. <br>
  48450. <li>user-fn &lt;fn_name&gt;:&lt;interval_minutes&gt;:&lt;reading_name1&gt;:&lt;reading_name2&gt;...[:&lt;reading_nameX&gt;], ...<br>
  48451. List of perl user subroutines.<br>
  48452. As &lt;fn_name&gt; can be used either the name of a Perl subroutine or a Perl expression.
  48453. The perl function gets the device hash as parameter and must provide an array of values.
  48454. These values are taken according to the parameter &lt;reading_nameX&gt; in Readings.<br>
  48455. A Perl expression must be enclosed in curly braces and can use the following parameters: $ HASH (device hash) and $ NAME (device name).
  48456. Return is expected analogous to a Perl subroutine.<br>
  48457. Important! The separation between multiple user functions must be done with a comma AND a space! Within the function definition commas may not be followed by spaces.
  48458. </li>
  48459. <br>
  48460. <li>disable<br>
  48461. Possible values: 0 and 1. '1' means that the update is stopped.
  48462. </li>
  48463. <br>
  48464. <li>telnet-prompt-regx, telnet-login-prompt-regx<br>
  48465. RegExp to detect login and command line prompt. (Only for access via Telnet.)
  48466. </li>
  48467. <br>
  48468. <li>exclude<br>
  48469. Allows to suppress reading certain information. <br>
  48470. supported values: user-defined (s. user-defined und user-fn), cpucount, uptime, fhemuptime,
  48471. loadavg, cputemp, cpufreq, cpuinfo, diskstat, cpustat, ramswap, filesystem, network,
  48472. fbwlan, fbnightctrl, fbnewmessages, fbdecttemp, fbversion, fbdsl, powerinfo
  48473. </li>
  48474. <br>
  48475. </ul>
  48476. <br>
  48477. <b>Plots:</b><br><br>
  48478. <ul>
  48479. predefined gplot files:<br>
  48480. <ul>
  48481. FileLog versions:<br>
  48482. <code>
  48483. SM_RAM.gplot<br>
  48484. SM_CPUTemp.gplot<br>
  48485. SM_FS_root.gplot<br>
  48486. SM_FS_usb1.gplot<br>
  48487. SM_Load.gplot<br>
  48488. SM_Network_eth0.gplot<br>
  48489. SM_Network_eth0t.gplot<br>
  48490. SM_Network_wlan0.gplot<br>
  48491. SM_CPUStat.gplot<br>
  48492. SM_CPUStatSum.gplot<br>
  48493. SM_CPUStatTotal.gplot<br>
  48494. SM_power_ac.gplot<br>
  48495. SM_power_usb.gplot<br>
  48496. SM_power_battery.gplot<br>
  48497. </code>
  48498. DbLog versions:<br>
  48499. <code>
  48500. SM_DB_all.gplot<br>
  48501. SM_DB_CPUFreq.gplot<br>
  48502. SM_DB_CPUTemp.gplot<br>
  48503. SM_DB_Load.gplot<br>
  48504. SM_DB_Network_eth0.gplot<br>
  48505. SM_DB_RAM.gplot<br>
  48506. </code>
  48507. </ul>
  48508. </ul>
  48509. <br>
  48510. <b>HTML output method (see Weblink): SYSMON_ShowValuesHTML(&lt;SYSMON-Instance&gt;[,&lt;Liste&gt;])</b><br><br>
  48511. <ul>
  48512. The module provides a function that returns selected Readings as HTML.<br>
  48513. As a parameter the name of the defined SYSMON device is expected.<br>
  48514. It can also Reading Group, Clone dummy or other modules be used. Their readings are simple used for display. <br>
  48515. The second parameter is optional and specifies a list of readings to be displayed in the format <code>&lt;ReadingName&gt;[:&lt;Comment&gt;[:&lt;Postfix&gt;[:&lt;FormatString&gt;]]]</code>.<br>
  48516. <code>ReadingName</code> is the Name of desired Reading, <code>Comment</code> is used as the display name and postfix is displayed after the value (such as units or as MHz can be displayed).
  48517. If FormatString is specified, the output is formatted with sprintf (s. sprintf in Perl documentation).<br>
  48518. If no <code>Comment</code> is specified, an internally predefined description is used.<br>
  48519. If no list specified, a predefined selection is used (all values are displayed).<br><br>
  48520. <code>define sysv1 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon')}</code><br>
  48521. <code>define sysv2 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon', ('date:Datum', 'cpu_temp:CPU Temperatur: &deg;C:%.1f'', 'cpu_freq:CPU Frequenz: MHz'))}</code>
  48522. </ul>
  48523. <br>
  48524. <b>Text output method (see Weblink): SYSMON_ShowValuesHTMLTitled(&lt;SYSMON-Instance&gt;[,&lt;Title&gt;,&lt;Liste&gt;])</b><br><br>
  48525. <ul>
  48526. According to SYSMON_ShowValuesHTML, but with a Title text above. If no title provided, device alias will be used (if any)<br>
  48527. </ul>
  48528. <br>
  48529. <b>Text output method (see Weblink): SYSMON_ShowValuesText(&lt;SYSMON-Instance&gt;[,&lt;Liste&gt;])</b><br><br>
  48530. <ul>
  48531. According to SYSMON_ShowValuesHTML, but formatted as plain text.<br>
  48532. </ul>
  48533. <br>
  48534. <b>Text output method (see Weblink): SYSMON_ShowValuesTextTitled(&lt;SYSMON-Instance&gt;[,&lt;Title&gt;,&lt;Liste&gt;])</b><br><br>
  48535. <ul>
  48536. According to SYSMON_ShowValuesHTMLTitled, but formatted as plain text.<br>
  48537. </ul>
  48538. <br>
  48539. <b>Reading values with perl: SYSMON_getValues(&lt;name&gt;[, &lt;array of desired keys&gt;])</b><br><br>
  48540. <ul>
  48541. Returns a hash ref with desired values. If no array is passed, all values are returned.<br>
  48542. {(SYSMON_getValues("sysmon"))->{'cpu_temp'}}<br>
  48543. {(SYSMON_getValues("sysmon",("cpu_freq","cpu_temp")))->{"cpu_temp"}}<br>
  48544. {join(" ", values (SYSMON_getValues("sysmon")))}<br>
  48545. {join(" ", values (SYSMON_getValues("sysmon",("cpu_freq","cpu_temp"))))}<br>
  48546. </ul>
  48547. <br>
  48548. <b>Examples:</b><br><br>
  48549. <ul>
  48550. <code>
  48551. # Modul-Definition<br>
  48552. define sysmon SYSMON 1 1 1 10<br>
  48553. #attr sysmon event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,^~ /.*usb.*,~ /$<br>
  48554. attr sysmon event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,fs_.*,stat_cpu_percent<br>
  48555. attr sysmon filesystems fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick<br>
  48556. attr sysmon network-interfaces eth0:eth0:Ethernet,wlan0:wlan0:WiFi<br>
  48557. attr sysmon group RPi<br>
  48558. attr sysmon room 9.03_Tech<br>
  48559. <br>
  48560. # Log<br>
  48561. define FileLog_sysmon FileLog ./log/sysmon-%Y-%m.log sysmon<br>
  48562. attr FileLog_sysmon group RPi<br>
  48563. attr FileLog_sysmon logtype SM_CPUTemp:Plot,text<br>
  48564. attr FileLog_sysmon room 9.03_Tech<br>
  48565. <br>
  48566. # Visualisierung: CPU-Temperatur<br>
  48567. define wl_sysmon_temp SVG FileLog_sysmon:SM_CPUTemp:CURRENT<br>
  48568. attr wl_sysmon_temp group RPi<br>
  48569. attr wl_sysmon_temp label "CPU Temperatur: Min $data{min2}, Max $data{max2}, Last $data{currval2}"<br>
  48570. attr wl_sysmon_temp room 9.03_Tech<br>
  48571. <br>
  48572. # Visualisierung: Netzwerk-Daten&uuml;bertragung f&uuml;r eth0<br>
  48573. define wl_sysmon_eth0 SVG FileLog_sysmon:SM_Network_eth0:CURRENT<br>
  48574. attr wl_sysmon_eth0 group RPi<br>
  48575. attr wl_sysmon_eth0 label "Netzwerk-Traffic eth0: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
  48576. attr wl_sysmon_eth0 room 9.03_Tech<br>
  48577. <br>
  48578. # Visualisierung: Netzwerk-Daten&uuml;bertragung f&uuml;r wlan0<br>
  48579. define wl_sysmon_wlan0 SVG FileLog_sysmon:SM_Network_wlan0:CURRENT<br>
  48580. attr wl_sysmon_wlan0 group RPi<br>
  48581. attr wl_sysmon_wlan0 label "Netzwerk-Traffic wlan0: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
  48582. attr wl_sysmon_wlan0 room 9.03_Tech<br>
  48583. <br>
  48584. # Visualisierung: CPU-Auslastung (load average)<br>
  48585. define wl_sysmon_load SVG FileLog_sysmon:SM_Load:CURRENT<br>
  48586. attr wl_sysmon_load group RPi<br>
  48587. attr wl_sysmon_load label "Load Min: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
  48588. attr wl_sysmon_load room 9.03_Tech<br>
  48589. <br>
  48590. # Visualisierung: RAM-Nutzung<br>
  48591. define wl_sysmon_ram SVG FileLog_sysmon:SM_RAM:CURRENT<br>
  48592. attr wl_sysmon_ram group RPi<br>
  48593. attr wl_sysmon_ram label "RAM-Nutzung Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
  48594. attr wl_sysmon_ram room 9.03_Tech<br>
  48595. <br>
  48596. # Visualisierung: Dateisystem: Root-Partition<br>
  48597. define wl_sysmon_fs_root SVG FileLog_sysmon:SM_FS_root:CURRENT<br>
  48598. attr wl_sysmon_fs_root group RPi<br>
  48599. attr wl_sysmon_fs_root label "Root Partition Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
  48600. attr wl_sysmon_fs_root room 9.03_Tech<br>
  48601. <br>
  48602. # Visualisierung: Dateisystem: USB-Stick<br>
  48603. define wl_sysmon_fs_usb1 SVG FileLog_sysmon:SM_FS_usb1:CURRENT<br>
  48604. attr wl_sysmon_fs_usb1 group RPi<br>
  48605. attr wl_sysmon_fs_usb1 label "USB1 Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
  48606. attr wl_sysmon_fs_usb1 room 9.03_Tech<br>
  48607. <br>
  48608. # Anzeige der Readings zum Einbinden in ein 'Raum'.<br>
  48609. define SysValues weblink htmlCode {SYSMON_ShowValuesHTML('sysmon')}<br>
  48610. attr SysValues group RPi<br>
  48611. attr SysValues room 9.03_Tech<br>
  48612. <br>
  48613. # Anzeige CPU Auslasung<br>
  48614. define wl_sysmon_cpustat SVG FileLog_sysmon:SM_CPUStat:CURRENT<br>
  48615. attr wl_sysmon_cpustat label "CPU(min/max): user:$data{min1}/$data{max1} nice:$data{min2}/$data{max2} sys:$data{min3}/$data{max3} idle:$data{min4}/$data{max4} io:$data{min5}/$data{max5} irq:$data{min6}/$data{max6} sirq:$data{min7}/$data{max7}"<br>
  48616. attr wl_sysmon_cpustat group RPi<br>
  48617. attr wl_sysmon_cpustat room 9.99_Test<br>
  48618. attr wl_sysmon_cpustat plotsize 840,420<br>
  48619. define wl_sysmon_cpustat_s SVG FileLog_sysmon:SM_CPUStatSum:CURRENT<br>
  48620. attr wl_sysmon_cpustat_s label "CPU(min/max): user:$data{min1}/$data{max1} nice:$data{min2}/$data{max2} sys:$data{min3}/$data{max3} idle:$data{min4}/$data{max4} io:$data{min5}/$data{max5} irq:$data{min6}/$data{max6} sirq:$data{min7}/$data{max7}"<br>
  48621. attr wl_sysmon_cpustat_s group RPi<br>
  48622. attr wl_sysmon_cpustat_s room 9.99_Test<br>
  48623. attr wl_sysmon_cpustat_s plotsize 840,420<br>
  48624. define wl_sysmon_cpustatT SVG FileLog_sysmon:SM_CPUStatTotal:CURRENT<br>
  48625. attr wl_sysmon_cpustatT label "CPU-Auslastung"<br>
  48626. attr wl_sysmon_cpustatT group RPi<br>
  48627. attr wl_sysmon_cpustatT plotsize 840,420<br>
  48628. attr wl_sysmon_cpustatT room 9.99_Test<br>
  48629. <br>
  48630. # Anzeige Stromversorgung AC<br>
  48631. define wl_sysmon_power_ac SVG FileLog_sysmon:SM_power_ac:CURRENT<br>
  48632. attr wl_sysmon_power_ac label "Stromversorgung (ac) Spannung: $data{min1} - $data{max1} V, Strom: $data{min2} - $data{max2} mA"<br>
  48633. attr wl_sysmon_power_ac room Technik<br>
  48634. attr wl_sysmon_power_ac group system<br>
  48635. # Anzeige Stromversorgung Battery<br>
  48636. define wl_sysmon_power_bat SVG FileLog_sysmon:SM_power_battery:CURRENT<br>
  48637. attr wl_sysmon_power_bat label "Stromversorgung (bat) Spannung: $data{min1} - $data{max1} V, Strom: $data{min2} - $data{max2} mA"<br>
  48638. attr wl_sysmon_power_bat room Technik<br>
  48639. attr wl_sysmon_power_bat group system<br>
  48640. </code>
  48641. </ul>
  48642. </ul>
  48643. <!-- ================================ -->
  48644. <a name="SYSSTAT"></a>
  48645. <h3>SYSSTAT</h3>
  48646. <ul>
  48647. Provides system statistics for the host FHEM runs on or a remote Linux system that is reachable by preconfigured passwordless ssh access.<br><br>
  48648. Notes:
  48649. <ul>
  48650. <li>This module needs <code>Sys::Statistics::Linux</code> on Linux.<br>
  48651. It can be installed with '<code>cpan install Sys::Statistics::Linux</code>'<br>
  48652. or on debian with '<code>apt-get install libsys-statistics-linux-perl</code>'</li>
  48653. <li>To monitor a target by snmp <code>Net::SNMP</code> hast to be installed.<br></li>
  48654. <li>To plot the load values the following code can be used:
  48655. <PRE>
  48656. define sysstatlog FileLog /usr/local/FHEM/var/log/sysstat-%Y-%m.log sysstat
  48657. attr sysstatlog nrarchive 1
  48658. define svg_sysstat SVG sysstatlog:sysstat:CURRENT
  48659. attr wl_sysstat label "Load Min: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"
  48660. attr wl_sysstat room System
  48661. </PRE></li>
  48662. <li>to match the root filesystem (mount point '/') in diskusage plots use
  48663. '<code>#FileLog 4:/\x3a:0:</code>' or '<code>#FileLog 4:\s..\s:0:</code>'
  48664. and <b>not</b> '<code>#FileLog 4:/:0:</code>' as the later will match all mount points</li>.
  48665. </ul>
  48666. <a name="SYSSTAT_Define"></a>
  48667. <b>Define</b>
  48668. <ul>
  48669. <code>define &lt;name&gt; SYSSTAT [&lt;interval&gt; [&lt;interval_fs&gt;] [&lt;host&gt;]]</code><br>
  48670. <br>
  48671. Defines a SYSSTAT device.<br><br>
  48672. The load is updated every &lt;interval&gt; seconds. The default and minimum is 60.<br><br>
  48673. The diskusage is updated every &lt;interval_fs&gt; seconds. The default is &lt;interval&gt;*60 and the minimum is 60.
  48674. &lt;interval_fs&gt; is only aproximated and works best if &lt;interval_fs&gt; is an integral multiple of &lt;interval&gt;.<br><br>
  48675. If &lt;host&gt; is given it has to be accessible by ssh without the need for a password.
  48676. Examples:
  48677. <ul>
  48678. <code>define sysstat SYSSTAT</code><br>
  48679. <code>define sysstat SYSSTAT 300</code><br>
  48680. <code>define sysstat SYSSTAT 60 600</code><br>
  48681. </ul>
  48682. </ul><br>
  48683. <a name="SYSSTAT_Readings"></a>
  48684. <b>Readings</b>
  48685. <ul>
  48686. <li>load<br>
  48687. the 1 minute load average (for windows targets monitored by snmp aproximated value</li>
  48688. <li>state<br>
  48689. the 1, 5 and 15 minute load averages (or windows targets monitored by snmp the per cpu utilization)</li>
  48690. <li>user,system,idle,iowait<br>
  48691. respective percentage of systemutilization (linux targets only)</li>
  48692. <li>&lt;mountpoint&gt;<br>
  48693. free bytes for &lt;mountpoint&gt;</li>
  48694. </ul><br>
  48695. <a name="SYSSTAT_Get"></a>
  48696. <b>Get</b>
  48697. <ul>
  48698. <code>get &lt;name&gt; &lt;value&gt;</code>
  48699. <br><br>
  48700. where <code>value</code> is one of<br><br>
  48701. <li>filesystems<br>
  48702. Lists the filesystems that can be monitored.</li>
  48703. </ul><br>
  48704. <a name="SYSSTAT_Attr"></a>
  48705. <b>Attributes</b>
  48706. <ul>
  48707. <li>disable<br>
  48708. keep timers running but disable collection of statistics.</li>
  48709. <li>filesystems<br>
  48710. List of comma separated filesystems (not mountpoints) that should be monitored.<br>
  48711. Examples:
  48712. <ul>
  48713. <code>attr sysstat filesystems /dev/md0,/dev/md2</code><br>
  48714. <code>attr sysstat filesystems /dev/.*</code><br>
  48715. <code>attr sysstat filesystems 1,3,5</code><br>
  48716. </ul></li></lu>
  48717. <li>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM...</li>
  48718. <li>mibs<br>
  48719. space separated list of &lt;mib&gt;:&lt;reding&gt; pairs that sould be polled.</li>
  48720. <li>showpercent<br>
  48721. If set the usage is shown in percent. If not set the remaining free space in bytes is shown.</li>
  48722. <li>snmp<br>
  48723. 1 -> use snmp to monitor load, uptime and filesystems (including physical and virtual memory)</li>
  48724. <li>stat<br>
  48725. 1 -> monitor user,system,idle and iowait percentage of system utilization (available only for linux targets)</li>
  48726. <li>raspberrytemperature<br>
  48727. If set and > 0 the raspberry pi on chip termal sensor is read.<br>
  48728. If set to 2 a geometric average over the last 4 values is created.</li>
  48729. <li>synologytemperature<br>
  48730. If set and > 0 the main temperaure of a synology diskstation is read. requires snmp.<br>
  48731. If set to 2 a geometric average over the last 4 values is created.</li>
  48732. <li>raspberrycpufreq<br>
  48733. If set and > 0 the raspberry pi on chip termal sensor is read.</li>
  48734. <li>uptime<br>
  48735. If set and > 0 the system uptime is read.<br>
  48736. If set to 2 the uptime is displayed in seconds.</li>
  48737. <li>useregex<br>
  48738. If set the entries of the filesystems list are treated as regex.</li>
  48739. <li>ssh_user<br>
  48740. The username for ssh remote access.</li>
  48741. <li>snmpVersion</li>
  48742. <li>snmpCommunity</li>
  48743. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  48744. </ul>
  48745. </ul>
  48746. <a name="SingleFileLog"></a>
  48747. <h3>SingleFileLog</h3>
  48748. <ul>
  48749. <br>
  48750. <a name="SingleFileLogdefine"></a>
  48751. <b>Define</b>
  48752. <ul>
  48753. <code>define &lt;name&gt; SingleFileLog &lt;filename&gt; &lt;regexp&gt;
  48754. </code>
  48755. <br><br>
  48756. For each event or devicename:event matching the &lt;regexp&gt; create a
  48757. new file &lt;filename&gt;<br>
  48758. <code>&lt;filename&gt;</code> may contain %-wildcards of the
  48759. POSIX strftime function of the underlying OS (see your strftime manual),
  48760. additionally %Q is replaced with a sequential number unique to the
  48761. SingleFileLog device. The file content is based on the template attribute,
  48762. see below.<br>
  48763. If the filename is enclosed in {} then it is evaluated as a perl expression,
  48764. which can be used to use a global path different from %L.
  48765. </ul>
  48766. <br>
  48767. <a name="SingleFileLogset"></a>
  48768. <b>Set</b> <ul>N/A</ul><br>
  48769. <a name="SingleFileLogget"></a>
  48770. <b>Get</b> <ul>N/A</ul><br>
  48771. <a name="SingleFileLogattr"></a>
  48772. <b>Attributes</b>
  48773. <ul>
  48774. <li><a href="#addStateEvent">addStateEvent</a></li><br>
  48775. <li><a href="#disable">disable</a></li>
  48776. <li><a href="#disabledForIntervals">disabledForIntervals</a></li><br>
  48777. <li><a href="#dosLineEnding">dosLineEnding</a><br>
  48778. Create the file with the line-terminator used on Windows systems (\r\n).
  48779. </li><br>
  48780. <li><a name="#numberFormat">numberFormat</a><br>
  48781. If a word in the event looks like a number, then it is reformatted using
  48782. the numberFormat, and $EVTNUMx is set (analogue to $EVTPARx). Default is
  48783. %1.6E, see the printf manual for details.
  48784. </li><br>
  48785. <li><a name="#readySuffy">readySuffix</a><br>
  48786. The file specified in the definition will be created with the suffix .tmp
  48787. and after the file is closed, will be renamed to the value of this
  48788. attribute. Default is .rdy, specify none to remove the suffix completely.
  48789. </li><br>
  48790. <li><a name="#syncAfterWrite">syncAfterWrite</a><br>
  48791. Force the operating system to write the contents to the disc if set to 1.
  48792. Note: this can slow down the writing, and may shorten the life of SSDs.
  48793. Defalt is 0 (off)
  48794. </li><br>
  48795. <li><a name="#template">template</a><br>
  48796. This attribute specifies the content of the file. Following variables
  48797. are replaced before writing the file:
  48798. <ul>
  48799. <li>$EVENT - the complete event</li>
  48800. <li>$EVTPART0 $EVTPART1 ... - the event broken into single words</li>
  48801. <li>$EVTNUM0 $EVTNUM1 ... - reformatted as numbers, see numberFormat
  48802. above</li>
  48803. <li>$NAME - the name of the device generating the event</li>
  48804. <li>$time - the current time, formatted as YYYY-MM-DD HH:MM:SS</li>
  48805. <li>$time14 - the current time, formatted as YYYYMMDDHHMMSS</li>
  48806. <li>$time16 - the current time, formatted as YYYYMMDDHHMMSSCC,
  48807. where CC is the hundredth second</li>
  48808. </ul>
  48809. If the template is enclosed in {} than it will be evaluated as a perl
  48810. expression, and its result is written to the file.<br>
  48811. Default is $time $NAME $EVENT\n
  48812. </li><br>
  48813. <li><a name="#writeInBackground">writeInBackground</a><br>
  48814. if set (to 1), the writing will occur in a background process to avoid
  48815. blocking FHEM. Default is 0.
  48816. </li><br>
  48817. </ul>
  48818. <br>
  48819. </ul>
  48820. <a name="Siro"></a>
  48821. <h3>Siro protocol</h3>
  48822. <ul>
  48823. <br> A <a href="#SIGNALduino">SIGNALduino</a> device (must be defined first).<br>
  48824. <br>
  48825. Since the protocols of Siro and Dooya are very similar, it is currently difficult to operate these systems simultaneously via one "IODev". Sending commands works without any problems, but distinguishing between the remote control signals is hardly possible in SIGNALduino. For the operation of the Siro-Module it is therefore recommended to exclude the Dooya protocol (16) in the SIGNALduino, via the whitelist. In order to detect the remote control signals correctly, it is also necessary to deactivate the "manchesterMC" protocol (disableMessagetype manchesterMC) in the SIGNALduino. If machester-coded commands are required, it is recommended to use a second SIGNALduino.<br>
  48826. <br>
  48827. <br>
  48828. <a name="Sirodefine"></a>
  48829. <br>
  48830. <b>Define</b>
  48831. <br>
  48832. <ul>
  48833. <code>define&lt; name&gt; Siro &lt;id&gt;&lt;channel&gt; </code>
  48834. <br>
  48835. <br>
  48836. The ID is a 7-digit hex code, which is uniquely and firmly assigned to a Siro remote control. Channel is the single-digit channel assignment of the remote control and is also hexadecimal. This results in the possible channels 0 - 15 (hexadecimal 0-F).
  48837. A unique ID must be specified, the channel (channel) must also be specified.
  48838. An autocreate (if enabled) automatically creates the device with the ID of the remote control and the channel.
  48839. <br><br>
  48840. Examples:<br><br>
  48841. <ul>
  48842. <code>define Siro1 Siro AB00FC1</code><br> Creates a Siro-device called Siro1 with the ID: AB00FC and Channel: 1<br>
  48843. </ul>
  48844. </ul>
  48845. <br>
  48846. <a name="Siroset"></a>
  48847. <b>Set </b><br>
  48848. <ul>
  48849. <code>set &lt;name&gt; &lt;value&gt; [&lt;position&gt]</code>
  48850. <br><br>
  48851. where <code>value</code> is one of:<br>
  48852. <pre>
  48853. on
  48854. off
  48855. stop
  48856. pos (0...100)
  48857. prog
  48858. fav
  48859. </pre>
  48860. Examples:<br><br>
  48861. <ul>
  48862. <code>set Siro1 on</code><br>
  48863. <code>set Siro1 off</code><br>
  48864. <code>set Siro1 position 50</code><br>
  48865. <code>set Siro1 fav</code><br>
  48866. <code>set Siro1 stop</code><br>
  48867. <code>set Siro1 set_favorite</code><br>
  48868. </ul>
  48869. <br>
  48870. <ul>
  48871. set Siro1 on moves the roller blind up completely (0%)<br>
  48872. set Siro1 off moves the roller blind down completely (100%)<br>
  48873. set Siro1 stop stops the current movement of the roller blind<br>
  48874. set Siro1 position 45 moves the roller blind to the specified position (45%)<br>
  48875. set Siro1 45 moves the roller blind to the specified position (45%)<br>
  48876. set Siro1 fav moves the blind to the hardware-programmed favourite middle position<br>
  48877. set Siro1 prog corresponds to the "P2" button on the remote control, the module is set to programming mode (3 min).<br>
  48878. set Siro1 set_favorite programs the current roll position as hardware middle position. The attribute time_down_to_favorite is recalculated and set. <br>
  48879. </ul>
  48880. <br>
  48881. Notes:<br><br>
  48882. <ul>
  48883. <li>If the module is in programming mode, the module detects successive stop commands because they are absolutely necessary for programming. In this mode, the readings and state are not updated. The mode is automatically terminated after 3 minutes. The remaining time in programming mode is displayed in the reading "pro_mode". The remaining time in programming mode is displayed in the reading "pro_mode". The programming of the roller blind must be completed during this time, otherwise the module will no longer accept successive stop commands. The display of the position, the state, is a calculated position only, since there is no return channel to status message. Due to a possible missing remote control command, timing problem etc. it may happen that this display shows wrong values sometimes. When moving into an end position without stopping the movement (set Siro1[on/off]), the status display and real position are synchronized each time the position is reached. This is due to the hardware and unfortunately not technically possible.
  48884. </li>
  48885. </ul>
  48886. </ul>
  48887. <br>
  48888. <b>Get</b>
  48889. <ul>N/A</ul><br>
  48890. <a name="Siroattr"></a>
  48891. <b>Attributes</b><br><br>
  48892. <ul>
  48893. <a name="IODev"></a>
  48894. <li>IODev<br>
  48895. The IODev must contain the physical device for sending and receiving the signals. Currently a SIGNALduino or SIGNALesp is supported.
  48896. Without the specification of the "Transmit and receive module" "IODev", a function is not possible.
  48897. </li><br>
  48898. <a name="channel"></a>
  48899. <li>channel (since V1.09 no longer available)<br>
  48900. contains the channel used by the module for sending and receiving.
  48901. This is already set when the device is created.
  48902. </li><br>
  48903. <a name="channel_send_mode_1 "></a>
  48904. <li>channel_send_mode_1 <br>
  48905. contains the channel that is used by the module in "operation_mode 1" to send.
  48906. This attribute is not used in "operation_mode 0"
  48907. </li><br>
  48908. <a name="operation_mode"></a>
  48909. <li>operation_mode<br>
  48910. Mode 0<br><br>
  48911. This is the default mode. In this mode, the module uses only the channel specified by the remote control or the "channel" attribute. In the worst case, signals, timing problems etc. missed by FHEM can lead to wrong states and position readings. These are synchronized again when a final position is approached.
  48912. <br><br>Mode 1<br><br>
  48913. Extended mode. In this mode, the module uses two channels. The standard channel "channel" for receiving the remote control. This should no longer be received by the blind itself. And the "channel_send_mode_1", for sending to the roller blind motor. For this purpose, a reconfiguration of the motor is necessary. This mode is "much safer" in terms of the representation of the states, since missing a signal by FHEM does not cause the wrong positions to be displayed. The roller blind only moves when FHEM has received the signal and passes it on to the motor.<br>
  48914. Instructions for configuring the motor will follow.
  48915. </li><br>
  48916. <a name="time_down_to_favorite"></a>
  48917. <li>time_down_to_favorite<br>
  48918. contains the movement time in seconds, which the roller blind needs from 0% position to the hardware favorite center position. This time must be measured and entered manually.
  48919. Without this attribute, the module is not fully functional.</li><br>
  48920. <a name="time_to_close"></a>
  48921. <li>time_to_close<br>
  48922. contains the movement time in seconds required by the blind from 0% position to 100% position. This time must be measured and entered manually.
  48923. Without this attribute, the module is not fully functional.</li><br>
  48924. <a name="time_to_open"></a>
  48925. <li>time_to_open<br>
  48926. contains the movement time in seconds required by the blind from 100% position to 0% position. This time must be measured and entered manually.
  48927. Without this attribute, the module is not fully functional.</li><br>
  48928. <a name="prog_fav_sequence"></a>
  48929. <li>prog_fav_sequence<br>
  48930. contains the command sequence for programming the hardware favorite position</li><br>
  48931. <a name="debug_mode [0:1]"></a>
  48932. <li>debug_mode [0:1]<br>
  48933. In mode 1, additional readings are created for troubleshooting purposes, in which the output of all module elements is output. Commands are NOT physically sent.</li><br>
  48934. <a name="Info"></a>
  48935. <li>Info<br>
  48936. The attributes webcmd and devStateIcon are set once when the device is created and are adapted to the respective mode of the device during operation. The adaptation of these contents only takes place until they have been changed by the user. After that, there is no longer any automatic adjustment.</li><br>
  48937. </ul>
  48938. </ul>
  48939. <a name="SmartMeterP1"></a>
  48940. <h3>SmartMeterP1</h3>
  48941. <ul>
  48942. <table>
  48943. <tr><td>
  48944. The SmartMeterP1 is a module which can interpret the data received from
  48945. a Smart Meter used to keep track of electricity and gas usage.<br><br>
  48946. Currently it can proces P1 protocol DSMR 4.0. Probably also others but
  48947. not tested.<br>
  48948. Tested with a Landys+Gyr E350 and a Iskra - ME382.<br><br>
  48949. Note: This module may require the <code>Device::SerialPort</code> or
  48950. <code>Win32::SerialPort</code> module if you attach the device via USB
  48951. and the OS sets strange default parameters for serial devices.<br><br>
  48952. </td><td>
  48953. <img src="Landis-Gyr-E350-meter.jpg"/>
  48954. </td></tr>
  48955. </table>
  48956. <a name="SmartMeterP1define"></a>
  48957. <b>Define</b>
  48958. <ul>
  48959. <code>define &lt;name&gt; SmartMeterP1 &lt;device&gt;</code> <br>
  48960. <br>
  48961. USB-connected device (P1 USB-Serial cable):<br><ul>
  48962. &lt;device&gt; specifies the serial port to read the incoming data from.
  48963. The name of the serial-device depends on your distribution, under
  48964. linux the ftdi-sio kernel module is responsible, and usually a
  48965. /dev/ttyUSB0 device will be created.<br><br>
  48966. You can specify a baudrate of 115200, e.g.: /dev/ttyUSB0@115200<br><br>
  48967. For the Landys+Gyr E350 use: define SmartMeterP1 SmartMeterP1 /dev/ttyUSB0@115200<BR>
  48968. For the Iskra - ME382 use: define SmartMeterP1 SmartMeterP1 /dev/p1usb@9600,7,E,1<BR><BR>
  48969. </ul>
  48970. <br>
  48971. If the device is called none, then no device will be opened, so you
  48972. can experiment without hardware attached.<br>
  48973. </ul>
  48974. <br>
  48975. <a name="SmartMeterP1attr"></a>
  48976. <b>Attributes</b>
  48977. <ul>
  48978. <li><a name="write2db">write2db</a><br>
  48979. If you would like to store your read data into a mysql database you can activate
  48980. it with this setting. Allowed values are:<BR>
  48981. 0 - Do not write to datbase (default)<BR>
  48982. 1 - Write to database<BR><BR>
  48983. If you want to write to a database you need to specify also the following attributes:<BR><BR>
  48984. <code>dbHost<BR>
  48985. dbName<BR>
  48986. dbPassword<BR>
  48987. dbPort<BR>
  48988. dbUpdateInterval<BR>
  48989. dbUser</code>
  48990. <BR><BR>
  48991. And create a table in your database called 'smartmeter with the following syntax:<BR>
  48992. <code>CREATE TABLE `smartmeter` (
  48993. `date` datetime NOT NULL,
  48994. `obis_ref` varchar(45) COLLATE utf8_bin NOT NULL,
  48995. `value` float DEFAULT NULL,
  48996. `unit` varchar(45) COLLATE utf8_bin DEFAULT NULL,
  48997. PRIMARY KEY (`date`,`obis_ref`)
  48998. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin</code>
  48999. </li><br>
  49000. <li><a name="dbHost">dbHost</a><br>
  49001. The hostname or ip address of the MySQL server.
  49002. </li><br>
  49003. <li><a name="dbPort">dbPort</a><br>
  49004. The TCP port the MySQL server is listening on. Default is 3306.
  49005. </li><br>
  49006. <li><a name="dbName">dbName</a><br>
  49007. The name of the dabase to use.
  49008. </li><br>
  49009. <li><a name="dbUsername">dbUsername</a><br>
  49010. The name of the MySQL use which has read and write access to the database
  49011. and table 'smartmeter'.
  49012. </li><br>
  49013. <li><a name="dbPassword">dbPassword</a><br>
  49014. Password of the MySQL user.
  49015. </li><br>
  49016. <li><a name="dbUpdateInterval">dbUpdateInterval</a><br>
  49017. How often should the measured value be written to the database.<BR>
  49018. This value is in minutes.<BR><BR>
  49019. So when a new value is read from the smartmeter the time will be checked
  49020. to the time of the last value written to the database. If the difference is
  49021. bigger than this interval the value will be written to the database.<BR><BR>
  49022. With this value you can control how much and how fast data is written into your database.
  49023. </li><br>
  49024. <li><a name="removeUnitSeparator">removeUnitSeparator</a><br>
  49025. When set to true it will replace the unit asterisk separator by a space character.
  49026. So 00900.701*m3 becomes 00900.701 m3
  49027. </li><br>
  49028. <li><a name="removeLeadingZero">removeLeadingZero</a><br>
  49029. When set to true it will remove all leading zeros in a value.
  49030. So 00900.701 m3 becomes 900.701 m3 and <BR>
  49031. 0000.123 kWh becomes 0.123 kWh
  49032. </li><br>
  49033. </ul>
  49034. <br>
  49035. </ul>
  49036. <a name="SmartPi"></a>
  49037. <h3>SmartPi</h3>
  49038. <ul>
  49039. <a name="SmartPireadings"></a>
  49040. <b>Readings</b>
  49041. <ul>
  49042. <li>phaseX_Current - Current [A] (available for phase 1,2,3, neutral conductor)</li>
  49043. <li>phaseX_Voltage - Voltage [V] (available for phase 1,2,3)</li>
  49044. <li>phaseX_Power - Power [W] (available for phase 1,2,3)</li>
  49045. <li>phaseX_Cosphi - cos φ (available for phase 1,2,3 – it is important to measure the voltage)</li>
  49046. <li>phaseX_Frequency - Frequency [Hz] (available for phase 1,2,3)</li>
  49047. </ul>
  49048. <a name="SmartPiget"></a>
  49049. <b>get</b>
  49050. <ul>
  49051. <li>phaseX Y - get new Y (Voltage or Current or so)data about phaseX</li>
  49052. </ul>
  49053. </ul>
  49054. <a name="Snapcast"></a>
  49055. <h3>Snapcast</h3>
  49056. <ul>
  49057. <i>Snapcast</i> is a module to control a Snapcast Server. Snapcast is a little project to achieve multiroom audio and is a leightweight alternative to such solutions using Pulseaudio.
  49058. Find all information about Snapcast, how to install and configure on the <a href="https://github.com/badaix/snapcast">Snapcast GIT</a>. To use this module, the minimum is to define a snapcast server module
  49059. which defines the connection to the actual snapcast server. See the define section for how to do this. On top of that, it is possible to define virtual client modules, so that each snapcast client that is connected to
  49060. the Snapcast Server is represented by its own FHEM module. The purpose of that is to provide an interface to the user that enables to integrate Snapcast Clients into existing visualization solutions and to use
  49061. other FHEM capabilities around it, e.g. Notifies, etc. The server module includes all readings of all snapcast clients, and it allows to control all functions of all snapcast clients.
  49062. Each virtual client module just gets the reading for the specific client. The client modules is encouraged and also makes it possible to do per-client Attribute settings, e.g. volume step size and volume constraints.
  49063. <br><br>
  49064. <a name="Snapcastdefine"></a>
  49065. <b>Define</b>
  49066. <ul>
  49067. <code>define <name> Snapcast [&lt;ip&gt; &lt;port&gt;]</code>
  49068. <br><br>
  49069. Example: <code>define MySnap Snapcast 127.0.0.1 1705</code>
  49070. <br><br>
  49071. This way a snapcast server module is defined. IP defaults to localhost, and Port to 1705, in case you run Snapcast in the default configuration on the same server as FHEM, you dont need to give those parameters.
  49072. <br><br><br>
  49073. <code>define <name> Snapcast client &lt;server&gt; &lt;clientid&gt;</code>
  49074. <br><br>
  49075. Example: <code>define MySnapClient Snapcast client MySnap aabbccddeeff</code>
  49076. <br><br>
  49077. This way a snapcast client module is defined. The keyword client does this. The next argument links the client module to the associated server module. The final argument is the client ID. In Snapcast each client gets a unique ID,
  49078. which is normally made out of the MAC address. Once the server module is initialized it will have all the client IDs in the readings, so you want to use those for the definition of the client modules
  49079. </ul>
  49080. <br>
  49081. <a name="Snapcastset"></a>
  49082. <b>Set</b><br>
  49083. <ul>
  49084. For a Server module: <code>set &lt;name&gt; &lt;function&gt; &lt;client&gt; &lt;value&gt;</code>
  49085. <br><br>
  49086. For a Client module: <code>set &lt;name&gt; &lt;function&gt; &lt;value&gt;</code>
  49087. <br><br>
  49088. Options:
  49089. <ul>
  49090. <li><i>update</i><br>
  49091. Perform a full update of the Snapcast Status including streams and servers. Only needed if something is not working. Server module only</li>
  49092. <li><i>volume</i><br>
  49093. Set the volume of a client. For this and all the following 4 options, give client as second parameter (only for the server module), either as name, IP , or MAC and the desired value as third parameter.
  49094. Client can be given as "all", in that case all clients are changed at once (only for server module)<br>
  49095. Volume can be given in 3 ways: Range betwee 0 and 100 to set volume directly. Increment or Decrement given between -100 and +100. Keywords <em>up</em> and <em>down</em> to increase or decrease with a predifined step size.
  49096. The step size can be defined in the attribute <em>volumeStepSize</em><br>
  49097. The step size can be defined smaller for the lower volume range, so that finetuning is possible in this area.
  49098. See the description of the attributes <em>volumeStepSizeSmall</em> and <em>volumeStepThreshold</em>
  49099. Setting a volume bigger than 0 also unmutes the client, if muted.</li>
  49100. <li><i>mute</i><br>
  49101. Mute or unmute by giving "true" or "false" as value. If no argument given, toggle between muted and unmuted.</li>
  49102. <li><i>latency</i><br>
  49103. Change the Latency Setting of the client</li>
  49104. <li><i>name</i><br>
  49105. Change the Name of the client</li>
  49106. <li><i>stream</i><br>
  49107. Change the stream that the client is listening to. Snapcast uses one or more streams which can be unterstood as virtual audio channels. Each client/room can subscribe to one of them.
  49108. By using next as value, you can cycle through the avaialble streams</li>
  49109. </ul>
  49110. </ul>
  49111. <br><br>
  49112. <a name="Snapcastattr"></a>
  49113. <b>Attributes</b>
  49114. <ul>
  49115. All attributes can be set to the master module and the client modules. Using them for client modules enable the setting of different attribute values per client.
  49116. <li>streamnext<br>
  49117. Can be set to <i>all</i> or <i>playing</i>. If set to <i>all</i>, the <i>next</i> function cycles through all streams, if set to <i>playing</i>, the next function cycles only through streams in the playing state.
  49118. </li>
  49119. <li>volumeStepSize<br>
  49120. Default: 5. Set this to define, how far the volume is changed when using up/down volume commands.
  49121. </li>
  49122. <li>volumeStepThreshold<br>
  49123. Default: 7. When the volume is below this threshold, then the volumeStepSizeSmall setting is used for volume steps, rather than the normal volumeStepSize.
  49124. </li>
  49125. <li>volumeStepSizeSmall<br>
  49126. Default: 1. This typically smaller step size is used when using "volume up" or "volume down" and the current volume is smaller than the threshold.
  49127. </li>
  49128. <li>constraintDummy<br>
  49129. Links the Snapcast module to a dummy. The value of the dummy is then used as a selector for different sets of volumeConstraints. See the description of the volumeConstraint command.
  49130. </li>
  49131. <li>constraints<br>Defines a set of volume Constraints for each client and, optionally, based on the value of the dummy as defined with constraintDummy. This way there can be different volume profiles for e.g. weekdays or weekends. volumeConstraints mean, that the maximum volume of snapcast clients can be limited or even set to 0 during certain times, e.g. at night for the childrens room, etc.
  49132. the constraint argument is given in the folling format: <constraintSet>|hh:mm vol hh:mm vol ... [<constraintSet2>|hh:mm vol ... etc. The chain off <hh:mm> <volume> pairs defines a volume profile for 24 hours. It is equivalent to the temeratore setting of the homematic thermostates supported by FHEM.
  49133. <br>Example: standard|08:00 0 18:00 100 22:00 30 24:00 0,weekend|10:00 0 20:00 100 24:00 30</li>
  49134. <br>In this example, there are two profiles defined. If the value of the associated dummy is "standard", then the standard profile is used. It mutes the client between midnight and 8 am, then allows full volume until 18:00, then limites the volume to 30 until 22:00 and then mutes the client for the rest of the day. The snapcast module does not increase the volume when a limited time is over, it only allows for increasing it manually again.
  49135. </ul>
  49136. </ul>
  49137. <a name="Spotify"></a>
  49138. <h3>Spotify</h3>
  49139. <ul>
  49140. The <i>Spotify</i> module enables you to control your Spotify (Connect) playback.<br>
  49141. To be able to control your music, you need to authorize with the Spotify WEB API. To do that, a <a target="_blank" rel="nofollow" href="https://developer.spotify.com/my-applications/#!/applications/create">Spotify API application</a> is required.<br>
  49142. While creating the app, enter any <i>redirect_uri</i>. By default the module will use <a href="https://oskar.pw/" target="_blank">https://oskar.pw/</a> as <i>redirect_uri</i> since the site outputs your temporary authentification code.<br>
  49143. It is safe to rely on this site because the code is useless without your client secret and only valid for a few minutes (important: you have to press the <b>add</b> and <b>save</b> button while adding the url).<br>
  49144. If you want to use it, make sure to add it as <i>redirect_uri</i> to your app - however, you are free to use any other url and extract the code after signing in yourself.<br>
  49145. <br>
  49146. <a name="Spotify_define"></a>
  49147. <p><b>Define</b></p>
  49148. <ul>
  49149. <code>define &lt;name&gt; Spotify &lt;client_id&gt; &lt;client_secret&gt; [ &lt;redirect_url&gt; ]</code><br>
  49150. </ul>
  49151. <br>
  49152. <ul>
  49153. Example: <code>define Spotify Spotify f88e5f5c2911152d914391592e717738 301b6d1a245e4fe01c2f8b4efd250756</code><br>
  49154. </ul>
  49155. <br>
  49156. Once defined, open up your browser and call the URL displayed in <i>AUTHORIZATION_URL</i>, sign in with spotify and extract the code after being redirected.<br>
  49157. If you get a <b>redirect_uri mismatch</b> make sure to either add <a href="https://oskar.pw/" target="_blank">https://oskar.pw/</a> as redirect url or that your url <b>matches exactly</b> with the one defined.<br>
  49158. As soon as you obtained the code call <code>set &lt;name&gt; code &lt;code&gt;</code> - your state should change to connected and you are ready to go.<br>
  49159. <br>
  49160. <a name="Spotify_set"></a>
  49161. <p><b>set &lt;required&gt; [ &lt;optional&gt; ]</b></p>
  49162. Without a target device given, the active device (or default device if <i>alwaysStartOnDefaultDevice</i> is enabled) will be used.<br>
  49163. You can also use the name of the target device instead of the id if it does not contain spaces - where it states <i>&lt;device_id / device_name&gt;</i> spaces are allowed.<br>
  49164. If no default device is defined and none is active, it will use the first available device.<br>
  49165. You can get a spotify uri by pressing the share button in the spotify (desktop) app on a track/playlist/album.<br><br>
  49166. <ul>
  49167. <li>
  49168. <i>findArtistByName</i><br>
  49169. finds an artist using its name and returns the result to the readings
  49170. </li>
  49171. <li>
  49172. <i>findTrackByName</i><br>
  49173. finds a track using its name and returns the result to the readings
  49174. </li>
  49175. <li>
  49176. <i>pause</i><br>
  49177. pause the current playback
  49178. </li>
  49179. <li>
  49180. <i>playArtistByName &lt;artist_name&gt; [ &lt;device_id&gt; ]</i><br>
  49181. plays an artist using its name (uses search)
  49182. </li>
  49183. <li>
  49184. <i>playContextByURI &lt;context_uri&gt; [ &lt;nr_of_start_track&gt; ] [ &lt;device_id / device_name&gt; ]</i><br>
  49185. plays a context (playlist, album or artist) using a Spotify URI
  49186. </li>
  49187. <li>
  49188. <i>playPlaylistByName &lt;playlist_name&gt; [ &lt;device_id&gt; ]</i><br>
  49189. plays any playlist by providing a name (uses search)
  49190. </li>
  49191. <li>
  49192. <i>playRandomTrackFromPlaylistByURI &lt;playlist_uri&gt; [ &lt;limit&gt; ] [ &lt;device_id / device_name&gt; ]</i><br>
  49193. plays a random track from a playlist (only considering the first <i>&lt;limit&gt;</i> songs)
  49194. </li>
  49195. <li>
  49196. <i>playSavedTracks [ &lt;nr_of_start_track&gt; ] [ &lt;device_id / device_name&gt; ]</i><br>
  49197. plays the saved tracks (beginning with track <i>&lt;nr_of_start_track&gt;</i>)
  49198. </li>
  49199. <li>
  49200. <i>playTrackByName &lt;track_name&gt; [ &lt;device_id&gt; ]</i><br>
  49201. finds a song by its name and plays it
  49202. </li>
  49203. <li>
  49204. <i>playTrackByURI &lt;track_uri&gt; [ &lt;device_id / device_name&gt; ]</i><br>
  49205. plays a track using a track uri
  49206. </li>
  49207. <li>
  49208. <i>repeat &lt;track,context,off&gt;</i><br>
  49209. sets the repeat mode: either <i>one</i>, <i>all</i> (meaning playlist or album) or <i>off</i>
  49210. </li>
  49211. <li>
  49212. <i>resume [ &lt;device_id / device_name&gt; ]</i><br>
  49213. resumes playback (on a device)
  49214. </li>
  49215. <li>
  49216. <i>seekToPosition &lt;position&gt;</i><br>
  49217. seeks to the position <i>&lt;position&gt;</i> (in seconds, supported formats: 01:20, 80, 00:20, 20)
  49218. </li>
  49219. <li>
  49220. <i>shuffle &lt;off,on&gt;</i><br>
  49221. sets the shuffle mode: either <i>on</i> or <i>off</i>
  49222. </li>
  49223. <li>
  49224. <i>skipToNext</i><br>
  49225. skips to the next track
  49226. </li>
  49227. <li>
  49228. <i>skipToPrevious</i><br>
  49229. skips to the previous track
  49230. </li>
  49231. <li>
  49232. <i>togglePlayback</i><br>
  49233. toggles the playback (resumes if paused, pauses if playing)
  49234. </li>
  49235. <li>
  49236. <i>transferPlayback [ &lt;device_id&gt; ]</i><br>
  49237. transfers the current playback to the specified device (or the next inactive device if not specified)
  49238. </li>
  49239. <li>
  49240. <i>update</i><br>
  49241. updates playback and devices
  49242. </li>
  49243. <li>
  49244. <i>volume &lt;volume&gt; [ &lt;device_id&gt; ]</i><br>
  49245. sets the volume
  49246. </li>
  49247. <li>
  49248. <i>volumeDown [ &lt;step&gt; ] [ &lt;device_id / device_name&gt; ]</i><br>
  49249. decreases the volume by <i>step</i> (if not set it uses <i>volumeStep</i>)
  49250. </li>
  49251. <li>
  49252. <i>volumeFade &lt;volume&gt; [ &lt;duration&gt; &lt;step&gt; ] [ &lt;device_id&gt; ]</i><br>
  49253. fades the volume
  49254. </li>
  49255. <li>
  49256. <i>volumeDown [ &lt;step&gt; ] [ &lt;device_id / device_name&gt; ]</i><br>
  49257. increases the volume by <i>step</i> (if not set it uses <i>volumeStep</i>)
  49258. </li>
  49259. </ul>
  49260. <br>
  49261. <a name="Spotify_get"></a>
  49262. <p><b>Get</b></p>
  49263. <ul>
  49264. N/A
  49265. </ul>
  49266. <br>
  49267. <a name="Spotify_attr"></a>
  49268. <p><b>Attributes</b></p>
  49269. <ul>
  49270. <li>
  49271. <i>alwaysStartOnDefaultDevice</i><br>
  49272. always start new playback on the default device<br>
  49273. default: 0
  49274. </li>
  49275. <li>
  49276. <i>defaultPlaybackDeviceID</i><br>
  49277. the prefered device by its id or device name<br>
  49278. </li>
  49279. <li>
  49280. <i>disable</i><br>
  49281. disables the device<br>
  49282. default: 0
  49283. </li>
  49284. <li>
  49285. <i>updateInterval</i><br>
  49286. the interval to update your playback status while no music is running (in seconds)<br>
  49287. default: 300
  49288. </li>
  49289. <li>
  49290. <i>updateIntervalWhilePlaying</i><br>
  49291. the interval to update your playback status while music is running (in seconds)<br>
  49292. default: 10
  49293. </li>
  49294. <li>
  49295. <i>volumeStep</i><br>
  49296. the value by which the volume is in-/decreased by default (in percent)<br>
  49297. default: 5
  49298. </li>
  49299. </ul>
  49300. </ul>
  49301. <a name="TBot_List"></a>
  49302. <h3>TBot_List</h3>
  49303. <ul>
  49304. This module connects for allowing inline keyboard interactions between a telegramBot and PostMe lists.
  49305. <br><br>
  49306. <a name="TBot_Listdefine"></a>
  49307. <b>Define</b>
  49308. <ul>
  49309. <code>define &lt;name&gt; TBot_List &lt;PostMe device&gt; &lt;listname&gt; </code>
  49310. <br><br>
  49311. Defines a TBot_List device, which will allow interaction between the telegrambot and the postme device
  49312. <br><br>
  49313. Example: <code>define testtbotlist TBot_List testposteme testlist</code><br>
  49314. <br><br>
  49315. Note: The module relies on events send from the corresponding TelegramBot devices. Specifically changes to the readings <code>sentMsgId</code> and <code>msgReplyMsgId</code> are required to enable to find the corresponding message ids to be able to modify messages. This needs to be taken into account when using the attributes event-on-*-reading on the TelegramBot device.<br>
  49316. <br>
  49317. </ul>
  49318. <br><br>
  49319. <a name="TBot_Listset"></a>
  49320. <b>Set</b>
  49321. <ul>
  49322. <code>set &lt;name&gt; &lt;what&gt; [&lt;value&gt;]</code>
  49323. <br>
  49324. where &lt;what&gt; / &lt;value&gt; is one of
  49325. <br><br>
  49326. <li><code>start &lt;telegrambot name&gt; [ &lt;peerid&gt; ]</code><br>Initiate a new dialog for the given peer (or the last peer sending a message on the given telegrambot)
  49327. </li>
  49328. <li><code>end &lt;telegrambot name&gt; &lt;peerid&gt;</code><br>Finalize a new dialog for the given peer on the given telegrambot
  49329. </li>
  49330. </ul>
  49331. <br><br>
  49332. <a name="TBot_Listget"></a>
  49333. <b>Get</b>
  49334. <ul>
  49335. <code>get &lt;name&gt; &lt;what&gt; [&lt;value&gt;]</code>
  49336. <br>
  49337. where &lt;what&gt; / &lt;value&gt; is one of
  49338. <br><br>
  49339. <li><code>queryAnswer &lt;telegrambot name&gt; &lt;peerid&gt; &lt;queryData&gt; </code><br>Get the queryAnswer for the given query data in the dialog (will be called internally by the telegramBot on receiving querydata)
  49340. </li>
  49341. <li><code>textList</code><br>Returns a multiline string containing the list elements or <Leer>
  49342. </li>
  49343. </ul>
  49344. <br><br>
  49345. <a name="TBot_Listattr"></a>
  49346. <b>Attributes</b>
  49347. <br><br>
  49348. <ul>
  49349. <li><code>telegramBots &lt;list of telegramBot names separated by space&gt;</code><br>This attribute takes the names of telegram bots, that are monitored by this Tbot_List device
  49350. </li>
  49351. <li><code>optionDouble &lt;1 or 0&gt;</code><br>Specify if the list shall be done in two columns (double=1) or in a single column (double=0 or not set).
  49352. </li>
  49353. <li><code>allowedPeers &lt;list of peer ids&gt;</code><br>If specifed further restricts the users for the given list to these peers. It can be specifed in the same form as in the telegramBot msg command but without the leading @ (so ids will be just numbers).
  49354. </li>
  49355. <li><code>handleUnsolicited &lt;1 or 0&gt;</code><br>If set to 1 and new messages are sent in a chat where a dialog of this list is active the bot will ask if an entry should be added. This helps for accidential messages without out first pressing the "add" button.
  49356. </li>
  49357. <li><code>confirmDelete &lt;1 or 0&gt;</code><br>If set to 1 the bot will ask for a confirmation if an entry should be deleted. This is the default. With a value of 0 the additional confirmation will not be requested.
  49358. </li>
  49359. </ul>
  49360. <br><br>
  49361. <a name="TBot_Listreadings"></a>
  49362. <b>Readings</b>
  49363. <ul>
  49364. <li>currently none</li>
  49365. <br>
  49366. </ul>
  49367. <br><br>
  49368. </ul>
  49369. <a name="TCM"></a>
  49370. <h3>TCM</h3>
  49371. <ul>
  49372. The TCM module serves an USB or TCP/IP connected TCM 120 or TCM 310x, TCM 410J
  49373. EnOcean Transceiver module. These are mostly packaged together with a serial to USB
  49374. chip and an antenna, e.g. the BSC BOR contains the TCM 120, the <a
  49375. href="http://www.enocean.com/de/enocean_module/usb-300-oem/">USB 300</a> from
  49376. EnOcean and the EUL from busware contains a TCM 310. See also the datasheet
  49377. available from <a href="http://www.enocean.com">www.enocean.com</a>.
  49378. <br>
  49379. As the TCM 120 and the TCM 310, TCM 410J speak completely different protocols, this
  49380. module implements 2 drivers in one. It is the "physical" part for the <a
  49381. href="#EnOcean">EnOcean</a> module.<br><br>
  49382. Please note that EnOcean repeaters also send Fhem data telegrams again. Use
  49383. <code>attr &lt;name&gt; <a href="#blockSenderID">blockSenderID</a> own</code>
  49384. to block receiving telegrams with TCM SenderIDs.<br>
  49385. The address range used by your transceiver module, can be found in the
  49386. parameters BaseID and LastID.
  49387. <br><br>
  49388. The transceiver moduls do not always support all commands. The supported range
  49389. of commands depends on the hardware and the firmware version. A firmware update
  49390. is usually not provided.
  49391. <br><br>
  49392. The TCM module enables also a wired connection to Eltako actuators over the
  49393. Eltako RS485 bus in the switchboard or distribution box via Eltako FGW14 RS232-RS485
  49394. gateway modules. These actuators are linked to an associated wireless antenna module
  49395. (FAM14) on the bus. The FAM14 device frequently polls the actuator status of all
  49396. associated devices if the FAM14 operating mode rotary switch is on position 4.
  49397. Therefore, actuator states can be retrieved more reliable, even after any fhem downtime,
  49398. when switch events or actuator confirmations could not have been tracked during the
  49399. downtime. As all actuators are polled approx. every 1-2 seconds, it should be avoided to
  49400. use event-on-update-reading. Use instead either event-on-change-reading or
  49401. event-min-interval.
  49402. The Eltako bus uses the EnOcean Serial Protocol version 2 (ESP2). For this reason,
  49403. a FGW14 can be configured as a ESP2. The attribute <a href="#TCM_comType">comType</a>
  49404. must be set to RS485.<br><br>
  49405. <a name="TCMdefine"></a>
  49406. <b>Define</b>
  49407. <ul>
  49408. <code>define &lt;name&gt; TCM [ESP2|ESP3] &lt;device&gt;</code> <br>
  49409. <br>
  49410. First you have to specify the type of the EnOcean Transceiver Chip, i.e
  49411. either ESP2 for the TCM 120 or ESP3 for the TCM 310x, TCM 410J, USB 300, USB400J.<br><br>
  49412. <code>device</code> can take the same parameters (@baudrate, @directio,
  49413. TCP/IP, none) like the <a href="#CULdefine">CUL</a>, but you probably have
  49414. to specify the baudrate: the TCM 120 should be opened with 9600 Baud, the
  49415. TCM 310 with 57600 baud. For Eltako FGW14 devices, type has to be set to 120 and
  49416. the baudrate has to be set to 57600 baud if the FGW14 operating mode
  49417. rotary switch is on position 6.<br><br>
  49418. Example:
  49419. <ul><code>
  49420. define BscBor TCM ESP2 /dev/ttyACM0@9600<br>
  49421. define FGW14 TCM ESP2 /dev/ttyS3@57600<br>
  49422. define TCM310 TCM ESP3 /dev/ttyACM0@57600<br>
  49423. define TCM310 TCM ESP3 COM1@57600 (Windows)<br>
  49424. </code></ul>
  49425. </ul>
  49426. <br>
  49427. <a name="TCMset"></a>
  49428. <b>Set</b><br>
  49429. <ul><b>ESP2 (TCM 120)</b><br>
  49430. <li>baseID [FF800000 ... FFFFFF80]<br>
  49431. Set the BaseID.<br>
  49432. Note: The firmware executes this command only up to then times to prevent misuse.</li>
  49433. <li>modem_off<br>
  49434. Deactivates TCM modem functionality</li>
  49435. <li>modem_on [0000 ... FFFF]<br>
  49436. Activates TCM modem functionality and sets the modem ID</li>
  49437. <li>teach &lt;t/s&gt;<br>
  49438. Set Fhem in learning mode, see <a href="#TCM_learningMode">learningMode</a>.<br>
  49439. The command is always required for UTE and to teach-in bidirectional actuators
  49440. e. g. EEP 4BS (RORG A5-20-XX),
  49441. see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.</li>
  49442. <li>reset<br>
  49443. Reset the device</li>
  49444. <li>sensitivity [00|01]<br>
  49445. Set the TCM radio sensitivity: low = 00, high = 01</li>
  49446. <li>sleep<br>
  49447. Enter the energy saving mode</li>
  49448. <li>wake<br>
  49449. Wakes up from sleep mode</li>
  49450. <br>
  49451. For details see the TCM 120 User Manual available from <a href="http://www.enocean.com">www.enocean.com</a>.
  49452. <br><br>
  49453. </ul>
  49454. <ul><b>ESP3 (TCM 310x, TCM 410J, USB 300, USB400J)</b><br>
  49455. <li>baseID [FF800000 ... FFFFFF80]<br>
  49456. Set the BaseID.<br>
  49457. Note: The firmware executes this command only up to then times to prevent misuse.</li>
  49458. <li>baudrate [00|01|02|03]<br>
  49459. Modifies the baud rate of the EnOcean device.<br>
  49460. baudrate = 00: 56700 baud (default)<br>
  49461. baudrate = 01: 115200 baud<br>
  49462. baudrate = 02: 230400 baud<br>
  49463. baudrate = 03: 460800 baud</li>
  49464. <li>bist<br>
  49465. Perform Flash BIST operation (Built-in-self-test).</li>
  49466. <li>filterAdd &lt;FilterType&gt;&lt;FilterValue&gt;&lt;FilterKind&gt;<br>
  49467. Add filter to filter list. Description of the filter parameters and examples, see
  49468. <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
  49469. <li>filterDel &lt;FilterType&gt;&lt;FilterValue&gt;<br>
  49470. Del filter from filter list. Description of the filter parameters, see
  49471. <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
  49472. <li>filterDelAll<br>
  49473. Del all filter from filter list.</li>
  49474. <li>filterEnable &lt;FilterON/OFF&gt;&lt;FilterOperator&gt;<br>
  49475. Enable/Disable all supplied filters. Description of the filter parameters, see
  49476. <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
  49477. <li>init<br>
  49478. Initialize serial communication and transceiver configuration</li>
  49479. <li>maturity [00|01]<br>
  49480. Waiting till end of maturity time before received radio telegrams will transmit:
  49481. radio telegrams are send immediately = 00, after the maturity time is elapsed = 01</li>
  49482. <li>mode [00|01]<br>
  49483. mode = 00: Compatible mode - ERP1 - gateway uses Packet Type 1 to transmit and receive radio telegrams<br>
  49484. mode = 01: Advanced mode - ERP2 - gateway uses Packet Type 10 to transmit and receive radio telegrams
  49485. (for FSK products with advanced protocol)</li>
  49486. <li>smartAckLearn &lt;t/s&gt;<br>
  49487. Set Fhem in Smart Ack learning mode.<br>
  49488. The post master fuctionality must be activated using the command <code>smartAckMailboxMax</code> in advance.<br>
  49489. The simple learnmode is supported, see <a href="#TCM_smartAckLearnMode">smartAckLearnMode</a><br>
  49490. A device, which is then also put in this state is to paired with
  49491. Fhem. Bidirectional learn in for 4BS, UTE and Generic Profiles are supported.<br>
  49492. <code>t/s</code> is the time for the learning period.</li>
  49493. <li>smartAckMailboxMax 0..20<br>
  49494. Enable the post master fuctionality and set amount of mailboxes available, 0 = disable post master functionality.
  49495. Maximum 28 mailboxes can be created. This upper limit is for each firmware restricted and may be smaller.</li>
  49496. <li>teach &lt;t/s&gt;<br>
  49497. Set Fhem in learning mode for RBS, 1BS, 4BS, GP, STE and UTE teach-in / teach-out, see <a href="#TCM_learningMode">learningMode</a>.<br>
  49498. The command is always required for STE, GB, UTE and to teach-in bidirectional actuators
  49499. e. g. EEP 4BS (RORG A5-20-XX)</li>
  49500. <li>reset<br>
  49501. Reset the device</li>
  49502. <li>repeater [0000|0101|0102]<br>
  49503. Set Repeater Level: off = 0000, 1 = 0101, 2 = 0102.</li>
  49504. <li>sleep &lt;t/10 ms&gt; (Range: 00000000 ... 00FFFFFF)<br>
  49505. Enter the energy saving mode</li>
  49506. <li>subtel [00|01]<br>
  49507. Transmitting additional subtelegram info: Enable = 01, Disable = 00</li>
  49508. <br>
  49509. For details see the EnOcean Serial Protocol 3 (ESP3) available from
  49510. <a href="http://www.enocean.com">www.enocean.com</a>.
  49511. <br><br>
  49512. </ul>
  49513. <a name="TCMget"></a>
  49514. <b>Get</b><br>
  49515. <ul><b>TCM 120</b><br>
  49516. <li>baseID<br>
  49517. Get the BaseID. You need this command in order to control EnOcean devices,
  49518. see the <a href="#EnOceandefine">EnOcean</a> paragraph.
  49519. </li>
  49520. <li>modem_status<br>
  49521. Requests the current modem status.</li>
  49522. <li>sensitivity<br>
  49523. Get the TCM radio sensitivity, low = 00, high = 01</li>
  49524. <li>version<br>
  49525. Read the device SW version / HW version, chip-ID, etc.</li>
  49526. <br>
  49527. For details see the TCM 120 User Manual available from <a href="http://www.enocean.com">www.enocean.com</a>.
  49528. <br><br>
  49529. </ul>
  49530. <ul><b>TCM 310</b><br>
  49531. <li>baseID<br>
  49532. Get the BaseID. You need this command in order to control EnOcean devices,
  49533. see the <a href="#EnOceandefine">EnOcean</a> paragraph.</li>
  49534. <li>filter<br>
  49535. Get supplied filters. Description of the filter parameters, see
  49536. <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
  49537. <li>freqencyInfo<br>
  49538. Reads Frequency and protocol of the Device, see
  49539. <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
  49540. <li>numSecureDev<br>
  49541. Read number of teached in secure devices.</li>
  49542. <li>repeater<br>
  49543. Read Repeater Level: off = 0000, 1 = 0101, 2 = 0102.</li>
  49544. <li>smartAckLearnMode<br>
  49545. Get current smart ack learn mode<br>
  49546. Enable: 00|01 = off|on<br>
  49547. Extended: 00|01|02 = simple|advance|advanceSelectRep</li>
  49548. <li>smartAckLearnedClients<br>
  49549. Get information about the learned smart ack clients</li>
  49550. <li>stepCode<br>
  49551. Reads Hardware Step code and Revision of the Device, see
  49552. <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
  49553. <li>version<br>
  49554. Read the device SW version / HW version, chip-ID, etc.</li>
  49555. <br>
  49556. For details see the EnOcean Serial Protocol 3 (ESP3) available from
  49557. <a href="http://www.enocean.com">www.enocean.com</a>.
  49558. <br><br>
  49559. </ul>
  49560. <a name="TCMattr"></a>
  49561. <b>Attributes</b>
  49562. <ul>
  49563. <li><a name="TCM_blockSenderID">blockSenderID</a> &lt;own|no&gt;,
  49564. [blockSenderID] = own is default.<br>
  49565. Block receiving telegrams with a TCM SenderID sent by repeaters.
  49566. </li>
  49567. <li><a href="#attrdummy">dummy</a></li>
  49568. <li><a name="TCM_baseID">baseID</a> &lt;FF800000 ... FFFFFF80&gt;,
  49569. [baseID] = <none> is default.<br>
  49570. Set Transceiver baseID and override automatic allocation. Use this attribute only if the IODev does not allow automatic allocation.
  49571. </li>
  49572. <li><a name="TCM_fingerprint">fingerprint</a> &lt;off|on&gt;,
  49573. [fingerprint] = off is default.<br>
  49574. Activate the fingerprint function. The fingerprint function eliminates multiple identical data telegrams received via different TCM modules.<br>
  49575. The function must be activated for each TCM module.
  49576. </li>
  49577. <li><a name="TCM_comModeUTE">comModeUTE</a> &lt;auto|biDir|uniDir&gt;,
  49578. [comModeUTE] = auto is default.<br>
  49579. Presetting the communication method of actuators that be taught using the UTE teach-in. The automatic selection of the
  49580. communication method should only be overwrite manually, if this is explicitly required in the operating instructions of
  49581. the actuator. The parameters should then be immediately re-set to "auto".
  49582. </li>
  49583. <li><a name="TCM_comType">comType</a> &lt;TCM|RS485&gt;,
  49584. [comType] = TCM is default.<br>
  49585. Type of communication device
  49586. </li>
  49587. <li><a href="#do_not_notify">do_not_notify</a></li>
  49588. <li><a name="TCM_learningMode">learningMode</a> &lt;always|demand|nearfield&gt;,
  49589. [learningMode] = demand is default.<br>
  49590. Learning method for automatic setup of EnOcean devices:<br>
  49591. [learningMode] = always: Teach-In/Teach-Out telegrams always accepted, with the exception of bidirectional devices<br>
  49592. [learningMode] = demand: Teach-In/Teach-Out telegrams accepted if Fhem is in learning mode, see also <code>set &lt;IODev&gt; teach &lt;t/s&gt;</code><br>
  49593. [learningMode] = nearfield: Teach-In/Teach-Out telegrams accepted if Fhem is in learning mode and the signal strength RSSI >= -60 dBm.<be>
  49594. </li>
  49595. <li><a name="TCM_sendInterval">sendInterval</a> &lt;0 ... 250&gt;<br>
  49596. ESP2: [sendInterval] = 100 ms is default.<br>
  49597. ESP3: [sendInterval] = 0 ms is default.<br>
  49598. Smallest interval between two sending telegrams
  49599. </li>
  49600. <li><a name="TCM_smartAckLearnMode">smartAckLearnMode</a> &lt;simple|advance|advanceSelectRep&gt;<br>
  49601. select Smart Ack learn mode; only simple supported by Fhem
  49602. </li>
  49603. <li><a name="TCM_smartAckMailboxMax">smartAckMailboxMax</a> &lt;0 ... 28&gt;<br>
  49604. Amount of mailboxes available, 0 = disable post master functionality.
  49605. Maximum 28 mailboxes can be created. This upper limit is for each firmware restricted and may be smaller.
  49606. </li>
  49607. <li><a href="#verbose">verbose</a></li>
  49608. <br><br>
  49609. </ul>
  49610. <a name="TCMevents"></a>
  49611. <b>Generated events</b>
  49612. <ul>
  49613. <li>baseID &lt;transceiver response&gt;</li>
  49614. <li>maturity 00|01</li>
  49615. <li>modem_status &lt;transceiver response&gt;</li>
  49616. <li>numSecureDev &lt;transceiver response&gt;</li>
  49617. <li>repeater 0000|0101|0102</li>
  49618. <li>sensitivity 00|01</li>
  49619. <li>version &lt;transceiver response&gt;</li>
  49620. <li>state: opend|initialized</li>
  49621. <br><br>
  49622. </ul>
  49623. </ul>
  49624. <a name="TEK603"></a>
  49625. <h3>TEK603</h3>
  49626. <ul>
  49627. The TEK603 is a fhem module for the Tekelek TEK603 Eco Monitor a liquid level monitor designed for residential and small commercial applications.
  49628. It works in conjunction with a TEK653 Sonic transmitter mounted on the top of the tank.
  49629. <br /><br /><br />
  49630. <b>Prerequisites</b><br>
  49631. The module requires the perl module Digest::CRC<br />
  49632. On a debian based system the module can be installed with<br />
  49633. <code>
  49634. sudo apt-get install libdigest-crc-perl<br />
  49635. </code>
  49636. <br /><br />
  49637. <a name="TEK603_Define"></a>
  49638. <b>Define</b>
  49639. <ul>
  49640. <code>define &lt;name&gt; TEK603 /dev/ttyUSBx</code><br />
  49641. <br />
  49642. Defines an TEK603 Eco Monitor device connected to USB.<br /><br />
  49643. Examples:
  49644. <ul>
  49645. <code>define OelTank TEK603 /dev/ttyUSB0</code><br />
  49646. </ul>
  49647. </ul><br />
  49648. <a name="TEK603_Readings"></a>
  49649. <b>Readings</b>
  49650. <ul>
  49651. <li>Time<br />
  49652. TEK603 internal Time</li>
  49653. <li>Temperature<br />
  49654. Sensor Temperature</li>
  49655. <li>Ullage<br />
  49656. Sensor Measured Ullage</li>
  49657. <li>RemainingUsableLevel<br />
  49658. This is the usable level, with deductions due to the sensor offset and outlet height. (Liters)</li>
  49659. <li>RemainingUsablePercent<br />
  49660. This is the usable level in percent (calculated from RemainingUsableLevel and TotalUsableCapacity)</li>
  49661. <li>TotalUsableCapacity<br />
  49662. This is the usable volume, with deductions due to the sensor offset and outlet height. (Liters)</li>
  49663. </ul><br />
  49664. </ul><br />
  49665. <a name="THINKINGCLEANER" id="THINKINGCLEANER"></a>
  49666. <h3>THINKINGCLEANER</h3>
  49667. <ul>
  49668. This module provides support for <a href="http://www.thinkingcleaner.com/">ThinkingCleaner</a> hardware add-on module for Roomba cleaning robots.
  49669. <br><br>
  49670. <a name="THINKINGCLEANERdefine"></a>
  49671. <b>Define</b>
  49672. <ul><br>
  49673. <code>define &lt;name&gt; THINKINGCLEANER &lt;IP-ADRESS or HOSTNAME&gt;</code>
  49674. <br><br>
  49675. Example:
  49676. <ul><br>
  49677. <code>define Robby THINKINGCLEANER 192.168.0.35</code><br>
  49678. </ul>
  49679. <br>
  49680. </ul>
  49681. <br><br>
  49682. <a name="THINKINGCLEANERset"></a>
  49683. <b>Set</b>
  49684. <ul>
  49685. <li>cleaningDelay - sets cleaning delay in minutes when using on-delayed cleaning</li>
  49686. <li>damageProtection - turns damage protection on or off while sending remotrControl commands (on/off)</li>
  49687. <li>dock - Send Roomba back to it's docking station</li>
  49688. <li>locate - Play sound to help finding Roomba</li>
  49689. <li>off - Stop/pause cleaning</li>
  49690. <li>on - Start cleaning</li>
  49691. <li>on-delayed - Delayed start for cleaning according to cleaningDelay</li>
  49692. <li>on-max - Start cleaning with max setting</li>
  49693. <li>on-spot - Start spot cleaning</li>
  49694. <li>power - Turn Roomba on or off (on/off)</li>
  49695. <li>remoteControl - Send remote control commands</li>
  49696. <li>scheduleAdd - Add new cleaning schedule</li>
  49697. <li>scheduleDel - Delete existing cleaning schedule</li>
  49698. <li>scheduleMod - Modify existing cleaning schedule</li>
  49699. <li>statusRequest - Update device readings</li>
  49700. <li>toggle - Toogle between on and off</li>
  49701. <li>undock - Let Roomba leave it's docking station</li>
  49702. <li>vacuumDrive - Enable or disable vaccuming during remoteControl commands (on/off)</li>
  49703. </ul>
  49704. <br><br>
  49705. <a name="THINKINGCLEANERattr"></a>
  49706. <b>Attributes</b>
  49707. <ul>
  49708. <li>pollInterval - Set regular polling interval in minutes (defaults to 45s)</li>
  49709. <li>pollMultiplierCleaning - Change interval multiplier used during cleaning (defaults to 0.5)</li>
  49710. <li>pollMultiplierWebhook - Change interval multiplier used during standby and webhook being enabled (defaults to 2)</li>
  49711. <li>webhookFWinstance - Set FHEMWEB instance for incoming webhook events used by Roomba (mandatory for webhook)</li>
  49712. <li>webhookHttpHostname - Set HTTP Hostname or IP address for incoming webhook events used by Roomba (mandatory for webhook)</li>
  49713. <li>webhookPort - Use different port instead of what defined FHEMWEB instance uses (optional)</li>
  49714. </ul>
  49715. <br><br>
  49716. </ul>
  49717. <a name="THRESHOLD"></a>
  49718. <h3>THRESHOLD</h3>
  49719. <ul>
  49720. Diverse controls can be realized by means of the module by evaluation of sensor data.
  49721. In the simplest case, this module reads any sensor that provides values in decimal and execute FHEM/Perl commands, if the value of the sensor is higher or lower than the threshold value.
  49722. A typical application is the simulation of a thermostat or humidistat.<br>
  49723. <br>
  49724. With one or more such modules, complex systems can be implemented for heating, cooling, ventilation, dehumidification or shading.
  49725. But even simple notification when crossing or falling below a specific value can be easily realized. It no if-statements in Perl or notify definitions need to be made.
  49726. This leads to quickly create and clear controls, without having to necessarily go into the Perl matter.<br>
  49727. Some application examples are at the end of the module description.<br>
  49728. <br>
  49729. According to the definition of a module type THRESHOLD eg:<br>
  49730. <br>
  49731. <code>define &lt;name&gt; THRESHOLD &lt;sensor&gt; &lt;actor&gt;</code><br>
  49732. <br>
  49733. It is controlled by setting a desired value with:<br>
  49734. <br>
  49735. <code>set &lt;name&gt; desired &lt;value&gt;</code><br>
  49736. <br>
  49737. The module begins with the control system only when a desired value is set!<br>
  49738. <br>
  49739. The specification of the desired value may also come from another sensor. This control may take place by the comparison of two sensors.<br>
  49740. <br>
  49741. Likewise, any wall thermostats can be used (eg, HM, MAX, FHT) for the definition of the reference temperature.<br>
  49742. <br>
  49743. The switching behavior can also be influenced by another sensor or sensor group.<br>
  49744. <br>
  49745. The combination of multiple THRESHOLD modules together is possible, see examples below.<br>
  49746. <br>
  49747. </ul>
  49748. <a name="THRESHOLDdefine"></a>
  49749. <b>Define</b>
  49750. <ul>
  49751. <br>
  49752. <code>define &lt;name&gt; THRESHOLD &lt;sensor&gt;:&lt;reading&gt;:&lt;hysteresis&gt;:&lt;target_value&gt;:&lt;offset&gt; AND|OR &lt;sensor2&gt;:&lt;reading2&gt;:&lt;state&gt; &lt;actor&gt;|&lt;cmd1_gt&gt;|&lt;cmd2_lt&gt;|&lt;cmd_default_index&gt;|&lt;state_cmd1_gt&gt;:&lt;state_cmd2_lt&gt;|&lt;state_format&gt;</code><br>
  49753. <br>
  49754. <br>
  49755. <li><b>sensor</b><br>
  49756. a defined sensor in FHEM
  49757. </li>
  49758. <br>
  49759. <li><b>reading</b> (optional)<br>
  49760. reading of the sensor, which includes a value in decimal<br>
  49761. default value: temperature
  49762. </li>
  49763. <br>
  49764. <li><b>hysteresis</b> (optional)<br>
  49765. Hysteresis, this provides the threshold_min = desired_value - hysteresis<br>
  49766. default value: 1 at temperature, 10 at huminity
  49767. </li>
  49768. <br>
  49769. <li><b>target_value</b> (optional)<br>
  49770. number: Initial value, if no value is specified, it must be set with "set desired value".<br>
  49771. else:&lt;sensorname&gt;:&lt;reading&gt, an additional sensor can be specified, which sets the target value dynamically.<br>
  49772. default value: no value
  49773. </li>
  49774. <br>
  49775. <li><b>offset</b> (optional)<br>
  49776. Offset to desired value<br>
  49777. This results:<br>
  49778. threshold_max = desired_value + offset and threshold_min = desired_value - hysteresis + offset<br>
  49779. Defaultwert: 0<br>
  49780. </li>
  49781. <br>
  49782. <br>
  49783. <li><b>AND|OR</b> (optional)<br>
  49784. logical operator with an optional second sensor<br>
  49785. </li>
  49786. <br>
  49787. <li><b>sensor2</b> (optional, nur in Verbindung mit AND oder OR)<br>
  49788. the second sensor
  49789. </li>
  49790. <br>
  49791. <li><b>reading2</b> (optional)<br>
  49792. reading of the second sensor<br>
  49793. default value: state
  49794. </li>
  49795. <br>
  49796. <li><b>state</b> (optional)<br>
  49797. state of the second sensor<br>
  49798. default value: open
  49799. </li><br>
  49800. <br>
  49801. <li><b>actor</b> (optional)<br>
  49802. actor device defined in FHEM
  49803. </li>
  49804. <br>
  49805. <li><b>cmd1_gt</b> (optional)<br>
  49806. FHEM/Perl command that is executed, if the value of the sensor is higher than desired value and/or the value of sensor 2 is matchted. @ is a placeholder for the specified actor.<br>
  49807. default value: set actor off, if actor defined
  49808. </li>
  49809. <br>
  49810. <li><b>cmd2_lt</b> (optional)<br>
  49811. FHEM/Perl command that is executed, if the value of the sensor is lower than threshold_min or the value of sensor 2 is not matchted. @ is a placeholder for the specified actor.<br>
  49812. default value: set actor on, if actor defined
  49813. </li>
  49814. <br>
  49815. <li><b>cmd_default_index</b> (optional)<br>
  49816. Index of command that is executed after setting the desired value until the desired value or threshold_min value is reached.<br>
  49817. 0 - no command<br>
  49818. 1 - cmd1_gt<br>
  49819. 2 - cmd2_lt<br>
  49820. default value: 2, if actor defined, else 0<br>
  49821. </li>
  49822. <br>
  49823. <li><b>state_cmd1_gt</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
  49824. state, which is displayed, if FHEM/Perl-command cmd1_gt was executed. If state_cmd1_gt state ist set, other states, such as active or deactivated are suppressed.
  49825. <br>
  49826. default value: none
  49827. </li>
  49828. <br>
  49829. <li><b>state_cmd2_lt</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
  49830. state, which is displayed, if FHEM/Perl-command cmd1_gt was executed. If state_cmd1_gt state ist set, other states, such as active or deactivated are suppressed.
  49831. <br>
  49832. default value: none
  49833. </li>
  49834. <br>
  49835. <li><b>state_format</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
  49836. Format of the state output: arbitrary text with placeholders.<br>
  49837. Possible placeholders:<br>
  49838. _m: mode<br>
  49839. _dv: desired_value<br>
  49840. _s1v: sensor_value<br>
  49841. _s2s: sensor2_state<br>
  49842. _sc: state_cmd<br>
  49843. Default value: _m _dv _sc, _sc when state_cmd1_gt and state_cmd2_lt set without actor.<br><br>
  49844. </li>
  49845. <br>
  49846. <b><u>Examples:</u></b><br>
  49847. <br>
  49848. Example for heating:<br>
  49849. <br>
  49850. It is heated up to the desired value of 20. If the value below the threshold_min value of 19 (20-1)
  49851. the heating is switched on again.<br>
  49852. <br>
  49853. <code>define thermostat THRESHOLD temp_sens heating</code><br>
  49854. <br>
  49855. <code>set thermostat desired 20</code><br>
  49856. <br>
  49857. <br>
  49858. Example for heating with window contact:<br>
  49859. <br>
  49860. <code>define thermostat THRESHOLD temp_sens OR win_sens heating</code><br>
  49861. <br>
  49862. <br>
  49863. Example for heating with multiple window contacts:<br>
  49864. <br>
  49865. <code>define W_ALL structure W_type W1 W2 W3 ....</code><br>
  49866. <code>attr W_ALL clientstate_behavior relative</code><br>
  49867. <code>attr W_ALL clientstate_priority open closed</code><br>
  49868. <br>
  49869. then: <br>
  49870. <br>
  49871. <code>define thermostat THRESHOLD S1 OR W_ALL heating</code><br>
  49872. <br>
  49873. <br>
  49874. More examples for dehumidification, air conditioning, watering:<br>
  49875. <br>
  49876. <code>define hygrostat THRESHOLD hym_sens:humidity dehydrator|set @ on|set @ off|1</code><br>
  49877. <code>define hygrostat THRESHOLD hym_sens:humidity AND Sensor2:state:close dehydrator|set @ on|set @ off|1</code><br>
  49878. <code>define thermostat THRESHOLD temp_sens:temperature:1 aircon|set @ on|set @ off|1</code><br>
  49879. <code>define thermostat THRESHOLD temp_sens AND Sensor2:state:close aircon|set @ on|set @ off|1</code><br>
  49880. <code>define hygrostat THRESHOLD hym_sens:humidity:20 watering|set @ off|set @ on|2</code><br>
  49881. <br>
  49882. <br>
  49883. It can also FHEM/perl command chains are specified:<br>
  49884. <br>
  49885. Examples:<br>
  49886. <br>
  49887. <code>define thermostat THRESHOLD sensor |set Switch1 on;;set Switch2 on|set Switch1 off;;set Switch2 off|1</code><br>
  49888. <code>define thermostat THRESHOLD sensor alarm|{Log 2,"value is exceeded"}|set @ on;;set Switch2 on</code><br>
  49889. <code>define thermostat THRESHOLD sensor ||{Log 2,"value is reached"}|</code><br>
  49890. <br>
  49891. <br>
  49892. Examples of the reference input by another sensor:<br>
  49893. <br>
  49894. Hot water circulation: The return temperature is 5 degrees (offset) below the hot water tank temperature and can vary by up to 4 degrees (hysteresis).<br>
  49895. <br>
  49896. <code>define TH_water_circulation THRESHOLD return_w:temperature:4:water_storage:temperature:-5 circualtion_pump</code><br>
  49897. <br>
  49898. Control of heating by a wall thermostat with acquisition the desired and actual temperature from the wall thermostat:<br>
  49899. <br>
  49900. <code>define TH_heating THRESHOLD WT:measured-temp:1:WT:desired-temp heating</code><br>
  49901. <br>
  49902. <code>set TH_heating desired 17</code> overrides the desired-values from the wall thermostat until called <code>set TH_heating external</code><br>
  49903. <br>
  49904. <br>
  49905. Examples of customized state output:<br>
  49906. <br>
  49907. <code>define thermostat THRESHOLD sensor aircon|set @ on|set @ off|2|on:off</code><br>
  49908. <br>
  49909. <br>
  49910. Example of state output (eg for state evaluation in other modules) without executing code:<br>
  49911. <br>
  49912. <code>define thermostat THRESHOLD sensor:temperature:0:30</code><br>
  49913. <br>
  49914. by reason of default values​​:<br>
  49915. <br>
  49916. <code>define thermostat THRESHOLD sensor:temperature:0:30||||off:on|_sc</code><br>
  49917. <br>
  49918. <br>
  49919. Example of combining several THRESHOLD modules together:<br>
  49920. <br>
  49921. It should be heated when the room temperature drops below 21 degrees and the outside temperature is below 15 degrees:<br>
  49922. <br>
  49923. <code>define TH_outdoor THRESHOLD outdoor:temperature:0:15</code><br>
  49924. <code>define TH_room THRESHOLD indoor OR TH_outdoor:state:off heating</code><br>
  49925. <code>set TH_room desired 21</code><br>
  49926. <br>
  49927. <br>
  49928. An example of time-dependent heating in combination with DOIF module:<br>
  49929. <br>
  49930. <code>define TH_room THRESHOLD T_living_room heating</code><br>
  49931. <code>define di_room DOIF ([05:30-23:00|8] or [07:00-23:00|7]) (set TH_room desired 20) DOELSE (set TH_room desired 18)</code><br>
  49932. <br>
  49933. <br>
  49934. Examples of customized state output:<br>
  49935. <br>
  49936. State output: &lt;mode&gt; &lt;state_cmd&gt; &lt;desired_value&gt; &lt;sensor_value&gt;<br>
  49937. <br>
  49938. <code>define TH_living_room THRESHOLD T_living_room heating|set @ off|set @ on|2|off:on|_m _sc _dv _s1v</code><br>
  49939. <br>
  49940. or<br>
  49941. <br>
  49942. <code>define TH_living_room THRESHOLD T_living_room heating</code><br>
  49943. <code>attr TH_living_room state_cmd1_gt off</code><br>
  49944. <code>attr TH_living_room state_cmd2_lt on</code><br>
  49945. <code>attr TH_living_room state_format _m _sc _dv _s1v</code><br>
  49946. <br>
  49947. </ul>
  49948. <a name="THRESHOLDset"></a>
  49949. <b>Set </b>
  49950. <ul>
  49951. <li> <code>set &lt;name&gt; desired &lt;value&gt;<br></code>
  49952. Set the desired value. If no desired value is set, the module is not active.
  49953. </li>
  49954. <br>
  49955. <li><code>set &lt;name&gt; deactivated &lt;command&gt;<br></code>
  49956. Module is disabled.<br>
  49957. &lt;command&gt; is optional. It can be "cmd1_gt" or "cmd2_lt" passed in order to achieve a defined state before disabling the module.
  49958. </li>
  49959. <br>
  49960. <li> <code>set &lt;name&gt; active &lt;value&gt;<br></code>
  49961. Module is activated. If under target_value a sensor for reference input has been defined, the current setpoint will be inhibited until set "set <name> external".
  49962. </li>
  49963. <br>
  49964. <li><code>set &lt;name&gt; externel<br></code>
  49965. Module is activated, reference input comes from the target sensor, if a sensor has been defined under target_value.<br>
  49966. </li>
  49967. <br>
  49968. <li> <code>set &lt;name&gt; hysteresis &lt;value&gt;<br></code>
  49969. Set hysteresis value.
  49970. </li>
  49971. <br>
  49972. <li><code>set &lt;name&gt; offset &lt;value&gt;<br></code>
  49973. Set offset value.<br>
  49974. Defaultwert: 0
  49975. </li>
  49976. <br>
  49977. <li><code>set &lt;name&gt; cmd1_gt</code><br>
  49978. Executes the command defined in cmd1_gt.<br>
  49979. </li>
  49980. <br>
  49981. <li><code>set &lt;name&gt; cmd2_lt</code><br>
  49982. Executes the command defined in cmd2_lt.<br>
  49983. </li>
  49984. </ul>
  49985. <br>
  49986. <a name="THRESHOLDget"></a>
  49987. <b>Get </b>
  49988. <ul>
  49989. N/A
  49990. </ul>
  49991. <br>
  49992. <a name="THRESHOLDattr"></a>
  49993. <b>Attributes</b>
  49994. <ul>
  49995. <li><a href="#disable">disable</a></li>
  49996. <li><a href="#loglevel">loglevel</a></li>
  49997. <li>state_cmd1_gt</li>
  49998. <li>state_cmd2_lt</li>
  49999. <li>state_format</li>
  50000. <li>number_format</li>
  50001. The specified format is used in the state for formatting desired_value (_dv) and Sensor_value (_s1v) using the sprintf function.<br>
  50002. The default value is "% .1f" to one decimal place. Other formatting, see Formatting in the sprintf function in the Perldokumentation.<br>
  50003. If the attribute is deleted, numbers are not formatted in the state.<br>
  50004. <li>target_func</li>
  50005. Here, a Perl expression used to calculate a target value from a value of the external sensor.<br>
  50006. The sensor value is given as "_tv" in the expression.<br>
  50007. Example:<br>
  50008. <code>attr TH_heating target_func -0.578*_tv+33.56</code><br>
  50009. <li>setOnDeactivated</li>
  50010. Command to be executed before deactivating. Possible values: cmd1_gt, cmd2_lt<br>
  50011. <li>desiredActivate</li>
  50012. If the attribute is set to 1, a disabled module is automatically activated by "set ... desired <value>". "set ... active" is not needed in this case.<br>
  50013. </ul>
  50014. <br>
  50015. <a name="THZ"></a>
  50016. <h3>THZ</h3>
  50017. <ul>
  50018. THZ module: comunicate through serial interface RS232/USB (eg /dev/ttyxx) or through ser2net (e.g 10.0.x.x:5555) with a Tecalor/Stiebel Eltron heatpump. <br>
  50019. Tested on a THZ303/Sol (with serial speed 57600/115200@USB) and a THZ403 (with serial speed 115200) with the same Firmware 4.39. <br>
  50020. Tested on a LWZ404 (with serial speed 115200) with Firmware 5.39. <br>
  50021. Tested on fritzbox, nas-qnap, raspi and macos.<br>
  50022. Implemented: read of status parameters and read/write of configuration parameters.
  50023. A complete description can be found in the 00_THZ wiki http://www.fhemwiki.de/wiki/Tecalor_THZ_Heatpump
  50024. <br><br>
  50025. <a name="THZdefine"></a>
  50026. <b>Define</b>
  50027. <ul>
  50028. <code>define &lt;name&gt; THZ &lt;device&gt;</code> <br>
  50029. <br>
  50030. <code>device</code> can take the same parameters (@baudrate, @directio,
  50031. TCP/IP, none) like the <a href="#CULdefine">CUL</a>, e.g 57600 baud or 115200.<br>
  50032. Example:
  50033. direct connection
  50034. <ul><code>
  50035. define Mytecalor THZ /dev/ttyUSB0@115200<br>
  50036. </code></ul>
  50037. or network connection (like via ser2net)<br>
  50038. <ul><code>
  50039. define Myremotetecalor THZ 192.168.0.244:2323
  50040. </code></ul>
  50041. <br>
  50042. <ul><code>
  50043. define Mythz THZ /dev/ttyUSB0@115200 <br>
  50044. define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz <br>
  50045. attr Mythz event-min-interval s.*:4800 <br>
  50046. attr Mythz event-on-change-reading .* <br>
  50047. attr Mythz interval_sDHW 400 <br>
  50048. attr Mythz interval_sElectrDHWDay 2400 <br>
  50049. attr Mythz interval_sElectrDHWTotal 43200 <br>
  50050. attr Mythz interval_sGlobal 400 <br>
  50051. attr Mythz interval_sHC1 400 <br>
  50052. attr Mythz interval_sHeatDHWDay 2400 <br>
  50053. attr Mythz interval_sHeatDHWTotal 43200 <br>
  50054. attr Mythz interval_sHeatRecoveredDay 2400 <br>
  50055. attr Mythz interval_sHeatRecoveredTotal 43200 <br>
  50056. attr Mythz interval_sHistory 86400 <br>
  50057. attr Mythz interval_sLast10errors 86400 <br>
  50058. attr Mythz room pompa <br>
  50059. attr FileLog_Mythz room pompa <br>
  50060. </code></ul>
  50061. <br>
  50062. If the attributes interval_XXXX are not defined (or 0 seconds), their internal polling is disabled.
  50063. <br>
  50064. This module is starting to support older firmware 2.06 or newer firmware 5.39; the following attribute adapts decoding <br>
  50065. <br>
  50066. <ul><code>
  50067. attr Mythz firmware 2.06 <br>
  50068. </code></ul>
  50069. <br>
  50070. <br>
  50071. <ul><code>
  50072. attr Mythz firmware 5.39 <br>
  50073. </code></ul>
  50074. <br>
  50075. If no attribute firmware is set, it is assumed your firmware is compatible with 4.39.
  50076. <br>
  50077. A backup function has been implemented
  50078. <ul><code>
  50079. get Mythz zBackupParameters implemented
  50080. </code></ul>
  50081. The command saves all pXXX in a backupfile with a special text format.
  50082. All (or some) parameters can be easily restored with one copy&paste from the backupfile in a telnet fhem session.
  50083. </ul>
  50084. <br>
  50085. </ul>
  50086. <a name="TPLinkHS110"></a>
  50087. <h3>TPLinkHS110</h3>
  50088. <ul>
  50089. <br>
  50090. <a name="TPLinkHS110"></a>
  50091. <b>Define</b>
  50092. <code>define &lt;name&gt; TPLinkHS110 &lt;ip/hostname&gt;</code><br>
  50093. <br>
  50094. Defines a TP-Link HS100 or HS110 wifi-controlled switchable power outlet.<br>
  50095. The difference between HS100 and HS110 is, that the HS110 provides realtime measurments of<br>
  50096. power, current and voltage.<br>
  50097. This module automatically detects the modul defined and adapts the readings accordingly.<br>
  50098. <br><br>
  50099. This module does not implement all functions of the HS100/110.<br>
  50100. Currently, all parameters relevant for running the outlet under FHEM are processed.<br>
  50101. Writeable are only "On", "Off" and the nightmode (On/Off) (Nightmode: the LEDs of the outlet are switched off).<br>
  50102. Further programming of the outlet should be done by TPLinks app "Kasa", which funtionality is partly redundant<br>
  50103. with FHEMs core functions.
  50104. <p>
  50105. <b>Attributs</b>
  50106. <ul>
  50107. <li><b>interval</b>: The interval in seconds, after which FHEM will update the current measurements. Default: 300s</li>
  50108. An update of the measurements is done on each switch (On/Off) as well.
  50109. <p>
  50110. <li><b>timeout</b>: Timeout in seconds used while communicationg with the outlet. Default: 1s</li>
  50111. <i>Warning:</i>: the timeout of 1s is chosen fairly aggressive. It could lead to errors, if the outlet is not answerings the requests
  50112. within this timeout.<br>
  50113. Please consider, that raising the timeout could mean blocking the whole FHEM during the timeout!
  50114. <p>
  50115. <li><b>disable</b>: The execution of the module is suspended. Default: no.</li>
  50116. <i>Warning: if your outlet is not on or not connected to the wifi network, consider disabling this module
  50117. by the attribute "disable". Otherwise the cyclic update of the outlets measurments will lead to blockings in FHEM.</i>
  50118. </ul>
  50119. <p>
  50120. <b>Requirements</b>
  50121. <ul>
  50122. This module uses the follwing perl-modules:<br><br>
  50123. <li> Perl Module: IO::Socket::INET </li>
  50124. <li> Perl Module: IO::Socket::Timeout </li>
  50125. </ul>
  50126. </ul>
  50127. <a name="TRAFFIC"></a>
  50128. <h3>TRAFFIC</h3>
  50129. <ul>
  50130. <u><b>TRAFFIC - google maps directions module</b></u>
  50131. <br>
  50132. <br>
  50133. This FHEM module collects and displays data obtained via the google maps directions api<br>
  50134. requirements:<br>
  50135. perl JSON module<br>
  50136. perl LWP::SIMPLE module<br>
  50137. perl MIME::Base64 module<br>
  50138. Google maps API key<br>
  50139. <br>
  50140. <b>Features:</b>
  50141. <br>
  50142. <ul>
  50143. <li>get distance between start and end location</li>
  50144. <li>get travel time for route</li>
  50145. <li>get travel time in traffic for route</li>
  50146. <li>define additional waypoints</li>
  50147. <li>calculate delay between travel-time and travel-time-in-traffic</li>
  50148. <li>choose default language</li>
  50149. <li>disable the device</li>
  50150. <li>5 log levels</li>
  50151. <li>get outputs in seconds / meter (raw_data)</li>
  50152. <li>state of google maps returned in error reading (i.e. The provided API key is invalid)</li>
  50153. <li>customize update interval (default 3600 seconds)</li>
  50154. <li>calculate ETA with localtime and delay</li>
  50155. <li>configure the output readings with attribute outputReadings, text, min sec</li>
  50156. <li>configure the state-reading </li>
  50157. <li>optionally display the same route in return</li>
  50158. <li>one-time-burst, specify the amount and interval between updates</li>
  50159. <li>different Travel Modes (driving, walking, bicycling and transit)</li>
  50160. <li>flexible update schedule</li>
  50161. <li>integrated Map to visualize configured route or embed to external GUI</li>
  50162. </ul>
  50163. <br>
  50164. <br>
  50165. <a name="TRAFFICdefine"></a>
  50166. <b>Define:</b>
  50167. <ul><br>
  50168. <code>define &lt;name&gt; TRAFFIC &lt;YOUR-API-KEY&gt; [UPDATE-INTERVAL]</code>
  50169. <br><br>
  50170. example:<br>
  50171. <code>define muc2berlin TRAFFIC ABCDEFGHIJKLMNOPQRSTVWYZ 600</code><br>
  50172. </ul>
  50173. <br>
  50174. <br>
  50175. <b>Attributes:</b>
  50176. <ul>
  50177. <li>"start_address" - Street, zipcode City <b>(mandatory)</b></li>
  50178. <li>"end_address" - Street, zipcode City <b>(mandatory)</b></li>
  50179. <li>"raw_data" - 0:1</li>
  50180. <li>"language" - de, en etc.</li>
  50181. <li>"waypoints" - Lat, Long coordinates, separated by | </li>
  50182. <li>"returnWaypoints" - Lat, Long coordinates, separated by | </li>
  50183. <li>"disable" - 0:1</li>
  50184. <li>"stateReading" - name the reading which will be used in device state</li>
  50185. <li>"outputReadings" - define what kind of readings you want to get: text, min, sec, average</li>
  50186. <li>"updateSchedule" - define a flexible update schedule, syntax &lt;starthour&gt;-&lt;endhour&gt; [&lt;day&gt;] &lt;seconds&gt; , multiple entries by sparated by |<br> <i>example:</i> 7-9 1 120 - Monday between 7 and 9 every 2minutes <br> <i>example:</i> 17-19 120 - every Day between 17 and 19 every 2minutes <br> <i>example:</i> 6-8 1 60|6-8 2 60|6-8 3 60|6-8 4 60|6-8 5 60 - Monday till Friday, 60 seconds between 6 and 8 am</li>
  50187. <li>"travelMode" - default: driving, options walking, bicycling or transit </li>
  50188. <li>"GoogleMapsStyle" - choose your colors from: default,silver,dark,night</li>
  50189. <li>"GoogleMapsSize" - Map size in pixel, &lt;width&gt;,&lt;height&gt;</li>
  50190. <li>"GoogleMapsCenter" - Lat, Long coordinates of your map center, spearated by ,</li>
  50191. <li>"GoogleMapsZoom" - sets your map zoom level</li>
  50192. <li>"GoogleMapsStroke" - customize your map poly-strokes in color, weight and opacity <br> &lt;hex-color-code&gt;,[stroke-weight],[stroke-opacity],&lt;hex-color-code-of-return&gt;,[stroke-weight-of-return],[stroke-opacity-of-return]<br>must beginn with #color of each stroke, weight and opacity is optional<br><i>example:</i> #019cdf,#ffeb19<br><i>example:</i> #019cdf,20,#ffeb19<br><i>example:</i> #019cdf,20,#ffeb19,15<br><i>example:</i> #019cdf,#ffeb19,15<br><i>example:</i> #019cdf,20,80,#ffeb19<br><i>example:</i> #019cdf,#ffeb19,15,50<br><i>example:</i> #019cdf,20,80<br><i>default:</i> #4cde44,6,100,#FF0000,1,100</li>
  50193. <li>"GoogleMapsTrafficLayer" - enable the basic Google Maps Traffic Layer</li>
  50194. <li>"GoogleMapsDisableUI" - hide the map controls</li>
  50195. </ul>
  50196. <br>
  50197. <br>
  50198. <a name="TRAFFICreadings"></a>
  50199. <b>Readings:</b>
  50200. <ul>
  50201. <li>delay </li>
  50202. <li>distance </li>
  50203. <li>duration </li>
  50204. <li>duration_in_traffic </li>
  50205. <li>state </li>
  50206. <li>eta</li>
  50207. <li>delay_min</li>
  50208. <li>duration_min</li>
  50209. <li>duration_in_traffic_min</li>
  50210. <li>error_message</li>
  50211. </ul>
  50212. <br><br>
  50213. <a name="TRAFFICset"></a>
  50214. <b>Set</b>
  50215. <ul>
  50216. <li>update [burst-update-count] [burst-update-interval] - update readings manually</li>
  50217. </ul>
  50218. <br><br>
  50219. </ul>
  50220. <a name="TRX"></a>
  50221. <h3>TRX</h3>
  50222. <ul>
  50223. <table>
  50224. This module is for the <a href="http://www.rfxcom.com">RFXCOM</a> RFXtrx433 USB based 433 Mhz RF transmitters.
  50225. This USB based transmitter is able to receive and transmit many protocols like Oregon Scientific weather sensors, X10 security and lighting devices, ARC ((address code wheels) HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO,
  50226. AB600, Duewi, DomiaLite, COCO) and others. <br>
  50227. Currently the following parser modules are implemented: <br>
  50228. <ul>
  50229. <li> 46_TRX_WEATHER.pm (see device <a href="#TRX">TRX</a>): Process messages Oregon Scientific weather sensors.
  50230. See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> for a list of
  50231. Oregon Scientific weather sensors that could be received by the RFXtrx433 tranmitter.
  50232. Until now the following Oregon Scientific weather sensors have been tested successfully: BTHR918, BTHR918N, PCR800, RGR918, THGR228N, THGR810, THR128, THWR288A, WTGR800, WGR918. It will also work with many other Oregon sensors supported by RFXtrx433. Please give feedback if you use other sensors.<br>
  50233. </li>
  50234. <li> 46_TRX_SECURITY.pm (see device <a href="#TRX_SECURITY">TRX_SECURITY</a>): Receive X10, KD101 and Visonic security sensors.</li>
  50235. <li> 46_TRX_LIGHT.pm (see device <a href="#RFXX10REC">RFXX10REC</a>): Process X10, ARC, ELRO AB400D, Waveman, Chacon EMW200, IMPULS, RisingSun, Philips SBC, AC, HomeEasy EU and ANSLUT lighting devices (switches and remote control). ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. AC is the protocol used by different brands with units having a learning mode button:
  50236. KlikAanKlikUit, NEXA, CHACON, HomeEasy UK.</li>
  50237. </ul>
  50238. <br>
  50239. Note: this module requires the Device::SerialPort or Win32::SerialPort module
  50240. if the devices is connected via USB or a serial port.
  50241. <br><br>
  50242. <a name="TRXdefine"></a>
  50243. <b>Define</b>
  50244. <ul>
  50245. <code>define &lt;name&gt; TRX &lt;device&gt; [noinit] </code><br>
  50246. </ul>
  50247. <br>
  50248. USB-connected:<br><ul>
  50249. &lt;device&gt; specifies the USB port to communicate with the RFXtrx433 receiver.
  50250. Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
  50251. For example /dev/ttyUSB0. Please note that RFXtrx433 normally operates at 38400 baud. You may specify the baudrate used after the @ char.<br>
  50252. <br>
  50253. Example: <br>
  50254. <code>define RFXTRXUSB TRX /dev/ttyUSB0@38400</code>
  50255. <br>
  50256. </ul>
  50257. <br>
  50258. Network-connected devices:
  50259. <br><ul>
  50260. &lt;device&gt; specifies the host:port of the device. E.g.
  50261. 192.168.1.5:10001
  50262. </ul>
  50263. <ul>
  50264. noninit is optional and issues that the RFXtrx433 device should not be
  50265. initialized. This is useful if you share a RFXtrx433 device via LAN. It is
  50266. also useful for testing to simulate a RFXtrx433 receiver via netcat or via
  50267. FHEM2FHEM.
  50268. <br>
  50269. <br>
  50270. Example: <br>
  50271. <code>define RFXTRXTCP TRX 192.168.1.5:10001</code>
  50272. <br>
  50273. <code>define RFXTRXTCP2 TRX 192.168.1.121:10001 noinit</code>
  50274. <br>
  50275. </ul>
  50276. <br>
  50277. </table>
  50278. <a name="TRXattr"></a>
  50279. <b>Attributes</b>
  50280. <ul>
  50281. <li><a href="#attrdummy">dummy</a></li><br>
  50282. <li>longids<br>
  50283. Comma separated list of device-types for TRX_WEATHER that should be handled using long IDs. This additional ID is a one byte hex string and is generated by the Oregon sensor when is it powered on. The value seems to be randomly generated. This has the advantage that you may use more than one Oregon sensor of the same type even if it has no switch to set a sensor id. For example the author uses two BTHR918N sensors at the same time. All have different deviceids. The drawback is that the deviceid changes after changing batteries. All devices listed as longids will get an additional one byte hex string appended to the device name.<br>
  50284. Default is to use no long IDs.
  50285. <br><br>
  50286. Examples:<PRE>
  50287. # Do not use any long IDs for any devices (this is default):
  50288. attr RFXCOMUSB longids 0
  50289. # Use long IDs for all devices:
  50290. attr RFXCOMUSB longids 1
  50291. # Use longids for BTHR918N devices.
  50292. # Will generate devices names like BTHR918N_f3.
  50293. attr RFXTRXUSB longids BTHR918N
  50294. # Use longids for TX3_T and TX3_H devices.
  50295. # Will generate devices names like TX3_T_07, TX3_T_01 ,TX3_H_07.
  50296. attr RFXTRXUSB longids TX3_T,TX3_H</PRE>
  50297. </li><br>
  50298. <li>rssi<br>
  50299. 1: enable RSSI logging, 0: disable RSSI logging<br>
  50300. Default is no RSSI logging.
  50301. <br><br>
  50302. Examples:<PRE>
  50303. # Do log rssi values (this is default):
  50304. attr RFXCOMUSB rssi 0
  50305. # Enable rssi logging for devices:
  50306. attr RFXCOMUSB rssi 1
  50307. </li><br>
  50308. </ul>
  50309. <br>
  50310. </ul>
  50311. <a name="TRX_ELSE"></a>
  50312. <h3>TRX_ELSE</h3>
  50313. <ul>
  50314. The TRX_ELSE module is invoked by TRX if a code is received by RFXCOM RFXtrx433 RF receiver that is currently not handled by a TRX_-Module. You need to define an RFXtrx433 receiver first.
  50315. See <a href="#TRX">TRX</a>.
  50316. <br>
  50317. <a name="TRX_SECURITYdefine"></a>
  50318. <br>
  50319. <b>Define</b>
  50320. <ul>
  50321. <code>define &lt;name&gt; TRX_ELSE &lt;hextype&gt;</code> <br>
  50322. <br>
  50323. <code>&lt;hextype&gt;</code>
  50324. <ul>
  50325. specifies the hexvalue (00 - ff) of the type received by the RFXtrx433 transceiver. <br>
  50326. </ul>
  50327. <br>
  50328. Example: <br>
  50329. <code>define TRX_UNKNOWN_9A TRX_ELSE 9A</code>
  50330. <br>
  50331. </ul>
  50332. <br>
  50333. </ul>
  50334. <a name="TRX_LIGHT"></a>
  50335. <h3>TRX_LIGHT</h3>
  50336. <ul>
  50337. The TRX_LIGHT module receives and sends X10, ARC, ELRO AB400D, Waveman, Chacon EMW200, IMPULS, RisingSun, AC, HomeEasy EU and ANSLUT lighting devices (switches and remote control). Allows to send Philips SBC (receive not possible). ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. AC is the protocol used by different brands with units having a learning mode button:
  50338. KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. <br> You need to define an RFXtrx433 transceiver receiver first.
  50339. See <a href="#TRX">TRX</a>.
  50340. <br><br>
  50341. <a name="TRX_LIGHTdefine"></a>
  50342. <b>Define</b>
  50343. <ul>
  50344. <code>define &lt;name&gt; TRX_LIGHT &lt;type&gt; &lt;deviceid&gt; &lt;devicelog&gt; [&lt;deviceid2&gt; &lt;devicelog2&gt;] </code> <br>
  50345. <code>define &lt;name&gt; TRX_LIGHT PT2262 &lt;deviceid&gt; &lt;devicelog&gt; &lt;commandcodes&gt;</code> <br>
  50346. <br>
  50347. <code>&lt;type&gt;</code>
  50348. <ul>
  50349. specifies the type of the device: <br>
  50350. Lighting devices:
  50351. <ul>
  50352. <li> <code>MS14A</code> (X10 motion sensor. Reports [normal|alert] on the first deviceid (motion sensor) and [on|off] for the second deviceid (light sensor)) </li>
  50353. <li> <code>X10</code> (All other x10 devices. Report [off|on|dim|bright|all_off|all_on] on both deviceids.)</li>
  50354. <li> <code>ARC</code> (ARC devices. ARC is a protocol used by devices from HomeEasy, KlikAanKlikUit, ByeByeStandBy, Intertechno, ELRO, AB600, Duewi, DomiaLite and COCO with address code wheels. Report [off|on|all_off|all_on|chime].)</li>
  50355. <li> <code>AB400D</code> (ELRO AB400D devices. Report [off|on].)</li>
  50356. <li> <code>WAVEMAN</code> (Waveman devices. Report [off|on].)</li>
  50357. <li> <code>EMW200</code> (Chacon EMW200 devices. Report [off|on|all_off|all_on].)</li>
  50358. <li> <code>IMPULS</code> (IMPULS devices. Report [off|on].)</li>
  50359. <li> <code>RISINGSUN</code> (RisingSun devices. Report [off|on].)</li>
  50360. <li> <code>PHILIPS_SBC</code> (Philips SBC devices. Send [off|on|all_off|all_on].)</li>
  50361. <li> <code>ENER010</code> (Energenie ENER010 devices. deviceid: [A-P][1-4]. Send [off|on|all_off|all_on].)</li>
  50362. <li> <code>ENER5</code> (Energenie 5-gang devices. deviceid: [A-P][1-10]. Send [off|on].)</li>
  50363. <li> <code>COCO_GDR2</code> (ECOCO GDR2-2000R devices. deviceid: [A-D][1-4]. Send [off|on].)</li>
  50364. <li> <code>AC</code> (AC devices. AC is the protocol used by different brands with units having a learning mode button: KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. Report [off|on|level &lt;NUM&gt;|all_off|all_on|all_level &lt;NUM&gt;].)</li>
  50365. <li> <code>HOMEEASY</code> (HomeEasy EU devices. Report [off|on|level|all_off|all_on|all_level].)</li>
  50366. <li> <code>ANSLUT</code> (Anslut devices. Report [off|on|level|all_off|all_on|all_level].)</li>
  50367. <li> <code>PT2262</code> (Devices using PT2262/PT2272 (coder/decoder) chip. To use this enable Lighting4 in RFXmngr. Please note that this disables ARC. For more information see <a href="http://www.fhemwiki.de/wiki/RFXtrx#PT2262_empfangen_und_senden_mit_TRX_LIGHT.pm">FHEM-Wiki</a>)</li>
  50368. <li> <code>LIGHTWAVERF</code> (LightwaveRF devices. Commands ["off", "on", "all_off", "mood1", "mood2", "mood3", "mood4", "mood5", "reserved1", "reserved2", "unlock", "lock", "all_lock", "close", "stop", "open", "level"].)</li>
  50369. <li> <code>EMW100</code> (EMW100 devices. Commands ["off", "on", "learn"].)</li>
  50370. <li> <code>BBSB</code> (BBSB devices. Commands ["off", "on", "all_off", "all_on"].)</li>
  50371. <li> <code>MDREMOTE</code> (MDREMOTE LED dimmer devices. Commands ["power", "light", "bright", "dim", "100", "50", "25", "mode+", "speed-", "speed+", "mode-"].)</li>
  50372. <li> <code>RSL2</code> (Conrad RSL2 devices. Commands ["off", "on", "all_off", "all_on"].)</li>
  50373. <li> <code>LIVOLO</code> (Livolo devices. Commands ["all_off", "on_off", "dim+", "dim-"].)</li>
  50374. <li> <code>TRC02</code> (RGB TRC02 devices. Commands ["off", "on", "bright", "dim", "vivid", "pale", "color"].)</li>
  50375. <li> <code>BLYSS</code> (Blyss devices. deviceid: [A-P][1-5]. Commands ["off", "on", "all_off", "all_on"].)</li>
  50376. <li> <code>BYRONSX</code> (Byron SX chime devices. deviceid: 00-FF. Commands [ "tubular3_1", "solo1", "bigben1", "tubular2_1", "tubular2_2", "solo2", "tubular3_2"].)</li>
  50377. <li> <code>SELECTPLUS</code> (SELECTPLUS] chime devices. deviceid: 0000-FFFF. Commands [ "ring"].)</li>
  50378. <li> <code>SIEMENS_SF01</code> (Siemens SF01 devices. deviceid: 000000-007FFF. Commands [ "timer", "-", "learn", "+", "confirm", "light", "on", "off" ].)</li>
  50379. <li> <code>HARRISON</code> (Harrison curtain devices. deviceid: 00-FF. Commands [ "open", "close", "stop", "program" ].)</li>
  50380. <li> <code>ROLLER_TROL</code> (Roller Trol blind devices. deviceid: 00000100-00FFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_limit" ].)</li>
  50381. <li> <code>HASTA_OLD</code> (Hasta old blind devices. deviceid: 00000100-00FFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_limit" ].)</li>
  50382. <li> <code>AOK_RF01</code> (A-OK RF01 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair" ].)</li>
  50383. <li> <code>AOK_AC114</code> (A-OK AC114 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair" ].)</li>
  50384. <li> <code>RAEX_YR1326</code> (Raex YR1326 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_upper_limit", "set_lower_limit", "delete_limits", "change_dir", "left", "right"].)</li>
  50385. <li> <code>MEDIA_MOUNT</code> (Media Mount blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "down", "up", "stop" ].)</li>
  50386. <li> <code>DC106</code> (DC/RMF/Yooda blind devices. deviceid: 00000100-FFFFFFF0. Commands [ "open", "close", "stop", "confirm" ].)</li>
  50387. <li> <code>FOREST</code> (Forest blind devices. deviceid: 00000100-FFFFFFF0. Commands [ "open", "close", "stop", "confirm_pair" ].)</li>
  50388. <li> <code>RFY</code> (Somfy RTS devices. deviceid: 000001-0FFFFF, unicode: 01-04 (00 = allunits). Commands [ "up", "down", "stop", "program" ].)</li>
  50389. <li> <code>RFY_ext</code> (Somfy RTS devices. deviceid: 000001-0FFFFF, unicode: 00-0F. Commands [ "up", "down", "stop", "program" ].)</li>
  50390. </ul>
  50391. </ul>
  50392. <br>
  50393. <code>&lt;deviceid&gt;</code>
  50394. <ul>
  50395. specifies the first device id of the device. <br>
  50396. A lighting device normally has a house code A..P followed by a unitcode 1..16 (example "B1").<br>
  50397. For AC, HomeEasy EU and ANSLUT it is a 10 Character-Hex-String for the deviceid, consisting of <br>
  50398. - unid-id: 8-Char-Hex: 00000001 to 03FFFFFF<br>
  50399. - unit-code: 2-Char-Hex: 01 to 10 <br>
  50400. For LIGHTWAVERF, EMW100, BBSB, MDREMOTE, RSL2, LIVOLO and TRC02 it is a 8 Character-Hex-String for the deviceid, consisting of <br>
  50401. - unid-id: 8-Char-Hex: 000001 to FFFFFF<br>
  50402. - unit-code: 2-Char-Hex: 01 to 10 <br>
  50403. For RFY and RFY-ext it is a 8 Character-Hex-String for the deviceid, consisting of <br>
  50404. - unid-id: 8-Char-Hex: 000001 to FFFFFF<br>
  50405. - unit-code: 2-Char-Hex: 01 to 04 for RFY (00 for all units) and 00 to 0F for RFY_ext <br>
  50406. </ul>
  50407. <br>
  50408. <code>&lt;devicelog&gt;</code>
  50409. <ul>
  50410. is the name of the Reading used to report. Suggested: "motion" for motion sensors. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
  50411. </ul>
  50412. <br>
  50413. <code>&lt;deviceid2&gt;</code>
  50414. <ul>
  50415. is optional and specifies the second device id of the device if it exists. For example ms14a motion sensors report motion status on the first deviceid and the status of the light sensor on the second deviceid.
  50416. </ul>
  50417. <br>
  50418. <code>&lt;devicelog2&gt;</code>
  50419. <ul>
  50420. is optional for the name used for the Reading of <code>&lt;deviceid2&gt;</code>.If you use "none" then no addional Reading is reported. Just the state is used to report the change.
  50421. </ul>
  50422. <br>
  50423. <code>&lt;commandcodes&gt;</code>
  50424. <ul>
  50425. is used for PT2262 and specifies the possible base4 digits for the command separated by : and a string that specifies a string that is the command. Example '<code>0:off,1:on</code>'.
  50426. </ul>
  50427. <br>
  50428. Example: <br>
  50429. <code>define motion_sensor2 TRX_LIGHT MS14A A1 motion A2 light</code>
  50430. <br>
  50431. <code>define Steckdose TRX_LIGHT ARC G2 light</code>
  50432. <br>
  50433. <code>define light TRX_LIGHT AC 0101010101 light</code>
  50434. <br>
  50435. </ul>
  50436. <br>
  50437. <a name="TRX_LIGHTset"></a>
  50438. <b>Set </b>
  50439. <ul>
  50440. <code>set &lt;name&gt; &lt;value&gt; [&lt;levelnum&gt;]</code>
  50441. <br><br>
  50442. where <code>value</code> is one of:<br>
  50443. <pre>
  50444. off
  50445. on
  50446. dim # only for X10, KOPPLA
  50447. bright # only for X10, KOPPLA
  50448. all_off # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
  50449. all_on # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
  50450. chime # only for ARC
  50451. level &lt;levelnum&gt; # only AC, HOMEEASY, ANSLUT: set level to &lt;levelnum&gt; (range: 0=0% to 15=100%)
  50452. on-till # Special, see the note
  50453. on-for-timer # Special, see the note
  50454. ring # Byron MP001,SelectPlus, RFU, Envivo
  50455. </pre>
  50456. Example: <br>
  50457. <code>set Steckdose on</code>
  50458. <br>
  50459. <br>
  50460. Notes:
  50461. <ul>
  50462. <li><code>on-till</code> requires an absolute time in the "at" format
  50463. (HH:MM:SS, HH:MM) or { &lt;perl code&gt; }, where the perl code
  50464. returns a time specification).
  50465. If the current time is greater than the specified time, then the
  50466. command is ignored, else an "on" command is generated, and for the
  50467. given "till-time" an off command is scheduleld via the at command.
  50468. </li>
  50469. <li><code>on-for-timer</code> requires a relative time in the "at" format
  50470. (HH:MM:SS, HH:MM) or { &lt;perl code&gt; }, where the perl code
  50471. returns a time specification).
  50472. </li>
  50473. </ul>
  50474. </ul><br>
  50475. <a name="TRX_LIGHTget"></a>
  50476. <b>Get</b> <ul>N/A</ul><br>
  50477. <a name="TRX_LIGHTattr"></a>
  50478. <b>Attributes</b>
  50479. <ul>
  50480. <li><a href="#ignore">ignore</a></li>
  50481. <li><a href="#do_not_notify">do_not_notify</a></li>
  50482. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  50483. </ul>
  50484. </ul>
  50485. <a name="TRX_SECURITY"></a>
  50486. <h3>TRX_SECURITY</h3>
  50487. <ul>
  50488. The TRX_SECURITY module interprets X10, KD101 and Visonic security sensors received by a RFXCOM RFXtrx433 RF receiver. You need to define an RFXtrx433 receiver first. See <a href="#TRX">TRX</a>.
  50489. <br><br>
  50490. <a name="TRX_SECURITYdefine"></a>
  50491. <b>Define</b>
  50492. <ul>
  50493. <code>define &lt;name&gt; TRX_SECURITY &lt;type&gt; &lt;deviceid&gt; &lt;devicelog&gt; [&lt;deviceid2&gt; &lt;devicelog2&gt;] </code> <br>
  50494. <br>
  50495. <code>&lt;type&gt;</code>
  50496. <ul>
  50497. specifies one of the following security devices:
  50498. <ul>
  50499. <li> <code>DS10A</code> (X10 security ds10a Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed], status of the delay switch [min|max]], and battery status [ok|low].)</li>
  50500. <li> <code>SD18</code> or <code>COD18</code>(X10 security sd18 smoke Sensor and COD18 CO Sensor). These device types report the status of the sensor [alert/normal] and battery status [ok|low])</li>
  50501. <li> <code>MS10A</code> (X10 security ms10a motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
  50502. <li> <code>SD90</code> (Marmitek sd90 smoke detector. This device type reports the status of the smoke detector [normal|alert] and battery status [ok|low].)</li>
  50503. <li> <code>KR18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
  50504. <li> <code>KD101</code> (KD101 smoke sensor. Report the Reading "smoke" with values [normal|alert])</li>
  50505. <li> <code>VISONIC_WINDOW</code> (VISONIC security Door/Window Sensor or compatible devices. This device type reports the status of the switch [Open/Closed] and battery status [ok|low].)</li>
  50506. <li> <code>VISONIC_MOTION</code> (VISONIC security motion sensor. This device type reports the status of motion sensor [normal|alert] and battery status [ok|low].))</li>
  50507. </ul>
  50508. </ul>
  50509. <br>
  50510. <code>&lt;deviceid&gt;</code>
  50511. <ul>
  50512. specifies the first device id of the device. X10 security (DS10A, MS10A) and SD90 have a a 16 bit device id which has to be written as a hex-string (example "5a54"). All other devices have a 24 bit device id.
  50513. </ul>
  50514. <br>
  50515. <code>&lt;devicelog&gt;</code>
  50516. <ul>
  50517. is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "smoke" for sd90, sd18 and cod18. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
  50518. </ul>
  50519. <br>
  50520. <code>&lt;deviceid2&gt;</code>
  50521. <ul>
  50522. is optional and specifies the second device id of the device if it exists. For example sd90 smoke sensors can be configured to report two device ids.
  50523. </ul>
  50524. <br>
  50525. <code>&lt;devicelog2&gt;</code>
  50526. <ul>
  50527. is optional for the name used for the Reading of <code>&lt;deviceid2&gt;</code>. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
  50528. </ul>
  50529. <br>
  50530. Example: <br>
  50531. <code>define livingroom_window TRX_SECURITY ds10a 72cd Window</code>
  50532. <br>
  50533. <code>define motion_sensor1 TRX_SECURITY ms10a 55c6 motion</code>
  50534. <br>
  50535. <code>define smoke_sensor1 TRX_SECURITY sd90 54d3 Smoke 54d3 Smoketest</code>
  50536. <br>
  50537. </ul>
  50538. <br>
  50539. <a name="TRX_SECURITYset"></a>
  50540. <b>Set </b>
  50541. <ul>
  50542. <code>set &lt;name&gt; &lt;value&gt; </code>
  50543. <br><br>
  50544. where <code>value</code> is one of:<br>
  50545. <pre>
  50546. alert # only for KD101
  50547. pair # only for KD101
  50548. </pre>
  50549. Example: <br>
  50550. <code>set TRX_KD101_a5ca00 alert</code>
  50551. <br>
  50552. </ul><br>
  50553. <a name="TRX_SECURITYget"></a>
  50554. <b>Get</b> <ul>N/A</ul><br>
  50555. <a name="TRX_SECURITYattr"></a>
  50556. <b>Attributes</b>
  50557. <ul>
  50558. <li><a href="#ignore">ignore</a></li>
  50559. <li><a href="#do_not_notify">do_not_notify</a></li>
  50560. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  50561. </ul>
  50562. </ul>
  50563. <a name="TRX_WEATHER"></a>
  50564. <h3>TRX_WEATHER</h3>
  50565. <ul>
  50566. The TRX_WEATHER module interprets weather sensor messages received by a RTXtrx receiver. See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> for a list of
  50567. Oregon Scientific weather sensors that could be received by the RFXtrx433 tranmitter. You need to define a RFXtrx433 receiver first. See
  50568. See <a href="#TRX">TRX</a>.
  50569. <br><br>
  50570. <a name="TRX_WEATHERdefine"></a>
  50571. <b>Define</b>
  50572. <ul>
  50573. <code>define &lt;name&gt; TRX_WEATHER &lt;deviceid&gt;</code> <br>
  50574. <br>
  50575. <code>&lt;deviceid&gt;</code>
  50576. <ul>
  50577. is the device identifier of the sensor. It consists of the sensors name and (only if the attribute longids is set of the RFXtrx433) an a one byte hex string (00-ff) that identifies the sensor. If an sensor uses an switch to set an additional is then this is also added. The define statement with the deviceid is generated automatically by autocreate. The following sensor names are used: <br>
  50578. "THR128" (for THR128/138, THC138),<br>
  50579. "THGR132N" (for THC238/268,THN132,THWR288,THRN122,THN122,AW129/131),<br>
  50580. "THWR800", <br>
  50581. "RTHN318", <br>
  50582. "TX3_T" (for LaCrosse TX3, TX4, TX17),<br>
  50583. "THGR228N" (for THGN122/123, THGN132, THGR122/228/238/268),<br>
  50584. "THGR810",<br>
  50585. "RTGR328",<br>
  50586. "THGR328",<br>
  50587. "WTGR800_T" (for temperature of WTGR800),<br>
  50588. "THGR918" (for THGR918, THGRN228, THGN500),<br>
  50589. "TFATS34C" (for TFA TS34C),<br>
  50590. "BTHR918",<br>
  50591. "BTHR918N (for BTHR918N, BTHR968),<br>
  50592. "RGR918" (for RGR126/682/918),<br>
  50593. "PCR800",<br>
  50594. "TFA_RAIN" (for TFA rain sensor),<br>
  50595. "WTGR800_A" (for wind sensor of WTGR800),<br>
  50596. "WGR800" (for wind sensor of WGR800),<br>
  50597. "WGR918" (for wind sensor of STR918 and WGR918),<br>
  50598. "TFA_WIND" (for TFA wind sensor),<br>
  50599. "BWR101" (for Oregon Scientific BWR101),<br>
  50600. "GR101" (for Oregon Scientific GR101)
  50601. "TLX7506" (for Digimax TLX7506),<br>
  50602. "TH10" (for Digimax with short format),<br>
  50603. </ul>
  50604. <br>
  50605. Example: <br>
  50606. <ul>
  50607. <code>define Tempsensor TRX_WEATHER TX3_T</code><br>
  50608. <code>define Tempsensor3 TRX_WEATHER THR128_3</code><br>
  50609. <code>define Windsensor TRX_WEATHER WGR918_A</code><br>
  50610. <code>define Regensensor TRX_WEATHER RGR918</code><br>
  50611. </ul>
  50612. </ul>
  50613. <br><br>
  50614. <ul>
  50615. <code>define &lt;name&gt; TRX_WEATHER &lt;deviceid&gt; [&lt;scale_current&gt; &lt;scale_total&gt; &lt;add_total&gt;]</code> <br>
  50616. <br>
  50617. <code>&lt;deviceid&gt;</code>
  50618. <ul>
  50619. is the device identifier of the energy sensor. It consists of the sensors name and (only if the attribute longids is set of the RFXtrx433) an a two byte hex string (0000-ffff) that identifies the sensor. The define statement with the deviceid is generated automatically by autocreate. The following sensor names are used: <br>
  50620. "CM160" (for OWL CM119 or CM160),<br>
  50621. "CM180" (for OWL CM180),<br><br>
  50622. "CM180i"(for OWL CM180i),<br><br>
  50623. </ul>
  50624. The following Readings are generated:<br>
  50625. <ul>
  50626. <code>"energy_current:"</code>:
  50627. <ul>
  50628. Only for CM160 and CM180: current usage in Watt. If &lt;scale_current&gt is defined the result is: <code>energy_current * &lt;scale_current&gt;</code>.
  50629. </ul>
  50630. <code>"energy_chx:"</code>:
  50631. <ul>
  50632. Only for CM180i (where chx is ch1, ch2 or ch3): current usage in Ampere. If &lt;scale_current&gt is defined the result is: <code>energy_chx * &lt;scale_current&gt;</code>.
  50633. </ul>
  50634. <code>"energy_total:"</code>:
  50635. <ul>
  50636. current usage in kWh. If scale_total and add_total is defined the result is: <code>energy_total * &lt;scale_total&gt; + &lt;add_total&gt;</code>.
  50637. </ul>
  50638. <br>
  50639. </ul>
  50640. Example: <br>
  50641. <ul>
  50642. <code>define Tempsensor TRX_WEATHER CM160_1401</code><br>
  50643. <code>define Tempsensor TRX_WEATHER CM180_1401 1 1 0</code><br>
  50644. <code>define Tempsensor TRX_WEATHER CM180_1401 0.9 0.9 -1000</code><br>
  50645. </ul>
  50646. </ul>
  50647. <br>
  50648. <a name="TRX_WEATHERset"></a>
  50649. <b>Set</b> <ul>N/A</ul><br>
  50650. <a name="TRX_WEATHERget"></a>
  50651. <b>Get</b> <ul>N/A</ul><br>
  50652. <a name="TRX_WEATHERattr"></a>
  50653. <b>Attributes</b>
  50654. <ul>
  50655. <li><a href="#ignore">ignore</a></li>
  50656. <li><a href="#do_not_notify">do_not_notify</a></li>
  50657. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  50658. </ul>
  50659. <br>
  50660. </ul>
  50661. <a name="TUL"></a>
  50662. <h3>TUL</h3>
  50663. <ul>
  50664. <table>
  50665. <tr><td>
  50666. The TUL module is the representation of a EIB / KNX connector in FHEM.
  50667. <a href="#KNX">KNX</a> instances represent the EIB / KNX devices and will need a TUL as IODev to communicate with the EIB / KNX network.<br>
  50668. The TUL module is designed to connect to EIB network either using eibd, knxd or the <a href="http://busware.de/tiki-index.php?page=TUL" target="_blank">TUL usb stick</a> created by busware.de
  50669. Note: this module may require the Device::SerialPort or Win32::SerialPort module if you attach the device via USB and the OS sets strange default parameters for serial devices.
  50670. </td><td>
  50671. <img src="IMG_0483.jpg" width="100%" height="100%"/>
  50672. </td></tr>
  50673. </table>
  50674. <a name="TULdefine"></a>
  50675. <b>Define</b>
  50676. <ul>
  50677. <code>define &lt;name&gt; TUL &lt;device&gt; &lt;physical address&gt;</code> <br>
  50678. <br>
  50679. TUL usb stick / TPUART serial devices:<br><ul>
  50680. &lt;device&gt; specifies the serial port to communicate with the TUL. The name of the serial-device depends on your distribution, under linux the cdc_acm kernel module is responsible, and usually a
  50681. /dev/ttyACM0 device will be created. If your distribution does not have a cdc_acm module, you can force usbserial to handle the TUL by the following command:<ul>modprobe usbserial vendor=0x03eb
  50682. product=0x204b</ul>In this case the device is most probably /dev/ttyUSB0.<br><br>
  50683. You can also specify a baudrate if the device name contains the @ character, e.g.: /dev/ttyACM0@19200<br><br>
  50684. Note: For TUL usb stick the baudrate 19200 is needed and this is the default when no baudrate is given.
  50685. <br><br>
  50686. Example:<br>
  50687. <code>define tul TUL tul:/dev/ttyACM0 1.1.249</code>
  50688. </ul>
  50689. EIBD:<br><ul>
  50690. &lt;device&gt; specifies the host:port of the eibd device. E.g. eibd:192.168.0.244:2323. When using the standard port, the port can be omitted.
  50691. <br><br>
  50692. Example:<br>
  50693. <code>define tul TUL eibd:localhost 1.1.249</code>
  50694. <code>define tul TUL knxd:192.168.178.1 1.1.248</code>
  50695. </ul>
  50696. <br>
  50697. If the device is called none, then no device will be opened, so you can experiment without hardware attached.<br>
  50698. The physical address is used as the source address of telegrams sent to EIB network.
  50699. </ul>
  50700. <br>
  50701. <a name="TULattr"></a>
  50702. <b>Attributes</b>
  50703. <ul>
  50704. <li><a href="#do_not_notify">do_not_notify</a></li><br>
  50705. <li><a href="#attrdummy">dummy</a></li><br>
  50706. <li><a href="#showtime">showtime</a></li><br>
  50707. <li><a href="#verbose">verbose</a></li><br>
  50708. <li><a href="#useEIB">useEIB</a></li><br>
  50709. <ul>
  50710. The device operates the module 10_EIB, if this flag is set to 1. This is used for backward compatibility only. Otherwise, only the client 10_KNX is used.
  50711. </ul>
  50712. </ul>
  50713. <br>
  50714. </ul>
  50715. <a name="TechemHKV"></a>
  50716. <h3>TechemHKV</h3>
  50717. <ul>
  50718. This module reads the transmission of techem data meter for heating device.
  50719. <br><br>
  50720. It will display
  50721. <ul>
  50722. <li>meter data for current billing period</li>
  50723. <li>meter data for previous billing period including date of request</li>
  50724. <li>both temperature sensors (if supported by data meter)</li>
  50725. </ul>
  50726. <br>
  50727. It will require a CUL in WMBUS_T mode, although the CUL may temporary set into that mode.
  50728. The module keeps track of the CUL rfmode.
  50729. <br>
  50730. <br>
  50731. <a name="TechemHKV_Define"></a>
  50732. <b>Define</b>
  50733. <br>
  50734. <code>define &lt;name&gt; TechemHKV &lt;4|8 digit ID&gt; [&lt;speaking name&gt;]</code>
  50735. <ul>
  50736. <li>ID: 4 digit ID displayed at techem or 8 digit as printed on bill</li>
  50737. <li>speaking name: (optional) human readable identification</li>
  50738. </ul>
  50739. <br>
  50740. <a name="TechemHKV_Readings"></a>
  50741. <b>Readings</b>
  50742. <ul>
  50743. <li>current_period: meter data for current billing period
  50744. <br><i>unit-less data, cumulated since start of the current billing period. The reading will be updated once a day, after receiving the first update. Reading time will reflect the time of data (not the time where they were received)</i></br>
  50745. </li>
  50746. <li>previous_period: meter data for last billing period
  50747. <br><i>unit-less data, sum of the last billing period. The reading will be updated only if a new billing period starts. Reading time will reflect the last day of previous billing period (not the time where they were received)</i></br>
  50748. </li>
  50749. <li>temp1: ambient temperature</li>
  50750. <li>temp2: heater surface temperature</li>
  50751. <br>
  50752. </ul>
  50753. <a name="TechemHKV_Internals"></a>
  50754. <b>Internals</b>
  50755. <ul>
  50756. <li>friendly: human readable identification of meter as specified by define</li>
  50757. <li>longID: 8 digit id of meter</li>
  50758. <br>
  50759. </ul>
  50760. </ul>
  50761. <a name="TechemWZ"></a>
  50762. <h3>TechemWZ</h3>
  50763. <ul>
  50764. This module reads the transmission of techem volume data meter. Currently supported device:
  50765. <p>
  50766. <ul>
  50767. <li>Messkapsel-Wasserzähler radio 3 (cold, warm water)</li>
  50768. <li>Messkapsel-Wärmemengenzähler compact V (heating energy)</li>
  50769. </ul>
  50770. <br>
  50771. It will display
  50772. <ul>
  50773. <li>meter data for current billing period</li>
  50774. <li>meter data for previous billing period including date of request</li>
  50775. <li>cumulative meter data</li>
  50776. </ul>
  50777. <br>
  50778. It will require a CUL in WMBUS_T mode, although the CUL may temporary set into that mode.
  50779. The module keeps track of the CUL rfmode.
  50780. <br>
  50781. <br>
  50782. <a name="TechemWZ_preliminary"></a>
  50783. <b>preliminary</b>
  50784. <p>
  50785. Techem volume data meter does not transmit their printed meter ID. Instead they transmit the ID of the build in radio module.
  50786. <p>
  50787. Therefore a <b>"list-mode"</b> is available which collects all Techem meter device in range to help you find out the right one.
  50788. That "list-mode" will be activated by defining a TechemWZ device with id "00000000". Let it run for a while and do a "get &lt;name&gt; list".
  50789. You will see a list of available (received) Techem device with their ID and meter data. Choose the right one (keep in mind that the meter reading reflects last midnight), note down their ID and define the appropriate device. After done the device with ID "00000000" can be removed.
  50790. <br>
  50791. <br>
  50792. <a name="TechemWZ_Define"></a>
  50793. <b>Define</b>
  50794. <br>
  50795. <code>define &lt;name&gt; TechemWZ &lt;8 digit ID&gt; [&lt;speaking name&gt;]</code>
  50796. <ul>
  50797. <li>ID: 8 digit ID (see list mode above)</li>
  50798. <li>speaking name: (optional) human readable identification</li>
  50799. </ul>
  50800. <br>
  50801. <a name="TechemWZ_Readings"></a>
  50802. <b>Readings</b>
  50803. <ul>
  50804. <li>current_period: meter data for current billing period
  50805. <br><i>cumulated since the start of the current billing period. The reading will be updated once a day, after receiving the first update. Reading time will reflect the time of data (not the time where the data were received)</i></br>
  50806. </li>
  50807. <li>previous_period: meter data for last billing period
  50808. <br><i>meter rading at the end of the last billing period. The reading will be updated if a new billing period starts. Reading time will reflect the last day of previous billing period (not the time where the data were received)</i></br>
  50809. </li>
  50810. <li>meter: cumulative meter data.
  50811. <br><i>The same data that will be shown at the Techem (mechanical) display</i></br>
  50812. </li>
  50813. <br>
  50814. </ul>
  50815. <a name="TechemWZ_Get"></a>
  50816. <b>Get</b>
  50817. <ul>
  50818. <li>list: print a list of available (received) Techem device with their ID and meter data
  50819. <br><i><u>only available if device ID is "00000000" (list-mode)</u></i></br>
  50820. </li>
  50821. <br>
  50822. </ul>
  50823. <a name="TechemWZ_Internals"></a>
  50824. <b>Internals</b>
  50825. <ul>
  50826. <li>friendly: human readable identification of meter as specified by define</li>
  50827. <br>
  50828. </ul>
  50829. </ul>
  50830. <a name="TelegramBot"></a>
  50831. <h3>TelegramBot</h3>
  50832. <ul>
  50833. The TelegramBot module allows the usage of the instant messaging service <a href="https://telegram.org/">Telegram</a> from FHEM in both directions (sending and receiving).
  50834. So FHEM can use telegram for notifications of states or alerts, general informations and actions can be triggered.
  50835. <br>
  50836. <br>
  50837. TelegramBot makes use of the <a href=https://core.telegram.org/bots/api>telegram bot api</a> and does NOT rely on any addition local client installed.
  50838. <br>
  50839. Telegram Bots are different from normal telegram accounts, without being connected to a phone number. Instead bots need to be registered through the
  50840. <a href=https://core.telegram.org/bots#botfather>BotFather</a> to gain the needed token for authorizing as bot with telegram.org. This is done by connecting (in a telegram client) to the BotFather and sending the command <code>/newbot</code> and follow the steps specified by the BotFather. This results in a token, this token (e.g. something like <code>110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code> is required for defining a working telegram bot in fhem.
  50841. <br><br>
  50842. Bots also differ in other aspects from normal telegram accounts. Here some examples:
  50843. <ul>
  50844. <li>Bots can not initiate connections to arbitrary users, instead users need to first initiate the communication with the bot.</li>
  50845. <li>Bots have a different privacy setting then normal users (see <a href=https://core.telegram.org/bots#privacy-mode>Privacy mode</a>) </li>
  50846. <li>Bots support commands and specialized keyboards for the interaction </li>
  50847. </ul>
  50848. <br><br>
  50849. Note:
  50850. <ul>
  50851. <li>This module requires the perl JSON module.<br>
  50852. Please install the module (e.g. with <code>sudo apt-get install libjson-perl</code>) or the correct method for the underlying platform/system.</li>
  50853. <li>The attribute pollingTimeout needs to be set to a value greater than zero, to define the interval of receiving messages (if not set or set to 0, no messages will be received!)</li>
  50854. <li>Multiple infomations are stored in readings (esp contacts) and internals that are needed for the bot operation, so having an recent statefile will help in correct operation of the bot. Generally it is recommended to regularly store the statefile (see save command)</li>
  50855. </ul>
  50856. <br><br>
  50857. The TelegramBot module allows receiving of messages from any peer (telegram user) and can send messages to known users.
  50858. The contacts/peers, that are known to the bot are stored in a reading (named <code>Contacts</code>) and also internally in the module in a hashed list to allow the usage
  50859. of contact ids and also full names and usernames. Contact ids are made up from only digits, user names are prefixed with a @, group names are prefixed with a #.
  50860. All other names will be considered as full names of contacts. Here any spaces in the name need to be replaced by underscores (_).
  50861. Each contact is considered a triple of contact id, full name (spaces replaced by underscores) and username or groupname prefixed by @ respectively #.
  50862. The three parts are separated by a colon (:).
  50863. <br>
  50864. Contacts are collected automatically during communication by new users contacting the bot or users mentioned in messages.
  50865. <br><br>
  50866. Updates and messages are received via long poll of the GetUpdates message. This message currently supports a maximum of 20 sec long poll.
  50867. In case of failures delays are taken between new calls of GetUpdates. In this case there might be increasing delays between sending and receiving messages!
  50868. <br>
  50869. Beside pure text messages also media messages can be sent and received. This includes audio, video, images, documents, locations and venues.
  50870. <br><br>
  50871. <a name="TelegramBotdefine"></a>
  50872. <b>Define</b>
  50873. <ul>
  50874. <code>define &lt;name&gt; TelegramBot &lt;token&gt; </code>
  50875. <br><br>
  50876. Defines a TelegramBot device using the specified token perceived from botfather
  50877. <br>
  50878. Example:
  50879. <ul>
  50880. <code>define teleBot TelegramBot 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code><br>
  50881. </ul>
  50882. <br>
  50883. </ul>
  50884. <br><br>
  50885. <a name="TelegramBotset"></a>
  50886. <b>Set</b>
  50887. <ul>
  50888. <li><code>message|msg|_msg|send [ @&lt;peer1&gt; ... @&lt;peerN&gt; ] [ (&lt;keyrow1&gt;) ... (&lt;keyrowN&gt;) ] &lt;text&gt;</code><br>Sends the given message to the given peer or if peer(s) is ommitted currently defined default peer user. Each peer given needs to be always prefixed with a '@'. Peers can be specified as contact ids, full names (with underscore instead of space), usernames (prefixed with another @) or chat names (also known as groups in telegram groups must be prefixed with #). Multiple peers are to be separated by space<br>
  50889. A reply keyboard can be specified by adding a list of strings enclosed in parentheses "()". Each separate string will make one keyboard row in a reply keyboard. The different keys in the row need to be separated by |. The key strings can contain spaces.<br>
  50890. Messages do not need to be quoted if containing spaces. If you want to use parentheses at the start of the message than add one extra character before the parentheses (i.e. an underline) to avoid the message being parsed as a keyboard <br>
  50891. Examples:<br>
  50892. <dl>
  50893. <dt><code>set aTelegramBotDevice message @@someusername a message to be sent</code></dt>
  50894. <dd> to send to a peer having someusername as username (not first and last name) in telegram <br> </dd>
  50895. <dt><code>set aTelegramBotDevice message (yes) (may be) are you there?</code></dt>
  50896. <dd> to send the message "are you there?" and provide a reply keyboard with two buttons ("yes" and "may be") on separate rows to the default peer <br> </dd>
  50897. <dt><code>set aTelegramBotDevice message @@someusername (yes) (may be) are you there?</code></dt>
  50898. <dd> to send the message from above with reply keyboard to a peer having someusername as username <br> </dd>
  50899. <dt><code>set aTelegramBotDevice message (yes|no) (may be) are you there?</code></dt>
  50900. <dd> to send the message from above with reply keyboard having 3 keys, 2 in the first row ("yes" / "no") and a second row with just one key to the default peer <br> </dd>
  50901. <dt><code>set aTelegramBotDevice message @@someusername @1234567 a message to be sent to multiple receipients</code></dt>
  50902. <dd> to send to a peer having someusername as username (not first and last name) in telegram <br> </dd>
  50903. <dt><code>set aTelegramBotDevice message @Ralf_Mustermann another message</code></dt>
  50904. <dd> to send to a peer with Ralf as firstname and Mustermann as last name in telegram <br></dd>
  50905. <dt><code>set aTelegramBotDevice message @#justchatting Hello</code></dt>
  50906. <dd> to send the message "Hello" to a chat with the name "justchatting" <br></dd>
  50907. <dt><code>set aTelegramBotDevice message @1234567 Bye</code></dt>
  50908. <dd> to send the message "Bye" to a contact or chat with the id "1234567". Chat ids might be negative and need to be specified with a leading hyphen (-). <br></dd>
  50909. <dl>
  50910. </li>
  50911. <li><code>msgForceReply [ @&lt;peer1&gt; ... @&lt;peerN&gt; ] &lt;text&gt;</code><br>Sends the given message to the recipient(s) and requests (forces) a reply. Handling of peers is equal to the message command. Adding reply keyboards is currently not supported by telegram.
  50912. </li>
  50913. <li><code>reply &lt;msgid&gt; [ @&lt;peer1&gt; ] &lt;text&gt;</code><br>Sends the given message as a reply to the msgid (number) given to the given peer or if peer is ommitted to the defined default peer user. Only a single peer can be specified. Beside the handling of the message as a reply to a message received earlier, the peer and message handling is otherwise identical to the msg command.
  50914. </li>
  50915. <li><code>msgEdit &lt;msgid&gt; [ @&lt;peer1&gt; ] &lt;text&gt;</code><br>Changes the given message on the recipients clients. The msgid of the message to be changed must match a valid msgId and the peers need to match the original recipient, so only a single peer can be given or if peer is ommitted the defined default peer user is used. Beside the handling of a change of an existing message, the peer and message handling is otherwise identical to the msg command.
  50916. </li>
  50917. <li><code>msgDelete &lt;msgid&gt; [ @&lt;peer1&gt; ] </code><br>Deletes the given message on the recipients clients. The msgid of the message to be changed must match a valid msgId and the peers need to match the original recipient, so only a single peer can be given or if peer is ommitted the defined default peer user is used. Restrictions apply for deleting messages in the Bot API as currently specified here (<a href=https://core.telegram.org/bots/api#deletemessage>deleteMessage</a>)
  50918. </li>
  50919. <li><code>cmdSend [ @&lt;peer1&gt; ... @&lt;peerN&gt; ] &lt;fhem command&gt;</code><br>Executes the given fhem command and then sends the result to the given peers or the default peer.<br>
  50920. Example: The following command would sent the resulting SVG picture to the default peer: <br>
  50921. <code>set tbot cmdSend { plotAsPng('SVG_FileLog_Aussen') }</code>
  50922. </li>
  50923. <li><code>queryInline [ @&lt;peer1&gt; ... @&lt;peerN&gt; ] (&lt;keyrow1&gt;) ... (&lt;keyrowN&gt;) &lt;text&gt;</code><br>Sends the given message to the recipient(s) with an inline keyboard allowing direct response <br>
  50924. IMPORTANT: The response coming from the keyboard will be provided in readings and a corresponding answer command with the query id is required, sicne the client is frozen otherwise waiting for the response from the bot!
  50925. REMARK: inline queries are only accepted from contacts/peers that are authorized (i.e. as for executing commands, see cmdKeyword and cmdRestrictedPeer !)
  50926. </li>
  50927. <li><code>queryEditInline &lt;msgid&gt; [ @&lt;peer&gt; ] (&lt;keyrow1&gt;) ... (&lt;keyrowN&gt;) &lt;text&gt;</code><br>Updates the original message specified with msgId with the given message to the recipient(s) with an inline keyboard allowing direct response <br>
  50928. With this method interactive inline dialogs are possible, since the edit of message or inline keyboard can be done multiple times.
  50929. </li>
  50930. <li><code>queryAnswer &lt;queryid&gt; [ &lt;text&gt; ] </code><br>Sends the response to the inline query button press. The message is optional, the query id can be collected from the reading "callbackID". This call is mandatory on reception of an inline query from the inline command above
  50931. </li>
  50932. <li><code>sendImage|image [ @&lt;peer1&gt; ... @&lt;peerN&gt;] &lt;file&gt; [&lt;caption&gt;]</code><br>Sends a photo to the given peer(s) or if ommitted to the default peer.
  50933. File is specifying a filename and path to the image file to be send.
  50934. Local paths should be given local to the root directory of fhem (the directory of fhem.pl e.g. /opt/fhem).
  50935. Filenames with special characters (especially spaces) need to be given with url escaping (i.e. spaces need to be replaced by %20).
  50936. Rules for specifying peers are the same as for messages. Multiple peers are to be separated by space. Captions can also contain multiple words and do not need to be quoted.
  50937. </li>
  50938. <li><code>sendMedia|sendDocument [ @&lt;peer1&gt; ... @&lt;peerN&gt;] &lt;file&gt;</code><br>Sends a media file (video, audio, image or other file type) to the given peer(s) or if ommitted to the default peer. Handling for files and peers is as specified above.
  50939. </li>
  50940. <li><code>sendVoice [ @&lt;peer1&gt; ... @&lt;peerN&gt;] &lt;file&gt;</code><br>Sends a voice message for playing directly in the browser to the given peer(s) or if ommitted to the default peer. Handling for files and peers is as specified above.
  50941. </li>
  50942. <br>
  50943. <li><code>sendLocation [ @&lt;peer1&gt; ... @&lt;peerN&gt;] &lt;latitude&gt; &lt;longitude&gt;</code><br>Sends a location as pair of coordinates latitude and longitude as floating point numbers
  50944. <br>Example: <code>set aTelegramBotDevice sendLocation @@someusername 51.163375 10.447683</code> will send the coordinates of the geographical center of Germany as location.
  50945. </li>
  50946. <br>
  50947. <li><code>replaceContacts &lt;text&gt;</code><br>Set the contacts newly from a string. Multiple contacts can be separated by a space.
  50948. Each contact needs to be specified as a triple of contact id, full name and user name as explained above. </li>
  50949. <li><code>reset</code><br>Reset the internal state of the telegram bot. This is normally not needed, but can be used to reset the used URL,
  50950. internal contact handling, queue of send items and polling <br>
  50951. ATTENTION: Messages that might be queued on the telegram server side (especially commands) might be then worked off afterwards immedately.
  50952. If in doubt it is recommened to temporarily deactivate (delete) the cmdKeyword attribute before resetting.</li>
  50953. <br>
  50954. <li><code>token &lt;apitoken&gt;</code><br>Specify a new APItoken to be stored for this bot
  50955. </li>
  50956. </ul>
  50957. <br><br>
  50958. <a name="TelegramBotget"></a>
  50959. <b>Get</b>
  50960. <ul>
  50961. <li><code>urlForFile &lt;fileid&gt;</code><br>Get a URL for a file id that was returned in a message
  50962. </li>
  50963. <li><code>update </code><br>Execute a single update (instead of automatic polling) - manual polling
  50964. </li>
  50965. <li><code>peerId &lt;peer&gt;</code><br>Ask for a peerId for a given peer, the peer can be specified in the same form as in a message without the initial '@'
  50966. </li>
  50967. </ul>
  50968. <br><br>
  50969. <a name="TelegramBotattr"></a>
  50970. <b>Attributes</b>
  50971. <br><br>
  50972. <ul>
  50973. <li><code>defaultPeer &lt;name&gt;</code><br>Specify contact id, user name or full name of the default peer to be used for sending messages. </li>
  50974. <li><code>defaultPeerCopy &lt;1 (default) or 0&gt;</code><br>Copy all command results also to the defined defaultPeer. If set results are sent both to the requestor and the defaultPeer if they are different.
  50975. </li>
  50976. <li><code>parseModeSend &lt;0_None or 1_Markdown or 2_HTML or 3_Inmsg &gt;</code><br>Specify the parse_mode (allowing formatting of text messages) for sent text messages. 0_None is the default where no formatting is used and plain text is sent. The different formatting options for markdown or HTML are described here <a href="https://core.telegram.org/bots/api/#formatting-options">https://core.telegram.org/bots/api/#formatting-options</a>. The option 3_Inmsg allows to specify the correct parse_mode at the beginning of the message (e.g. "Markdown*bold text*..." as message).
  50977. </li>
  50978. <li><code>webPagePreview &lt;1 or 0&gt;</code><br>Disable / Enable (Default = 1) web page preview on links in messages. See parameter https://core.telegram.org/bots/api/#sendmessage as described here: https://core.telegram.org/bots/api/#sendmessage
  50979. </li>
  50980. <br>
  50981. <li><code>cmdKeyword &lt;keyword&gt;</code><br>Specify a specific text that needs to be sent to make the rest of the message being executed as a command.
  50982. So if for example cmdKeyword is set to <code>ok fhem</code> then a message starting with this string will be executed as fhem command
  50983. (see also cmdTriggerOnly).<br>
  50984. NOTE: It is advised to set cmdRestrictedPeer for restricting access to this feature!<br>
  50985. Example: If this attribute is set to a value of <code>ok fhem</code> a message of <code>ok fhem attr telegram room IM</code>
  50986. send to the bot would execute the command <code>attr telegram room IM</code> and set a device called telegram into room IM.
  50987. The result of the cmd is sent to the requestor and in addition (if different) sent also as message to the defaultPeer (This can be controlled with the attribute <code>defaultPeerCopy</code>).
  50988. <br>
  50989. Note: <code>shutdown</code> is not supported as a command (also in favorites) and will be rejected. This is needed to avoid reexecution of the shutdown command directly after restart (endless loop !).
  50990. </li>
  50991. <li><code>cmdSentCommands &lt;keyword&gt;</code><br>Specify a specific text that will trigger sending the last commands back to the sender<br>
  50992. Example: If this attribute is set to a value of <code>last cmd</code> a message of <code>last cmd</code>
  50993. woud lead to a reply with the list of the last sent fhem commands will be sent back.<br>
  50994. Please also consider cmdRestrictedPeer for restricting access to this feature!<br>
  50995. </li>
  50996. <br>
  50997. <li><code>cmdFavorites &lt;keyword&gt;</code><br>Specify a specific text that will trigger sending the list of defined favorites or executes a given favorite by number (the favorites are defined in attribute <code>favorites</code>).
  50998. <br>
  50999. NOTE: It is advised to set cmdRestrictedPeer for restricting access to this feature!<br>
  51000. Example: If this attribute is set to a value of <code>favorite</code> a message of <code>favorite</code> to the bot will return a list of defined favorite commands and their index number. In the same case the message <code>favorite &lt;n&gt;</code> (with n being a number) would execute the command that is the n-th command in the favorites list. The result of the command will be returned as in other command executions.
  51001. </li>
  51002. <li><code>favorites &lt;list of commands&gt;</code><br>Specify a list of favorite commands for Fhem (without cmdKeyword). Multiple favorites are separated by a single semicolon (;). A double semicolon can be used to specify multiple commands for a single favorite <br>
  51003. <br>
  51004. Favorite commands are fhem commands with an optional alias for the command given. The alias can be sent as message (instead of the favoriteCmd) to execute the command. Before the favorite command also an alias (other shortcut for the favorite) or/and a descriptive text (description enclosed in []) can be specifed. If alias or description is specified this needs to be prefixed with a '/' and the alias if given needs to be specified first.
  51005. <br>
  51006. Favorites can also only be callable with the alias command and not via the corresponding favorite number and it will not be listed in the keyboard. For this the alias needs to be prefixed with a hyphen (-) after the leading slash
  51007. <br>
  51008. <br>
  51009. Example: Assuming cmdFavorites is set to a value of <code>favorite</code> and this attribute is set to a value of
  51010. <br><code>get lights status; /light=set lights on; /dark[Make it dark]=set lights off; /-heating=set heater; /[status]=get heater status;</code> <br>
  51011. <ul>
  51012. <li>Then a message "favorite1" to the bot would execute the command <code>get lights status</code></li>
  51013. <li>A message "favorite 2" or "/light" to the bot would execute the command <code>set lights on</code>. And the favorite would show as "make it dark" in the list of favorites.</li>
  51014. <li>A message "/heating on" to the bot would execute the command <code>set heater on</code><br> (Attention the remainder after the alias will be added to the command in fhem!). SInce this favorite is hidden only the alias can be used to call the favorite</li>
  51015. <li>A message "favorite 3" (since the one before is hidden) to the bot would execute the command <code>get heater status</code> and this favorite would show as "status" as a description in the favorite list</li>
  51016. </ul>
  51017. <br>
  51018. Favorite commands can also be prefixed with a question mark ('?') to enable a confirmation being requested before executing the command.
  51019. <br>
  51020. Examples: <code>get lights status; /light=?set lights on; /dark=set lights off; ?set heater;</code> <br>
  51021. <br>
  51022. <br>
  51023. Favorite commands can also be prefixed with a exclamation mark ('!') to ensure an ok-result message is sent even when the attribute cmdReturnEmptyResult is set to 0.
  51024. <br>
  51025. Examples: <code>get lights status; /light=!set lights on; /dark=set lights off; !set heater;</code> <br>
  51026. <br>
  51027. The question mark needs to be before the exclamation mark if both are given.
  51028. <br>
  51029. <br>
  51030. The description for an alias can also be prefixed with a '-'. In this case the favorite command/alias will not be shown in the favorite menu. This case only works for inline keyboard favorite menus.
  51031. <br>
  51032. <br>
  51033. Favorite commands can also include multiple fhem commands being execute using ;; as a separator
  51034. <br>
  51035. Example: <code>get lights status; /blink=set lights on;; sleep 3;; set lights off; set heater;</code> <br>
  51036. <br>
  51037. Meaning the full format for a single favorite is <code>/alias[description]=commands</code> where the alias can be empty if the description is given or <code>/alias=command</code> or <code>/-alias=command</code> for a hidden favorite or just the <code>commands</code>. In any case the commands can be also prefixed with a '?' or a '!' (or both). The description also can be given as <code>[-description]</code> to remvoe the command or alias from the favorite menus in inline keyboard menus. Spaces are only allowed in the description and the commands, usage of spaces in other areas might lead to wrong interpretation of the definition. Spaces and also many other characters are not supported in the alias commands by telegram, so if you want to have your favorite/alias directly recognized in the telegram app, restriction to letters, digits and underscore is required. Double semicolon will be used for specifying mutliple fhem commands in a single favorites, while single semicolon is used to separate between different favorite definitions
  51038. </li>
  51039. <li><code>favorites2Col &lt;1 or 0&gt;</code><br>Show favorites in 2 columns keyboard (instead of 1 column - default)
  51040. </li>
  51041. <li><code>favoritesInline &lt;1 or 0&gt;</code><br>When set to 1 it shows favorite dialog as inline keyboard and results will be also displayed inline (instead of as reply keyboards - default)
  51042. </li>
  51043. <br>
  51044. <li><code>cmdRestrictedPeer &lt;peer(s)&gt;</code><br>Restrict the execution of commands only to messages sent from the given peername or multiple peernames
  51045. (specified in the form of contact id, username or full name, multiple peers to be separated by a space). This applies to the internal machanisms for commands in the TelegramBot-Module (favorites, cmdKeyword etc) not for external methods to react on changes of readings.
  51046. A message with the cmd and sender is sent to the default peer in case of another peer trying to sent messages<br>
  51047. NOTE: It is recommended to use only peer ids for this restriction to reduce spoofing risk!
  51048. </li>
  51049. <li><code>cmdRespondChat &lt;1 or 0&gt;</code><br>Results / Responses from Commands will be sent to a group chat (1 = default) if originating from this chat. Otherwise responses will be sent only to the person initiating the command (personal chat) if set to value 0. <br>
  51050. Note: Group chats also need to be allowed as restricted Peer in cmdRestrictedPeer if this is set.
  51051. </li>
  51052. <li><code>allowUnknownContacts &lt;1 or 0&gt;</code><br>Allow new contacts to be added automatically (1 - Default) or restrict message reception only to known contacts and unknwown contacts will be ignored (0).
  51053. </li>
  51054. <li><code>saveStateOnContactChange &lt;1 or 0&gt;</code><br>Allow statefile being written on every new contact found, ensures new contacts not being lost on any loss of statefile. Default is on (1).
  51055. </li>
  51056. <li><code>cmdReturnEmptyResult &lt;1 or 0&gt;</code><br>Return empty (success) message for commands (default). Otherwise return messages are only sent if a result text or error message is the result of the command execution.
  51057. </li>
  51058. <li><code>allowedCommands &lt;list of command&gt;</code><br>Restrict the commands that can be executed through favorites and cmdKeyword to the listed commands (separated by space). Similar to the corresponding restriction in FHEMWEB. The allowedCommands will be set on the corresponding instance of an allowed device with the name "allowed_&lt;TelegrambotDeviceName&gt; and not on the telegramBotDevice! This allowed device is created and modified automatically.<br>
  51059. <b>ATTENTION: This is not a hardened secure blocking of command execution, there might be ways to break the restriction!</b>
  51060. </li>
  51061. <li><code>cmdTriggerOnly &lt;0 or 1&gt;</code><br>Restrict the execution of commands only to trigger command. If this attr is set (value 1), then only the name of the trigger even has to be given (i.e. without the preceding statement trigger).
  51062. So if for example cmdKeyword is set to <code>ok fhem</code> and cmdTriggerOnly is set, then a message of <code>ok fhem someMacro</code> would execute the fhem command <code>trigger someMacro</code>.<br>
  51063. Note: This is deprecated and will be removed in one of the next releases
  51064. </li>
  51065. <li><code>queryAnswerText &lt;text&gt;</code><br>Specify the automatic answering to buttons send through queryInline command. If this attribute is set an automatic answer is provided to the press of the inline button. The text in the attribute is evaluated through set-logic, so that readings and also perl code can be stored here. The result of the translation with set-logic will be sent as a text with the answer (this text is currently limited by telegram to 200 characters). <br>
  51066. Note: A value of "0" in the attribute or as result of the evaluation will result in no text being sent with the answer.
  51067. <br>
  51068. Note: If the peer sending the button is not authorized an answer is always sent without any text.
  51069. </li>
  51070. <br>
  51071. <li><code>pollingTimeout &lt;number&gt;</code><br>Used to specify the timeout for long polling of updates. A value of 0 is switching off any long poll.
  51072. In this case no updates are automatically received and therefore also no messages can be received. It is recommended to set the pollingtimeout to a reasonable time between 15 (not too short) and 60 (to avoid broken connections). See also attribute <code>disable</code>.
  51073. </li>
  51074. <li><code>pollingVerbose &lt;0_None 1_Digest 2_Log&gt;</code><br>Used to limit the amount of logging for errors of the polling connection. These errors are happening regularly and usually are not consider critical, since the polling restarts automatically and pauses in case of excess errors. With the default setting "1_Digest" once a day the number of errors on the last day is logged (log level 3). With "2_Log" every error is logged with log level 2. With the setting "0_None" no errors are logged. In any case the count of errors during the last day and the last error is stored in the readings <code>PollingErrCount</code> and <code>PollingLastError</code> </li>
  51075. <li><code>disable &lt;0 or 1&gt;</code><br>Used to disable the polling if set to 1 (default is 0).
  51076. </li>
  51077. <br>
  51078. <li><code>cmdTimeout &lt;number&gt;</code><br>Used to specify the timeout for sending commands. The default is a value of 30 seconds, which should be normally fine for most environments. In the case of slow or on-demand connections to the internet this parameter can be used to specify a longer time until a connection failure is considered.
  51079. </li>
  51080. <br>
  51081. <li><code>maxFileSize &lt;number of bytes&gt;</code><br>Maximum file size in bytes for transfer of files (images). If not set the internal limit is specified as 10MB (10485760B).
  51082. </li>
  51083. <li><code>filenameUrlEscape &lt;0 or 1&gt;</code><br>Specify if filenames can be specified using url escaping, so that special chanarcters as in URLs. This specifically allows to specify spaces in filenames as <code>%20</code>. Default is off (0).
  51084. </li>
  51085. <li><code>maxReturnSize &lt;number of chars&gt;</code><br>Maximum size of command result returned as a text message including header (Default is unlimited). The internal shown on the device is limited to 1000 chars.
  51086. </li>
  51087. <li><code>maxRetries &lt;0,1,2,3,4,5&gt;</code><br>Specify the number of retries for sending a message in case of a failure. The first retry is sent after 10sec, the second after 100, then after 1000s (~16min), then after 10000s (~2.5h), then after approximately a day. Setting the value to 0 (default) will result in no retries.
  51088. </li>
  51089. <br>
  51090. <li><code>textResponseConfirm &lt;TelegramBot FHEM : $peer\n Bestätigung \n&gt;</code><br>Text to be sent when a confirmation for a command is requested. Default is shown here and $peer will be replaced with the actual contact full name if added.
  51091. </li>
  51092. <li><code>textResponseFavorites &lt;TelegramBot FHEM : $peer\n Favoriten \n&gt;</code><br>Text to be sent as starter for the list of favorites. Default is shown here and $peer will be replaced with the actual contact full name if added.
  51093. </li>
  51094. <li><code>textResponseCommands &lt;TelegramBot FHEM : $peer\n Letzte Befehle \n&gt;</code><br>Text to be sent as starter for the list of last commands. Default is shown here and $peer will be replaced with the actual contact full name if added.
  51095. </li>
  51096. <li><code>textResponseResult &lt;TelegramBot FHEM : $peer\n Befehl:$cmd:\n Ergebnis:\n$result\n&gt;</code><br>Text to be sent as result for a cmd execution. Default is shown here and $peer will be replaced with the actual contact full name if added. Similarly $cmd and $result will be replaced with the cmd and the execution result. If the result is a response with just spaces, or other separator characters the result will be not sent at all (i.e. a values of "\n") will result in no message at all.
  51097. </li>
  51098. <li><code>textResponseUnauthorized &lt;UNAUTHORIZED: TelegramBot FHEM request from user :$peer\n Msg: $msg&gt;</code><br>Text to be sent as warning for unauthorized command requests. Default is shown here and $peer will be replaced with the actual contact full name and id if added. $msg will be replaced with the sent message.
  51099. </li>
  51100. <li><code>utf8Special &lt;0 or 1&gt;</code><br>Specify if utf8 encodings will be resolved before sending to avoid issues with timeout on HTTP send (experimental ! / default is off).
  51101. </li>
  51102. </ul>
  51103. <br><br>
  51104. <a name="TelegramBotreadings"></a>
  51105. <b>Readings</b>
  51106. <br><br>
  51107. <ul>
  51108. <li>Contacts &lt;text&gt;<br>The current list of contacts known to the telegram bot.
  51109. Each contact is specified as a triple in the same form as described above. Multiple contacts separated by a space. </li>
  51110. <br>
  51111. <li>msgId &lt;text&gt;<br>The id of the last received message is stored in this reading.
  51112. For secret chats a value of -1 will be given, since the msgIds of secret messages are not part of the consecutive numbering</li>
  51113. <li>msgPeer &lt;text&gt;<br>The sender name of the last received message (either full name or if not available @username)</li>
  51114. <li>msgPeerId &lt;text&gt;<br>The sender id of the last received message</li>
  51115. <li>msgChat &lt;text&gt;<br>The name of the Chat in which the last message was received (might be the peer if no group involved)</li>
  51116. <li>msgChatId &lt;ID&gt;<br>The id of the chat of the last message, if not identical to the private peer chat then this value will be the peer id</li>
  51117. <li>msgText &lt;text&gt;<br>The last received message text is stored in this reading. Information about special messages like documents, audio, video, locations or venues will be also stored in this reading</li>
  51118. <li>msgFileId &lt;fileid&gt;<br>The last received message file_id (Audio, Photo, Video, Voice or other Document) is stored in this reading.</li>
  51119. <li>msgReplyMsgId &lt;text&gt;<br>Contains the message id of the original message, that this message was a reply to</li>
  51120. <br>
  51121. <li>prevMsgId &lt;text&gt;<br>The id of the SECOND last received message is stored in this reading</li>
  51122. <li>prevMsgPeer &lt;text&gt;<br>The sender name of the SECOND last received message (either full name or if not available @username)</li>
  51123. <li>prevMsgPeerId &lt;text&gt;<br>The sender id of the SECOND last received message</li>
  51124. <li>prevMsgText &lt;text&gt;<br>The SECOND last received message text is stored in this reading</li>
  51125. <li>prevMsgFileId &lt;fileid&gt;<br>The SECOND last received file id is stored in this reading</li>
  51126. <br><b>Note: All prev... Readings are not triggering events</b><br>
  51127. <br>
  51128. <li>sentMsgId &lt;text&gt;<br>The id of the last sent message is stored in this reading, if not succesful the id is empty</li>
  51129. <li>sentMsgResult &lt;text&gt;<br>The result of the send process for the last message is contained in this reading - SUCCESS if succesful</li>
  51130. <br>
  51131. <li>StoredCommands &lt;text&gt;<br>A list of the last commands executed through TelegramBot. Maximum 10 commands are stored.</li>
  51132. <br>
  51133. <li>PollingErrCount &lt;number&gt;<br>Show the number of polling errors during the last day. The number is reset at the beginning of the next day.</li>
  51134. <li>PollingLastError &lt;number&gt;<br>Last error message that occured during a polling update call</li>
  51135. <br>
  51136. <li>callbackID &lt;id&gt; / callbackPeerId &lt;peer id&gt; / callbackPeer &lt;peer&gt;<br>Contains the query ID (respective the peer id and peer name) of the last received inline query from an inline query button (see set ... inline)</li>
  51137. </ul>
  51138. <br><br>
  51139. <a name="TelegramBotexamples"></a>
  51140. <b>Examples</b>
  51141. <br><br>
  51142. <ul>
  51143. <li>Send a telegram message if fhem has been newly started
  51144. <p>
  51145. <code>define notify_fhem_reload notify global:INITIALIZED set &lt;telegrambot&gt; message fhem started - just now </code>
  51146. </p>
  51147. </li>
  51148. <br>
  51149. <li>A command, that will retrieve an SVG plot and send this as a message back (can be also defined as a favorite).
  51150. <p>
  51151. Send the following message as a command to the bot <code>ok fhem { plotAsPng('SVG_FileLog_Aussen') }</code>
  51152. <br>assuming <code>ok fhem</code> is the command keyword)
  51153. </p> (
  51154. The png picture created by plotAsPng will then be send back in image format to the telegram client. This also works with other pictures returned and should also work with other media files (e.g. MP3 and doc files). The command can also be defined in a favorite.<br>
  51155. Remark: Example requires librsvg installed
  51156. </li>
  51157. <br>
  51158. <li>Allow telegram bot commands to be used<br>
  51159. If the keywords for commands are starting with a slash (/), the corresponding commands can be also defined with the
  51160. <a href=http://botsfortelegram.com/project/the-bot-father/>Bot Father</a>. So if a slash is typed a list of the commands will be automatically shown. Assuming that <code>cmdSentCommands</code> is set to <code>/History</code>. Then you can initiate the communication with the botfather, select the right bot and then with the command <code>/setcommands</code> define one or more commands like
  51161. <p>
  51162. <code>History-Show a history of the last 10 executed commands</code>
  51163. </p>
  51164. When typing a slash, then the text above will immediately show up in the client.
  51165. </li>
  51166. </ul>
  51167. </ul>
  51168. <a name="TellStick"></a>
  51169. <h3>TellStick</h3>
  51170. <ul>
  51171. <br>
  51172. <a name="TellStickdefine"></a>
  51173. <b>Define</b>
  51174. <ul>
  51175. <code>define &lt;name&gt; TellStick &lt;/path/to/tdtool&gt;</code>
  51176. <br><br>
  51177. Defines a path to the program "tdtool", which is used to control a (locally attached)
  51178. "Telldus TellStick [Duo]" USB device. A TellStick controls a wide range of 433 MHz
  51179. devices, like the widely available switchable power outlets from InterTechno.<br><br>
  51180. To keep things simple, FHEM interfaces with the telldus-core suite (available
  51181. for Linux, Windows, Mac OSX) via the supplied tool, "tdtool". This FHEM module
  51182. will initially use "tdtool --list" to receive a list of configured devices, then let
  51183. autocreate (if enabled) create them as <a href="#SIS_PMS">SIS_PMS</a> devices.<br></br>
  51184. <i>Please make sure</i> that the user running FHEM under ("fhem" in a standard setup on
  51185. Linux) has the <i>r/w-right to access the stick's device</i> ("/dev/tellstick"
  51186. in telldus-core version 2.0) &mdash; if the state of your devices do not change when
  51187. modified im FHEM, access rights problems are the most probable cause
  51188. (<code>chmod o+rw /dev/tellstick</code> should fix that; you may want to automate it
  51189. via udev or adding the fhem user to the proper group ;))<br></br>
  51190. This module has only been tested with the 2.0 branch of teldus-core because of a known bug
  51191. in 2.1, <a href="http://www.telldus.com/forum/viewtopic.php?f=15&t=1645"> preventing
  51192. version 2.1 working properly with some TellSticks</a> and/or "tdtool" application; FTR, the
  51193. "Batch: 8" version a was granted usage of for writing this module was impacted by it ...
  51194. To actually control any power sockets, you need to define a <a href="#SIS_PMS">SIS_PMS</a>
  51195. device &mdash; TellStick.pm uses SIS_PMS devices ("socket" is te:ll:st:ck:01, "socketnr"
  51196. is the ID of the device in "tdtool"), as as of now only on/off switching is supported and
  51197. this was the easiest implementation path. SIS_PMS is supported by <a href="http://sites.google.com/site/andfhem/">andFHEM</a>, the Android
  51198. frontend, so this make some sense. (Furthermore, I don't own dimmable devices and they are
  51199. actually not really cheap; >15 EUR/socket compared to the 15 EUR for 5 switch-only, non-self
  51200. learning socket adapters from Intertechno at your local home improvement store.)
  51201. <br><br>
  51202. Example:
  51203. <ul>
  51204. <code>define TStick TellStick /usr/bin/tdtool</code><br>
  51205. <code>define Deckenfluter SIS_PMS te:ll:st:ck:01 2</code><br>
  51206. </ul>
  51207. <br>
  51208. </ul>
  51209. <a name="TellStickset"></a>
  51210. <b>Set</b> <ul>N/A</ul><br>
  51211. <a name="TellStickget"></a>
  51212. <b>Get</b> <ul>N/A</ul><br>
  51213. <a name="TellStickattr"></a>
  51214. <b>Attributes</b>
  51215. <ul>
  51216. <li>none <!--<a href="#model">model</a> (TellStick)--></li>
  51217. </ul>
  51218. <br>
  51219. </ul>
  51220. <a name="TeslaPowerwall2AC"></a>
  51221. <h3>Tesla Powerwall 2 AC</h3>
  51222. <ul>
  51223. <u><b>TeslaPowerwall2AC - Retrieves data from a Tesla Powerwall 2AC System</b></u>
  51224. <br>
  51225. With this module it is possible to read the data from a Tesla Powerwall 2AC and to set it as reading.
  51226. <br><br>
  51227. <a name="TeslaPowerwall2ACdefine"></a>
  51228. <b>Define</b>
  51229. <ul><br>
  51230. <code>define &lt;name&gt; TeslaPowerwall2AC &lt;HOST&gt;</code>
  51231. <br><br>
  51232. Example:
  51233. <ul><br>
  51234. <code>define myPowerWall TeslaPowerwall2AC 192.168.1.34</code><br>
  51235. </ul>
  51236. <br>
  51237. This statement creates a Device with the name myPowerWall and the Host IP 192.168.1.34.<br>
  51238. After the device has been created, the current data of Powerwall is automatically read from the device.
  51239. </ul>
  51240. <br><br>
  51241. <a name="TeslaPowerwall2ACreadings"></a>
  51242. <b>Readings</b>
  51243. <ul>
  51244. <li>actionQueue - information about the entries in the action queue</li>
  51245. <li>aggregates-* - readings of the /api/meters/aggregates response</li>
  51246. <li>batteryLevel - battery level in percent</li>
  51247. <li>batteryPower - battery capacity in kWh</li>
  51248. <li>powerwalls-* - readings of the /api/powerwalls response</li>
  51249. <li>registration-* - readings of the /api/customer/registration response</li>
  51250. <li>siteinfo-* - readings of the /api/site_info response</li>
  51251. <li>sitemaster-* - readings of the /api/sitemaster response</li>
  51252. <li>state - information about internel modul processes</li>
  51253. <li>status-* - readings of the /api/status response</li>
  51254. <li>statussoe-* - readings of the /api/system_status/soe response</li>
  51255. </ul>
  51256. <a name="TeslaPowerwall2ACget"></a>
  51257. <b>get</b>
  51258. <ul>
  51259. <li>aggregates - fetch data from url path /api/meters/aggregates</li>
  51260. <li>powerwalls - fetch data from url path /api/powerwalls</li>
  51261. <li>registration - fetch data from url path /api/customer/registration</li>
  51262. <li>siteinfo - fetch data from url path /api/site_info</li>
  51263. <li>sitemaster - fetch data from url path /api/sitemaster</li>
  51264. <li>status - fetch data from url path /api/status</li>
  51265. <li>statussoe - fetch data from url path /api/system_status/soe</li>
  51266. </ul>
  51267. <a name="TeslaPowerwall2ACattribute"></a>
  51268. <b>Attribute</b>
  51269. <ul>
  51270. <li>interval - interval in seconds for automatically fetch data (default 300)</li>
  51271. </ul>
  51272. </ul>
  51273. <a name="Text2Speech"></a>
  51274. <h3>Text2Speech</h3>
  51275. <ul>
  51276. <br>
  51277. <a name="Text2Speechdefine"></a>
  51278. <b>Define</b>
  51279. <ul>
  51280. <b>Local : </b><code>define &lt;name&gt; Text2Speech &lt;alsadevice&gt;</code><br>
  51281. <b>Remote: </b><code>define &lt;name&gt; Text2Speech &lt;host&gt;[:&lt;portnr&gt;][:SSL] [portpassword]</code>
  51282. <p>
  51283. This module converts any text into speech with serveral possible providers. The Device can be defined as locally
  51284. or remote device.
  51285. </p>
  51286. <li>
  51287. <b>Local Device</b><br>
  51288. <ul>
  51289. The output will be send to any connected audiodevice. For example external speakers connected per jack
  51290. or with bluetooth speakers - connected per bluetooth dongle. Its important to install mplayer.<br>
  51291. <code>apt-get install mplayer</code><br>
  51292. The given alsadevice has to be configured in <code>/etc/asound.conf</code>
  51293. <p>
  51294. <b>Special AlsaDevice: </b><i>default</i><br>
  51295. The internal mplayer command will be without any audio directive if the given alsadevice is <i>default</i>.
  51296. In this case mplayer is using the standard audiodevice.
  51297. </p>
  51298. <p>
  51299. <b>Example:</b><br>
  51300. <code>define MyTTS Text2Speech hw=0.0</code><br>
  51301. <code>define MyTTS Text2Speech default</code>
  51302. </p>
  51303. </ul>
  51304. </li>
  51305. <li>
  51306. <b>Remote Device</b><br>
  51307. <ul>
  51308. This module can configured as remote-device for client-server Environments. The Client has to be configured
  51309. as local device.<br>
  51310. Notice: the Name of the locally instance has to be the same!
  51311. <ul>
  51312. <li>Host: setting up IP-adress</li>
  51313. <li>PortNr: setting up TelnetPort of FHEM; default: 7072</li>
  51314. <li>SSL: setting up if connect over SSL; default: no SSL</li>
  51315. <li>PortPassword: setting up the configured target telnet passwort</li>
  51316. </ul>
  51317. <p>
  51318. <b>Example:</b><br>
  51319. <code>define MyTTS Text2Speech 192.168.178.10:7072 fhempasswd</code>
  51320. <code>define MyTTS Text2Speech 192.168.178.10</code>
  51321. </p>
  51322. If a PRESENCE Device is avilable for the host IP-address, than this will be used to detect the reachability instead of the blocking internal method.
  51323. </ul>
  51324. </li>
  51325. <li>
  51326. <b>Server Device</b>
  51327. <ul>
  51328. In case of an usage of an Server, only the mp3 file will be generated.It makes no sence to use the attribute <i>TTS_speakAsFastAsPossible</i>.
  51329. Its recommend, to use the attribute <i>TTS_useMP3Wrap</i>. Otherwise only the last audiobrick will be shown is reading <i>lastFilename</i>.
  51330. </ul>
  51331. </li>
  51332. </ul>
  51333. </ul>
  51334. <a name="Text2Speechset"></a>
  51335. <b>Set</b>
  51336. <ul>
  51337. <li><b>tts</b>:<br>
  51338. Giving a text to translate into audio. You play set mp3-files directly. In this case you have to enclosure them with a single colon before and after the declaration.
  51339. The files must save under the directory of given <i>TTS_FileTemplateDir</i>.
  51340. Please note: The text doesn´t have any colons itself.
  51341. </li>
  51342. <li><b>volume</b>:<br>
  51343. Setting up the volume audio response.<br>
  51344. Notice: Only available in locally instances!
  51345. </li>
  51346. </ul><br>
  51347. <a name="Text2Speechget"></a>
  51348. <b>Get</b>
  51349. <ul>N/A</ul><br>
  51350. <a name="Text2Speechattr"></a>
  51351. <b>Attributes</b>
  51352. <ul>
  51353. <li>TTS_Delemiter<br>
  51354. optional: By using the google engine, its not possible to convert more than 100 characters in a single audio brick.
  51355. With a delemiter the audio brick will be split at this character. A delemiter must be a single character.!<br>
  51356. By default, ech audio brick will be split at sentence end. Is a single sentence longer than 100 characters,
  51357. the sentence will be split additionally at comma, semicolon and the word <i>and</i>.<br>
  51358. Notice: Only available in locally instances with Google engine!
  51359. </li>
  51360. <li>TTS_Ressource<br>
  51361. optional: Selection of the Translator Engine<br>
  51362. Notice: Only available in locally instances!
  51363. <ul>
  51364. <li>Google<br>
  51365. Using the Google Engine. It´s nessessary to have internet access. This engine is the recommend engine
  51366. because the quality is fantastic. This engine is using by default.
  51367. </li>
  51368. <li>VoiceRSS<br>
  51369. Using the VoiceRSS Engine. Its a free engine till 350 requests per day. If you need more, you have to pay.
  51370. It´s nessessary to have internet access. This engine is the 2nd recommend engine
  51371. because the quality is also fantastic. To use this engine you need an APIKey (see TTS_APIKey)
  51372. </li>
  51373. <li>ESpeak<br>
  51374. Using the ESpeak Engine. Installation Espeak and lame is required.<br>
  51375. <code>apt-get install espeak lame</code>
  51376. </li>
  51377. <li>SVOX-pico<br>
  51378. Using the SVOX-Pico TTS-Engine (from the AOSP).<br>
  51379. Installation of the engine and <code>lame</code> is required:<br>
  51380. <code>sudo apt-get install libttspico-utils lame</code><br><br>
  51381. On ARM/Raspbian the package <code>libttspico-utils</code>,<br>
  51382. so you may have to compile it yourself or use the precompiled package from <a target="_blank" href"http://www.robotnet.de/2014/03/20/sprich-freund-und-tritt-ein-sprachausgabe-fur-den-rasberry-pi/">this guide</a>, in short:<br>
  51383. <code>sudo apt-get install libpopt-dev lame</code><br>
  51384. <code>cd /tmp</code><br>
  51385. <code>wget http://www.dr-bischoff.de/raspi/pico2wave.deb</code><br>
  51386. <code>sudo dpkg --install pico2wave.deb</code>
  51387. </li>
  51388. </ul>
  51389. </li>
  51390. <li>TTS_APIKey<br>
  51391. An APIKey its needed if you want to use VoiceRSS. You have to register at the following page:<br>
  51392. http://www.voicerss.org/registration.aspx <br>
  51393. After this, you will get your personal APIKey.
  51394. </li>
  51395. <li>TTS_User<br>
  51396. Actual without any usage. Needed in case if a TTS Engine need an username and an apikey for each request.
  51397. </li>
  51398. <li>TTS_CacheFileDir<br>
  51399. optional: The downloaded Goole audio bricks are saved in this folder for reusing.
  51400. No automatically implemented deleting are available.<br>
  51401. Default: <i>cache/</i><br>
  51402. Notice: Only available in locally instances!
  51403. </li>
  51404. <li>TTS_UseMP3Wrap<br>
  51405. optional: To become a liquid audio response its recommend to use the tool mp3wrap.
  51406. Each downloaded audio bricks are concatinated to a single audio file to play with mplayer.<br>
  51407. Installtion of the mp3wrap source is required.<br>
  51408. <code>apt-get install mp3wrap</code><br>
  51409. Notice: Only available in locally instances!
  51410. </li>
  51411. <li>TTS_MplayerCall<br>
  51412. optional: Setting up the Mplayer system call. The following example is default.<br>
  51413. Example: <code>sudo /usr/bin/mplayer</code>
  51414. </li>
  51415. <li>TTS_SentenceAppendix<br>
  51416. Optional: Definition of one mp3-file to append each time of audio response.<br>
  51417. Using of Mp3Wrap is required. The audio bricks has to be downloaded before into CacheFileDir.
  51418. Example: <code>silence.mp3</code>
  51419. </li>
  51420. <li>TTS_FileMapping<br>
  51421. Definition of mp3files with a custom templatedefinition. Separated by space.
  51422. All templatedefinitions can used in audiobricks by <i>tts</i>.
  51423. The definition must begin and end with e colon.
  51424. The mp3files must saved in the given directory by <i>TTS_FIleTemplateDir</i>.<br>
  51425. <code>attr myTTS TTS_FileMapping ring:ringtone.mp3 beep:MyBeep.mp3</code><br>
  51426. <code>set MyTTS tts Attention: This is my ringtone :ring: Its loud?</code>
  51427. </li>
  51428. <li>TTS_FileTemplateDir<br>
  51429. Directory to save all mp3-files are defined in <i>TTS_FileMapping</i> und <i>TTS_SentenceAppendix</i><br>
  51430. Optional, Default: <code>cache/templates</code>
  51431. </li>
  51432. <li>TTS_noStatisticsLog<br>
  51433. If set to <b>1</b>, it prevents logging statistics to DbLog Devices, default is <b>0</b><br>
  51434. But please notice: this looging is important to able to delete longer unused cachefiles. If you disable this
  51435. please take care to cleanup your cachedirectory by yourself.
  51436. </li>
  51437. <li>TTS_speakAsFastAsPossible<br>
  51438. Trying to get an speach as fast as possible. In case of not present audiobricks, you can hear a short break.
  51439. The audiobrick will be download at this time. In case of an presentation of all audiobricks at local cache,
  51440. this attribute has no impact.<br>
  51441. Attribute only valid in case of an local or server instance.
  51442. </li>
  51443. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  51444. <li><a href="#disable">disable</a><br>
  51445. If this attribute is activated, the soundoutput will be disabled.<br>
  51446. Possible values: 0 => not disabled , 1 => disabled<br>
  51447. Default Value is 0 (not disabled)<br><br>
  51448. </li>
  51449. <li><a href="#verbose">verbose</a><br>
  51450. <b>4:</b> each step will be logged<br>
  51451. <b>5:</b> Additionally the individual debug informations from mplayer and mp3wrap will be logged
  51452. </li>
  51453. </ul><br>
  51454. <a name="Text2SpeechExamples"></a>
  51455. <b>Beispiele</b>
  51456. <ul>
  51457. <code>define MyTTS Text2Speech hw=0.0</code><br>
  51458. <code>set MyTTS tts Die Alarmanlage ist bereit.</code><br>
  51459. <code>set MyTTS tts :beep.mp3:</code><br>
  51460. <code>set MyTTS tts :mytemplates/alarm.mp3:Die Alarmanlage ist bereit.:ring.mp3:</code><br>
  51461. </ul>
  51462. <a name="TrashCal"></a>
  51463. <h3>TrashCal</h3>
  51464. <ul>
  51465. Note: this module needs the HTTP::Request,HTML::Parser and LWP::UserAgent perl modules.
  51466. <br>
  51467. At this moment only city "Magdeburg" is supported at this site:<br>
  51468. <i>http://sab.metageneric.de/app/sab_i_tp/index.php</i>
  51469. <br><br>
  51470. <a name="TrashCal define"></a>
  51471. <b>Define</b>
  51472. <ul>
  51473. <code>define &lt;name&gt; TrashCal &lt;type&gt; </code>
  51474. <br><br>
  51475. Defines a new instanze of Trashcalendar. At this time the &lt;type&gt; is not used
  51476. <br>
  51477. Examples:
  51478. <ul>
  51479. <code>define MyTrashCal TrashCal Restabfall</code><br>
  51480. </ul>
  51481. </ul>
  51482. <br>
  51483. <a name="TrashCalset"></a>
  51484. <b>Set</b>
  51485. <ul>N/A</ul><br>
  51486. <a name="TrashCalget"></a>
  51487. <b>Get</b>
  51488. <ul>N/A</ul><br>
  51489. <a name="TrashCalattr"></a>
  51490. <b>Attributes</b>
  51491. <ul>
  51492. <li>TrashCal_Link<br>
  51493. setting up the URL to grab the Trashcalendar
  51494. <br>Example:
  51495. <ul>
  51496. <code>http://sab.metageneric.de/app/sab_i_tp/index.php?r=getHausnummerInfo&strasse=Torplatz&hausnummer=1&stadtteil_id=1609&dsd_behaelter_value=b120_b240</code>
  51497. <br>
  51498. </ul>
  51499. </li>
  51500. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  51501. <li><a href="#disable">disable</a><br>
  51502. If this attribute is activated, the module will be disabled.<br>
  51503. Possible values: 0 => not disabled , 1 => disabled<br>
  51504. Default Value is 0 (not disabled)<br><br>
  51505. </li>
  51506. <li><a href="#verbose">verbose</a><br>
  51507. <b>4:</b> each major step will be logged<br>
  51508. <b>5:</b> Additionally some minor steps will be logged
  51509. </li>
  51510. </ul>
  51511. </ul>
  51512. <a name="Twilight"></a>
  51513. <h3>Twilight</h3>
  51514. <ul>
  51515. <br>
  51516. <a name="Twilightdefine"></a>
  51517. <b>Define</b>
  51518. <ul>
  51519. <code>define &lt;name&gt; Twilight &lt;latitude&gt; &lt;longitude&gt; [&lt;indoor_horizon&gt; [&lt;Weather_Position&gt;]]</code><br>
  51520. <br>
  51521. Defines a virtual device for Twilight calculations <br><br>
  51522. <b>latitude, longitude</b>
  51523. <br>
  51524. The parameters <b>latitude</b> and <b>longitude</b> are decimal numbers which give the position on earth for which the twilight states shall be calculated.
  51525. <br><br>
  51526. <b>indoor_horizon</b>
  51527. <br>
  51528. The parameter <b>indoor_horizon</b> gives a virtual horizon, that shall be used for calculation of indoor twilight. Minimal value -6 means indoor values are the same like civil values.
  51529. indoor_horizon 0 means indoor values are the same as real values. indoor_horizon > 0 means earlier indoor sunset resp. later indoor sunrise.
  51530. <br><br>
  51531. <b>Weather_Position</b>
  51532. <br>
  51533. The parameter <b>Weather_Position</b> is the yahoo weather id used for getting the weather condition. Go to http://weather.yahoo.com/ and enter a city or zip code. In the upcoming webpage, the id is a the end of the URL. Example: Munich, Germany -> 676757
  51534. <br><br>
  51535. A Twilight device periodically calculates the times of different twilight phases throughout the day.
  51536. It calculates a virtual "light" element, that gives an indicator about the amount of the current daylight.
  51537. Besides the location on earth it is influenced by a so called "indoor horizon" (e.g. if there are high buildings, mountains) as well as by weather conditions. Very bad weather conditions lead to a reduced daylight for nearly the whole day.
  51538. The light calculated spans between 0 and 6, where the values mean the following:
  51539. <br><br>
  51540. <b>light</b>
  51541. <br>
  51542. <code>0 - total night, sun is at least -18 degree below horizon</code><br>
  51543. <code>1 - astronomical twilight, sun is between -12 and -18 degree below horizon</code><br>
  51544. <code>2 - nautical twilight, sun is between -6 and -12 degree below horizon</code><br>
  51545. <code>3 - civil twilight, sun is between 0 and -6 degree below horizon</code><br>
  51546. <code>4 - indoor twilight, sun is between the indoor_horizon and 0 degree below horizon (not used if indoor_horizon=0)</code><br>
  51547. <code>5 - weather twilight, sun is between indoor_horizon and a virtual weather horizon (the weather horizon depends on weather conditions (optional)</code><br>
  51548. <code>6 - maximum daylight</code><br>
  51549. <br>
  51550. <b>Azimut, Elevation, Twilight</b>
  51551. <br>
  51552. The module calculates additionally the <b>azimuth</b> and the <b>elevation</b> of the sun. The values can be used to control a roller shutter.
  51553. <br><br>
  51554. As a new (twi)light value the reading <b>Twilight</b> ist added. It is derived from the elevation of the sun with the formula: (Elevation+12)/18 * 100). The value allows a more detailed
  51555. control of any lamp during the sunrise/sunset phase. The value ist betwenn 0% and 100% when the elevation is between -12&deg; and 6&deg;.
  51556. <br><br>
  51557. You must know, that depending on the latitude, the sun will not reach any elevation. In june/july the sun never falls in middle europe
  51558. below -18&deg;. In more northern countries(norway ...) the sun may not go below 0&deg;.
  51559. <br><br>
  51560. Any control depending on the value of Twilight must
  51561. consider these aspects.
  51562. <br><br>
  51563. Example:
  51564. <pre>
  51565. define myTwilight Twilight 49.962529 10.324845 3 676757
  51566. </pre>
  51567. </ul>
  51568. <br>
  51569. <a name="Twilightset"></a>
  51570. <b>Set </b>
  51571. <ul>
  51572. N/A
  51573. </ul>
  51574. <br>
  51575. <a name="Twilightget"></a>
  51576. <b>Get</b>
  51577. <ul>
  51578. <code>get &lt;name&gt; &lt;reading&gt;</code><br><br>
  51579. <table>
  51580. <tr><td><b>light</b></td><td>the current virtual daylight value</td></tr>
  51581. <tr><td><b>nextEvent</b></td><td>the name of the next event</td></tr>
  51582. <tr><td><b>nextEventTime</b></td><td>the time when the next event will probably happen (during light phase 5 and 6 this is updated when weather conditions change</td></tr>
  51583. <tr><td><b>sr_astro</b></td><td>time of astronomical sunrise</td></tr>
  51584. <tr><td><b>sr_naut</b></td><td>time of nautical sunrise</td></tr>
  51585. <tr><td><b>sr_civil</b></td><td>time of civil sunrise</td></tr>
  51586. <tr><td><b>sr</b></td><td>time of sunrise</td></tr>
  51587. <tr><td><b>sr_indoor</b></td><td>time of indoor sunrise</td></tr>
  51588. <tr><td><b>sr_weather</b></td><td>time of weather sunrise</td></tr>
  51589. <tr><td><b>ss_weather</b></td><td>time of weather sunset</td></tr>
  51590. <tr><td><b>ss_indoor</b></td><td>time of indoor sunset</td></tr>
  51591. <tr><td><b>ss</b></td><td>time of sunset</td></tr>
  51592. <tr><td><b>ss_civil</b></td><td>time of civil sunset</td></tr>
  51593. <tr><td><b>ss_nautic</b></td><td>time of nautic sunset</td></tr>
  51594. <tr><td><b>ss_astro</b></td><td>time of astro sunset</td></tr>
  51595. <tr><td><b>azimuth</b></td><td>the current azimuth of the sun 0&deg; ist north 180&deg; is south</td></tr>
  51596. <tr><td><b>compasspoint</b></td><td>a textual representation of the compass point</td></tr>
  51597. <tr><td><b>elevation</b></td><td>the elevaltion of the sun</td></tr>
  51598. <tr><td><b>twilight</b></td><td>a percetal value of a new (twi)light value: (elevation+12)/18 * 100) </td></tr>
  51599. <tr><td><b>twilight_weather</b></td><td>a percetal value of a new (twi)light value: (elevation-WEATHER_HORIZON+12)/18 * 100). So if there is weather, it
  51600. is always a little bit darker than by fair weather</td></tr>
  51601. <tr><td><b>condition</b></td><td>the yahoo condition weather code</td></tr>
  51602. <tr><td><b>condition_txt</b></td><td>the yahoo condition weather code as textual representation</td></tr>
  51603. <tr><td><b>horizon</b></td><td>value auf the actual horizon 0&deg;, -6&deg;, -12&deg;, -18&deg;</td></tr>
  51604. </table>
  51605. </ul>
  51606. <br>
  51607. <a name="Twilightattr"></a>
  51608. <b>Attributes</b>
  51609. <ul>
  51610. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  51611. <li><b>useExtWeather &lt;device&gt;:&lt;reading&gt;</b></li>
  51612. use data from other devices to calculate <b>twilight_weather</b>.<br/>
  51613. The reading used shoud be in the range of 0 to 100 like the reading <b>c_clouds</b> in an <b><a href="#openweathermap">openweathermap</a></b> device, where 0 is clear sky and 100 are overcast clouds.<br/>
  51614. With the use of this attribute weather effects like heavy rain or thunderstorms are neglegted for the calculation of the <b>twilight_weather</b> reading.<br/>
  51615. </ul>
  51616. <br>
  51617. <a name="Twilightfunc"></a>
  51618. <b>Functions</b>
  51619. <ul>
  51620. <li><b>twilight</b>(<b>$twilight</b>, <b>$reading</b>, <b>$min</b>, <b>$max</b>)</li> - implements a routine to compute the twilighttimes like sunrise with min max values.<br><br>
  51621. <table>
  51622. <tr><td><b>$twilight</b></td><td>name of the twilight instance</td></tr>
  51623. <tr><td><b>$reading</b></td><td>name of the reading to use example: ss_astro, ss_weather ...</td></tr>
  51624. <tr><td><b>$min</b></td><td>parameter min time - optional</td></tr>
  51625. <tr><td><b>$max</b></td><td>parameter max time - optional</td></tr>
  51626. </table>
  51627. </ul>
  51628. <br>
  51629. Example:
  51630. <pre>
  51631. define BlindDown at *{twilight("myTwilight","sr_indoor","7:30","9:00")} set xxxx position 100
  51632. # xxxx is a defined blind
  51633. </pre>
  51634. </ul>
  51635. <a name="UNIRoll"></a>
  51636. <h3>UNIRoll</h3>
  51637. <ul>
  51638. The protocol is used by the Lott UNIROLL R-23700 reciever. The radio
  51639. (868.35 MHz) messages are either received through an <a href="#FHZ">FHZ</a>
  51640. or an <a href="#CUL">CUL</a> device, so this must be defined first.
  51641. Recieving sender messages is not integrated jet.
  51642. The CUL has to allow working with zero synchbits at the beginning of a raw-message.
  51643. This is possible with culfw 1.49 or higher.
  51644. <br><br>
  51645. <a name="UNIRolldefine"></a>
  51646. <b>Define</b>
  51647. <ul>
  51648. <code>define &lt;name&gt; UNIRoll &lt;devicegroup&gt; &lt;deviceaddress&gt; </code>
  51649. <br><br>
  51650. The values of devicegroup address (similar to the housecode) and device address (button)
  51651. has to be defined as hexadecimal value.
  51652. There is no master or group code integrated.
  51653. <br>
  51654. <ul>
  51655. <li><code>&lt;devicecode&gt;</code> is a 4 digit hex number,
  51656. corresponding to the housecode address.</li>
  51657. <li><code>&lt;channel&gt;</code> is a 1 digit hex number,
  51658. corresponding to a button of the transmitter.</li>
  51659. </ul>
  51660. <br>
  51661. Example:
  51662. <ul>
  51663. <code>define roll UNIRoll 7777 0</code><br>
  51664. </ul>
  51665. </ul>
  51666. <br>
  51667. <a name="UNIRollset"></a>
  51668. <b>Set </b>
  51669. <ul>
  51670. <code>set &lt;name&gt; &lt;value&gt; [&lt;time&gt]</code>
  51671. <br><br>
  51672. where <code>value</code> is one of:<br>
  51673. <pre>
  51674. up
  51675. stop
  51676. down
  51677. pos (The attribute useRolloPos has to be set to 1 to use this.)
  51678. [&lt;time&gt] in seconds for up, down or pos
  51679. </pre>
  51680. Examples:
  51681. <ul>
  51682. <code>set roll up</code><br>
  51683. <code>set roll up 10</code><br>
  51684. <code>set roll1,roll2,roll3 up</code><br>
  51685. <code>set roll1-roll3 up</code><br>
  51686. </ul>
  51687. <br></ul>
  51688. <b>Get</b> <ul>N/A</ul><br>
  51689. <a name="UNIRollattr"></a>
  51690. <b>Attributes</b>
  51691. <ul>
  51692. <a name="IODev"></a>
  51693. <li>IODev<br>
  51694. Set the IO or physical device which should be used for sending signals
  51695. for this "logical" device. An example for the physical device is an FHZ
  51696. or a CUL. The device will not work without this entry.</li><br>
  51697. <a name="eventMap"></a>
  51698. <li>eventMap<br>
  51699. Replace event names and set arguments. The value of this attribute
  51700. consists of a list of space separated values, each value is a colon
  51701. separated pair. The first part specifies the "old" value, the second
  51702. the new/desired value. If the first character is slash(/) or komma(,)
  51703. then split not by space but by this character, enabling to embed spaces.<br><br>
  51704. Examples:<ul><code>
  51705. attr device eventMap up:open down:closed<br>
  51706. set device open
  51707. </code></ul>
  51708. </li><br>
  51709. <li><a href="#showtime">showtime</a></li><br>
  51710. <a name="sendStopBeforeCmd"></a>
  51711. <li>sendStopBeforeCmd &lt;value&gt;<br>
  51712. Before any up/down-command a stop-command will be sent to stop a random
  51713. operation. This might cause failure in some situations. This attribute
  51714. can be used to switch off the stop-command by setting it to these values.<br><br>
  51715. where <code>value</code> is one of:<br>
  51716. <pre>
  51717. 1 - send always stop (default)
  51718. 0 - send no stop
  51719. 2 - send stop only before up
  51720. 3 - send stop only before down
  51721. </pre></li>
  51722. <a name="useRolloPos"></a>
  51723. <li>useRolloPos &lt;value&gt;<br>
  51724. The position of each device can be stored. By this it is possible to move from
  51725. any position to any other position. As this feature is software-based, a
  51726. manual operation will not be recognized. To set the device into a definite
  51727. state, a up or down command will reset the counter for the position.<br><br>
  51728. where <code>value</code> is one of:<br>
  51729. <pre>
  51730. 1 - RolloPos will be used
  51731. 0 - RolloPos is not used (default)
  51732. </pre><br>
  51733. These attributes will be created automatical if useRolloPos is set to 1.
  51734. They will not be deleted, if the value is set to 0 or the attribut is deleted.
  51735. <pre>
  51736. rMin - Time in seconds for the topmost position
  51737. rMax - Time in seconds until the device is fully closed
  51738. rPos - This is an internal value and must not be changed!
  51739. </pre></li>
  51740. <a name="model"></a>
  51741. <li>model<br>
  51742. The model attribute denotes the model type of the device.
  51743. The attributes will (currently) not be used by the fhem.pl directly.
  51744. It can be used by e.g. external programs or web interfaces to
  51745. distinguish classes of devices and send the appropriate commands.
  51746. The spelling of the model names are as quoted on the printed
  51747. documentation which comes which each device. This name is used
  51748. without blanks in all lower-case letters. Valid characters should be
  51749. <code>a-z 0-9</code> and <code>-</code> (dash),
  51750. other characters should be ommited. Here is a list of "official"
  51751. devices:<br><br>
  51752. <b>Receiver/Actor</b>: there is only one reciever: R_23700
  51753. </li><br>
  51754. </ul>
  51755. <br>
  51756. </ul>
  51757. <a name="USBWX"></a>
  51758. <h3>USBWX</h3>
  51759. <ul>
  51760. The USBWX module interprets the messages received by the ELV <a
  51761. href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">USB-WDE1</a>
  51762. weather receiver. This receiver is compaptible with the following ELV sensors:
  51763. KS200/KS300, S300IA, S300TH, ASH2200, PS50. It also known to work with Conrad
  51764. weather sensors KS555, S555TH and ASH555.<br> This module was tested with ELV
  51765. S300TH, ELV ASH2200, ELV KS300, Conrad S555TH and Conrad KS555. <br> Readings
  51766. and STATE of temperature/humidity sensors are compatible with the CUL_WS
  51767. module. For KS300/KS555 sensors STATE is compatible with the KS300 module. The
  51768. module is integrated into autocreate to generate the appropriate filelogs and
  51769. weblinks automatically.
  51770. <br><br>
  51771. Note: this module requires the Device::SerialPort or Win32::SerialPort module
  51772. if the devices is connected via USB or a serial port.
  51773. <br><br>
  51774. <a name="USBWXdefine"></a>
  51775. <b>Define</b>
  51776. <ul>
  51777. <code>define &lt;name&gt; USBWX &lt;serial device&gt;</code>
  51778. <br>
  51779. <br>Defines USB-WDE1 attached via usb.<br>
  51780. <br>
  51781. <code>define &lt;name&gt; USBWX &lt;code&gt; [corr1...corr4]</code> <br>
  51782. <br>
  51783. &lt;code&gt; is the code which must be set on the sensor. Valid values
  51784. are 1 through 8. <br> 9 is used as the sensor id of the ks300 sensor.<br>
  51785. corr1..corr4 are up to 4 numerical correction factors, which will be added
  51786. to the respective value to calibrate the device. Note: rain-values will be
  51787. multiplied and not added to the correction factor.
  51788. <br>
  51789. <br>
  51790. Example:<pre>
  51791. define USBWDE1 USBWX /dev/ttyUSB0
  51792. define USBWX_1 USBWX 1
  51793. define USBWX_livingroom USBWX 2
  51794. define USBWX_ks300 USBWX 9
  51795. </pre>
  51796. </ul>
  51797. <a name="USBWXset"></a>
  51798. <b>Set</b> <ul>N/A</ul><br>
  51799. <a name="USBWXget"></a>
  51800. <b>Get</b> <ul>N/A</ul><br>
  51801. <a name="USBWXattr"></a>
  51802. <b>Attributes</b>
  51803. <ul>
  51804. <li><a href="#model">model</a></li>
  51805. <li><a href="#loglevel">loglevel</a></li>
  51806. </ul>
  51807. <br>
  51808. </ul>
  51809. <a name="USF1000"></a>
  51810. <h3>USF1000</h3>
  51811. <ul>
  51812. Fhem can receive your tank's fill level from the USF1000S device
  51813. through a <a href="#FHZ">FHZ</a> device, so one must be defined first.
  51814. The state contains the fill level in % (lower case v in the device state)
  51815. and the current volume in liters (upper case V in the device state).
  51816. Measured distance to the liquid's surface, fill level, volume and warnings
  51817. (Test mode, Battery low) are available. Due to the design of the USF1000S
  51818. protocol, you can have only one USF1000S in range of your FHZ as these
  51819. devices cannot be distinguished.<br>
  51820. <br>
  51821. <a name="USF1000Define"></a>
  51822. <b>Define</b>
  51823. <ul>
  51824. <code>define &lt;name&gt; USF1000 &lt;geometry&gt;</code>
  51825. <br><br>
  51826. <code>&lt;geometry&gt;</code> determines the form of the tank and the
  51827. position of the sensor. The following geometries are currently
  51828. supported:<br><br>
  51829. <ul>
  51830. <li><code>cub &lt;length&gt; &lt;width&gt; &lt;height&gt; &lt;offset&gt;</code></li>
  51831. <li><code>cylv &lt;diameter&gt; &lt;height&gt; &lt;offset&gt;</code></li>
  51832. </ul>
  51833. <br>
  51834. <code>cub</code> stands for a cuboid whose base is &lt;length&gt; &times; &lt;width&gt;.
  51835. <code>cylv</code> stands for a vertical cylinder whose diameter is &lt;diameter&gt;.
  51836. &lt;height&gt; is the distance of the surface of the liquid from the ground
  51837. if the tank is full. &lt;offset&gt; is the distance of the sensor relative to
  51838. the surface of the liquid. All quantities are expressed in meters.<br>
  51839. <br>
  51840. Example:<br>
  51841. <ul>
  51842. <code>define MyTank USF1000 cylv 2 1 0.3</code>: a cylindrical water tank with
  51843. 2 meters diameter. The water stands 1 meter high if the tank is full. The
  51844. sensor is fixed 1,3 meters above ground.<br>
  51845. </ul>
  51846. </ul>
  51847. <br>
  51848. <a name="USF1000set"></a>
  51849. <b>Set </b>
  51850. <ul>
  51851. N/A
  51852. </ul>
  51853. <br>
  51854. <a name="USF1000get"></a>
  51855. <b>Get</b>
  51856. <ul>
  51857. N/A
  51858. </ul>
  51859. <br>
  51860. <a name="USF1000attr"></a>
  51861. <b>Attributes</b>
  51862. <ul>
  51863. <li><a href="#IODev">IODev</a></li><br>
  51864. <li><a href="#do_not_notify">do_not_notify</a></li>
  51865. <li><a href="#showtime">showtime</a></li>
  51866. <li><a href="#model">model</a> (usf1000s)</li>
  51867. <li><a href="#ignore">ignore</a></li>
  51868. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  51869. </ul>
  51870. <br>
  51871. </ul>
  51872. <a name="UWZ"></a>
  51873. <h3>UWZ</h3>
  51874. <ul>
  51875. <a name="UWZdefine"></a>
  51876. This modul extracts thunderstorm warnings from <a href="http://www.unwetterzentrale.de">www.unwetterzentrale.de</a>.
  51877. <br/>
  51878. Therefore the same interface is used as the Android App <a href="http://www.alertspro.com">Alerts Pro</a> does.
  51879. A maximum of 10 thunderstorm warnings will be served.
  51880. Additional the module provides a few functions to create HTML-Templates which can be used with weblink.
  51881. <br>
  51882. <i>The following Perl-Modules are used within this module: HTTP::Request, LWP::UserAgent, JSON, Encode::Guess, Text::Iconv und HTML::Parse</i>.
  51883. <br/><br/>
  51884. <b>Define</b>
  51885. <ul>
  51886. <br>
  51887. <code>define &lt;Name&gt; UWZ [CountryCode] [AreaID] [INTERVAL]</code>
  51888. <br><br><br>
  51889. Example:
  51890. <br>
  51891. <code>
  51892. define Unwetterzentrale UWZ UK 08357 1800<br>
  51893. attr Unwetterzentrale download 1<br>
  51894. attr Unwetterzentrale humanreadable 1<br>
  51895. attr Unwetterzentrale maps eastofengland unitedkingdom<br><br>
  51896. define UnwetterDetails weblink htmlCode {UWZAsHtml("Unwetterzentrale")}<br>
  51897. define UnwetterMapE_UK weblink htmlCode {UWZAsHtmlKarteLand("Unwetterzentrale","eastofengland")}<br>
  51898. define UnwetterLite weblink htmlCode {UWZAsHtmlLite("Unwetterzentrale")}
  51899. define UnwetterMovie weblink htmlCode {UWZAsHtmlMovie("Unwetterzentrale","clouds-precipitation-uk")}
  51900. </code>
  51901. <br>&nbsp;
  51902. <li><code>[CountryCode]</code>
  51903. <br>
  51904. Possible values: DE, AT, CH, UK, ...<br/>
  51905. (for other countries than germany use SEARCH for CountryCode to start device in search mode)
  51906. </li><br>
  51907. <li><code>[AreaID]</code>
  51908. <br>
  51909. For Germany you can use the postalcode, other countries use SEARCH for CountryCode to start device in search mode.
  51910. <br>
  51911. </li><br>
  51912. <li><code>[INTERVAL]</code>
  51913. <br>
  51914. Defines the refresh interval. The interval is defined in seconds, so an interval of 3600 means that every hour a refresh will be triggered onetimes.
  51915. <br>
  51916. </li><br>
  51917. <br><br><br>
  51918. Example Search-Mode:
  51919. <br>
  51920. <code>
  51921. define Unwetterzentrale UWZ SEARCH<br>
  51922. </code>
  51923. <br>
  51924. now get the AreaID for your location (example shows london):
  51925. <br>
  51926. <code>
  51927. get Unwetterzentrale SearchAreaID London<br>
  51928. </code>
  51929. <br>
  51930. now redefine your device with the outputted CountryCode and AreaID.
  51931. <br>
  51932. <br>&nbsp;
  51933. </ul>
  51934. <br>
  51935. <a name="UWZget"></a>
  51936. <b>Get</b>
  51937. <ul>
  51938. <br>
  51939. <li><code>get &lt;name&gt; soil-frost</code>
  51940. <br>
  51941. give info about current soil frost (active|inactive).
  51942. </li><br>
  51943. <li><code>get &lt;name&gt; extremfrost</code>
  51944. <br>
  51945. give info about current frost (active|inactive).
  51946. </li><br>
  51947. <li><code>get &lt;name&gt; thunderstorm</code>
  51948. <br>
  51949. give info about current thunderstorm (active|inactive).
  51950. </li><br>
  51951. <li><code>get &lt;name&gt; glaze</code>
  51952. <br>
  51953. give info about current glaze (active|inactive).
  51954. </li><br>
  51955. <li><code>get &lt;name&gt; glazed-rain</code>
  51956. <br>
  51957. give info about current freezing rain (active|inactive).
  51958. </li><br>
  51959. <li><code>get &lt;name&gt; hail</code>
  51960. <br>
  51961. give info about current hail (active|inactive).
  51962. </li><br>
  51963. <li><code>get &lt;name&gt; heat</code>
  51964. <br>
  51965. give info about current heat (active|inactive).
  51966. </li><br>
  51967. <li><code>get &lt;name&gt; rain</code>
  51968. <br>
  51969. give info about current rain (active|inactive).
  51970. </li><br>
  51971. <li><code>get &lt;name&gt; snow</code>
  51972. <br>
  51973. give info about current snow (active|inactive).
  51974. </li><br>
  51975. <li><code>get &lt;name&gt; storm</code>
  51976. <br>
  51977. give info about current storm (active|inactive).
  51978. </li><br>
  51979. <li><code>get &lt;name&gt; forest-fire</code>
  51980. <br>
  51981. give info about current forest fire (active|inactive).
  51982. </li><br>
  51983. </ul>
  51984. <br>
  51985. <b>Get (Search-Mode)</b>
  51986. <ul>
  51987. <br>
  51988. <li><code>get &lt;name&gt; SearchAreaID &lt;city&gt;</code>
  51989. <br>
  51990. Get AreaID coresponnding to entered location.
  51991. </li><br>
  51992. </ul>
  51993. <br>
  51994. <a name="UWZset"></a>
  51995. <b>Set</b>
  51996. <ul>
  51997. <br>
  51998. <li><code>set &lt;name&gt; update</code>
  51999. <br>
  52000. Executes an imediate update of thunderstorm warnings.
  52001. </li><br>
  52002. </ul>
  52003. <br>
  52004. <a name="UWZattr"></a>
  52005. <b>Attributes</b>
  52006. <ul>
  52007. <br>
  52008. <li><code>download</code>
  52009. <br>
  52010. Download maps during update (0|1).
  52011. <br>
  52012. </li>
  52013. <li><code>savepath</code>
  52014. <br>
  52015. Define where to store the map png files (default: /tmp/).
  52016. <br>
  52017. </li>
  52018. <li><code>maps</code>
  52019. <br>
  52020. Define the maps to download space seperated. For possible values see <code>UWZAsHtmlKarteLand</code>.
  52021. <br>
  52022. </li>
  52023. <li><code>humanreadable</code>
  52024. <br>
  52025. Add additional Readings Warn_?_Start_Date, Warn_?_Start_Time, Warn_?_End_Date and Warn_?_End_Time containing the coresponding timetamp in a human readable manner. Additionally Warn_?_uwzLevel_Str and Warn_?_Type_Str will be added to device readings (0|1).
  52026. <br>
  52027. </li>
  52028. <li><code>lang</code>
  52029. <br>
  52030. Overwrite requested language for short and long warn text. (de|en|it|fr|es|..).
  52031. <br>
  52032. </li>
  52033. <li><code>sort_readings_by</code>
  52034. <br>
  52035. define how readings will be sortet (start|severity|creation).
  52036. <br>
  52037. </li>
  52038. <li><code>htmlsequence</code>
  52039. <br>
  52040. define warn order of html output (ascending|descending).
  52041. <br>
  52042. </li>
  52043. <li><code>htmltitle</code>
  52044. <br>
  52045. title / header for the html ouput
  52046. <br>
  52047. </li>
  52048. <li><code>htmltitleclass</code>
  52049. <br>
  52050. css-Class of title / header for the html ouput
  52051. <br>
  52052. </li>
  52053. <li><code>localiconbase</code>
  52054. <br>
  52055. define baseurl to host your own thunderstorm warn pics (filetype is png).
  52056. <br>
  52057. </li>
  52058. <li><code>intervalAtWarnLevel</code>
  52059. <br>
  52060. define the interval per warnLevel. Example: 2=1800,3=900,4=300
  52061. <br>
  52062. </li>
  52063. <br>
  52064. </ul>
  52065. <br>
  52066. <a name="UWZreading"></a>
  52067. <b>Readings</b>
  52068. <ul>
  52069. <br>
  52070. <li><b>Warn_</b><i>0|1|2|3...|9</i><b>_...</b> - active warnings</li>
  52071. <li><b>WarnCount</b> - warnings count</li>
  52072. <li><b>WarnUWZLevel</b> - total warn level </li>
  52073. <li><b>WarnUWZLevel_Color</b> - total warn level color</li>
  52074. <li><b>WarnUWZLevel_Str</b> - total warn level string</li>
  52075. <li><b>Warn_</b><i>0</i><b>_AltitudeMin</b> - minimum altitude for warning </li>
  52076. <li><b>Warn_</b><i>0</i><b>_AltitudeMax</b> - maximum altitude for warning </li>
  52077. <li><b>Warn_</b><i>0</i><b>_EventID</b> - warning EventID </li>
  52078. <li><b>Warn_</b><i>0</i><b>_Creation</b> - warning creation </li>
  52079. <li><b>Warn_</b><i>0</i><b>_Creation_Date</b> - warning creation datum </li>
  52080. <li><b>Warn_</b><i>0</i><b>_Creation_Time</b> - warning creation time </li>
  52081. <li><b>currentIntervalMode</b> - default/warn, Interval is read from INTERVAL or INTERVALWARN Internal</li>
  52082. <li><b>Warn_</b><i>0</i><b>_Start</b> - begin of warnperiod</li>
  52083. <li><b>Warn_</b><i>0</i><b>_Start_Date</b> - start date of warnperiod</li>
  52084. <li><b>Warn_</b><i>0</i><b>_Start_Time</b> - start time of warnperiod</li>
  52085. <li><b>Warn_</b><i>0</i><b>_End</b> - end of warnperiod</li>
  52086. <li><b>Warn_</b><i>0</i><b>_End_Date</b> - end date of warnperiod</li>
  52087. <li><b>Warn_</b><i>0</i><b>_End_Time</b> - end time of warnperiod</li>
  52088. <li><b>Warn_</b><i>0</i><b>_Severity</b> - Severity of thunderstorm (0 no thunderstorm, 4, 7, 11, .. heavy thunderstorm)</li>
  52089. <li><b>Warn_</b><i>0</i><b>_Hail</b> - warning contains hail</li>
  52090. <li><b>Warn_</b><i>0</i><b>_Type</b> - kind of thunderstorm</li>
  52091. <li><b>Warn_</b><i>0</i><b>_Type_Str</b> - kind of thunderstorm (text)</li>
  52092. <ul>
  52093. <li><b>1</b> - unknown</li>
  52094. <li><b>2</b> - storm</li>
  52095. <li><b>3</b> - snow</li>
  52096. <li><b>4</b> - rain</li>
  52097. <li><b>5</b> - frost</li>
  52098. <li><b>6</b> - forest fire</li>
  52099. <li><b>7</b> - thunderstorm</li>
  52100. <li><b>8</b> - glaze</li>
  52101. <li><b>9</b> - heat</li>
  52102. <li><b>10</b> - freezing rain</li>
  52103. <li><b>11</b> - soil frost</li>
  52104. </ul>
  52105. <li><b>Warn_</b><i>0</i><b>_uwzLevel</b> - Severity of thunderstorm (0-5)</li>
  52106. <li><b>Warn_</b><i>0</i><b>_uwzLevel_Str</b> - Severity of thunderstorm (text)</li>
  52107. <li><b>Warn_</b><i>0</i><b>_levelName</b> - Level Warn Name</li>
  52108. <li><b>Warn_</b><i>0</i><b>_ShortText</b> - short warn text</li>
  52109. <li><b>Warn_</b><i>0</i><b>_LongText</b> - detailed warn text</li>
  52110. <li><b>Warn_</b><i>0</i><b>_IconURL</b> - cumulated URL to display warn-icons from <a href="http://www.unwetterzentrale.de">www.unwetterzentrale.de</a></li>
  52111. </ul>
  52112. <br>
  52113. <a name="UWZweblinks"></a>
  52114. <b>Weblinks</b>
  52115. <ul>
  52116. <br>
  52117. With the additional implemented functions <code>UWZAsHtml, UWZAsHtmlLite, UWZAsHtmlFP, UWZAsHtmlKarteLand and UWZAsHtmlMovie</code> HTML-Code will be created to display warnings and weathermovies, using weblinks.
  52118. <br><br><br>
  52119. Example:
  52120. <br>
  52121. <li><code>define UnwetterDetailiert weblink htmlCode {UWZAsHtml("Unwetterzentrale")}</code></li>
  52122. <br>
  52123. <li><code>define UnwetterLite weblink htmlCode {UWZAsHtmlLite("Unwetterzentrale")}</code></li>
  52124. <br>
  52125. <li><code>define UnwetterFloorplan weblink htmlCode {UWZAsHtmlFP("Unwetterzentrale")}</code></li>
  52126. <br>
  52127. <li><code>define UnwetterKarteLand weblink htmlCode {UWZAsHtmlKarteLand("Unwetterzentrale","Bayern")}</code></li>
  52128. <ul>
  52129. <li>The second parameter should be one of:
  52130. <ul>
  52131. <li>europa</li>
  52132. <br/>
  52133. <li>deutschland</li>
  52134. <li>deutschland-small</li>
  52135. <li>niedersachsen</li>
  52136. <li>bremen</li>
  52137. <li>bayern</li>
  52138. <li>schleswig-holstein</li>
  52139. <li>hamburg</li>
  52140. <li>mecklenburg-vorpommern</li>
  52141. <li>sachsen</li>
  52142. <li>sachsen-anhalt</li>
  52143. <li>nordrhein-westfalen</li>
  52144. <li>thueringen</li>
  52145. <li>rheinland-pfalz</li>
  52146. <li>saarland</li>
  52147. <li>baden-wuerttemberg</li>
  52148. <li>hessen</li>
  52149. <li>brandenburg</li>
  52150. <li>berlin</li>
  52151. <br/>
  52152. <li>oesterreich</li>
  52153. <li>burgenland</li>
  52154. <li>kaernten</li>
  52155. <li>niederoesterreich</li>
  52156. <li>oberoesterreich</li>
  52157. <li>salzburg</li>
  52158. <li>steiermark</li>
  52159. <li>tirol</li>
  52160. <li>vorarlberg</li>
  52161. <li>wien</li>
  52162. <br/>
  52163. <li>schweiz</li>
  52164. <li>aargau</li>
  52165. <li>appenzell_ausserrhoden</li>
  52166. <li>appenzell_innerrhoden</li>
  52167. <li>basel_landschaft</li>
  52168. <li>basel_stadt</li>
  52169. <li>bern</li>
  52170. <li>fribourg</li>
  52171. <li>geneve</li>
  52172. <li>glarus</li>
  52173. <li>graubuenden</li>
  52174. <li>jura</li>
  52175. <li>luzern</li>
  52176. <li>neuchatel</li>
  52177. <li>nidwalden</li>
  52178. <li>obwalden</li>
  52179. <li>schaffhausen</li>
  52180. <li>schwyz</li>
  52181. <li>solothurn</li>
  52182. <li>stgallen</li>
  52183. <li>ticino</li>
  52184. <li>thurgau</li>
  52185. <li>uri</li>
  52186. <li>waadt</li>
  52187. <li>wallis</li>
  52188. <li>zug</li>
  52189. <li>zuerich</li>
  52190. <br/>
  52191. <li>liechtenstein</li>
  52192. <br/>
  52193. <li>belgique</li>
  52194. <br/>
  52195. <li>denmark</li>
  52196. <br/>
  52197. <li>finnland</li>
  52198. <br/>
  52199. <li>france</li>
  52200. <br/>
  52201. <li>letzebuerg</li>
  52202. <br/>
  52203. <li>nederland</li>
  52204. <br/>
  52205. <li>norwegen</li>
  52206. <br/>
  52207. <li>portugal</li>
  52208. <br/>
  52209. <li>sverige</li>
  52210. <br/>
  52211. <li>espana</li>
  52212. <br/>
  52213. <li>unitedkingdom</li>
  52214. <li>eastofengland</li>
  52215. <li>eastmidlands</li>
  52216. <li>london</li>
  52217. <li>northeastengland</li>
  52218. <li>northernireland</li>
  52219. <li>northwestengland</li>
  52220. <li>scotland</li>
  52221. <li>southeastengland</li>
  52222. <li>southwestengland</li>
  52223. <li>wales</li>
  52224. <li>westmidlands</li>
  52225. <li>yorkshireandthehumber</li>
  52226. <br/>
  52227. <li>isobaren1</li>
  52228. <li>isobaren2</li>
  52229. <li>isobaren3</li>
  52230. </ul>
  52231. </li>
  52232. </ul>
  52233. <li><code>define UnwetterKarteMovie weblink htmlCode {UWZAsHtmlMovie("Unwetterzentrale","currents")}</code></li>
  52234. <ul>
  52235. <li>The second parameter should be one of:
  52236. <ul>
  52237. <li>niederschlag-wolken</li>
  52238. <li>stroemung</li>
  52239. <li>temperatur</li>
  52240. <br/>
  52241. <li>niederschlag-wolken-de</li>
  52242. <li>stroemung-de</li>
  52243. <br/>
  52244. <li>niederschlag-wolken-ch</li>
  52245. <li>stroemung-ch</li>
  52246. <br/>
  52247. <li>niederschlag-wolken-at</li>
  52248. <li>stroemung-at</li>
  52249. <br/>
  52250. <li>niederschlag-wolken-uk</li>
  52251. <li>stroemung-uk</li>
  52252. <br/>
  52253. </ul>
  52254. </li>
  52255. </ul>
  52256. <br/><br/>
  52257. </ul>
  52258. <br>
  52259. </ul>
  52260. <a name="UbiquitiMP"></a>
  52261. <h3>UbiquitiMP</h3>
  52262. <ul>
  52263. FHEM module for the Ubiquiti mFi mPower modules<br>
  52264. Please read also the <a href="https://wiki.fhem.de/wiki/Ubiquit_mFi/mPower">Wiki</a> at https://wiki.fhem.de/wiki/Ubiquit_mFi/mPower<br>
  52265. FHEM Forum : http://forum.fhem.de/index.php/topic,35722.0.html
  52266. <a name="UbiquitiMPdefine"></a>
  52267. <b>Define</b>
  52268. <ul>
  52269. <code>define &lt;name&gt; UbiquitiMP &lt;IP or FQDN&gt;</code><br>
  52270. example :<br>
  52271. define myUbi UbiquitiMP 192.168.0.100<br>
  52272. define myUbi UbiquitiMP myhost.mynet.net<br>
  52273. Perl Net::Telnet and JSON module are required. On a Raspberry you can install them with :<br>
  52274. sudo apt-get install libjson-perl<br>
  52275. sudo apt-get install libnet-telnet-perl
  52276. </ul>
  52277. <br>
  52278. <a name="UbiquitiMPset"></a>
  52279. <b>Set </b>
  52280. <ul>
  52281. <li>Outx on / off (force) -> turns Port x on or off</li>
  52282. <li>Outx toggle -> toggle port </li>
  52283. <li>Outx lock / unlock -> protects port to switch port on/off</li>
  52284. <li>Outx reset -> reset power counter for this port</li>
  52285. <li>Outx enable / disable -> power counting for this port</li>
  52286. </ul>
  52287. <a name="UbiquitiMPget"></a>
  52288. <b>Get</b>
  52289. <ul>
  52290. <li>status -> returns the status of all Outs</li>
  52291. <li>info -> returns some internal informations of the device</li>
  52292. <li>reboot -> reboot the device</li><br>
  52293. </ul>
  52294. <a name="UbiquitiMPattr"></a>
  52295. <b>Attributes</b>
  52296. <ul>
  52297. <li>ignoreList -> list of ignored ports<br> e.g. attr name ignoreList 456<br>ignores all values of ports 4,5 & 6<br></li>
  52298. <li>groupPorts -> space separeted list to group ports so you can use them like a single device<br>
  52299. e.g. attr name groupPorts TV=12 Media=4,5,6 (GroupName=Port numbers in the group)<br>
  52300. set name TV on or set name Media toggle </li>
  52301. <li>ledconnect -> led color since fhem connect</li>
  52302. <li>subDevices -> use a single sub devices for each out port<br>
  52303. (default 1 for the 3 and 6 port mPower, default 0 for the mPower mini) requires 98_UbiquitiOut.pm</li>
  52304. <li>interval -> polling interval in seconds, set to 0 to disable polling (default 300)</li>
  52305. <li>timeout -> seconds to wait for a answer from the Power Module (default 5 seconds)</li>
  52306. <li>user -> defined user on the Power Module (default ubnt)</li>
  52307. <li>password -> password for user (default ubnt)</li>
  52308. </ul>
  52309. <br>
  52310. </ul>
  52311. <a name="UbiquitiOut"></a>
  52312. <h3>UbiquitiOut</h3>
  52313. <ul>
  52314. <table><tr><td>
  52315. sub device for the UbiquitiMP or InfratekPM modul
  52316. </td></tr></table>
  52317. <a name="UbiquitiOutdefine"></a>
  52318. <b>Define</b>
  52319. <ul>
  52320. <code>define &lt;name&gt; UbiquitiOut &lt;UbiquitiMP device&gt; &lt;Out #&gt;</code>
  52321. </ul>
  52322. <a name="UbiquitiOutset"></a>
  52323. <b>Set </b>
  52324. <ul><a href="#setExtensions">set Extensions</a>
  52325. </ul>
  52326. </ul>
  52327. <a name="Unifi"></a>
  52328. <h3>Unifi</h3>
  52329. <ul>
  52330. Unifi is the FHEM module for the Ubiquiti Networks (UBNT) - Unifi Controller.<br>
  52331. <br>
  52332. e.g. you can use the 'presence' function, which will tell you if a device is connected to your WLAN (even in PowerSave Mode!).<br>
  52333. Immediately after connecting to your WLAN it will set the device-reading to 'connected' and about 5 minutes after leaving your WLAN it will set the reading to 'disconnected'.<br>
  52334. The device will be still connected, even it is in PowerSave-Mode. (In this mode the devices are not pingable, but the connection to the unifi-controller does not break off.)<br>
  52335. <br>
  52336. Or you can use the other readings or set and get features to control your unifi-controller, accesspoints and wlan-clients.
  52337. <br>
  52338. <h4>Prerequisites</h4>
  52339. <ul>
  52340. The Perl module JSON is required. <br>
  52341. On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
  52342. Via CPAN: <code>cpan install JSON</code>
  52343. </ul>
  52344. <h4>Define</h4>
  52345. <ul>
  52346. <code>define &lt;name&gt; Unifi &lt;ip&gt; &lt;port&gt; &lt;username&gt; &lt;password&gt; [&lt;interval&gt; [&lt;siteID&gt; [&lt;version&gt;]]]</code>
  52347. <br><br>
  52348. <br>
  52349. &lt;name&gt;:
  52350. <ul>
  52351. <code>The FHEM device name for the device.</code><br>
  52352. </ul>
  52353. &lt;ip&gt;:
  52354. <ul>
  52355. <code>The ip of your unifi-controller.</code><br>
  52356. </ul>
  52357. &lt;port&gt;:
  52358. <ul>
  52359. <code>The port of your unifi-controller. Normally it's 8443 or 443.</code><br>
  52360. </ul>
  52361. &lt;username&gt;:
  52362. <ul>
  52363. <code>The Username to log on.</code><br>
  52364. </ul>
  52365. &lt;password&gt;:
  52366. <ul>
  52367. <code>The password to log on.</code><br>
  52368. </ul>
  52369. [&lt;interval&gt;]:
  52370. <ul>
  52371. <code>(optional without &lt;siteID&gt; and &lt;version&gt;)<br>
  52372. Interval to fetch the information from the unifi-api. <br>
  52373. default: 30 seconds</code><br>
  52374. </ul>
  52375. [&lt;siteID&gt;]:
  52376. <ul>
  52377. <code>(optional without &lt;version&gt;)<br>
  52378. You can find the site-ID by selecting the site in the UniFi web interface.<br>
  52379. e.g. https://192.168.12.13:8443/manage/s/foobar the siteId you must use is: foobar.<br>
  52380. default: default</code><br>
  52381. </ul>
  52382. [&lt;version&gt;]:
  52383. <ul>
  52384. <code>(optional if you use unifi v4)<br>
  52385. Unifi-controller version. <br>
  52386. Version must be specified if version is not 4. At the moment version 3 and 4 are supported.<br>
  52387. default: 4</code><br>
  52388. </ul> <br>
  52389. </ul>
  52390. <h4>Examples</h4>
  52391. <ul>
  52392. <code>define my_unifi_controller Unifi 192.168.1.15 443 admin secret</code><br>
  52393. <br>
  52394. Or with optional parameters &lt;interval&gt;, &lt;siteID&gt; and &lt;version&gt;:<br>
  52395. <code>define my_unifi_controller Unifi 192.168.1.15 443 admin secret 30 default 3</code><br>
  52396. </ul>
  52397. <h4>Set</h4>
  52398. <ul>
  52399. <code>Note: Some setters are not available if controller is not connected, or no data is available for them.</code><br>
  52400. <br>
  52401. <li><code>set &lt;name&gt; update</code><br>
  52402. Makes immediately a manual update. </li>
  52403. <br>
  52404. <li><code>set &lt;name&gt; clear &lt;readings|clientData|all&gt;</code><br>
  52405. Clears the readings, clientData or all. </li>
  52406. <br>
  52407. <li><code>set &lt;name&gt; archiveAlerts</code><br>
  52408. Archive all unarchived Alerts. </li>
  52409. <br>
  52410. <li><code>set &lt;name&gt; disconnectClient &lt;all|user_id|controllerAlias|hostname|devAlias&gt;</code><br>
  52411. Disconnect one ore all clients. </li>
  52412. <br>
  52413. <li><code>set &lt;name&gt; restartAP &lt;all|_id|name|ip&gt;</code><br>
  52414. Restart one ore all accesspoints. </li>
  52415. <br>
  52416. <li><code>set &lt;name&gt; setLocateAP &lt;all|_id|name|ip&gt;</code><br>
  52417. Start 'locate' on one or all accesspoints. </li>
  52418. <br>
  52419. <li><code>set &lt;name&gt; unsetLocateAP &lt;all|_id|name|ip&gt;</code><br>
  52420. Stop 'locate' on one or all accesspoints. </li>
  52421. <li><code>set &lt;name&gt; poeMode &lt;name|mac|id&gt; &lt;port&gt; &lt;off|auto|passive|passthrough|restart&gt;</code><br>
  52422. Set PoE mode for &lt;port&gt;. </li>
  52423. </ul>
  52424. <h4>Get</h4>
  52425. <ul>
  52426. <code>Note: Some getters are not available if no data is available for them.</code><br>
  52427. <br>
  52428. <li><code>get &lt;name&gt; clientData &lt;all|user_id|controllerAlias|hostname|devAlias&gt;</code><br>
  52429. Show more details about clients.</li>
  52430. <br>
  52431. <li><code>get &lt;name&gt; events</code><br>
  52432. Show events in specified 'eventPeriod'.</li>
  52433. <br>
  52434. <li><code>get &lt;name&gt; unarchivedAlerts</code><br>
  52435. Show all unarchived Alerts.</li>
  52436. <li><code>get &lt;name&gt; poeState [name|mac|id]</code><br>
  52437. Show port PoE state.</li>
  52438. </ul>
  52439. <h4>Attributes</h4>
  52440. <ul>
  52441. <li>attr devAlias<br>
  52442. Can be used to rename device names in the format <code>&lt;user_id|controllerAlias|hostname&gt;:Aliasname.</code><br>
  52443. Separate using blank to rename multiple devices.<br>
  52444. Example (user_id):<code> attr unifi devAlias 5537d138e4b033c1832c5c84:iPhone-Claudiu</code><br>
  52445. Example (controllerAlias):<code> attr unifi devAlias iPhoneControllerAlias:iPhone-Claudiu</code><br>
  52446. Example (hostname):<code> attr unifi devAlias iphone:iPhone-Claudiu</code><br></li>
  52447. <br>
  52448. <li>attr eventPeriod &lt;1...168&gt;<br>
  52449. Can be used to configure the time-period (hours) of fetched events from controller.<br>
  52450. <code>default: 24</code></li>
  52451. <br>
  52452. <li>attr disable &lt;1|0&gt;<br>
  52453. With this attribute you can disable the whole module. <br>
  52454. If set to 1 the module will be stopped and no updates are performed.<br>
  52455. If set to 0 the automatic updating will performed.</li>
  52456. <br>
  52457. <li>attr <a href="#verbose">verbose</a> 5<br>
  52458. This attribute will help you if something does not work as espected.</li>
  52459. <br>
  52460. <li>attr httpLoglevel <1,2,3,4,5><br>
  52461. Can be used to debug the HttpUtils-Module. Set it smaller or equal as your 'global verbose level'.<br>
  52462. <code>default: 5</code></li>
  52463. <br>
  52464. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  52465. </ul>
  52466. <h4>Readings</h4>
  52467. <ul>
  52468. Note: All readings generate events. You can control this with <a href="#readingFnAttributes">these global attributes</a>.
  52469. <li>Each client has 6 readings for connection-state, SNR, uptime, last_seen-time, connected-AP and hostname.</li>
  52470. <li>Each AP has 3 readings for state (can be 'ok' or 'error'), essid's and count of connected-clients.</li>
  52471. <li>The unifi-controller has 6 readings for event-count in configured 'timePeriod', unarchived-alert count, accesspoint count, overall wlan-state (can be 'ok', 'warning', or other?), connected user count and connected guest count. </li>
  52472. <li>The Unifi-device reading 'state' represents the connection-state to the unifi-controller (can be 'connected', 'disconnected', 'initialized' and 'disabled').</li>
  52473. </ul>
  52474. <br>
  52475. </ul>
  52476. <a name="UpsPico"></a>
  52477. <h3>UpsPico</h3>
  52478. <ul>
  52479. <table>
  52480. <tr>
  52481. <td>
  52482. The UpsPIco is an interruptible Power Supply for the Raspberry Pi from PiModules. This module is written for the Firmware Version 0x38 and above and has been tested on the "UPS PIco HV3.0A Stack Plus" only.<BR>
  52483. This module provides all the internal data written in the UpsPIco register which are accessible via I2C - Bus. The set command is able to change the values in accordance to the specifications.<BR>
  52484. For details to the Information contained in the register, please consult the internal register specification published in the latest manual. (See below)<BR>
  52485. <BR>
  52486. <u>References:</u><BR>
  52487. <a href="http://www.pimodulescart.com/shop/item.aspx?itemid=29">UPS PIco HV3.0A Stack Plus</a><BR>
  52488. <a href="http://www.forum.pimodules.com/viewforum.php?f=25">UPS PIco HV3.0A : Internal Register Specification, Manuals and Firmware Updates</a><BR>
  52489. <BR>
  52490. </td>
  52491. </tr>
  52492. </table>
  52493. <table>
  52494. <tr><td><a name="UpsPicodefine"></a><b>Define</b></td></tr>
  52495. </table>
  52496. <table><tr><td><ul><code>define &lt;name&gt; UpsPico &lt;IPv4-address&gt; &lt;Username&gt; &lt;Password&gt;</code></ul></td></tr></table>
  52497. <ul><ul>
  52498. <table>
  52499. <tr><td><code>&lt;name&gt;</code> : </td><td>The name of the device. Recommendation: "myUpsPico".</td></tr>
  52500. <tr><td><code>&lt;IPv4-address&gt;</code> : </td><td>A valid IPv4 address of the Raspberry Pi with UpsPIco. You might look into your router which DHCP address has been given to the RasPi.</td></tr>
  52501. <tr><td><code>&lt;GatewayPassword&gt;</code> : </td><td>The username of the remote Raspberry Pi.</td></tr>
  52502. <tr><td><code>&lt;PrivatePassword&gt;</code> : </td><td>The password of the remote Raspberry Pi.</td></tr>
  52503. </table>
  52504. </ul></ul>
  52505. <BR>
  52506. <table>
  52507. <tr><td><a name="UpsPicoSet"></a><b>Set</b></td></tr>
  52508. <tr><td>
  52509. <ul>
  52510. The set function is able to change a value which is marked as writeable.<BR>
  52511. If the register is considered as a critical setting (e.g. a wrong value might result in permanent damage), the attribute "WriteCritical" must be set to "1" = yes beforehand.
  52512. </ul>
  52513. </td></tr>
  52514. </table>
  52515. <table><tr><td><ul><code>set &lt;name&gt; &lt;register&gt; &lt;value&gt;</code></ul></td></tr></table>
  52516. <ul><ul>
  52517. <table>
  52518. <tr><td><code>&lt;name&gt;</code> : </td><td>The name of the defined UpsPico device<BR></td></tr>
  52519. <tr><td><code>&lt;register&gt;</code> : </td><td>The name of the register which value shall be set. E.g.: "<code>/Status/key</code>"<BR></td></tr>
  52520. <tr><td><code>&lt;value&gt;</code> : </td><td>A valid value for this register.<BR></td></tr>
  52521. </table>
  52522. </ul></ul>
  52523. <BR>
  52524. <table>
  52525. <tr><td><a name="UpsPicoGet"></a><b>Get</b></td></tr>
  52526. <tr><td>
  52527. <ul>
  52528. The get function is able to obtain a value of a register.<BR>
  52529. It returns only the value but not the unit or the range or list of allowed values possible.<BR>
  52530. </ul>
  52531. </td></tr>
  52532. </table>
  52533. <table><tr><td><ul><code>get &lt;name&gt; &lt;register&gt;</code></ul></td></tr></table>
  52534. <ul><ul>
  52535. <table>
  52536. <tr><td><code>&lt;name&gt;</code> : </td><td>The name of the defined UpsPico device<BR></td></tr>
  52537. <tr><td><code>&lt;register&gt;</code> : </td><td>The name of the register which value shall be obtained. E.g.: "<code>/Status/key</code>"<BR></td></tr>
  52538. </td>
  52539. </tr>
  52540. </table>
  52541. </ul></ul>
  52542. <BR>
  52543. <table>
  52544. <tr><td><a name="UpsPicoAttr"></a><b>Attributes</b></td></tr>
  52545. <tr><td>
  52546. <ul>
  52547. <BR>
  52548. The following user attributes can be used with the UpsPico module in addition to the general ones e.g. <a href="#room">room</a>.<BR>
  52549. </ul>
  52550. </td></tr>
  52551. </table>
  52552. <table>
  52553. <td>
  52554. <ul><ul>
  52555. <tr>
  52556. <td>
  52557. <BR>
  52558. <tr><td><ul><li><code>PollingInterval</code> : </li></td><td>A valid polling interval for the values of the UPS PIco. The value must be >=20s to allow the UpsPico module to perform a full polling procedure. <BR>
  52559. The default value is 300s.<BR>
  52560. </ul></td></tr>
  52561. </td>
  52562. </tr>
  52563. </ul></ul>
  52564. <ul><ul>
  52565. <tr>
  52566. <td>
  52567. <BR>
  52568. <tr><td><ul><li><code>WriteCritical</code> : </li></td><td>Prevents acidential damaging of the UpsPico hardware by change of critical register with wrong values.<BR>
  52569. The attribute must be re-activated for every single set-command.<BR>
  52570. The default value is 0 = deactivated<BR>
  52571. </ul></td></tr>
  52572. </td>
  52573. </tr>
  52574. </ul></ul>
  52575. <ul><ul>
  52576. <tr>
  52577. <td>
  52578. <BR>
  52579. <tr><td><ul><li><code>Port</code> : </li></td><td>The port number for the SSH access on the remote system.<BR>
  52580. The default value is 22 = Standard SSH port<BR>
  52581. </ul></td></tr>
  52582. </td>
  52583. </tr>
  52584. </ul></ul>
  52585. <ul><ul>
  52586. <tr>
  52587. <td>
  52588. <BR>
  52589. <tr><td><ul><li><code>CredentialsEncrypted</code> : </li></td><td>This attributes will swap from plain text to base64 encrypted credentials in the definition.<BR>
  52590. The default value is 0 = Plain Text Credentials<BR>
  52591. </ul></td></tr>
  52592. </td>
  52593. </tr>
  52594. </ul></ul>
  52595. <ul><ul>
  52596. <tr>
  52597. <td>
  52598. <BR>
  52599. <tr><td><ul><li><code>DbLogExclude</code> : </li></td><td>This general attribute will be set automatically to the reading "/Status/pico_is_running" which is a continously counting WatchDog register.<BR>
  52600. It makes no sense to log this reading.<BR>
  52601. The default exclusion from logging is "/Status/pico_is_running" <BR>
  52602. </ul></td></tr>
  52603. </td>
  52604. </tr>
  52605. </ul></ul>
  52606. <ul><ul>
  52607. <tr>
  52608. <td>
  52609. <BR>
  52610. <tr><td><ul><li><code>event-on-change-reading</code> : </li></td><td>This general attribute will be set automatically to ".*" which prevents unchanged but updated readings to be logged.<BR>
  52611. The default value is ".*" = Apply to all readings.<BR>
  52612. </ul></td></tr>
  52613. </td>
  52614. </tr>
  52615. </ul></ul>
  52616. <ul><ul>
  52617. <tr>
  52618. <td>
  52619. <BR>
  52620. <tr><td><ul><li><code>room</code> : </li></td><td>This general attribute will be set automatically to "UpsPIco" which prevents the device getting lost in the "Everything" room.<BR>
  52621. The default value is "UpsPIco".<BR>
  52622. </ul></td></tr>
  52623. </td>
  52624. </tr>
  52625. </ul></ul>
  52626. </td>
  52627. </table>
  52628. </ul>
  52629. <a name="Utils"></a>
  52630. <h3>Utils</h3>
  52631. <ul>
  52632. This is a collection of functions that can be used module-independant
  52633. in all your own development<br/>
  52634. </br>
  52635. <b>Defined functions</b><br/><br/>
  52636. <ul>
  52637. <li><b>abstime2rel("HH:MM:SS")</b><br>tells you the difference as HH:MM:SS
  52638. between now and the argument</li><br/>
  52639. <li><b>ltrim("string")</b><br>returns string without leading
  52640. spaces</li><br/>
  52641. <li><b>max(str1, str2, ...)</b><br>returns the highest value from a given
  52642. list (sorted alphanumeric)</li><br/>
  52643. <li><b>maxNum(num1, num2, ...)</b><br>returns the highest value from a
  52644. given list (sorted numeric)</li><br/>
  52645. <li><b>min(str1, str2, ...)</b><br>returns the lowest value from a given
  52646. list (sorted alphanumeric)</li><br/>
  52647. <li><b>minNum(num1, num2, ...)</b><br>returns the lowest value from a given
  52648. list (sorted numeric)</li><br/>
  52649. <li><b>rtrim("string")</b><br>returns string without trailing
  52650. spaces</li><br/>
  52651. <li><b>time_str2num("YYYY-MM-DD HH:MM:SS")</b><br>convert a time string to
  52652. number of seconds since 1970</li><br/>
  52653. <li><b>trim("string")</b><br>returns string without leading and without
  52654. trailing spaces</li><br/>
  52655. <li><b>UntoggleDirect("deviceName")</b><br>For devices paired directly,
  52656. converts state 'toggle' into 'on' or 'off'</li><br/>
  52657. <li><b>UntoggleIndirect()</b><br>For devices paired indirectly, switches
  52658. the target device 'on' or 'off', also when a 'toggle' was sent from the
  52659. source device</li><br/>
  52660. <li><b>defInfo("devspec", "internal")</b><br>return an array with the
  52661. internal values of all devices found with devspec, e.g.
  52662. defInfo("TYPE=SVG", "GPLOTFILE").</li><br/>
  52663. <li><b>SVG_time_to_sec("YYYY-MM-DD_HH:MM:SS")</b><br>converts the argument
  52664. to the number of seconds since 1970. Optimized for repeated use of similar
  52665. timestamps.</li></br>
  52666. <li><b>fhemNc("host:port", "textToSend", waitForReturn)</b><br>
  52667. sends textToSend to host:port, and if waitForReturn is set, then read
  52668. the answer (wait up to 5 seconds) and return it. Intended as small
  52669. nc replacement.
  52670. </li></br>
  52671. <li><b>round(value, digits)</b><br>
  52672. round &lt;value&gt; to given digits behind comma
  52673. </li></br>
  52674. <li><b>getUniqueId()</b><br>
  52675. return the FHEM uniqueID used by the fheminfo command. Uses the
  52676. getKeyValue / setKeyValue functions.
  52677. </li></br>
  52678. <li><b>setKeyValue(keyName, value)</b><br>
  52679. store the value in the file $modpath/FHEM/FhemUtils/uniqueID (the name is
  52680. used for backward compatibility), or in the database, if using configDB.
  52681. value may not contain newlines, and only one value per key is stored.
  52682. The file/database entry will be written immediately, no explicit save is
  52683. required. If the value is undef, the entry will be deleted.
  52684. Returns an error-string or undef.
  52685. </li></br>
  52686. <li><b>getKeyValue(keyName)</b><br>
  52687. return ($error, $value), stored previously by setKeyValue.
  52688. $error is set if there was an error. Both are undef, if there is no
  52689. value yet for this key.
  52690. </li></br>
  52691. </ul>
  52692. </ul>
  52693. <a name="VBUSDEV"></a>
  52694. <h3>VBUSDEV</h3>
  52695. <ul>
  52696. RESOL-Adapter (USB oder LAN) Info:<br>
  52697. <a href="http://www.resol.de/">http://www.resol.de/</a><br><br>
  52698. Information <a href="http://hobbyelektronik.org/w/index.php/VBus-Decoder"> http://hobbyelektronik.org/w/index.php/VBus-Decoder/</a>
  52699. or github <a href="https://github.com/pejonp/vbus"> https://github.com/pejonp/vbus </a><br><br><br>
  52700. <br />
  52701. <a name="VBUSDEV_Define"></a>
  52702. <b>Define</b>
  52703. <ul>
  52704. <code>define &lt;name&gt; VBUSDEV &lt;id&gt; [&lt;interval&gt;]</code><br />
  52705. <br />
  52706. Connects to various RESOL VBus devices<br />
  52707. Examples:
  52708. <ul>
  52709. <code>define VBUSDEV_7321 VBUSDEV 7321 </code><br />
  52710. </ul>
  52711. </ul><br />
  52712. <a name="VBUSDEV_Readings"></a>
  52713. <b>Readings</b>
  52714. <ul>
  52715. <li>The readings are dependant of the model of the VBUS device.</li><br />
  52716. </ul><br />
  52717. </ul><br />
  52718. <a name="VBUSIF"></a>
  52719. <h3>VBUSIF</h3>
  52720. <ul>
  52721. This module connects to the RESOL VBUS LAN or Serial Port adapter.
  52722. It serves as the "physical" counterpart to the <a href="#VBUSDevice">VBUSDevice</a>
  52723. devices.
  52724. <br /><br />
  52725. <a name="VBUSIF_Define"></a>
  52726. <b>Define</b>
  52727. <ul>
  52728. <code>define &lt;name&gt; VBUS &lt;device&gt;</code>
  52729. <br />
  52730. <br />
  52731. &lt;device&gt; is a &lt;host&gt;:&lt;port&gt; combination, where
  52732. &lt;host&gt; is the address of the RESOL LAN Adapter and &lt;port&gt; 7053.
  52733. <br />
  52734. Please note: the password of RESOL Device must be unchanged at &lt;host&gt;
  52735. <br />
  52736. Examples:
  52737. <ul>
  52738. <code>define vbus VBUSIF 192.168.1.69:7053</code>
  52739. </ul>
  52740. <ul>
  52741. <code>define vbus VBUSIF /dev/ttyS0</code>
  52742. </ul>
  52743. </ul>
  52744. <br />
  52745. </ul>
  52746. <a name="VCONTROL"></a>
  52747. <h3>VCONTROL</h3>
  52748. <ul>
  52749. VCONTROL is a fhem-Modul to control and read information from a VIESSMANN heating via Optolink-adapter.<br><br>
  52750. An Optolink-Adapter is necessary (USB or LAN), you will find information here:<br>
  52751. <a href="http://openv.wikispaces.com/">http://openv.wikispaces.com/</a><br><br>
  52752. Additionaly you need to know Memory-Adresses for the div. heating types (e.g. V200KW1, VScotHO1, VPlusHO1 ....),<br>
  52753. that will be read by the module to get the measurements or to set the actual state.<br>
  52754. Additional information you will find in the forum <a href="http://forum.fhem.de/index.php/topic,20280.0.html">http://forum.fhem.de/index.php/topic,20280.0.html</a> und auf der wiki Seite <a href="http://www.fhemwiki.de/wiki/Vitotronic_200_%28Viessmann_Heizungssteuerung%29">http://www.fhemwiki.de/wiki/Vitotronic_200_%28Viessmann_Heizungssteuerung%29</a><br><br><br>
  52755. <a name="VCONTROLdefine"><b>Define</b></a>
  52756. <ul>
  52757. <code>define &lt;name&gt; VCONTROL &lt;serial-device/LAN-Device:port&gt; &lt;configfile&gt; [&lt;intervall&gt;] </code><br>
  52758. <br>
  52759. <li><b>&lt;serial-device/LAN-Device:port&gt;</b><br>
  52760. USB Port (e.g. com4, /dev/ttyUSB3) or TCPIP:portnumber<br>
  52761. </li>
  52762. <li><b>&lt;intervall&gt;</b><br>
  52763. Poll Intervall in seconds (default 180)<br>
  52764. </li>
  52765. <li><b>&lt;configfile&gt;</b><br>
  52766. path to the configuration file, containing the memory addresses<br>
  52767. </li>
  52768. <br>
  52769. Example:<br><br>
  52770. serial device com4, every 3 minutes will be polled, configuration file name is 99_VCONTROL.cfg, existing in the fhem root directory<br><br>
  52771. Windows:<br>
  52772. define Heizung VCONTROL com4 99_VCONTROL.cfg 180<br><br>
  52773. Linux:<br>
  52774. define Heizung VCONTROL /dev/ttyUSB3 99_VCONTROL.cfg 180<br>
  52775. </ul>
  52776. <br><br>
  52777. <a name="VCONTROLset"><b>Set</b></a>
  52778. <ul>
  52779. These commands will be configured in the configuartion file.
  52780. </ul>
  52781. <br><br>
  52782. <a name="VCONTROLget"><b>Get</b></a>
  52783. <ul>
  52784. get &lt;name&gt; CONFIG<br><br>
  52785. reload the module specific configfile<br><br>
  52786. More commands will be configured in the configuration file.
  52787. </ul>
  52788. <br><br>
  52789. <a name="VCONTROLparameter"><b>configfile</b></a>
  52790. <ul>
  52791. You will find example configuration files for the heating types V200KW1, VScotHO1, VPlusHO1 on the wiki page <a href="http://www.fhemwiki.de/wiki/Vitotronic_200_%28Viessmann_Heizungssteuerung%29">http://www.fhemwiki.de/wiki/Vitotronic_200_%28Viessmann_Heizungssteuerung%29</a>.<br><br>
  52792. The lines of the configuration file can have the following structure:<br><br>
  52793. <li>lines beginning with "#" are comments!<br></li>
  52794. <li>Polling Commands (POLL) to read values.<br></li>
  52795. <li>Set Commands (SET) to set values.<br></li>
  52796. <br>
  52797. <b>Polling Commands have the following structure:<br><br></b>
  52798. POLL, ADDRESSE, PARSEMETHODE, DIVISOR, READING-NAME, KUMULATION<br><br>
  52799. <ul>
  52800. <li><b>POLL</b><br>
  52801. is fix POLL<br>
  52802. </li>
  52803. <br>
  52804. <li><b>ADDRESSE</b><br>
  52805. Memory Address leading to the value, the will be read in the memory on the heating.<br>
  52806. It is subdivided in 3 parts:<br>
  52807. <ul>
  52808. <li> Beginning is fix 01F7 (defines a reading command)</li>
  52809. <li> followed by actuak address<br></li>
  52810. <li> followed by number of Bytes to be read.<br></li>
  52811. </ul>
  52812. </li>
  52813. <br>
  52814. <li><b>PARSEMETHODE</b><br>
  52815. Method how to parse the read bytes.<br>
  52816. methods so far:<br>
  52817. <ul>
  52818. <li>1ByteU :<br> Read value is 1 Byte without algebraic sign (if column Divisor set to state -> only 0 / 1 or off / on)<br></li>
  52819. <li>1ByteS :<br> Read value is 1 Byte with algebraic sign (wenn Spalte Divisor state ist -> nur 0 / 1 also off / on)<br></li>
  52820. <li>2ByteS :<br> Read value is 2 Byte with algebraic sign<br></li>
  52821. <li>2ByteU :<br> Read value is 2 Byte without algebraic sign<br></li>
  52822. <li>2BytePercent :<br> Read value is 2 Byte in percent<br></li>
  52823. <li>4Byte :<br> Read value is 4 Byte<br></li>
  52824. <li>mode :<br> Read value is the actual operating status<br></li>
  52825. <li>timer :<br> Read value is an 8 Byte timer value<br></li>
  52826. <li>date :<br> Read value is an 8 Byte timestamp<br></li>
  52827. POLL Commands unsing the method timer will not be polled permanent, they have to be read by a GET Commando explicitly.<br>
  52828. GET &lt;devicename&gt; TIMER<br>
  52829. </ul>
  52830. </li>
  52831. <br>
  52832. <li><b>DIVISOR</b><br>
  52833. If the parsed value is multiplied by a factor, you can configure a divisor.<br>
  52834. Additionally for values, that just deliver 0 or 1, you can configure state in this column.<br>
  52835. This will force the reading to off and on, instead of 0 and 1.<br>
  52836. </li>
  52837. <br>
  52838. <li><b>READING-NAME</b><br>
  52839. The read and parsed value will be stored in a reading with this name in the device.
  52840. </li>
  52841. <br>
  52842. <li><b>KUMULATION</b><br>
  52843. Accumulated Day values will be automatically stored for polling commands with the value day in the column KUMULATION.<br>
  52844. Futhermore there will be stored the values of the last day in additional readings after 00:00.<br>
  52845. So you have the chance to plot daily values.<br>
  52846. The reading names will be supplemented by DayStart, Today and LastDay!<br>
  52847. </li>
  52848. <br>
  52849. Examples:<br><br>
  52850. <code>POLL, 01F7080402, 2ByteS, 10 , Temp-WarmWater-Actual , -<br></code>
  52851. <code>POLL, 01F7088A02, 2ByteU, 1 , BurnerStarts , day<br></code>
  52852. </ul>
  52853. <br><br>
  52854. <b>Set Commands have the following structure:<br><br></b>
  52855. SET,SETCMD, ADRESSE, CONVMETHODE, NEXT_CMD or DAY for timer<br><br>
  52856. <ul>
  52857. <li><b>SET</b><br>
  52858. is fix SET<br>
  52859. </li>
  52860. <br>
  52861. <li><b>SETCMD</b><br>
  52862. SETCMD are commands that will be used in FHEM to set a value of a device<br>
  52863. set &lt;devicename&gt; &lt;setcmd&gt;<br>
  52864. e.g. SET &lt;devicename&gt; WW to set the actual operational status to Warm Water processing<br>
  52865. </li>
  52866. <br>
  52867. <li><b>ADDRESSE</b><br>
  52868. Memory Address where the value has to be written in the memory of the heating.<br>
  52869. It is subdivided in 4 parts:<br>
  52870. <ul>
  52871. <li> Beginning is fix 01F4 (defines a writing command)</li>
  52872. <li> followed by actual address<br></li>
  52873. <li> followed by number of data-bytes to be written<br></li>
  52874. <li> followed by the data-bytes themselves<br></li>
  52875. </ul>
  52876. <br>
  52877. There are two Address versions:<br>
  52878. <li>Version 1: Value to be set is fix, e.g. Spar Mode on is fix 01<br></li>
  52879. <li>Version 2: Value has to be passed, e.g. warm water temperature<br></li>
  52880. </li>
  52881. <br>
  52882. <li><b>CONVMETHODE</b><br>
  52883. Method how to convert the value with Version 2 in Bytes.<br>
  52884. For Version 1 you can use - here.<br>
  52885. Methods so far:<br>
  52886. <ul>
  52887. <li>1ByteU :<br> Value to be written in 1 Byte without algebraic sign<br>with Version 2 it has to be a number<br></li>
  52888. <li>1ByteS :<br> Value to be written in 1 Byte with algebraic sign<br>with Version 2 it has to be a number<br></li>
  52889. <li>2ByteS :<br> Value to be written in 2 Byte with algebraic sign<br>with Version 2 it has to be a number<br></li>
  52890. <li>2ByteU :<br> Value to be written in 2 Byte without algebraic sign<br>with Version 2 it has to be a number<br></li>
  52891. <li>timer :<br> Value to be written is an 8 Byte Timer value<br>with Version 2 it has to be a string with this structure:<br>
  52892. 8 times of day comma separeted. (ON1,OFF1,ON2,OFF2,ON3,OFF3,ON4,OFF4)<br>
  52893. no time needed ha to be specified with -- .<br>
  52894. Minutes of the times are just allowed to thi values: 00,10,20,30,40 or 50<br>
  52895. Example: 06:10,12:00,16:00,23:00,--,--,--,--</li>
  52896. <li>date :<br> Value to be written is an 8 Byte timestamp<br>with Version 2 it has to be a string with this structure:<br>
  52897. format specified is DD.MM.YYYY_HH:MM:SS<br>
  52898. Example: 21.03.2014_21:35:00</li>
  52899. </ul>
  52900. </li>
  52901. <br>
  52902. <li><b>NEXT_CMD or DAY</b><br>
  52903. This column has three functions:
  52904. <ul>
  52905. <li> If this columns is configured with a name of another SETCMD, it will be processed directly afterwards.<br>
  52906. Example: after setting Spar Mode on (S-ON), you have to set Party Mode off (P-OFF) <br></li>
  52907. <li> Using a CONVMETHODE 1ByteU or 1ByteS or 2ByteS or 2ByteU , you can use the column as an multiplicator,<br>
  52908. which will be multiplied to the value in the SET command<br>
  52909. Example: <code>SET, TEMPNHK1 , 01F4200002 , 2ByteU , 10</code>
  52910. With <code>SET DEVICE TEMPNHK1 21</code> 210 will be send to the heating.
  52911. </li>
  52912. <li>Using timer as CONVMETHODE, so it has to be specified a week day in this columns.<br>
  52913. possible values: MO DI MI DO FR SA SO<br></li>
  52914. </li>
  52915. <br>
  52916. </ul>
  52917. Examples:<br><br>
  52918. <code>SET, WW , 01F423010100, state , -<br></code>
  52919. <code>SET, S-ON , 01F423020101, state_spar , P-OFF<br></code>
  52920. <code>SET, WWTEMP , 01F4630001 , 1ByteU , -<br></code>
  52921. <code>SET, TIMER_2_MO, 01F4200008 , timer , MO<br></code>
  52922. </ul>
  52923. </ul>
  52924. <br>
  52925. <a name="VCONTROLreadings"><b>Readings</b></a>
  52926. <ul>The values read will be stored in readings, that will be configured as described above.</ul>
  52927. </ul>
  52928. <a name="VIERA"></a>
  52929. <h3>VIERA</h3>
  52930. <ul>
  52931. <a name="VIERAdefine"></a>
  52932. <b>Define</b>
  52933. <ul>
  52934. <code>define &lt;name&gt; VIERA &lt;host&gt; [&lt;interval&gt;]</code>
  52935. <br><br>
  52936. This module controls Panasonic TV device over ethernet. It's possible to
  52937. power down the tv, change volume or mute/unmute the TV. Also this modul is simulating
  52938. the remote control and you are able to send different command buttons actions of remote control.
  52939. The module is tested with Panasonic plasma TV tx-p50vt30e
  52940. <br><br>
  52941. Defining a VIERA device will schedule an internal task (interval can be set
  52942. with optional parameter &lt;interval&gt; in seconds, if not set, the value is 30
  52943. seconds), which periodically reads the status of volume and mute status and triggers
  52944. notify/filelog commands.
  52945. <br><br>
  52946. <b>Notes:</b><br>
  52947. <ul>Activate volume remotecontrol by DLNA: Menu -> Setup -> Network Setup -> Network Link Settings -> DLNA RemoteVolume -> On</ul>
  52948. <br>
  52949. Example:
  52950. <ul><code>
  52951. define myTV1 VIERA 192.168.178.20<br><br>
  52952. define myTV1 VIERA 192.168.178.20 60 #with custom interval of 60 seconds
  52953. </code></ul>
  52954. </ul>
  52955. <br>
  52956. <a name="VIERAset"></a>
  52957. <b>Set</b>
  52958. <ul>
  52959. <code>set &lt;name&gt; &lt;command&gt; [&lt;value&gt;]</code>
  52960. <br><br>
  52961. Currently, the following commands are defined.
  52962. <ul>
  52963. <code>
  52964. off<br>
  52965. mute [on|off]<br>
  52966. volume [0-100]<br>
  52967. volumeUp<br>
  52968. volumeDown<br>
  52969. channel [1-9999]<br>
  52970. channelUp<br>
  52971. channelDown<br>
  52972. statusRequest<br>
  52973. remoteControl &lt;command&gt;<br>
  52974. input [hdmi1|hdmi2|hdmi3|hdmi4|sdCard|tv]<br>
  52975. </code>
  52976. </ul>
  52977. </ul>
  52978. <ul>
  52979. <br>
  52980. <u>Remote control (depending on your model, maybe)</u><br>
  52981. For this application the following commands are available:<br>
  52982. <ul><code>
  52983. 3D => 3D button<br>
  52984. BLUE => Blue<br>
  52985. CANCEL => Cancel / Exit<br>
  52986. CHG_INPUT => AV<br>
  52987. CH_DOWN => Channel down<br>
  52988. CH_UP => Channel up<br>
  52989. D0 => Digit 0<br>
  52990. D1 => Digit 1<br>
  52991. D2 => Digit 2<br>
  52992. D3 => Digit 3<br>
  52993. D4 => Digit 4<br>
  52994. D5 => Digit 5<br>
  52995. D6 => Digit 6<br>
  52996. D7 => Digit 7<br>
  52997. D8 => Digit 8<br>
  52998. D9 => Digit 9<br>
  52999. DISP_MODE => Display mode / Aspect ratio<br>
  53000. DOWN => Control DOWN<br>
  53001. ENTER => Control Center click / enter<br>
  53002. EPG => Guide / EPG<br>
  53003. FF => Fast forward<br>
  53004. GREEN => Green<br>
  53005. HOLD => TTV hold / image freeze<br>
  53006. INDEX => TTV index<br>
  53007. INFO => Info<br>
  53008. INTERNET => VIERA connect<br>
  53009. LEFT => Control LEFT<br>
  53010. MENU => Menu<br>
  53011. MUTE => Mute<br>
  53012. PAUSE => Pause<br>
  53013. PLAY => Play<br>
  53014. POWER => Power off<br>
  53015. P_NR => P-NR (Noise reduction)<br>
  53016. REC => Record<br>
  53017. RED => Red<br>
  53018. RETURN => Return<br>
  53019. REW => Rewind<br>
  53020. RIGHT => Control RIGHT<br>
  53021. R_TUNE => Seems to do the same as INFO<br>
  53022. SD_CARD => SD-card<br>
  53023. SKIP_NEXT => Skip next<br>
  53024. SKIP_PREV => Skip previous<br>
  53025. STOP => Stop<br>
  53026. STTL => STTL / Subtitles<br>
  53027. SUBMENU => Option<br>
  53028. TEXT => Text / TTV<br>
  53029. TV => TV<br>
  53030. UP => Control UP<br>
  53031. VIERA_LINK => VIERA link<br>
  53032. VOLDOWN => Volume down<br>
  53033. VOLUP => Volume up<br>
  53034. VTOOLS => VIERA tools<br>
  53035. YELLOW => Yellow<br>
  53036. </code></ul>
  53037. <br>
  53038. Example:<br>
  53039. <ul><code>
  53040. set &lt;name&gt; mute on<br>
  53041. set &lt;name&gt; volume 20<br>
  53042. set &lt;name&gt; remoteControl CH_DOWN<br>
  53043. </code></ul>
  53044. </ul>
  53045. <br>
  53046. <a name="VIERAget"></a>
  53047. <b>Get</b>
  53048. <ul>
  53049. <code>get &lt;name&gt; &lt;what&gt;</code>
  53050. <br><br>
  53051. Currently, the following commands are defined and return the current state of the TV.
  53052. <ul><code>
  53053. mute<br>
  53054. volume<br>
  53055. power<br>
  53056. presence<br>
  53057. </code></ul>
  53058. </ul>
  53059. <br>
  53060. <a name="VIERAattr"></a>
  53061. <b>Attributes</b>
  53062. <ul>blocking [0|1]</ul>
  53063. <br>
  53064. <a name="VIERAevents"></a>
  53065. <b>Generated events:</b>
  53066. <ul>
  53067. <li>volume</li>
  53068. <li>mute</li>
  53069. <li>presence</li>
  53070. <li>power</li>
  53071. <li>state</li>
  53072. </ul>
  53073. </ul>
  53074. <a name="Vallox"></a>
  53075. <h3>Vallox</h3>
  53076. <div>
  53077. <ul>
  53078. Vallox is a manufacturer for ventilation devices.
  53079. <br>
  53080. Their products have a built-in RS485-Interface on the central ventilation unit as well as on connected control units on which all control communication is handeled.
  53081. <br>
  53082. More Info on the particular <a href="http://www.fhemwiki.de/wiki/Vallox">page of FHEM-Wiki</a> (in German).
  53083. <br>
  53084. &nbsp;
  53085. <br>
  53086. <a name="Valloxdefine"></a>
  53087. <b>Define</b>
  53088. <ul>
  53089. <code>define &lt;name&gt; Vallox &lt;RS485-Device[@baud]&gt; [BusVersion]</code><br>
  53090. If the baudrate is omitted, it is set to 9600 (default Vallox baudrate).<br>
  53091. The BusVersion can be set to 1 for older systems. (Default: 2).<br>
  53092. <br>
  53093. Example: <code>define Ventilation Vallox /dev/ttyUSB1</code>
  53094. </ul>
  53095. <br>
  53096. <a name="Valloxset"></a>
  53097. <b>Set</b>
  53098. <ul>
  53099. <li><code>FanSpeed &lt; 1-8 &gt;</code>
  53100. <br>
  53101. Allows to set the fan speed (1 = lowest; 8 = highest).<br>
  53102. </li><br>
  53103. <li><code>BasicHumidityLevel &lt; 0-100 &gt;</code>
  53104. <br>
  53105. Allows to set the basic humidity level in percentage.<br>
  53106. </li><br>
  53107. <li><code>HeatRecoveryCellBypassSetpointTemperature &lt; 0-20 &gt;</code>
  53108. <br>
  53109. Allows to set the heat recovery cell bypass setpoint temperature.<br>
  53110. </li><br>
  53111. <li><code>raw &lt; HexValue &gt;</code><br>
  53112. HexValue is two 2-digit hex number to identify the type and value of setting.
  53113. </li><br>
  53114. <br>
  53115. Example to set the fan speed to 3:<br>
  53116. <code>set Ventilation raw 2907</code><br>
  53117. or:<br>
  53118. <code>set Ventilation FanSpeed 3</code>
  53119. </ul>
  53120. <br>
  53121. <a name="Valloxget"></a>
  53122. <b>Get</b>
  53123. <ul>
  53124. <li><code>reading &lt; readingname &gt;</code>
  53125. <br>
  53126. Allows to get any predefined reading.<br>
  53127. </li><br>
  53128. <li><code>raw &lt; HexValue &gt;</code><br>
  53129. HexValue is a 2-digit hex number to identify the requested reading.
  53130. </li><br>
  53131. </ul>
  53132. <br>
  53133. <a name="Valloxattr"></a>
  53134. <b>Attributes</b>
  53135. <ul><li><code>ValloxIDDomain &lt; HexValue &gt;</code>
  53136. <br>
  53137. HexValue is a 2-digit hex number to identify the &QUOT;address&QUOT; of the bus domain. (01 by default).
  53138. </li><br>
  53139. <li><code>ValloxIDCentral &lt; HexValue &gt;</code>
  53140. <br>
  53141. HexValue is a 2-digit hex number to identify the &QUOT;address&QUOT; of the central ventilation unit. (11 by default).<br>
  53142. In a normal installation ventilation units in the scope 11 to 19 and are addressed with 10 for broadcast-messages.
  53143. </li><br>
  53144. <li><code>ValloxIDFHEM &lt; HexValue &gt;</code>
  53145. <br>
  53146. HexValue is a 2-digit hex number to identify the &QUOT;address&QUOT; of this system as a virtual control terminal. (2F by default)<br>
  53147. In a normal installation control terminals are in the scope 21 to 29 and are addressed with 20 for broadcast-messages.<br>
  53148. The address must be unique.<br>
  53149. The &QUOT;panel address&QUOT; of the physical control terminal can be set on the settings of it. Possible values are 1-15 which is the second digit of the Hex-Value (1-F). The first digit is always 2.<br>
  53150. The physical control terminal is usually 21.
  53151. </li><br>
  53152. <li><code>ValloxBufferDebug &lt; 0/1 &gt;</code>
  53153. <br>
  53154. When 1, modul creates an Internal which fills with the raw Hex-Data from the bus. DEBUG ONLY! (0 by default).
  53155. </li><br>
  53156. <li><code>ValloxForceBroadcast &lt; 0/1 &gt;</code>
  53157. <br>
  53158. When 1, modul sends commands not only to the central ventilation unit (11) but to all possible addresses by broadcast (10/20). This is sometimes nessecary for older systems. (0 by default; Function always on on BusVersion 1).
  53159. </li><br>
  53160. <li><code>ValloxProcessOwnCommands &lt; 0/1 &gt;</code>
  53161. <br>
  53162. When 1, modul sends commands not only to the bus but processes it as a received reading. This is sometimes nessecary for older systems. (0 by default; Function always on on BusVersion 1).
  53163. </li><br>
  53164. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  53165. </ul>
  53166. </ul>
  53167. </div>
  53168. <a name="VantagePro2"></a>
  53169. <h3>VantagePro2</h3>
  53170. <ul>
  53171. Note: this module needs the Net::Telnet perl module.
  53172. <br><br>
  53173. <a name="VantagePro2define"></a>
  53174. <b>Define</b>
  53175. <ul>
  53176. <code>define &lt;name&gt; &lt;ip-address&gt; &lt;port&gt; &lt;delay&gt;</code>
  53177. <br><br>
  53178. Defines a Davis VantagePro2 weatherstation attached on transparent ethernet/usb|serial server accessable by telnet.<br><br>
  53179. Examples:
  53180. <ul>
  53181. <code>define AUSSEN.wetterstation VantagePro2 192.168.8.127 4999 60</code><br>
  53182. <code>
  53183. fhem> list AUSSEN.wetterstation<br>
  53184. Internals:<br>
  53185. DEF 192.168.8.127 4999 60<br>
  53186. Host 192.168.8.127<br>
  53187. NAME AUSSEN.wetterstation<br>
  53188. NR 5<br>
  53189. Port 4999<br>
  53190. STATE T-OUT: 22.78 T-IN: 26.50 H-OUT: 55 H-IN: 45 W: 1.61 W-AV: 1.61 WS 257 R: 0.00 S: 770 UV: 4.1 RD: 0 RM: 41 RY: 241 BM: 76.27 BT: Steady<br>
  53191. TYPE VantagePro2<br>
  53192. Readings:<br>
  53193. 2010-08-04 10:15:17 10 min. average windspeed 1.61 (km/h)<br>
  53194. 2010-08-04 10:15:17 UV 4.1 (UV/Index)<br>
  53195. 2010-08-04 10:15:17 barometer 76.27 (Millimeters)<br>
  53196. 2010-08-04 10:15:17 barometer trend Steady<br>
  53197. 2010-08-04 10:15:17 day rain 0 (mm/day)<br>
  53198. 2010-08-04 10:15:17 humidity inside 45 (%)<br>
  53199. 2010-08-04 10:15:17 humidity outside 55 (%)<br>
  53200. 2010-08-04 10:15:17 month rain 41 (mm/month)<br>
  53201. 2010-08-04 10:15:17 rainrate 0.00 (mm/h)<br>
  53202. 2010-08-04 10:15:17 solar 770 (Watt/m^2)<br>
  53203. 2010-08-04 10:15:17 temperature-inside 26.50 (Celsius)<br>
  53204. 2010-08-04 10:15:17 temperature-outside 22.78 (Celsius)<br>
  53205. 2010-08-04 10:15:17 wind direction 257 (Degrees)<br>
  53206. 2010-08-04 10:15:17 windspeed 1.61 (km/h)<br>
  53207. 2010-08-04 10:15:17 year rain 241 (mm/year)<br>
  53208. Attributes:<br>
  53209. delay 60<br>
  53210. </code><br>
  53211. </ul>
  53212. </ul>
  53213. </ul>
  53214. <a name="Verkehrsinfo"></a>
  53215. <h3>Verkehrsinfo</h3>
  53216. <ul>
  53217. <i>Verkehrsinfo</i> can read trafficinformation from various source.
  53218. <br><br>
  53219. <ul>
  53220. <li>Verkehrsinfo.de</li>
  53221. For receiving the traffic informationen, following website https://www.verkehrsinfo.de/httpsmobil will be called on.<br>
  53222. There you can select streets or federal states. Afterwards the URL will be committed as a parameter.
  53223. <br><br>
  53224. <li>Hessenschau.de</li>
  53225. Here is no configuration necessary, the URL http://hessenschau.de/verkehr/index.html will be used as a parameter.
  53226. <br><br>
  53227. <li>RadioSAW.de</li>
  53228. Here is no configuration necessary, the keyword radiosaw will be used as a parameter.
  53229. </ul>
  53230. <br><br>
  53231. <b>Requirement:</b>
  53232. <ul><br>
  53233. For this module, following perl-modules are required:<br>
  53234. <li>HTML::TreeBuilder::XPath<br>
  53235. <code>sudo apt-get install libxml-treebuilder-perl libhtml-treebuilder-xpath-perl</code>
  53236. </li>
  53237. </ul>
  53238. <br><br>
  53239. <a name="Verkehrsinfodefine"></a>
  53240. <b>Define</b>
  53241. <ul>
  53242. <code>define &lt;name&gt; Verkehrsinfo &lt;url&gt; &lt;interval&gt;</code>
  53243. <br><br>
  53244. example: <code>define A8 Verkehrsinfo https://www.verkehrsinfo.de/httpsmobil/index.php?c=staulist&street=A8&lat=&lon= 3600 </code>
  53245. <br><br>
  53246. Options:
  53247. <ul>
  53248. <li><i>url</i><br>
  53249. URL regarding the traffic information</li>
  53250. <li><i>interval</i><br>
  53251. How often the data will be updated in seconds</li>
  53252. </ul>
  53253. </ul>
  53254. <br>
  53255. <a name="Verkehrsinfoset"></a>
  53256. <b>Set</b><br>
  53257. <ul>
  53258. <code>set &lt;name&gt; &lt;option&gt;</code>
  53259. <br><br>
  53260. Options:
  53261. <ul>
  53262. <li><i>update</i><br>
  53263. update will be executed right away</li>
  53264. </ul>
  53265. </ul>
  53266. <br>
  53267. <a name="Verkehrsinfoget"></a>
  53268. <b>Get</b><br>
  53269. <ul>
  53270. <code>get &lt;name&gt; &lt;option&gt;</code>
  53271. <br><br>
  53272. Options:
  53273. <ul>
  53274. <li><i>info</i><br>
  53275. output currently traffic information</li>
  53276. </ul>
  53277. </ul>
  53278. <br>
  53279. <a name="Verkehrsinfoattr"></a>
  53280. <b>Attributes</b><br>
  53281. <ul>
  53282. <code>attr &lt;name&gt; &lt;option&gt; &lt;value&gt;</code>
  53283. <br><br>
  53284. Options:
  53285. <ul>
  53286. <li><i>filter_exclude</i><br>
  53287. This is an exclusion filter. Traffic information containing these words, will not be displayed.<br>
  53288. The filter supports regular expressions. Attention: regex control character, for example brackets have to be masked with a backslash "\".<br>
  53289. Multiple searching keywords can be seperated with the pipe "|".<br><br></li>
  53290. <li><i>filter_include</i><br>
  53291. This is an inclusion filter. Traffic information containing these words, will be displayed.<br>
  53292. The filter supports regular expressions. Attention: regex control character, for example brackets have to be masked with a backslash "\".<br>
  53293. Multiple searching keywords can be seperated with the pipe "|".<br><br></li>
  53294. <li>Hint: Both filters can be used at the same time, or optional just one.<br>
  53295. The filters are linked with a logical and. That means, for example, when something is excluded, it can be reincluded with the other filter.<br><br></li>
  53296. <li><i>orderby</i><br>
  53297. Messages will be sorted by relevance by reference to the string.<br>
  53298. The sort supports regular expressions.<br>
  53299. Multiple searching keywords can be seperated with the pipe "|".<br><br></li>
  53300. <li><i>msg_format [ road | head | both ]</i> (only Verkehrsinfo.de and RadioSAW.de)<br>
  53301. Using this parameter you can format the output, regarding streets, direction or both.<br><br></li>
  53302. <li><i><a href="#readingFnAttributes">readingFnAttributes</a></i><br><br></li>
  53303. </ul>
  53304. </ul>
  53305. <br>
  53306. <a name="Verkehrsinforeading"></a>
  53307. <b>Readings</b>
  53308. <ul>
  53309. <br>
  53310. <li><b>e_</b><i>0|1|2|3...|9</i><b>_...</b> - aktiv message</li>
  53311. <li><b>count</b> - number of aktiv messages</li>
  53312. <li><b>e_</b><i>0</i><b>_road</b> - street</li>
  53313. <li><b>e_</b><i>0</i><b>_head</b> - direction</li>
  53314. <li><b>e_</b><i>0</i><b>_msg</b> - message</li>
  53315. </ul>
  53316. <br>
  53317. <a name="Verkehrsinfofunktion"></a>
  53318. <b>Funktion</b>
  53319. <ul>
  53320. <code>Verkehrsinfo_GetData(&lt;devicename&gt;)</code>
  53321. <br><br>
  53322. The function can be accessed anywhere in FHEM.
  53323. The output of this function is the same as get <name> info and the string can be used for further forwarding.
  53324. <br><br>
  53325. example: <code>my $result = Verkehrsinfo_GetData('A8')</code>
  53326. </ul>
  53327. <br>
  53328. </ul>
  53329. <a name="VolumeLink"></a>
  53330. <h3>VolumeLink</h3>
  53331. <ul>
  53332. VolumeLink links the volume-level &amp; mute-state from a physical device (e.g. a Philips-TV) with the volume &amp; mute control of a fhem device (e.g. a SONOS-Playbar, Onkyo, Yamaha or Denon Receiver, etc.).
  53333. <br><br>
  53334. <h4>Define</h4>
  53335. <ul>
  53336. <code>define &lt;name&gt; VolumeLink &lt;interval&gt; &lt;url&gt; &lt;ampDevice&gt; [&lt;timeout&gt; [&lt;httpErrorLoglevel&gt; [&lt;httpLoglevel&gt;]]]</code>
  53337. <br><br>
  53338. <br>
  53339. &lt;interval&gt;:
  53340. <ul>
  53341. <code>interval to fetch current volume &amp; mute level from physical-device.</code><br>
  53342. </ul>
  53343. &lt;url&gt;:
  53344. <ul>
  53345. <code>url to fetch volume &amp; mute level, see Example below. (Example applies to many Philips TV's)</code><br>
  53346. </ul>
  53347. &lt;ampDevice&gt;:
  53348. <ul>
  53349. <code>the target fhem-device.</code><br>
  53350. </ul>
  53351. [&lt;timeout&gt;]:
  53352. <ul>
  53353. <code>optional: timeout of a http-get. default: 0.5 seconds</code><br>
  53354. </ul>
  53355. [&lt;httpErrorLoglevel&gt;]:
  53356. <ul>
  53357. <code>optional: loglevel of http-errors. default: 4</code><br>
  53358. </ul>
  53359. [&lt;httpLoglevel&gt;]:
  53360. <ul>
  53361. <code>optional: loglevel of http-messages. default: 5</code><br>
  53362. </ul>
  53363. </ul>
  53364. <br>
  53365. <h4>Example</h4>
  53366. <ul>
  53367. <code>define tvVolume_LivingRoom VolumeLink 0.2 http://192.168.1.156:1925/5/audio/volume Sonos_LivingRoom</code><br>
  53368. <code>set tvVolume_LivingRoom on</code><br>
  53369. <br>
  53370. Note:<br>
  53371. - This example will work out of the box with many Philips TV's and a SONOS-Playbar as fhem-device.<br>
  53372. - Pre 2014 Philips TV's use another protocoll, which can be accessed on http://&lt;ip&gt;/1/audio/volume
  53373. </ul>
  53374. <br>
  53375. <h4>Set</h4>
  53376. <ul>
  53377. <code>set &lt;name&gt; &lt;on|off&gt</code><br>
  53378. <br>
  53379. Set on or off, to start or to stop.
  53380. </ul>
  53381. <br>
  53382. <h4>Get</h4> <ul>N/A</ul><br>
  53383. <h4>Attributes</h4>
  53384. <ul>
  53385. Note:<br>
  53386. - All Attributes takes effect immediately.<br>
  53387. - The default value of volumeRegexPattern &amp; muteRegexPattern applies to many Philips-TV's, otherwise it must be configured.<br>
  53388. - The default values of amp* applies to a SONOS-Playbar, otherwise it must be configured.<br>
  53389. - If you don't receive a result from url, or the lastHttpErrorMessage shows every time 'timed out', try setting attribute 'httpNoShutdown' to 0.<br>
  53390. <br>
  53391. <li>disable &lt;1|0&gt;<br>
  53392. With this attribute you can disable the whole module. <br>
  53393. If set to 1 the module will be stopped and no volume will be fetched from physical-device or transfer to the amplifier-device. <br>
  53394. If set to 0 you can start the module again with: set &lt;name&gt; on.</li>
  53395. <li>httpNoShutdown &lt;1|0&gt;<br>
  53396. If set to 0 VolumeLink will tell the http-server to explicit close the connection.<br>
  53397. <i>Default: 1</i>
  53398. </li>
  53399. <li>ampInputReading &lt;value&gt;<br>
  53400. Name of the Input-Reading on amplifier-device<br>
  53401. To disable the InputCheck if your amplifier-device does not support this, set this attribute to 0.<br>
  53402. <i>Default (which applies to SONOS-Player's): currentTitle</i></li>
  53403. <li>ampInputReadingVal &lt;RegEx&gt;<br>
  53404. RegEx for the Reading value of the corresponding Input-Channel on amplifier-device<br>
  53405. <i>Default (which applies to a SONOS-Playbar's SPDIF-Input and if no Input is selected): SPDIF-Wiedergabe|^$</i></li>
  53406. <li>ampVolumeReading &lt;value&gt;<br>
  53407. Name of the Volume-Reading on amplifier-device<br>
  53408. <i>Default: Volume</i></li>
  53409. <li>ampVolumeCommand &lt;value&gt;<br>
  53410. Command to set the volume on amplifier device<br>
  53411. <i>Default: Volume</i></li>
  53412. <li>ampMuteReading &lt;value&gt;<br>
  53413. Name of the Mute-Reading on amplifier-device<br>
  53414. <i>Default: Mute</i></li>
  53415. <li>ampMuteReadingOnVal &lt;value&gt;<br>
  53416. Reading value if muted<br>
  53417. <i>Default: 1</i></li>
  53418. <li>ampMuteReadingOffVal &lt;value&gt;<br>
  53419. Reading value if not muted<br>
  53420. <i>Default: 0</i></li>
  53421. <li>ampMuteCommand &lt;value&gt;<br>
  53422. Command to mute the amplifier device<br>
  53423. <i>Default: Mute</i></li>
  53424. <li>volumeRegexPattern &lt;RegEx&gt;<br>
  53425. RegEx which is applied to url return data. Must return a number for volume-level. <br>
  53426. <i>Default (which applies to many Phlips-TV's): current&quot;:&#92;s*(&#92;d+)</i></li>
  53427. <li>muteRegexPattern &lt;RegEx&gt;<br>
  53428. RegEx which is applied to url return data. Must return true, false, 1 or 0 as mute-state. <br>
  53429. <i>Default (which applies to many Phlips-TV's): muted&quot;:&#92;s*(&#92;w+|&#92;d+)</i></li>
  53430. </ul><br>
  53431. <h4>Readings</h4>
  53432. <ul>
  53433. Note: All VolumeLink Readings except of 'state' does not generate events!<br>
  53434. <br>
  53435. <li>lastHttpError<br>
  53436. The last HTTP-Error will be recorded in this reading.<br>
  53437. Define httpErrorLoglevel, httpLoglevel or attribute <a href="#verbose">verbose</a> for more information.<br>
  53438. Note: Attr <a href="#verbose">verbose</a> will not output all HTTP-Messages, define httpLoglevel for this.</li>
  53439. <li>mute<br>
  53440. The current mute-state fetched from physical device.</li>
  53441. <li>volume<br>
  53442. The current volume-level fetched from physical device.</li>
  53443. <li>state<br>
  53444. on if VolumeLink is running, off if VolumeLink is stopped.</li>
  53445. </ul>
  53446. <br>
  53447. </ul>
  53448. <a name="WEBCOUNT"></a>
  53449. <h3>WEBCOUNT</h3>
  53450. <ul>
  53451. Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
  53452. <br><br>
  53453. <a name="WEBCOUNTdefine"></a>
  53454. <b>Define</b>
  53455. <ul>
  53456. <code>define &lt;name&gt; WEBCOUNT &lt;ip-address&gt; &lt;port&gt; &lt;delay&gt;</code>
  53457. <br><br>
  53458. Defines an WEBCOUNT device (Box with 6 count pulses, www.wut.de) via ip address. The device is pooled (delay interval).<br><br>
  53459. Examples:
  53460. <ul>
  53461. <code>define pump WEBCOUNT 192.168.8.200 1 60</code><br>
  53462. </ul>
  53463. </ul>
  53464. <br>
  53465. </ul>
  53466. <a name="WEBIO"></a>
  53467. <h3>WEBIO</h3>
  53468. <ul>
  53469. Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
  53470. <br><br>
  53471. <a name="WEBIOdefine"></a>
  53472. <b>Define</b>
  53473. <ul>
  53474. <code>define &lt;name&gt; WEBIO &lt;ip-address&gt; &lt;port&gt; &lt;delay&gt;</code>
  53475. <br><br>
  53476. Defines an Web-IO device (Box with 2 Analog-In/Out 0..10V, www.wut.de) via ip address. The status of the device is also pooled (delay interval).<br><br>
  53477. Examples:
  53478. <ul>
  53479. <code>define pumpspeed WEBIO 192.168.8.200 1 60</code><br>
  53480. </ul>
  53481. </ul>
  53482. <br>
  53483. <a name="WEBIOset"></a>
  53484. <b>Set </b>
  53485. <ul>
  53486. <code>set &lt;name&gt; &lt;value&gt;</code>
  53487. <br><br>
  53488. where <code>value</code> is one of:<br>
  53489. <pre>
  53490. 0.00 - 10.00
  53491. </pre>
  53492. Examples:
  53493. <ul>
  53494. <code>set pumpspeed 6.75</code><br>
  53495. </ul>
  53496. <br>
  53497. </ul>
  53498. </ul>
  53499. <a name="WEBIO_12DIGITAL"></a>
  53500. <h3>WEBIO_12DIGITAL</h3>
  53501. <ul>
  53502. Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
  53503. <br><br>
  53504. <a name="WEBIO_12DIGITALdefine"></a>
  53505. <b>Define</b>
  53506. <ul>
  53507. <code>define &lt;name&gt; WEBIO_12DIGITAL &lt;ip-address&gt; &lt;outputport&gt; &lt;delay&gt;</code>
  53508. <br><br>
  53509. Defines an Web-IO-Digital device (Box with up to 12 digital in/outputs, www.wut.de) via ip address. The status of the device is also pooled (delay interval).<br><br>
  53510. Examples:
  53511. <ul>
  53512. <code>define motor1 WEBIO_12DIGITAL 192.168.8.200 1 60</code><br>
  53513. </ul>
  53514. </ul>
  53515. <br>
  53516. <a name="WEBIO_12DIGITALset"></a>
  53517. <b>Set </b>
  53518. <ul>
  53519. <code>set &lt;name&gt; &lt;value&gt;</code>
  53520. <br><br>
  53521. where <code>value</code> is one of:<br>
  53522. <pre>
  53523. on off
  53524. </pre>
  53525. Examples:
  53526. <ul>
  53527. <code>set motor1 on</code><br>
  53528. </ul>
  53529. <br>
  53530. </ul>
  53531. </ul>
  53532. <a name="WINCONNECT"></a>
  53533. <h3>WINCONNECT</h3>
  53534. <ul>
  53535. This module controls a Windows PC.
  53536. <br><br>
  53537. <ul>
  53538. <a name="WINCONNECTdefine" id="WINCONNECTdefine"></a> <b>Define</b>
  53539. <ul>
  53540. <code>define &lt;name&gt; WINCONNECT &lt;ip-address-or-hostname&gt; [&lt;poll-interval&gt;]</code><br>
  53541. <br>
  53542. Defining an WINCONNECT device will schedule an internal task (interval can be set with optional parameter &lt;poll-interval&gt; in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
  53543. <br>
  53544. Example:<br>
  53545. <ul>
  53546. <code>define Buero.PC WINCONNECT 192.168.0.10<br>
  53547. <br>
  53548. # With custom interval of 60 seconds<br>
  53549. define Buero.PC WINCONNECT 192.168.0.10 60<br></code>
  53550. </ul>
  53551. </ul>
  53552. </ul>
  53553. <br><br>
  53554. More information on <a target="_blank" href="https://wiki.fhem.de/wiki/WINCONNECT">FHEM Wiki</a>.<br/>
  53555. <br>
  53556. </ul>
  53557. <a name="WMBUS"></a>
  53558. <h3>WMBUS - Wireless M-Bus</h3>
  53559. <ul>
  53560. This module supports Wireless M-Bus meters for e.g. water, heat, gas or electricity.
  53561. Wireless M-Bus is a standard protocol supported by various manufacturers.
  53562. It uses the 868 MHz band for radio transmissions.
  53563. Therefore you need a device which can receive Wireless M-Bus messages, e.g. a <a href="#CUL">CUL</a> with culfw >= 1.59 or an AMBER Wireless AMB8465M.
  53564. <br>
  53565. WMBus uses two different radio protocols, T-Mode and S-Mode. The receiver must be configured to use the same protocol as the sender.
  53566. In case of a CUL this can be done by setting <a href="#rfmode">rfmode</a> to WMBus_T or WMBus_S respectively.
  53567. <br>
  53568. WMBus devices send data periodically depending on their configuration. It can take days between individual messages or they might be sent
  53569. every minute.
  53570. <br>
  53571. WMBus messages can be optionally encrypted. In that case the matching AESkey must be specified with attr AESkey. Otherwise the decryption
  53572. will fail and no relevant data will be available.
  53573. <br><br>
  53574. <b>Prerequisites</b><br>
  53575. This module requires the perl modules Crypt::CBC, Digest::CRC and Crypt::OpenSSL::AES (AES only if encrypted messages should be processed).<br>
  53576. On a debian based system these can be installed with<br>
  53577. <code>
  53578. sudo apt-get install libcrypt-cbc-perl libdigest-crc-perl libssl-dev<br>
  53579. sudo cpan -i Crypt::OpenSSL::AES
  53580. </code>
  53581. <br><br>
  53582. <a name="WMBUSdefine"></a>
  53583. <b>Define</b>
  53584. <ul>
  53585. <code>define &lt;name&gt; WMBUS [&lt;manufacturer id&gt; &lt;identification number&gt; &lt;version&gt; &lt;type&gt; [&lt;MessageEncoding&gt;]]|&lt;bHexCode&gt;</code> <br>
  53586. <br>
  53587. Normally a WMBus device isn't defined manually but automatically through the <a href="#autocreate">autocreate</a> mechanism upon the first reception of a message.
  53588. <br>
  53589. For a manual definition there are two ways.
  53590. <ul>
  53591. <li>
  53592. By specifying a raw WMBus message as received by a CUL. Such a message starts with a lower case 'b' and contains at least 24 hexadecimal digits.
  53593. The WMBUS module extracts all relevant information from such a message.
  53594. </li>
  53595. <li>
  53596. Explictly specify the information that uniquely identifies a WMBus device. <br>
  53597. The manufacturer code, which is is a three letter shortcut of the manufacturer name. See
  53598. <a href="http://dlms.com/organization/flagmanufacturesids/index.html">dlms.com</a> for a list of registered ids.<br>
  53599. The identification number is the serial no of the meter.<br>
  53600. version is the version code of the meter<br>
  53601. type is the type of the meter, e.g. water or electricity encoded as a number.<br>
  53602. MessageEncoding is either CUL or AMB, depending on which kind of IODev is used.
  53603. </li>
  53604. <br>
  53605. </ul>
  53606. </ul>
  53607. <br>
  53608. <a name="WMBUSset"></a>
  53609. <b>Set</b> <ul>N/A</ul><br>
  53610. <a name="WMBUSget"></a>
  53611. <b>Get</b> <ul>N/A</ul><br>
  53612. <a name="WMBUSattr"></a>
  53613. <b>Attributes</b>
  53614. <ul>
  53615. <li><a href="#IODev">IODev</a><br>
  53616. Set the IO or physical device which should be used for receiving signals
  53617. for this "logical" device. An example for the physical device is a CUL.
  53618. </li><br>
  53619. <li>AESKey<br>
  53620. A 16 byte AES-Key in hexadecimal digits. Used to decrypt messages from meters which have encryption enabled.
  53621. </li><br>
  53622. <li>
  53623. <a href="#ignore">ignore</a>
  53624. </li><br>
  53625. <li>rawmsg_as_reading<br>
  53626. If set to 1, received raw messages will be stored in the reading rawmsg. This can be used to log raw messages to help with debugging.
  53627. </li>
  53628. </ul>
  53629. <br>
  53630. <a name="WMBUSreadings"></a>
  53631. <b>Readings</b><br>
  53632. <ul>
  53633. Meters can send a lot of different information depending on their type. An electricity meter will send other data than a water meter.
  53634. The information also depends on the manufacturer of the meter. See the WMBus specification on <a href="http://www.oms-group.org">oms-group.org</a> for details.
  53635. <br><br>
  53636. The readings are generated in blocks starting with block 1. A meter can send several data blocks.
  53637. Each block has at least a type, a value and a unit, e.g. for an electricity meter it might look like<br>
  53638. <ul>
  53639. <code>1_type VIF_ENERGY_WATT</code><br>
  53640. <code>1_unit Wh</code><br>
  53641. <code>1_value 2948787</code><br>
  53642. </ul>
  53643. <br>
  53644. There is also a fixed set of readings.
  53645. <ul>
  53646. <li><code>is_encrypted</code> is 1 if the received message is encrypted.</li>
  53647. <li><code>decryption_ok</code> is 1 if a message has either been successfully decrypted or if it is unencrypted.</li>
  53648. <li><code>state</code> contains the state of the meter and may contain error message like battery low. Normally it contains 'no error'.</li>
  53649. <li><code>battery</code> contains ok or low.</li>
  53650. </ul>
  53651. For some well known devices specific readings like the energy consumption in kWh created.
  53652. </ul>
  53653. </ul>
  53654. <a name="WOL"></a>
  53655. <h3>WOL</h3>
  53656. Defines a WOL device via its MAC and IP address.<br><br>
  53657. when sending the <b>on</b> command to a WOL device it wakes up the dependent device by sending a magic packet. When running in repeat mode the magic paket ist sent every n seconds to the device.
  53658. So, for example a Buffalo NAS can be kept awake.
  53659. <ul>
  53660. <a name="WOLdefine"></a>
  53661. <h4>Define</h4>
  53662. <ul>
  53663. <code><b><font size="+1">define &lt;name&gt; WOL &lt;MAC&gt; &lt;IP&gt; [&lt;mode&gt; [&lt;repeat&gt;]]</font></b></code>
  53664. <br><br>
  53665. <dl>
  53666. <dt><b>MAC</b></dt>
  53667. <dd>MAC-Adress of the host</dd>
  53668. <dt><b>IP</b></dt>
  53669. <dd>IP-Adress of the host (or broadcast address of the local network if IP of the host is unknown)</dd>
  53670. <dt><b>mode <i>[EW|UDP]</i></b></dt>
  53671. <dd>EW: wakeup by <i>usr/bin/ether-wake</i> </dd>
  53672. <dd>UDP: wakeup by an implementation like <i>Net::Wake(CPAN)</i></dd>
  53673. </dl>
  53674. <br><br>
  53675. <b><font size="+1">Examples</font></b>:
  53676. <ul>
  53677. <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;switching only one time</code><br>
  53678. <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 EW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by ether-wake(linux command)</code><br>
  53679. <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 BOTH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by both methods</code><br>
  53680. <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 UDP 200 &nbsp;&nbsp;&nbsp; in repeat mode<i><b>usr/bin/ether-wake</b></i> in repeatmode</code><br>
  53681. </ul>
  53682. <br><br>
  53683. <b><font size="+1">Notes</font></b>:
  53684. <ul>
  53685. Not every hardware is able to wake up other devices by default. Oftenly firewalls filter magic packets. Switch them first off.
  53686. You may need a packet sniffer to check some malfunktion.
  53687. With this module you get two methods to do the job: see the mode parameter.
  53688. </ul>
  53689. </ul>
  53690. <a name="WOLset"></a>
  53691. <h4>Set </h4>
  53692. <ul>
  53693. <code><b><font size="+1">set &lt;name&gt; &lt;value&gt;</font></b></code>
  53694. <br><br>
  53695. where <code>value</code> is one of:<br>
  53696. <pre>
  53697. <b>refresh</b> # checks(by ping) whether the device is currently running
  53698. <b>on</b> # sends a magic packet to the defined MAC address
  53699. <b>off</b> # stops sending magic packets and sends the <b>shutdownCmd</b>(see attributes)
  53700. </pre>
  53701. <b><font size="+1">Examples</font></b>:
  53702. <ul>
  53703. <code>set computer1 on</code><br>
  53704. <code>set computer1 off</code><br>
  53705. <code>set computer1 refresh</code><br>
  53706. </ul>
  53707. </ul>
  53708. <a name="WOLattr"></a>
  53709. <h4>Attributes</h4>
  53710. <ul>
  53711. <li><code>attr &lt;name&gt; sysCmd &lt;string&gt;</code>
  53712. <br>Custom command executed to wakeup a remote machine, i.e. <code>/usr/bin/ether-wake or /usr/bin/wakeonlan</code></li>
  53713. <li><code>attr &lt;name&gt; shutdownCmd &lt;command&gt;</code>
  53714. <br>Custom command executed to shutdown a remote machine. You can use &lt;command&gt;, like you use it in at, notify or Watchdog</li>
  53715. <br><br>
  53716. Examples:
  53717. <PRE>
  53718. attr wol shutdownCmd set lamp on # fhem command
  53719. attr wol shutdownCmd { Log 1, "Teatime" } # Perl command
  53720. attr wol shutdownCmd "/bin/echo "Teatime" > /dev/console" # shell command
  53721. </PRE>
  53722. <li><code>attr &lt;name&gt; interval &lt;seconds&gt;</code></a>
  53723. <br>defines the time between two checks by a <i>ping</i> if state of &lt;name&gt is <i>on</i>. By using 0 as parameter for interval you can switch off checking the device.</li>
  53724. <li><code>attr &lt;name&gt; useUdpBroadcast &lt;broardcastAdress&gt;</code>
  53725. <br>When using UDP then the magic packet can be send to one of the broardcastAdresses (x.x.x.255, x.x.255.255, x.255.255.255) instead of the target host address.
  53726. Try using this, when you want to wake up a machine in your own subnet and the wakekup with the target adress is instable or doesn't work.</li>
  53727. </ul>
  53728. </ul>
  53729. <a name="WS2000"></a>
  53730. <h3>WS2000</h3>
  53731. <ul>
  53732. <br>
  53733. <a name="WS2000define"></a>
  53734. <b>Define</b>
  53735. <ul>
  53736. <code>define &lt;name&gt; WS2000 &lt;device_to_connect&gt;</code>
  53737. <br><br>
  53738. Define a WS2000 series raw receiver device sold by ELV. Details see <a
  53739. href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=6724">here</a>.
  53740. Unlike 86_FS10.pm it will handle the complete device communication itself
  53741. and doesnt require an external program. For this reason you can now use
  53742. this also on windows.
  53743. <br>
  53744. This Device will be usually connect to a serial port, but you can also
  53745. define a raw network redirector like lantronix XPORT(TM).
  53746. <br>Note: Currently this device does not support a "set" function
  53747. <br><br>
  53748. Attributes:
  53749. <ul>
  53750. <li><code>rain</code>: factor for calculating amount of rain in ml/count</li>
  53751. <li><code>altitude</code>: height in meters to calculate pressure for NN (not used yet)</li>
  53752. </ul>
  53753. <br>
  53754. Example:
  53755. <ul>
  53756. <code>define WS2000 WS2000 /dev/ttyS0</code><br>
  53757. </ul>
  53758. <ul>
  53759. <code>define WS2000 WS2000 xport:10001</code><br>
  53760. </ul>
  53761. <ul>
  53762. <code>attr WS2000 rain 366</code> : use factor 366 ml/count for rain sensor S2000R<br>
  53763. </ul>
  53764. <br>
  53765. </ul>
  53766. <b>Set</b> <ul>N/A</ul><br>
  53767. <a name="WS2000get"></a>
  53768. <b>Get</b>
  53769. <ul>
  53770. <code>get &lt;name&gt; list</code>
  53771. <br>
  53772. Gets the last reading of all received sensord
  53773. <br><br>
  53774. <code>get &lt;name&gt; [TH0..TH7, T0..T7, I0..I7, R0..R7, W0..W7, L0..L7, P0..P7,LAST,RAW]</code><br>
  53775. get the last reading for the name sensor, <br>
  53776. <code>LAST</code>: Last received Sensor
  53777. <br><br>
  53778. <code>RAW</code>: original Data from interface
  53779. <br><br>
  53780. </ul>
  53781. <a name="WS2000attr"></a>
  53782. <b>Attributes</b>
  53783. <ul>
  53784. <li><a href="#model">model</a> (ws2000)</li>
  53785. <li><a href="#loglevel">loglevel</a></li>
  53786. <li>rain</li>
  53787. <li>altitude</li>
  53788. </ul>
  53789. <br>
  53790. </ul>
  53791. <a name="WS300"></a>
  53792. <h3>WS300</h3>
  53793. <ul>
  53794. <br>
  53795. <a name="WS300define"></a>
  53796. <b>Define</b>
  53797. <ul>
  53798. <code>define WS300Device WS300 &lt;serial device&gt;</code><br>
  53799. or<br>
  53800. <code>define &lt;devname&gt WS300 [0-9]</code><br>
  53801. <br>
  53802. The first line is mandatory if you have a WS300 device: it defines the
  53803. input device with its USB port. The name of this device is fixed and must
  53804. be WS300Device. It must be the first defined WS300 device.<br>
  53805. For each additional device (with number 0 to 9) you have to define another
  53806. WS300 device, with an arbitrary name. The WS300 device which reports the
  53807. readings will be defined with the port number 9, an optional KS300 with the
  53808. port number 8.<br><br>
  53809. Examples:
  53810. <pre>
  53811. define WS300Device WS300 /dev/ttyUSB1
  53812. define ash2200.1 WS300 0
  53813. define ks300 WS300 8
  53814. define ws300 WS300 9
  53815. </pre>
  53816. </ul>
  53817. <br>
  53818. <a name="WS300set"></a>
  53819. <b>Set </b>
  53820. <ul>
  53821. <code>set WS300Device &lt;interval(min.)&gt; &lt;height(m)&gt; &lt;rainvalume(ml)&gt;</code>
  53822. <br><br>
  53823. Set some WS300 configuration parameters.
  53824. </ul>
  53825. <a name="WS300get"></a>
  53826. <b>Get</b>
  53827. <ul>
  53828. N/A
  53829. </ul>
  53830. <br>
  53831. <a name="WS300attr"></a>
  53832. <b>Attributes</b>
  53833. <ul>
  53834. <li><a href="#do_not_notify">do_not_notify</a></li>
  53835. <li><a href="#model">model</a> (ws300)</li>
  53836. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  53837. </ul>
  53838. <br>
  53839. </ul>
  53840. <a name="WS3600"></a>
  53841. <h3>WS3600</h3>
  53842. <ul>
  53843. Defines a weather station, which is queried by means of an external
  53844. program. That program is executed by FHEM and is expected to deliver the
  53845. data at stdout in the format of a WS3600 series weather station (details
  53846. see below).<br>
  53847. <br>
  53848. <a name="WS3600define"></a> <b>Define</b>
  53849. <ul>
  53850. <code>define &lt;name&gt; WS3600 "&lt;wsreaderprog&gt;
  53851. [&lt;options&gt;]" [&lt;interval&gt;]</code> <br>
  53852. <br>
  53853. <ul>
  53854. <dl>
  53855. <dt>&lt;wsreaderprog&gt;</dt>
  53856. <dd>full path to the executable which queries the weatherstation
  53857. (for WS3600 series fetch3600 should be used)</dd>
  53858. <dt>&lt;options&gt;</dt>
  53859. <dd>options for &lt;wsreaderprog&gt;, if necessary</dd>
  53860. <dt>&lt;interval&gt;</dt>
  53861. <dd>this optional parameter is the time between subsequent calls to
  53862. &lt;wsreaderprog&gt;. It defaults to 60s.</dd>
  53863. </dl>
  53864. </ul>
  53865. <br>
  53866. Supported Stations are:<br>
  53867. <ul>
  53868. <li>WS3600 series weather station (Europe Supplies, technotrade, etc;
  53869. refer to <a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS3600">Wetterstationen.info</a>
  53870. (german) for details on this model) with fetch3600 from the
  53871. toolchain <a href="https://sourceforge.net/projects/open3600/">open3600</a>).
  53872. Fetch3600 delivers the current readings line by line as
  53873. reading-value-pairs. These are read periodically and translated into
  53874. more readable names for FHEM by the module WS3600.pm. </li>
  53875. <li><a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS2300">WS2300</a>
  53876. with toolchain <a href="http://www.lavrsen.dk/twiki/bin/view/Open2300/WebHome">open2300</a>,
  53877. because it is rather similar to the WS3600.</li>
  53878. <li><a href="http://wiki.wetterstationen.info/index.php?title=WS1080">WS1080</a>
  53879. (and other stations which come with the EasyWeather windows
  53880. application) with <a href="https://github.com/ajauberg/fowsr/">fowsr</a>
  53881. (version 2.0 or above)</li>
  53882. </ul>
  53883. <br>
  53884. Currently, it is expected that the WS is attached to the local computer
  53885. and &lt;wsreaderprog&gt; is run locally. Basically the executable called
  53886. needs to supply on stdout an output similar to what fetch3600 returns;
  53887. how to implement a "networked setup" is left as an excercise to the
  53888. reader. <br>
  53889. For the records, this is an output of fetch3600:<br>
  53890. <div>
  53891. <pre>Date 14-Nov-2009
  53892. Time 10:50:22
  53893. Ti 22.8
  53894. Timin 20.8
  53895. Timax 27.9
  53896. TTimin 10:27
  53897. DTimin 15-10-2009
  53898. TTimax 23:31
  53899. DTimax 20-08-2009
  53900. To 14.2
  53901. Tomin -0.4
  53902. Tomax 35.6
  53903. TTomin 07:03
  53904. DTomin 15-10-2009
  53905. TTomax 16:52
  53906. DTomax 20-08-2009
  53907. DP 9.2
  53908. DPmin -2.2
  53909. DPmax 20.3
  53910. TDPmin 07:03
  53911. DDPmin 15-10-2009
  53912. TDPmax 11:58
  53913. DDPmax 20-08-2009
  53914. RHi 48
  53915. RHimin 32
  53916. RHimax 57
  53917. TRHimin 17:03
  53918. DRHimin 21-10-2009
  53919. TRHimax 22:24
  53920. DRHimax 07-10-2009
  53921. RHo 72
  53922. RHomin 27
  53923. RHomax 96
  53924. TRHomin 16:41
  53925. DRHomin 20-08-2009
  53926. TRHomax 06:28
  53927. DRHomax 02-11-2009
  53928. WS 0.0
  53929. DIRtext WSW
  53930. DIR0 247.5
  53931. DIR1 247.5
  53932. DIR2 247.5
  53933. DIR3 247.5
  53934. DIR4 247.5
  53935. DIR5 247.5
  53936. WC 14.2
  53937. WCmin -0.4
  53938. WCmax 35.6
  53939. TWCmin 07:03
  53940. DWCmin 15-10-2009
  53941. TWCmax 16:52
  53942. DWCmax 20-08-2009
  53943. WSmin 0.0
  53944. WSmax 25.6
  53945. TWSmin 10:44
  53946. DWSmin 14-11-2009
  53947. TWSmax 19:08
  53948. DWSmax 24-09-2009
  53949. R1h 0.00
  53950. R1hmax 24.34
  53951. TR1hmax 22:34
  53952. DR1hmax 07-10-2009
  53953. R24h 0.00
  53954. R24hmax 55.42
  53955. TR24hmax 07:11
  53956. DR24hmax 08-10-2009
  53957. R1w 29.00
  53958. R1wmax 95.83
  53959. TR1wmax 00:00
  53960. DR1wmax 12-10-2009
  53961. R1m 117.58
  53962. R1mmax 117.58
  53963. TR1mmax 00:00
  53964. DR1mmax 01-11-2009
  53965. Rtot 3028.70
  53966. TRtot 03:29
  53967. DRtot 18-09-2005
  53968. RP 992.200
  53969. AP 995.900
  53970. RPmin 970.300
  53971. RPmax 1020.000
  53972. TRPmin 05:25
  53973. DRPmin 04-11-2009
  53974. TRPmax 09:19
  53975. DRPmax 11-09-2009
  53976. Tendency Falling
  53977. Forecast Cloudy</pre>
  53978. </div>
  53979. The following extensions are also supported now:<br>
  53980. <div>
  53981. <pre>IL 0.0
  53982. UV 8
  53983. Forecast Rain at times, worse later
  53984. ZCode U</pre>
  53985. </div>
  53986. There is no expectation on the readings received from the fetch3600
  53987. binary; so, in essence, if you have a similar setup (unsupported,
  53988. attached weather station and a means to get it's reading into an output
  53989. similar to above's), you <em>should be able</em> to use WS3600.pm with
  53990. a custom written script to interface FHEM with your station as well.
  53991. WS3600.pm <em>only recognizes the above readings</em> (and translates
  53992. these into, e. g., <code>Temp-inside</code> for <code>Ti</code> for
  53993. use within FHEM), other lines are silently dropped on the floor. Note:
  53994. To step down the number of readings date and time records will now be
  53995. merged to one reading containing date and time. This now also allows
  53996. records with merged date / time values delivered from
  53997. &lt;wsreaderprog&gt; - detected by prefix <code>DT</code> (e.g. <code>Date</code>
  53998. + <code>Time</code> --&gt; <code>DTime</code>, <code>DRPmin</code> +
  53999. <code>TRPmin</code> --&gt; <code>DTRPmin</code> and so on). <br>
  54000. fetch3600 is available as binary for the Windows OS as well, <em>but
  54001. operation under that OS isn't tested yet.</em> <br>
  54002. <br>
  54003. Examples:
  54004. <ul>
  54005. <code>define myWS3600 W3600 /usr/local/bin/fetch360</code><br>
  54006. <code>define myWS1080 W3600 "/usr/local/bin/fowsr -c" 300</code><br>
  54007. </ul>
  54008. <br>
  54009. </ul>
  54010. <a name="WS3600set"></a> <b>Set</b>
  54011. <ul>
  54012. N/A
  54013. </ul>
  54014. <br>
  54015. <a name="WS3600get"></a> <b>Get</b>
  54016. <ul>
  54017. N/A
  54018. </ul>
  54019. <br>
  54020. <a name="WS3600attr"></a> <b>Attributes</b>
  54021. <ul>
  54022. <li><a href="#model">model</a>&nbsp;&nbsp;&nbsp;&nbsp; WS3600, WS2300,
  54023. WS1080, WS3080 (not used for anything, yet)</li>
  54024. </ul>
  54025. <br>
  54026. </ul>
  54027. <a name="WUup"></a>
  54028. <h3>WUup</h3>
  54029. <ul>
  54030. <a name="WUupdefine"></a>
  54031. <b>Define</b>
  54032. <ul>
  54033. <br/>
  54034. <code>define &lt;name&gt; WUup &lt;stationId&gt; &lt;password&gt;</code>
  54035. <br/><br/>
  54036. This module provides connection to
  54037. <a href="https://www.wunderground.com">www.wunderground.com</a></br>
  54038. to send data from your own weather station.<br/>
  54039. </ul>
  54040. <br/><br/>
  54041. <a name="WUupset"></a>
  54042. <b>Set-Commands</b><br/>
  54043. <ul>
  54044. <li><b>update</b> - send data to Weather Underground</li>
  54045. </ul>
  54046. <br/><br/>
  54047. <a name="WUupget"></a>
  54048. <b>Get-Commands</b><br/>
  54049. <ul>
  54050. <br/>
  54051. - not implemented -<br/>
  54052. </ul>
  54053. <br/><br/>
  54054. <a name="WUupattr"></a>
  54055. <b>Attributes</b><br/><br/>
  54056. <ul>
  54057. <li><b><a href="#readingFnAttributes">readingFnAttributes</a></b></li>
  54058. <li><b>interval</b> - Interval (seconds) to send data to
  54059. www.wunderground.com.
  54060. Will be adjusted to 300 (which is the default) if set to a value lower than 3.<br />
  54061. If lower than 300, RapidFire mode will be used.</li>
  54062. <li><b>disable</b> - disables the module</li>
  54063. <li><b><a href="#disabledForIntervals">disabledForIntervals</a></b></li>
  54064. <li><b>unit_windspeed</b> - change the units of your windspeed readings (m/s or km/h)</li>
  54065. <li><b>wu....</b> - Attribute name corresponding to
  54066. <a href="http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol">parameter name from api.</a>
  54067. Each of these attributes contains information about weather data to be sent
  54068. in format <code>sensorName:readingName</code><br/>
  54069. Example: <code>attr WUup wutempf outside:temperature</code> will
  54070. define the attribute wutempf and <br/>
  54071. reading "temperature" from device "outside" will be sent to
  54072. network as parameter "tempf" (which indicates current temperature)
  54073. <br/>
  54074. Units get converted to angloamerican system automatically
  54075. (&deg;C -> &deg;F; km/h(m/s) -> mph; mm -> in; hPa -> inHg)<br/><br/>
  54076. <u>The following information is supported:</u>
  54077. <ul>
  54078. <li>winddir - [0-360 instantaneous wind direction]</li>
  54079. <li>windspeedmph - [mph instantaneous wind speed]</li>
  54080. <li>windgustmph - [mph current wind gust, using software specific time period]</li>
  54081. <li>windgustdir - [0-360 using software specific time period]</li>
  54082. <li>windspdmph_avg2m - [mph 2 minute average wind speed mph]</li>
  54083. <li>winddir_avg2m - [0-360 2 minute average wind direction]</li>
  54084. <li>windgustmph_10m - [mph past 10 minutes wind gust mph]</li>
  54085. <li>windgustdir_10m - [0-360 past 10 minutes wind gust direction]</li>
  54086. <li>humidity - [&#37; outdoor humidity 0-100&#37;]</li>
  54087. <li>dewptf- [F outdoor dewpoint F]</li>
  54088. <li>tempf - [F outdoor temperature]</li>
  54089. <li>rainin - [rain inches over the past hour)] -- the accumulated rainfall in the past 60 min</li>
  54090. <li>dailyrainin - [rain inches so far today in local time]</li>
  54091. <li>baromin - [barometric pressure inches]</li>
  54092. <li>soiltempf - [F soil temperature]</li>
  54093. <li>soilmoisture - [&#37;]</li>
  54094. <li>solarradiation - [W/m&sup2;]</li>
  54095. <li>UV - [index]</li>
  54096. </ul>
  54097. </li>
  54098. </ul>
  54099. <br/><br/>
  54100. <b>Readings/Events:</b>
  54101. <br/><br/>
  54102. <ul>
  54103. <li><b>data</b> - data string transmitted to www.wunderground.com</li>
  54104. <li><b>response</b> - response string received from server</li>
  54105. </ul>
  54106. <br/><br/>
  54107. <b>Notes</b><br/><br/>
  54108. <ul>
  54109. <li>Find complete api description
  54110. <a href="http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol">here</a></li>
  54111. <li>Have fun!</li><br/>
  54112. </ul>
  54113. </ul>
  54114. <a name="WWO"></a>
  54115. <h3>WWO</h3>
  54116. <ul>
  54117. <br>
  54118. <a name="WWOdefine"></a>
  54119. <b>Define</b>
  54120. <ul>
  54121. <code>define &lt;name&gt; WWO &lt;location&gt; &lt;apikey&gt;</code><br>
  54122. <br>
  54123. Defines a virtual device for WWO forecasts.<br><br>
  54124. A WWO device periodically gathers current and forecast weather conditions
  54125. from worldweatheronline.com (the free api version)<br>
  54126. You need to signup at <a href="http://developer.worldweatheronline.com">http://developer.worldweatheronline.com</a> to get an apikey)<br><br>
  54127. The parameter <code>location</code> is the WOEID (WHERE-ON-EARTH-ID), go to
  54128. <a href="http://www.worldweatheronline.com">http://www.worldweatheronline.com</a> to find it out for your valid location.<br><br>
  54129. The natural language in which the forecast information appears is english.
  54130. <br><br>
  54131. The interval is set to update the values every hour.
  54132. <br><br>
  54133. Examples:
  54134. <pre>
  54135. define MyWeather WWO Berlin,Germany
  54136. </pre>
  54137. The module provides one additional function <code>WWOAsHtml</code>. The function return the HTML code for a
  54138. vertically arranged weather forecast.
  54139. <br><br>
  54140. Example:
  54141. <pre>
  54142. define MyWeatherWeblink weblink htmlCode { WWOAsHtml("MyWeather") }
  54143. </pre>
  54144. </ul>
  54145. <br>
  54146. <a name="Weatherset"></a>
  54147. <b>Set </b>
  54148. <ul>
  54149. <code>set &lt;name&gt; update</code><br><br>
  54150. Forces the retrieval of the weather data. The next automatic retrieval is scheduled to occur
  54151. <code>interval</code> seconds later.<br><br>
  54152. </ul>
  54153. <br>
  54154. <a name="Weatherget"></a>
  54155. <b>Get</b>
  54156. <ul>
  54157. <code>get &lt;name&gt; &lt;reading&gt;</code><br><br>
  54158. Valid readings and their meaning (? can be one of 0, 1, 2, 3, 4, 5 and stands
  54159. for today, tomorrow, etc. - with 'fc?_' or without! - without is meaning 'current condition'):<br>
  54160. <table>
  54161. <tr><td>cloudcover</td><td>cloudcover in percent</td></tr>
  54162. <tr><td>current_date_time</td><td>last update of forecast on server</td></tr>
  54163. <tr><td>fc?_date</td><td>date of the forecast condition - not valid without 'fc?'</td></tr>
  54164. <tr><td>fc?_icon</td><td>name of the forecasticon</td></tr>
  54165. <tr><td>fc?_precipMM</td><td>preciption for day</td></tr>
  54166. <tr><td>fc?_tempMaxC</td><td>forecasted daily high in degrees centigrade</td></tr>
  54167. <tr><td>fc?_tempMaxF</td><td>forecasted daily high in degrees fahrenheit</td></tr>
  54168. <tr><td>fc?_tempMinC</td><td>forecasted daily low in degrees centigrade</td></tr>
  54169. <tr><td>fc?_tempMinF</td><td>forecasted daily low in degrees fahrenheit</td></tr>
  54170. <tr><td>fc?_weatherCode</td><td>weathercode</td></tr>
  54171. <tr><td>fc?_weatherDesc</td><td>short weather desciption</td></tr>
  54172. <tr><td>fc?_weatherIconUrl</td><td>full url to the weathericonfile</td></tr>
  54173. <tr><td>fc?_winddir16Point</td><td>winddirection with 16 points</td></tr>
  54174. <tr><td>fc?_winddirDegree</td><td>windirection in degrees</td></tr>
  54175. <tr><td>fc?_winddirection</td><td>winddirection</td></tr>
  54176. <tr><td>fc?_windspeedKmph</td><td>windspeed in km/h</td></tr>
  54177. <tr><td>fc?_windspeedMiles</td><td>windspeed in miles/h</td></tr>
  54178. <tr><td>humidity</td><td>current humidity in %</td></tr>
  54179. <tr><td>localObsDateTime</td><td>local time of observation</td></tr>
  54180. <tr><td>observation_time</td><td>time of observation</td></tr>
  54181. <tr><td>pressure</td><td>air pressure in hPa</td></tr>
  54182. <tr><td>query</td><td>returns the queried location</td></tr>
  54183. <tr><td>temperature</td><td>current temperature in degrees centigrade</td></tr>
  54184. <tr><td>visibility</td><td>current visibilit in km</td></tr>
  54185. </table>
  54186. </ul>
  54187. <br>
  54188. <a name="Weatherattr"></a>
  54189. <b>Attributes</b>
  54190. <ul>
  54191. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  54192. </ul>
  54193. <br>
  54194. </ul>
  54195. <a name="WaterCalculator"></a>
  54196. <h3>WaterCalculator</h3>
  54197. <ul>
  54198. <table>
  54199. <tr>
  54200. <td>
  54201. The WaterCalculator Module calculates the water consumption and costs of one or more water meters.<BR>
  54202. It is not a counter module itself but it requires a regular expression (regex or regexp) in order to know where to retrieve the counting ticks of one or more mechanical or electronic water meter.<BR>
  54203. <BR>
  54204. <BR>
  54205. <FONT COLOR="#FF0000">The function of the sub-counter for garden water has not been implemented yet. Therefore the sewage water cost needs to be taken into account.</FONT>
  54206. <BR>
  54207. As soon the module has been defined within the fhem.cfg, the module reacts on every event of the specified counter like myOWDEVICE:counter.* etc.<BR>
  54208. <BR>
  54209. The WaterCalculator module provides several current, historical, statistical values around with respect to one or more water meter and creates respective readings.<BR>
  54210. <BR>
  54211. To avoid waiting for max. 12 months to have realistic values, the readings <BR>
  54212. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterDay1st</code>,<BR>
  54213. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMonth1st</code>,<BR>
  54214. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterYear1st</code> and<BR>
  54215. <code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMeter1st</code><BR>
  54216. must be corrected with real values by using the <code>setreading</code> - command.<BR>
  54217. These real values may be found on the last water bill. Otherwise it will take 24h for the daily, 30days for the monthly and up to 12 month for the yearly values to become realistic.<BR>
  54218. <BR>
  54219. Intervalls smaller than 10s will be discarded to avoid peaks due to fhem blockages (e.g. DbLog - reducelog).
  54220. <BR>
  54221. </td>
  54222. </tr>
  54223. </table>
  54224. <table><tr><td><a name="WaterCalculatorDefine"></a><b>Define</b></td></tr></table>
  54225. <table><tr><td><ul><code>define &lt;name&gt; WaterCalculator &lt;regex&gt;</code></ul></td></tr></table>
  54226. <ul><ul>
  54227. <table>
  54228. <tr><td><code>&lt;name&gt;</code> : </td><td>The name of the calculation device. (E.g.: "myWaterCalculator")</td></tr>
  54229. <tr><td><code>&lt;regex&gt;</code> : </td><td>A valid regular expression (also known as regex or regexp) of the event where the counter can be found</td></tr>
  54230. </table>
  54231. </ul></ul>
  54232. <table><tr><td><ul>Example: <code>define myWaterCalculator WaterCalculator myWaterCounter:countersA.*</code></ul></td></tr></table>
  54233. <BR>
  54234. <table>
  54235. <tr><td><a name="WaterCalculatorSet"></a><b>Set</b></td></tr>
  54236. <tr><td>
  54237. <ul>
  54238. The set - function sets individual values for example to correct values after power loss etc.<BR>
  54239. The set - function works only for readings which have been stored in the CalculatorDevice.<BR>
  54240. The Readings being stored in the Counter - Device need to be changed individially with the <code>set</code> - command.<BR>
  54241. </ul>
  54242. </td></tr>
  54243. </table>
  54244. <BR>
  54245. <table>
  54246. <tr><td><a name="WaterCalculatorGet"></a><b>Get</b></td></tr>
  54247. <tr><td>
  54248. <ul>
  54249. The get - function just returns the individual value of the reading.<BR>
  54250. The get - function works only for readings which have been stored in the CalculatorDevice.<BR>
  54251. The Readings being stored in the Counter - Device need to be read individially with <code>get</code> - command.<BR>
  54252. </ul>
  54253. </td></tr>
  54254. </table>
  54255. <BR>
  54256. <table>
  54257. <tr><td><a name="WaterCalculatorAttr"></a><b>Attributes</b></td></tr>
  54258. <tr><td>
  54259. <ul>
  54260. If the below mentioned attributes have not been pre-defined completly beforehand, the program will create the WaterCalculator specific attributes with default values.<BR>
  54261. In addition the global attributes e.g. <a href="#room">room</a> can be used.<BR>
  54262. </ul>
  54263. </td></tr>
  54264. </table>
  54265. <ul><ul>
  54266. <table>
  54267. <tr>
  54268. <td>
  54269. <tr><td><li><code>BasicPricePerAnnum</code> : </li></td><td> A valid float number for basic annual fee in the chosen currency for the water supply to the home.<BR>
  54270. The value is provided by your local water supplier and is shown on your water bill.<BR>
  54271. For UK and US users it may known under "standing charge". Please make sure it is based on one year!<BR>
  54272. The default value is 0.00<BR>
  54273. </td></tr>
  54274. </td>
  54275. </tr>
  54276. </table>
  54277. </ul></ul>
  54278. <ul><ul>
  54279. <table>
  54280. <tr>
  54281. <td>
  54282. <tr><td><li><code>Currency</code> : </li></td><td> One of the pre-defined list of currency symbols [&#8364;,&#163;,&#36;].<BR>
  54283. The default value is &#8364;<BR>
  54284. </td></tr>
  54285. </td>
  54286. </tr>
  54287. </table>
  54288. </ul></ul>
  54289. <ul><ul>
  54290. <table>
  54291. <tr>
  54292. <td>
  54293. <tr><td><li><code>disable</code> : </li></td><td> Disables the current module. The module will not react on any events described in the regular expression.<BR>
  54294. The default value is 0 = enabled.<BR>
  54295. </td></tr>
  54296. </td>
  54297. </tr>
  54298. </table>
  54299. </ul></ul>
  54300. <ul><ul>
  54301. <table>
  54302. <tr>
  54303. <td>
  54304. <tr><td><li><code>WaterCounterOffset</code> : </li></td><td> A valid float number of the water Consumption difference = offset (not the difference of the counter ticks!) between the value shown on the mechanic meter for the water consumption and the calculated water consumption of the counting device.<BR>
  54305. The value for this offset will be calculated as follows W<sub>Offset</sub> = W<sub>Mechanical</sub> - W<sub>Module</sub><BR>
  54306. The default value is 0.00<BR>
  54307. </td></tr>
  54308. </td>
  54309. </tr>
  54310. </table>
  54311. </ul></ul>
  54312. <ul><ul>
  54313. <table>
  54314. <tr>
  54315. <td>
  54316. <tr><td><li><code>WaterCubicPerCounts</code> : </li></td><td> A valid float number of water consumption in qm per counting ticks.<BR>
  54317. The value is given by the mechanical trigger of the mechanical water meter. E.g. WaterCubicPerCounts = 0.001 means each count is a thousandth of one qm (=liter).<BR>
  54318. The default value is 1 (= the counter is already providing qm)<BR>
  54319. </td></tr>
  54320. </td>
  54321. </tr>
  54322. </table>
  54323. </ul></ul>
  54324. <ul><ul>
  54325. <table>
  54326. <tr>
  54327. <td>
  54328. <tr><td><li><code>WaterPricePerCubic</code> : </li></td><td> A valid float number for water Consumption price in the chosen currency per qm.<BR>
  54329. <FONT COLOR="#FF0000">The sewage water cost needs to be taken into account.</FONT>
  54330. The value is provided by your local water supplier and is shown on your water bill.<BR>
  54331. The default value is 2.00<BR>
  54332. </td></tr>
  54333. </td>
  54334. </tr>
  54335. </table>
  54336. </ul></ul>
  54337. <ul><ul>
  54338. <table>
  54339. <tr>
  54340. <td>
  54341. <tr><td><li><code>MonthlyPayment</code> : </li></td><td> A valid float number for monthly advance payments in the chosen currency towards the water supplier.<BR>
  54342. The default value is 0.00<BR>
  54343. </td></tr>
  54344. </td>
  54345. </tr>
  54346. </table>
  54347. </ul></ul>
  54348. <ul><ul>
  54349. <table>
  54350. <tr>
  54351. <td>
  54352. <tr><td><li><code>MonthOfAnnualReading</code> : </li></td><td> A valid integer number for the month when the mechanical water meter reading is performed every year.<BR>
  54353. The default value is 5 (May)<BR>
  54354. </td></tr>
  54355. </td>
  54356. </tr>
  54357. </table>
  54358. </ul></ul>
  54359. <ul><ul>
  54360. <table>
  54361. <tr>
  54362. <td>
  54363. <tr><td><li><code>ReadingDestination</code> : </li></td><td> One of the pre-defined list for the destination of the calculated readings: [CalculatorDevice,CounterDevice].<BR>
  54364. The CalculatorDevice is the device which has been created with this module.<BR>
  54365. The CounterDevice is the Device which is reading the mechanical Water-meter.<BR>
  54366. The default value is CalculatorDevice - Therefore the readings will be written into this device.<BR>
  54367. </td></tr>
  54368. </td>
  54369. </tr>
  54370. </table>
  54371. </ul></ul>
  54372. <ul><ul>
  54373. <table>
  54374. <tr>
  54375. <td>
  54376. <tr><td><li><code>WFRUnit</code> : </li></td><td> One value of the pre-defined list: l/min (liter/minute), m&sup3;/min (cubicmeter/minute), m&sup3;/h (cubicmeter/hour).<BR>
  54377. It defines which unit shall be used and devides the water flow rate accordingly.<BR>
  54378. The default value is l/min (liter/minute).<BR>
  54379. </td></tr>
  54380. </td>
  54381. </tr>
  54382. </table>
  54383. </ul></ul>
  54384. <BR>
  54385. <table>
  54386. <tr><td><a name="WaterCalculatorReadings"></a><b>Readings</b></td></tr>
  54387. <tr><td>
  54388. <ul>
  54389. As soon the device has been able to read at least 2 times the counter, it automatically will create a set of readings:<BR>
  54390. The placeholder <code>&lt;DestinationDevice&gt;</code> is the device which has been chosen in the attribute <code>ReadingDestination</code> above. <BR> This will not appear if CalculatorDevice has been chosen.<BR>
  54391. The placeholder <code>&lt;SourceCounterReading&gt;</code> is the reading based on the defined regular expression where the counting ticks are coming from.<BR>
  54392. </ul>
  54393. </td></tr>
  54394. </table>
  54395. <ul><ul>
  54396. <table>
  54397. <tr>
  54398. <td>
  54399. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterCurrent</code> : </li></td><td>Current indicated total water consumption as shown on mechanical water meter. Correct Offset-attribute if not identical.<BR>
  54400. </td></tr>
  54401. </td>
  54402. </tr>
  54403. </table>
  54404. </ul></ul>
  54405. <ul><ul>
  54406. <table>
  54407. <tr>
  54408. <td>
  54409. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterDay1st</code> : </li></td><td>The first meter reading after midnight.<BR>
  54410. </td></tr>
  54411. </td>
  54412. </tr>
  54413. </table>
  54414. </ul></ul>
  54415. <ul><ul>
  54416. <table>
  54417. <tr>
  54418. <td>
  54419. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterDayLast</code> : </li></td><td>The last meter reading of the previous day.<BR>
  54420. </td></tr>
  54421. </td>
  54422. </tr>
  54423. </table>
  54424. </ul></ul>
  54425. <ul><ul>
  54426. <table>
  54427. <tr>
  54428. <td>
  54429. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMonth1st</code> : </li></td><td>The first meter reading after midnight of the first day of the month.<BR>
  54430. </td></tr>
  54431. </td>
  54432. </tr>
  54433. </table>
  54434. </ul></ul>
  54435. <ul><ul>
  54436. <table>
  54437. <tr>
  54438. <td>
  54439. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMonthLast</code> : </li></td><td>The last meter reading of the previous month.<BR>
  54440. </td></tr>
  54441. </td>
  54442. </tr>
  54443. </table>
  54444. </ul></ul>
  54445. <ul><ul>
  54446. <table>
  54447. <tr>
  54448. <td>
  54449. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMeter1st</code> : </li></td><td>The first meter reading after midnight of the first day of the month where the mechanical meter is read by the Water supplier.<BR>
  54450. </td></tr>
  54451. </td>
  54452. </tr>
  54453. </table>
  54454. </ul></ul>
  54455. <ul><ul>
  54456. <table>
  54457. <tr>
  54458. <td>
  54459. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterMeterLast</code> : </li></td><td>The last meter reading of the previous meter reading year.<BR>
  54460. </td></tr>
  54461. </td>
  54462. </tr>
  54463. </table>
  54464. </ul></ul>
  54465. <ul><ul>
  54466. <table>
  54467. <tr>
  54468. <td>
  54469. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterYear1st</code> : </li></td><td>The first meter reading after midnight of the first day of the year.<BR>
  54470. </td></tr>
  54471. </td>
  54472. </tr>
  54473. </table>
  54474. </ul></ul>
  54475. <ul><ul>
  54476. <table>
  54477. <tr>
  54478. <td>
  54479. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_CounterYearLast</code> : </li></td><td>The last meter reading of the previous year.<BR>
  54480. </td></tr>
  54481. </td>
  54482. </tr>
  54483. </table>
  54484. </ul></ul>
  54485. <ul><ul>
  54486. <table>
  54487. <tr>
  54488. <td>
  54489. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostDayLast</code> : </li></td><td>Consumption costs of the last day.<BR>
  54490. </td></tr>
  54491. </td>
  54492. </tr>
  54493. </table>
  54494. </ul></ul>
  54495. <ul><ul>
  54496. <table>
  54497. <tr>
  54498. <td>
  54499. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostMeterLast</code> : </li></td><td>Consumption costs in the chosen currency of the last water meter period.<BR>
  54500. </td></tr>
  54501. </td>
  54502. </tr>
  54503. </table>
  54504. </ul></ul>
  54505. <ul><ul>
  54506. <table>
  54507. <tr>
  54508. <td>
  54509. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostMonthLast</code> : </li></td><td>Consumption costs in the chosen currency of the last month.<BR>
  54510. </td></tr>
  54511. </td>
  54512. </tr>
  54513. </table>
  54514. </ul></ul>
  54515. <ul><ul>
  54516. <table>
  54517. <tr>
  54518. <td>
  54519. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostYearLast</code> : </li></td><td>Consumption costs of the last calendar year.<BR>
  54520. </td></tr>
  54521. </td>
  54522. </tr>
  54523. </table>
  54524. </ul></ul>
  54525. <ul><ul>
  54526. <table>
  54527. <tr>
  54528. <td>
  54529. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostDay</code> : </li></td><td>Consumption costs in the chosen currency since the beginning of the current day.<BR>
  54530. </td></tr>
  54531. </td>
  54532. </tr>
  54533. </table>
  54534. </ul></ul>
  54535. <ul><ul>
  54536. <table>
  54537. <tr>
  54538. <td>
  54539. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostMeter</code> : </li></td><td>Consumption costs in the chosen currency since the beginning of the month of where the last water meter reading has been performed by the Water supplier.<BR>
  54540. </td></tr>
  54541. </td>
  54542. </tr>
  54543. </table>
  54544. </ul></ul>
  54545. <ul><ul>
  54546. <table>
  54547. <tr>
  54548. <td>
  54549. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostMonth</code> : </li></td><td>Consumption costs in the chosen currency since the beginning of the current month.<BR>
  54550. </td></tr>
  54551. </td>
  54552. </tr>
  54553. </table>
  54554. </ul></ul>
  54555. <ul><ul>
  54556. <table>
  54557. <tr>
  54558. <td>
  54559. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionCostYear</code> : </li></td><td>Consumption costs in the chosen currency since the beginning of the current year.<BR>
  54560. </td></tr>
  54561. </td>
  54562. </tr>
  54563. </table>
  54564. </ul></ul>
  54565. <ul><ul>
  54566. <table>
  54567. <tr>
  54568. <td>
  54569. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionDay</code> : </li></td><td>Consumption in qm since the beginning of the current day (midnight).<BR>
  54570. </td></tr>
  54571. </td>
  54572. </tr>
  54573. </table>
  54574. </ul></ul>
  54575. <ul><ul>
  54576. <table>
  54577. <tr>
  54578. <td>
  54579. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionDayLast</code> : </li></td><td>Total Consumption in qm of the last day.<BR>
  54580. </td></tr>
  54581. </td>
  54582. </tr>
  54583. </table>
  54584. </ul></ul>
  54585. <ul><ul>
  54586. <table>
  54587. <tr>
  54588. <td>
  54589. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionMeter</code> : </li></td><td>Consumption in qm since the beginning of the month of where the last Water-meter reading has been performed by the Water supplier.<BR>
  54590. </td></tr>
  54591. </td>
  54592. </tr>
  54593. </table>
  54594. </ul></ul>
  54595. <ul><ul>
  54596. <table>
  54597. <tr>
  54598. <td>
  54599. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionMeterLast</code> : </li></td><td>Total Consumption in qm of the last Water-meter reading period.<BR>
  54600. </td></tr>
  54601. </td>
  54602. </tr>
  54603. </table>
  54604. </ul></ul>
  54605. <ul><ul>
  54606. <table>
  54607. <tr>
  54608. <td>
  54609. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionMonth</code> : </li></td><td>Consumption in qm since the beginning of the current month (midnight of the first).<BR>
  54610. </td></tr>
  54611. </td>
  54612. </tr>
  54613. </table>
  54614. </ul></ul>
  54615. <ul><ul>
  54616. <table>
  54617. <tr>
  54618. <td>
  54619. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionMonthLast</code> : </li></td><td>Total Consumption in qm of the last month.<BR>
  54620. </td></tr>
  54621. </td>
  54622. </tr>
  54623. </table>
  54624. </ul></ul>
  54625. <ul><ul>
  54626. <table>
  54627. <tr>
  54628. <td>
  54629. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionYear</code> : </li></td><td>Consumption in qm since the beginning of the current year (midnight of the first).<BR>
  54630. </td></tr>
  54631. </td>
  54632. </tr>
  54633. </table>
  54634. </ul></ul>
  54635. <ul><ul>
  54636. <table>
  54637. <tr>
  54638. <td>
  54639. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_ConsumptionYearLast</code> : </li></td><td>Total Consumption in qm of the last calendar year.<BR>
  54640. </td></tr>
  54641. </td>
  54642. </tr>
  54643. </table>
  54644. </ul></ul>
  54645. <ul><ul>
  54646. <table>
  54647. <tr>
  54648. <td>
  54649. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_FinanceReserve</code> : </li></td><td>Financial Reserve based on the advanced payments done on the first of every month towards the water supplier. With negative values, an additional payment is to be expected.<BR>
  54650. </td></tr>
  54651. </td>
  54652. </tr>
  54653. </table>
  54654. </ul></ul>
  54655. <ul><ul>
  54656. <table>
  54657. <tr>
  54658. <td>
  54659. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_MonthMeterReading</code> : </li></td><td>Number of month since last meter reading. The month when the reading occured is the first month = 1.<BR>
  54660. </td></tr>
  54661. </td>
  54662. </tr>
  54663. </table>
  54664. </ul></ul>
  54665. <ul><ul>
  54666. <table>
  54667. <tr>
  54668. <td>
  54669. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_WFRCurrent</code> : </li></td><td>Current water flow rate. (water flow rate based on current and previous measurement.)<BR>
  54670. </td></tr>
  54671. </td>
  54672. </tr>
  54673. </table>
  54674. </ul></ul>
  54675. <ul><ul>
  54676. <table>
  54677. <tr>
  54678. <td>
  54679. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_WFRDayAver</code> : </li></td><td>Average water flow rate since midnight.<BR>
  54680. </td></tr>
  54681. </td>
  54682. </tr>
  54683. </table>
  54684. </ul></ul>
  54685. <ul><ul>
  54686. <table>
  54687. <tr>
  54688. <td>
  54689. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_WFRDayMax</code> : </li></td><td>Maximum water flow rate peak since midnight.<BR>
  54690. </td></tr>
  54691. </td>
  54692. </tr>
  54693. </table>
  54694. </ul></ul>
  54695. <ul><ul>
  54696. <table>
  54697. <tr>
  54698. <td>
  54699. <tr><td><li><code>&lt;DestinationDevice&gt;_&lt;SourceCounterReading&gt;_WFRDayMin</code> : </li></td><td>Minimum water flow rate peak since midnight.<BR>
  54700. </td></tr>
  54701. </td>
  54702. </tr>
  54703. </table>
  54704. </ul></ul>
  54705. </ul>
  54706. <a name="Weather"></a>
  54707. <h3>Weather</h3>
  54708. <ul>
  54709. You need the JSON perl module. Use <code>apt-get install libjson-perl</code> on Debian and derivatives.<br><br>
  54710. <a name="Weatherdefine"></a>
  54711. <b>Define</b>
  54712. <ul>
  54713. <code>define &lt;name&gt; Weather &lt;location&gt; [&lt;interval&gt; [&lt;language&gt;]]</code><br>
  54714. <br>
  54715. Defines a virtual device for weather forecasts.<br><br>
  54716. A Weather device periodically gathers current and forecast weather conditions
  54717. from the Yahoo Weather API.<br><br>
  54718. The parameter <code>location</code> is the WOEID (WHERE-ON-EARTH-ID), go to
  54719. <a href="http://weather.yahoo.com">http://weather.yahoo.com</a> to find it out for your location.<br><br>
  54720. The optional parameter <code>interval</code> is the time between subsequent updates
  54721. in seconds. It defaults to 3600 (1 hour).<br><br>
  54722. The optional language parameter may be one of
  54723. <code>de</code>,
  54724. <code>en</code>,
  54725. <code>pl</code>,
  54726. <code>fr</code>,
  54727. <code>nl</code>,
  54728. It determines the natural language in which the forecast information appears.
  54729. It defaults to <code>en</code>. If you want to set the language you also have to set the interval.<br><br>
  54730. Examples:
  54731. <pre>
  54732. define MyWeather Weather 673513
  54733. define Forecast Weather 673513 1800
  54734. </pre>
  54735. The module provides four additional functions <code>WeatherAsHtml</code>, <code>WeatherAsHtmlV</code>, <code>WeatherAsHtmlH</code> and
  54736. <code>WeatherAsHtmlD</code>. The former two functions are identical: they return the HTML code for a
  54737. vertically arranged weather forecast. The third function returns the HTML code for a horizontally arranged weather forecast. The
  54738. latter function dynamically picks the orientation depending on wether a smallscreen style is set (vertical layout) or not (horizontal layout). Each version accepts an additional paramter to limit the numer of icons to display.<br><br>
  54739. Example:
  54740. <pre>
  54741. define MyWeatherWeblink weblink htmlCode { WeatherAsHtmlH("MyWeather") }
  54742. </pre>
  54743. </ul>
  54744. <br>
  54745. <a name="Weatherset"></a>
  54746. <b>Set </b>
  54747. <ul>
  54748. <code>set &lt;name&gt; update</code><br><br>
  54749. Forces the retrieval of the weather data. The next automatic retrieval is scheduled to occur
  54750. <code>interval</code> seconds later.<br><br>
  54751. </ul>
  54752. <br>
  54753. <a name="Weatherget"></a>
  54754. <b>Get</b>
  54755. <ul>
  54756. <code>get &lt;name&gt; &lt;reading&gt;</code><br><br>
  54757. Valid readings and their meaning (? can be one of 1, 2, 3, 4, 5 and stands
  54758. for today, tomorrow, etc.):<br>
  54759. <table>
  54760. <tr><td>city</td><td>name of town returned for location</td></tr>
  54761. <tr><td>code</td><td>current condition code</td></tr>
  54762. <tr><td>condition</td><td>current condition</td></tr>
  54763. <tr><td>current_date_time</td><td>last update of forecast on server</td></tr>
  54764. <tr><td>fc?_code</td><td>forecast condition code</td></tr>
  54765. <tr><td>fc?_condition</td><td>forecast condition</td></tr>
  54766. <tr><td>fc?_day_of_week</td><td>day of week for day +?</td></tr>
  54767. <tr><td>fc?_high_c</td><td>forecasted daily high in degrees centigrade</td></tr>
  54768. <tr><td>fc?_icon</td><td>forecast icon</td></tr>
  54769. <tr><td>fc?_low_c</td><td>forecasted daily low in degrees centigrade</td></tr>
  54770. <tr><td>humidity</td><td>current humidity in %</td></tr>
  54771. <tr><td>icon</td><td>relative path for current icon</td></tr>
  54772. <tr><td>pressure</td><td>air pressure in hPa</td></tr>
  54773. <tr><td>pressure_trend</td><td>air pressure trend (0= steady, 1= rising, 2= falling)</td></tr>
  54774. <tr><td>pressure_trend_txt</td><td>textual representation of air pressure trend</td></tr>
  54775. <tr><td>pressure_trend_sym</td><td>symbolic representation of air pressure trend</td></tr>
  54776. <tr><td>temperature</td><td>current temperature in degrees centigrade</td></tr>
  54777. <tr><td>temp_c</td><td>current temperature in degrees centigrade</td></tr>
  54778. <tr><td>temp_f</td><td>current temperature in degrees Fahrenheit</td></tr>
  54779. <tr><td>visibility</td><td>visibility in km</td></tr>
  54780. <tr><td>wind</td><td>wind speed in km/h</td></tr>
  54781. <tr><td>wind_chill</td><td>wind chill in degrees centigrade</td></tr>
  54782. <tr><td>wind_condition</td><td>wind direction and speed</td></tr>
  54783. <tr><td>wind_direction</td><td>direction wind comes from in degrees (0 = north wind)</td></tr>
  54784. <tr><td>wind_speed</td><td>same as wind</td></tr>
  54785. </table>
  54786. <br>
  54787. The following readings help to identify whether a workaround has kicked in to avoid the retrieval of
  54788. stale data from the remote server:
  54789. <table>
  54790. <tr><td>pubDate</td><td>publication time of forecast for current set of readings</td></tr>
  54791. <tr><td>pubDateRemote</td><td>publication time of forecast as seen on remote server</td></tr>
  54792. <tr><td>validity</td><td>stale, if publication time as seen on remote server is before that of current set of readings</td></tr>
  54793. </table>
  54794. </ul>
  54795. <br>
  54796. <a name="Weatherattr"></a>
  54797. <b>Attributes</b>
  54798. <ul>
  54799. <li>disable: disables the retrieval of weather data - the timer runs according to schedule,
  54800. though no data is requested from the API.</li>
  54801. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  54802. </ul>
  54803. <br>
  54804. </ul>
  54805. <a name="WeekdayTimer"></a>
  54806. <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  54807. <h3>WeekdayTimer</h3>
  54808. <ul>
  54809. <br>
  54810. <a name="weekdayTimer_define"></a>
  54811. <b>Define</b>
  54812. <ul>
  54813. <code>define &lt;name&gt; WeekdayTimer &lt;device&gt; [&lt;language&gt;] [<u>weekdays</u>] &lt;profile&gt; &lt;command&gt;|&lt;condition&gt;</code>
  54814. <br><br>
  54815. to set a weekly profile for &lt;device&gt;<br><br>
  54816. You can define different switchingtimes for every day.<br>
  54817. The new parameter is sent to the &lt;device&gt; automatically with <br><br>
  54818. <code>set &lt;device&gt; &lt;para&gt;</code><br><br>
  54819. If you have defined a &lt;condition&gt; and this condition is false if the switchingtime has reached, no command will executed.<br>
  54820. An other case is to define an own perl command with &lt;command&gt;.
  54821. <p>
  54822. The following parameter are defined:
  54823. <ul><b>device</b><br>
  54824. The device to switch at the given time.
  54825. </ul>
  54826. <p>
  54827. <ul><b>language</b><br>
  54828. Specifies the language used for definition and profiles.
  54829. de,en,fr are possible. The parameter is optional.
  54830. </ul>
  54831. <p>
  54832. <ul><b>weekdays</b><br>
  54833. Specifies the days for all timer in the <b>WeekdayTimer</b>.
  54834. The parameter is optional. For details see the weekdays part in profile.
  54835. </ul>
  54836. <p>
  54837. <ul><b>profile</b><br>
  54838. Define the weekly profile. All timings are separated by space. A switchingtime is defined
  54839. by the following example: <br><br>
  54840. <ul><b>[&lt;weekdays&gt;|]&lt;time&gt;|&lt;parameter&gt;</b></ul><br>
  54841. <u>weekdays:</u> optional, if not set every day of the week is used.<br>
  54842. Otherwise you can define a day with its number or its shortname.<br>
  54843. <ul>
  54844. <li>0,su sunday</li>
  54845. <li>1,mo monday</li>
  54846. <li>2,tu tuesday</li>
  54847. <li>3,we wednesday</li>
  54848. <li>4 ...</li>
  54849. <li>7,$we weekend ($we)</li>
  54850. <li>8,!$we weekday (!$we)</li>
  54851. </ul><br>
  54852. It is possible to define $we or !$we in daylist to easily allow weekend an holiday. $we !$we are coded as 7 8, when using a numeric daylist.<br><br>
  54853. <u>time:</u>define the time to switch, format: HH:MM:[SS](HH in 24 hour format) or a Perlfunction like {sunrise_abs()}. Within the {} you can use the variable $date(epoch) to get the exact switchingtimes of the week. Example: {sunrise_abs_dat($date)}<br><br>
  54854. <u>parameter:</u>the parameter to be set, using any text value like <b>on</b>, <b>off</b>, <b>dim30%</b>, <b>eco</b> or <b>comfort</b> - whatever your device understands.<br>
  54855. </ul>
  54856. <p>
  54857. <ul><b>command</b><br>
  54858. If no condition is set, all the rest is interpreted as a command. Perl-code is setting up
  54859. by the well-known Block with {}.<br>
  54860. Note: if a command is defined only this command is executed. In case of executing
  54861. a "set desired-temp" command, you must define the hole commandpart explicitly by yourself.<br>
  54862. <!----------------------------------------------------------------------------- -->
  54863. <!-- -------------------------------------------------------------------------- -->
  54864. The following parameter are replaced:<br>
  54865. <ol>
  54866. <li>$NAME => the device to switch</li>
  54867. <li>$EVENT => the new temperature</li>
  54868. </ol>
  54869. </ul>
  54870. <p>
  54871. <ul><b>condition</b><br>
  54872. if a condition is defined you must declare this with () and a valid perl-code.<br>
  54873. The return value must be boolean.<br>
  54874. The parameters $NAME and $EVENT will be interpreted.
  54875. </ul>
  54876. <p>
  54877. <b>Examples:</b>
  54878. <ul>
  54879. <code>define shutter WeekdayTimer bath 12345|05:20|up 12345|20:30|down</code><br>
  54880. Mo-Fr are setting the shutter at 05:20 to <b>up</b>, and at 20:30 <b>down</b>.<p>
  54881. <code>define heatingBath WeekdayTimer bath 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|eco
  54882. {fhem("set dummy on"); fhem("set $NAME desired-temp $EVENT");}</code><br>
  54883. At the given times and weekdays only(!) the command will be executed.<p>
  54884. <code>define dimmer WeekdayTimer livingRoom Sa-Su,We|07:00|dim30% Sa-Su,We|21:00|dim90% (ReadingsVal("WeAreThere", "state", "no") eq "yes")</code><br>
  54885. The dimmer is only set to dimXX% if the dummy variable WeAreThere is "yes"(not a real live example).<p>
  54886. If you want to have set all WeekdayTimer their current value (after a temperature lowering phase holidays)
  54887. you can call the function <b>WeekdayTimer_SetParm("WD-device")</b> or <b>WeekdayTimer_SetAllParms()</b>.<br>
  54888. This call can be automatically coupled to a dummy by a notify:<br>
  54889. <code>define dummyNotify notify Dummy:. * {WeekdayTimer_SetAllTemps()}</code>
  54890. <br><p>
  54891. Some definitions without comment:
  54892. <code>
  54893. <pre>
  54894. define wd Weekdaytimer device de 7|23:35|25 34|23:30|22 23:30|16 23:15|22 8|23:45|16
  54895. define wd Weekdaytimer device de fr,$we|23:35|25 34|23:30|22 23:30|16 23:15|22 12|23:45|16
  54896. define wd Weekdaytimer device de 20:35|25 34|14:30|22 21:30|16 21:15|22 12|23:00|16
  54897. define wd Weekdaytimer device de mo-so, $we|{sunrise_abs_dat($date)}|on mo-so, $we|{sunset_abs_dat($date)}|off
  54898. define wd Weekdaytimer device de mo-so,!$we|{sunrise_abs_dat($date)}|aus mo-so,!$we|{sunset_abs_dat($date)}|aus
  54899. define wd Weekdaytimer device de {sunrise_abs_dat($date)}|19 {sunset_abs_dat($date)}|21
  54900. define wd Weekdaytimer device de 22:35|25 23:00|16
  54901. </code></pre>
  54902. The daylist can be given globaly for the whole Weekdaytimer:<p>
  54903. <code><pre>
  54904. define wd Weekdaytimer device de !$we 09:00|19 (function("Ein"))
  54905. define wd Weekdaytimer device de $we 09:00|19 (function("Ein"))
  54906. define wd Weekdaytimer device de 78 09:00|19 (function("exit"))
  54907. define wd Weekdaytimer device de 57 09:00|19 (function("exit"))
  54908. define wd Weekdaytimer device de fr,$we 09:00|19 (function("exit"))
  54909. </code></pre>
  54910. </ul>
  54911. </ul>
  54912. <a name="WeekdayTimerset"></a>
  54913. <b>Set</b>
  54914. <code><b><font size="+1">set &lt;name&gt; &lt;value&gt;</font></b></code>
  54915. <br><br>
  54916. where <code>value</code> is one of:<br>
  54917. <pre>
  54918. <b>disable</b> # disables the Weekday_Timer
  54919. <b>enable</b> # enables the Weekday_Timer
  54920. </pre>
  54921. <b><font size="+1">Examples</font></b>:
  54922. <ul>
  54923. <code>set wd disable</code><br>
  54924. <code>set wd enable</code><br>
  54925. </ul>
  54926. </ul>
  54927. <a name="WeekdayTimerget"></a>
  54928. <b>Get</b> <ul>N/A</ul><br>
  54929. <a name="WeekdayTimerLogattr"></a>
  54930. <b>Attributes</b>
  54931. <ul>
  54932. <li>delayedExecutionCond <br>
  54933. defines a delay Function. When returning true, the switching of the device is delayed until the function retruns a false value. The behavior is just like a windowsensor in Heating_Control.
  54934. <br><br>
  54935. <b>Example:</b>
  54936. <pre>
  54937. attr wd delayedExecutionCond isDelayed("$HEATING_CONTROL","$WEEKDAYTIMER","$TIME","$NAME","$EVENT")
  54938. </pre>
  54939. the parameter $WEEKDAYTIMER(timer name) $TIME $NAME(device name) $EVENT are replaced at runtime by the correct value.
  54940. <br><br>
  54941. <b>Example of a function:</b>
  54942. <pre>
  54943. sub isDelayed($$$$$) {
  54944. my($hc, $wdt, $tim, $nam, $event ) = @_;
  54945. my $theSunIsStillshining = ...
  54946. return ($tim eq "16:30" && $theSunIsStillshining) ;
  54947. }
  54948. </pre>
  54949. </li>
  54950. <li>switchInThePast<br>
  54951. defines that the depending device will be switched in the past in definition and startup phase when the device is not recognized as a heating.
  54952. Heatings are always switched in the past.
  54953. </li>
  54954. <li><a href="#disable">disable</a></li>
  54955. <li><a href="#loglevel">loglevel</a></li>
  54956. <li><a href="#event-on-update-reading">event-on-update-reading</a></li>
  54957. <li><a href="#event-on-change-reading">event-on-change-reading</a></li>
  54958. <li><a href="#stateFormat">stateFormat</a></li>
  54959. </ul><br>
  54960. <a name="WifiLight"></a>
  54961. <h3>WifiLight</h3>
  54962. <ul>
  54963. <p>The module controls a large number of different "no name" LED types and provide a consistent interface.</p>
  54964. <p>Following types will be supported:</p>
  54965. <!-- <table rules="all" cellpadding="6" style="border:solid 1px;"> -->
  54966. <table>
  54967. <thead align="left">
  54968. <tr>
  54969. <th>
  54970. type / bridge
  54971. </th>
  54972. <th>
  54973. type
  54974. </th>
  54975. <th>
  54976. note
  54977. </th>
  54978. <th>
  54979. define signature
  54980. </th>
  54981. </tr>
  54982. </thead>
  54983. <tbody>
  54984. <tr>
  54985. <td>
  54986. Milight RGB first generation
  54987. </td>
  54988. <td>
  54989. E27, stripe controller
  54990. </td>
  54991. <td>
  54992. *(1,2,a,C)
  54993. </td>
  54994. <td>
  54995. RGB bridge-V2|3
  54996. </td>
  54997. </tr>
  54998. <tr>
  54999. <td>
  55000. Milight RGBW1 first generation
  55001. </td>
  55002. <td>
  55003. RGBW stripe controller
  55004. </td>
  55005. <td>
  55006. *(1,2,a)
  55007. </td>
  55008. <td>
  55009. RGBW1 bridge-V2|3
  55010. </td>
  55011. </tr>
  55012. <tr>
  55013. <td>
  55014. Milight Dual White
  55015. </td>
  55016. <td>
  55017. E14, E27, GU10, stripe controller, Downlight
  55018. </td>
  55019. <td>
  55020. *(1,2,b,W,nK)
  55021. </td>
  55022. <td>
  55023. White bridge-V2|3
  55024. </td>
  55025. </tr>
  55026. <tr>
  55027. <td>
  55028. Milight RGBW2 second generation
  55029. </td>
  55030. <td>
  55031. E14, E27, GU10, stripe controller, Downlight
  55032. </td>
  55033. <td>
  55034. *(2,b,CW,S20)
  55035. </td>
  55036. <td>
  55037. RGBW2 bridge-V3
  55038. </td>
  55039. </tr>
  55040. <tr>
  55041. <td>
  55042. LW12 first generation (SSID LEDNet...)
  55043. </td>
  55044. <td>
  55045. RGB stripe controller
  55046. </td>
  55047. <td>
  55048. &nbsp;
  55049. </td>
  55050. <td>
  55051. RGB LW12
  55052. </td>
  55053. </tr>
  55054. <tr>
  55055. <td>
  55056. LW12HX (SSID HX...)
  55057. </td>
  55058. <td>
  55059. RGB stripe controller
  55060. </td>
  55061. <td>
  55062. &nbsp;
  55063. </td>
  55064. <td>
  55065. RGB LW12HX
  55066. </td>
  55067. </tr>
  55068. <tr>
  55069. <td>
  55070. LW12FC (SSID FC...)
  55071. </td>
  55072. <td>
  55073. RGB stripe controller
  55074. </td>
  55075. <td>
  55076. &nbsp;
  55077. </td>
  55078. <td>
  55079. RGB LW12FC
  55080. </td>
  55081. </tr>
  55082. <tr>
  55083. <td>
  55084. LD316 in RGB mode
  55085. </td>
  55086. <td>
  55087. E27
  55088. </td>
  55089. <td>
  55090. &nbsp;
  55091. </td>
  55092. <td>
  55093. RGB LD316
  55094. </td>
  55095. </tr>
  55096. <tr>
  55097. <td>
  55098. LD316 in RGBW mode
  55099. </td>
  55100. <td>
  55101. E27
  55102. </td>
  55103. <td>
  55104. *(S20)
  55105. </td>
  55106. <td>
  55107. RGBW LD316
  55108. </td>
  55109. </tr>
  55110. <tr>
  55111. <td>
  55112. LD316A in RGBW mode
  55113. </td>
  55114. <td>
  55115. E27
  55116. </td>
  55117. <td>
  55118. *(S20)
  55119. </td>
  55120. <td>
  55121. RGBW LD316A
  55122. </td>
  55123. </tr>
  55124. <tr>
  55125. <td>
  55126. LD382 in RGB mode
  55127. </td>
  55128. <td>
  55129. RGB stripe controller
  55130. </td>
  55131. <td>
  55132. &nbsp;
  55133. </td>
  55134. <td>
  55135. RGB LD382
  55136. </td>
  55137. </tr>
  55138. <tr>
  55139. <td>
  55140. LD382 in RGBW mode
  55141. </td>
  55142. <td>
  55143. RGBW stripe controller
  55144. </td>
  55145. <td>
  55146. &nbsp;
  55147. </td>
  55148. <td>
  55149. RGBW LD382
  55150. </td>
  55151. </tr>
  55152. <tr>
  55153. <td>
  55154. LD382A (FW 1.0.6+) in RGB mode
  55155. </td>
  55156. <td>
  55157. RGB stripe controller
  55158. </td>
  55159. <td>
  55160. &nbsp;
  55161. </td>
  55162. <td>
  55163. RGB LD382
  55164. </td>
  55165. </tr>
  55166. <tr>
  55167. <td>
  55168. LD382A (FW 1.0.6+) in RGBW mode
  55169. </td>
  55170. <td>
  55171. RGBW stripe controller
  55172. </td>
  55173. <td>
  55174. &nbsp;
  55175. </td>
  55176. <td>
  55177. RGBW LD382
  55178. </td>
  55179. </tr>
  55180. <tr>
  55181. <td>
  55182. SENGLED
  55183. </td>
  55184. <td>
  55185. E27 bulb with build-in WLAN repeater
  55186. </td>
  55187. <td>
  55188. &nbsp;
  55189. </td>
  55190. <td>
  55191. White Sengled
  55192. </td>
  55193. </tr>
  55194. <tr>
  55195. <td>
  55196. SUNRICHER with RGBW
  55197. </td>
  55198. <td>
  55199. Controller
  55200. </td>
  55201. <td>
  55202. *(!!!)
  55203. </td>
  55204. <td>
  55205. RGBW Sunricher
  55206. </td>
  55207. </tr>
  55208. </tbody>
  55209. </table>
  55210. <p>
  55211. <small>
  55212. (1) milght brigbe V2, V3, V4<br />
  55213. (2) milight bridge V3, V4<br />
  55214. (a) one group per bridge<br />
  55215. (b) four independent group per bridge<br />
  55216. (nK) no color temp support (Kelvin)<br />
  55217. (C) pure color<br />
  55218. (W) pure white<br />
  55219. (CW) pure Color or pure white<br />
  55220. (S20) Saturation &lt;20: switch to pure white channel<br />
  55221. (!!!) EXPERIMENTAL<br />
  55222. </p>
  55223. </small>
  55224. <p>
  55225. <table>
  55226. <tr>
  55227. <td>
  55228. <p><b>Color</b></p>
  55229. <p>Colors can be specified in RGB or HSV color space.</p>
  55230. <p>Color in <a name="WifiLight_Farbraum_HSV"><b>color space "HSV"</b></a> are completely and generally more intuitive than RGB.</p>
  55231. <p><b>H</b> (HUE: 0..360) are the basic color in a color wheel.
  55232. <ul>
  55233. <li>Red is at 0 °</li>
  55234. <li>Green at 120 °</li>
  55235. <li> Blue at 240 °</li>
  55236. </ul>
  55237. </p>
  55238. <p><b>S</b> (Saturation: 0..100) stands for the saturation of the color. A saturation of 100 means the color is "pure" or completely saturated. Blue, for example, with 100% saturation corresponds to RGB # 0000FF.</p>
  55239. <p><b>V</b> (Value: 0..100) indicates the brightness. A value of 50 states that "half brightness".</p>
  55240. </td>
  55241. <td>
  55242. <a name="WifiLight_Farbkreis">
  55243. <svg style="width:450px; height:320px;" viewBox="-100 -30 500 320">
  55244. <linearGradient id="linearColors1" x1="0" y1="0" x2="1" y2="1">
  55245. <stop offset="0%" stop-color="#FF0000"></stop>
  55246. <stop offset="100%" stop-color="#FFFF00"></stop>
  55247. </linearGradient>
  55248. <linearGradient id="linearColors2" x1="0.5" y1="0" x2="0.5" y2="1">
  55249. <stop offset="0%" stop-color="#FFFF00"></stop>
  55250. <stop offset="100%" stop-color="#00FF00"></stop>
  55251. </linearGradient>
  55252. <linearGradient id="linearColors3" x1="1" y1="0" x2="0" y2="1">
  55253. <stop offset="0%" stop-color="#00FF00"></stop>
  55254. <stop offset="100%" stop-color="#00FFFF"></stop>
  55255. </linearGradient>
  55256. <linearGradient id="linearColors4" x1="1" y1="1" x2="0" y2="0">
  55257. <stop offset="0%" stop-color="#00FFFF"></stop>
  55258. <stop offset="100%" stop-color="#0000FF"></stop>
  55259. </linearGradient>
  55260. <linearGradient id="linearColors5" x1="0.5" y1="1" x2="0.5" y2="0">
  55261. <stop offset="0%" stop-color="#0000FF"></stop>
  55262. <stop offset="100%" stop-color="#FF00FF"></stop>
  55263. </linearGradient>
  55264. <linearGradient id="linearColors6" x1="0" y1="1" x2="1" y2="0">
  55265. <stop offset="0%" stop-color="#FF00FF"></stop>
  55266. <stop offset="100%" stop-color="#FF0000"></stop>
  55267. </linearGradient>
  55268. <linearGradient id="linearColors7" x1="152" y1="130" x2="152" y2="35" gradientUnits="userSpaceOnUse">
  55269. <stop offset="0.2" stop-color="#FFFFFF"></stop>
  55270. <stop offset="1" stop-color="#FF0000"></stop>
  55271. </linearGradient>
  55272. <linearGradient id="linearColors8" x1="152" y1="130" x2="230" y2="190" gradientUnits="userSpaceOnUse">
  55273. <stop offset="0.2" stop-color="#FFFFFF"></stop>
  55274. <stop offset="1" stop-color="#00FF00"></stop>
  55275. </linearGradient>
  55276. <linearGradient id="linearColors9" x1="152" y1="130" x2="70" y2="190" gradientUnits="userSpaceOnUse">
  55277. <stop offset="0.2" stop-color="#FFFFFF"></stop>
  55278. <stop offset="1" stop-color="#0000FF"></stop>
  55279. </linearGradient>
  55280. <marker id="markerArrow" markerWidth="13" markerHeight="13" refX="2" refY="6" orient="auto">
  55281. <path d="M2,2 L2,11 L10,6 L2,2" style="fill:grey;" />
  55282. </marker>
  55283. <path d="M150 10 a120 120 0 0 1 103.9230 60" fill="none" stroke="url(#linearColors1)" stroke-width="20" />
  55284. <path d="M253.9230 70 a120 120 0 0 1 0 120" fill="none" stroke="url(#linearColors2)" stroke-width="20" />
  55285. <path d="M253.9230 190 a120 120 0 0 1 -103.9230 60" fill="none" stroke="url(#linearColors3)" stroke-width="20" />
  55286. <path d="M150 250 a120 120 0 0 1 -103.9230 -60" fill="none" stroke="url(#linearColors4)" stroke-width="20" />
  55287. <path d="M46.077 190 a120 120 0 0 1 0 -120" fill="none" stroke="url(#linearColors5)" stroke-width="20" />
  55288. <path d="M46.077 70 a120 120 0 0 1 103.9230 -60" fill="none" stroke="url(#linearColors6)" stroke-width="20" />
  55289. <path d="M150,50 C250,50 250,180 180,200" fill="none" stroke="grey" stroke-width="2" marker-end="url(#markerArrow)" />
  55290. <text class="Label" x="126" y="208">HUE</text>
  55291. <line x1="152" y1="130" x2="152" y2="35" stroke="url(#linearColors7)" stroke-width="4" />
  55292. <line x1="136" y1="120" x2="136" y2="45" stroke="grey" stroke-width="2" marker-end="url(#markerArrow)" />
  55293. <text class="Label" x="96" y="96">SAT</text>
  55294. <line x1="152" y1="130" x2="230" y2="190" stroke="url(#linearColors8)" stroke-width="4" />
  55295. <line x1="152" y1="130" x2="70" y2="190" stroke="url(#linearColors9)" stroke-width="4" />
  55296. <text x="120" y="-10">0° (Red)</text>
  55297. <text x="270" y="60">60° (Yellow)</text>
  55298. <text x="270" y="220">120° (Green)</text>
  55299. <text x="110" y="285">180° (Cyan)</text>
  55300. <text x="-60" y="220">240° (Blue)</text>
  55301. <text x="-90" y="60">300° (Magenta)</text>
  55302. </svg>
  55303. </a>
  55304. </td>
  55305. </tr>
  55306. </table>
  55307. </p>
  55308. <p>
  55309. <b>Color: HSV compared to RGB</b>
  55310. <p>
  55311. Normally, a color may be expressed in the HSV color space as well as in RGB color space.
  55312. <p>
  55313. Colors in the HSV color space usually seem more understandable.
  55314. To move a Green in the HSV color space a little more toward CYAN, simply increase the HUE value (angle) slightly.
  55315. In RGB color space, the same task is less intuitive to achieve by increasing blue.
  55316. <p>
  55317. Differences become clear in Transitions however.
  55318. In order to dim BLUE up the HSV Transitions 240,100,0 -> 240,100,100 would be used.
  55319. To slowly dim RED (brightness 0) to BLUE the Transition in the HSV color space is 0,100,0 -> 240,100,100.
  55320. In RGB color space (# 000000 -> # 0000FF) can not distinguish between the two versions.
  55321. Here (correctly, but probably differently than intended) would appear in both cases, a white (brightness 0) as an initial value.
  55322. </p>
  55323. <p><b>Define</b></p>
  55324. <ul>
  55325. <li>
  55326. <p><code>define &lt;name&gt; WifiLight &lt;LED type&gt; &lt;bridgetype&gt;:&lt;IP|FQDN&gt;</code></p>
  55327. <p>
  55328. <i><u>example</u></i>
  55329. <ul>
  55330. <p>
  55331. <i>defines a milight RGBW2 (bulb or LED stripe controller) on a milight bridge version 3 or 4.
  55332. The LED is allocated to a maximum of 4 groups available per bridge in order of definition:</i>
  55333. <br/>
  55334. <code>define wz.licht.decke WifiLight RGBW2 bridge-V3:192.168.178.142</code>
  55335. </ul>
  55336. <ul>
  55337. <p>
  55338. <i>defines a LD382A Controller with RGBW stripe:</i>
  55339. <br/>
  55340. <code>define wz.licht.decke WifiLight RGBW LD382A:192.168.178.142</code>
  55341. </ul>
  55342. <ul>
  55343. <p>
  55344. <i>defines a LD382A Controller with RGB stripe:</i>
  55345. <br/>
  55346. <code>define wz.licht.decke WifiLight RGB LD382A:192.168.178.142</code>
  55347. </ul>
  55348. <p>WifiLight has a <a href="#WifiLight_Farbkalibrierung">"color calibration"</a>. Ideally, a calibration should be performed every time after a lamp change or after definition.</p>
  55349. </ul>
  55350. </li>
  55351. <p><b>Set</b></p>
  55352. <ul>
  55353. <li>
  55354. <p><code>set &lt;name&gt; <b>on</b> [ramp]</code></p>
  55355. <p>Turns on the device. It is either chosen 100% White or the color defined by the attribute "default color".
  55356. <p>Advanced options:
  55357. <ul>
  55358. <li>ramp</li>
  55359. </ul>
  55360. </p>
  55361. </li>
  55362. <li>
  55363. <p><code>set &lt;name&gt; <b>off</b> [ramp]</code></p>
  55364. <p>Turns of the device.
  55365. <p>Advanced options:
  55366. <ul>
  55367. <li>ramp</li>
  55368. </ul>
  55369. </p>
  55370. </li>
  55371. <li>
  55372. <p><code>set &lt;name&gt; <b>dimup</b></code></p>
  55373. <p>Increases the brightness by a fixed amount. The attribute "dimStep" or the default "7" is applied.<br />
  55374. This command is useful to increase particularly the brightness by a wall switch or a remote control.
  55375. <p>Advanced options:
  55376. <ul>
  55377. <li>none</li>
  55378. </ul>
  55379. </p>
  55380. </li>
  55381. <li>
  55382. <p><code>set &lt;name&gt; <b>dimdown</b></code></p>
  55383. <p>Decreases the brightness by a fixed amount. The attribute "dimStep" or the default "7" is applied.<br />
  55384. This command is useful to reduce particularly the brightness by a wall switch or a remote control.
  55385. <p>Advanced options:
  55386. <ul>
  55387. <li>none</li>
  55388. </ul>
  55389. </p>
  55390. </li>
  55391. <li>
  55392. <p><code>set &lt;name&gt; <b>dim</b> level [ramp] [q]</code></p>
  55393. <p>Sets the brightness to the specified level (0..100).
  55394. This command also maintains the preset color even with "dim 0" (off) and then "dim xx" (turned on) at.
  55395. Therefore, it represents an alternative form to "off" / "on". The latter would always choose the "default color".
  55396. <p>Advanced options:
  55397. <ul>
  55398. <li>ramp</li>
  55399. </ul>
  55400. </p>
  55401. <p>Flags:
  55402. <ul>
  55403. <li>q</li>
  55404. </ul>
  55405. </p>
  55406. </li>
  55407. <li>
  55408. <p><code>set &lt;name&gt; <b>HSV</b> H,S,V [ramp] [s|l|q] [event]</code></p>
  55409. <p>Sets the color in the <a href="#WifiLight_Farbraum_HSV">HSV color space</a>. If the ramp is specified (as a time in seconds), the module calculates a soft color transition from the current color to the newly set.
  55410. <ul><i>For example, sets a saturated blue with half brightness:</i><br /><code>set wz.licht.decke HSV 240,100,50</code></ul>
  55411. <p>Advanced options:
  55412. <ul>
  55413. <li>ramp</li>
  55414. </ul>
  55415. </p>
  55416. <p>Flags:
  55417. <ul>
  55418. <li>s l q event</li>
  55419. </ul>
  55420. </p>
  55421. </li>
  55422. <li>
  55423. <p><code>set &lt;name&gt; <b>RGB</b> RRGGBB [ramp] [l|s|q] [event]</code></p>
  55424. <p>Sets the color in the RGB color space.
  55425. <p>Advanced options:
  55426. <ul>
  55427. <li>ramp</li>
  55428. </ul>
  55429. </p>
  55430. <p>Flags:
  55431. <ul>
  55432. <li>s l q event</li>
  55433. </ul>
  55434. </p>
  55435. </ul>
  55436. </li>
  55437. <p><b>Meaning of Flags</b></p>
  55438. Certain commands (set) can be marked with special flags.
  55439. <p>
  55440. <ul>
  55441. <li>ramp:
  55442. <ul>
  55443. Time in seconds for a soft color or brightness transition. The soft transition starts at the currently visible color and is calculated for the specified.
  55444. </ul>
  55445. </li>
  55446. <li>s:
  55447. <ul>
  55448. (short, default). A smooth transition to another color is carried out in the <a href="#WifiLight_Farbkreis">"color wheel"</a> on the shortest path.
  55449. A transition from red to green lead by the shortest route through yellow.
  55450. </ul>
  55451. </li>
  55452. <li>l:
  55453. <ul>
  55454. (long). A smooth transition to another color is carried out in the <a href="#WifiLight_Farbkreis">"color wheel"</a> on the "long" way.
  55455. A transition from red to green then leads across magenta, blue, and cyan.
  55456. </ul>
  55457. </li>
  55458. <li>q:
  55459. <ul>
  55460. (queue). Commands with this flag are cached in an internal queue and will not run before the currently running soft transitions have been processed.
  55461. Commands without the flag will be processed immediately. In this case all running transitions are stopped immediately and the queue will be cleared.
  55462. </ul>
  55463. </li>
  55464. <li>event:
  55465. <ul>
  55466. designator ([A-Za-z_0-9])
  55467. <p>
  55468. WifiLight creates, when using this flag, during transitions to another color messages (events) in the form:
  55469. <p>
  55470. <code>WifiLight &ltNAME&gt programm: &ltEVENT&gt &ltXX&gt</code>.
  55471. <p>
  55472. &ltEVENT&gt is the designator as specified in the flag.<br/>
  55473. &ltXX&gt is the progress (percentage) of the transition.<br/>
  55474. <p>
  55475. Depending on the total duration of the transition, the values from 0 to 100 will not completely go through but for 0% and 100% is guaranteed always a event.
  55476. To these events can then be reacted within a notify or DOIF to (for example):
  55477. <ul>
  55478. <li>increase the volume of a radio when a lamp is turned on in the morning slowly</li>
  55479. <li>A color transition can be restarted in a notify if it is complete (loop it, even complex transitions)</li>
  55480. <li>Other light sources can be synchronized by individually created color transitions.</li>
  55481. </ul>
  55482. </ul>
  55483. </li>
  55484. </ul>
  55485. <p><b><a name="WifiLight_Farbkalibrierung"></a>color calibration</b></p>
  55486. WifiLight supports two different types of color calibrations:
  55487. <ul>
  55488. <p>
  55489. <b>Correction of saturated colors</b>
  55490. <p>
  55491. background:
  55492. <p>
  55493. YELLOW, for example, is defined as a mixture of red and green light in equal parts.
  55494. Depending on the LED and control used the green channel may be much more luminous.
  55495. If the red and green LEDs are each fully driven, GREEN predominates in this mixture and the desired YELLOW would get a distinct green tint.
  55496. In this example, no yellow would be generated (corresponding to 60 ° in the <a href="#WifiLight_Farbkreis">"color wheel"</a>) for HSV 60,100,100.
  55497. Instead GREEN would be generated with yellow tinge, perhaps corresponding to an estimated color angle of 80 °.
  55498. The required correction for yellow would therefore minus 20° (60° target - 80° result = -20° correction).
  55499. YELLOW may have to be corrected as to -20 °. Possible values per correction point are +/- 29 °.
  55500. <p>
  55501. procedure:
  55502. <p>
  55503. The correction of the full color is controlled by the attribute "color cast".
  55504. Here 6 (comma separated) values are specified in the range from -29 to 29.
  55505. These values are in accordance with the angle correction for red (0 °), yellow (60 °), green (120 °), cyan (180 °), blue (240 °) and magenta (300 °).
  55506. First, the deviation of the mixed colors (60 ° / 180 ° / 300 °) should be determined as in the above example, and stored in the attribute.
  55507. Following the primary colors (0 ° / 120 ° / 240 °) should be corrected so that the smooth transitions between adjacent pure colors appear as linear as possible.
  55508. This process may need to be repeated iteratively multiple times until the result is harmonious.
  55509. <p>
  55510. <b>White Balance</b>
  55511. <p>
  55512. background:
  55513. <p>
  55514. Some bulbs produce white light by mixing the RGB channels (for example, LW12).
  55515. Depending on the light intensity of the RGB channels of the LED strips used, the result is different.
  55516. One or two colors dominate.
  55517. In addition, there are various types of white light.
  55518. Cold light has a higher proportion of blue.
  55519. In Central Europe mostly warm white light is used for light sources.
  55520. This has a high red and low blue component.
  55521. <p>
  55522. WifiLight offers the possibility for mixed RGB white to adapt the composition.
  55523. The adjustment is carried out via the attribute "white point".
  55524. The attribute expects a value between 0 and 1 (decimal point with) and the three colors are separated by a comma for each of the three RGB channels.
  55525. <p>
  55526. procedure:
  55527. <p>
  55528. A value of "1,1,1" sets all the three channels to 100% each.
  55529. Assuming that the blue component of the white light should be reduced, a value of "1,1,0.5" sets the third channel (BLUE) in white on 0.5 according to 50%.
  55530. Before doing a white balance correction the adjusment of the saturated color should be completed.
  55531. </ul>
  55532. <p><b>Attribute</b></p>
  55533. <ul>
  55534. <li>
  55535. <code>attr &ltname&gt <b>colorCast</b> &ltR,Y,G,C,B,M&gt</code>
  55536. <p>
  55537. <a href="#WifiLight_Farbkalibrierung">color calibration</a> of saturated colors.
  55538. R(ed), Y(ellow), G(reen), C(yan), B(lue), M(agenta) in the range of +/- 29 (degrees)
  55539. </li>
  55540. <li>
  55541. <code>attr &ltname&gt <b>defaultColor</b> &ltH,S,V&gt</code>
  55542. <p>
  55543. Specify the light color in HSV which is selected at "on". Default is white.
  55544. </li>
  55545. <li>
  55546. <code>attr &ltname&gt <b>defaultRamp</b> &lt0 bis X&gt</code>
  55547. <p>
  55548. Time in seconds. If this attribute is set, a smooth transition is always implicitly generated if no ramp in the set is indicated.
  55549. </li>
  55550. <li>
  55551. <code>attr &ltname&gt <b>dimStep</b> &lt0 bis 100&gt</code>
  55552. <p>
  55553. Value by which the brightness at dim up and dim-down is changed. Default is "7"
  55554. </li>
  55555. <li>
  55556. <code>attr &ltname&gt <b>gamma</b> &ltX.X&gt</code>
  55557. <p>
  55558. The human eye perceives brightness changes very differently to (logarithmic).
  55559. At low output brightness even a small change in brightness is perceived as very strong and on the other side strong changes are needed at high luminance.
  55560. Therefore, a logarithmic correction of brightness increase of lamps is necessary so that the increase is found to be uniform.
  55561. Some controllers perform this correction internally.
  55562. In other cases it is necessary to store this correction in the module.
  55563. A gamma value of 1.0 (default) results in a linear output values.
  55564. Values less than 1.0 lead to a logarithmic correction.
  55565. </li>
  55566. <li>
  55567. <code>attr &ltname&gt <b>whitePoint</b> &ltR,G,B&gt</code>
  55568. <p>
  55569. <a href="#WifiLight_Farbkalibrierung">color calibration</a> for mixed RGB white light.
  55570. </li>
  55571. <li>
  55572. <code>attr &ltname&gt <b><a href="#readingFnAttributes">readingFnAttributes</a></b></code>
  55573. </li>
  55574. </ul>
  55575. <p><b>Colored device-icon for FhemWeb</b>
  55576. <ul>
  55577. <p>
  55578. To activate a colored icon for <a href="#FHEMWEB">FhemWeb</a> the following attribute must be set:
  55579. <p>
  55580. <li>
  55581. <code>attr &ltname&gt <b>devStateIcon</b> {Color_devStateIcon(ReadingsVal($name,"RGB","000000"))}</code>
  55582. </li>
  55583. </ul>
  55584. <p><b>Colorpicker for FhemWeb</b>
  55585. <ul>
  55586. <p>
  55587. In order for the Color Picker can be used in <a href="#FHEMWEB">FhemWeb</a> following attributes need to be set:
  55588. <p>
  55589. <li>
  55590. <code>attr &ltname&gt <b>webCmd</b> RGB</code>
  55591. </li>
  55592. <li>
  55593. <code>attr &ltname&gt <b>widgetOverride</b> RGB:colorpicker,RGB</code>
  55594. </li>
  55595. </ul>
  55596. </ul>
  55597. <a name="Wunderground" id="Wunderground"></a>
  55598. <h3>Wunderground</h3>
  55599. <ul>
  55600. This module gets weather data and forecast from <a href="http://www.wunderground.com/">Weather Underground</a> weather service.
  55601. <br><br>
  55602. <a name="Wundergrounddefine"></a>
  55603. <b>Define</b>
  55604. <ul><br>
  55605. <code>define &lt;name&gt; Wunderground &lt;api-key&gt; &lt;query&gt;</code>
  55606. <br><br>
  55607. Example:
  55608. <ul><br>
  55609. <code>
  55610. define WUweather Wunderground d123ab11bb2c3456 EDDF<br>
  55611. define WUweather Wunderground d123ab11bb2c3456 pws:IBAYERNM70<br>
  55612. define WUweather Wunderground d123ab11bb2c3456 Germany/Berlin<br>
  55613. </code><br>
  55614. </ul>
  55615. <br>
  55616. </ul>
  55617. <br><br>
  55618. <a name="Wundergroundset"></a>
  55619. <b>Set</b>
  55620. <ul>
  55621. <li>update - refresh data</li>
  55622. </ul>
  55623. <br><br>
  55624. <a name="Wundergroundattr"></a>
  55625. <b>Attributes</b>
  55626. <ul>
  55627. <li>pollInterval - Set regular polling interval in seconds (default=300)</li>
  55628. <li>wu_bestfct - Use Weather Undergrond Best Forecast for forecast (default=1)</li>
  55629. <li>wu_features - One or more of the data features to be fetched (default=astronomy,conditions,forecast)</li>
  55630. <li>wu_lang - Returns the API response in the specified language (default=en)</li>
  55631. <li>wu_pws - Use personal weather stations for conditions (default=1)</li>
  55632. </ul>
  55633. <br><br>
  55634. </ul>
  55635. <a name="X10"></a>
  55636. <h3>X10</h3>
  55637. <ul>
  55638. <a name="X10define"></a>
  55639. <b>Define</b>
  55640. <ul>
  55641. <code>define &lt;name&gt; X10 &lt;model&gt; &lt;housecode&gt;
  55642. &lt;unitcode&gt;</code>
  55643. <br><br>
  55644. Defines an X10 device via its model, housecode and unitcode.<br><br>
  55645. Notes:
  55646. <ul>
  55647. <li><code>&lt;model&gt;</code> is one of
  55648. <ul>
  55649. <li><code>lm12</code>: lamp module, dimmable</li>
  55650. <li><code>lm15</code>: lamp module, not dimmable</li>
  55651. <li><code>am12</code>: appliance module, not dimmable</li>
  55652. <li><code>tm12</code>: tranceiver module, not dimmable. Its
  55653. unitcode is 1.</li>
  55654. </ul>
  55655. Model determines whether a dim command is reasonable to be sent
  55656. or not.</li>
  55657. <li><code>&lt;housecode&gt;</code> ranges from A to P.</li>
  55658. <li><code>&lt;unitcode&gt;</code> ranges from 1 to 16.</li>
  55659. </ul>
  55660. <br>
  55661. Examples:
  55662. <ul>
  55663. <code>define lamp1 X10 lm12 N 10</code><br>
  55664. <code>define pump X10 am12 B 7</code><br>
  55665. <code>define lamp2 X10 lm15 N 11</code><br>
  55666. </ul>
  55667. </ul>
  55668. <br>
  55669. <a name="X10set"></a>
  55670. <b>Set </b>
  55671. <ul>
  55672. <code>set &lt;name&gt; &lt;value&gt; [&lt;argument&gt]</code>
  55673. <br><br>
  55674. where <code>value</code> is one of:<br>
  55675. <pre>
  55676. dimdown # requires argument, see the note
  55677. dimup # requires argument, see the note
  55678. off
  55679. on
  55680. on-till # Special, see the note
  55681. on-for-timer # Special, see the note
  55682. </pre>
  55683. Examples:
  55684. <ul>
  55685. <code>set lamp1 dimup 10</code><br>
  55686. <code>set lamp1,lamp2 off</code><br>
  55687. <code>set pump off</code><br>
  55688. <code>set lamp2 on-till 19:59</code><br>
  55689. <code>set lamp2 on-for-timer 00:02:30</code><br>
  55690. </ul>
  55691. <br>
  55692. Notes:
  55693. <ul>
  55694. <li>Only switching and dimming are supported by now.</li>
  55695. <li>Dimming is valid only for a dimmable device as specified by
  55696. the <code>model</code> argument in its <code>define</code>
  55697. statement.</li>
  55698. <li>An X10 device has 210 discrete brightness levels. If you use a
  55699. X10 sender, e.g. a remote control or a wall switch to dim, a
  55700. brightness step is 100%/210.</li>
  55701. <li><code>dimdown</code> and <code>dimup</code> take a number in the
  55702. range from 0 to 22 as argument. It is assumed that argument 1 is
  55703. a 1% brightness change (microdim) and arguments 2 to 22 are
  55704. 10%..100% brightness changes. The meaning of argument 0 is
  55705. unclear.</li>
  55706. <li>This currently leads to some confusion in the logs as the
  55707. <code>dimdown</code> and <code>dimup</code> codes are logged with
  55708. different meaning of the arguments depending on whether the commands
  55709. were sent from the PC or from a remote control or a wall switch.</li>
  55710. <li><code>dimdown</code> and <code>dimup</code> from on and off states may
  55711. have unexpected results. This seems to be a feature of the X10
  55712. devices.</li>
  55713. <li><code>on-till</code> requires an absolute time in the "at" format
  55714. (HH:MM:SS, HH:MM) or { &lt;perl code&gt; }, where the perl code
  55715. returns a time specification).
  55716. If the current time is greater than the specified time, then the
  55717. command is ignored, else an "on" command is generated, and for the
  55718. given "till-time" an off command is scheduleld via the at command.
  55719. </li>
  55720. <li><code>on-for-timer</code> requires a relative time in the "at" format
  55721. (HH:MM:SS, HH:MM) or { &lt;perl code&gt; }, where the perl code
  55722. returns a time specification).
  55723. </li>
  55724. </ul>
  55725. </ul>
  55726. <br>
  55727. <a name="X10get"></a>
  55728. <b>Get</b> <ul>N/A</ul><br>
  55729. <a name="X10attr"></a>
  55730. <b>Attributes</b>
  55731. <ul>
  55732. <li><a href="#do_not_notify">do_not_notify</a></li>
  55733. <li><a href="#attrdummy">dummy</a></li>
  55734. <li><a href="#showtime">showtime</a></li>
  55735. <li><a href="#model">model</a> (lm12,lm15,am12,tm13)</li>
  55736. <li><a href="#IODev">IODev</a></li><br>
  55737. <li><a href="#eventMap">eventMap</a></li><br>
  55738. </ul>
  55739. <br>
  55740. </ul>
  55741. <a name="XBMC"></a>
  55742. <h3>XBMC</h3>
  55743. <ul>
  55744. <a name="XBMCdefine"></a>
  55745. <b>Define</b>
  55746. <ul>
  55747. <code>define &lt;name&gt; XBMC &lt;ip[:port]&gt; &lt;http|tcp&gt; [&lt;username&gt;] [&lt;password&gt;]</code>
  55748. <br><br>
  55749. This module allows you to control XBMC and receive events from XBMC. It can also be used to control Plex (see attribute <i>compatibilityMode</i>).<br><br>
  55750. <b>Prerequisites</b>
  55751. <ul>
  55752. <li>Requires XBMC "Frodo" 12.0.</li>
  55753. <li>To use this module you will have to enable JSON-RPC. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.</li>
  55754. <li>The Perl module JSON is required. <br>
  55755. On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
  55756. Via CPAN: <code>cpan install JSON</code>
  55757. To get it working on a Fritzbox the JSON module has to be installed manually.</li>
  55758. </ul>
  55759. To receive events it is necessary to use TCP. The default TCP port is 9090. Username and password are optional for TCP. Be sure to enable JSON-RPC
  55760. for TCP. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC>here</a>.<br><br>
  55761. If you just want to control XBMC you can use the HTTP instead of tcp. The username and password are required for HTTP. Be sure to enable JSON-RPC for HTTP.
  55762. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br><br>
  55763. Example:<br><br>
  55764. <ul>
  55765. <code>
  55766. define htpc XBMC 192.168.0.10 tcp
  55767. <br><br>
  55768. define htpc XBMC 192.168.0.10:9000 tcp # With custom port
  55769. <br><br>
  55770. define htpc XBMC 192.168.0.10 http # Use HTTP instead of TCP - Note: to receive events use TCP!
  55771. <br><br>
  55772. define htpc XBMC 192.168.0.10 http xbmc passwd # Use HTTP with credentials - Note: to receive events use TCP!
  55773. </code>
  55774. </ul><br><br>
  55775. Remote control:<br>
  55776. There is an simple remote control layout for XBMC which contains the most basic buttons. To add the remote control to the webinterface execute the
  55777. following commands:<br><br>
  55778. <ul>
  55779. <code>
  55780. define &lt;rc_name&gt; remotecontrol #adds the remote control
  55781. <br><br>
  55782. set &lt;rc_name&gt; layout XBMC_RClayout #sets the layout for the remote control
  55783. <br><br>
  55784. set &lt;rc_name&gt; makenotify &lt;XBMC_device&gt; #links the buttons to the actions
  55785. </code>
  55786. </ul><br><br>
  55787. Known issues:<br>
  55788. XBMC sometimes creates events twices. For example the Player.OnPlay event is created twice if play a song. Unfortunately this
  55789. is a issue of XBMC. The fix of this bug is included in future version of XBMC (> 12.2).
  55790. </ul>
  55791. <a name="XBMCset"></a>
  55792. <b>Set</b>
  55793. <ul>
  55794. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code>
  55795. <br><br>
  55796. This module supports the following commands:<br>
  55797. Player related commands:<br>
  55798. <ul>
  55799. <li><b>play [&lt;all|audio|video|picture&gt;]</b> - starts the playback (might only work if previously paused). The second argument defines which player should be started. By default the active players will be started</li>
  55800. <li><b>pause [&lt;all|audio|video|picture&gt;]</b> - pauses the playback</li>
  55801. <li><b>playpause [&lt;all|audio|video|picture&gt;]</b> - toggles between play and pause for the given player</li>
  55802. <li><b>stop [&lt;all|audio|video|picture&gt;]</b> - stop the playback</li>
  55803. <li><b>next [&lt;all|audio|video|picture&gt;]</b> - jump to the next track</li>
  55804. <li><b>prev [&lt;all|audio|video|picture&gt;]</b> - jump to the previous track or the beginning of the current track.</li>
  55805. <li><b>goto &lt;position&gt; [&lt;audio|video|picture&gt;]</b> - Goes to the <position> in the playlist. <position> has to be a number.</li>
  55806. <li><b>shuffle [&lt;toggle|on|off&gt;] [&lt;audio|video|picture&gt;]</b> - Enables/Disables shuffle mode. Without furhter parameters the shuffle mode is toggled.</li>
  55807. <li><b>repeat &lt;one|all|off&gt; [&lt;audio|video|picture&gt;]</b> - Sets the repeat mode.</li>
  55808. <li><b>open &lt;URI&gt;</b> - Plays the resource located at the URI (can be a url or a file)</li>
  55809. <li><b>opendir &lt;path&gt;</b> - Plays the content of the directory</li>
  55810. <li><b>openmovieid &lt;path&gt;</b> - Plays a movie by id</li>
  55811. <li><b>openepisodeid &lt;path&gt;</b> - Plays an episode by id</li>
  55812. <li><b>openchannelid &lt;path&gt;</b> - Switches to channel by id</li>
  55813. <li><b>addon &lt;addonid&gt; &lt;parametername&gt; &lt;parametervalue&gt;</b> - Executes addon with one Parameter, for example set xbmc addon script.json-cec command activate</li>
  55814. <li><b>seek &lt;hh:mm:ss&gt;</b> - seek to the specified time</li>
  55815. </ul>
  55816. <br>Input related commands:<br>
  55817. <ul>
  55818. <li><b>back</b> - Back-button</li>
  55819. <li><b>down</b> - Down-button</li>
  55820. <li><b>up</b> - Up-button</li>
  55821. <li><b>left</b> - Left-button</li>
  55822. <li><b>right</b> - Right-button</li>
  55823. <li><b>home</b> - Home-button</li>
  55824. <li><b>select</b> - Select-button</li>
  55825. <li><b>info</b> - Info-button</li>
  55826. <li><b>showosd</b> - Opens the OSD (On Screen Display)</li>
  55827. <li><b>showcodec</b> - Shows Codec information</li>
  55828. <li><b>exec &lt;action&gt;</b> - Execute an input action. All available actions are listed <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Input.Action">here</a></li>
  55829. <li><b>send &lt;text&gt;</b> - Sends &lt;text&gt; as input to XBMC</li>
  55830. <li><b>jsonraw</b> - Sends raw JSON data to XBMC</li>
  55831. </ul>
  55832. <br>Libary related commands:<br>
  55833. <ul>
  55834. <li><b>videolibrary clean</b> - Removes non-existing files from the video libary</li>
  55835. <li><b>videolibrary scan</b> - Scan for new video files</li>
  55836. <li><b>audiolibrary clean</b> - Removes non-existing files from the audio libary</li>
  55837. <li><b>audiolibrary scan</b> - Scan for new audio files</li>
  55838. </ul>
  55839. <br>Application related commands:<br>
  55840. <ul>
  55841. <li><b>mute [&lt;0|1&gt;]</b> - 1 for mute; 0 for unmute; by default the mute status will be toggled</li>
  55842. <li><b>volume &lt;n&gt;</b> - sets the volume to &lt;n&gt;. &lt;n&gt; must be a number between 0 and 100</li>
  55843. <li><b>volumeDown &lt;n&gt;</b> - volume down</li>
  55844. <li><b>volumeUp &lt;n&gt;</b> - volume up</li>
  55845. <li><b>quit</b> - closes XBMC</li>
  55846. <li><b>off</b> - depending on the value of the attribute &quot;offMode&quot; XBMC will be closed (see quit) or the system will be shut down, put into hibernation or stand by. Default is quit.</li>
  55847. </ul>
  55848. <br>System related commands:<br>
  55849. <ul>
  55850. <li><b>eject</b> - will eject the optical drive</li>
  55851. <li><b>shutdown</b> - the XBMC host will be shut down</li>
  55852. <li><b>suspend</b> - the XBMC host will be put into stand by</li>
  55853. <li><b>hibernate</b> - the XBMC host will be put into hibernation</li>
  55854. <li><b>reboot</b> - the XBMC host will be rebooted</li>
  55855. <li><b>connect</b> - try to connect to the XBMC host immediately</li>
  55856. </ul>
  55857. </ul>
  55858. <br><br>
  55859. <u>Messaging</u>
  55860. <ul>
  55861. To show messages on XBMC (little message PopUp at the bottom right egde of the screen) you can use the following commands:<br>
  55862. <code>set &lt;XBMC_device&gt; msg &lt;title&gt; &lt;msg&gt; [&lt;duration&gt;] [&lt;icon&gt;]</code><br>
  55863. The default duration of a message is 5000 (5 seconds). The minimum duration is 1500 (1.5 seconds). By default no icon is shown. XBMC provides three
  55864. different icon: error, info and warning. You can also use an uri to define an icon. Please enclose title and/or message into quotes (" or ') if it consists
  55865. of multiple words.
  55866. </ul>
  55867. <br>
  55868. <b>Generated Readings/Events:</b><br>
  55869. <ul>
  55870. <li><b>audiolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
  55871. <li><b>currentAlbum</b> - album of the current song/musicvideo</li>
  55872. <li><b>currentArtist</b> - artist of the current song/musicvideo</li>
  55873. <li><b>currentMedia</b> - file/URL of the media item being played</li>
  55874. <li><b>currentTitle</b> - title of the current media item</li>
  55875. <li><b>currentTrack</b> - track of the current song/musicvideo</li>
  55876. <li><b>episode</b> - episode number</li>
  55877. <li><b>episodeid</b> - id of the episode in the video library</li>
  55878. <li><b>fullscreen</b> - indicates if XBMC runs in fullscreen mode (on/off)</li>
  55879. <li><b>label</b> - label of the current media item</li>
  55880. <li><b>movieid</b> - id of the movie in the video library</li>
  55881. <li><b>musicvideoid</b> - id of the musicvideo in the video library</li>
  55882. <li><b>mute</b> - indicates if XBMC is muted (on/off)</li>
  55883. <li><b>name</b> - software name (e.g. XBMC)</li>
  55884. <li><b>originaltitle</b> - original title of the movie being played</li>
  55885. <li><b>partymode</b> - indicates if XBMC runs in party mode (on/off) (not available for Plex)</li>
  55886. <li><b>playlist</b> - Possible values: add, clear, remove</li>
  55887. <li><b>playStatus</b> - Indicates the player status: playing, paused, stopped</li>
  55888. <li><b>repeat</b> - current repeat mode (one/all/off)</li>
  55889. <li><b>season</b> - season of the current episode</li>
  55890. <li><b>showtitle</b> - title of the show being played</li>
  55891. <li><b>shuffle</b> - indicates if the playback is shuffled (on/off)</li>
  55892. <li><b>skin</b> - current skin of XBMC</li>
  55893. <li><b>songid</b> - id of the song in the music library</li>
  55894. <li><b>system</b> - Possible values: lowbattery, quit, restart, sleep, wake</li>
  55895. <li><b>time</b> - current position in the playing media item (only updated on play/pause)</li>
  55896. <li><b>totaltime</b> - total run time of the current media item</li>
  55897. <li><b>type</b> - type of the media item. Possible values: episode, movie, song, musicvideo, picture, unknown</li>
  55898. <li><b>version</b> - version of XBMC</li>
  55899. <li><b>videolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
  55900. <li><b>volume</b> - value between 0 and 100 stating the current volume setting</li>
  55901. <li><b>year</b> - year of the movie being played</li>
  55902. <li><b>3dfile</b> - is a 3D movie according to filename</li>
  55903. <li><b>sd_<type><n>_<reading></b> - stream details of the current medium. type can be video, audio or subtitle, n is the stream index (a stream can have multiple audio/video streams)</li>
  55904. </ul>
  55905. <br><br>
  55906. <u>Remarks on the events</u><br><br>
  55907. <ul>
  55908. The event <b>playStatus = playing</b> indicates a playback of a media item. Depending on the event <b>type</b> different events are generated:
  55909. <ul>
  55910. <li><b>type = song</b> generated events are: <b>album, artist, file, title</b> and <b>track</b></li>
  55911. <li><b>type = musicvideo</b> generated events are: <b>album, artist, file</b> and <b>title</b></li>
  55912. <li><b>type = episode</b> generated events are: <b>episode, file, season, showtitle,</b> and <b>title</b></li>
  55913. <li><b>type = movie</b> generated events are: <b>originaltitle, file, title,</b> and <b>year</b></li>
  55914. <li><b>type = picture</b> generated events are: <b>file</b></li>
  55915. <li><b>type = unknown</b> generated events are: <b>file</b></li>
  55916. </ul>
  55917. </ul>
  55918. <br><br>
  55919. <a name="XBMCattr"></a>
  55920. <b>Attributes</b>
  55921. <ul>
  55922. <li>compatibilityMode<br>
  55923. This module can also be used to control Plex, since the JSON Api is mostly the same, but there are some differences.
  55924. If you want to control Plex set the attribute <i>compatibilityMode</i> to <i>plex</i>.</li>
  55925. <li>offMode<br>
  55926. Declares what should be down if the off command is executed. Possible values are <i>quit</i> (closes XBMC), <i>hibernate</i> (puts system into hibernation),
  55927. <i>suspend</i> (puts system into stand by), and <i>shutdown</i> (shuts down the system). Default value is <i>quit</i></li>
  55928. <li>fork<br>
  55929. If XBMC does not run all the time it used to be the case that FHEM blocks because it cannot reach XBMC (only happened
  55930. if TCP was used). If you encounter problems like FHEM not responding for a few seconds then you should set <code>attr &lt;XBMC_device&gt; fork enable</code>
  55931. which will move the search for XBMC into a separate process.</li>
  55932. <li>updateInterval<br>
  55933. The interval which is used to check if Kodi is still alive (by sending a JSON ping) and also it is used to update current player item.</li>
  55934. <li>disable<br>
  55935. Disables the device. All connections will be closed immediately.</li>
  55936. </ul>
  55937. </ul>
  55938. <a name="XiaomiFlowerSens"></a>
  55939. <h3>Xiaomi Flower Monitor</h3>
  55940. <ul>
  55941. <u><b>XiaomiFlowerSens - Retrieves data from a Xiaomi Flower Monitor</b></u>
  55942. <br>
  55943. With this module it is possible to read the data from a sensor and to set it as reading.</br>
  55944. Gatttool and hcitool is required to use this modul. (apt-get install bluez)
  55945. <br><br>
  55946. <a name="XiaomiFlowerSensdefine"></a>
  55947. <b>Define</b>
  55948. <ul><br>
  55949. <code>define &lt;name&gt; XiaomiFlowerSens &lt;BT-MAC&gt;</code>
  55950. <br><br>
  55951. Example:
  55952. <ul><br>
  55953. <code>define Weihnachtskaktus XiaomiFlowerSens C4:7C:8D:62:42:6F</code><br>
  55954. </ul>
  55955. <br>
  55956. This statement creates a XiaomiFlowerSens with the name Weihnachtskaktus and the Bluetooth Mac C4:7C:8D:62:42:6F.<br>
  55957. After the device has been created, the current data of the Xiaomi Flower Monitor is automatically read from the device.
  55958. </ul>
  55959. <br><br>
  55960. <a name="XiaomiFlowerSensreadings"></a>
  55961. <b>Readings</b>
  55962. <ul>
  55963. <li>state - Status of the flower sensor or error message if any errors.</li>
  55964. <li>battery - current battery state dependent on batteryLevel.</li>
  55965. <li>batteryLevel - current battery level in percent.</li>
  55966. <li>fertility - Values for the fertilizer content</li>
  55967. <li>firmware - current device firmware</li>
  55968. <li>lux - current light intensity</li>
  55969. <li>moisture - current moisture content</li>
  55970. <li>temperature - current temperature</li>
  55971. </ul>
  55972. <br><br>
  55973. <a name="XiaomiFlowerSensset"></a>
  55974. <b>Set</b>
  55975. <ul>
  55976. <li>clearFirmwareReading - clear firmware reading for new begin.</li>
  55977. <br>
  55978. </ul>
  55979. <br><br>
  55980. <a name="XiaomiFlowerSensget"></a>
  55981. <b>Get</b>
  55982. <ul>
  55983. <li>statusRequest - retrieves the current state of the Xiaomi Flower Monitor.</li>
  55984. <br>
  55985. </ul>
  55986. <br><br>
  55987. <a name="XiaomiFlowerSensattribut"></a>
  55988. <b>Attributes</b>
  55989. <ul>
  55990. <li>disable - disables the device</li>
  55991. <li>interval - interval in seconds for statusRequest</li>
  55992. <li>minFertility - min fertility value for low warn event</li>
  55993. <li>maxFertility - max fertility value for High warn event</li>
  55994. <li>minMoisture - min moisture value for low warn event</li>
  55995. <li>maxMoisture - max moisture value for High warn event</li>
  55996. <li>minTemp - min temperature value for low warn event</li>
  55997. <li>maxTemp - max temperature value for high warn event</li>
  55998. <li>minlux - min lux value for low warn event</li>
  55999. <li>maxlux - max lux value for high warn event
  56000. <br>
  56001. Event Example for min/max Value's: 2017-03-16 11:08:05 XiaomiFlowerSens Dracaena minMoisture low<br>
  56002. Event Example for min/max Value's: 2017-03-16 11:08:06 XiaomiFlowerSens Dracaena maxTemp high</li>
  56003. <li>sshHost - FQD-Name or IP of ssh remote system / you must configure your ssh system for certificate authentication. For better handling you can config ssh Client with .ssh/config file</li>
  56004. <li>batteryFirmwareAge - how old can the reading befor fetch new data</li>
  56005. <li>blockingCallLoglevel - Blocking.pm Loglevel for BlockingCall Logoutput</li>
  56006. </ul>
  56007. </ul>
  56008. <a name="XmlList"></a>
  56009. <h3>xmllist</h3>
  56010. <ul>
  56011. <code>xmllist [devspec]</code>
  56012. <br><br>
  56013. Returns an XML tree of device definitions. <a href="#devspec">devspec</a> is
  56014. optional, and restricts the list of devices if specified.
  56015. <br><br>
  56016. Example:
  56017. <code>
  56018. <ul>
  56019. fhem> xmllist<br>
  56020. &lt;FHZINFO&gt;<br>
  56021. <ul>
  56022. &lt;internal_LIST&gt;<br>
  56023. <ul>
  56024. &lt;internal name="global" state="internal" sets="" attrs="room configfile logfile ..."&gt;<br>
  56025. <ul>
  56026. &lt;INT key="DEF" value="&lt;no definition&gt;"/&gt;<br>
  56027. &lt;INT key="NR" value="0"/&gt;<br>
  56028. &lt;INT key="STATE" value="internal"/&gt;<br>
  56029. </ul>
  56030. [...]<br>
  56031. </ul>
  56032. </ul>
  56033. </ul></code>
  56034. </ul>
  56035. <a name="YAAHM"></a>
  56036. <h3>YAAHM</h3>
  56037. <p> Yet Another Auto Home Module to set up a cyclic processing of commands (daily, weekly, monthly, yearly profile)</p>
  56038. <a name="YAAHMusage"></a>
  56039. <h4>Usage</h4>
  56040. See <a href="http://www.fhemwiki.de/wiki/Modul_YAAHM">German Wiki page</a>
  56041. <br/>
  56042. <a name="YAAHMdefine"></a>
  56043. <h4>Define</h4>
  56044. <p>
  56045. <code>define &lt;name&gt; YAAHM</code>
  56046. <br />Defines the YAAHM system. </p>
  56047. <a name="YAAHMset"></a>
  56048. Notes: <ul>
  56049. <li>This module uses the global attribute <code>language</code> to determine its output data<br/>
  56050. (default: EN=english). For German output set <code>attr global language DE</code>.</li>
  56051. </ul>
  56052. <h4>Set</h4>
  56053. <ul>
  56054. <li><a name="yaahm_time">
  56055. <code>set &lt;name&gt; time &lt;timeevent&gt;</code></a><br/>
  56056. Set the current house time (event), i.e. one of several values:
  56057. <ul>
  56058. <li>(after|before) midnight | [before|after] sunrise | [before|after] sunset are calculated from astronomical data (&pm;offset).
  56059. These values vary from day to day, only the offset can be specified in the daily profile. </li>
  56060. <li>morning | noon | afternoon | evening | night are fixed time events specified in the daily profile.
  56061. The time phase between events morning and night is called <i>daytime</i>, the
  56062. time phase between events night and morning is called <i>nighttime</i></li>
  56063. <li>wakeup|sleep are time events specified in the weekly default profiles <i>Wakeup</i> and <i>Sleep</i>, i.e. the value may change from day to day.</li>
  56064. </ul>
  56065. The actual changes to certain devices are made by the functions in the command field, or by an external <a href="#yaahm_timehelper">timeHelper function</a>.
  56066. </li>
  56067. <li><a name="yaahm_manualnext"></a>
  56068. <code>set &lt;name&gt; manualnext &lt;timernumber&gt; &lt;time&gt;</code><br/>
  56069. <code>set &lt;name&gt; manualnext &lt;timername&gt; &lt;time&gt;</code><br/>
  56070. For the weekly timer identified by its number (starting at 0) or its name, set the next ring time manually. The time specification &lt;time&gt;must be in the format hh:mm or "off"
  56071. If the time specification &lt;time&gt; is later than the current time, it will be used for today. If it is earlier than the current time, it will be used tomorrow.
  56072. </li>
  56073. <li><a name="yaahm_mode">
  56074. <code>set &lt;name&gt; mode normal | party | absence | donotdisturb</code>
  56075. </a>
  56076. <br />Set the current house mode, i.e. one of several values:
  56077. <ul>
  56078. <li>normal - normal daily and weekly time profiles apply</li>
  56079. <li>party - can be used in the timeHelper function to suppress certain actions, like e.g. those that set the house (security) state to <i>secured</i> or the house time event to <i>night</i>.</li>
  56080. <li>absence - can be used in the timeHelper function to suppress certain actions. Valid until manual mode change</li>
  56081. <li>donotodisturb - can be used in the timeHelper function to suppress certain actions. Valid until manual mode change</li>
  56082. </ul>
  56083. House modes are valid until manual mode change. If the attribute <i>modeAuto</i> is set (see below), mode will change automatically at certain time events.
  56084. The actual changes to certain devices are made by an external <a href="#yaahm_modehelper">modeHelper function</a>.
  56085. </li>
  56086. <li><a name="yaahm_state">
  56087. <code>set &lt;name&gt; state unsecured | secured | protected | guarded</code>
  56088. </a>
  56089. <br/>Set house (security) state, i.e. one of several values:
  56090. <ul>
  56091. <li> unsecured - Example: doors etc.
  56092. </li>
  56093. <li> secured - Example: doors etc. are locked, windows may not be open
  56094. </li>
  56095. <li> protected - Example: doors etc. are locked, windows may not be open, alarm system is armed
  56096. </li>
  56097. <li> guarded - Example: doors etc. are locked, windows may not be open, alarm is armed, a periodic house check is run and a simulation as well
  56098. </li>
  56099. </ul>
  56100. House (security) states are valid until manual change. If the attribute <i>stateAuto</i> is set (see below), state will change automatically at certain times.
  56101. The actual changes to certain devices are made by an external <a href="#yaahm_statehelper">stateHelper function</a>. If these external devices are in their proper state
  56102. for a particular house (security) state can be checked automatically, see the attribute <a href="#yaahm_statedevices">stateDevices</a>
  56103. </li>
  56104. <li><a name="yaahm_createweekly">
  56105. <code>set &lt;name&gt; createWeekly &lt;string&gt;</code>
  56106. </a>
  56107. <br/>Create a new weekly profile &lt;string&gt;</li>
  56108. <li><a name="yaahm_deleteweekly">
  56109. <code>set &lt;name&gt; deleteWeekly &lt;string&gt;</code>
  56110. </a>
  56111. <br/>Delete the weekly profile &lt;string&gt;</li>
  56112. <li><a name="yaahm_initialize">
  56113. <code>set &lt;name&gt; initialize</code>
  56114. </a>
  56115. <br/>Restart the internal timers</li>
  56116. <li><a name="yaahm_lock">
  56117. <code>set &lt;name&gt; locked|unlocked</code>
  56118. </a>
  56119. <br />Set the lockstate of the yaahm module to <i>locked</i> (i.e., yaahm setups
  56120. may not be changed) resp. <i>unlocked</i> (i.e., yaahm setups may be changed>)</li>
  56121. <li><a name="yaahm_save">
  56122. <code>set &lt;name&gt; save|restore</code>
  56123. </a>
  56124. <br />Manually save/restore the complete profile data to/from the external file YAAHMFILE (save done automatically at each timer starte, restore at FHEM start)</li>
  56125. </ul>
  56126. <a name="YAAHMget"></a>
  56127. <h4>Get</h4>
  56128. <ul>
  56129. <li><a name="yaahm_next"></a>
  56130. <code>get &lt;name&gt; next &lt;timernumber&gt;</code><br/>
  56131. <code>get &lt;name&gt; next &lt;timername&gt;</code><br/>
  56132. For the weekly timer identified by its number (starting at 0) or its name, get the next ring time in a format suitable for text devices.</li>
  56133. <li><a name="yaahm_saynext"></a>
  56134. <code>get &lt;name&gt; sayNext &lt;timernumber&gt;</code><br/>
  56135. <code>get &lt;name&gt; sayNext &lt;timername&gt;</code><br/>
  56136. For the weekly timer identified by its number (starting at 0) or its name, get the next ring time in a format suitable for speech devices.</li>
  56137. <li><a name="yaahm_version"></a>
  56138. <code>get &lt;name&gt; version</code>
  56139. <br />Display the version of the module</li>
  56140. <li><a name="yaahm_template"></a>
  56141. <code>get &lt;name&gt; template</code>
  56142. <br />Return an (empty) perl subroutine for the helper functions</li>
  56143. </ul>
  56144. <a name="YAAHMattr"></a>
  56145. <h4>Attributes</h4>
  56146. <ul>
  56147. <li><a name="yaahm_linkname"><code>attr &lt;name&gt; linkname
  56148. &lt;string&gt;</code></a>
  56149. <br />Name for yaahm web link, default:
  56150. Profile</li>
  56151. <li><a name="yaahm_hiddenroom"><code>attr &lt;name&gt; hiddenroom
  56152. &lt;string&gt;</code></a>
  56153. <br />Room name for hidden yaahm room (containing only the YAAHM device), default:
  56154. ProfileRoom</li>
  56155. <li><a name="yaahm_lockstate"><code>attr &lt;name&gt; lockstate
  56156. locked|unlocked</code></a>
  56157. <br /><i>locked</i> means that yaahm setups may not be changed, <i>unlocked</i>
  56158. means that yaahm setups may be changed</li>
  56159. <li><a name="yaahm_simulation"><code>attr &lt;name&gt; simulation
  56160. 0|1</code></a>
  56161. <br />a value of 1 means that commands will not be executed, but only simulated</li>
  56162. <li><a name="yaahm_timehelper"><code>attr &lt;name&gt; timeHelper &lt;name of perl program&gt;</code></a>
  56163. <br />name of a perl function that is called at each time step of the daily profile and for the two default weekly profiles</li>
  56164. <li><a name="yaahm_modehelper"><code>attr &lt;name&gt; modeHelper &lt;name of perl program&gt;</code></a>
  56165. <br />name of a perl function that is called at every change of the house mode</li>
  56166. <li><a name="yaahm_modeauto"><code>attr &lt;name&gt; modeAuto 0|1</code></a>
  56167. <br />If this attribute is set to 1, the house mode changes automatically at certain time events.
  56168. <ul>
  56169. <li>On time (event) <i>sleep</i> or <i>morning</i>, <i>party</i> mode will be reset to <i>normal</i> mode.</li>
  56170. <li>On time (event) <i>wakeup</i>, <i>absence</i> mode will be reset to <i>normal</i> mode.</li>
  56171. <li>On <i>any</i> time (event), <i>donotdisturb</i> mode will be reset to <i>normal</i> mode.</li>
  56172. </ul>
  56173. </li>
  56174. <li><a name="yaahm_statedevices"><code>attr &lt;name&gt; stateDevices (&lt;device&gt;:&lt;state-unsecured&gt;:&lt;state-secured&gt;:&lt;state-protected&gt;:&lt;state-guarded&gt;,)*</code></a>
  56175. <br />comma separated list of devices and their state in each of the house (security) states. Each of the listed devices will be checked in the interval given by the <i>stateInterval</i> attribute
  56176. for its proper state, and a <i>stateWarning</i> function will be called if it is not in the proper state.</li>
  56177. <li><a name="yaahm_stateinterval"><code>attr &lt;name&gt; stateInterval &lt;integer&gt;</code></a>
  56178. <br />interval in minutes for checking all <i>stateDevices</i> for their proper state according of the house (security) state. Default 60 minutes.</li>
  56179. <li><a name="yaahm_statewarning"><code>attr &lt;name&gt; stateWarning &lt;name of perl program&gt;</code></a>
  56180. <br />name of a perl function that is called as <i>stateWarning('device','desired state','actual state')</i>if a device is not in the desired state.</li>
  56181. <li><a name="yaahm_statehelper"><code>attr &lt;name&gt; stateHelper &lt;name of perl program&gt;</code></a>
  56182. <br />name of a perl function that is called as <i>stateHelper('event')</i> at every change of the house (security) state</li>
  56183. <li><a name="yaahm_stateauto"><code>attr &lt;name&gt; stateAuto 0|1</code></a>
  56184. <br />If this attribute is set to 1, the house state changes automatically if certain modes are set or at certain time events
  56185. <ul>
  56186. <li>If leaving <i>party</i> mode and time event <i>sleep</i>, and currently in (security) state <i>unsecured</i>, the state will change to <i>secured</i>.</li>
  56187. <li>If in <i>normal</i> mode and time event <i>sleep</i> or <i>night</i>, and currently in (security) state <i>unsecured</i>, the state will change to <i>secured</i>.</li>
  56188. </ul>
  56189. </li>
  56190. <li><a name="yaahm_holidaydevices"><code>attr &lt;name&gt; &lt;comma-separated list of devices&gt; </code></a>
  56191. <br />list of devices that provide holiday information. The devices may be
  56192. <a href="#holiday">holiday devices</a> or <a href="#Calendar">Calendar devices</a></li>
  56193. <li><a name="yaahm_vacationdevices"><code>attr &lt;comma-separated list of devices&gt; </code></a>
  56194. <br />list of devices that provide vacation information. The devices may be
  56195. <a href="#holiday">holiday devices</a> or <a href="#Calendar">Calendar devices</a></li>
  56196. <li><a name="yaahm_specialdevices"><code>attr &lt;comma-separated list of devices&gt; </code></a>
  56197. <br />list of devices that provide special date information (like e.g. garbage collection). The devices may be
  56198. <a href="#holiday">holiday devices</a> or <a href="#Calendar">Calendar devices</a></li>
  56199. </ul>
  56200. <a name="YAMAHA_AVR"></a>
  56201. <h3>YAMAHA_AVR</h3>
  56202. <ul>
  56203. <a name="YAMAHA_AVR_define"></a>
  56204. <b>Define</b>
  56205. <ul>
  56206. <code>
  56207. define &lt;name&gt; YAMAHA_AVR &lt;ip-address&gt; [&lt;zone&gt;] [&lt;status_interval&gt;]
  56208. <br><br>
  56209. define &lt;name&gt; YAMAHA_AVR &lt;ip-address&gt; [&lt;zone&gt;] [&lt;off_status_interval&gt;] [&lt;on_status_interval&gt;]
  56210. </code>
  56211. <br><br>
  56212. This module controls AV receiver from Yamaha via network connection. You are able
  56213. to power your AV reveiver on and off, query it's power state,
  56214. select the input (HDMI, AV, AirPlay, internet radio, Tuner, ...), select the volume
  56215. or mute/unmute the volume.<br><br>
  56216. Defining a YAMAHA_AVR device will schedule an internal task (interval can be set
  56217. with optional parameter &lt;status_interval&gt; in seconds, if not set, the value is 30
  56218. seconds), which periodically reads the status of the AV receiver (power state, selected
  56219. input, volume and mute status) and triggers notify/filelog commands.
  56220. <br><br>
  56221. Different status update intervals depending on the power state can be given also.
  56222. If two intervals are given in the define statement, the first interval statement stands for the status update
  56223. interval in seconds in case the device is off, absent or any other non-normal state. The second
  56224. interval statement is used when the device is on.
  56225. Example:<br><br>
  56226. <ul><code>
  56227. define AV_Receiver YAMAHA_AVR 192.168.0.10
  56228. <br><br>
  56229. # With custom status interval of 60 seconds<br>
  56230. define AV_Receiver YAMAHA_AVR 192.168.0.10 mainzone 60
  56231. <br><br>
  56232. # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
  56233. define AV_Receiver YAMAHA_AVR 192.168.0.10 mainzone 60 10
  56234. </code></ul>
  56235. </ul>
  56236. <br><br>
  56237. <b>Zone Selection</b><br>
  56238. <ul>
  56239. If your receiver supports zone selection (e.g. RX-V671, RX-V673,... and the AVANTAGE series)
  56240. you can select the zone which should be controlled. The RX-V3xx and RX-V4xx series for example
  56241. just have a "Main Zone" (which is the whole receiver itself). In general you have the following
  56242. possibilities for the parameter &lt;zone&gt; (depending on your receiver model).<br><br>
  56243. <ul>
  56244. <li><b>mainzone</b> - this is the main zone (standard)</li>
  56245. <li><b>zone2</b> - The second zone (Zone 2)</li>
  56246. <li><b>zone3</b> - The third zone (Zone 3)</li>
  56247. <li><b>zone4</b> - The fourth zone (Zone 4)</li>
  56248. </ul>
  56249. <br>
  56250. Depending on your receiver model you have not all inputs available on these different zones.
  56251. The module just offers the real available inputs.
  56252. <br><br>
  56253. Example:
  56254. <br><br>
  56255. <ul><code>
  56256. define AV_Receiver YAMAHA_AVR 192.168.0.10 &nbsp;&nbsp;&nbsp; # If no zone is specified, the "Main Zone" will be used.<br>
  56257. attr AV_Receiver YAMAHA_AVR room Livingroom<br>
  56258. <br>
  56259. # Define the second zone<br>
  56260. define AV_Receiver_Zone2 YAMAHA_AVR 192.168.0.10 zone2<br>
  56261. attr AV_Receiver_Zone2 room Bedroom
  56262. </code></ul><br><br>
  56263. For each Zone you will need an own YAMAHA_AVR device, which can be assigned to a different room.
  56264. Each zone can be controlled separatly from all other available zones.
  56265. <br><br>
  56266. </ul>
  56267. <a name="YAMAHA_AVR_set"></a>
  56268. <b>Set </b>
  56269. <ul>
  56270. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code>
  56271. <br><br>
  56272. Currently, the following commands are defined; the available inputs are depending on the used receiver.
  56273. The module only offers the real available inputs and scenes. The following input commands are just an example and can differ.
  56274. <br><br>
  56275. <ul>
  56276. <li><b>on</b> &nbsp;&nbsp;-&nbsp;&nbsp; powers on the device</li>
  56277. <li><b>off</b> &nbsp;&nbsp;-&nbsp;&nbsp; shuts down the device </li>
  56278. <li><b>input</b> hdm1,hdmX,... &nbsp;&nbsp;-&nbsp;&nbsp; selects the input channel (only the real available inputs were given)</li>
  56279. <li><b>scene</b> scene1,sceneX &nbsp;&nbsp;-&nbsp;&nbsp; select the scene</li>
  56280. <li><b>volume</b> 0...100 [direct] &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in percentage. If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
  56281. <li><b>volumeStraight</b> -80...15 [direct] &nbsp;&nbsp;-&nbsp;&nbsp; set the volume level in decibel. If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
  56282. <li><b>volumeUp</b> [0-100] [direct] &nbsp;&nbsp;-&nbsp;&nbsp; increases the volume level by 5% or the value of attribute volumeSteps (optional the increasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
  56283. <li><b>volumeDown</b> [0-100] [direct] &nbsp;&nbsp;-&nbsp;&nbsp; decreases the volume level by 5% or the value of attribute volumeSteps (optional the decreasing level can be given as argument, which will be used instead). If you use "direct" as second argument, no volume smoothing is used (if activated) for this volume change. In this case, the volume will be set immediatly.</li>
  56284. <li><b>hdmiOut1</b> on|off &nbsp;&nbsp;-&nbsp;&nbsp; controls the HDMI output 1</li>
  56285. <li><b>hdmiOut2</b> on|off &nbsp;&nbsp;-&nbsp;&nbsp; controls the HDMI output 2</li>
  56286. <li><b>mute</b> on|off|toggle &nbsp;&nbsp;-&nbsp;&nbsp; activates volume mute</li>
  56287. <li><b>bass</b> [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) &nbsp;&nbsp;-&nbsp;&nbsp; set bass tone level in decibel</li>
  56288. <li><b>treble</b> [-6...6] step 0.5 (main zone), [-10...10] step 2 (other zones), [-10...10] step 1 (other zones, DSP models) &nbsp;&nbsp;-&nbsp;&nbsp; set treble tone level in decibel</li>
  56289. <li><b>dsp</b> hallinmunich,hallinvienna,... &nbsp;&nbsp;-&nbsp;&nbsp; sets the DSP mode to the given preset</li>
  56290. <li><b>enhancer</b> on|off &nbsp;&nbsp;-&nbsp;&nbsp; controls the internal sound enhancer</li>
  56291. <li><b>3dCinemaDsp</b> auto|off &nbsp;&nbsp;-&nbsp;&nbsp; controls the CINEMA DSP 3D mode</li>
  56292. <li><b>adaptiveDrc</b> auto|off &nbsp;&nbsp;-&nbsp;&nbsp; controls the Adaptive DRC</li>
  56293. <li><b>partyMode</b> on|off &nbsp;&nbsp;-&nbsp;&nbsp;controls the party mode. In Main Zone the whole party mode is enabled/disabled system wide. In each zone executed, it enables/disables the current zone from party mode.</li>
  56294. <li><b>navigateListMenu</b> [item1]/[item2]/.../[itemN] &nbsp;&nbsp;-&nbsp;&nbsp; select a specific item within a menu structure. for menu-based inputs (e.g. Net Radio, USB, Server, ...) only. See chapter <a href="#YAMAHA_AVR_MenuNavigation">Automatic Menu Navigation</a> for further details and examples.</li>
  56295. <li><b>tunerFrequency</b> [frequency] [AM|FM] &nbsp;&nbsp;-&nbsp;&nbsp; sets the tuner frequency. The first argument is the frequency, second parameter is optional to set the tuner band (AM or FM, default: FM). Depending which tuner band you select, the frequency is given in kHz (AM band) or MHz (FM band). If the second parameter is not set, the FM band will be used. This command can be used even the current input is not "tuner", the new frequency is set and will be played, when the tuner gets active.</li>
  56296. <li><b>preset</b> 1...40 &nbsp;&nbsp;-&nbsp;&nbsp; selects a saved preset of the currently selected input.</li>
  56297. <li><b>presetUp</b> &nbsp;&nbsp;-&nbsp;&nbsp; selects the next preset of the currently selected input.</li>
  56298. <li><b>presetDown</b> &nbsp;&nbsp;-&nbsp;&nbsp; selects the previous preset of the currently selected input.</li>
  56299. <li><b>straight</b> on|off &nbsp;&nbsp;-&nbsp;&nbsp; bypasses the internal codec converter and plays the original sound codec</li>
  56300. <li><b>direct</b> on|off &nbsp;&nbsp;-&nbsp;&nbsp; bypasses all internal sound enhancement features and plays the sound straight directly</li>
  56301. <li><b>sleep</b> off,30min,60min,...,last &nbsp;&nbsp;-&nbsp;&nbsp; activates the internal sleep timer</li>
  56302. <li><b>shuffle</b> on,off &nbsp;&nbsp;-&nbsp;&nbsp; activates the shuffle mode on the current input</li>
  56303. <li><b>surroundDecoder</b> dolbypl,... &nbsp;&nbsp;-&nbsp;&nbsp; set the surround decoder. Only the available decoders were given if the device supports the configuration of the surround decoder.</li>
  56304. <li><b>extraBass</b> off,auto &nbsp;&nbsp;-&nbsp;&nbsp; controls the extra bass. Only available if supported by the device.</li>
  56305. <li><b>ypaoVolume</b> off,auto &nbsp;&nbsp;-&nbsp;&nbsp; controls the YPAO volume. Only available if supported by the device.</li>
  56306. <li><b>displayBrightness</b> -4...0 &nbsp;&nbsp;-&nbsp;&nbsp; controls brightness reduction of the front display. Only available if supported by the device.</li>
  56307. <li><b>repeat</b> one,all,off &nbsp;&nbsp;-&nbsp;&nbsp; activates the repeat mode on the current input for one or all titles</li>
  56308. <li><b>pause</b> &nbsp;&nbsp;-&nbsp;&nbsp; pause playback on current input</li>
  56309. <li><b>play</b> &nbsp;&nbsp;-&nbsp;&nbsp; start playback on current input</li>
  56310. <li><b>stop</b> &nbsp;&nbsp;-&nbsp;&nbsp; stop playback on current input</li>
  56311. <li><b>skip</b> reverse,forward &nbsp;&nbsp;-&nbsp;&nbsp; skip track on current input</li>
  56312. <li><b>statusRequest</b> &nbsp;&nbsp;-&nbsp;&nbsp; requests the current status of the device</li>
  56313. <li><b>remoteControl</b> up,down,... &nbsp;&nbsp;-&nbsp;&nbsp; sends remote control commands as listed below</li>
  56314. </ul>
  56315. </ul><br><br>
  56316. <u>Remote control (not in all zones available, depending on your model)</u><br><br>
  56317. <ul>
  56318. <u>Cursor Selection:</u><br><br>
  56319. <ul><code>
  56320. remoteControl up<br>
  56321. remoteControl down<br>
  56322. remoteControl left<br>
  56323. remoteControl right<br>
  56324. remoteControl enter<br>
  56325. remoteControl return<br>
  56326. </code></ul><br><br>
  56327. <u>Menu Selection:</u><br><br>
  56328. <ul><code>
  56329. remoteControl setup<br>
  56330. remoteControl option<br>
  56331. remoteControl display<br>
  56332. </code></ul><br><br>
  56333. <u>Tuner Control:</u><br><br>
  56334. <ul><code>
  56335. remoteControl tunerPresetUp<br>
  56336. remoteControl tunerPresetDown<br>
  56337. </code></ul><br><br>
  56338. The button names are the same as on your remote control.
  56339. </ul>
  56340. <br>
  56341. <a name="YAMAHA_AVR_MenuNavigation"></a>
  56342. <u>Automatic Menu Navigation (only for menu based inputs like Net Radio, Server, USB, ...)</u><br><br>
  56343. <ul>
  56344. For menu based inputs you have to select a specific item out of a complex menu structure to start playing music.
  56345. Mostly you want to start automatic playback for a specific internet radio (input: Net Radio) or similar, where you have to navigate through several menu and submenu items.
  56346. <br><br>
  56347. To automate such a complex menu navigation, you can use the set command "navigateListMenu".
  56348. As Parameter you give a menu path of the desired item you want to select.
  56349. YAMAHA_AVR will go through the menu and selects all menu items given as parameter from left to right.
  56350. All menu items are separated by a forward slash (/).
  56351. <br><br>
  56352. So here are some examples:
  56353. Receiver's current input is "netradio":<br><br>
  56354. <ul>
  56355. <code>
  56356. set &lt;name&gt; navigateListMenu Countries/Australia/All Stations/1Radio.FM<br>
  56357. set &lt;name&gt; navigateListMenu Bookmarks/Favorites/1LIVE</code>
  56358. </ul><br>
  56359. If you want to turn on your receiver and immediatly select a specific internet radio you may use:<br><br>
  56360. <ul>
  56361. <code>
  56362. set &lt;name&gt; on ; set &lt;name&gt; volume 20 direct ; set &lt;name&gt; input netradio ; set &lt;name&gt; navigateListMenu Bookmarks/Favorites/1LIVE<br><br>
  56363. # for regular execution to a specific time using the <a href="#at">at</a> module<br>
  56364. define turn_on_Radio_morning at *08:00 set &lt;name&gt; on ; set &lt;name&gt; volume 20 direct ; set &lt;name&gt; input netradio ; set &lt;name&gt; navigateListMenu Countries/Australia/All Stations/1Radio.FM<br><br>
  56365. define turn_on_Radio_evening at *17:00 set &lt;name&gt; on ; set &lt;name&gt; volume 20 direct ; set &lt;name&gt; input netradio ; set &lt;name&gt; navigateListMenu Bookmarks/Favorites/1LIVE</code>
  56366. </ul>
  56367. <br>
  56368. Receiver's current input is "server" (network DLNA shares):<br><br>
  56369. <ul>
  56370. <code>
  56371. set &lt;name&gt; navigateListMenu NAS/Music/Sort By Artist/Alicia Keys/Songs in A Minor/Fallin
  56372. </code>
  56373. </ul>
  56374. <br>
  56375. The exact menu structure depends on your own configuration and network devices who provide content.
  56376. Each menu item name has not to be provided fully. Each item name will be treated as keyword search. That means, if any menu item contains the given item name, it will be selected, for example:
  56377. <br><br>
  56378. <ul>
  56379. Your real menu path you want to select looks like this: <code> <i><b>Bookmarks</b></i> =&gt; <i><b>Favorites</b></i> =&gt; <i><b>foo:BAR 70's-90's [[HITS]]</b></i></code><br><br>
  56380. The last item has many non-word characters, that can cause you trouble in some situations. But you don't have to use the full name to select this entry.
  56381. It's enough to use a specific part of the item name, that only exists in this one particular item. So to select this item you can use for instance the following set command:<br><br>
  56382. <code>
  56383. set &lt;name&gt; navigateListMenu Bookmarks/Favorites/foo:BAR
  56384. </code>
  56385. <br><br>
  56386. This works, even without giving the full item name (<i><code>foo:BAR 70's-90's [[HITS]]</code></i>).
  56387. </ul>
  56388. <br>
  56389. This also allows you to pare down long item names to shorter versions.
  56390. The shorter version must be still unique enough to identify the right item.
  56391. The first item in the list (from top to bottom), that contains the given keyword, will be selected.
  56392. <br><br>
  56393. </ul>
  56394. <a name="YAMAHA_AVR_get"></a>
  56395. <b>Get</b>
  56396. <ul>
  56397. <code>get &lt;name&gt; &lt;reading&gt;</code>
  56398. <br><br>
  56399. Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
  56400. <br><br>
  56401. </ul>
  56402. <a name="YAMAHA_AVR_attr"></a>
  56403. <b>Attributes</b>
  56404. <ul>
  56405. <li><a href="#do_not_notify">do_not_notify</a></li>
  56406. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  56407. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  56408. <li><a name="YAMAHA_AVR_request-timeout">request-timeout</a></li>
  56409. Optional attribute change the response timeout in seconds for all queries to the receiver.
  56410. <br><br>
  56411. Possible values: 1-5 seconds. Default value is 4 seconds.
  56412. <br><br>
  56413. <li><a name="YAMAHA_AVR_disable">disable</a></li>
  56414. Optional attribute to disable the internal cyclic status update of the receiver. Manual status updates via statusRequest command is still possible.
  56415. <br><br>
  56416. Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.
  56417. <br><br>
  56418. <li><a name="YAMAHA_AVR_volume-smooth-change">volume-smooth-change</a></li>
  56419. Optional attribute to activate a smooth volume change.
  56420. <br><br>
  56421. Possible values: 0 => off , 1 => on
  56422. <br><br>
  56423. <li><a name="YAMAHA_AVR_volume-smooth-steps">volume-smooth-steps</a></li>
  56424. Optional attribute to define the number of volume changes between the
  56425. current and the desired volume. Default value is 5 steps
  56426. <br><br>
  56427. <li><a name="YAMAHA_AVR_volume-steps">volumeSteps</a></li>
  56428. Optional attribute to define the default increasing and decreasing level for the volumeUp and volumeDown set command. Default value is 5%
  56429. <br><br>
  56430. <li><a name="YAMAHA_AVR_volume-max">volumeMax</a></li>
  56431. Optional attribute to set an upper limit in percentage for volume changes.
  56432. If the user tries to change the volume to a higher level than configured with this attribute, the volume will not exceed this limit.
  56433. <br><br>
  56434. Possible values: 0-100%. Default value is 100% (no limitation)<br><br>
  56435. </ul>
  56436. <b>Generated Readings/Events:</b><br>
  56437. <ul>
  56438. <li><b>3dCinemaDsp</b> - The status of the CINEMA DSP 3D mode (can be "auto" or "off")</li>
  56439. <li><b>adaptiveDrc</b> - The status of the Adaptive DRC (can be "auto" or "off")</li>
  56440. <li><b>bass</b> Reports the current bass tone level of the receiver or zone in decibel values (between -6 and 6 dB (mainzone) and -10 and 10 dB (other zones)</li>
  56441. <li><b>direct</b> - indicates if all sound enhancement features are bypassed or not ("on" =&gt; all features are bypassed, "off" =&gt; sound enhancement features are used).</li>
  56442. <li><b>dsp</b> - The current selected DSP mode for sound output</li>
  56443. <li><b>displayBrightness</b> - indicates the brightness reduction of the front display (-4 is the maximum reduction, 0 means no reduction; only available if supported by the device).</li>
  56444. <li><b>enhancer</b> - The status of the internal sound enhancer (can be "on" or "off")</li>
  56445. <li><b>extraBass</b> - The status of the extra bass (can be "auto" or "off", only available if supported by the device)</li>
  56446. <li><b>input</b> - The selected input source according to the FHEM input commands</li>
  56447. <li><b>inputName</b> - The input description as seen on the receiver display</li>
  56448. <li><b>hdmiOut1</b> - The status of the HDMI output 1 (can be "on" or "off")</li>
  56449. <li><b>hdmiOut2</b> - The status of the HDMI output 2 (can be "on" or "off")</li>
  56450. <li><b>mute</b> - Reports the mute status of the receiver or zone (can be "on" or "off")</li>
  56451. <li><b>newFirmware</b> - indicates if a firmware update is available (can be "available" or "unavailable"; only available for RX-Vx71, RX-Vx73, RX-Ax10 or RX-Ax20)</li>
  56452. <li><b>power</b> - Reports the power status of the receiver or zone (can be "on" or "off")</li>
  56453. <li><b>presence</b> - Reports the presence status of the receiver or zone (can be "absent" or "present"). In case of an absent device, it cannot be controlled via FHEM anymore.</li>
  56454. <li><b>partyMode</b> - indicates if the party mode is enabled/disabled for the whole device (in main zone) or if the current zone is enabled for party mode (other zones than main zone)</li>
  56455. <li><b>sleep</b> - indicates if the internal sleep timer is activated or not.</li>
  56456. <li><b>straight</b> - indicates if the internal sound codec converter is bypassed or not (can be "on" or "off")</li>
  56457. <li><b>state</b> - Reports the current power state and an absence of the device (can be "on", "off" or "absent")</li>
  56458. <li><b>surroundDecoder</b> - Reports the selected surround decoder in case of "Surround Decoder" is used as active DSP</li>
  56459. <li><b>tunerFrequency</b> - the current tuner frequency in kHz (AM band) or MHz (FM band)</li>
  56460. <li><b>tunerFrequencyBand</b> - the current tuner band (AM or FM)</li>
  56461. <li><b>treble</b> Reports the current treble tone level of the receiver or zone in decibel values (between -6 and 6 dB (mainzone) and -10 and 10 dB (other zones)</li>
  56462. <li><b>volume</b> - Reports the current volume level of the receiver or zone in percentage values (between 0 and 100 %)</li>
  56463. <li><b>volumeStraight</b> - Reports the current volume level of the receiver or zone in decibel values (between -80.5 and +15.5 dB)</li>
  56464. <li><b>ypaoVolume</b> - The status of the YPAO valume (can be "auto" or "off", only available if supported by the device)</li>
  56465. <br><u>Input dependent Readings/Events:</u><br><br>
  56466. <li><b>currentChannel</b> - Number of the input channel (SIRIUS only)</li>
  56467. <li><b>currentStation</b> - Station name of the current radio station (available only on TUNER, HD RADIO, NET RADIO or PANDORA)</li>
  56468. <li><b>currentStationFrequency</b> - The tuner frequency of the current station (only available on Tuner or HD Radio)</li>
  56469. <li><b>currentAlbum</b> - Album name of the current song</li>
  56470. <li><b>currentArtist</b> - Artist name of the current song</li>
  56471. <li><b>currentTitle</b> - Title of the current song</li>
  56472. <li><b>playStatus</b> - indicates if the input plays music or not</li>
  56473. <li><b>shuffle</b> - indicates the shuffle status for the current input</li>
  56474. <li><b>repeat</b> - indicates the repeat status for the current input</li>
  56475. </ul>
  56476. <br>
  56477. <b>Implementator's note</b><br>
  56478. <ul>
  56479. The module is only usable if you activate "Network Standby" on your receiver. Otherwise it is not possible to communicate with the receiver when it is turned off.
  56480. </ul>
  56481. <br>
  56482. </ul>
  56483. <a name="YAMAHA_BD"></a>
  56484. <h3>YAMAHA_BD</h3>
  56485. <ul>
  56486. <a name="YAMAHA_BDdefine"></a>
  56487. <b>Define</b>
  56488. <ul>
  56489. <code>
  56490. define &lt;name&gt; YAMAHA_BD &lt;ip-address&gt; [&lt;status_interval&gt;]
  56491. <br><br>
  56492. define &lt;name&gt; YAMAHA_BD &lt;ip-address&gt; [&lt;off_status_interval&gt;] [&lt;on_status_interval&gt;]
  56493. </code>
  56494. <br><br>
  56495. This module controls Blu-Ray players from Yamaha via network connection. You are able
  56496. to switch your player on and off, query it's power state,
  56497. control the playback, open and close the tray and send all remote control commands.<br><br>
  56498. Defining a YAMAHA_BD device will schedule an internal task (interval can be set
  56499. with optional parameter &lt;status_interval&gt; in seconds, if not set, the value is 30
  56500. seconds), which periodically reads the status of the player (power state, current disc, tray status,...)
  56501. and triggers notify/filelog commands.
  56502. <br><br>
  56503. Different status update intervals depending on the power state can be given also.
  56504. If two intervals are given to the define statement, the first interval statement represents the status update
  56505. interval in seconds in case the device is off, absent or any other non-normal state. The second
  56506. interval statement is used when the device is on.
  56507. Example:<br><br>
  56508. <ul><code>
  56509. define BD_Player YAMAHA_BD 192.168.0.10
  56510. <br><br>
  56511. # With custom status interval of 60 seconds<br>
  56512. define BD_Player YAMAHA_BD 192.168.0.10 60
  56513. <br><br>
  56514. # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
  56515. define BD_Player YAMAHA_BD 192.168.0.10 60 10
  56516. </code></ul>
  56517. </ul>
  56518. <br><br>
  56519. <a name="YAMAHA_BDset"></a>
  56520. <b>Set </b>
  56521. <ul>
  56522. <code>set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]</code>
  56523. <br><br>
  56524. Currently, the following commands are defined.
  56525. <br><br>
  56526. <ul>
  56527. <li><b>on</b> &nbsp;&nbsp;-&nbsp;&nbsp; powers on the device</li>
  56528. <li><b>off</b> &nbsp;&nbsp;-&nbsp;&nbsp; shuts down the device </li>
  56529. <li><b>tray</b> open,close &nbsp;&nbsp;-&nbsp;&nbsp; open or close the disc tray</li>
  56530. <li><b>statusRequest</b> &nbsp;&nbsp;-&nbsp;&nbsp; requests the current status of the device</li>
  56531. <li><b>remoteControl</b> up,down,... &nbsp;&nbsp;-&nbsp;&nbsp; sends remote control commands as listed in the following chapter</li>
  56532. </ul><br>
  56533. <u>Playback control commands</u>
  56534. <ul>
  56535. <li><b>play</b> &nbsp;&nbsp;-&nbsp;&nbsp; start playing the current media</li>
  56536. <li><b>pause</b> &nbsp;&nbsp;-&nbsp;&nbsp; pause the current media playback</li>
  56537. <li><b>stop</b> &nbsp;&nbsp;-&nbsp;&nbsp; stop the current media playback</li>
  56538. <li><b>skip</b> forward,reverse &nbsp;&nbsp;-&nbsp;&nbsp; skip the current track or chapter</li>
  56539. <li><b>fast</b> forward,reverse &nbsp;&nbsp;-&nbsp;&nbsp; fast forward or reverse playback</li>
  56540. <li><b>slow</b> forward,reverse &nbsp;&nbsp;-&nbsp;&nbsp; slow forward or reverse playback</li>
  56541. <li><b>trickPlay</b> normal,repeatChapter,repeatTitle,... &nbsp;&nbsp;-&nbsp;&nbsp; controls the Trick-Play features</li>
  56542. </ul>
  56543. </ul><br><br>
  56544. <u>Remote control</u><br><br>
  56545. <ul>
  56546. The following commands are available:<br><br>
  56547. <u>Number Buttons (0-9):</u><br><br>
  56548. <ul><code>
  56549. remoteControl 0<br>
  56550. remoteControl 1<br>
  56551. remoteControl 2<br>
  56552. ...<br>
  56553. remoteControl 9<br>
  56554. </code></ul><br><br>
  56555. <u>Cursor Selection:</u><br><br>
  56556. <ul><code>
  56557. remoteControl up<br>
  56558. remoteControl down<br>
  56559. remoteControl left<br>
  56560. remoteControl right<br>
  56561. remoteControl enter<br>
  56562. remoteControl return<br>
  56563. </code></ul><br><br>
  56564. <u>Menu Selection:</u><br><br>
  56565. <ul><code>
  56566. remoteControl OSDonScreen<br>
  56567. remoteControl OSDstatus<br>
  56568. remoteControl popupMenu<br>
  56569. remoteControl topMenu<br>
  56570. remoteControl setup<br>
  56571. remoteControl home<br>
  56572. remoteControl clear<br>
  56573. </code></ul><br><br>
  56574. <u>Color Buttons:</u><br><br>
  56575. <ul><code>
  56576. remoteControl red<br>
  56577. remoteControl green<br>
  56578. remoteControl yellow<br>
  56579. remoteControl blue<br>
  56580. </code></ul><br><br>
  56581. <u>Play Control Buttons:</u><br><br>
  56582. <ul><code>
  56583. remoteControl program<br>
  56584. remoteControl search<br>
  56585. remoteControl repeat<br>
  56586. remoteControl repeat-AB<br>
  56587. remoteControl subtitle<br>
  56588. remoteControl audio<br>
  56589. remoteControl angle<br>
  56590. remoteControl pictureInPicture<br>
  56591. remoteControl secondAudio<br>
  56592. remoteControl secondVideo<br>
  56593. </code></ul><br><br>
  56594. The button names are the same as on your remote control.<br><br>
  56595. </ul>
  56596. <a name="YAMAHA_BDget"></a>
  56597. <b>Get</b>
  56598. <ul>
  56599. <code>get &lt;name&gt; &lt;reading&gt;</code>
  56600. <br><br>
  56601. Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
  56602. <br><br>
  56603. </ul>
  56604. <a name="YAMAHA_BDattr"></a>
  56605. <b>Attributes</b>
  56606. <ul>
  56607. <li><a href="#do_not_notify">do_not_notify</a></li>
  56608. <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
  56609. <li><a name="disable">disable</a></li>
  56610. Optional attribute to disable the internal cyclic status update of the player. Manual status updates via statusRequest command is still possible.
  56611. <br><br>
  56612. Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.<br><br>
  56613. <li><a name="request-timeout">request-timeout</a></li>
  56614. Optional attribute change the response timeout in seconds for all queries to the player.
  56615. <br><br>
  56616. Possible values: 1-5 seconds. Default value is 4 seconds.<br><br>
  56617. </ul>
  56618. <b>Generated Readings/Events:</b><br>
  56619. <ul>
  56620. <li><b>input</b> - The current playback source (e.g. "DISC", "USB", "Network", "YouTube", ...)</li>
  56621. <li><b>discType</b> - The current type of disc, which is inserted (e.g. "No Disc", "CD", "DVD", "BD", ...)</li>
  56622. <li><b>contentType</b> - The current type of content, which is played (e.g. "audio", "video", "photo" or "no contents")</li>
  56623. <li><b>error</b> - indicates an hardware error of the player (can be "none", "fan error" or "usb overcurrent")</li>
  56624. <li><b>power</b> - Reports the power status of the player or zone (can be "on" or "off")</li>
  56625. <li><b>presence</b> - Reports the presence status of the player or zone (can be "absent" or "present"). In case of an absent device, it cannot be controlled via FHEM anymore.</li>
  56626. <li><b>trayStatus</b> - The disc tray status (can be "open" or "close")</li>
  56627. <li><b>trickPlay</b> - The current trickPlay mode</li>
  56628. <li><b>state</b> - Reports the current power state and an absence of the device (can be "on", "off" or "absent")</li>
  56629. <br><br><u>Input dependent Readings/Events:</u><br>
  56630. <li><b>currentChapter</b> - Number of the current DVD/BD Chapter (only at DVD/BD's)</li>
  56631. <li><b>currentMedia</b> - Name of the current file (only at USB)</li>
  56632. <li><b>currentTrack</b> - Number of the current CD-Audio title (only at CD-Audio)</li>
  56633. <li><b>currentTitle</b> - Number of the current title (only at DVD/BD's)</li>
  56634. <li><b>playTimeCurrent</b> - current timecode of played media</li>
  56635. <li><b>playTimeTotal</b> - the total time of the current movie (only at DVD/BD's)</li>
  56636. <li><b>playStatus</b> - indicates if the player plays media or not (can be "play", "pause", "stop", "fast fwd", "fast rev", "slow fwd", "slow rev")</li>
  56637. <li><b>totalTracks</b> - The number of total tracks on inserted CD-Audio</li>
  56638. </ul>
  56639. <br>
  56640. <b>Implementator's note</b><br>
  56641. <ul>
  56642. <li>Some older models (e.g. BD-S671) cannot be controlled over networked by delivery. A <u><b>firmware update is neccessary</b></u> to control these models via FHEM. In general it is always recommended to use the latest firmware.</li>
  56643. <li>The module is only usable if you activate "Network Control" on your player. Otherwise it is not possible to communicate with the player.</li>
  56644. </ul>
  56645. <br>
  56646. </ul>
  56647. <a name="YAMAHA_NP"></a>
  56648. <h3>YAMAHA_NP</h3>
  56649. <ul>
  56650. <a name="YAMAHA_NPdefine"></a>
  56651. <b>Define</b>
  56652. <br><br>
  56653. <ul>
  56654. <code>
  56655. define &lt;name&gt; YAMAHA_NP &lt;ip&ndash;address&gt; [&lt;status_interval&gt;]
  56656. </code>
  56657. <br><br>Alternatively with different two off/on interval definitions (default is 30 seconds).<br><br>
  56658. <code>
  56659. define &lt;name&gt; YAMAHA_NP &lt;ip&ndash;address&gt; [&lt;off_status_interval&gt;] [&lt;on_status_interval&gt;]
  56660. </code>
  56661. <br><br>This FHEM module controls a Yamaha Network Player (such as MCR&ndash;N560, MCR&ndash;N560D, CRX&ndash;N560, CRX&ndash;N560D, CD&ndash;N500 or NP&ndash;S2000) connected to local network.
  56662. <br>Devices implementing the communication protocol of the Yamaha Network Player App for i*S and Andr*id might also work.
  56663. <br><br>
  56664. Example:<br>
  56665. <ul><br>
  56666. <code>
  56667. define NP_Player YAMAHA_NP 192.168.0.15<br>
  56668. attr NP_player webCmd input:selectStream:volume<br><br>
  56669. # With custom status interval of 60 seconds<br>
  56670. define NP_Player YAMAHA_NP 192.168.0.15 <b>60</b><br>
  56671. attr NP_player webCmd input:selectStream:volume<br><br>
  56672. # With custom "off"&ndash;interval of 60 seconds and "on"&ndash;interval of 10 seconds<br>
  56673. define NP_Player YAMAHA_NP 192.168.0.15 <b>60 10</b><br>
  56674. attr NP_player webCmd input:selectStream:volume
  56675. </code>
  56676. </ul>
  56677. </ul>
  56678. <br>
  56679. <a name="YAMAHA_NPset"></a>
  56680. <b>Set</b>
  56681. <ul><br>
  56682. <code>
  56683. set &lt;name&gt; &lt;command&gt; [&lt;parameter&gt;]
  56684. </code>
  56685. <br>
  56686. <br>
  56687. <i>Note: Commands and parameters are case&ndash;sensitive. The module provides available inputs depending on the connected device. Commands are context&ndash;sensitive depending on the current input or action.</i><br>
  56688. <ul>
  56689. <br>
  56690. <u>Available commands:</u><br><br>
  56691. <li><b>CDTray</b> &ndash; open/close the CD tray.</li>
  56692. <li><b>clockUpdate</b> &ndash; updates the system clock with current time. The local time information is taken from the FHEM server.</li>
  56693. <li><b>dimmer</b> < 1..3 > &ndash; Sets the display brightness.</li>
  56694. <li><b>directPlay</b> < input:Stream Level 1,Stream Level 2,... > &ndash; allows direct stream selection e.g. CD:1, DAB:1, netradio:Bookmarks,SWR3 (case&ndash;sensitive)</li>
  56695. <li><b>favoriteDefine</b> < name:input[,Stream Level 1,Stream Level 2,...] > &ndash; defines and stores a favorite stream e.g. CoolSong:CD,1 (predefined favorites are the available inputs)</li>
  56696. <li><b>favoriteDelete</b> < name > &ndash; deletes a favorite stream</li>
  56697. <li><b>favoritePlay</b> < name > &ndash; plays a favorite stream</li>
  56698. <li><b>input</b> [&lt;parameter&gt;] &ndash; selects the input channel. The inputs are read dynamically from the device. Available inputs can be set (e.g. cd, tuner, aux1, aux2, ...).</li>
  56699. <li><b>mute</b> [on|off] &ndash; activates/deactivates muting</li>
  56700. <li><b>off</b> &ndash; shuts down the device </li>
  56701. <li><b>on</b> &ndash; powers on the device</li>
  56702. <li><b>player [&lt;parameter&gt;] </b> &ndash; sets player related commands</li>
  56703. <ul>
  56704. <li><b>play</b> &ndash; play</li>
  56705. <li><b>stop</b> &ndash; stop</li>
  56706. <li><b>pause</b> &ndash; pause</li>
  56707. <li><b>next</b> &ndash; next item</li>
  56708. <li><b>prev</b> &ndash; previous item</li>
  56709. </ul>
  56710. <li><b>playMode [&lt;parameter&gt;] </b> &ndash; sets player mode shuffle or repeat</li>
  56711. <ul>
  56712. <li><b>shuffleAll</b> &ndash; Set shuffle mode</li>
  56713. <li><b>shuffleOff</b> &ndash; Remove shuffle mode</li>
  56714. <li><b>repeatOff</b> &ndash; Set repeat mode Off</li>
  56715. <li><b>repeatOne</b> &ndash; Set repeat mode One</li>
  56716. <li><b>repeatAll</b> &ndash; Set repeat mode All</li>
  56717. </ul>
  56718. <li><b>selectStream</b> &ndash; direct context&ndash;sensitive stream selection depending on the input and available streams. Available streams are read out from device automatically. Depending on the number, this may take some time... (Limited to 999 list entries.) (see also 'maxPlayerLineItems' attribute</li>
  56719. <li><b>sleep</b> [off|30min|60min|90min|120min] &ndash; activates the internal sleep timer</li>
  56720. <li><b>standbyMode</b> [eco|normal] &ndash; set the standby mode</li>
  56721. <li><b>statusRequest [&lt;parameter&gt;] </b> &ndash; requests the current status of the device</li>
  56722. <ul>
  56723. <li><b>basicStatus</b> &ndash; requests the basic status such as volume input etc.</li>
  56724. <li><b>playerStatus</b> &ndash; requests the player status such as play status, song info, artist info etc.</li>
  56725. <li><b>standbyMode</b> &ndash; requests the standby mode information</li>
  56726. <li><b>systemConfig</b> &ndash; requests the system configuration</li>
  56727. <li><b>tunerStatus</b> &ndash; requests the tuner status such as FM frequency, preset number, DAB information etc.</li>
  56728. <li><b>timerStatus</b> &ndash; requests device's internal wake&ndash;up timer status</li>
  56729. <li><b>networkInfo</b> &ndash; requests device's network related information such as IP, Gateway, MAC address etc.</li>
  56730. </ul>
  56731. <li><b>timerSet</b> &ndash; configures the timer according to timerHour, timerMinute, timerRepeat, timerVolume attributes that must be set before. This command does not switch on the timer. &rarr; 'timer on'.)</li>
  56732. <li><b>timer</b> [on|off] &ndash; sets device's internal wake&ndash;up timer. <i><br>(Note: The timer will be activated according to the last stored timer parameters in the device. In order to modify please use the 'timerSet' command.)</i></li>
  56733. <li><b>tunerFMFrequency</b> [87.50 ... 108.00] &ndash; Sets the FM frequency. The value must be 87.50 ... 108.00 including the decimal point ('.') with two following decimals. Otherwise the value will be ignored. Available if input was set to FM.</li>
  56734. <li><b>volume</b> [0...100] &ndash; set the volume level in &#037;</li>
  56735. <li><b>volumeStraight</b> [&lt;VOL_MIN&gt;...&lt;VOL_MAX&gt;] &ndash; set the volume as used and displayed in the device. &lt;VOL_MIN&gt; and &lt;VOL_MAX&gt; are read and set from the device automatically.</li>
  56736. <li><b>volumeUp</b> [&lt;VOL_MIN&gt;...&lt;VOL_MAX&gt;] &ndash; increases the volume by one device's absolute step. &lt;VOL_MIN&gt; and &lt;VOL_MAX&gt; are read and set from the device automatically.</li>
  56737. <li><b>volumeDown</b> [&lt;VOL_MIN&gt;...&lt;VOL_MAX&gt;] &ndash; increases the volume by one device's absolute step. &lt;VOL_MIN&gt; and &lt;VOL_MAX&gt; are read and set from the device automatically.</li>
  56738. </ul>
  56739. </ul>
  56740. <br>
  56741. <a name="YAMAHA_NPget"></a>
  56742. <b>Get</b>
  56743. <ul>
  56744. <code>
  56745. get &lt;name&gt; &lt;reading&gt;
  56746. </code>
  56747. <br><br>
  56748. The 'get' command returns reading values. Readings are context&ndash;sensitive depending on the current input or action taken.<br><br>
  56749. </ul>
  56750. <a name="YAMAHA_NPattr"></a>
  56751. <b>Attributes</b><br><br>
  56752. <ul>
  56753. <ul>
  56754. <li><b>.DABList</b> &ndash; (internal) attribute used for DAB preset storage.</li>
  56755. <li><b>.favoriteList</b> &ndash; (internal) attribute used for favorites storage.</li>
  56756. <li><b>autoUpdatePlayerReadings</b> &ndash; optional attribute for auto refresh of player related readings (default is 1).</li>
  56757. <li><b>autoUpdatePlayerlistReadings</b> &ndash; optional attribute for auto scanning of the playerlist content (default is 1). (Due to the playerlist information transfer concept this function might slow down the reaction time of the Yamaha App when used at the same time.)</li>
  56758. <li><b>autoUpdateTunerReadings</b> &ndash; optional attribute for auto refresh of tuner related readings (default is 1).</li>
  56759. <li><b>directPlaySleepNetradio</b> &ndash; optional attribute to define a sleep time between two netradio requests to the vTuner server while using the directPlay command. Increase in case of slow internet connection (default is 5 seconds).</li>
  56760. <li><b>directPlaySleepServer</b> &ndash; optional attribute to define a sleep time between two multimedia server requests while using the directPlay command. Increase in case of slow server connection (default is 2 seconds).</li>
  56761. <li><b>disable</b> &ndash; optional attribute to disable the internal cyclic status update of the NP. Manual status updates via statusRequest command is still possible. Possible values: 0 &rarr; perform cyclic status update, 1 &rarr; don't perform cyclic status updates (default is 1).</li>
  56762. <li><b>do_not_notify</b></li>
  56763. <li><b>maxPlayerListItems</b> &ndash; optional attribute to limit the max number of player list items (default is 999).</li>
  56764. <li><b>readingFnAttributes</b></li><br>
  56765. <li><b>requestTimeout</b> &ndash; optional attribute change the response timeout in seconds for all queries to the receiver. Possible values: 1...5 seconds (default value is 4).</li>
  56766. <li><b>searchAttempts</b> &ndash; optional attribute used by the directPlay command defining the max. number of finding the provided directory content tries before giving up. Possible values: 15...100 (default is 15).</li>
  56767. <li><b>smoothVolumeChange</b> &ndash; optional attribute for smooth volume change (significantly more Ethernet traffic is generated during volume change if set to 1) (default is 1).</li>
  56768. <li><b>timerHour</b> [0...23] &ndash; sets hour of device's internal wake&ndash;up timer</li>
  56769. <li><b>timerMinute</b> [0...59] &ndash; sets minutes of device's internal wake&ndash;up timer</li>
  56770. <li><b>timerRepeat</b> [once|every] &ndash; sets repetition mode of device's internal wake&ndash;up timer</li>
  56771. <li><b>timerVolume</b> [&lt;VOL_MIN&gt;...&lt;VOL_MAX&gt;] &ndash; sets volume of device's internal wake&ndash;up timer.</li>
  56772. <br>
  56773. </ul>
  56774. </ul>
  56775. <b>Readings</b><br>
  56776. <ul>
  56777. <ul>
  56778. <br><u>General readings:</u><br><br>
  56779. <li><b>deviceInfo</b> &ndash; Reports device specific grouped information such as uuid, ip address, etc.</li>
  56780. <li><b>favoriteList</b> &ndash; Reports stored favorites</li>
  56781. <li><b>reading [reading]</b> &ndash; Reports readings values</li>
  56782. <ul><br>
  56783. <li>.volumeStraightMax &ndash; device specific maximum volume</li>
  56784. <li>.volumeStraightMin &ndash; device specific minimum volume</li>
  56785. <li>.volumeStraightStep &ndash; device specific volume in&#47;decrement step</li>
  56786. <li>audioSource &ndash; consolidated audio stream information with currently selected input, player status (if used) and volume muting information (off|reading status...|input [(play|stop|pause[, muted])]])</li>
  56787. <li>directPlay &ndash; status of directPlay command</li>
  56788. <li>input &ndash; currently selected input</li>
  56789. <li>mute &ndash; mute status on/off</li>
  56790. <li>power &ndash; current device status on/off</li>
  56791. <li>presence &ndash; presence status of the device (present|absent)</li>
  56792. <li>selectStream &ndash; status of the selectStream command</li>
  56793. <li>sleep &ndash; sleep timer value (off|30 min|60 min|90 min|120 min)</li>
  56794. <li>standbyMode &ndash; status of the standby mode (normal|eco)</li>
  56795. <li>state &ndash; current state information (on|off)</li>
  56796. <li>volume &ndash; relative volume (0...100)</li>
  56797. <li>volumeStraight &ndash; device specific absolute volume [&lt;VOL_MIN&gt;...&lt;VOL_MAX&gt;]</li>
  56798. </ul>
  56799. <br><u>Player related readings:</u><br><br>
  56800. <li><b>playerAlbumArtFormat</b> &ndash; Reports the album art format (if available) of the currently played audio</li>
  56801. <li><b>playerAlbumArtID</b> &ndash; Reports the album art ID (if available) of the currently played audio</li>
  56802. <li><b>playerAlbumArtURL</b> &ndash; Reports the album art url (if available) of the currently played audio. The URL points to the network player</li>
  56803. <li><b>playerDeviceType</b> &ndash; Reports the device type (ipod|msc)</li>
  56804. <li><b>playerIpodMode</b> &ndash; Reports the Ipod Mode (normal|off)</li>
  56805. <li><b>playerAlbum</b> &ndash; Reports the album (if available) of the currently played audio</li>
  56806. <li><b>playerArtist</b> &ndash; Reports the artist (if available) of the currently played audio</li>
  56807. <li><b>playerSong</b> &ndash; Reports the song name (if available) of the currently played audio</li>
  56808. <li><b>playerPlayTime</b> &ndash; Reports the play time of the currently played audio (HH:MM:SS)</li>
  56809. <li><b>playerTrackNb</b> &ndash; Reports the track number of the currently played audio</li>
  56810. <li><b>playerPlaybackInfo</b> &ndash; Reports current player state (play|stop|pause)</li>
  56811. <li><b>playerRepeat</b> &ndash; Reports the Repeat Mode (one|all|off)</li>
  56812. <li><b>playerShuffle</b> &ndash; Reports the Shuffle Mode (on|off)</li>
  56813. <li><b>playerTotalTracks</b> &ndash; Reports the total number of tracks for playing</li>
  56814. <br><u>Player list (menu) related readings:</u><br><br>
  56815. <li>listItem_XXX &ndash; Reports the content of the device's current directory. Prefix 'c_' indicates a container (directory), prefix 'i_' an item (audio file/stream). Number of lines can be limited by the attribute 'maxPlayerLineItems' (default is 999).</li>
  56816. <li>lvlX_ &ndash; Reports the hierarchical directory tree level.</li>
  56817. <br><u>Tuner related readings:</u><br><br>
  56818. <li>listItem_XXX &ndash; Reports the stored presets.</li>
  56819. <li>tunerBand &ndash; Reports the tuner band (DAB|FM)</li>
  56820. <br>
  56821. <li>DAB</li>
  56822. <ul><li>tunerDABStation &ndash; (DAB|DAB+), Channel: (value), Ensemble: (name)</li></ul>
  56823. <ul><li>tunerDABSignal &ndash; (Frequency), (Signal quality), (Bitrate), (Mono|Stereo)</li></ul>
  56824. <ul><li>tunerInfo1 &ndash; DAB program service</li></ul>
  56825. <ul><li>tunerPreset &ndash; (Preset number DAB Frequency Station) or '&ndash;' if not stored as preset</li></ul>
  56826. <ul><li>tunerStation &ndash; DAB Station Name</li></ul>
  56827. <br>
  56828. <li>FM</li>
  56829. <ul><li>tunerFrequency &ndash; FM frequency</li></ul>
  56830. <ul><li>tunerInfo1 &ndash; FM station name</li></ul>
  56831. <ul><li>tunerInfo2_A &ndash; Additional RDS information A</li></ul>
  56832. <ul><li>tunerInfo2_A &ndash; Additional RDS information B</li></ul>
  56833. <ul><li>tunerPreset &ndash; (Preset number FM Frequency Station) or '&ndash;' if not stored as preset</li></ul>
  56834. <br><u>Timer related readings:</u><br><br>
  56835. <li>timer &ndash; current timer status (on|off)</li>
  56836. <li>timerRepeat &ndash; timer repeat mode (once|every)</li>
  56837. <li>timerStartTime &ndash; timer start time HH:MM</li>
  56838. <li>timerVolume &ndash; timer volume [&lt;VOL_MIN&gt;...&lt;VOL_MAX&gt;]</li>
  56839. </ul>
  56840. </ul>
  56841. </ul>
  56842. <a name="ZWCUL"></a>
  56843. <h3>ZWCUL</h3>
  56844. <ul>
  56845. This module serves a CUL in ZWave mode (starting from culfw version 1.66),
  56846. which is attached via USB or TCP/IP, and enables the use of ZWave devices
  56847. (see also the <a href="#ZWave">ZWave</a> module).
  56848. <br><br>
  56849. <a name="ZWCULdefine"></a>
  56850. <b>Define</b>
  56851. <ul>
  56852. <code>define &lt;name&gt; ZWCUL &lt;device&gt; &lt;homeId&gt;
  56853. &lt;ctrlId&gt;</code>
  56854. <br>
  56855. <br>
  56856. Since the DevIo module is used to open the device, you can also use devices
  56857. connected via TCP/IP. See <a href="#CULdefine">this</a> paragraph on device
  56858. naming details.
  56859. <br>
  56860. Example:
  56861. <ul>
  56862. <code>define ZWCUL_1 ZWCUL /dev/cu.usbmodemfa141@9600 12345678 01</code><br>
  56863. </ul>
  56864. If the homeId is set to 00000000, then culfw will enter monitor mode, i.e. no
  56865. acks for received messages will be sent, and no homeId filtering will be done.
  56866. </ul>
  56867. <br>
  56868. <a name="ZWCULset"></a>
  56869. <b>Set</b>
  56870. <ul>
  56871. <li>reopen<br>
  56872. First close and then open the device. Used for debugging purposes.
  56873. </li>
  56874. <li>led [on|off|blink]<br>
  56875. Set the LED on the CUL.
  56876. </li>
  56877. <li>raw<br>
  56878. send a raw string to culfw
  56879. </li>
  56880. <li>addNode [on|onSec|off]<br>
  56881. Activate (or deactivate) inclusion mode. The CUL will switch to dataRate
  56882. 9600 until terminating this mode with off, or a node is included. If onSec
  56883. is specified, the ZWCUL networkKey ist set, and the device supports the
  56884. SECURITY class, then a secure inclusion is attempted. </li>
  56885. <li>addNodeId &lt;decimalNodeId&gt;<br>
  56886. Activate inclusion mode, and assign decimalNodeId to the next node.
  56887. To deactivate this mode, use addNode off. Note: addNode won't work for a
  56888. FHEM2FHEM:RAW attached ZWCUL, use addNodeId instead</li>
  56889. <li>removeNode [onNw|on|off]<br>
  56890. Activate (or deactivate) exclusion mode. Like with addNode, the CUL will
  56891. switch temporarily to dataRate 9600, potentially missing some packets sent
  56892. on higher dataRates. Note: the corresponding fhem device have to be
  56893. deleted manually.</li>
  56894. </ul>
  56895. <br>
  56896. <a name="ZWCULget"></a>
  56897. <b>Get</b>
  56898. <ul>
  56899. <li>homeId<br>
  56900. return the homeId and the ctrlId of the controller.</li>
  56901. <li>nodeInfo<br>
  56902. return node specific information. Needed by developers only.</li>
  56903. <li>raw<br>
  56904. Send raw data to the controller.</li>
  56905. </ul>
  56906. <br>
  56907. <a name="ZWCULattr"></a>
  56908. <b>Attributes</b>
  56909. <ul>
  56910. <li><a name="dataRate">dataRate</a> [40k|100k|9600]<br>
  56911. specify the data rate.
  56912. </li>
  56913. <li><a href="#dummy">dummy</a></li>
  56914. <li><a href="#do_not_notify">do_not_notify</a></li>
  56915. <li><a href="#model">model</a></li>
  56916. <li><a href="#disable">disable</a></li>
  56917. <li><a href="#networkKey">networkKey</a></li>
  56918. <li><a name="intruderMode">intruderMode</a><br>
  56919. In monitor mode (see above) events are not dispatched to the ZWave module
  56920. per default. Setting this attribute will allow to get decoded messages,
  56921. and to send commands to devices not included by this controller.
  56922. </li>
  56923. <li>verbose<br>
  56924. If the verbose attribute of this device (not global!) is set to 5 or
  56925. higher, then detailed logging of the RF message will be done.
  56926. </li>
  56927. </ul>
  56928. <br>
  56929. <a name="ZWCULevents"></a>
  56930. <b>Generated events: TODO</b>
  56931. </ul>
  56932. <a name="ZWDongle"></a>
  56933. <h3>ZWDongle</h3>
  56934. <ul>
  56935. This module serves a ZWave dongle, which is attached via USB or TCP/IP, and
  56936. enables the use of ZWave devices (see also the <a href="#ZWave">ZWave</a>
  56937. module). It was tested wit a Goodway WD6001, but since the protocol is
  56938. standardized, it should work with other devices too. A notable exception is
  56939. the USB device from Merten.
  56940. <br><br>
  56941. <a name="ZWDongledefine"></a>
  56942. <b>Define</b>
  56943. <ul>
  56944. <code>define &lt;name&gt; ZWDongle &lt;device&gt;</code>
  56945. <br>
  56946. <br>
  56947. Upon initial connection the module will get the homeId of the attached
  56948. device. Since the DevIo module is used to open the device, you can also use
  56949. devices connected via TCP/IP. See <a href="#CULdefine">this</a> paragraph on
  56950. device naming details.
  56951. <br>
  56952. Example:
  56953. <ul>
  56954. <code>define zwdongle_1 ZWDongle /dev/cu.PL2303-000014FA@115200</code><br>
  56955. </ul>
  56956. </ul>
  56957. <br>
  56958. <a name="ZWDongleset"></a>
  56959. <b>Set</b>
  56960. <ul>
  56961. <li>addNode on|onNw|onSec|onNwSec|off<br>
  56962. Activate (or deactivate) inclusion mode. The controller (i.e. the dongle)
  56963. will accept inclusion (i.e. pairing/learning) requests only while in this
  56964. mode. After activating inclusion mode usually you have to press a switch
  56965. three times within 1.5 seconds on the node to be included into the network
  56966. of the controller. If autocreate is active, a fhem device will be created
  56967. after inclusion. "on" activates standard inclusion. "onNw" activates network
  56968. wide inclusion (only SDK 4.5-4.9, SDK 6.x and above).<br>
  56969. If onSec/onNwSec is specified, the ZWDongle networkKey ist set, and the
  56970. device supports the SECURITY class, then a secure inclusion is attempted.
  56971. </li>
  56972. <li>backupCreate 16k|32k|64k|128k|256k<br>
  56973. read out the NVRAM of the ZWDongle, and store it in a file called
  56974. &lt;ZWDongle_Name&gt;.bin in the modpath folder. Since the size of the
  56975. NVRAM is currently unknown to FHEM, you have to specify the size. The
  56976. ZWave.me ZME_UZB1 Stick seems to have 256k of NVRAM. Note: writing the file
  56977. takes some time, usually about 10s for each 64k (and significantly longer
  56978. on Windows), and FHEM is blocked during this time.
  56979. </li>
  56980. <li>backupRestore<br>
  56981. Restore the file created by backupCreate. Restoring the file takes about
  56982. the same time as saving it, and FHEM is blocked during this time.
  56983. Note / Important: this function is not yet tested for older devices using
  56984. the MEMORY functions.
  56985. </li>
  56986. <li>controllerChange on|stop|stopFailed<br>
  56987. Add a controller to the current network and transfer role as primary to it.
  56988. Invoking controller is converted to secondary.<br>
  56989. stop: stop controllerChange<br>
  56990. stopFailed: stop controllerChange and report an error
  56991. </li>
  56992. <li>createNewPrimary on|stop|stopFailed<br>
  56993. Add a controller to the current network as a replacement for an old
  56994. primary. Command can be invoked only by a secondary configured as basic
  56995. SUC<br>
  56996. stop: stop createNewPrimary<br>
  56997. stopFailed: stop createNewPrimary and report an error
  56998. </li>
  56999. <li>createNode &lt;device&gt;<br>
  57000. createNodeSec &lt;device&gt;<br>
  57001. Request the class information for the specified node, and create
  57002. a FHEM device upon reception of the answer. Used to create FHEM devices for
  57003. nodes included with another software or if the fhem.cfg got lost. For the
  57004. node id see the get nodeList command below. Note: the node must be "alive",
  57005. i.e. for battery based devices you have to press the "wakeup" button 1-2
  57006. seconds before entering this command in FHEM.<br>
  57007. &lt;device&gt; is either device name or decimal nodeId.<br>
  57008. createNodeSec assumes a secure inclusion, see the comments for "addNode
  57009. onSec" for details.
  57010. </li>
  57011. <li>factoryReset yes<br>
  57012. Reset controller to default state.
  57013. Erase all node and routing infos, assign a new random homeId.
  57014. To control a device it must be re-included and re-configured.<br>
  57015. !Use this with care AND only if You know what You do!<br>
  57016. Note: the corresponding FHEM devices have to be deleted manually.
  57017. </li>
  57018. <li>learnMode on|onNw|disable<br>
  57019. Add or remove controller to/from an other network.
  57020. Assign a homeId, nodeId and receive/store nodeList and routing infos.
  57021. </li>
  57022. <li>removeFailedNode &lt;device&gt;<br>
  57023. Remove non-responding node -that must be on the failed node list-
  57024. from the routing table in controller. Instead, always use removeNode if
  57025. possible. Note: the corresponding FHEM device have to be deleted
  57026. manually.<br>
  57027. &lt;device&gt; is either device name or decimal nodeId.
  57028. </li>
  57029. <li>removeNode onNw|on|off<br>
  57030. Activate (or deactivate) exclusion mode. "on" activates standard exclusion.
  57031. "onNw" activates network wide exclusion (only SDK 4.5-4.9, SDK 6.x and
  57032. above). Note: the corresponding FHEM device have to be deleted
  57033. manually.
  57034. </li>
  57035. <li>reopen<br>
  57036. First close and then open the device. Used for debugging purposes.
  57037. </li>
  57038. <li>replaceFailedNode &lt;device&gt;<br>
  57039. Replace a non-responding node with a new one. The non-responding node
  57040. must be on the failed node list.<br>
  57041. &lt;device&gt; is either device name or decimal nodeId.
  57042. </li>
  57043. <li>routeFor &lt;device&gt; &lt;hop1&gt; &lt;hop2&gt; &lt;hop3&gt;
  57044. &lt;hop4&gt; &lt;speed&gt;<br>
  57045. set priority routing for &ltdevice&gt. &ltdevice&gt and &lt;hopN&gt are
  57046. either device name or decimal nodeId or 0 for unused.<br>
  57047. &lt;speed&gt;: 1=9,6kbps; 2=40kbps; 3=100kbps
  57048. </li>
  57049. <li>sendNIF &lt;device&gt;<br>
  57050. Send NIF to the specified &lt;device&g.
  57051. &lt;device&gt; is either device name or decimal nodeId.
  57052. </li>
  57053. <li>sucNodeId &lt;decimal nodeId&gt; &lt;sucState&gt;
  57054. &lt;capabilities&gt;<br>
  57055. Configure a controller node to be a SUC/SIS or not.<br>
  57056. &lt;nodeId&gt;: decimal nodeId to be SUC/SIS<br>
  57057. &lt;sucState&gt;: 0 = deactivate; 1 = activate<br>
  57058. &lt;capabilities&gt;: 0 = basic SUC; 1 = SIS
  57059. </li>
  57060. <li>sucRequestUpdate &lt;decimal nodeId of SUC/SIS&gt;<br>
  57061. Request network updates from SUC/SIS. Primary do not need it.
  57062. </li>
  57063. <li>sucSendNodeId &lt;decimal nodeId&gt;<br>
  57064. Send SUC/SIS nodeId to the specified decimal controller nodeId.
  57065. </li>
  57066. </ul>
  57067. <br>
  57068. <a name="ZWDongleget"></a>
  57069. <b>Get</b>
  57070. <ul>
  57071. <li>homeId<br>
  57072. return the six hex-digit homeId of the controller.
  57073. </li>
  57074. <li>backgroundRSSI<br>
  57075. query the measured RSSI on the Z-Wave network
  57076. </li>
  57077. <li>caps, ctrlCaps, version<br>
  57078. return different controller specific information. Needed by developers
  57079. only.
  57080. </li>
  57081. <li>isFailedNode &lt;device&gt;<br>
  57082. return if a node is stored in the failed node list. &lt;device&gt; is
  57083. either device name or decimal nodeId.
  57084. </li>
  57085. <li>neighborList [excludeDead] [onlyRep] &lt;device&gt;<br>
  57086. return neighborList of the &lt;device&gt;.<br>
  57087. &lt;device&gt; is either device name or decimal nodeId.<br>
  57088. With onlyRep the result will include only nodes with repeater
  57089. functionality.
  57090. </li>
  57091. <li>nodeInfo &lt;device&gt;<br>
  57092. return node specific information. &lt;device&gt; is either device name or
  57093. decimal nodeId.
  57094. </li>
  57095. <li>nodeList<br>
  57096. return the list of included nodenames or UNKNOWN_id (decimal id), if there
  57097. is no corresponding device in FHEM. Can be used to recreate FHEM-nodes with
  57098. the createNode command.
  57099. </li>
  57100. <li>random &lt;N&gt;<br>
  57101. request &lt;N&gt; random bytes from the controller.
  57102. </li>
  57103. <li>raw &lt;hex&gt;<br>
  57104. Send raw data &lt;hex&gt; to the controller. Developer only.
  57105. </li>
  57106. <li>routeFor &lt;device&gt;<br>
  57107. request priority routing for &lt;device&gt;. &lt;device&gt; is either
  57108. device name or decimal nodeId.</li>
  57109. <li>sucNodeId<br>
  57110. return the currently registered decimal SUC nodeId.
  57111. </li>
  57112. </ul>
  57113. <br>
  57114. <a name="ZWDongleattr"></a>
  57115. <b>Attributes</b>
  57116. <ul>
  57117. <li><a href="#dummy">dummy</a></li>
  57118. <li><a href="#do_not_notify">do_not_notify</a></li>
  57119. <li><a href="#model">model</a></li>
  57120. <li><a href="#disable">disable</a></li>
  57121. <li><a name="helpSites">helpSites</a><br>
  57122. Comma separated list of Help Sites to get device pictures from or to
  57123. show a link to in the detailed window. Valid values are pepper
  57124. and alliance.
  57125. </li>
  57126. <li><a name="homeId">homeId</a><br>
  57127. Stores the homeId of the dongle. Is a workaround for some buggy dongles,
  57128. wich sometimes report a wrong/nonexisten homeId (Forum #35126)</li>
  57129. <li><a name="networkKey">networkKey</a><br>
  57130. Needed for secure inclusion, hex string with length of 32
  57131. </li>
  57132. <li><a name="neighborListPos">neighborListPos</a><br>
  57133. Used by the "Show neighbor map" function in the FHEMWEB ZWDongle detail
  57134. screen to store the position of the box.
  57135. </li>
  57136. <li><a name="neighborListFmt">neighborListFmt</a><br>
  57137. Used by the "Show neighbor map" function in the FHEMWEB ZWDongle detail
  57138. screen. The value is a perl hash, specifiying the values for the keys
  57139. txt, img and title. In the value each word is replaced by the
  57140. corresponding Internal, Reading or Attribute of the device, if there is
  57141. one to replace. Default is
  57142. <ul><code>
  57143. { txt=>"NAME", img=>"IMAGE", title=>"Time to ack: timeToAck" }
  57144. </code></ul>
  57145. </li>
  57146. <li><a name="showSetInState">showSetInState</a><br>
  57147. If the attribute is set to 1, and a user issues a set command to a ZWave
  57148. device, then the state of the ZWave device will be changed to
  57149. set_&lt;cmd&gt; first, and after the ACK from the device is received, to
  57150. &lt;cmd&gt;. E.g.: Issuing the command on changes the state first to
  57151. set_on, and after the device ack is received, to on. This is analoguos
  57152. to the CUL_HM module. Default for this attribute is 0.
  57153. </li>
  57154. </ul>
  57155. <br>
  57156. <a name="ZWDongleevents"></a>
  57157. <b>Generated events:</b>
  57158. <ul>
  57159. <br><b>General</b>
  57160. <li>UNDEFINED ZWave_${type6}_$id ZWave $homeId $id $classes</li>
  57161. <li>ZW_APPLICATION_UPDATE addDone $nodeId</li>
  57162. <li>ZW_APPLICATION_UPDATE deleteDone $nodeId</li>
  57163. <li>ZW_APPLICATION_UPDATE sudId $nodeId</li>
  57164. <br><b>addNode</b>
  57165. <li>ZW_ADD_NODE_TO_NETWORK [learnReady|nodeFound|slave|controller|
  57166. done|failed]</li>
  57167. <br><b>controllerChange</b>
  57168. <li>ZW_CONTROLLER_CHANGE [learnReady|nodeFound|controller|done|failed]</li>
  57169. <br><b>createNewPrimary</b>
  57170. <li>ZW_CREATE_NEW_PRIMARY [learnReady|nodeFound|controller|done|failed]</li>
  57171. <br><b>factoryReset</b>
  57172. <li>ZW_SET_DEFAULT [done]</li>
  57173. <br><b>learnMode</b>
  57174. <li>ZW_SET_LEARN_MODE [started|done|failed|deleted]</li>
  57175. <br><b>neighborUpdate</b>
  57176. <li>ZW_REQUEST_NODE_NEIGHBOR_UPDATE [started|done|failed]</li>
  57177. <br><b>removeFailedNode</b>
  57178. <li>ZW_REMOVE_FAILED_NODE_ID
  57179. [failedNodeRemoveStarted|notPrimaryController|noCallbackFunction|
  57180. failedNodeNotFound|failedNodeRemoveProcessBusy|
  57181. failedNodeRemoveFail|nodeOk|nodeRemoved|nodeNotRemoved]</li>
  57182. <br><b>removeNode</b>
  57183. <li>ZW_REMOVE_NODE_FROM_NETWORK
  57184. [learnReady|nodeFound|slave|controller|done|failed]</li>
  57185. <br><b>replaceFailedNode</b>
  57186. <li>ZW_REPLACE_FAILED_NODE
  57187. [failedNodeRemoveStarted|notPrimaryController|noCallbackFunction|
  57188. failedNodeNotFound|failedNodeRemoveProcessBusy|
  57189. failedNodeRemoveFail|nodeOk|failedNodeReplace|
  57190. failedNodeReplaceDone|failedNodeRemoveFailed]</li>
  57191. <br><b>routeFor</b>
  57192. <li>ZW_SET_PRIORITY_ROUTE node $nodeId result $nr</li>
  57193. <br><b>sucNetworkUpdate</b>
  57194. <li>ZW_REQUEST_NETWORK_UPDATE [started|selfOrNoSUC|done|abort|wait|diabled|
  57195. overflow]</li>
  57196. <br><b>sucNodeId</b>
  57197. <li>ZW_SET_SUC_NODE_ID [ok|failed|callbackSucceeded|callbackFailed]</li>
  57198. <br><b>sucRouteAdd</b>
  57199. <li>ZW_ASSIGN_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
  57200. transmitNoAck|transmitFail|transmitNotIdle|
  57201. transmitNoRoute]</li>
  57202. <br><b>sucRouteDel</b>
  57203. <li>ZW_DELETE_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
  57204. transmitNoAck|transmitFail|transmitNotIdle|
  57205. transmitNoRoute]</li>
  57206. <br><b>sucSendNodeId</b>
  57207. <li>ZW_SEND_SUC_ID [started|alreadyActive|transmitOk|
  57208. transmitNoAck|transmitFail|transmitNotIdle|
  57209. transmitNoRoute]</li>
  57210. </ul>
  57211. </ul>
  57212. <a name="ZWave"></a>
  57213. <h3>ZWave</h3>
  57214. <ul>
  57215. This module is used to control ZWave devices via FHEM, see <a
  57216. href="http://www.z-wave.com">www.z-wave.com</a> for details for this device
  57217. family. The full specification of ZWave command classes can be found here:
  57218. <a href="http://zwavepublic.com/specifications"
  57219. title="website with the full specification of ZWave command classes">
  57220. http://zwavepublic.com/specifications</a>.
  57221. This module is a client of the <a href="#ZWDongle">ZWDongle</a>
  57222. module, which is directly attached to the controller via USB or TCP/IP. To
  57223. use the SECURITY features, the Crypt-Rijndael perl module is needed.
  57224. <br><br>
  57225. <a name="ZWavedefine"></a>
  57226. <b>Define</b>
  57227. <ul>
  57228. <code>define &lt;name&gt; ZWave &lt;homeId&gt; &lt;id&gt; [classes]</code>
  57229. <br>
  57230. <br>
  57231. &lt;homeId&gt; is the homeId of the controller node, and id is the id of the
  57232. slave node in the network of this controller.<br>
  57233. classes is a hex-list of ZWave device classes. This argument is usually
  57234. specified by autocreate when creating a device. If you wish to manually
  57235. create a device, use the classes attribute instead, see below for details.
  57236. Defining a ZWave device the first time is usually done by autocreate.
  57237. <br>
  57238. Example:
  57239. <ul>
  57240. <code>define lamp ZWave 00ce2074 9</code><br>
  57241. <code>attr lamp classes SWITCH_BINARY BASIC MANUFACTURER_SPECIFIC VERSION
  57242. SWITCH_ALL ASSOCIATION METER CONFIGURATION ALARM</code><br>
  57243. </ul>
  57244. </ul>
  57245. <br>
  57246. Note: the sets/gets/generated events of a given node depend on the classes
  57247. supported by this node. If a node supports 3 classes, then the union of
  57248. these sets/gets/events will be available for this node.<br>
  57249. Commands for battery operated nodes will be queued internally, and sent when
  57250. the node sends a message. Answers to get commands appear then as events, the
  57251. corresponding readings will be updated.
  57252. <br><br>
  57253. <a name="ZWaveset"></a>
  57254. <b>Set</b>
  57255. <ul>
  57256. <br>
  57257. <b>Notes</b>:
  57258. <ul>
  57259. <li>devices with on/off functionality support the <a
  57260. href="#setExtensions"> set extensions</a>.</li>
  57261. <li>A set command does not automatically update the corresponding reading,
  57262. you have to execute a get for this purpose. This can be automatically
  57263. done via a notify, although this is not recommended in all cases.</li>
  57264. </ul>
  57265. <br><br><b>All</b>
  57266. <li>neighborUpdate<br>
  57267. Requests controller to update its routing table which is based on
  57268. slave's neighbor list. The update may take significant time to complete.
  57269. With the event "done" or "failed" ZWDongle will notify the end of the
  57270. update process. To read node's neighbor list see neighborList get
  57271. below.</li>
  57272. <li>returnRouteAdd &lt;decimal nodeId&gt;<br>
  57273. Assign up to 4 static return routes to the routing/enhanced slave to
  57274. allow direct communication to &lt;decimal nodeId&gt;. (experts only)</li>
  57275. <li>returnRouteDel<br>
  57276. Delete all static return routes. (experts only)</li>
  57277. <li>sucRouteAdd<br>
  57278. Inform the routing/enhanced slave of the presence of a SUC/SIS. Assign
  57279. up to 4 static return routes to SUC/SIS.</li>
  57280. <li>sucRouteDel<br>
  57281. Delete static return routes to SUC/SIS node.</li>
  57282. <br><br><b>Class ALARM</b>
  57283. <li>alarmnotification &lt;alarmType&gt; (on|off)<br>
  57284. Enable (on) or disable (off) the sending of unsolicited reports for
  57285. the alarm type &lt;alarmType&gt;. A list of supported alarm types of the
  57286. device can be obtained with the alarmTypeSupported command. The
  57287. name of the alarm type is case insensitive. Sending of an unsolicited
  57288. notification only works for associated nodes, broadcasting is not
  57289. allowed, so associations have to be set up. This command is
  57290. specified in version 2.</li>
  57291. <li> Note:<br>
  57292. The name of the class ALARM was renamed to NOTIFICATION in
  57293. version 3 of the Zwave specification. Due to backward compatibility
  57294. reasons the class will be always referenced as ALARM in FHEM,
  57295. regardless of the version.</li>
  57296. <br><br><b>Class ASSOCIATION</b>
  57297. <li>associationAdd groupId nodeId ...<br>
  57298. Add the specified list of nodeIds to the association group groupId.<br> Note:
  57299. upon creating a FHEM-device for the first time FHEM will automatically add
  57300. the controller to the first association group of the node corresponding to
  57301. the FHEM device, i.e it issues a "set name associationAdd 1
  57302. controllerNodeId"</li>
  57303. <li>associationDel groupId nodeId ...<br>
  57304. Remove the specified list of nodeIds from the association group groupId.</li>
  57305. <br><br><b>Class BASIC</b>
  57306. <li>basicValue value<br>
  57307. Send value (0-255) to this device. The interpretation is device dependent,
  57308. e.g. for a SWITCH_BINARY device 0 is off and anything else is on.</li>
  57309. <li>basicValue value<br>
  57310. Alias for basicValue, to make mapping from the incoming events easier.
  57311. </li>
  57312. <br><br><b>Class BARRIER_OPERATOR</b>
  57313. <li>barrierClose<br>
  57314. start closing the barrier.</li>
  57315. <li>barrierOpen<br>
  57316. start opening the barrier.
  57317. </li>
  57318. <br><br><b>Class BASIC_WINDOW_COVERING</b>
  57319. <li>coveringClose<br>
  57320. Starts closing the window cover. Moving stops if blinds are fully closed or
  57321. a coveringStop command was issued.
  57322. </li>
  57323. <li>coveringOpen<br>
  57324. Starts opening the window cover. Moving stops if blinds are fully open or
  57325. a coveringStop command was issued.
  57326. </li>
  57327. <li>coveringStop<br>
  57328. Stop moving the window cover. Blinds are partially open (closed).
  57329. </li>
  57330. <br><br><b>Class CLIMATE_CONTROL_SCHEDULE</b>
  57331. <li>ccs [mon|tue|wed|thu|fri|sat|sun] HH:MM tempDiff HH:MM tempDiff ...<br>
  57332. set the climate control schedule for the given day.<br>
  57333. Up to 9 pairs of HH:MM tempDiff may be specified.<br>
  57334. HH:MM must occur in increasing order.
  57335. tempDiff is relative to the setpoint temperature, and may be between -12
  57336. and 12, with one decimal point, measured in Kelvin (or Centigrade).<br>
  57337. If only a weekday is specified without any time and tempDiff, then the
  57338. complete schedule for the specified day is removed and marked as unused.
  57339. </li>
  57340. <li>ccsOverride (no|temporary|permanent) (frost|energy|$tempOffset) <br>
  57341. set the override state<br>
  57342. no: switch the override off<br>
  57343. temporary: override the current schedule only<br>
  57344. permanent: override all schedules<br>
  57345. frost/energy: set override mode to frost protection or energy saving<br>
  57346. $tempOffset: the temperature setback (offset to setpoint) in 1/10 degrees
  57347. range from -12.8 to 12.0, values will be limited to this range.
  57348. </li>
  57349. <br><br><b>Class CLOCK</b>
  57350. <li>clock<br>
  57351. set the clock to the current date/time (no argument required)
  57352. </li>
  57353. <br><br><b>Class COLOR_CONTROL</b>
  57354. <li>rgb<br>
  57355. Set the color of the device as a 6 digit RGB Value (RRGGBB), each color is
  57356. specified with a value from 00 to ff.</li>
  57357. <li>wcrgb<br>
  57358. Used for sending warm white, cold white, red, green and blue values
  57359. to device. Values must be decimal (0 - 255) and separated by blanks.
  57360. <ul>
  57361. set &lt;name&gt; wcrgb 0 255 0 0 0 (setting full cold white)<br>
  57362. </ul>
  57363. </li>
  57364. <br><br><b>Class CONFIGURATION</b>
  57365. <li>configByte cfgAddress 8bitValue<br>
  57366. configWord cfgAddress 16bitValue<br>
  57367. configLong cfgAddress 32bitValue<br>
  57368. Send a configuration value for the parameter cfgAddress. cfgAddress and
  57369. value are node specific.<br>
  57370. Note: if the model is set (see MANUFACTURER_SPECIFIC get), then more
  57371. specific config commands are available.</li>
  57372. <li>configDefault cfgAddress<br>
  57373. Reset the configuration parameter for the cfgAddress parameter to its
  57374. default value. See the device documentation to determine this value.</li>
  57375. <br><br><b>Class DOOR_LOCK, V2</b>
  57376. <li>doorLockOperation DOOR_LOCK_MODE<br>
  57377. Set the operation mode of the door lock.<br>
  57378. DOOR_LOCK_MODE:<br>
  57379. open = Door unsecured<br>
  57380. close = Door secured<br>
  57381. 00 = Door unsecured<br>
  57382. 01 = Door unsecured with timeout<br>
  57383. 10 = Door unsecured for inside door handles<br>
  57384. 11 = Door unsecured for inside door handles with timeout<br>
  57385. 20 = Door unsecured for outside door handles<br>
  57386. 21 = Door unsecured for outside door handles with timeout<br>
  57387. FF = Door secured<br>
  57388. Note: open/close can be used as an alias for 00/FF.
  57389. </li>
  57390. <li>doorLockConfiguration operationType outsidehandles
  57391. insidehandles timeoutSeconds<br>
  57392. Set the configuration for the door lock.<br>
  57393. operationType: [constant|timed]<br>
  57394. outsidehandle/insidehandle: 4-bit binary field for handle 1-4,
  57395. bit=0:handle disabled, bit=1:handle enabled, highest bit is for
  57396. handle 4, lowest bit for handle 1. Example 0110 0001
  57397. = outside handles 3 and 2 are active, inside handle 1 is active<br>
  57398. timeoutSeconds: time out for timed operation (in seconds) [1-15239].
  57399. </li>
  57400. <br><br><b>Class INDICATOR</b>
  57401. <li>indicatorOn<br>
  57402. switch the indicator on</li>
  57403. <li>indicatorOff<br>
  57404. switch the indicator off</li>
  57405. <li>indicatorDim value<br>
  57406. takes values from 1 to 99.
  57407. If the indicator does not support dimming, it is interpreted as on.</li>
  57408. <br><br><b>Class MANUFACTURER_PROPRIETARY</b>
  57409. <br>Fibaro FGR(M)-222 only:
  57410. <li>positionBlinds<br>
  57411. drive blinds to position %</li>
  57412. <li>positionSlat<br>
  57413. drive slat to position %</li>
  57414. <br>D-Link DCH-Z510, Philio PSE02, Zipato Indoor Siren only:<br>
  57415. switch alarm on with selected sound (to stop use: set &lt;device&gt; off)
  57416. <li>alarmEmergencyOn</li>
  57417. <li>alarmFireOn</li>
  57418. <li>alarmAmbulanceOn</li>
  57419. <li>alarmPoliceOn</li>
  57420. <li>alarmDoorchimeOn</li>
  57421. <li>alarmBeepOn</li>
  57422. <br><br><b>Class METER</b>
  57423. <li>meterReset<br>
  57424. Reset all accumulated meter values.<br>
  57425. Note: see meterSupported command and its output to detect if resetting the
  57426. value is supported by the device.<br>
  57427. The command will reset ALL accumulated values, it is not possible to
  57428. choose a single value.</li>
  57429. <br><br><b>Class MULTI_CHANNEL</b>
  57430. <li>mcCreateAll<br>
  57431. Create a FHEM device for all channels. This command is executed after
  57432. inclusion of a new device.
  57433. </li>
  57434. <br><br><b>Class MULTI_CHANNEL_ASSOCIATION</b>
  57435. <li>mcaAdd groupId node1 node2 ... 0 node1 endPoint1 node2 endPoint2 ...<br>
  57436. Add a list of node or node:endpoint associations. The latter can be used to
  57437. create channels on remotes. E.g. to configure the button 1,2,... on the
  57438. zwave.me remote, use:
  57439. <ul>
  57440. set remote mcaAdd 2 0 1 2<br>
  57441. set remote mcaAdd 3 0 1 3<br>
  57442. ....
  57443. </ul>
  57444. For each button a separate FHEM device will be generated.
  57445. </li>
  57446. <li>mcaDel groupId node1 node2 ... 0 node1 endPoint1 node2 endPoint2 ...<br>
  57447. delete node or node:endpoint associations.
  57448. Special cases: just specifying the groupId will delete everything for this
  57449. groupId. Specifying 0 for groupId will delete all associations.
  57450. </li>
  57451. <br><br><b>Class NETWORK_SCHEDULE (SCHEDULE), V1</b>
  57452. <li>schedule ID USER_ID YEAR-MONTH-DAY WDAY ACTIVE_ID DURATION_TYPE
  57453. HOUR:MINUTE DURATION NUM_REPORTS CMD ... CMD<br>
  57454. Set a schedule for a user. Due to lack of documentation,
  57455. details for some parameters are not available. Command Class is
  57456. used together with class USER_CODE.<br>
  57457. <ul>
  57458. ID: id of schedule, refer to maximum number of supported schedules
  57459. reported by the scheduleSupported command.<br>
  57460. USER_ID: id of user, starting from 1 up to the number of supported
  57461. users, refer also to the USER_CODE class description.<br>
  57462. YEAR-MONTH-DAY: start of schedule in the format yyyy-mm-dd.<br>
  57463. WDAY: weekday, 1=Monday, 7=Sunday.<br>
  57464. ACTIVE_ID: unknown parameter.<br>
  57465. DURATION_TYPE: unknown parameter.<br>
  57466. HOUR:MINUTE: start of schedule in the format hh:mm.<br>
  57467. DURATION: unknown parameter.<br>
  57468. NUM_REPORTS: number of reports to follow, must be 0.<br>
  57469. CMD: command(s) (as hexcode sequence) that the schedule executes,
  57470. see report of scheduleSupported command for supported command
  57471. class and mask. A list of space separated commands can be
  57472. specified.<br>
  57473. </ul>
  57474. </li>
  57475. <li>scheduleRemove ID<br>
  57476. Remove the schedule with the id ID</li>
  57477. <li>scheduleState ID STATE<br>
  57478. Set the STATE of the schedule with the id ID. Description for
  57479. parameter STATE is not available.</li>
  57480. <br><br><b>Class NODE_NAMING</b>
  57481. <li>name NAME<br>
  57482. Store NAME in the EEPROM. Note: only ASCII is supported.</li>
  57483. <li>location LOCATION<br>
  57484. Store LOCATION in the EEPROM. Note: only ASCII is supported.</li>
  57485. <br><br><b>Class POWERLEVEL</b>
  57486. <li>Class is only used in an installation or test situation</li>
  57487. <li>powerlevel level timeout/s<br>
  57488. set powerlevel to level [0-9] for timeout/s [1-255].<br>
  57489. level 0=normal, level 1=-1dBm, .., level 9=-9dBm.</li>
  57490. <li>powerlevelTest nodeId level frames <br>
  57491. send number of frames [1-65535] to nodeId with level [0-9].</li>
  57492. <br><br><b>Class PROTECTION</b>
  57493. <li>protectionOff<br>
  57494. device is unprotected</li>
  57495. <li>protectionOn<br>
  57496. device is protected</li>
  57497. <li>protectionSeq<br>
  57498. device can be operated, if a certain sequence is keyed.</li>
  57499. <li>protectionBytes LocalProtectionByte RFProtectionByte<br>
  57500. for commandclass PROTECTION V2 - see devicemanual for supported
  57501. protectionmodes</li>
  57502. <br><br><b>Class SCENE_ACTIVATION</b>
  57503. <li>sceneConfig<br>
  57504. activate settings for a specific scene.
  57505. Parameters are: sceneId, dimmingDuration (0..255)
  57506. </li>
  57507. <br><br><b>Class SCENE_ACTUATOR_CONF</b>
  57508. <li>sceneConfig<br>
  57509. set configuration for a specific scene.
  57510. Parameters are: sceneId, dimmingDuration, finalValue (0..255)
  57511. </li>
  57512. <br><br><b>Class SCENE_CONTROLLER_CONF</b>
  57513. <li>groupConfig<br>
  57514. set configuration for a specific scene.
  57515. Parameters are: groupId, sceneId, dimmingDuration.
  57516. </li>
  57517. <br><br><b>Class SCHEDULE_ENTRY_LOCK, V1, V2, V3</b>
  57518. <li>scheduleEntryLockSet USER_ID ENABLED<br>
  57519. enables or disables schedules for a specified user ID (V1)<br>
  57520. <ul>
  57521. USER_ID: id of user, starting from 1 up to the number of supported
  57522. users, refer also to the USER_CODE class description.<br>
  57523. ENABLED: 0=disabled, 1=enabled<br>
  57524. </ul>
  57525. </li>
  57526. <li>scheduleEntryLockAllSet ENABLED<br>
  57527. enables or disables schedules for all users (V1)<br>
  57528. <ul>
  57529. ENABLED: 0=disabled, 1=enabled<br>
  57530. </ul>
  57531. </li>
  57532. <li>scheduleEntryLockWeekDaySet ACTION USER_ID SCHEDULE_ID WEEKDAY
  57533. STARTTIME ENDTIME<br>
  57534. erase or set a week day schedule for a specified user ID (V1)<br>
  57535. <ul>
  57536. ACTION: 0=erase schedule slot, 1=modify the schedule slot for the
  57537. user<br>
  57538. USER_ID: id of user, starting from 1 up to the number of supported
  57539. users, refer also to the USER_CODE class description.<br>
  57540. SCHEDULE_ID: schedule slot id (from 1 up to number of supported
  57541. schedule slots)<br>
  57542. WEEKDAY: day of week, choose one of:
  57543. "sun","mon","tue","wed","thu","fri","sat"<br>
  57544. STARTTIME: time of schedule start, in the format HH:MM
  57545. (leading 0 is mandatory)<br>
  57546. ENDTIME: time of schedule end in the format HH:MM
  57547. (leading 0 is mandatory)<br>
  57548. </ul>
  57549. </li>
  57550. <li>scheduleEntryLockYearDaySet ACTION USER_ID SCHEDULE_ID
  57551. STARTDATE STARTTIME ENDDATE ENDTIME<br>
  57552. erase or set a year day schedule for a specified user ID (V1)<br>
  57553. <ul>
  57554. ACTION: 0=erase schedule slot, 1=modify the schedule slot for the
  57555. user<br>
  57556. USER_ID: id of user, starting from 1 up to the number of supported
  57557. users, refer also to the USER_CODE class description.<br>
  57558. SCHEDULE_ID: schedule slot id (from 1 up to number of supported
  57559. schedule slots)<br>
  57560. STARTDATE: date of schedule start in the format YYYY-MM-DD<br>
  57561. STARTTIME: time of schedule start in the format HH:MM
  57562. (leading 0 is mandatory)<br>
  57563. ENDDATE: date of schedule end in the format YYYY-MM-DD<br>
  57564. ENDTIME: time of schedule end in the format HH:MM
  57565. (leading 0 is mandatory)<br>
  57566. </ul>
  57567. </li>
  57568. <li>scheduleEntryLockTimeOffsetSet TZO DST<br>
  57569. set the TZO and DST (V2)<br>
  57570. <ul>
  57571. TZO: current local time zone offset in the format (+|-)HH:MM
  57572. (sign and leading 0 is mandatory)<br>
  57573. DST: daylight saving time offset in the format (+|-)[[m]m]m
  57574. (sign is mandatory, minutes: 0 to 127, 1-3 digits)<br>
  57575. </ul>
  57576. </li>
  57577. <li>scheduleEntryLockDailyRepeatingSet ACTION USER_ID SCHEDULE_ID
  57578. WEEKDAYS STARTTIME DURATION<br>
  57579. set a daily repeating schedule for the specified user (V3)<br>
  57580. <ul>
  57581. ACTION: 0=erase schedule slot, 1=modify the schedule slot for the
  57582. user<br>
  57583. USER_ID: id of user, starting from 1 up to the number of supported
  57584. users, refer also to the USER_CODE class description.<br>
  57585. SCHEDULE_ID: schedule slot id (from 1 up to number of supported
  57586. schedule slots)<br>
  57587. WEEKDAYS: concatenated string of weekdays (choose from:
  57588. "sun","mon","tue","wed","thu","fri","sat");
  57589. e.g. "montuewedfri" or "satsun", unused days can be
  57590. specified as "..."<br>
  57591. STARTTIME: time of schedule start in the format HH:MM
  57592. (leading 0 is mandatory)<br>
  57593. DURATION: duration of schedule in the format HH:MM
  57594. (leading 0 is mandatory)<br>
  57595. </ul>
  57596. </li>
  57597. <br><br><b>Class SWITCH_ALL</b>
  57598. <li>swaIncludeNone<br>
  57599. the device does not react to swaOn and swaOff commands</li>
  57600. <li>swaIncludeOff<br>
  57601. the device reacts to the swaOff command
  57602. but does not react to the swaOn command</li>
  57603. <li>swaIncludeOn<br>
  57604. the device reacts to the swaOn command
  57605. but does not react to the swaOff command</li>
  57606. <li>swaIncludeOnOff<br>
  57607. the device reacts to the swaOn and swaOff commands</li>
  57608. <li>swaOn<br>
  57609. sends the all on command to the device</li>
  57610. <li>swaOff<br>
  57611. sends the all off command to the device.</li>
  57612. <br><br><b>Class SWITCH_BINARY</b>
  57613. <li>on<br>
  57614. switch the device on</li>
  57615. <li>off<br>
  57616. switch the device off</li>
  57617. <br><br><b>Class SWITCH_MULTILEVEL</b>
  57618. <li>on, off<br>
  57619. the same as for SWITCH_BINARY.</li>
  57620. <li>dim value<br>
  57621. dim/jump to the requested value (0..100)</li>
  57622. <li>dimWithDuration value duration<br>
  57623. dim to the requested value (0..100) in duration time. If duration is
  57624. less than 128, then it is interpreted as seconds, if it is between 128 and
  57625. 254, then as duration-128 minutes. Note: this command works only with
  57626. devices supporting version 2 of the SWITCH_MULTILEVEL class, which you can
  57627. verify with get versionClassAll</li>
  57628. <li>stop<br>
  57629. stop dimming/operation</li>
  57630. <br><br><b>Class THERMOSTAT_FAN_MODE</b>
  57631. <li>fanAutoLow</li>
  57632. <li>fanLow</li>
  57633. <li>fanAutoMedium</li>
  57634. <li>fanMedium</li>
  57635. <li>fanAutoHigh</li>
  57636. <li>fanHigh<br>
  57637. set the fan mode.</li>
  57638. <br><br><b>Class THERMOSTAT_MODE</b>
  57639. <li>tmOff</li>
  57640. <li>tmHeating</li>
  57641. <li>tmCooling</li>
  57642. <li>tmAuto</li>
  57643. <li>tmFan</li>
  57644. <li>V2:</li>
  57645. <li>tmEnergySaveHeating</li>
  57646. <li>V3:</li>
  57647. <li>tmFullPower</li>
  57648. <li>tmManual<br>
  57649. set the thermostat mode.</li>
  57650. <br><br><b>Class THERMOSTAT_SETPOINT</b>
  57651. <li>setpointHeating value<br>
  57652. set the thermostat to heat to the given value.
  57653. The value is an integer and read as celsius.<br>
  57654. See thermostatSetpointSet for a more enhanced method.
  57655. </li>
  57656. <li>setpointCooling value<br>
  57657. set the thermostat to cool down to the given value.
  57658. The value is an integer and read as celsius.<br>
  57659. See thermostatSetpointSet for a more enhanced method.
  57660. </li>
  57661. <li>thermostatSetpointSet TEMP [SCALE [TYPE [PREC [SIZE]]]]<br>
  57662. set the setpoint of the thermostat to the given value.<br>
  57663. <ul>
  57664. TEMP: setpoint temperature value, by default the value is used
  57665. with 1 decimal, see PREC<br>
  57666. SCALE: (optional) scale of temperature; [cC]=celsius,
  57667. [fF]=fahrenheit, defaults to celsius<br>
  57668. TYPE: (optional) setpoint type; [1, 15], defaults to 1=heating<br>
  57669. <ul>
  57670. 1=heating,
  57671. 2=cooling,
  57672. 7=furnance,
  57673. 8=dryAir,
  57674. 9=moistAir,
  57675. 10=autoChangeover,
  57676. 11=energySaveHeating,
  57677. 12=energySaveCooling,
  57678. 13=awayHeating,
  57679. 14=awayCooling,
  57680. 15=fullPower
  57681. </ul>
  57682. PREC: (optional) number of decimals to be used, [1-7], defaults
  57683. to 1<br>
  57684. SIZE: (optional) number of bytes used, [1, 2, 4], defaults to 2<br>
  57685. Note: optional parameters can be ommitted and are used with there
  57686. default values. If you need or want to specify an optional
  57687. parameter, ALL parameters in front of this parameter need
  57688. to be also specified!<br>
  57689. Note: the number of decimals (defined by PREC) and the number of
  57690. bytes (defined by SIZE) used for the setpoint influence the usable
  57691. range for the temperature. Some device do not support all possible
  57692. values/combinations for PREC/SIZE.<br>
  57693. <ul>
  57694. 1 byte: 0 decimals [-128, 127], 1 decimal [-12.8, 12.7], ...<br>
  57695. 2 byte: 0 decimals [-32768, 32767], 1 decimal [-3276.8, 3276.7],
  57696. ...<br>
  57697. 4 byte: 0 decimals [-2147483648, 2147483647], ...<br>
  57698. </ul>
  57699. </ul>
  57700. </li>
  57701. <li>desired-temp value<br>
  57702. same as thermostatSetpoint, used to make life easier for helper-modules
  57703. </li>
  57704. <br><br><b>Class TIME, V2</b>
  57705. <li>timeOffset TZO DST_Offset DST_START DST_END<br>
  57706. Set the time offset for the internal clock of the device.<br>
  57707. TZO: Offset of time zone to UTC in format [+|-]hh:mm.<br>
  57708. DST_OFFSET: Offset for daylight saving time (DST) in minutes
  57709. in the format [+|-]mm.<br>
  57710. DST_START / DST_END: Start and end of daylight saving time in the
  57711. format MM-DD_HH:00.<br>
  57712. Note: Sign for both offsets must be specified!<br>
  57713. Note: Minutes for DST_START and DST_END must be specified as "00"!
  57714. </li>
  57715. <br><br><b>Class TIME_PARAMETERS, V1</b>
  57716. <li>timeParametersGet<br>
  57717. The device request time parameters. Right now the user should define a
  57718. notify with a "set timeParameters" command.
  57719. </li>
  57720. <li>timeParameters DATE TIME<br>
  57721. Set the time (UTC) to the internal clock of the device.<br>
  57722. DATE: Date in format YYYY-MM-DD.<br>
  57723. TIME: Time (UTC) in the format hh:mm:ss.<br>
  57724. Note: Time zone offset to UTC must be set with command class TIME.
  57725. </li>
  57726. <br><br><b>Class USER_CODE</b>
  57727. <li>userCode id status code</br>
  57728. set code and status for the id n. n ist starting at 1, status is 0 for
  57729. available (deleted) and 1 for set (occupied). code is a hexadecimal string.
  57730. </li>
  57731. <br><br><b>Class WAKE_UP</b>
  57732. <li>wakeupInterval value nodeId<br>
  57733. Set the wakeup interval of battery operated devices to the given value in
  57734. seconds. Upon wakeup the device sends a wakeup notification to nodeId.</li>
  57735. <li>wakeupNoMoreInformation<br>
  57736. put a battery driven device into sleep mode. </li>
  57737. </ul>
  57738. <br>
  57739. <a name="ZWaveget"></a>
  57740. <b>Get</b>
  57741. <ul>
  57742. <br><br><b>All</b>
  57743. <li>neighborList<br>
  57744. returns the list of neighbors. Provides insights to actual network
  57745. topology. List includes dead links and non-routing neighbors.
  57746. Since this information is stored in the dongle, the information will be
  57747. returned directly even for WAKE_UP devices.</li>
  57748. <br><br><b>Class ALARM</b>
  57749. <li>alarm &lt;alarmId&gt;<br>
  57750. return the value for the (decimal) alarmId. The value is device
  57751. specific. This command is specified in version 1 and should only
  57752. be used with old devices that only support version 1.</li>
  57753. <li>alarmWithType &lt;alarmType&gt;<br>
  57754. return the event for the specified alarm type. This command is
  57755. specified in version 2.
  57756. </li>
  57757. <li>alarmWithTypeEvent &lt;alarmType&gt; &lt;eventnumber&gt;<br>
  57758. return the event details for the specified alarm type and
  57759. eventnumber. This command is specified in version 3. The eventnumber
  57760. is specific for each alarm type, a list of the supported
  57761. eventnumbers can be obtained by the "alarmEventSupported" command,
  57762. refer also to the documentation of the device.
  57763. </li>
  57764. <li>alarmTypeSupported<br>
  57765. Returns a list of the supported alarm types of the device which are
  57766. used as parameters in the "alarmWithType" and "alarmWithTypeEvent"
  57767. commands. This command is specified in version 2.</li>
  57768. <li>alarmEventSupported &lt;alarmType&gt;<br>
  57769. Returns a list of the supported events for the specified alarm type.
  57770. The number of the events can be used as parameter in the
  57771. "alarmWithTypeEvent" command. This command is specified in
  57772. version 3.</li>
  57773. <br><br><b>Class ASSOCIATION</b>
  57774. <li>association groupId<br>
  57775. return the list of nodeIds in the association group groupId in the form:<br>
  57776. assocGroup_X:Max Y, Nodes id,id...
  57777. </li>
  57778. <li>associationGroups<br>
  57779. return the number of association groups<br>
  57780. </li>
  57781. <li>associationAll<br>
  57782. request association info for all possible groups.</li>
  57783. <br><br><b>Class ASSOCIATION_GRP_INFO</b>
  57784. <li>associationGroupName groupId<br>
  57785. return the name of association groups
  57786. </li>
  57787. <li>associationGroupCmdList groupId<br>
  57788. return Command Classes and Commands that will be sent to associated
  57789. devices in this group<br>
  57790. </li>
  57791. <br><br><b>Class BARRIER_OPERATOR</b>
  57792. <li>barrierState<br>
  57793. request state of the barrier.
  57794. </li>
  57795. <br><br><b>Class BASIC</b>
  57796. <li>basicStatus<br>
  57797. return the status of the node as basicReport:XY. The value (XY) depends on
  57798. the node, e.g. a SWITCH_BINARY device reports 00 for off and FF (255) for on.
  57799. Devices with version 2 (or greater) can return two additional values, the
  57800. 'target value' and 'duration'. The 'duration' is reported in seconds,
  57801. as "unknown duration" (value 0xFE = 253) or as "255 (reserved value)"
  57802. (value 0xFF = 255).
  57803. </li>
  57804. <br><br><b>Class BATTERY</b>
  57805. <li>battery<br>
  57806. return the charge of the battery in %, as battery:value % or battery:low
  57807. </li>
  57808. </li>
  57809. <br><br><b>CLASS DOOR_LOCK_LOGGING, V1 (deprecated)</b>
  57810. <li>doorLockLoggingRecordsSupported<br>
  57811. Gives back the number of records that can be stored by the device.
  57812. </li>
  57813. <li>doorLockLoggingRecord n<br>
  57814. Requests and reports the logging record number n.<br>
  57815. You will get a reading with the requested record number, the record status,
  57816. the event type, user identifier, user's code length and the timestamp of
  57817. the event in the form of yyyy-mm-dd hh:mm:ss. Although the request does
  57818. report the user code, the user typed in, it is dropped for security
  57819. reasons, so it does not get logged in clear text.<br>
  57820. If the report could not get parsed correctly, it does report the raw
  57821. message.<br>
  57822. The event types can be looked up in the "Software Design Specification -
  57823. Z-Wave Application Command Class Specification" at page 150 from SIGMA
  57824. DESIGNS in the version of 2017-07-10.</li>
  57825. <br><br><b>Class CLIMATE_CONTROL_SCHEDULE</b>
  57826. <li>ccsOverride<br>
  57827. request the climate control schedule override report
  57828. </li>
  57829. <li>ccs [mon|tue|wed|thu|fri|sat|sun]<br>
  57830. request the climate control schedule for the given day.
  57831. </li>
  57832. <li>ccsAll<br>
  57833. request the climate control schedule for all days. (runs in background)
  57834. </li>
  57835. <br><br><b>Class CLOCK</b>
  57836. <li>clock<br>
  57837. request the clock data
  57838. </li>
  57839. <br><br><b>Class COLOR_CONTROL</b>
  57840. <li>ccCapability<br>
  57841. return capabilities.</li>
  57842. <li>ccStatus channelId<br>
  57843. return status of channel ChannelId.
  57844. </li>
  57845. <br><br><b>Class CONFIGURATION</b>
  57846. <li>config cfgAddress<br>
  57847. return the value of the configuration parameter cfgAddress. The value is
  57848. device specific.<br>
  57849. Note: if the model is set (see MANUFACTURER_SPECIFIC get), then more
  57850. specific config commands are available.
  57851. </li>
  57852. <li>configAll<br>
  57853. If the model of a device is set, and configuration descriptions are
  57854. available from the database for this device, then request the value of all
  57855. known configuration parameters.</li>
  57856. <br><br><b>Class DOOR_LOCK, V2</b>
  57857. <li>doorLockConfiguration<br>
  57858. Request the configuration report from the door lock.
  57859. </li>
  57860. <li>doorLockOperation<br>
  57861. Request the operconfiguration report from the door lock.
  57862. </li>
  57863. <br><br><b>Class HRV_STATUS</b>
  57864. <li>hrvStatus<br>
  57865. report the current status (temperature, etc.)
  57866. </li>
  57867. <li>hrvStatusSupported<br>
  57868. report the supported status fields as a bitfield.
  57869. </li>
  57870. <br><br><b>Class INDICATOR</b>
  57871. <li>indicatorStatus<br>
  57872. return the indicator status of the node, as indState:on, indState:off or
  57873. indState:dim value.
  57874. </li>
  57875. <br><br><b>Class MANUFACTURER_PROPRIETARY</b>
  57876. <li>position<br>
  57877. Fibaro FGRM-222 only: return the blinds position and slat angle.
  57878. </li>
  57879. <br><br><b>Class MANUFACTURER_SPECIFIC</b>
  57880. <li>model<br>
  57881. return the manufacturer specific id (16bit),
  57882. the product type (16bit)
  57883. and the product specific id (16bit).<br>
  57884. Note: if the openzwave xml files are installed, then return the name of the
  57885. manufacturer and of the product. This call is also necessary to decode more
  57886. model specific configuration commands and parameters.
  57887. </li>
  57888. <br><br><b>Class METER</b>
  57889. <li>meter scale<br>
  57890. return the meter report for the requested scale.<br>
  57891. Note: protocol V1 does not support the scale parameter, the parameter
  57892. will be ignored and the default scale will be returned.<br>
  57893. For protocol V2 and higher, scale is supported and depends on the
  57894. type of the meter (energy, gas or water).<br>
  57895. The device may not support all scales, see the meterSupported
  57896. command and its output. If the scale parameter is omitted, the
  57897. default unit will be reported.<br>
  57898. Example: For an electric meter, meter 0 will report energy in kWh,
  57899. meter 2 will report power in W and meter 6 will report current in A
  57900. (if these scales are supported).<br>
  57901. </li>
  57902. <li>meterSupported<br>
  57903. request the type of the meter, the supported scales and the
  57904. capability to reset the accumulated value.<br>
  57905. Note: The output contains the decimal numbers of the supported
  57906. scales that can be used as parameter for the meter command.
  57907. </li>
  57908. <br><br><b>Class MULTI_CHANNEL</b>
  57909. <li>mcEndpoints<br>
  57910. return the list of endpoints available, e.g.:<br>
  57911. mcEndpoints: total 2, identical
  57912. </li>
  57913. <li>mcCapability chid<br>
  57914. return the classes supported by the endpoint/channel chid. If the channel
  57915. does not exist, create a FHEM node for it. Example:<br>
  57916. mcCapability_02:SWITCH_BINARY<br>
  57917. <b>Note:</b> This is the best way to create the secondary nodes of a
  57918. MULTI_CHANNEL device. The device is only created for channel 2 or greater.
  57919. </li>
  57920. <br><br><b>Class MULTI_CHANNEL_ASSOCIATION</b>
  57921. <li>mca groupid<br>
  57922. return the associations for the groupid. for the syntax of the returned
  57923. data see the mcaAdd command above.</li>
  57924. <li>mcaAll<br>
  57925. request association info for all possible groupids.
  57926. </li>
  57927. <br><br><b>Class NETWORK_SCHEDULE (SCHEDULE), V1</b>
  57928. <li>scheduleSupported<br>
  57929. Request the supported features, e.g. number of supported schedules.
  57930. Due to the lack of documentation, details for some fields in the
  57931. report are not available.</li>
  57932. <li>schedule ID<br>
  57933. Request the details for the schedule with the id ID. Due to the
  57934. lack of documentation, details for some fields in the report are
  57935. not available.</li>
  57936. <li>scheduleState<br>
  57937. Request the details for the schedule state. Due to the lack of
  57938. documentation, details for some fields in the report are not
  57939. available.</li>
  57940. <br><br><b>Class NODE_NAMING</b>
  57941. <li>name<br>
  57942. Get the name from the EEPROM. Note: only ASCII is supported.</li>
  57943. <li>location<br>
  57944. Get the location from the EEPROM. Note: only ASCII is supported.</li>
  57945. <br><br><b>Class POWERLEVEL</b>
  57946. <li>powerlevel<br>
  57947. Get the current powerlevel and remaining time in this level.</li>
  57948. <li>powerlevelTest<br>
  57949. Get the result of last powerlevelTest.</li>
  57950. <br><br><b>Class PROTECTION</b>
  57951. <li>protection<br>
  57952. returns the protection state. It can be on, off or seq.</li>
  57953. <br><br><b>Class SCENE_ACTUATOR_CONF</b>
  57954. <li>sceneConfig<br>
  57955. returns the settings for a given scene. Parameter is sceneId
  57956. </li>
  57957. <br><br><b>Class SCENE_CONTROLLER_CONF</b>
  57958. <li>groupConfig<br>
  57959. returns the settings for a given group. Parameter is groupId
  57960. </li>
  57961. <br><br><b>Class SCHEDULE_ENTRY_LOCK, V1, V2, V3</b>
  57962. <li>scheduleEntryLockTypeSupported<br>
  57963. returns the number of available slots for week day and year day
  57964. schedules (V1), in V3 the number of available slots for the daily
  57965. repeating schedule is reported additionally
  57966. </li>
  57967. <li>scheduleEntryLockWeekDay USER_ID SCHEDULE_ID<br>
  57968. returns the specified week day schedule for the specified user
  57969. (day of week, start time, end time) (V1)<br>
  57970. <ul>
  57971. USER_ID: id of user, starting from 1 up to the number of supported
  57972. users, refer also to the USER_CODE class description.<br>
  57973. SCHEDULE_ID: schedule slot id (from 1 up to number of supported
  57974. schedule slots)<br>
  57975. </ul>
  57976. </li>
  57977. <li>scheduleEntryLockYearDay USER_ID SCHEDULE_ID<br>
  57978. returns the specified year day schedule for the specified user
  57979. (start date, start time, end date, end time) (V1)<br>
  57980. <ul>
  57981. USER_ID: id of user, starting from 1 up to the number of supported
  57982. users, refer also to the USER_CODE class description.<br>
  57983. SCHEDULE_ID: schedule slot id (from 1 up to number of supported
  57984. schedule slots)<br>
  57985. </ul>
  57986. </li>
  57987. <li>scheduleEntryLockDailyRepeating USER_ID SCHEDULE_ID<br>
  57988. returns the specified daily schedule for the specified user
  57989. (weekdays, start date, duration) (V3)<br>
  57990. <ul>
  57991. USER_ID: id of user, starting from 1 up to the number of supported
  57992. users, refer also to the USER_CODE class description.<br>
  57993. SCHEDULE_ID: schedule slot id (from 1 up to number of supported
  57994. schedule slots)<br>
  57995. </ul>
  57996. </li>
  57997. <li>scheduleEntryLockTimeOffset<br>
  57998. returns the time zone offset TZO and the daylight saving time
  57999. offset (V2)
  58000. </li>
  58001. <br><br><b>Class SECURITY</b>
  58002. <li>secSupportedReport<br>
  58003. (internaly used to) request the command classes that are supported
  58004. with SECURITY
  58005. </li>
  58006. <li>Notes:<br>
  58007. This class needs the installation of the perl module Crypt::Rijndael and
  58008. a defined networkkey in the attributes of the ZWDongle device<br>
  58009. Currently a secure inclusion can only be started from the command input
  58010. with "set &lt;ZWDongle_device_name&gt; addNode [onSec|onNwSec]"<br>
  58011. These commands are only described here for completeness of the
  58012. documentation, but are not intended for manual usage. These commands
  58013. will be removed from the interface in future version.</li>
  58014. <br><br><b>Class SENSOR_ALARM</b>
  58015. <li>alarm alarmType<br>
  58016. return the nodes alarm status of the requested alarmType. 00 = GENERIC,
  58017. 01 = SMOKE, 02 = CO, 03 = CO2, 04 = HEAT, 05 = WATER, 255 = returns the
  58018. nodes first supported alarm type.
  58019. </li>
  58020. <br><br><b>Class SENSOR_BINARY</b>
  58021. <li>sbStatus<br>
  58022. return the status of the node.
  58023. </li>
  58024. <br><br><b>Class SENSOR_MULTILEVEL</b>
  58025. <li>smStatus<br>
  58026. request data from the node (temperature/humidity/etc)
  58027. </li>
  58028. <br><br><b>Class SWITCH_ALL</b>
  58029. <li>swaInclude<br>
  58030. return the switch-all mode of the node.
  58031. </li>
  58032. <br><br><b>Class SWITCH_BINARY</b>
  58033. <li>swbStatus<br>
  58034. return the status of the node, as state:on or state:off.
  58035. </li>
  58036. <br><br><b>Class SWITCH_MULTILEVEL</b>
  58037. <li>swmStatus<br>
  58038. return the status of the node, as state:on, state:off or state:dim value.
  58039. </li>
  58040. <br><br><b>Class THERMOSTAT_FAN_MODE</b>
  58041. <li>fanMode<br>
  58042. request the mode
  58043. </li>
  58044. <br><br><b>Class THERMOSTAT_FAN_STATE</b>
  58045. <li>fanMode<br>
  58046. request the state
  58047. </li>
  58048. <br><br><b>Class THERMOSTAT_MODE</b>
  58049. <li>thermostatMode<br>
  58050. request the mode
  58051. </li>
  58052. <br><br><b>Class THERMOSTAT_OPERATING_STATE</b>
  58053. <li>thermostatOperatingState<br>
  58054. request the operating state
  58055. </li>
  58056. <br><br><b>Class THERMOSTAT_SETPOINT</b>
  58057. <li>setpoint [TYPE]<br>
  58058. request the setpoint<br>
  58059. TYPE: (optional) setpoint type; [1, 15], defaults to 1=heating<br>
  58060. <ul>
  58061. 1=heating,
  58062. 2=cooling,
  58063. 7=furnance,
  58064. 8=dryAir,
  58065. 9=moistAir,
  58066. 10=autoChangeover,
  58067. 11=energySaveHeating,
  58068. 12=energySaveCooling,
  58069. 13=awayHeating,
  58070. 14=awayCooling,
  58071. 15=fullPower
  58072. </ul>
  58073. </li>
  58074. <li>thermostatSetpointSupported<br>
  58075. requests the list of supported setpoint types
  58076. </li>
  58077. <br><br><b>Class TIME, V2</b>
  58078. <li>time<br>
  58079. Request the (local) time from the internal clock of the device.
  58080. </li>
  58081. <li>date<br>
  58082. Request the (local) date from the internal clock of the device.
  58083. </li>
  58084. <li>timeOffset<br>
  58085. Request the report for the time offset and DST settings from the
  58086. internal clock of the device.
  58087. </li>
  58088. <br><br><b>Class TIME_PARAMETERS, V1</b>
  58089. <li>time<br>
  58090. Request the date and time (UTC) from the internal clock of the device.
  58091. </li>
  58092. <br><br><b>Class USER_CODE</b>
  58093. <li>userCode n</br>
  58094. request status and code for the id n
  58095. </li>
  58096. <br><br><b>Class VERSION</b>
  58097. <li>version<br>
  58098. return the version information of this node in the form:<br>
  58099. Lib A Prot x.y App a.b
  58100. </li>
  58101. <li>versionClass classId or className<br>
  58102. return the supported command version for the requested class
  58103. </li>
  58104. <li>versionClassAll<br>
  58105. executes "get devicename versionClass class" for each class from the
  58106. classes attribute in the background without generating events, and sets the
  58107. vclasses attribute at the end.
  58108. </li>
  58109. <br><br><b>Class WAKE_UP</b>
  58110. <li>wakeupInterval<br>
  58111. return the wakeup interval in seconds, in the form<br>
  58112. wakeupReport:interval seconds target id
  58113. </li>
  58114. <li>wakeupIntervalCapabilities (V2 only)<br>
  58115. return the wake up interval capabilities in seconds, in the form<br>
  58116. wakeupIntervalCapabilitiesReport:min seconds max seconds default seconds
  58117. step seconds
  58118. </li>
  58119. <br><br><b>Class ZWAVEPLUS_INFO</b>
  58120. <li>zwavePlusInfo<br>
  58121. request the zwavePlusInfo
  58122. </li>
  58123. </ul>
  58124. <br>
  58125. <a name="ZWaveattr"></a>
  58126. <b>Attributes</b>
  58127. <ul>
  58128. <li><a href="#IODev">IODev</a></li>
  58129. <li><a name="WNMI_delay">WNMI_delay</a><br>
  58130. This attribute sets the time delay between the last message sent to an
  58131. WakeUp device and the sending of the WNMI Message
  58132. (WakeUpNoMoreInformation) that will set the device to sleep mode. Value
  58133. is in seconds, subseconds my be specified. Values outside of 0.2-5.0 are
  58134. probably harmful.
  58135. </li>
  58136. <li><a name="classes">classes</a><br>
  58137. This attribute is needed by the ZWave module, as the list of the possible
  58138. set/get commands depends on it. It contains a space separated list of
  58139. class names (capital letters).
  58140. </li>
  58141. <li><a href="#disable">disable</a></li>
  58142. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  58143. <li><a href="#dummy">dummy</a></li>
  58144. <li><a href="#do_not_notify">do_not_notify</a></li>
  58145. <li><a href="#dummy">dummy</a></li>
  58146. <li><a name="eventForRaw">eventForRaw</a><br>
  58147. Generate an an additional event for the RAW message. Can be used if
  58148. someone fears that critical notifies won't work, if FHEM changes the event
  58149. text after an update. </li>
  58150. <li><a name="extendedAlarmReadings">extendedAlarmReadings</a><br>
  58151. Some devices support more than one alarm type, this attribute
  58152. selects which type of reading is used for the reports of the ALARM
  58153. (or NOTIFICATION) class:<br>
  58154. A value of "0" selects a combined, single reading ("alarm") for
  58155. all alarm types of the device. Subsequent reports of different
  58156. alarm types will overwrite each other. This is the default setting
  58157. and the former behavior.<br>
  58158. A value of "1" selects separate alarm readings for each alarm type
  58159. of the device. The readings are named "alarm_&lt;alarmtype&gt;.
  58160. This can also be selected if only one alarmtype is supported by
  58161. the device. This reading also contains the status of the
  58162. alarm notification. For compatibility reasons this is currently
  58163. not supported with the combined reading.<br>
  58164. A value of "2" selects both of the above and creates the combined and
  58165. the seperate readings at the same time, this should only be used
  58166. if really needed as duplicate events are generated.
  58167. </li>
  58168. <li><a href="#ignore">ignore</a></li>
  58169. <li><a name="ignoreDupMsg">ignoreDupMsg</a><br>
  58170. Experimental: if set (to 1), ignore duplicate wakeup messages, or
  58171. multiple responses to a single get due to missing lowlevel ACK.
  58172. </li>
  58173. <li><a href="#neighborListPos">neighborListPos</a></li>
  58174. <li><a name="noExplorerFrames">noExplorerFrames</a><br>
  58175. turn off the use of Explorer Frames
  58176. </li>
  58177. <li><a name="noWakeupForApplicationUpdate">noWakeupForApplicationUpdate</a>
  58178. <br>
  58179. some devices (notable the Aeotec Multisensor 6) are only awake after an
  58180. APPLICATION UPDATE telegram for a very short time. If this attribute is
  58181. set (recommended for the Aeotec Multisensor 6), the WakeUp-Stack is not
  58182. processed after receiving such a message.
  58183. </li>
  58184. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  58185. <li><a name="secure_classes">secure_classes</a><br>
  58186. This attribute is the result of the "set DEVICE secSupportedReport"
  58187. command. It contains a space seperated list of the the command classes
  58188. that are supported with SECURITY.
  58189. </li>
  58190. <li><a href="#showtime">showtime</a></li>
  58191. <li><a name="vclasses">vclasses</a><br>
  58192. This is the result of the "get DEVICE versionClassAll" command, and
  58193. contains the version information for each of the supported classes.
  58194. </li>
  58195. <li><a name="useCRC16">useCRC16</a><br>
  58196. Experimental: if a device supports CRC_16_ENCAP, then add CRC16 to the
  58197. command. Note: this is not available to SECURITY ENABLED devices, as
  58198. security has its own CRC.
  58199. </li>
  58200. <li><a name="useMultiCmd">useMultiCmd</a><br>
  58201. Experimental: if a device supports MULTI_CMD and WAKE_UP, then pack
  58202. multiple get messages on the SendStack into a single MULTI_CMD to save
  58203. radio transmissions.
  58204. </li>
  58205. <li><a name="zwaveRoute">zwaveRoute</a><br>
  58206. space separated list of (ZWave) device names. They will be used in the
  58207. given order to route messages from the controller to this device. Specify
  58208. them in the order from the controller to the device. Do not specify the
  58209. controller and the device itself, only the routers inbetween. Used only
  58210. if the IODev is a ZWCUL device. </li>
  58211. </ul>
  58212. <br>
  58213. <a name="ZWaveevents"></a>
  58214. <b>Generated events:</b>
  58215. <ul>
  58216. <br><b>neighborUpdate</b>
  58217. <li>ZW_REQUEST_NODE_NEIGHBOR_UPDATE [started|done|failed]</li>
  58218. <br><b>returnRouteAdd</b>
  58219. <li>ZW_ASSIGN_RETURN_ROUTE [started|alreadyActive|transmitOk|
  58220. transmitNoAck|transmitFail|transmitNotIdle|
  58221. transmitNoRoute]</li>
  58222. <br><b>returnRouteDel</b>
  58223. <li>ZW_DELETE_RETURN_ROUTE [started|alreadyActive|transmitOk|
  58224. transmitNoAck|transmitFail|transmitNotIdle|
  58225. transmitNoRoute]</li>
  58226. <br><b>sucRouteAdd</b>
  58227. <li>ZW_ASSIGN_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
  58228. transmitNoAck|transmitFail|transmitNotIdle|
  58229. transmitNoRoute]</li>
  58230. <br><b>sucRouteDel</b>
  58231. <li>ZW_DELETE_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
  58232. transmitNoAck|transmitFail|transmitNotIdle|
  58233. transmitNoRoute]</li>
  58234. <br><b>Class ALARM</b>
  58235. <li>Note:<br>
  58236. Depending on the setting of the attribute "extendedAlarmReadings"
  58237. the generated events differ slightly. With a value of "0" or "2" a
  58238. combined reading for all alarm types of the device with the name
  58239. "alarm" will be used. With a value of "1" or "2" separate readings
  58240. for each supported alarm type will be generated with names
  58241. "alarm_&lt;alarmType&gt;.</li>
  58242. <li>Devices with class version 1 support: alarm_type_X:level Y</li>
  58243. <li>For higher class versions more detailed events with 100+ different
  58244. strings in the form alarm:&lt;string&gt;
  58245. (or alarm_&lt;alarmType&gt;:&lt;string&gt;) are generated.<br>
  58246. For the combined reading, the name of the alarm type is part of
  58247. the reading event, for separate readings it is part of the
  58248. reading name.<br>
  58249. If a cleared event can be identified, the string "Event cleared:"
  58250. is reported before the event details.<br>
  58251. The seperate readings also contain the status of the
  58252. alarm / notification. For compatibility reasons this is currently
  58253. not supported with the combined reading. </li>
  58254. <br><b>Class APPLICATION_STATUS</b>
  58255. <li>applicationStatus: [cmdRejected]</li>
  58256. <li>applicationBusy: [tryAgainLater|tryAgainInWaitTimeSeconds|
  58257. RequestQueued|unknownStatusCode] $waitTime</li>
  58258. <br><br><b>Class ASSOCIATION</b>
  58259. <li>assocGroup_X:Max Y Nodes A,B,...</li>
  58260. <li>assocGroups:X</li>
  58261. <br><br><b>Class ASSOCIATION_GRP_INFO</b>
  58262. <li>assocGroupName_X:name</li>
  58263. <li>assocGroupCmdList_X:Class1:Cmd1 Class2:Cmd ...</li>
  58264. <br><br><b>Class BARRIER_OPERATOR</b>
  58265. <li>barrierState:[ closed | [%] | closing | stopped | opening | open ]</li>
  58266. <br><br><b>Class BASIC</b>
  58267. <li>basicReport:X (for version 1), basicReport:X target y duration z
  58268. (for version 2 or greater)</li>
  58269. <li>basicGet:request</li>
  58270. <li>basicSet:X</li>
  58271. <br><br><b>Class BASIC_WINDOW_COVERING</b>
  58272. <li>covering:[open|close|stop]</li>
  58273. <br><br><b>Class BATTERY</b>
  58274. <li>battery:chargelevel %</li>
  58275. <br><br><b>Class CENTRAL_SCENE</b>
  58276. <li>cSceneSet:X</li>
  58277. <li>cSceneDim:X</li>
  58278. <li>cSceneDimEnd:X</li>
  58279. <li>cSceneDouble:X</li>
  58280. <li>cSceneMultiple_N:X<br>where N is 3, 4 or 5 (multiple presses)</li>
  58281. <br><br><b>Class CLIMATE_CONTROL_SCHEDULE</b>
  58282. <li>ccsOverride:[no|temporary|permanent],
  58283. [frost protection|energy saving|unused]</li>
  58284. <li>ccsChanged:&lt;number&gt;</li>
  58285. <li>ccs_[mon|tue|wed|thu|fri|sat|sun]:HH:MM temp HH:MM temp...</li>
  58286. <br><br><b>Class CLOCK</b>
  58287. <li>clock:get</li>
  58288. <li>clock:[mon|tue|wed|thu|fri|sat|sun] HH:MM</li>
  58289. <br><br><b>Class COLOR_CONTROL</b>
  58290. <li>ccCapability:XY</li>
  58291. <li>ccStatus_X:Y</li>
  58292. <br><br><b>Class CONFIGURATION</b>
  58293. <li>config_X:Y<br>
  58294. Note: if the model is set (see MANUFACTURER_SPECIFIC get), then more
  58295. specific config messages are available.</li>
  58296. <br><br><b>Class DEVICE_RESET_LOCALLY</b>
  58297. <li>deviceResetLocally:yes<br></li>
  58298. <br><br><b>Class DOOR_LOCK, V2</b>
  58299. <li>doorLockConfiguration: mode: [constant|timed] outsideHandles:
  58300. $outside_mode(4 bit field) insideHandles: $inside_mode(4 bit field)
  58301. timeoutSeconds: [not_supported|$seconds]</li>
  58302. <li>doorLockOperation: mode: $mode outsideHandles:
  58303. $outside_mode(4 bit field) insideHandles: $inside_mode(4 bit field)
  58304. door: [open|closed] bolt: [locked|unlocked] latch: [open|closed]
  58305. timeoutSeconds: [not_supported|$time]<br>
  58306. $mode = [unsecured|unsecured_withTimeout|unsecured_inside|
  58307. unsecured_inside_withTimeout|unsecured_outside|
  58308. unsecured_outside_withTimeout|secured</li>
  58309. <br><br><b>Class HAIL</b>
  58310. <li>hail:01<br></li>
  58311. <br><br><b>Class HRV_STATUS</b>
  58312. <li>outdoorTemperature: %0.1f C</li>
  58313. <li>supplyAirTemperature: %0.1f C</li>
  58314. <li>exhaustAirTemperature: %0.1f C</li>
  58315. <li>dischargeAirTemperature: %0.1f C</li>
  58316. <li>indoorTemperature: %0.1f C</li>
  58317. <li>indoorHumidity: %s %</li>
  58318. <li>remainingFilterLife: %s %</li>
  58319. <li>supportedStatus: &lt;list of supported stati&gt;</li>
  58320. <br><br><b>Class INDICATOR</b>
  58321. <li>indState:[on|off|dim value]</li>
  58322. <br><br><b>Class MANUFACTURER_PROPRIETARY</b>
  58323. <li>Fibaro FGRM-222 with ReportsType Fibar CC only:</li>
  58324. <li>position:Blind [%] Slat [%]<br>
  58325. (VenetianBlindMode)</li>
  58326. <li>position:[%]<br>
  58327. (RollerBlindMode)</li>
  58328. <br><br><b>Class MANUFACTURER_SPECIFIC</b>
  58329. <li>modelId:hexValue hexValue hexValue</li>
  58330. <li>model:manufacturerName productName</li>
  58331. <li>modelConfig:configLocation</li>
  58332. <br><br><b>Class METER</b>
  58333. <li>energy:val [kWh|kVAh|pulseCount|powerFactor]</li>
  58334. <li>gas:val [m3|feet3|pulseCount]</li>
  58335. <li>water:val [m3|feet3|USgallons|pulseCount]</li>
  58336. <li>power:val W</li>
  58337. <li>voltage:val V</li>
  58338. <li>current:val A</li>
  58339. <li>meterSupported:type:[meter_type] scales:[list of supported scales]
  58340. resetable:[yes|no]</li>
  58341. <br><br><b>Class MULTI_CHANNEL</b>
  58342. <li>endpoints:total X $dynamic $identical</li>
  58343. <li>mcCapability_X:class1 class2 ...</li>
  58344. <br><br><b>Class NETWORK_SCHEDULE (SCHEDULE), V1</b>
  58345. <li>schedule_&lt;id&gt;: ID: $schedule_id userID: $user_id sYear:
  58346. $starting_year sMonth: $starting_month activeID: $active_id
  58347. sDay: $starting_day sWeekDay: $starting_weekday sHour:
  58348. $starting_hour durationType: $duration_type sMinute:
  58349. $starting_minute duration: $duration numReportsToFollow:
  58350. $number_of_reports_to_follow numCmds: $number_of_commands
  58351. cmdLen: $length_of_command cmd: $commandsequence(hex)</li>
  58352. <li>scheduleSupported: num: $number_of_supported_schedules
  58353. startTimeSupport: $start_time_support(6 bit field) fallbackSupport:
  58354. $fallback_support enableDisableSupport: $ena_dis_support
  58355. numCCs: $number_of_supported_command_classes
  58356. overrideTypes: $override_types(7 bit field) overrideSupport:
  58357. $override_support</li>
  58358. <li>scheduleSupportedCC: CC_&lt;x&gt;: $number_of_command_class
  58359. CCname_&lt;x&gt;: $name_of_command_class]CCmask_&lt;x&gt;:
  58360. $mask_for_command(2 bit)</li>
  58361. <br><br><b>Class NODE_NAMING</b>
  58362. <li>name:NAME</li>
  58363. <li>location:LOCATION</li>
  58364. <br><br><b>Class POWERLEVEL</b>
  58365. <li>powerlvl:current x remain y<br>
  58366. NOTE: "current 0 remain 0" means normal mode without timeout</li>
  58367. <li>powerlvlTest:node x status y frameAck z<br>
  58368. NOTE: status 0=failed, 1=success (at least one ACK), 2=in progress</li>
  58369. <br><br><b>Class PROTECTION</b>
  58370. <li>protection:[on|off|seq]</li>
  58371. <br><br><b>Class SCENE_ACTIVATION</b>
  58372. <li>scene_Id:level finalValue</li>
  58373. <br><br><b>Class SCENE_ACTUATOR_CONF</b>
  58374. <li>scene_Id:level dimmingDuration finalValue</li>
  58375. <br><br><b>Class SCENE_CONTROLLER_CONF</b>
  58376. <li>group_Id:scene dimmingDuration</li>
  58377. <br><br><b>Class SCHEDULE_ENTRY_LOCK</b>
  58378. <li>scheduleEntryLockEntryTypeSupported:WeekDaySlots: $value
  58379. YearDaySlots: $value</li>
  58380. <li>weekDaySchedule_$userId:userID: $value slotID: $value $weekday
  58381. $starthour:$startminute $endhour:$endminute</li>
  58382. <li>yearDaySchedule_$userId:userID: $value slotID: $value
  58383. start: $year-$month-$day $hour:$minute
  58384. end: $year-$month-$day $hour:$minute</li>
  58385. <li>scheduleEntryLockDailyRepeating_$userId:userID: $value $weekdays
  58386. $hour:$minute $durationhour:$durationminute<br>
  58387. Note: $weekdays is a concatenated string with weekdaynames
  58388. ("sun","mon","tue","wed","thu","fri","sat") where inactive
  58389. weekdays are represented by "...", e.g. montue...wedfri</li>
  58390. <li>scheduleEntryLockTimeOffset:TZO: $sign$hour:$minute DST:
  58391. $sign$minutes</li>
  58392. <br><br><b>Class SECURITY</b>
  58393. <li>none<br>
  58394. Note: the class security should work transparent to the sytem and is not
  58395. intended to generate events</li>
  58396. <br><br><b>Class SENSOR_ALARM</b>
  58397. <li>alarm_type_X:level Y node $nodeID seconds $seconds</li>
  58398. <br><br><b>Class SENSOR_BINARY</b>
  58399. <li>SENSORY_BINARY V1:</li>
  58400. <li>state:open</li>
  58401. <li>state:closed</li>
  58402. <li>SENSORY_BINARY V2:</li>
  58403. <li>unknown:[off|on]</li>
  58404. <li>generalPurpose:[off|on]</li>
  58405. <li>smoke:[off|on]</li>
  58406. <li>CO:[off|on]</li>
  58407. <li>CO2:[off|on]</li>
  58408. <li>heat:[off|on]</li>
  58409. <li>water:[off|on]</li>
  58410. <li>freeze:[off|on]</li>
  58411. <li>tamper:[off|on]</li>
  58412. <li>aux:[off|on]</li>
  58413. <li>doorWindow:[off|on]</li>
  58414. <li>tilt:[off|on]</li>
  58415. <li>motion:[off|on]</li>
  58416. <li>glassBreak:[off|on]</li>
  58417. <br><br><b>Class SENSOR_MULTILEVEL</b>
  58418. <li>temperature $val [C|F]</li>
  58419. <li>generalPurpose $val %</li>
  58420. <li>luminance $val [%|Lux]</li>
  58421. <li>power $val [W|Btu/h]</li>
  58422. <li>humidity $val %</li>
  58423. <li>velocity $val [m/s|mph]</li>
  58424. <li>direction $val</li>
  58425. <li>atmosphericPressure $val [kPa|inchHg]</li>
  58426. <li>barometricPressure $val [kPa|inchHg]</li>
  58427. <li>solarRadiation $val W/m2</li>
  58428. <li>dewpoint $val [C|F]</li>
  58429. <li>rain $val [mm/h|in/h]</li>
  58430. <li>tideLevel $val [m|feet]</li>
  58431. <li>weight $val [kg|pound]</li>
  58432. <li>voltage $val [V|mV]</li>
  58433. <li>current $val [A|mA]</li>
  58434. <li>CO2-level $val ppm</li>
  58435. <li>airFlow $val [m3/h|cfm]</li>
  58436. <li>tankCapacity $val [l|cbm|usgal]</li>
  58437. <li>distance $val [m|cm|feet]</li>
  58438. <li>anglePosition $val [%|relN|relS]</li>
  58439. <li>rotation $val [rpm|Hz]</li>
  58440. <li>waterTemperature $val [C|F]</li>
  58441. <li>soilTemperature $val [C|F]</li>
  58442. <li>seismicIntensity $val [mercalli|EU macroseismic|liedu|shindo]</li>
  58443. <li>seismicMagnitude $val [local|moment|surface wave|body wave]</li>
  58444. <li>ultraviolet $val [UV]</li>
  58445. <li>electricalResistivity $val [ohm]</li>
  58446. <li>electricalConductivity $val [siemens/m]</li>
  58447. <li>loudness $val [dB|dBA]</li>
  58448. <li>moisture $val [%|content|k ohms|water activity]</li>
  58449. <li>frequency $val [Hz|kHz]</li>
  58450. <li>time $val [seconds]</li>
  58451. <li>targetTemperature $val [C|F]</li>
  58452. <li>particulateMatter $val [mol/m3|micro-g/m3]</li>
  58453. <li>formaldehydeLevel $val [mol/m3]</li>
  58454. <li>radonConcentration $val [bq/m3|pCi/L]</li>
  58455. <li>methaneDensity $val [mol/m3]</li>
  58456. <li>volatileOrganicCompound $val [mol/m3]</li>
  58457. <li>carbonMonoxide $val [mol/m3]</li>
  58458. <li>soilHumidity $val [%]</li>
  58459. <li>soilReactivity $val [pH]</li>
  58460. <li>soilSalinity $val [mol/m3]</li>
  58461. <li>heartRate $val [Bpm]</li>
  58462. <li>bloodPressure $val [Systolic mmHg|Diastolic mmHg]</li>
  58463. <li>muscleMass $val [Kg]</li>
  58464. <li>fatMass $val [Kg]</li>
  58465. <li>boneMass $val [Kg]</li>
  58466. <li>totalBodyWater $val [Kg]</li>
  58467. <li>basicMetabolicRate $val [J]</li>
  58468. <li>bodyMassIndex $val [BMI]</li>
  58469. <br><br><b>Class SWITCH_ALL</b>
  58470. <li>swa:[ none | on | off | on off ]</li>
  58471. <br><br><b>Class SWITCH_BINARY</b>
  58472. <li>state:on</li>
  58473. <li>state:off</li>
  58474. <li>state:setOn</li>
  58475. <li>state:setOff</li>
  58476. <br><br><b>Class SWITCH_MULTILEVEL</b>
  58477. <li>state:on</li>
  58478. <li>state:off</li>
  58479. <li>state:setOn</li>
  58480. <li>state:setOff</li>
  58481. <li>state:dim value</li>
  58482. <li>state:swmBeginUp</li>
  58483. <li>state:swmBeginDown</li>
  58484. <li>state:swm [ Decrement | Increment ] [ Up | Down ]
  58485. Start: $sl Duration: $dur Step: $step</li>
  58486. <li>state:swmEnd</li>
  58487. <br><br><b>Class THERMOSTAT_FAN_MODE</b>
  58488. <li>fanMode:[ fanAutoLow | fanLow | fanAutoHigh | fanHigh | fanAutoMedium |
  58489. fanMedium ]
  58490. </li>
  58491. <br><br><b>Class THERMOSTAT_FAN_STATE</b>
  58492. <li>fanState:[ off | low | high | medium | circulation | humidityCirc |
  58493. fanrightLeftCirc | upDownCirc | quietCirc ]</li>
  58494. <br><br><b>Class THERMOSTAT_MODE</b>
  58495. <li>thermostatMode:[ off | cooling | heating | fanOnly | auto |
  58496. energySaveHeating | manual | setTmOff | setTmHeating |
  58497. setTmEnergySaveHeating | setTmManual ]</li>
  58498. <br><br><b>Class THERMOSTAT_OPERATING_STATE</b>
  58499. <li>thermostatOperatingState:[ idle | heating | cooling | fanOnly |
  58500. pendingHeat | pendingCooling | ventEconomizer | auxHeating |
  58501. 2ndStageHeating | 2ndStageCooling | 2ndStageAuxHeat |
  58502. 3rdStageAuxHeat ]</li>
  58503. <br><br><b>Class THERMOSTAT_SETPOINT</b>
  58504. <li>setpointTemp:$temp $scale $type<br>
  58505. <ul>
  58506. $temp: setpoint temperature with number of decimals as reported
  58507. by the device<br>
  58508. $scale: [C|F]; C=Celsius scale, F=Fahrenheit scale<br>
  58509. $type: setpoint type, one of:<br>
  58510. <ul>
  58511. heating,
  58512. cooling,
  58513. furnance,
  58514. dryAir,
  58515. moistAir,
  58516. autoChangeover,
  58517. energySaveHeating,
  58518. energySaveCooling,
  58519. awayHeating,
  58520. awayCooling,
  58521. fullPower
  58522. </ul>
  58523. </ul>
  58524. </li>
  58525. <br><br><b>Class TIME, V2</b>
  58526. <li>time:$time RTC: [failed|working]</li>
  58527. <li>date:$date</li>
  58528. <li>timeOffset: UTC-Offset: $utco DST-Offset(minutes): $dsto DST-Start:
  58529. $start DST-End: $end</li>
  58530. <br><br><b>Class TIME_PARAMETERS, V1</b>
  58531. <li>timeParameters: date: $date time(UTC): $time</li>
  58532. <br><br><b>Class USER_CODE</b>
  58533. <li>userCode:id x status y code z</li>
  58534. <br><br><b>Class VERSION</b>
  58535. <li>V1:</li>
  58536. <li>version:Lib A Prot x.y App a.b</li>
  58537. <li>V2:</li>
  58538. <li>version:Lib A Prot x.y App a.b HW B FWCounter C FW c.d</li>
  58539. <li>V1 and V2:</li>
  58540. <li>versionClass_$classId:$version</li>
  58541. <br><br><b>Class WAKE_UP</b>
  58542. <li>wakeup:notification</li>
  58543. <li>wakeupReport:interval:X target:Y</li>
  58544. <li>wakeupIntervalCapabilitiesReport:min W max X default Y step Z</li>
  58545. <br><br><b>Class ZWAVEPLUS_INFO</b>
  58546. <li>zwavePlusInfo:version: V role: W node: X installerIcon: Y userIcon: Z</li>
  58547. </ul>
  58548. </ul>
  58549. <a name="alarmclock"></a>
  58550. <h3>alarmclock</h3>
  58551. <ul>
  58552. Fhem Modul to set up a Alarmclock
  58553. <br><br>
  58554. <a name="alarmclock_Define"></a>
  58555. <b>Define</b>
  58556. <ul>
  58557. <code>define &lt;name&gt; alarmclock</code>
  58558. <br>
  58559. Example: <code>define Wecker alarmclock</code>
  58560. <br>
  58561. </ul>
  58562. <br>
  58563. <a name="alarmclock_Set"></a>
  58564. <b>Set</b><br>
  58565. <ul>
  58566. <li><b>AlarmTime(1_Monday|2_Tuesday|3_Wednesday|4_Thursday|5_Friday|6_Saturday|7_Sunday|8_Holiday|9_Vacation)</b> HH:MM<br>
  58567. Sets a alarm time for each day.
  58568. </li>
  58569. <li><b>AlarmTime_Weekdays</b> HH:MM<br>
  58570. Sets the same alarm time for each working day.
  58571. </li>
  58572. <li><b>AlarmTime_Weekend</b> HH:MM<br>
  58573. Sets the same alarm time for Saturday and Sunday.
  58574. </li>
  58575. <li><b>AlarmOff</b> (1_Monday|2_Tuesday|3_Wednesday|4_Thursday|5_Friday|6_Saturday|7_Sunday|8_Holiday|9_Vacation|Weekdays|Weekend|All)<br>
  58576. Sets the alarm time of the respective day to off.
  58577. </li>
  58578. <li><b>stop</b> (Alarm)<br>
  58579. Stops a running alarm.
  58580. </li>
  58581. <li><b>save</b> (Weekprofile_1|Weekprofile_2|Weekprofile_3|Weekprofile_4|Weekprofile_5)<br>
  58582. Save alarm times in a profile.
  58583. </li>
  58584. <li><b>load</b> (Weekprofile_1|Weekprofile_2|Weekprofile_3|Weekprofile_4|Weekprofile_5)<br>
  58585. Load alarm times from profile.
  58586. </li>
  58587. <li><b>skip</b> (NextAlarm|None)<br>
  58588. Skips the next alarm.
  58589. </li>
  58590. <li><b>disable</b> (1|0|)<br>
  58591. Deactivated/Activated the alarmclock.
  58592. </li>
  58593. </ul>
  58594. <br>
  58595. <br>
  58596. <a name="alarmclock_Attr"></a>
  58597. <b>Attributes</b>
  58598. <ul>
  58599. <li><b>AlarmRoutine</b> <br>
  58600. A list separated by semicolon (;) which Fhem should run at the alarm time.<br>
  58601. Example: attr &lt;name&gt; AlarmRoutine set Licht on;set Radio on
  58602. </li>
  58603. <li><b>AlarmRoutineOff</b> <br>
  58604. A list separated by semicolon (;) which Fhem should execute to terminate the alarm.<br>
  58605. Example: attr &lt;name&gt; AlarmRoutineOff set Licht off;set Radio off
  58606. </li>
  58607. <li><b>EventForAlarmOff</b> <br>
  58608. Fhem-event to end the alarm.<br>
  58609. There are 2 possibilities:<br>
  58610. 1.Trigger on state.<br>
  58611. &lt;devicename&gt;:&lt;state&gt; Example: attr &lt;name&gt; EventForAlarmOff Taster:off <br>
  58612. 2.Trigger on reading. <br>
  58613. &lt;devicename&gt;:&lt;readingname&gt;: &lt;value&gt; Example: attr &lt;name&gt; EventForAlarmOff Taster:cSceneSet: on <br>
  58614. </li>
  58615. <li><b>EventForSnooze</b> <br>
  58616. Fhem-event to interrupt the alarm.<br>
  58617. The syntax is identical to EventForAlarmOff.<br>
  58618. Example: attr &lt;name&gt; EventForSnooze Taster:cSceneSet: off <br>
  58619. </li>
  58620. <li><b>SnoozeRoutine</b> <br>
  58621. A list separated by semicolon (;) which Fhem operate to interrupt the running alarm.<br>
  58622. Example: attr &lt;name&gt; SnoozeRoutine set Licht off;set Radio off
  58623. </li>
  58624. <li><b>SnoozeTimeInSec</b> <br>
  58625. Time in seconds how long the alarm should be interrupted.<br>
  58626. Example: attr &lt;name&gt; SnoozeTimeInSec 240 <br>
  58627. </li>
  58628. <li><b>PreAlarmRoutine</b> <br>
  58629. A list separated by semicolon (;) which Fhem operate at the pre-alarm.<br>
  58630. Example: attr &lt;name&gt; PreAlarmRoutine set Licht dim 30;set Radio on
  58631. </li>
  58632. <li><b>PreAlarmTimeInSec</b> <br>
  58633. Time in seconds between the alarm and the pre-alarm.<br>
  58634. Example: attr &lt;name&gt; PreAlarmTimeInSec 300<br>
  58635. In the example, the PreAlarmRoutine is executed 5 minutes before the regular alarm.
  58636. </li>
  58637. <li><b>HardAlarmRoutine</b> <br>
  58638. A list separated by semicolon (;) which is to be executed to force the awakening.<br>
  58639. Example: attr &lt;name&gt; HardAlarmRoutine set Sonos_Schlafzimmer Volume 40;set Licht dim 90
  58640. </li>
  58641. <li><b>HardAlarmTimeInSec</b> <br>
  58642. Here you can specify in seconds how long the alarm can "run" until HardAlarmRoutine is started.<br>
  58643. Example: attr &lt;name&gt; HardAlarmTimeInSec 300
  58644. </li>
  58645. <li><b>OffRoutine</b> <br>
  58646. A list separated by semicolon (;) which Fhem operate at the OffDefaultTime.<br>
  58647. Example: attr &lt;name&gt; OffRoutine set rr_Florian home;set Heizung on
  58648. </li>
  58649. <li><b>OffDefaultTime</b> <br>
  58650. Default time for the OffRoutine.<br>
  58651. Example: attr &lt;name&gt; OffDefaultTime 07:30
  58652. </li>
  58653. <li><b>MaxAlarmDurationInSec</b> <br>
  58654. Duration in seconds to stop automatically the running alarm.<br>
  58655. Example: attr &lt;name&gt; MaxAlarmDurationInSec 120
  58656. </li>
  58657. <li><b>RepRoutine</b> <br>
  58658. A list separated by semicolon (;) which is to be repeated.<br>
  58659. Example: attr &lt;name&gt; RepRoutine1 set Licht_Schlafzimmer dim 1
  58660. </li>
  58661. <li><b>RepRoutineWaitInSec</b> <br>
  58662. Time in seconds between the repetitions from RepRoutine.<br>
  58663. Example: attr &lt;name&gt; RepRoutine1WaitInSec 20
  58664. </li>
  58665. <li><b>RepRoutineRepeats</b> <br>
  58666. Number of repetitions of RepRoutine.<br>
  58667. Example: attr &lt;name&gt; RepRoutine1Repeats 15
  58668. </li>
  58669. <li><b>RepRoutineMode(Alarm|PreAlarm|off)</b> <br>
  58670. Alarm:Reproutine is started with the alarm.<br>
  58671. PreAlarm:Reproutine is started with the pre-alarm.<br>
  58672. off:Reproutine is deactivated.
  58673. </li>
  58674. <li><b>RepRoutineStop(Snooze|off)</b> <br>
  58675. Snooze:Reproutine is stopped with snooze.<br>
  58676. off:Reproutine is not stopped with snooze.
  58677. </li>
  58678. <li><b>HolidayDevice</b> <br>
  58679. Name of the holiday device.<br>
  58680. There are 3 possibilities:<br>
  58681. 1.holiday device from typ holiday or Calendar.<br>
  58682. &lt;devicename&gt;<br>
  58683. Example: attr &lt;name&gt; HolidayDevice Feiertage <br>
  58684. 2.On state of a device.For example a dummy <br>
  58685. &lt;devicename&gt;:&lt;value&gt; <br>
  58686. Example: attr &lt;name&gt; HolidayDevice MyDummy:Holiday <br>
  58687. Here the AlarmTime 8_Holiday takes effect when the state of the dummy has the value Holiday <br>
  58688. 3.On a reading of a device. <br>
  58689. &lt;devicename&gt;:&lt;readingname&gt;:&lt;value&gt;<br>
  58690. Example: attr &lt;name&gt; HolidayDevice MyDummy:Today:Holiday <br>
  58691. </li>
  58692. <li><b>HolidayCheck</b> <br>
  58693. 0 disables monitoring the holiday device<br>
  58694. 1 activates monitoring
  58695. </li>
  58696. <li><b>HolidayDays</b> <br>
  58697. List of days on which the alarmtime 8_Holiday may take effect<br>
  58698. Example: attr &lt;name&gt; HolidayDays 1|2|3|4|5 <br>
  58699. Default: 1|2|3|4|5|6|7
  58700. </li>
  58701. <li><b>VacationDevice</b> <br>
  58702. Name of the vacation device.<br>
  58703. There are 3 possibilities:<br>
  58704. 1.vacation device from typ holiday or Calendar.<br>
  58705. &lt;devicename&gt; <br>
  58706. Example: attr &lt;name&gt; VacationDevice Ferien <br>
  58707. 2.On state of a device.For example a dummy <br>
  58708. &lt;devicename&gt;:&lt;value&gt; <br>
  58709. Example: attr &lt;name&gt; VacationDevice MyDummy:Vacation <br>
  58710. Here the AlarmTime 9_Vacation takes effect when the state of the dummy has the value Vacation <br>
  58711. 3.On a reading of a device. <br>
  58712. &lt;devicename&gt;:&lt;readingname&gt;:&lt;value&gt; <br>
  58713. Example: attr &lt;name&gt; VacationDevice MyDummy:Today:Vacation <br>
  58714. </li>
  58715. <li><b>VacationCheck</b> <br>
  58716. 0 disables monitoring the vacation device<br>
  58717. 1 activates monitoring
  58718. </li>
  58719. <li><b>VacationDays</b> <br>
  58720. List of days on which the alarmtime 9_Vacation may take effect<br>
  58721. Example: attr &lt;name&gt; VacationDays 1|2|3|4|5 <br>
  58722. Default: 1|2|3|4|5|6|7
  58723. </li>
  58724. <li><b>PresenceDevice</b> <br>
  58725. Name of the presence device.<br>
  58726. There are 3 possibilities:<br>
  58727. 1.presence device from Typ presence.<br>
  58728. &lt;devicename&gt; <br>
  58729. Example: attr &lt;name&gt; PresenceDevice Presence <br>
  58730. Alarmclock cancel alarm when state is absent <br>
  58731. 2.On state of a device.For example a dummy <br>
  58732. &lt;devicename&gt;:&lt;value&gt; <br>
  58733. Example: attr &lt;name&gt; PresenceDevice MyDummy:absent <br>
  58734. Here the Alarmclock cancel alarm when the state of the dummy has the value absent <br>
  58735. 3.On a reading of a device. <br>
  58736. &lt;devicename&gt;:&lt;readingname&gt;:&lt;value&gt; <br>
  58737. Example: attr &lt;name&gt; PresenceDevice MyDummy:user:notathome <br>
  58738. </li>
  58739. <li><b>PresenceCheck</b> <br>
  58740. 0 disables monitoring the presence device<br>
  58741. 1 activates monitoring
  58742. </li>
  58743. <li><b>WeekprofileName</b> <br>
  58744. Optional list with name for storing the week profiles<br>
  58745. Example: attr &lt;name&gt; WeekprofileName MyWeek1,MyWeek2,MyWeek3 <br>
  58746. </li>
  58747. <li><b>disable</b> <br>
  58748. 1 disables all alarms<br>
  58749. 0 activates this again
  58750. </li>
  58751. </ul>
  58752. </ul>
  58753. <a name="alexa"></a>
  58754. <h3>alexa</h3>
  58755. <ul>
  58756. Module to control the integration of Amazon Alexa devices with FHEM.<br><br>
  58757. Notes:
  58758. <ul>
  58759. <li>JSON has to be installed on the FHEM host.</li>
  58760. </ul>
  58761. <a name="alexa_Set"></a>
  58762. <b>Set</b>
  58763. <ul>
  58764. <li>reload [name]<br>
  58765. Reloads the device <it>name</it> or all devices in alexa-fhem. Subsequently you have to start a device discovery
  58766. for the home automation skill in the amazon alexa app.</li>
  58767. </ul>
  58768. <a name="alexa_Get"></a>
  58769. <b>Get</b>
  58770. <ul>
  58771. <li>customSlotTypes<br>
  58772. Instructs alexa-fhem to write the device specific Custom Slot Types for the Interaction Model
  58773. configuration to the alexa-fhem console and if possible to the requesting fhem frontend.</li>
  58774. <li>interactionModel<br>
  58775. Get Intent Schema, non device specific Custom Slot Types and Sample Utterances for the Interaction Model
  58776. configuration.</li>
  58777. <li>skillId<br>
  58778. shows the configured skillId.</li>
  58779. </ul>
  58780. <a name="alexa_Attr"></a>
  58781. <b>Attr</b>
  58782. <ul>
  58783. <li>alexaName<br>
  58784. The name to use for a device with alexa.</li>
  58785. <li>alexaRoom<br>
  58786. The room name to use for a device with alexa.</li>
  58787. <li>articles<br>
  58788. defaults to: der,die,das,den</li>
  58789. <li>prepositions<br>
  58790. defaults to: in,im,in der</li>
  58791. <li>alexaMapping<br>
  58792. maps spoken commands to intents for certain characteristics.</li>
  58793. <li>alexaTypes<br>
  58794. maps spoken device types to ServiceClasses. eg: attr alexa alexaTypes light:licht,lampe,lampen blind:rolladen,jalousie,rollo Outlet:steckdose TemperatureSensor:thermometer LockMechanism:schloss OccupancySensor: anwesenheit</li>
  58795. <li>echoRooms<br>
  58796. maps echo devices to default rooms.</li>
  58797. <li>fhemIntents<br>
  58798. maps spoken commands directed to fhem as a whole (i.e. not to specific devices) to events from the alexa device.</li>
  58799. <li>alexaConfirmationLevel<br>
  58800. </li>
  58801. <li>alexaStatusLevel<br>
  58802. </li>
  58803. <li>skillId<br>
  58804. skillId to use for automatic interaction model upload (not yet finished !!!)
  58805. </li>
  58806. Note: changes to attributes of the alexa device will automatically trigger a reconfiguration of
  58807. alxea-fhem and there is no need to restart the service.
  58808. </ul>
  58809. </ul><br>
  58810. <a name="allergy"></a>
  58811. <h3>allergy</h3>
  58812. <ul>
  58813. This modul provides allergy forecast data for Germany.<br/>
  58814. It requires the Perl module XML::Simple to be installed
  58815. <br/><br/>
  58816. <b>Define</b>
  58817. <ul>
  58818. <code>define &lt;name&gt; allergy &lt;zipcode&gt;</code>
  58819. <br>
  58820. Example: <code>define allergydata allergy 12345</code>
  58821. <br>&nbsp;
  58822. <li><code>zipcode</code>
  58823. <br>
  58824. German zipcode
  58825. </li><br>
  58826. </ul>
  58827. <br>
  58828. <b>Get</b>
  58829. <ul>
  58830. <li><code>data</code>
  58831. <br>
  58832. Manually trigger data update
  58833. </li><br>
  58834. </ul>
  58835. <br>
  58836. <b>Readings</b>
  58837. <ul>
  58838. <li><code>city</code>
  58839. <br>
  58840. Name of the city the forecast is read for
  58841. </li><br>
  58842. <li><code>fc<i>n</i>_total</code>
  58843. <br>
  58844. Daily maximum levels for all allergens that are not being ignored due to <i>ignoreList</i><br/>
  58845. </li><br>
  58846. <li><code>fc<i>n</i>_day_of_week</code>
  58847. <br>
  58848. Weekday, can be localized through <i>weekdaysFormat</i><br/>
  58849. </li><br>
  58850. <li><code>fc<i>n</i>_<i>allergen</i></code>
  58851. <br>
  58852. Daily levels for all allergens that are not being ignored due to <i>ignoreList</i>
  58853. </li><br>
  58854. </ul>
  58855. <br>
  58856. <b>Attributes</b>
  58857. <ul>
  58858. <li><code>ignoreList</code>
  58859. <br>
  58860. Comma-separated list of allergen names that are to be ignored during updates and for cumulated day levels calculation
  58861. </li><br>
  58862. <li><code>updateEmpty</code>
  58863. <br>
  58864. Also update (and keep) level readings for inactive allergens that are otherwise removed
  58865. </li><br>
  58866. <li><code>updateIgnored</code>
  58867. <br>
  58868. Also update (and keep) level readings for ignored allergens that are otherwise removed
  58869. </li><br>
  58870. <li><code>levelsFormat</code>
  58871. <br>
  58872. Localize levels by adding them comma separated (default: -,low,moderate,high,extreme)
  58873. </li><br>
  58874. <li><code>weekdaysFormat</code>
  58875. <br>
  58876. Localize Weekdays by adding them comma separated (default: Sun,Mon,Tue,Wed,Thu,Fr,Sat)
  58877. </li><br>
  58878. </ul>
  58879. </ul>
  58880. <a name="allowed"></a>
  58881. <h3>allowed</h3>
  58882. <ul>
  58883. <br>
  58884. <a name="alloweddefine"></a>
  58885. <b>Define</b>
  58886. <ul>
  58887. <code>define &lt;name&gt; allowed &lt;deviceList&gt;</code>
  58888. <br><br>
  58889. Authorize execution of commands and modification of devices based on the
  58890. frontend used and/or authenticate users.<br><br>
  58891. If there are multiple instances defined which are valid for a given
  58892. frontend device, then all authorizations must succeed. For authentication
  58893. it is sufficient when one of the instances succeeds. The checks are
  58894. executed in alphabetical order of the allowed instance names.<br><br>
  58895. <b>Note:</b> this module should work as intended, but no guarantee
  58896. can be given that there is no way to circumvent it.<br><br>
  58897. Examples:
  58898. <ul><code>
  58899. define allowedWEB allowed<br>
  58900. attr allowedWEB validFor WEB,WEBphone,WEBtablet<br>
  58901. attr allowedWEB basicAuth { "$user:$password" eq "admin:secret" }<br>
  58902. attr allowedWEB allowedCommands set,get<br><br>
  58903. define allowedTelnet allowed<br>
  58904. attr allowedTelnet validFor telnetPort<br>
  58905. attr allowedTelnet password secret<br>
  58906. </code></ul>
  58907. <br>
  58908. </ul>
  58909. <a name="allowedset"></a>
  58910. <b>Set</b>
  58911. <ul>
  58912. <li>basicAuth &lt;username&gt; &lt;password&gt;</li>
  58913. <li>password &lt;password&gt;</li>
  58914. <li>globalpassword &lt;password&gt;<br>
  58915. these commands set the corresponding attribute, by computing an SHA256
  58916. hash from the arguments and a salt. Note: the perl module Device::SHA is
  58917. needed.
  58918. </li>
  58919. </ul><br>
  58920. <a name="allowedget"></a>
  58921. <b>Get</b> <ul>N/A</ul><br>
  58922. <a name="allowedattr"></a>
  58923. <b>Attributes</b>
  58924. <ul>
  58925. <li><a href="#disable">disable</a></li><br>
  58926. <a name="allowedCommands"></a>
  58927. <li>allowedCommands<br>
  58928. A comma separated list of commands allowed from the matching frontend
  58929. (see validFor).<br>
  58930. If set to an empty list <code>, (i.e. comma only)</code>
  58931. then no comands are allowed. If set to <code>get,set</code>, then only
  58932. a "regular" usage is allowed via set and get, but changing any
  58933. configuration is forbidden.<br>
  58934. </li><br>
  58935. <a name="allowedDevices"></a>
  58936. <li>allowedDevices<br>
  58937. A comma separated list of device names which can be manipulated via the
  58938. matching frontend (see validFor).
  58939. </li><br>
  58940. <a name="basicAuth"></a>
  58941. <li>basicAuth, basicAuthMsg<br>
  58942. request a username/password authentication for FHEMWEB access.
  58943. It can be a base64 encoded string of user:password, an SHA256 hash
  58944. (which should be set via the corresponding set command) or a perl
  58945. expression if enclosed in {}, where $user and $password are set, and
  58946. which returns true if accepted or false if not. Examples:
  58947. <ul><code>
  58948. attr allowed basicAuth ZmhlbXVzZXI6c2VjcmV0<br>
  58949. attr allowed basicAuth SHA256:F87740B5:q8dHeiClaPLaWVsR/rqkzcBhw/JvvwVi4bEwKmJc/Is<br>
  58950. attr allowed basicAuth {"$user:$password" eq "fhemuser:secret"}<br>
  58951. </code></ul>
  58952. If basicAuthMsg is set, it will be displayed in the popup window when
  58953. requesting the username/password. Note: not all browsers support this
  58954. feature.<br>
  58955. </li><br>
  58956. <a name="basicAuthExpiry"></a>
  58957. <li>basicAuthExpiry<br>
  58958. allow the basicAuth to be kept valid for a given number of days.
  58959. So username/password as specified in basicAuth are only requested
  58960. after a certain period.
  58961. This is achieved by sending a cookie to the browser that will expire
  58962. after the given period.
  58963. Only valid if basicAuth is set.
  58964. </li><br>
  58965. <a name="password"></a>
  58966. <li>password<br>
  58967. Specify a password for telnet instances, which has to be entered as the
  58968. very first string after the connection is established. The same rules
  58969. apply as for basicAuth, with the expception that there is no user to be
  58970. specified.<br>
  58971. Note: if this attribute is set, you have to specify a password as the
  58972. first argument when using fhem.pl in client mode:
  58973. <ul>
  58974. perl fhem.pl localhost:7072 secret "set lamp on"
  58975. </ul>
  58976. </li><br>
  58977. <a name="globalpassword"></a>
  58978. <li>globalpassword<br>
  58979. Just like the attribute password, but a password will only required for
  58980. non-local connections.
  58981. </li><br>
  58982. <a name="validFor"></a>
  58983. <li>validFor<br>
  58984. A comma separated list of frontend names. Currently supported frontends
  58985. are all devices connected through the FHEM TCP/IP library, e.g. telnet
  58986. and FHEMWEB. The allowed instance is only active, if this attribute is
  58987. set.
  58988. </li>
  58989. </ul>
  58990. <br>
  58991. </ul>
  58992. <a name="apptime"></a>
  58993. <h3>apptime</h3>
  58994. <div style="padding-left: 2ex;">
  58995. <h4><code>apptime</code></h4>
  58996. <p>
  58997. apptime provides information about application procedure execution time.
  58998. It is designed to identify long running jobs causing latency as well as
  58999. general high <abbr>CPU</abbr> usage jobs.
  59000. </p>
  59001. <p>
  59002. No information about <abbr>FHEM</abbr> kernel times and delays will be provided.
  59003. </p>
  59004. <p>
  59005. Once started, apptime monitors tasks. User may reset counter during operation.
  59006. apptime adds about 1% <abbr>CPU</abbr> load in average to <abbr>FHEM</abbr>.
  59007. </p>
  59008. <p>
  59009. In order to remove apptime, <kbd>shutdown restart</kbd> is necessary.
  59010. </p>
  59011. <p>
  59012. <strong>Features</strong>
  59013. </P>
  59014. <dl>
  59015. <dt><code><kbd>apptime</kbd></code></dt>
  59016. <dd>
  59017. <p>
  59018. <kbd>apptime</kbd> is started with the its first call and continously monitor operations.<br>
  59019. To unload apptime, <kbd>shutdown restart</kbd> is necessary.<br> </li>
  59020. </p>
  59021. </dd>
  59022. <dt><code><kbd>apptime clear</code></dt>
  59023. <dd>
  59024. <p>
  59025. Reset all counter and start from zero.
  59026. </p>
  59027. </dd>
  59028. <dt><code><kbd>apptime pause</code></dt>
  59029. <dd>
  59030. <p>
  59031. Suspend accumulation of data. Data is not cleared.
  59032. </p>
  59033. </dd>
  59034. <dt><code><kbd>apptime cont</code></dt>
  59035. <dd>
  59036. <p>
  59037. Continue data collection after pause.
  59038. </p>
  59039. </dd>
  59040. <dt><code><kbd>apptime [count|funktion|average|clear|max|name|total] [all]</kbd></code></dt>
  59041. <dd>
  59042. <p>
  59043. Display a table sorted by the field selected.
  59044. </p>
  59045. <p>
  59046. <strong><kbd>all</kbd></strong> will display the complete table while by default only the top lines are printed.<
  59047. </p>
  59048. </dd>
  59049. </dl>
  59050. <p>
  59051. <strong>Columns:</strong>
  59052. </p>
  59053. <dl>
  59054. <dt><strong>name</strong></dt>
  59055. <dd>
  59056. <p>
  59057. Name of the entity executing the procedure.
  59058. </p>
  59059. <p>
  59060. If it is a function called by InternalTimer the name starts with <var>tmr-</var>.
  59061. By then it gives the name of the function to be called.
  59062. </p>
  59063. </dd>
  59064. <dt><strong>funktion</strong><dt>
  59065. <dd>
  59066. <p>
  59067. Procedure name which was executed.
  59068. </p>
  59069. <p>
  59070. If it is an <var>InternalTimer</var> call it gives its calling parameter.
  59071. </p>
  59072. </dd>
  59073. <dt><strong>max</strong></dt>
  59074. <dd>
  59075. <p>
  59076. Longest duration measured for this procedure in <abbr>ms</abbr>.
  59077. </p>
  59078. </dd>
  59079. <dt><strong>count</strong></dt>
  59080. <dd>
  59081. <p>
  59082. Number of calls for this procedure.
  59083. </p>
  59084. </dt>
  59085. <dt><strong>total</strong></dt>
  59086. <dd>
  59087. <p>
  59088. Accumulated duration of this procedure over all calls monitored.
  59089. </p>
  59090. </dd>
  59091. <dt><strong>average</strong></dt>
  59092. <dd>
  59093. <p>
  59094. Average time a call of this procedure takes.
  59095. </p>
  59096. </dd>
  59097. <dt><strong>maxDly</strong></dt>
  59098. <dd>
  59099. <p>
  59100. Maximum delay of a timer call to its schedules time.
  59101. This column is not relevant for non-timer calls.
  59102. </p>
  59103. </dd>
  59104. <dt><strong>param Max call</strong></dt>
  59105. <dd>
  59106. <p>
  59107. Gives the parameter of the call with the longest duration.
  59108. </p>
  59109. </dd>
  59110. </dl>
  59111. </div>
  59112. <a name="archetype"></a>
  59113. <h3>archetype</h3>
  59114. ( en | <a href="commandref_DE.html#archetype">de</a> )
  59115. <div>
  59116. <ul>
  59117. With an archetype, attributes are transferred to inheritors, other devices.
  59118. The inheritors can be defined according to a given pattern in the archetype
  59119. and for relations, a certain group of devices.<br>
  59120. <br>
  59121. Notes:
  59122. <ul>
  59123. <li>
  59124. <code>$name</code><br>
  59125. name of the inheritor
  59126. </li><br>
  59127. <li>
  59128. <code>$room</code><br>
  59129. room of the inheritor
  59130. </li><br>
  59131. <li>
  59132. <code>$relation</code><br>
  59133. name of the relation
  59134. </li><br>
  59135. <li>
  59136. <code>$SELF</code><br>
  59137. name of the archetype
  59138. </li>
  59139. </ul>
  59140. <br>
  59141. <a name="archetypecommand"></a>
  59142. <b>Commands</b>
  59143. <ul>
  59144. <code>clean [check]</code><br>
  59145. Defines all inheritors for all relations und inheritance all inheritors
  59146. with the attributes specified under the attribute attribute.<br>
  59147. If the "check" parameter is specified, all outstanding attributes and
  59148. inheritors are displayed.
  59149. </ul>
  59150. <br>
  59151. <a name="archetypedefine"></a>
  59152. <b>Define</b>
  59153. <ul>
  59154. <code>
  59155. define &lt;name&gt; archetype [&lt;devspec&gt;] [&lt;devspec&gt;] [...]
  59156. </code><br>
  59157. In the &lt;devspec&gt; are described all the inheritors for this
  59158. archetype. Care should be taken to ensure that each inheritor is
  59159. associated with only one archetype.<br>
  59160. If no &lt;devspec&gt; is specified, this is set with "defined_by=$SELF".
  59161. This devspec is also always checked, even if it is not specified.<br>
  59162. See the section on
  59163. <a href="#devspec">device specification</a>
  59164. for details of the &lt;devspec&gt;.<br>
  59165. <br>
  59166. <code>define &lt;name&gt; archetype derive attributes</code><br>
  59167. If the DEF specifies "derive attributes" it is a special archetype. It
  59168. derives attributes based on a pattern.<br>
  59169. The pattern is described with the actual_. + Attributes.<br>
  59170. All devices with all the mandatory attributes of a pattern are listed as
  59171. inheritors.
  59172. </ul>
  59173. <br>
  59174. <a name="archetypeset"></a>
  59175. <b>Set</b>
  59176. <ul>
  59177. <li>
  59178. <code>addToAttrList &lt;attribute&gt;</code><br>
  59179. The command is only possible for an archetype with DEF
  59180. "derive attributes".<br>
  59181. Add an entry to the userattr of the global device so that it is
  59182. available to all of the devices.<br>
  59183. This can be useful to derive the alias according to a pattern.
  59184. </li>
  59185. <br>
  59186. <li>
  59187. <code>define inheritors</code><br>
  59188. Defines an inheritor for all relations according to the pattern:<br>
  59189. <ul>
  59190. <code>
  59191. define &lt;metaNAME&gt; &lt;actualTYPE&gt; [&lt;metaDEF&gt;]
  59192. </code>
  59193. </ul>
  59194. When an inheritor Is defined, it is initialized with the commands
  59195. specified under the initialize attribute, and the archetype assign the
  59196. defined_by attribute to the value $ SELF.<br>
  59197. The relations, metaNAME, actualTYPE, and metaDEF are described in
  59198. the attributes.
  59199. </li>
  59200. <br>
  59201. <li>
  59202. <code>derive attributes</code><br>
  59203. This command is only possible for an archetype with DEF
  59204. "derive attributes".<br>
  59205. Derives all attributes specified under the attributes attribute for all
  59206. inheritors.
  59207. </li>
  59208. <br>
  59209. <li>
  59210. <code>inheritance</code><br>
  59211. Inheritance all attributes specified under the attributes attribute for
  59212. all inheritors.
  59213. </li>
  59214. <br>
  59215. <li>
  59216. <code>initialize inheritors</code><br>
  59217. Executes all commands specified under the attributes initialize for all
  59218. inheritors.
  59219. </li>
  59220. <br>
  59221. <li>
  59222. <code>raw &lt;command&gt;</code><br>
  59223. Executes the command for all inheritors.
  59224. </li>
  59225. </ul>
  59226. <br>
  59227. <a name="archetypeget"></a>
  59228. <b>Get</b>
  59229. <ul>
  59230. <li>
  59231. <code>inheritors</code><br>
  59232. Displays all inheritors.
  59233. </li>
  59234. <br>
  59235. <li>
  59236. <code>relations</code><br>
  59237. Displays all relations.
  59238. </li>
  59239. <br>
  59240. <li>
  59241. <code>pending attributes</code><br>
  59242. Displays all outstanding attributes specified under the attributes
  59243. attributes for all inheritors, which do not match the attributes of the
  59244. archetype.
  59245. </li>
  59246. <br>
  59247. <li>
  59248. <code>pending inheritors</code><br>
  59249. Displays all outstanding inheritors, which should be defined on the
  59250. basis of the relations
  59251. </li>
  59252. </ul>
  59253. <br>
  59254. <a name="archetypeattr"></a>
  59255. <b>Attribute</b>
  59256. <ul>
  59257. Notes:<br>
  59258. All attributes that can be inherited can be pre-modified with a modifier.
  59259. <ul>
  59260. <li>
  59261. <code>attr archetype &lt;attribute&gt; undef:&lt;...&gt;</code><br>
  59262. If <code>undef:</code> preceded, the attribute is inherited only if
  59263. the inheritors does not already have this attribute.
  59264. </li><br>
  59265. <li>
  59266. <code>
  59267. attr archetype &lt;attribute&gt;
  59268. least[(&lt;seperator&gt;)]:&lt;...&gt;
  59269. </code><br>
  59270. If a list is inherited, it can be specified that these elements
  59271. should be at least present, by prepending the
  59272. <code>least[(&lt;seperator&gt;)]:</code>.<br>
  59273. If no separator is specified, the space is used as separator.
  59274. </li>
  59275. </ul>
  59276. <br>
  59277. <li>
  59278. <code>actual_&lt;attribute&gt; &lt;value&gt;</code><br>
  59279. &lt;value&gt; can be specified as &lt;text&gt; or {perl code}.<br>
  59280. If the attribute &lt;attribute&gt; becomes inheritance the return
  59281. value of the attribute actual_&lt;attribute&gt; is replacing the value
  59282. of the attribute.<br>
  59283. The archetype with DEF "derive attributes" can be used to define
  59284. patterns.<br>
  59285. Example:
  59286. <code>
  59287. actual_alias %captionRoom|room%: %description%[ %index%][%suffix%]
  59288. </code><br>
  59289. All terms enclosed in% are attributes. An order can be achieved by |.
  59290. If an expression is included in [] it is optional.<br>
  59291. The captionRoom, description, index, and suffix expressions are added
  59292. by addToAttrList.<br>
  59293. </li>
  59294. <br>
  59295. <li>
  59296. <code>actualTYPE &lt;TYPE&gt;</code><br>
  59297. Sets the TYPE of the inheritor. The default value is dummy.
  59298. </li>
  59299. <br>
  59300. <li>
  59301. <code>attributes &lt;attribute&gt; [&lt;attribute&gt;] [...]</code><br>
  59302. Space-separated list of attributes to be inherited.
  59303. </li>
  59304. <br>
  59305. <li>
  59306. <code>
  59307. attributesExclude &lt;attribute&gt; [&lt;attribute&gt;] [...]
  59308. </code><br>
  59309. A space-separated list of attributes that are not inherited to these
  59310. inheritors.
  59311. </li>
  59312. <br>
  59313. <li>
  59314. <code>autocreate 0</code><br>
  59315. The archetype does not automatically inherit attributes to new devices,
  59316. and inheritors are not created automatically for new relations.<br>
  59317. The default value is 1.
  59318. </li>
  59319. <br>
  59320. <li>
  59321. <code>defined_by &lt;...&gt;</code><br>
  59322. Auxiliary attribute to recognize by which archetype the inheritor was
  59323. defined.
  59324. </li>
  59325. <br>
  59326. <li>
  59327. <code>delteAttributes 1</code><br>
  59328. If an attribute is deleted in the archetype, it is also deleted for all
  59329. inheritors.<br>
  59330. The default value is 0.
  59331. </li>
  59332. <br>
  59333. <li>
  59334. <code>disable 1</code><br>
  59335. No attributes are inherited and no inheritors are defined.
  59336. </li>
  59337. <br>
  59338. <li>
  59339. <code>initialize &lt;initialize&gt;</code><br>
  59340. &lt;initialize&gt; can be specified as &lt;text&gt; or {perl code}.<br>
  59341. The &lt;text&gt; or the return of {perl code} must be a list of FHEM
  59342. commands separated by a semicolon (;). These are used to initialize the
  59343. inheritors when they are defined.
  59344. </li>
  59345. <br>
  59346. <li>
  59347. <code>metaDEF &lt;metaDEF&gt;</code><br>
  59348. &lt;metaDEF&gt; can be specified as &lt;text&gt; or {perl code} and
  59349. describes the structure of the DEF for the inheritors.
  59350. </li>
  59351. <br>
  59352. <li>
  59353. <code>metaNAME &lt;metaNAME&gt;</code><br>
  59354. &lt;metaNAME&gt; can be specified as &lt;text&gt; or {perl code} and
  59355. describes the structure of the name for the inheritors.
  59356. </li>
  59357. <br>
  59358. <li>
  59359. <code><a href="#readingList">readingList</a></code>
  59360. </li>
  59361. <br>
  59362. <li>
  59363. <code>relations &lt;devspec&gt; [&lt;devspec&gt;] [...]</code><br>
  59364. The relations describes all the relations that exist for this
  59365. archetype.<br>
  59366. See the section on
  59367. <a href="#devspec">device specification</a>
  59368. for details of the &lt;devspec&gt;.
  59369. </li>
  59370. <br>
  59371. <li>
  59372. <code><a href="#setList">setList</a></code>
  59373. </li>
  59374. <br>
  59375. <li>
  59376. <code>splitRooms 1</code><br>
  59377. Returns every room seperatly for each relation in $room.
  59378. </li>
  59379. <br>
  59380. </ul>
  59381. <br>
  59382. <a name="archetypeexamples"></a>
  59383. <b>Examples</b>
  59384. <ul>
  59385. <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
  59386. <u>The following sample codes can be imported via "Raw definition".</u>
  59387. </a>
  59388. <br>
  59389. <br>
  59390. <li>
  59391. <b>
  59392. All plots should be moved to the group "history":
  59393. </b>
  59394. <ul>
  59395. <pre>defmod SVG_archetype archetype TYPE=SVG
  59396. attr SVG_archetype group verlaufsdiagramm
  59397. attr SVG_archetype attributes group</pre>
  59398. </ul>
  59399. </li>
  59400. <li>
  59401. <b>
  59402. In addition, a weblink should be created for all plots:
  59403. </b>
  59404. <ul>
  59405. <pre>defmod SVG_link_archetype archetype
  59406. attr SVG_link_archetype relations TYPE=SVG
  59407. attr SVG_link_archetype actualTYPE weblink
  59408. attr SVG_link_archetype metaNAME $relation\_link
  59409. attr SVG_link_archetype metaDEF link ?detail=$relation
  59410. attr SVG_link_archetype initialize attr $name room $room;;
  59411. attr SVG_link_archetype group verlaufsdiagramm
  59412. attr SVG_link_archetype attributes group</pre>
  59413. </ul>
  59414. </li>
  59415. </ul>
  59416. </ul>
  59417. </div>
  59418. <a name="at"></a>
  59419. <h3>at</h3>
  59420. <ul>
  59421. Start an arbitrary FHEM command at a later time.<br>
  59422. <br>
  59423. <a name="atdefine"></a>
  59424. <b>Define</b>
  59425. <ul>
  59426. <code>define &lt;name&gt; at [&lt;timespec&gt;|&lt;datespec&gt;]
  59427. &lt;command&gt;</code><br>
  59428. <br>
  59429. <code>&lt;timespec&gt;</code> format: [+][*{N}]&lt;timedet&gt;<br>
  59430. <ul>
  59431. The optional <code>+</code> indicates that the specification is
  59432. <i>relative</i>(i.e. it will be added to the current time).<br>
  59433. The optional <code>*</code> indicates that the command should be
  59434. executed <i>repeatedly</i>.<br>
  59435. The optional <code>{N}</code> after the * indicates,that the command
  59436. should be repeated <i>N-times</i> only.<br>
  59437. &lt;timespec&gt; is either HH:MM, HH:MM:SS or {perlfunc()}. perlfunc must
  59438. return a string in timedet format. Note: {perlfunc()} may not contain
  59439. any spaces or tabs.<br>
  59440. &lt;datespec&gt; is either ISO8601 (YYYY-MM-DDTHH:MM:SS) or number of
  59441. seconds since 1970.
  59442. </ul>
  59443. <br>
  59444. Examples:
  59445. <PRE>
  59446. # absolute ones:
  59447. define a1 at 17:00:00 set lamp on # fhem command
  59448. define a2 at 17:00:00 { Log 1, "Teatime" } # Perl command
  59449. define a3 at 17:00:00 "/bin/echo "Teatime" > /dev/console" # shell command
  59450. define a4 at *17:00:00 set lamp on # every day
  59451. # relative ones
  59452. define a5 at +00:00:10 set lamp on # switch on in 10 seconds
  59453. define a6 at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
  59454. define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
  59455. # Blink 3 times if the piri sends a command
  59456. define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
  59457. # Switch the lamp on from sunset to 11 PM
  59458. define a9 at +*{sunset_rel()} set lamp on
  59459. define a10 at *23:00:00 set lamp off
  59460. # More elegant version, works for sunset > 23:00 too
  59461. define a11 at +*{sunset_rel()} set lamp on-till 23:00
  59462. # Only do this on weekend
  59463. define a12 at +*{sunset_rel()} { fhem("set lamp on-till 23:00") if($we) }
  59464. # Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
  59465. define a13 at *07:00 set lamp1,lamp2 on-till {sunrise(+600)}
  59466. # Switch the lamp off 2 minutes after sunrise each day
  59467. define a14 at *{sunrise(+120)} set lamp on
  59468. # Switch lamp1 on at sunset, not before 18:00 and not after 21:00
  59469. define a15 at *{sunset(0,"18:00","21:00")} set lamp1 on
  59470. </PRE>
  59471. Notes:<br>
  59472. <ul>
  59473. <li>if no <code>*</code> is specified, then a command will be executed
  59474. only once, and then the <code>at</code> entry will be deleted. In
  59475. this case the command will be saved to the statefile (as it
  59476. considered volatile, i.e. entered by cronjob) and not to the
  59477. configfile (see the <a href="#save">save</a> command.)
  59478. </li>
  59479. <li>if the current time is greater than the time specified, then the
  59480. command will be executed tomorrow.</li>
  59481. <li>For even more complex date handling you either have to call fhem from
  59482. cron or filter the date in a perl expression, see the last example and
  59483. the section <a href="#perl">Perl special</a>.
  59484. </li>
  59485. </ul>
  59486. <br>
  59487. </ul>
  59488. <a name="atset"></a>
  59489. <b>Set</b>
  59490. <ul>
  59491. <a name="modifyTimeSpec"></a>
  59492. <li>modifyTimeSpec &lt;timespec&gt;<br>
  59493. Change the execution time. Note: the N-times repetition is ignored.
  59494. It is intended to be used in combination with
  59495. <a href="#webCmd">webCmd</a>, for an easier modification from the room
  59496. overview in FHEMWEB.</li>
  59497. <li>inactive<br>
  59498. Inactivates the current device. Note the slight difference to the
  59499. disable attribute: using set inactive the state is automatically saved
  59500. to the statefile on shutdown, there is no explicit save necesary.<br>
  59501. This command is intended to be used by scripts to temporarily
  59502. deactivate the at.<br>
  59503. The concurrent setting of the disable attribute is not recommended.
  59504. </li>
  59505. <li>active<br>
  59506. Activates the current device (see inactive).</li>
  59507. <li>execNow<br>
  59508. Execute the command associated with the at. The execution of a relative
  59509. at is not affected by this command.</li>
  59510. </ul><br>
  59511. <a name="atget"></a>
  59512. <b>Get</b> <ul>N/A</ul><br>
  59513. <a name="atattr"></a>
  59514. <b>Attributes</b>
  59515. <ul>
  59516. <a name="alignTime"></a>
  59517. <li>alignTime<br>
  59518. Applies only to relative at definitions: adjust the time of the next
  59519. command execution so, that it will also be executed at the desired
  59520. alignTime. The argument is a timespec, see above for the
  59521. definition.<br>
  59522. Example:<br>
  59523. <ul>
  59524. # Make sure that it chimes when the new hour begins<br>
  59525. define at2 at +*01:00 set Chime on-for-timer 1<br>
  59526. attr at2 alignTime 00:00<br>
  59527. </ul>
  59528. </li><br>
  59529. <a name="computeAfterInit"></a>
  59530. <li>computeAfterInit<br>
  59531. If perlfunc() in the timespec relies on some other/dummy readings, then
  59532. it will return a wrong time upon FHEM start, as the at define is
  59533. processed before the readings are known. If computeAfterInit is set,
  59534. FHEM will recompute timespec after the initialization is finished.
  59535. </li><br>
  59536. <a name="disable"></a>
  59537. <li>disable<br>
  59538. Can be applied to at/watchdog/notify/FileLog devices.<br>
  59539. Disables the corresponding at/notify or FileLog device. Note:
  59540. If applied to an <a href="#at">at</a>, the command will not be executed,
  59541. but the next time will be computed.</li><br>
  59542. <a name="disabledForIntervals"></a>
  59543. <li>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM...<br>
  59544. Space separated list of HH:MM or D@HH:MM tupels. If the current time is
  59545. between the two time specifications, the current device is disabled.
  59546. Instead of HH:MM you can also specify HH or HH:MM:SS. D is the day of
  59547. the week, with 0 indicating Sunday and 3 indicating Wednesday. To
  59548. specify an interval spawning midnight, you have to specify two
  59549. intervals, e.g.:
  59550. <ul>
  59551. 23:00-24:00 00:00-01:00
  59552. </ul>
  59553. If parts of the attribute value are enclosed in {}, they are evaluated:
  59554. <ul>
  59555. {sunset_abs()}-24 {sunrise_abs()}-08
  59556. </ul>
  59557. </li><br>
  59558. <a name="skip_next"></a>
  59559. <li>skip_next<br>
  59560. Used for at commands: skip the execution of the command the next
  59561. time.</li><br>
  59562. <li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
  59563. </ul>
  59564. <br>
  59565. </ul>
  59566. <a name="autocreate"></a>
  59567. <h3>autocreate</h3>
  59568. <ul>
  59569. Automatically create not yet defined FHEM devices upon reception of a message
  59570. generated by this device. Note: devices which are polled (like the EMEM/EMWZ
  59571. accessed through the EM1010PC) will NOT be automatically created.
  59572. <br>
  59573. <a name="autocreatedefine"></a>
  59574. <b>Define</b>
  59575. <ul>
  59576. <code>define &lt;name&gt; autocreate</code><br>
  59577. <br>
  59578. <ul>
  59579. By defining an instance, the global attribute <a href=
  59580. "#autoload_undefined_devices">autoload_undefined_devices</a>
  59581. is set, so that modules for unknnown devices are automatically loaded.
  59582. The autocreate module intercepts the UNDEFINED event generated by each
  59583. module, creates a device and optionally also FileLog and SVG
  59584. entries.<br>
  59585. <b>Note 1:</b> devices will be created with a unique name, which contains
  59586. the type and a unique id for this type. When <a href="#rename">renaming
  59587. </a> the device, the automatically created filelog and SVG devices
  59588. will also be renamed.<br>
  59589. <b>Note 2:</b> you can disable the automatic creation by setting the
  59590. <a href="#disable">disable</a> attribute, in this case only the rename
  59591. hook is active, and you can use the <a href="#createlog">createlog</a>
  59592. command to add FileLog and SVG to an already defined device.
  59593. <b>Note 3:</b> It makes no sense to create more than one instance of this
  59594. module.
  59595. </ul>
  59596. <br>
  59597. Example:<PRE>
  59598. define autocreate autocreate
  59599. attr autocreate autosave
  59600. attr autocreate device_room %TYPE
  59601. attr autocreate filelog test2/log/%NAME-%Y.log
  59602. attr autocreate weblink
  59603. attr autocreate weblink_room Plots
  59604. </PRE>
  59605. </ul>
  59606. <a name="autocreateset"></a>
  59607. <b>Set</b> <ul>N/A</ul><br>
  59608. <a name="autocreateget"></a>
  59609. <b>Get</b> <ul>N/A</ul><br>
  59610. <a name="autocreateattr"></a>
  59611. <b>Attributes</b>
  59612. <ul>
  59613. <a name="autosave"></a>
  59614. <li>autosave<br>
  59615. After creating a device, automatically save the config file with the
  59616. command <a href="#save">save</a> command. Default is 1 (i.e. on), set
  59617. it to 0 to switch it off.<br>
  59618. <b>Note</b>: this attribute is deprecated, use the global autosave
  59619. attribute instead.
  59620. </li><br>
  59621. <a name="device_room"></a>
  59622. <li>device_room<br>
  59623. "Put" the newly created device in this room. The name can contain the
  59624. wildcards %TYPE and %NAME, see the example above.</li><br>
  59625. <a name="filelogattr"></a>
  59626. <li>filelog<br>
  59627. Create a filelog associated with the device. The filename can contain
  59628. the wildcards %TYPE and %NAME, see the example above. The filelog will
  59629. be "put" in the same room as the device.</li><br>
  59630. <a name="weblinkattr"></a>
  59631. <li>weblink<br>
  59632. Create an SVG associated with the device/filelog.</li><br>
  59633. <a name="weblink_room"></a>
  59634. <li>weblink_room<br>
  59635. "Put" the newly created SVG in this room. The name can contain the
  59636. wildcards %TYPE and %NAME, see the example above.</li><br>
  59637. <li><a href="#disable">disable</a></li>
  59638. <br>
  59639. <a name="ignoreTypes"></a>
  59640. <li>ignoreTypes<br>
  59641. This is a regexp, to ignore certain devices, e.g. the neighbours FHT.
  59642. You can specify more than one, with usual regexp syntax, e.g.<br>
  59643. attr autocreate ignoreTypes CUL_HOERMANN.*|FHT_1234|CUL_WS_7<br>
  59644. The word "Types" is somehow misleading, as it actually checks the
  59645. generated device name.
  59646. </li><br>
  59647. <a name="autocreateThreshold"></a>
  59648. <li>autocreateThreshold<br>
  59649. A list of &lt;type&gt;:&lt;count&gt;:&lt;interval&gt; triplets. A new
  59650. device is only created if there have been at least <code>count</code>
  59651. events of TYPE <code>type</code> in the last <code>interval</code>
  59652. seconds.<br> <code>attr autocreateThreshold
  59653. LaCrosse:2:30,EMT7110:2:60</code>
  59654. </li>
  59655. </ul>
  59656. <br>
  59657. <a name="createlog"></a>
  59658. <b>createlog</b>
  59659. <ul>
  59660. Use this command to manually add a FileLog and an SVG to an existing
  59661. device.
  59662. This command is part of the autocreate module.
  59663. </ul>
  59664. <br>
  59665. <a name="usb"></a>
  59666. <b>usb</b>
  59667. <ul>
  59668. Usage:
  59669. <ul><code>
  59670. usb scan<br>
  59671. usb create<br>
  59672. </code></ul>
  59673. This command will scan the /dev directory for attached USB devices, and
  59674. will try to identify them. With the argument scan you'll get back a list
  59675. of FHEM commands to execute, with the argument create there will be no
  59676. feedback, and the devices will be created instead.<br><br>
  59677. Note that switching a CUL to HomeMatic mode is still has to be done
  59678. manually.<br><br>
  59679. On Linux it will also check with the lsusb command, if unflashed CULs are
  59680. attached. If this is the case, it will call CULflash with the appropriate
  59681. parameters (or display the CULflash command if scan is specified). The
  59682. usb command will only flash one device per call.<br><br>
  59683. This command is part of the autocreate module.
  59684. </ul>
  59685. </ul>
  59686. <br>
  59687. <a name="average"></a>
  59688. <h3>average</h3>
  59689. <ul>
  59690. Compute additional average, minimum and maximum values for current day and
  59691. month.
  59692. <br>
  59693. <a name="averagedefine"></a>
  59694. <b>Define</b>
  59695. <ul>
  59696. <code>define &lt;name&gt; average &lt;regexp&gt;</code><br>
  59697. <br>
  59698. <ul>
  59699. The syntax for &lt;regexp&gt; is the same as the
  59700. regexp for <a href="#notify">notify</a>.<br>
  59701. If it matches, and the event is of the form "eventname number", then this
  59702. module computes the daily and monthly average, maximum and minimum values
  59703. and sums depending on attribute settings and generates events of the form
  59704. <ul>
  59705. &lt;device&gt; &lt;eventname&gt;_avg_day: &lt;computed_average&gt;
  59706. </ul>
  59707. <ul>
  59708. &lt;device&gt; &lt;eventname&gt;_min_day: &lt;minimum day value&gt;
  59709. </ul>
  59710. <ul>
  59711. &lt;device&gt; &lt;eventname&gt;_max_day: &lt;maximum day value&gt;
  59712. </ul>
  59713. <ul>
  59714. &lt;device&gt; &lt;eventname&gt;_cum_day: &lt;sum of the values during the day&gt;
  59715. </ul>
  59716. and
  59717. <ul>
  59718. &lt;device&gt; &lt;eventname&gt;_avg_month: &lt;computed_average&gt;
  59719. </ul>
  59720. <ul>
  59721. &lt;device&gt; &lt;eventname&gt;_min_month: &lt;minimum month value&gt;
  59722. </ul>
  59723. <ul>
  59724. &lt;device&gt; &lt;eventname&gt;_max_month: &lt;maximum month value&gt;
  59725. </ul>
  59726. <ul>
  59727. &lt;device&gt; &lt;eventname&gt;_cum_month: &lt;sum of the values during the month&gt;
  59728. </ul>
  59729. at the beginning of the next day or month respectively depending on attributes defined.<br>
  59730. The current average, minimum, maximum and the cumulated values are stored
  59731. in the device readings depending on attributes defined.
  59732. </ul>
  59733. <br>
  59734. Example:<PRE>
  59735. # Compute the average, minimum and maximum for the temperature events of
  59736. # the ws1 device
  59737. define avg_temp_ws1 average ws1:temperature.*
  59738. # Compute the average, minimum and maximum for each temperature event
  59739. define avg_temp_ws1 average .*:temperature.*
  59740. # Compute the average, minimum and maximum for all temperature and humidity events
  59741. # Events:
  59742. # ws1 temperature: 22.3
  59743. # ws1 humidity: 67.4
  59744. define avg_temp_ws1 average .*:(temperature|humidity).*
  59745. # Compute the same from a combined event. Note: we need two average
  59746. # definitions here, each of them defining the name with the first
  59747. # paranthesis, and the value with the second.
  59748. #
  59749. # Event: ws1 T: 52.3 H: 67.4
  59750. define avg_temp_ws1_t average ws1:(T):.([-\d\.]+).*
  59751. define avg_temp_ws1_h average ws1:.*(H):.([-\d\.]+).*
  59752. </PRE>
  59753. </ul>
  59754. <a name="averageset"></a>
  59755. <b>Set</b> <ul>N/A</ul><br>
  59756. <a name="averageget"></a>
  59757. <b>Get</b> <ul>N/A</ul><br>
  59758. <a name="averageattr"></a>
  59759. <b>Attributes</b>
  59760. <ul>
  59761. <li><a href="#disable">disable</a></li>
  59762. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  59763. <li>computeMethod</li>
  59764. defines how values are added up for the average calculation. This
  59765. attribute can be set to integral or counter.
  59766. The integral mode is meant for measuring continuous values like
  59767. temperature, counter is meant for adding up values, e.g. from a
  59768. feeding unit. In the first case, the time between the events plays an
  59769. important role, in the second case not. Default is integral.
  59770. <li>nominmax</li>
  59771. don't compute min and max values. Default is 0 (compute min & max).
  59772. <li>noaverage</li>
  59773. don't compute average values. Default is 0 (compute avarage).
  59774. </ul>
  59775. <a name="averageevents"></a>
  59776. <b>Generated events:</b>
  59777. <ul>
  59778. <li>&lt;eventname&gt;_avg_day: $avg_day</li>
  59779. <li>&lt;eventname&gt;_avg_month: $avg_month</li>
  59780. <li>&lt;eventname&gt;_cum_day: $cum_day (only if cumtype is set to raw)</li>
  59781. <li>&lt;eventname&gt;_cum_month: $cum_month (only if cumtype is set to raw)</li>
  59782. <li>&lt;eventname&gt;_min_day: $min_day</li>
  59783. <li>&lt;eventname&gt;_min_month: $min_month</li>
  59784. <li>&lt;eventname&gt;_max_day: $max_day</li>
  59785. <li>&lt;eventname&gt;_max_month: $max_month</li>
  59786. </ul>
  59787. </ul>
  59788. <a name="backup"></a>
  59789. <h3>backup</h3>
  59790. <ul>
  59791. <code>backup</code><br>
  59792. <br>
  59793. The complete FHEM directory (containing the modules), the WebInterface
  59794. pgm2 (if installed) and the config-file will be saved into a .tar.gz
  59795. file by default. The file is stored with a timestamp in the
  59796. <a href="#modpath">modpath</a>/backup directory or to a directory
  59797. specified by the global attribute <a href="#backupdir">backupdir</a>.<br>
  59798. Note: tar and gzip must be installed to use this feature.
  59799. <br>
  59800. <br>
  59801. If you need to call tar with support for symlinks, you could set the
  59802. global attribute <a href="#backupsymlink">backupsymlink</a> to everything
  59803. else as "no".
  59804. <br>
  59805. <br>
  59806. You could pass the backup to your own command / script by using the
  59807. global attribute <a href="#backupcmd">backupcmd</a>.
  59808. <br>
  59809. <br>
  59810. </ul>
  59811. <a name="cloneDummy"></a>
  59812. <h3>cloneDummy</h3>
  59813. <ul>This module provides a cloneDummy which will receive readings from any other device sending data
  59814. to fhem.<br>
  59815. E.g. may be used in an FHEM2FHEM environment. Duplicate source events which may occur within the
  59816. time given by the global attribute <a href="#dupTimeout">dupTimeout</a>, will be suppressed in order
  59817. to avoid overhead. The value of this attribute is to be changed with great care, as it affects other
  59818. parts of FHEM, too.<br>
  59819. the order of precedence for STATE is following:
  59820. <ul><li>if there is no parameter preset then state of cloneDummy (initialized,active)</li>
  59821. <li>if addStateEvent is set then the "state" of cloned Device is set
  59822. (no "state" from cloneDummy)</li>
  59823. <li>if the optional reading is set in define, then value of the optional reading.
  59824. (this will overstrike the previous two lines)</li>
  59825. <li>if stateFormat set ass attr, it will dominate all previous lines</li>
  59826. </ul>
  59827. <br><a name="cloneDummydefine"></a>
  59828. <b>Define</b>
  59829. <ul><code>define &lt;cloneDevice&gt; cloneDummy &lt;sourceDevice&gt; [reading]</code><br>
  59830. <br>Example:<br>
  59831. <br>
  59832. <ul><code>define clone_OWX_26_09FF26010000 cloneDummy OWX_26_09FF26010000</code>
  59833. </ul>
  59834. <br>Optional parameter [reading] will be written to STATE if provided.<br>
  59835. <br>Example:<br>
  59836. <br>
  59837. <ul><code>define clone_OWX_26_09FF26010000 cloneDummy OWX_26_09FF26010000 temperature</code>
  59838. </ul>
  59839. <br>
  59840. </ul>
  59841. <a name="cloneDummyset"></a>
  59842. <b>Set</b>
  59843. <ul>N/A
  59844. </ul>
  59845. <br>
  59846. <a name="cloneDummyget"></a>
  59847. <b>Get</b>
  59848. <ul>N/A
  59849. </ul>
  59850. <br>
  59851. <a name="cloneDummyattr"></a>
  59852. <b>Attributes</b>
  59853. <ul><li>addStateEvent
  59854. <br>When paremeter in Modul is set to 1 the originalstate of the original Device will be STATE
  59855. (Momentarily not possible in Connection with FHEM2FHEM)</li>
  59856. <br>
  59857. <li>cloneIgnore
  59858. <br>- comma separated list of readingnames that will NOT be generated.<br>
  59859. Useful to prevent truncated readingnames coming from state events.</li>
  59860. <br>
  59861. <li>deleteBeforeUpdate<br>
  59862. If set to 1, all readings will be deleted befor update.</li>
  59863. <br>
  59864. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  59865. </ul>
  59866. <br>
  59867. <b>Important: You MUST use different names for cloneDevice and sourceDevice!</b><br>
  59868. </ul>
  59869. <a name="cmdalias"></a>
  59870. <h3>cmdalias</h3>
  59871. <ul>
  59872. create new FHEM commands or replace internal ones.
  59873. <br><br>
  59874. <a name="cmdaliasdefine"></a>
  59875. <b>Define</b>
  59876. <ul>
  59877. <code>define &lt;name&gt; cmdalias &lt;cmd_to_be_replaced or new_cmd&gt;
  59878. [parameter] AS &lt;existing_cmd&gt;</code><br>
  59879. <br>
  59880. parameter is optional and is a regexp which must match the command
  59881. entered.
  59882. If it matches, then the specified &lt;existing_command&gt; will be
  59883. executed, which is a FHEM command (see <a href="#command">FHEM command
  59884. types</a> for details). Like in <a href="#notify">notify</a>, $EVENT or
  59885. $EVTPART may be used, in this case representing the
  59886. command arguments as whole or the unique words entered.<br>
  59887. </ul>
  59888. Notes:<ul>
  59889. <li>recursion is not allowed.</li>
  59890. <li>if there are multiple definitions, they are checked/executed in
  59891. alphabetically sorted &lt;name&gt; oder.</li>
  59892. </ul>
  59893. Examples:
  59894. <ul><code>
  59895. define s1 cmdalias shutdown update AS save;;shutdown<br>
  59896. define s2 cmdalias set lamp .* AS { Log 1, "$EVENT";; fhem("set $EVENT") }
  59897. </code></ul>
  59898. <a name="cmdaliasattr"></a>
  59899. <b>Attribute</b>
  59900. <ul>
  59901. <li><a href="#disable">disable</a></li>
  59902. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  59903. </ul>
  59904. </ul>
  59905. <a name="configDB"></a>
  59906. <h3>configDB</h3>
  59907. <ul>
  59908. <a href="https://forum.fhem.de/index.php?board=46.0">Link to FHEM forum</a><br/><br/>
  59909. This is the core backend library for configuration from SQL database.<br/>
  59910. See <a href="#configdb">configdb command documentation</a> for detailed info.<br/>
  59911. </ul>
  59912. <a name="configdb"></a>
  59913. <h3>configdb</h3>
  59914. <ul>
  59915. <a href="https://forum.fhem.de/index.php?board=46.0">Link to FHEM forum</a><br/><br/>
  59916. Starting with version 5079, fhem can be used with a configuration database instead of a plain text file (e.g. fhem.cfg).<br/>
  59917. This offers the possibility to completely waive all cfg-files, "include"-problems and so on.<br/>
  59918. Furthermore, configDB offers a versioning of several configuration together with the possibility to restore a former configuration.<br/>
  59919. Access to database is provided via perl's database interface DBI.<br/>
  59920. <br/>
  59921. <b>Interaction with other modules</b><br/>
  59922. <ul><br/>
  59923. Currently the fhem modules<br/>
  59924. <br/>
  59925. <li>02_RSS.pm</li>
  59926. <li>55_InfoPanel.pm</li>
  59927. <li>91_eventTypes</li>
  59928. <li>93_DbLog.pm</li>
  59929. <li>95_holiday.pm</li>
  59930. <li>98_SVG.pm</li>
  59931. <br/>
  59932. will use configDB to read their configuration data from database<br/>
  59933. instead of formerly used configuration files inside the filesystem.<br/>
  59934. <br/>
  59935. This requires you to import your configuration files from filesystem into database.<br/>
  59936. <br/>
  59937. Example:<br/>
  59938. <code>configdb fileimport FHEM/nrw.holiday</code><br/>
  59939. <code>configdb fileimport FHEM/myrss.layout</code><br/>
  59940. <code>configdb fileimport www/gplot/xyz.gplot</code><br/>
  59941. <br/>
  59942. <b>This does not affect the definitons of your holiday or RSS entities.</b><br/>
  59943. <br/>
  59944. <b>During migration all external configfiles used in current configuration<br/>
  59945. will be imported aufmatically.</b><br>
  59946. <br/>
  59947. Each fileimport into database will overwrite the file if it already exists in database.<br/>
  59948. <br/>
  59949. </ul><br/>
  59950. <br/>
  59951. <b>Prerequisits / Installation</b><br/>
  59952. <ul><br/>
  59953. <li>Please install perl package Text::Diff if not already installed on your system.</li><br/>
  59954. <li>You must have access to a SQL database. Supported database types are SQLITE, MYSQL and POSTGRESQL.</li><br/>
  59955. <li>The corresponding DBD module must be available in your perl environment,<br/>
  59956. e.g. sqlite3 running on a Debian systems requires package libdbd-sqlite3-perl</li><br/>
  59957. <li>Create an empty database, e.g. with sqlite3:<br/>
  59958. <pre>
  59959. mba:fhem udo$ sqlite3 configDB.db
  59960. SQLite version 3.7.13 2012-07-17 17:46:21
  59961. Enter ".help" for instructions
  59962. Enter SQL statements terminated with a ";"
  59963. sqlite> pragma auto_vacuum=2;
  59964. sqlite> .quit
  59965. mba:fhem udo$
  59966. </pre></li>
  59967. <li>The database tables will be created automatically.</li><br/>
  59968. <li>Create a configuration file containing the connection string to access database.<br/>
  59969. <br/>
  59970. <b>IMPORTANT:</b>
  59971. <ul><br/>
  59972. <li>This file <b>must</b> be named "configDB.conf"</li>
  59973. <li>This file <b>must</b> be located in the same directory containing fhem.pl and configDB.pm, e.g. /opt/fhem</li>
  59974. </ul>
  59975. <br/>
  59976. <pre>
  59977. ## for MySQL
  59978. ################################################################
  59979. #%dbconfig= (
  59980. # connection => "mysql:database=configDB;host=db;port=3306",
  59981. # user => "fhemuser",
  59982. # password => "fhempassword",
  59983. #);
  59984. ################################################################
  59985. #
  59986. ## for PostgreSQL
  59987. ################################################################
  59988. #%dbconfig= (
  59989. # connection => "Pg:database=configDB;host=localhost",
  59990. # user => "fhemuser",
  59991. # password => "fhempassword"
  59992. #);
  59993. ################################################################
  59994. #
  59995. ## for SQLite (username and password stay empty for SQLite)
  59996. ################################################################
  59997. #%dbconfig= (
  59998. # connection => "SQLite:dbname=/opt/fhem/configDB.db",
  59999. # user => "",
  60000. # password => ""
  60001. #);
  60002. ################################################################
  60003. </pre></li><br/>
  60004. </ul>
  60005. <b>Start with a complete new "fresh" fhem Installation</b><br/>
  60006. <ul><br/>
  60007. It's easy... simply start fhem by issuing following command:<br/><br/>
  60008. <ul><code>perl fhem.pl configDB</code></ul><br/>
  60009. <b>configDB</b> is a keyword which is recognized by fhem to use database for configuration.<br/>
  60010. <br/>
  60011. <b>That's all.</b> Everything (save, rereadcfg etc) should work as usual.
  60012. </ul>
  60013. <br/>
  60014. <b>or:</b><br/>
  60015. <br/>
  60016. <b>Migrate your existing fhem configuration into the database</b><br/>
  60017. <ul><br/>
  60018. It's easy, too... <br/>
  60019. <br/>
  60020. <li>start your fhem the last time with fhem.cfg<br/><br/>
  60021. <ul><code>perl fhem.pl fhem.cfg</code></ul></li><br/>
  60022. <br/>
  60023. <li>transfer your existing configuration into the database<br/><br/>
  60024. <ul>enter<br/><br/><code>configdb migrate</code><br/>
  60025. <br/>
  60026. into frontend's command line</ul><br/></br>
  60027. Be patient! Migration can take some time, especially on mini-systems like RaspberryPi or Beaglebone.<br/>
  60028. Completed migration will be indicated by showing database statistics.<br/>
  60029. Your original configfile will not be touched or modified by this step.</li><br/>
  60030. <li>shutdown fhem</li><br/>
  60031. <li>restart fhem with keyword configDB<br/><br/>
  60032. <ul><code>perl fhem.pl configDB</code></ul></li><br/>
  60033. <b>configDB</b> is a keyword which is recognized by fhem to use database for configuration.<br/>
  60034. <br/>
  60035. <b>That's all.</b> Everything (save, rereadcfg etc) should work as usual.
  60036. </ul>
  60037. <br/><br/>
  60038. <b>Additional functions provided</b><br/>
  60039. <ul><br/>
  60040. A new command <code>configdb</code> is propagated to fhem.<br/>
  60041. This command can be used with different parameters.<br/>
  60042. <br/>
  60043. <li><code>configdb attr [attribute] [value]</code></li><br/>
  60044. Provides the possibility to pass attributes to backend and frontend.<br/>
  60045. <br/>
  60046. <code> configdb attr private 1</code> - set the attribute named 'private' to value 1.<br/>
  60047. <br/>
  60048. <code> configdb attr private</code> - delete the attribute named 'private'<br/>
  60049. <br/>
  60050. <code> configdb attr</code> - show all defined attributes.<br/>
  60051. <br/>
  60052. <ul>Supported attributes:</ul>
  60053. <br/>
  60054. <ul><b>deleteimported</b> if set to 1 files will always be deleted from filesystem after import to database.<br/></ul><br/>
  60055. <ul><b>maxversions</b> set the maximum number of configurations stored in database. <br/>
  60056. The oldest version will be dropped in a "save config" if it would exceed this number.</ul><br/>
  60057. <ul><b>private</b> if set to 1 the user and password info will not be shown in 'configdb info' output.</ul><br/>
  60058. <ul><b>useCache</b> (experimental!) if set to 1 fileread from database will be cached.</ul><br/>
  60059. <br/>
  60060. <li><code>configdb diff &lt;device&gt; &lt;version&gt;</code></li><br/>
  60061. Compare configuration dataset for device &lt;device&gt;
  60062. from current version 0 with version &lt;version&gt;<br/>
  60063. Example for valid request:<br/>
  60064. <br/>
  60065. <code>configdb diff telnetPort 1</code><br/>
  60066. <br/>
  60067. will show a result like this:
  60068. <pre>
  60069. compare device: telnetPort in current version 0 (left) to version: 1 (right)
  60070. +--+--------------------------------------+--+--------------------------------------+
  60071. | 1|define telnetPort telnet 7072 global | 1|define telnetPort telnet 7072 global |
  60072. * 2|attr telnetPort room telnet * | |
  60073. +--+--------------------------------------+--+--------------------------------------+</pre>
  60074. <b>Special: configdb diff all current</b><br/>
  60075. <br/>
  60076. Will show a diff table containing all changes between saved version 0<br/>
  60077. and UNSAVED version from memory (currently running installation).<br/>
  60078. <br/>
  60079. <li><code>configdb dump [unzipped]</code></li><br/>
  60080. Create a gzipped dump file from from database.<br/>
  60081. If optional parameter 'unzipped' provided, dump file will be written unzipped.<br/>
  60082. <br/>
  60083. <br/>
  60084. <li><code>configdb filedelete &lt;Filename&gt;</code></li><br/>
  60085. Delete file from database.<br/>
  60086. <br/>
  60087. <br/>
  60088. <li><code>configdb fileexport &lt;targetFilename&gt;|all</code></li><br/>
  60089. Exports specified file (or all files) from database into filesystem.<br/>
  60090. Example:<br/>
  60091. <br/>
  60092. <code>configdb fileexport FHEM/99_myUtils.pm</code><br/>
  60093. <br/>
  60094. <br/>
  60095. <li><code>configdb fileimport &lt;sourceFilename&gt;</code></li><br/>
  60096. Imports specified text file from from filesystem into database.<br/>
  60097. Example:<br/>
  60098. <br/>
  60099. <code>configdb fileimport FHEM/99_myUtils.pm</code><br/>
  60100. <br/>
  60101. <br/>
  60102. <li><code>configdb filelist</code></li><br/>
  60103. Show a list with all filenames stored in database.<br/>
  60104. <br/>
  60105. <br/>
  60106. <li><code>configdb filemove &lt;sourceFilename&gt;</code></li><br/>
  60107. Imports specified fhem file from from filesystem into database and<br/>
  60108. deletes the file from local filesystem afterwards.<br/>
  60109. Example:<br/>
  60110. <br/>
  60111. <code>configdb filemove FHEM/99_myUtils.pm</code><br/>
  60112. <br/>
  60113. <br/>
  60114. <li><code>configdb fileshow &lt;Filename&gt;</code></li><br/>
  60115. Show content of specified file stored in database.<br/>
  60116. <br/>
  60117. <br/>
  60118. <li><code>configdb info</code></li><br/>
  60119. Returns some database statistics<br/>
  60120. <pre>
  60121. --------------------------------------------------------------------------------
  60122. configDB Database Information
  60123. --------------------------------------------------------------------------------
  60124. dbconn: SQLite:dbname=/opt/fhem/configDB.db
  60125. dbuser:
  60126. dbpass:
  60127. dbtype: SQLITE
  60128. --------------------------------------------------------------------------------
  60129. fhemconfig: 7707 entries
  60130. Ver 0 saved: Sat Mar 1 11:37:00 2014 def: 293 attr: 1248
  60131. Ver 1 saved: Fri Feb 28 23:55:13 2014 def: 293 attr: 1248
  60132. Ver 2 saved: Fri Feb 28 23:49:01 2014 def: 293 attr: 1248
  60133. Ver 3 saved: Fri Feb 28 22:24:40 2014 def: 293 attr: 1247
  60134. Ver 4 saved: Fri Feb 28 22:14:03 2014 def: 293 attr: 1246
  60135. --------------------------------------------------------------------------------
  60136. fhemstate: 1890 entries saved: Sat Mar 1 12:05:00 2014
  60137. --------------------------------------------------------------------------------
  60138. </pre>
  60139. Ver 0 always indicates the currently running configuration.<br/>
  60140. <br/>
  60141. <li><code>configdb list [device] [version]</code></li><br/>
  60142. Search for device named [device] in configuration version [version]<br/>
  60143. in database archive.<br/>
  60144. Default value for [device] = % to show all devices.<br/>
  60145. Default value for [version] = 0 to show devices from current version.<br/>
  60146. Examples for valid requests:<br/>
  60147. <br/>
  60148. <code>get configDB list</code><br/>
  60149. <code>get configDB list global</code><br/>
  60150. <code>get configDB list '' 1</code><br/>
  60151. <code>get configDB list global 1</code><br/>
  60152. <br/>
  60153. <li><code>configdb recover &lt;version&gt;</code></li><br/>
  60154. Restores an older version from database archive.<br/>
  60155. <code>configdb recover 3</code> will <b>copy</b> version #3 from database
  60156. to version #0.<br/>
  60157. Original version #0 will be lost.<br/><br/>
  60158. <b>Important!</b><br/>
  60159. The restored version will <b>NOT</b> be activated automatically!<br/>
  60160. You must do a <code>rereadcfg</code> or - even better - <code>shutdown restart</code> yourself.<br/>
  60161. <br/>
  60162. <li><code>configdb reorg [keep]</code></li><br/>
  60163. Deletes all stored versions with version number higher than [keep].<br/>
  60164. Default value for optional parameter keep = 3.<br/>
  60165. This function can be used to create a nightly running job for<br/>
  60166. database reorganisation when called from an at-Definition.<br/>
  60167. <br/>
  60168. <li><code>configdb search <searchTerm> [searchVersion]</code></li><br/>
  60169. Search for specified searchTerm in any given version (default=0)<br/>
  60170. <pre>
  60171. Example:
  60172. configdb search %2286BC%
  60173. Result:
  60174. search result for: %2286BC% in version: 0
  60175. --------------------------------------------------------------------------------
  60176. define az_RT CUL_HM 2286BC
  60177. define az_RT_Clima CUL_HM 2286BC04
  60178. define az_RT_Climate CUL_HM 2286BC02
  60179. define az_RT_ClimaTeam CUL_HM 2286BC05
  60180. define az_RT_remote CUL_HM 2286BC06
  60181. define az_RT_Weather CUL_HM 2286BC01
  60182. define az_RT_WindowRec CUL_HM 2286BC03
  60183. attr Melder_FAl peerIDs 00000000,2286BC03,
  60184. attr Melder_FAr peerIDs 00000000,2286BC03,
  60185. </pre>
  60186. <br/>
  60187. <li><code>configdb uuid</code></li><br/>
  60188. Returns a uuid that can be used for own purposes.<br/>
  60189. <br/>
  60190. </ul>
  60191. <br/>
  60192. <br/>
  60193. <b>Author's notes</b><br/>
  60194. <br/>
  60195. <ul>
  60196. <li>You can find two template files for datebase and configfile (sqlite only!) for easy installation.<br/>
  60197. Just copy them to your fhem installation directory (/opt/fhem) and have fun.</li>
  60198. <br/>
  60199. <li>The frontend option "Edit files"-&gt;"config file" will be removed when running configDB.</li>
  60200. <br/>
  60201. <li>Please be patient when issuing a "save" command
  60202. (either manually or by clicking on "save config").<br/>
  60203. This will take some moments, due to writing version informations.<br/>
  60204. Finishing the save-process will be indicated by a corresponding message in frontend.</li>
  60205. <br/>
  60206. <li>There still will be some more (planned) development to this extension,
  60207. especially regarding some perfomance issues.</li>
  60208. <br/>
  60209. <li>Have fun!</li>
  60210. </ul>
  60211. </ul>
  60212. <a name="copy"></a>
  60213. <h3>copy</h3>
  60214. <ul>
  60215. <code>copy &lt;orig name&gt; &lt;copy name&gt; [&lt;type dependent arguments&gt;]</code><br>
  60216. <br>
  60217. Create a copy of device &lt;orig name&gt; with the name &lt;copy name&gt;.<br>
  60218. If &lt;type dependent arguments&gt; are given they will replace the DEF of &lt;orig name&gt; for the creation of &lt;copy name&gt;.
  60219. </ul>
  60220. <a name="count"></a>
  60221. <h3>count</h3>
  60222. <ul>
  60223. <code>count [devspec]</code>
  60224. <br><br>
  60225. Count devices specified by devspec.<br/>
  60226. If no devspec given, count will return number of totally defined devices.<br/>
  60227. </ul>
  60228. <a name="dash_dhcp"></a>
  60229. <h3>dash_dhcp</h3>
  60230. <ul>
  60231. Module to integrate amazon dash buttons into FHEM;.<br><br>
  60232. The module can listen direclty to dhcp broadcast messages or listen to redirected openwrt dhcp log messages.
  60233. Notes:
  60234. <ul>
  60235. <li>if listening for dhcp messages the module has to run as root or you have to redirect port 67 with
  60236. <ul><code>iptables -A PREROUTING -t nat -i eth0 -p udp --dport 67 -j REDIRECT --to-port 6767</code></ul>
  60237. or
  60238. <ul><code>iptables -I PREROUTING -t nat -i eth0 -p udp --src 0.0.0.0 --dport 67 -j DNAT --to 0.0.0.0:6767</code></ul>
  60239. and use the port attribute to configure the redirected port.</li>
  60240. <li>to make iptables rules permanent see for example: https://www.thomas-krenn.com/de/wiki/Iptables_Firewall_Regeln_dauerhaft_speichern</li>
  60241. </ul>
  60242. <a name="dash_dhcp_Attr"></a>
  60243. <b>Attr</b>
  60244. <ul>
  60245. <li>devAlias<br>
  60246. space separated list of &lt;mac&gt;:&lt;alias&gt; pairs.</li>
  60247. <li>allowed<br>
  60248. comma separated list of allowed mac adresses</li>
  60249. <li>port<br>
  60250. the listen port. defaults to 67 for root and 6767 for other users.</li>
  60251. <li><a href="#disable">disable</a></li>
  60252. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  60253. </ul><br>
  60254. </ul><br>
  60255. <a name="deletefile"></a>
  60256. <h3>deletefile</h3>
  60257. <ul>
  60258. <code>deletefile &lt;filename&gt;</code><br/>
  60259. <br/>Delete a file in filesystem.<br/>
  60260. <br/>
  60261. <li>File must be listed in "Edit files"</li>
  60262. <li>File fhem.cfg must not be deleted.</li>
  60263. <li>Wildcards are not evaluated.</li>
  60264. </ul>
  60265. <a name="dewpoint"></a>
  60266. <h3>dewpoint</h3>
  60267. <ul>
  60268. Dewpoint calculations. Offers three different ways to use dewpoint: <br>
  60269. <ul>
  60270. <li><b>dewpoint</b><br>
  60271. Compute additional event dewpoint from a sensor offering temperature and humidity.</li>
  60272. <li><b>fan</b><br>
  60273. Generate a event to turn a fan on if the outside air has less water than the inside.</li>
  60274. <li><b>alarm</b><br>
  60275. Generate a mold alarm if a reference temperature is lower that the current dewpoint.</li>
  60276. <br>
  60277. </ul>
  60278. <a name="dewpointdefine"></a>
  60279. <b>Define</b>
  60280. <ul>
  60281. <code>define &lt;name&gt; dewpoint dewpoint &lt;devicename-regex&gt; [&lt;temp_name&gt; &lt;hum_name&gt; &lt;new_name&gt;]</code><br>
  60282. <br>
  60283. <ul>
  60284. Calculates dewpoint for device &lt;devicename-regex&gt; from temperature and humidity
  60285. and write it to a new reading named dewpoint.
  60286. If optional &lt;temp_name&gt;, &lt;hum_name&gt; and &lt;new_name&gt; is specified
  60287. then read temperature from reading &lt;temp_name&gt;, humidity from reading &lt;hum_name&gt;
  60288. and write the calculated dewpoint to reading &lt;new_name&gt;.<br>
  60289. If &lt;temp_name&gt; is T then use temperature from state T: H:, add &lt;new_name&gt; to the state.
  60290. </ul>
  60291. <br>
  60292. Example:<PRE>
  60293. # Compute the dewpoint for the temperature/humidity
  60294. # events of the temp1 device and generate reading dewpoint.
  60295. define dew_temp1 dewpoint dewpoint temp1
  60296. define dew_temp1 dewpoint dewpoint temp1 temperature humidity dewpoint
  60297. # Compute the dewpoint for the temperature/humidity
  60298. # events of all devices offering temperature and humidity
  60299. # and generate reading dewpoint.
  60300. define dew_all dewpoint dewpoint .*
  60301. define dew_all dewpoint dewpoint .* temperature humidity dewpoint
  60302. # Compute the dewpoint for the temperature/humidity
  60303. # events of the device Aussen_1 offering temperature and humidity
  60304. # and insert is into STATE.
  60305. define dew_state dewpoint dewpoint Aussen_1 T H D
  60306. # Compute the dewpoint for the temperature/humidity
  60307. # events of all devices offering temperature and humidity
  60308. # and insert the result into the STATE.
  60309. # Example STATE: "T: 10 H: 62.5" will change to
  60310. # "T: 10 H: 62.5 D: 3.2"
  60311. define dew_state dewpoint dewpoint .* T H D
  60312. </PRE>
  60313. </ul>
  60314. <ul>
  60315. <code>define &lt;name&gt; dewpoint fan &lt;devicename-regex&gt; &lt;devicename-outside&gt; &lt;min-temp&gt; [&lt;diff_temp&gt;]</code><br>
  60316. <br>
  60317. <ul>
  60318. May be used to turn an fan on or off if the outside air has less water.
  60319. <ul>
  60320. <li>
  60321. Generate event "fan: on" if (dewpoint of &lt;devicename-outside&gt;) + &lt;diff_temp&gt; is lower
  60322. than dewpoint of &lt;devicename&gt; and temperature of &lt;devicename-outside&gt; is &gt;= min-temp
  60323. and reading "fan" was not already "on". The event will be generated for &lt;devicename&gt;. Parameter &lt;diff-temp&gt; is optional</li>
  60324. <li>Generate event "fan: off": else and if reading "fan" was not already "off".</li>
  60325. </ul>
  60326. </ul>
  60327. <br>
  60328. Example:<PRE>
  60329. # Generate event "fan: on" when dewpoint of Aussen_1 is first
  60330. # time lower than basement_tempsensor and outside temperature is &gt;= 0
  60331. # and change it to "fan: off" is this condition changes.
  60332. # Set a switch on/off (fan_switch) depending on the state.
  60333. define dew_fan1 dewpoint fan basement_tempsensor Aussen_1 0
  60334. define dew_fan1_on notify basement_tempsensor.*fan:.*on set fan_switch on
  60335. define dew_fan1_off notify basement_tempsensor.*fan:.*off set fan_switch off
  60336. </PRE>
  60337. </ul>
  60338. <ul>
  60339. <code>define &lt;name&gt; dewpoint alarm &lt;devicename-regex&gt; &lt;devicename-reference&gt; &lt;diff-temp&gt;</code><br>
  60340. <br>
  60341. <ul>
  60342. Generate a mold alarm if a reference temperature is lower that the current dewpoint.
  60343. <ul>
  60344. <li>
  60345. Generate reading/event "alarm: on" if temperature of &lt;devicename-reference&gt; - &lt;diff-temp&gt; is lower
  60346. than dewpoint of &lt;devicename&gt; and reading "alarm" was not already "on". The event will be generated for &lt;devicename&gt;.</li>
  60347. <li>Generate reading/event "alarm: off" if temperature of &lt;devicename-reference&gt; - &lt;diff-temp&gt; is higher than dewpoint of &lt;devicename&gt; and reading "alarm" was not already "off".</li>
  60348. </ul>
  60349. </ul>
  60350. <br>
  60351. Example:<PRE>
  60352. # Using a wall temperature sensor (wallsensor) and a temp/hum sensor
  60353. # (roomsensor) to alarm if the temperature of the wall is lower than
  60354. # the dewpoint of the air. In this case the water of the air will
  60355. # condense on the wall because the wall is cold.
  60356. # Set a switch on (alarm_siren) if alarm is on using notify.
  60357. define dew_alarm1 dewpoint alarm roomsensor wallsensor 0
  60358. define roomsensor_alarm_on notify roomsensor.*alarm:.*on set alarm_siren on
  60359. define roomsensor_alarm_off notify roomsensor.*alarm:.*off set alarm_siren off
  60360. # If you do not have a temperature sensor in/on the wall, you may also
  60361. # compare the rooms dewpoint to the temperature of the same or another
  60362. # inside sensor. Alarm is temperature is 5 degrees colder than the
  60363. # inside dewpointinside.
  60364. define dev_alarm2 dewpoint alarm roomsensor roomsensor 5
  60365. </PRE>
  60366. </ul>
  60367. <a name="dewpointset"></a>
  60368. <b>Set</b> <ul>N/A</ul><br>
  60369. <a name="dewpointget"></a>
  60370. <b>Get</b> <ul>N/A</ul><br>
  60371. <a name="dewpointattr"></a>
  60372. <b>Attributes</b>
  60373. <ul>
  60374. <li><a href="#disable">disable</a></li>
  60375. <li>absFeuchte</li><br>
  60376. <ul>
  60377. AbsFeuchte also becomes by the absolute humidity set the attribute into the Readings of all things.
  60378. One can by these show information also in the status.
  60379. Example: (<Adapter> = the FHEM name of the adapter this one you must change)
  60380. <PRE>
  60381. stateFormat:
  60382. {sprintf("T: %.1f H: %.1f D: %.1f A: %.1f", ReadingsVal("<Adapter>","temperature",0), ReadingsVal("<Adapter>","H",0), ReadingsVal("<Adapter>","dewpoint",0), ReadingsVal("<Adapter>","absFeuchte",0))}
  60383. </PRE>
  60384. </ul>
  60385. <li>max_timediff<br>
  60386. Maximum time difference in seconds allowed between the temperature and humidity values for a device. dewpoint uses the Readings for temperature or humidity if they are not delivered in the event. This is necessary for using dewpoint with event-on-change-reading. Also needed for sensors that do deliver temperature and humidity in different events like for example technoline sensors TX3TH.<br>
  60387. If not set default is 1 second.
  60388. <br><br>
  60389. Examples:<PRE>
  60390. # allow maximum time difference of 60 seconds
  60391. define dew_all dewpoint dewpoint .*
  60392. attr dew_all max_timediff 60
  60393. </li><br>
  60394. </ul>
  60395. </ul>
  60396. <a name="dummy"></a>
  60397. <h3>dummy</h3>
  60398. <ul>
  60399. Define a dummy. A dummy can take via <a href="#set">set</a> any values.
  60400. Used for programming.
  60401. <br><br>
  60402. <a name="dummydefine"></a>
  60403. <b>Define</b>
  60404. <ul>
  60405. <code>define &lt;name&gt; dummy</code>
  60406. <br><br>
  60407. Example:
  60408. <ul>
  60409. <code>define myvar dummy</code><br>
  60410. <code>set myvar 7</code><br>
  60411. </ul>
  60412. </ul>
  60413. <br>
  60414. <a name="dummyset"></a>
  60415. <b>Set</b>
  60416. <ul>
  60417. <code>set &lt;name&gt; &lt;value&gt</code><br>
  60418. Set any value.
  60419. </ul>
  60420. <br>
  60421. <a name="dummyget"></a>
  60422. <b>Get</b> <ul>N/A</ul><br>
  60423. <a name="dummyattr"></a>
  60424. <b>Attributes</b>
  60425. <ul>
  60426. <li><a href="#disable">disable</a></li>
  60427. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  60428. <li><a name="readingList">readingList</a><br>
  60429. Space separated list of readings, which will be set, if the first
  60430. argument of the set command matches one of them.</li>
  60431. <li><a name="setList">setList</a><br>
  60432. Space separated list of commands, which will be returned upon "set name
  60433. ?", so the FHEMWEB frontend can construct a dropdown and offer on/off
  60434. switches. Example: attr dummyName setList on off </li>
  60435. <li><a name="useSetExtensions">useSetExtensions</a><br>
  60436. If set, and setList contains on and off, then the
  60437. <a href="#setExtensions">set extensions</a> are supported.
  60438. In this case no arbitrary set commands are accepted, only the setList and
  60439. the set exensions commands.</li>
  60440. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  60441. </ul>
  60442. <br>
  60443. </ul>
  60444. <a name="eventTypes"></a>
  60445. <h3>eventTypes</h3>
  60446. <ul>
  60447. <br>
  60448. <a name="eventTypesdefine"></a>
  60449. <b>Define</b>
  60450. <ul>
  60451. <code>define &lt;name&gt; eventTypes &lt;filename&gt;</code>
  60452. <br><br>
  60453. Collect event types for all devices. This service is used by frontends,
  60454. e.g. notify and FileLog, to assist you in selecting the correct events.
  60455. The filename is used to store the collected events before shutdown.<br>
  60456. More than one instance of eventTypes should not be necessary.
  60457. Examples:
  60458. <ul>
  60459. <code>define et eventTypes log/eventTypes.txt</code><br>
  60460. </ul>
  60461. <br>
  60462. </ul>
  60463. <br>
  60464. <a name="eventTypesset"></a>
  60465. <b>Set</b>
  60466. <ul>
  60467. <li>flush<br>
  60468. used to write all collected event types into datafile.
  60469. </li>
  60470. <br/>
  60471. <li>clear<br>
  60472. used to clear the internal table containing all collected event types.
  60473. </li>
  60474. </ul>
  60475. <br>
  60476. <a name="eventTypesget"></a>
  60477. <b>Get</b>
  60478. <ul>
  60479. <li>list [devicename]<br>
  60480. return the list of collected event types for all devices or for
  60481. devicename if specified.
  60482. </li>
  60483. </ul>
  60484. <br>
  60485. <a name="eventTypesattr"></a>
  60486. <b>Attributes</b>
  60487. <ul>
  60488. <li><a href="#disable">disable</a></li>
  60489. <a name="ignoreList"></a>
  60490. <li>ignoreList<br>
  60491. Comma separated device names to ignore whe collecting the events.
  60492. E.g. ECMD-Devices are used to post RAW data as events.
  60493. </li>
  60494. </ul>
  60495. <br>
  60496. </ul>
  60497. <a name="expandJSON"></a>
  60498. <h3>expandJSON</h3>
  60499. <ul>
  60500. <p>Expand a JSON string from a reading into individual readings</p>
  60501. <ul>
  60502. <li>Requirement: perl module JSON<br>
  60503. Use "cpan install JSON" or operating system's package manager to install
  60504. Perl JSON Modul. Depending on your os the required package is named:
  60505. libjson-perl or perl-JSON.
  60506. </li>
  60507. </ul><br>
  60508. <a name="expandJSONdefine"></a>
  60509. <b>Define</b><br><br>
  60510. <ul>
  60511. <code>define &lt;name&gt; expandJSON &lt;source_regex&gt;
  60512. [&lt;target_regex&gt;]</code><br><br>
  60513. <li>
  60514. <a name="">&lt;name&gt;</a><br>
  60515. A name of your choice.</li><br>
  60516. <li>
  60517. <a name="">&lt;source_regex&gt;</a><br>
  60518. Regexp that must match your devices, readings and values that contain
  60519. the JSON strings. Regexp syntax is the same as used by notify and must not
  60520. contain spaces.<br>
  60521. </li><br>
  60522. <li>
  60523. <a name="">&lt;target_regex&gt;</a><br>
  60524. Optional: This regexp is used to determine whether the target reading is
  60525. converted or not at all. If not set then all readings will be used. If set
  60526. then only matching readings will be used. Regexp syntax is the same as
  60527. used by notify and must not contain spaces.<br>
  60528. </li><br>
  60529. <li>
  60530. Examples:<br>
  60531. <br>
  60532. <u>Source reading:</u><br>
  60533. <code>
  60534. device:{.*} #state without attribute addStateEvent<br>
  60535. device:state:.{.*} #state with attribute addStateEvent<br>
  60536. device:reading:.{.*}<br>
  60537. Sonoff.*:ENERGY.*:.{.*}<br>
  60538. .*wifiIOT.*:.*sensor.*:.{.*}<br>
  60539. (?i)dev.*:(sensor1|sensor2|teleme.*):.{.*}<br>
  60540. (devX:{.*}|devY.*:jsonY:.{.*Wifi.*{.*SSID.*}.*})
  60541. </code><br>
  60542. <br>
  60543. <u>Target reading:</u><br>
  60544. <code>.*power.*</code><br>
  60545. <code>(Power|Current|Voltage|.*day)</code><br><br>
  60546. <u>Complete definitions:</u><br>
  60547. <code>define ej1 expandJSON device:sourceReading:.{.*} targetReading
  60548. </code><br>
  60549. <code>define ej2 expandJSON Sonoff.*:ENERGY.*:.{.*} (Power|.*day)
  60550. </code><br>
  60551. <code>define ej3 expandJSON (?i).*_sensordev_.*:.*:.{.*}
  60552. </code><br><br>
  60553. </li><br>
  60554. </ul>
  60555. <a name="expandJSONset"></a>
  60556. <b>Set</b><br><br>
  60557. <ul>
  60558. N/A<br><br>
  60559. </ul>
  60560. <a name="expandJSONget"></a>
  60561. <b>Get</b><br><br>
  60562. <ul>
  60563. N/A<br><br>
  60564. </ul>
  60565. <a name="expandJSON_attr"></a>
  60566. <b>Attributes</b><br><br>
  60567. <ul>
  60568. <li><a name="expandJSON_attr_addReadingsPrefix">addReadingsPrefix</a><br>
  60569. Add source reading as prefix to new generated readings. Useful if you have
  60570. more than one reading with a JSON string that should be converted.
  60571. </li><br>
  60572. <li><a name="expandJSON_attr_disable">disable</a><br>
  60573. Used to disable this device.
  60574. </li><br>
  60575. <li><a name="expandJSON_attr_do_not_notify">do_not_notify</a><br>
  60576. Do not generate events for converted readings at all. Think twice before
  60577. using this attribute. In most cases, it is more appropriate to use
  60578. event-on-change-reading in target devices.
  60579. </li><br>
  60580. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  60581. <li><a href="#addStateEvent">addStateEvent</a></li>
  60582. </ul>
  60583. </ul>
  60584. <a name="fakeRoku"></a>
  60585. <h3>fakeRoku</h3>
  60586. <ul>
  60587. This module allows you to add a 'fake' roku player device to a harmony hub based remote and to receive and
  60588. process configured key presses in FHEM.
  60589. <br><br>
  60590. Notes:
  60591. <ul>
  60592. <li>XML::Simple is needed.</li>
  60593. <li>IO::Socket::Multicast is needed.</li>
  60594. <li>The following 12 functions are available and can be used:
  60595. <ul>
  60596. <li>InstantReplay</li>
  60597. <li>Home</li>
  60598. <li>Info</li>
  60599. <li>Search</li>
  60600. <li>Back</li>
  60601. <li>FastForward = Fwd</li>
  60602. <li>Rewind = Rev</li>
  60603. <li>Select</li>
  60604. <li>DirectionUp</li>
  60605. <li>DirectionRight</li>
  60606. <li>DirectionLeft</li>
  60607. <li>DirectionDown</li>
  60608. </ul></li>
  60609. </ul>
  60610. <br><br>
  60611. <a name="fakeRoku_Define"></a>
  60612. <b>Define</b>
  60613. <ul>
  60614. <code>define &lt;name&gt; fakeRoku</code>
  60615. <br><br>
  60616. </ul>
  60617. <a name="fakeRoku_Set"></a>
  60618. <b>Set</b>
  60619. <ul>none
  60620. </ul><br>
  60621. <a name="fakeRoku_Get"></a>
  60622. <b>Get</b>
  60623. <ul>none
  60624. </ul><br>
  60625. <a name="fakeRoku_Attr"></a>
  60626. <b>Attr</b>
  60627. <ul>
  60628. <li>favourites<br>
  60629. comma separated list of names to use as apps/channels/favourites. the list can be reloaded on the harmony with edit->reset.</li>
  60630. <li>fhemIP<br>
  60631. overwrites autodetected local ip used in advertising</li>
  60632. <li>httpPort</li>
  60633. <li>reusePort<br>
  60634. not set -> set ReusePort on multicast socket if SO_REUSEPORT flag ist known. should work in most cases.<br>
  60635. 0 -> don't set ReusePort on multicast socket<br>
  60636. 1 -> set ReusePort on multicast socket</li>
  60637. </ul>
  60638. </ul><br>
  60639. <a name="fhemdebug"></a>
  60640. <h3>fhemdebug</h3>
  60641. <ul>
  60642. <code>fhemdebug {enable|disable|status|}</code><br>
  60643. <br>
  60644. <ul>
  60645. <li>enable/disable/status<br>
  60646. fhemdebug produces debug information in the FHEM Log to help localize
  60647. certain error messages. Currently following errors are examined:
  60648. <ul>
  60649. - Error: &gt;...&lt; has no TYPE, but following keys: &gt;...&lt;<br>
  60650. </ul>
  60651. As it frequently examines internal data-structures, it uses a lot of CPU,
  60652. it is not recommended to enable it all the time. A FHEM restart after
  60653. disabling it is not necessary.<br>
  60654. </li>
  60655. <li>memusage [regexp] [nr]<br>
  60656. Dump the name of the first nr datastructures with the largest memory
  60657. footprint. Filter the names by regexp, if specified.<br>
  60658. <b>Notes</b>:
  60659. <ul>
  60660. <li>this function depends on the Devel::Size module, so this must be
  60661. installed first.</li>
  60662. <li>The used function Devel::Size::total_size crashes perl (and FHEM) for
  60663. functions and some other data structures. memusage tries to avoid to
  60664. call it for such data structures, but as the problem is not identified,
  60665. it may crash your currently running instance. It works for me, but make
  60666. sure you saved your fhem.cfg before coalling it.</li>
  60667. <li>The known data structures modules and defs are reported in more
  60668. detail.</li>
  60669. </ul>
  60670. </li>
  60671. </ul>
  60672. </ul>
  60673. <a name="fheminfo"></a>
  60674. <h3>fheminfo</h3>
  60675. <ul>
  60676. <code>fheminfo [send]</code>
  60677. <br>
  60678. <br>
  60679. fheminfo displays information about the system and FHEM definitions.
  60680. <br>
  60681. <br>
  60682. The optional parameter <code>send</code> transmitts the collected data
  60683. to a central server in order to support the development of FHEM. <br/>
  60684. The submitted data is processed graphically. The results can be viewed
  60685. on <a href="https://fhem.de/stats/statistics.html">http://fhem.de/stats/statistics.html</a>.<br/>
  60686. The IP address will not be stored in database, only used for region determination during send.
  60687. <br>
  60688. <br>
  60689. Features:<br>
  60690. <ul>
  60691. <li>ConfigType (configDB|configFILE)</li>
  60692. <li>SVN rev number</li>
  60693. <li>Operating System Information</li>
  60694. <li>Installed Perl version</li>
  60695. <li>Defined modules</li>
  60696. <li>Defined models per module</li>
  60697. </ul>
  60698. <br>
  60699. <a name="fheminfoattr"></a>
  60700. <b>Attributes</b>
  60701. <br>
  60702. <br>
  60703. The following attributes are used only in conjunction with the
  60704. <code>send</code> parameter. They are set on <code>attr global</code>.
  60705. <br>
  60706. <br>
  60707. <ul>
  60708. <li>sendStatistics<br>
  60709. This attribute is used in conjunction with the <code>update</code> command.
  60710. <br>
  60711. <code>onUpdate</code>: transfer of data on every update (recommended setting).
  60712. <br>
  60713. <code>manually</code>: manually transfer of data via the <code>fheminfo send</code> command.
  60714. <br>
  60715. <code>never</code>: prevents transmission of data at anytime.
  60716. </li>
  60717. <br>
  60718. </ul>
  60719. </ul>
  60720. <a name="harmony"></a>
  60721. <h3>harmony</h3>
  60722. <ul>
  60723. Defines a device to integrate a Logitech Harmony Hub based remote control into fhem.<br><br>
  60724. It is possible to: start and stop activities, send ir commands to devices, send keyboard input by bluetooth and
  60725. smart keyboard usb dongles.<br><br>
  60726. You probably want to use it in conjunction with the <a href="#fakeRoku">fakeRoku</a> module.<br><br>
  60727. Notes:
  60728. <ul>
  60729. <li>JSON has to be installed on the FHEM host.</li>
  60730. <li>For hubs with firmware version 3.x.y &lt;username&gt; and &lt;password&gt; are not required as no authentication
  60731. with the logitech myharmony server is needed for the full functionality of this module.</li>
  60732. <li>For hubs with firmware version 4.x.y &lt;username&gt; and &lt;password&gt; are required for device level control.
  60733. Activit level control is (currently) still possible without authentication.</li>
  60734. <li>activity and device names can be given as id or name. names can be given as a regex and spaces in names musst be replaced by a single '.' (dot).</li>
  60735. </ul><br>
  60736. <a name="harmony_Define"></a>
  60737. <b>Define</b>
  60738. <ul>
  60739. <code>define &lt;name&gt; harmony [&lt;username&gt; &lt;password&gt;] &lt;ip&gt;</code><br>
  60740. <br>
  60741. Defines a harmony device.<br><br>
  60742. Examples:
  60743. <ul>
  60744. <code>define hub harmony 10.0.1.4</code><br>
  60745. </ul>
  60746. </ul><br>
  60747. <a name="harmony_Readings"></a>
  60748. <b>Readings</b>
  60749. <ul>
  60750. <li>currentActivity<br>
  60751. the name of the currently selected activity.</li>
  60752. <li>previousActivity<br>
  60753. the name of the previous selected activity. does not trigger an event.</li>
  60754. <li>newVersion<br>
  60755. will be set if a new firmware version is avaliable.</li>
  60756. </ul><br>
  60757. <a name="harmony_Internals"></a>
  60758. <b>Internals</b>
  60759. <ul>
  60760. <li>currentActivityID<br>
  60761. the id of the currently selected activity.</li>
  60762. <li>previousActivityID<br>
  60763. the id of the previous selected activity.</li>
  60764. <li>sleeptimer<br>
  60765. timeout for sleeptimer if any is set.</li>
  60766. </ul><br>
  60767. <a name="harmony_Set"></a>
  60768. <b>Set</b>
  60769. <ul>
  60770. <li>activity &lt;id&gt;|&ltname&gt; [&lt;channel&gt;]<br>
  60771. switch to this activit and optionally switch to &lt;channel&gt;</li>
  60772. <li>channel &lt;channel&gt;<br>
  60773. switch to &lt;channel&gt; in the current activity</li>
  60774. <li>command [&lt;id&gt;|&ltname&gt;] &lt;command&gt; [duration=&lt;duration&gt;]<br>
  60775. send the given ir command for the current activity or for the given device</li>
  60776. <li>getConfig<br>
  60777. request the configuration from the hub</li>
  60778. <li>getCurrentActivity<br>
  60779. request the current activity from the hub</li>
  60780. <li>off<br>
  60781. switch current activity off</li>
  60782. <li>reconnect [all]<br>
  60783. close connection to the hub and reconnect, if <code>all</code> is given also reconnect to the logitech server</li>
  60784. <li>sleeptimer [&lt;timeout&gt;]<br>
  60785. &lt;timeout&gt; -> timeout in minutes<br>
  60786. -1 -> timer off<br>
  60787. default -> 60 minutes</li>
  60788. <li>sync<br>
  60789. syncs the hub to the myHarmony config</li>
  60790. <li>hidDevice [&lt;id&gt;|&ltname&gt;]<br>
  60791. sets the target device for keyboard commands, if no device is given -> set the target to the
  60792. default device for the current activity.</li>
  60793. <li>text &lt;text&gt;<br>
  60794. sends &lt;text&gt; by bluetooth/smart keaboard dongle. a-z ,A-Z ,0-9, \n, \e, \t and space are currently possible</li>
  60795. <li>cursor &lt;direction&gt;<br>
  60796. moves the cursor by bluetooth/smart keaboard dongle. &lt;direction&gt; can be one of: up, down, left, right, pageUp, pageDown, home, end.</li>
  60797. <li>special &lt;key&gt;<br>
  60798. sends special key by bluetooth/smart keaboard dongle. &lt;key&gt; can be one of: previousTrack, nextTrack, stop, playPause, volumeUp, volumeDown, mute.</li>
  60799. <li>autocreate [&lt;id&gt;|&ltname&gt;]<br>
  60800. creates a fhem device for a single/all device(s) in the harmony hub. if activities are startet the state
  60801. of these devices will be updatet with the power state defined in these activites.</li>
  60802. <li>update<br>
  60803. triggers a firmware update. only available if a new firmware is available.</li>
  60804. <li>inactive<br>
  60805. inactivates the current device. note the slight difference to the
  60806. disable attribute: using set inactive the state is automatically saved
  60807. to the statefile on shutdown, there is no explicit save necesary.<br>
  60808. this command is intended to be used by scripts to temporarily
  60809. deactivate the harmony device.<br>
  60810. the concurrent setting of the disable attribute is not recommended.</li>
  60811. <li>active<br>
  60812. activates the current device (see inactive).</li>
  60813. </ul>
  60814. The command, hidDevice, text, cursor and special commmands are also available for the autocreated devices. The &lt;id&gt;|&ltname&gt; paramter hast to be omitted.<br><br>
  60815. <a name="harmony_Get"></a>
  60816. <b>Get</b>
  60817. <ul>
  60818. <li>activites [&lt;param&gt;]<br>
  60819. lists all activities<br>
  60820. parm = power -> list power state for each device in activity</li>
  60821. <li>devices [&lt;param&gt;]<br>
  60822. lists all devices</li>
  60823. <li>commands [&lt;id&gt;|&ltname&gt;]<br>
  60824. lists the commands for the specified activity or for all activities</li>
  60825. <li>deviceCommands [&lt;id&gt;|&ltname&gt;]<br>
  60826. lists the commands for the specified device or for all devices</li>
  60827. <li>activityDetail [&lt;id&gt;|&ltname&gt;]</li>
  60828. <li>deviceDetail [&lt;id&gt;|&ltname&gt;]</li>
  60829. <li>configDetail</li>
  60830. <li>currentActivity<br>
  60831. returns the current activity name</li>
  60832. <li>showAccount<br>
  60833. display obfuscated user and password in cleartext</li>
  60834. </ul>
  60835. The commands commmand is also available for the autocreated devices. The &lt;id&gt;|&ltname&gt; paramter hast to be omitted.<br><br>
  60836. <a name="harmony_Attr"></a>
  60837. <b>Attributes</b>
  60838. <ul>
  60839. <li>disable<br>
  60840. 1 -> disconnect from the hub</li>
  60841. </ul>
  60842. </ul>
  60843. <a name="help"></a>
  60844. <h3>?, help</h3>
  60845. <ul>
  60846. <code>? [&lt;moduleName|deviceName&gt;] [<language>]</code><br/>
  60847. <code>help [&lt;moduleName|deviceName&gt;] [<language>]</code><br/>
  60848. <br/>
  60849. <ul>
  60850. <li>Returns a list of available commands, when called without a
  60851. moduleName/deviceName.</li>
  60852. <li>Returns a module dependent helptext, same as in commandref.</li>
  60853. <li>language will be determined in following order:
  60854. <ul>
  60855. <li>valid parameter &lt;language&gt; given</li>
  60856. <li>global attribute language</li>
  60857. <li>nothing founde: return english</li>
  60858. </ul>
  60859. </li>
  60860. </ul>
  60861. </ul>
  60862. <a name="holiday"></a>
  60863. <h3>holiday</h3>
  60864. <ul>
  60865. <a name="holidaydefine"></a>
  60866. <b>Define</b>
  60867. <ul>
  60868. <code>define &lt;name&gt; holiday</code>
  60869. <br><br>
  60870. Define a set of holidays. The module will try to open the file
  60871. &lt;name&gt;.holiday in the <a href="#modpath">modpath</a>/FHEM directory
  60872. first, then in the modpath/FHEM/holiday directory, the latter containing a
  60873. set of predefined files. The set will be shown if an error occures at the
  60874. time of the definietion.<br>
  60875. If entries in the holiday file match the current day, then the STATE of
  60876. this holiday instance displayed in the <a href="#list">list</a> command
  60877. will be set to the corresponding values, else the state is set to the text
  60878. none. Most probably you'll want to query this value in some perl script:
  60879. see Value() in the <a href="#perl">perl</a> section or the global attribute
  60880. <a href="#holiday2we"> holiday2we</a>.<br> The file will be reread once
  60881. every night, to compute the value for the current day, and by each get
  60882. command (see below).<br>
  60883. <br>
  60884. Holiday file definition:<br>
  60885. The file may contain comments (beginning with #) or empty lines.
  60886. Significant lines begin with a number (type) and contain some space
  60887. separated words, depending on the type. The different types are:<br>
  60888. <ul>
  60889. <li>1<br>
  60890. Exact date. Arguments: &lt;MM-DD&gt; &lt;holiday-name&gt;<br>
  60891. Exampe: 1 12-24 Christmas
  60892. </li>
  60893. <li>2<br>
  60894. Easter-dependent date. Arguments: &lt;day-offset&gt;
  60895. &lt;holiday-name&gt;.
  60896. The offset is counted from Easter-Sunday.
  60897. <br>
  60898. Exampe: 2 1 Easter-Monday<br>
  60899. Sidenote: You can check the easter date with:
  60900. fhem> { join("-", western_easter(2011)) }
  60901. </li>
  60902. <li>3<br>
  60903. Month dependent date. Arguments: &lt;nth&gt; &lt;weekday&gt;
  60904. &lt;month &lt;holiday-name&gt;.<br>
  60905. Examples:<br>
  60906. <ul>
  60907. 3 1 Mon 05 First Monday In May<br>
  60908. 3 2 Mon 05 Second Monday In May<br>
  60909. 3 -1 Mon 05 Last Monday In May<br>
  60910. 3 0 Mon 05 Each Monday In May<br>
  60911. </ul>
  60912. </li>
  60913. <li>4<br>
  60914. Interval. Arguments: &lt;MM-DD&gt; &lt;MM-DD&gt; &lt;holiday-name&gt;
  60915. .<br>
  60916. Note: An interval cannot contain the year-end.
  60917. Example:<br>
  60918. <ul>
  60919. 4 06-01 06-30 Summer holiday<br>
  60920. 4 12-20 01-10 Winter holiday # DOES NOT WORK.
  60921. Use the following 2 lines instead:<br>
  60922. 4 12-20 12-31 Winter holiday<br>
  60923. 4 01-01 01-10 Winter holiday<br>
  60924. </ul>
  60925. </li>
  60926. <li>5<br>
  60927. Date relative, weekday fixed holiday. Arguments: &lt;nth&gt;
  60928. &lt;weekday&gt; &lt;month&gt; &lt;day&gt; &lt; holiday-name&gt;<br>
  60929. Note that while +0 or -0 as offsets are not forbidden, their behaviour
  60930. is undefined in the sense that it might change without notice.<br>
  60931. Examples:<br>
  60932. <ul>
  60933. 5 -1 Wed 11 23 Buss und Bettag (first Wednesday before Nov, 23rd)<br>
  60934. 5 1 Mon 01 31 First Monday after Jan, 31st (1st Monday in February)<br>
  60935. </ul>
  60936. </li>
  60937. </ul>
  60938. </ul>
  60939. <br>
  60940. <a name="holidayset"></a>
  60941. <b>Set</b>
  60942. <ul>
  60943. <li>createPrivateCopy<br>
  60944. <ul>
  60945. if the holiday file is opened from the FHEM/holiday directory (which is
  60946. refreshed by FHEM-update), then it is readonly, and should not be
  60947. modified. With createPrivateCopy the file will be copied to the FHEM
  60948. directory, where it can be modified.
  60949. </ul></li>
  60950. </ul><br>
  60951. <a name="holidayget"></a>
  60952. <b>Get</b>
  60953. <ul>
  60954. <code>get &lt;name&gt; &lt;MM-DD&gt;</code><br>
  60955. <code>get &lt;name&gt; yesterday</code><br>
  60956. <code>get &lt;name&gt; today</code><br>
  60957. <code>get &lt;name&gt; tomorrow</code><br>
  60958. <code>get &lt;name&gt; days <offset></code><br>
  60959. <br><br>
  60960. Return the holiday name of the specified date or the text none.
  60961. <br><br>
  60962. </ul>
  60963. <br>
  60964. <a name="holidayattr"></a>
  60965. <b>Attributes</b><ul>N/A</ul><br>
  60966. </ul>
  60967. <a name="km200"></a>
  60968. <h3>KM200</h3>
  60969. <ul>
  60970. <table>
  60971. <tr>
  60972. <td>
  60973. The Buderus <a href="https://www.buderus.de/de/produkte/catalogue/alle-produkte/7719_Gateway-Logamatic-web-KM200-KM100-KM50">KM200, KM100 or KM50 (hereafter described as KMxxx)</a> is a communication device to establish a connection between the Buderus central heating control unit and the internet.<BR>
  60974. It has been designed in order to allow the inhabitants accessing their heating system via his Buderus App <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbrauch
  60975. er/EasyControl-4848514.html"> EasyControl</a>.<BR>
  60976. Furthermore it allows the maintenance companies to access the central heating control system to read and change settings.<BR>
  60977. The km200 fhem-module enables read/write access to these parameters.<BR>
  60978. <BR>
  60979. In order to use the KMxxx with fhem, you must define the private password with the Buderus App <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl</a> first.<BR>
  60980. <BR>
  60981. <b><u>Remark:</u></b><BR>
  60982. Despite the instruction of the Buderus KMxxx Installation guide, the ports 5222 and 5223 should not be opened and allow access to the KMxxx module from outside.<BR>
  60983. You should configure (or leave) your internet router with the respective settings.<BR>
  60984. If you want to read or change settings on the heating system, you should access the central heating control system via your fhem system only.<BR>
  60985. <BR>
  60986. As soon the module has been defined within the fhem.cfg, the module is trying to obtain all known/possible services. <BR>
  60987. After this initial contact, the module differs between a set of continuous (dynamically) changing values (e.g.: temperatures) and not changing static values (e.g.: Firmware version).<BR>
  60988. This two different set of values can be bound to an individual polling interval. Refer to <a href="#KM200Attr">Attributes</a><BR>
  60989. <BR>
  60990. </td>
  60991. </tr>
  60992. </table>
  60993. <table>
  60994. <tr><td><a name="KM200define"></a><b>Define</b></td></tr>
  60995. </table>
  60996. <table><tr><td><ul><code>define &lt;name&gt; km200 &lt;IPv4-address&gt; &lt;GatewayPassword&gt; &lt;PrivatePassword&gt;</code></ul></td></tr></table>
  60997. <ul><ul>
  60998. <table>
  60999. <tr><td><code>&lt;name&gt;</code> : </td><td>The name of the device. Recommendation: "myKm200".</td></tr>
  61000. <tr><td><code>&lt;IPv4-address&gt;</code> : </td><td>A valid IPv4 address of the KMxxx. You might look into your router which DHCP address has been given to the KMxxx.</td></tr>
  61001. <tr><td><code>&lt;GatewayPassword&gt;</code> : </td><td>The gateway password which is provided on the type sign of the KMxxx.</td></tr>
  61002. <tr><td><code>&lt;PrivatePassword&gt;</code> : </td><td>The private password which has been defined by the user via <a href="http://www.buderus.de/Online_Anwendungen/Apps/fuer_den_Endverbraucher/EasyControl-4848514.html"> EasyControl</a>.</td></tr>
  61003. </table>
  61004. </ul></ul>
  61005. <BR>
  61006. <table>
  61007. <tr><td><a name="KM200Set"></a><b>Set</b></td></tr>
  61008. <tr><td>
  61009. <ul>
  61010. The set function is able to change a value of a service which has the "writeable" - tag within the KMxxx service structure.<BR>
  61011. Most of those values have an additional list of allowed values which are the only ones to be set.<BR>
  61012. Other floatable type values can be changed only within their range of minimum and maximum value.<BR>
  61013. </ul>
  61014. </td></tr>
  61015. </table>
  61016. <table><tr><td><ul><code>set &lt;service&gt; &lt;value&gt;</code></ul></td></tr></table>
  61017. <ul><ul>
  61018. <table>
  61019. <tr><td><code>&lt;service&gt;</code> : </td><td>The name of the service which value shall be set. E.g.: "<code>/heatingCircuits/hc1/operationMode</code>"<BR></td></tr>
  61020. <tr><td><code>&lt;value&gt;</code> : </td><td>A valid value for this service.<BR></td></tr>
  61021. </table>
  61022. </ul></ul>
  61023. <BR>
  61024. <table>
  61025. <tr><td><a name="KM200Get"></a><b>Get</b></td></tr>
  61026. <tr><td>
  61027. <ul>
  61028. The get function is able to obtain a value of a service within the KMxxx service structure.<BR>
  61029. The additional list of allowed values or their range of minimum and maximum value will not be handed back.<BR>
  61030. </ul>
  61031. </td></tr>
  61032. </table>
  61033. <table><tr><td><ul><code>get &lt;service&gt; &lt;option&gt;</code></ul></td></tr></table>
  61034. <ul><ul>
  61035. <table>
  61036. <tr>
  61037. <td><code>&lt;service&gt;</code> : </td><td>The name of the service which value shall be obtained. E.g.: "<code>/heatingCircuits/hc1/operationMode</code>"<BR>
  61038. &nbsp;&nbsp;It returns only the value but not the unit or the range or list of allowed values possible.<BR>
  61039. </td>
  61040. </tr>
  61041. </table>
  61042. </ul></ul>
  61043. <ul><ul>
  61044. <table>
  61045. <tr>
  61046. <td><code>&lt;option&gt;</code> : </td><td>The optional Argument for the result of the get-command e.g.: "<code>json</code>"<BR>
  61047. &nbsp;&nbsp;The following options are available:<BR>
  61048. &nbsp;&nbsp;json - Returns the raw json-answer from the KMxxx as string.
  61049. </td>
  61050. </tr>
  61051. </table>
  61052. </ul></ul>
  61053. <BR>
  61054. <table>
  61055. <tr><td><a name="KM200Attr"></a><b>Attributes</b></td></tr>
  61056. <tr><td>
  61057. <ul>
  61058. The following user attributes can be used with the km200 module in addition to the global ones e.g. <a href="#room">room</a>.<BR>
  61059. </ul>
  61060. </td></tr>
  61061. </table>
  61062. <ul><ul>
  61063. <table>
  61064. <tr>
  61065. <td>
  61066. <tr><td><li><code>IntervalDynVal</code> : </li></td><td>A valid polling interval for the dynamically changing values of the KMxxx. The value must be >=20s to allow the km200 module to perform a full polling procedure. <BR>
  61067. The default value is 300s.<BR>
  61068. </td></tr>
  61069. </td>
  61070. </tr>
  61071. </table>
  61072. </ul></ul>
  61073. <ul><ul>
  61074. <table>
  61075. <tr>
  61076. <td>
  61077. <tr><td><li><code>PollingTimeout</code> : </li></td><td>A valid time in order to allow the module to wait for a response of the KMxxx. Usually this value does not need to be changed but might in case of slow network or slow response.<BR>
  61078. The default and minimum value is 5s.<BR>
  61079. </td></tr>
  61080. </td>
  61081. </tr>
  61082. </table>
  61083. </ul></ul>
  61084. <ul><ul>
  61085. <table>
  61086. <tr>
  61087. <td>
  61088. <tr><td><li><code>DoNotPoll</code> : </li></td><td>A list of services separated by blanks which shall not be downloaded due to repeatable crashes or irrelevant values.<BR>
  61089. The list can be filled with the name of the top - hierarchy service, which means everything below that service will also be ignored.<BR>
  61090. The default value (empty) therefore nothing will be ignored.<BR>
  61091. </td></tr>
  61092. </td>
  61093. </tr>
  61094. </table>
  61095. </ul></ul>
  61096. <ul><ul>
  61097. <table>
  61098. <tr>
  61099. <td>
  61100. <tr><td><li><code>ReadBackDelay</code> : </li></td><td>A valid time in milliseconds [ms] for the delay between writing and re-reading of values after using the "set" - command. The value must be >=0ms.<BR>
  61101. The default value is 100 = 100ms = 0,1s.<BR>
  61102. </td></tr>
  61103. </td>
  61104. </tr>
  61105. </table>
  61106. </ul></ul>
  61107. <ul><ul>
  61108. <table>
  61109. <tr>
  61110. <td>
  61111. <tr><td><li><code>disable</code> : </li></td><td>Stops the device from further pollings and deletes the existing readings.<BR>
  61112. The default value is 0 = activated<BR>
  61113. </td></tr>
  61114. </td>
  61115. </tr>
  61116. </table>
  61117. </ul></ul>
  61118. </ul>
  61119. <a name="logProxy"></a>
  61120. <h3>logProxy</h3>
  61121. <ul>
  61122. Allows the manipulation of data to be plotted in an SVG device:
  61123. <ul>
  61124. <li>addition of horizontal lines at fixed values</li>
  61125. <li>addition of horizontal lines at dynamic values eg: min, max or average values of another plot </li>
  61126. <li>addition of vertical lines at fixed or dynamic times between two fixed or dynamic y values</li>
  61127. <li>addition of calculated data like week profiles of HeatingControll devices or heating thermostats</li>
  61128. <li>merge plot data from different sources. eg. different FileLog devices</li>
  61129. <li>horizontaly shifting a (merged) plot to align average or statistic data to the correct day,week and month</li>
  61130. </ul>
  61131. <br>
  61132. <a name="logProxy_Define"></a>
  61133. <b>Define</b>
  61134. <ul>
  61135. <code>define &lt;name&gt; logProxy</code><br>
  61136. <br>
  61137. Only one logProxy device can be defined and is needed.<br><br>
  61138. Example:
  61139. <ul>
  61140. <code>define myProxy logProxy</code><br>
  61141. </ul>
  61142. </ul><br>
  61143. <a name="logProxy_Set"></a>
  61144. <b>Set</b>
  61145. <ul>
  61146. </ul><br>
  61147. <a name="logProxy_Get"></a>
  61148. <b>Get</b>
  61149. <ul>
  61150. see <a href="#FileLogget">FileLog</a> and <a href="#DbLogget">DbLog</a>
  61151. </ul><br>
  61152. <a name="logProxy_Attr"></a>
  61153. <b>Attributes</b>
  61154. <ul>
  61155. </ul><br>
  61156. <br>
  61157. <b>#logProxy &lt;column_spec&gt;</b><br>
  61158. where &lt;column_spec&gt; can be one or more of the following:
  61159. <ul>
  61160. <li>FileLog:&lt;log device&gt;[,&lt;options&gt;]:&lt;column_spec&gt;<br></li>
  61161. <li>DbLog:&lt;log device&gt;[,&lt;options&gt;]:&lt;column_spec&gt;<br></li><br>
  61162. options is a comma separated list of zero or more of:<br>
  61163. <ul>
  61164. <li>clip<br>
  61165. clip the plot data to the plot window</li>
  61166. <li>extend=&lt;value&gt;<br>
  61167. extend the query range to the log device by &lt;value&gt; seconds (or &lt;value&gt; months if &lt;value&gt; ends in m).
  61168. also activates cliping.</li>
  61169. <li>interpolate<br>
  61170. perform a linear interpolation to the values in the extended range to get the values at the plot boundary. only usefull
  61171. if plotfunction is lines.</li>
  61172. <li>offset=&lt;value&gt;<br>
  61173. shift plot by &lt;value&gt; seconds (or &lt;value&gt; months if &lt;value&gt; ends in m).
  61174. allows alignment of values calculated by average or statsitics module to the correct day, week or month. </li>
  61175. <li>predict[=&lt;value&gt;]<br>
  61176. no value -> extend the last plot value to now.<br>
  61177. value -> extend the last plot value by &lt;value&gt; but maximal to now.<br></li>
  61178. <li>postFn='&lt;myPostFn&gt;'<br>
  61179. myPostFn is the name of a postprocessing function that is called after all processing of the data by logProxy
  61180. has been done. it is called with two arguments: the devspec line from the gplot file and a reference to a data
  61181. array containing the points of the plot. each point is an array with three components: the point in time in seconds,
  61182. the value at this point and the point in time in string form. the return value must return a reference to an array
  61183. of the same format. the third component of each point can be omittet and is not evaluated.<br></li>
  61184. <li>scale2reading=&lt;scaleHashRef&gt;<br>
  61185. Use zoom step dependent reading names. <br>
  61186. The reading name to be used is the result of a lookup with the current zoom step into <code>scaleHashRef</code>.
  61187. The keys can be from the following list: year, month, week, day, qday, hour<br>
  61188. Example:
  61189. <ul>
  61190. <code>#logProxy DbLog:dbLog,scale2reading={year=>'temperature_avg_day',month=>'temperature_avg_day'}:s300ht_1:temperature::</code><br>
  61191. </ul><br>
  61192. <br></li>
  61193. </ul>
  61194. <li>ConstX:&lt;time&gt;,&lt;y&gt;[,&lt;y2&gt;]<br>
  61195. Will draw a vertical line (or point) at &lttime&gt; between &lt;y&gt; to &lt;y2&gt;.<br>
  61196. Everything after the : is evaluated as a perl expression that hast to return one time string and one or two y values.<br>
  61197. Examples:
  61198. <ul>
  61199. <code>#logProxy ConstX:$data{currdate1},$data{currval1}</code><br>
  61200. <code>#logProxy ConstX:$data{mindate1},$data{min1},$data{avg1}</code><br>
  61201. <code>#logProxy ConstX:$data{maxdate1},$data{max1},$data{avg1}</code><br>
  61202. <code>#logProxy ConstX:logProxy_shiftTime($from,60*60*2),$data{min1},$data{max1}</code><br>
  61203. </ul></li><br>
  61204. <li>ConstY:&ltvalue&gt;[,&lt;from&gt;[,&lt;to&gt;]]<br>
  61205. Will draw a horizontal line at &ltvalue&gt;, optional only between the from and to times.<br>
  61206. Everything after the : is evaluated as a perl expression that hast to return one value and optionaly one or two time strings.<br>
  61207. Examples:
  61208. <ul>
  61209. <code>#logProxy ConstY:0</code><br>
  61210. <code>#logProxy ConstY:1234+15+myFunc(123)</code><br>
  61211. <code>#logProxy ConstY:$data{avg1}</code><br>
  61212. <code>#logProxy ConstY:$data{avg2},$from,$to</code><br>
  61213. <code>#logProxy ConstY:$data{avg2},logProxy_shiftTime($from,60*60*12),logProxy_shiftTime($from,-60*60*12)</code>
  61214. </ul></li><br>
  61215. <li>Polar:[&ltoptions&gt;]:&lt;values&gt;<br>
  61216. Will draw a polar/spiderweb diagram with the given values. &lt;values&gt; has to evaluate to a perl array.<br>
  61217. If &lt;values&gt; contains numbers these values are plottet and the last value will be connected to the first.<br>
  61218. If &lt;values&gt; contains strings these strings are used as labels for the segments.<br>
  61219. The axis are drawn automaticaly if the values are strings or if no values are given but the segments option is set.<br>
  61220. The corrosponding SVG device should have the plotsize attribute set (eg: attr <mySvg> plotsize 340,300) and the used gplot file has to contain xrange and yrange entries and the x- and y-axis labes should be switched off with xtics, ytics and y2tics entries.<br>
  61221. The following example will plot the temperature and desiredTemperature values of all devices named MAX.*:
  61222. <ul>
  61223. <code>set xtics ()</code><br>
  61224. <code>set ytics ()</code><br>
  61225. <code>set y2tics ()</code><br>
  61226. <code>set xrange [-40:40]</code><br>
  61227. <code>set yrange [-40:40]</code><br><br>
  61228. <code>#logProxy Polar::{[map{ReadingsVal($_,"temperature",0)}devspec2array("MAX.*")]}</code><br>
  61229. <code>#logProxy Polar::{[map{ReadingsVal($_,"desiredTemperature",0)}devspec2array("MAX.*")]}</code><br>
  61230. <code>#logProxy Polar::{[map{ReadingsVal($_,"temperature",0)}devspec2array("MAX.*")]}</code><br>
  61231. <code>#logProxy Polar::{[devspec2array("MAX.*")]}</code><br><br>
  61232. <code>plot "<IN>" using 1:2 axes x1y1 title 'Ist' ls l0 lw 1 with lines,\</code><br>
  61233. <code>plot "<IN>" using 1:2 axes x1y1 title 'Soll' ls l1fill lw 1 with lines,\</code><br>
  61234. <code>plot "<IN>" using 1:2 axes x1y1 notitle ls l0 lw 1 with points,\</code><br>
  61235. <code>plot "<IN>" using 1:2 axes x1y1 notitle ls l2 lw 1 with lines,\</code><br>
  61236. </ul><br>
  61237. options is a comma separated list of zero or more of:<br>
  61238. <ul>
  61239. <li>axis<br>
  61240. force to draw the axis</li>
  61241. <li>noaxis<br>
  61242. disable to draw the axis</li>
  61243. <li>range=&lt;value&gt;<br>
  61244. the range to use for the radial axis</li>
  61245. <li>segments=&lt;value&gt;<br>
  61246. the number of circle/spiderweb segments to use for the plot</li>
  61247. <li>isolines=&lt;value&gt;<br>
  61248. a | separated list of values for which an isoline shoud be drawn. defaults to 10|20|30.</li>
  61249. </ul>
  61250. </li><br>
  61251. <li>Func:&ltperl expression&gt;<br>
  61252. Specifies a perl expression that returns the data to be plotted and its min, max and last value. It can not contain
  61253. space or : characters. The data has to be
  61254. one string of newline separated entries of the form: <code>yyyy-mm-dd_hh:mm:ss value</code><br>Example:
  61255. <ul>
  61256. <code>#logProxy Func:logProxy_WeekProfile2Plot("HCB",$from,$to)</code><br>
  61257. <code>#logProxy Func:logProxy_WeekProfile2Plot("myHeatingControll",$from,$to,"(\\d)*\$")</code><br>
  61258. <code>#logProxy Func:logProxy_Func2Plot($from,$to,'{logProxy_hms2dec(sunrise_abs_dat($sec))}')</code><br>
  61259. <code>#logProxy Func:logProxy_Func2Plot($from,$to,'{logProxy_hms2dec(sunset_abs_dat($sec))}')</code><br>
  61260. </ul><br>
  61261. Notes:<ul>
  61262. <li>logProxy_WeekProfile2Plot is a sample implementation of a function that will plot the week profile
  61263. of a Heating_Control, WeekdyTimer, HomeMatic or MAX Thermostat device can be found in the 98_logProxy.pm module file.</li>
  61264. <li>logProxy_Func2Plot($from,$to,$func) is a sample implementation of a function that will evaluate the given
  61265. function (3rd parameter) for a zoom factor dependent number of times. the current time is given in $sec.
  61266. the step width can be given in an optional 4th parameter. either as a number or as an hash with the keys from
  61267. the following list: hour,qday,day,week,month,year and the values representing the step with for the zoom level.</li>
  61268. <li>logProxy_xy2Plot(\@xyArray) is a sample implementation of a function that will accept a ref to an array
  61269. of xy-cordinate pairs as the data to be plotted.</li>
  61270. <li>logProxy_xyFile2Plot($filename,$column,$regex) is a sample implementation of a function that will accept a filename,
  61271. a column number and a regular expression. The requested column in all lines in the file that match the regular expression
  61272. needs to be in the format x,y to indicate the xy-cordinate pairs as the data to be plotted.</li>
  61273. <li>logProxy_values2Plot(\@xyArray) is a sample implementation of a function that will accept a ref to an array
  61274. of date-y-cordinate pairs as the data to be plotted.</li>
  61275. <li>The perl expressions have access to $from and $to for the begining and end of the plot range and also to the
  61276. SVG specials min, max, avg, cnt, sum, currval (last value) and currdate (last date) values of the individual curves
  61277. already plotted are available as $data{&lt;special-n&gt;}.<br>
  61278. <li>logProxy_Range2Zoom($seconds) can be used to get the approximate zoom step for a plot range of $seconds.</li>
  61279. <li>SVG_time_to_sec($timestamp) can be used to convert the timestamp strings to epoch times for calculation.</li>
  61280. </ul>
  61281. </li><br>
  61282. </li><br>
  61283. </ul>
  61284. Please see also the column_spec paragraphs of FileLog, DbLog and SVG.<br>
  61285. <br>
  61286. NOTE: spaces are not allowed inside the colums_specs.<br>
  61287. <br>
  61288. To use any of the logProxy features with an existing plot the associated SVG file hast to be changed to use the logProxy
  61289. device and the .gplot file has to be changed in the following way:<br>
  61290. All existing #FileLog and #Dblog lines have to be changed to #logProxy lines and<br>the column_spec of these line has to
  61291. be prepended by <code>FileLog:&lt;log device&gt;:</code> or <code>DbLog:&lt;log device&gt;:</code> respectively.<br>
  61292. Examples:
  61293. <ul>
  61294. <code>#DbLog &lt;myDevice&gt;:&lt;myReading&gt;</code></br>
  61295. <code>#FileLog 4:&lt;SPEC1&gt;:power\x3a::</code><br>
  61296. <code>#FileLog 4:&lt;SPEC1&gt;:consumption\x3a::</code><br><br>
  61297. will become:<br><br>
  61298. <code>#logProxy DbLog:&lt;myDb&gt;:&lt;myDevice&gt;:&lt;myReading&gt;</code></br>
  61299. <code>#logProxy FileLog:FileLog_&lt;SPEC1&gt;:4:<SPEC1>.power\x3a::</code><br>
  61300. <code>#logProxy FileLog:FileLog_&lt;SPEC1&gt;:4:<SPEC1>.consumption\x3a::</code><br>
  61301. </ul>
  61302. </ul>
  61303. <a name="mailcheck"></a>
  61304. <h3>mailcheck</h3>
  61305. <ul>
  61306. Watches a mailbox with imap idle and for each new mail triggers an event with the subject of this mail.<br><br>
  61307. This can be used to send mails *to* FHEM and react to them from a notify. Application scenarios are for example
  61308. a geofencing apps on mobile phones, networked devices that inform about warning or failure conditions by e-mail or
  61309. (with a little logic in FHEM) the absence of regular status messages from such devices and so on.<br><br>
  61310. Notes:
  61311. <ul>
  61312. <li>Mail::IMAPClient and IO::Socket::SSL and IO::Socket::INET hast to be installed on the FHEM host.</li>
  61313. <li>Probably only works reliably if no other mail programm is marking messages as read at the same time.</li>
  61314. <li>If you experience a hanging system caused by regular forced disconnects of your internet provider you
  61315. can disable and enable the mailcheck instance with an <a href="#at">at</a>.</li>
  61316. <li>If MIME::Parser is installed non ascii subjects will be docoded to utf-8</li>
  61317. <li>If MIME::Parser and Mail::GnuPG are installed gpg signatures can be checked and mails from unknown senders can be ignored.</li>
  61318. </ul><br>
  61319. <a name="mailcheck_Define"></a>
  61320. <b>Define</b>
  61321. <ul>
  61322. <code>define &lt;name&gt; mailcheck &lt;host&gt; &lt;user&gt; &lt;password&gt; [&lt;folder&gt;]</code><br>
  61323. <br>
  61324. &lt;user&gt; and <lt>&lt;password&gt; can be of the form {perl-code}. no spaces are allowed. for both evals $NAME and $HOST is set to the name and host of the mailcheck device and $USER is set to the user in the password eval.
  61325. <br>
  61326. Defines a mailcheck device.<br><br>
  61327. Examples:
  61328. <ul>
  61329. <code>define mailcheck mailcheck imap.mail.me.com x.y@me.com myPassword</code><br>
  61330. <code>define mailcheck mailcheck imap.mail.me.com {"x.y@me.com"} {myPasswordOfAccount($USER)}</code><br>
  61331. </ul>
  61332. </ul><br>
  61333. <a name="mailcheck_Readings"></a>
  61334. <b>Readings</b>
  61335. <ul>
  61336. <li>Subject<br>
  61337. the subject of the last mail received</li>
  61338. <li>From<br>
  61339. the mail address of the last sender</li>
  61340. </ul><br>
  61341. <a name="mailcheck_Set"></a>
  61342. <b>Set</b>
  61343. <ul>
  61344. <li>inactive<br>
  61345. temporarily deactivates the device</li>
  61346. <li>active<br>
  61347. reenables the device</li>
  61348. </ul><br>
  61349. <a name="mailcheck_Get"></a>
  61350. <b>Get</b>
  61351. <ul>
  61352. <li>update<br>
  61353. trigger an update</li>
  61354. <li>folders<br>
  61355. list available folders</li>
  61356. </ul><br>
  61357. <a name="mailcheck_Attr"></a>
  61358. <b>Attributes</b>
  61359. <ul>
  61360. <li>delete_message<br>
  61361. 1 -> delete message after Subject reading is created</li>
  61362. <li>interval<br>
  61363. the interval in seconds used to trigger an update on the connection.
  61364. if idle is supported the defailt is 600, without idle support the default is 60. the minimum is 60.</li>
  61365. <li>nossl<br>
  61366. 1 -> don't use ssl.</li><br>
  61367. <li>disable<br>
  61368. 1 -> disconnect and stop polling</li>
  61369. <li>debug<br>
  61370. 1 -> enables debug output. default target is stdout.</li>
  61371. <li>logfile<br>
  61372. set the target for debug messages if debug is enabled.</li>
  61373. <li>accept_from<br>
  61374. comma separated list of gpg keys that will be accepted for signed messages. Mail::GnuPG and MIME::Parser have to be installed</li>
  61375. </ul>
  61376. </ul>
  61377. <a name="monitoring"></a>
  61378. <h3>monitoring</h3>
  61379. ( en | <a href="commandref_DE.html#monitoring"><u>de</u></a> )
  61380. <div>
  61381. <ul>
  61382. Each monitoring has a warning and an error list, which are stored
  61383. as readings. <br>
  61384. When a defined add-event occurs, the device is set to the warning
  61385. list after a predefined time.<br>
  61386. After a further predefined time, the device is deleted from the
  61387. warning list and set to the error list.<br>
  61388. If a defined remove-event occurs, the device is deleted from both
  61389. lists and still running timers are canceled.<br>
  61390. This makes it easy to create group messages and send them
  61391. formatted by two attributes.<br>
  61392. <br>
  61393. The following applications are possible and are described
  61394. <a href="#monitoringexamples"><u>below</u></a>:<br>
  61395. <ul>
  61396. <li>opened windows</li>
  61397. <li>battery warnings</li>
  61398. <li>activity monitor</li>
  61399. <li>
  61400. regular maintenance (for example changing the table water
  61401. filter or cleaning rooms)
  61402. </li>
  61403. <li>
  61404. operating hours dependent maintenance (for example clean the
  61405. Beamer filter)
  61406. </li>
  61407. </ul>
  61408. <br>
  61409. The monitor does not send a message by itself, a notify or DOIF is
  61410. necessary, which responds to the event "&lt;monitoring-name&gt; error
  61411. add: &lt;name&gt;" and then sends the return value of "get
  61412. &lt;monitoring-name&gt; default".
  61413. <br>
  61414. <br>
  61415. <a name="monitoringdefine"></a>
  61416. <b>Define</b>
  61417. <ul>
  61418. <code>
  61419. define &lt;name&gt; &lt;add-event&gt; [&lt;remove-event&gt;]
  61420. </code>
  61421. <br>
  61422. The syntax for &lt;add-event&gt; and &lt;remove-event&gt; is the
  61423. same as the pattern for <a href="#notify">notify</a>
  61424. (device-name or device-name:event).<br>
  61425. If only an &lt;add-event&gt; is defined, the device is deleted from
  61426. both lists as it occurs and the timers for warning and error are
  61427. started.<br>
  61428. </ul>
  61429. <br>
  61430. <a name="monitoringset"></a>
  61431. <b>Set</b>
  61432. <ul>
  61433. <li>
  61434. <code>active</code><br>
  61435. Two things will happen:<br>
  61436. 1. Restores pending timers, or sets the devices immediately to the
  61437. corresponding list if the time is in the past.<br>
  61438. 2. Executes the commands specified under the "setActiveFunc" attribute.
  61439. </li>
  61440. <li>
  61441. <code>clear (warning|error|all)</code><br>
  61442. Removes all devices from the specified list and aborts timers for this
  61443. list. With "all", all devices are removed from both lists and all
  61444. running timers are aborted.
  61445. </li>
  61446. <li>
  61447. <code>errorAdd &lt;name&gt;</code><br>
  61448. Add &lt;name&gt; to the error list.
  61449. </li>
  61450. <li>
  61451. <code>errorRemove &lt;name&gt;</code><br>
  61452. Removes &lt;name&gt; from the error list.
  61453. </li>
  61454. <li>
  61455. <code>inactive</code><br>
  61456. Inactivates the current device. Note the slight difference to the
  61457. disable attribute: using set inactive the state is automatically saved
  61458. to the statefile on shutdown, there is no explicit save necesary.
  61459. </li>
  61460. <li>
  61461. <code>warningAdd &lt;name&gt;</code><br>
  61462. Add &lt;name&gt; to the warning list.
  61463. </li>
  61464. <li>
  61465. <code>warningRemove &lt;name&gt;</code><br>
  61466. Removes &lt;name&gt; from the warning list.
  61467. </li>
  61468. </ul>
  61469. <br>
  61470. <a name="monitoringget"></a>
  61471. <b>Get</b>
  61472. <ul>
  61473. <li>
  61474. <code>all</code><br>
  61475. Returns the error and warning list, separated by a blank line.<br>
  61476. The formatting can be set with the attributes "errorReturn" and
  61477. "warningReturn".
  61478. </li>
  61479. <li>
  61480. <code>default</code><br>
  61481. The "default" value can be set in the attribute "getDefault" and is
  61482. intended to leave the configuration for the return value in the
  61483. monitoring device. If nothing is specified "all" is used.
  61484. </li>
  61485. <li>
  61486. <code>error</code><br>
  61487. Returns the error list.<br>
  61488. The formatting can be set with the attribute "errorReturn".
  61489. </li>
  61490. <li>
  61491. <code>warning</code><br>
  61492. Returns the warning list.<br>
  61493. The formatting can be set with the attribute "warningReturn".
  61494. </li>
  61495. </ul>
  61496. <br>
  61497. <a name="monitoringreadings"></a>
  61498. <b>Readings</b><br>
  61499. <ul>
  61500. <li>
  61501. <code>error</code><br>
  61502. Comma-separated list of devices.
  61503. </li>
  61504. <li>
  61505. <code>errorAdd_&lt;name&gt;</code><br>
  61506. Displays the time when the device will be set to the error list.
  61507. </li>
  61508. <li>
  61509. <code>state</code><br>
  61510. Displays the status (active, inactive, or disabled). In "active" it
  61511. displays which device added to which list or was removed from which
  61512. list.
  61513. </li>
  61514. <li>
  61515. <code>warning</code><br>
  61516. Comma-separated list of devices.
  61517. </li>
  61518. <li>
  61519. <code>warningAdd_&lt;name&gt;</code><br>
  61520. Displays the time when the device will be set to the warning list.
  61521. </li>
  61522. </ul>
  61523. <br>
  61524. <a name="monitoringattr"></a>
  61525. <b>Attribute</b>
  61526. <ul>
  61527. <li>
  61528. <a href="#addStateEvent">
  61529. <u><code>addStateEvent</code></u>
  61530. </a>
  61531. </li>
  61532. <li>
  61533. <code>blacklist</code><br>
  61534. Space-separated list of devspecs which will be ignored.<br>
  61535. If the attribute is set all devices which are specified by the devspecs
  61536. are removed from both lists.
  61537. </li>
  61538. <li>
  61539. <code>disable (1|0)</code><br>
  61540. 1: Disables the monitoring.<br>
  61541.         0: see "set active"
  61542. </li>
  61543. <li>
  61544. <a href="#disabledForIntervals">
  61545. <u><code>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM ...</code></u>
  61546. </a>
  61547. </li>
  61548. <li>
  61549. <code>errorFuncAdd {&lt;perl code&gt;}</code><br>
  61550. The following variables are available in this function:
  61551. <br>
  61552. <ul>
  61553. <li>
  61554. <code>$name</code><br>
  61555. Name of the event triggering device
  61556. </li>
  61557. <li>
  61558. <code>$event</code><br>
  61559. Includes the complete event, e.g.
  61560. <code>measured-temp: 21.7 (Celsius)</code>
  61561. </li>
  61562. <li>
  61563. <code>$addMatch</code><br>
  61564. Has the value 1 if the add-event is true
  61565. </li>
  61566. <li>
  61567. <code>$removeMatch</code><br>
  61568. Has the value 1 if the remove-event is true
  61569. </li>
  61570. <li>
  61571. <code>$SELF</code><br>
  61572. Name of the monitoring
  61573. </li>
  61574. </ul>
  61575. If the function returns a 1, the device is set to the error list after
  61576. the wait time.<br>
  61577. If the attribute is not set, it will be checked for
  61578. <code>$addMatch</code>.
  61579. </li>
  61580. <li>
  61581. <code>errorFuncRemove {&lt;perl code&gt;}</code><br>
  61582. This function provides the same variables as for "errorFuncAdd".<br>
  61583. If the function returns a 1, the device is removed from the error list
  61584. and still running timers are canceled.<br>
  61585. If the attribute is not set, it will be checked for
  61586. <code>$removeMatch</code> if there is a
  61587. <code>&lt;remove-event&gt;</code> in the DEF, otherwise it will be
  61588. checked for <code>errorFuncAdd</code>.
  61589. </li>
  61590. <li>
  61591. <code>errorWait &lt;perl code&gt;</code><br>
  61592. Wait until the device is set to the error list.
  61593. </li>
  61594. <li>
  61595. <code>errorReturn {&lt;perl code&gt;}</code><br>
  61596. The following variables are available in this attribute:
  61597. <ul>
  61598. <li>
  61599. <code>@errors</code><br>
  61600. Array with all devices on the error list.
  61601. </li>
  61602. <li>
  61603. <code>@warnings</code><br>
  61604. Array with all devices on the warning list.
  61605. </li>
  61606. <li>
  61607. <code>$SELF</code><br>
  61608. Name of the monitoring
  61609. </li>
  61610. </ul>
  61611. With this attribute the output created with "get &lt;name&gt; error"
  61612. can be formatted.
  61613. </li>
  61614. <li>
  61615. <code>getDefault (all|error|warning)</code><br>
  61616. This attribute can be used to specify which list(s) are / are returned
  61617. by "get &lt;name&gt; default". If the attribute is not set, "all" will
  61618. be used.
  61619. </li>
  61620. <li>
  61621. <code>setActiveFunc &lt;Anweisung&gt;</code><br>
  61622. The statement is one of the FHEM command types and is executed when you
  61623. define the monitoring or "set active".<br>
  61624. For a battery message <code>"trigger battery=low battery: low"</code>
  61625. can be useful.
  61626. </li>
  61627. <li>
  61628. <code>warningFuncAdd {&lt;perl code&gt;}</code><br>
  61629. Like errorFuncAdd, just for the warning list.
  61630. </li>
  61631. <li>
  61632. <code>warningFuncRemove {&lt;perl code&gt;}</code><br>
  61633. Like errorFuncRemove, just for the warning list.
  61634. </li>
  61635. <li>
  61636. <code>warningWait &lt;perl code&gt;</code><br>
  61637. Like errorWait, just for the warning list.
  61638. </li>
  61639. <li>
  61640. <code>warningReturn {&lt;perl code&gt;}</code><br>
  61641. Like errorReturn, just for the warning list.
  61642. </li>
  61643. <li>
  61644. <code>whitelist {&lt;perl code&gt;}</code><br>
  61645. Space-separated list of devspecs which are allowed.<br>
  61646. If the attribute is set all devices which are not specified by the
  61647. devspecs are removed from both lists.
  61648. </li>
  61649. <li>
  61650. <a href="#readingFnAttributes">
  61651. <u><code>readingFnAttributes</code></u>
  61652. </a>
  61653. </li>
  61654. </ul>
  61655. <br>
  61656. <a name="monitoringexamples"></a>
  61657. <b>Examples</b>
  61658. <ul>
  61659. <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
  61660. <u>The following sample codes can be imported via "Raw definition".</u>
  61661. </a>
  61662. <br><br>
  61663. <li>
  61664. <b>
  61665. Global, flexible opened windows/doors message
  61666. <a href="https://forum.fhem.de/index.php/topic,36504">
  61667. <u>(similar to those described in the forum)</u>
  61668. </a>
  61669. </b>
  61670. <br>
  61671. <pre>defmod Fenster_monitoring monitoring .*:(open|tilted) .*:closed
  61672. attr Fenster_monitoring errorReturn {return unless(@errors);;\
  61673. $_ = AttrVal($_, "alias", $_) foreach(@errors);;\
  61674. return("Das Fenster \"$errors[0]\" ist schon l&auml;nger ge&ouml;ffnet.") if(int(@errors) == 1);;\
  61675. @errors = sort {lc($a) cmp lc($b)} @errors;;\
  61676. return(join("\n - ", "Die folgenden ".@errors." Fenster sind schon l&auml;nger ge&ouml;ffnet:", @errors))\
  61677. }
  61678. attr Fenster_monitoring errorWait {AttrVal($name, "winOpenTimer", 60*10)}
  61679. attr Fenster_monitoring warningReturn {return unless(@warnings);;\
  61680. $_ = AttrVal($_, "alias", $_) foreach(@warnings);;\
  61681. return("Das Fenster \"$warnings[0]\" ist seit kurzem ge&ouml;ffnet.") if(int(@warnings) == 1);;\
  61682. @warnings = sort {lc($a) cmp lc($b)} @warnings;;\
  61683. return(join("\n - ", "Die folgenden ".@warnings." Fenster sind seit kurzem ge&ouml;ffnet:", @warnings))\
  61684. }</pre>
  61685. As soon as a device triggers an "open" or "tilded" event, the device is
  61686. set to the warning list and a timer is started after which the device
  61687. is moved from the warning to the error list. The waiting time can be
  61688. set for each device via userattr "winOpenTimer". The default value is
  61689. 10 minutes.<br>
  61690. As soon as a device triggers a "closed" event, the device is deleted
  61691. from both lists and still running timers are stopped.
  61692. </li>
  61693. <br>
  61694. <li>
  61695. <b>Battery monitoring</b><br>
  61696. <pre>defmod Batterie_monitoring monitoring .*:battery:.low .*:battery:.ok
  61697. attr Batterie_monitoring errorReturn {return unless(@errors);;\
  61698. $_ = AttrVal($_, "alias", $_) foreach(@errors);;\
  61699. return("Bei dem Ger&auml;t \"$errors[0]\" muss die Batterie gewechselt werden.") if(int(@errors) == 1);;\
  61700. @errors = sort {lc($a) cmp lc($b)} @errors;;\
  61701. return(join("\n - ", "Die folgenden ".@errors." Ger&auml;ten muss die Batterie gewechselt werden:", @errors))\
  61702. }
  61703. attr Batterie_monitoring errorWait 60*60*24*14
  61704. attr Batterie_monitoring warningReturn {return unless(@warnings);;\
  61705. $_ = AttrVal($_, "alias", $_) foreach(@warnings);;\
  61706. return("Bei dem Ger&auml;t \"$warnings[0]\" muss die Batterie demn&auml;chst gewechselt werden.") if(int(@warnings) == 1);;\
  61707. @warnings = sort {lc($a) cmp lc($b)} @warnings;;\
  61708. return(join("\n - ", "Die folgenden ".@warnings." Ger&auml;ten muss die Batterie demn&auml;chst gewechselt werden:", @warnings))\
  61709. }</pre>
  61710. As soon as a device triggers a "battery: low" event, the device is set
  61711. to the warning list and a timer is started after which the device is
  61712. moved from the warning to the error list. The waiting time is set to 14
  61713. days.<br>
  61714. As soon as a device triggers a "battery: ok" event, the device is
  61715. deleted from both lists and still running timers are stopped.
  61716. </li>
  61717. <br>
  61718. <li>
  61719. <b>Activity Monitor</b><br>
  61720. <pre>defmod Activity_monitoring monitoring .*:.*
  61721. attr Activity_monitoring errorReturn {return unless(@errors);;\
  61722. $_ = AttrVal($_, "alias", $_) foreach(@errors);;\
  61723. return("Das Ger&auml;t \"$errors[0]\" hat sich seit mehr als 24 Stunden nicht mehr gemeldet.") if(int(@errors) == 1);;\
  61724. @errors = sort {lc($a) cmp lc($b)} @errors;;\
  61725. return(join("\n - ", "Die folgenden ".@errors." Ger&auml;ten haben sich seit mehr als 24 Stunden nicht mehr gemeldet:", @errors))\
  61726. }
  61727. attr Activity_monitoring errorWait 60*60*24
  61728. attr Activity_monitoring warningReturn {return unless(@warnings);;\
  61729. $_ = AttrVal($_, "alias", $_) foreach(@warnings);;\
  61730. return("Das Ger&auml;t \"$warnings[0]\" hat sich seit mehr als 12 Stunden nicht mehr gemeldet.") if(int(@warnings) == 1);;\
  61731. @warnings = sort {lc($a) cmp lc($b)} @warnings;;\
  61732. return(join("\n - ", "Die folgenden ".@warnings." Ger&auml;ten haben sich seit mehr als 12 Stunden nicht mehr gemeldet:", @warnings))\
  61733. }
  61734. attr Activity_monitoring warningWait 60*60*12</pre>
  61735. Devices are not monitored until they have triggered at least one event.
  61736. If the device does not trigger another event in 12 hours, it will be
  61737. set to the warning list. If the device does not trigger another event
  61738. within 24 hours, it will be moved from the warning list to the error
  61739. list.
  61740. </li>
  61741. <br>
  61742. <li>
  61743. <b>Regular maintenance (for example changing the table water filter)</b>
  61744. <br>
  61745. <pre>defmod Wasserfilter_monitoring monitoring Wasserfilter_DashButton:.*:.short
  61746. attr Wasserfilter_monitoring errorReturn {return unless(@errors);;\
  61747. return "Der Wasserfilter muss gewechselt werden.";;\
  61748. }
  61749. attr Wasserfilter_monitoring errorWait 60*60*24*30
  61750. attr Wasserfilter_monitoring warningReturn {return unless(@warnings);;\
  61751. return "Der Wasserfilter muss demn&auml;chst gewechselt werden.";;\
  61752. }
  61753. attr Wasserfilter_monitoring warningWait 60*60*24*25</pre>
  61754. A <a href="#dash_dhcp"><u>DashButton</u></a> is used to tell FHEM that
  61755. the water filter has been changed.<br>
  61756. After 30 days, the DashButton is set to the error list.
  61757. </li>
  61758. <br>
  61759. <li>
  61760. <b>Regular maintenance (for example cleaning rooms)</b>
  61761. <br>
  61762. <pre>defmod putzen_DashButton dash_dhcp
  61763. attr putzen_DashButton allowed AC:63:BE:2E:19:AF,AC:63:BE:49:23:48,AC:63:BE:49:5E:FD,50:F5:DA:93:2B:EE,AC:63:BE:B2:07:78
  61764. attr putzen_DashButton devAlias ac-63-be-2e-19-af:Badezimmer\
  61765. ac-63-be-49-23-48:Küche\
  61766. ac-63-be-49-5e-fd:Schlafzimmer\
  61767. 50-f5-da-93-2b-ee:Arbeitszimmer\
  61768. ac-63-be-b2-07-78:Wohnzimmer
  61769. attr putzen_DashButton event-min-interval .*:5
  61770. attr putzen_DashButton port 6767
  61771. attr putzen_DashButton userReadings state {return (split(":", @{$hash->{CHANGED}}[0]))[0];;}
  61772. attr putzen_DashButton widgetOverride allowed:textField-long devAlias:textField-long
  61773. defmod putzen_monitoring monitoring putzen_DashButton:.*:.short
  61774. attr putzen_monitoring errorFuncAdd {$event =~ m/^(.+):/;;\
  61775. $name = $1;;\
  61776. return 1;;\
  61777. }
  61778. attr putzen_monitoring errorReturn {return unless(@errors);;\
  61779. return("Der Raum \"$errors[0]\" muss wieder geputzt werden.") if(int(@errors) == 1);;\
  61780. return(join("\n - ", "Die folgenden Räume müssen wieder geputzt werden:", @errors))\
  61781. }
  61782. attr putzen_monitoring errorWait 60*60*24*7</pre>
  61783. Several <a href="#dash_dhcp"><u>DashButton</u></a> are used to inform
  61784. FHEM that the rooms have been cleaned.<br>
  61785. After 7 days, the room is set to the error list.<br>
  61786. However, the room name is not the device name but the readings name and
  61787. is changed in the <code>errorFuncAdd</code> attribute.
  61788. </li>
  61789. <br>
  61790. <li>
  61791. <b>
  61792. Operating hours dependent maintenance
  61793. (for example, clean the Beamer filter)
  61794. </b>
  61795. <br>
  61796. <pre>defmod BeamerFilter_monitoring monitoring Beamer_HourCounter:pulseTimeOverall BeamerFilter_DashButton:.*:.short
  61797. attr BeamerFilter_monitoring userattr errorInterval
  61798. attr BeamerFilter_monitoring errorFuncAdd {return 1\
  61799. if(ReadingsVal($name, "pulseTimeOverall", 0) >= \
  61800. ReadingsVal($name, "pulseTimeService", 0)\
  61801. + (AttrVal($SELF, "errorInterval", 0))\
  61802. && $addMatch\
  61803. );;\
  61804. return;;\
  61805. }
  61806. attr BeamerFilter_monitoring errorFuncRemove {return unless($removeMatch);;\
  61807. fhem(\
  61808. "setreading $name pulseTimeService "\
  61809. .ReadingsVal($name, "pulseTimeOverall", 0)\
  61810. );;\
  61811. return 1;;\
  61812. }
  61813. attr BeamerFilter_monitoring errorInterval 60*60*200
  61814. attr BeamerFilter_monitoring errorReturn {return unless(@errors);;\
  61815. return "Der Filter vom Beamer muss gereinigt werden.";;\
  61816. }
  61817. attr BeamerFilter_monitoring warningFuncAdd {return}
  61818. attr BeamerFilter_monitoring warningFuncRemove {return}</pre>
  61819. An <a href="#HourCounter"><u>HourCounter</u></a> is used to record the
  61820. operating hours of a beamer and a
  61821. <a href="#dash_dhcp"><u>DashButton</u></a> to tell FHEM that the filter
  61822. has been cleaned.<br>
  61823. If the filter has not been cleaned for more than 200 hours, the device
  61824. is set to the error list.<br>
  61825. If cleaning is acknowledged with the DashButton, the device is removed
  61826. from the error list and the current operating hours are stored in the
  61827. HourCounter device.
  61828. </li>
  61829. </ul>
  61830. </ul>
  61831. </div>
  61832. <p>
  61833. <a name="msgConfig" id="msgConfig"></a>
  61834. </p>
  61835. <h3>
  61836. msgConfig
  61837. </h3>
  61838. <ul>
  61839. Provides global settings and tools for FHEM command <a href="#MSG">msg</a>.<br>
  61840. A device named globalMsg will be created automatically when using msg-command for the first time and no msgConfig device could be found.<br>
  61841. The device name can be renamed and reconfigured afterwards if desired.<br>
  61842. <br>
  61843. <a name="msgConfigdefine" id="msgConfigdefine"></a> <b>Define</b>
  61844. <ul>
  61845. <code>define &lt;name&gt; msgConfig</code><br>
  61846. </ul><br>
  61847. <br>
  61848. <a name="msgConfigset" id="msgConfigset"></a> <b>Set</b>
  61849. <ul>
  61850. <ul>
  61851. <li>
  61852. <b>addLocation</b> &nbsp;&nbsp;<Location Name>&nbsp;&nbsp;<br>
  61853. Conveniently creates a Dummy device based on the given location name. It will be pre-configured to be used together with location-based routing when using the msg-command. The dummy device will be added to attribute msgLocationDevs automatically. Afterwards additional configuration is required by adding msgContact* or msgRecipient* attributes for gateway devices placed at this specific location.
  61854. </li>
  61855. <li>
  61856. <b>cleanReadings</b> &nbsp;&nbsp;[<device and/or regex>]&nbsp;&nbsp;<br>
  61857. Easy way to cleanup all fhemMsg readings. A parameter is optional and can be a concrete device name or mixed together with regex. This command is an alias for "deletereading <device and/or regex> fhemMsg.*".
  61858. </li>
  61859. <li>
  61860. <b>createResidentsDev</b> &nbsp;&nbsp;<de|en>&nbsp;&nbsp;<br>
  61861. Creates a new device named rgr_Residents of type <a href="#RESIDENTS">RESIDENTS</a>. It will be pre-configured based on the given language. In case rgr_Residents exists it will be updated based on the given language (basically only a language change). Afterwards next configuration steps will be displayed to use RESIDENTS together with presence-based routing of the msg-command.<br>
  61862. This next step is basically to set attribute msgResidentsDevice to refer to this RESIDENTS device either globally or for any other specific FHEM device (most likely you do NOT want to have this attribute set globally as otherwise this will affect ALL devices and therefore ALL msg-commands in your automations).<br>
  61863. Note that use of RESIDENTS only makes sense together with ROOMMATE and or GUEST devices which still need to be created manually. See <a href="#RESIDENTSset">RESIDENTS Set commands</a> addRoommate and addGuest respectively.
  61864. </li>
  61865. <li>
  61866. <b>createSwitcherDev</b> &nbsp;&nbsp;<de|en>&nbsp;&nbsp;<br>
  61867. Creates a pre-configured Dummy device named HouseAnn and updates globalMsg attribute msgSwitcherDev to refer to it.
  61868. </li>
  61869. </ul>
  61870. </ul>
  61871. </ul>
  61872. <a name="msgDialog"></a>
  61873. <h3>msgDialog</h3>
  61874. <ul>
  61875. With msgDialog you can define dialogs for instant messages via TelegramBot, Jabber and yowsup (WhatsApp).<br>
  61876. The communication uses the msg command. Therefore, a device of type msgConfig must be defined first.<br>
  61877. For each dialog you can define which person is authorized to do so. Devices of the type ROOMMATE or GUEST with a defined msgContactPush attribute are required for this. Make sure that the reading fhemMsgRcvPush generates an event.<br>
  61878. <br>
  61879. Prerequisites:
  61880. <ul>
  61881. The Perl module "JSON" is required.<br>
  61882. Under Debian (based) system, this can be installed using
  61883. <code>"apt-get install libjson-perl"</code>.
  61884. </ul>
  61885. <br>
  61886. <a name="msgDialogdefine"></a>
  61887. <b>Define</b>
  61888. <ul>
  61889. <code>define &lt;name&gt; msgDialog &lt;JSON&gt;</code><br>
  61890. Because of the complexity, it is easiest to define an empty dialog first.
  61891. <code>define &lt;name&gt; msgDialog {}</code>
  61892. Then edit the DEF in the detail view.
  61893. <PRE>
  61894. {
  61895. "&lt;TRIGGER&gt;": {
  61896. "match": "&lt;regex&gt;",
  61897. "setOnly": (true|false),
  61898. "commands": "(fhem command|{perl code})",
  61899. "message": [
  61900. "{perl code}",
  61901. "text"
  61902. ],
  61903. "&lt;NEXT TRIGGER 1&gt;": {
  61904. ...
  61905. },
  61906. "&lt;NEXT TRIGGER 2&gt;": {
  61907. ...
  61908. }
  61909. }
  61910. }
  61911. </PRE>
  61912. <li>
  61913. <code>TRIGGER</code><br>
  61914. Can be any text. The device checks whether the incoming message equals it. If so, the dialogue will be continued at this point.
  61915. </li>
  61916. <br>
  61917. <li>
  61918. <code>match</code><br>
  61919. If you do not want to allow only one message, you can specify a regex. The regex must apply to the whole incoming message.
  61920. </li>
  61921. <br>
  61922. <li>
  61923. <code>setOnly</code><br>
  61924. Can be optionally set to true or false. In both cases, the TRIGGER will
  61925. not be returned at "get &lt;name&gt; trigger".<br>
  61926. If setOnly is set to true, the dialog at this point cannot be triggered
  61927. by incoming messages, but only by using "get &lt;name&gt; say
  61928. TRIGGER".<br>
  61929. This can be used to initiate a dialog from FHEM.
  61930. </li>
  61931. <br>
  61932. <li>
  61933. <code>commands</code><br>
  61934. Can contain a single or multiple commands:
  61935. <PRE>
  61936. "commands": "single command"
  61937. "commands": [
  61938. "command 1",
  61939. "command 2",
  61940. "{perl command}"
  61941. ]
  61942. </PRE>
  61943. </li>
  61944. <li>
  61945. <code>message</code><br>
  61946. Can contain a single or multiple text that is connected by a line break:
  61947. <PRE>
  61948. "message": "text"
  61949. "message": [
  61950. "text 1",
  61951. "text 2",
  61952. "{return from perl command}"
  61953. ]
  61954. </PRE>
  61955. </li>
  61956. For multi-level dialogs, this structure is specified nested.<br>
  61957. <br>
  61958. Variables and placeholders defined under the attribute evalSpecials are
  61959. evaluated.<br>
  61960. Variables:
  61961. <li>
  61962. <code>$SELF</code><br>
  61963. name of the msgDialog
  61964. </li>
  61965. <br>
  61966. <li>
  61967. <code>$message</code><br>
  61968. received message
  61969. </li>
  61970. <br>
  61971. <li>
  61972. <code>$recipient</code><br>
  61973. Name of the dialog partner
  61974. </li>
  61975. </ul>
  61976. <br>
  61977. <a name="msgDialogset"></a>
  61978. <b>Set</b>
  61979. <ul>
  61980. <li>
  61981. <code>reset</code><br>
  61982. Resets the dialog for all users.
  61983. </li>
  61984. <br>
  61985. <li>
  61986. <code>
  61987. say [@&lt;recipient1&gt;[,&lt;recipient2&gt;,...]]
  61988. &lt;TRIGGER&gt;[|&lt;NEXT TRIGGER&gt;|...]
  61989. </code><br>
  61990. The dialog is continued for all specified recipients at the specified
  61991. position.<br>
  61992. If no recipients are specified, the dialog is continued for all
  61993. recipients specified under the allowed attribute.
  61994. </li>
  61995. <br>
  61996. <li>
  61997. <code>updateAllowed</code><br>
  61998. Updates the selection for the allowed attribute.
  61999. </li>
  62000. </ul>
  62001. <br>
  62002. <a name="msgDialogget"></a>
  62003. <b>Get</b>
  62004. <ul>
  62005. <li>
  62006. <code>trigger</code><br>
  62007. Lists all TRIGGERs of the first level where setOnly is not specified.
  62008. </li>
  62009. </ul>
  62010. <br>
  62011. <a name="msgDialogattr"></a>
  62012. <b>Attribute</b>
  62013. <ul>
  62014. <li>
  62015. <code>allowed</code><br>
  62016. List with all RESIDENTS and ROOMMATE that are authorized for this dialog.
  62017. </li>
  62018. <br>
  62019. <li>
  62020. <code>disable 1</code><br>
  62021. Dialog is deactivated.
  62022. </li>
  62023. <br>
  62024. <li>
  62025. <a href="#disabledForIntervals">
  62026. <u><code>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM ...</code></u>
  62027. </a>
  62028. </li>
  62029. <br>
  62030. <li>
  62031. <code>evalSpecials key1=value1 key2=value2 ...</code><br>
  62032. Space Separate list of name=value pairs.<br>
  62033. Value may contain spaces if included in "" or {}.<br>
  62034. Value is evaluated as a perl expression if it is included in {}.<br>
  62035. In the DEF, %Name% strings are replaced by the corresponding value.<br>
  62036. This attribute is available as "msgDialog_evalSpecials" in the msgConfig
  62037. device.<br>
  62038. If the same name was defined in the msgConfig and msgDialog, the value
  62039. from msgDialog is used.
  62040. </li>
  62041. <br>
  62042. <li>
  62043. <code>msgCommand &lt;command&gt;</code><br>
  62044. Command used to send a message.<br>
  62045. The default is
  62046. <code>"msg push \@$recipients $message"</code>.<br>
  62047. This attribute is available as "msgDialog_msgCommand" in the msgConfig device.
  62048. </li>
  62049. </ul>
  62050. <br>
  62051. <a name="msgDialogreadings"></a>
  62052. <b>Reading</b>
  62053. <ul>
  62054. <li>
  62055. <code>$recipient_history</code><br>
  62056. | separated list of TRIGGERS to save the current state of the dialog.<br>
  62057. A readings is created for each dialog partner. When the dialog is
  62058. finished, the reading will be cleared.
  62059. </li>
  62060. </ul>
  62061. <br>
  62062. <a name="msgDialogTelegramBot"></a>
  62063. <b>Notes for use with TelegramBot:</b>
  62064. <ul>
  62065. It may be necessary to set the attribute "utf8specials" to 1 in the
  62066. TelegramBot, for messages with special characters to be sent.<br>
  62067. <br>
  62068. The msg command supports the TelegramBot_MTYPE. The default is message. The
  62069. queryInline value can be used to create an inline keyboard.
  62070. </ul>
  62071. <br>
  62072. <a name="msgDialogJabber"></a>
  62073. <b>Notes for use with Jabber:</b>
  62074. <ul>
  62075. The msg command supports the TelegramBot_MTYPE. The default is empty. The
  62076. value otr can be used to send an OTR message.
  62077. </ul>
  62078. <br>
  62079. <a name="msgDialogyowsub"></a>
  62080. <b>Notes for use with yowsub (WhatsApp):</b>
  62081. <ul>
  62082. No experiences so far.
  62083. </ul>
  62084. <br>
  62085. <a name="msgDialogexamples"></a>
  62086. <b>Examples:</b>
  62087. <ul>
  62088. <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
  62089. <u>
  62090. The following example codes can be imported by "Raw defnition".
  62091. </u>
  62092. </a>
  62093. <br>
  62094. <br>
  62095. All examples are designed for communication via the TelegramBot. When using
  62096. Jabber or yowsup, they may need to be adjusted.<br>
  62097. It is assumed that the msgConfig device contains the evalSpecials "me" with
  62098. a name which is used to call the bot.<br>
  62099. <br>
  62100. <b>Meta dialog for listing all authorized dialogs:</b>
  62101. <ul>
  62102. <PRE>
  62103. defmod meta_Dialog msgDialog {\
  62104. "%me%": {\
  62105. "match": "\/?(start|%me%)",\
  62106. "commands": "deletereading TYPE=msgDialog $recipient_history",\
  62107. "message": [\
  62108. "{return('(' . join(') (', sort(split('\n', fhem('get TYPE=msgDialog:FILTER=NAME!=$SELF:FILTER=allowed=.*($recipient|everyone).* trigger'))), 'abbrechen') . ') ')}",\
  62109. "Ich kann folgendes f&uuml;r dich tun:"\
  62110. ]\
  62111. },\
  62112. "zur&uuml;ck": {\
  62113. "commands": "set $recipient_history=.+|.+ say @$recipient {(ReadingsVal($DEV, '$recipient_history', '') =~ m/(.+)\\|.+$/;; return $2 ? $2 : $1;;)}"\
  62114. },\
  62115. "abbrechen": {\
  62116. "match": "\/?abbrechen",\
  62117. "commands": "deletereading TYPE=msgDialog $recipient_history",\
  62118. "message": [\
  62119. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62120. "Dialog abgebrochen."\
  62121. ]\
  62122. },\
  62123. "beenden": {\
  62124. "match": "\/?beenden",\
  62125. "commands": "deletereading TYPE=msgDialog $recipient_history",\
  62126. "message": [\
  62127. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62128. "Dialog beendet."\
  62129. ]\
  62130. }\
  62131. }
  62132. attr meta_Dialog allowed everyone
  62133. </PRE>
  62134. </ul>
  62135. <b>Request of current fuel prices</b>
  62136. <ul>
  62137. <PRE>
  62138. defmod Tankstelle_Dialog msgDialog {\
  62139. "Tankstelle": {\
  62140. "message": [\
  62141. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62142. "Die Krafstoffpreise der betragen aktuell folgende Werte:",\
  62143. "",\
  62144. "AIVA",\
  62145. "",\
  62146. "[%AIVA%:Diesel] €/l Diesel",\
  62147. "[%AIVA%:Super] €/l Super",\
  62148. "[%AIVA%:E10] €/l E10",\
  62149. "[%AIVA%:Autogas] €/l Autogas"\
  62150. ]\
  62151. }\
  62152. }
  62153. attr Tankstelle_Dialog evalSpecials AIVA=AIVA_petrolStation
  62154. </PRE>
  62155. </ul>
  62156. <b>Programming of the washing machine</b>
  62157. <ul>
  62158. <PRE>
  62159. defmod Waschmaschine_Dialog msgDialog { "Waschmaschine": {\
  62160. "message": [\
  62161. "{return('(Zeitprogramm stoppen) ') if(ReadingsVal('%controlUnit%', 'controlMode', '') eq 'auto')}",\
  62162. "{return('(programmieren) ') if(ReadingsVal('%actor%', 'state', '') ne 'on')}",\
  62163. "{return('(einschalten) ') if(ReadingsVal('%actor%', 'state', '') ne 'on')}",\
  62164. "(Verlaufsdiagramm) ",\
  62165. "(abbrechen) ",\
  62166. "{return('Waschmaschine: ' . (ReadingsVal('%actor%', 'state', '') eq 'on' ? 'eingeschaltet' : 'ausgeschaltet'))}",\
  62167. "{return('Modus: ' . (ReadingsVal('%controlUnit%', 'controlMode', '') eq 'auto' ? 'Automatik' : 'Manuell (' . ReadingsVal('%controlUnit%', 'time', '') . ')'))}"\
  62168. ],\
  62169. "Zeitprogramm stoppen": {\
  62170. "commands": "set %controlUnit% controlMode manual",\
  62171. "message": [\
  62172. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62173. "Das Zeitprogramm wurde gestoppt."\
  62174. ]\
  62175. },\
  62176. "programmieren": {\
  62177. "message": [\
  62178. "(best&auml;tigen|zur&uuml;ck|abbrechen) ",\
  62179. "( 00:00 | 00:15 | 00:30 | 00:45 ) ",\
  62180. "( 01:00 | 01:15 | 01:30 | 01:45 ) ",\
  62181. "( 02:00 | 02:15 | 02:30 | 02:45 ) ",\
  62182. "( 03:00 | 03:15 | 03:30 | 03:45 ) ",\
  62183. "( 04:00 | 04:15 | 04:30 | 04:45 ) ",\
  62184. "( 05:00 | 05:15 | 05:30 | 05:45 ) ",\
  62185. "( 06:00 | 06:15 | 06:30 | 06:45 ) ",\
  62186. "( 07:00 | 07:15 | 07:30 | 07:45 ) ",\
  62187. "( 08:00 | 08:15 | 08:30 | 08:45 ) ",\
  62188. "( 09:00 | 09:15 | 09:30 | 09:45 ) ",\
  62189. "( 10:00 | 10:15 | 10:30 | 10:45 ) ",\
  62190. "( 11:00 | 11:15 | 11:30 | 11:45 ) ",\
  62191. "( 12:00 | 12:15 | 12:30 | 12:45 ) ",\
  62192. "( 13:00 | 13:15 | 13:30 | 13:45 ) ",\
  62193. "( 14:00 | 14:15 | 14:30 | 14:45 ) ",\
  62194. "( 15:00 | 15:15 | 15:30 | 15:45 ) ",\
  62195. "( 16:00 | 16:15 | 16:30 | 16:45 ) ",\
  62196. "( 17:00 | 17:15 | 17:30 | 17:45 ) ",\
  62197. "( 18:00 | 18:15 | 18:30 | 18:45 ) ",\
  62198. "( 19:00 | 19:15 | 19:30 | 19:45 ) ",\
  62199. "( 20:00 | 20:15 | 20:30 | 20:45 ) ",\
  62200. "( 21:00 | 21:15 | 21:30 | 21:45 ) ",\
  62201. "( 22:00 | 22:15 | 22:30 | 22:45 ) ",\
  62202. "( 23:00 | 23:15 | 23:30 | 23:45 ) ",\
  62203. "Wann soll die W&auml;sche fertig sein?",\
  62204. "Bitte Uhrzeit in HH:MM angeben.",\
  62205. "Aktuell ist [%controlUnit%:time] Uhr eingestellt."\
  62206. ],\
  62207. "Uhrzeit": {\
  62208. "match": " ?([0-1][0-9]|2[0-3]):[0-5][0-9] ?",\
  62209. "commands": [\
  62210. "set %controlUnit% time $message",\
  62211. "set $SELF say @$recipient Waschmaschine|programmieren|best&auml;tigen"\
  62212. ]\
  62213. },\
  62214. "best&auml;tigen": {\
  62215. "commands": "set %controlUnit% controlMode auto",\
  62216. "message": [\
  62217. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62218. "Das Zeitprogramm wurde eingestellt.",\
  62219. "Die W&auml;sche wird voraussichtlich um [%controlUnit%:time] Uhr fertig sein.",\
  62220. "Bitte die Waschmaschine vorbereiten."\
  62221. ]\
  62222. }\
  62223. },\
  62224. "einschalten": {\
  62225. "commands": [\
  62226. "set %controlUnit% controlMode manual",\
  62227. "set %actor% on"\
  62228. ]\
  62229. },\
  62230. "Verlaufsdiagramm": {\
  62231. "commands": "set %TelegramBot% cmdSend {plotAsPng('%plot%')}",\
  62232. "message": "TelegramBot_MTYPE=queryInline (%me%) $message"\
  62233. }\
  62234. },\
  62235. "auto": {\
  62236. "setOnly": true,\
  62237. "commands": [\
  62238. "set %actor% on",\
  62239. "set %controlUnit% controlMode manual"\
  62240. ],\
  62241. "message": [\
  62242. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62243. "Die Wachmaschine wurde automatisch eingeschaltet."\
  62244. ]\
  62245. },\
  62246. "manual": {\
  62247. "setOnly": true,\
  62248. "message": [\
  62249. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62250. "Die Wachmaschine wurde manuell eingeschaltet."\
  62251. ]\
  62252. },\
  62253. "done": {\
  62254. "setOnly": true,\
  62255. "commands": "set %actor% off",\
  62256. "message": [\
  62257. "TelegramBot_MTYPE=queryInline (%me%) ",\
  62258. "Die Wachmaschine ist fertig."\
  62259. ]\
  62260. }\
  62261. }
  62262. attr Waschmaschine_Dialog evalSpecials actor=HM_2C10D8_Sw\
  62263. controlUnit=Waschkeller_washer_controlUnit\
  62264. plot=Waschkeller_washer_SVG
  62265. </PRE>
  62266. </ul>
  62267. </ul>
  62268. </ul>
  62269. <a name="netatmo"></a>
  62270. <h3>netatmo</h3>
  62271. <ul>
  62272. FHEM module for netatmo weather stations, thermostats and cameras.<br><br>
  62273. Notes:
  62274. <ul>
  62275. <li>JSON has to be installed on the FHEM host.</li>
  62276. <li>You need to create an app <u><a href="https://dev.netatmo.com/dev/createanapp">here</a></u> to get your <i>client_id / client_secret</i>.<br />Request the full access scope including cameras and thermostats.</li>
  62277. </ul><br>
  62278. <a name="netatmo_Define"></a>
  62279. <b>Define</b>
  62280. <ul>
  62281. <code>define &lt;name&gt; netatmo [ACCOUNT] &lt;username&gt; &lt;password&gt; &lt;client_id&gt; &lt;client_secret&gt;</code><br>
  62282. <code>define &lt;name&gt; netatmo &lt;device&gt;</code><br>
  62283. <br>
  62284. Defines a netatmo device.<br><br>
  62285. If a netatmo device of the account type is created all fhem devices for the netatmo devices are automaticaly created
  62286. (if autocreate is not disabled).
  62287. <br>
  62288. Examples:
  62289. <ul>
  62290. <code>define netatmo netatmo ACCOUNT abc@test.com myPassword 2134123412399119d4123134 AkqcOIHqrasfdaLKcYgZasd987123asd</code><br>
  62291. <code>define netatmo netatmo 2f:13:2b:93:12:31</code><br>
  62292. <code>define netatmo netatmo MODULE 2f:13:2b:93:12:31 f1:32:b9:31:23:11</code><br>
  62293. <code>define netatmo netatmo HOME 1234567890abcdef12345678</code><br>
  62294. <code>define netatmo netatmo CAMERA 1234567890abcdef12345678 70:ee:12:34:56:78</code><br>
  62295. <code>define netatmo netatmo PERSON 1234567890abcdef12345678 01234567-89ab-cdef-0123-456789abcdef</code><br>
  62296. </ul>
  62297. </ul><br>
  62298. <a name="netatmo_Webhook"></a>
  62299. <b>Webhook</b><br>
  62300. <ul>
  62301. <code>define netatmo netatmo WEBHOOK</code><br><br>
  62302. Set your URL in attribute webhookURL, events from cameras will be received insantly
  62303. </ul><br>
  62304. <a name="netatmo_Readings"></a>
  62305. <b>Readings</b>
  62306. <ul>
  62307. </ul><br>
  62308. <a name="netatmo_Set"></a>
  62309. <b>Set</b>
  62310. <ul>
  62311. <li>autocreate<br>
  62312. Create fhem devices for all netatmo weather devices.</li>
  62313. <li>autocreate_homes<br>
  62314. Create fhem devices for all netatmo homes, cameras and persons.</li>
  62315. <li>autocreate_thermostats<br>
  62316. Create fhem devices for all netatmo relays and thermostats.</li>
  62317. <li>autocreate_homecoachs<br>
  62318. Create fhem devices for all netatmo homecoachs.</li>
  62319. </ul><br>
  62320. <a name="netatmo_Get"></a>
  62321. <b>Get</b><br />
  62322. ACCOUNT
  62323. <ul>
  62324. <li>devices<br>
  62325. list the netatmo weather devices for this account</li>
  62326. <li>home<br>
  62327. list the netatmo home devices for this account</li>
  62328. <li>update<br>
  62329. trigger a global update for dashboard data</li>
  62330. <li>public [&lt;address&gt;] &lt;args&gt;<br>
  62331. no arguments -> get all public stations in a radius of 0.025&deg; around global fhem latitude/longitude<br>
  62332. &lt;rad&gt; -> get all public stations in a radius of &lt;rad&gt;&deg; around global fhem latitude/longitude<br>
  62333. &lt;lat&gt; &lt;lon&gt; [&lt;rad&gt;] -> get all public stations in a radius of 0.025&deg; or &lt;rad&gt;&deg; around &lt;lat&gt;/&lt;lon&gt;<br>
  62334. &lt;lat1&gt; &lt;lon1&gt; &lt;lat2&gt; &lt;lon2&gt; -> get all public stations in the area of &lt;lat1&gt; &lt;lon2&gt; &lt;lat2&gt; &lt;lon2&gt;<br>
  62335. if &lt;address&gt; is given then list stations in the area of this address. can be given as 5 digit german postal code or a: followed by a textual address. all spaces have to be replaced by a +.<br>
  62336. &lt;lat&gt; &lt;lon&gt; values can also be entered as a single coordinates parameter &lt;lat&gt;,&lt;lon&gt;<br></li>
  62337. </ul><br>
  62338. DEVICE/MODULE
  62339. <ul>
  62340. <li>update<br>
  62341. update the device readings</li>
  62342. <li>updateAll<br>
  62343. update the device readings after deleting all current readings</li>
  62344. </ul><br>
  62345. HOME
  62346. <ul>
  62347. <li>update<br>
  62348. update the home events and all camera and person readings</li>
  62349. </ul><br>
  62350. CAMERA
  62351. <ul>
  62352. <li>ping<br>
  62353. ping the camera and get the local command url</li>
  62354. <li>live/_local<br>
  62355. get the playlist for live video (internet or local network)</li>
  62356. <li>video/_local &lt;video_id&gt;<br>
  62357. get the playlist for a video id (internet or local network)</li>
  62358. </ul><br>
  62359. PRESENCE
  62360. <ul>
  62361. <li>config<br>
  62362. read the camera config</li>
  62363. <li>timelapse<br>
  62364. get the link for a timelapse video (local network)</li>
  62365. </ul><br>
  62366. PERSON
  62367. <ul>
  62368. <li>update<br>
  62369. n/a</li>
  62370. </ul><br>
  62371. <a name="netatmo_Attr"></a>
  62372. <b>Attributes</b>
  62373. <ul>
  62374. <li>interval<br>
  62375. the interval in seconds used to check for new values.</li>
  62376. <li>disable<br>
  62377. 1 -> stop polling</li>
  62378. <li>addresslimit<br>
  62379. maximum number of addresses to resolve in public station searches (ACCOUNT - default: 10)</li>
  62380. <li>setpoint_duration<br>
  62381. setpoint duration in minutes (THERMOSTAT - default: 60)</li>
  62382. <li>videoquality<br>
  62383. video quality for playlists (HOME - default: medium)</li>
  62384. <li>webhookURL<br>
  62385. webhook URL - can include basic auth and ports: http://user:pass@your.url:8080/fhem/netatmo (WEBHOOK)</li>
  62386. <li>webhookPoll<br>
  62387. poll home after event from webhook (WEBHOOK - default: 0)</li>
  62388. <li>ignored_device_ids<br>
  62389. ids of devices/persons ignored on autocrate (ACCOUNT - comma separated)</li>
  62390. </ul>
  62391. </ul>
  62392. <a name="notice"></a>
  62393. <h3>notice</h3>
  62394. <ul>
  62395. <code>notice [confirm [value]|list [&lt;keyword&gt;]|reset [yes]|view &lt;id&gt; [noheader|[de|en]]]</code><br>
  62396. <br>
  62397. View and confirmation of system messages.
  62398. <br>
  62399. <br>
  62400. During an update or a system start from FHEM sometimes it is necessary to
  62401. inform the user about important changes or additions. It may be necessary
  62402. to confirm a system message by the user.
  62403. <br>
  62404. <br>
  62405. By entering the command '<code>notice</code>' a list of all messages is displayed.
  62406. Are messages available in different languages, they are ordered by language.
  62407. <br>
  62408. Example:
  62409. <blockquote><code><pre>
  62410. fhem&gt; notice
  62411. ==&gt; Language: de
  62412. ID Published Expired Confirmed Description
  62413. advice-20130128-002 actually never not needed kurze beschreibung
  62414. update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
  62415. ==&gt; Language: en
  62416. ID Published Expired Confirmed Description
  62417. advice-20130128-001 actually never no short description
  62418. advice-20130128-002 actually never not needed short description
  62419. update-20130128-001 actually never no short description
  62420. update-20130128-002 31.01.2013 01.02.2013 no short description
  62421. </pre></code></blockquote>
  62422. By entering '<code>notice list &lt;keyword&gt;</code>' the output of the list contains only
  62423. available messages that starts with '<code>&lt;keyword&gt;</code>'.
  62424. <br>
  62425. Example:
  62426. <blockquote><code><pre>
  62427. fhem&gt; notice list update
  62428. ==&gt; Language: de
  62429. ID Published Expired Confirmed Description
  62430. update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
  62431. ==&gt; Language: en
  62432. ID Published Expired Confirmed Description
  62433. update-20130128-001 actually never no short description
  62434. update-20130128-002 31.01.2013 01.02.2013 no short description
  62435. </pre></code></blockquote>
  62436. To display a single message, enter the command '<code>notice view &lt;id&gt;</code>' where <code>id</code>
  62437. is the Identifier of the message. You can use the optional parameter <code>noheader</code>
  62438. or the language codes <code>de</code> or <code>en</code> to display the message
  62439. without the header informations or in your prefered language if available.
  62440. <br>
  62441. Example:
  62442. <blockquote><code><pre>
  62443. fhem&gt; notice view advice-20130128-002 de
  62444. ID : advice-20130128-002
  62445. From : M. Fischer
  62446. Date : 28.01.2013
  62447. Expire : 0
  62448. Title : kurze beschreibung
  62449. ### Start of Text
  62450. test-advice
  62451. dies ist ein test
  62452. 001
  62453. ### End of Text
  62454. </pre></code></blockquote>
  62455. If it is necessary to confirm a message, this is be done by entering '<code>notice confirm &lt;id&gt; [value]</code>'.
  62456. The optional argument <code>value</code> will also be stored with the confirmation.
  62457. <br>
  62458. Example:
  62459. <blockquote><code><pre>
  62460. fhem&gt; notice confirm update-20130128-001 foo:bar
  62461. update-20130128-001 confirmed on 2013-01-29 20:58:57: foo:bar
  62462. </pre></code></blockquote>
  62463. Sometimes it is necessary to reset all confirmations. This is be done by entering
  62464. '<code>notice reset</code>'.
  62465. <br>
  62466. Example:
  62467. <blockquote><code><pre>
  62468. fhem&gt; notice reset
  62469. This command delete all confirmations.
  62470. If you really want to do this, call 'notice reset yes'
  62471. </pre></code></blockquote>
  62472. <br>
  62473. <strong>For developers only:</strong>
  62474. <br>
  62475. <br>
  62476. <code>notice [condition &lt;id&gt;|get &lt;keyword&gt; &lt;value&gt;|position &lt;id&gt;]</code><br>
  62477. <br>
  62478. <br>
  62479. These arguments are normally not needed by any user.
  62480. <br>
  62481. <br>
  62482. A message may optionally contains one or more code snippets. The argument <code>condition</code> supplies the determined
  62483. value(s) of the embedded test(s) as a key:value pair. If more than one pair returned, they they are seperated by <code>|</code>.
  62484. It is possible to define your own rules for a condition, like <code>!empty</code> or <code>&gt;>5</code> and so on. An example
  62485. of a condition is shown in the below example message file.
  62486. Example:
  62487. <blockquote><code><pre>
  62488. fhem&gt; notice condition update-20130127-001
  62489. configfile:./fhem.cfg|sendStatistics:never:!empty
  62490. </pre></code></blockquote>
  62491. The argument <code>get</code>, followed by a <code>keyword</code> and a number from 0 to 8, returns a
  62492. comma seperated list of message ids.
  62493. The possible outputs are:
  62494. <ul>
  62495. <li><code>0 returns a list of all messages.</code></li>
  62496. <li><code>1 returns a list of unconfirmed messages.</code></li>
  62497. <li><code>2 returns a list of messages that are not expired.</code></li>
  62498. <li><code>3 returns a list of messages that are not expired and unconfirmed.</code></li>
  62499. <li><code>4 returns a list of published messages.</code></li>
  62500. <li><code>5 returns a list of unconfirmed and published messages.</code></li>
  62501. <li><code>6 returns a list of published messages that are not expired.</code></li>
  62502. <li><code>7 returns a list of published, unconfirmed and not expired messages.</code></li>
  62503. <li><code>8 returns a list of confirmed messages.</code></li>
  62504. </ul>
  62505. Example:
  62506. <blockquote><code><pre>
  62507. fhem&gt; notice get all 2
  62508. advice-20130128-001,advice-20130128-002,update-20130128-001,update-20130128-002
  62509. </pre></code></blockquote>
  62510. The argument <code>position</code> followed by an <code>&lt;id&gt;</code> returns the view position of a message if defined.
  62511. <br>
  62512. Example:
  62513. <blockquote><code><pre>
  62514. fhem&gt; notice position update-20130128-001
  62515. before
  62516. </pre></code></blockquote>
  62517. Example of a message file:
  62518. <blockquote><code><pre>
  62519. # FROM: M. Fischer
  62520. # DATE: 28.01.2013
  62521. # CONFIRM: 1
  62522. # PUBLISH: 31.01.2013
  62523. # EXPIRE: 01.02.2013
  62524. # KEY_1: sendStatistics
  62525. # VAL_1: AttrVal("global","sendStatistics",undef);
  62526. # CON_1: !empty
  62527. # KEY_2: configfile
  62528. # VAL_2: AttrVal("global","configfile",undef);
  62529. # POSITION: top
  62530. # TITLE_DE: kurze beschreibung
  62531. # NOTICE_DE
  62532. Hinweis:
  62533. dies ist ein test
  62534. # TITLE_EN: short description
  62535. # NOTICE_EN
  62536. Advice:
  62537. this is a test
  62538. </pre></code></blockquote>
  62539. The keywords '<code>FROM, DATE, CONFIRM, PUBLISH, EXPIRE, TITLE_DE, TITLE_EN, NOTICE_DE, NOTICE_EN</code>' are fixed.
  62540. It is possible to add any key:value string to these files. Also it is possible to set only one or both keywords of
  62541. '<code>TITLE_DE, TITLE_EN</code>' and '<code>NOTICE_DE, NOTICE_EN</code>'.
  62542. </ul>
  62543. <a name="notify"></a>
  62544. <h3>notify</h3>
  62545. <ul>
  62546. <br>
  62547. <a name="notifydefine"></a>
  62548. <b>Define</b>
  62549. <ul>
  62550. <code>define &lt;name&gt; notify &lt;pattern&gt; &lt;command&gt;</code>
  62551. <br><br>
  62552. Execute a command when received an event for the <a
  62553. href="#define">definition</a> <code>&lt;pattern&gt;</code>. If
  62554. &lt;command&gt; is enclosed in {}, then it is a perl expression, if it is
  62555. enclosed in "", then it is a shell command, else it is a "plain" fhem.pl
  62556. command (chain). See the <a href="#trigger">trigger</a> command for
  62557. testing it.
  62558. Examples:
  62559. <ul>
  62560. <code>define b3lampV1 notify btn3 set lamp $EVENT</code><br>
  62561. <code>define b3lampV2 notify btn3 { fhem "set lamp $EVENT" }</code><br>
  62562. <code>define b3lampV3 notify btn3 "/usr/local/bin/setlamp "$EVENT""</code><br>
  62563. <code>define b3lampV3 notify btn3 set lamp1 $EVENT;;set lamp2 $EVENT</code><br>
  62564. <code>define wzMessLg notify wz:measured.* "/usr/local/bin/logfht $NAME "$EVENT""</code><br>
  62565. <code>define LogUndef notify global:UNDEFINED.* "send-me-mail.sh "$EVENT""</code><br>
  62566. </ul>
  62567. <br>
  62568. Notes:
  62569. <ul>
  62570. <li><code>&lt;pattern&gt;</code> is either the name of the triggering
  62571. device, or <code>devicename:event</code>.</li>
  62572. <li><code>&lt;pattern&gt;</code> must completely (!)
  62573. match either the device name, or the compound of the device name and
  62574. the event. To identify the events use the inform command from the
  62575. telnet prompt or the "Event Monitor" link in the browser
  62576. (FHEMWEB), and wait for the event to be printed. See also the
  62577. eventTypes device.</li>
  62578. <li>in the command section you can access the event:
  62579. <ul>
  62580. <li>The variable $EVENT will contain the complete event, e.g.
  62581. <code>measured-temp: 21.7 (Celsius)</code></li>
  62582. <li>$EVTPART0,$EVTPART1,$EVTPART2,etc contain the space separated event
  62583. parts (e.g. <code>$EVTPART0="measured-temp:", $EVTPART1="21.7",
  62584. $EVTPART2="(Celsius)"</code>. This data is available as a local
  62585. variable in perl, as environment variable for shell scripts, and will
  62586. be textually replaced for FHEM commands.</li>
  62587. <li>$NAME and $TYPE contain the name and type of the device triggering
  62588. the event, e.g. myFht and FHT</li>
  62589. </ul></li>
  62590. <li>Note: the following is deprecated and will be removed in a future
  62591. release. It is only active for featurelevel up to 5.6.
  62592. The described replacement is attempted if none of the above
  62593. variables ($NAME/$EVENT/etc) found in the command.
  62594. <ul>
  62595. <li>The character <code>%</code> will be replaced with the received
  62596. event, e.g. with <code>on</code> or <code>off</code> or
  62597. <code>measured-temp: 21.7 (Celsius)</code><br> It is advisable to put
  62598. the <code>%</code> into double quotes, else the shell may get a syntax
  62599. error.</li>
  62600. <li>The character @ will be replaced with the device
  62601. name.</li>
  62602. <li>To use % or @ in the text itself, use the double mode (%% or
  62603. @@).</li>
  62604. <li>Instead of % and @, the parameters %EVENT (same as %), %NAME (same
  62605. as @) and %TYPE (contains the device type,
  62606. e.g. FHT) can be used. The space separated event "parts"
  62607. are available as %EVTPART0, %EVTPART1, etc. A single %
  62608. looses its special meaning if any of these parameters appears in the
  62609. definition.</li>
  62610. </ul></li>
  62611. <li>Following special events will be generated for the device "global"
  62612. <ul>
  62613. <li>INITIALIZED after initialization is finished.</li>
  62614. <li>REREADCFG after the configuration is reread.</li>
  62615. <li>SAVE before the configuration is saved.</li>
  62616. <li>SHUTDOWN before FHEM is shut down.</li>
  62617. <li>DEFINED &lt;devname&gt; after a device is defined.</li>
  62618. <li>DELETED &lt;devname&gt; after a device was deleted.</li>
  62619. <li>RENAMED &lt;old&gt; &lt;new&gt; after a device was renamed.</li>
  62620. <li>UNDEFINED &lt;defspec&gt; upon reception of a message for an
  62621. undefined device.</li>
  62622. </ul></li>
  62623. <li>Notify can be used to store macros for manual execution. Use the <a
  62624. href="#trigger">trigger</a> command to execute the macro.
  62625. E.g.<br>
  62626. <code>fhem> define MyMacro notify MyMacro { Log 1, "Hello"}</code><br>
  62627. <code>fhem> trigger MyMacro</code><br>
  62628. </li>
  62629. </ul>
  62630. </ul>
  62631. <br>
  62632. <a name="notifyset"></a>
  62633. <b>Set </b>
  62634. <ul>
  62635. <li>addRegexpPart &lt;device&gt; &lt;regexp&gt;<br>
  62636. add a regexp part, which is constructed as device:regexp. The parts
  62637. are separated by |. Note: as the regexp parts are resorted, manually
  62638. constructed regexps may become invalid. </li>
  62639. <li>removeRegexpPart &lt;re&gt;<br>
  62640. remove a regexp part. Note: as the regexp parts are resorted, manually
  62641. constructed regexps may become invalid.<br>
  62642. The inconsistency in addRegexpPart/removeRegexPart arguments originates
  62643. from the reusage of javascript functions.</li>
  62644. <li>inactive<br>
  62645. Inactivates the current device. Note the slight difference to the
  62646. disable attribute: using set inactive the state is automatically saved
  62647. to the statefile on shutdown, there is no explicit save necesary.<br>
  62648. This command is intended to be used by scripts to temporarily
  62649. deactivate the notify.<br>
  62650. The concurrent setting of the disable attribute is not recommended.</li>
  62651. <li>active<br>
  62652. Activates the current device (see inactive).</li>
  62653. </ul>
  62654. <br>
  62655. <a name="notifyget"></a>
  62656. <b>Get</b> <ul>N/A</ul><br>
  62657. <a name="notifyattr"></a>
  62658. <b>Attributes</b>
  62659. <ul>
  62660. <li><a href="#disable">disable</a></li>
  62661. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  62662. <a name="addStateEvent"></a>
  62663. <li>addStateEvent<br>
  62664. The event associated with the state Reading is special, as the "state: "
  62665. string is stripped, i.e $EVENT is not "state: on" but just "on". In some
  62666. circumstances it is desireable to get the event without "state: "
  62667. stripped. In such a case the addStateEvent attribute should be set to 1
  62668. (default is 0, i.e. strip the "state: " string).<br>
  62669. Note 1: you have to set this attribute for the event "receiver", i.e.
  62670. notify, FileLog, etc.<br>
  62671. Note 2: this attribute will only work for events generated by devices
  62672. supporting the <a href="#readingFnAttributes">readingFnAttributes</a>.
  62673. </li>
  62674. <a name="forwardReturnValue"></a>
  62675. <li>forwardReturnValue<br>
  62676. Forward the return value of the executed command to the caller,
  62677. default is disabled (0). If enabled (1), then e.g. a set command which
  62678. triggers this notify will also return this value. This can cause e.g
  62679. FHEMWEB to display this value, when clicking "on" or "off", which is
  62680. often not intended.</li>
  62681. <a name="readLog"></a>
  62682. <li>readLog<br>
  62683. Execute the notify for messages appearing in the FHEM Log. The device
  62684. in this case is set to the notify itself, e.g. checking for the startup
  62685. message looks like:
  62686. <ul><code>
  62687. define n notify n:.*Server.started.* { Log 1, "Really" }<br>
  62688. attr n readLog
  62689. </code></ul>
  62690. </li>
  62691. <a name="perlSyntaxCheck"></a>
  62692. <li>perlSyntaxCheck<br>
  62693. by setting the <b>global</b> attribute perlSyntaxCheck, a syntax check
  62694. will be executed upon definition or modification, if the command is
  62695. perl and FHEM is already started.
  62696. </li>
  62697. </ul>
  62698. <br>
  62699. </ul>
  62700. <a name="panStamp"></a>
  62701. <h3>panStamp</h3>
  62702. <ul>
  62703. The panStamp is a family of RF devices sold by <a href="http://www.panstamp.com">panstamp.com</a>.
  62704. It is possible to attach more than one device in order to get better
  62705. reception, fhem will filter out duplicate messages.<br><br>
  62706. This module provides the IODevice for the <a href="#SWAP">SWAP</a> modules that implement the SWAP protocoll
  62707. to communicate with the individual moths in a panStamp network.<br><br>
  62708. Note: currently only panSticks are know to work. The panStamp shield for a Rasperry Pi is untested.
  62709. <br><br>
  62710. Note: this module may require the Device::SerialPort or Win32::SerialPort
  62711. module if you attach the device via USB and the OS sets strange default
  62712. parameters for serial devices.
  62713. <br><br>
  62714. <a name="panStamp_Define"></a>
  62715. <b>Define</b>
  62716. <ul>
  62717. <code>define &lt;name&gt; panStamp &lt;device&gt; [&lt;address&gt; [&lt;channel&gt; [&lt;syncword&gt;]]]</code> <br>
  62718. <br>
  62719. USB-connected devices:<br><ul>
  62720. &lt;device&gt; specifies the serial port to communicate with the panStamp.
  62721. The name of the serial-device depends on your distribution, under
  62722. linux the cdc_acm kernel module is responsible, and usually a
  62723. /dev/ttyACM0 device will be created. If your distribution does not have a
  62724. cdc_acm module, you can force usbserial to handle the panStamp by the
  62725. following command:<ul>modprobe usbserial vendor=0x0403
  62726. product=0x6001</ul>In this case the device is most probably
  62727. /dev/ttyUSB0.<br><br>
  62728. You can also specify a baudrate if the device name contains the @
  62729. character, e.g.: /dev/ttyACM0@38400<br><br>
  62730. If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
  62731. perl module Device::SerialPort is not needed, and fhem opens the device
  62732. with simple file io. This might work if the operating system uses sane
  62733. defaults for the serial parameters, e.g. some Linux distributions and
  62734. OSX. <br><br>
  62735. </ul>
  62736. <br>
  62737. The address is a 2 digit hex number to identify the moth in the panStamp network. The default is 01.<br>
  62738. The channel is a 2 digit hex number to define the channel. the default is 00.<br>
  62739. The syncword is a 4 digit hex number to identify the panStamp network. The default is B547.<br><br>
  62740. Uppon initialization a broadcast message is send to the panStamp network to try to
  62741. autodetect and autocreate all listening SWAP devices (i.e. all devices not in power down mode).
  62742. </ul>
  62743. <br>
  62744. <a name="panStamp_Set"></a>
  62745. <b>Set</b>
  62746. <ul>
  62747. <li>raw data<br>
  62748. send raw data to the panStamp to be transmitted over the RF link.
  62749. </li><br>
  62750. </ul>
  62751. <a name="panStamp_Get"></a>
  62752. <b>Get</b>
  62753. <ul>
  62754. </ul>
  62755. <a name="panStamp_Attr"></a>
  62756. <b>Attributes</b>
  62757. <ul>
  62758. </ul>
  62759. <br>
  62760. </ul>
  62761. <a name="pilight"></a>
  62762. <h3>pilight</h3>
  62763. <ul>
  62764. <a name="pilight_define"></a>
  62765. <h4>Define</h4>
  62766. <ul>
  62767. <code>define &lt;name&gt; pilight &lt;protocol&gt;</code>
  62768. <br/>
  62769. <br/>
  62770. Defines a module for setting pilight compartible switches on or off. See <a href="http://www.sweetpi.de/blog/258/funksteckdosen-mit-dem-raspberry-pi-und-pilight-schalten">Sweetpi</a>.<br><br>
  62771. Supported protocols: kaku_switch, quigg_*, elro_he, elro_hc, silvercrest, pollin, brennenstuhl, mumbi, impuls, rsl366, rev1_switch, rev2_switch, clarus_switch, raw, and intertechno_old. If you need more, just write an issue!<br/><br/>
  62772. Example:
  62773. <ul>
  62774. <code>define Weihnachtsbaum pilight kaku_switch</code><br>
  62775. <code>attr Weihnachtsbaum housecode 12323578</code><br>
  62776. <code>attr Weihnachtsbaum unitcode 0</code><br>
  62777. </ul>
  62778. <br/>
  62779. If your pilight server does not run on localhost, please set both the attributes <b>remote_ip</b> and <b>remote_port</b>. If you are running pilight >3.0, then please <b>define the port used by pilight</b> settings: http://www.pilight.org/getting-started/settings/; fhem-plight uses 5000 by default.
  62780. <br/>
  62781. <b>This version is written for pilight 6.0. If you run a prior version, please set the following attribute:</b>
  62782. <code> attr Weihnachtsbaum useOldVersion 1</code>
  62783. </ul>
  62784. <a name="pilight_Attr"></a>
  62785. <h4>Attributes</h4>
  62786. <ul>
  62787. <li><a name="protocol"><code>attr &lt;name&gt; protocol &lt;string&gt;</code></a>
  62788. <br />Protocol used in pilight, e.g. "kaku_switch"</li>
  62789. <li><a name="housecode"><code>attr &lt;name&gt; housecode &lt;string&gt;</code></a>
  62790. <br />Housecode used in pilight (for protocol kaku*, clarus_switch, rev1_switch, rev2_switch, rev3_switch, quigg_switch, quigg_gt1000, quigg_gt7000)</li>
  62791. <li><a name="systemcode"><code>attr &lt;name&gt; systemcode &lt;string&gt;</code></a>
  62792. <br />Systemcode of your switch (for protocol elso, elro_he, elro_hc, silvercrest, impuls, rsl366, pollin, mumbi, brennenstuhl, intertechno_old)</li>
  62793. <li><a name="unitcode"><code>attr &lt;name&gt; unitcode &lt;string&gt;</code></a>
  62794. <br />Unit code/device code used in pilight (all protocols)</li>
  62795. <li><a name="rawCodeOn/rawCodeOff"><code>attr &lt;name&gt; rawCode &lt;string&gt;</code></a>
  62796. <br />Raw code to send on/off-command with protocol "raw"</li>
  62797. <li><a name="remote_ip"><code>attr &lt;name&gt; remote_ip &lt;string&gt;</code></a>
  62798. <br />Remote IP of you pilight server (127.0.0.1 is default)</li>
  62799. <li><a name="remote_port"><code>attr &lt;name&gt; remote_port &lt;string&gt;</code></a>
  62800. <br />Remote port of you pilight server (5000 is default)</li>
  62801. <li><a name="rawCodeOn"><code>attr &lt;name&gt; rawCodeOn &lt;string&gt;</code></a>
  62802. <br />Raw command to send to switch device ON (only used with protocol 'raw')</li>
  62803. <li><a name="rawCodeOff"><code>attr &lt;name&gt; rawCodeOff &lt;string&gt;</code></a>
  62804. <br />Raw command to send to switch device OFF (only used with protocol 'raw')</li>
  62805. </ul>
  62806. </ul>
  62807. <a name="pilight_contact"></a>
  62808. <h3>pilight_contact</h3>
  62809. <ul>
  62810. pilight_contact represents a contact sensor receiving data from pilight<br>
  62811. You have to define the base device pilight_ctrl first.<br>
  62812. Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
  62813. <br>
  62814. <a name="pilight_contact_define"></a>
  62815. <b>Define</b>
  62816. <ul>
  62817. <code>define &lt;name&gt; pilight_contact protocol id [unit]</code>
  62818. <br><br>
  62819. Example:
  62820. <ul>
  62821. <code>define myctrl pilight_contact arctech_contact 12836682 1</code><br>
  62822. </ul>
  62823. </ul>
  62824. <br>
  62825. <a name="pilight_contact_readings"></a>
  62826. <p><b>Readings</b></p>
  62827. <ul>
  62828. <li>
  62829. state<br>
  62830. present the current state (open|closed)
  62831. </li>
  62832. </ul>
  62833. </ul>
  62834. <a name="pilight_ctrl"></a>
  62835. <h3>pilight_ctrl</h3>
  62836. <ul>
  62837. pilight_ctrl is the base device for the communication (sending and receiving) with the pilight-daemon.<br>
  62838. You have to define client devices e.q. pilight_switch for switches.<br>
  62839. Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br><br>
  62840. Further information to pilight protocols: <a href="http://wiki.pilight.org/doku.php/protocols#protocols">http://wiki.pilight.org/doku.php/protocols#protocols</a><br>
  62841. Currently supported: <br>
  62842. <ul>
  62843. <li>Switches:</li>
  62844. <li>Dimmers:</li>
  62845. <li>Temperature and humitity sensors</li>
  62846. </ul>
  62847. <br><br>
  62848. <a name="pilight_ctrl_define"></a>
  62849. <b>Define</b>
  62850. <ul>
  62851. <code>define &lt;name&gt; pilight_ctrl ip:port [api]</code>
  62852. ip:port is the IP address and port of the pilight-daemon<br>
  62853. api specifies the pilight api version - default 6.0<br>
  62854. <br>
  62855. Example:
  62856. <ul>
  62857. <code>define myctrl pilight_ctrl localhost:5000 5.0</code><br>
  62858. <code>define myctrl pilight_ctrl 192.168.1.1:5000</code><br>
  62859. </ul>
  62860. </ul>
  62861. <br>
  62862. <a name="pilight_ctrl_set"></a>
  62863. <p><b>Set</b></p>
  62864. <ul>
  62865. <li><b>reset</b> Reset the connection to the pilight daemon</li>
  62866. <li><b>disconnect</b>Diconnect from pilight daemon and do not reconnect automatically</li>
  62867. </ul>
  62868. <br>
  62869. <a name="pilight_ctrl_readings"></a>
  62870. <p><b>Readings</b></p>
  62871. <ul>
  62872. <li>
  62873. rcv_raw<br>
  62874. The last complete received message in json format.
  62875. </li>
  62876. </ul>
  62877. <br>
  62878. <a name="pilight_ctrl_attr"></a>
  62879. <b>Attributes</b>
  62880. <ul>
  62881. <li><a name="ignoreProtocol">ignoreProtocol</a><br>
  62882. Comma separated list of protocol:id combinations to ignore.<br>
  62883. protocol:* ignores the complete protocol.<br>
  62884. * All incomming messages will be ignored. Only protocol id combinations from defined submodules will be accepted<br>
  62885. Example:
  62886. <li><code>ignoreProtocol tfa:0</code></li>
  62887. <li><code>ignoreProtocol tfa:*</code></li>
  62888. <li><code>ignoreProtocol *</code></li>
  62889. </li>
  62890. <li><a name="brands">brands</a><br>
  62891. Comma separated list of <search>:<replace> combinations to rename protocol names. <br>
  62892. pilight uses different protocol names for the same protocol e.q. arctech_switch and kaku_switch<br>
  62893. Example: <code>brands archtech:kaku</code>
  62894. </li>
  62895. <li><a name="ContactAsSwitch">ContactAsSwitch</a><br>
  62896. Comma separated list of ids which correspond to a contact but will be interpreted as switch. <br>
  62897. In this case opened will be interpreted as on and closed as off.<br>
  62898. Example: <code>ContactAsSwitch 12345</code>
  62899. </li>
  62900. <li><a name="SendTimeout">SendTimeout</a><br>
  62901. Timeout [s] for aborting sending commands (non blocking) - default 1s
  62902. </li>
  62903. </ul>
  62904. <br>
  62905. </ul>
  62906. <a name="pilight_dimmer"></a>
  62907. <h3>pilight_dimmer</h3>
  62908. <ul>
  62909. pilight_dimmer represents a dimmmer controled with\from pilight<br>
  62910. You have to define the base device pilight_ctrl first.<br>
  62911. Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
  62912. Supported dimmers: <a href="http://wiki.pilight.org/doku.php/protocols#dimmers">http://wiki.pilight.org/doku.php/protocols#dimmers</a><br>
  62913. <br>
  62914. It is possible to add the screen feature to a dimmer. So you can change the dimlevel by set 'up' or 'down'.<br>
  62915. If you push up or down on the remote control the dimlevel will be changed by dimlevel_step.<br>
  62916. Further it is possible to define a simulated dimmer with a screen and switch protocol. See example three.<br>
  62917. That means if you change the dimlevel a up or down command will be send n times to dim the device instead of send a dimlevel directly.<br>
  62918. <br>
  62919. <a name="pilight_dimmer_define"></a>
  62920. <b>Define</b>
  62921. <ul>
  62922. <code>define &lt;name&gt; pilight_dimmer protocol id unit [protocol]</code>
  62923. <br>The second protocol is optional. With it you can add the pilight screen feature (up|down)
  62924. Example:
  62925. <ul>
  62926. <code>define myctrl pilight_dimmer kaku_dimmer 13483668 0</code><br>
  62927. <code>define myctrl pilight_dimmer kaku_dimmer 13483668 0 kaku_screen</code> - Dimmer with screen feature<br>
  62928. <code>define myctrl pilight_dimmer quigg_screen 1 0 quigg_gt7000</code> - Simulated dimmer with screen feature<br>
  62929. </ul>
  62930. </ul>
  62931. <br>
  62932. <a name="pilight_dimmer_set"></a>
  62933. <p><b>Set</b></p>
  62934. <ul>
  62935. <li>
  62936. <b>on</b>
  62937. </li>
  62938. <li>
  62939. <b>off</b>
  62940. </li>
  62941. <li>
  62942. <b>up</b> only if defined with screen protocol
  62943. </li>
  62944. <li>
  62945. <b>down</b> only if defined with screen protocol
  62946. </li>
  62947. <li>
  62948. <b>dimlevel</b>
  62949. </li>
  62950. <li>
  62951. <a href="#setExtensions">set extensions</a> are supported<br>
  62952. </li>
  62953. </ul>
  62954. <br>
  62955. <a name="pilight_dimmer_readings"></a>
  62956. <p><b>Readings</b></p>
  62957. <ul>
  62958. <li>
  62959. state<br>
  62960. state of the dimmer on or off
  62961. </li>
  62962. <li>
  62963. dimlevel<br>
  62964. dimlevel of the dimmer
  62965. </li>
  62966. </ul>
  62967. <br>
  62968. <a name="pilight_dimmer_attr"></a>
  62969. <b>Attributes</b>
  62970. <ul>
  62971. <li><a name="dimlevel_max_device">dimlevel_max_device</a><br>
  62972. Maximum of the dimlevel of the device - default 15<br>
  62973. Have to be less or equal than dimlevel_max<br>
  62974. </li>
  62975. <li><a name="dimlevel_max">dimlevel_max</a><br>
  62976. Maximum of the dimlevel in FHEM - default dimlevel_max_device<br>
  62977. </li>
  62978. <li><a name="dimlevel_step">dimlevel_step</a><br>
  62979. Step of the dimlevel - default 1<br>
  62980. </li>
  62981. <li><a name="dimlevel_on">dimlevel_on</a><br>
  62982. Change dimlevel to value if on set - default no changing<br>
  62983. Could be a numeric value or dimlevel_max<br>
  62984. </li>
  62985. <li><a name="dimlevel_off">dimlevel_off</a><br>
  62986. Change dimlevel to value if off set - default no changing<br>
  62987. </li>
  62988. </ul>
  62989. <br>
  62990. </ul>
  62991. <a name="pilight_raw"></a>
  62992. <h3>pilight_raw</h3>
  62993. <ul>
  62994. With pilight_raw it si possible to send raw codes<br>
  62995. You have to define the base device pilight_ctrl first.<br>
  62996. <br>
  62997. <a name="pilight_raw_define"></a>
  62998. <b>Define</b>
  62999. <ul>
  63000. <code>define &lt;name&gt; pilight_raw</code>
  63001. </ul>
  63002. <br>
  63003. <a name="pilight_raw_set"></a>
  63004. <p><b>Set</b></p>
  63005. <ul>
  63006. <li>
  63007. <b>on</b>
  63008. Send 'onCode' as raw code
  63009. </li>
  63010. <li>
  63011. <b>off</b>
  63012. Send 'offCode' as raw code
  63013. </li>
  63014. <li>
  63015. <b>code <value></b>
  63016. Send <value> as raw code
  63017. </li>
  63018. <li>
  63019. <a href="#setExtensions">set extensions</a> are supported<br>
  63020. </li>
  63021. </ul>
  63022. <br>
  63023. <a name="pilight_raw_readings"></a>
  63024. <p><b>Readings</b></p>
  63025. <ul>
  63026. <li>
  63027. state<br>
  63028. state on or off
  63029. </li>
  63030. </ul>
  63031. <br>
  63032. <a name="pilight_raw_attr"></a>
  63033. <b>Attributes</b>
  63034. <ul>
  63035. <li><a name="onCode">onCode</a><br>
  63036. raw code for state on
  63037. </li>
  63038. <li><a name="offCode">onCode</a><br>
  63039. raw code for state off
  63040. </li>
  63041. <li>
  63042. sendCount<br>
  63043. How many times the command is send. Default: 1
  63044. </li>
  63045. </ul>
  63046. </ul>
  63047. <a name="pilight_smoke"></a>
  63048. <h3>pilight_smoke</h3>
  63049. <ul>
  63050. pilight_smoke represents a smoke sensor receiving data from pilight<br>
  63051. You have to define the base device pilight_ctrl first.<br>
  63052. Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
  63053. <br>
  63054. <a name="pilight_smoke_define"></a>
  63055. <b>Define</b>
  63056. <ul>
  63057. <code>define &lt;name&gt; pilight_smoke protocol id</code>
  63058. <br><br>
  63059. Example:
  63060. <ul>
  63061. <code>define myctrl pilight_smoke secudo_smoke_sensor 0</code><br>
  63062. </ul>
  63063. </ul>
  63064. <br>
  63065. <a name="pilight_smoke_readings"></a>
  63066. <p><b>Readings</b></p>
  63067. <ul>
  63068. <li>
  63069. state<br>
  63070. present the current state (alarm|none)
  63071. </li>
  63072. </ul>
  63073. <br>
  63074. <a name="pilight_smoke_attr"></a>
  63075. <b>Attributes</b>
  63076. <ul>
  63077. <li><a name="resetTime">resetTime</a><br>
  63078. Time [sec] to reset the state to none.
  63079. </li>
  63080. </ul>
  63081. </ul>
  63082. <a name="pilight_switch"></a>
  63083. <h3>pilight_switch</h3>
  63084. <ul>
  63085. pilight_switch represents a switch controled with\from pilight<br>
  63086. You have to define the base device pilight_ctrl first.<br>
  63087. Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
  63088. Supported switches: <a href="http://wiki.pilight.org/doku.php/protocols#switches">http://wiki.pilight.org/doku.php/protocols#switches</a><br>
  63089. <br>
  63090. <a name="pilight_switch_define"></a>
  63091. <b>Define</b>
  63092. <ul>
  63093. <code>define &lt;name&gt; pilight_switch protocol id unit</code>
  63094. <br><br>
  63095. Example:
  63096. <ul>
  63097. <code>define myctrl pilight_switch kaku_switch_old 0 0</code><br>
  63098. </ul>
  63099. </ul>
  63100. <br>
  63101. <a name="pilight_switch_set"></a>
  63102. <p><b>Set</b></p>
  63103. <ul>
  63104. <li>
  63105. <b>on</b>
  63106. </li>
  63107. <li>
  63108. <b>off</b>
  63109. </li>
  63110. <li>
  63111. <a href="#setExtensions">set extensions</a> are supported<br>
  63112. </li>
  63113. </ul>
  63114. <br>
  63115. <a name="pilight_switch_readings"></a>
  63116. <p><b>Readings</b></p>
  63117. <ul>
  63118. <li>
  63119. state<br>
  63120. state of the switch on or off
  63121. </li>
  63122. </ul>
  63123. <a name="pilight_switch_attr"></a>
  63124. <b>Attributs</b>
  63125. <ul>
  63126. <li>
  63127. IODev<br>
  63128. </li>
  63129. <li>
  63130. sendCount<br>
  63131. How many times the command is send. Default: 1
  63132. </li>
  63133. </ul>
  63134. <br>
  63135. </ul>
  63136. <a name="pilight_temp"></a>
  63137. <h3>pilight_temp</h3>
  63138. <ul>
  63139. pilight_temp represents a temperature and humidity sensor receiving data from pilight<br>
  63140. You have to define the base device pilight_ctrl first.<br>
  63141. Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
  63142. Supported Sensors: <a href="http://wiki.pilight.org/doku.php/protocols#switches">http://wiki.pilight.org/doku.php/protocols#weather_stations</a><br>
  63143. <br>
  63144. <a name="pilight_temp_define"></a>
  63145. <b>Define</b>
  63146. <ul>
  63147. <code>define &lt;name&gt; pilight_temp protocol id</code>
  63148. <br><br>
  63149. Example:
  63150. <ul>
  63151. <code>define myctrl pilight_temp alecto_wsd17 100</code><br>
  63152. </ul>
  63153. </ul>
  63154. <br>
  63155. <a name="pilight_temp_readings"></a>
  63156. <p><b>Readings</b></p>
  63157. <ul>
  63158. <li>
  63159. state<br>
  63160. present the current temperature
  63161. </li>
  63162. <li>
  63163. temperature<br>
  63164. present the current temperature
  63165. </li>
  63166. <li>
  63167. humidity<br>
  63168. present the current humidity (if sensor support it)
  63169. </li>
  63170. <li>
  63171. battery<br>
  63172. present the battery state of the senor (if sensor support it)
  63173. </li>
  63174. <li>
  63175. pressure<br>
  63176. present the pressure state of the senor (if sensor support it)
  63177. </li>
  63178. <li>
  63179. windavg<br>
  63180. present the average wind speed state of the senor (if sensor support it)
  63181. </li>
  63182. <li>
  63183. winddir<br>
  63184. present the wind direction state of the senor (if sensor support it)
  63185. </li>
  63186. <li>
  63187. windgust<br>
  63188. present the wind gust state of the senor (if sensor support it)
  63189. </li>
  63190. </ul>
  63191. <br>
  63192. <a name="pilight_temp_attr"></a>
  63193. <b>Attributes</b>
  63194. <ul>
  63195. <li><a name="corrTemp">corrTemp</a><br>
  63196. A factor (e.q. 0.1) to correct the temperture value. Default: 1
  63197. temperature = corrTemp * piligt_temp + offsetTemp
  63198. </li>
  63199. <li><a name="offsetTemp">offsetTemp</a><br>
  63200. An offset for temperature value. Default: 0
  63201. temperature = corrTemp * piligt_temp + offsetTemp
  63202. </li>
  63203. <li><a name="corrHumidity">corrHumidity</a><br>
  63204. A factor (e.q. 0.1) to correct the humidity value. Default: 1
  63205. humidity = corrHumidity * piligt_humidity + offsetHumidity
  63206. </li>
  63207. <li><a name="offsetHumidity">offsetHumidity</a><br>
  63208. An offset for humidity value. Default: 0
  63209. humidity = corrHumidity * piligt_humidity + offsetHumidity
  63210. </li>
  63211. </ul>
  63212. </ul>
  63213. <a name="ping"></a>
  63214. <h3>ping</h3>
  63215. <ul>
  63216. <p>This module provides a simple "ping" function for testing the state of a remote network device.</p>
  63217. <p>It allows for alerts to be triggered when devices cannot be reached using a notify function.</p>
  63218. <a name="ping_define"></a>
  63219. <p><b>Define</b></p>
  63220. <ul>
  63221. <p><code>define &lt;name&gt; ping &lt;host/ip&gt; &lt;mode&gt; &lt;timeout&gt;</code></p>
  63222. <p>Specifies the ping device.<br/>
  63223. &lt;host/ip&gt; is the hostname or IP address of the Bridge.</p>
  63224. <p>Specifies ping mode.<br/>
  63225. &lt;mode&gt; One of: tcp|udp|icmp. Read the perl docs for more detail: http://perldoc.perl.org/Net/Ping.html</p>
  63226. <p>Timeout.<br/>
  63227. &lt;timeout&gt; is the maximum time to wait for each ping.</p>
  63228. </ul>
  63229. <a name="ping_readings"></a>
  63230. <p><b>Readings</b></p>
  63231. <ul>
  63232. <li>
  63233. <b>state</b><br/>
  63234. [Initialized|ok|unreachable]: Shows reachable status check every 10 (checkInterval) seconds.
  63235. </li>
  63236. </ul>
  63237. <a name="ping_attr"></a>
  63238. <p><b>Attributes</b></p>
  63239. <ul>
  63240. <li>
  63241. <b>checkInterval</b><br/>
  63242. Default: 10s. Time after the bridge connection is re-checked.
  63243. </li>
  63244. <li>
  63245. <b>minFailCount</b><br/>
  63246. Default: 1. Number of failures before reporting "unreachable".
  63247. </li>
  63248. </ul>
  63249. </ul>
  63250. <a name="plex"></a>
  63251. <h3>plex</h3>
  63252. <ul>
  63253. This module allows you to control and receive events from plex.<br><br>
  63254. <br><br>
  63255. Notes:
  63256. <ul>
  63257. <li>IO::Socket::Multicast is needed to use server and client autodiscovery.</li>
  63258. <li>As far as possible alle get and set commands are non-blocking.
  63259. Any output is displayed asynchronous and is using fhemweb popup windows.</li>
  63260. </ul>
  63261. <br><br>
  63262. <a name="plex_Define"></a>
  63263. <b>Define</b>
  63264. <ul>
  63265. <code>define &lt;name&gt; plex [&lt;server&gt;]</code>
  63266. <br><br>
  63267. </ul>
  63268. <a name="plex_Set"></a>
  63269. <b>Set</b>
  63270. <ul>
  63271. <li>play [&lt;server&gt; [&lt;item&gt;]]<br>
  63272. </li>
  63273. <li>resume [&lt;server&gt;] &lt;item&gt;]<br>
  63274. </li>
  63275. <li>pause [&lt;type&gt;]</li>
  63276. <li>stop [&lt;type&gt;]</li>
  63277. <li>skipNext [&lt;type&gt;]</li>
  63278. <li>skipPrevious [&lt;type&gt;]</li>
  63279. <li>stepBack [&lt;type&gt;]</li>
  63280. <li>stepForward [&lt;type&gt;]</li>
  63281. <li>seekTo &lt;value&gt; [&lt;type&gt;]</li>
  63282. <li>volume &lt;value&gt; [&lt;type&gt;]</li>
  63283. <li>shuffle 0|1 [&lt;type&gt;]</li>
  63284. <li>repeat 0|1|2 [&lt;type&gt;]</li>
  63285. <li>mirror [&lt;server&gt;] &lt;item&gt;<br>
  63286. show preplay screen for &lt;item&gt;</li>
  63287. <li>home</li>
  63288. <li>music</li>
  63289. <li>showAccount<br>
  63290. display obfuscated user and password in cleartext</li>
  63291. <li>playlistCreate [&lt;server&gt;] &lt;name&gt;</li>
  63292. <li>playlistAdd [&lt;server&gt;] &lt;key&gt; &lt;keys&gt;</li>
  63293. <li>playlistRemove [&lt;server&gt;] &lt;key&gt; &lt;keys&gt;</li>
  63294. <li>unwatched [[&lt;server&gt;] &lt;items&gt;]</li>
  63295. <li>watched [[&lt;server&gt;] &lt;items&gt;]</li>
  63296. <li>autocreate &lt;machineIdentifier&gt;<br>
  63297. create device for remote/shared server</li>
  63298. </ul><br>
  63299. <a name="plex_Get"></a>
  63300. <b>Get</b>
  63301. <ul>
  63302. <li>[&lt;server&gt;] ls [&lt;path&gt;]<br>
  63303. browse the media library. eg:<br><br>
  63304. <b><code>get &lt;plex&gt; ls</code></b>
  63305. <pre> Plex Library
  63306. key type title
  63307. 1 artist Musik
  63308. 2 ...</pre><br>
  63309. <b><code>get &lt;plex&gt; ls /1</code></b>
  63310. <pre> Musik
  63311. key type title
  63312. all All Artists
  63313. albums By Album
  63314. collection By Collection
  63315. decade By Decade
  63316. folder By Folder
  63317. genre By Genre
  63318. year By Year
  63319. recentlyAdded Recently Added
  63320. search?type=9 Search Albums...
  63321. search?type=8 Search Artists...
  63322. search?type=10 Search Tracks...</pre><br>
  63323. <b><code>get &lt;plex&gt; ls /1/albums</code></b>
  63324. <pre> Musik ; By Album
  63325. key type title
  63326. /library/metadata/133999/children album ...
  63327. /library/metadata/134207/children album ...
  63328. /library/metadata/168437/children album ...
  63329. /library/metadata/82906/children album ...
  63330. ...</pre><br>
  63331. <b><code>get &lt;plex&gt; ls /library/metadata/133999/children</code></b>
  63332. <pre> ...</pre><br>
  63333. <br>if used from fhemweb album art can be displayed and keys and other items are klickable.<br><br>
  63334. </li>
  63335. <li>[&lt;server&gt;] search &lt;keywords&gt;<br>
  63336. search the media library for items that match &lt;keywords&gt;</li>
  63337. <li>[&lt;server&gt;] onDeck<br>
  63338. list the global onDeck items</li>
  63339. <li>[&lt;server&gt;] recentlyAdded<br>
  63340. list the global recentlyAdded items</li>
  63341. <li>[&lt;server&gt;] detail &lt;key&gt;<br>
  63342. show detail information for media item &lt;key&gt;</li>
  63343. <li>[&lt;server&gt;] playlists<br>
  63344. list playlists</li>
  63345. <li>[&lt;server&gt;] m3u [album]<br>
  63346. creates an album playlist in m3u format. can be used with other players like sonos.</li>
  63347. <li>[&lt;server&gt;] pls [album]<br>
  63348. creates an album playlist in pls format. can be used with other players like sonos.</li>
  63349. <li>clients<br>
  63350. list the known clients</li>
  63351. <li>servers<br>
  63352. list the known servers</li>
  63353. <li>pin<br>
  63354. get a pin for authentication at <a href="https://plex.tv/pin">https://plex.tv/pin</a></li>
  63355. </ul><br>
  63356. <a name="plex_Attr"></a>
  63357. <b>Attr</b>
  63358. <ul>
  63359. <li>httpPort</li>
  63360. <li>ignoredClients</li>
  63361. <li>ignoredServers</li>
  63362. <li>removeUnusedReadings</li>
  63363. <li>user</li>
  63364. <li>password<br>
  63365. user and password of a myPlex account. required if plex home is used. both are stored obfuscated</li>
  63366. </ul>
  63367. </ul><br>
  63368. <a name="powerMap"></a>
  63369. <h3>powerMap</h3>
  63370. (en | <a href="commandref_DE.html#powerMap">de</a>)
  63371. <div>
  63372. <ul>
  63373. powerMap will help to determine current power consumption and calculates
  63374. energy consumption either when power changes or within regular interval.<br>
  63375. These new values may be used to collect energy consumption for devices w/o
  63376. power meter (e.g. fridge, lighting or FHEM server) and for further processing
  63377. using module <a href="#ElectricityCalculator">ElectricityCalculator</a>.
  63378. <br>
  63379. <a name="powerMapdefine"></a>
  63380. <b>Define</b>
  63381. <ul>
  63382. <code>define &lt;name&gt; powerMap</code><br>
  63383. You may only define one single instance of powerMap.
  63384. </ul><br>
  63385. <a name="powerMapset"></a>
  63386. <b>Set</b>
  63387. <ul>
  63388. <li>
  63389. <code>assign <a href="#devspec">&lt;devspec&gt;</a></code><br>
  63390. Adds pre-defined powerMap attributes to one or more devices
  63391. for further customization.
  63392. </li>
  63393. </ul><br>
  63394. <a name="powerMapget"></a>
  63395. <b>Get</b>
  63396. <ul>
  63397. <li>
  63398. <code>devices</code><br>
  63399. Lists all devices having set an attribute named 'powerMap'.
  63400. </li>
  63401. </ul><br>
  63402. <a name="powerMapreadings"></a>
  63403. <b>Readings</b><br>
  63404. <ul>
  63405. Device specific readings:
  63406. <ul>
  63407. <li>
  63408. <code>pM_energy</code><br>
  63409. A counter for consumed energy in Wh.<br>
  63410. Hint: In order to have the calculation working, attribute
  63411. <code>timestamp-on-change-reading</code> may not be set for
  63412. reading pM_energy!
  63413. </li><br>
  63414. <li>
  63415. <code>pM_energy_begin</code><br>
  63416. Unix timestamp when collection started and device started to consume
  63417. energy for the very first time.
  63418. </li><br>
  63419. <li>
  63420. <code>pM_consumption</code><br>
  63421. Current power consumption of device in W.
  63422. </li>
  63423. </ul><br>
  63424. </ul>
  63425. <a name="powerMapattr"></a>
  63426. <b>Attribute</b>
  63427. <ul>
  63428. <li>
  63429. <code>disable 1</code><br>
  63430. No readings will be created or calculated by this module.
  63431. </li><br>
  63432. <li>
  63433. <code>powerMap_eventChainWarnOnly &lt;1&gt;</code><br>
  63434. When set, event chain will NOT be repaired automatically if readings
  63435. were found to be required for powerMap but their events are currently
  63436. suppressed because they are either missing from attributes event-on-change-reading
  63437. or event-on-update-reading. Instead, manual intervention is required.
  63438. </li><br>
  63439. <li>
  63440. <code>powerMap_interval &lt;seconds&gt;</code><br>
  63441. Interval in seconds to calculate energy.<br>
  63442. Default value is 900 seconds.
  63443. </li><br>
  63444. <li>
  63445. <code>powerMap_noEnergy 1</code><br>
  63446. No energy consumption will be calculated for that device.
  63447. </li><br>
  63448. <li>
  63449. <code>powerMap_noPower 1</code><br>
  63450. No power consumption will be determined for that device and
  63451. consequently no energy consumption at all.
  63452. </li><br>
  63453. <li>
  63454. <code>powerMap_rname_E</code><br>
  63455. Sets reading name for energy consumption.<br>
  63456. Default value is 'pM_energy'.
  63457. </li><br>
  63458. <li>
  63459. <code>powerMap_rname_P</code><br>
  63460. Sets reading name for power consumption.<br>
  63461. Default value is 'pM_consumption'.
  63462. </li><br>
  63463. <li>
  63464. <code>powerMap<pre>
  63465. {
  63466. '&lt;reading&gt;' =&gt; {
  63467. '&lt;value&gt;' =&gt; &lt;power&gt;,
  63468. '&lt;value&gt;' =&gt; &lt;power&gt;,
  63469. ...
  63470. },
  63471. '&lt;reading&gt;' {
  63472. '&lt;value&gt;' =&gt; &lt;power&gt;,
  63473. '&lt;value&gt;' =&gt; &lt;power&gt;,
  63474. ...
  63475. },
  63476. ...
  63477. }</pre>
  63478. </code> (device specific)<br>
  63479. A Hash containing event(=reading) names and possible values of it. Each value can be assigned a
  63480. corresponding power consumption.<br>
  63481. For devices with dimming capability intemediate values will be linearly interpolated. For this
  63482. to work two separate numbers will be sufficient.<br>
  63483. <br>
  63484. Text values will automatically get any numbers extracted from it and be used for interpolation.
  63485. (example: dim50% will automatically be interpreted as 50).<br>
  63486. In addition "off" and "on" will be translated to 0 and 100 respectively.<br>
  63487. If the value cannot be interpreted in any way, 0 power consumption will be assumed.<br>
  63488. Explicitly set definitions in powerMap attribute always get precedence.<br>
  63489. <br>
  63490. In case several power values need to be summarized, the name of other readings may be added after
  63491. number value, separated by comma. The current status of that reading will then be considered for
  63492. total power calculcation. To consider all readings powerMap knows, just add an *.<br>
  63493. <br>
  63494. Example for FS20 socket:
  63495. <ul>
  63496. <code><pre>
  63497. 'state' =&gt; {
  63498. '0' =&gt; 0,
  63499. '100' =&gt; 60,
  63500. },
  63501. </pre></code><br>
  63502. </ul><br>
  63503. Example for HUE white light bulb:
  63504. <ul>
  63505. <code><pre>
  63506. 'pct' =&gt; {
  63507. '0' =&gt; 0.4,
  63508. '10' =&gt; 1.2,
  63509. '20' =&gt; 1.7,
  63510. '30' =&gt; 1.9,
  63511. '40' =&gt; 2.3,
  63512. '50' =&gt; 2.7,
  63513. '60' =&gt; 3.4,
  63514. '70' =&gt; 4.7,
  63515. '80' =&gt; 5.9,
  63516. '90' =&gt; 7.5,
  63517. '100' =&gt; 9.2,
  63518. },
  63519. 'state' =&gt; {
  63520. 'unreachable' =&gt; 0,
  63521. '*' =&gt; 'pct',
  63522. },
  63523. </pre></code><br>
  63524. </ul>
  63525. </li>
  63526. </ul>
  63527. </ul>
  63528. </div>
  63529. <a name="rain"></a>
  63530. <h3>rain</h3>
  63531. <ul>
  63532. Rain calculations. Offers different values from a rain sensor. <br>
  63533. <a name="raindefine"></a>
  63534. <b>Define</b>
  63535. <ul>
  63536. <code>define &lt;name&gt; rain &lt;devicename-regex&gt; [&lt;rain_name&gt; &lt;israining_name&gt; &lt;new_name&gt;]</code><br>
  63537. <br>
  63538. <ul>
  63539. Calculates rain values for device &lt;devicename-regex&gt; from incremental rain-value and israining-state
  63540. and write it to some new readings named rain_calc_???????.
  63541. If optional &lt;rain_name&gt;, &lt;israining_name&gt; and &lt;new_name&gt; is specified
  63542. then read rain from reading &lt;rain_name&gt;, israining from reading &lt;israining_name&gt;
  63543. and write the calculated rain to reading &lt;new_name&gt;.
  63544. </ul>
  63545. The following values are generated:
  63546. <ul>
  63547. <li>rain_calc_all --> all values in one line</li>
  63548. <li>rain_calc_d_curr --> liter rain at the current day (from 7:30 local time)</li>
  63549. <li>rain_calc_d_last --> liter rain of 24h before 7:30 local time</li>
  63550. <li>rain_calc_d_start --> first incremental rain value from the rain device after 7:30 local time</li>
  63551. <li>rain_calc_h_curr --> liter rain at the current hour (from XX:30)</li>
  63552. <li>rain_calc_h_last --> liter rain of 1 hour before the last XX:30 time</li>
  63553. <li>rain_calc_h_start --> first incremental rain value from the rain device after last XX:30</li>
  63554. <li>rain_calc_now_diff --> fallen rain in liter since last value from rain device</li>
  63555. <li>rain_calc_now_rate --> fallen rain in liter/hour since last value from rain device</li>
  63556. </ul>
  63557. <br>
  63558. Example:<PRE>
  63559. # Compute the rain for the rain/israining
  63560. # events of the ks300 device and generate reading rain_calc.
  63561. define rain_ks300 rain ks300
  63562. </PRE>
  63563. </ul>
  63564. <a name="rainset"></a>
  63565. <b>Set</b> <ul>N/A</ul><br>
  63566. <a name="rainget"></a>
  63567. <b>Get</b> <ul>N/A</ul><br>
  63568. <a name="rainattr"></a>
  63569. <b>Attributes</b>
  63570. <ul>
  63571. <li><a href="#disable">disable</a></li>
  63572. <li>DontUseIsRaining 0/1
  63573. <br>
  63574. Don't use the devicevalue IsRaining, if set to 1
  63575. </li>
  63576. <li>DayChangeTime HHMM
  63577. <br>
  63578. Change the default (day)time of the 'set value to zero' time (use the timecode as four digits!)
  63579. <br>
  63580. The minutevalue is used to set the (hour)time of the 'set value to zero' time
  63581. </li>
  63582. <li>CorrectionValue 1
  63583. <br>
  63584. Use this value if you wish to do a correction of the rain-device-values. It is used as an factor. The value 1 will not change anything.
  63585. </li>
  63586. <br>
  63587. </ul>
  63588. </ul>
  63589. <a name="readingsChange"></a>
  63590. <h3>readingsChange</h3>
  63591. <ul>
  63592. <br>
  63593. <a name="readingsChangedefine"></a>
  63594. <b>Define</b>
  63595. <ul>
  63596. <code>define &lt;name&gt; readingsChange &lt;device&gt; &lt;readingName&gt;
  63597. &lt;toReplace&gt; &lt;replaceWith&gt;"</code>
  63598. <br><br>
  63599. Change the content of a reading if it changes, with the perl string
  63600. substitute mechanism. Note: As some modules rely on the known format of
  63601. some readings, changing such readings may cause these modules to stop
  63602. working.
  63603. <br><br>
  63604. &lt;device&gt;, &lt;readingName&gt; and &lt;toReplace&gt; are regular
  63605. expressions, and are not allowed to contain whitespace.
  63606. If replaceWith is enclosed in {}, then the content will be executed as a
  63607. perl expression for each match.<br>
  63608. Notes:<ul>
  63609. <li>after a Reading is set by a module, first the event-* attributes are
  63610. evaluated, then userReadings, then stateFormat, then the
  63611. readingsChange definitions (in alphabetical order), and after this the
  63612. notifies, FileLogs, etc. again in alphabetical order.</li>
  63613. <li>if stateFormat for the matched device is set, then it will be
  63614. executed multiple times: once before the readingsChange, and once for
  63615. every matching readingsChange.</li>
  63616. </ul>
  63617. <br><br>
  63618. Examples:
  63619. <ul><code>
  63620. # shorten the reading power 0.5 W previous: 0 delta_time: 300<br>
  63621. # to just power 0.5 W<br>
  63622. define pShort readingsChange pm power (.*W).* $1<br>
  63623. <br>
  63624. # format each decimal number in the power reading to 2 decimal places<br>
  63625. define p2dec readingsChange pm power (\d+\.\d+) {sprintf("%0.2f", $1)}
  63626. </code></ul>
  63627. </ul>
  63628. <br>
  63629. <a name="readingsChangeset"></a>
  63630. <b>Set</b> <ul>N/A</ul><br>
  63631. <a name="readingsChangeget"></a>
  63632. <b>Get</b> <ul>N/A</ul><br>
  63633. <a name="readingsChangeattr"></a>
  63634. <b>Attributes</b>
  63635. <ul>
  63636. <li><a href="#disable">disable</a></li>
  63637. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  63638. </ul>
  63639. <br>
  63640. </ul>
  63641. <a name="readingsGroup"></a>
  63642. <h3>readingsGroup</h3>
  63643. <ul>
  63644. Displays a collection of readings from on or more devices.
  63645. <br><br>
  63646. <a name="readingsGroup_Define"></a>
  63647. <b>Define</b>
  63648. <ul>
  63649. <code>define &lt;name&gt; readingsGroup &lt;device&gt;[:regex] [&lt;device-2&gt;[:regex-2]] ... [&lt;device-n&gt;[:regex-n]]</code><br>
  63650. <br>
  63651. Notes:
  63652. <ul>
  63653. <li>&lt;device&gt; can be of the form INTERNAL=VALUE where INTERNAL is the name of an internal value and VALUE is a regex.</li>
  63654. <li>&lt;device&gt; can be of the form ATTRIBUTE&VALUE where ATTRIBUTE is the name of an attribute and VALUE is a regex.</li>
  63655. <li>&lt;device&gt; can be of the form &lt;STRING&gt; or &lt;{perl}&gt; where STRING or the string returned by perl is
  63656. inserted as a line in the readings list. skipped if STRING is undef.</li>
  63657. <li>&lt;device&gt; can be a devspec (see <a href="#devspec">devspec</a>) with at least one FILTER expression.</li>
  63658. <li>If regex is a comma separatet list the reading values will be shown on a single line.</li>
  63659. <li>If regex starts with a '+' it will be matched against the internal values of the device instead of the readings.</li>
  63660. <li>If regex starts with a '?' it will be matched against the attributes of the device instead of the readings.</li>
  63661. <li>If regex starts with a '!' the display of the value will be forced even if no reading with this name is available.</li>
  63662. <li>If regex starts with a '$' the calculation with value columns and rows is possible.</li>
  63663. <li>The following <a href="#set">"set magic"</a> prefixes and suffixes can be used with regex:
  63664. <ul>
  63665. <li>You can use an i:, r: or a: prefix instead of + and ? analogue to the devspec filtering.</li>
  63666. <li>The suffix :d retrieves the first number.</li>
  63667. <li>The suffix :i retrieves the integer part of the first number.</li>
  63668. <li>The suffix :r&lt;n&gt; retrieves the first number and rounds it to &lt;n&gt; decimal places. If <n> is missing, then rounds it to one decimal place.</li>
  63669. <li>The suffix :t returns the timestamp (works only for readings).</li>
  63670. <li>The suffix :sec returns the number of seconds since the reading was set. probably not realy usefull with readingsGroups.</li>
  63671. </ul></li>
  63672. <li>regex can be of the form &lt;regex&gt;@device to use readings from a different device.<br>
  63673. if the device name part starts with a '!' the display will be foreced.
  63674. use in conjunction with ! in front of the reading name.</li>
  63675. <li>regex can be of the form &lt;regex&gt;@{perl} to use readings from a different device.</li>
  63676. <li>regex can be of the form &lt;STRING&gt; or &lt;{perl}[@readings]&gt; where STRING or the string returned by perl is
  63677. inserted as a reading or:
  63678. <ul><li>the item will be skipped if STRING is undef</li>
  63679. <li>if STRING is br a new line will be started</li>
  63680. <li>if STRING is hr a horizontal line will be inserted</li>
  63681. <li>if STRING is tfoot the table footer is started</li>
  63682. <li>if STRING is of the form %ICON[%CMD] ICON will be used as the name of an icon instead of a text and CMD
  63683. as the command to be executed if the icon is clicked. also see the commands attribute.</li></ul>
  63684. if readings is given the perl expression will be reevaluated during longpoll updates.</li>
  63685. <li>If the first regex is '@&lt;index&gt;' it gives the index of the following regex by which the readings
  63686. are to be grouped. if capture groups are used they can be refferenced by #&lt;number&gt;. eg:<br><ul>
  63687. <code>&lt;IP-Adress&gt;&lt;Hostname&gt;&lt;MAC&gt;&lt;Vendor&gt;<br>
  63688. nmap:@2,<#1>,(.*)_hostname,#1_macAddress,#1_macVendor</code></ul></li>
  63689. <li>For internal values and attributes longpoll update is not possible. Refresh the page to update the values.</li>
  63690. <li>the &lt;{perl}&gt; expression is limited to expressions without a space. it is best just to call a small sub
  63691. in 99_myUtils.pm instead of having a compex expression in the define.</li>
  63692. </ul><br>
  63693. Examples:
  63694. <ul>
  63695. <code>
  63696. define batteries readingsGroup .*:battery</code><br>
  63697. <br>
  63698. <code>define temperatures readingsGroup s300th.*:temperature</code><br>
  63699. <code>define temperatures readingsGroup TYPE=CUL_WS:temperature</code><br>
  63700. <br>
  63701. <code>define culRSSI readingsGroup cul_RSSI=.*:+cul_RSSI</code><br>
  63702. <br>
  63703. <code>define heizung readingsGroup t1:temperature t2:temperature t3:temperature<br>
  63704. attr heizung notime 1<br>
  63705. attr heizung mapping {'t1.temperature' => 'Vorlauf', 't2.temperature' => 'R&amp;uuml;cklauf', 't3.temperature' => 'Zirkulation'}<br>
  63706. attr heizung style style="font-size:20px"<br>
  63707. <br>
  63708. define systemStatus readingsGroup sysstat<br>
  63709. attr systemStatus notime 1<br>
  63710. attr systemStatus nostate 1<br>
  63711. attr systemStatus mapping {'load' => 'Systemauslastung', 'temperature' => 'Systemtemperatur in &amp;deg;C'}<br>
  63712. <br>
  63713. define Verbrauch readingsGroup TYPE=PCA301:state,power,consumption<br>
  63714. attr Verbrauch mapping %ALIAS<br>
  63715. attr Verbrauch nameStyle style="font-weight:bold"<br>
  63716. attr Verbrauch style style="font-size:20px"<br>
  63717. attr Verbrauch valueFormat {power => "%.1f W", consumption => "%.2f kWh"}<br>
  63718. attr Verbrauch valueIcon { state => '%devStateIcon' }<br>
  63719. attr Verbrauch valueStyle {($READING eq "power" && $VALUE > 150)?'style="color:red"':'style="color:green"'}<br>
  63720. <br>
  63721. define rg_battery readingsGroup TYPE=LaCrosse:[Bb]attery<br>
  63722. attr rg_battery alias Batteriestatus<br>
  63723. attr rg_battery commands { "battery.low" => "set %DEVICE replaceBatteryForSec 60" }<br>
  63724. attr rg_battery valueIcon {'battery.ok' => 'batterie', 'battery.low' => 'batterie@red'}<br>
  63725. <br>
  63726. define rgMediaPlayer readingsGroup myMediaPlayer:currentTitle,<>,totaltime,<br>,currentAlbum,<>,currentArtist,<br>,volume,<{if(ReadingsVal($DEVICE,"playStatus","")eq"paused"){"%rc_PLAY%set+$DEVICE+play"}else{"%rc_PAUSE%set+$DEVICE+pause"}}@playStatus>,playStatus<br>
  63727. attr rgMediaPlayer commands { "playStatus.paused" => "set %DEVICE play", "playStatus.playing" => "set %DEVICE pause" }<br>
  63728. attr rgMediaPlayer mapping &nbsp;<br>
  63729. attr rgMediaPlayer notime 1<br>
  63730. attr rgMediaPlayer valueFormat { "volume" => "Volume: %i" }<br>
  63731. #attr rgMediaPlayer valueIcon { "playStatus.paused" => "rc_PLAY", "playStatus.playing" => "rc_PAUSE" }<br>
  63732. </code><br>
  63733. </ul>
  63734. </ul><br>
  63735. <a name="readingsGroup_Set"></a>
  63736. <b>Set</b>
  63737. <ul>
  63738. <li>hide<br>
  63739. will hide all visible instances of this readingsGroup</li>
  63740. <li>show<br>
  63741. will show all visible instances of this readingsGroup</li>
  63742. <li>toggle<br>
  63743. will toggle the hidden/shown state of all visible instances of this readingsGroup</li>
  63744. <li>toggle2<br>
  63745. will toggle the expanded/collapsed state of all visible instances of this readingsGroup</li>
  63746. </ul><br>
  63747. <a name="readingsGroup_Get"></a>
  63748. <b>Get</b>
  63749. <ul>
  63750. </ul><br>
  63751. <a name="readingsGroup_Attr"></a>
  63752. <b>Attributes</b>
  63753. <ul>
  63754. <li>alwaysTrigger<br>
  63755. 1 -> alwaysTrigger update events. even if not visible.<br>
  63756. 2 -> trigger events for calculated values.</li><br>
  63757. <li>disable<br>
  63758. 1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.<br>
  63759. 2 -> also disable html table creation<br>
  63760. 3 -> also disable html creation completely</li><br>
  63761. <li>sortDevices<br>
  63762. 1 -> sort the device lines alphabetically. use the first of sortby or alias or name that is defined for each device.</li>
  63763. <li>noheading<br>
  63764. If set to 1 the readings table will have no heading.</li><br>
  63765. <li>nolinks<br>
  63766. Disables the html links from the heading and the reading names.</li><br>
  63767. <li>nostate<br>
  63768. If set to 1 the state reading is excluded.</li><br>
  63769. <li>nonames<br>
  63770. If set to 1 the reading name / row title is not displayed.</li><br>
  63771. <li>notime<br>
  63772. If set to 1 the reading timestamp is not displayed.</li><br>
  63773. <li>mapping<br>
  63774. Can be a simple string or a perl expression enclosed in {} that returns a hash that maps reading names
  63775. to the displayed name. The keys can be either the name of the reading or &lt;device&gt;.&lt;reading&gt; or
  63776. &lt;reading&gt;.&lt;value&gt; or &lt;device&gt;.&lt;reading&gt;.&lt;value&gt;.
  63777. %DEVICE, %ALIAS, %ROOM, %GROUP, %ROW and %READING are replaced by the device name, device alias, room attribute,
  63778. group attribute and reading name respectively. You can also prefix these keywords with $ instead of %. Examples:<br>
  63779. <code>attr temperatures mapping $DEVICE-$READING</code><br>
  63780. <code>attr temperatures mapping {temperature => "%DEVICE Temperatur"}</code>
  63781. </li><br>
  63782. <li>separator<br>
  63783. The separator to use between the device alias and the reading name if no mapping is given. Defaults to ':'
  63784. a space can be enteread as <code>&amp;nbsp;</code></li><br>
  63785. <li>setList<br>
  63786. Space separated list of commands, which will be returned upon "set name ?",
  63787. so the FHEMWEB frontend can construct a dropdown and offer on/off switches.
  63788. set commands not in this list will be rejected.</li><br>
  63789. <li>setFn<br>
  63790. perl expresion that will be executed for the commands from the setList.
  63791. has access to $CMD and $ARGS.</li><br>
  63792. <li>style<br>
  63793. Specify an HTML style for the readings table, e.g.:<br>
  63794. <code>attr temperatures style style="font-size:20px"</code></li><br>
  63795. <li>cellStyle<br>
  63796. Specify an HTML style for a cell of the readings table. regular rows and colums are counted starting with 1,
  63797. the row headings are column number 0. perl code has access to $ROW and $COLUMN. keys for hash lookup can be
  63798. r:#, c:# or r:#,c:# , e.g.:<br>
  63799. <code>attr temperatures cellStyle { "c:0" => 'style="text-align:right"' }</code></li><br>
  63800. <li>nameStyle<br>
  63801. Specify an HTML style for the reading names, e.g.:<br>
  63802. <code>attr temperatures nameStyle style="font-weight:bold"</code></li><br>
  63803. <li>valueStyle<br>
  63804. Specify an HTML style for the reading values, e.g.:<br>
  63805. <code>attr temperatures valueStyle style="text-align:right"</code></li><br>
  63806. <li>valueColumn<br>
  63807. Specify the minimum column in which a reading should appear. <br>
  63808. <code>attr temperatures valueColumn { temperature => 2 }</code></li><br>
  63809. <li>valueColumns<br>
  63810. Specify an HTML colspan for the reading values, e.g.:<br>
  63811. <code>attr wzReceiverRG valueColumns { eventdescription => 'colspan="4"' }</code></li><br>
  63812. <li>valueFormat<br>
  63813. Specify an sprintf style format string used to display the reading values. If the format string is undef
  63814. this reading will be skipped. Can be given as a string, a perl expression returning a hash or a perl
  63815. expression returning a string, e.g.:<br>
  63816. <code>attr temperatures valueFormat %.1f &deg;C</code><br>
  63817. <code>attr temperatures valueFormat { temperature => "%.1f &deg;C", humidity => "%i %" }</code><br>
  63818. <code>attr temperatures valueFormat { ($READING eq 'temperature')?"%.1f &deg;C":undef }</code></li><br>
  63819. <li>valuePrefix<br>
  63820. text to be prepended to the reading value</li><br>
  63821. <li>valueSuffix<br>
  63822. text to be appended after the reading value<br>
  63823. <code>attr temperatures valueFormat { temperature => "%.1f", humidity => "%i" }</code><br>
  63824. <code>attr temperatures valueSuffix { temperature => "&deg;C", humidity => " %" }</code></li><br>
  63825. <li>nameIcon<br>
  63826. Specify the icon to be used instead of the reading name. Can be a simple string or a perl expression enclosed
  63827. in {} that returns a hash that maps reading names to the icon name. e.g.:<br>
  63828. <code>attr devices nameIcon $DEVICE</code></li><br>
  63829. <li>valueIcon<br>
  63830. Specify an icon to be used instead of the reading value. Can be a simple string or a perl expression enclosed
  63831. in {} that returns a hash that maps reading value to the icon name. e.g.:<br>
  63832. <code>attr devices valueIcon $VALUE</code><br>
  63833. <code>attr devices valueIcon {state => '%VALUE'}</code><br>
  63834. <code>attr devices valueIcon {state => '%devStateIcon'}</code><br>
  63835. <code>attr rgMediaPlayer valueIcon { "playStatus.paused" => "rc_PLAY", "playStatus.playing" => "rc_PAUSE" }</code></li><br>
  63836. <li>commands<br>
  63837. Can be used in to different ways:
  63838. <ul>
  63839. <li>To make a reading or icon clickable by directly specifying the command that should be executed. eg.:<br>
  63840. <code>attr rgMediaPlayer commands { "playStatus.paused" => "set %DEVICE play", "playStatus.playing" => "set %DEVICE pause" }</code></li>
  63841. <li>Or if the mapped command is of the form &lt;command&gt;:[&lt;modifier&gt;] then the normal <a href="#FHEMWEB">FHEMWEB</a>
  63842. webCmd widget for &lt;modifier&gt; will be used for this command. if &lt;modifier&gt; is omitted then the FHEMWEB lookup mechanism for &lt;command&gt; will be used. eg:<br>
  63843. <code>attr rgMediaPlayer commands { volume => "volume:slider,0,1,100" }</code><br>
  63844. <code>attr lights commands { pct => "pct:", dim => "dim:" }</code></li>
  63845. <li>commands can be used for attribtues. eg:<br>
  63846. <code>attr <rg> commands { disable => "disable:" }</code></li>
  63847. </ul></li><br>
  63848. <li>visibility<br>
  63849. if set to hidden or hideable will display a small button to the left of the readingsGroup name to expand/hide the contents of the readingsGroup. if a readingsGroup is expanded then all others in the same group will be hidden.<br>
  63850. <ul>
  63851. hidden -> default state is hidden but can be expanded<br>
  63852. hideable -> default state is visible but can be hidden<br><br>
  63853. </ul>
  63854. if set to collapsed or collapsible readingsGroup will recognise the specials &lt;-&gt;,&lt;+&gt; and &lt;+-&gt; as the first elements of
  63855. a line to add a + or - symbol to this line. clicking on the + or - symbol will toggle between expanded and collapsed state. if a readingsGroup is expanded then all others in the same group will be collapsed.
  63856. <ul>
  63857. - -> line will be visible in expanded state<br>
  63858. + -> line will be visible in collapsed state<br>
  63859. +- -> line will be visible in both states<br>
  63860. <br>
  63861. collapsed -> default state is collapsed but can be expanded<br>
  63862. collapsible -> default state is visible but can be collapsed </li>
  63863. </ul>
  63864. <li>headerRows<br>
  63865. </li>
  63866. <li>sortColumn<br>
  63867. &gt; 0 -> automatically sort the table by this column after page loading
  63868. 0 -> do not sort automatically but allow sorting of the table by clicking on a column header
  63869. &lt; 0 -> automatically sort the table in reverse by this column after page loading
  63870. </li>
  63871. <br><li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
  63872. </ul><br>
  63873. For the hash version of all mapping attributes it is possible to give a default value
  63874. with <code>{ '' => &lt;default&gt; }</code>.<br><br>
  63875. The style attributes can also contain a perl expression enclosed in {} that returns the style
  63876. string to use. For nameStyle and valueStyle The perl code can use $DEVICE,$READING,$VALUE and $NUM, e.g.:<br>
  63877. <ul>
  63878. <code>attr batteries valueStyle {($VALUE ne "ok")?'style="color:red"':'style="color:green"'}</code><br>
  63879. <code>attr temperatures valueStyle {($DEVICE =~ m/aussen/)?'style="color:green"':'style="color:red"'}</code>
  63880. </ul><br>
  63881. Note: Only valueStyle, valueFomat, valueIcon and <{...}@reading> are evaluated during longpoll updates
  63882. and valueStyle has to return a non empty style for every possible value. All other perl expressions are
  63883. evaluated only once during html creation and will not reflect value updates with longpoll.
  63884. Refresh the page to update the dynamic style. For nameStyle the color attribut is not working at the moment,
  63885. the font-... and background attributes do work.<br><br>
  63886. Calculation: to be written...<br>
  63887. eg: <code>define rg readingsGroup .*:temperature rg:$avg</code><br>
  63888. please see a description <a href="http://www.fhemwiki.de/wiki/ReadingsGroup#Berechnungen">in the wiki</a>
  63889. </ul>
  63890. <a name="readingsHistory"></a>
  63891. <h3>readingsHistory</h3>
  63892. <ul>
  63893. Displays a history of readings from on or more devices.
  63894. <br><br>
  63895. <a name="readingsHistory_Define"></a>
  63896. <b>Define</b>
  63897. <ul>
  63898. <code>define &lt;name&gt; readingsHistory [&lt;device&gt;[:regex] [&lt;device-2&gt;[:regex-2] ... [&lt;device-n&gt;[:regex-n]]]]</code><br>
  63899. <br>
  63900. Notes:
  63901. <ul>
  63902. <li>&lt;device&gt; can be of the form INTERNAL=VALUE where INTERNAL is the name of an internal value and VALUE is a regex.</li>
  63903. <li>If regex is a comma separatet list it will be used as an enumeration of allowed readings.</li>
  63904. <li>if no device/reading argument is given only lines with 'set <device> add ...' are displayed.</li>
  63905. </ul><br>
  63906. Examples:
  63907. <ul>
  63908. </ul>
  63909. </ul><br>
  63910. <a name="readingsHistory_Set"></a>
  63911. <b>Set</b>
  63912. <ul>
  63913. <li>add ...<br>
  63914. directly add text as new line to history.</li>
  63915. <li>clear<br>
  63916. clear the history.</li>
  63917. </ul><br>
  63918. <a name="readingsHistory_Get"></a>
  63919. <b>Get</b>
  63920. <ul>
  63921. <li>history<br>
  63922. list history</li>
  63923. </ul><br>
  63924. <a name="readingsHistory_Attr"></a>
  63925. <b>Attributes</b>
  63926. <ul>
  63927. <li>alwaysTrigger<br>
  63928. 1 -> alwaysTrigger update events. even if not visible.</li>
  63929. <li>disable<br>
  63930. 1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.<br>
  63931. 2 -> also disable html table creation<br>
  63932. 3 -> also disable html creation completely</li>
  63933. <li>noheading<br>
  63934. If set to 1 the readings table will have no heading.</li>
  63935. <li>nolinks<br>
  63936. Disables the html links from the heading and the reading names.</li>
  63937. <li>notime<br>
  63938. If set to 1 the reading timestamp is not displayed.</li>
  63939. <li>mapping<br>
  63940. Can be a simple string or a perl expression enclosed in {} that returns a hash that maps device names
  63941. to the displayed name. The keys can be either the name of the reading or &lt;device&gt;.&lt;reading&gt;.
  63942. %DEVICE, %ALIAS, %ROOM and %GROUP are replaced by the device name, device alias, room attribute and
  63943. group attribute respectively. You can also prefix these keywords with $ instead of %.
  63944. </li>
  63945. <li>style<br>
  63946. Specify an HTML style for the readings table, e.g.:<br>
  63947. <code>attr history style style="font-size:20px"</code></li>
  63948. <li>timestampFormat<br>
  63949. POSIX strftime compatible string for used as the timestamp for each line.
  63950. </li>
  63951. <li>valueFormat<br>
  63952. Specify an sprintf style format string used to display the reading values. If the format string is undef
  63953. this reading will be skipped. Can be given as a string, a perl expression returning a hash or a perl
  63954. expression returning a string, e.g.:<br>
  63955. <code>attr history valueFormat %.1f &deg;C</code><br>
  63956. <code>attr history valueFormat { temperature => "%.1f &deg;C", humidity => "%.1f %" }</code><br>
  63957. <code>attr history valueFormat { ($READING eq 'temperature')?"%.1f &deg;C":undef }</code></li>
  63958. <li>rows<br>
  63959. Number of history rows to show.</li>
  63960. </ul>
  63961. </ul>
  63962. <a name="readingsProxy"></a>
  63963. <h3>readingsProxy</h3>
  63964. <ul>
  63965. Makes (a subset of) a reading from one device available as a new device.<br>
  63966. This can be used to map channels from 1-Wire, EnOcean or SWAP devices to independend devices that
  63967. can have state,icons and webCmd different from the parent device and can be used in a floorplan.
  63968. <br><br>
  63969. <a name="readingsProxy_Define"></a>
  63970. <b>Define</b>
  63971. <ul>
  63972. <code>define &lt;name&gt; readingsProxy &lt;device&gt;:&lt;reading&gt;</code><br>
  63973. <br>
  63974. Examples:
  63975. <ul>
  63976. <code>define myProxy readingsProxy myDS2406:latch.A</code><br>
  63977. </ul>
  63978. </ul><br>
  63979. <a name="readingsProxy_Set"></a>
  63980. <b>Set</b>
  63981. <ul>
  63982. </ul><br>
  63983. <a name="readingsProxy_Get"></a>
  63984. <b>Get</b>
  63985. <ul>
  63986. </ul><br>
  63987. <a name="readingsProxy_Attr"></a>
  63988. <b>Attributes</b>
  63989. <ul>
  63990. <li>disable<br>
  63991. 1 -> disable notify processing. Notice: this also disables rename and delete handling.</li>
  63992. <li>getList<br>
  63993. Space separated list of commands, which will be returned upon "get name ?",
  63994. so the FHEMWEB frontend can construct a dropdown.
  63995. %PARENT% will result in the complete list of commands from the parent device.
  63996. get commands not in this list will be rejected.</li>
  63997. <li>setList<br>
  63998. Space separated list of commands, which will be returned upon "set name ?",
  63999. so the FHEMWEB frontend can construct a dropdown and offer on/off switches.
  64000. %PARENT% will result in the complete list of commands from the parent device.
  64001. set commands not in this list will be rejected.
  64002. Example: attr proxyName setList on off</li>
  64003. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  64004. <li>getFn<br>
  64005. perl expresion that will return the get command forwarded to the parent device.
  64006. has access to $DEVICE, $READING, $CMD and $ARGS.<br>
  64007. undef -> do nothing<br>
  64008. "" -> pass through<br>
  64009. (<value>,1) -> directly return <value>, don't call parent getFn<br>
  64010. everything else -> use this instead</li>
  64011. <li>setFn<br>
  64012. perl expresion that will return the set command forwarded to the parent device.
  64013. has access to $CMD, $DEVICE, $READING and $ARGS.<br>
  64014. undef -> do nothing<br>
  64015. "" -> pass through<br>
  64016. everything else -> use this instead<br>
  64017. Examples:<br>
  64018. <code>attr myProxy setFn {($CMD eq "on")?"off":"on"}</code>
  64019. </li>
  64020. <li>valueFn<br>
  64021. perl expresion that will return the value that sould be used as state.
  64022. has access to $LASTCMD, $DEVICE, $READING and $VALUE.<br>
  64023. undef -> do nothing<br>
  64024. "" -> pass through<br>
  64025. everything else -> use this instead<br>
  64026. Examples:<br>
  64027. <code>attr myProxy valueFn {($VALUE == 0)?"off":"on"}</code>
  64028. </li>
  64029. <br><li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
  64030. </ul><br>
  64031. </ul>
  64032. <a name="remotecontrol"></a>
  64033. <h3>remotecontrol</h3>
  64034. <ul>
  64035. Displays a graphical remote control. Buttons (=icons) can be chosen and arranged. Predefined layouts are available for e.g. Samsung-TV or iTunes.
  64036. Any buttonclick can be forwarded to the actual fhem-device. For further explanation, please check the <a href="http://www.fhemwiki.de/wiki/Remotecontrol">Wiki-Entry</a>.<br>
  64037. <a name="remotecontroldefine"></a><br>
  64038. <b>Define</b>
  64039. <ul>
  64040. <code>define &lt;rc-name&gt; remotecontrol</code><br><br>
  64041. Typical steps to implement a remotecontrol:<br>
  64042. <table>
  64043. <tr><td><code>define rc1 remotecontrol</code></td><td><code># defines a "blank" remotecontrol</code></td></tr>
  64044. <tr><td><code>get rc1 layout</code></td><td><code># displays all available predefined layouts</code></td></tr>
  64045. <tr><td><code>set rc1 layout samsung</code></td><td><code># assigns keys for a SamsungTV</code></td></tr>
  64046. <tr><td><code>set rc1 makenotify myTV</code></td><td><code># creates notify_rc1 which forwards every buttonclick to myTV for execution</code></td></tr>
  64047. <tr><td><b>Note:</b> keys can be changed at any time, it is not necessary to redefine the weblink</td></tr>
  64048. <tr><td><code>attr rc1 row15 VOLUP,VOLDOWN</code></td></tr>
  64049. </table>
  64050. </ul>
  64051. <a name="remotecontrolset"></a><br>
  64052. <b>Set</b>
  64053. <ul>
  64054. <li><code>set &lt;rc-name&gt; layout [delete|&lt;layoutname&gt;]</code><br>
  64055. <code>layout delete</code> deletes all rowXX-attributes<br>
  64056. <code>layout &lt;layoutname&gt;</code> assigns a predefined layout to rowXX-attributes</li>
  64057. <li><code>set &lt;rc-name&gt; makeweblink [&lt;name&gt;]</code><br>
  64058. creates a weblink to display the graphical remotecontrol. Default-name is weblink_&lt;rc-name&gt; .</li>
  64059. <li><code>set &lt;rc-name&gt; makenotify &lt;executingDevice&gt;</code><br>
  64060. creates a notify to trigger &lt;executingDevice&gt; every time a button has been pressed. name is notify_&lt;rc-name&gt; .</li>
  64061. </ul>
  64062. <a name="remotecontrolget"></a><br>
  64063. <b>Get</b>
  64064. <ul>
  64065. <code>get &lt;rc-name&gt; [htmlcode|layout]</code><br>
  64066. <li><code>htmlcode</code> displays htmlcode for the remotecontrol on fhem-page</li>
  64067. <li><code>layout</code> shows which predefined layouts ae available</li>
  64068. </ul>
  64069. <a name="remotecontrolattr"></a><br>
  64070. <b>Attributes</b>
  64071. <ul>
  64072. <li><a href="#loglevel">loglevel</a></li>
  64073. <li><a name="rc_iconpath">rc_iconpath</a><br>
  64074. path for icons, default is "icons" . The attribute-value will be used for all icon-files except .svg .</li>
  64075. <li><a name="rc_iconprefix">rc_iconprefix</a><br>
  64076. prefix for icon-files, default is "" . The attribute-value will be used for all icon-files except .svg .</li>
  64077. <li>Note: Icon-names (button-image-file-names) will be composed as <code>fhem/&lt;rc_iconpath&gt;/&lt;rc_iconprefix&gt;&lt;command|image&gt;</code><br>
  64078. For .svg -icons, the access sequence is according to the FHEMWEB-attribute iconPath, default is openautomation:fhemSVG:default .</li>
  64079. <li><a name="rc_devStateIcon">rc_devStateIcon</a><br>
  64080. In FHEMWEB-room-overview, displays the button-layout on the rc-device itself. Default is 1, set to 0 is the remotecontrol-device should not display its buttons in FHEMWEB roomview.</li>
  64081. <br>
  64082. <li><a href="#rowXX">rowXX</a><br>
  64083. <code>attr &lt;rc-name&gt; rowXX &lt;command&gt;[:&lt;image&gt;][,&lt;command&gt;[:&lt;image&gt;]][,...]</code><br>
  64084. Comma-separated list of buttons/images per row. Any number of buttons can be placed in one row. For each button, use</li>
  64085. <ul>
  64086. <li><code>&lt;command&gt;</code> is the command that will trigger the event after a buttonclick. Case sensitive.</li>
  64087. <li><code>&lt;image&gt;</code> is the filename of the image</li><br>
  64088. <li>Per button for the remotecontrol, use</li>
  64089. <li><code>&lt;command&gt;</code> where an icon with the name <rc_iconprefix>&lt;command&gt; is displayed<br>
  64090. Example:<br>
  64091. <code>attr rc1 rc_iconprefix black_btn_ # used for ALL icons on remotecontrol rc1</code><br>
  64092. <code>attr rc1 row00 VOLUP </code><br>
  64093. icon is <code>black_btn_VOLUP</code>, a buttonclick creates the event <code>VOLUP</code>
  64094. </li>
  64095. or
  64096. <li><code>&lt;command&gt;:&lt;image&gt;</code> where an icon with the name <code>&lt;rc_iconprefix&gt;&lt;image&gt;</code> is displayed<br>
  64097. Example: <br>
  64098. <code>row00=LOUDER:VOLUP</code><br>
  64099. icon is <code>black_btn_VOLUP</code>, a buttonclick creates the event <code>LOUDER</code>
  64100. <br>
  64101. Examples:<br>
  64102. <code>attr rc1 row00 1,2,3,TV,HDMI</code><br>
  64103. <code>attr rc2 row00 play:PLAY,pause:PAUSE,louder:VOLUP,quieter:VOLDOWN</code><br>
  64104. </li>
  64105. <li><b>Hint:</b> use :blank for a blank space, use e.g. :blank,:blank,:blank for a blank row</li>
  64106. </ul>
  64107. </ul>
  64108. </ul>
  64109. <a name="restore"></a>
  64110. <h3>restore</h3>
  64111. <ul>
  64112. <code>restore list [&lt;filename|directory&gt;]<br>
  64113. restore [&lt;filename|directory&gt;]<br>
  64114. restore -a [&lt;filename|directory&gt;]</code>
  64115. <br><br>
  64116. Restore the files saved previously by the update command. Check the available
  64117. files with the list argument. See also the update command and its restoreDirs
  64118. attribute. After a restore normally a "shutdown restart" is necessary.<br>
  64119. If the -a option is specified, the configuration files are also restored.
  64120. </ul>
  64121. <a name="rssFeed"></a>
  64122. <h3>rssFeed</h3>
  64123. <ul>
  64124. This device helps to extract data from an rss feed specified by the
  64125. url given in the DEF section. Trhe results will be extracted to
  64126. several corresponding readings. Also the headlines of the news
  64127. elements will be extracted to a special "ticker"-string that could
  64128. be retrieved via GET or a special function.
  64129. The data will be updated automatically after the given interval.
  64130. <br/><br/>
  64131. <a name="rssFeeddefine"></a>
  64132. <b>Define</b>
  64133. <ul>
  64134. <code>define &lt;name&gt; rssFeed &lt;url&gt; [interval]</code>
  64135. <br/><br/>
  64136. <ul>
  64137. url = url of the rss feed
  64138. </ul>
  64139. <ul>
  64140. interval = actualization interval in seconds
  64141. <br/>
  64142. Minimum for this value is 600 and maximum is 86400
  64143. </ul>
  64144. <br/>
  64145. Example:
  64146. <ul>
  64147. <code>define rssGEA rssFeed http://www.gea.de/rss?cat=Region%20Reutlingen&amp;main=true 3600</code>
  64148. <br/><br/>
  64149. The example will retrieve the data from the rss feed every hour
  64150. </ul>
  64151. </ul>
  64152. <br/>
  64153. <a name="rssFeedset"></a>
  64154. <b>Set</b>
  64155. <ul>
  64156. <code>set &lt;name&gt; update</code><br/>
  64157. retrieving the data from feed and updateing readings data
  64158. </ul>
  64159. <br/>
  64160. <a name="rssFeedget"></a>
  64161. <b>Get</b><br/>
  64162. <ul>
  64163. <code>get &lt;name&gt; ticker</code><br/>
  64164. getting the headlines from the feed with specified formatting
  64165. (also see attributes)
  64166. </ul>
  64167. <br/>
  64168. <a name="rssFeedattr"></a>
  64169. <b>Attributes</b>
  64170. <ul>
  64171. <li><a name="disabled">disable</a><br/>
  64172. This attribute can be used to disable the entier feed device (1)
  64173. or to activate it again (0 or attribute missing).
  64174. If the device is disabled all readings will be removed, except
  64175. the state reading which will then be set to "disabled".
  64176. Data will no longer be automatically retrieved from the url.
  64177. The ticker data contains only one line indicating the disabled
  64178. ticker device. (s.a. attribute rfDisabledText).
  64179. <br/>
  64180. </li>
  64181. <li><a name="rfDisabledText">rfDisabledText</a><br/>
  64182. The text in this attribute will be returnde by GET ticker when the
  64183. device is disabled (s.a. attribute disable).
  64184. If this attribute is not specified a default text is returned.<br/>
  64185. Example: <code>attr &lt;name&gt; rfDisabledText This feed is disabled</code>
  64186. </li>
  64187. <li><a name="rfTickerChars">rfTickerChars</a><br/>
  64188. Specifies a string which will surround each headline in the ticker data.<br/>
  64189. Example: <code>attr &lt;name&gt; rfTickerChars +++</code>
  64190. <br/>
  64191. Result: <code>+++ This is a sample headline +++</code>
  64192. <br/>
  64193. These characters are also used for "marquee"-ticker data.
  64194. <br>
  64195. </li>
  64196. <li><a name="rfMaxLines">rfMaxLines</a><br/>
  64197. Defines the maximum number of news items that will be extracted from the
  64198. feed. If there are less items in the feed then specified by this attribute
  64199. then only that few items are extracted.
  64200. If this attribute is missing a default of 10 will be assumed.<br/>
  64201. Example: <code>attr &lt;name&gt; rfMaxLines 15</code>
  64202. <br/>
  64203. </li>
  64204. <li><a name="rfDisplayTickerReadings">rfDisplayTickerReadings</a><br/>
  64205. If this attribute is set then there will be two additional readings
  64206. containing the ticker data for "toast"-Tickers (same as rssFeedGetTicker())
  64207. and one containing the ticker data for "marquee"-tickers on a single line.
  64208. </li>
  64209. <li><a name="rfEncode">rfEncode</a><br/>
  64210. Defines an encoding which will be used for any text extracted from the
  64211. feed that will be applied before setting the readings. Therefore the
  64212. encode method of the Perl-core module Encode is used.
  64213. If the attribute is missng then no encoding will be performed.
  64214. Sometimes this is necessary when feeds contain wide characters that
  64215. could sometimes lead to malfunction in FHEMWEB.
  64216. Also the headlines data returned by rssFeedFunctions and get ticker
  64217. are encoded using this method.<br/>
  64218. This will be set to utf8 by default on first define
  64219. <br/>
  64220. </li>
  64221. <li><a name="rfReadings">rfReadings</a><br/>
  64222. This attribute defines the readings that will be created from the extracted
  64223. data. It is a comma separated list of the following values:
  64224. <ul>
  64225. <li>title = title section<br/>
  64226. extract the title section of the feed and each news item to a
  64227. corresponding reading<br/>
  64228. </li>
  64229. <li>description = description section<br/>
  64230. extract the description section of the feed and each news item
  64231. to a corresponding reading
  64232. <br/>
  64233. </li>
  64234. <li>encodedContent = content:encoded section<br/>
  64235. if present this contains a more detailed description
  64236. <br/>
  64237. </li>
  64238. <li>pubDate = Publication time of feed and of each news item will
  64239. be extracted to a corresponding reading.
  64240. <br/>
  64241. </li>
  64242. <li>link = link url to the feed or to the full article of a
  64243. single news items in the feed.
  64244. <br/>
  64245. </li>
  64246. <li>buildDate = time of the last feed actulization by the feed
  64247. vendor.
  64248. <br/>
  64249. </li>
  64250. <li>imageURl = url of a probably available image of a news item
  64251. <br/>
  64252. </li>
  64253. <li>imageTitle = image title of a probably available news item
  64254. image.
  64255. <br/>
  64256. </li>
  64257. </ul>
  64258. If this attribute is missing "title,description,pubDate" will be assumed
  64259. as default value. When the device is defined for the first time the
  64260. attribute will be automatically created with the default value.
  64261. <br/>
  64262. </li>
  64263. <li><a name="rfCustomTextPrepFn">rfCustomTextPrepFn</a><br>
  64264. Can specify a funtion located for example in 99_myUtils.pm
  64265. This function will be uses for further modification of extracted
  64266. feed data before setting it to the readings or the ticker list.
  64267. The function will receive an id for the text type and the text itself.
  64268. It must then return the modified Text.
  64269. <br/>
  64270. Possible text type ids are (s.a. rfReadings)<br>
  64271. <ul>
  64272. <li>feedTitle</li>
  64273. <li>feedDescription</li>
  64274. <li>imageTitle</li>
  64275. <li>desctiption</li>
  64276. <li>encodedContent</li>
  64277. </ul>
  64278. <br/>
  64279. Example for 99_myUtils.pm:
  64280. <pre>
  64281. #Text preparation for rssFeedDevices
  64282. sub rssFeedPrep($$)
  64283. {
  64284. my($texttype,$text) = @_;
  64285. #Cut the lenght of description texts to max 50 characters
  64286. my $tLn=length $text;
  64287. $text=substr($text,0,47).'...' if ($tLn >50 && ($texttype=~/description/));
  64288. #filter Probably errorneous HASH(xxxxxx) from any texts
  64289. return ' ' if ($text=~/HASH\(.*\)/);
  64290. #set a custom feed title reading
  64291. return 'My Special Title' if ($texttype =~/feedTitle/);
  64292. #returning modified text
  64293. return $text;
  64294. }
  64295. </pre>
  64296. and then set the attribute to that function:<br/>
  64297. <code>attr &lt;rssFeedDevice&gt; rfCustomTextPrepFn rssFeedPrep</code>
  64298. <br/>
  64299. </li>
  64300. <li>
  64301. <a name="rfReadings">rfAllReadingsEvents</a><br/>
  64302. If this attribute is set to 1 all Readings that are created or updated
  64303. will generate appropriate events (depending on event-on-... attributes).
  64304. By default no events are created for most Readings, especially not for
  64305. the feed data Readings
  64306. </li>
  64307. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  64308. </ul>
  64309. <br/>
  64310. <a name="rssFeedfunctions"></a>
  64311. <b>Functions</b>
  64312. <ul>
  64313. <li>rssFeedGetTicker<br/>
  64314. This function will returned the foratted headlines as a single string.
  64315. Each headline will be separated by a new line character.
  64316. The result of this function can for example be used in InfoPanel as
  64317. ticker data.
  64318. The function takes the name of a rssFeed device as single parameter.
  64319. The result is the same as from <code>get ticker</code> as it uses this function too.
  64320. Syntax: <code> rssFeedGetTicker(&lt;rssFeedDevice&gt;)</code><br/>
  64321. </li>
  64322. </ul><br/>
  64323. <a name="rssFeedreadings"></a>
  64324. <b>Readings</b>
  64325. <ul>
  64326. Depending on the attribute rfReadings a bunch of readings is created
  64327. from the extracted news feed data.
  64328. Some of the readings ar prefixed to tell to which part of the feed the
  64329. data belongs to.
  64330. </ul>
  64331. <ul>
  64332. <br/>
  64333. <li><code>Nxx_</code><br/>
  64334. readings with that prefix correspond to the news items in the feed.
  64335. <code>xx</code> index of the news item
  64336. <br/>
  64337. Example showing the readings of a single news item<br/>
  64338. <ul>
  64339. <code> N00_title </code><br/>
  64340. <code> N00_descripton </code><br/>
  64341. <code> N00_pubDate </code><br/>
  64342. </ul>
  64343. </li>
  64344. <li><code>f_</code><br/>
  64345. redings with that prefix correspond to the feed itself.
  64346. <br/>
  64347. Example of feed-readings:
  64348. <ul>
  64349. <code> f_title </code><br/>
  64350. <code> f_descripton </code><br/>
  64351. <code> f_buildDate </code><br/>
  64352. </ul>
  64353. </li>
  64354. <li><code>preparedLines</code><br/>
  64355. This readings contains the number of new items that were extracted
  64356. in the last update of the feed data.
  64357. </li>
  64358. <li>
  64359. <code>tickerToast</code><br/>
  64360. This reading contains the same data that is returned by the rssFeedGetTicker()
  64361. funciton (if attribute rfDisplayTickerReadings is set)
  64362. <br>
  64363. Example: <code>+++ Headline 1 +++ \n +++ Headline 2 +++ \n +++ Headline 3 +++ </code>
  64364. </li>
  64365. <li>
  64366. <code>tickerMarquee</code><br/>
  64367. This reading contains the ticker data on a single line for "marquee" style
  64368. tickers (if attribute rfDisplayTickerReadings is set)
  64369. <br>
  64370. Example: <code>Headline 1 +++ Hadline 2 +++ Headline 3 +++</code>
  64371. </li>
  64372. <li><code>gzippedFeed</code><br/>
  64373. Sometimes RSS-Feed data is delivered gzipped. This is automatically
  64374. recognized by the module. So if the received data was originally
  64375. gzipped this reading is set to 1 otherwise it is set to 0
  64376. </li>
  64377. <li><code>state</code><br/>
  64378. The state reading contains the timestamp of the last automatic or manual
  64379. update of the device data from the feed, as long as the device is not
  64380. disabled.
  64381. If the device is disabled state contains "disabled".
  64382. When the device is defined then the start of cyclic updates is retarded
  64383. for about 10 seconds. During that time state is set to "defined"
  64384. </li>
  64385. </ul><br/>
  64386. </ul>
  64387. <a name="sequence"></a>
  64388. <h3>sequence</h3>
  64389. <ul>
  64390. <br>
  64391. <a name="sequencedefine"></a>
  64392. <b>Define</b>
  64393. <ul>
  64394. <code>define &lt;name&gt; sequence &lt;re1&gt; &lt;timeout1&gt;
  64395. &lt;re2&gt; [&lt;timeout2&gt; &lt;re3&gt; ...]</code>
  64396. <br><br>
  64397. A sequence is used to allow to trigger events for a certain combination of
  64398. button presses on a remote. E.g. to switch on a lamp when pressing the
  64399. Btn1:on, then Btn2:off and at last Btn1:on one after the other you could
  64400. define the following:<br>
  64401. <br>
  64402. <ul>
  64403. <code>
  64404. define lampseq sequence Btn1:on 0.5 Btn2:off 0.5 Btn1:on<br>
  64405. define lampon notify lampseq:trigger set lamp on
  64406. </code>
  64407. </ul>
  64408. <br>
  64409. Subsequent patterns can be specified without device name as
  64410. <code>:&lt;re2&gt;</code>. This will reuse the device name which triggered
  64411. the previous sequence step:
  64412. <br>
  64413. <ul>
  64414. <code>
  64415. define lampseq sequence Btn.:on 0.5 :off<br>
  64416. </code>
  64417. </ul>
  64418. <br>
  64419. You can specify timeout as <code>&lt;delay&gt;:&lt;timeout&gt;</code>,
  64420. where "delay" sets time during which the next event shall not be received,
  64421. otherwise the sequence will be aborted. This can be used to capture press
  64422. and hold of a button. Example:<br>
  64423. <ul>
  64424. <code>
  64425. define lampseq sequence Btn1:on 2:3 Btn1:off<br>
  64426. </code>
  64427. </ul>
  64428. sequence will be triggerred if Btn1 is pressed for 2 to 5 seconds.
  64429. </ul>
  64430. <br>
  64431. <a name="sequenceset"></a>
  64432. <b>Set</b> <ul>N/A</ul><br>
  64433. <a name="sequenceget"></a>
  64434. <b>Get</b> <ul>N/A</ul><br>
  64435. <a name="sequenceattr"></a>
  64436. <b>Attributes</b>
  64437. <ul>
  64438. <li><a href="#disable">disable</a></li>
  64439. <li><a href="#showtime">showtime</a></li>
  64440. <li><a href="#triggerPartial">triggerPartial</a><br>
  64441. if set (to 1), and not all the events of a sequence are received, then a
  64442. partial_X event is generated by the sequence. Example:<br><code><ul>
  64443. fhem> define seq sequence d1:on 1 d1:on 1 d1:on<br>
  64444. fhem> attr seq triggerPartial<br>
  64445. fhem> set d1 on;; sleep 0.5;; set d1 on<br>
  64446. </ul></code>
  64447. generates the event seq partial_2. This can be used to assign different
  64448. tasks for a single button, depending on the number of times it is
  64449. pressed.
  64450. </li><br>
  64451. <li><a href="#reportEvents">reportEvents</a><br>
  64452. if set (to 1), report the events (space separated) after the
  64453. "trigger" or "partial_X" keyword. This way one can create more general
  64454. sequences, and create different notifies to react:<br>
  64455. <ul><code>
  64456. define seq sequence remote:btn.* remote:btn.*<br>
  64457. attr seq reportEvents<br>
  64458. define n_b1b2 notify seq:trigger.remote:btn1.remote:btn2 set lamp1 on<br>
  64459. define n_b2b1 notify seq:trigger.remote:btn2.remote:btn1 set lamp1 off<br>
  64460. </code></ul>
  64461. </li>
  64462. </ul>
  64463. <br>
  64464. </ul>
  64465. <a name="siri"></a>
  64466. <h3>siri</h3>
  64467. <ul>
  64468. Module to control the FHEM/Siri integration.<br><br>
  64469. Notes:
  64470. <ul>
  64471. <li><br>
  64472. </li>
  64473. </ul>
  64474. <a name="siri_Attr"></a>
  64475. <b>Attr</b>
  64476. <ul>
  64477. <li>siriName<br>
  64478. The name to use for a device with siri.</li>
  64479. </ul>
  64480. </ul><br>
  64481. <a name="speedtest"></a>
  64482. <h3>speedtest</h3>
  64483. <ul>
  64484. Provides internet speed data via <a href="https://github.com/sivel/speedtest-cli">speedtest-cli</a>.<br><br>
  64485. Notes:
  64486. <ul>
  64487. <li>speedtest-cli hast to be installed on the FHEM host.</li>
  64488. </ul>
  64489. <a name="speedtest_Define"></a>
  64490. <b>Define</b>
  64491. <ul>
  64492. <code>define &lt;name&gt; speedtest [&lt;interval&gt; [&lt;server&gt;]]</code><br>
  64493. <br>
  64494. Defines a speedtest device.<br><br>
  64495. The data is updated every &lt;interval&gt; seconds. The default is 3600 and the minimum is 1800.<br><br>
  64496. &lt;server&gt; gives the speedtest sever id. the list of all servers is available with <PRE>speedtest-cli --list</PRE>.
  64497. Examples:
  64498. <ul>
  64499. <code>define speedtest speedtest</code><br>
  64500. <code>define speedtest speedtest 3600 2760</code><br>
  64501. </ul>
  64502. </ul><br>
  64503. <a name="speedtest_Readings"></a>
  64504. <b>Readings</b>
  64505. <ul>
  64506. <li>ping</li>
  64507. <li>download</li>
  64508. <li>upload</li>
  64509. </ul><br>
  64510. <a name="speedtest_Set"></a>
  64511. <b>Set</b>
  64512. <ul>
  64513. <li>statusRequest<br>
  64514. manualy start a test. this works even if the device is set to disable.</li>
  64515. </ul>
  64516. <a name="speedtest_Attr"></a>
  64517. <b>Attributes</b>
  64518. <ul>
  64519. <li>path<br>
  64520. The path to the speedtest binary.</li>
  64521. <li>checks-till-disable<br>
  64522. how often the speedtest should be run before it is automaticaly set to disabled. the value will be decreased by 1 for every run.</li>
  64523. <li>disable<br>
  64524. set to 1 to disable the test.</li>
  64525. </ul>
  64526. </ul>
  64527. =item helper
  64528. =item summary Calculates for statistical values and adds them to the devices.
  64529. =item summary_DE Berechnet statistische Werte und f&uuml;gt sie dem Ger&auml;t hinzu.
  64530. <a name="statistics"></a>
  64531. <h3>statistics</h3>
  64532. (en | <a href="http://fhem.de/commandref_DE.html#statistics">de</a>)
  64533. <div>
  64534. <ul>
  64535. This modul calculates for certain readings of given devices statistical values and adds them to the devices.
  64536. <br>
  64537. For detail instructions, look at and please maintain the <a href="http://www.fhemwiki.de/wiki/statistics"><b>FHEM-Wiki</b></a>.
  64538. <br>
  64539. Until now statistics for the following readings are automatically built:
  64540. <ul>
  64541. <br>
  64542. <li><b>Min|Avg|Max</b> Minimum, average and maximum of instantaneous values:
  64543. <br>
  64544. over a period of day, month and year:
  64545. <br>
  64546. <i>brightness, current, energy_current, humidity, luminosity, temperature, voltage</i>
  64547. <br>
  64548. over a period of hour, day, month and year:
  64549. <br>
  64550. <i>wind, wind_speed, windSpeed</i>
  64551. </li><br>
  64552. <li><b>Tendency</b> over 1h, 2h, 3h und 6h: <i>pressure</i>
  64553. </li><br>
  64554. <li><b>Delta</b> between start and end values - over a period of hour, day, month and year:
  64555. <br>
  64556. <i>count, energy, energy_total, power, total, rain, rain_rate, rain_total</i>
  64557. </li><br>
  64558. <li><b>Duration</b> (and counter) of the states (on, off, open, closed...) over a period of day, month and year:
  64559. <br>
  64560. <i>lightsensor, lock, motion, Window, window, state (if no other reading is recognized)</i>
  64561. </li><br>
  64562. </ul>
  64563. Further readings can be added via the <a href="#statisticsattr">attributes</a> <code>deltaReadings, durationReadings, minAvgMaxReadings, tendencyReadings</code>.
  64564. This allows also to assign a reading to another statistic type.
  64565. <br>&nbsp;
  64566. <br>
  64567. <b>Define</b>
  64568. <ul>
  64569. <br>
  64570. <code>define &lt;name&gt; statistics &lt;deviceNameRegExp&gt; [Prefix]</code>
  64571. <br>
  64572. Example: <code>define Statistik statistics Sensor_.*|Wettersensor</code>
  64573. <br>&nbsp;
  64574. <li><code>&lt;DeviceNameRegExp&gt;</code>
  64575. <br>
  64576. Regular expression of device names. <b>!!! Not the device readings !!!</b>
  64577. </li><br>
  64578. <li><code>[Prefix]</code>
  64579. <br>
  64580. Optional. Prefix set is place before statistical data. Default is <i>stat</i>
  64581. </li><br>
  64582. </ul>
  64583. <br>
  64584. <b>Set</b>
  64585. <ul>
  64586. <br>
  64587. <li><code>resetStatistics &lt;All|DeviceName&gt;</code>
  64588. <br>
  64589. Resets the statistic values of the selected device.
  64590. </li><br>
  64591. <li><code>doStatistics</code>
  64592. <br>
  64593. Calculates the current statistic values of all monitored devices.
  64594. </li><br>
  64595. </ul>
  64596. <br>
  64597. <b>Get</b>
  64598. <ul>not implemented yet
  64599. </ul>
  64600. <br>
  64601. <a name="statisticsattr"></a>
  64602. <b>Attributes</b>
  64603. <ul>
  64604. <br>
  64605. <li><code>dayChangeTime &lt;time&gt;</code>
  64606. <br>
  64607. Time of day change. Default is 00:00. For weather data the day change can be set e.g. to 06:50.
  64608. </li><br>
  64609. <li><code>deltaReadings &lt;readings&gt;</code>
  64610. <br>
  64611. Comma separated list of reading names for which a delta statistic shall be calculated.
  64612. </li><br>
  64613. <li><code>durationPeriodHour &lt; 1 | 0 &gt;</code>
  64614. <br>
  64615. If set to 1, then duration readings will get hourly statistics too.
  64616. </li><br>
  64617. <li><code>durationReadings &lt;readings&gt;</code>
  64618. <br>
  64619. Comma separated list of reading names for which a duration statistic shall be calculated.
  64620. </li><br>
  64621. <li><code>excludedReadings &lt;DeviceRegExp:ReadingNameRegExp&gt;</code>
  64622. <br>
  64623. Regular expression of the readings that shall be excluded from the statistics.<br>
  64624. The reading have to be entered in the form <i>deviceName:readingName</i>.
  64625. <br>
  64626. E.g. <code>FritzDect:current|Sensor_.*:humidity</code>
  64627. <br>
  64628. </li><br>
  64629. <li><code>ignoreDefaultAssignments <code>&lt; 0 | 1 &gt;</code></code>
  64630. <br>
  64631. Ignores the default assignments of readings to a statistic type (see above).<br>
  64632. So, only the readings that are listed in the specific attributes are evaluated.
  64633. <br>
  64634. </li><br>
  64635. <li><code>minAvgMaxReadings &lt;readings&gt;</code>
  64636. <br>
  64637. Comma separated list of reading names for which a min/average/max statistic shall be calculated.
  64638. </li><br>
  64639. <li><code>periodChangePreset &lt;seconds&gt;</code>
  64640. <br>
  64641. Preponed start of the calculation of periodical data. Default is 5 second before each full hour.
  64642. <br>
  64643. Allows thus the correct timely assignment within plots. Should be adapted to the CPU speed or load of the server.
  64644. <br>
  64645. </li><br>
  64646. <li><code>singularReadings &lt;DeviceRegExp:ReadingRegExp&gt;:statTypes:period</code>
  64647. <ul>
  64648. <li>statTypes: Min|Avg|Max|Delta|<i>DurationState</i>|<span style="color:blue;">Tendency</span></li>
  64649. <li>period: Hour|Day|Month|Year|<span style="color:blue;">1h|2h|3h|6h</span></li>
  64650. </ul>
  64651. <br>
  64652. Regulare expression of statistic values, which for which singular readings are created <u>additionally</u> to the summary readings. Eases the creation of plots. For duration readings the name of the state has to be used as statTypes.
  64653. <dt>Example:</dt>
  64654. <dd>
  64655. <code>Wettersensor:rain:Delta:(Hour|Day)|(FritzDect:(current|power):(Avg|Max|Delta):(Hour|Day)</code>
  64656. <br>
  64657. <code>Badfenster:Window:(Open|Open_Count):Month</code>
  64658. </dd>
  64659. </li><br>
  64660. <li><code>specialDeltaPeriods &lt;Device:Reading:Period:count1:count2:...&gt;</code>
  64661. <br>
  64662. Creates for the given delta reading additional singular readings of the given numbers of a period (Hour, Day, Month)
  64663. <br>
  64664. Regular expressions <u>cannot</u> be used. Additional readings or additional periods can be defined but have to be separated by a comma (without spaces).
  64665. <br>
  64666. <dt>Example:</dt>
  64667. <dd>
  64668. <code>attr Statistik specialDeltaPeriods Wettersensor:rain:Hour:06:72:96</code>
  64669. <br>
  64670. This will create 3 additional readings for the rain of the last 6, 72 and 96 hours.
  64671. <br>
  64672. <code>attr Statistik specialDeltaPeriods Wettersensor:rain:Hour:48,Wettersensor:rain:Day:30,EZaehler:energy:Month:6:12</code>
  64673. <br>
  64674. This will create 4 additional readings for the rain of the last 48 hours and the last 30 Days and the energy consumtion of the last 6 and 12 months.
  64675. </dd>
  64676. </li><br>
  64677. <li><code>specialDeltaPeriodHours</code>
  64678. <br>
  64679. depreciated
  64680. </li><br>
  64681. <li><code>tendencyReadings &lt;readings&gt;</code>
  64682. <br>
  64683. Comma separated list of reading names for which a tendendy statistic shall be calculated.
  64684. </li><br>
  64685. </ul>
  64686. </ul>
  64687. </div>
  64688. <a name="structure"></a>
  64689. <h3>structure</h3>
  64690. <ul>
  64691. <br>
  64692. <a name="structuredefine"></a>
  64693. <b>Define</b>
  64694. <ul>
  64695. <code>define &lt;name&gt; structure &lt;struct_type&gt; &lt;dev1&gt; &lt;dev2&gt; ...</code>
  64696. <br><br>
  64697. The structure device is used to organize/structure devices in order to
  64698. set groups of them at once (e.g. switching everything off in a house).<br>
  64699. The list of attached devices can be modified through the addstruct /
  64700. delstruct commands. Each attached device will get the attribute
  64701. &lt;struct_type&gt;=&lt;name&gt;<br> when it is added to the list, and the
  64702. attribute will be deleted if the device is deleted from the structure.
  64703. <br>
  64704. The structure devices can also be added to a structure, e.g. you can have
  64705. a building consisting of levels which consists of rooms of devices.
  64706. <br>
  64707. Example:<br>
  64708. <ul>
  64709. <li>define kitchen structure room lamp1 lamp2</li>
  64710. <li>addstruct kitchen TYPE=FS20</li>
  64711. <li>delstruct kitchen lamp1</li>
  64712. <li>define house structure building kitchen living</li>
  64713. <li>set house off</li>
  64714. </ul>
  64715. <br>
  64716. </ul>
  64717. <br>
  64718. <a name="structureset"></a>
  64719. <b>Set</b>
  64720. <ul>
  64721. Every set command is propagated to the attached devices. Exception: if an
  64722. attached device has an attribute structexclude, and the attribute value
  64723. matches (as a regexp) the name of the current structure.<br>
  64724. If the set is of the form <code>set &lt;structure&gt;
  64725. [FILTER=&lt;filter&gt;] &lt;type-specific&gt;</code> then
  64726. :FILTER=&lt;filter&gt; will be appended to the device name in the
  64727. propagated set for the attached devices like this: <code>set
  64728. <devN>:FILTER=&lt;filter&gt; &lt;type-specific&gt;</code><br>
  64729. If the last set parameter is "reverse", then execute the set commands in
  64730. the reverse order.
  64731. </ul>
  64732. <br>
  64733. <a name="structureget"></a>
  64734. <b>Get</b>
  64735. <ul>
  64736. get is not supported through a structure device.
  64737. </ul>
  64738. <br>
  64739. <a name="structureattr"></a>
  64740. <b>Attributes</b>
  64741. <ul>
  64742. <a name="async_delay"></a>
  64743. <li>async_delay<br>
  64744. If this attribute is defined, unfiltered set commands will not be
  64745. executed in the clients immediately. Instead, they are added to a queue
  64746. to be executed later. The set command returns immediately, whereas the
  64747. clients will be set timer-driven, one at a time. The delay between two
  64748. timercalls is given by the value of async_delay (in seconds) and may be
  64749. 0 for fastest possible execution. This way, excessive delays often
  64750. known from large structures, can be broken down in smaller junks.
  64751. </li>
  64752. <li><a href="#disable">disable</a></li>
  64753. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  64754. <a name="clientstate_behavior"></a>
  64755. <li>clientstate_behavior<br>
  64756. The backward propagated status change from the devices to this structure
  64757. works in two different ways.
  64758. <ul>
  64759. <li>absolute<br>
  64760. The structure status will changed to the common device status of all
  64761. defined devices to this structure if all devices are identical.
  64762. Otherwise the structure status is "undefined".
  64763. </li>
  64764. <li>relative<br>
  64765. See below for clientstate_priority.
  64766. </li>
  64767. <li>relativeKnown<br>
  64768. Like relative, but do not trigger on events not described in
  64769. clientstate_priority. Needed e.g. for HomeMatic devices.
  64770. </li>
  64771. <li>last<br>
  64772. The structure state corresponds to the state of the device last changed.
  64773. </li>
  64774. </ul>
  64775. </li>
  64776. <a name="clientstate_priority"></a>
  64777. <li>clientstate_priority<br>
  64778. If clientstate_behavior is set to relative, then you have to set the
  64779. attribute "clientstate_priority" with all states of the defined devices
  64780. to this structure in descending order. Each group is delemited by
  64781. space or /. Each entry of one group is delimited by "pipe". The status
  64782. represented by the structure is the first entry of each group.
  64783. Example:<br>
  64784. <ul>
  64785. <li>attr kitchen clientstate_behavior relative</li>
  64786. <li>attr kitchen clientstate_priority An|On|on Aus|Off|off</li>
  64787. <li>attr house clientstate_priority Any_On|An All_Off|Aus</li>
  64788. </ul>
  64789. In this example the status of kitchen is either on or off. The status
  64790. of house is either Any_on or All_off.
  64791. </li>
  64792. <li>&lt;struct_type&gt;_map<br>
  64793. With this attribute, which has to specified for the structure-
  64794. <b>member</b>, you can redefine the value reported by a specific
  64795. structure-member for the structure value. The attribute has three
  64796. variants:
  64797. <ul>
  64798. <li>readingName<br>
  64799. take the value from readingName instead of state.
  64800. </li>
  64801. <li>oldVal:newVal<br>
  64802. if the state reading matches oldVal, then replace it with newVal
  64803. </li>
  64804. <li>readingName:oldVal:newVal<br>
  64805. if readingName matches oldVal, then replace it with newVal
  64806. </li>
  64807. </ul>
  64808. Example:
  64809. <ul>
  64810. <li>define door OWSWITCH &lt;ROMID&gt</li>
  64811. <li>define lamp1 dummy</li>
  64812. <li>attr lamp1 cmdlist on off</li>
  64813. <li>define kitchen structure struct_kitchen lamp1 door</li>
  64814. <li>attr kitchen clientstate_priority An|on OK|Aus|off</li>
  64815. <li>attr lamp1 struct_kitchen_map on:An off:Aus</li>
  64816. <li>attr door struct_kitchen_map A:open:on A:closed:off</li>
  64817. <li>attr door2 struct_kitchen_map A</li>
  64818. </ul>
  64819. </li>
  64820. <a name="evaluateSetResult"></a>
  64821. <li>evaluateSetResult<br>
  64822. if a set command sets the state of the structure members to something
  64823. different from the set command (like set statusRequest), then you have to
  64824. set this attribute to 1 in order to enable the structure instance to
  64825. compute the new status.
  64826. </li>
  64827. <a name="structexclude"></a>
  64828. <li>structexclude<br>
  64829. exclude the device from set/notify or attribute operations. For the set
  64830. and notify the value of structexclude must match the structure name,
  64831. for the attr/deleteattr commands ist must match the combination of
  64832. structure_name:attribute_name. Examples:<br>
  64833. <ul>
  64834. <code>
  64835. define kitchen structure room lamp1 lamp2<br>
  64836. attr lamp1 structexclude kitchen<br>
  64837. attr lamp1 structexclude kitchen:stateFormat<br>
  64838. </code>
  64839. </ul>
  64840. </li>
  64841. <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
  64842. </ul>
  64843. <br>
  64844. </ul>
  64845. <a name="tahoma"></a>
  64846. <h3>tahoma</h3>
  64847. <ul>
  64848. The module realizes the communication with io-homecontrol&reg; Devices e.g. from Somfy&reg; or Velux&reg;<br>
  64849. A registered TaHoma&reg; Connect gateway from Overkiz&reg; sold by Somfy&reg; which is continously connected to the internet is necessary for the module.<br>
  64850. <br><br>
  64851. Notes:
  64852. <ul>
  64853. <li>JSON has to be installed on the FHEM host.</li>
  64854. <li>on problems refer also the fhem forum <a href="https://forum.fhem.de/index.php/topic,28045.0.html">IO-Homecontrol Devices &uuml;ber Tahoma Box einbinden</a></li>
  64855. </ul><br>
  64856. <a name="tahoma_Define"></a>
  64857. <b>Define</b>
  64858. <ul>
  64859. <code>define &lt;name&gt; tahoma ACCOUNT &lt;username&gt; &lt;password&gt;</code><br>
  64860. <code>define &lt;name&gt; tahoma DEVICE &lt;DeviceURL&gt;</code><br>
  64861. <code>define &lt;name&gt; tahoma PLACE &lt;oid&gt;</code><br>
  64862. <code>define &lt;name&gt; tahoma SCENE &lt;oid&gt;</code><br>
  64863. <code>define &lt;name&gt; tahoma GROUP &lt;tahoma_device1&gt;,&lt;tahoma_device2&gt;,&lt;tahoma_device3&gt;</code><br>
  64864. <br>
  64865. <br>
  64866. A definition is only necessary for a tahoma device:<br>
  64867. <code>define &lt;name&gt; tahoma ACCOUNT &lt;username&gt; &lt;password&gt;</code><br>
  64868. <b>If a tahoma device of the type ACCOUNT is created, all other devices acessable by the tahoma gateway are automaticaly created!</b><br>
  64869. If the account is valid, the setup will be read from the server.<br>
  64870. All registrated devices are automatically created with name tahoma_12345 (device number 12345 is used from setup)<br>
  64871. All defined rooms will be are automatically created.<br>
  64872. Also all defined scenes will be automatically created.<br>
  64873. Groups of devices can be manually added to send out one group command for all attached devices<br>
  64874. <br>
  64875. <br>
  64876. <b>global Attributes for ACCOUNT:</b>
  64877. <ul>
  64878. If autocreate is disabled, no devices, places and scenes will be created automatically:<br>
  64879. <code>attr autocreate disable</code><br>
  64880. </ul>
  64881. <br>
  64882. <b>local Attributes for ACCOUNT:</b>
  64883. <ul>
  64884. Normally, the web commands will be send asynchron, and this can be forced to wait of the result by blocking=1<br>
  64885. <code>attr tahoma1 blocking 1</code><br>
  64886. </ul>
  64887. <ul>
  64888. Normally, the login data is stored encrypted after the first start, but this functionality can be disabled by cryptLoginData=0<br>
  64889. <code>attr tahoma1 cryptLoginData 0</code><br>
  64890. </ul>
  64891. <br>
  64892. <b>local Attributes for DEVICE:</b>
  64893. <ul>
  64894. If the closure value 0..100 should be 100..0, the level can be inverted:<br>
  64895. <code>attr tahoma_23234545 levelInvert 1</code><br>
  64896. </ul>
  64897. <br>
  64898. <b>local Attributes for PLACE:</b>
  64899. <ul>
  64900. The commands in a room will only affect the devices in the room with inClass=RollerShutter.<br>
  64901. This can be extend or changed by setting the placeClasses attribut:<br>
  64902. <code>attr tahoma_abc12345 placeClasses RollerShutter ExteriorScreen Window</code><br>
  64903. </ul>
  64904. <br>
  64905. <b>Examples:</b>
  64906. <ul>
  64907. <code>define tahoma1 tahoma ACCOUNT abc@test.com myPassword</code><br>
  64908. <code>attr tahoma1 blocking 0</code><br>
  64909. <code>attr tahoma1 room tahoma</code><br>
  64910. <br>
  64911. <br>Automatic created device e.g.:<br>
  64912. <code>define tahoma_23234545 tahoma DEVICE io://0234-5678-9012/23234545</code><br>
  64913. <code>attr tahoma_23234545 IODev tahoma1</code><br>
  64914. <code>attr tahoma_23234545 alias RollerShutter Badezimmer</code><br>
  64915. <code>attr tahoma_23234545 room tahoma</code><br>
  64916. <code>attr tahoma_23234545 webCmd dim</code><br>
  64917. <br>
  64918. <br>Automatic created place e.g.:<br>
  64919. <code>define tahoma_abc12345 tahoma PLACE abc12345-0a23-0b45-0c67-d5e6f7a1b2c3</code><br>
  64920. <code>attr tahoma_abc12345 IODev tahoma1</code><br>
  64921. <code>attr tahoma_abc12345 alias room Wohnzimmer</code><br>
  64922. <code>attr tahoma_abc12345 room tahoma</code><br>
  64923. <br>
  64924. <br>Automatic created scene e.g.:<br>
  64925. <code>define tahoma_4ef30a23 tahoma SCENE 4ef30a23-0b45-0c67-d5e6-f7a1b2c32e3f</code><br>
  64926. <code>attr tahoma_4ef30a23 IODev tahoma1</code><br>
  64927. <code>attr tahoma_4ef30a23 alias scene Rolladen S&uuml;dfenster zu</code><br>
  64928. <code>attr tahoma_4ef30a23 room tahoma</code><br>
  64929. <br>
  64930. <br>manual created group e.g.:<br>
  64931. <code>define tahoma_group1 tahoma GROUP tahoma_23234545,tahoma_23234546,tahoma_23234547</code><br>
  64932. <code>attr tahoma_group1 IODev tahoma1</code><br>
  64933. <code>attr tahoma_group1 alias Gruppe Rolladen Westen</code><br>
  64934. <code>attr tahoma_group1 room tahoma</code><br>
  64935. </ul>
  64936. </ul><br>
  64937. </ul>
  64938. <a name="telnet"></a>
  64939. <h3>telnet</h3>
  64940. <ul>
  64941. <br>
  64942. <a name="telnetdefine"></a>
  64943. <b>Define</b>
  64944. <ul>
  64945. <code>define &lt;name&gt; telnet &lt;portNumber&gt;
  64946. [global|hostname]</code><br>
  64947. or<br>
  64948. <code>define &lt;name&gt; telnet &lt;servername&gt:&lt;portNumber&gt;</code>
  64949. <br><br>
  64950. First form, <b>server</b> mode:<br>
  64951. Listen on the TCP/IP port <code>&lt;portNumber&gt;</code> for incoming
  64952. connections. If the second parameter is <b>not</b> specified,
  64953. the server will only listen to localhost connections. If the second
  64954. parameter is global, telnet will listen on all interfaces, else it wil try
  64955. to resolve the parameter as a hostname, and listen only on this interface.
  64956. <br>
  64957. To use IPV6, specify the portNumber as IPV6:&lt;number&gt;, in this
  64958. case the perl module IO::Socket:INET6 will be requested.
  64959. On Linux you may have to install it with cpan -i IO::Socket::INET6 or
  64960. apt-get libio-socket-inet6-perl; OSX and the FritzBox-7390 perl already has
  64961. this module.<br>
  64962. Examples:
  64963. <ul>
  64964. <code>define tPort telnet 7072 global</code><br>
  64965. <code>attr tPort SSL</code><br>
  64966. <code>attr allowed_tPort allowed</code><br>
  64967. <code>attr allowed_tPort validFor tPort</code><br>
  64968. <code>attr allowed_tPort globalpassword mySecret</code><br>
  64969. </ul>
  64970. Note: The old global attribute port is automatically converted to a
  64971. telnet instance with the name telnetPort. The global allowfrom attibute is
  64972. lost in this conversion.
  64973. <br><br>
  64974. Second form, <b>client</b> mode:<br>
  64975. Connect to the specified server port, and execute commands received from
  64976. there just like in server mode. This can be used to connect to a fhem
  64977. instance sitting behind a firewall, when installing exceptions in the
  64978. firewall is not desired or possible. Note: this client mode supprts SSL,
  64979. but not IPV6.<br>
  64980. Example:
  64981. <ul>
  64982. Start tcptee first on publicly reachable host outside the firewall.<ul>
  64983. perl contrib/tcptee.pl --bidi 3000</ul>
  64984. Configure fhem inside the firewall:<ul>
  64985. define tClient telnet &lt;tcptee_host&gt;:3000</ul>
  64986. Connect to the fhem from outside of the firewall:<ul>
  64987. telnet &lt;tcptee_host&gt; 3000</ul>
  64988. </ul>
  64989. </ul>
  64990. <br>
  64991. <a name="telnetset"></a>
  64992. <b>Set</b> <ul>N/A</ul><br>
  64993. <a name="telnetget"></a>
  64994. <b>Get</b> <ul>N/A</ul><br>
  64995. <a name="telnetattr"></a>
  64996. <b>Attributes:</b>
  64997. <ul>
  64998. <a name="prompt"></a>
  64999. <li>prompt<br>
  65000. Sets the string for the telnet prompt, the default is fhem&gt;
  65001. </li><br>
  65002. <a name="SSL"></a>
  65003. <li>SSL<br>
  65004. Enable SSL encryption of the connection, see the description <a
  65005. href="#HTTPS">here</a> on generating the needed SSL certificates. To
  65006. connect to such a port use one of the following commands:
  65007. <ul>
  65008. socat openssl:fhemhost:fhemport,verify=0 readline<br>
  65009. ncat --ssl fhemhost fhemport<br>
  65010. openssl s_client -connect fhemhost:fhemport<br>
  65011. </ul>
  65012. </li><br>
  65013. <a name="allowfrom"></a>
  65014. <li>allowfrom<br>
  65015. Regexp of allowed ip-addresses or hostnames. If set, only connections
  65016. from these addresses are allowed.<br>
  65017. NOTE: if this attribute is not defined and there is no valid allowed
  65018. device defined for the telnet/FHEMWEB instance and the client tries to
  65019. connect from a non-local net, then the connection is refused. Following
  65020. is considered a local net:<br>
  65021. <ul>
  65022. IPV4: 127/8, 10/8, 192.168/16, 172.16/10, 169.254/16<br>
  65023. IPV6: ::1, fe80/10<br>
  65024. </ul>
  65025. </li><br>
  65026. <a name="connectTimeout"></a>
  65027. <li>connectTimeout<br>
  65028. Wait at maximum this many seconds for the connection to be established.
  65029. Default is 2.
  65030. </li><br>
  65031. <a name="connectInterval"></a>
  65032. <li>connectInterval<br>
  65033. After closing a connection, or if a connection cannot be estblished,
  65034. try to connect again after this many seconds. Default is 60.
  65035. </li><br>
  65036. <a name="encoding"></a>
  65037. <li>encoding<br>
  65038. Sets the encoding for the data send to the client. Possible values are
  65039. latin1 and utf8. Default is utf8.
  65040. </li><br>
  65041. <li>sslVersion<br>
  65042. See the global attribute sslVersion.
  65043. </li><br>
  65044. </ul>
  65045. </ul>
  65046. <a name="template"></a>
  65047. <h3>template</h3>
  65048. <ul>
  65049. <code>template [use|show] &lt;filename&gt; [&lt;param1&gt;=&lt;value1&gt; [&lt;param2&gt;=&lt;value2&gt; [...]]]</code>
  65050. <br><br>
  65051. Includes a file with parameter substitution, i.e. read the file and process every line as a FHEM command.
  65052. For any given parameter/value pair <code>&lt;param&gt;=&lt;value&gt;</code> on the command line,
  65053. a literal <code>%&lt;param&gt;%</code> in the file is replaced by &lt;value&gt; before executing the command.<br><br>
  65054. This can be used to to code recurring definitions of one or several devices only once and use it many times.
  65055. <code>template show ..</code> shows what would be done, including a parameter listing, while
  65056. <code>template use ...</code> actually does the job. The word <code>use</code> can be omitted.<br><br>
  65057. <b>Example</b><br><br>
  65058. File <i>H.templ</i>:<br><br>
  65059. <code>
  65060. define %name% FHT %fhtcode%<br>
  65061. attr %name% IODev CUN<br>
  65062. attr %name% alias %alias%<br>
  65063. attr %name% group %group%<br>
  65064. attr %name% icon icoTempHeizung.png<br>
  65065. attr %name% room %room%,Anlagen/Heizungen<br>
  65066. <br>
  65067. define watchdog.%name% watchdog %name% 00:15:00 SAME set %name% report2 255<br>
  65068. attr watchdog.%name% group %group%<br>
  65069. attr watchdog.%name% room Control/Heizungen<br>
  65070. <br>
  65071. define %name%.log FileLog /opt/fhem/log/%name%-%Y%m.log %name%:.*<br>
  65072. attr %name%.log group %group%<br>
  65073. attr %name%.log icon icoLog.png<br>
  65074. attr %name%.log logtype fht<br>
  65075. attr %name%.log room Control/Heizungen<br>
  65076. <br>
  65077. define %name%.weblink SVG %name%.log:%name%:CURRENT<br>
  65078. attr %name%.weblink label sprintf("Temperatur: %.0f °C (%.0f °C .. %.0f °C) Aktor: %.0f %% (%.0f %% .. %.0f %%)", $data{currval1}, $data{min1}, $data{max1}, $data{currval2}, $data{min2}, $data{max2} )<br>
  65079. attr %name%.weblink room %room%<br>
  65080. attr %name%.weblink alias %alias%<br>
  65081. </code><br><br>
  65082. Configuration:<br><br>
  65083. <code>te H.templ name=3.dz.hzg fhtcode=3f4a alias=Dachzimmerheizung group=Heizung room=Dachzimmer</code><br><br>
  65084. Please note that although %Y% in the FileLog definition looks like a parameter, it is not substituted since no parameter
  65085. Y is given on the command line. You get detailed information at verbosity level 5 when you run the command.
  65086. </ul>
  65087. <a name="update"></a>
  65088. <h3>update</h3>
  65089. <ul>
  65090. <code>update [&lt;fileName&gt;|all|check|force]
  65091. [http://.../controlfile]</code>
  65092. <br>or<br>
  65093. <code>update [add source|delete source|list|reset]</code>
  65094. <br>
  65095. <br>
  65096. Update the FHEM installation. Technically this means update will download
  65097. the controlfile(s) first, compare it to the local version of the file in the
  65098. moddir/FHEM directory, and download each file where the attributes (timestamp
  65099. and filelength) are different. Upon completion it triggers the global:UPDATE
  65100. event.
  65101. <br>
  65102. With the commands add/delete/list/reset you can manage the list of
  65103. controlfiles, e.g. for thirdparty packages.
  65104. Notes:
  65105. <ul>
  65106. <li>The contrib directory will not be updated.</li>
  65107. <li>The files are automatically transferred from the source repository
  65108. (SVN) to the web site once a day, at 7:45 CET / CEST.</li>
  65109. <li>The all argument is default.</li>
  65110. <li>The force argument will disregard the local file.</li>
  65111. <li>The check argument will only display the files it would download, and
  65112. the last section of the CHANGED file.</li>
  65113. <li>Specifying a filename will only download matching files (regexp).</li>
  65114. </ul>
  65115. See also the restore command.<br>
  65116. <br>
  65117. Examples:<br>
  65118. <ul>
  65119. <li>update check</li>
  65120. <li>update</li>
  65121. <li>update force</li>
  65122. <li>update check http://fhem.de/fhemupdate/controls_fhem.txt</li>
  65123. </ul>
  65124. <a name="updateattr"></a>
  65125. <br>
  65126. <b>Attributes</b> (use attr global ...)
  65127. <ul>
  65128. <a name="updateInBackground"></a>
  65129. <li>updateInBackground<br>
  65130. If this attribute is set (to 1), the update will be executed in a
  65131. background process. The return message is communicated via events, and
  65132. in telnet the inform command is activated, in FHEMWEB the Event
  65133. Monitor. Default is set. Set it to 0 to switch it off.
  65134. </li><br>
  65135. <a name="updateNoFileCheck"></a>
  65136. <li>updateNoFileCheck<br>
  65137. If set, the command won't compare the local file size with the expected
  65138. size. This attribute was introduced to satisfy some experienced FHEM
  65139. user, its default value is 0.
  65140. </li><br>
  65141. <a name="backup_before_update"></a>
  65142. <li>backup_before_update<br>
  65143. If this attribute is set, an update will back up your complete
  65144. installation via the <a href="#backup">backup</a> command. The default
  65145. is not set as update relies on the restore feature (see below).<br>
  65146. Example:<br>
  65147. <ul>
  65148. attr global backup_before_update
  65149. </ul>
  65150. </li><br>
  65151. <a name="exclude_from_update"></a>
  65152. <li>exclude_from_update<br>
  65153. Contains a space separated list of fileNames (regexps) which will be
  65154. excluded by an update. The special value commandref will disable calling
  65155. commandref_join at the end, i.e commandref.html will be out of date.
  65156. The module-only documentation is not affected and is up-to-date.<br>
  65157. Example:<br>
  65158. <ul>
  65159. attr global exclude_from_update 21_OWTEMP.pm FS20.off.png
  65160. </ul>
  65161. The regexp is checked against the filename and the source:filename
  65162. combination. To exclude the updates for FILE.pm from fhem.de, as you are
  65163. updating it from another source, specify fhem.de.*:FILE.pm
  65164. </li><br>
  65165. <li><a href="#restoreDirs">restoreDirs</a></li><br>
  65166. </ul>
  65167. </ul>
  65168. <a name="uptime"></a>
  65169. <h3>uptime</h3>
  65170. <ul>
  65171. <code>uptime [raw]</code><br/>
  65172. <br/>
  65173. uptime shows FHEM uptime since last FHEM (re-)start.<br/>
  65174. if called with optional parameter "raw" only seconds will be shown,<br/>
  65175. without any fomatting.<br/>
  65176. </ul>
  65177. <a name="version"></a>
  65178. <h3>version</h3>
  65179. <ul>
  65180. <code>version [&lt;filter&gt;|revision] [noheader]</code>
  65181. <br><br>
  65182. List the version of fhem.pl and all loaded modules. The optional parameter
  65183. can be used to filter the ouput. The special filter value "revision" shows
  65184. only the latest revision number since the last update.<br><br>
  65185. The optional flag <code>noheader</code> disables the output of the header lines (Latest Revision, File, Rev, Last Change).
  65186. <br><br>
  65187. When issued via FHEMWEB command line, all executed JavaScript files with their corresponding version will be listed additionally.
  65188. <br><br>
  65189. Example output of <code>version</code>:
  65190. <ul>
  65191. <code><br>
  65192. Latest Revision: 10814<br><br>
  65193. File&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rev&nbsp;&nbsp;&nbsp;Last&nbsp;Change<br><br>
  65194. fhem.pl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10769&nbsp;2016-02-08&nbsp;12:11:51Z&nbsp;rudolfkoenig<br>
  65195. 90_at.pm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10048&nbsp;2015-11-29&nbsp;14:51:40Z&nbsp;rudolfkoenig<br>
  65196. 98_autocreate.pm&nbsp;10165&nbsp;2015-12-13&nbsp;11:14:15Z&nbsp;rudolfkoenig<br>
  65197. 00_CUL.pm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10146&nbsp;2015-12-10&nbsp;10:17:42Z&nbsp;rudolfkoenig<br>
  65198. 10_CUL_HM.pm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10411&nbsp;2016-01-08&nbsp;15:18:17Z&nbsp;martinp876<br>
  65199. ...
  65200. </code>
  65201. </ul>
  65202. <br>
  65203. Example output of <code>version fhem.pl</code>:
  65204. <ul>
  65205. <code><br>
  65206. File&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rev&nbsp;&nbsp;&nbsp;Last&nbsp;Change<br><br>
  65207. fhem.pl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10397&nbsp;2016-01-07&nbsp;08:36:49Z&nbsp;rudolfkoenig<br>
  65208. </code>
  65209. </ul>
  65210. <br>
  65211. Example output of <code>version fhem.pl noheader</code>:
  65212. <ul>
  65213. <code><br>
  65214. fhem.pl&nbsp;10397&nbsp;2016-01-07&nbsp;08:36:49Z&nbsp;rudolfkoenig<br>
  65215. </code>
  65216. </ul>
  65217. </ul>
  65218. <a name="watchdog"></a>
  65219. <h3>watchdog</h3>
  65220. <ul>
  65221. <br>
  65222. <a name="watchdogdefine"></a>
  65223. <b>Define</b>
  65224. <ul>
  65225. <code>define &lt;name&gt; watchdog &lt;regexp1&gt; &lt;timespec&gt; &lt;regexp2&gt; &lt;command&gt;</code><br>
  65226. <br>
  65227. Start an arbitrary FHEM command if after &lt;timespec&gt; receiving an
  65228. event matching &lt;regexp1&gt; no event matching &lt;regexp2&gt; is
  65229. received.<br>
  65230. The syntax for &lt;regexp1&gt; and &lt;regexp2&gt; is the same as the
  65231. regexp for <a href="#notify">notify</a>.<br>
  65232. &lt;timespec&gt; is HH:MM[:SS]<br>
  65233. &lt;command&gt; is a usual fhem command like used in the <a
  65234. href="#at">at</a> or <a href="#notify">notify</a>
  65235. <br><br>
  65236. Examples:
  65237. <code><ul>
  65238. # Request data from the FHT80 _once_ if we do not receive any message for<br>
  65239. # 15 Minutes.<br>
  65240. define w watchdog FHT80 00:15:00 SAME set FHT80 date<br>
  65241. # Request data from the FHT80 _each_ time we do not receive any message for
  65242. <br>
  65243. # 15 Minutes, i.e. reactivate the watchdog after it triggered. Might be<br>
  65244. # dangerous, as it can trigger in a loop.<br>
  65245. define w watchdog FHT80 00:15:00 SAME set FHT80 date;; trigger w .<br>
  65246. # Shout once if the HMS100-FIT is not alive<br>
  65247. define w watchdog HMS100-FIT 01:00:00 SAME "alarm-fit.sh"<br>
  65248. # Send mail if the window is left open<br>
  65249. define w watchdog contact1:open 00:15 contact1:closed
  65250. "mail_me close window1"<br>
  65251. attr w regexp1WontReactivate<br>
  65252. </ul></code>
  65253. Notes:<br>
  65254. <ul>
  65255. <li>if &lt;regexp1&gt; is . (dot), then activate the watchdog at
  65256. definition time. Else it will be activated when the first matching
  65257. event is received.</li>
  65258. <li>&lt;regexp1&gt; resets the timer of a running watchdog, to avoid it
  65259. use the regexp1WontReactivate attribute.</li>
  65260. <li>if &lt;regexp2&gt; is SAME, then it will be the same as the first
  65261. regexp, and it will be reactivated, when it is received.
  65262. </li>
  65263. <li>trigger &lt;watchdogname&gt; . will activate the trigger if its state
  65264. is defined, and set it into state defined if its state is active
  65265. (Next:...) or triggered. You always have to reactivate the watchdog
  65266. with this command once it has triggered (unless you restart
  65267. fhem)</li>
  65268. <li>a generic watchdog (one watchdog responsible for more devices) is
  65269. currently not possible.</li>
  65270. <li>with modify all parameters are optional, and will not be changed if
  65271. not specified.</li>
  65272. </ul>
  65273. <br>
  65274. </ul>
  65275. <a name="watchdogset"></a>
  65276. <b>Set </b>
  65277. <ul>
  65278. <li>inactive<br>
  65279. Inactivates the current device. Note the slight difference to the
  65280. disable attribute: using set inactive the state is automatically saved
  65281. to the statefile on shutdown, there is no explicit save necesary.<br>
  65282. This command is intended to be used by scripts to temporarily
  65283. deactivate the notify.<br>
  65284. The concurrent setting of the disable attribute is not recommended.</li>
  65285. <li>active<br>
  65286. Activates the current device (see inactive).</li>
  65287. </ul>
  65288. <br>
  65289. <a name="watchdogget"></a>
  65290. <b>Get</b> <ul>N/A</ul><br>
  65291. <a name="watchdogattr"></a>
  65292. <b>Attributes</b>
  65293. <ul>
  65294. <li><a href="#disable">disable</a></li>
  65295. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  65296. <li><a name="regexp1WontReactivate">regexp1WontReactivate</a><br>
  65297. When a watchdog is active, a second event matching regexp1 will
  65298. normally reset the timeout. Set this attribute to prevents this.</li>
  65299. <li><a href="#execOnReactivate">execOnActivate</a>
  65300. If set, its value will be executed as a FHEM command when the watchdog is
  65301. reactivated (after triggering) by receiving an event matching regexp1.
  65302. </li>
  65303. <li><a href="#autoRestart">autoRestart</a>
  65304. When the watchdog has triggered it will be automatically re-set to state
  65305. defined again (waiting for regexp1) if this attribute is set to 1.
  65306. </li>
  65307. </ul>
  65308. <br>
  65309. </ul>
  65310. <a name="weblink"></a>
  65311. <h3>weblink</h3>
  65312. <ul>
  65313. <a name="weblinkdefine"></a>
  65314. <b>Define</b>
  65315. <ul>
  65316. <code>define &lt;name&gt; weblink [link|image|iframe|htmlCode|cmdList]
  65317. &lt;argument&gt;</code>
  65318. <br><br>
  65319. This is a placeholder device used with FHEMWEB to be able to add user
  65320. defined links.
  65321. Examples:
  65322. <ul>
  65323. <code>
  65324. define homepage weblink link http://fhem.de<br>
  65325. define webcam_picture weblink image http://w.x.y.z/current.jpg<br>
  65326. define interactive_webcam weblink iframe http://w.x.y.z/webcam.cgi<br>
  65327. define hr weblink htmlCode &lt;hr&gt<br>
  65328. define w_Frlink weblink htmlCode { WeatherAsHtml("w_Frankfurt") }<br>
  65329. define systemCommands weblink cmdList
  65330. pair:Pair:set+cul2+hmPairForSec+60
  65331. restart:Restart:shutdown+restart
  65332. update:UpdateCheck:update+check
  65333. </code>
  65334. </ul>
  65335. <br>
  65336. Notes:
  65337. <ul>
  65338. <li>For cmdList &lt;argument&gt; consists of a list of space
  65339. separated icon:label:cmd triples.</li>
  65340. </ul>
  65341. </ul>
  65342. <a name="weblinkset"></a>
  65343. <b>Set</b> <ul>N/A</ul><br>
  65344. <a name="weblinkget"></a>
  65345. <b>Get</b> <ul>N/A</ul><br>
  65346. <a name="weblinkattr"></a>
  65347. <b>Attributes</b>
  65348. <ul>
  65349. <a name="htmlattr"></a>
  65350. <li>htmlattr<br>
  65351. HTML attributes to be used for link, image and iframe type of links.
  65352. E.g.:<br>
  65353. <ul>
  65354. <code>
  65355. define yw weblink iframe http://weather.yahooapis.com/forecastrss?w=650272&u=c<br>
  65356. attr yw htmlattr width="480" height="560"<br>
  65357. </code>
  65358. </ul></li>
  65359. <a name="nodetaillink"></a>
  65360. <li>nodetaillink<br>
  65361. Show no detail link for the types image and iframe.
  65362. </li>
  65363. <li><a href="#disable">disable</a></li>
  65364. <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
  65365. </ul>
  65366. <br>
  65367. </ul>
  65368. <a name="weekprofile"></a>
  65369. <h3>weekprofile</h3>
  65370. <ul>
  65371. With this module you can manage and edit different weekprofiles. You can send the profiles to different devices.<br>
  65372. Currently the following devices will by supported:<br>
  65373. <li>MAX</li>
  65374. <li>other weekprofile modules</li>
  65375. <li>Homatic channel _Clima or _Climate</li>
  65376. In the normal case the module is assoziated with a master device.
  65377. So a profile 'master' will be created automatically. This profile corrensponds to the current active
  65378. profile on the master device.
  65379. You can also use this module without a master device. In this case a default profile will be created.
  65380. <br>
  65381. An other use case is the usage of categories 'Topics'.
  65382. To enable the feature the attribute 'useTopics' have to be set.
  65383. Topics are e.q. winter, summer, holidays, party, and so on.
  65384. A topic consists of different week profiles. Normally one profile for each thermostat.
  65385. The connection between the thermostats and the profile is an user attribute 'weekprofile' without the topic name.
  65386. With 'restore_topic' the defined profile in the attribute will be transfered to the thermostat.
  65387. So it is possible to change the topic easily and all thermostats will be updated with the correndponding profile.
  65388. <br><br>
  65389. <b>Attention:</b>
  65390. To transfer a profile to a device it needs a lot of Credits.
  65391. This is not taken into account from this module. So it could be happend that the profile in the module
  65392. and on the device are not equal until the whole profile is transfered completly.
  65393. <br>
  65394. If the maste device is Homatic HM-TC-IT-WM-W-EU then only the first profile (R_P1_...) will be used!
  65395. <br>
  65396. <b>For this module libjson-perl have to be installed</b>
  65397. <br><br>
  65398. <b>Events:</b><br>
  65399. Currently the following event will be created:<br>
  65400. <li>PROFILE_TRANSFERED: if a profile or a part of a profile (changes) is send to a device</li>
  65401. <li>PROFILES_SAVED: the profile are stored in the config file (also if there are no changes)</li>
  65402. <a name="weekprofiledefine"></a>
  65403. <b>Define</b>
  65404. <ul>
  65405. <code>define &lt;name&gt; weekprofile [master device]</code><br>
  65406. <br>
  65407. Activate the module with or without an assoziated master device. The master device is an optional parameter.
  65408. With a master device a spezial profile 'master' will be created.<br>
  65409. Special master' profile handling:<br>
  65410. <li>Can't be deleted</li>
  65411. <li>Will be automatically transfered to the master device if it was modified</li>
  65412. <li>Will not be saved</li>
  65413. <br>
  65414. Without a master device a 'default' profile will be created
  65415. </ul>
  65416. <a name="weekprofileset"></a>
  65417. <b>Set</b>
  65418. <ul>
  65419. <li>profile_data<br>
  65420. <code>set &lt;name&gt; profile_data &lt;profilename&gt; &lt;json data&gt; </code><br>
  65421. The profile 'profilename' will be changed. The data have to be in json format.
  65422. </li>
  65423. <li>send_to_device<br>
  65424. <code>set &lt;name&gt; send_to_device &lt;profilename&gt; [devices] </code><br>
  65425. The profile 'profilename' will be transfered to one or more the devices. Without the parameter device the profile
  65426. will be transferd to the master device. 'devices' is a comma seperated list of device names
  65427. </li>
  65428. <li>copy_profile<br>
  65429. <code>set &lt;name&gt; copy_profile &lt;source&gt; &lt;destination&gt; </code><br>
  65430. Copy from source to destination. The destination will be overwritten
  65431. </li>
  65432. <li>remove_profile<br>
  65433. <code>set &lt;name&gt; remove_profile &lt;profilename&gt; </code><br>
  65434. Delete profile 'profilename'.
  65435. </li>
  65436. <li>reference_profile<br>
  65437. <code>set &lt;name&gt; reference_profile &lt;source&gt; &lt;destination&gt; </code><br>
  65438. Create a reference from destination to source. The destination will be overwritten if it exits.
  65439. </li>
  65440. <li>restore_topic<br>
  65441. <code>set &lt;name&gt; restore_topic &lt;topic&gt;</code><br>
  65442. All weekprofiles from the topic will be transfered to the correcponding devices.
  65443. Therefore a user attribute 'weekprofile' with the weekprofile name <b>without the topic name</b> have to exist in the device.
  65444. </li>
  65445. </ul>
  65446. <a name="weekprofileget"></a>
  65447. <b>Get</b>
  65448. <ul>
  65449. <li>profile_data<br>
  65450. <code>get &lt;name&gt; profile_data &lt;profilename&gt; </code><br>
  65451. Get the profile data from 'profilename' in json-Format
  65452. </li>
  65453. <li>profile_names<br>
  65454. <code>set &lt;name&gt; profile_names [topicname]</code><br>
  65455. Get a comma seperated list of weekprofile profile names from the topic 'topicname'
  65456. If topicname is not set, 'default' will be used
  65457. If topicname is '*', all weekprofile profile names are returned.
  65458. </li>
  65459. <li>profile_references [name]<br>
  65460. If name is '*', a comma seperated list of all references in the following syntax
  65461. <code>ref_topic:ref_profile>dest_topic:dest_profile</code>
  65462. are returned
  65463. If name is 'topicname:profilename', '0' or the reference name is returned.
  65464. </li>
  65465. <li>topic_names<br>
  65466. Return a comma seperated list of topic names.
  65467. </li>
  65468. </ul>
  65469. <a name="weekprofilereadings"></a>
  65470. <p><b>Readings</b></p>
  65471. <ul>
  65472. <li>active_topic<br>
  65473. Active\last restored topic name
  65474. </li>
  65475. <li>profile_count<br>
  65476. Count of all profiles including references.
  65477. </li>
  65478. </ul>
  65479. <a name="weekprofileattr"></a>
  65480. <b>Attributes</b>
  65481. <ul>
  65482. <li>widgetTranslations<br>
  65483. Comma seperated list of texts translations <german>:<translation>
  65484. <code>attr name widgetTranslations Abbrechen:Cancel,Speichern:Save</code>
  65485. </li>
  65486. <li>widgetWeekdays<br>
  65487. Comma seperated list of week days starting at Monday
  65488. <code>attr name widgetWeekdays Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday</code>
  65489. </li>
  65490. <li>widgetEditOnNewPage<br>
  65491. Editing the profile on a new html page if it is set to '1'
  65492. </li>
  65493. <li>widgetEditDaysInRow<br>
  65494. Count of visible days in on row during Edit. Default 2.<br>
  65495. </li>
  65496. <li>configFile<br>
  65497. Path and filename of the configuration file where the profiles will be stored
  65498. Default: ./log/weekprofile-<name>.cfg
  65499. </li>
  65500. <li>icon<br>
  65501. icon for edit<br>
  65502. Default: edit_settings
  65503. </li>
  65504. <li>useTopics<br>
  65505. Enable topics.<br>
  65506. Default: 0
  65507. </li>
  65508. <li>tempON<br>
  65509. Temperature for 'on'. e.g. 30
  65510. </li>
  65511. <li>tempOFF<br>
  65512. Temperature for 'off'. e.g. 4
  65513. </li>
  65514. </ul>
  65515. </ul>
  65516. <a name="withings"></a>
  65517. <h3>withings</h3>
  65518. <ul>
  65519. FHEM module for Withings devices.<br><br>
  65520. Notes:
  65521. <ul>
  65522. <li>JSON and Digest::SHA have to be installed on the FHEM host.</li>
  65523. </ul><br>
  65524. <a name="withings_Define"></a>
  65525. <b>Define</b>
  65526. <ul>
  65527. <code>define &lt;name&gt; withings ACCOUNT &lt;login@email&gt; &lt;password&gt;</code><br>
  65528. <code>define &lt;name&gt; withings &lt;device&gt;</code><br>
  65529. <br>
  65530. Defines a withings device.<br><br>
  65531. If a withings device of the account type is created all fhem devices for users and devices are automaticaly created.
  65532. <br>
  65533. Examples:
  65534. <ul>
  65535. <code>define withings withings ACCOUNT abc@test.com myPassword</code><br>
  65536. </ul>
  65537. </ul><br>
  65538. <a name="withings_Readings"></a>
  65539. <b>Readings</b>
  65540. <ul>
  65541. <li>height</li>
  65542. <li>weight</li>
  65543. <li>fatFreeMass</li>
  65544. <li>muscleRatio</li>
  65545. <li>fatMassWeight</li>
  65546. <li>fatRatio</li>
  65547. <li>boneMassWeight</li>
  65548. <li>boneRatio</li>
  65549. <li>hydration</li>
  65550. <li>diastolicBloodPressure</li>
  65551. <li>systolicBloodPressure</li>
  65552. <li>heartPulse</li>
  65553. <li>pulseWave</li>
  65554. <li>spo2</li>
  65555. <li>bodyTemperature</li>
  65556. <li>skinTemperature</li>
  65557. <li>temperature</li>
  65558. <li>dailySteps</li>
  65559. <li>dailyDistance</li>
  65560. <li>dailyElevation</li>
  65561. <li>dailyDescent</li>
  65562. <li>dailyDurationLight</li>
  65563. <li>dailyDurationModerate</li>
  65564. <li>dailyDurationIntense</li>
  65565. <li>dailyCaloriesActive</li>
  65566. <li>dailyCaloriesPassive</li>
  65567. <li>sleepDurationAwake</li>
  65568. <li>sleepDurationLight</li>
  65569. <li>sleepDurationDeep</li>
  65570. <li>sleepDurationREM</li>
  65571. <li>wakeupCount</li>
  65572. <li>co2</li>
  65573. <li>temperature</li>
  65574. <li>light</li>
  65575. <li>noise</li>
  65576. <li>voc</li>
  65577. <li>battery</li>
  65578. <li>batteryLevel</li>
  65579. </ul><br>
  65580. <a name="withings_Get"></a>
  65581. <b>Get</b>
  65582. <ul>
  65583. <li>update<br>
  65584. trigger an update</li>
  65585. </ul><br>
  65586. <a name="withings_Attr"></a>
  65587. <b>Attributes</b>
  65588. <ul>
  65589. <li>interval<br>
  65590. the interval in seconds used to check for new values.</li>
  65591. <li>disable<br>
  65592. 1 -> stop polling</li>
  65593. </ul>
  65594. </ul>
  65595. <a name="xxLG7000"></a>
  65596. <h3>xxLG7000</h3>
  65597. <ul>
  65598. <br>
  65599. <a name="xxLG7000define"></a>
  65600. <b>Define</b>
  65601. <ul>
  65602. <code>define &lt;name&gt; xxLG7000 &lt;serial-device&gt;</code>
  65603. <br><br>
  65604. Defines a serial link to a TV set of LG's xxLG70yy (e. g. 47LG7000) series
  65605. and similar TV sets from <a href="http://www.lge.com/">LG</a>. As of January 2010, the following TV sets should
  65606. be compatible:<br><br>
  65607. <ul>
  65608. <li><code>xxLG7000</code>, e. g. 47LG7000 (tested)</li>
  65609. <li><code>xxPG7000</code>, e. g. 50PG7000 (same Manual as 47LG7000 ;))</li>
  65610. <li><code>PS3000/6000/7000/8000 series</code> (according to <a href="http://www.lge.com/uk/products/documents/LGSV09-LR.pdf">LG brochure</a>; no liabilities assumed)</li>
  65611. <li><code>PQ3000/6000 series</code> (see PS3000)</li>
  65612. <li><code>LU4000/5000 series</code> (<i>not LU7000</i>; see PS3000)</li>
  65613. <li><code>LH2000/3000/4000/5000 series</code> (see PS3000)</li>
  65614. <li><code>SL9500/9000/8000 series</code> (see PS3000)</li>
  65615. </ul><br>
  65616. These TV sets feature a serial connector which can officially be used to control
  65617. the TV set (see your Onwer's Manual, there's an Appendix labelled "External Control
  65618. Device setup", referening to cabling and command set). The xxLG7000 module is
  65619. the FHEM module to actually utilize this. (BTW, those TVs run Linux internally ;))<br><br>
  65620. To exercise control over your TV set, use the <a href="#LGTV">LGTV</a> module and
  65621. bind it ("attr &lt;LGTV-name&gt; IODev &lt;xxLG7000-name&gt;") to xxLG7000.<br><br>
  65622. Examples:
  65623. <ul>
  65624. <code>define myLG7k xxLG7000 /dev/ttyUSB1</code><br>
  65625. </ul>
  65626. <br>
  65627. </ul>
  65628. <a name="xxLG7000set"></a>
  65629. <b>Set </b>
  65630. <ul> Not used, nothing to set directly. </ul>
  65631. <a name="xxLG7000get"></a>
  65632. <b>Get</b>
  65633. <ul> Not used, nothing to get directly. </ul>
  65634. <a name="xxLG7000attr"></a>
  65635. <b>Attributes</b>
  65636. <ul>
  65637. <li><a href="#loglevel">loglevel</a></li>
  65638. <li>SetID (1, 2, ...; see your TV's Owner's Manual how to set it. Defaults to 1 if unset.)</li>
  65639. </ul>
  65640. <br>
  65641. </ul>
  65642. <a name="yowsup"></a>
  65643. <h3>yowsup</h3>
  65644. <ul>
  65645. Module to interface to the yowsup library to send and recive WhatsApp messages.<br><br>
  65646. Notes:
  65647. <ul>
  65648. <li>Probably only works on linux/unix systems.</li>
  65649. </ul><br>
  65650. <a name="yowsup_Define"></a>
  65651. <b>Define</b>
  65652. <ul>
  65653. <code>define &lt;name&gt; yowsup</code><br>
  65654. <br>
  65655. Defines a yowsup device.<br><br>
  65656. Examples:
  65657. <ul>
  65658. <code>define WhatsApp yowsup</code><br>
  65659. </ul>
  65660. </ul><br>
  65661. <a name="yowsup_Set"></a>
  65662. <b>Set</b>
  65663. <ul>
  65664. <li>image [&lt;number&gt;] &lt;path&gt; [&lt;text&gt;]<br>
  65665. sends an image with optional text. &lt;number&gt; has to be given if sending via master device.</li>
  65666. <li>send [&lt;numner&gt;] &lt;text&gt;<br>
  65667. sends &lt;text&gt;. &lt;number&gt; has to be given if sending via master device.</li>
  65668. </ul><br>
  65669. <a name="yowsup_Attr"></a>
  65670. <b>Attributes</b>
  65671. <ul>
  65672. <li>cmd<br>
  65673. complette commandline to start the yowsup cli client<br>
  65674. eg: attr WhatsApp cmd /opt/local/bin/yowsup-cli demos -c /root/config.yowsup --yowsup</li>
  65675. <li>home<br>
  65676. set $HOME for the started yowsup process<br>
  65677. PWD -> set to $PWD<br>
  65678. anything else -> use as $HOME</li>
  65679. <li>nickname<br>
  65680. nickname that will be send as sender</li>
  65681. <li>acceptFrom<br>
  65682. comma separated list of contacts (numbers) from which messages will be accepted</li>
  65683. <li>commandPrefix<br>
  65684. not set -> don't accept commands<br>
  65685. 0 -> don't accept commands<br>
  65686. 1 -> allow commands, every message is interpreted as a fhem command<br>
  65687. anything else -> if the message starts with this prefix then everything after the prefix is taken as the command</li>
  65688. <li>allowedCommands<br>
  65689. A comma separated list of commands that are allowed from this contact.<br>
  65690. If set to an empty list <code>, (i.e. comma only)</code> no commands are accepted.<br>
  65691. <b>Note: </b>allowedCommands should work as intended, but no guarantee
  65692. can be given that there is no way to circumvent it.</li>
  65693. </ul>
  65694. </ul>
  65695. <a name="perl"></a>
  65696. <h3>Perl specials</h3>
  65697. If you want to automate some tasks via FHEM, then you'll probably use <a
  65698. href="#at">at</a> or <a href="#notify">notify</a>. For more complex tasks
  65699. you'll use either a shell-script or a perl "oneliner" as the at/notify
  65700. argument. This chapter gives some tips in using the perl oneliners.<br><br>
  65701. <li>To test the following perl oneliners, type them on the telnet prompt (or
  65702. FHEMWEB text input) by enclosing it in {}, one line at once. The last line
  65703. will only write something in the logfile, the output of the other lines is
  65704. directly visible.
  65705. <ul>
  65706. { "Hello" }<br>
  65707. { 1+3*4 }<br>
  65708. { `ls /etc` }<br>
  65709. { Log 1, "Hello" }<br>
  65710. </ul>
  65711. <br>
  65712. <li>
  65713. Perl expressions are separated by ;, in FHEM oneliners they have to
  65714. escaped with ;;<br>
  65715. <ul>
  65716. { my $a = 1+1;; Log 1, "Hello $a" }
  65717. </ul>
  65718. <br>
  65719. <li>To use FHEM commands from the perl expression, use the function fhem(),
  65720. which takes a string argument, this string will be evaluated as a FHEM
  65721. command:<br>
  65722. <ul>
  65723. { fhem "set light on" }<br>
  65724. define n1 notify piri:on { fhem "set light on" }
  65725. </ul>
  65726. Note: if this function returns a value, it will also be logged into the
  65727. global FHEM log. Use 1 as a second argument to disable this logging, this
  65728. makes sense when obtainig some values via FHEM "get...".
  65729. <br>
  65730. <br>
  65731. <li>Notify can be used to store macros for manual execution. Use the <a
  65732. href="#trigger">trigger</a> command to execute the macro:<br>
  65733. <ul>
  65734. define MyMacro notify MyMacro { Log 1, "Hello"}<br>
  65735. trigger MyMacro<br>
  65736. define MacroWithArg notify MyMacro { Log 1, "Hello %"}<br>
  65737. trigger MyMacro MyArg<br>
  65738. </ul>
  65739. <br>
  65740. <li>To make date and time handling easier, the variables $sec, $min, $hour,
  65741. $mday, $month, $year, $wday, $yday, $isdst are available in the perl
  65742. oneliners (see also perldoc -f localtime). Exceptions: $month is in the
  65743. range of 1 to 12, and $year is corrected by 1900 (as I would expect).
  65744. Additionally the variable $hms contains the time in the HH:MM:SS format and
  65745. $today the current date in YYYY-MM-DD format.
  65746. <br>
  65747. Additionally the variabe $we is 1 if it is weekend (i.e $wday == 0 or
  65748. $wday == 6), and 0 otherwise. If the <a href="#holiday2we">holida2we</a>
  65749. global attribute is set, $we is 1 for holidays too.<br>
  65750. <ul>
  65751. define n2 notify piri:on { if($hour &gt; 18 || $hour &lt; 5) {
  65752. fhem "set light on" } }<br>
  65753. define roll_en *07:45:00 { fhem "trigger SwitchAllRoll on" if(!$we) }<br>
  65754. define roll_en *08:30:00 { fhem "trigger SwitchAllRoll on" if($we) }<br>
  65755. </ul>
  65756. <br>
  65757. <li>
  65758. The following helper functions are defined in 99_Util.pm (which will
  65759. be loaded automatically, as every module with prefix 99):
  65760. <ul>
  65761. <li>min(a,b), max(a,b)</li>
  65762. <li>time_str2num("YYYY-MM-DD HH:MM:SS") returns a numerical value,
  65763. which makes computation of time differences easier</li>
  65764. <li>abstime2rel("HH:MM:SS") converts an absolute time to a relative one
  65765. </li>
  65766. </ul>
  65767. </li>
  65768. <li>
  65769. To access the device states/attributes, use the following functions:
  65770. <br>
  65771. <ul>
  65772. <li>Value(&lt;devicename&gt;)<br>
  65773. returns the state of the device (the string you see in paranthesis in
  65774. the output of the list command).
  65775. </li><br>
  65776. <li>OldValue(&lt;devicename&gt;)
  65777. <li>OldTimestamp(&lt;devicename&gt;)<br>
  65778. returns the old value/timestamp of the device.
  65779. </li><br>
  65780. <li>
  65781. ReadingsVal(&lt;devicename&gt;,&lt;reading&gt;,&lt;defaultvalue&gt;)<br>
  65782. Return the reading (the value in the Readings section of "list device")
  65783. </li><br>
  65784. <li>
  65785. ReadingsNum(&lt;devicename&gt;,&lt;reading&gt;,
  65786. &lt;defaultvalue&gt;,&lt;round&gt;)<br>
  65787. Return the first number from a reading value.
  65788. Round id to &lt;round&gt; devimal places (optional parameter).
  65789. </li><br>
  65790. <li>ReadingsTimestamp(&lt;devicename&gt;,&lt;reading&gt;,&lt;
  65791. defaultvalue&gt;)<br>
  65792. returns the timestamp of the reading.
  65793. </li><br>
  65794. <li>ReadingsAge(&lt;devicename&gt;,&lt;reading&gt;,&lt;defaultvalue&gt;)
  65795. <br>
  65796. returns the age of the reading in seconds.
  65797. </li><br>
  65798. <li>
  65799. AttrVal(&lt;devicename&gt;,&lt;attribute&gt;,&lt;defaultvalue&gt;)<br>
  65800. Return the attribute of the device
  65801. <br><br>
  65802. { Value("wz") }<br>
  65803. { OldValue("wz") }<br>
  65804. { time_str2num(OldTimestamp("wz")) }<br>
  65805. { ReadingsVal("wz", "measured-temp", "20")+0 }<br>
  65806. { ReadingsTimestamp("wz", "measured-temp", 0)}<br>
  65807. { AttrVal("wz", "room", "none") }<br>
  65808. </li><br>
  65809. <li>
  65810. AttrNum(&lt;devicename&gt;,&lt;attribute&gt;,
  65811. &lt;defaultvalue&gt;,&lt;round&gt;)<br>
  65812. Return the first number from an attribute value.
  65813. Round id to &lt;round&gt; devimal places (optional parameter).
  65814. </li><br>
  65815. <li>
  65816. InternalVal(&lt;devicename&gt;,&lt;property&gt;,&lt;defaultvalue&gt;)
  65817. <br>
  65818. Return the internal value (the value in the Internals section of "list
  65819. device").
  65820. </li><br>
  65821. <li>
  65822. InternalNum(&lt;devicename&gt;,&lt;property&gt;,
  65823. &lt;defaultvalue&gt;,&lt;round&gt;)<br>
  65824. Return the first number from an internal value.
  65825. Round id to &lt;round&gt; devimal places (optional parameter).
  65826. </li><br>
  65827. </ul>
  65828. <li>
  65829. By using the 99_SUNRISE_EL.pm module, you have access to the following
  65830. functions: <br>
  65831. <ul>
  65832. sunset($offset, $min, $max)<br>
  65833. sunrise($offset, $min, $max)<br>
  65834. isday()<br>
  65835. </ul>
  65836. offset is in seconds, and the format of min/max is "HH:MM" or "HH:MM:SS".
  65837. isday returns 1 if the sun is visible, and 0 else.
  65838. </li>
  65839. <br>
  65840. <br>
  65841. <!-- perl end - diese Zeile nicht entfernen! -->
  65842. <a name="gnuplot-syntax"></a>
  65843. <h3>gnuplot file syntax</h3>
  65844. The .gplot files are also used by the <a href="#FHEMWEB">FHEMWEB</a>/SVG module
  65845. when the <a href="#plotmode">plotmode</a> attribute is set to SVG. In this case
  65846. only a subset of the .gnuplot attributes are used, and some lines have special
  65847. meanings: the difference will be explained in this chapter. See also <a
  65848. href="http://wiki.fhem.de/wiki/Creating_Plots">this</a> FHEM Wiki entry on
  65849. creating logs.<br>
  65850. Following is a minimal .gplot definition (valid only for plotmode SVG):<br>
  65851. <pre>
  65852. set terminal size &lt;SIZE&gt;
  65853. #FileLog 4:::
  65854. plot title 'Temperature' with lines
  65855. </pre>
  65856. The .gnuplot file consists of 3 parts:
  65857. <ul>
  65858. <li>set commands<br>
  65859. Following sets are recognized:
  65860. <ul>
  65861. <li>terminal, only the size parameter.<br>
  65862. This is usually set to &lt;SIZE&gt;, which is replaced by the <a
  65863. href="#plotsize">plotsize</a> attribute of the FHEMWEB or weblink
  65864. instance.</li>
  65865. <li>title<br>
  65866. Usually set to &lt;TL&gt; which is replace by the weblink <a
  65867. href="#title">title</a> attribute, or to &lt;Lx&gt;, which is replaced
  65868. by the weblink <a href="#label">label</a> attribute.</li>
  65869. <li>ylabel,y2label<br>
  65870. Left and right labels, printed vertically. Are also subject to label
  65871. replacement.</li>
  65872. <li>yrange,y2range<br>
  65873. Specify the range of the left and right axis. Examples:<br>
  65874. <ul>
  65875. set yrange [-0.1:1.1]<br>
  65876. set y2range [0:]<br>
  65877. </ul>
  65878. </li>
  65879. <li>ytics,y2tics<br>
  65880. the label for the left/right axis tics. Examples:<br>
  65881. <ul>
  65882. set ytics ("on" 0, "off" 1)<br>
  65883. set y2tics<br>
  65884. </ul>
  65885. </li>
  65886. </ul>
  65887. </li>
  65888. <br>
  65889. <li>#FileLog entries<br>
  65890. Each line from the plot section must have one corresponding #FileLog
  65891. line. For the syntax see the column_spec paragraph of the <a
  65892. href="#FileLogget">Filelog get</a> description.
  65893. Note that for SVG plots the first column of the input file always has to
  65894. be in the standard fhem timestamp format (YYYY-MM-DD_HH:MM:SS)
  65895. </li>
  65896. <br>
  65897. <li>plot entries<br>
  65898. There is always one plot command with comma separated argument-blocks.
  65899. Each argument-block represents one line, and has its own parameters.
  65900. Following parameters are recognized:
  65901. <ul>
  65902. <li>axes x1y1 / x1y2<br>
  65903. tells the program to assign the current line to one of the two axes
  65904. (left or right).
  65905. </li>
  65906. <li>title<br>
  65907. Caption of the line. Whan clicking on this title, a small javascript
  65908. program will change the title to the min/max and last values of the plot,
  65909. will enable copying this line or pasting an already copied one (the
  65910. existing scale of the plot wont'be changed, only the pasted line will
  65911. be scaled), and other lines of the plot will temporarily be hidden.
  65912. </li>
  65913. <li>with &lt;linetype&gt;<br>
  65914. Specify the line type. Following types are recognized: points,
  65915. steps, fsteps, histeps and lines. Everything unknown will be mapped to
  65916. the type lines.
  65917. SVG special: cubic and quadratic, are mapped to the SVG path types C,
  65918. and Q respectively.
  65919. </li>
  65920. <li>ls &lt;linestyle&gt;<br>
  65921. The linestyle defaults to l0 for the first line, l1 for the second, and
  65922. so on. It is defined in the svg_style.css file. There are two sets
  65923. defined here: l0-l8 and l0fill-l6fill. The second set must be specified
  65924. explicitly. If the name of the linestyle contains the word fill, then
  65925. plots of the lineytype "lines" will have an additional starting and
  65926. ending segment, so that filling is done correctly.<br>
  65927. See the SVG spec for details of this CSS file.
  65928. Note: if you plan to use this attribute, you have to specify it for all
  65929. the lines (attribute-blocks) in the plot command.
  65930. </li>
  65931. <li>lw &lt;linewidth&gt;<br>
  65932. Sets the stroke-width style of the line. This attribute is deprecated,
  65933. the corresponding feature of the CSS file / (attribute ls) should be
  65934. used instead.
  65935. </li>
  65936. </ul>
  65937. </ul>
  65938. </li>
  65939. </div> <!-- right -->
  65940. </body>
  65941. </html>