| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001570025700357004570055700657007570085700957010570115701257013570145701557016570175701857019570205702157022570235702457025570265702757028570295703057031570325703357034570355703657037570385703957040570415704257043570445704557046570475704857049570505705157052570535705457055570565705757058570595706057061570625706357064570655706657067570685706957070570715707257073570745707557076570775707857079570805708157082570835708457085570865708757088570895709057091570925709357094570955709657097570985709957100571015710257103571045710557106571075710857109571105711157112571135711457115571165711757118571195712057121571225712357124571255712657127571285712957130571315713257133571345713557136571375713857139571405714157142571435714457145571465714757148571495715057151571525715357154571555715657157571585715957160571615716257163571645716557166571675716857169571705717157172571735717457175571765717757178571795718057181571825718357184571855718657187571885718957190571915719257193571945719557196571975719857199572005720157202572035720457205572065720757208572095721057211572125721357214572155721657217572185721957220572215722257223572245722557226572275722857229572305723157232572335723457235572365723757238572395724057241572425724357244572455724657247572485724957250572515725257253572545725557256572575725857259572605726157262572635726457265572665726757268572695727057271572725727357274572755727657277572785727957280572815728257283572845728557286572875728857289572905729157292572935729457295572965729757298572995730057301573025730357304573055730657307573085730957310573115731257313573145731557316573175731857319573205732157322573235732457325573265732757328573295733057331573325733357334573355733657337573385733957340573415734257343573445734557346573475734857349573505735157352573535735457355573565735757358573595736057361573625736357364573655736657367573685736957370573715737257373573745737557376573775737857379573805738157382573835738457385573865738757388573895739057391573925739357394573955739657397573985739957400574015740257403574045740557406574075740857409574105741157412574135741457415574165741757418574195742057421574225742357424574255742657427574285742957430574315743257433574345743557436574375743857439574405744157442574435744457445574465744757448574495745057451574525745357454574555745657457574585745957460574615746257463574645746557466574675746857469574705747157472574735747457475574765747757478574795748057481574825748357484574855748657487574885748957490574915749257493574945749557496574975749857499575005750157502575035750457505575065750757508575095751057511575125751357514575155751657517575185751957520575215752257523575245752557526575275752857529575305753157532575335753457535575365753757538575395754057541575425754357544575455754657547575485754957550575515755257553575545755557556575575755857559575605756157562575635756457565575665756757568575695757057571575725757357574575755757657577575785757957580575815758257583575845758557586575875758857589575905759157592575935759457595575965759757598575995760057601576025760357604576055760657607576085760957610576115761257613576145761557616576175761857619576205762157622576235762457625576265762757628576295763057631576325763357634576355763657637576385763957640576415764257643576445764557646576475764857649576505765157652576535765457655576565765757658576595766057661576625766357664576655766657667576685766957670576715767257673576745767557676576775767857679576805768157682576835768457685576865768757688576895769057691576925769357694576955769657697576985769957700577015770257703577045770557706577075770857709577105771157712577135771457715577165771757718577195772057721577225772357724577255772657727577285772957730577315773257733577345773557736577375773857739577405774157742577435774457745577465774757748577495775057751577525775357754577555775657757577585775957760577615776257763577645776557766577675776857769577705777157772577735777457775577765777757778577795778057781577825778357784577855778657787577885778957790577915779257793577945779557796577975779857799578005780157802578035780457805578065780757808578095781057811578125781357814578155781657817578185781957820578215782257823578245782557826578275782857829578305783157832578335783457835578365783757838578395784057841578425784357844578455784657847578485784957850578515785257853578545785557856578575785857859578605786157862578635786457865578665786757868578695787057871578725787357874578755787657877578785787957880578815788257883578845788557886578875788857889578905789157892578935789457895578965789757898578995790057901579025790357904579055790657907579085790957910579115791257913579145791557916579175791857919579205792157922579235792457925579265792757928579295793057931579325793357934579355793657937579385793957940579415794257943579445794557946579475794857949579505795157952579535795457955579565795757958579595796057961579625796357964579655796657967579685796957970579715797257973579745797557976579775797857979579805798157982579835798457985579865798757988579895799057991579925799357994579955799657997579985799958000580015800258003580045800558006580075800858009580105801158012580135801458015580165801758018580195802058021580225802358024580255802658027580285802958030580315803258033580345803558036580375803858039580405804158042580435804458045580465804758048580495805058051580525805358054580555805658057580585805958060580615806258063580645806558066580675806858069580705807158072580735807458075580765807758078580795808058081580825808358084580855808658087580885808958090580915809258093580945809558096580975809858099581005810158102581035810458105581065810758108581095811058111581125811358114581155811658117581185811958120581215812258123581245812558126581275812858129581305813158132581335813458135581365813758138581395814058141581425814358144581455814658147581485814958150581515815258153581545815558156581575815858159581605816158162581635816458165581665816758168581695817058171581725817358174581755817658177581785817958180581815818258183581845818558186581875818858189581905819158192581935819458195581965819758198581995820058201582025820358204582055820658207582085820958210582115821258213582145821558216582175821858219582205822158222582235822458225582265822758228582295823058231582325823358234582355823658237582385823958240582415824258243582445824558246582475824858249582505825158252582535825458255582565825758258582595826058261582625826358264582655826658267582685826958270582715827258273582745827558276582775827858279582805828158282582835828458285582865828758288582895829058291582925829358294582955829658297582985829958300583015830258303583045830558306583075830858309583105831158312583135831458315583165831758318583195832058321583225832358324583255832658327583285832958330583315833258333583345833558336583375833858339583405834158342583435834458345583465834758348583495835058351583525835358354583555835658357583585835958360583615836258363583645836558366583675836858369583705837158372583735837458375583765837758378583795838058381583825838358384583855838658387583885838958390583915839258393583945839558396583975839858399584005840158402584035840458405584065840758408584095841058411584125841358414584155841658417584185841958420584215842258423584245842558426584275842858429584305843158432584335843458435584365843758438584395844058441584425844358444584455844658447584485844958450584515845258453584545845558456584575845858459584605846158462584635846458465584665846758468584695847058471584725847358474584755847658477584785847958480584815848258483584845848558486584875848858489584905849158492584935849458495584965849758498584995850058501585025850358504585055850658507585085850958510585115851258513585145851558516585175851858519585205852158522585235852458525585265852758528585295853058531585325853358534585355853658537585385853958540585415854258543585445854558546585475854858549585505855158552585535855458555585565855758558585595856058561585625856358564585655856658567585685856958570585715857258573585745857558576585775857858579585805858158582585835858458585585865858758588585895859058591585925859358594585955859658597585985859958600586015860258603586045860558606586075860858609586105861158612586135861458615586165861758618586195862058621586225862358624586255862658627586285862958630586315863258633586345863558636586375863858639586405864158642586435864458645586465864758648586495865058651586525865358654586555865658657586585865958660586615866258663586645866558666586675866858669586705867158672586735867458675586765867758678586795868058681586825868358684586855868658687586885868958690586915869258693586945869558696586975869858699587005870158702587035870458705587065870758708587095871058711587125871358714587155871658717587185871958720587215872258723587245872558726587275872858729587305873158732587335873458735587365873758738587395874058741587425874358744587455874658747587485874958750587515875258753587545875558756587575875858759587605876158762587635876458765587665876758768587695877058771587725877358774587755877658777587785877958780587815878258783587845878558786587875878858789587905879158792587935879458795587965879758798587995880058801588025880358804588055880658807588085880958810588115881258813588145881558816588175881858819588205882158822588235882458825588265882758828588295883058831588325883358834588355883658837588385883958840588415884258843588445884558846588475884858849588505885158852588535885458855588565885758858588595886058861588625886358864588655886658867588685886958870588715887258873588745887558876588775887858879588805888158882588835888458885588865888758888588895889058891588925889358894588955889658897588985889958900589015890258903589045890558906589075890858909589105891158912589135891458915589165891758918589195892058921589225892358924589255892658927589285892958930589315893258933589345893558936589375893858939589405894158942589435894458945589465894758948589495895058951589525895358954589555895658957589585895958960589615896258963589645896558966589675896858969589705897158972589735897458975589765897758978589795898058981589825898358984589855898658987589885898958990589915899258993589945899558996589975899858999590005900159002590035900459005590065900759008590095901059011590125901359014590155901659017590185901959020590215902259023590245902559026590275902859029590305903159032590335903459035590365903759038590395904059041590425904359044590455904659047590485904959050590515905259053590545905559056590575905859059590605906159062590635906459065590665906759068590695907059071590725907359074590755907659077590785907959080590815908259083590845908559086590875908859089590905909159092590935909459095590965909759098590995910059101591025910359104591055910659107591085910959110591115911259113591145911559116591175911859119591205912159122591235912459125591265912759128591295913059131591325913359134591355913659137591385913959140591415914259143591445914559146591475914859149591505915159152591535915459155591565915759158591595916059161591625916359164591655916659167591685916959170591715917259173591745917559176591775917859179591805918159182591835918459185591865918759188591895919059191591925919359194591955919659197591985919959200592015920259203592045920559206592075920859209592105921159212592135921459215592165921759218592195922059221592225922359224592255922659227592285922959230592315923259233592345923559236592375923859239592405924159242592435924459245592465924759248592495925059251592525925359254592555925659257592585925959260592615926259263592645926559266592675926859269592705927159272592735927459275592765927759278592795928059281592825928359284592855928659287592885928959290592915929259293592945929559296592975929859299593005930159302593035930459305593065930759308593095931059311593125931359314593155931659317593185931959320593215932259323593245932559326593275932859329593305933159332593335933459335593365933759338593395934059341593425934359344593455934659347593485934959350593515935259353593545935559356593575935859359593605936159362593635936459365593665936759368593695937059371593725937359374593755937659377593785937959380593815938259383593845938559386593875938859389593905939159392593935939459395593965939759398593995940059401594025940359404594055940659407594085940959410594115941259413594145941559416594175941859419594205942159422594235942459425594265942759428594295943059431594325943359434594355943659437594385943959440594415944259443594445944559446594475944859449594505945159452594535945459455594565945759458594595946059461594625946359464594655946659467594685946959470594715947259473594745947559476594775947859479594805948159482594835948459485594865948759488594895949059491594925949359494594955949659497594985949959500595015950259503595045950559506595075950859509595105951159512595135951459515595165951759518595195952059521595225952359524595255952659527595285952959530595315953259533595345953559536595375953859539595405954159542595435954459545595465954759548595495955059551595525955359554595555955659557595585955959560595615956259563595645956559566595675956859569595705957159572595735957459575595765957759578595795958059581595825958359584595855958659587595885958959590595915959259593595945959559596595975959859599596005960159602596035960459605596065960759608596095961059611596125961359614596155961659617596185961959620596215962259623596245962559626596275962859629596305963159632596335963459635596365963759638596395964059641596425964359644596455964659647596485964959650596515965259653596545965559656596575965859659596605966159662596635966459665596665966759668596695967059671596725967359674596755967659677596785967959680596815968259683596845968559686596875968859689596905969159692596935969459695596965969759698596995970059701597025970359704597055970659707597085970959710597115971259713597145971559716597175971859719597205972159722597235972459725597265972759728597295973059731597325973359734597355973659737597385973959740597415974259743597445974559746597475974859749597505975159752597535975459755597565975759758597595976059761597625976359764597655976659767597685976959770597715977259773597745977559776597775977859779597805978159782597835978459785597865978759788597895979059791597925979359794597955979659797597985979959800598015980259803598045980559806598075980859809598105981159812598135981459815598165981759818598195982059821598225982359824598255982659827598285982959830598315983259833598345983559836598375983859839598405984159842598435984459845598465984759848598495985059851598525985359854598555985659857598585985959860598615986259863598645986559866598675986859869598705987159872598735987459875598765987759878598795988059881598825988359884598855988659887598885988959890598915989259893598945989559896598975989859899599005990159902599035990459905599065990759908599095991059911599125991359914599155991659917599185991959920599215992259923599245992559926599275992859929599305993159932599335993459935599365993759938599395994059941599425994359944599455994659947599485994959950599515995259953599545995559956599575995859959599605996159962599635996459965599665996759968599695997059971599725997359974599755997659977599785997959980599815998259983599845998559986599875998859989599905999159992599935999459995599965999759998599996000060001600026000360004600056000660007600086000960010600116001260013600146001560016600176001860019600206002160022600236002460025600266002760028600296003060031600326003360034600356003660037600386003960040600416004260043600446004560046600476004860049600506005160052600536005460055600566005760058600596006060061600626006360064600656006660067600686006960070600716007260073600746007560076600776007860079600806008160082600836008460085600866008760088600896009060091600926009360094600956009660097600986009960100601016010260103601046010560106601076010860109601106011160112601136011460115601166011760118601196012060121601226012360124601256012660127601286012960130601316013260133601346013560136601376013860139601406014160142601436014460145601466014760148601496015060151601526015360154601556015660157601586015960160601616016260163601646016560166601676016860169601706017160172601736017460175601766017760178601796018060181601826018360184601856018660187601886018960190601916019260193601946019560196601976019860199602006020160202602036020460205602066020760208602096021060211602126021360214602156021660217602186021960220602216022260223602246022560226602276022860229602306023160232602336023460235602366023760238602396024060241602426024360244602456024660247602486024960250602516025260253602546025560256602576025860259602606026160262602636026460265602666026760268602696027060271602726027360274602756027660277602786027960280602816028260283602846028560286602876028860289602906029160292602936029460295602966029760298602996030060301603026030360304603056030660307603086030960310603116031260313603146031560316603176031860319603206032160322603236032460325603266032760328603296033060331603326033360334603356033660337603386033960340603416034260343603446034560346603476034860349603506035160352603536035460355603566035760358603596036060361603626036360364603656036660367603686036960370603716037260373603746037560376603776037860379603806038160382603836038460385603866038760388603896039060391603926039360394603956039660397603986039960400604016040260403604046040560406604076040860409604106041160412604136041460415604166041760418604196042060421604226042360424604256042660427604286042960430604316043260433604346043560436604376043860439604406044160442604436044460445604466044760448604496045060451604526045360454604556045660457604586045960460604616046260463604646046560466604676046860469604706047160472604736047460475604766047760478604796048060481604826048360484604856048660487604886048960490604916049260493604946049560496604976049860499605006050160502605036050460505605066050760508605096051060511605126051360514605156051660517605186051960520605216052260523605246052560526605276052860529605306053160532605336053460535605366053760538605396054060541605426054360544605456054660547605486054960550605516055260553605546055560556605576055860559605606056160562605636056460565605666056760568605696057060571605726057360574605756057660577605786057960580605816058260583605846058560586605876058860589605906059160592605936059460595605966059760598605996060060601606026060360604606056060660607606086060960610606116061260613606146061560616606176061860619606206062160622606236062460625606266062760628606296063060631606326063360634606356063660637606386063960640606416064260643606446064560646606476064860649606506065160652606536065460655606566065760658606596066060661606626066360664606656066660667606686066960670606716067260673606746067560676606776067860679606806068160682606836068460685606866068760688606896069060691606926069360694606956069660697606986069960700607016070260703607046070560706607076070860709607106071160712607136071460715607166071760718607196072060721607226072360724607256072660727607286072960730607316073260733607346073560736607376073860739607406074160742607436074460745607466074760748607496075060751607526075360754607556075660757607586075960760607616076260763607646076560766607676076860769607706077160772607736077460775607766077760778607796078060781607826078360784607856078660787607886078960790607916079260793607946079560796607976079860799608006080160802608036080460805608066080760808608096081060811608126081360814608156081660817608186081960820608216082260823608246082560826608276082860829608306083160832608336083460835608366083760838608396084060841608426084360844608456084660847608486084960850608516085260853608546085560856608576085860859608606086160862608636086460865608666086760868608696087060871608726087360874608756087660877608786087960880608816088260883608846088560886608876088860889608906089160892608936089460895608966089760898608996090060901609026090360904609056090660907609086090960910609116091260913609146091560916609176091860919609206092160922609236092460925609266092760928609296093060931609326093360934609356093660937609386093960940609416094260943609446094560946609476094860949609506095160952609536095460955609566095760958609596096060961609626096360964609656096660967609686096960970609716097260973609746097560976609776097860979609806098160982609836098460985609866098760988609896099060991609926099360994609956099660997609986099961000610016100261003610046100561006610076100861009610106101161012610136101461015610166101761018610196102061021610226102361024610256102661027610286102961030610316103261033610346103561036610376103861039610406104161042610436104461045610466104761048610496105061051610526105361054610556105661057610586105961060610616106261063610646106561066610676106861069610706107161072610736107461075610766107761078610796108061081610826108361084610856108661087610886108961090610916109261093610946109561096610976109861099611006110161102611036110461105611066110761108611096111061111611126111361114611156111661117611186111961120611216112261123611246112561126611276112861129611306113161132611336113461135611366113761138611396114061141611426114361144611456114661147611486114961150611516115261153611546115561156611576115861159611606116161162611636116461165611666116761168611696117061171611726117361174611756117661177611786117961180611816118261183611846118561186611876118861189611906119161192611936119461195611966119761198611996120061201612026120361204612056120661207612086120961210612116121261213612146121561216612176121861219612206122161222612236122461225612266122761228612296123061231612326123361234612356123661237612386123961240612416124261243612446124561246612476124861249612506125161252612536125461255612566125761258612596126061261612626126361264612656126661267612686126961270612716127261273612746127561276612776127861279612806128161282612836128461285612866128761288612896129061291612926129361294612956129661297612986129961300613016130261303613046130561306613076130861309613106131161312613136131461315613166131761318613196132061321613226132361324613256132661327613286132961330613316133261333613346133561336613376133861339613406134161342613436134461345613466134761348613496135061351613526135361354613556135661357613586135961360613616136261363613646136561366613676136861369613706137161372613736137461375613766137761378613796138061381613826138361384613856138661387613886138961390613916139261393613946139561396613976139861399614006140161402614036140461405614066140761408614096141061411614126141361414614156141661417614186141961420614216142261423614246142561426614276142861429614306143161432614336143461435614366143761438614396144061441614426144361444614456144661447614486144961450614516145261453614546145561456614576145861459614606146161462614636146461465614666146761468614696147061471614726147361474614756147661477614786147961480614816148261483614846148561486614876148861489614906149161492614936149461495614966149761498614996150061501615026150361504615056150661507615086150961510615116151261513615146151561516615176151861519615206152161522615236152461525615266152761528615296153061531615326153361534615356153661537615386153961540615416154261543615446154561546615476154861549615506155161552615536155461555615566155761558615596156061561615626156361564615656156661567615686156961570615716157261573615746157561576615776157861579615806158161582615836158461585615866158761588615896159061591615926159361594615956159661597615986159961600616016160261603616046160561606616076160861609616106161161612616136161461615616166161761618616196162061621616226162361624616256162661627616286162961630616316163261633616346163561636616376163861639616406164161642616436164461645616466164761648616496165061651616526165361654616556165661657616586165961660616616166261663616646166561666616676166861669616706167161672616736167461675616766167761678616796168061681616826168361684616856168661687616886168961690616916169261693616946169561696616976169861699617006170161702617036170461705617066170761708617096171061711617126171361714617156171661717617186171961720617216172261723617246172561726617276172861729617306173161732617336173461735617366173761738617396174061741617426174361744617456174661747617486174961750617516175261753617546175561756617576175861759617606176161762617636176461765617666176761768617696177061771617726177361774617756177661777617786177961780617816178261783617846178561786617876178861789617906179161792617936179461795617966179761798617996180061801618026180361804618056180661807618086180961810618116181261813618146181561816618176181861819618206182161822618236182461825618266182761828618296183061831618326183361834618356183661837618386183961840618416184261843618446184561846618476184861849618506185161852618536185461855618566185761858618596186061861618626186361864618656186661867618686186961870618716187261873618746187561876618776187861879618806188161882618836188461885618866188761888618896189061891618926189361894618956189661897618986189961900619016190261903619046190561906619076190861909619106191161912619136191461915619166191761918619196192061921619226192361924619256192661927619286192961930619316193261933619346193561936619376193861939619406194161942619436194461945619466194761948619496195061951619526195361954619556195661957619586195961960619616196261963619646196561966619676196861969619706197161972619736197461975619766197761978619796198061981619826198361984619856198661987619886198961990619916199261993619946199561996619976199861999620006200162002620036200462005620066200762008620096201062011620126201362014620156201662017620186201962020620216202262023620246202562026620276202862029620306203162032620336203462035620366203762038620396204062041620426204362044620456204662047620486204962050620516205262053620546205562056620576205862059620606206162062620636206462065620666206762068620696207062071620726207362074620756207662077620786207962080620816208262083620846208562086620876208862089620906209162092620936209462095620966209762098620996210062101621026210362104621056210662107621086210962110621116211262113621146211562116621176211862119621206212162122621236212462125621266212762128621296213062131621326213362134621356213662137621386213962140621416214262143621446214562146621476214862149621506215162152621536215462155621566215762158621596216062161621626216362164621656216662167621686216962170621716217262173621746217562176621776217862179621806218162182621836218462185621866218762188621896219062191621926219362194621956219662197621986219962200622016220262203622046220562206622076220862209622106221162212622136221462215622166221762218622196222062221622226222362224622256222662227622286222962230622316223262233622346223562236622376223862239622406224162242622436224462245622466224762248622496225062251622526225362254622556225662257622586225962260622616226262263622646226562266622676226862269622706227162272622736227462275622766227762278622796228062281622826228362284622856228662287622886228962290622916229262293622946229562296622976229862299623006230162302623036230462305623066230762308623096231062311623126231362314623156231662317623186231962320623216232262323623246232562326623276232862329623306233162332623336233462335623366233762338623396234062341623426234362344623456234662347623486234962350623516235262353623546235562356623576235862359623606236162362623636236462365623666236762368623696237062371623726237362374623756237662377623786237962380623816238262383623846238562386623876238862389623906239162392623936239462395623966239762398623996240062401624026240362404624056240662407624086240962410624116241262413624146241562416624176241862419624206242162422624236242462425624266242762428624296243062431624326243362434624356243662437624386243962440624416244262443624446244562446624476244862449624506245162452624536245462455624566245762458624596246062461624626246362464624656246662467624686246962470624716247262473624746247562476624776247862479624806248162482624836248462485624866248762488624896249062491624926249362494624956249662497624986249962500625016250262503625046250562506625076250862509625106251162512625136251462515625166251762518625196252062521625226252362524625256252662527625286252962530625316253262533625346253562536625376253862539625406254162542625436254462545625466254762548625496255062551625526255362554625556255662557625586255962560625616256262563625646256562566625676256862569625706257162572625736257462575625766257762578625796258062581625826258362584625856258662587625886258962590625916259262593625946259562596625976259862599626006260162602626036260462605626066260762608626096261062611626126261362614626156261662617626186261962620626216262262623626246262562626626276262862629626306263162632626336263462635626366263762638626396264062641626426264362644626456264662647626486264962650626516265262653626546265562656626576265862659626606266162662626636266462665626666266762668626696267062671626726267362674626756267662677626786267962680626816268262683626846268562686626876268862689626906269162692626936269462695626966269762698626996270062701627026270362704627056270662707627086270962710627116271262713627146271562716627176271862719627206272162722627236272462725627266272762728627296273062731627326273362734627356273662737627386273962740627416274262743627446274562746627476274862749627506275162752627536275462755627566275762758627596276062761627626276362764627656276662767627686276962770627716277262773627746277562776627776277862779627806278162782627836278462785627866278762788627896279062791627926279362794627956279662797627986279962800628016280262803628046280562806628076280862809628106281162812628136281462815628166281762818628196282062821628226282362824628256282662827628286282962830628316283262833628346283562836628376283862839628406284162842628436284462845628466284762848628496285062851628526285362854628556285662857628586285962860628616286262863628646286562866628676286862869628706287162872628736287462875628766287762878628796288062881628826288362884628856288662887628886288962890628916289262893628946289562896628976289862899629006290162902629036290462905629066290762908629096291062911629126291362914629156291662917629186291962920629216292262923629246292562926629276292862929629306293162932629336293462935629366293762938629396294062941629426294362944629456294662947629486294962950629516295262953629546295562956629576295862959629606296162962629636296462965629666296762968629696297062971629726297362974629756297662977629786297962980629816298262983629846298562986629876298862989629906299162992629936299462995629966299762998629996300063001630026300363004630056300663007630086300963010630116301263013630146301563016630176301863019630206302163022630236302463025630266302763028630296303063031630326303363034630356303663037630386303963040630416304263043630446304563046630476304863049630506305163052630536305463055630566305763058630596306063061630626306363064630656306663067630686306963070630716307263073630746307563076630776307863079630806308163082630836308463085630866308763088630896309063091630926309363094630956309663097630986309963100631016310263103631046310563106631076310863109631106311163112631136311463115631166311763118631196312063121631226312363124631256312663127631286312963130631316313263133631346313563136631376313863139631406314163142631436314463145631466314763148631496315063151631526315363154631556315663157631586315963160631616316263163631646316563166631676316863169631706317163172631736317463175631766317763178631796318063181631826318363184631856318663187631886318963190631916319263193631946319563196631976319863199632006320163202632036320463205632066320763208632096321063211632126321363214632156321663217632186321963220632216322263223632246322563226632276322863229632306323163232632336323463235632366323763238632396324063241632426324363244632456324663247632486324963250632516325263253632546325563256632576325863259632606326163262632636326463265632666326763268632696327063271632726327363274632756327663277632786327963280632816328263283632846328563286632876328863289632906329163292632936329463295632966329763298632996330063301633026330363304633056330663307633086330963310633116331263313633146331563316633176331863319633206332163322633236332463325633266332763328633296333063331633326333363334633356333663337633386333963340633416334263343633446334563346633476334863349633506335163352633536335463355633566335763358633596336063361633626336363364633656336663367633686336963370633716337263373633746337563376633776337863379633806338163382633836338463385633866338763388633896339063391633926339363394633956339663397633986339963400634016340263403634046340563406634076340863409634106341163412634136341463415634166341763418634196342063421634226342363424634256342663427634286342963430634316343263433634346343563436634376343863439634406344163442634436344463445634466344763448634496345063451634526345363454634556345663457634586345963460634616346263463634646346563466634676346863469634706347163472634736347463475634766347763478634796348063481634826348363484634856348663487634886348963490634916349263493634946349563496634976349863499635006350163502635036350463505635066350763508635096351063511635126351363514635156351663517635186351963520635216352263523635246352563526635276352863529635306353163532635336353463535635366353763538635396354063541635426354363544635456354663547635486354963550635516355263553635546355563556635576355863559635606356163562635636356463565635666356763568635696357063571635726357363574635756357663577635786357963580635816358263583635846358563586635876358863589635906359163592635936359463595635966359763598635996360063601636026360363604636056360663607636086360963610636116361263613636146361563616636176361863619636206362163622636236362463625636266362763628636296363063631636326363363634636356363663637636386363963640636416364263643636446364563646636476364863649636506365163652636536365463655636566365763658636596366063661636626366363664636656366663667636686366963670636716367263673636746367563676636776367863679636806368163682636836368463685636866368763688636896369063691636926369363694636956369663697636986369963700637016370263703637046370563706637076370863709637106371163712637136371463715637166371763718637196372063721637226372363724637256372663727637286372963730637316373263733637346373563736637376373863739637406374163742637436374463745637466374763748637496375063751637526375363754637556375663757637586375963760637616376263763637646376563766637676376863769637706377163772637736377463775637766377763778637796378063781637826378363784637856378663787637886378963790637916379263793637946379563796637976379863799638006380163802638036380463805638066380763808638096381063811638126381363814638156381663817638186381963820638216382263823638246382563826638276382863829638306383163832638336383463835638366383763838638396384063841638426384363844638456384663847638486384963850638516385263853638546385563856638576385863859638606386163862638636386463865638666386763868638696387063871638726387363874638756387663877638786387963880638816388263883638846388563886638876388863889638906389163892638936389463895638966389763898638996390063901639026390363904639056390663907639086390963910639116391263913639146391563916639176391863919639206392163922639236392463925639266392763928639296393063931639326393363934639356393663937639386393963940639416394263943639446394563946639476394863949639506395163952639536395463955639566395763958639596396063961639626396363964639656396663967639686396963970639716397263973639746397563976639776397863979639806398163982639836398463985639866398763988639896399063991639926399363994639956399663997639986399964000640016400264003640046400564006640076400864009640106401164012640136401464015640166401764018640196402064021640226402364024640256402664027640286402964030640316403264033640346403564036640376403864039640406404164042640436404464045640466404764048640496405064051640526405364054640556405664057640586405964060640616406264063640646406564066640676406864069640706407164072640736407464075640766407764078640796408064081640826408364084640856408664087640886408964090640916409264093640946409564096640976409864099641006410164102641036410464105641066410764108641096411064111641126411364114641156411664117641186411964120641216412264123641246412564126641276412864129641306413164132641336413464135641366413764138641396414064141641426414364144641456414664147641486414964150641516415264153641546415564156641576415864159641606416164162641636416464165641666416764168641696417064171641726417364174641756417664177641786417964180641816418264183641846418564186641876418864189641906419164192641936419464195641966419764198641996420064201642026420364204642056420664207642086420964210642116421264213642146421564216642176421864219642206422164222642236422464225642266422764228642296423064231642326423364234642356423664237642386423964240642416424264243642446424564246642476424864249642506425164252642536425464255642566425764258642596426064261642626426364264642656426664267642686426964270642716427264273642746427564276642776427864279642806428164282642836428464285642866428764288642896429064291642926429364294642956429664297642986429964300643016430264303643046430564306643076430864309643106431164312643136431464315643166431764318643196432064321643226432364324643256432664327643286432964330643316433264333643346433564336643376433864339643406434164342643436434464345643466434764348643496435064351643526435364354643556435664357643586435964360643616436264363643646436564366643676436864369643706437164372643736437464375643766437764378643796438064381643826438364384643856438664387643886438964390643916439264393643946439564396643976439864399644006440164402644036440464405644066440764408644096441064411644126441364414644156441664417644186441964420644216442264423644246442564426644276442864429644306443164432644336443464435644366443764438644396444064441644426444364444644456444664447644486444964450644516445264453644546445564456644576445864459644606446164462644636446464465644666446764468644696447064471644726447364474644756447664477644786447964480644816448264483644846448564486644876448864489644906449164492644936449464495644966449764498644996450064501645026450364504645056450664507645086450964510645116451264513645146451564516645176451864519645206452164522645236452464525645266452764528645296453064531645326453364534645356453664537645386453964540645416454264543645446454564546645476454864549645506455164552645536455464555645566455764558645596456064561645626456364564645656456664567645686456964570645716457264573645746457564576645776457864579645806458164582645836458464585645866458764588645896459064591645926459364594645956459664597645986459964600646016460264603646046460564606646076460864609646106461164612646136461464615646166461764618646196462064621646226462364624646256462664627646286462964630646316463264633646346463564636646376463864639646406464164642646436464464645646466464764648646496465064651646526465364654646556465664657646586465964660646616466264663646646466564666646676466864669646706467164672646736467464675646766467764678646796468064681646826468364684646856468664687646886468964690646916469264693646946469564696646976469864699647006470164702647036470464705647066470764708647096471064711647126471364714647156471664717647186471964720647216472264723647246472564726647276472864729647306473164732647336473464735647366473764738647396474064741647426474364744647456474664747647486474964750647516475264753647546475564756647576475864759647606476164762647636476464765647666476764768647696477064771647726477364774647756477664777647786477964780647816478264783647846478564786647876478864789647906479164792647936479464795647966479764798647996480064801648026480364804648056480664807648086480964810648116481264813648146481564816648176481864819648206482164822648236482464825648266482764828648296483064831648326483364834648356483664837648386483964840648416484264843648446484564846648476484864849648506485164852648536485464855648566485764858648596486064861648626486364864648656486664867648686486964870648716487264873648746487564876648776487864879648806488164882648836488464885648866488764888648896489064891648926489364894648956489664897648986489964900649016490264903649046490564906649076490864909649106491164912649136491464915649166491764918649196492064921649226492364924649256492664927649286492964930649316493264933649346493564936649376493864939649406494164942649436494464945649466494764948649496495064951649526495364954649556495664957649586495964960649616496264963649646496564966649676496864969649706497164972649736497464975649766497764978649796498064981649826498364984649856498664987649886498964990649916499264993649946499564996649976499864999650006500165002650036500465005650066500765008650096501065011650126501365014650156501665017650186501965020650216502265023650246502565026650276502865029650306503165032650336503465035650366503765038650396504065041650426504365044650456504665047650486504965050650516505265053650546505565056650576505865059650606506165062650636506465065650666506765068650696507065071650726507365074650756507665077650786507965080650816508265083650846508565086650876508865089650906509165092650936509465095650966509765098650996510065101651026510365104651056510665107651086510965110651116511265113651146511565116651176511865119651206512165122651236512465125651266512765128651296513065131651326513365134651356513665137651386513965140651416514265143651446514565146651476514865149651506515165152651536515465155651566515765158651596516065161651626516365164651656516665167651686516965170651716517265173651746517565176651776517865179651806518165182651836518465185651866518765188651896519065191651926519365194651956519665197651986519965200652016520265203652046520565206652076520865209652106521165212652136521465215652166521765218652196522065221652226522365224652256522665227652286522965230652316523265233652346523565236652376523865239652406524165242652436524465245652466524765248652496525065251652526525365254652556525665257652586525965260652616526265263652646526565266652676526865269652706527165272652736527465275652766527765278652796528065281652826528365284652856528665287652886528965290652916529265293652946529565296652976529865299653006530165302653036530465305653066530765308653096531065311653126531365314653156531665317653186531965320653216532265323653246532565326653276532865329653306533165332653336533465335653366533765338653396534065341653426534365344653456534665347653486534965350653516535265353653546535565356653576535865359653606536165362653636536465365653666536765368653696537065371653726537365374653756537665377653786537965380653816538265383653846538565386653876538865389653906539165392653936539465395653966539765398653996540065401654026540365404654056540665407654086540965410654116541265413654146541565416654176541865419654206542165422654236542465425654266542765428654296543065431654326543365434654356543665437654386543965440654416544265443654446544565446654476544865449654506545165452654536545465455654566545765458654596546065461654626546365464654656546665467654686546965470654716547265473654746547565476654776547865479654806548165482654836548465485654866548765488654896549065491654926549365494654956549665497654986549965500655016550265503655046550565506655076550865509655106551165512655136551465515655166551765518655196552065521655226552365524655256552665527655286552965530655316553265533655346553565536655376553865539655406554165542655436554465545655466554765548655496555065551655526555365554655556555665557655586555965560655616556265563655646556565566655676556865569655706557165572655736557465575655766557765578655796558065581655826558365584655856558665587655886558965590655916559265593655946559565596655976559865599656006560165602656036560465605656066560765608656096561065611656126561365614656156561665617656186561965620656216562265623656246562565626656276562865629656306563165632656336563465635656366563765638656396564065641656426564365644656456564665647656486564965650656516565265653656546565565656656576565865659656606566165662656636566465665656666566765668656696567065671656726567365674656756567665677656786567965680656816568265683656846568565686656876568865689656906569165692656936569465695656966569765698656996570065701657026570365704657056570665707657086570965710657116571265713657146571565716657176571865719657206572165722657236572465725657266572765728657296573065731657326573365734657356573665737657386573965740657416574265743657446574565746657476574865749657506575165752657536575465755657566575765758657596576065761657626576365764657656576665767657686576965770657716577265773657746577565776657776577865779657806578165782657836578465785657866578765788657896579065791657926579365794657956579665797657986579965800658016580265803658046580565806658076580865809658106581165812658136581465815658166581765818658196582065821658226582365824658256582665827658286582965830658316583265833658346583565836658376583865839658406584165842658436584465845658466584765848658496585065851658526585365854658556585665857658586585965860658616586265863658646586565866658676586865869658706587165872658736587465875658766587765878658796588065881658826588365884658856588665887658886588965890658916589265893658946589565896658976589865899659006590165902659036590465905659066590765908659096591065911659126591365914659156591665917659186591965920659216592265923659246592565926659276592865929659306593165932659336593465935659366593765938659396594065941659426594365944659456594665947659486594965950659516595265953659546595565956659576595865959659606596165962659636596465965659666596765968659696597065971659726597365974659756597665977659786597965980659816598265983659846598565986659876598865989659906599165992659936599465995659966599765998659996600066001660026600366004660056600666007660086600966010660116601266013660146601566016660176601866019660206602166022660236602466025660266602766028660296603066031660326603366034660356603666037660386603966040660416604266043660446604566046660476604866049660506605166052660536605466055660566605766058660596606066061660626606366064660656606666067660686606966070660716607266073660746607566076660776607866079660806608166082660836608466085660866608766088660896609066091660926609366094660956609666097660986609966100661016610266103661046610566106661076610866109661106611166112661136611466115661166611766118661196612066121661226612366124661256612666127661286612966130661316613266133661346613566136661376613866139661406614166142661436614466145661466614766148661496615066151661526615366154661556615666157661586615966160661616616266163661646616566166661676616866169661706617166172661736617466175661766617766178661796618066181661826618366184661856618666187661886618966190661916619266193661946619566196661976619866199662006620166202662036620466205662066620766208662096621066211662126621366214662156621666217662186621966220662216622266223662246622566226662276622866229662306623166232662336623466235662366623766238662396624066241662426624366244662456624666247662486624966250662516625266253662546625566256662576625866259662606626166262662636626466265662666626766268662696627066271662726627366274662756627666277662786627966280662816628266283662846628566286662876628866289662906629166292662936629466295662966629766298662996630066301663026630366304663056630666307663086630966310663116631266313663146631566316663176631866319663206632166322663236632466325663266632766328663296633066331663326633366334663356633666337663386633966340663416634266343663446634566346663476634866349663506635166352663536635466355663566635766358663596636066361663626636366364663656636666367663686636966370663716637266373663746637566376663776637866379663806638166382663836638466385663866638766388663896639066391663926639366394663956639666397663986639966400664016640266403664046640566406664076640866409664106641166412664136641466415664166641766418664196642066421664226642366424664256642666427664286642966430664316643266433664346643566436664376643866439664406644166442664436644466445664466644766448664496645066451664526645366454664556645666457664586645966460664616646266463664646646566466664676646866469664706647166472664736647466475664766647766478664796648066481664826648366484664856648666487664886648966490664916649266493664946649566496664976649866499665006650166502665036650466505665066650766508665096651066511665126651366514665156651666517665186651966520665216652266523665246652566526665276652866529665306653166532665336653466535665366653766538665396654066541665426654366544665456654666547665486654966550665516655266553665546655566556665576655866559665606656166562665636656466565665666656766568665696657066571665726657366574665756657666577665786657966580665816658266583665846658566586665876658866589665906659166592665936659466595665966659766598665996660066601666026660366604666056660666607666086660966610666116661266613666146661566616666176661866619666206662166622666236662466625666266662766628666296663066631666326663366634666356663666637666386663966640666416664266643666446664566646666476664866649666506665166652666536665466655666566665766658666596666066661666626666366664666656666666667666686666966670666716667266673666746667566676666776667866679666806668166682666836668466685666866668766688666896669066691666926669366694666956669666697666986669966700667016670266703667046670566706667076670866709667106671166712667136671466715667166671766718667196672066721667226672366724667256672666727667286672966730667316673266733667346673566736667376673866739667406674166742667436674466745667466674766748667496675066751667526675366754667556675666757667586675966760667616676266763667646676566766667676676866769667706677166772667736677466775667766677766778667796678066781667826678366784667856678666787667886678966790667916679266793667946679566796667976679866799668006680166802668036680466805668066680766808668096681066811668126681366814668156681666817668186681966820668216682266823668246682566826668276682866829668306683166832668336683466835668366683766838668396684066841668426684366844668456684666847668486684966850668516685266853668546685566856668576685866859668606686166862668636686466865668666686766868668696687066871668726687366874668756687666877668786687966880668816688266883668846688566886668876688866889668906689166892668936689466895668966689766898668996690066901669026690366904669056690666907669086690966910669116691266913669146691566916669176691866919669206692166922669236692466925669266692766928669296693066931669326693366934669356693666937669386693966940669416694266943669446694566946669476694866949669506695166952669536695466955669566695766958669596696066961669626696366964669656696666967669686696966970669716697266973669746697566976669776697866979669806698166982669836698466985669866698766988669896699066991669926699366994669956699666997669986699967000670016700267003670046700567006670076700867009670106701167012670136701467015670166701767018670196702067021670226702367024670256702667027670286702967030670316703267033670346703567036670376703867039670406704167042670436704467045670466704767048670496705067051670526705367054670556705667057670586705967060670616706267063670646706567066670676706867069670706707167072670736707467075670766707767078670796708067081670826708367084670856708667087670886708967090670916709267093670946709567096670976709867099671006710167102671036710467105671066710767108671096711067111671126711367114671156711667117671186711967120671216712267123671246712567126671276712867129671306713167132671336713467135671366713767138671396714067141671426714367144671456714667147671486714967150671516715267153671546715567156671576715867159671606716167162671636716467165671666716767168671696717067171671726717367174671756717667177671786717967180671816718267183671846718567186671876718867189671906719167192671936719467195671966719767198671996720067201672026720367204672056720667207672086720967210672116721267213672146721567216672176721867219672206722167222672236722467225672266722767228672296723067231672326723367234672356723667237672386723967240672416724267243672446724567246672476724867249672506725167252672536725467255672566725767258672596726067261672626726367264672656726667267672686726967270672716727267273672746727567276672776727867279672806728167282672836728467285672866728767288672896729067291672926729367294672956729667297672986729967300673016730267303673046730567306673076730867309673106731167312673136731467315673166731767318673196732067321673226732367324673256732667327673286732967330673316733267333673346733567336673376733867339673406734167342673436734467345673466734767348673496735067351673526735367354673556735667357673586735967360673616736267363673646736567366673676736867369673706737167372673736737467375673766737767378673796738067381673826738367384673856738667387673886738967390673916739267393673946739567396673976739867399674006740167402674036740467405674066740767408674096741067411674126741367414674156741667417674186741967420674216742267423674246742567426674276742867429674306743167432674336743467435674366743767438674396744067441674426744367444674456744667447674486744967450674516745267453674546745567456674576745867459674606746167462674636746467465674666746767468674696747067471674726747367474674756747667477674786747967480674816748267483674846748567486674876748867489674906749167492674936749467495674966749767498674996750067501675026750367504675056750667507675086750967510675116751267513675146751567516675176751867519675206752167522675236752467525675266752767528675296753067531675326753367534675356753667537675386753967540675416754267543675446754567546675476754867549675506755167552675536755467555675566755767558675596756067561675626756367564675656756667567675686756967570675716757267573675746757567576675776757867579675806758167582675836758467585675866758767588675896759067591675926759367594675956759667597675986759967600676016760267603676046760567606676076760867609676106761167612676136761467615676166761767618676196762067621676226762367624676256762667627676286762967630676316763267633676346763567636676376763867639676406764167642676436764467645676466764767648676496765067651676526765367654676556765667657676586765967660676616766267663676646766567666676676766867669676706767167672676736767467675676766767767678676796768067681676826768367684676856768667687676886768967690676916769267693676946769567696676976769867699677006770167702677036770467705677066770767708677096771067711677126771367714677156771667717677186771967720677216772267723677246772567726677276772867729677306773167732677336773467735677366773767738677396774067741677426774367744677456774667747677486774967750677516775267753677546775567756677576775867759677606776167762677636776467765677666776767768677696777067771677726777367774677756777667777677786777967780677816778267783677846778567786677876778867789677906779167792677936779467795677966779767798677996780067801678026780367804678056780667807678086780967810678116781267813678146781567816678176781867819678206782167822678236782467825678266782767828678296783067831678326783367834678356783667837678386783967840678416784267843678446784567846678476784867849678506785167852678536785467855678566785767858678596786067861678626786367864678656786667867678686786967870678716787267873678746787567876678776787867879678806788167882678836788467885678866788767888678896789067891678926789367894678956789667897678986789967900679016790267903679046790567906679076790867909679106791167912679136791467915679166791767918679196792067921679226792367924679256792667927679286792967930679316793267933679346793567936679376793867939679406794167942679436794467945679466794767948679496795067951679526795367954679556795667957679586795967960679616796267963679646796567966679676796867969679706797167972679736797467975679766797767978679796798067981679826798367984679856798667987679886798967990679916799267993679946799567996679976799867999680006800168002680036800468005680066800768008680096801068011680126801368014680156801668017680186801968020680216802268023680246802568026680276802868029680306803168032680336803468035680366803768038680396804068041680426804368044680456804668047680486804968050680516805268053680546805568056680576805868059680606806168062680636806468065680666806768068680696807068071680726807368074680756807668077680786807968080680816808268083680846808568086680876808868089680906809168092680936809468095680966809768098680996810068101681026810368104681056810668107681086810968110681116811268113681146811568116681176811868119681206812168122681236812468125681266812768128681296813068131681326813368134681356813668137681386813968140681416814268143681446814568146681476814868149681506815168152681536815468155681566815768158681596816068161681626816368164681656816668167681686816968170681716817268173681746817568176681776817868179681806818168182681836818468185681866818768188681896819068191681926819368194681956819668197681986819968200682016820268203682046820568206682076820868209682106821168212682136821468215682166821768218682196822068221682226822368224682256822668227682286822968230682316823268233682346823568236682376823868239682406824168242682436824468245682466824768248682496825068251682526825368254682556825668257682586825968260682616826268263682646826568266682676826868269682706827168272682736827468275682766827768278682796828068281682826828368284682856828668287682886828968290682916829268293682946829568296682976829868299683006830168302683036830468305683066830768308683096831068311683126831368314683156831668317683186831968320683216832268323683246832568326683276832868329683306833168332683336833468335683366833768338683396834068341683426834368344683456834668347683486834968350683516835268353683546835568356683576835868359683606836168362683636836468365683666836768368683696837068371683726837368374683756837668377683786837968380683816838268383683846838568386683876838868389683906839168392683936839468395683966839768398683996840068401684026840368404684056840668407684086840968410684116841268413684146841568416684176841868419684206842168422684236842468425684266842768428684296843068431684326843368434684356843668437684386843968440684416844268443684446844568446684476844868449684506845168452684536845468455684566845768458684596846068461684626846368464684656846668467684686846968470684716847268473684746847568476684776847868479684806848168482684836848468485684866848768488684896849068491684926849368494684956849668497684986849968500685016850268503685046850568506685076850868509685106851168512685136851468515685166851768518685196852068521685226852368524685256852668527685286852968530685316853268533685346853568536685376853868539685406854168542685436854468545685466854768548685496855068551685526855368554685556855668557685586855968560685616856268563685646856568566685676856868569685706857168572685736857468575685766857768578685796858068581685826858368584685856858668587685886858968590685916859268593685946859568596685976859868599686006860168602686036860468605686066860768608686096861068611686126861368614686156861668617686186861968620686216862268623686246862568626686276862868629686306863168632686336863468635686366863768638686396864068641686426864368644686456864668647686486864968650686516865268653686546865568656686576865868659686606866168662686636866468665686666866768668686696867068671686726867368674686756867668677686786867968680686816868268683686846868568686686876868868689686906869168692686936869468695686966869768698686996870068701687026870368704687056870668707687086870968710687116871268713687146871568716687176871868719687206872168722687236872468725687266872768728687296873068731687326873368734687356873668737687386873968740687416874268743687446874568746687476874868749687506875168752687536875468755687566875768758687596876068761687626876368764687656876668767687686876968770687716877268773687746877568776687776877868779687806878168782687836878468785687866878768788687896879068791687926879368794687956879668797687986879968800688016880268803688046880568806688076880868809688106881168812688136881468815688166881768818688196882068821688226882368824688256882668827688286882968830688316883268833688346883568836688376883868839688406884168842688436884468845688466884768848688496885068851688526885368854688556885668857688586885968860688616886268863688646886568866688676886868869688706887168872688736887468875688766887768878688796888068881688826888368884688856888668887688886888968890688916889268893688946889568896688976889868899689006890168902689036890468905689066890768908689096891068911689126891368914689156891668917689186891968920689216892268923689246892568926689276892868929689306893168932689336893468935689366893768938689396894068941689426894368944689456894668947689486894968950689516895268953689546895568956689576895868959689606896168962689636896468965689666896768968689696897068971689726897368974689756897668977689786897968980689816898268983689846898568986689876898868989689906899168992689936899468995689966899768998689996900069001690026900369004690056900669007690086900969010690116901269013690146901569016690176901869019690206902169022690236902469025690266902769028690296903069031690326903369034690356903669037690386903969040690416904269043690446904569046690476904869049690506905169052690536905469055690566905769058690596906069061690626906369064690656906669067690686906969070690716907269073690746907569076690776907869079690806908169082690836908469085690866908769088690896909069091690926909369094690956909669097690986909969100691016910269103691046910569106691076910869109691106911169112691136911469115691166911769118691196912069121691226912369124691256912669127691286912969130691316913269133691346913569136691376913869139691406914169142691436914469145691466914769148691496915069151691526915369154691556915669157691586915969160691616916269163691646916569166691676916869169691706917169172691736917469175691766917769178691796918069181691826918369184691856918669187691886918969190691916919269193691946919569196691976919869199692006920169202692036920469205692066920769208692096921069211692126921369214692156921669217692186921969220692216922269223692246922569226692276922869229692306923169232692336923469235692366923769238692396924069241692426924369244692456924669247692486924969250692516925269253692546925569256692576925869259692606926169262692636926469265692666926769268692696927069271692726927369274692756927669277692786927969280692816928269283692846928569286692876928869289692906929169292692936929469295692966929769298692996930069301693026930369304693056930669307693086930969310693116931269313693146931569316693176931869319693206932169322693236932469325693266932769328693296933069331693326933369334693356933669337693386933969340693416934269343693446934569346693476934869349693506935169352693536935469355693566935769358693596936069361693626936369364693656936669367693686936969370693716937269373693746937569376693776937869379693806938169382693836938469385693866938769388693896939069391693926939369394693956939669397693986939969400694016940269403694046940569406694076940869409694106941169412694136941469415694166941769418694196942069421694226942369424694256942669427694286942969430694316943269433694346943569436694376943869439694406944169442694436944469445694466944769448694496945069451694526945369454694556945669457694586945969460694616946269463694646946569466694676946869469694706947169472694736947469475694766947769478694796948069481694826948369484694856948669487694886948969490694916949269493694946949569496694976949869499695006950169502695036950469505695066950769508695096951069511695126951369514695156951669517695186951969520695216952269523695246952569526695276952869529695306953169532695336953469535695366953769538695396954069541695426954369544695456954669547695486954969550695516955269553695546955569556695576955869559695606956169562695636956469565695666956769568695696957069571695726957369574695756957669577695786957969580695816958269583695846958569586695876958869589695906959169592695936959469595695966959769598695996960069601696026960369604696056960669607696086960969610696116961269613696146961569616696176961869619696206962169622696236962469625696266962769628696296963069631696326963369634696356963669637696386963969640696416964269643696446964569646696476964869649696506965169652696536965469655696566965769658696596966069661696626966369664696656966669667696686966969670696716967269673696746967569676696776967869679696806968169682696836968469685696866968769688696896969069691696926969369694696956969669697696986969969700697016970269703697046970569706697076970869709697106971169712697136971469715697166971769718697196972069721697226972369724697256972669727697286972969730697316973269733697346973569736697376973869739697406974169742697436974469745697466974769748697496975069751697526975369754697556975669757697586975969760697616976269763697646976569766697676976869769697706977169772697736977469775697766977769778697796978069781697826978369784697856978669787697886978969790697916979269793697946979569796697976979869799698006980169802698036980469805698066980769808698096981069811698126981369814698156981669817698186981969820698216982269823698246982569826698276982869829698306983169832698336983469835698366983769838698396984069841698426984369844698456984669847698486984969850698516985269853698546985569856698576985869859698606986169862698636986469865698666986769868698696987069871698726987369874698756987669877698786987969880698816988269883698846988569886698876988869889698906989169892698936989469895698966989769898698996990069901699026990369904699056990669907699086990969910699116991269913699146991569916699176991869919699206992169922699236992469925699266992769928699296993069931699326993369934699356993669937699386993969940699416994269943699446994569946699476994869949699506995169952699536995469955699566995769958699596996069961699626996369964699656996669967699686996969970699716997269973699746997569976699776997869979699806998169982699836998469985699866998769988699896999069991699926999369994699956999669997699986999970000700017000270003700047000570006700077000870009700107001170012700137001470015700167001770018700197002070021700227002370024700257002670027700287002970030700317003270033700347003570036700377003870039700407004170042700437004470045700467004770048700497005070051700527005370054700557005670057700587005970060700617006270063700647006570066700677006870069700707007170072700737007470075700767007770078700797008070081700827008370084700857008670087700887008970090700917009270093700947009570096700977009870099701007010170102701037010470105701067010770108701097011070111701127011370114701157011670117701187011970120701217012270123701247012570126701277012870129701307013170132701337013470135701367013770138701397014070141701427014370144701457014670147701487014970150701517015270153701547015570156701577015870159701607016170162701637016470165701667016770168701697017070171701727017370174701757017670177701787017970180701817018270183701847018570186701877018870189701907019170192701937019470195701967019770198701997020070201702027020370204702057020670207702087020970210702117021270213702147021570216702177021870219702207022170222702237022470225702267022770228702297023070231702327023370234702357023670237702387023970240702417024270243702447024570246702477024870249702507025170252702537025470255702567025770258702597026070261702627026370264702657026670267702687026970270702717027270273702747027570276702777027870279702807028170282702837028470285702867028770288702897029070291702927029370294702957029670297702987029970300703017030270303703047030570306703077030870309703107031170312703137031470315703167031770318703197032070321703227032370324703257032670327703287032970330703317033270333703347033570336703377033870339703407034170342703437034470345703467034770348703497035070351703527035370354703557035670357703587035970360703617036270363703647036570366703677036870369703707037170372703737037470375703767037770378703797038070381703827038370384703857038670387703887038970390703917039270393703947039570396703977039870399704007040170402704037040470405704067040770408704097041070411704127041370414704157041670417704187041970420704217042270423704247042570426704277042870429704307043170432704337043470435704367043770438704397044070441704427044370444704457044670447704487044970450704517045270453704547045570456704577045870459704607046170462704637046470465704667046770468704697047070471704727047370474704757047670477704787047970480704817048270483704847048570486704877048870489704907049170492704937049470495704967049770498704997050070501705027050370504705057050670507705087050970510705117051270513705147051570516705177051870519705207052170522705237052470525705267052770528705297053070531705327053370534705357053670537705387053970540705417054270543705447054570546705477054870549705507055170552705537055470555705567055770558705597056070561705627056370564705657056670567705687056970570705717057270573705747057570576705777057870579705807058170582705837058470585705867058770588705897059070591705927059370594705957059670597705987059970600706017060270603706047060570606706077060870609706107061170612706137061470615706167061770618706197062070621706227062370624706257062670627706287062970630706317063270633706347063570636706377063870639706407064170642706437064470645706467064770648706497065070651706527065370654706557065670657706587065970660706617066270663706647066570666706677066870669706707067170672706737067470675706767067770678706797068070681706827068370684706857068670687706887068970690706917069270693706947069570696706977069870699707007070170702707037070470705707067070770708707097071070711707127071370714707157071670717707187071970720707217072270723707247072570726707277072870729707307073170732707337073470735707367073770738707397074070741707427074370744707457074670747707487074970750707517075270753707547075570756707577075870759707607076170762707637076470765707667076770768707697077070771707727077370774707757077670777707787077970780707817078270783707847078570786707877078870789707907079170792707937079470795707967079770798707997080070801708027080370804708057080670807708087080970810708117081270813708147081570816708177081870819708207082170822708237082470825708267082770828708297083070831708327083370834708357083670837708387083970840708417084270843708447084570846708477084870849708507085170852708537085470855708567085770858708597086070861708627086370864708657086670867708687086970870708717087270873708747087570876708777087870879708807088170882708837088470885708867088770888708897089070891708927089370894708957089670897708987089970900709017090270903709047090570906709077090870909709107091170912709137091470915709167091770918709197092070921709227092370924709257092670927709287092970930709317093270933709347093570936709377093870939709407094170942709437094470945709467094770948709497095070951709527095370954709557095670957709587095970960709617096270963709647096570966709677096870969709707097170972709737097470975709767097770978709797098070981709827098370984709857098670987709887098970990709917099270993709947099570996709977099870999710007100171002710037100471005710067100771008710097101071011710127101371014710157101671017710187101971020710217102271023710247102571026710277102871029710307103171032710337103471035710367103771038710397104071041710427104371044710457104671047710487104971050710517105271053710547105571056710577105871059710607106171062710637106471065710667106771068710697107071071710727107371074710757107671077710787107971080710817108271083710847108571086710877108871089710907109171092710937109471095710967109771098710997110071101711027110371104711057110671107711087110971110711117111271113711147111571116711177111871119711207112171122711237112471125711267112771128711297113071131711327113371134711357113671137711387113971140711417114271143711447114571146711477114871149711507115171152711537115471155711567115771158711597116071161711627116371164711657116671167711687116971170711717117271173711747117571176711777117871179711807118171182711837118471185711867118771188711897119071191711927119371194711957119671197711987119971200712017120271203712047120571206712077120871209712107121171212712137121471215712167121771218712197122071221712227122371224712257122671227712287122971230712317123271233712347123571236712377123871239712407124171242712437124471245712467124771248712497125071251712527125371254712557125671257712587125971260712617126271263712647126571266712677126871269712707127171272712737127471275712767127771278712797128071281712827128371284712857128671287712887128971290712917129271293712947129571296712977129871299713007130171302713037130471305713067130771308713097131071311713127131371314713157131671317713187131971320713217132271323713247132571326713277132871329713307133171332713337133471335713367133771338713397134071341713427134371344713457134671347713487134971350713517135271353713547135571356713577135871359713607136171362713637136471365713667136771368713697137071371713727137371374713757137671377713787137971380713817138271383713847138571386713877138871389713907139171392713937139471395713967139771398713997140071401714027140371404714057140671407714087140971410714117141271413714147141571416714177141871419714207142171422714237142471425714267142771428714297143071431714327143371434714357143671437714387143971440714417144271443714447144571446714477144871449714507145171452714537145471455714567145771458714597146071461714627146371464714657146671467714687146971470714717147271473714747147571476714777147871479714807148171482714837148471485714867148771488714897149071491714927149371494714957149671497714987149971500715017150271503715047150571506715077150871509715107151171512715137151471515715167151771518715197152071521715227152371524715257152671527715287152971530715317153271533715347153571536715377153871539715407154171542715437154471545715467154771548715497155071551715527155371554715557155671557715587155971560715617156271563715647156571566715677156871569715707157171572715737157471575715767157771578715797158071581715827158371584715857158671587715887158971590715917159271593715947159571596715977159871599716007160171602716037160471605716067160771608716097161071611716127161371614716157161671617716187161971620716217162271623716247162571626716277162871629716307163171632716337163471635716367163771638716397164071641716427164371644716457164671647716487164971650716517165271653716547165571656716577165871659716607166171662716637166471665716667166771668716697167071671716727167371674716757167671677716787167971680716817168271683716847168571686716877168871689716907169171692716937169471695716967169771698716997170071701717027170371704717057170671707717087170971710717117171271713717147171571716717177171871719717207172171722717237172471725717267172771728717297173071731717327173371734717357173671737717387173971740717417174271743717447174571746717477174871749717507175171752717537175471755717567175771758717597176071761717627176371764717657176671767717687176971770717717177271773717747177571776717777177871779717807178171782717837178471785717867178771788717897179071791717927179371794717957179671797717987179971800718017180271803718047180571806718077180871809718107181171812718137181471815718167181771818718197182071821718227182371824718257182671827718287182971830718317183271833718347183571836718377183871839718407184171842718437184471845718467184771848718497185071851718527185371854718557185671857718587185971860718617186271863718647186571866718677186871869718707187171872718737187471875718767187771878718797188071881718827188371884718857188671887718887188971890718917189271893718947189571896718977189871899719007190171902719037190471905719067190771908719097191071911719127191371914719157191671917719187191971920719217192271923719247192571926719277192871929719307193171932719337193471935719367193771938719397194071941719427194371944719457194671947719487194971950719517195271953719547195571956719577195871959719607196171962719637196471965719667196771968719697197071971719727197371974719757197671977719787197971980719817198271983719847198571986719877198871989719907199171992719937199471995719967199771998719997200072001720027200372004720057200672007720087200972010720117201272013720147201572016720177201872019720207202172022720237202472025720267202772028720297203072031720327203372034720357203672037720387203972040720417204272043720447204572046720477204872049720507205172052720537205472055720567205772058720597206072061720627206372064720657206672067720687206972070720717207272073720747207572076720777207872079720807208172082720837208472085720867208772088720897209072091720927209372094720957209672097720987209972100721017210272103721047210572106721077210872109721107211172112721137211472115721167211772118721197212072121721227212372124721257212672127721287212972130721317213272133721347213572136721377213872139721407214172142721437214472145721467214772148721497215072151721527215372154721557215672157721587215972160721617216272163721647216572166721677216872169721707217172172721737217472175721767217772178721797218072181721827218372184721857218672187721887218972190721917219272193721947219572196721977219872199722007220172202722037220472205722067220772208722097221072211722127221372214722157221672217722187221972220722217222272223722247222572226722277222872229722307223172232722337223472235722367223772238722397224072241722427224372244722457224672247722487224972250722517225272253722547225572256722577225872259722607226172262722637226472265722667226772268722697227072271722727227372274722757227672277722787227972280722817228272283722847228572286722877228872289722907229172292722937229472295722967229772298722997230072301723027230372304723057230672307723087230972310723117231272313723147231572316723177231872319723207232172322723237232472325723267232772328723297233072331723327233372334723357233672337723387233972340723417234272343723447234572346723477234872349723507235172352723537235472355723567235772358723597236072361723627236372364723657236672367723687236972370723717237272373723747237572376723777237872379723807238172382723837238472385723867238772388723897239072391723927239372394723957239672397723987239972400724017240272403724047240572406724077240872409724107241172412724137241472415724167241772418724197242072421724227242372424724257242672427724287242972430724317243272433724347243572436724377243872439724407244172442724437244472445724467244772448724497245072451724527245372454724557245672457724587245972460724617246272463724647246572466724677246872469724707247172472724737247472475724767247772478724797248072481724827248372484724857248672487724887248972490724917249272493724947249572496724977249872499725007250172502725037250472505725067250772508725097251072511725127251372514725157251672517725187251972520725217252272523725247252572526725277252872529725307253172532725337253472535725367253772538725397254072541725427254372544725457254672547725487254972550725517255272553725547255572556725577255872559725607256172562725637256472565725667256772568725697257072571725727257372574725757257672577725787257972580725817258272583725847258572586725877258872589725907259172592725937259472595725967259772598725997260072601726027260372604726057260672607726087260972610726117261272613726147261572616726177261872619726207262172622726237262472625726267262772628726297263072631726327263372634726357263672637726387263972640726417264272643726447264572646726477264872649726507265172652726537265472655726567265772658726597266072661726627266372664726657266672667726687266972670726717267272673726747267572676726777267872679726807268172682726837268472685726867268772688726897269072691726927269372694726957269672697726987269972700727017270272703727047270572706727077270872709727107271172712727137271472715727167271772718727197272072721727227272372724727257272672727727287272972730727317273272733727347273572736727377273872739727407274172742727437274472745727467274772748727497275072751727527275372754727557275672757727587275972760727617276272763727647276572766727677276872769727707277172772727737277472775727767277772778727797278072781727827278372784727857278672787727887278972790727917279272793727947279572796727977279872799728007280172802728037280472805728067280772808728097281072811728127281372814728157281672817728187281972820728217282272823728247282572826728277282872829728307283172832728337283472835728367283772838728397284072841728427284372844728457284672847728487284972850728517285272853728547285572856728577285872859728607286172862728637286472865728667286772868728697287072871728727287372874728757287672877728787287972880728817288272883728847288572886728877288872889728907289172892728937289472895728967289772898728997290072901729027290372904729057290672907729087290972910729117291272913729147291572916729177291872919729207292172922729237292472925729267292772928729297293072931729327293372934729357293672937729387293972940729417294272943729447294572946729477294872949729507295172952729537295472955729567295772958729597296072961729627296372964729657296672967729687296972970729717297272973729747297572976729777297872979729807298172982729837298472985729867298772988729897299072991729927299372994729957299672997729987299973000730017300273003730047300573006730077300873009730107301173012730137301473015730167301773018730197302073021730227302373024730257302673027730287302973030730317303273033730347303573036730377303873039730407304173042730437304473045730467304773048730497305073051730527305373054730557305673057730587305973060730617306273063730647306573066730677306873069730707307173072730737307473075730767307773078730797308073081730827308373084730857308673087730887308973090730917309273093730947309573096730977309873099731007310173102731037310473105731067310773108731097311073111731127311373114731157311673117731187311973120731217312273123731247312573126731277312873129731307313173132731337313473135731367313773138731397314073141731427314373144731457314673147731487314973150731517315273153731547315573156731577315873159731607316173162731637316473165731667316773168731697317073171731727317373174731757317673177731787317973180731817318273183731847318573186731877318873189731907319173192731937319473195731967319773198731997320073201732027320373204732057320673207732087320973210732117321273213732147321573216732177321873219732207322173222732237322473225732267322773228732297323073231732327323373234732357323673237732387323973240732417324273243732447324573246732477324873249732507325173252732537325473255732567325773258732597326073261732627326373264732657326673267732687326973270732717327273273732747327573276732777327873279732807328173282732837328473285732867328773288732897329073291732927329373294732957329673297732987329973300733017330273303733047330573306733077330873309733107331173312733137331473315733167331773318733197332073321733227332373324733257332673327733287332973330733317333273333733347333573336733377333873339733407334173342733437334473345733467334773348733497335073351733527335373354733557335673357733587335973360733617336273363733647336573366733677336873369733707337173372733737337473375733767337773378733797338073381733827338373384733857338673387733887338973390733917339273393733947339573396733977339873399734007340173402734037340473405734067340773408734097341073411734127341373414734157341673417734187341973420734217342273423734247342573426734277342873429734307343173432734337343473435734367343773438734397344073441734427344373444734457344673447734487344973450734517345273453734547345573456734577345873459734607346173462734637346473465734667346773468734697347073471734727347373474734757347673477734787347973480734817348273483734847348573486734877348873489734907349173492734937349473495734967349773498734997350073501735027350373504735057350673507735087350973510735117351273513735147351573516735177351873519735207352173522735237352473525735267352773528735297353073531735327353373534735357353673537735387353973540735417354273543735447354573546735477354873549735507355173552735537355473555735567355773558735597356073561735627356373564735657356673567735687356973570735717357273573735747357573576735777357873579735807358173582735837358473585735867358773588735897359073591735927359373594735957359673597735987359973600736017360273603736047360573606736077360873609736107361173612736137361473615736167361773618736197362073621736227362373624736257362673627736287362973630736317363273633736347363573636736377363873639736407364173642736437364473645736467364773648736497365073651736527365373654736557365673657736587365973660736617366273663736647366573666736677366873669736707367173672736737367473675736767367773678736797368073681736827368373684736857368673687736887368973690736917369273693736947369573696736977369873699737007370173702737037370473705737067370773708737097371073711737127371373714737157371673717737187371973720737217372273723737247372573726737277372873729737307373173732737337373473735737367373773738737397374073741737427374373744737457374673747737487374973750737517375273753737547375573756737577375873759737607376173762737637376473765737667376773768737697377073771737727377373774737757377673777737787377973780737817378273783737847378573786737877378873789737907379173792737937379473795737967379773798737997380073801738027380373804738057380673807738087380973810738117381273813738147381573816738177381873819738207382173822738237382473825738267382773828738297383073831738327383373834738357383673837738387383973840738417384273843738447384573846738477384873849738507385173852738537385473855738567385773858738597386073861738627386373864738657386673867738687386973870738717387273873738747387573876738777387873879738807388173882738837388473885738867388773888738897389073891738927389373894738957389673897738987389973900739017390273903739047390573906739077390873909739107391173912739137391473915739167391773918739197392073921739227392373924739257392673927739287392973930739317393273933739347393573936739377393873939739407394173942739437394473945739467394773948739497395073951739527395373954739557395673957739587395973960739617396273963739647396573966739677396873969739707397173972739737397473975739767397773978739797398073981739827398373984739857398673987739887398973990739917399273993739947399573996739977399873999740007400174002740037400474005740067400774008740097401074011740127401374014740157401674017740187401974020740217402274023740247402574026740277402874029740307403174032740337403474035740367403774038740397404074041740427404374044740457404674047740487404974050740517405274053740547405574056740577405874059740607406174062740637406474065740667406774068740697407074071740727407374074740757407674077740787407974080740817408274083740847408574086740877408874089740907409174092740937409474095740967409774098740997410074101741027410374104741057410674107741087410974110741117411274113741147411574116741177411874119741207412174122741237412474125741267412774128741297413074131741327413374134741357413674137741387413974140741417414274143741447414574146741477414874149741507415174152741537415474155741567415774158741597416074161741627416374164741657416674167741687416974170741717417274173741747417574176741777417874179741807418174182741837418474185741867418774188741897419074191741927419374194741957419674197741987419974200742017420274203742047420574206742077420874209742107421174212742137421474215742167421774218742197422074221742227422374224742257422674227742287422974230742317423274233742347423574236742377423874239742407424174242742437424474245742467424774248742497425074251742527425374254742557425674257742587425974260742617426274263742647426574266742677426874269742707427174272742737427474275742767427774278742797428074281742827428374284742857428674287742887428974290742917429274293742947429574296742977429874299743007430174302743037430474305743067430774308743097431074311743127431374314743157431674317743187431974320743217432274323743247432574326743277432874329743307433174332743337433474335743367433774338743397434074341743427434374344743457434674347743487434974350743517435274353743547435574356743577435874359743607436174362743637436474365743667436774368743697437074371743727437374374743757437674377743787437974380743817438274383743847438574386743877438874389743907439174392743937439474395743967439774398743997440074401744027440374404744057440674407744087440974410744117441274413744147441574416744177441874419744207442174422744237442474425744267442774428744297443074431744327443374434744357443674437744387443974440744417444274443744447444574446744477444874449744507445174452744537445474455744567445774458744597446074461744627446374464744657446674467744687446974470744717447274473744747447574476744777447874479744807448174482744837448474485744867448774488744897449074491744927449374494744957449674497744987449974500745017450274503745047450574506745077450874509745107451174512745137451474515745167451774518745197452074521745227452374524745257452674527745287452974530745317453274533745347453574536745377453874539745407454174542745437454474545745467454774548745497455074551745527455374554745557455674557745587455974560745617456274563745647456574566745677456874569745707457174572745737457474575745767457774578745797458074581745827458374584745857458674587745887458974590745917459274593745947459574596745977459874599746007460174602746037460474605746067460774608746097461074611746127461374614746157461674617746187461974620746217462274623746247462574626746277462874629746307463174632746337463474635746367463774638746397464074641746427464374644746457464674647746487464974650746517465274653746547465574656746577465874659746607466174662746637466474665746667466774668746697467074671746727467374674746757467674677746787467974680746817468274683746847468574686746877468874689746907469174692746937469474695746967469774698746997470074701747027470374704747057470674707747087470974710747117471274713747147471574716747177471874719747207472174722747237472474725747267472774728747297473074731747327473374734747357473674737747387473974740747417474274743747447474574746747477474874749747507475174752747537475474755747567475774758747597476074761747627476374764747657476674767747687476974770747717477274773747747477574776747777477874779747807478174782747837478474785747867478774788747897479074791747927479374794747957479674797747987479974800748017480274803748047480574806748077480874809748107481174812748137481474815748167481774818748197482074821748227482374824748257482674827748287482974830748317483274833748347483574836748377483874839748407484174842748437484474845748467484774848748497485074851748527485374854748557485674857748587485974860748617486274863748647486574866748677486874869748707487174872748737487474875748767487774878748797488074881748827488374884748857488674887748887488974890748917489274893748947489574896748977489874899749007490174902749037490474905749067490774908749097491074911749127491374914749157491674917749187491974920749217492274923749247492574926749277492874929749307493174932749337493474935749367493774938749397494074941749427494374944749457494674947749487494974950749517495274953749547495574956749577495874959749607496174962749637496474965749667496774968749697497074971749727497374974749757497674977749787497974980749817498274983749847498574986749877498874989749907499174992749937499474995749967499774998749997500075001750027500375004750057500675007750087500975010750117501275013750147501575016750177501875019750207502175022750237502475025750267502775028750297503075031750327503375034750357503675037750387503975040750417504275043750447504575046750477504875049750507505175052750537505475055750567505775058750597506075061750627506375064750657506675067750687506975070750717507275073750747507575076750777507875079750807508175082750837508475085750867508775088750897509075091750927509375094750957509675097750987509975100751017510275103751047510575106751077510875109751107511175112751137511475115751167511775118751197512075121751227512375124751257512675127751287512975130751317513275133751347513575136751377513875139751407514175142751437514475145751467514775148751497515075151751527515375154751557515675157751587515975160751617516275163751647516575166751677516875169751707517175172751737517475175751767517775178751797518075181751827518375184751857518675187751887518975190751917519275193751947519575196751977519875199752007520175202752037520475205752067520775208752097521075211752127521375214752157521675217752187521975220752217522275223752247522575226752277522875229752307523175232752337523475235752367523775238752397524075241752427524375244752457524675247752487524975250752517525275253752547525575256752577525875259752607526175262752637526475265752667526775268752697527075271752727527375274 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title>FHEM reference</title>
- <script type="text/javascript" src="fhemdoc.js"></script>
- <noscript>
- <link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
- </noscript>
- <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
- <link rel="shortcut icon" href="/fhem/icons/favicon.ico"/>
- </head>
- <body style="word-wrap: break-word;">
- <div id="menuScrollArea">
- <div id="logo"></div>
- <div id="menu">
- <h3>fhem.pl reference</h3>
- <br><br>
- <a href="#doctop">Scroll to top</a>
- <br><br>
- <a style="display:none" href="#" name="loadAll">Load complete doc</a>
- <br><br>
- <a id="otherLang" style="display:none" href="#" name="otherLang">
- Load <span style="display:none" lang="DE">german</span>
- <span style="display:none" lang="EN">english</span>
- doc for <span class="mod"></span>
- </a>
- </div>
- </div>
- <div id="right">
- <a name="doctop"></a>
- <h3>Contents</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#doctop'>DE</a>]</div>
- <ul>
- <a href="#intro">Introduction</a><br>
- <a href="#command">FHEM command types</a><br>
- <a href="#devspec">Device specification</a><br>
- <a href="#attributes">Attributes</a><br>
- <br>
- <b>FHEM commands</b>
- <ul>
- <!-- header:command -->
- <a href="#apptime">apptime</a>
- <a href="#attr">attr</a>
- <a href="#backup">backup</a>
- <a href="#cancel">cancel</a>
- <a href="#cmdalias">cmdalias</a>
- <a href="#configdb">configdb</a>
- <a href="#copy">copy</a>
- <a href="#count">count</a>
- <a href="#createlog">createlog</a>
- <a href="#CULflash">CULflash</a>
- <a href="#define">define</a>
- <a href="#defmod">defmod</a>
- <a href="#delete">delete</a>
- <a href="#deleteattr">deleteattr</a>
- <a href="#deletefile">deletefile</a>
- <a href="#deletereading">deletereading</a>
- <a href="#displayattr">displayattr</a>
- <a href="#fhemdebug">fhemdebug</a>
- <a href="#fheminfo">fheminfo</a>
- <a href="#get">get</a>
- <a href="#help">help</a>
- <a href="#HMtemplate">HMtemplate</a>
- <a href="#IF">IF</a>
- <a href="#include">include</a>
- <a href="#inform">inform</a>
- <a href="#JsonList">JsonList</a>
- <a href="#JsonList2">JsonList2</a>
- <a href="#list">list</a>
- <a href="#modify">modify</a>
- <a href="#MSG">MSG</a>
- <a href="#notice">notice</a>
- <a href="#quit">quit</a>
- <a href="#reload">reload</a>
- <a href="#rename">rename</a>
- <a href="#rereadcfg">rereadcfg</a>
- <a href="#restore">restore</a>
- <a href="#save">save</a>
- <a href="#set">set</a>
- <a href="#setdefaultattr">setdefaultattr</a>
- <a href="#setreading">setreading</a>
- <a href="#setstate">setstate</a>
- <a href="#shutdown">shutdown</a>
- <a href="#sleep">sleep</a>
- <a href="#template">template</a>
- <a href="#trigger">trigger</a>
- <a href="#update">update</a>
- <a href="#uptime">uptime</a>
- <a href="#usb">usb</a>
- <a href="#version">version</a>
- <a href="#XmlList">XmlList</a>
- </ul>
- <br>
- <b>Device modules</b>
- <ul>
- <a href="#global">global</a><br>
- <!-- header:device -->
- <a href="#alexa">alexa</a>
- <a href="#ALL3076">ALL3076</a>
- <a href="#ALL4000T">ALL4000T</a>
- <a href="#ALL4027">ALL4027</a>
- <a href="#allergy">allergy</a>
- <a href="#AMAD">AMAD</a>
- <a href="#AMADCommBridge">AMADCommBridge</a>
- <a href="#AMADDevice">AMADDevice</a>
- <a href="#Aqicn">Aqicn</a>
- <a href="#ArduCounter">ArduCounter</a>
- <a href="#Aurora">Aurora</a>
- <a href="#BDKM">BDKM</a>
- <a href="#BOSEST">BOSEST</a>
- <a href="#BRAVIA">BRAVIA</a>
- <a href="#Broadlink">Broadlink</a>
- <a href="#BS">BS</a>
- <a href="#Calendar">Calendar</a>
- <a href="#CALVIEW">CALVIEW</a>
- <a href="#CM11">CM11</a>
- <a href="#CO20">CO20</a>
- <a href="#ComfoAir">ComfoAir</a>
- <a href="#CUL">CUL</a>
- <a href="#CUL_EM">CUL_EM</a>
- <a href="#CUL_FHTTK">CUL_FHTTK</a>
- <a href="#CUL_HM">CUL_HM</a>
- <a href="#CUL_HOERMANN">CUL_HOERMANN</a>
- <a href="#CUL_IR">CUL_IR</a>
- <a href="#CUL_MAX">CUL_MAX</a>
- <a href="#CUL_REDIRECT">CUL_REDIRECT</a>
- <a href="#CUL_RFR">CUL_RFR</a>
- <a href="#CUL_TCM97001">CUL_TCM97001</a>
- <a href="#CUL_TX">CUL_TX</a>
- <a href="#CUL_WS">CUL_WS</a>
- <a href="#dash_dhcp">dash_dhcp</a>
- <a href="#DBPlan">DBPlan</a>
- <a href="#DFPlayerMini">DFPlayerMini</a>
- <a href="#DLNARenderer">DLNARenderer</a>
- <a href="#Dooya">Dooya</a>
- <a href="#DUOFERN">DUOFERN</a>
- <a href="#DUOFERNSTICK">DUOFERNSTICK</a>
- <a href="#EC3000">EC3000</a>
- <a href="#ECMD">ECMD</a>
- <a href="#ECMDDevice">ECMDDevice</a>
- <a href="#EDIPLUG">EDIPLUG</a>
- <a href="#EGPM">EGPM</a>
- <a href="#EGPM2LAN">EGPM2LAN</a>
- <a href="#EIB">EIB</a>
- <a href="#EleroDrive">EleroDrive</a>
- <a href="#EleroStick">EleroStick</a>
- <a href="#EleroSwitch">EleroSwitch</a>
- <a href="#EM">EM</a>
- <a href="#EMEM">EMEM</a>
- <a href="#EMGZ">EMGZ</a>
- <a href="#EMT7110">EMT7110</a>
- <a href="#EMWZ">EMWZ</a>
- <a href="#ENECSYSGW">ENECSYSGW</a>
- <a href="#ENECSYSINV">ENECSYSINV</a>
- <a href="#ENIGMA2">ENIGMA2</a>
- <a href="#EnOcean">EnOcean</a>
- <a href="#EQ3BT">EQ3BT</a>
- <a href="#ESA2000">ESA2000</a>
- <a href="#ESPEasy">ESPEasy</a>
- <a href="#fakeRoku">fakeRoku</a>
- <a href="#FBAHA">FBAHA</a>
- <a href="#FBAHAHTTP">FBAHAHTTP</a>
- <a href="#FBDECT">FBDECT</a>
- <a href="#FHT">FHT</a>
- <a href="#FHT8V">FHT8V</a>
- <a href="#FHZ">FHZ</a>
- <a href="#FRAMEBUFFER">FRAMEBUFFER</a>
- <a href="#FReplacer">FReplacer</a>
- <a href="#FRITZBOX">FRITZBOX</a>
- <a href="#FRM">FRM</a>
- <a href="#FRM_AD">FRM_AD</a>
- <a href="#FRM_I2C">FRM_I2C</a>
- <a href="#FRM_IN">FRM_IN</a>
- <a href="#FRM_LCD">FRM_LCD</a>
- <a href="#FRM_OUT">FRM_OUT</a>
- <a href="#FRM_PWM">FRM_PWM</a>
- <a href="#FRM_RGB">FRM_RGB</a>
- <a href="#FRM_ROTENC">FRM_ROTENC</a>
- <a href="#FRM_SERVO">FRM_SERVO</a>
- <a href="#FRM_STEPPER">FRM_STEPPER</a>
- <a href="#FS20">FS20</a>
- <a href="#FTUISRV">FTUISRV</a>
- <a href="#FULLY">FULLY</a>
- <a href="#GAEBUS">GAEBUS</a>
- <a href="#GardenaSmartBridge">GardenaSmartBridge</a>
- <a href="#GardenaSmartDevice">GardenaSmartDevice</a>
- <a href="#GHoma">GHoma</a>
- <a href="#GOOGLECAST">GOOGLECAST</a>
- <a href="#harmony">harmony</a>
- <a href="#HEATRONIC">HEATRONIC</a>
- <a href="#HEOSGroup">HEOSGroup</a>
- <a href="#HEOSMaster">HEOSMaster</a>
- <a href="#HEOSPlayer">HEOSPlayer</a>
- <a href="#Hideki">Hideki</a>
- <a href="#HMCCU">HMCCU</a>
- <a href="#HMCCUCHN">HMCCUCHN</a>
- <a href="#HMCCUDEV">HMCCUDEV</a>
- <a href="#HMCCURPC">HMCCURPC</a>
- <a href="#HMCCURPCPROC">HMCCURPCPROC</a>
- <a href="#HMLAN">HMLAN</a>
- <a href="#HMS">HMS</a>
- <a href="#HMUARTLGW">HMUARTLGW</a>
- <a href="#holiday">holiday</a>
- <a href="#HOMBOT">HOMBOT</a>
- <a href="#HP1000">HP1000</a>
- <a href="#HTTPMOD">HTTPMOD</a>
- <a href="#HTTPSRV">HTTPSRV</a>
- <a href="#HUEBridge">HUEBridge</a>
- <a href="#HUEDevice">HUEDevice</a>
- <a href="#HXB">HXB</a>
- <a href="#HXBDevice">HXBDevice</a>
- <a href="#Hyperion">Hyperion</a>
- <a href="#I2C_BH1750">I2C_BH1750</a>
- <a href="#I2C_BME280">I2C_BME280</a>
- <a href="#I2C_BMP180">I2C_BMP180</a>
- <a href="#I2C_DS1307">I2C_DS1307</a>
- <a href="#I2C_EEPROM">I2C_EEPROM</a>
- <a href="#I2C_EMC1001">I2C_EMC1001</a>
- <a href="#I2C_HDC1008">I2C_HDC1008</a>
- <a href="#I2C_K30">I2C_K30</a>
- <a href="#I2C_LCD">I2C_LCD</a>
- <a href="#I2C_LM75A">I2C_LM75A</a>
- <a href="#I2C_MCP23008">I2C_MCP23008</a>
- <a href="#I2C_MCP23017">I2C_MCP23017</a>
- <a href="#I2C_MCP342x">I2C_MCP342x</a>
- <a href="#I2C_MMA845X">I2C_MMA845X</a>
- <a href="#I2C_PCA9532">I2C_PCA9532</a>
- <a href="#I2C_PCA9685">I2C_PCA9685</a>
- <a href="#I2C_PCF8574">I2C_PCF8574</a>
- <a href="#I2C_SHT21">I2C_SHT21</a>
- <a href="#I2C_SHT3x">I2C_SHT3x</a>
- <a href="#I2C_TSL2561">I2C_TSL2561</a>
- <a href="#IOhomecontrol">IOhomecontrol</a>
- <a href="#IPCAM">IPCAM</a>
- <a href="#IPWE">IPWE</a>
- <a href="#IT">IT</a>
- <a href="#Itach_IR">Itach_IR</a>
- <a href="#Itach_IRDevice">Itach_IRDevice</a>
- <a href="#Itach_Relay">Itach_Relay</a>
- <a href="#Jabber">Jabber</a>
- <a href="#JawboneUp">JawboneUp</a>
- <a href="#JeeLink">JeeLink</a>
- <a href="#JSONMETER">JSONMETER</a>
- <a href="#KeyValueProtocol">KeyValueProtocol</a>
- <a href="#km200">km200</a>
- <a href="#KM273">KM273</a>
- <a href="#KNX">KNX</a>
- <a href="#KODI">KODI</a>
- <a href="#KOPP_FC">KOPP_FC</a>
- <a href="#KOSTALPIKO">KOSTALPIKO</a>
- <a href="#KS300">KS300</a>
- <a href="#LaCrosse">LaCrosse</a>
- <a href="#LaCrosseGateway">LaCrosseGateway</a>
- <a href="#Level">Level</a>
- <a href="#LGTV">LGTV</a>
- <a href="#LGTV_IP12">LGTV_IP12</a>
- <a href="#LGTV_WebOS">LGTV_WebOS</a>
- <a href="#LIGHTIFY">LIGHTIFY</a>
- <a href="#LINDY_HDMI_SWITCH">LINDY_HDMI_SWITCH</a>
- <a href="#LIRC">LIRC</a>
- <a href="#LuftdatenInfo">LuftdatenInfo</a>
- <a href="#LUXTRONIK2">LUXTRONIK2</a>
- <a href="#M232">M232</a>
- <a href="#M232Counter">M232Counter</a>
- <a href="#M232Voltage">M232Voltage</a>
- <a href="#mailcheck">mailcheck</a>
- <a href="#MAX">MAX</a>
- <a href="#MAXLAN">MAXLAN</a>
- <a href="#MEDIAPORTAL">MEDIAPORTAL</a>
- <a href="#MilightBridge">MilightBridge</a>
- <a href="#MilightDevice">MilightDevice</a>
- <a href="#MOBILEALERTS">MOBILEALERTS</a>
- <a href="#MOBILEALERTSGW">MOBILEALERTSGW</a>
- <a href="#Modbus">Modbus</a>
- <a href="#ModbusAttr">ModbusAttr</a>
- <a href="#ModbusSET">ModbusSET</a>
- <a href="#ModbusTrovis5576">ModbusTrovis5576</a>
- <a href="#MPD">MPD</a>
- <a href="#MQTT">MQTT</a>
- <a href="#MQTT_BRIDGE">MQTT_BRIDGE</a>
- <a href="#MQTT_DEVICE">MQTT_DEVICE</a>
- <a href="#MSGFile">MSGFile</a>
- <a href="#MSGMail">MSGMail</a>
- <a href="#MYSENSORS">MYSENSORS</a>
- <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a>
- <a href="#N4HBUS">N4HBUS</a>
- <a href="#N4HMODULE">N4HMODULE</a>
- <a href="#Nello">Nello</a>
- <a href="#netatmo">netatmo</a>
- <a href="#NetIO230B">NetIO230B</a>
- <a href="#Netzer">Netzer</a>
- <a href="#NetzerI2C">NetzerI2C</a>
- <a href="#NEUTRINO">NEUTRINO</a>
- <a href="#Nextion">Nextion</a>
- <a href="#Nmap">Nmap</a>
- <a href="#NotifyAndroidTV">NotifyAndroidTV</a>
- <a href="#NUKIBridge">NUKIBridge</a>
- <a href="#NUKIDevice">NUKIDevice</a>
- <a href="#NUT">NUT</a>
- <a href="#OBIS">OBIS</a>
- <a href="#ONKYO_AVR">ONKYO_AVR</a>
- <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a>
- <a href="#OPENWEATHER">OPENWEATHER</a>
- <a href="#OREGON">OREGON</a>
- <a href="#OWAD">OWAD</a>
- <a href="#OWCOUNT">OWCOUNT</a>
- <a href="#OWDevice">OWDevice</a>
- <a href="#OWFS">OWFS</a>
- <a href="#OWID">OWID</a>
- <a href="#OWLCD">OWLCD</a>
- <a href="#OWMULTI">OWMULTI</a>
- <a href="#OWServer">OWServer</a>
- <a href="#OWSWITCH">OWSWITCH</a>
- <a href="#OWTEMP">OWTEMP</a>
- <a href="#OWTHERM">OWTHERM</a>
- <a href="#OWVAR">OWVAR</a>
- <a href="#OWX">OWX</a>
- <a href="#OWX_ASYNC">OWX_ASYNC</a>
- <a href="#OWX_CCC">OWX_CCC</a>
- <a href="#OWX_FRM">OWX_FRM</a>
- <a href="#OWX_SER">OWX_SER</a>
- <a href="#OWX_TCP">OWX_TCP</a>
- <a href="#panStamp">panStamp</a>
- <a href="#PCA301">PCA301</a>
- <a href="#PHILIPS_AUDIO">PHILIPS_AUDIO</a>
- <a href="#PHTV">PHTV</a>
- <a href="#PID20">PID20</a>
- <a href="#PIFACE">PIFACE</a>
- <a href="#pilight">pilight</a>
- <a href="#pilight_contact">pilight_contact</a>
- <a href="#pilight_ctrl">pilight_ctrl</a>
- <a href="#pilight_dimmer">pilight_dimmer</a>
- <a href="#pilight_raw">pilight_raw</a>
- <a href="#pilight_smoke">pilight_smoke</a>
- <a href="#pilight_switch">pilight_switch</a>
- <a href="#pilight_temp">pilight_temp</a>
- <a href="#ping">ping</a>
- <a href="#PIONEERAVR">PIONEERAVR</a>
- <a href="#PIONEERAVRZONE">PIONEERAVRZONE</a>
- <a href="#PiXtendV2">PiXtendV2</a>
- <a href="#PLAYBULB">PLAYBULB</a>
- <a href="#plex">plex</a>
- <a href="#Plugwise">Plugwise</a>
- <a href="#POKEYS">POKEYS</a>
- <a href="#PrecipitationSensor">PrecipitationSensor</a>
- <a href="#PROPLANTA">PROPLANTA</a>
- <a href="#Pushalot">Pushalot</a>
- <a href="#Pushbullet">Pushbullet</a>
- <a href="#PushNotifier">PushNotifier</a>
- <a href="#Pushover">Pushover</a>
- <a href="#Pushsafer">Pushsafer</a>
- <a href="#PW_Circle">PW_Circle</a>
- <a href="#PW_Scan">PW_Scan</a>
- <a href="#PW_Sense">PW_Sense</a>
- <a href="#PW_Switch">PW_Switch</a>
- <a href="#PWM">PWM</a>
- <a href="#PWMR">PWMR</a>
- <a href="#QRCode">QRCode</a>
- <a href="#Revolt">Revolt</a>
- <a href="#RFXCOM">RFXCOM</a>
- <a href="#RFXMETER">RFXMETER</a>
- <a href="#RFXX10REC">RFXX10REC</a>
- <a href="#Robonect">Robonect</a>
- <a href="#RPI_GPIO">RPI_GPIO</a>
- <a href="#RPII2C">RPII2C</a>
- <a href="#rssFeed">rssFeed</a>
- <a href="#S7">S7</a>
- <a href="#S7_ARead">S7_ARead</a>
- <a href="#S7_AWrite">S7_AWrite</a>
- <a href="#S7_Client">S7_Client</a>
- <a href="#S7_DRead">S7_DRead</a>
- <a href="#S7_DWrite">S7_DWrite</a>
- <a href="#S7_S5Client">S7_S5Client</a>
- <a href="#S7_S7Client">S7_S7Client</a>
- <a href="#SCIVT">SCIVT</a>
- <a href="#SD_RSL">SD_RSL</a>
- <a href="#SD_WS">SD_WS</a>
- <a href="#SD_WS07">SD_WS07</a>
- <a href="#SD_WS09">SD_WS09</a>
- <a href="#SD_WS_Maverick">SD_WS_Maverick</a>
- <a href="#SHC">SHC</a>
- <a href="#SHCdev">SHCdev</a>
- <a href="#SIGNALduino">SIGNALduino</a>
- <a href="#SIGNALduino_un">SIGNALduino_un</a>
- <a href="#siri">siri</a>
- <a href="#Siro">Siro</a>
- <a href="#SIS_PMS">SIS_PMS</a>
- <a href="#SISPM">SISPM</a>
- <a href="#SMAEM">SMAEM</a>
- <a href="#SMAInverter">SMAInverter</a>
- <a href="#SmartMeterP1">SmartMeterP1</a>
- <a href="#SMARTMON">SMARTMON</a>
- <a href="#SmartPi">SmartPi</a>
- <a href="#SMASTP">SMASTP</a>
- <a href="#SML">SML</a>
- <a href="#Snapcast">Snapcast</a>
- <a href="#SOMFY">SOMFY</a>
- <a href="#SONOS">SONOS</a>
- <a href="#SONOSPLAYER">SONOSPLAYER</a>
- <a href="#speedtest">speedtest</a>
- <a href="#Spotify">Spotify</a>
- <a href="#SSCam">SSCam</a>
- <a href="#STACKABLE">STACKABLE</a>
- <a href="#STACKABLE_CC">STACKABLE_CC</a>
- <a href="#STOCKQUOTES">STOCKQUOTES</a>
- <a href="#STV">STV</a>
- <a href="#SWAP">SWAP</a>
- <a href="#SWAP_0000002200000003">SWAP_0000002200000003</a>
- <a href="#SWAP_0000002200000008">SWAP_0000002200000008</a>
- <a href="#SYSMON">SYSMON</a>
- <a href="#SYSSTAT">SYSSTAT</a>
- <a href="#tahoma">tahoma</a>
- <a href="#TBot_List">TBot_List</a>
- <a href="#TCM">TCM</a>
- <a href="#TechemHKV">TechemHKV</a>
- <a href="#TechemWZ">TechemWZ</a>
- <a href="#TEK603">TEK603</a>
- <a href="#TelegramBot">TelegramBot</a>
- <a href="#TellStick">TellStick</a>
- <a href="#TeslaPowerwall2AC">TeslaPowerwall2AC</a>
- <a href="#THINKINGCLEANER">THINKINGCLEANER</a>
- <a href="#THZ">THZ</a>
- <a href="#TPLinkHS110">TPLinkHS110</a>
- <a href="#TRAFFIC">TRAFFIC</a>
- <a href="#TRX">TRX</a>
- <a href="#TRX_ELSE">TRX_ELSE</a>
- <a href="#TRX_LIGHT">TRX_LIGHT</a>
- <a href="#TRX_SECURITY">TRX_SECURITY</a>
- <a href="#TRX_WEATHER">TRX_WEATHER</a>
- <a href="#TUL">TUL</a>
- <a href="#UbiquitiMP">UbiquitiMP</a>
- <a href="#UbiquitiOut">UbiquitiOut</a>
- <a href="#Unifi">Unifi</a>
- <a href="#UnifiVideo">UnifiVideo</a>
- <a href="#UNIRoll">UNIRoll</a>
- <a href="#UpsPico">UpsPico</a>
- <a href="#USBWX">USBWX</a>
- <a href="#USF1000">USF1000</a>
- <a href="#UWZ">UWZ</a>
- <a href="#Vallox">Vallox</a>
- <a href="#VantagePro2">VantagePro2</a>
- <a href="#VBUSDEV">VBUSDEV</a>
- <a href="#VBUSIF">VBUSIF</a>
- <a href="#VCONTROL">VCONTROL</a>
- <a href="#Verkehrsinfo">Verkehrsinfo</a>
- <a href="#VIERA">VIERA</a>
- <a href="#VolumeLink">VolumeLink</a>
- <a href="#Weather">Weather</a>
- <a href="#WEBCOUNT">WEBCOUNT</a>
- <a href="#WEBIO">WEBIO</a>
- <a href="#WEBIO_12DIGITAL">WEBIO_12DIGITAL</a>
- <a href="#WifiLight">WifiLight</a>
- <a href="#WINCONNECT">WINCONNECT</a>
- <a href="#withings">withings</a>
- <a href="#WMBUS">WMBUS</a>
- <a href="#WS2000">WS2000</a>
- <a href="#WS300">WS300</a>
- <a href="#WS3600">WS3600</a>
- <a href="#Wunderground">Wunderground</a>
- <a href="#WWO">WWO</a>
- <a href="#X10">X10</a>
- <a href="#XBMC">XBMC</a>
- <a href="#XiaomiBTLESens">XiaomiBTLESens</a>
- <a href="#XiaomiDevice">XiaomiDevice</a>
- <a href="#XiaomiFlowerSens">XiaomiFlowerSens</a>
- <a href="#xs1Bridge">xs1Bridge</a>
- <a href="#xs1Dev">xs1Dev</a>
- <a href="#xxLG7000">xxLG7000</a>
- <a href="#YAMAHA_AVR">YAMAHA_AVR</a>
- <a href="#YAMAHA_BD">YAMAHA_BD</a>
- <a href="#YAMAHA_NP">YAMAHA_NP</a>
- <a href="#yowsup">yowsup</a>
- <a href="#ZWave">ZWave</a>
- <a href="#ZWCUL">ZWCUL</a>
- <a href="#ZWDongle">ZWDongle</a>
- </ul>
- <br>
- <b>Helper modules</b>
- <ul>
- <!-- header:helper -->
- <a href="#Alarm">Alarm</a>
- <a href="#alarmclock">alarmclock</a>
- <a href="#allowed">allowed</a>
- <a href="#archetype">archetype</a>
- <a href="#Astro">Astro</a>
- <a href="#at">at</a>
- <a href="#autocreate">autocreate</a>
- <a href="#average">average</a>
- <a href="#Babble">Babble</a>
- <a href="#cloneDummy">cloneDummy</a>
- <a href="#configDB">configDB</a>
- <a href="#CustomReadings">CustomReadings</a>
- <a href="#Dashboard">Dashboard</a>
- <a href="#DbLog">DbLog</a>
- <a href="#DbRep">DbRep</a>
- <a href="#dewpoint">dewpoint</a>
- <a href="#DOIF">DOIF</a>
- <a href="#DOIFtools">DOIFtools</a>
- <a href="#dummy">dummy</a>
- <a href="#ElectricityCalculator">ElectricityCalculator</a>
- <a href="#eventTypes">eventTypes</a>
- <a href="#expandJSON">expandJSON</a>
- <a href="#FB_CALLLIST">FB_CALLLIST</a>
- <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>
- <a href="#FHEM2FHEM">FHEM2FHEM</a>
- <a href="#FHEMWEB">FHEMWEB</a>
- <a href="#FileLog">FileLog</a>
- <a href="#FLOORPLAN">FLOORPLAN</a>
- <a href="#freezemon">freezemon</a>
- <a href="#GasCalculator">GasCalculator</a>
- <a href="#GEOFANCY">GEOFANCY</a>
- <a href="#GoogleAuth">GoogleAuth</a>
- <a href="#GUEST">GUEST</a>
- <a href="#HCS">HCS</a>
- <a href="#Heating_Control">Heating_Control</a>
- <a href="#HMinfo">HMinfo</a>
- <a href="#HOMEMODE">HOMEMODE</a>
- <a href="#HourCounter">HourCounter</a>
- <a href="#InfoPanel">InfoPanel</a>
- <a href="#KM271">KM271</a>
- <a href="#LightScene">LightScene</a>
- <a href="#Log2Syslog">Log2Syslog</a>
- <a href="#logProxy">logProxy</a>
- <a href="#MaxScanner">MaxScanner</a>
- <a href="#MediaList">MediaList</a>
- <a href="#monitoring">monitoring</a>
- <a href="#msgConfig">msgConfig</a>
- <a href="#msgDialog">msgDialog</a>
- <a href="#notify">notify</a>
- <a href="#PachLog">PachLog</a>
- <a href="#PostMe">PostMe</a>
- <a href="#powerMap">powerMap</a>
- <a href="#PRESENCE">PRESENCE</a>
- <a href="#rain">rain</a>
- <a href="#RandomTimer">RandomTimer</a>
- <a href="#readingsChange">readingsChange</a>
- <a href="#readingsGroup">readingsGroup</a>
- <a href="#readingsHistory">readingsHistory</a>
- <a href="#readingsProxy">readingsProxy</a>
- <a href="#remotecontrol">remotecontrol</a>
- <a href="#RESIDENTS">RESIDENTS</a>
- <a href="#RFHEM">RFHEM</a>
- <a href="#ROOMMATE">ROOMMATE</a>
- <a href="#RSS">RSS</a>
- <a href="#sequence">sequence</a>
- <a href="#SingleFileLog">SingleFileLog</a>
- <a href="#SIP">SIP</a>
- <a href="#statistics">statistics</a>
- <a href="#structure">structure</a>
- <a href="#SUNRISE_EL">SUNRISE_EL</a>
- <a href="#SVG">SVG</a>
- <a href="#Talk2Fhem">Talk2Fhem</a>
- <a href="#telnet">telnet</a>
- <a href="#Text2Speech">Text2Speech</a>
- <a href="#THRESHOLD">THRESHOLD</a>
- <a href="#TrashCal">TrashCal</a>
- <a href="#Twilight">Twilight</a>
- <a href="#Utils">Utils</a>
- <a href="#watchdog">watchdog</a>
- <a href="#WaterCalculator">WaterCalculator</a>
- <a href="#weblink">weblink</a>
- <a href="#WeekdayTimer">WeekdayTimer</a>
- <a href="#weekprofile">weekprofile</a>
- <a href="#WOL">WOL</a>
- <a href="#WUup">WUup</a>
- <a href="#YAAHM">YAAHM</a>
- <!-- header end -->
- </ul>
- <br>
- <a href="#perl">Perl specials</a><br>
- <a href="#gnuplot-syntax">gnuplot file syntax</a><br>
- </ul>
- <a name="intro"></a>
- <h3>Introduction</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#intro'>DE</a>]</div>
- <ul>
- FHEM is mainly used for home automation, but it is suitable for other tasks
- too, where notification, timers and logging plays an important role.<br>
- <br>
- It supports different hardware devices to interface with certain protocols
- (e.g. FHZ1000PC to interface FS20 and HMS, CM11 to access X10), and logical
- devices like FS20 or FHT to digest the messages for a certain device type using
- this protocol.<br>
- <br>
- FHEM is modular. The different devices are represented through modules which
- implement certain functions (e.g. define, get, set). Even seemingly integral
- parts of FHEM like triggers (<a href="#notify">notify</a>) and timers (<a
- href="#at">at</a>) are implemented this way, giving the possibility to
- replace/extend this functionality.<br> <br>
- FHEM is controlled through readable / ascii commands, which are specified in
- files (e.g. the configuration file), or issued over a TCP/IP connection, either
- directly in a telnet session, with a fhem.pl in client mode or from one of the
- web frontends.<br> <br>
- When starting the server you have to specify a configuration file:<br>
- <ul>
- <code>perl fhem.pl fhem.cfg</code>
- </ul>
- <br>
- A reasonable minimal configuration file looks like: <pre>
- attr global <a href="#logfile">logfile</a> log/fhem.log
- attr global <a href="#modpath">modpath</a> .
- attr global <a href="#statefile">statefile</a> log/fhem.save
- define telnetPort <a href="#telnet">telnet</a> 7072 global
- define WEB <a href="#FHEMWEB">FHEMWEB</a> 8083 global</pre>
- Note: the last two lines are optional and assume you wish to use the
- builtin telnet and WEB interface.<br>
- <br>
- The web interface can be reached at
- <ul>
- http://<fhemhost>:8083
- </ul>
- <br>
- TCP/IP communication with FHEM can either happen in a "session" (via
- telnet) or single client command (via fhem.pl). Example:
- <ul>
- <code>telnet <fhemhost> 7072<br>
- <NL> </code>(This newline switches into "prompt" mode)<code><br>
- <command>...<br>
- quit</code><br>
- </ul>
- or
- <ul>
- <code>fhem.pl <fhemhost>:7072 "<fhem-command>" "..."</code>
- </ul>
- <br>
- If a OS-user called fhem exists, and FHEM is started as root, FHEM will
- automatically change to to this user via setuid. <br>
- </ul>
- <!-- intro end - diese Zeile nicht entfernen! -->
- <a name="command"></a>
- <h3>FHEM command types</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#command'>DE</a>]</div>
- <ul>
- There are three types of commands: "fhem" commands (described in this
- document), shell commands (they must be enclosed in double quotes ") and perl
- expressions (enclosed in curly brackets {}). shell commands or perl expressions
- are needed for complex <a href="#at">at</a> or <a href="#notify">notify</a>
- arguments, but can also issued as a "normal" command.<br>
- <br>
- E.g. the following three commands all do the same when issued from a telnet
- prompt:<br>
- <ul>
- set lamp off<br>
- "fhem.pl 7072 "set lamp off""<br>
- {fhem("set lamp off")}<br>
- </ul>
- <br>
- Shell commands will be executed in the background, perl expressions and
- FHEM commands will be executed in the main "thread". In order to make perl
- expressions easier to write, some special functions and variables are
- available. See the section <a href="#perl">Perl special</a> for a description.
- To trigger FHEM commands from a shell script (this is the "other way round"),
- use the client form of fhem.pl (described above).<br>
- <br>
- Multiple FHEM commands are separated by semicolon (;). In order to use semicolon
- in perl code or shell programs, they have to be escaped by the double semicolon
- (;;). See the <b>Notes</b> section of the <a href="#notify">notify</a>
- chapter on command parameters and escape rules.<br>
- E.g. the following first command switches Lamp1 off at 07:00 and Lamp2
- immediately (at the point of definition), the second one switches both lamps
- off at 07:00.<br>
- <ul>
- define lampoff at 07:00 set Lamp1 off; set Lamp2 off<br>
- define lampoff at 07:00 set Lamp1 off;; set Lamp2 off<br>
- </ul>
- For every further indirection you need to double the semicolons:, e.g. to
- switch on every day 2 devices at 7:00 for 10 minutes you have to write:<br>
- <ul>
- define onAt at 07:00 set Lamp1 on;;set Lamp2 on;; define offAt at +00:10 set Lamp1 off;;;;set Lamp2 off
- </ul>
- Don't dispair, the previous example can also be written as
- <ul>
- define onAt at 07:00 set Lamp1,Lamp2 on-for-timer 600
- </ul>
- <br>
- Commands can be either typed in plain, or read from a file (e.g. the
- configuration file at startup). The commands are either executed directly, or
- later if they are arguments to the <a href="#at">at</a> and <a
- href="#notify">notify</a> FHEM commands.<br>
- <br>
- A line ending with \ will be concatenated with the next one, so long lines
- (e.g. multiple perl commands) can be split in multiple lines. Some web fronteds
- (e.g. webpgm2) make editing of multiline commands transparent for you (i.e. there is no need for \) .<br>
- <br>
- </ul>
- <!-- command end - diese Zeile nicht entfernen! -->
- <a name="devspec"></a>
- <h3>Device specification (devspec)</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#devspec'>DE</a>]</div>
- <ul>
- The commands
- <a href="#attr">attr</a>,
- <a href="#deleteattr">deleteattr</a>,
- <a href="#displayattr">displayattr</a>,
- <a href="#delete">delete</a>,
- <a href="#get">get</a>,
- <a href="#list">list</a>,
- <a href="#set">set</a>,
- <a href="#setreading">setreading</a>,
- <a href="#setstate">setstate</a>,
- <a href="#trigger">trigger</a>
- can take a more complex device specification as argument, which will be
- expanded to a list of devices. A device specification (short devspec) can be:
- <ul>
- <li>a single device name. This is the most common case.</li>
- <li>a list of devices, separated by comma (,)</li>
- <li>a regular expression</li>
- <li>a NAME=VALUE pair, where NAME can be an internal value like TYPE, a
- Reading-Name or an attribute. VALUE is a regexp. To negate the
- comparison, use NAME!=VALUE. To restrict the search, use i: as prefix
- for internal values, r: for readings and a: for attributes.
- See the example below.
- Case sensitivity is being ignored using ~ or !~. </li>
- <li>if the spec is followed by the expression :FILTER=NAME=VALUE, then the
- values found in the first round are filtered by the second expression.
- </ul>
- Examples:
- <ul>
- <code>set lamp1 on</code><br>
- <code>set lamp1,lamp2,lamp3 on</code><br>
- <code>set lamp.* on</code><br>
- <code>set room=kitchen off</code><br>
- <code>set room=kitchen:FILTER=STATE=on off</code><br>
- <code>set room=kitchen:FILTER=STATE!=off off</code><br>
- <code>list disabled=</code><br>
- <code>list room~office</code><br>
- <code>list TYPE=FS20 STATE</code><br>
- <code>list i:TYPE=FS20 STATE</code><br>
- </ul>
- Notes:
- <ul>
- <li>the spec may not contain space characters.</n>
- <li>if there is a device which exactly corresponds to the spec, then
- no special processing is done.</li>
- <li>first the spec is separated by comma, then the regular expression and
- filter operations are executed.</li>
- <li>the returned list can contain the same device more than once, so
- "set lamp3,lamp3 on" switches lamp3 twice.</li>
- <li>for more complex structuring demands see the <a href="#structure">
- structure</a> device.
- </ul>
- </ul>
- <!-- devspec end - diese Zeile nicht entfernen! -->
- <a name="attributes"></a>
- <h3>Attributes</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#attributes'>DE</a>]</div>
- All devices have attributes. These can be set by means of the <a
- href="#attr">attr</a> command, displayed with the <a
- href="#displayattr">displayattr</a> command, and deleted by the <a
- href="#deleteattr">deleteattr</a> command.<p>
- There are global attributes that are used by all devices and local attributes
- that apply to individual device classes only.<p>
- Some devices (like <a href="#FHEMWEB">FHEMWEB</a>) automatically define new
- global attributes on the first definition of a device of such type.<p>
- You can use the command <p><code>attr global userattr
- <attributelist></code><p> for the <a href="#global">global</a> device to
- declare new global attributes and <p><code>attr <devicespec> userattr
- <attributelist></code><p> for individual devices according to <a
- href="#devspec">devspec</a> to declare new local attributes.
- <code><attributelist></code> is a space-separated list which contains the
- names of the additional attributes. See the documentation of the <a
- href="#attr">attr</a> command for examples.<p>
- Be careful not to overwrite additional global attributes previously defined by
- yourself or a device. Use the <code>attr global userattr
- <attributelist></code> as early in your configuration as possible.
- <h4>Device specific attributes</h4>
- Device specific attributes are documented in the corresponding device section.
- <h4>Global attributes used by all devices</h4>
-
- <ul>
- <a name="alias"></a>
- <li>alias<br>
- Used by FHEMWEB to display a device with another name e.g. when using
- special characters/spaces not accepted by device definition.
- </li><br>
-
- <a name="comment"></a>
- <li>comment<br>
- Add an arbitrary comment.
- </li><br>
-
- <a name="eventMap"></a>
- <li>eventMap<br>
- Replace event names and set arguments. The value of this attribute
- consists of a list of space separated values, each value is a colon
- separated pair. The first part specifies the "old" value, the second
- the new/desired value. If the first character is slash(/) or comma(,)
- then split not by space but by this character, enabling to embed spaces.
- You can specify a widgetOverride after an additional colon (e.g.
- on-for-timer:OnFor:texField), the default widget is :noArg to avoid
- extra input fields in cmdList.
- Examples:<ul><code>
- attr store eventMap on:open off:closed<br>
- attr store eventMap /on-for-timer 10:open/off:closed/<br>
- set store open
- </code></ul>
- The explicit variant of this attribute has the following syntax:
- <ul><code>
- attr store eventMap { dev=>{'on'=>'open'}, usr=>{'open'=>'on'} }<br>
- attr store eventMap { dev=>{'^on(-for-timer)?(.*)'=>'open$2'},
- usr=>{'^open(.*)'=>'on$1'},
- fw=>{'^open(.*)'=>'open'} }
- </code></ul>
- This variant must be used, if the mapping is not symmetrical, the first
- part (dev) representing the device to user mapping, i.e. if the device
- reports on 100 or on-for-timer 100, the user will see open 100. The
- second part (usr) is the other direction, if the user specified open
- 10, the device will receive on 10. On both occasions the key will be
- first compared directly with the text, and if it is not equal, then it
- will be tried to match it as a regexp. When using regexps in the usr
- part with wildcards, the fw part must be filled with the exact same
- keys to enable a correct display in the FHEMWEB set dropdown list in
- the detail view.
- </li><br>
-
- <a name="genericDisplayType"></a>
- <li>genericDisplayType<br>
- used by some frontends (but not FHEMWEB) to offer a default image or
- appropriate commands for this device. Currently the following values
- are supported: switch,outlet,light,blind,speaker,thermostat
- </li><br>
- <a name="group"></a>
- <li>group<br>
- Group devices. Recognized by web-pgm2 (module <a
- href="#FHEMWEB">FHEMWEB</a>), it makes
- devices in the same group appear in the same box).
- This is used to further group
- devices together. A device can appear in more than one group, in this
- case the groups have to be specified comma-separated.<br>
- If this attribute is not set then the device type is used as the
- grouping attribute.
- </li><br>
- <a name="room"></a>
- <li>room<br>
- Filter/group devices in frontends. A device can appear in more than one
- room, in this case the rooms have to be specified comma-separated.<br>
- Devices in the room hidden will not appear in the web output, or set
- the FHEMWEB attribute <a href="#hiddenroom">hiddenroom</a> to
- selectively disable rooms for certain FHEMWEB instances.
- The -> string is considered as a structure separator for rooms, e.g.
- "1st. floor->Master bedroom".
- </li><br>
- <a name="suppressReading"></a>
- <li>suppressReading<br>
- Used to eliminate unwanted readings. The value is a regular expression,
- with ^ and $ added. Only necessary in exceptional cases.
- </li><br>
-
- <a name="showtime"></a>
- <li>showtime<br>
- Used in the webfrontend pgm2 to show the time of last activity
- instead of the state in the summary view. Useful e.g. for FS20 PIRI
- devices.
- </li><br>
-
- <a name="verbose"></a>
- <li>verbose<br>
- Set the verbosity level. Possible values:
- <ul>
- <li>0 - server start/stop</li>
- <li>1 - error messages or unknown packets</li>
- <li>2 - major events/alarms.</li>
- <li>3 - commands sent out will be logged.</li>
- <li>4 - you'll see whats received by the different devices.</li>
- <li>5 - debugging.</li>
- </ul>
- The value for the <a href="#global">global</a> device is a default for
- other devices without own verbose attribute set.
- </li></br>
- </ul>
- <a name="readingFnAttributes"></a>
- <h4>readingFnAttributes</h4><p>
- The following global attributes are honored by the modules that make use of the
- standardized readings updating mechanism in fhem.pl. Check the module's
- attribute list if you want to know if a device supports these attributes. <br>
- <ul>
-
- <a name="stateFormat"></a>
- <li>stateFormat<br>
- Modifies the STATE of the device, shown by the list command or in the room
- overview in FHEMWEB. If not set, its value is taken from the state reading.
- If set, then every word in the argument is replaced by the value of the
- reading if such a reading for the current device exists. If the value of
- this attribute is enclused in {}, then it is evaluated. This attribute is
- evaluated each time a reading is updated.<br>
- The "set magic" described <a href="#set">here</a> is also applied.
- </li>
- <p>
- <a name="event-on-update-reading"></a>
- <li>event-on-update-reading<br>
- If not set, every update of any reading creates an event, which e.g. is
- handled by <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a>.
- The attribute takes a comma-separated list of readings. You may use regular
- expressions in that list. If set, only updates of the listed readings
- create events.
- </li>
- <p>
-
- <a name="event-on-change-reading"></a>
- <li>event-on-change-reading<br>
- The attribute takes a comma-separated list of readings. You may use regular
- expressions in that list. If set, only changes of the listed readings
- create events. In other words, if a reading listed here is updated with the
- new value identical to the old value, no event is created. If an optional [:threshold]
- is given after a reading name events are only generated if the change is >= threshold.
- </li>
- The precedence of event-on-update-reading and event-on-change-reading is as
- follows:
- <ol>
- <li>If both attributes are not set, any update of any reading of the device
- creates an event.</li>
- <li>If any of the attributes is set, no events occur for updates or changes
- of readings not listed in any of the attributes.</li>
- <li>If a reading is listed in event-on-update-reading, an update of the
- reading creates an event no matter whether the reading is also listed
- in event-on-change-reading.</li>
- </ol>
- <p>
-
- <a name="timestamp-on-change-reading"></a>
- <li>timestamp-on-change-reading<br>
- The attribute takes a comma-separated list of readings. You may use regular
- expressions in that list. If set, the timestamps of the listed readings will
- not be changed if event-on-change-reading is also set and it would not create
- an event for this reading.
- </li>
- <p>
- <a name="event-aggregator"></a>
- <li>event-aggregator</li>
- The primary uses of this attribute are to calculate (time-weighted) averages of
- readings over time periods and to throttle the update rate of readings and thus
- the amount of data written to the logs.<p>
- This attribute takes a comma-separated list of <code>reading:interval:method:function:holdTime</code>
- quintuples. You may use regular expressions for <code>reading</code>. If set, updates for the
- listed readings are ignored and associated events are suppressed for a black-out period of at
- least <code>interval</code> seconds (downsampling). After the black-out period has expired, the reading is
- updated with a value that is calculated from the values and timestamps of the previously ignored
- updates within the black-out period as follows:
-
- <table>
- <tr><th>function</th><th>description</th></tr>
- <tr><td>v</td><td>the last value encountered</td></tr>
- <tr><td>v0</td><td>the first value encountered</td></tr>
- <tr><td>min</td><td>the smallest value encountered</td></tr>
- <tr><td>max</td><td>the largest value encountered</td></tr>
- <tr><td>mean</td><td>the arithmetic mean of all values</td></tr>
- <tr><td>sd</td><td>the standard deviation from the mean</td></tr>
- <tr><td>median</td><td>the median of all values (requires holdTime and function none)</td></tr>
- <tr><td>integral</td><td>the arithmetic sum (if not time-weighted) or integral area (if time-weighted) of all values</td></tr>
- <tr><td>n</td><td>number of samples</td></tr>
- <tr><td>t</td><td>timestamp of the last value</td></tr>
- <tr><td>t0</td><td>timestamp of the first value</td></tr>
- </table>
- <p>
- If <code>method</code> is <code>none</code>, then that's all there is. If <code>method</code>
- is <code>const</code> or <code>linear</code>, the time-weighted series of values is taken into
- account instead. The weight is the timespan between two subsequent updates.
- With the <code>const</code> method, the value is the value of the reading at the beginning of
- the timespan; with the <code>linear</code> method, the value is the arithmetic average of
- the values at the beginning and the end of the timespan.
- Rollovers of black-out periods are handled as one would expect it.<p>
- One would typically use the <code>linear</code> method with the <code>mean</code> function for
- quantities continuously varying over time like electric power consumption, temperature or speed.
- For cumulative quantities like energy consumed, rain fallen or distance covered,
- the <code>none</code> method with the <code>v</code> function is used. The <code>constant</code>
- method is for discrete quantities that stay constant until the corresponding reading is updated,
- e.g. counters, switches and the like.<p>
-
- If the <code>holdTime</code> in seconds is defined, the samples will be kept in memory allowing
- the calculation of floating statistics instead of blocked statistics. With <code>holdTime</code>
- defined the <code>interval</code> can be kept undefined so that the readings update rate is unchanged
- or it can be set to a value less then <code>holdTime</code> for downsampling as described above
- with a full history of the readings in memory. Note that the historic samples are not persistent
- and will be lost when restarting FHEM.<p>
-
- The event aggregator only takes into consideration those updates that remain after preprocessing
- according to the <code>event-on-update-reading</code> and <code>event-on-change-reading</code>
- directives. Besides which, any update of a reading that occurs within a timespan from the preceding
- update that is smaller than the resolution of FHEM's time granularity is ditched.<p>
-
- When more than one function should be calculated for the same reading, the original reading must be
- multiplied (e.g. by using a notify) before applying the event-aggregator to the derived readings.<p>
- Examples:<br>
- <code>attr myPowerMeter event-aggregator EP_POWER_METER:300:linear:mean,EP_ENERGY_METER:300:none:v</code><br>
- <code>attr myBadSensor event-aggregator TEMP::none:median:300</code><br>
- <code>attr mySunMeter event-aggregator SUN_INTENSITY_24H::const:integral:86400</code>
- </li>
- <p>
- <a name="event-min-interval"></a>
- <li>event-min-interval<br>
- This attribute takes a comma-separated list of reading:minInterval pairs.
- You may use regular expressions for reading. Events will only be
- generated, if at least minInterval seconds elapsed since the last reading
- of the matched type. If event-on-change-reading is also specified, they are
- combined with OR: if one of them is true, the event is generated.
- </li>
- <a name="oldreadings"></a>
- <li>oldreadings<br>
- This attribute takes a comma-separated list of readings. You may use
- regular expressions in that list. For each reading in the list FHEM will
- internaly store the previous value if the readings value changes. To access
- the storead value use the OldReadings.* functions.</li>
- <a name="userReadings"></a>
- <li>userReadings<br>
- A comma-separated list of definitions of user-defined readings. Each
- definition has the form:
- <ul>
- <code>
- <reading>[:<trigger>] [<modifier>] { <perl code> }
- </code>
- </ul>
- After a single or bulk readings update, the user-defined readings are set
- by evaluating the <a href="#perl">perl code</a><code> { <perl code>
- }</code> for all definitions and setting the value of the respective
- user-defined reading <code><reading></code> to the result. If
- <trigger> is given, then all processing for this specific user
- reading is only done if one of the just updated "reading: value"
- combinations matches <trigger>, which is treated as a regexp.
- <br>
- Examples:<br>
- <ul><code>
- attr myEnergyMeter userReadings energy
- { ReadingsVal("myEnergyMeter","counters.A",0)/1250.0;; }<br>
- attr myMultiMeter userReadings
- energy1:counters.A.* { ReadingsVal("myMultiMeter","counters.A",0)/1250.0;; },
- energy2:counters.B.* { ReadingsVal("myMultiMeter","counters.B",0)/1250.0;; }
- </code></ul>
- <code><modifier></code> can take one of these values:
- <ul>
- <li>none: the same as it would not have been given at all.</li>
- <li>difference: the reading is set to the difference between the current
- and the previously evaluated value.</li>
- <li>differential: the reading is set to the difference between the
- current and the previously evaluated value divided by the time in
- seconds between the current and the previous evaluation. Granularity
- of time is one second. No value is calculated if the time past is
- below one second. Useful to calculate rates.</li>
- <li>integral: reverse function of differential. The result is incremented
- by the product of the time difference between the last two readings
- and the avarage of the last two readings. <br>
- result += (time - timeold) * (oldval + value) / 2
- </li>
- <li>offset: if the current evaluated value is smaler than the previously
- evaluated value the reading is incremented by the previous value.
- the reading can then be used as an offset correct for a counter that
- is reset for example due to a power loss.</li>
- <li>monotonic: if the difference between the current and the previously
- evaluated value is positive the reading is incremented by this difference.
- this allows to derive a monotonic growing counter from an original counter
- even if the original will be rest by a power loss</li>
- </ul>
- Example:<br>
- <ul><code>attr myPowerMeter userReadings power
- differential { ReadingsVal("myPowerMeter","counters.A",0)/1250.0;; }
- </code></ul>
- Notes:
- <ul>
- <li>user readings with modifiers difference and differential store the
- calculated values internally. The user reading is set earliest at the
- second evaluation. Beware of stale values when changing
- definitions!</li>
- <li>the name of the defined Readings consists of alphanumeric characters
- with underscore (_) and the minus (-) sign.</li>
- </ul>
- </li>
- </ul>
- <h4>Common attributes</h4>
- The following local attributes are used by a wider range of devices:
- <ul>
- <a name="IODev"></a>
- <li>IODev<br>
- Set the IO or physical device which should be used for sending signals
- for this "logical" device. An example for the physical device is an FHZ
- or a CUL. Note: Upon startup FHEM assigns each logical device
- (FS20/HMS/KS300/etc) the last physical device which can receive data
- for this type of device. The attribute IODev needs to be used only if
- you attached more than one physical device capable of receiving signals
- for this logical device.</li><br>
- <li>Special: attribute disable can be toggled<br/>
- Attribute "disable" can be toggled by issuing the following command:<br/>
- <br/>
- <code>attr <device> disable toggle</code><br/>
- <br/>
- Attribute "disable" must be offered by the corresponding module</li>
- </ul>
- <!-- attributes end - diese Zeile nicht entfernen! -->
- <br><br>
- <a name="commands"></a>
- <a name="attr"></a>
- <h3>attr</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#attr'>DE</a>]</div>
- <ul>
- <code>attr [-a|-r] <devspec> <attrname> [<value>]</code><br>
- <br>Set an attribute for a device defined by <a href="#define">define</a>.
- The value is optional, and is set to 1 if missing.
- You can define your own <a href="#attributes">attributes</a> too to use them
- in other applications.
- Use "attr <name> ?" to get a list of possible attributes.
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.
- After setting the attribute, the global event "ATTR" will be generated.
- <br>
- If the option -a is specified, append the given value to the currently
- existing value. Note: if the value does not start with a comma (,), then a
- space will be added automatically to the old value before appending the
- new.<br>
- With the -r option one can remove a part of an attribute value.<br>
- <br>
- Examples:
- <ul><code>
- attr global verbose 3<br>
- attr lamp room kitchen<br>
- attr lamp group lights<br>
- attr lamp loglevel 6<br>
- attr weatherstation event-on-update-reading wind,temperature,humidity<br>
- attr weatherstation event-on-change-reading israining<br>
- attr weatherstation event-on-change-reading israining,state<br>
- attr heating stateFormat Temp:measured-temp, Valve:actuator<br>
- attr -a TYPE=SVG room ,SvgRoom</br>
- attr -r TYPE=SVG room ,SvgRoom</br>
- </code></ul>
- <br>
- Notes:<br>
- <ul>
- <li>See <a href="#deleteattr">deleteattr</a> to delete attributes.</li>
- </ul>
- </ul>
- <a name="cancel"></a>
- <h3>cancel</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#cancel'>DE</a>]</div>
- <ul>
- <code>cancel [<id> [quiet]]</code>
- <br><br>
- Cancels a named <a href="#sleep">sleep</a>.
- </ul>
- <!-- cancel end -->
- <a name="define"></a>
- <h3>define</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#define'>DE</a>]</div>
- <ul>
- <code>define [option] <name> <type> <type-specific></code><br>
- <br>
- Define a device. You need devices if you want to manipulate them (e.g.
- set on/off), and the logfile is also more readable if it contains e.g.
- "lamp off" instead of "Device 5673, Button 00, Code 00 (off)". <br>
- After definition, the global event "DEFINED" will be generated, see the
- notify section for details.<br>
- <br><br>
- Each device takes different additional arguments at definition, see the
- corresponding device section for details.<br>
- <br>
- Options:<br>
- <ul>
- <li>-temporary<br>
- Add the TEMPORARY flag to the definition, which will prevent saving the
- device to fhem.cfg.
- </li><br>
- <li>-ignoreErr<br>
- Reduce the number of errors displayed when a certain FHEM-module cannot
- be loaded. Used by fhem.cfg.demo, as using the RSS example requires the
- installation of several uncommon perl modules.
- </li><br>
- </ul>
- </ul>
- <!-- define end -->
- <a name="defmod"></a>
- <h3>defmod</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#defmod'>DE</a>]</div>
- <ul>
- <code>defmod <name> <type> <type-specific></code><br>
- <br>
- Define a device or modify it, if it already exists. E.g. to switch off a lamp
- 10 Minutes after the last message from the motion detector, you may use
- <ul><code>
- define mdNtfy notify motionDetector defmod mdOff at +00:10 set lamp off
- </code></ul>
- Using define here for the mdOff will generate an error if the motion detector
- triggers within the 10 minutes after the first event, as the mdOff at
- definition still exists.
- <br>
- </ul>
- <!-- defmod end -->
- <a name="delete"></a>
- <h3>delete</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#delete'>DE</a>]</div>
- <ul>
- <code>delete <devspec></code> <br>
- <br>
- Delete something created with the <a href="#define">define</a> command.
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.<br>
- After deletion, the global event "DELETED" will be generated, see the notify
- section for details.<br>
- Examples:
- <ul>
- <code>delete lamp</code><br>
- </ul>
- <br>
- </ul>
- <!-- delete end -->
- <a name="deleteattr"></a>
- <h3>deleteattr</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#deleteattr'>DE</a>]</div>
- <ul>
- <code>deleteattr <devspec> [<attrname>]</code> <br>
- <br>
- Delete either a single attribute (see the <a href="#attr">attr</a> command)
- or all attributes for a device (if no <attrname> is defined).
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.<br>
- After deleting the attribute, the global event "DELETEATTR" will be generated.
- <br>
- Examples:
- <ul>
- <code>deleteattr lamp follow-on-for-timer</code><br>
- <code>deleteattr lamp</code><br>
- </ul>
- <br>
- </ul>
- <!-- deleteattr end -->
- <a name="deletereading"></a>
- <h3>deletereading</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#deletereading'>DE</a>]</div>
- <ul>
- <code>deletereading <devspec> <readingname></code> <br>
- <br>
- Delete the reading <readingname>
- for a device. <readingname> is a perl regular expression that must match the whole name of the reading.
- Use with greatest care! FHEM might crash if you delete vital readings of a device.
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.<br>
- <br>
- Examples:
- <ul>
- <code>deletereading mySensor temp1</code><br>
- <code>deletereading mySensor temp\d+</code><br>
- </ul>
- <br>
- </ul>
- <!-- deletereading end -->
- <a name="displayattr"></a>
- <h3>displayattr</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#displayattr'>DE</a>]</div>
- <ul>
- <code>displayattr <devspec> [<attrname>]</code> <br>
- <br>
- Display either the value of a single attribute (see the <a href="#attr">attr</a> command)
- or all attributes for a device (if no <attrname> is defined).
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.<br>
- If more then one device is specified, then the device name will also included
- in the output.
- <br>
- Examples:
- <ul>
- <code>
- fhem> di WEB<br>
- menuEntries AlarmOn,/fhem?cmd=set%20alarm%20on<br>
- room Misc.<br>
- fhem> di WEB room<br>
- Misc.<br>
- </code>
- </ul>
- <br>
- </ul>
- <!-- displayattr end -->
- <a name="get"></a>
- <h3>get</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#get'>DE</a>]</div>
- <ul>
- <code>get <devspec> <type-specific></code>
- <br><br>
- Ask a value directly from the device, and wait for an answer. In general, you
- can get a list of possible parameters by
- <ul>
- <code>get <device> ?</code>
- </ul>
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.<br>
- <br>
- Each device has different get parameters, see the corresponding device
- section for details.<br>
- <br>
- </ul>
- <!-- get end -->
- <a name="include"></a>
- <h3>include</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#include'>DE</a>]</div>
- <ul>
- <code>include <filename></code> <br>
- <br>
- Read in the file, and process every line as a FHEM command.
- Note: only experts should use this command.
- <br>
- </ul>
- <!-- include end -->
- <a name="inform"></a>
- <h3>inform</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#inform'>DE</a>]</div>
- <ul>
- <code>inform {on|off|timer|raw} [regexp]</code> <br>
- <br>
- If set to on, and a device state changes, send a notification to the current
- client. This command can be used by other programs/modules to receive a
- notification.<br>
- The option timer prepends a timerstamp to the line. Note: this command is
- a nice way to check which events are generated, to help you when creating
- <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a> entries.
- <br>
- </ul>
- <!-- inform end -->
- <a name="list"></a>
- <h3>list</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#list'>DE</a>]</div>
- <ul>
- <code>list [devspec] [value]</code><br>
- or<br>
- <code>list {-r|-R} devspec</code><br>
- <br><br>
- Output a list of all definitions, all notify settings and all at
- entries. This is one of the few commands which return a string in a
- normal case.
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.
- <br>
- If value is specified, then output this property (like DEF, TYPE, etc) or
- reading (actuator, measured-temp) for all devices from the devspec.
- <br><br>
- Example:
- <pre><code> fhem> list
- Type list <name> for detailed info.
- Internal:
- global (Internal)
- FHZ:
- FHZ (fhtbuf: 23)
- FS20:
- Btn4 (on-old-for-timer)
- Roll1 (on)
- Stehlampe (off)
- FHT:
- fl (measured-temp: 21.1 (Celsius))
- KS300:
- out1 (T: 2.9 H: 74 W: 2.2 R: 8.2 IR: no)
- at:
- at_rollup (Next: 07:00:00)
- notify:
- ntfy_btn4 (active)
- FileLog:
- avglog (active)
- </code></pre>
- If specifying <code>name</code>, then a detailed status for <code>name</code>
- will be displayed, e.g.:
- <pre><code> fhem> list fl
- Internals:
- CODE 5102
- DEF 5102
- NAME fl
- NR 15
- STATE measured-temp: 21.1 (Celsius)
- TYPE FHT
- IODev FHZ
- Attributes:
- room Heizung
- Readings:
- 2006-11-02 09:45:56 actuator 19%
- [...]
- </code></pre>
- With the -r (raw) option output the device definition in a format suitable
- for inclusion in fhem.cfg and fhem.state. -R returns the definition of the
- device itself, together with the definition of probably associated devices.
- Note: the algorithm to select associated devices is known to be imperfect.
- </ul>
- <!-- list end -->
- <a name="modify"></a>
- <h3>modify</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#modify'>DE</a>]</div>
- <ul>
- <code>modify <name> <type-dependent-options></code>
- <br><br>
- Used to modify some definitions. Useful for changing some <a
- href="#at">at</a> or <a href="#notify">notify</a> definitions. If specifying
- one argument to an at type definition, only the time part will be changed. In
- case of a notify type definition, only the regex part will be changed. All
- other values (state, attributes, etc) will remain intact.
- After modify, the global event "MODIFIED" will be generated.
- <br><br>
- Example:
- <ul>
- <code>define lampon at 19:00 set lamp on</code><br>
- <code>modify lampon *19:00</code><br>
- <code>modify lampon 19:00 set lamp on-for-timer 16</code><br>
- </ul>
- </ul>
- <!-- modify end -->
- <a name="quit"></a>
- <h3>quit</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#quit'>DE</a>]</div>
- <ul>
- <code>quit</code>
- <br><br>
- If used in a TCP/IP session, terminate the client session.<br>
- If used in a script, terminate the parsing of the current script.
- <br><br>
- Example:
- <ul>
- <code>quit</code>
- </ul>
- </ul>
- <!-- quit end -->
- <a name="reload"></a>
- <h3>reload</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#reload'>DE</a>]</div>
- <ul>
- <code>reload <module></code>
- <br><br>
- Reload the given module from the module directory. It is a convenient way to
- test modules whithout restarting the program.
- <br><br>
- Example:
- <ul>
- <code>reload 99_PRIV</code>
- </ul>
- </ul>
- <!-- reload end -->
- <a name="rename"></a>
- <h3>rename</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#rename'>DE</a>]</div>
- <ul>
- <code>rename <oldname> <newname></code>
- <br><br>
- Rename a device from the <oldname> to <newname>, together with
- its attributes. The global event RENAMED will be generated, see the notify
- section for details.
- <br><br>
- Example:
- <ul>
- <code>rename FHT_1234 fht.kitchen</code>
- </ul>
- </ul>
- <!-- rename end -->
- <a name="rereadcfg"></a>
- <h3>rereadcfg</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#rereadcfg'>DE</a>]</div>
- <ul>
- <code>rereadcfg [fhem-config-file]</code>
- <br><br>
- Re-read the active configuration file, or the optionally specified file.<br>
- The sequence: the <a href="#statefile">statefile</a> will be saved first,
- then all devices will be deleted, then the currently active config file (or
- the specified file) will be read and at last the statefile will be
- reloaded.<br>
- Upon completion it triggers the global:REREADCFG event. All existing
- connections up to the one issuing the rereadcfg will be closed.
- <br><br>
- Example:
- <ul>
- <code>rereadcfg</code>
- </ul>
- </ul>
- <!-- rereadcfg end -->
- <a name="save"></a>
- <h3>save</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#save'>DE</a>]</div>
- <ul>
- <code>save [<configfile>]</code>
- <br><br>
- Save first the <a href="#statefile">statefile</a>, then the
- <a href="#configfile">configfile</a> information. If a parameter is specified,
- it will be used instead the global configfile attribute.<br><br>
- Notes:
- <ul>
- <li>save only writes out definitions and attributes, but no (set/get)
- commands which were previously part of the config file. If you need such
- commands after the initialization (e.g. <a href="#FHZset">FHTcode</a>), you
- should trigger them via <a href="#notify">notify</a>, when receiving the
- INITIALIZED event.</li>
- <li>save tries to preserve comments (lines starting with #) and include
- structures, but it won't work correctly if some of these files are not
- writeable.</li>
- <li>before overwriting the files, the old version will be saved, see the <a
- href="#restoreDirs">restoreDirs</a> global attribute for details.
- </ul>
- </ul>
- <!-- save end -->
- <a name="set"></a>
- <h3>set</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#set'>DE</a>]</div>
- <ul>
- <code>set <devspec> <type-specific></code>
- <br><br>
- Set parameters of a device / send signals to a device. You can
- get a list of possible parameters by
- <ul>
- <code>set <name> ?</code>
- </ul>
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>. The set command returns only a value on error.<br>
- <br>
- Each device has different set parameters, see the corresponding device
- section for details.<br>
- <br><br>
- From featurelevel 5.7 on the set and setreading command replaces:
- <ul>
- <li>[device:name] with the reading, internal or attribute of the device, if
- both device and the reading, internal or attribute exists.
- <ul>
- <li>You can use the r:, i: or a: prefix to restrict the search to one
- type, analogue to the devspec filtering.</li>
- <li>The suffix :d retrieves the first number</li>
- <li>The suffix :i retrieves the integer part of the first number.</li>
- <li>The suffix :r<n> retrieves the first number and rounds it to
- <n> decimal places. If <n> is missing, then rounds it to
- one decimal place.</li>
- <li>The suffix :t returns the timestamp (works only for readings)</li>
- <li>The suffix :sec returns the number of seconds since the reading was
- set.</li>
- </ul>
- Example:
- <ul>
- set Lamp blink [blinkDummy:number] [r:blinkDummy:duration:d]
- </ul>
- </li>
- <li>[device:name:d] same as above, but only the number is retrieved</li>
- <li>[device:name:sec] same as above, but only the number is retrieved</li>
- <li>{(perlExpression)} with the result of perlExpression.
- The $DEV variable is additionally available, designating the set device
- name.
- </li>
- </ul>
- These replacements are also known as "set magic".
- <br><br>
- <a name="setExtensions"></a>
- Some modules support a common list of <b>set extensions</b>, and point in
- their documentation to this section. If the module itself implements one of
- the following commands, then the module-implementation takes precedence.
- <ul>
- <li>on-for-timer <seconds><br>
- Issue the on command for the device, and after <seconds> the off
- command. For issuing the off command an internal timer will be
- scheduled, which is deleted upon a restart. To delete this internal
- timer without restart specify 0 as argument.</li>
- <li>off-for-timer <seconds><br>
- see on-for-timer above.</li>
- <li>on-till <timedet><br>
- Issue the on command for the device, and create an at definition with
- <timedet> (in the form HH:MM[:SS]) to set it off. This definition
- is visible, and its name is deviceName+"_till". To cancel the scheduled
- off, delete the at definition. Note: on-till is not active, if the
- specified time is after the current time, in order to make things like
- <ul><code>
- define morningLight at *06:00 set Lamp on-till {sunrise()}
- </code></ul>
- easy.</li>
- <li>on-till-overnight <timedet><br>
- Like on-till, but wont compare the current time with the timespec, so
- following will work:
- <ul><code>
- define nightLight at *{sunset()} set Lamp on-till-overnight 01:00
- </code></ul>
- </li>
- <li>off-till <timedet><br>
- see on-till above.</li>
- <li>off-till-overnight <timedet><br>
- see on-till-overnight above.</li>
- <li>blink <number> <blink-period><br>
- set the device on for <blink-period> then off for
- <blink-period> and repeat this <number> times.
- To stop blinking specify "0 0" as argument.</li>
- <li>intervals <from1>-<till1> <from2>-<till2>...
- </br>
- set the device on for the specified intervals, which are all timespecs
- in the form HH:MM[:SS]. The intervals are space separated.</li>
- <li>toggle<br>
- Issue the off command, if the current STATE is on, else the on command.
- dim XX is also interpreted as on, if XX is not 0.</li>
- </ul>
- Examples:
- <ul>
- <code>
- set switch on-for-timer 12.5<br>
- set switch on-till {sunset()}<br>
- set switch blink 3 1<br>
- set switch intervals 08:00-12:00 13:00-18:00<br>
- </code>
- </ul>
- </ul>
- <!-- set end -->
- <a name="setdefaultattr"></a>
- <h3>setdefaultattr</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#setdefaultattr'>DE</a>]</div>
- <ul>
- <code>setdefaultattr [<attrname> [<value>]] </code><br>
- <br>Add a default attribute. Each device defined from now on will receive
- this attribute.<br> If no attrname is specified, then the default attribute
- list will be deleted.
- <br><br>
- Example to set the attribute "room kitchen" and "loglevel 4" to
- each of the lamps:
- <ul>
- <code>setdefaultattr room kitchen</code><br>
- <code>setdefaultattr loglevel 4</code><br>
- <code>define lamp1 FS20 1234 11</code><br>
- <code>define lamp2 FS20 1234 12</code><br>
- <code>define lamp3 FS20 1234 13</code><br>
- <code>setdefaultattr</code><br>
- </ul>
- <br>
- Notes:<br>
- <ul>
- <li>There is no way to delete a single default-attribute from the list</li>
- </ul>
- </ul>
- <!-- setdefaultattr end -->
- <a name="setreading"></a>
- <h3>setreading</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#setreading'>DE</a>]</div>
- <ul>
- <code>setreading <devspec> <reading> <value></code>
- <br><br>
- Set the reading <reading> for the device <code><name></code> to
- <value> without sending out commands to the device, but triggering
- events and eventMap/stateFormat transformations as usual. See the set
- command documentation for replacement description.
- <br><br>
- Examples:
- <ul>
- setreading lamp state on
- </ul>
- Note: setreading won't generate an event for device X, if it is called from a
- notify for device X. Use "sleep 0.1; setreading X Y Z" in this case.
- </ul>
- <!-- setreading end -->
- <a name="setstate"></a>
- <h3>setstate</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#setstate'>DE</a>]</div>
- <ul>
- <code>setstate <devspec> <value></code>
- <br><br>
- Set the STATE entry for the device specified by <code><devspec></code>,
- which is used for displaying the device state in different frontends.
- No signals will be sent to the device, no events will be generated, and no
- eventMap or stateFormat translation will be done either.
- This command is also used in the <a href="#statefile">statefile</a>.
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.
- <br><br>
- Examples:
- <ul>
- setstate lamp on
- </ul>
- </ul>
- <!-- setstate end -->
- <a name="shutdown"></a>
- <h3>shutdown</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#shutdown'>DE</a>]</div>
- <ul>
- <code>shutdown [restart|exitValue]</code>
- <br><br>
- Shut down the server (after saving the <a href="#statefile">state information
- </a>). It triggers the global:SHUTDOWN event. If the optional restart
- parameter is specified, FHEM tries to restart itself. exitValue may be
- important for start scripts.
- <br><br>
- Example:
- <ul>
- <code>shutdown</code><br>
- <code>shutdown restart</code><br>
- <code>shutdown 1</code><br>
- </ul>
- </ul>
- <!-- shutdown end -->
- <a name="sleep"></a>
- <h3>sleep</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#sleep'>DE</a>]</div>
- <ul>
- <code>sleep <sec> [<id>] [quiet]</code>
- <br><br>
- sleep followed by another command is comparable to a nameless <a
- href="#at">at</a>, it executes the following commands after waiting the
- specified time. The unit is seconds, with millisecond accuracy, as you can
- specify decimal places.<br><br>
- A sleep with an <id> will replace a sleep with the same <id>
- and can be canceled by <a href="#cancel">cancel</a>.
- When called in a notify/at/etc, then nonempty return values of the following
- commands are logged to the global logfile with loglevel 2.<br> If quiet is
- specified, then skip this logging.
- <br><br>
- Example:
- <ul>
- define n3 notify btn3.* set lamp on;;sleep 1.5;;set lamp off<br>
- define a3 at +*00:05 set Windsensor 1w_measure;; sleep 2 quiet;; get
- Windsensor 1w_temp
- </ul>
- <br>
- Note: a sleep not followed by any command will block FHEM, is deprecated, and
- it issues a WARNING in the FHEM log.
- <br>
- </ul>
- <!-- sleep end -->
- <a name="trigger"></a>
- <h3>trigger</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#trigger'>DE</a>]</div>
- <ul>
- <code>trigger <devspec> <state></code>
- <br><br>
- Trigger a <a href="#notify">notify</a> definition.
- See the <a href="#devspec">Device specification</a> section for details on
- <devspec>.
- <br><br>
- Example:
- <ul>
- <code>trigger btn3 on</code>
- </ul>
- </ul>
- <!-- trigger end -->
- <!-- commands end - diese Zeile nicht entfernen! -->
- <a name="global"></a>
- <h3>global</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#global'>DE</a>]</div>
- <ul>
- The global device is used to set different global attributes. It will be
- automatically defined, it cannot be deleted or renamed and has no set or get
- parameters<br>
- <br>
- <b>Define</b><ul>N/A</ul><br>
- <b>Set </b><ul>N/A</ul><br>
- <b>Get</b><ul>N/A</ul><br>
- <b>Attributes</b>
- <ul>
- <li><a href="#archivedir">archivedir</a></li>
- <li><a href="#archivecmd">archivecmd</a></li>
- <li><a href="#nrarchive">nrarchive</a></li>
- <a name="archivesort"></a>
- <li>archivesort<br>
- archivesort may be set to the (default) alphanum or timestamp, and
- specifies how the last files are computed for the nrarchive attribute.
- </li><br>
- <a name="autoload_undefined_devices"></a>
- <li>autoload_undefined_devices<br>
- If set, automatically load the corresponding module when a message
- of this type is received. This is used by the <a href="#autocreate">
- autocreate</a> device, to automatically create a FHEM device upon
- receiving a corresponding message.
- </li><br>
- <a name="autosave"></a>
- <li>autosave<br>
- enable some modules to automatically trigger save after a configuration
- change, e.g. after a new device was created. Default is 1 (true), you
- can deactivate this feature by setting the value to 0.
- </li>
- <a name="backupcmd"></a>
- <li>backupcmd<br>
- You could pass the backup to your own command / script by using this attribute.
- If this attribute is specified, then it will be started as a shell command and
- passes a space separated list of files / directories as <strong>one</strong>
- argument to the command, like e.g.:
- <br>
- <ul>
- <code>"/etc/fhem.cfg /var/log/fhem/fhem.save /usr/share/fhem/contrib
- /usr/share/fhem/FHEM /usr/share/fhem/foo /usr/share/fhem/foobar
- /usr/share/fhem/www"</code>
- </ul>
- Note: Your command / script has to return the string "backup done" or
- everything else to report errors, to work properly with update!<br>
- This Attribute is used by the <a href="#backup">backup</a> command.<br>
- Example:<br>
- <ul>
- attr global backupcmd /usr/local/bin/myBackupScript.sh
- </ul>
- </li><br>
- <a name="backupdir"></a>
- <li>backupdir<br>
- A folder to store the compressed backup file.
- This Attribute is used by the <a href="#backup">backup</a> command.<br>
- Example:<br>
- <ul>
- attr global backupdir /Volumes/BigHD
- </ul>
- </li><br>
- <a name="backupsymlink"></a>
- <li>backupsymlink<br>
- If this attribute is set to everything else as "no", the archive
- command tar will support symlinks in your backup. Otherwise, if this
- attribute is set to "no" symlinks are ignored by tar.
- This Attribute is used by the <a href="#backup">backup</a> command.<br>
- Example:<br>
- <ul>
- attr global backupsymlink yes
- </ul>
- </li><br>
- <a name="blockingCallMax"></a>
- <li>blockingCallMax<br>
- Limit the number of parallel running processes started by the
- BlockingCall FHEM helper routine. Useful on limited hardware.
- </li><br>
- <a name="configfile"></a>
- <li>configfile<br>
- Contains the name of the FHEM configuration file. If <a
- href="#save">save</a> is called without argument, then the output will
- be written to this file.
- </li><br>
- <a name="commandref"></a>
- <li>commandref<br>
- If set to "full" (default), then a full commandref will be generated
- after each update. If set to modular, there is only a short description
- at the beginning, and the module documentation is loaded from FHEM
- dynamically.
- </li><br>
- <a name="dnsHostsFile"></a>
- <li>dnsHostsFile<br>
- If dnsServer is set, check the contents of the file specified as
- argument. To use the system hosts file, set it to /etc/hosts on
- Linux/Unix/OSX and C:\windows\system32\drivers\etc\hosts on Windows.
- Note: only IPv4 is supported.
- </li><br>
- <a name="dnsServer"></a>
- <li>dnsServer<br>
- Contains the IP address of the DNS Server. If some of the modules or
- user code calls the HttpUtils_NonblockingGet function, and this
- attribute is set, then FHEM specific nonblocking code will be used to
- resolve the given address. If this attribute is not set, the blocking
- OS implementation (inet_aton and gethostbyname) will be used.
- </li><br>
- <a name="featurelevel"></a>
- <li>featurelevel<br>
- Enable/disable old or new features, based on FHEM version.
- E.g. the $value hash for notify is only set for featurelevel up to 5.6,
- as it is deprecated, use the Value() function instead.
- </li><br>
- <a name="holiday2we"></a>
- <li>holiday2we<br>
- If this attribute is set, then the <a href="#perl">$we</a> variable
- will be true, if the value of the <a href="#holiday">holiday</a>
- variable referenced by this attribute is not none.<br>
- If it is a comma separated list, then it is true, if one of the
- referenced entities is not none.<br>
- Example:<br>
- <ul>
- attr global holiday2we he
- </ul>
- </li><br>
- <a name="httpcompress"></a>
- <li>httpcompress<br>
- the HttpUtils module is used by a lot of FHEM modules, and enables
- compression by default. Set httpcompress to 0 to disable this feature.
- </li><br>
- <a name="logdir"></a>
- <li>logdir<br>
- If set, the %L attribute in the logfile attribute (or in the FileLog
- modules file definition) is replaced wth the value of the attribute.
- Note: changing the value won't result in moving the files and may cause
- other problems.
- </li><br>
- <a name="logfile"></a>
- <li>logfile<br>
- Specify the logfile to write. You can use "-" for
- stdout, in this case the server won't background itself.<br>
- The logfile name can also take wildcards for easier logfile rotation,
- see the <a href="#FileLog">FileLog</a> section. Just apply the
- <code>archivecmd / archivedir / nrarchive</code> attributes to the
- <code>global</code> device as you would do for a FileLog device.<br>
- You can access the current name of the logfile with
- <code>{ $currlogfile }</code>.
- </li><br>
- <a name="modpath"></a>
- <li>modpath<br>
- Specify the path to the modules directory <code>FHEM</code>. The path
- does <b>not</b> contain the directory FHEM. Upon setting the
- attribute, the directory will be scanned for filenames of the form
- NN_<NAME>.pm, and make them available for device definition under
- <NAME>. If the first device of type <NAME> is defined, the
- module will be loaded, and its function with the name
- <NAME>_Initialize will be called. Exception to this rule are
- modules with NN=99, these are considered to be utility modules
- containing only perl helper functions, they are loaded at startup (i.e.
- modpath attribute definition time).
- </li><br>
- <a name="motd"></a>
- <li>motd<br>
- Message Of The Day. Displayed on the homescreen of the FHEMWEB package,
- or directly after the telnet logon, before displaying the fhem> prompt.
- SecurityCheck is setting motd if it is not defined upon startup, to
- avoid this set the motd value to none. motd is also used to show
- collected error messages upon FHEM start.
- </li><br>
- <a name="mseclog"></a>
- <li>mseclog<br>
- If set, the timestamp in the logfile will contain a millisecond part.
- </li><br>
- <a name="nofork"></a>
- <li>nofork<br>
- If set and the logfile is not "-", do not try to background. Needed on
- some Fritzbox installations, and it will be set automatically for
- Windows.
- </li><br>
- <a name="pidfilename"></a>
- <li>pidfilename<br>
- Write the process id of the perl process to the specified file. The
- server runs as a daemon, and some distributions would like to check by
- the pid if we are still running. The file will be deleted upon
- shutdown.
- </li><br>
- <a name="proxy"></a>
- <li>proxy<br>
- IP:PORT of the proxy server to be used by HttpUtils.
- </li><br>
- <a name="proxyAuth"></a>
- <li>proxyAuth<br>
- Base64 encoded username:password
- </li><br>
- <a name="proxyExclude"></a>
- <li>proxyExclude<br>
- regexp for hosts to exclude when using a proxy
- </li><br>
- <a name="restoreDirs"></a>
- <li>restoreDirs<br>
- update saves each file before overwriting it with the new version from
- the Web. For this purpose update creates a directory restoreDir in the
- global modpath directory, then a subdirectory with the current date,
- where the old version of the currently replaced file is stored.
- The default value of this attribute is 3, meaning that 3 old versions
- (i.e. date-directories) are kept, and the older ones are deleted.<br>
- fhem.cfg and fhem.state will be also copied with this method before
- executing save. To restore the files, you can use the restore FHEM
- command.<br>
- <br>If the attribute is set to 0, the feature is deactivated.
- </li><br>
- <li><a href="#fheminfo">sendStatistics</a><br>
- <a name="statefile"></a>
- <li>statefile<br>
- Set the filename where the state and certain <a href="#at">at</a>
- information will be saved before shutdown. If it is not specified, then
- no information will be saved.
- </li><br>
- <li><a href="#title">title</a><br>
- <li><a href="#fheminfo">uniqueID</a><br>
- <a name="useInet6"></a>
- <li>useInet6<br>
- try to use IPv6 in HttpUtils for communication. If the server does not
- have an IPv6 address, fall back to IPv4. Note: IO::Socket::INET6 is
- required.
- </li><br>
- <a name="userattr"></a>
- <li>userattr<br>
- A space separated list which contains the names of additional
- attributes for all devices. Without specifying them you will not be
- able to set them (in order to prevent typos).<br>
- userattr can also specified for other devices, in this case
- these additinal attribute names are only valid for this device.
- </li><br>
- <a name="dupTimeout"></a>
- <li>dupTimeout<br>
- Define the timeout for which 2 identical events from two different
- receiver are considered a duplicate. Default is 0.5 seconds.
- </li><br>
- <a name="showInternalValues"></a>
- <li>showInternalValues<br>
- Show data used for internal computations. If the name of an internal
- value, reading or attribute starts with dot (.), then it is normally
- hidden, and will only be visible, if this attribute is set to 1.
- The attribute is checked by the list command, by the FHEMWEB room
- overview and by xmllist.
- </li><br>
- <a name="sslVersion"></a>
- <li>sslVersion<br>
- Specifies the accepted cryptography algorithms by all modules using the
- TcpServices helper module. The current default TLSv12:!SSLv3 is thought
- to be more secure than the previously used SSLv23:!SSLv3:!SSLv2, but it
- causes problems with some not updated web services.
- </li><br>
- <a name="stacktrace"></a>
- <li>stacktrace<br>
- if set (to 1), dump a stacktrace to the log for each "PERL WARNING".
- </li><br>
- <a name="restartDelay"></a>
- <li>restartDelay<br>
- set the delay for shutdown restart, default is 2 (seconds).
- </li><br>
- </ul>
- <br>
- <b>Events:</b>
- <ul>
- <li>INITIALIZED<br>after initialization is finished.</li>
- <li>REREADCFG<br>after the configuration is reread.</li>
- <li>SAVE<br>before the configuration is saved.</li>
- <li>SHUTDOWN<br>before FHEM is shut down.</li>
- <li>DEFINED <devname><br>after a device is defined.</li>
- <li>DELETED <devname><br>after a device was deleted.</li>
- <li>RENAMED <old> <new><br>after a device was renamed.</li>
- <li>UNDEFINED <defspec><br>upon reception of a message for an
- undefined device.</li>
- <li>MODIFIED <defspec></br> after a device modification.</li>
- <li>UPDATE</br> after an update is completed.</li>
- </ul>
- </ul>
- <!-- global end - do not remove this line! -->
- <a name="ALL3076"></a>
- <h3>ALL3076</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ALL3076'>DE</a>]</div>
- <ul>
- Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
- <br><br>
- <a name="ALL3076define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ALL3076 <ip-address> </code>
- <br><br>
- Defines an Allnet 3076 device (Dimmable lightswitch) via its ip address or dns name<br><br>
- Examples:
- <ul>
- <code>define lamp1 ALL3076 192.168.1.200</code><br>
- </ul>
- </ul>
- <br>
- <a name="ALL3076set"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- dimdown
- dim10%
- dim20%
- dim30%
- dim40%
- dim50%
- dim60%
- dim70%
- dim80%
- dim90%
- dim100%
- dim[0-100]%
- dimup
- off
- on
- toggle
- </pre>
- Examples:
- <ul>
- <code>set lamp1 on</code><br>
- <code>set lamp1 dim11%</code><br>
- <code>set lamp2 toggle</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
- </ul>
- </ul>
- </ul>
- <p><a name="ALL4000T"></a>
- <h3>ALL4000T</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ALL4000T'>DE</a>]</div>
- <ul>
- Note: this module requires the following perl modules: XML::Simple LWP::UserAgent
- HTTP::Request.
- <br><br>
- <a name="ALL4000Tdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ALL4000T <ip-address> <port> <delay></code>
- <br><br>
- 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>
- Examples:
- <ul>
- <code>define AUSSEN.POOL.TEMP.vorlauf ALL4000T 192.168.68.20 t2 120</code><br>
- </ul>
- </ul>
- <br>
- </ul>
- <p><a name="ALL4027"></a>
- <h3>ALL4027</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ALL4027'>DE</a>]</div>
- <ul>
- Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
- <br><br>
- <a name="ALL4027define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ALL4027 <ip-address> <port> <relay_nr> <delay></code>
- <br><br>
- 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>
- Examples:
- <ul>
- <code>define lamp1 ALL4027 192.168.8.200 0 7 60</code><br>
- </ul>
- </ul>
- <br>
- <a name="ALL4027set"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- off
- on
- on-for-timer <Seconds>
- toggle
- </pre>
- Examples:
- <ul>
- <code>set poolpump on</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
- </ul>
- </ul>
- </ul>
- <p><a name="AMAD"></a>
- <h3>AMAD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#AMAD'>DE</a>]</div>
- <ul>
- <u><b>AMAD - Automagic Android Device</b></u>
- <br>
- This module integrates Android devices into FHEM and displays several settings <b><u>using the Android app "Automagic"</u></b>.
- 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.
- <br>
- 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.
- <br>
- 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.
- <br><br>
- <b>How to use AMAD?</b>
- <ul>
- <li>install the "Automagic Premium" app from the Google Play store.</li>
- <li>install the flowset 74_AMADautomagicFlowset$VERSION.xml from the directory $INSTALLFHEM/FHEM/lib/ on your Android device and activate.</li>
- </ul>
- <br>
- Now you need to define a device in FHEM.
- <br><br>
- <a name="AMADdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> AMAD <IP-ADDRESS></code>
- <br><br>
- Example:
- <ul><br>
- <code>define WandTabletWohnzimmer AMAD 192.168.0.23</code><br>
- </ul>
- <br>
- With this command two new AMAD devices in a room called AMAD are created. The parameter <IP-ADDRESS< 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>
- !!!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.
- <br>
- The communication port of the AMADCommBridge device can easily be changed within the attribut "port".</b>
- </ul>
- <br><a name="AMADCommBridge"></a>
- <b>AMAD Communication Bridge</b>
- <ul>
- 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>
- Please us the following command for configuration of the FHEM server IP address in the AMADCommBridge: <i>set AMADCommBridge fhemServerIP <FHEM-IP>.</i><br>
- 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.
- </ul><br>
- <br>
- <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>
- <br><br><br>
- <a name="AMADreadings"></a>
- <b>Readings</b>
- <ul>
- <li>airplanemode - on/off, state of the aeroplane mode</li>
- <li>androidVersion - currently installed version of Android</li>
- <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>
- <li>batteryHealth - the health of the battery (1=unknown, 2=good, 3=overheat, 4=dead, 5=over voltage, 6=unspecified failure, 7=cold)</li>
- <li>batterytemperature - the temperature of the battery</li>
- <li>bluetooth - on/off, bluetooth state</li>
- <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>
- <li>connectedBTdevices - list of all devices connected via bluetooth</li>
- <li>connectedBTdevicesMAC - list of MAC addresses of all devices connected via bluetooth</li>
- <li>currentMusicAlbum - currently playing album of mediaplayer</li>
- <li>currentMusicApp - currently playing player app (Amazon Music, Google Play Music, Google Play Video, Spotify, YouTube, TuneIn Player, Aldi Life Music)</li>
- <li>currentMusicArtist - currently playing artist of mediaplayer</li>
- <li>currentMusicIcon - cover of currently play album<b>Noch nicht fertig implementiert</b></li>
- <li>currentMusicState - state of currently/last used mediaplayer</li>
- <li>currentMusicTrack - currently playing song title of mediaplayer</li>
- <li>daydream - on/off, daydream currently active</li>
- <li>deviceState - state of Android devices. unknown, online, offline.</li>
- <li>doNotDisturb - state of do not Disturb Mode</li>
- <li>dockingState - undocked/docked, Android device in docking station</li>
- <li>flow_SetCommands - active/inactive, state of SetCommands flow</li>
- <li>flow_informations - active/inactive, state of Informations flow</li>
- <li>flowsetVersionAtDevice - currently installed version of the flowsets on the Android device</li>
- <li>incomingCallerName - Callername from last Call</li>
- <li>incomingCallerNumber - Callernumber from last Call</li>
- <li>incommingWhatsAppMessageFrom - last WhatsApp message</li>
- <li>incommingWhatsTelegramMessageFrom - last telegram message</li>
- <li>intentRadioName - name of the most-recent streamed intent radio</li>
- <li>intentRadioState - state of intent radio player</li>
- <li>keyguardSet - 0/1 keyguard set, 0=no 1=yes, does not indicate whether it is currently active</li>
- <li>lastSetCommandError - last error message of a set command</li>
- <li>lastSetCommandState - last state of a set command, command send successful/command send unsuccessful</li>
- <li>lastStatusRequestError - last error message of a statusRequest command</li>
- <li>lastStatusRequestState - ast state of a statusRequest command, command send successful/command send unsuccessful</li>
- <li>nextAlarmDay - currently set day of alarm</li>
- <li>nextAlarmState - alert/done, current state of "Clock" stock-app</li>
- <li>nextAlarmTime - currently set time of alarm</li>
- <li>powerLevel - state of battery in %</li>
- <li>powerPlugged - 0=no/1,2=yes, power supply connected</li>
- <li>screen - on locked,unlocked/off locked,unlocked, state of display</li>
- <li>screenBrightness - 0-255, level of screen-brightness</li>
- <li>screenFullscreen - on/off, full screen mode</li>
- <li>screenOrientation - Landscape/Portrait, screen orientation (horizontal,vertical)</li>
- <li>screenOrientationMode - auto/manual, mode for screen orientation</li>
- <li>state - current state of AMAD device</li>
- <li>userFlowState - current state of a Flow, established under setUserFlowState Attribut</li>
- <li>volume - media volume setting</li>
- <li>volumeNotification - notification volume setting</li>
- <br>
- 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
- checkActiveTask com.android.chrome</i> für den Chrome Browser.
- <br><br>
- </ul>
- <br><br>
- <a name="AMADset"></a>
- <b>Set</b>
- <ul>
- <li>activateVoiceInput - start voice input on Android device</li>
- <li>bluetooth - on/off, switch bluetooth on/off</li>
- <li>clearNotificationBar - All/Automagic, deletes all or only Automagic notifications in status bar</li>
- <li>closeCall - hang up a running call</li>
- <li>currentFlowsetUpdate - start flowset update on Android device</li>
- <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>
- <li>doNotDisturb - sets the do not Disturb Mode, always Disturb, never Disturb, alarmClockOnly alarm Clock only, onlyImportant only important Disturbs</li>
- <li>mediaAmazonMusic - play/stop/next/back , controlling the amazon music media player</li>
- <li>mediaGoogleMusic - play/stop/next/back , controlling the google play music media player</li>
- <li>mediaSpotifyMusic - play/stop/next/back , controlling the spotify media player</li>
- <li>nextAlarmTime - sets the alarm time. Only valid for the next 24 hours.</li>
- <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>
- <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>
- <li>screenBrightness - 0-255, set screen brighness</li>
- <li>screenMsg - display message on screen of Android device</li>
- <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>
- <li>sendSMS - Sends an SMS to a specific phone number. Bsp.: sendSMS Dies ist ein Test|555487263</li>
- <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>
- <li>timer - set a countdown timer in the "Clock" stock app. Only seconds are allowed as parameter.</li>
- <li>ttsMsg - send a message which will be played as voice message</li>
- <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>
- <li>vibrate - vibrate Android device</li>
- <li>volume - set media volume. Works on internal speaker or, if connected, bluetooth speaker or speaker connected via stereo jack</li>
- <li>volumeNotification - set notifications volume</li>
- </ul>
- <br>
- <b>Set (depending on attribute values)</b>
- <ul>
- <li>changetoBtDevice - switch to another bluetooth device. <b>Attribute setBluetoothDevice needs to be set. See note below!</b></li>
- <li>openApp - start an app. <b>attribute setOpenApp</b></li>
- <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>
- <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>
- <li>screenFullscreen - on/off, activates/deactivates full screen mode. <b>attribute setFullscreen</b></li>
- <li>screenLock - Locks screen with request for PIN. <b>attribute setScreenlockPIN - enter PIN here. Only use numbers, 4-16 numbers required.</b></li>
- <li>screenOrientation - Auto,Landscape,Portait, set screen orientation (automatic, horizontal, vertical). <b>attribute setScreenOrientation</b></li>
- <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>
- <li>setAPSSID - set WLAN AccesPoint SSID to prevent WLAN sleeps</li>
- <li>setNotifySndFilePath - set systempath to notifyfile (default /storage/emulated/0/Notifications/</li>
- <li>setTtsMsgSpeed - set speaking speed for TTS (Value between 0.5 - 4.0, 0.5 Step) default is 1.0</li>
- <li>setTtsMsgLang - set speaking language for TTS, de or en (default is de)</li>
- <br>
- To be able to use "openApp" the corresponding attribute "setOpenApp" needs to contain the app package name.
- <br><br>
- To be able to switch between bluetooth devices the attribute "setBluetoothDevice" needs to contain (a list of) bluetooth devices defined as follows: <b>attr <DEVICE> 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>
- Example: <i>attr Nexus10Wohnzimmer setBluetoothDevice Logitech_BT_Adapter|AB:12:CD:34:EF:32,Anker_A3565|GH:56:IJ:78:KL:76</i>
- </ul>
- <br><br>
- <a name="AMADstate"></a>
- <b>state</b>
- <ul>
- <li>initialized - shown after initial define.</li>
- <li>active - device is active.</li>
- <li>disabled - device is disabled by the attribute "disable".</li>
- </ul>
- <br><br><br>
- <u><b>Further examples and reading:</b></u>
- <ul><br>
- <a href="http://www.fhemwiki.de/wiki/AMAD#Anwendungsbeispiele">Wiki page for AMAD (german only)</a>
- </ul>
- <br><br><br>
- </ul>
- <p><a name="AMADCommBridge"></a>
- <h3>AMADCommBridge</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#AMADCommBridge'>DE</a>]</div>
- <ul>
- <u><b>AMAD - Automagic Android Device</b></u></p>
- <b>AMADCommBridge - Communication bridge for all AMAD devices</b>
- </br>
- 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>
- Therefore, the initial setup of an AMAD device is also performed exactly via this module instance.
- </br></br>
- In order to successfully establish an Android device in FHEM, an AMADCommBridge device must be created in the first step.
- <br><br>
- <a name="AMADCommBridgedefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> AMADCommBridge</code>
- <br><br>
- Example:
- <ul><br>
- <code>define AMADBridge AMADCommBridge</code><br>
- </ul>
- <br>
- This statement creates a new AMADCommBridge device named AMADBridge.
- </ul></br>
- The APP Automagic or Tasker can be used on the Android device.</br>
- <br>
- <b>For Autoremote:</b><br>
- 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>
- 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.</br>
- <br>
- <b>For Tasker:</b><br>
- When using Tasker, the Tasker-project must be loaded onto the Android device and imported into Tasker via the import function.<br>
- For the initial setup on the Android device there is an Tasker input mask (Scene), in which the required parameters (device name, device IP, bridgeport etc.)</br>
- can be entered, these fields are filled (if possible) automatically, but can also be adjusted manually.</br>
- To do this, run the "AMAD" task.</br>
- For quick access, a Tasker shortcut can also be created on the home screen for this task.</br>
- Information on the individual settings can be obtained by touching the respective text field.</br>
- If all entries are complete, the AMAD Device can be created via the button "create Device".</br>
- For control commands from FHEM to Tasker, the APP "Autoremote" or "Tasker Network Event Server (TNES)" is additionally required.
- </ul>
- <br><br>
- <a name="AMADCommBridgereadings"></a>
- <b>Readings</b>
- <ul><br>
- <li>JSON_ERROR - JSON Error message reported by Perl</li>
- <li>JSON_ERROR_STRING - The string that caused the JSON error message</li>
- <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>
- <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>
- If set instead of trigger setControl as value for fhemControlMode, the reading is not executed but the set command executed immediately.</li>
- <li>receiveVoiceCommand - The speech control is activated by AMAD (set DEVICE activateVoiceInput), the last recognized voice command is written into this reading.</li>
- <li>receiveVoiceDevice - Name of the device from where the last recognized voice command was sent</li>
- <li>state - state of the Bridge, open, closed</li>
- </ul>
- <br><br>
- <a name="AMADCommBridgeattribute"></a>
- <b>Attributes</b>
- <ul><br>
- <li>allowFrom - Regexp the allowed IP addresses or hostnames. If this attribute is set, only connections from these addresses are accepted.</br>
- 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>
- IPV4: 127/8, 10/8, 192.168/16, 172.16/10, 169.254/16</br>
- IPV6: ::1, fe80/10</li>
- <li>debugJSON - If set to 1, JSON error messages are written in readings. See JSON_ERROR * under Readings</li>
- <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)
- <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>
- <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>
- <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>
- </li>
- </ul>
- </br></br>
- 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.
- </ul>
- <p><a name="AMADDevice"></a>
- <h3>AMADDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#AMADDevice'>DE</a>]</div>
- <ul>
- <u><b>AMAD - Automagic Android Device</b></u>
- <br>
- This module integrates Android devices into FHEM and displays several settings <b><u>using the Android app "Automagic" or "Tasker"</u></b>.
- 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.
- <br>
- Any information retrievable by Automagic/Tasker can be displayed in FHEM by this module. Just define your own Automagic-"flow" or Tasker-"task" and send the data to the AMADCommBridge. One even can control several actions on Android devices.
- <br>
- To be able to make use of all these functions the Automagic/Tasker app and additional flows/Tasker-project need to be installed on the Android device. The flows/Tasker-project can be retrieved from the FHEM directory, the app can be bought in Google Play Store.
- <br><br>
- <b>How to use AMADDevice?</b>
- <ul>
- <li>first, make sure that the AMADCommBridge in FHEM was defined</li>
- <li><b>Using Autoremote</b></li>
- <ul>
- <li>install the "Automagic Premium" app from the PlayStore</li>
- <li>install the flowset 74_AMADDeviceautomagicFlowset$VERSION.xml file from the $INSTALLFHEM/FHEM/lib/ directory on the Android device</li>
- <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>
- </ul>
- <li><b>Using Tasker</b></li>
- <ul>
- <li>install the "Tasker" app from the PlayStore</li>
- <li>install the Tasker-project 74_AMADtaskerset_$VERSION.prj.xml file from the $INSTALLFHEM/FHEM/lib/ directory on the Android device</li>
- <li>run the "AMAD" task in Tasker and make your initial setup, by pressing the "create Device" button it will automatically create the device in FHEM</li>
- </ul>
- </ul>
- <br><br>
- <u><b>Define a AMADDevice device by hand.</b></u>
- <br><br>
- <a name="AMADDevicedefine"></a>
- <b>Define</b>
- <ul><br>
- 10.6.9.10 1496497380000 IODev=AMADBridge
- <code>define <name> AMADDevice <IP-ADRESSE> <AMAD_ID> IODev=<IODEVICE></code>
- <br><br>
- Example:
- <ul><br>
- <code>define WandTabletWohnzimmer AMADDevice 192.168.0.23 123456 IODev=NAME_des_AMADCommBridge_Devices</code><br>
- </ul>
- <br>
- 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/Tasker.
- </ul>
- <br><br><br>
- <a name="AMADDevicereadings"></a>
- <b>Readings</b>
- <ul>
- <li>airplanemode - on/off, state of the aeroplane mode</li>
- <li>androidVersion - currently installed version of Android</li>
- <li>automagicState - state of the Automagic or Tasker App <b>(prerequisite Android >4.3). In case you have Android >4.3 and the reading says "not supported", you need to enable Automagic/Tasker inside Android / Settings / Sound & notification / Notification access</b></li>
- <li>batteryHealth - the health of the battery (1=unknown, 2=good, 3=overheat, 4=dead, 5=over voltage, 6=unspecified failure, 7=cold) (Automagic only)</li>
- <li>batterytemperature - the temperature of the battery (Automagic only)</li>
- <li>bluetooth - on/off, bluetooth state</li>
- <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> (Automagic only)</li>
- <li>connectedBTdevices - list of all devices connected via bluetooth (Automagic only)</li>
- <li>connectedBTdevicesMAC - list of MAC addresses of all devices connected via bluetooth (Automagic only)</li>
- <li>currentMusicAlbum - currently playing album of mediaplayer (Automagic only)</li>
- <li>currentMusicApp - currently playing player app (Amazon Music, Google Play Music, Google Play Video, Spotify, YouTube, TuneIn Player, Aldi Life Music) (Automagic only)</li>
- <li>currentMusicArtist - currently playing artist of mediaplayer (Automagic only)</li>
- <li>currentMusicIcon - cover of currently play album <b>Not yet fully implemented</b> (Automagic only)</li>
- <li>currentMusicState - state of currently/last used mediaplayer (Automagic only)</li>
- <li>currentMusicTrack - currently playing song title of mediaplayer (Automagic only)</li>
- <li>daydream - on/off, daydream currently active</li>
- <li>deviceState - state of Android devices. unknown, online, offline.</li>
- <li>doNotDisturb - state of do not Disturb Mode</li>
- <li>dockingState - undocked/docked, Android device in docking station</li>
- <li>flow_SetCommands - active/inactive, state of SetCommands flow</li>
- <li>flow_informations - active/inactive, state of Informations flow</li>
- <li>flowsetVersionAtDevice - currently installed version of the flowsets on the Android device</li>
- <li>incomingCallerName - Callername from last Call</li>
- <li>incomingCallerNumber - Callernumber from last Call</li>
- <li>incomingWhatsAppMessage - last WhatsApp message</li>
- <li>incomingTelegramMessage - last telegram message</li>
- <li>incomingSmsMessage - last SMS message</li>
- <li>intentRadioName - name of the most-recent streamed intent radio</li>
- <li>intentRadioState - state of intent radio player</li>
- <li>keyguardSet - 0/1 keyguard set, 0=no 1=yes, does not indicate whether it is currently active</li>
- <li>lastSetCommandError - last error message of a set command</li>
- <li>lastSetCommandState - last state of a set command, command send successful/command send unsuccessful</li>
- <li>lastStatusRequestError - last error message of a statusRequest command</li>
- <li>lastStatusRequestState - ast state of a statusRequest command, command send successful/command send unsuccessful</li>
- <li>nextAlarmDay - currently set day of alarm</li>
- <li>nextAlarmState - alert/done, current state of "Clock" stock-app</li>
- <li>nextAlarmTime - currently set time of alarm</li>
- <li>nfc - state of nfc service on/off</li>
- <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. (Automagic only)</li>
- <li>powerLevel - state of battery in %</li>
- <li>powerPlugged - 0=no/1,2=yes, power supply connected</li>
- <li>screen - on locked,unlocked/off locked,unlocked, state of display</li>
- <li>screenBrightness - 0-255, level of screen-brightness</li>
- <li>screenFullscreen - on/off, full screen mode (Automagic only)</li>
- <li>screenOrientation - Landscape/Portrait, screen orientation (horizontal,vertical)</li>
- <li>screenOrientationMode - auto/manual, mode for screen orientation</li>
- <li>state - current state of AMAD device</li>
- <li>userFlowState - current state of a Flow, established under setUserFlowState Attribut (Automagic only)</li>
- <li>volume - media volume setting</li>
- <li>volumeNotification - notification volume setting</li>
- <li>wiredHeadsetPlugged - 0/1 headset plugged out or in</li>
- <br>
- 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
- checkActiveTask com.android.chrome</i> für den Chrome Browser.
- <br><br>
- </ul>
- <br><br>
- <a name="AMADDeviceset"></a>
- <b>Set</b>
- <ul>
- <li>activateVoiceInput - start voice input on Android device</li>
- <li>bluetooth - on/off, switch bluetooth on/off</li>
- <li>clearNotificationBar - All/Automagic, deletes all or only Automagic/Tasker notifications in status bar</li>
- <li>closeCall - hang up a running call</li>
- <li>currentFlowsetUpdate - start flowset/Tasker-project update on Android device</li>
- <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> (Automagic only)</li>
- <li>doNotDisturb - sets the do not Disturb Mode, always Disturb, never Disturb, alarmClockOnly alarm Clock only, onlyImportant only important Disturbs</li>
- <li>mediaPlay - play command to media App</li>
- <li>mediaStop - stop command to media App</li>
- <li>mediaNext - skip Forward command to media App</li>
- <li>mediaBack - skip Backward to media App</li>
- <li>nextAlarmTime - sets the alarm time. Only valid for the next 24 hours.</li>
- <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>
- <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>
- <li>screenBrightness - 0-255, set screen brighness</li>
- <li>screenMsg - display message on screen of Android device</li>
- <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>
- <li>sendSMS - Sends an SMS to a specific phone number. Bsp.: sendSMS Dies ist ein Test|555487263</li>
- <li>startDaydream - start Daydream</li>
- <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>
- <li>timer - set a countdown timer in the "Clock" stock app. Only minutes are allowed as parameter.</li>
- <li>ttsMsg - send a message which will be played as voice message (to change laguage temporary set first character &en; or &de;)</li>
- <li>userFlowState - set Flow/Tasker-profile active or inactive,<b><i>set Nexus7Wohnzimmer Badezimmer:inactive vorheizen</i> or <i>set Nexus7Wohnzimmer Badezimmer vorheizen,Nachtlicht Steven:inactive</i></b></li>
- <li>userFlowRun - executes the specified flow/task</li>
- <li>vibrate - vibrate Android device</li>
- <li>volume - set media volume. Works on internal speaker or, if connected, bluetooth speaker or speaker connected via stereo jack</li>
- <li>volumeNotification - set notifications volume</li>
- </ul>
- <br>
- <b>Set (depending on attribute values)</b>
- <ul>
- <li>changetoBtDevice - switch to another bluetooth device. <b>Attribute setBluetoothDevice needs to be set. See note below!</b> (Automagic only)</li>
- <li>nfc - activate or deactivate the nfc Modul on/off. <b>attribute root</b></li>
- <li>openApp - start an app. <b>attribute setOpenApp</b></li>
- <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>
- <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! (Tasker supports only "off" command)</li>
- <li>screenFullscreen - on/off, activates/deactivates full screen mode. <b>attribute setFullscreen</b> (Automagic only)</li>
- <li>screenLock - Locks screen with request for PIN. <b>attribute setScreenlockPIN - enter PIN here. Only use numbers, 4-16 numbers required.</b> (Automagic only)</li>
- <li>screenOrientation - Auto,Landscape,Portait, set screen orientation (automatic, horizontal, vertical). <b>attribute setScreenOrientation</b></li>
- <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>
- <li>takePicture - take a camera picture <b>Attribut setTakePictureResolution</b></li>
- </ul>
- <br><br>
- <a name="AMADDeviceattribut"></a>
- <b>Attribut</b>
- <ul>
- <li>setAPSSID - set WLAN AccesPoint SSID to prevent WLAN sleeps (Automagic only)</li>
- <li>setNotifySndFilePath - set systempath to notifyfile (default /storage/emulated/0/Notifications/</li>
- <li>setTtsMsgSpeed - set speaking speed for TTS (For Automagic: Value between 0.5 - 4.0, 0.5 Step, default: 1.0)(For Tasker: Value between 1 - 10, 1 Step, default: 5)</li>
- <li>setTtsMsgLang - set speaking language for TTS, de or en (default is de)</li>
- <li>setTtsMsgVol - is set, change automatically the media audio end set it back</li>
- <li>set setTakePictureResolution - set the camera resolution for takePicture action (800x600,1024x768,1280x720,1600x1200,1920x1080)</li>
- <li>setTakePictureCamera - which camera do you use (Back,Front).</li>
- <br>
- To be able to use "openApp" the corresponding attribute "setOpenApp" needs to contain the app package name.
- <br><br>
- To be able to switch between bluetooth devices the attribute "setBluetoothDevice" needs to contain (a list of) bluetooth devices defined as follows: <b>attr <DEVICE> 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>
- Example: <i>attr Nexus10Wohnzimmer setBluetoothDevice Logitech_BT_Adapter|AB:12:CD:34:EF:32,Anker_A3565|GH:56:IJ:78:KL:76</i>
- </ul>
- <br><br>
- <a name="AMADDevicestate"></a>
- <b>state</b>
- <ul>
- <li>initialized - shown after initial define.</li>
- <li>active - device is active.</li>
- <li>disabled - device is disabled by the attribute "disable".</li>
- </ul>
- <br><br><br>
- <u><b>Further examples and reading:</b></u>
- <ul><br>
- <a href="http://www.fhemwiki.de/wiki/AMAD#Anwendungsbeispiele">Wiki page for AMAD (german only)</a>
- </ul>
- <br><br><br>
- </ul>
- <p> <a name="Alarm"></a>
- <h3>Alarm</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Alarm'>DE</a>]</div>
- <ul>
- <p> FHEM module to set up a house alarm system with 8 different alarm levels</p>
- <a name="Alarmusage"></a>
- <h4>Usage</h4>
- See <a href="http://www.fhemwiki.de/wiki/Modul_Alarm">German Wiki page</a>
- <a name="Alarmdefine"></a>
- <br/>
- <h4>Define</h4>
- <p>
- <code>define <name> Alarm</code>
- <br />Defines the Alarm system. </p>
- <a name="Alarmset"></a>
- Notes: <ul>
- <li>This module uses the global attribute <code>language</code> to determine its output data<br/>
- (default: EN=english). For German output set <code>attr global language DE</code>.</li>
- <li>This module needs the JSON package.</li>
- </ul>
- <h4>Set</h4>
- <ul>
- <li><a name="alarm_cancel">
- <code>set <name> canceled <level></code>
- </a>
- <br />cancels an alarm of level <level>, where <level> = 0..7 </li>
- <li><a name="alarm_arm">
- <code>set <name> armed <level></code><br />
- <code>set <name> disarmed <level></code>
- </a>
- <br />sets the alarm of level <level> to armed (i.e., active) or disarmed
- (i.e., inactive), where <level> = 0..7 </li>
- <li><a name="alarm_lock">
- <code>set <name> locked</code><br />
- <code>set <name> unlocked</code>
- </a>
- <br />sets the lockstate of the alarm module to <i>locked</i> (i.e., alarm setups
- may not be changed) resp. <i>unlocked</i> (i.e., alarm setups may be changed>)</li>
- <li><a name="alarm_save">
- <code>set <name> save|restore</code>
- </a>
- <br />Manually save/restore the arm states to/from the external file AlarmFILE (save done automatically at each state modification, restore at FHEM start)</li>
- </ul>
- <a name="Alarmget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="alarm_version"></a>
- <code>get <name> version</code>
- <br />Display the version of the module</li>
- </ul>
- <a name="Alarmattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="alarm_hiddenroom"><code>attr <name> hiddenroom
- <string></code></a>
- <br />Room name for hidden alarm room (containing only the Alarm device), default:
- AlarmRoom</li>
- <li><a name="alarm_publicroom"><code>attr <name> publicroom
- <string></code></a>
- <br />Room name for public alarm room (containing sensor/actor devices), default:
- Alarm</li>
- <li><a name="alarm_lockstate"><code>attr <name> lockstate
- locked|unlocked</code></a>
- <br /><i>locked</i> means that alarm setups may not be changed, <i>unlocked</i>
- means that alarm setups may be changed></li>
- <li><a name="alarm_testbutton"><code>attr <name> testbutton 0|1</code></a>
- <br /><i>1</i> means that a test button is displayed for every actor field</li>
- <li><a name="alarm_statedisplay"><code>attr <name> statedisplay
- simple,color,table,none</code></a>
- <br />defines how the state of all eight alarm levels is shown. Example for the case
- when alarm no. 0 is disarmed and only alarm no. 2 is raised: <ul>
- <li> simple = OXOOOOO</li>
- <li> color = <span style="color:lightgray"> 0 </span><span style="font-weight:bold;color:#53f3c7">1 <span style="font-weight:bold;color:#fd5777"
- >2</span> 3 4 5 6 7</span></li>
- <li> table = HTML mini table with colored fields for alarms
- </li>
- <li> none = no state display</li>
- </ul>
- </li>
- <li><a name="alarm_noicons"><code>attr <name> noicons
- 0|1</code></a>
- <br />when set to 1, animated icons are suppressed</li>
- <li><a name="alarm_iconmap"><code>attr <name> iconmap <i>list</i></code></a>
- <br /> comma separated list of alarm levels for which the main icon/widget is set to disarmed/mixed/armed. No default=icon static</li>
- <li><a name="alarm_color"><code>attr <name> disarmcolor|armwaitcolor|armcolor|alarmcolor <i>color</i></code></a>
- <br />four color specifications to signal the states disarmed (default <span style="color:lightgray">lightgray</span>),
- armwait (default <span style="color:#ffe658">#ffe658</span>),
- armed (default <span style="color:#53f3c7">#53f3c7</span>) and alarmed (default <span style="color:#fd5777">#fd5777</span>)</li>
- <li><a name="alarm_armdelay"><code>attr <name> armdelay <i>mm:ss</i></code></a>
- <br />time until the arming of an alarm becomes operative (0:00 - 9:59 allowed)</li>
- <li><a name="alarm_armwait"><code>attr <name> armwait <i>action</i></code></a>
- <br />FHEM action to be carried out immediately after the arm event</li>
- <li><a name="alarm_armact"><code>attr <name> armact <i>action</i></code></a>
- <br />FHEM action to be carried out at the arme event after the delay time </li>
- <li><a name="alarm_disarmact"><code>attr <name> disarmact <i>action</i></code></a>
- <br />FHEM action to be carried out on the disarming of an alarm</li>
- <li><a name="alarm_cancelact"><code>attr <name> cancelact <i>action</i></code></a>
- <br />FHEM action to be carried out on the canceling of an alarm</li>
- <li><a name="alarm_internals"></a>For each of the 8 alarm levels, several attributes
- hold the alarm setup. They should not be changed by hand, but through the web
- interface to avoid confusion: <code>level<level>start, level<level>end,
- level<level>msg, level<level>onact,
- level<level>offact</code></li>
- <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
- href="#event-on-update-reading">event-on-update-reading</a>, <a
- href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
- >room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
- <a href="#webCmd">webCmd</a></li>
- </ul>
- </ul>
- <p><a name="Aqicn"></a>
- <h3>Air Quality Index</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Aqicn'>DE</a>]</div>
- <ul>
- This modul fetch Air Quality data from http://aqicn.org.
- <br><br>
- <a name="Aqicndefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> Aqicn</code>
- <br><br>
- Example:
- <ul><br>
- <code>define aqicnMaster Aqicn</code><br>
- </ul>
- <br>
- This statement creates the Aqicn Master Device.<br>
- After the device has been created, you can search Aqicn Station by city name and create automatically the station device.
- </ul>
- <br><br>
- <a name="Aqicnreadings"></a>
- <b>Readings</b>
- <ul>
- <li>APL - Air Pollution Level</li>
- <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>
- <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>
- <li>NO2-AQI - AQI of NO2 (nitrogen dioxide). See also https://www.airnow.gov/index.cfm?action=pubs.aqiguidenox</li>
- <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>
- <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>
- <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>
- <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>
- <li>temperature - Temperature in degrees Celsius</li>
- <li>pressure - Atmospheric pressure in hectopascals (hPa)</li>
- <li>humidity - Relative humidity in percent</li>
- <li>state- Current AQI and air pollution level</li>
- <li>status - condition of the data</li>
- <li>pubDate- Local time of publishing the data</li>
- <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>
- <li>pubTimezone - Time zone of the city (UTC)</li>
- <li>windspeed - Wind speed in kilometer per hour</li>
- <li>windDirection - Wind direction</li>
- <li>dominatPoll - Dominant pollutant in city</li>
- <li>dewpoint - Dew in degrees Celsius</li>
- <li>healthImplications - Information about Health Implications</li>
- <li>htmlStyle - can be used to format the STATE and FHEMWEB (Example: stateFormate htmlStyle</li>
- </ul>
- <br>
- <a name="Aqicnget"></a>
- <b>get</b>
- <ul>
- <li>stationSearchByCity - search station by city name and open the result in seperate popup window</li>
- <li>update - fetch new data every x times</li>
- </ul>
- <br>
- <a name="Aqicnattribute"></a>
- <b>Attribute</b>
- <ul>
- <li>interval - interval in seconds for automatically fetch data (default 3600)</li>
- </ul>
- </ul>
- <p><a name="ArduCounter"></a>
- <h3>ArduCounter</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ArduCounter'>DE</a>]</div>
- <ul>
- 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.<br>
- The typical use case is an S0-Interface on an energy meter or water meter<br>
- 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>
- The Arduino sketch that works with this module uses pin change interrupts so it can efficiently count pulses on all available input pins.<br>
- The module creates readings for pulse counts, consumption and optionally also a pulse history with pulse lengths and gaps of the last 20 pulses.
- <br><br>
- <b>Prerequisites</b>
- <ul>
- <br>
- <li>
- This module requires an Arduino uno, nano, Jeenode or similar device running the ArduCounter sketch provided with this module<br>
- In order to flash an arduino board with the corresponding ArduCounter firmware, avrdude needs to be installed.
- </li>
- </ul>
- <br>
- <a name="ArduCounterdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> ArduCounter <device></code>
- <br>
- <device> specifies the serial port to communicate with the Arduino.<br>
-
- The name of the serial-device depends on your distribution.
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyUSB0@38400<br>
- The default baudrate of the ArduCounter firmware is 38400 since Version 1.4
- <br>
- Example:<br>
- <br>
- <ul><code>define AC ArduCounter /dev/ttyUSB2@38400</code></ul>
- </ul>
- <br>
- <a name="ArduCounterconfiguration"></a>
- <b>Configuration of ArduCounter counters</b><br><br>
- <ul>
- Specify the pins where impulses should be counted e.g. as <code>attr AC pinX falling pullup 30</code> <br>
- The X in pinX can be an Arduino pin number with or without the letter D e.g. pin4, pinD5, pin6, pinD7 ...<br>
- After the pin you can use the keywords falling or rising to define if a logical one / 5V (rising) or a logical zero / 0V (falling) should be treated as pulse.<br>
- The optional keyword pullup activates the pullup resistor for the given Arduino Pin. <br>
- The last argument is also optional but recommended and specifies a minimal pulse length in milliseconds.<br>
- An energy meter with S0 interface is typically connected to GND and an input pin like D4. The S0 pulse then pulls the input to 0V.<br>
- Since the minimal pulse lenght of the s0 interface is specified to be 30ms, the typical configuration for an s0 interface is <br>
- <code>attr AC pinX falling pullup 30</code><br>
- Specifying a minimal pulse length is recommended since it filters bouncing of reed contacts or other noise.
- <br><br>
- Example:<br>
- <pre>
- define AC ArduCounter /dev/ttyUSB2
- attr AC factor 1000
- attr AC interval 60 300
- attr AC pinD4 falling pullup 5
- attr AC pinD5 falling pullup 30
- attr AC verboseReadings5
- attr AC pinD6 rising
- </pre>
-
- This defines three counters connected to the pins D4, D5 and D5. <br>
- D4 and D5 have their pullup resistors activated and the impulse draws the pins to zero. <br>
- For D4 and D5 the arduino measures the time in milliseconds between the falling edge and the rising edge. If this time is longer than the specified 5 or 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>
- verboseReadings5 causes the module to create additional readings like the pulse history which shows length and gaps between the last pulses.<br>
- For pin D6 the arduino does not check pulse lengths and counts every time when the signal changes from 0 to 1.<br>
- The ArduCounter sketch which must be loaded on the Arduino implements this using pin change interrupts,
- so all avilable input pins can be used, not only the ones that support normal interrupts. <br>
- The module has been tested with 14 inputs of an Arduino Uno counting in parallel and pulses as short as 3 milliseconds.
- </ul>
- <br>
- <a name="ArduCounterset"></a>
- <b>Set-Commands</b><br>
- <ul>
- <li><b>raw</b></li>
- send the value to the Arduino board so you can directly talk to the sketch using its commands.<br>
- This is not needed for normal operation but might be useful sometimes for debugging<br>
- <li><b>flash</b></li>
- flashes the ArduCounter firmware ArduCounter.hex from the fhem subdirectory FHEM/firmware
- 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>
- This setting should work for a standard installation and the placeholders are automatically replaced when
- the command is used. So normally there is no need to modify this attribute.<br>
- Depending on your specific Arduino board however, you might need to insert <code>-b 57600</code> in the flash Command. (e.g. for an Arduino Nano)<br>
- <br>
- <li><b>reset</b></li>
- 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.
- </ul>
- <br>
- <a name="ArduCounterget"></a>
- <b>Get-Commands</b><br>
- <ul>
- <li><b>info</b></li>
- send a command to the Arduino board to get current counts.<br>
- This is not needed for normal operation but might be useful sometimes for debugging<br>
- </ul>
- <br>
- <a name="ArduCounterattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <li><b>pin.*</b></li>
- Define a pin of the Arduino board as input. This attribute expects either
- <code>rising</code>, <code>falling</code> or <code>change</code>, followed by an optional <code>pullup</code> and an optional number as value.<br>
- 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.
- <li><b>interval</b> normal max min mincout</li>
- Defines the parameters that affect the way counting and reporting works.
- 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.
- In the usual operation mode (when the normal interval is smaller than the maximum interval),
- the Arduino board just counts and remembers the time between the first impulse and the last impulse for each pin.<br>
- After the normal interval is elapsed the Arduino board reports the count and time for those pins where impulses were encountered.<br>
- This means that even though the normal interval might be 10 seconds, the reported time difference can be
- something different because it observed impulses as starting and ending point.<br>
- The Power (e.g. for energy meters) is then calculated based of the counted impulses and the time between the first and the last impulse. <br>
- For the next interval, the starting time will be the time of the last impulse in the previous
- reporting period and the time difference will be taken up to the last impulse before the reporting
- interval has elapsed.
- <br><br>
- 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>
- 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.<br>
- By adjusting the other numbers of this attribute this can be avoided.<br>
- 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 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>
- This way the counter will report a higher number of pulses counted and a larger time difference back to fhem.
- <br><br>
- 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.
- <li><b>factor</b></li>
- Define a multiplicator for calculating the power from the impulse count and the time between the first and the last impulse
-
- <li><b>readingNameCount[0-9]+</b></li>
- Change the name of the counter reading pinX to something more meaningful.
- <li><b>readingNameLongCount[0-9]+</b></li>
- Change the name of the long counter reading longX to something more meaningful.
-
- <li><b>readingNameInterpolatedCount[0-9]+</b></li>
- Change the name of the interpolated long counter reading InterpolatedlongX to something more meaningful.
-
- <li><b>readingNamePower[0-9]+</b></li>
- Change the name of the power reading powerX to something more meaningful.
- <li><b>readingFactor[0-9]+</b></li>
- Override the factor attribute for this individual pin.
- <li><b>readingStartTime[0-9]+</b></li>
- Allow the reading time stamp to be set to the beginning of measuring intervals.
- <li><b>verboseReadings[0-9]+</b></li>
- create readings timeDiff, countDiff and lastMsg for each pin <br>
- <li><b>flashCommand</b></li>
- sets the command to call avrdude and flash the onnected arduino with an updated hex file (by default it looks for ArduCounter.hex in the FHEM/firmware subdirectory.<br>
- This attribute contains <code>avrdude -p atmega328P -c arduino -P [PORT] -D -U flash:w:[HEXFILE] 2>[LOGFILE]</code> by default.<br>
- For an Arduino Nano based counter you should add <code>-b 57600</code> e.g. between the -P and -D options.
- </ul>
- <br>
- <b>Readings / Events</b><br>
- <ul>
- The module creates at least the following readings and events for each defined pin:
- <li><b>pin.*</b></li>
- the current count at this pin
- <li><b>long.*</b></li>
- long count 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.
- <li><b>interpolatedLong.*</b></li>
- like long.* but when the Arduino restarts the potentially missed pulses are interpolated based on the pulse rate before the restart and after the restart.
- <li><b>reject.*</b></li>
- counts rejected pulses that are shorter than the specified minimal pulse length.
- <li><b>power.*</b></li>
- the current calculated power at this pin
- <li><b>pinHistory.*</b></li>
- shows detailed information of the last pulses. This is only available when a minimal pulse length is specified for this pin. Also the total number of impulses recorded here is limited to 20 for all pins together. The output looks like -36/7:0C, -29/7:1G, -22/8:0C, -14/7:1G, -7/7:0C, 0/7:1G<br>
- The first number is the relative time in milliseconds when the input level changed, followed by the length in milliseconds, the level and the internal action.<br>
- -36/7:0C for example means that 36 milliseconds before the reporting started, the input changed to 0V, stayed there for 7 milliseconds and this was counted.<br>
- </ul>
- <br>
- </ul>
- <p> <a name="Astro"></a>
- <h3>Astro</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Astro'>DE</a>]</div>
- <ul>
- <p> FHEM module with a collection of various routines for astronomical data</p>
- <a name="Astrodefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> Astro</code>
- <br />Defines the Astro device (only one is needed per FHEM installation). </p>
- <p>
- Readings with prefix <i>Sun</i> refer to the sun, with prefix <i>Moon</i> refer to the moon.
- The suffixes for these readings are
- <ul>
- <li><i>Age</i> = angle (in degrees) of body along its track</li>
- <li><i>Az,Alt</i> = azimuth and altitude angle (in degrees) of body above horizon</li>
- <li><i>Dec,Ra</i> = declination (in degrees) and right ascension (in HH:MM) of body position</li>
- <li><i>Lat,Lon</i> = latitude and longituds (in degrees) of body position</li>
- <li><i>Diameter</i> = virtual diameter (in arc minutes) of body</li>
- <li><i>Distance,DistanceObserver</i> = distance (in km) of body to center of earth or to observer</li>
- <li><i>PhaseN,PhaseS</i> = Numerical and string value for phase of body</li>
- <li><i>Sign</i> = Circadian sign for body along its track</li>
- <li><i>Rise,Transit,Set</i> = times (in HH:MM) for rise and set as well as for highest position of body</li>
- </ul>
- <p>
- Readings with prefix <i>Obs</i> refer to the observer.
- In addition to some of the suffixes gives above, the following may occur
- <ul>
- <li><i>Date,Dayofyear</i> = date</li>
- <li><i>JD</i> = Julian date</li>
- <li><i>Season,SeasonN</i> = String and numerical (0..3) value of season</li>
- <li><i>Time,Timezone</i> obvious meaning</li>
- <li><i>GMST,�MST</i> = Greenwich and Local Mean Sidereal Time (in HH:MM)</li>
- </ul>
- <p>
- An SVG image of the current moon phase may be obtained under the link
- <code><ip address of fhem>/fhem/Astro_moonwidget?name='<device name>'&size='<width>x<height>'</code>
- <p>
- Notes: <ul>
- <li>Calculations are only valid between the years 1900 and 2100</li>
- <li>Attention: Timezone is taken from the local Perl settings, NOT automatically defined for a location</li>
- <li>This module uses the global attribute <code>language</code> to determine its output data<br/>
- (default: EN=english). For German output set <code>attr global language DE</code>.</li>
- <li>The time zone is determined automatically from the local settings of the <br/>
- operating system. If geocordinates from a different time zone are used, the results are<br/>
- not corrected automatically.
- <li>Some definitions determining the observer position are used<br/>
- from the global device, i.e.<br/>
- <code>attr global longitude <value></code><br/>
- <code>attr global latitude <value></code><br/>
- <code>attr global altitude <value></code> (in m above sea level)<br/>
- These definitions are only used when there are no corresponding local attribute settings.
- </li>
- <li>
- It is not necessary to define an Astro device to use the data provided by this module<br/>
- To use its data in any other module, you just need to put <code>require "95_Astro.pm";</code> <br/>
- at the start of your own code, and then may call, for example, the function<br/>
- <code>Astro_Get( SOME_HASH_REFERENCE,"dummy","text", "SunRise","2019-12-24");</code><br/>
- to acquire the sunrise on Christmas Eve 2019</li>
- </ul>
- <a name="Astroget"></a>
- <h4>Get</h4>
- Attention: Get-calls are NOT written into the readings of the device ! Readings change only through periodic updates !<br/>
- </li>
- <ul>
- <li><a name="astro_json"></a>
- <code>get <name> json [<reading>]</code><br/>
- <code>get <name> json [<reading>] YYYY-MM-DD</code><br/>
- <code>get <name> json [<reading>] YYYY-MM-DD HH:MM:[SS]</code>
- <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>
- <li><a name="astro_text"></a>
- <code>get <name> text [<reading>]</code><br/>
- <code>get <name> text [<reading>] YYYY-MM-DD</code><br/>
- <code>get <name> text [<reading>] YYYY-MM-DD HH:MM:[SS]</code>
- <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>
- <li><a name="astro_version"></a>
- <code>get <name> version</code>
- <br />Display the version of the module</li>
- </ul>
- <a name="Astroattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="astro_interval">
- <code><interval></code>
- <br />Update interval in seconds. The default is 3600 seconds, a value of 0 disables the automatic update. </li>
- <li>Some definitions determining the observer position:<br/>
- <code>attr <name> longitude <value></code><br/>
- <code>attr <name> latitude <value></code><br/>
- <code>attr <name> altitude <value></code> (in m above sea level)<br/>
- <code>attr <name> horizon <value></code> custom horizon angle in degrees, default 0<br/>
- These definitions take precedence over global attribute settings.
- </li>
- <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
- href="#event-on-update-reading">event-on-update-reading</a>, <a
- href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
- >room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
- <a href="#webCmd">webCmd</a></li>
- </ul>
- </ul>
- <p><a name="Aurora"></a>
- <h3>Aurora</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Aurora'>DE</a>]</div>
- <ul>
- <br>
- <a name="Aurora_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Aurora <ip> [<interval>]</code><br>
- <br>
- Defines a device connected to a <a href="#Aurora">Aurora</a>.<br><br>
- The device status will be updated every <interval> seconds. 0 means no updates.
- Groups are updated only on definition and statusRequest<br><br>
- Examples:
- <ul>
- <code>define aurora Aurora 10.0.1.xxx 10</code><br>
- </ul>
- </ul><br>
- <a name="Aurora_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>bri<br>
- the brightness reported from the device. the value can be betwen 1 and 254</li>
- <li>colormode<br>
- the current colormode</li>
- <li>ct<br>
- the colortemperature in mireds and kelvin</li>
- <li>hue<br>
- the current hue</li>
- <li>pct<br>
- the current brightness in percent</li>
- <li>onoff<br>
- the current on/off state as 0 or 1</li>
- <li>sat<br>
- the current saturation</li>
- <li>state<br>
- the current state</li>
- <br>
- Notes:
- <ul>
- <li>with current bridge firware versions groups have <code>all_on</code> and <code>any_on</code> readings,
- with older firmware versions groups have no readings.</li>
- <li>not all readings show the actual device state. all readings not related to the current colormode have to be ignored.</li>
- <li>the actual state of a device controlled by a living colors or living whites remote can be different and will
- be updated after some time.</li>
- </ul><br>
- </ul><br>
- <a name="Aurora_Set"></a>
- <b>Set</b>
- <ul>
- <li>on [<ramp-time>]</li>
- <li>off [<ramp-time>]</li>
- <li>toggle [<ramp-time>]</li>
- <li>statusRequest<br>
- Request device status update.</li>
- <li>pct <value> [<ramp-time>]<br>
- dim to <value><br>
- Note: the FS20 compatible dimXX% commands are also accepted.</li>
- <li>color <value><br>
- set colortemperature to <value> kelvin.</li>
- <li>bri <value> [<ramp-time>]<br>
- set brighness to <value>; range is 0-254.</li>
- <li>dimUp [delta]</li>
- <li>dimDown [delta]</li>
- <li>ct <value> [<ramp-time>]<br>
- set colortemperature to <value> in mireds (range is 154-500) or kelvin (rankge is 2000-6493).</li>
- <li>ctUp [delta]</li>
- <li>ctDown [delta]</li>
- <li>hue <value> [<ramp-time>]<br>
- set hue to <value>; range is 0-65535.</li>
- <li>humUp [delta]</li>
- <li>humDown [delta]</li>
- <li>sat <value> [<ramp-time>]<br>
- set saturation to <value>; range is 0-254.</li>
- <li>satUp [delta]</li>
- <li>satDown [delta]</li>
- <li>effect <name></li>
- <li>rgb <rrggbb><br>
- set the color to (the nearest equivalent of) <rrggbb></li>
- <br>
- <li><a href="#setExtensions"> set extensions</a> are supported.</li>
- <br>
- Note:
- <ul>
- <li><ramp-time> is given in seconds</li>
- <li>multiple paramters can be set at once separated by <code>:</code><br>
- Examples:<br>
- <code>set LC on : transitiontime 100</code><br>
- <code>set bulb on : bri 100 : color 4000</code><br></li>
- </ul>
- </ul><br>
- <a name="Aurora_Get"></a>
- <b>Get</b>
- <ul>
- <li>rgb</li>
- <li>RGB</li>
- <li>devStateIcon<br>
- returns html code that can be used to create an icon that represents the device color in the room overview.</li>
- </ul><br>
- <a name="Aurora_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>color-icon<br>
- 1 -> use lamp color as icon color and 100% shape as icon shape<br>
- 2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
- <li>transitiontime<br>
- default transitiontime for all set commands if not specified directly in the set.</li>
- <li>delayedUpdate<br>
- 1 -> the update of the device status after a set command will be delayed for 1 second. usefull if multiple devices will be switched.
- </li>
- <li>devStateIcon<br>
- will be initialized to <code>{(Aurora_devStateIcon($name),"toggle")}</code> to show device color as default in room overview.</li>
- <li>webCmd<br>
- will be initialized to a device specific value</li>
- </ul>
- </ul><br>
- <p><a name="BDKM"></a>
- <h3>BDKM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#BDKM'>DE</a>]</div>
- <ul>
- BDKM is a module supporting Buderus Logamatic KM gateways similar
- to the <a href="#km200">km200</a> module. For installation of the
- gateway see fhem km200 internet wiki<br>
- Compared with the km200 module the code of the BDKM module is more
- compact and has some extra features. It has the ablility to
- define how often a gateway ID is polled, which FHEM reading
- (alias) is generated for a gateway ID and which minimum difference
- to the last reading must exist to generate a new reading (see
- attributes).<br>
- It determines value ranges, allowed values and writeability from
- the gateway supporting FHEMWEB and readingsGroup when setting
- Values (drop down value menues).<br>
- On definition of a BDKM device the gateway is connected and a full
- poll collecting all IDs is done. This takes about 20 to 30
- seconds. After that the module knows all IDs reported
- by the gateway. To examine these IDs just type:<BR>
- <code>get myBDKM INFO</code><BR>
- These IDs can be used with the PollIds attribute to define if and
- how the IDs are read during the poll cycle. <br> All IDs can be
- mapped to own short readings.
- <br><br>
- <a name="BDKMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> BDKM <IP-address|hostname> <GatewayPassword>
- <PrivatePassword> <MD5-Salt></code><br>
- or <br>
- <code>define <name> BDKM <IP-address|hostname> <AES-Key></code><br>
- <br><br>
- <code><name></code> :
- Name of device<br>
- <code><IP-address></code> :
- The IP adress of your Buderus gateway<br>
- <code><GatewayPassword></code> :
- The gateway password as printed on case of the gateway s.th.
- of the form: xxxx-xxxx-xxxx-xxxx<br>
- <code><PrivatePassword></code> : The private password as
- set with the buderus App<br>
- <code><MD5-Salt></code> : MD5 salt for the crypt
- algorithm you want to use (hex string like 867845e9.....). Have a look for km200 salt 86 ... <br>
- AES-Key can be generated here:<br>
- https://ssl-account.com/km200.andreashahn.info<br>
- <br>
- </ul>
- <a name="BDKMset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <ID> <value> ...</code>
- <br><br>
- where <code>ID</code> is a valid writeable gateway ID (See list command,
- or "<code>get myBDKM INFO</code>")<br>
- The set command first reads the the ID from the gateway and also
- triggers a FHEM readings if necessary. After that it is checked if the
- value is valid. Then the ID and value(s) are transfered to to the
- gateway. After waiting (attr ReadBackDelay milliseconds) the value
- is read back and checked against value to be set. If necessary again
- a FHEM reading may be triggered. The read back value or an error is
- returned by the command. <br>
- Examples:
- <ul>
- <code>set myBDKM /heatingCircuits/hc1/temporaryRoomSetpoint 22.0</code><br>
- or the aliased version of it (if
- /heatingCircuits/hc1/temporaryRoomSetpointee is aliased to
- RoomTemporaryDesiredTemp):<br>
- <code>set myBDKM RoomTemporaryDesiredTemp 22.0</code><br>
- special to set time of gateway to the hosts date:<br>
- <code>set myBDKM /gateway/DateTime now</code><br>
- aliased:<br>
- <code>set myBDKM DateTime now</code><br>
- </ul>
- <br>
- </ul>
- <br>
- <a name="BDKMget"></a>
- <b>Get </b>
- <ul>
- <code>get <name> <ID> <[raw|json]>...</code><br><br>
- where <code>ID</code> is a valid gateway ID or an alias to it.
- (See list command)<br> The get command reads the the ID from the
- gateway, triggeres readings if necessarry, and returns the value
- or an error if s.th. went wrong. While polling is done
- asychronously with a non blocking HTTP GET. The set and get
- functions use a blocking HTTP GET/POST to be able to return a
- value directly to the user. Normaly get and set are only used by
- command line or when setting values via web interface.<br>
- With the <code>raw</code> option the whole original decoded data of the
- ID (as read from the gateway) is returned as a string.<br> With
- the <code>json</code> option a perl hash reference pointing to the
- JSON data is returned (take a look into the module if you want to
- use that)<br>
- <br>
- Examples:
- <ul>
- <code>get myBDKM /heatingCircuits/hc1/temporaryRoomGetpoint</code><br>
- or the aliased version of it (see attr below):<br>
- <code>get myBDKM RoomTemporaryDesiredTemp</code><br>
- <code>get myBDKM DateTime</code><br>
- <code>get myBDKM /gateway/instAccess</code><br>
- Spacial to get Infos about IDs known by the gateway and own
- configurations:<BR>
- <code>get myBDKM INFO</code><br>
- Everything matching /temp/
- <code>get myBDKM INFO temp</code><br>
- Everything matching /Heaven/ or /Hell/
- <code>get myBDKM INFO Heaven Hell</code><br>
- Everything known:
- <code>get myBDKM INFO .*</code><br>
- Arguments to <code>INFO</code> are reqular expressions
- which are matched against all IDs and all aliases.
- </ul>
- <br>
- </ul>
- <br>
- <a name="BDKMattr"></a>
- <b>Attributes</b>
- <ul>
- <li>BaseInterval<br>
- The interval time in seconds between poll cycles.
- It defaults to 120 seconds. Which means that every 120 seconds a
- new poll collects values of IDs which turn it is.
- </li><br>
- <li>InterPollDelay<br>
- The delay time in milliseconds between reading of two IDs from
- the gateway. It defaults to 0 (read as fast as possible).
- Some gateways/heatings seem to stop answering after a while
- when you are reading a lot of IDs. (verbose 2 "communication ERROR").
- To avoid gateway hangups always try to read only as many IDs as
- really required. If it doesn't help try to increase the
- InterPollDelay value. E.g. start with 100.
- </li><br>
- <li>ReadBackDelay<br>
- Read back delay for the set command in milliseconds. This value
- defaults to 500 (0.5s). After setting a value, the gateway need
- some time before the value can be read back. If this delay is
- too short after writing you will get back the old value and not
- the expected new one. The default should work in most cases.
- </li><br>
- <li>HttpTimeout<br>
- Timeout for all HTTP requests in seconds (polling, set,
- get). This defaults to 10s. If there is no answer from the
- gateway for HttpTimeout time an error is returned. If a HTTP
- request expires while polling an error log (level 2) is
- generated and the request is automatically restarted after 60
- seconds.
- </li><br>
- <li>PollIds<br>
- Without this attribute FHEM readings are NOT generated
- automatically! <br>
- This attribute defines how and when IDs are polled within
- a base interval (set by atrribute <code>BaseInterval</code>).<br>
- The attribute contains list of space separated IDs and options
- written as <br>
- <code>GatewayID:Modulo:Delta:Alias</code>
- <br>
- Where Gateway is the real gateway ID like "/gateway/DateTime".<br>
- Modulo is the value which defines how often the GatewayID is
- polled from the gateway and checked for FHEM readings update.
- E.g. a value of 4 means that the ID is polled only every 4th cycle.<br>
- Delta defines the minimum difference a polled value must have to the
- previous reading, before a FHEM reading with the new value is generated.<br>
- Alias defines a short name for the GatewayID under which the gateway ID
- can be accessed. Also readings (Logfile entries) are generated with this
- short alias if set. If not set, the original ID is used.<br>
- In detail:<br>
- <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>
- <code>ID:1::Alias</code> - poll every cycle, no Delta set => trigger FHEM reading to "Alias" on value change only<br>
- <code>ID:0::Alias</code> - update reading on startup once if reading changed (to the one prevously saved in fhem.save)<br>
- <code>ID:1:0.5:Alias</code> - poll every cycle, when difference => 0.5 trigger a FHEM reading to "Alias"<br>
- <code>ID:15::Alias</code> - poll every 15th cylce, update reading only if changed<br>
- <code>ID:::Alias</code> - update reading on (get/set) only and only if value changed<br>
- <code>ID::0:Alias</code> - update reading on (get/set) only and trigger reading always on get/set<br>
- <code>ID</code> - without colons ":", poll every cycle, update reading allways (same as <code>ID:1:0:</code>)<br>
- Also some usefull defaults can be set by the special keyword RC300DEFAULTS, RC35DEFAULTS, RC30DEFAULTS.<br>
- 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>
- Definitions set by the special keywords (see the module code for it) are overwritten by definitions later set in the attribute definition<br>
- Example:
- <ul>
- <code>attr myBDKM PollIds \<br>
- RC300DEFAULTS \<br>
- /gateway/DateTime:0::Date \<br>
- /system/info:0:0:\<br>
- /dhwCircuits/dhw1/actualTemp:1:0.2:WaterTemp
- </code><br>
- </ul>
- 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.
- <br>
- </li><br>
- </ul>
- </ul>
- <p><a name="BOSEST"></a>
- <h3>BOSEST</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#BOSEST'>DE</a>]</div>
- <ul>
- BOSEST is used to control a BOSE SoundTouch system (one or more SoundTouch 10, 20 or 30 devices)<br><br>
- <b>Note:</b> The followig libraries are required for this module:
- <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>
- 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:
- libmojolicious-perl must be >=5.54, but under wheezy is only 2.x avaible.<br>
- Use <b>sudo apt-get install cpanminus</b> and <b>sudo cpanm Mojolicious</b> to update to the newest version<br>
- 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>
- <br>
- 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>
- </ul><br>
-
- <a name="BOSESTdefine" id="BOSESTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> BOSEST</code><br>
- <br>
- Example:
- <ul>
- <code>define bosesystem BOSEST</code><br>
- Defines BOSE SoundTouch system. All devices/speakers will show up after 60s under "Unsorted" in FHEM.<br/>
- </ul>
- </ul>
-
- <br>
- <a name="BOSESTset" id="BOSESTset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code><br>
- The following commands are defined for the devices/speakers (execpt <b>autoAddDLNAServers</b> is for the "main" BOSEST) :<br><br>
- <ul><u>General commands</u>
- <li><code><b>on</b></code> - power on the device</li>
- <li><code><b>off</b></code> - turn the device off</li>
- <li><code><b>power</b></code> - toggle on/off</li>
- <li><code><b>volume</b> [0...100] [+x|-x]</code> - set the volume level in percentage or change volume by Âąx from current level</li>
- <li><code><b>channel</b> 0...20</code> - select present to play</li>
- <li><code><b>saveChannel</b> 07...20</code> - save current channel to channel 07 to 20</li>
- <li><code><b>play</b></code> - start/resume to play </li>
- <li><code><b>pause</b></code> - pause the playback</li>
- <li><code><b>stop</b></code> - stop playback</li>
- <li><code><b>nextTrack</b></code> - play next track</li>
- <li><code><b>prevTrack</b></code> - play previous track</li>
- <li><code><b>mute</b> on|off|toggle</code> - control volume mute</li>
- <li><code><b>shuffle</b> on|off</code> - control shuffle mode</li>
- <li><code><b>repeat</b> all|one|off</code> - control repeat mode</li>
- <li><code><b>bass</b> 0...10</code> - set the bass level</li>
- <li><code><b>recent</b> 0...15</code> - set number of names in the recent list in readings</li>
- <li><code><b>source</b> bluetooth,bt-discover,aux mode, airplay</code> - select a local source</li><br>
- <li><code><b>addDLNAServer</b> Name1 [Name2] [Namex]</code> - add DLNA servers Name1 (and Name2 to Namex) to the BOSE library</li>
- <li><code><b>removeDLNAServer</b> Name1 [Name2] [Namex]</code> - remove DLNA servers Name1 (and Name2 to Namex) to the BOSE library</li>
- </ul><br>Example: <code>set BOSE_1234567890AB volume 25</code> Set volume on device with the name BOSE_1234567890AB <br><br><br>
-
- <ul><u>Timer commands:</u>
- <li><code><b>on-for-timer</b> 1...x</code> - power on the device for x seconds</li>
- <li><code><b>off-for-timer</b> 1...x</code> - turn the device off and power on again after x seconds</li>
- <li><code><b>on-till</b> hh:mm:ss</code> - power on the device until defined time</li>
- <li><code><b>off-till</b> hh:mm:ss</code> - turn the device off and power on again at defined time</li>
- <li><code><b>on-till-overneight</b> hh:mm:ss</code> - power on the device until defined time on the next day</li>
- <li><code><b>off-till-overneight</b> hh:mm:ss</code> - turn the device off at defined time on the next day</li>
- </ul><br>Example: <code>set BOSE_1234567890AB on-till 23:00:00</code> Switches device with the name BOSE_1234567890AB now on and at 23:00:00 off<br><br><br>
-
- <ul><u>Multiroom commands:</u>
- <li><code><b>createZone</b> deviceID</code> - create multiroom zone (defines <code><name></code> as zoneMaster) </li>
- <li><code><b>addToZone</b> deviceID</code> - add device <code><name></code> to multiroom zone</li>
- <li><code><b>removeFromZone</b> deviceID</code> - remove device <code><name></code> from multiroom zone</li>
- <li><code><b>playEverywhere</b></code> - play sound of device <code><name></code> on all others devices</li>
- <li><code><b>stopPlayEverywhere</b></code> - stop playing sound on all devices</li>
- </ul><br>Example: <code>set BOSE_1234567890AB playEverywhere</code> Starts Multiroom with device with the name BOSE_1234567890AB as master <br><br><br>
-
- <ul><u>TextToSpeach commands (needs Google Translate):</u>
- <li><code><b>speak</b> "message" [0...100] [+x|-x] [en|de|xx]</code> - Text to speak, optional with volume adjustment and language to use. The message to speak may have up to 100 letters</li>
- <li><code><b>speakOff</b> "message" [0...100] [+x|-x] [en|de|xx]</code> - 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>
- <li><code><b>ttsVolume</b> [0...100] [+x|-x]</code> - set the TTS volume level in percentage or change volume by Âąx from current level</li>
- <li><code><b>ttsDirectory</b> "directory"</code> - set DLNA TTS directory. FHEM user needs permissions to write to that directory. </li>
- <li><code><b>ttsLanguage </b> en|de|xx</code> - set default TTS language (default: en)</li>
- <li><code><b>ttsSpeakOnError</b> 0|1</code> - 0=disable to speak "not available" text</li>
- <li><code><b>autoAddDLNAServers</b> 0|1</code> - 1=automatically add all DLNA servers to BOSE library. This command is only for "main" BOSEST, not for devices/speakers!</li> <br>
- </ul><br> Example: <code>set BOSE_1234567890AB speakOff "Music is going to switch off now. Good night." 30 en</code> Speaks message at volume 30 and then switches off device.<br><br> <br>
- </ul><br>
-
- <a name="BOSESTget" id="BOSESTget"></a>
- <b>Get</b>
- <ul>
- <code>n/a</code>
- </ul>
- <br>
- </ul>
- <p><a name="BRAVIA"></a>
- <h3>BRAVIA</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#BRAVIA'>DE</a>]</div>
- <ul>
- This module controls a Sony TV device over ethernet. Devices of series starting from 2011 are supported.
- <br><br>
- <b>Define</b>
- <ul>
- <code>define <name> BRAVIA <ip-or-hostname> [<poll-interval>]</code>
- <br><br>
- With definition of a BRAVIA device an internal task will be scheduled.
- This task pulls frequently the status and other information from the TV.<br>
- The intervall can be defined in seconds by an optional parameter <poll-intervall>.
- The default value is 45 seconds.
- <br><br>
- After definition of a device using this module it has to be registered as a remote control
- (<a href=#BRAVIAregister><code>set register</code></a>).
- <br><br>
- As long as readings are not among the usual AV readings they are clustered:
- <table>
- <tr><td>s_*</td><td>: status</td></tr>
- <tr><td>ci_*</td><td>: content information</td></tr>
- </table>
- <br><br>
- The module contains predefined layouts for <a href=#remotecontrol>remotecontrol</a> using PNG and SVG.
- <br><br>
- </ul>
- <a name="BRAVIAset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <option> <value></code>
- <br><br>
- Options:
- <ul>
- <li><i>application</i><br>
- List of applications.
- Applications are available with modells from 2013 and newer.</li>
- <li><i>channel</i><br>
- List of all known channels. The module collects all visited channels.
- Channels can be loaded automtically with modells from 2013 and newer.
- (number of channels, see <a href=#BRAVIAchannelsMax>channelsMax</a>).</li>
- <li><i>channelDown</i><br>
- Switches a channel back.</li>
- <li><i>channelUp</i><br>
- Switches a channel forward.</li>
- <li><i>input</i><br>
- List of input channels.
- Imputs are available with modells from 2013 and newer.</li>
- <li><i>mute</i><br>
- Set mute if <a href=#BRAVIAupnp>Upnp</a> is activated.</li>
- <li><i>off</i><br>
- 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>
- <li><a name="BRAVIAon"></a><i>on</i><br>
- 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>
- <li><i>pause</i><br>
- Pauses a playing of a recording, of an internal App, etc.</li>
- <li><i>play</i><br>
- Starts playing of a recording, of an internal App, etc.</li>
- <li><i>record</i><br>
- Starts recording of current content.</li>
- <li><a name="BRAVIAregister"></a><i>register</i><br>
- One-time registration of Fhem as remote control in the TV.<br>
- With <a href=#BRAVIArequestFormat>requestFormat</a> = "xml" registration works without parameter.<br>
- With <a href=#BRAVIArequestFormat>requestFormat</a> = "json" registration has to be executed twice.<br>
- The register option offers an additional input field:
- <ol>
- <li>Call with empty input. A PIN for registration has to be shown on the TV.</li>
- <li>Insert PIN into input field and register again.</li></ol></li>
- <li><a name="BRAVIArequestFormat"></a><i>requestFormat</i><br>
- "xml" for xml based communication (modells from 2011 and 2012)<br>
- "json" for communication with modells from 2013 and newer</li>
- <li><i>remoteControl</i><br>
- Sends command directly to TV.</li>
- <li><i>statusRequest</i><br>
- Retrieves current status information from TV.</li>
- <li><i>stop</i><br>
- Stops recording, playing of an internal App, etc.</li>
- <li><i>text</i><br>
- Includes the given text into an input field on display.</li>
- <li><i>toggle</i><br>
- Toggles power status of TV.</li>
- <li><i>tvpause</i><br>
- Activates Timeshift mode.</li>
- <li><a name="BRAVIAupnp"></a><i>upnp</i><br>
- Activates Upnp service used to control volume.</li>
- <li><i>volume</i><br>
- Straight setting of volume. <a href=#BRAVIAupnp>Upnp</a> service has to be activated.</li>
- <li><i>volumeDown</i><br>
- Decreases volume.</li>
- <li><i>volumeUp</i><br>
- Increases volume.</li>
- </ul>
- </ul>
- <br>
-
- <a name="BRAVIAattr"></a>
- <b>Attributes</b>
- <ul>
- <code>attr <name> <attribute> <value></code>
- <br><br>
- Attributes:
- <ul>
- <li><a name="BRAVIAchannelsMax"></a><i>channelsMax</i><br>
- Maximum amount of channels to be displayed, default is 50.</li>
- <li><a name="BRAVIAmacaddr"></a><i>macaddr</i><br>
- Enables power on of TV using WOL.</li>
- </ul>
- </ul>
- </ul>
- <p><a name="BS"></a>
- <h3>BS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#BS'>DE</a>]</div>
- <ul>
- The module BS allows to collect data from a brightness sensor through a
- <a href="#FHZ">FHZ</a> device. For details on the brightness sensor see
- <a href="http://www.busware.de/tiki-index.php?page=CPM-BS">busware wiki</a>.
- You can have at most nine different brightness sensors in range of your
- FHZ.<br>
- <br>
- The state contains the brightness in % (reading <code>brightness</code>) and
- the brightness in lux (reading <code>lux</code>). The <code>flags</code>
- reading is always zero. The meaning of these readings is explained in more
- detail on the above mentioned wiki page.<br>
- <br>
- <a name="BSDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> BS <sensor#> [<RExt>]</code>
- <br><br>
- <code><sensor#></code> is the number of sensor in the brightness
- sensor address system that runs from 1 to 9.<br>
- <br>
- <code><RExt></code> is the value of the resistor on your brightness
- sensor in Ω (Ohm). The brightness reading in % is proportional to the resistance, the
- lux reading is proportional to the resistance squared. The value is
- optional. The default resistance is RExt= 50.000Ω.<br>
- <br>
- Example:<br>
- <ul>
- <code>define bs1 BS 1 40000</code><br>
- </ul>
- </ul>
- <br>
- <a name="BSset"></a>
- <b>Set </b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="BSget"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="BSattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#model">model</a> (bs)</li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p> <a name="Babble"></a>
- <h3>Babble</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Babble'>DE</a>]</div>
- <ul>
- <p> FHEM module for speech control of FHEM devices</p>
- <a name="babbleusage"></a>
- <h4>Usage</h4>
- See <a href="http://www.fhemwiki.de/wiki/Modul_babble">German Wiki page</a>
- <a name="babbledefine"></a>
- <br/>
- <h4>Define</h4>
- <p>
- <code>define <name> babble</code>
- <br />Defines the Babble device. </p>
- <a name="babbleset"></a>
- Notes: <ul>
- <li>This module uses the global attribute <code>language</code> to determine its output data<br/>
- (default: EN=english). For German output set <code>attr global language DE</code>.</li>
- <li>This module needs the JSON package.</li>
- <li>Only when the chatbot functionality of RiveScript is required, the RiveScript module must be installed as well, see https://github.com/aichaos/rivescript-perl</li>
- </ul>
- <h4>Usage</h4>
- To use this module, call the Perl function <code>Babble_DoIt("<name>","<sentence>"[,<parm0>,<parm1>,...])</code>.
- <name> is the name of the Babble device, <parm0> <parm1> are arbitrary parameters.
-
- The module will analyze the sentence passed an isolate a device to be addressed, a place identifier,
- a verb, a target and its value from the sentence passed.
-
- If a proper command has been stored with device, place, verb and target, it will be subject to substitutions and then will be executed.
- In these substitutions, a string $VALUE will be replaced by the value for the target reading, a string $DEV will be replaced by the device name identified by Babble,
- and strings $PARM[0|1|2...] will be replaced by the
- corresponding parameters passed to the function <code>Babble_DoIt</code>
- <ul>
- <li>If no stored command ist found, the sentence is passed to the local RiveScript interpreter if present</li>
- <li>To have a FHEM register itself as a Babble Device, it must get an attribute value <code>babbleDevice=<name></code>. The <i>name</i> parameter must either be
- unique to the Babble system, or it muts be of the form <code><name>_<digits></code></li>
- <li>Devices on remote FHEM installations are defined in the <code>babbleDevices</code> attribute, see below</li>
- </ul>
- <h4>Set</h4>
- <ul>
- <li><a name="babble_lock">
- <code>set <name> locked</code><br />
- <code>set <name> unlocked</code>
- </a>
- <br />sets the lockstate of the babble module to <i>locked</i> (i.e., babble setups
- may not be changed) resp. <i>unlocked</i> (i.e., babble setups may be changed>)</li>
- <li><a name="babble_save">
- <code>set <name> save|restore</code>
- </a>
- <br />Manually save/restore the babble to/from the external file babbleFILE (save done automatically at each state modification, restore at FHEM start)</li>
- <li><a name="babble_rivereload">
- <code>set <name> rivereload</code>
- </a>
- <br />Reload data for RiveScript Interpreter</li>
- <li><a name="babble_test">
- <code>set <name> test</code>
- </a>
- <br />Run a few test cases for normalization</li>
- </ul>
- </ul>
- <a name="babbleget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="babble_version"></a>
- <code>get <name> version</code>
- <br />Display the version of the module</li>
- <li><a name="babble_tokens"></a>
- <code>get <name> tokens</code>
- <br />Obtain fresh csrfToken from remote FHEM installations (needed after restart of remote FHEM)</li>
- </ul>
- <a name="babbleattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="babbleDevices"><code>attr <name> babbleDevices [<babble devname>:<FHEM devname>:1|2|3]* </code></a>
- <br />space separated list of <i>remote</i> FHEM devices, each as a group separated by ':' consisting of
- <ul><li>a Babble device name</li>
- <li>a FHEM Device name</li>
- <li>an integer 1..3, indication which of the <i>remoteFHEM</i> functions to be called</li>
- </ul>
- The Babble device name may contain a <b>*</b>-character. If this is the case, it will be considered a regular expression, with the star replaced by <b>(.*)</b>.
- When using Babble with a natural language sentence whose device part matches this regular expression, the character group addressed by the star sequence is placed in the variable
- <code>$STAR</code>, and used to replace this value in the command sequence.
- </li>
- <li><a name="helpFunc"><code>attr <name> helpFunc <function name&rt;</code></a>
- <br/>name of a help function which is used in case no command is found for a certain device. When this function is called, the strings $DEV, $HELP, $PARM[0|1|2...]
- will be replaced by the devicename identified by Babble, the help text for this device and parameters passed to the Babble_DoIt function</li>
- <li><a name="testParm"><code>attr <name> testParm(0|1|2|3) <string&rt;</code></a>
- <br/>if a command is not really excuted, but only tested, the values of these attributes will be used to substitute the strings $PARM[0|1|2...]
- in the tested command</li>
- <li><a name="dnuFile"><code>attr <name> dnuFile <filename&rt;</code></a>
- <br/>if this filename is given, every sentence that could not be analyzed is stored in this file</li>
- <li><a name="confirmFunc"><code>attr <name> confirmFunc <function name&rt;</code></a>
- <br/>name of a confirmation function which is used in case a command is exceuted. When this function is called, the strings $DEV, $HELP, $PARM[0|1|2...]
- will be replaced by the devicename identified by Babble, the help text for this device and parameters passed to the Babble_DoIt function</li>
- <li><a name="noChatBot"><code>attr <name> noChatBot 0|1</code></a>
- <br/>if this attribute is set to 1, a local RiveScript interpreter will be ignored even though it is present in the system</li>
- <li><a name="remoteFHEM"><code>attr <name> remoteFHEM(0|1|2|3) [<user>:<password>@]<IP address:port&rt;</code></a>
- <br/>IP address and port for a remote FHEM installation</li>
- <li><a name="remoteFunc"><code>attr <name> remoteFunc(0|1|2|3) <function name&rt;</code></a>
- <br/>name of a Perl function that is called for addressing a certain remote FHEM device</li>
- <li><a name="remoteToken"><code>attr <name> remoteToken(0|1|2|3) <csrfToken&rt;</code></a>
- <br/>csrfToken for addressing a certain remote FHEM device</li>
- <li><a name="babbleIds"><code>attr <name> babbleIds <id_1> <id_2> ...</code></a>
- <br />space separated list of identities by which babble may be addressed</li>
- <li><a name="babblePreSubs"><code>attr <name> babbleSubs <regexp1>:<replacement1>,<regexp2>:<replacement2>, ...</code></a>
- <br/>space separated list of regular expressions and their replacements - this will be used on the initial sentence submitted to Babble
- (Note: a space in the regexp must be replaced by \s). </li>
- <li><a name="babblePlaces"><code>attr <name> babblePlaces <place_1> <place_2> ...</code></a>
- <br />space separated list of special places to be identified in speech</li>
- <li><a name="babbleNotPlaces"><code>attr <name> babbleNoPlaces <place_1> <place_2> ...</code></a>
- <br />space separated list of rooms (in the local FHEM device) that should <i>not</i> appear in the list of place</li>
- <li><a name="babbleStatus"><code>attr <name> babbleStatus <status_1> <status_2> ...</code></a>
- <br />space separated list of status identifiers to be identified in speech. Example: <code>Status Value Weather Time</code></li>
- <li><a name="babblePrepos"><code>attr <name> babblePrepos <prepo_1> <prepo_2> ...</code></a>
- <br />space separated list of prepositions to be identified in speech. Example: <code>by in at on</code></li>
- <li><a name="babbleTimes"><code>attr <name> babbleTimes <time_1> <time_2> ...</code></a>
- <br />space separated list of temporal adverbs. Example: <code>today tomorrow</code></li>
- <li><a name="babbleQuests"><code>attr <name> babbleQuests <pron_1> <pron_2> ...</code></a>
- <br />space separated list of questioning adverbs. Example: <code>how when where</code></li>
- <li><a name="babbleArticles"><code>attr <name> babbleArticles <art_1> <art_2> ...</code></a>
- <br />space separated list of articles to be identified in speech. Example: <code>the</code></li>
- <li><a name="babbleVerbs"><code>attr <name> babbleVerbs <form1a>,<form1b>...:<infinitive1> <form2a>,<form2b>...:<infinitive2></code></a>
- <br />space separated list of verb groups to be identified in speech. Each group consists of comma separated verb forms (conjugations as well as variations),
- followed by a ':' and then the infinitive form of the verb. Example: <code>speak,speaks,say,says:speaking</code></li>
- <li><a name="babbleWrites"><code>attr <name> babbleWrites <write_1> <write_2> ...</code></a>
- <br />space separated list of write verbs to be identified in speech. Example: <code>send add remove</code></li>
- <li><a name="babbleVerbParts"><code>attr <name> babbleVerbParts <vp_1> <vp_2> ...</code></a>
- <br />space separated list of verb parts to be identified in speech. Example: <code>un re</code></li>
- <li><a name="babble_linkname"><code>attr <name> linkname
- <string></code></a>
- <br />Name for babble web link, default:
- babbles</li>
- <li><a name="babble_hiddenroom"><code>attr <name> hiddenroom
- <string></code></a>
- <br />Room name for hidden babble room (containing only the Babble device), default:
- babbleRoom</li>
- <li><a name="babble_publicroom"><code>attr <name> publicroom
- <string></code></a>
- <br />Room name for public babble room (containing sensor/actor devices), default:
- babble</li>
- <li><a name="babble_lockstate"><code>attr <name> lockstate
- locked|unlocked</code></a>
- <br /><i>locked</i> means that babble setups may not be changed, <i>unlocked</i>
- means that babble setups may be changed></li>
- </ul>
- </ul>
- <p><a name="Broadlink"></a>
- <h3>Broadlink</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Broadlink'>DE</a>]</div>
- <ul>
- <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.
- It can also control <i>rmmini</i> devices and sp3 or sp3s plugs.
- <br>
- It requires AES encryption please install on Windows:<br>
- <code>ppm install Crypt-CBC</code><br>
- <code>ppm install Crypt-OpenSSL-AES</code><br><br>
- or Linux/Raspberry:
- <code>sudo apt-get install libcrypt-cbc-perl</code><br>
- <code>sudo apt-get install libcrypt-rijndael-perl</code><br>
- <code>sudo cpan Crypt/OpenSSL/AES.pm</code><br>
- <br><br>
- <a name="Broadlinkdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Broadlink <ip/host> <mac> <type=rmpro or rmmini or sp3 or sp3s></code>
- <br><br>
- Example: <code>define broadlinkWZ Broadlink 10.23.11.85 34:EA:34:F4:77:7B rmpro</code>
- <br><br>
- The <i>mac</i> of the device have to be set in format: xx:xx:xx:xx:xx<br>
- The type is in current development state optional.
- </ul>
- <br>
-
- <a name="Broadlinkset"></a>
- <b>Set for rmpro</b><br>
- <ul>
- <li><code>set <name> <commandSend> <command name></code>
- <br><br>
- Send a previous recorded command.
- </li>
- <li><code>set <name> recordNewCommand <command name></code>
- <br><br>
- Records a new command. You have to specify a commandname
- </li>
- <li>
- <code>set <name> remove <command name></code>
- <br><br>
- Removes a recored command.
- </li>
- <li>
- <code>set <name> rename <old command name> <new command name></code>
- <br><br>
- Renames a recored command.
- </li>
- <li><code>set <name> getTemperature</code>
- <br><br>
- Get the device current enviroment Temperature
- </li>
- </ul>
- <b>Set for rmmini</b><br>
- <ul>
- <li><code>set <name> <commandSend> <command name></code>
- <br><br>
- Send a previous recorded command.
- </li>
- <li><code>set <name> recordNewCommand <command name></code>
- <br><br>
- Records a new command. You have to specify a commandname
- </li>
- <li>
- <code>set <name> remove <command name></code>
- <br><br>
- Removes a recored command.
- </li>
- <li>
- <code>set <name> rename <old command name> <new command name></code>
- <br><br>
- Renames a recored command.
- </li>
- </ul>
- <br>
- <b>Set for sp3</b><br>
- <ul>
- <li><code>set <name> on</code>
- <br><br>
- Set the device on
- </li>
- <li><code>set <name> off</code>
- <br><br>
- Set the device off
- </li>
- <li><code>set <name> toggle</code>
- <br><br>
- Toggle the device on and off
- </li>
- <li><code>set <name> getStatus</code>
- <br><br>
- Get the device on/off status
- </li>
- </ul>
- <b>Set for sp3s</b><br>
- <ul>
- <li><code>set <name> on</code>
- <br><br>
- Set the device on
- </li>
- <li><code>set <name> off</code>
- <br><br>
- Set the device off
- </li>
- <li><code>set <name> toggle</code>
- <br><br>
- Toggle the device on and off
- </li>
- <li><code>set <name> getStatus</code>
- <br><br>
- Get the device on/off status
- </li>
- <li><code>set <name> getEnergy</code>
- <br><br>
- Get the device current energy consumption
- </li>
- </ul>
- <br>
- <a name="Broadlinkattr"></a>
- <b>Attributes for all Broadlink Devices</b><br>
- <ul>
- <li><code>socket_timeout</code>
- <br><br>
- sets a timeout for the device communication
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="CALVIEW"></a>
- <h3>CALVIEW</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CALVIEW'>DE</a>]</div>
- <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>
- <ul>Actually the module supports only the "get <> next" function of the CALENDAR-Modul.</ul>
- <b>Define</b>
- <ul><code>define <Name> CALVIEW <calendarname(s) separate with ','> <next> <updateintervall in sec (default 43200)></code></ul>
- <ul><code>define myView CALVIEW Googlecalendar next</code></ul>
- <ul><code>define myView CALVIEW Googlecalendar,holiday next 900</code></ul>
- <ul>- setting the update interval is not needed normally because every calendar update triggers a caview update</ul>
- <a name="CALVIEW set"></a>
- <b>Set</b>
- <ul><code>set <Name> update</code></ul>
- <ul><code>set myView update</code></ul>
- <ul>this will manually update all readings from the given CALENDAR Devices</ul>
- <b>Attribute</b>
- <li>datestyle<br>
- not set - the default, disables displaying readings bdatetimeiso / edatetimeiso<br>
- ISO8601 - enables readings bdatetimeiso / edatetimeiso (start and end time of term ISO8601 formated like 2017-02-27T00:00:00)
- </li><br>
- <li>disable<br>
- 0 / not set - internal notify function enabled (default) <br>
- 1 - disable the internal notify-function of CALVIEW wich is triggered when one of the given CALENDAR devices has updated
- </li><br>filterSummary
- <li>filterSummary <filtersouce>:<filtersummary>[,<filtersouce>:<filtersummary>]<br>
- not set - displays all terms (default .*:.*) <br>
- <filtersouce>:<filtersummary>[,<filtersouce>:<filtersummary>] - CALVIEW will display term where summary matches the <filtersouce>:<filtersummary>, several filters must be separated by comma (,)
- e.g.: filterSummary Kalender_Abfall:Leichtverpackungen,Kalender_Abfall:Bioabfall
- filterSummary Kalender_Abfall:Leichtverpackungen,Kalender_Feiertage:.*,Kalender_Christian:.*,Kalender_Geburtstage:.*
- </li><br>
- <li>fulldaytext [text]<br>
- this text will be displayed in _timeshort reading for fullday terms (default ganztägig)
- </li><br>
- <li>isbirthday<br>
- 0 / not set - no age calculation (default) <br>
- 1 - age calculation active. The module calculates the age with year given in description or location (see att yobfield).
- </li><br>
- <li>maxreadings<br>
- defines the number of max term as readings
- </li><br>
- <li>modes<br>
- here the CALENDAR modes can be selected , to be displayed in the view
- </li><br>
- <li>oldStyledReadings<br>
- 0 the default style of readings <br>
- 1 readings look like "2015.06.21-00:00" with value "Start of Summer"
- </li><br>
- <li>sourcecolor <calendername>:<colorcode>[,<calendername>:<colorcode>]<br>
- 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
- </li><br>
- <li>timeshort<br>
- 0 time in _timeshort readings formated 00:00:00 <br>
- 1 time in _timeshort readings formated 00:00
- </li><br>
- <li>yobfield<br>
- _description - (default) year of birth will be read from term description <br>
- _location - year of birth will be read from term location <br>
- _summary - year of birth will be read from summary (uses the first sequence of 4 digits in the string)
- </li><br>
- <li>weekdayformat<br>
- formats the name of the reading weekdayname <br>
- - de-long - (default) german, long name like Dienstag <br>
- - de-short - german, short name like Di <br>
- - en-long - english, long name like Tuesday <br>
- - en-short - english, short name like Tue <br>
- </li><br>
- <p><a name="CM11"></a>
- <h3>CM11</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CM11'>DE</a>]</div>
- <ul>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module.
- <br><br>
- <a name="CM11define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CM11 <serial-device></code>
- <br><br>
- CM11 is the X10 module to interface X10 devices with the PC.<br><br>
- The current implementation can evaluate incoming data on the powerline of
- any kind. It can send on, off, dimdown and dimup commands.
- <br><br>
- The name of the serial-device depends on your distribution. If
- serial-device is none, then no device will be opened, so you can experiment
- without hardware attached.<br>
- If you experience problems (for verbose 4 you get a lot of "Bad CRC message"
- in the log), then try to define your device as <br>
- <code>define <name> FHZ <serial-device> strangetty</code><br>
- <br>
- Example:
- <ul>
- <code>define x10if CM11 /dev/ttyUSB3</code><br>
- </ul>
- <br>
- </ul>
- <a name="CM11set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> reopen</code>
- <br><br>
- Reopens the serial port.
- </ul>
- <br>
- <a name="CM11get"></a>
- <b>Get</b>
- <ul>
- <code>get <name> fwrev</code>
- <br><br>
- Reads the firmware revision of the CM11 device. Returns <code>error</code>
- if the serial connection to the device times out. Can be used for error
- detection.
- <br><br>
- <code>get <name> time</code>
- <br><br>
- Reads the internal time of the device which is the total uptime (modulo one
- year), since fhem sets the time to 0.00:00:00 if the device requests the time
- to be set after being powered on. Returns <code>error</code>
- if the serial connection to the device times out. Can be used for error
- detection.
- </ul>
- <br>
- <a name="CM11attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#model">model</a> (CM11)</li>
- </ul>
- <br>
- </ul>
- <p><a name="CO20"></a>
- <h3>CO20</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CO20'>DE</a>]</div>
- <ul>
- Module for measuring air quality with usb sticks based on the AppliedSensor iAQ-Engine sensor.
- Products currently know to work are the VOLTCRAFT CO-20, the Sentinel Haus Institut RaumluftWächter
- and the VELUX Raumluftfühler.<br>
- Probably works with all devices recognized as iAQ Stick (0x03eb:0x2013).<br><br>
- Notes:
- <ul>
- <li>Device::USB hast to be installed on the FHEM host.<br>
- It can be installed with '<code>cpan install Device::USB</code>'<br>
- or on debian with '<code>sudo apt-get install libdevice-usb-perl'</code>'</li>
- <li>FHEM has to have permissions to open the device. To configure this with udev
- rules see here: <a href="https://code.google.com/p/usb-sensors-linux/wiki/Install_AirSensor_Linux">Install_AirSensor_Linux
- usb-sensors-linux</a></li>
- <li>Advanced features are only available after setting the attribute <i>advanced</i>.<br>
- Almost all the hidden settings from the Windows application are implemented in this mode.<br>
- Readout of values gathered in standalone mode is not possible yet.</li>
- </ul><br>
- <a name="CO20_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CO20 [bus:device]</code><br>
- <br>
- Defines a CO20 device. bus:device hast to be used if more than one sensor is connected to the same host.<br><br>
- Examples:
- <ul>
- <code>define CO20 CO20</code><br>
- </ul>
- </ul><br>
- <a name="CO20_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>voc<br>
- CO2 equivalents in ppm</li>
- <li>debug<br>
- debug value</li>
- <li>pwm<br>
- pwm value</li>
- <li>r_h<br>
- resistance of heating element in Ohm (?)</li>
- <li>r_s<br>
- resistance of sensor element in Ohm (?)</li>
- </ul><br>
- <a name="CO20_Get"></a>
- <b>Get</b>
- <ul>
- <li>update / air_data<br>
- trigger an update</li>
- <li>flag_data<br>
- get internal flag values</li>
- <li>knob_data<br>
- get internal knob values</li>
- <li>stick_data<br>
- get stick information</li>
- </ul><br>
- <a name="CO20_Set"></a>
- <b>Set</b>
- <ul>
- <li>KNOB_CO2_VOC_level_warn1<br>
- sets threshold for yellow led</li>
- <li>KNOB_CO2_VOC_level_warn2<br>
- sets threshold for red led</li>
- <li>KNOB_Reg_Set<br>
- internal value, affects voc reading</li>
- <li>KNOB_Reg_P<br>
- internal pid value</li>
- <li>KNOB_Reg_I<br>
- internal pid value</li>
- <li>KNOB_Reg_D<br>
- internal pid value</li>
- <li>KNOB_LogInterval<br>
- log interval for standalone mode</li>
- <li>KNOB_ui16StartupBits<br>
- set to 0 for no automatic calibration on startup</li>
- <li>FLAG_WARMUP<br>
- warmup time left in minutes</li>
- <li>FLAG_BURN_IN<br>
- burn in time left in minutes</li>
- <li>FLAG_RESET_BASELINE<br>
- reset voc baseline value</li>
- <li>FLAG_CALIBRATE_HEATER<br>
- trigger calibration / burn in</li>
- <li>FLAG_LOGGING<br>
- value count from external logging</li>
- </ul><br>
- <a name="CO20_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval<br>
- the interval in seconds used to read updates [10..]. the default ist 300.</li>
- <li>retries<br>
- number of retries on USB read/write failures [0..20]. the default is 3.</li>
- <li>timeout<br>
- the USB connection timeout in milliseconds [250..10000]. the default is 1000.</li>
- <li>advanced<br>
- 1 -> enables most of the advanced settings and readings described here</li>
- <li>disable<br>
- 1 -> disconnect and stop polling</li>
- </ul>
- </ul>
- <p><a name="CUL"></a>
- <h3>CUL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL'>DE</a>]</div>
- <ul>
- <table>
- <tr><td>
- The CUL/CUN(O) is a family of RF devices sold by <a
- href="http://www.busware.de">busware.de</a>.
- With the opensource firmware
- <a href="http://culfw.de/culfw.html">culfw</a> they are capable
- to receive and send different 433/868 MHz protocols (FS20/FHT/S300/EM/HMS/MAX!).
- It is even possible to use these devices as range extenders/routers, see the
- <a href="#CUL_RFR">CUL_RFR</a> module for details.
- <br> <br>
- Some protocols (FS20, FHT and KS300) are converted by this module so that
- the same logical device can be used, irrespective if the radio telegram is
- received by a CUL or an FHZ device.<br>
- Other protocols (S300/EM) need their
- own modules. E.g. S300 devices are processed by the CUL_WS module if the
- signals are received by the CUL, similarly EMWZ/EMGZ/EMEM is handled by the
- CUL_EM module.<br><br>
- It is possible to attach more than one device in order to get better
- reception, FHEM will filter out duplicate messages.<br><br>
- Note: This module may require the <code>Device::SerialPort</code> or
- <code>Win32::SerialPort</code> module if you attach the device via USB
- and the OS sets strange default parameters for serial devices.<br><br>
- </td><td>
- <img src="ccc.jpg"/>
- </td></tr>
- </table>
- <a name="CULdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL <device> <FHTID></code> <br>
- <br>
- USB-connected devices (CUL/CUN):<br><ul>
- <device> specifies the serial port to communicate with the CUL.
- The name of the serial-device depends on your distribution, under
- linux the cdc_acm kernel module is responsible, and usually a
- /dev/ttyACM0 device will be created. If your distribution does not have a
- cdc_acm module, you can force usbserial to handle the CUL by the
- following command:
- <ul><code>
- modprobe usbserial vendor=0x03eb product=0x204b
- </code></ul>
- In this case the device is most probably /dev/ttyUSB0.<br><br>
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyACM0@38400<br><br>
- If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
- perl module <code>Device::SerialPort</code> is not needed, and FHEM
- opens the device with simple file io. This might work if the operating
- system uses sane defaults for the serial parameters, e.g. some Linux
- distributions and OSX.<br><br>
- </ul>
- Network-connected devices (CUN(O)):<br><ul>
- <device> specifies the host:port of the device, e.g.
- 192.168.0.244:2323
- </ul>
- <br>
- If the device is called none, then no device will be opened, so you
- can experiment without hardware attached.<br>
- The FHTID is a 4 digit hex number, and it is used when the CUL talks to
- FHT devices or when CUL requests data. Set it to 0000 to avoid answering
- any FHT80b request by the CUL.
- </ul>
- <br>
- <a name="CULset"></a>
- <b>Set </b>
- <ul>
- <li>reopen<br>
- Reopens the connection to the device and reinitializes it.
- </li><br>
- <li>raw<br>
- Issue a CUL firmware command. See the <a
- href="http://culfw.de/commandref.html">this</a> document
- for details on CUL commands.
- </li><br>
- <li>freq / bWidth / rAmpl / sens<br>
- <a href="#rfmode">SlowRF</a> mode only.<br>
- Set the CUL frequency / bandwidth / receiver-amplitude / sensitivity<br>
- Use it with care, it may destroy your hardware and it even may be
- illegal to do so. Note: The parameters used for RFR transmission are
- not affected.<br>
- <ul>
- <li>freq sets both the reception and transmission frequency. Note:
- Although the CC1101 can be set to frequencies between 315 and 915
- MHz, the antenna interface and the antenna of the CUL is tuned for
- exactly one frequency. Default is 868.3 MHz (or 433 MHz)</li>
- <li>bWidth can be set to values between 58 kHz and 812 kHz. Large values
- are susceptible to interference, but make possible to receive
- inaccurately calibrated transmitters. It affects tranmission too.
- Default is 325 kHz.</li>
- <li>rAmpl is receiver amplification, with values between 24 and 42 dB.
- Bigger values allow reception of weak signals. Default is 42.
- </li>
- <li>sens is the decision boundary between the on and off values, and it
- is 4, 8, 12 or 16 dB. Smaller values allow reception of less clear
- signals. Default is 4 dB.</li>
- </ul>
- </li><br>
- <a name="hmPairForSec"></a>
- <li>hmPairForSec<br>
- <a href="#rfmode">HomeMatic</a> mode only.<br>
- Set the CUL in Pairing-Mode for the given seconds. Any HM device set into
- pairing mode in this time will be paired with FHEM.
- </li><br>
- <a name="hmPairSerial"></a>
- <li>hmPairSerial<br>
- <a href="#rfmode">HomeMatic</a> mode only.<br>
- Try to pair with the given device. The argument is a 10 character
- string, usually starting with letters and ending with digits, printed on
- the backside of the device. It is not necessary to put the given device
- in learning mode if it is a receiver.
- </li><br>
- <a name="hmPairForSec"></a>
- <li>led<br>
- Set the CUL led off (00), on (01) or blinking (02).
- </li><br>
- <li>ITClock</br>
- Set the IT clock for Intertechno V1 protocol. Default 250.
- </li><br>
- </ul>
- <a name="CULget"></a>
- <b>Get</b>
- <ul>
- <li>version<br>
- returns the CUL firmware version
- </li><br>
- <li>uptime<br>
- returns the CUL uptime (time since CUL reset)
- </li><br>
- <li>raw<br>
- Issues a CUL firmware command, and waits for one line of data returned by
- the CUL. See the CUL firmware README document for details on CUL
- commands.
- </li><br>
- <li>fhtbuf<br>
- CUL has a message buffer for the FHT. If the buffer is full, then newly
- issued commands will be dropped, and an "EOB" message is issued to the
- FHEM log.
- <code>fhtbuf</code> returns the free memory in this buffer (in hex),
- an empty buffer in the CUL V2 is 74 bytes, in CUL V3/CUN(O) 200 Bytes.
- A message occupies 3 + 2x(number of FHT commands) bytes,
- this is the second reason why sending multiple FHT commands with one
- <a href="#set">set</a> is a good idea. The first reason is, that
- these FHT commands are sent at once to the FHT.
- </li> <br>
- <li>ccconf<br>
- Read some CUL radio-chip (cc1101) registers (frequency, bandwidth, etc.),
- and display them in human readable form.
- </li><br>
- <li>cmds<br>
- Depending on the firmware installed, CULs have a different set of
- possible commands. Please refer to the README of the firmware of your
- CUL to interpret the response of this command. See also the raw command.
- </li><br>
- <li>credit10ms<br>
- One may send for a duration of credit10ms*10 ms before the send limit
- is reached and a LOVF is generated.
- </li><br>
- </ul>
- <a name="CULattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="addvaltrigger">addvaltrigger</a><br>
- Create triggers for additional device values. Right now these are RSSI
- and RAWMSG for the CUL family and RAWMSG for the FHZ.
- </li><br>
- <li><a name="connectCommand">connectCommand</a><br>
- raw culfw command sent to the CUL after a (re-)connect of the USB device,
- and sending the usual initialization needed for the configured rfmode.
- </li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a name="hmId">hmId</a><br>
- Set the HomeMatic ID of this device. If this attribute is absent, the
- ID will be F1<FHTID>. Note 1: After setting or changing this
- attribute you have to relearn all your HomeMatic devices. Note 2: The
- value <b>must</b> be a 6 digit hex number, and 000000 is not valid. FHEM
- won't complain if it is not correct, but the communication won't work.
- </li><br>
- <li><a name="hmProtocolEvents">hmProtocolEvents</a><br>
- Generate events for HomeMatic protocol messages. These are normally
- used for debugging, by activating "inform timer" in a telnet session,
- or looking at the Event Monitor window in the FHEMWEB frontend.<br>
- Example:
- <ul>
- <code>
- 2012-05-17 09:44:22.515 CUL CULHM RCV L:0B N:81 CMD:A258 SRC:......
- DST:...... 0000 (TYPE=88,WAKEMEUP,BIDI,RPTEN)
- </code>
- </ul>
- </li><br>
-
- <li><a name="longids">longids</a><br>
- Comma separated list of device-types for CUL 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.
- Therefore a random generated id is added. If you choose to use longids,
- then you'll have to define a different device after battery change.
- Default is not to use long IDs.<br>
- Modules which are using this functionality are for e.g. :
- 14_Hideki, 41_OREGON, 14_CUL_TCM97001, 14_SD_WS07.<br>
- Examples:<br>
- <ul><code>
- # Do not use any long IDs for any devices (this is default):<br>
- attr cul longids 0<br>
- # Use long IDs for all devices:<br>
- attr cul longids 1<br>
- # Use longids for SD_WS07 devices.<br>
- # Will generate devices names like SD_WS07_TH_3 for channel 3.<br>
- attr cul longids SD_WS07
- </code></ul>
- </li><br>
- <li><a href="#model">model</a> (CUL,CUN,etc)</li>
- <li><a name="sendpool">sendpool</a><br>
- If using more than one CUL for covering a large area, sending
- different events by the different CUL's might disturb each other. This
- phenomenon is also known as the Palm-Beach-Resort effect.
- Putting them in a common sendpool will serialize sending the events.
- E.g. if you have three CUN's, you have to specify following
- attributes:<br>
- <code>attr CUN1 sendpool CUN1,CUN2,CUN3<br>
- attr CUN2 sendpool CUN1,CUN2,CUN3<br>
- attr CUN3 sendpool CUN1,CUN2,CUN3</code><br>
- </li><br>
- <li><a name="rfmode">rfmode</a><br>
- Configure the RF Transceiver of the CUL (the CC1101). Available
- arguments are:
- <ul>
- <li>SlowRF<br>
- To communicate with FS20/FHT/HMS/EM1010/S300/Hoermann devices @1 kHz
- datarate. This is the default.</li>
- <li>HomeMatic<br>
- To communicate with HomeMatic type of devices @10 kHz datarate.</li>
- <li>MAX<br>
- To communicate with MAX! type of devices @10 kHz datarate.</li>
- <li>WMBus_S</li>
- <li>WMBus_T<br>
- To communicate with Wireless M-Bus devices like water, gas or
- electrical meters. Wireless M-Bus uses two different communication
- modes, S-Mode and T-Mode. While in this mode, no reception of other
- protocols like SlowRF or HomeMatic is possible. See also the WMBUS
- FHEM Module.
- </li>
- </ul>
- </li><br>
- <li><a href="#showtime">showtime</a></li>
-
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="CUL_EM"></a>
- <h3>CUL_EM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_EM'>DE</a>]</div>
- <ul>
- The CUL_EM module interprets EM type of messages received by the CUL, notably
- from EMEM, EMWZ or EMGZ devices.
- <br><br>
- <a name="CUL_EMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_EM <code> [corr1 corr2
- CostPerUnit BasicFeePerMonth]</code> <br>
- <br>
- <code> is the code which must be set on the EM device. Valid values
- are 1 through 12. 1-4 denotes EMWZ, 5-8 EMEM and 9-12 EMGZ devices.<br><br>
- <b>corr1</b> is used to correct the current number, <b>corr2</b>
- for the total number.
- <ul>
- <li>for EMWZ devices you should specify the rotation speed (R/kW)
- of your watt-meter (e.g. 150) for corr1 and 12 times this value for
- corr2</li>
- <li>for EMEM devices the corr1 value is 0.01, and the corr2 value is
- 0.001 </li>
- </ul>
- <br>
- <b>CostPerUnit</b> and <b>BasicFeePerMonth</b> are used to compute your
- daily and monthly fees. Your COST will appear in the log, generated once
- daily (without the basic fee) or month (with the bassic fee included). Your
- definition should look like e.g.:
- <ul><code>
- define emwz 1 75 900 0.15 12.50<br>
- </code></ul>
- and the Log looks like:
- <ul><code>
- CUM_DAY: 6.849 CUM: 60123.4 COST: 1.02<br>
- CUM_MONTH: 212.319 CUM: 60123.4 COST: 44.34<br>
- </code></ul>
- Tip: You can configure your EMWZ device to show in the CUM column of the
- STATE reading the current reading of your meter. For this purpose: multiply
- the current reading (from the real device) with the corr1 value (RperKW),
- and subtract the RAW CUM value from it. Now set the basis reading of your
- EMWZ device (named emwz) to this value.<br>
- </ul>
- <br>
- <a name="CUL_EMset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="CUL_EMget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="CUL_EMattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#model">model</a> (EMEM,EMWZ,EMGZ)</li><br>
- <li><a href="#IODev">IODev</a></li><br>
- <li><a href="#eventMap">eventMap</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a name="maxPeak">maxPeak</a> <number><br>
- Specifies the maximum possible peak value for the EM meter
- ("TOP:" value in logfile). Peak values greater than this value
- are considered as EM read errors and are ignored.
- For example if it's not possible to consume more than 40kW of
- power set maxPeak to 40 to make the readings of the power meter
- more robust.
- </li><br>
- <li><a name="CounterOffset">CounterOffset</a><br>
- Specifies the difference between true (gas) meter value and
- value reported by the EMGZ.<br>
- CounterOffset = true Value - Reading "total"<br>
- Example:
- <ul>
- <code>attr Gaszaehler CounterOffset 15427.434</code><br>
- </ul>
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="CUL_FHTTK"></a>
- <h3>CUL_FHTTK</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_FHTTK'>DE</a>]</div>
- <ul>
- This module handles messages from the FHT80 TF "Fenster-Tür-Kontakt" (Window-Door-Contact)
- which are normally only acted upon by the <a href="#FHT">FHT80B</a>. With this module,
- FHT80 TFs are in a limited way (see <a href="http://fhz4linux.info/tiki-index.php?page=FHT+protocol">Wiki</a>
- for detailed explanation of TF's mode of operation) usable similar to HMS100 TFK. The name
- of the module was chosen as a) only CUL will spill out the datagrams and b) "TF" designates
- usually temperature+humidity sensors (no clue, why ELV didn't label this one "TFK" like with
- FS20 and HMS).<br><br>
- As said before, FHEM can receive FHT80 TF radio (868.35 MHz) messages only through an
- <a href="#CUL">CUL</a> device, so this must be defined first.
- <br><br>
- With the latest build on <a href="http://sourceforge.net/p/culfw/code/HEAD/tree/trunk/culfw/Devices/">SVN</a>
- or next official version 1.62 or higher, it is possible to send out FHT80 TF data with a CUL or simular
- devices. So it can be simulate up to four window sensor with one device
- (see <a href="http://www.fhemwiki.de/wiki/CUL_FHTTK">FHEM Wiki</a>). To setup a window sensor, you have to
- add and/or change the attribute "model" to dummy. The 6 digit hex number must not equal to FHTID.<br><br>
- <a name="CUL_FHTTKdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_FHTTK <devicecode></code>
- <br><br>
- <code><devicecode></code> is a six digit hex number, given to the FHT80 TF during
- production, i. e. it is not changeable. (Yes, it keeps this code after changing batteries
- as well.)<br>
- Examples:
- <ul>
- <code>define TK_TEST CUL_FHTTK 965AB0</code>
- </ul>
- </ul>
- <br>
- <a name="CUL_FHTTKset"></a>
- <b>Set</b>
- <ul> Only available, if model is set to dummy.<br><br>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul><code>
- Pair # start pairing with FHT80B (activate FHT80B sync mode before) - state after pairing is Closed<br>
- Closed # set window state to Closed<br>
- Open # set window state to Open<br>
- ReSync # resync virtual sensor with FHT80b after a reset of CUL device. In other words, perform a virtual
- battery exchange to synchronize the sensor with FHT80b device again. (at the moment, only
- available with prototype cul_fw - see forum 55774)<br>
- </code></ul>
- </ul>
- <br>
- <b>Get</b>
- <ul> No get implemented yet ...
- </ul><br>
- <a name="CUL_FHTTKattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#verbose">verbose</a></li><br>
- <li><a href="#model">model</a><br>Possible values are: FHT80TF, FHT80TF-2, dummy (value, which allow to simulate a window sensor)</li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#IODev">IODev</a></li><br>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#eventMap">eventMap</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p> <a name="CUL_HM"></a><h3>CUL_HM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_HM'>DE</a>]</div>
- <ul>
- Support for eQ-3 HomeMatic devices via the <a href="#CUL">CUL</a> or the <a href="#HMLAN">HMLAN</a>.<br>
- <br>
- <a name="CUL_HMdefine"></a><b>Define</b>
- <ul>
- <code><B>define <name> CUL_HM <6-digit-hex-code|8-digit-hex-code></B></code>
-
- <br><br>
- Correct device definition is the key for HM environment simple maintenance.
- <br>
-
- Background to define entities:<br>
- HM devices has a 3 byte (6 digit hex value) HMid - which is key for
- addressing. Each device hosts one or more channels. HMid for a channel is
- the device's HMid plus the channel number (1 byte, 2 digit) in hex.
- Channels should be defined for all multi-channel devices. Channel entities
- cannot be defined if the hosting device does not exist<br> Note: FHEM
- mappes channel 1 to the device if it is not defined explicitely. Therefore
- it does not need to be defined for single channel devices.<br>
-
- Note: if a device is deleted all assotiated channels will be removed as
- well. <br> An example for a full definition of a 2 channel switch is given
- below:<br>
-
- <ul><code>
- define livingRoomSwitch CUL_HM 123456<br>
- define LivingroomMainLight CUL_HM 12345601<br>
- define LivingroomBackLight CUL_HM 12345602<br><br></code>
- </ul>
-
- livingRoomSwitch is the device managing communication. This device is
- defined prior to channels to be able to setup references. <br>
- LivingroomMainLight is channel 01 dealing with status of light, channel
- peers and channel assotiated register. If not defined channel 01 is covered
- by the device entity.<br> LivingRoomBackLight is the second 'channel',
- channel 02. Its definition is mandatory to operate this function.<br><br>
-
- Sender specials: HM threats each button of remotes, push buttons and
- similar as channels. It is possible (not necessary) to define a channel per
- button. If all channels are defined access to pairing informatin is
- possible as well as access to channel related register. Furthermore names
- make the traces better readable.<br><br>
-
- define may also be invoked by the <a href="#autocreate">autocreate</a>
- module, together with the necessary subType attribute.
- Usually you issue a <a href="#CULset">hmPairForSec</a> and press the
- corresponding button on the device to be paired, or issue a <a
- href="#CULset">hmPairSerial</a> set command if the device is a receiver
- and you know its serial number. Autocreate will then create a fhem
- device and set all necessary attributes. Without pairing the device
- will not accept messages from fhem. fhem may create the device even if
- the pairing is not successful. Upon a successful pairing you'll see a
- CommandAccepted entry in the details section of the CUL_HM device.<br><br>
-
- If you cannot use autocreate, then you have to specify:<br>
- <ul>
- <li>the <6-digit-hex-code>or HMid+ch <8-digit-hex-code><br>
- It is the unique, hardcoded device-address and cannot be changed (no,
- you cannot choose it arbitrarily like for FS20 devices). You may
- detect it by inspecting the fhem log.</li>
- <li>the subType attribute<br>
- which is one of switch dimmer blindActuator remote sensor swi
- pushButton threeStateSensor motionDetector keyMatic winMatic
- smokeDetector</li>
- </ul>
- Without these attributes fhem won't be able to decode device messages
- appropriately. <br><br>
-
- <b>Notes</b>
- <ul>
- <li>If the interface is a CUL device, the <a href="#rfmode">rfmode </a>
- attribute of the corresponding CUL/CUN device must be set to HomeMatic.
- Note: this mode is BidCos/Homematic only, you will <b>not</b> receive
- FS20/HMS/EM/S300 messages via this device. Previously defined FS20/HMS
- etc devices must be assigned to a different input device (CUL/FHZ/etc).
- </li>
- <li>Currently supported device families: remote, switch, dimmer,
- blindActuator, motionDetector, smokeDetector, threeStateSensor,
- THSensor, winmatic. Special devices: KS550, HM-CC-TC and the KFM100.
- </li>
- <li>Device messages can only be interpreted correctly if the device type is
- known. fhem will extract the device type from a "pairing request"
- message, even if it won't respond to it (see <a
- href="#hmPairSerial">hmPairSerial</a> and <a
- href="#hmPairForSec">hmPairForSec</a> to enable pairing).
- As an alternative, set the correct subType and model attributes, for a
- list of possible subType values see "attr hmdevice ?".</li>
- <a name="HMAES"></a>
- <li>The so called "AES-Encryption" is in reality a signing request: if it is
- enabled, an actor device will only execute a received command, if a
- correct answer to a request generated by the actor is received. This
- means:
- <ul>
- <li>Reaction to commands is noticably slower, as 3 messages are sent
- instead of one before the action is processed by the actor.</li>
- <li>Every command and its final ack from the device is sent in clear,
- so an outside observer will know the status of each device.</li>
- <li>The firmware implementation is buggy: the "toggle" event is executed
- <b>before</b> the answer for the signing request is received, at
- least by some switches (HM-LC-Sw1-Pl and HM-LC-SW2-PB-FM).</li>
- <li>The <a href="#HMLAN">HMLAN</a> configurator will answer signing
- requests by itself, and if it is configured with the 3-byte address
- of a foreign CCU which is still configurerd with the default
- password, it is able to answer signing requests correctly.</li>
- <li>AES-Encryption is useable with a HMLAN or a CUL. When using
- a CUL, the perl-module Crypt::Rijndael needs to be installed.
- Due to the issues above I do not recommend using Homematic
- encryption at all.</li>
- </ul>
- </li>
- </ul>
- </ul><br>
- <a name="CUL_HMset"></a><b>Set</b>
- <ul>
- Note: devices which are normally send-only (remote/sensor/etc) must be set
- into pairing/learning mode in order to receive the following commands.
- <br><br>
-
- Universal commands (available to most hm devices):
- <ul>
- <li><B>assignHmKey</B><a name="CUL_HMassignHmKey"></a><br>
- Initiates a key-exchange with the device, exchanging the old AES-key of the device with the key with the highest
- index defined by the attribute hmKey* in the HMLAN or VCCU. The old key is determined by the reading aesKeyNbr,
- which specifies the index of the old key when the reading is divided by 2.
- </li>
- <li><B>clear <[rssi|readings|register|msgEvents|attack|all]></B><a name="CUL_HMclear"></a><br>
- A set of variables can be removed.<br>
- <ul>
- readings: all readings will be deleted. Any new reading will be added usual. May be used to eliminate old data<br>
- register: all captured register-readings in FHEM will be removed. This has NO impact to the values in the device.<br>
- msgEvents: all message event counter will be removed. Also commandstack will be cleared. <br>
- rssi: collected rssi values will be cleared. <br>
- attack: information regarding an attack will be removed. <br>
- all: all of the above. <br>
- </ul>
- </li>
- <li><B>getConfig</B><a name="CUL_HMgetConfig"></a><br>
- Will read major configuration items stored in the HM device. Executed
- on a channel it will read pair Inforamtion, List0, List1 and List3 of
- the 1st internal peer. Furthermore the peerlist will be retrieved for
- teh given channel. If executed on a device the command will get the
- above info or all assotated channels. Not included will be the
- configuration for additional peers. <br> The command is a shortcut
- for a selection of other commands.
- </li>
- <li><B>getRegRaw [List0|List1|List2|List3|List4|List5|List6]<peerChannel> </B><a name="CUL_HMgetRegRaw"></a><br>
-
- Read registerset in raw format. Description of the registers is beyond
- the scope of this documentation.<br>
-
- Registers are structured in so called lists each containing a set of
- registers.<br>
-
- List0: device-level settings e.g. CUL-pairing or dimmer thermal limit
- settings.<br>
-
- List1: per channel settings e.g. time to drive the blind up and
- down.<br>
-
- List3: per 'link' settings - means per peer-channel. This is a lot of
- data!. It controlls actions taken upon receive of a trigger from the
- peer.<br>
-
- List4: settings for channel (button) of a remote<br><br>
-
- <PeerChannel> paired HMid+ch, i.e. 4 byte (8 digit) value like
- '12345601'. It is mendatory for List 3 and 4 and can be left out for
- List 0 and 1. <br>
-
- 'all' can be used to get data of each paired link of the channel. <br>
-
- 'selfxx' can be used to address data for internal channels (associated
- with the build-in switches if any). xx is the number of the channel in
- decimal.<br>
-
- Note1: execution depends on the entity. If List1 is requested on a
- device rather then a channel the command will retrieve List1 for all
- channels assotiated. List3 with peerChannel = all will get all link
- for all channel if executed on a device.<br>
-
- Note2: for 'sender' see <a href="#CUL_HMremote">remote</a> <br>
-
- Note3: the information retrieval may take a while - especially for
- devices with a lot of channels and links. It may be necessary to
- refresh the web interface manually to view the results <br>
-
- Note4: the direct buttons on a HM device are hidden by default.
- Nevertheless those are implemented as links as well. To get access to
- the 'internal links' it is necessary to issue <br>
- 'set <name> <a href="#CUL_HMregSet">regSet</a> intKeyVisib visib'<br>
- or<br>
- 'set <name> <a href="#CUL_HMregBulk">regBulk</a> RegL_0. 2:81'<br>
-
- Reset it by replacing '81' with '01'<br> example:<br>
-
- <ul><code>
- set mydimmer getRegRaw List1<br>
- set mydimmer getRegRaw List3 all <br>
- </code></ul>
- </li>
- <li><B>getSerial</B><a name="CUL_HMgetSerial"></a><br>
- Read serial number from device and write it to attribute serialNr.
- </li>
- <li><B>inhibit [on|off]</B><br>
- Block / unblock all changes to the actor channel, i.e. actor state is frozen
- until inhibit is set off again. Inhibit can be executed on any actor channel
- but obviously not on sensors - would not make any sense.<br>
- Practically it can be used to suspend any notifies as well as peered channel action
- temporarily without the need to delete them. <br>
- Examples:
- <ul><code>
- # Block operation<br>
- set keymatic inhibit on <br><br>
- </ul></code>
- </li>
-
- <li><B>pair</B><a name="CUL_HMpair"></a><br>
- Pair the device with a known serialNumber (e.g. after a device reset)
- to FHEM Central unit. FHEM Central is usualy represented by CUL/CUNO,
- HMLAN,...
- If paired, devices will report status information to
- FHEM. If not paired, the device won't respond to some requests, and
- certain status information is also not reported. Paring is on device
- level. Channels cannot be paired to central separate from the device.
- See also <a href="#CUL_HMgetpair">getPair</a> and
- <a href="#CUL_HMunpair">unpair</a>.<br>
- Don't confuse pair (to a central) with peer (channel to channel) with
- <a href="#CUL_HMpeerChan">peerChan</a>.<br>
- </li>
- <li><B>peerBulk</B> <peerch1,peerch2,...> [set|unset]<a name="CUL_HMpeerBulk"></a><br>
- peerBulk will add peer channels to the channel. All peers in the list will be added. <br>
- with unset option the peers in the list will be subtracted from the device's peerList.<br>
- peering sets the configuration of this link to its defaults. As peers are not
- added in pairs default will be as defined for 'single' by HM for this device. <br>
- More suffisticated funktionality is provided by
- <a href="#CUL_HMpeerChan">peerChan</a>.<br>
- peerBulk will not delete existing peers, just handle the given peerlist.
- Other already installed peers will not be touched.<br>
- peerBulk may be used to remove peers using <B>unset</B> option while default ist set.<br>
-
- Main purpose of this command is to re-store data to a device.
- It is recommended to restore register configuration utilising
- <a href="#CUL_HMregBulk">regBulk</a> subsequent. <br>
- Example:<br>
- <ul><code>
- set myChannel peerBulk 12345601,<br>
- set myChannel peerBulk self01,self02,FB_Btn_04,FB_Btn_03,<br>
- set myChannel peerBulk 12345601 unset # remove peer 123456 channel 01<br>
- </code></ul>
- </li>
- <li><B>regBulk <reg List>:<peer> <addr1:data1> <addr2:data2>...</B><a name="CUL_HMregBulk"></a><br>
- This command will replace the former regRaw. It allows to set register
- in raw format. Its main purpose is to restore a complete register list
- to values secured before. <br>
- Values may be read by <a href="#CUL_HMgetConfig">getConfig</a>. The
- resulting readings can be used directly for this command.<br>
- <reg List> is the list data should be written to. Format could be
- '00', 'RegL_00', '01'...<br>
- <peer> is an optional adder in case the list requires a peer.
- The peer can be given as channel name or the 4 byte (8 chars) HM
- channel ID.<br>
- <addr1:data1> is the list of register to be written in hex
- format.<br>
- Example:<br>
- <ul><code>
- set myChannel regBulk RegL_00. 02:01 0A:17 0B:43 0C:BF 15:FF 00:00<br>
- RegL_03.FB_Btn_07
- 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>
- set myblind regBulk 01 0B:10<br>
- set myblind regBulk 01 0C:00<br>
- </code></ul>
- myblind will set the max drive time up for a blind actor to 25,6sec
- </li>
- <li><B>regSet [prep|exec] <regName> <value> <peerChannel></B><a name="CUL_HMregSet"></a><br>
- For some major register a readable version is implemented supporting
- register names <regName> and value conversionsing. Only a subset
- of register can be supproted.<br>
- Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
- improve data transmission.
- Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
- The last command must have the parameter "exec" in order to transmitt the information.<br>
-
- <value> is the data in human readable manner that will be written
- to the register.<br>
- <peerChannel> is required if this register is defined on a per
- 'peerChan' base. It can be set to '0' other wise.See <a
- href="#CUL_HMgetRegRaw">getRegRaw</a> for full description<br>
- Supported register for a device can be explored using<br>
- <ul><code>set regSet ? 0 0</code></ul>
- Condensed register description will be printed
- using<br>
- <ul><code>set regSet <regname> ? 0</code></ul>
- </li>
- <li><B>reset</B><a name="CUL_HMreset"></a><br>
- Factory reset the device. You need to pair it again to use it with
- fhem.
- </li>
- <li><B>sign [on|off]</B><a name="CUL_HMsign"></a><br>
- Activate or deactivate signing (also called AES encryption, see the <a
- href="#HMAES">note</a> above). Warning: if the device is attached via
- a CUL, you need to install the perl-module Crypt::Rijndael to be
- able to switch it (or deactivate signing) from fhem.
- </li>
- <li><B>statusRequest</B><a name="CUL_HMstatusRequest"></a><br>
- Update device status. For multichannel devices it should be issued on
- an per channel base
- </li>
- <li><B>unpair</B><a name="CUL_HMunpair"></a><br>
- "Unpair" the device, i.e. make it available to pair with other master
- devices. See <a href="#CUL_HMpair">pair</a> for description.</li>
- <li><B>virtual <number of buttons></B><a name="CUL_HMvirtual"></a><br>
- configures a defined curcuit as virtual remote controll. Then number
- of button being added is 1 to 255. If the command is issued a second
- time for the same entity additional buttons will be added. <br>
- Example for usage:
- <ul><code>
- define vRemote CUL_HM 100000 # the selected HMid must not be in use<br>
- set vRemote virtual 20 # define 20 button remote controll<br>
- set vRemote_Btn4 peerChan 0 <actorchannel> # peers Button 4 and 5 to the given channel<br>
- set vRemote_Btn4 press<br>
- set vRemote_Btn5 press long<br>
- </code></ul>
- see also <a href="#CUL_HMpress">press</a>
- </li>
- <li><B>deviceRename <newName></B><a name="CUL_HMdeviceRename"></a><br>
- rename the device and all its channels.
- </li>
- <li><B>fwUpdate [onlyEnterBootLoader] <filename> [<waitTime>]</B><br>
- update Fw of the device. User must provide the appropriate file.
- waitTime can be given optionally. In case the device needs to be set to
- FW update mode manually this is the time the system will wait.<br>
- "onlyEnterBootLoader" tells the device to enter the boot loader so it can be
- flashed using the eq3 firmware update tool. Mainly useful for flush-mounted devices
- in FHEM environments solely using HM-LAN adapters.
- </li>
- </ul>
-
- <br>
- <B>subType dependent commands:</B>
- <ul>
- <br>
- <li>switch
- <ul>
- <li><B>on</B> <a name="CUL_HMon"> </a> - set level to 100%</li>
- <li><B>off</B><a name="CUL_HMoff"></a> - set level to 0%</li>
- <li><B>on-for-timer <sec></B><a name="CUL_HMonForTimer"></a> -
- set the switch on for the given seconds [0-85825945].<br> Note:
- off-for-timer like FS20 is not supported. It may to be programmed
- thru channel register.</li>
- <li><B>on-till <time></B><a name="CUL_HMonTill"></a> - set the switch on for the given end time.<br>
- <ul><code>set <name> on-till 20:32:10<br></code></ul>
- Currently a max of 24h is supported with endtime.<br>
- </li>
- <li><B>pressL <peer> [<repCount>] [<repDelay>] </B><a name="CUL_HMpressL"></a><br>
- simulate a press of the local button or direct connected switch of the actor.<br>
- <B><peer></B> allows to stimulate button-press of any peer of the actor.
- i.e. if the actor is peered to any remote, virtual or io (HMLAN/CUL)
- press can trigger the action defined. <br>
- <B><repCount></B> number of automatic repetitions.<br>
- <B><repDelay></B> timer between automatic repetitions. <br>
- <B>Example:</B>
- <code>
- set actor pressL FB_Btn01 # trigger long peer FB button 01<br>
- set actor pressL FB_chn-8 # trigger long peer FB button 08<br>
- set actor pressL self01 # trigger short of internal peer 01<br>
- set actor pressL fhem02 # trigger short of FHEM channel 2<br>
- </code>
- </li>
- <li><B>pressS <peer></B><a name="CUL_HMpressS"></a><br>
- simulates a short press similar to long press
- </li>
- <li><B>eventL <peer> <condition> [<repCount>] [<repDelay>] </B><a name="CUL_HMeventL"></a><br>
- simulate an event of an peer and stimulates the actor.<br>
- <B><peer></B> allows to stimulate button-press of any peer of the actor.
- i.e. if the actor is peered to any remote, virtual or io (HMLAN/CUL)
- press can trigger the action defined. <br>
- <B><codition></B> the level of the condition <br>
- <B>Example:</B>
- <code>
- set actor eventL md 30 # trigger from motion detector with level 30<br>
- </code>
- </li>
- <li><B>eventS <peer> <condition> </B><a name="CUL_HMeventS"></a><br>
- simulates a short event from a peer of the actor. Typically sensor do not send long events.
- </li>
- <li><B>toggle</B><a name="CUL_HMtoggle"></a> - toggle the Actor. It will switch from any current
- level to off or from off to 100%</li>
- </ul>
- <br>
- </li>
- <li>dimmer, blindActuator<br>
- Dimmer may support virtual channels. Those are autocrated if applicable. Usually there are 2 virtual channels
- in addition to the primary channel. Virtual dimmer channels are inactive by default but can be used in
- in parallel to the primay channel to control light. <br>
- Virtual channels have default naming SW<channel>_V<no>. e.g. Dimmer_SW1_V1 and Dimmer_SW1_V2.<br>
- Dimmer virtual channels are completely different from FHEM virtual buttons and actors but
- are part of the HM device. Documentation and capabilities for virtual channels is out of scope.<br>
- <ul>
- <li><B>0 - 100 [on-time] [ramp-time]</B><br>
- set the actuator to the given value (in percent)
- with a resolution of 0.5.<br>
- Optional for dimmer on-time and ramp time can be choosen, both in seconds with 0.1s granularity.<br>
- On-time is analog "on-for-timer".<br>
- Ramp-time default is 2.5s, 0 means instantanous<br>
- </li>
- <li><B><a href="#CUL_HMon">on</a></B></li>
- <li><B><a href="#CUL_HMoff">off</a></B></li>
- <li><B><a href="#CUL_HMpress">press <[short|long]><[on|off]></a></B></li>
- <li><B><a href="#CUL_HMtoggle">toggle</a></B></li>
- <li><B>toggleDir</B><a name="CUL_HMtoggleDir"></a> - toggled drive direction between up/stop/down/stop</li>
- <li><B><a href="#CUL_HMonForTimer">on-for-timer <sec></a></B> - Dimmer only! <br></li>
- <li><B><a href="#CUL_HMonTill">on-till <time></a></B> - Dimmer only! <br></li>
- <li><B>stop</B> - stop motion (blind) or dim ramp</li>
- <li><B>old</B> - switch back to old value after a change. Dimmer only.</li>
- <li><B>pct <level> [<ontime>] [<ramptime>]</B> - set actor to a desired <B>absolut level</B>.<br>
- Optional ontime and ramptime could be given for dimmer.<br>
- ontime may be time in seconds. It may also be entered as end-time in format hh:mm:ss
- </li>
- <li><B>up [changeValue] [<ontime>] [<ramptime>]</B> dim up one step</li>
- <li><B>down [changeValue] [<ontime>] [<ramptime>]</B> dim up one step<br>
- changeValue is optional an gives the level to be changed up or down in percent. Granularity is 0.5%, default is 10%. <br>
- ontime is optional an gives the duration of the level to be kept. '0' means forever and is default.<br>
- ramptime is optional an defines the change speed to reach the new level. It is meaningful only for dimmer.
- <br></li>
- </ul>
- <br>
- </li>
- <li>remotes, pushButton<a name="CUL_HMremote"></a><br>
- This class of devices does not react on requests unless they are put
- to learn mode. FHEM obeys this behavior by stacking all requests until
- learn mode is detected. Manual interaction of the user is necessary to
- activate learn mode. Whether commands are pending is reported on
- device level with parameter 'protCmdPend'.
- </li>
- <ul>
- <li><B>trgEventS [all|<peer>] <condition></B><a name="CUL_HMtrgEventS"></a><br>
- Issue eventS on the peer entity. If <B>all</B> is selected each of the peers will be triggered. See also <a href="CUL_HMeventS">eventS</a><br>
- <B><condition></B>: is the condition being transmitted with the event. E.g. the brightness in case of a motion detector.
- </li>
- <li><B>trgEventL [all|<peer>] <condition></B><a name="CUL_HMtrgEventL"></a><br>
- Issue eventL on the peer entity. If <B>all</B> is selected each of the peers will be triggered. a normal device will not sent event long. See also <a href="CUL_HMeventL">eventL</a><br>
- <B><condition></B>: is the condition being transmitted with the event. E.g. the brightness in case of a motion detector.
- </li>
- <li><B>trgPressS [all|<peer>] </B><a name="CUL_HMtrgPressS"></a><br>
- Issue pressS on the peer entity. If <B>all</B> is selected each of the peers will be triggered. See also <a href="CUL_HMpressS">pressS</a><br>
- </li>
- <li><B>trgPressL [all|<peer>] </B><a name="CUL_HMtrgPressL"></a><br>
- Issue pressL on the peer entity. If <B>all</B> is selected each of the peers will be triggered. See also <a href="CUL_HMpressL">pressL</a><br>
- </li>
- <li><B>peerIODev [IO] <btn_no> [<u>set</u>|unset]</B><a name="CUL_HMpeerIODev"></a><br>
- The command is similar to <B><a href="#CUL_HMpeerChan">peerChan</a></B>.
- While peerChan
- is executed on a remote and peers any remote to any actor channel peerIODev is
- executed on an actor channel and peer this to an channel of an FHEM IO device.<br>
- An IO device according to eQ3 supports up to 50 virtual buttons. Those
- will be peered/unpeerd to the actor. <a href="CUL_HMpress">press</a> can be
- used to stimulate the related actions as defined in the actor register.
- </li>
- <li><B>peerChan <btn_no> <actChan> [single|<u>dual</u>|reverse][<u>set</u>|unset] [<u>both</u>|actor|remote]</B>
- <a name="CUL_HMpeerChan"></a><br>
-
- peerChan will establish a connection between a sender- <B>channel</B> and
- an actuator-<B>channel</B> called link in HM nomenclatur. Peering must not be
- confused with pairing.<br>
- <B>Pairing</B> refers to assign a <B>device</B> to the central.<br>
- <B>Peering</B> refers to virtally connect two <B>channels</B>.<br>
- Peering allowes direkt interaction between sender and aktor without
- the necessity of a CCU<br>
- Peering a sender-channel causes the sender to expect an ack from -each-
- of its peers after sending a trigger. It will give positive feedback (e.g. LED green)
- only if all peers acknowledged.<br>
- Peering an aktor-channel will setup a parameter set which defines the action to be
- taken once a trigger from -this- peer arrived. In other words an aktor will <br>
- - process trigger from peers only<br>
- - define the action to be taken dedicated for each peer's trigger<br>
- An actor channel will setup a default action upon peering - which is actor dependant.
- It may also depend whether one or 2 buttons are peered <B>in one command</B>.
- A swich may setup oen button for 'on' and the other for 'off' if 2 button are
- peered. If only one button is peered the funktion will likely be 'toggle'.<br>
- The funtion can be modified by programming the register (aktor dependant).<br>
-
- Even though the command is executed on a remote or push-button it will
- as well take effect on the actuator directly. Both sides' peering is
- virtually independant and has different impact on sender and receiver
- side.<br>
-
- Peering of one actuator-channel to multiple sender-channel as
- well as one sender-channel to multiple Actuator-channel is
- possible.<br>
-
- <actChan> is the actuator-channel to be peered.<br>
-
- <btn_no> is the sender-channel (button) to be peered. If
- 'single' is choosen buttons are counted from 1. For 'dual' btn_no is
- the number of the Button-pair to be used. I.e. '3' in dual is the
- 3rd button pair correcponding to button 5 and 6 in single mode.<br>
-
- If the command is executed on a channel the btn_no is ignored.
- It needs to be set, should be 0<br>
-
- [single|dual]: this mode impacts the default behavior of the
- Actuator upon using this button. E.g. a dimmer can be learned to a
- single button or to a button pair. <br>
- Defaults to dual.<br>
-
- 'dual' (default) Button pairs two buttons to one actuator. With a
- dimmer this means one button for dim-up and one for dim-down. <br>
-
- 'reverse' identical to dual - but button order is reverse.<br>
-
- 'single' uses only one button of the sender. It is useful for e.g. for
- simple switch actuator to toggle on/off. Nevertheless also dimmer can
- be learned to only one button. <br>
-
- [set|unset]: selects either enter a peering or remove it.<br>
- Defaults to set.<br>
- 'set' will setup peering for the channels<br>
- 'unset' will remove the peering for the channels<br>
-
- [actor|remote|both] limits the execution to only actor or only remote.
- This gives the user the option to redo the peering on the remote
- channel while the settings in the actor will not be removed.<br>
- Defaults to both.<br>
-
- Example:
- <ul><code>
- set myRemote peerChan 2 mySwActChn single set #peer second button to an actuator channel<br>
- set myRmtBtn peerChan 0 mySwActChn single set #myRmtBtn is a button of the remote. '0' is not processed here<br>
- set myRemote peerChan 2 mySwActChn dual set #peer button 3 and 4<br>
- set myRemote peerChan 3 mySwActChn dual unset #remove peering for button 5 and 6<br>
- set myRemote peerChan 3 mySwActChn dual unset aktor #remove peering for button 5 and 6 in actor only<br>
- set myRemote peerChan 3 mySwActChn dual set remote #peer button 5 and 6 on remote only. Link settings il mySwActChn will be maintained<br>
- </code></ul>
- </li>
- </ul>
- <li>virtual<a name="CUL_HMvirtual"></a><br>
- <ul>
- <li><B><a href="#CUL_HMpeerChan">peerChan</a></B> see remote</li>
- <li><B><a name="CUL_HMpress"></a>press [long|short] [<peer>] [<repCount>] [<repDelay>] </B>
- <ul>
- simulates button press for an actor from a peered sensor.
- will be sent of type "long".
- <li>[long|short] defines whether long or short press shall be simulated. Defaults to short</li>
- <li>[<peer>] define which peer's trigger shall be simulated.Defaults to self(channelNo).</li>
- <li>[<repCount>] Valid for long press only. How long shall the button be pressed? Number of repetition of the messages is defined. Defaults to 1</li>
- <li>[<repDelay>] Valid for long press only. defines wait time between the single messages. </li>
- </ul>
- </li>
- <li><B>virtTemp <[off -10..50]><a name="CUL_HMvirtTemp"></a></B>
- simulates a thermostat. If peered to a device it periodically sends the
- temperature until "off" is given. See also <a href="#CUL_HMvirtHum">virtHum</a><br>
- </li>
- <li><B>virtHum <[off -10..50]><a name="CUL_HMvirtHum"></a></B>
- simulates the humidity part of a thermostat. If peered to a device it periodically sends
- the temperature and humidity until both are "off". See also <a href="#CUL_HMvirtTemp">virtTemp</a><br>
- </li>
- <li><B>valvePos <[off 0..100]><a name="CUL_HMvalvePos"></a></B>
- stimulates a VD<br>
- </li>
- </ul>
- </li>
- <li>smokeDetector<br>
- Note: All these commands work right now only if you have more then one
- smoekDetector, and you peered them to form a group. For issuing the
- commands you have to use the master of this group, and currently you
- have to guess which of the detectors is the master.<br>
- smokeDetector can be setup to teams using
- <a href="#CUL_HMpeerChan">peerChan</a>. You need to peer all
- team-members to the master. Don't forget to also peerChan the master
- itself to the team - i.e. peer it to itself! doing that you have full
- controll over the team and don't need to guess.<br>
- <ul>
- <li><B>teamCall</B> - execute a network test to all team members</li>
- <li><B>teamCallBat</B> - execute a network test simulate bat low</li>
- <li><B>alarmOn</B> - initiate an alarm</li>
- <li><B>alarmOff</B> - switch off the alarm</li>
- </ul>
- </li>
- <li>4Dis (HM-PB-4DIS-WM|HM-RC-Dis-H-x-EU|ROTO_ZEL-STG-RM-DWT-10)
- <ul>
- <li><B>text <btn_no> [on|off] <text1> <text2></B><br>
- Set the text on the display of the device. To this purpose issue
- this set command first (or a number of them), and then choose from
- the teach-in menu of the 4Dis the "Central" to transmit the data.<br>
- If used on a channel btn_no and on|off must not be given but only pure text.<br>
- \_ will be replaced by blank character.<br>
- Example:
- <ul><code>
- set 4Dis text 1 on On Lamp<br>
- set 4Dis text 1 off Kitchen Off<br>
- <br>
- set 4Dis_chn4 text Kitchen Off<br>
- </code></ul>
- </li>
- </ul>
- <br></li>
- <li>Climate-Control (HM-CC-TC)
- <ul>
- <li><B>desired-temp <temp></B><br>
- Set different temperatures. <temp> must be between 6 and 30
- Celsius, and precision is half a degree.</li>
- <li><B>tempListSat [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListSun [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListMon [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListTue [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListThu [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListWed [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListFri [prep|exec] HH:MM temp ... 24:00 temp</B><br>
- Specify a list of temperature intervals. Up to 24 intervals can be
- specified for each week day, the resolution is 10 Minutes. The
- last time spec must always be 24:00.<br>
- Example: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
- 22.5, thereafter until midnight, 19 degrees celsius is desired.<br>
- <code> set th tempListSat 06:00 19 23:00 22.5 24:00 19<br></code>
- </li>
- <br>
- <li><B>tempListTmpl =>"[verify|restore] [[ <file> :]templateName] ...</B><br>
- The tempList for one or more devices can be stored in a file. User can compare the
- tempList in the file with the data read from the device. <br>
- Restore will write the tempList to the device.<br>
- Default opeartion is verify.<br>
- Default file is tempList.cfg.<br>
- Default templateName is the name of the actor<br>
- Default for file and templateName can be set with attribut <B>tempListTmpl</B><br>
- Example for templist file. room1 and room2 are the names of the template: <br>
- <code>entities:room1
- tempListSat>08:00 16.0 15:00 18.0 21:30 19.0 24:00 14.0
- tempListSun>08:00 16.0 15:00 18.0 21:30 19.0 24:00 14.0
- tempListMon>07:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
- tempListTue>07:00 16.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 15.0
- tempListWed>07:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
- tempListThu>07:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
- tempListFri>07:00 16.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
- entities:room2
- tempListSat>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0
- tempListSun>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0
- tempListMon>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0
- tempListTue>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 15.0
- tempListWed>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0
- tempListThu>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0
- tempListFri>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
- </code>
- Specials:<br>
- <li>none: template will be ignored</li>
- <li>defaultWeekplan: as default each day is set to 18.0 degree.
- useful if peered to a TC controller. Implicitely teh weekplan of TC will be used.</li>
- </li>
- <li><B>tempTmplSet =>"[[ <file> :]templateName]</B><br>
- Set the attribut and apply the change to the device
- </li>
- <li><B>templateDel =>" <template> </B><br>
- Delete templateentry for this entity
- </li>
- <li><B>partyMode <HH:MM><durationDays></B><br>
- set control mode to party and device ending time. Add the time it ends
- and the <b>number of days</b> it shall last. If it shall end next day '1'
- must be entered<br></li>
- <li><B>sysTime</B><br>
- set time in climate channel to system time</li>
- </ul><br>
- </li>
- <li>Climate-Control (HM-CC-RT-DN|HM-CC-RT-DN-BoM)
- <ul>
- <li><B>controlMode <auto|boost|day|night></B><br></li>
- <li><B>controlManu <temp></B><br></li>
- <li><B>controlParty <temp><startDate><startTime><endDate><endTime></B><br>
- set control mode to party, define temp and timeframe.<br>
- example:<br>
- <code>set controlParty 15 03.8.13 20:30 5.8.13 11:30</code></li>
- <li><B>sysTime</B><br>
- set time in climate channel to system time</li>
- <li><B>desired-temp <temp></B><br>
- Set different temperatures. <temp> must be between 6 and 30
- Celsius, and precision is half a degree.</li>
- <li><B>tempListSat [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListSun [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListMon [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListTue [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListThu [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListWed [prep|exec] HH:MM temp ... 24:00 temp</B><br></li>
- <li><B>tempListFri [prep|exec] HH:MM temp ... 24:00 temp</B><br>
- Specify a list of temperature intervals. Up to 24 intervals can be
- specified for each week day, the resolution is 10 Minutes. The
- last time spec must always be 24:00.<br>
- Optional parameter [prep|exec] allowes to pack the messages and therefore greatly
- improve data transmission. This is especially helpful if device is operated in wakeup mode.
- Usage is to send the commands with paramenter "prep". The data will be accumulated for send.
- The last command must have the parameter "exec" in order to transmitt the information.<br>
- Example: until 6:00 temperature shall be 19, from then until 23:00 temperature shall be
- 22.5, thereafter until midnight, 19 degrees celsius is desired.<br>
- <code> set th tempListSat 06:00 19 23:00 22.5 24:00 19<br></code>
- <br>
- <code> set th tempListSat prep 06:00 19 23:00 22.5 24:00 19<br>
- set th tempListSun prep 06:00 19 23:00 22.5 24:00 19<br>
- set th tempListMon prep 06:00 19 23:00 22.5 24:00 19<br>
- set th tempListTue exec 06:00 19 23:00 22.5 24:00 19<br></code>
- </li>
- </ul><br>
- </li>
- <li>OutputUnit (HM-OU-LED16)
- <ul>
- <li><B>led [off|red|green|yellow]</B><br>
- switches the LED of the channel to the color. If the command is
- executed on a device it will set all LEDs to the specified
- color.<br>
- For Expert all LEDs can be set individual by providing a 8-digit hex number to the device.<br></li>
- <li><B>ilum <brightness><duration> </B><br>
- <brightness> [0-15] of backlight.<br>
- <duration> [0-127] in sec. 0 is permanent 'on'.<br></li>
- </ul><br>
- </li>
- <li>OutputUnit (HM-OU-CFM-PL)
- <ul>
- <li><B>led <color>[,<color>..] [<repeat>..]</B><br>
- Possible colors are [redL|greenL|yellowL|redS|greenS|yellowS|pause]. A
- sequence of colors can be given separating the color entries by ','.
- White spaces must not be used in the list. 'S' indicates short and
- 'L' long ilumination. <br>
- <b>repeat</b> defines how often the sequence shall be executed. Defaults to 1.<br>
- </li>
- <li><B>playTone <MP3No>[,<MP3No>..] [<repeat>] [<volume>]</B><br>
- Play a series of tones. List is to be entered separated by ','. White
- spaces must not be used in the list.<br>
- <b>replay</b> can be entered to repeat the last sound played once more.<br>
- <b>repeat</b> defines how often the sequence shall be played. Defaults to 1.<br>
- <b>volume</b> is defined between 0 and 10. 0 stops any sound currently playing. Defaults to 10 (100%).<br>
- Example:
- <ul><code>
- # "hello" in display, symb bulb on, backlight, beep<br>
- set cfm_Mp3 playTone 3 # MP3 title 3 once<br>
- set cfm_Mp3 playTone 3 3 # MP3 title 3 3 times<br>
- set cfm_Mp3 playTone 3,6,8,3,4 # MP3 title list 3,6,8,3,4 once<br>
- set cfm_Mp3 playTone 3,6,8,3,4 255# MP3 title list 3,6,8,3,4 255 times<br>
- set cfm_Mp3 playTone replay # repeat last sequence<br>
- <br>
- set cfm_Led led redL 4 # led red blink 3 times long<br>
- set cfm_Led led redS,redS,redS,redL,redL,redL,redS,redS,redS 255 # SOS 255 times<br>
- </ul></code>
-
- </li>
- </ul><br>
- </li>
- <li>HM-RC-19xxx
- <ul>
- <li><B>alarm <count></B><br>
- issue an alarm message to the remote<br></li>
- <li><B>service <count></B><br>
- issue an service message to the remote<br></li>
- <li><B>symbol <symbol> [set|unset]</B><br>
- activate a symbol as available on the remote.<br></li>
- <li><B>beep [off|1|2|3]</B><br>
- activate tone<br></li>
- <li><B>backlight [off|on|slow|fast]</B><br>
- activate backlight<br></li>
- <li><B>display <text> comma unit tone backlight <symbol(s)>
- </B><br>
- control display of the remote<br>
- <text> : up to 5 chars <br>
- comma : 'comma' activates the comma, 'no' leaves it off <br>
- [unit] : set the unit symbols.
- [off|Proz|Watt|x3|C|x5|x6|x7|F|x9|x10|x11|x12|x13|x14|x15]. Currently
- the x3..x15 display is not tested. <br>
-
- tone : activate one of the 3 tones [off|1|2|3]<br>
-
- backlight: activate backlight flash mode [off|on|slow|fast]<br>
-
- <symbol(s)> activate symbol display. Multople symbols can be
- acticated at the same time, concatinating them comma separated. Don't
- use spaces here. Possiblesymbols are
-
- [bulb|switch|window|door|blind|scene|phone|bell|clock|arrowUp|arrowDown]<br><br>
- Example:
- <ul><code>
- # "hello" in display, symb bulb on, backlight, beep<br>
- set FB1 display Hello no off 1 on bulb<br>
- # "1234,5" in display with unit 'W'. Symbols scene,phone,bell and
- # clock are active. Backlight flashing fast, Beep is second tone<br>
- set FB1 display 12345 comma Watt 2 fast scene,phone,bell,clock
- </ul></code>
- </li>
- </ul><br>
- </li>
- <li>HM-Dis-WM55
- <ul>
- <li><B>displayWM help </B><br>
- <B>displayWM [long|short] <text1> <color1> <icon1> ... <text6> <color6> <icon6></B><br>
- <B>displayWM [long|short] <lineX> <text> <color> <icon></B><br>
- up to 6 lines can be addressed.<br>
- <B>lineX</B> line number that shall be changed. If this is set the 3 parameter of a line can be adapted. <br>
- <B>textNo</B> is the text to be dispalyed in line No. The text is assotiated with the text defined for the buttons.
- txt<BtnNo>_<lineNo> references channel 1 to 10 and their lines 1 or 2.
- Alternaly a free text of up to 12 char can be used<br>
- <B>color</B> is one white, red, orange, yellow, green, blue<br>
- <B>icon</B> is one off, on, open, closed, error, ok, noIcon<br>
- Example:
- <ul><code>
- set disp01 displayWM short txt02_2 green noIcon txt10_1 red error txt05_2 yellow closed txt02_2 orange open <br>
- set disp01 displayWM long line3 txt02_2 green noIcon<br>
- set disp01 displayWM long line2 nc yellow noIcon<br>
- set disp01 displayWM long line6 txt02_2<br>
- set disp01 displayWM long line1 nc nc closed<br>
- </ul></code>
- </li>
- </ul><br>
- </li>
- <li>HM-Dis-EP-WM55
- <ul>
- <li><B>displayEP help </B><br>
- <B>displayEP <text1,icon1:text2,icon2:text3,icon3> <sound> <repetition> <pause> <signal></B><br>
- up to 3 lines can be addressed.<br>
- If help is given a <i><B>help</B></i> on the command is given. Options for all parameter will be given.<br>
- <B>textx</B> 12 char text for the given line.
- If empty the value as per reading will be transmittet - i.e. typically no change.
- text0-9 will display predefined text of channels 4 to 8.
- 0xHH allows to display a single char in hex format.<br>
- <B>iconx</B> Icon for this line.
- If empty the value as per reading will be transmittet - i.e. typically no change.<br>
- <B>sound</B> sound to be played<br>
- <B>repetition</B> 0..15 <br>
- <B>pause</B> 1..160<br>
- <B>signal</B> signal color to be displayed<br>
- <br>
- <B>Note: param reWriteDisplayxx</B> <br>
- <li>
- upon button press the device will overwrite the 3 middles lines. When set <br>
- attr chan param reWriteDisplayxx<br>
- the 3 lines will be rewritten to the latest value after xx seconds. xx is between 01 and 99<br>
- </li>
-
- </li>
- </ul><br>
- </li>
- <li>keyMatic<br><br>
- <ul>The Keymatic uses the AES signed communication. Control
- of the Keymatic is possible with the HM-LAN adapter and the CUL.
- To control the KeyMatic with a CUL, the perl-module Crypt::Rijndael
- needs to be installed.</ul><br>
- <ul>
- <li><B>lock</B><br>
- The lock bolt moves to the locking position<br></li>
- <li><B>unlock [sec]</B><br>
- The lock bolt moves to the unlocking position.<br>
- [sec]: Sets the delay in seconds after the lock automatically locked again.<br>
- 0 - 65535 seconds</li>
- <li><B>open [sec]</B><br>
- Unlocked the door so that the door can be opened.<br>
- [sec]: Sets the delay in seconds after the lock automatically locked
- again.<br>0 - 65535 seconds</li>
- </ul>
- </li>
- <li>winMatic <br><br>
- <ul>winMatic provides 2 channels, one for the window control and a second
- for the accumulator.</ul><br>
- <ul>
- <li><B>level <level> <relockDelay> <speed></B><br>
- set the level. <br>
- <level>: range is 0 to 100%<br>
- <relockDelay>: range 0 to 65535 sec. 'ignore' can be used to igneore the value alternaly <br>
- <speed>: range is 0 to 100%<br>
- </li>
- <li><B>stop</B><br>
- stop movement<br>
- </li>
- </ul>
- </li>
- <li>CCU_FHEM<br>
- <ul>
- <li>defIgnUnknown<br>
- define unknown devices which are present in the readings.
- set attr ignore and remove the readingfrom the list. <br>
- </li>
- </ul>
- </li>
- <li>HM-Sys-sRP-Pl<br><br>
- setup the repeater's entries. Up to 36entries can be applied.
- <ul>
- <li><B>setRepeat <entry> <sender> <receiver> <broadcast></B><br>
- <entry> [1..36] entry number in repeater table. The repeater can handle up to 36 entries.<br>
- <sender> name or HMID of the sender or source which shall be repeated<br>
- <receiver> name or HMID of the receiver or destination which shall be repeated<br>
- <broadcast> [yes|no] determines whether broadcast from this ID shall be repeated<br>
- <br>
- short application: <br>
- <code>setRepeat setAll 0 0 0<br></code>
- will rewrite the complete list to the deivce. Data will be taken from attribut repPeers. <br>
- attribut repPeers is formated:<br>
- src1:dst1:[y/n],src2:dst2:[y/n],src2:dst2:[y/n],...<br>
- <br>
- Reading repPeer is formated:<br>
- <ul>
- Number src dst broadcast verify<br>
- number: entry sequence number<br>
- src: message source device - read from repeater<br>
- dst: message destination device - assembled from attributes<br>
- broadcast: shall broadcast be repeated for this source - read from repeater<br>
- verify: do attributes and readings match?<br>
- </ul>
- </li>
- </ul>
- </li>
- <br>
- Debugging:
- <ul>
- <li><B>raw <data> ...</B><br>
- Only needed for experimentation.
- send a list of "raw" commands. The first command will be
- immediately sent, the next one after the previous one is acked by
- the target. The length will be computed automatically, and the
- message counter will be incremented if the first two charcters are
- ++. Example (enable AES):
- <pre>
- set hm1 raw ++A001F100001234560105000000001\
- ++A001F10000123456010802010AF10B000C00\
- ++A001F1000012345601080801\
- ++A001F100001234560106</pre>
- </li>
- </ul>
- </ul>
- </ul>
- <br>
- <a name="CUL_HMget"></a><b>Get</b><br>
- <ul>
- <li><B>configSave <filename></B><a name="CUL_HMconfigSave"></a><br>
- Saves the configuration of an entity into a file. Data is stored in a
- format to be executed from fhem command prompt.<br>
- The file is located in the fhem home directory aside of fhem.cfg. Data
- will be stored cumulative - i.e. new data will be appended to the
- file. It is up to the user to avoid duplicate storage of the same
- entity.<br>
- Target of the data is ONLY the HM-device information which is located
- IN the HM device. Explicitely this is the peer-list and the register.
- With the register also the peering is included.<br>
- The file is readable and editable by the user. Additionaly timestamps
- are stored to help user to validate.<br>
- Restrictions:<br>
- Even though all data of the entity will be secured to the file FHEM
- stores the data that is avalilable to FHEM at time of save!. It is up
- to the user to read the data from the HM-hardware prior to execution.
- See recommended flow below.<br>
- This command will not store any FHEM attributes o device definitions.
- This continues to remain in fhem.cfg.<br>
- Furthermore the secured data will not automatically be reloaded to the
- HM-hardware. It is up to the user to perform a restore.<br><br>
- As with other commands also 'configSave' is best executed on a device
- rather then on a channel. If executed on a device also the assotiated
- channel data will be secured. <br><br>
- <code>
- Recommended work-order for device 'HMdev':<br>
- set HMdev clear msgEvents # clear old events to better check flow<br>
- set HMdev getConfig # read device & channel inforamtion<br>
- # wait until operation is complete<br>
- # protState should be CMDs_done<br>
- # there shall be no warnings amongst prot... variables<br>
- get configSave myActorFile<br>
- </code>
- </li>
- <li><B>param <paramName></B><br>
- returns the content of the relevant parameter for the entity. <br>
- Note: if this command is executed on a channel and 'model' is
- requested the content hosting device's 'model' will be returned.
- </li>
- <li><B>reg <addr> <list> <peerID></B><a name="CUL_HMget_reg"></a><br>
- returns the value of a register. The data is taken from the storage in FHEM and not
- read directly outof the device.
- If register content is not present please use getConfig, getReg in advance.<br>
-
- <addr> address in hex of the register. Registername can be used alternaly
- if decoded by FHEM. "all" will return all decoded register for this entity in one list.<br>
- <list> list from which the register is taken. If rgistername is used list
- is ignored and can be set to 0.<br>
- <peerID> identifies the registerbank in case of list3 and list4. It an be set to dummy if not used.<br>
- </li>
- <li><B>regVal <addr> <list> <peerID></B><br>
- returns the value of a register. It does the same as <a href="#CUL_HMget_reg">reg</a> but strips off units<br>
- </li>
- <li><B>regList</B><br>
- returns a list of register that are decoded by FHEM for this device.<br>
- Note that there could be more register implemented for a device.<br>
- </li>
-
- <li><B>saveConfig <file></B><a name="CUL_HMsaveConfig"></a><br>
- stores peers and register to the file.<br>
- Stored will be the data as available in fhem. It is necessary to read the information from the device prior to the save.<br>
- The command supports device-level action. I.e. if executed on a device also all related channel entities will be stored implicitely.<br>
- Storage to the file will be cumulative.
- If an entity is stored multiple times to the same file data will be appended.
- User can identify time of storage in the file if necessary.<br>
- Content of the file can be used to restore device configuration.
- It will restore all peers and all register to the entity.<br>
- Constrains/Restrictions:<br>
- prior to rewrite data to an entity it is necessary to pair the device with FHEM.<br>
- restore will not delete any peered channels, it will just add peer channels.<br>
- </li>
- <li><B>listDevice</B><br>
- <ul>
- <li>when used with ccu it returns a list of Devices using the ccu service to assign an IO.<br>
- </li>
- <li>when used with ActionDetector user will get a comma separated list of entities being assigned to the action detector<br>
- get ActionDetector listDevice # returns all assigned entities<br>
- get ActionDetector listDevice notActive# returns entities which habe not status alive<br>
- get ActionDetector listDevice alive # returns entities with status alive<br>
- get ActionDetector listDevice unknown # returns entities with status unknown<br>
- get ActionDetector listDevice dead # returns entities with status dead<br>
- </li>
- </ul>
- </li>
- <li><B>info</B><br>
- <ul>
- <li>provides information about entities using ActionDetector<br>
- </li>
- </ul>
- </li>
- </ul><br>
-
- <a name="CUL_HMattr"></a><b>Attributes</b>
- <ul>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><a name="CUL_HMaesCommReq">aesCommReq</a>
- if set IO is forced to request AES signature before sending ACK to the device.<br>
- </li>
- <li><a name="#CUL_HMactAutoTry">actAutoTry</a>
- actAutoTry 0_off,1_on<br>
- setting this option enables Action Detector to send a statusrequest in case of a device is going to be marked dead.
- The attribut may be useful in case a device is being checked that does not send messages regularely - e.g. an ordinary switch.
- </li>
- <li><a name="#CUL_HMactCycle">actCycle</a>
- actCycle <[hhh:mm]|off><br>
- Supports 'alive' or better 'not alive' detection for devices. [hhh:mm] is the maximum silent time for the device.
- Upon no message received in this period an event will be raised "<device> is dead".
- If the device sends again another notification is posted "<device> is alive". <br>
- This actiondetect will be autocreated for each device with build in cyclic status report.<br>
- Controlling entity is a pseudo device "ActionDetector" with HMId "000000".<br>
- Due to performance considerations the report latency is set to 600sec (10min).
- It can be controlled by the attribute "actCycle" of "ActionDetector".<br>
- Once entered to the supervision the HM device has 2 attributes:<br>
- <ul>
- actStatus: activity status of the device<br>
- actCycle: detection period [hhh:mm]<br>
- </ul>
- The overall function can be viewed checking out the "ActionDetector" entity. The status of all entities is present in the READING section.<br>
- 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.
- </li>
- <li><a name="#CUL_HMautoReadReg">autoReadReg</a><br>
- '0' autoReadReg will be ignored.<br>
- '1' will execute a getConfig for the device automatically after each reboot of FHEM. <br>
- '2' like '1' plus execute after power_on.<br>
- '3' includes '2' plus updates on writes to the device<br>
- '4' includes '3' plus tries to request status if it seems to be missing<br>
- '5' checks reglist and peerlist. If reading seems incomplete getConfig will be scheduled<br>
- '8_stateOnly' will only update status information but not configuration
- data like register and peer<br>
- Execution will be delayed in order to prevent congestion at startup. Therefore the update
- of the readings and the display will be delayed depending on the size of the database.<br>
- Recommendations and constrains upon usage:<br>
- <ul>
- use this attribute on the device or channel 01. Do not use it separate on each channel
- of a multi-channel device to avoid duplicate execution<br>
- usage on devices which only react to 'config' mode is not recommended since executen will
- not start until config is triggered by the user<br>
- usage on devices which support wakeup-mode is usefull. But consider that execution is delayed
- until the device "wakes up".<br>
- </ul>
- </li>
- <li><a name="#CUL_HMburstAccess">burstAccess</a><br>
- can be set for the device entity if the model allowes conditionalBurst.
- The attribut will switch off burst operations (0_off) which causes less message load
- on HMLAN and therefore reduces the chance of HMLAN overload.<br>
- Setting it on (1_auto) allowes shorter reaction time of the device. User does not
- need to wait for the device to wake up. <br>
- Note that also the register burstRx needs to be set in the device.</li>
- <li><a name="#CUL_HMexpert">expert</a><br>
- This attribut controls the visibility of the register readings. This attibute controls
- the presentation of device parameter in the readings.<br>
- it is a binary coded number with following presets:<br>
- <ul>
- 0_defReg : default register<br>
- 1_allReg : all register<br>
- 2_defReg+raw : default register and raw reading<br>
- 3_allReg+raw : all register and raw reading<br>
- 4_off : no register<br>
- 8_templ+default: templates and default register<br>
- 12_templOnly : templates only<br>
- 251_anything : anything available<br>
- </ul>
- If expert is applied a device it is used for assotiated channels.
- It can be overruled if expert attibute is also applied to the channel device.<br>
- Make sure to check out attribut showInternalValues in the global values as well.
- extert takes benefit of the implementation.
- Nevertheless - by definition - showInternalValues overrules expert.
- </li>
- <li><a name="#CUL_HMreadOnly">readOnly</a><br>
- restircts commands to read od observ only.
- </li>
- <li><a name="#CUL_HMIOgrp">IOgrp</a><br>
- can be given to devices and shall point to a virtual CCU. As a consequence the
- CCU will take care of the assignment to the best suitable IO. It is necessary that a
- virtual CCU is defined and all relevant IO devices are assigned to it. Upon sending the CCU will
- check which IO is operational and has the best RSSI performance for this device.<br>
- Optional a prefered IO - perfIO can be given. In case this IO is operational it will be selected regardless
- of rssi values. <br>
- If none is detected in the prefIO list the mechanism is stopped and the IO as of IOdev is assigned<br>
- Example:<br>
- <ul><code>
- attr myDevice1 IOgrp vccu<br>
- attr myDevice2 IOgrp vccu:prefIO<br>
- attr myDevice2 IOgrp vccu:prefIO1,prefIO2,prefIO3<br>
- attr myDevice2 IOgrp vccu:prefIO1,prefIO2,none<br>
- </code></ul>
- </li>
- <li><a name="#CUL_HMlevelRange">levelRange</a><br>
- can be used with dimmer only. It defines the dimmable range to be used with this dimmer-channel.
- It is meant to support e.g. LED light that starts at 10% and reaches maxbrightness at 40%.
- levelrange will normalize the level to this range. I.e. set to 100% will physically set the
- dimmer to 40%, 1% will set to 10% physically. 0% still switches physially off.<br>
- Impacted are commands on, up, down, toggle and pct. <b>Not</b> effected is the off command
- which still set physically 0%.<br>
- To be considered:<br>
- dimmer level set by peers and buttons is not impacted. Those are controlled by device register<br>
- Readings level may go to negative or above 100%. This simply results from the calculation and reflects
- physical level is above or below the given range.<br>
- In case of virtual dimmer channels available present the attribut needs to be set for
- each channel<br>
- User should be careful to set min level other then '0'<br>
- Example:<br>
- <ul><code>
- attr myChannel levelRange 0,40<br>
- attr myChannel levelRange 10,80<br>
- </code></ul>
- </li>
- <li><a name="#CUL_HMmodel">model</a>,
- <a name="subType">subType</a><br>
- These attributes are set automatically after a successful pairing.
- They are not supposed to be set by hand, and are necessary in order to
- correctly interpret device messages or to be able to send them.</li>
- <li><a name="#CUL_HMmsgRepeat">msgRepeat</a><br>
- defines number of repetitions if a device doesn't answer in time. <br>
- Devices which donly support config mode no repeat ist allowed. <br>
- For devices with wakeup mode the device will wait for next wakeup. Lonng delay might be
- considered in this case. <br>
- Repeat for burst devices will impact HMLAN transmission capacity.</li>
- <li><a name="#CUL_HMparam">param</a><br>
- param defines model specific behavior or functions. See <a href="#CUL_HMparams"><b>available parameter</b></a> for details</li>
- <li><a name="#CUL_HMrawToReadable">rawToReadable</a><br>
- Used to convert raw KFM100 values to readable data, based on measured
- values. E.g. fill slowly your container, while monitoring the
- values reported with <a href="#inform">inform</a>. You'll see:
- <ul>
- 10 (at 0%)<br>
- 50 (at 20%)<br>
- 79 (at 40%)<br>
- 270 (at 100%)<br>
- </ul>
- Apply these values with: "attr KFM100 rawToReadable 10:0 50:20 79:40 270:100".
- fhem will do a linear interpolation for values between the bounderies.
- </li>
- <li><a name="#CUL_HMrssiLog">rssiLog</a><br>
- can be given to devices, denied for channels. If switched '1' each RSSI entry will be
- written to a reading. User may use this to log and generate a graph of RSSI level.<br>
- Due to amount of readings and events it is NOT RECOMMENDED to switch it on by default.
- </li>
- <li><a name="#CUL_HMtempListTmpl">tempListTmpl</a><br>
- Sets the default template for a heating controller. If not given the detault template is taken from
- file tempList.cfg using the enitity name as template name (e.g. ./tempLict.cfg:RT1_Clima <br>
- To avoid template usage set this attribut to '0'.<br>
- Format is <file>:<templatename>. lt
- </li>
- <li><a name="unit">unit</a><br>
- set the reported unit by the KFM100 if rawToReadable is active. E.g.<br>
- attr KFM100 unit Liter
- </li>
- <li><a name="cyclicMsgOffset">cyclicMsgOffset</a><br>
- when calculating the timestamp for sending the next cyclic message (e.g. weather or valve data) then the value of this attribute<br>
- 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
- </li>
- </ul> <br>
- <a name="CUL_HMparams"><b>available parameter for attribut "param"</b></a>
- <ul>
- <li><B>HM-Sen-RD-O</B><br>
- <B>offAtPon</B> heat channel only: force heating off after powerOn<br>
- <B>onAtRain</B> heat channel only: force heating on while status changes to 'rain' and off when it changes to 'dry'<br>
- </li>
- <li><B>virtuals</B><br>
- <B>noOnOff</B> virtual entity will not toggle state when trigger is received. If this parameter is
- not given the entity will toggle its state between On and Off with each trigger<br>
- <B>msgReduce:<No></B> if channel is used for <a ref="CUL_HMvalvePos"></a> it skips every No message
- in order to reduce transmit load. Numbers from 0 (no skip) up to 9 can be given.
- VD will lose connection with more then 5 skips<br>
- </li>
- <li><B>blind</B><br>
- <B>levelInverse</B> while HM considers 100% as open and 0% as closed this may not be
- 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>
- NOTE: This will apply to readings and set commands. <B>It does not apply to any register. </B><br>
- <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>
- <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>
- </li>
- <li><B>sensRain</B><br>
- <B>siren</B><br>
- <B>powerMeter</B><br>
- <B>switch</B><br>
- <B>dimmer</B><br>
- <B>rgb</B><br>
- <B>showTimed</B> if timmed is running -till will be added to state.
- This results eventually in state on-till which allowes better icon handling.<br>
- </li>
- </ul><br>
- <a name="CUL_HMevents"><b>Generated events:</b></a>
- <ul>
- <li><B>general</B><br>
- recentStateType:[ack|info] # cannot be used ti trigger notifies<br>
- <ul>
- <li>ack indicates that some statusinfo is derived from an acknowledge</li>
- <li>info indicates an autonomous message from the device</li>
- <li><a name="CUL_HMsabotageAttackId"><b>sabotageAttackId</b></a><br>
- Alarming configuration access to the device from a unknown source<br></li>
- <li><a name="CUL_HMsabotageAttack"><b>sabotageAttack</b></a><br>
- Alarming configuration access to the device that was not issued by our system<br></li>
- <li><a name="CUL_HMtrigDst"><b>trigDst_<name>: noConfig</b></a><br>
- A sensor triggered a Device which is not present in its peerList. Obviously the peerList is not up to date<br></li>
- </ul>
- </li>
- <li><B>HM-CC-TC,ROTO_ZEL-STG-RM-FWT</B><br>
- T: $t H: $h<br>
- battery:[low|ok]<br>
- measured-temp $t<br>
- humidity $h<br>
- actuator $vp %<br>
- desired-temp $dTemp<br>
- desired-temp-manu $dTemp #temperature if switchen to manual mode<br>
- desired-temp-cent $dTemp #temperature if switchen to central mode<br>
- windowopen-temp-%d %.1f (sensor:%s)<br>
- tempList$wd hh:mm $t hh:mm $t ...<br>
- displayMode temp-[hum|only]<br>
- displayTemp [setpoint|actual]<br>
- displayTempUnit [fahrenheit|celsius]<br>
- controlMode [auto|manual|central|party]<br>
- tempValveMode [Auto|Closed|Open|unknown]<br>
- param-change offset=$o1, value=$v1<br>
- ValveErrorPosition_for_$dname $vep %<br>
- ValveOffset_for_$dname : $of %<br>
- ValveErrorPosition $vep %<br>
- ValveOffset $of %<br>
- time-request<br>
- trig_<src> <value> #channel was triggered by <src> channel.
- This event relies on complete reading of channels configuration, otherwise Data can be
- incomplete or incorrect.<br>
- trigLast <channel> #last receiced trigger<br>
- </li>
- <li><B>HM-CC-RT-DN and HM-CC-RT-DN-BoM</B><br>
- state:T: $actTemp desired: $setTemp valve: $vp %<br>
- motorErr: [ok|ValveTight|adjustRangeTooLarge|adjustRangeTooSmall|communicationERR|unknown|lowBat|ValveErrorPosition]
- measured-temp $actTemp<br>
- desired-temp $setTemp<br>
- ValvePosition $vp %<br>
- mode [auto|manual|party|boost]<br>
- battery [low|ok]<br>
- batteryLevel $bat V<br>
- measured-temp $actTemp<br>
- desired-temp $setTemp<br>
- actuator $vp %<br>
- time-request<br>
- trig_<src> <value> #channel was triggered by <src> channel.
- </li>
- <li><B>HM-CC-VD,ROTO_ZEL-STG-RM-FSA</B><br>
- $vp %<br>
- battery:[critical|low|ok]<br>
- motorErr:[ok|blocked|loose|adjusting range too small|opening|closing|stop]<br>
- ValvePosition:$vp %<br>
- ValveErrorPosition:$vep %<br>
- ValveOffset:$of %<br>
- ValveDesired:$vp % # set by TC <br>
- operState:[errorTargetNotMet|onTarget|adjusting|changed] # operational condition<br>
- operStateErrCnt:$cnt # number of failed settings<br>
- </li>
- <li><B>HM-CC-SCD</B><br>
- [normal|added|addedStrong]<br>
- battery [low|ok]<br>
- </li>
- <li><B>HM-SEC-SFA-SM</B><br>
- powerError [on|off]<br>
- sabotageError [on|off]<br>
- battery: [critical|low|ok]<br>
- </li>
- <li><B>HM-LC-BL1-PB-FM</B><br>
- motor: [opening|closing]<br>
- </li>
- <li><B>HM-LC-SW1-BA-PCB</B><br>
- battery: [low|ok]<br>
- </li>
- <li><B>HM-OU-LED16</B><br>
- color $value # hex - for device only<br>
- $value # hex - for device only<br>
- color [off|red|green|orange] # for channel <br>
- [off|red|green|orange] # for channel <br>
- </li>
- <li><B>HM-OU-CFM-PL</B><br>
- [on|off|$val]<br>
- </li>
- <li><B>HM-Sen-Wa-Od</B><br>
- $level%<br>
- level $level%<br>
- </li>
- <li><B>KFM100</B><br>
- $v<br>
- $cv,$unit<br>
- rawValue:$v<br>
- Sequence:$seq<br>
- content:$cv,$unit<br>
- </li>
- <li><B>KS550/HM-WDS100-C6-O</B><br>
- T: $t H: $h W: $w R: $r IR: $ir WD: $wd WDR: $wdr S: $s B: $b<br>
- temperature $t<br>
- humidity $h<br>
- windSpeed $w<br>
- windDirection $wd<br>
- windDirRange $wdr<br>
- rain $r<br>
- isRaining $ir<br>
- sunshine $s<br>
- brightness $b<br>
- unknown $p<br>
- </li>
- <li><B>HM-Sen-RD-O</B><br>
- lastRain: timestamp # no trigger generated. Begin of previous Rain -
- timestamp of the reading is the end of rain. <br>
- </li>
- <li><B>THSensor and HM-WDC7000</B><br>
- T: $t H: $h AP: $ap<br>
- temperature $t<br>
- humidity $h<br>
- airpress $ap #HM-WDC7000 only<br>
- </li>
- <li><B>dimmer</B><br>
- overload [on|off]<br>
- overheat [on|off]<br>
- reduced [on|off]<br>
- dim: [up|down|stop]<br>
- </li>
- <li><B>motionDetector</B><br>
- brightness:$b<br>
- alive<br>
- motion on (to $dest)<br>
- motionCount $cnt _next:$nextTr"-"[0x0|0x1|0x2|0x3|15|30|60|120|240|0x9|0xa|0xb|0xc|0xd|0xe|0xf]<br>
- cover [closed|open] # not for HM-Sec-MDIR<br>
- sabotageError [on|off] # only HM-Sec-MDIR<br>
- battery [low|ok]<br>
- devState_raw.$d1 $d2<br>
- </li>
- <li><B>remote/pushButton/outputUnit</B><br>
- <ul> (to $dest) is added if the button is peered and does not send to broadcast<br>
- Release is provided for peered channels only</ul>
- Btn$x onShort<br>
- Btn$x offShort<br>
- Btn$x onLong $counter<br>
- Btn$x offLong $counter<br>
- Btn$x onLongRelease $counter<br>
- Btn$x offLongRelease $counter<br>
- Btn$x onShort (to $dest)<br>
- Btn$x offShort (to $dest)<br>
- Btn$x onLong $counter (to $dest)<br>
- Btn$x offLong $counter (to $dest)<br>
- Btn$x onLongRelease $counter (to $dest)<br>
- Btn$x offLongRelease $counter (to $dest)<br>
- </li>
- <li><B>remote/pushButton</B><br>
- battery [low|ok]<br>
- trigger [Long|Short]_$no trigger event from channel<br>
- </li>
- <li><B>swi</B><br>
- Btn$x Short<br>
- Btn$x Short (to $dest)<br>
- battery: [low|ok]<br>
- </li>
- <li><B>switch/dimmer/blindActuator</B><br>
- $val<br>
- powerOn [on|off|$val]<br>
- [unknown|motor|dim] [up|down|stop]:$val<br>
- timedOn [running|off]<br> # on is temporary - e.g. started with on-for-timer
- </li>
- <li><B>sensRain</B><br>
- $val<br>
- powerOn <br>
- level <val≥<br>
- timedOn [running|off]<br> # on is temporary - e.g. started with on-for-timer
- trigger [Long|Short]_$no trigger event from channel<br>
- </li>
- <li><B>smokeDetector</B><br>
- [off|smoke-Alarm|alive] # for team leader<br>
- [off|smoke-forward|smoke-alarm] # for team members<br>
- [normal|added|addedStrong] #HM-CC-SCD<br>
- SDteam [add|remove]_$dname<br>
- battery [low|ok]<br>
- smoke_detect [none|<src>]<br>
- teamCall:from $src<br>
- </li>
- <li><B>threeStateSensor</B><br>
- [open|tilted|closed]<br>
- [wet|damp|dry] #HM-SEC-WDS only<br>
- cover [open|closed] #HM-SEC-WDS and HM-Sec-RHS<br>
- alive yes<br>
- battery [low|ok]<br>
- contact [open|tilted|closed]<br>
- contact [wet|damp|dry] #HM-SEC-WDS only<br>
- sabotageError [on|off] #HM-SEC-SC only<br>
- </li>
- <li><B>winMatic</B><br>
- [locked|$value]<br>
- motorErr [ok|TurnError|TiltError]<br>
- direction [no|up|down|undefined]<br>
- charge [trickleCharge|charge|dischange|unknown]<br>
- airing [inactiv|$air]<br>
- course [tilt|close]<br>
- airing [inactiv|$value]<br>
- contact tesed<br>
- </li>
- <li><B>keyMatic</B><br>
- unknown:40<br>
- battery [low|ok]<br>
- uncertain [yes|no]<br>
- error [unknown|motor aborted|clutch failure|none']<br>
- lock [unlocked|locked]<br>
- [unlocked|locked|uncertain]<br>
- </li>
- </ul>
- <a name="CUL_HMinternals"><b>Internals</b></a>
- <ul>
- <li><B>aesCommToDev</B><br>
- gives information about success or fail of AES communication between IO-device and HM-Device<br>
- </li>
- </ul><br>
- <br>
- </ul>
- <p><a name="CUL_HOERMANN"></a>
- <h3>CUL_HOERMANN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_HOERMANN'>DE</a>]</div>
- <ul>
- The CUL_HOERMANN module registers the 868MHz Hoermann Garage-Door-Opener
- signals received by the CUL. <b>Note</b>: As the structure of this signal is
- not understood, no checksum is verified, so it is likely to receive bogus
- messages.
- <br><br>
- <a name="CUL_HOERMANNdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_HOERMANN <10-digit-hex-code></code>
- <br>
- </ul>
- <br>
- <a name="CUL_HOERMANNset"></a>
- <b>Set</b>
- <ul>
- <li>toggle<br>
- Send a signal, which, depending on the status of the door, opens it,
- closes it or stops the current movement. NOTE: needs culfw 1.67+
- </li>
- </ul><br>
- <a name="CUL_HOERMANNget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="CUL_HOERMANNattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="CUL_IR"></a>
- <h3>CUL_IR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_IR'>DE</a>]</div>
- <ul>
- The CUL_IR module interprets Infrared messages received by the CUN/CUNO/CUNOv2/TuxRadio.
- Those devices can receive Infrared Signals from basically any Remote controller and will transform
- that information in a so called Button-Code <br><br>
- <a name="CUL_IRdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_IR <<a href="#IODev">IODev</a>></code> <br>
- <br>
- <<a href="#IODev">IODev</a>> is the devicename of the IR-receivung device, e.g. CUNO1.<br><br>
- Your definition should look like E.g.:
- <pre>
- define IR-Dev CUL_IR CUNO1</pre>
- </ul>
- <a name="CUL_IRset"></a>
- <b>Set</b>
- <ul>
- <a name="irLearnForSec"></a>
- <li>irLearnForSec<br>
- Sets the CUL_IR device in an IR-Code Learning mode for the given seconds. Any received IR-Code will
- be stored as a Button attribute for this devices. The name of these attributes is dependent on the two
- attributes <a href="#CUL_IRattr">learncount</a> and <a href="#CUL_IRattr">learnprefix</a>.<br>
- Attention: Before learning IR-Codes the CUL_IR device needs to be set in IR-Receiving mode
- by modifying the <a href="#irReceive">irReceive</a> attribute.
- </li>
- <a name="irSend"></a>
- <li>irSend<br>
- Sends out IR-commands via the connected IODev. The IR-command can be specified as buttonname according
- to <a href="#Button.*">Button.*</a> or as IR-Code directly. If a buttonname is specified, the
- corresponding IR-Code will be sent out.<br>
- Example: <br>
- <pre>set IR-Dev irSend ButtonA001 </pre>
- If defining an IR-Code directly the following Code-Syntax needs to be followed:<br>
- <pre>IRCode: <PP><AAAA><CCCC><FF> </pre>
- with P = Protocol; A = Address; C = Command; F = Flags<br>
- With the Flags you can modify IR-Repetition. Flags between 00-0E will produce
- 0-15 IR-Repetitions.
- You can type the IR-Code as plain as above, or with a heading "I" as learnt for the buttons.<br>
- Example: <br>
- <code>set IR-Dev irSend 0A07070F0F02<br>
- set IR-Dev irSend I0A07070F0F00 </code>
- </li>
- </ul>
- <a name="CUL_IRget"></a>
- <b>Get</b>
- <ul>N/A</ul>
- <a name="CUL_IRattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#loglevel">loglevel</a></li><br>
- <li><a href="#irReceive">irReceive</a><br>
- Configure the IR Transceiver of the <<a href="#IODev">IODev</a>> (the CUNO1). Available
- arguments are:
- <ul>
- <li>OFF<br>
- Switching off the reception of IR signals. This is the default.</li>
- <li>ON<br>
- Switching on the reception of IR signals. This is WITHOUT filtering repetitions. This is
- not recommended as many remote controls do repeat their signals.</li>
- <li>ON_NR<br>
- Switching on the reception of IR signals with filtering of repetitions. This is
- the recommended modus operandi.</li>
- </ul>
- </li><br>
- <li><a name="Button.*"></a>Button.*<br>
- Button.* is the wildcard for all learnt IR-Codes. IR-Codes are learnt as Button-Attributes.
- The name for a learnt Button - IR-Code is compiled out of three elements:<br>
- <pre>
- Button<learnprefix><learncount>
- </pre>
- When the CUL_IR device is set into <a href="#irLearnForSec">learning mode</a> it will generate a
- new button-attribute for each new IR-Code received.This is done according to the following syntax:<br>
- <pre>
- <Button-Attribute-Name> <IR-Code></pre>
- Examples of learnt button-attributes with EMPTY <learnprefix> and <learncount> starting from 1:<br>
- <pre>
- Button001 I02029A000000
- Button002 I02029A000001</pre>
- To make sure that something happens when this IR-code is received later on one has to modify the attribute
- and to add commands as attribute values.
- Examples:
- <pre>
- Button001 I02029A000000 set WZ_Lamp on
- Button002 I02029A000001 set Switch on</pre>
- The syntax for this is:
- <pre>
- attr <device-name> <attribute-name> <IR-Code> <command>
- </pre>
- </li>
- <li><a name="Group.*"></a>Group.*<br>
- Group.* is the wildcard for IR-Code groups. With these attributes one can define
- IR-Code parts, which may match to several Button-IR-Codes.<br>
- This is done by defining group-attributes that contain only parts of the IR-Code.
- The syntax is:
- <pre>
- <Group-Attribute-Name> <IR-Code></pre>
- Examples of a group-attribute is:<br>
- <pre>
- Group001 I02029A</pre>
- With this all IR-Codes starting with I02029A will match the Group001.
- </li><br>
- <li><a name="learncount"></a>learncount<br>
- learncount is used to store the next button-code-number that needs to be learned.
- By manually modifying this attribute new button sequences can be arranged.
- </li><br>
- <li><a name="learnprefix"></a>learnprefix<br>
- learnprefix is a string which will be added to the button-attribute-name. <br>
- A button-attribute-name is constructed by:
- <pre>
- Button<learnprefix><learncount> </pre>
- If learnprefix is empty the button-attribute-name only contains the term
- "Button" and the actual number of <a href="#learncount">learncount</a>.
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="CUL_MAX"></a>
- <h3>CUL_MAX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_MAX'>DE</a>]</div>
- <ul>
- The CUL_MAX module interprets MAX! messages received by the CUL. It will be automatically created by autocreate, just make sure
- that you set the right rfmode like <code>attr CUL0 rfmode MAX</code>.<br>
- <br><br>
- <a name="CUL_MAXdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_MAX <addr></code>
- <br><br>
- Defines an CUL_MAX device of type <type> and rf address <addr>. The rf address
- must not be in use by any other MAX device.
- </ul>
- <br>
- <a name="CUL_MAXset"></a>
- <b>Set</b>
- <ul>
- <li>pairmode<br>
- Sets the CUL_MAX into pairing mode for 60 seconds 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).</li>
- <li>fakeSC <device> <open><br>
- Sends a fake ShutterContactState message <open> must be 0 or 1 for
- "window closed" or "window opened". If the <device> has a non-zero groupId,
- the fake ShutterContactState message affects all devices with that groupId.
- Make sure you associate the target device(s) with fakeShutterContact beforehand.</li>
- <li>fakeWT <device> <desiredTemperature> <measuredTemperature><br>
- Sends a fake WallThermostatControl message (parameters both may have one digit
- after the decimal point, for desiredTemperature it may only by 0 or 5).
- If the <device> has a non-zero groupId, the fake WallThermostatControl
- message affects all devices with that groupId. Make sure you associate the target
- device with fakeWallThermostat beforehand.</li>
- </ul>
- <br>
- <a name="CUL_MAXget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="CUL_MAXattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#loglevel">loglevel</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="CUL_MAXevents"></a>
- <b>Generated events:</b>
- <ul>N/A</ul>
- <br>
- </ul>
- <p><a name="CUL_REDIRECT"></a>
- <h3>CUL_REDIRECT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_REDIRECT'>DE</a>]</div>
- <ul>
- The CUL_REDIRECT modul receive additional protocols from CUL<br>
- and redirect them to other modules.
- <br>
-
- <a name="CUL_REDIRECT_Parse"></a>
- </ul>
- <p><a name="CUL_RFR"></a>
- <h3>CUL_RFR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_RFR'>DE</a>]</div>
- <ul>
- <table>
- <tr><td>
- The CUL_RFR module is used to "attach" a second CUL to your base CUL, and
- use it as a repeater / range extender. RFR is shorthand for RF_ROUTER.
- Transmission of the data uses the CC1101 packet capabilities with GFSK
- modulation at 250kBaud after pinging the base CUL at the usual 1kBaud. After
- configured, the RFR device can be used like another CUL connected directly to
- FHEM.<br>
- In theory every SlowRF protocol should work, as the hook is implemented in
- the culfw output routine: instead of sending the data to the USB-Interface it
- is transmitted via radio to the base CUL. There are still some restrictions:
- <ul>
- <li>due to the ping both CULs have to be in SlowRF mode, and use the same
- parameters (freq, bwidth, etc).</li>
- <li>the logical module handling the protocol is not allowed to access the
- routines of the IODev (i.e. CUL) directly.</li>
- </ul>
- Tested protocols are FHT, FS20, EM, HMS, S300.<br>
- Since there is no ack or a resend mechanism, it should be primarily used to
- forward "unimportant" data, it was developed for forwading KS300 packets.
- <br><br>
- Before you can use this feature in fhem, you have to enable/configure RF
- ROUTING in both CUL's:
- <ul>
- <li>First give your base CUL (which remains connected to the PC) an RFR ID
- by issuing the fhem command "set MyCUL raw ui0100". With this command
- the base CUL will get the ID 01, and it will not relay messages to other
- CUL's (as the second number is 00).</li>
- <li>Now replace the base CUL with the RFR CUL, and set its id by issuing
- the fhem command "set MyCUL raw ui0201". Now remove this CUL and attach the
- original, base CUL again. The RFR CUL got the id 02, and will relay every
- message to the base CUL with id 01.</li>
- <li>Take the RFR CUL, and attach it to an USB power supply, as seen on
- the image. As the configured base id is not 00, it will activate RF
- reception on boot, and will start sending messages to the base CUL.</li>
- <li>Now you have to define this RFR cul as a fhem device:</li>
- </ul>
- </td><td>
- <img src="cul_rfr.jpg"/>
- </td></tr>
- </table>
- <br>
- <a name="CUL_RFRdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_RFR <own-id> <base-id></code> <br>
- <br>
- <own-id> is the id of the RFR CUL <b>not</b> connected to the PC,
- <base-id> is the id of the CUL connected to the PC. Both parameters
- have two characters, each representing a one byte hex number.<br>
- Example:
- <ul>
- <code>set MyCUL raw ui0100</code><br>
- # Now replace the base CUL with the RFR CUL<br>
- <code>set MyCUL raw ui0201</code><br>
- # Reattach the base CUL to the PC and attach the RFR CUL to a
- USB power supply<br>
- <code>define MyRFR CUL_RFR 02 01</code><br>
- </ul>
- </ul> <br>
- <a name="CUL_RFRset"></a>
- <b>Set</b> <ul>Same as for the <a href="#CULset">CUL</a>.</ul><br>
- <a name="CUL_RFRget"></a>
- <b>Get</b> <ul>Same as for the <a href="#CULget">CUL</a>.</ul><br>
- <a name="CUL_RFRattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#IODev">IODev</a></li><br>
- The rest of the attributes is the same as for the <a href="#CUL">CUL</a>.</ul><br>
- </ul>
- <br>
- <p><a name="CUL_TCM97001"></a>
- <h3>CUL_TCM97001</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_TCM97001'>DE</a>]</div>
- <ul>
- The CUL_TCM97001 module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
- <br>
- <b>Supported models:</b>
- <ul>
- <li>ABS700</li>
- <li>AURIOL</li>
- <li>Eurochron</li>
- <li>GT_WT_02</li>
- <li>KW9010</li>
- <li>NC_WS</li>
- <li>TCM21....</li>
- <li>TCM97...</li>
- <li>PFR-130 (rain)</li>
- <li>Prologue</li>
- <li>Rubicson</li>
- <li>W155 (wind/rain)</li>
- <li>W174 (rain)</li>
- </ul>
- <br>
- New received device packages are add in fhem category CUL_TCM97001 with autocreate.
- <br><br>
- <a name="CUL_TCM97001_Define"></a>
- <b>Define</b>
- <ul>The received devices created automatically.<br>
- The ID of the defive are the first two Hex values of the package as dezimal.<br>
- </ul>
- <br>
- <a name="CUL_TCM97001 Events"></a>
- <b>Generated events:</b>
- <ul>
- <li>temperature: The temperature</li>
- <li>humidity: The humidity (if available)</li>
- <li>battery: The battery state: low or ok (if available)</li>
- <li>channel: The Channelnumber (if available)</li>
- <li>trend: The temperature trend (if available)</li>
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a>
- Note: by setting this attribute you can define different sets of 8
- devices in FHEM, each set belonging to a Device which is capable of receiving the signals. It is important, however,
- that a device is only received by the defined IO Device, e.g. by using
- different Frquencies (433MHz vs 868MHz)
- </li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#model">model</a> (ABS700, AURIOL, GT_WT_02, KW9010, NC_WS, PFR-130, Prologue, Rubicson, TCM21...., TCM97�, Unknown, W174)</li>
- <li>max-deviation-temp: (default:1, allowed values: 1,2,3,4,5,6,7,8,9,10,15,20,25,30,35,40,45,50)</li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- <p><a name="CUL_TX"></a>
- <h3>CUL_TX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_TX'>DE</a>]</div>
- <ul>
- The CUL_TX module interprets TX2/TX3 type of messages received by the CUL,
- see also http://www.f6fbb.org/domo/sensors/tx3_th.php.
- This protocol is used by the La Crosse TX3-TH thermo/hygro sensor and other
- wireless themperature sensors. Please report the manufacturer/model of other
- working devices. <br><br>
- <a name="CUL_TXdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_TX <code> [corr] [minsecs]</code> <br>
- <br>
- <code> is the code of the autogenerated address of the TX device (0
- to 127)<br>
- corr is a correction factor, which will be added to the value received from
- the device.<br>
- minsecs are the minimum seconds between two log entries or notifications
- from this device. <br>E.g. if set to 300, logs of the same type will occure
- with a minimum rate of one per 5 minutes even if the device sends a message
- every minute. (Reduces the log file size and reduces the time to display
- the plots)
- </ul>
- <br>
- <a name="CUL_TXset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="CUL_TXget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="CUL_TXattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="CUL_TXevents"></a>
- <b>Generated events:</b>
- <ul>
- <li>temperature: $temp</li>
- <li>humidity: $hum</li>
- </ul>
- <br>
- </ul>
- <p><a name="CUL_WS"></a>
- <h3>CUL_WS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CUL_WS'>DE</a>]</div>
- <ul>
- The CUL_WS module interprets S300 type of messages received by the CUL.
- <br><br>
- <a name="CUL_WSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> CUL_WS <code> [corr1...corr4]</code> <br>
- <br>
- <code> is the code which must be set on the S300 device. Valid values
- are 1 through 8.<br>
- corr1..corr4 are up to 4 numerical correction factors, which will be added
- to the respective value to calibrate the device. Note: rain-values will be
- multiplied and not added to the correction factor.
- </ul>
- <br>
- <a name="CUL_WSset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="CUL_WSget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="CUL_WSattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a>
- Note: by setting this attribute you can define different sets of 8
- devices in FHEM, each set belonging to a CUL. It is important, however,
- that a device is only received by the CUL defined, e.g. by using
- different Frquencies (433MHz vs 868MHz)
- </li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#model">model</a> (S300,KS300,ASH2200)</li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="CULflash"></a>
- <h3>CULflash</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CULflash'>DE</a>]</div>
- <ul>
- <code>CULflash [fhem-device|none]; <TYPE></code> <br>
- <br>
- Download the firmware from a nightly SVN chekout and flash the
- hardware.
- Currently the CUL is supported with its versions:
- CUL_V2, CUL_V2_HM, CUL_V3, CUL_V3_ZWAVE, CUL_V4.<br>
- If the fhem-device is none, than the inserted device must already be in the
- flash-mode.<br>
- <b>Note:</b>for flashing the CUL dfu-programmer has to be installed in the
- path, this is already the case with the Fritz!Box 7390 image from
- fhem.de<br>
- Example:
- <ul>
- <code>CULflash CUL CUL_V3<br>
- CULflash none CUL_V3</code>
- </ul>
- Note: the message "dfu-programmer: failed to release interface 0." is
- normal on the FB7390.
- </ul>
- <p><a name="Calendar"></a>
- <h3>Calendar</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Calendar'>DE</a>]</div>
- <ul>
- <br>
- <a name="Calendardefine"></a>
- <b>Define</b><br><br>
- <ul>
- <code>define <name> Calendar ical url <URL> [<interval>]</code><br>
- <code>define <name> Calendar ical file <FILENAME> [<interval>]</code><br>
- <br>
- Defines a calendar device.<br><br>
- A calendar device periodically gathers calendar events from the source calendar at the given URL or from a file.
- The file must be in ICal format.<br><br>
- If the URL
- starts with <code>https://</code>, the perl module IO::Socket::SSL must be installed
- (use <code>cpan -i IO::Socket::SSL</code>).<br><br>
- Note for users of Google Calendar: You can literally use the private ICal URL from your Google Calendar.
- If your Google Calendar
- URL starts with <code>https://</code> and the perl module IO::Socket::SSL is not installed on your system, you can
- replace it by <code>http://</code> if and only if there is no redirection to the <code>https://</code> URL.
- Check with your browser first if unsure.<br><br>
- The optional parameter <code>interval</code> is the time between subsequent updates
- in seconds. It defaults to 3600 (1 hour).<br><br>
- Examples:
- <pre>
- define MyCalendar Calendar ical url https://www.google.com­/calendar/ical/john.doe%40example.com­/private-foo4711/basic.ics
- define YourCalendar Calendar ical url http://www.google.com­/calendar/ical/jane.doe%40example.com­/private-bar0815/basic.ics 86400
- define SomeCalendar Calendar ical file /home/johndoe/calendar.ics
- </pre>
- </ul>
- <br>
- <a name="Calendarset"></a>
- <b>Set </b><br><br>
- <ul>
- <code>set <name> update</code><br>
- Forces the retrieval of the calendar from the URL. The next automatic retrieval is scheduled to occur <code>interval</code> seconds later.<br><br>
- <code>set <name> reload</code><br>
- Same as <code>update</code> but all calendar events are removed first.<br><br>
- </ul>
- <br>
- <a name="Calendarget"></a>
- <b>Get</b><br><br>
- <ul>
- <code>get <name> update</code><br>
- Same as <code>set <name> update</code><br><br>
- <code>get <name> reload</code><br>
- Same as <code>set <name> update</code><br><br>
- <code>get <name> <format> <filter> [<max>]</code><br>
- Returns, line by line, information on the calendar events in the calendar <name>. The content depends on the
- <format> specifier:<br><br>
- <table>
- <tr><th><format></th><th>content</th></tr>
- <tr><td>uid</td><td>the UID of the event</td></tr>
- <tr><td>text</td><td>a user-friendly textual representation, best suited for display</td></tr>
- <tr><td>summary</td><td>the content of the summary field (subject, title)</td></tr>
- <tr><td>location</td><td>the content of the location field</td></tr>
- <tr><td>categories</td><td>the content of the categories field</td></tr>
- <tr><td>alarm</td><td>alarm time in human-readable format</td></tr>
- <tr><td>start</td><td>start time in human-readable format</td></tr>
- <tr><td>end</td><td>end time in human-readable format</td></tr>
- <tr><td>categories</td><td>the content of the categories field</td></tr>
- <tr><td>full</td><td>the full state</td></tr>
- <tr><td>debug</td><td>like full with additional information for debugging purposes</td></tr>
- </table><br>
- The <filter> specifier determines the selected subset of calendar events:<br><br>
- <table>
- <tr><th><filter></th><th>selection</th></tr>
- <tr><td>mode=<regex></td><td>all calendar events with mode matching the regular expression <regex></td></tr>
- <tr><td><mode></td><td>all calendar events in the mode <mode></td></tr>
- <tr><td>uid=<regex></td><td>all calendar events identified by UIDs that match the regular expression <regex>.</td></tr>
- <tr><td><uid></td><td>all calendar events identified by the UID <uid></td></tr>
- <tr><td><reading></td><td>all calendar events listed in the reading <reading> (modeAlarm, modeAlarmed, modeStart, etc.) - this is deprecated and will be removed in a future version, use mode=<regex> instead.</td></tr>
- <tr><td>all</td><td>all calendar events (past, current and future)</td></tr>
- <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>
- </table><br>
- The <code>mode=<regex></code> and <code>uid=<regex></code> filters should be preferred over the
- <code><mode></code> and <code><uid></code> filters.<br><br>
- The optional parameter <code><max></code> limits
- the number of returned lines.<br><br>
- See attributes <code>hideOlderThan</code> and
- <code>hideLaterThan</code> for how to return events within a certain time window.
- Please remember that the global ±400 days limits apply.<br><br>
- Examples:<br>
- <code>get MyCalendar text next</code><br>
- <code>get MyCalendar summary uid:435kjhk435googlecom 1</code><br>
- <code>get MyCalendar summary 435kjhk435googlecom 1</code><br>
- <code>get MyCalendar full all</code><br>
- <code>get MyCalendar text mode=alarm|start</code><br>
- <code>get MyCalendar text uid=.*6286.*</code><br>
- <br>
- <code>get <name> find <regexp></code><br>
- Returns, line by line, the UIDs of all calendar events whose summary matches the regular expression
- <regexp>.<br><br>
- <code>get <name> vcalendar</code><br>
- Returns the calendar in ICal format as retrieved from the source.<br><br>
- <code>get <name> vevents</code><br>
- Returns a list of all VEVENT entries in the calendar with additional information for
- debugging. Only properties that have been kept during processing of the source
- are shown. The list of calendar events created from each VEVENT entry is shown as well
- as the list of calendar events that have been omitted.
- </ul>
- <br>
- <a name="Calendarattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li><code>update sync|async|none</code><br>
- If this attribute is not set or if it is set to <code>sync</code>, the processing of
- the calendar is done in the foreground. Large calendars will block FHEM on slow
- systems. If this attribute is set to <code>async</code>, the processing is done in the
- background and FHEM will not block during updates. If this attribute is set to
- <code>none</code>, the calendar will not be updated at all.
- </li><p>
- <li><code>removevcalendar 0|1</code><br>
- If this attribute is set to 1, the vCalendar will be discarded after the processing to reduce the memory consumption of the module.
- A retrieval via <code>get <name> vcalendar</code> is then no longer possible.
- </li><p>
- <li><code>hideOlderThan <timespec></code><br>
- <code>hideLaterThan <timespec></code><br><p>
- These attributes limit the list of events shown by
- <code>get <name> full|debug|text|summary|location|alarm|start|end ...</code>.<p>
- The time is specified relative to the current time t. If hideOlderThan is set,
- calendar events that ended before t-hideOlderThan are not shown. If hideLaterThan is
- set, calendar events that will start after t+hideLaterThan are not shown.<p>
- Please note that an action triggered by a change to mode "end" cannot access the calendar event
- if you set hideOlderThan to 0 because the calendar event will already be hidden at that time. Better set
- hideOlderThan to 10.<p>
- <code><timespec></code> must have one of the following formats:<br>
- <table>
- <tr><th>format</th><th>description</th><th>example</th></tr>
- <tr><td>SSS</td><td>seconds</td><td>3600</td></tr>
- <tr><td>SSSs</td><td>seconds</td><td>3600s</td></tr>
- <tr><td>HH:MM</td><td>hours:minutes</td><td>02:30</td></tr>
- <tr><td>HH:MM:SS</td><td>hours:minutes:seconds</td><td>00:01:30</td></tr>
- <tr><td>D:HH:MM:SS</td><td>days:hours:minutes:seconds</td><td>122:10:00:00</td></tr>
- <tr><td>DDDd</td><td>days</td><td>100d</td></tr>
- </table></li>
- <p>
- <li><code>cutoffOlderThan <timespec></code><br>
- This attribute cuts off all non-recurring calendar events that ended a timespan cutoffOlderThan
- before the last update of the calendar. The purpose of setting this attribute is to save memory.
- Such calendar events cannot be accessed at all from FHEM. Calendar events are not cut off if
- they are recurring or if they have no end time (DTEND).
- </li><p>
- <li><code>onCreateEvent <perl-code></code><br>
- This attribute allows to run the Perl code <perl-code> for every
- calendar event that is created. See section <a href="#CalendarPlugIns">Plug-ins</a> below.
- </li><p>
- <li><code>SSLVerify</code><br>
- This attribute sets the verification mode for the peer certificate for connections secured by
- SSL. Set attribute either to 0 for SSL_VERIFY_NONE (no certificate verification) or
- to 1 for SSL_VERIFY_PEER (certificate verification). Disabling verification is useful
- for local calendar installations (e.g. OwnCloud, NextCloud) without valid SSL certificate.
- </li><p>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <b>Description</b>
- <ul>
- <br>
- A calendar is a set of calendar events. The calendar events are
- fetched from the source calendar at the given URL on a regular basis.<p>
- A calendar event has a summary (usually the title shown in a visual
- 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
- earliest alarm time is kept.<p>
- Recurring calendar events (series) are currently supported to an extent:
- FREQ INTERVAL UNTIL COUNT are interpreted, BYMONTHDAY BYMONTH WKST
- are recognized but not interpreted. BYDAY is correctly interpreted for weekly and monthly events.
- The module will get it most likely wrong
- if you have recurring calendar events with unrecognized or uninterpreted keywords.
- Out-of-order events and events excluded from a series (EXDATE) are handled.
- <p>
- Calendar events are created when FHEM is started or when the respective entry in the source
- calendar has changed and the calendar is updated or when the calendar is reloaded with
- <code>get <name> reload</code>.
- Only calendar events within ±400 days around the event creation time are created. Consider
- 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>
- Some dumb calendars do not use LAST-MODIFIED. This may result in modifications in the source calendar
- go unnoticed. Reload the calendar if you experience this issue.<p>
- A calendar event is identified by its UID. The UID is taken from the source calendar.
- All events in a series including out-of-order events habe the same UID.
- All non-alphanumerical characters
- are stripped off the original UID to make your life easier.<p>
- A calendar event can be in one of the following modes:
- <table>
- <tr><td>upcoming</td><td>Neither the alarm time nor the start time of the calendar event is reached.</td></tr>
- <tr><td>alarm</td><td>The alarm time has passed but the start time of the calendar event is not yet reached.</td></tr>
- <tr><td>start</td><td>The start time has passed but the end time of the calendar event is not yet reached.</td></tr>
- <tr><td>end</td><td>The end time of the calendar event has passed.</td></tr>
- </table><br>
- A calendar event transitions from one mode to another immediately when the time for the change has come. This is done by waiting
- for the earliest future time among all alarm, start or end times of all calendar events.
- <p>
- A calendar device has several readings. Except for <code>calname</code>, each reading is a semicolon-separated list of UIDs of
- calendar events that satisfy certain conditions:
- <table>
- <tr><td>calname</td><td>name of the calendar</td></tr>
- <tr><td>modeAlarm</td><td>events in alarm mode</td></tr>
- <tr><td>modeAlarmOrStart</td><td>events in alarm or start mode</td></tr>
- <tr><td>modeAlarmed</td><td>events that have just transitioned from upcoming to alarm mode</td></tr>
- <tr><td>modeChanged</td><td>events that have just changed their mode somehow</td></tr>
- <tr><td>modeEnd</td><td>events in end mode</td></tr>
- <tr><td>modeEnded</td><td>events that have just transitioned from start to end mode</td></tr>
- <tr><td>modeStart</td><td>events in start mode</td></tr>
- <tr><td>modeStarted</td><td>events that have just transitioned to start mode</td></tr>
- <tr><td>modeUpcoming</td><td>events in upcoming mode</td></tr>
- </table>
- </ul>
- <p>
- For recurring events, usually several calendar events exists with the same UID. In such a case,
- the UID is only shown in the mode reading for the most interesting mode. The most
- interesting mode is the first applicable of start, alarm, upcoming, end.<p>
- In particular, you will never see the UID of a series in modeEnd or modeEnded as long as the series
- has not yet ended - the UID will be in one of the other mode... readings. This means that you better
- do not trigger FHEM events for series based on mode... readings. See below for a recommendation.<p>
- <b>Events</b>
- <ul><br>
- When the calendar was reloaded or updated or when an alarm, start or end time was reached, one
- FHEM event is created:<p>
- <code>triggered</code><br><br>
- When you receive this event, you can rely on the calendar's readings being in a consistent and
- most recent state.<p>
- When a calendar event has changed, two FHEM events are created:<p>
- <code>changed: UID <mode></code><br>
- <code><mode>: UID</code><br><br>
- <mode> is the current mode of the calendar event after the change. Note: there is a
- colon followed by a single space in the FHEM event specification.<p>
- The recommended way of reacting on mode changes of calendar events is to get notified
- on the aforementioned FHEM events and do not check for the FHEM events triggered
- by a change of a mode reading.
- <p>
- </ul>
- <a name="CalendarPlugIns"></a>
- <b>Plug-ins</b>
- <ul>
- <br>
- This is experimental. Use with caution.<p>
- A plug-in is a piece of Perl code that modifies a calendar event on the fly. The Perl code operates on the
- hash reference <code>$e</code>. The most important elements are as follows:
- <table>
- <tr><th>code</th><th>description</th></tr>
- <tr><td>$e->{start}</td><td>the start time of the calendar event, in seconds since the epoch</td></tr>
- <tr><td>$e->{end}</td><td>the end time of the calendar event, in seconds since the epoch</td></tr>
- <tr><td>$e->{alarm}</td><td>the alarm time of the calendar event, in seconds since the epoch</td></tr>
- <tr><td>$e->{summary}</td><td>the summary (caption, title) of the calendar event</td></tr>
- <tr><td>$e->{location}</td><td>the location of the calendar event</td></tr>
- </table><br>
- To add or change the alarm time of a calendar event for all events with the string "Tonne" in the
- summary, the following plug-in can be used:<br><br>
- <code>attr MyCalendar onCreateEvent { $e->{alarm}= $e->{start}-86400 if($e->{summary} =~ /Tonne/);; }</code><br>
- <br>The double semicolon masks the semicolon. <a href="#perl">Perl specials</a> cannot be used.<br>
- </ul>
- <br><br>
- <b>Usage scenarios</b>
- <ul><br><br>
- <i>Show all calendar events with details</i><br><br>
- <ul>
- <code>
- get MyCalendar full all<br>
- 2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom alarm 31.05.2012 17:00:00 07.06.2012 16:30:00-07.06.2012 18:00:00 Erna for coffee<br>
- 992hydf4y44awer5466lhfdsr­gl7tin6b6mckf8glmhui4­googlecom upcoming 08.06.2012 00:00:00-09.06.2012 00:00:00 Vacation
- </code><br><br>
- </ul>
- <i>Show calendar events in your photo frame</i><br><br>
- <ul>
- Put a line in the <a href="#RSSlayout">layout description</a> to show calendar events in alarm or start mode:<br><br>
- <code>text 20 60 { fhem("get MyCalendar text next 2") }</code><br><br>
- This may look like:<br><br>
- <code>
- 07.06.12 16:30 Erna for coffee<br>
- 08.06.12 00:00 Vacation
- </code><br><br>
- </ul>
- <i>Switch the light on when Erna comes</i><br><br>
- <ul>
- First find the UID of the calendar event:<br><br>
- <code>
- get MyCalendar find .*Erna.*<br>
- 2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom
- </code><br><br>
- Then define a notify (the dot after the second colon matches the space):<br><br>
- <code>
- define ErnaComes notify MyCalendar:start:.2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom set MyLight on
- </code><br><br>
- You can also do some logging:<br><br>
- <code>
- define LogErna notify MyCalendar:alarm:.2767324dsfretfvds7dsfn3e4­dsa234r234sdfds6bh874­googlecom { Log3 $NAME, 1, "ALARM name=$NAME event=$EVENT part1=$EVTPART0 part2=$EVTPART1" }
- </code><br><br>
- </ul>
- <i>Switch actors on and off</i><br><br>
- <ul>
- Think about a calendar with calendar events whose summaries (subjects, titles) are the names of devices in your fhem installation.
- You want the respective devices to switch on when the calendar event starts and to switch off when the calendar event ends.<br><br>
- <code>
- define SwitchActorOn notify MyCalendar:start:.* {
- my $reading="$EVTPART0";;
- my $uid= "$EVTPART1";;
- my $actor= fhem("get MyCalendar summary $uid");;
- if(defined $actor) {
- fhem("set $actor on")
- }
- }<br><br>
- define SwitchActorOff notify MyCalendar:end:.* {
- my $reading="$EVTPART0";;
- my $uid= "$EVTPART1";;
- my $actor= fhem("get MyCalendar summary $uid");;
- if(defined $actor) {
- fhem("set $actor off")
- }
- }
- </code><br><br>
- You can also do some logging:<br><br>
- <code>
- 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" }
- </code><br><br>
- </ul>
- </ul>
- <b>Embedded HTML</b>
- <ul><br>
- The module provides an additional function <code>CalendarAsHtml(<name>,<options>)</code>. It
- returns the HTML code for a list of calendar events. <code><name></code> is the name of the
- Calendar device and <code><options></code> is what you would write after <code>get <name> text ...</code>.
- <br><br>
- Example: <code>define MyCalendarWeblink weblink htmlCode { CalendarAsHtml("MyCalendar","next 3") }</code>
- <br><br>
- This is a rudimentary function which might be extended in a future version.
- <p>
- </ul>
- </ul>
- <p><a name="ComfoAir"></a>
- <h3>ComfoAir</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ComfoAir'>DE</a>]</div>
- <ul>
- ComfoAir provides a way to communicate with ComfoAir ventilation systems from Zehnder, especially the ComfoAir 350 (CA350).
- It seems that many other ventilation systems use the same communication device and protocol,
- e.g. WHR930 from StorkAir, G90-380 from Wernig and Santos 370 DC from Paul.
- They are connected via serial line to the fhem computer.
- This module is based on the protocol description at http://www.see-solutions.de/sonstiges/Protokollbeschreibung_ComfoAir.pdf
- and copies some ideas from earlier modules for the same devices that were posted in the fhem forum from danhauck(Santos) and Joachim (WHR962).
- <br>
- The module can be used in two ways depending on how fhem and / or a vendor supplied remote control device
- like CC Ease or CC Luxe are connected to the system. If a remote control device is connected it is strongly advised that
- fhem does not send data to the ventilation system as well and only listens to the communication betweem the vendor equipment.
- 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
- collisions when sending data which can corrupt the ventilation system.
- If connected in parallel fhem should only passively listen and <Interval> is to be set to 0. <br>
- If no remote control device is connected to the ventilation systems then fhem has to take control and actively request data
- in the interval to be defined. Otherwiese fhem will not see any data. In this case fhem can also send commands to modify settings.
- <br><br>
-
- <b>Prerequisites</b>
- <ul>
- <br>
- <li>
- This module requires the Device::SerialPort or Win32::SerialPort module.
- </li>
- </ul>
- <br>
- <a name="ComfoAirDefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> ComfoAir <device> <Interval></code>
- <br><br>
- The module connects to the ventialation system through the given Device and either passively listens to data that is communicated
- between the ventialation system and its remote control device (e.g. CC Luxe) or it actively requests data from the
- ventilation system every <Interval> seconds <br>
- If <Interval> is set to 0 then no polling will be done and the module only listens to messages on the line.<br>
- <br>
- Example:<br>
- <br>
- <ul><code>define ZL ComfoAir /dev/ttyUSB1@9600 60</code></ul>
- </ul>
- <br>
- <a name="ComfoAirConfiguration"></a>
- <b>Configuration of the module</b><br><br>
- <ul>
- apart from the serial connection and the interval which both are specified in the define command there are several attributes that
- can optionally be used to modify the behavior of the module. <br><br>
- The module internally gives names to all the protocol messages that are defined in the module and these names can be used
- in attributes to define which requests are periodically sent to the ventilation device. The same nams can also be used with
- 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
- quite easy to add more protocol details if needed without programming.
-
- <br>
- The names currently defined are:
-
- <pre>
- Bootloader-Version
- Firmware-Version
- RS232-Modus
- Sensordaten
- KonPlatine-Version
- Verzoegerungen
- Ventilation-Levels
- Temperaturen
- Betriebsstunden
- Status-Bypass
- Status-Vorheizung
- </pre>
-
- The attributes that control which messages are sent / which data is requested every <Interval> seconds are:
-
- <pre>
- poll-Bootloader-Version
- poll-Firmware-Version
- poll-RS232-Modus
- poll-Sensordaten
- poll-KonPlatine-Version
- poll-Verzoegerungen
- poll-Ventilation-Levels
- poll-Temperaturen
- poll-Betriebsstunden
- poll-Status-Bypass
- poll-Status-Vorheizung
- </pre>
-
- if the attribute is set to 1, the corresponding data is requested every <Interval> seconds. If it is set to 0, then the data is not requested.
- by default Ventilation-Levels, Temperaturen and Status-Bypass are requested if no attributes are set.
- <br><br>
- Example:<br><br>
- <pre>
- define ZL ComfoAir /dev/ttyUSB1@9600 60
- attr ZL poll-Status-Bypass 0
- define FileLog_Lueftung FileLog ./log/Lueftung-%Y.log ZL
- </pre>
- </ul>
- <a name="ComfoAirSet"></a>
- <b>Set-Commands</b><br>
- <ul>
- 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:
- <pre>
- request-Status-Bypass
- request-Bootloader-Version
- request-Sensordaten
- request-Temperaturen
- request-Firmware-Version
- request-KonPlatine-Version
- request-Ventilation-Levels
- request-Verzoegerungen
- request-Betriebsstunden
- request-Status-Vorheizung
- </pre>
- additionally important fields can be set:
- <pre>
- Temp_Komfort (target temperature for comfort)
- Stufe (ventilation level)
- </pre>
- </ul>
- <a name="ComfoAirGet"></a>
- <b>Get-Commands</b><br>
- <ul>
- All readings that are derived from the responses to protocol requests 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 right field value. To avoid huge option lists in FHEMWEB, only the most important Get options
- 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
- 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
- </ul>
- <a name="ComfoAirattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <li><b>poll-Bootloader-Version</b></li>
- <li><b>poll-Firmware-Version</b></li>
- <li><b>poll-RS232-Modus</b></li>
- <li><b>poll-Sensordaten</b></li>
- <li><b>poll-KonPlatine-Version</b></li>
- <li><b>poll-Verzoegerungen</b></li>
- <li><b>poll-Ventilation-Levels</b></li>
- <li><b>poll-Temperaturen</b></li>
- <li><b>poll-Betriebsstunden</b></li>
- <li><b>poll-Status-Bypass</b></li>
- <li><b>poll-Status-Vorheizung</b></li>
- include a request for the data belonging to the named group when sending requests every interval seconds <br>
- <li><b>hide-Bootloader-Version</b></li>
- <li><b>hide-Firmware-Version</b></li>
- <li><b>hide-RS232-Modus</b></li>
- <li><b>hide-Sensordaten</b></li>
- <li><b>hide-KonPlatine-Version</b></li>
- <li><b>hide-Verzoegerungen</b></li>
- <li><b>hide-Ventilation-Levels</b></li>
- <li><b>hide-Temperaturen</b></li>
- <li><b>hide-Betriebsstunden</b></li>
- <li><b>hide-Status-Bypass</b></li>
- <li><b>hide-Status-Vorheizung</b></li>
- prevent readings of the named group from being created even if used passively without polling and an external remote control requests this data.
- please note that this attribute doesn't delete already existing readings.<br>
- <li><b>queueDelay</b></li>
- modify the delay used when sending requests to the device from the internal queue, defaults to 1 second <br>
- <li><b>queueMax</b></li>
- max length of the send queue, defaults to 50<br>
- <li><b>timeout</b></li>
- set the timeout for reads, defaults to 2 seconds <br>
- </ul>
- <br>
- </ul>
- <p><a name="CustomReadings"></a>
- <h3>CustomReadings</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#CustomReadings'>DE</a>]</div>
- <ul>
- FHEM module to define own readings.
- <br><br>
- 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>
- To use this module you should have some perl and linux knowledge<br>
- The examples presuppose that you run FHEM on a linux machine like a Raspberry Pi or a Cubietruck.<br>
- Note: the "bullshit" definition is an example to show what happens if you define bullshit :-)<br><br>
- <u>Example (definition in fhem.cfg)</u>
- <br><code>
- define myReadings CustomReadings<br>
- attr myReadings room 0-Test<br>
- attr myReadings group Readings<br>
- attr myReadings interval 2<br>
- attr myReadings readingDefinitions hdd_temperature:qx(hddtemp /dev/sda 2>&1),<br>
- ac_powersupply_voltage:qx(cat /sys/class/power_supply/ac/voltage_now 2>&1) / 1000000,<br>
- ac_powersupply_current:qx(cat /sys/class/power_supply/ac/current_now 2>&1) / 1000000,<br>
- perl_version:$],<br>
- timezone:qx(cat /etc/timezone 2>&1),<br>
- kernel:qx(uname -r 2>&1),<br>
- device_name:$hash->{NAME},<br>
- bullshit: $hash->{bullshit},<br>
- fhem_backup_folder_size:qx(du -ch /opt/fhem/backup | grep total | cut -d 't' -f1 2>&1)<br>
- <br><br>
- <b>Optionally, to display the readings:</b><br>
- define myReadingsDisplay weblink htmlCode {CustomReadings_GetHTML('myReadings')}<br>
- attr myReadingsDisplay group Readings<br>
- attr myReadingsDisplay room 0-Test<br>
- </code>
- <br>
- <u>Resulting readings:</u><br>
- <table>
- <colgroup width="250" span="3"></colgroup>
- <tr>
- <td>ac_powersupply_current</td>
- <td>0.236</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>ac_powersupply_voltage</td>
- <td>5.028</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>bullshit</td>
- <td>ERROR</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>device_name</td>
- <td>myReadings</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>fhem_backup_folder_size</td>
- <td>20M</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>hdd_temperature</td>
- <td>/dev/sda: TS128GSSD320: 47°C</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>kernel</td>
- <td>3.4.103-sun7i+</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>perl_version</td>
- <td>5.014002</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- <tr>
- <td>timezone</td>
- <td>Europe/Berlin</td>
- <td>2014-08-09 15:40:21</td>
- </tr>
- </table>
- <br>
- <a name="CustomReadings_Define"></a>
- <b>Define</b><br>
- define <name> CustomReadings<br>
- <br>
-
- <a name="CustomReadings_Readings"></a>
- <b>Readings</b><br>
- As defined
- <br><br>
- <a name="CustomReadings_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval<br>
- Refresh interval in seconds</li><br>
- <li>readingDefinitions<br>
- The definitions are separated by a comma. A definition consists of two parts, separated by a colon.<br>
- The first part is the name of the reading and the second part the function.<br>
- The function gets evaluated and must return a result.<br><br>
- Example: <code>kernel:qx(uname -r 2>&1)</code><br>
- Defines a reading with the name "kernel" and evaluates the linux function uname -r<br>
-
- Multiline output from commands, systemcall, scripts etc. can be use for more than one reading with <br>
- the keyword <code>COMBINED</code> as reading (which wont appear itself) while its command output<br>
- will be put line by line in the following readings defined (so they don't need a function defined<br>
- after the colon (it would be ignored)).But the lines given must match the number and order of the<br>
- following readings.<br><br>
-
- COMBINED can be used together or lets say after or even in between normal expressions if the<br>
- number of lines of the output matches exactly.
- Example: <code>COMBINED:qx(cat /proc/sys/vm/dirty_background*),dirty_bytes:,dirty_ration:</code><br>
- Defines two readings (dirty_bytes and dirty_ratio) which will get set by the lines of those <br>
- two files the cat command will find in the kernel proc directory.<br>
- In some cases this can give an noticeable performance boost as the readings are filled up all at once.
- </li>
- </ul><br>
- </ul>
- <p><a name="DBPlan"></a>
- <h3>DBPlan</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DBPlan'>DE</a>]</div>
- <ul>
- The module fetches from the info page of the DB <https://reiseauskunft.bin.de/bin/query.exe/dox?S=departure&Z=destination&start=1&rt=1>
- up-to-date information on a specified connection and stores it in Fhem readings.
- The file with the IBNR codes and stations of Deutsche Bahn can be download at http://www.michaeldittrich.de/ibnr.
- <br><br>
- <b>Prerequisites</b>
- <ul>
- <br>
- <li>
- This Module uses the non blocking HTTP function HttpUtils_NonblockingGet provided by FHEM's HttpUtils in a new Version published in December 2013.<br>
- If the module is not already present in your Fhem environment, please update FHEM via the update command.<br>
- </li>
-
- </ul>
- <br>
- State will show the device status (DevState):
- <ul>
- <li><b>initialized</b></li>
- the device is defined, but no successfully requests and parsing has been done<br>
- this state will also be set when changing from <inactive> to <active> and <disabled> to <enabled><br>
- <li><b>active</b></li>
- the device is working<br>
- <li><b>stopped</b></li>
- the device timer has been stopped. A reread is possibel<br>
- <li><b>disabled</b></li>
- the device is disabled.<br>
- </ul>
- <br>
- <a name="DBPlandefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> DBPlan <Refresh interval in seconds [time offset in minutes]></code>
- <br><br>
- The module connects to the given URL every Interval seconds and then parses the response. If time_offset is
- defined, the moudules uses the actual time + time_offset as start point<br>
- <br>
- Example:<br>
- <br>
- <ul><code>define DBPlan_Test DBPlan 60</code></ul>
- </ul>
- <br>
- <a name="DBPlanconfiguration"></a>
- <b>Configuration of DBPlan</b><br><br>
- <ul>
- Example for a timetable query:<br><br>
- <ul><code>
- attr DB_Test dbplan_station Köln-Weiden West
- attr DB_Test dbplan_destination Köln HBF
- attr DB_Test room OPNV
- </code></ul>
- </ul>
- <br>
- <a name="DBPlanset"></a>
- <b>Set-Commands</b><br>
- <ul>
- <li><b>interval</b></li>
- set new interval time in seconds for parsing the DB time table<br>
- <li><b>timeOffset</b></li>
- Start of search: actual time plus time_offset.<br>
- <li><b>reread</b></li>
- reread and parse the DB time table. Only active, if not DevState: disabled<br>
- <li><b>stop</b></li>
- stop interval timer, only active if DevState: active<br>
- <li><b>start</b></li>
- restart interval timer, only active if DevState: stopped<br>
- </ul>
- <br>
- <a name="DBPlanget"></a>
- <b>Get-Commands</b><br>
- <ul>
- <li><b>PlainText</b></li>
- the informations will be shown as plain text<br>
- <li><b>searchStation</b></li>
- search for a german DB Station. Without search pattern all stations will be shown.<br>
- </ul>
- <br>
- <a name="DBPlanattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <li><b>dbplan_station</b></li>
- place of departure<br>
- <li><b>dbplan_destination</b></li>
- place of destination<br>
- <li><b>dbplan_via_1</b></li>
- DB first via station<br>
- <li><b>dbplan_via_2</b></li>
- DB second via station<br>
- <li><b>dbplan_journey_prod</b></li>
- DB travel products like: ICE<br>
- <li><b>dbplan_journey_opt</b></li>
- DB journey options like: direct connection<br>
- <li><b>dbplan_tariff_class</b></li>
- DB tariff class: 1 or 2 class<br>
- <li><b>dbplan_board_type</b></li>
- DB board type: departure or arrival (depart / arrive)<br>
- <li><b>dbplan_delayed_Journey</b></li>
- DB delayed journey: on or off<br>
- <li><b>dbplan_max_Journeys</b></li>
- Number of displayed train connections in the station view.<br>
- <li><b>dbplan_reg_train</b></li>
- The train designation, e.g. S for everything S- and streetcars, ICE all ICE or ICE with train number.<br>
- <li><b>dbplan_travel_date</b></li>
- Define the date of travel in dd.mm.yy. Default: actual date.<br>
- <li><b>dbplan_travel_time</b></li>
- Define the time of travel in hh:mm. Default: actual time.<br>
- <li><b>dbplan_addon_options</b></li>
- extended options like discribed in the api document: <li><a http://webcache.googleusercontent.com/search?q=cache:wzb_OlIUCBQJ:www.geiervally.lechtal.at/sixcms/media.php/1405/Parametrisierte%2520%25DCbergabe%2520Bahnauskunft(V%25205.12-R4.30c,%2520f%25FCr.pdf+&cd=3&hl=de&ct=clnk&gl=de
- ">Parametrisierte ����bergabe Bahnauskunft</a></li><br>
- <br>
- <li><b>Attributes controlling the behavior:</b></li>
- <li><b>dbplan-disable</b></li>
- If set to 1 polling of DB Url will be stopped, setting to 0 or deleting will activate polling<br>
- <li><b>dbplan-reading-deselect </b></li>
- deselecting of readings<br>
- <li><b>dbplan-default-char</b></li>
- Define a string which will be displayed if no information is available. Defaultstring: "none"<br>
- When defined the special string "delete" the raeding will not be filled and is not available since an information excists<br>
- When defined the special string "nochar" the raeding will be filled with " "<br>
- <li><b>dbplan-tabel-headers</b></li>
- internal attribute to change the header information used by HTML::TableExtract<br>
- <li><b>dbplan-station-file</b></li>
- Directory and name of the station table to be used: /opt/fhem/FHEM/deutschland_bhf.csv<br>
- This table is to be used as a help for the search for railway stations and has no other function in the module.<br>
- <li><b>dbplan-base-type</b></li>
- Select whether a station table (table) or a timetable (plan) display is to be generated<br>
- <br>
- <li><b>HTTPMOD attributes, have a look at the documentation</b></li>
- <li><b>dbplan-remote-timeout</b></li>
- <li><b>dbplan-remote-noshutdown</b></li>
- <li><b>dbplan-remote-loglevel</b></li>
- <li><b>dbplan-remote-buf</b></li>
- </ul>
- <br>
- <a name="DBPlanReadings"></a>
- <b>Readings</b><br><br>
- <ul>
- <li><a href="#internalReadings">internalReadings</a></li>
- <br>
- <li><b>plan_departure_(1..3)</b></li>
- time of departure<br>
- <li><b>plan_arrival_(1..3)</b></li>
- time of arrival<br>
- <li><b>plan_connection_(1..3)</b></li>
- type of connection<br>
- <li><b>plan_departure_delay_(1..3)</b></li>
- delay time for departure<br>
- <li><b>plan_arrival_delay_(1..3)</b></li>
- delay time for arrival<br>
- <li><b>plan_travel_duration_(1..3)</b></li>
- travel duration time<br>
- <li><b>plan_travel_change_(1..3)</b></li>
- travel plattform changings<br>
- <br>
- <li><b>travel_departure_(1..3)</b></li>
- informations about the departure and the plattform, if available<br>
- <li><b>travel_destination_(1..3)</b></li>
- informations about the destination and the plattform, if available<br>
- <li><b>travel_price_(1..3)</b></li>
- travel price in EUR<br>
- <br>
- <li><b>travel_error_(1..3)</b></li>
- error information when calling the note url<br>
- <li><b>travel_note_(1..3)</b></li>
- travel note for travel plan<br>
- <li><b>travel_note_link_(1..3)</b></li>
- travel note link for further informations<br>
- <li><b>travel_note_text_(1..3)</b></li>
- travel note text<br>
- </ul>
- </ul>
- <p><a name="DFPlayerMini"></a>
- <h3>DFPlayerMini - FN-M16P Embedded MP3 Audio Module</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DFPlayerMini'>DE</a>]</div>
- This module integrates the <a href="http://www.flyrontech.com/eproducts/84.html">DFPlayerMini - FN-M16P Embedded MP3 Audio Module device</a> into fhem.
- See the <a href="http://www.flyrontech.com/edownload/6.html">datasheet</a> of the module for technical details.
- <br>
- The MP3 player can be connected directly to a serial interface or via ethernet/WiFi by using a hardware with offers a transparent
- serial bridge over TCP/IP like <a href="http://www.letscontrolit.com/wiki/index.php/Ser2Net">ESPEasy Ser2Net</a>.
- <br><br>
- It is also possible to use other fhem transport devices like <a href="#MYSENSORS">MYSENSORS</a>.
- <br><br>
- The module supports all commands of the DFPlayer and offers additional convenience functions like
- <ul>
- <li>integration of <a href="#Text2Speech">Text2Speech</a> for easy download of speech mp3 files</li>
- <li>easier control of which file to play by</li>
- <li>keeping a reference of all files the DFPlayer can play</li>
- <li>playing several files in succession (playlist)</li>
- <li>creating and playing files for speaking numbers</li>
- </ul>
- <br>
- <a name="DFPlayerMinidefine"></a>
- <b>Define</b><br>
- <code>define <name> DFPlayerMini {none | devicename[\@baudrate] | devicename\@directio | hostname:port} </code>
- <br>
- <ul>
- <li>
- If directly connected <devicename> specifies the serial port to communicate with the DFPlayer Mini.
- The name of the serial-device depends on your distribution, under
- linux the cdc_acm kernel module is responsible, and usually a
- /dev/ttyACM0 or /dev/ttyUSB0 device will be created.
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyACM0@9600<br><br>This is also the default baudrate and normally shouldn't be changed
- as the DFPlayer uses a fixed baudrate of 9600.
- If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
- perl module Device::SerialPort is not needed, and fhem opens the device
- with simple file io. This might work if the operating system uses sane
- defaults for the serial parameters, e.g. some Linux distributions and
- OSX. <br>
- </li>
- <li>
- If connected via TCP/IP <hostname:port> specifies the IP address and port of the device that provides the transparent serial
- bridge to the DFP, e.g. 192.168.2.28:23
- </li>
- <li>
- 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
- from the DFP should be given to this module with <code>set response</code>.
- </li>
- </ul>
- <br>
- <a name="DFPlayerMiniattr"></a>
- <b>Attributes</b>
- <ul>
- <li>TTSDev<br>
- The name of a Text2Speech device. This has to be defined beforehand with none as the <alsadevice> as a server device. It should be used for no other purposes
- than use by this module.
- </li>
- <li>requestAck<br>
- 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
- 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
- acknowledged by the DFPlayer. This ensures that no command is lost if the the DFPlayer is busy/sleeping.
- </li>
- <li>sendCmd<br>
- 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.
- This can be used integrate other transport devices than those supported natively.<br>
- E. g. to communicate via a MySensors device named mys_dfp with an appropriate sketch use <br>
- <code>
- attr <dfp> sendCmd set mys_dfp value11 $msg
- </code><br>
- The module will then send a command to the DFP replacing $msg with the actual payload using the fhem command
- <code>
- set mys_dfp value11 <payload>
- </code>
- <br>
- See <code>set response</code> for a way to get the response of the DFPlayer received via a different device back into this module.
- </li>
- <li>uploadPath<br>
- 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.
- The device expects the files with specific names and in specific folders, see the datasheet for details.
- Copying the files can also be done by this module if the storage device is accessible by the computer fhem is running on.
- It has to be mounted in a specific path with is specified with this attribute.
- <br>
- See uploadTTS, uploadTTScache and readFiles commands where this is used.
- </li>
- <li>rememberMissingTTS<br>
- If set <code>tts</code> commands without a matching file create a special reading. See <code>set tts</code> and <code>set uploadTTScache</code>.
- </li>
- <li>keepAliveInterval<br>
- 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>
- After three missing answers the status of the devices is set to disconnected.<br>
- Set the interval to 0 to disable the keep alive feature. Default is 60 seconds.
- </li>
- </ul>
- <a name="DFPlayerMiniget"></a>
- <br>
- <b>Get</b>
- <br><br>
- All query commands supported by the DFP have a corresponding get command:
- <table>
- <tr><th>get</th><th>DFP cmd byte</th><th>parameters</th><th>comment</th></tr>
- <tr><td>storage</td><td>0x3F</td><td></td><td></td></tr>
- <tr><td>status</td><td>0x42</td><td></td><td></td></tr>
- <tr><td>volume</td><td>0x43</td><td></td><td></td></tr>
- <tr><td>equalizer</td><td>0x44</td><td></td><td></td></tr>
- <tr><td>noTracksRootUsb</td><td>0x47</td><td></td><td></td></tr>
- <tr><td>noTracksRootSd</td><td>0x48</td><td></td><td></td></tr>
- <tr><td>currentTrackUsb</td><td>0x4B</td><td></td><td></td></tr>
- <tr><td>currentTrackSd</td><td>0x4C</td><td></td><td></td></tr>
- <tr><td>noTracksInFolder</td><td>0x4E</td><td>folder number</td><td>1-99</td></tr>
- <tr><td>noFolders</td><td>0x4F</td><td></td><td></td></tr>
- </table>
- <a name="DFPlayer Miniset"></a>
- <br>
- <b>Set</b>
- <br><br>
- All commands supported by the DFP have a corresponding set command:
- <br>
- <table>
- <tr><th>set</th><th>DFP cmd byte</th><th>parameters</th><th>comment</th></tr>
- <tr><td>next</td><td>0x01</td><td>-</td><td></td></tr>
- <tr><td>prev</td><td>0x02</td><td>-</td><td></td></tr>
- <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>
- <tr><td>volumeUp</td><td>0x04</td><td>-</td><td></td></tr>
- <tr><td>volumeDown</td><td>0x05</td><td>-</td><td></td></tr>
- <tr><td>volumeStraight</td><td>0x06</td><td>volume</td><td>0-30</td></tr>
- <tr><td>equalizer</td><td>0x07</td><td>name of the equalizer mode</td><td>Normal, Pop, Rock, Jazz, Classic, Bass</td></tr>
- <tr><td>repeatSingle</td><td>0x08</td><td>-</td><td></td></tr>
- <tr><td>storage</td><td>0x09</td><td>SD or USB</td><td></td></tr>
- <tr><td>sleep</td><td>0x0A</td><td>-</td><td>not supported by DFP, DFP needs power cycle to work again</td></tr>
- <tr><td>wake</td><td>0x0B</td><td>-</td><td>not supported by DFP, but probably by FN-M22P</td></tr>
- <tr><td>reset</td><td>0x0C</td><td>-</td><td></td></tr>
- <tr><td>play</td><td>0x0D</td><td>-</td><td>plays the current track</td></tr>
- <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.
- Files can be specified with either their reading name, reading value or folder name/track number.
- See set readFiles</td></tr>
- <tr><td>pause</td><td>0x0E</td><td>-</td><td></td></tr>
- <tr><td>amplification</td><td>0x10</td><td>level of amplification</td><td>0-31</td></tr>
- <tr><td>repeatRoot</td><td>0x11</td><td>on, off</td><td></td></tr>
- <tr><td>MP3TrackNum</td><td>0x12</td><td>tracknumber</td><td>1-3000, from folder MP3</td></tr>
- <tr><td>intercutAdvert</td><td>0x13</td><td>tracknumber</td><td>1-3000, from folder ADVERT</td></tr>
- <tr><td>folderTrackNum</td><td>0x0F</td><td>foldernumber tracknumber</td><td>folder: 1-99, track: 1-255</td></tr>
- <tr><td>folderTrackNum3000</td><td>0x14</td><td>foldernumber tracknumber</td><td>folder: 1-15, track: 1-3000</td></tr>
- <tr><td>stopAdvert</td><td>0x15</td><td>-</td><td></td></tr>
- <tr><td>stop</td><td>0x16</td><td>-</td><td></td></tr>
- <tr><td>repeatFolder</td><td>0x17</td><td>number of folder</td><td>1-99</td></tr>
- <tr><td>shuffle</td><td>0x18</td><td>-</td><td></td></tr>
- <tr><td>repeatCurrentTrack</td><td>0x19</td><td>on, off</td><td></td></tr>
- <tr><td>DAC</td><td>0x1A</td><td>on, off</td><td></td></tr>
- </table>
- <br>
- All other set commands are not sent to the DFP but offer convenience functions:
- <br>
- <ul>
- <li>
- close
- </li>
- <li>
- raw <br>sends a command encoded in hex directly to the DFP without any validation
- </li>
- <li>
- reopen
- </li>
- <li>
- 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)
- a reading is created for the file. The reading name is File_<folder>/<tracknumber>. Folder can be ., MP3, ADVERT, 00 to 99.
- The reading value is the filename without the tracknumber and suffix.<br>
- Example:<br>
- For the file MP3/0003SongTitle.mp3 the reading File_MP3/0003 with value SongTitle is created.
- <br>
- The <code>set <dfp> play</code> command can make use of these readings, i.e. it is possible to use either <code>set <dfp> play File_MP3/0003</code>,
- <code>set <dfp> play MP3/3</code> or <code>set <dfp> play SongTitle</code> to play the same track.
- </li>
- <li>
- uploadTTS <destination path> <Text to translate to speech><br>
- 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
- destination path within uploadPath.
- <br>
- Examples:<br>
- <code>set <dfp> 01/0001Test Dies ist ein Test</code><br>
- <code>set <dfp> ADVERT/0099Hinweis Achtung</code>
- </li>
- <li>
- uploadTTScache<br>
- upload all files from the cache directory of the <code>TTSDev</code> to <code>uploadPath</code>. Uploading starts with folder 01. After 3000 files
- 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.
- </li>
- <li>
- tts <text to translate to speech><br>
- <code>TTSDev</code> is used to calculate the MD5 hash of <text to translate to speech>. It then tries to play the file with this hash value.
- 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
- value is created.
- <br>Prerequisites:<br>
- This only works if this text had been translated earlier and the resulting mp3 file was stored in the cache directory of TTSDev.
- The files in the cache have to be uploaded to the storage card with <code>set uploadTTScache</code>.
- </li>
- <li>
- uploadNumbers destinationFolder<br>
- creates mp3 files for all tokens required to speak arbitrary german numbers. <br>
- Example:<br>
- <code>set <dfp> uploadNumbers 99</code>
- <br>
- creates the 31 mp3 files required in folder 99.
- </li>
- <li>
- sayNumber number<br>
- translates a number into speech and plays the required tracks. Requires that uploadNumbers command was used to create the speech files.
- <br>
- Example:
- <br>
- <code>sayNumber -34.7</code>
- <br>
- is equivalent to
- <br>
- <code>play minus vier und dreissig komma sieben</code>
- </li>
- <li>
- response<br> 10 bytes response message from DFP encoded as hex
- </li>
- </ul>
- <p><a name="DLNARenderer"></a>
- <h3>DLNARenderer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DLNARenderer'>DE</a>]</div>
- <ul>
- DLNARenderer automatically discovers all your MediaRenderer devices in your local network and allows you to fully control them.<br>
- It also supports multiroom audio for Caskeid and Bluetooth Caskeid speakers (e.g. MUNET).<br><br>
- <b>Note:</b> The followig libraries are required for this module:
- <ul><li>SOAP::Lite</li> <li>LWP::Simple</li> <li>XML::Simple</li> <li>XML::Parser::Lite</li> <li>LWP::UserAgent</li><br>
- </ul>
- <a name="DLNARendererdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> DLNARenderer</code>
- <br><br>
- Example:
- <ul>
- <code>define dlnadevices DLNARenderer</code><br>
- After about 2 minutes you can find all automatically created DLNA devices under "Unsorted".<br/>
- </ul>
- </ul>
- <br>
- <a name="DLNARendererset"></a>
- <b>Set</b>
- <ul>
- <br><code>set <name> stream <value></code><br>
- Set any URL to play.
- </ul>
- <ul>
- <br><code>set <name> on</code><br>
- Starts playing the last stream (reading stream).
- </ul>
- <ul>
- <br><code>set <name> off</code><br>
- Sends stop command to device.
- </ul>
- <ul>
- <br><code>set <name> stop</code><br>
- Stop playback.
- </ul>
- <ul>
- <br><code>set <name> volume 0-100</code><br>
- <code>set <name> volume +/-0-100</code><br>
- Set volume of the device.
- </ul>
- <ul>
- <br><code>set <name> channel 1-10</code><br>
- Start playing channel X which must be configured as channel_X attribute first.<br>
- You can specify your channel also in DIDL-Lite XML format if your player doesn't support plain URIs.
- </ul>
- <ul>
- <br><code>set <name> mute on/off</code><br>
- Mute the device.
- </ul>
- <ul>
- <br><code>set <name> pause</code><br>
- Pause playback of the device. No toggle.
- </ul>
- <ul>
- <br><code>set <name> pauseToggle</code><br>
- Toggle pause/play for the device.
- </ul>
- <ul>
- <br><code>set <name> play</code><br>
- Initiate play command. Only makes your player play if a stream was loaded (currentTrackURI is set).
- </ul>
- <ul>
- <br><code>set <name> next</code><br>
- Play next track.
- </ul>
- <ul>
- <br><code>set <name> previous</code><br>
- Play previous track.
- </ul>
- <ul>
- <br><code>set <name> seek <seconds></code><br>
- Seek to position of track in seconds.
- </ul>
- <ul>
- <br><code>set <name> speak "This is a test. 1 2 3."</code><br>
- Speak the text followed after speak within quotes. Works with Google Translate.
- </ul>
- <ul>
- <br><code>set <name> playEverywhere</code><br>
- Only available for Caskeid players.<br>
- Play current track on all available Caskeid players in sync.
- </ul>
- <ul>
- <br><code>set <name> stopPlayEverywhere</code><br>
- Only available for Caskeid players.<br>
- Stops multiroom audio.
- </ul>
- <ul>
- <br><code>set <name> addUnit <unitName></code><br>
- Only available for Caskeid players.<br>
- Adds unit to multiroom audio session.
- </ul>
- <ul>
- <br><code>set <name> removeUnit <unitName></code><br>
- Only available for Caskeid players.<br>
- Removes unit from multiroom audio session.
- </ul>
- <ul>
- <br><code>set <name> multiRoomVolume 0-100</code><br>
- <code>set <name> multiRoomVolume +/-0-100</code><br>
- Only available for Caskeid players.<br>
- Set volume of all devices within this session.
- </ul>
- <ul>
- <br><code>set <name> enableBTCaskeid</code><br>
- Only available for Caskeid players.<br>
- Activates Bluetooth Caskeid for this device.
- </ul>
- <ul>
- <br><code>set <name> disableBTCaskeid</code><br>
- Only available for Caskeid players.<br>
- Deactivates Bluetooth Caskeid for this device.
- </ul>
- <ul>
- <br><code>set <name> stereo <left> <right> <pairName></code><br>
- Only available for Caskeid players.<br>
- Sets stereo mode for left/right speaker and defines the name of the stereo pair.
- </ul>
- <ul>
- <br><code>set <name> standalone</code><br>
- Only available for Caskeid players.<br>
- Puts the speaker into standalone mode if it was member of a stereo pair before.
- </ul>
- <ul>
- <br><code>set <name> saveGroupAs <groupName></code><br>
- Only available for Caskeid players.<br>
- Saves the current group configuration (e.g. saveGroupAs LivingRoom).
- </ul>
- <ul>
- <br><code>set <name> loadGroup <groupName></code><br>
- Only available for Caskeid players.<br>
- Loads the configuration previously saved (e.g. loadGroup LivingRoom).
- </ul>
- <br>
-
- <a name="DLNARendererattr"></a>
- <b>Attributes</b>
- <ul>
- <br><code>ignoreUDNs</code><br>
- Define list (comma or blank separated) of UDNs which should prevent automatic device creation.<br>
- It is important that uuid: is also part of the UDN and must be included.
- </ul>
- </ul>
- <p><a name="DOIF"></a>
- <h3>DOIF</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DOIF'>DE</a>]</div>
- <ul>
- DOIF is a universal module. It works event- and time-controlled.<br>
- <br>
- It combines the functionality of a notify, at-, watchdog command with logical queries.<br>
- <br>
- 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>
- <br>
- Logical queries are created in conditions using Perl operators.
- These are combined with information from states, readings, internals of devices or times in square brackets.
- Arbitrary Perl functions can also be specified that are defined in FHEM.
- The module is triggered by time or by events information through the Devices specified in the condition.
- If a condition is true, the associated FHEM- or Perl commands are executed.<br>
- <br>
- Syntax:<br>
- <br>
- <code>define <name> DOIF (<condition>) (<commands>) DOELSEIF (<condition>) (<commands>) DOELSEIF ... DOELSE (<commands>)</code><br>
- <br>
- 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>
- <br>
- <b>Features</b><br>
- <ol><br>
- + intuitive syntax, as used in branches (if - elseif-....elseif - else) in higher-level languages<br>
- + in the condition of any logical queries can be made as well as perl functions are used (full perl support)<br>
- + it can be any FHEM commands and perl commands are executed<br>
- + syntax checking at the time of definition are identified missing brackets<br>
- + status is specified with <code>[<devicename>]</code>, readings with <code>[<devicename>:<readingname>]</code> or internals with <code>[<devicename>:&<internal>]</code><br>
- + time information on the condition: <code>[HH:MM:SS]</code> or <code>[HH:MM]</code> or <code>[<seconds>]</code><br>
- + indirect time on the condition: <code>[[<devicename>]]</code> or <code>[[<devicename>:<readingname>]]</code> or <code>[{<perl-function>}]</code><br>
- + time calculation on the condition: <code>[(<time calculation in Perl with time syntax specified above>)]</code><br>
- + time intervals: <code>[<begin>-<end>]</code> for <code><begin></code> and <code><end></code>, the above time format can be selected.<br>
- + relative times preceded by a plus sign <code>[+<time>]</code> or <code>[+<begin>-+<end>]</code> combined with Perl functions<br>
- + weekday control: <code>[<time>|012345678]</code> or <code>[<begin>-<end>|012345678]</code> (0-6 corresponds to Sunday through Saturday) such as 7 for $we and 8 for !$we<br>
- + statuses, readings, internals und time intervals for only queries without trigger with [?...]<br>
- + DOELSEIF cases and DOELSE at the end are optional<br>
- + delay specification with resetting is possible (watchdog function)<br>
- + the execution part can be left out in each case. So that the module can be used for pure status display.<br>
- + definition of the status display with use of any readings or statuses<br>
- </ol><br>
- <br>
- Many examples with english identifiers - see <a href="http://fhem.de/commandref_DE.html#DOIF">german section</a>.
- <br>
- </ul>
- <p><a name="DOIFtools"></a>
- <h3>DOIFtools</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DOIFtools'>DE</a>]</div>
- <ul>
- DOIFtools contains tools to support DOIF.<br>
- <br>
- <ul>
- <li>create readingsGroup definitions for labeling frontend widgets.</li>
- <li>create a debug logfile for some DOIF and quoted devices with optional device listing each state or wait timer update.</li>
- <li>optional device listing in debug logfile each state or wait timer update.</li>
- <li>navigation between device listings in logfile if opened via DOIFtools.</li>
- <li>create userReadings in DOIF devices displaying real dates for weekday restricted timer.</li>
- <li>delete user defined readings in DOIF devices with multiple choice.</li>
- <li>delete visible readings in other devices with multiple choice, but not <i>state</i>.</li>
- <li>record statistics data about events.</li>
- <li>limitting recordig duration.</li>
- <li>generate a statistics report.</li>
- <li>lists every DOIF definition in <i>probably associated with</i>.</li>
- <li>access to DOIFtools from any DOIF device via <i>probably associated with</i></li>
- <li>access from DOIFtools to existing DOIFtoolsLog logfiles</li>
- <li>show event monitor in device detail view and optionally in DOIFs detail view</li>
- <li>convert events to DOIF operands, a selected operand is copied to clipboard and the DEF editor will open</li>
- <li>check definitions and offer recommendations</li>
- <li>create shortcuts</li>
- <li>optionally create a menu entry</li>
- <li>show a list of running wait timer</li>
- <li>scale values to color numbers and RGB values for coloration</li>
- </ul>
- <br>
- Just one definition per FHEM-installation is allowed. <a href="https://fhem.de/commandref_DE.html#DOIFtools">More in the german section.</a>
- <br>
- </ul>
- <p><a name="DUOFERN"></a>
- <h3>DUOFERN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DUOFERN'>DE</a>]</div>
- <ul>
- Support for DuoFern devices via the <a href="#DUOFERNSTICK">DuoFern USB Stick</a>.<br>
- <br><br>
- <a name="DUOFERN_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> DUOFERN <code></code>
- <br><br>
- <code> specifies the radio code of the DuoFern device<br><br>
- Example:<br>
- <ul>
- <code>define myDuoFern DUOFERN 49ABCD</code><br>
- </ul>
- </ul>
- <br>
- <a name="DUOFERN_set"></a>
- <b>Set</b>
- <ul>
-
- <b>Universal commands (available to most actors):</b><br><br>
- <ul>
-
- <li><b>remotePair</b><br>
- Activates the pairing mode of the actor.<br>
- Some actors accept this command in unpaired mode up to two hours afte power up.
- </li><br>
- <li><b>remoteUnpair</b><br>
- Activates the unpairing mode of the actor.
- </li><br>
- <li><b>getStatus</b><br>
- Sends a status request message to the DuoFern device.
- </li><br>
- <li><b>manualMode [on|off]</b><br>
- Activates the manual mode. If manual mode is active
- all automatic functions will be ignored.
- </li><br>
- <li><b>timeAutomatic [on|off]</b><br>
- Activates the timer automatic.
- </li><br>
- <li><b>sunAutomatic [on|off]</b><br>
- Activates the sun automatic.
- </li><br>
- <li><b>dawnAutomatic [on|off]</b><br>
- Activates the dawn automatic.
- </li><br>
- <li><b>duskAutomatic [on|off]</b><br>
- Activates the dusk automatic.
- </li><br>
- <li><b>dusk</b><br>
- Move roller shutter downwards or switch on switch/dimming actor
- if duskAutomatic is activated.
- </li><br>
- <li><b>dawn</b><br>
- Move roller shutter upwards or switch off switch/dimming actor
- if dawnAutomatic is activated.
- </li><br>
- <li><b>sunMode [on|off]</b><br>
- Activates the sun mode. If sun automatic is activated,
- the roller shutter will move to the sunPosition or a switch/dimming
- actor will shut off.
- </li><br>
- <li><b>reset [settings|full]</b><br>
- settings: Clear all settings and endpoints of the actor.<br>
- full: Complete reset of the actor including pairs.
- </li><br>
-
- </ul>
- <b>Roller shutter actor commands:</b><br><br>
- <ul>
-
- <li><b>up [timer]</b><br>
- Move the roller shutter upwards. If parameter <b>timer</b> is used the command will
- only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>down [timer]</b><br>
- Move the roller shutter downwards. If parameter <b>timer</b> is used the command will
- only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>stop</b><br>
- Stop motion.
- </li><br>
- <li><b>position <value> [timer]</b><br>
- Set roller shutter to a desired absolut level. If parameter <b>timer</b> is used the
- command will only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>toggle</b><br>
- Switch the roller shutter through the sequence up/stop/down/stop.
- </li><br>
- <li><b>rainAutomatic [on|off]</b><br>
- Activates the rain automatic.
- </li><br>
- <li><b>windAutomatic [on|off]</b><br>
- Activates the wind automatic.
- </li><br>
- <li><b>sunPosition <value></b><br>
- Set the sun position.
- </li><br>
- <li><b>ventilatingMode [on|off]</b><br>
- Activates the ventilating mode. If activated, the roller
- shutter will stop on ventilatingPosition when moving down.
- </li><br>
- <li><b>ventilatingPosition <value></b><br>
- Set the ventilating position.
- </li><br>
- <li><b>windMode [on|off]</b><br>
- Activates the wind mode. If wind automatic and wind mode is
- activated, the roller shutter moves in windDirection and ignore any automatic
- or manual command.<br>
- The wind mode ends 15 minutes after last activation automatically.
- </li><br>
- <li><b>windDirection [up|down]</b><br>
- Movemet direction for wind mode.
- </li><br>
- <li><b>rainMode [on|off]</b><br>
- Activates the rain mode. If rain automatic and rain mode is
- activated, the roller shutter moves in rainDirection and ignore any automatic
- command.<br>
- The rain mode ends 15 minutes after last activation automatically.
- </li><br>
- <li><b>rainDirection [up|down]</b><br>
- Movemet direction for rain mode.
- </li><br>
- <li><b>runningTime <sec></b><br>
- Set the motor running time.
- </li><br>
- <li><b>motorDeadTime [off|short|long]</b><br>
- Set the motor dead time.
- </li><br>
- <li><b>reversal [on|off]</b><br>
- Reversal of direction of rotation.
- </li><br>
-
- </ul>
- <b>Switch/dimming actor commands:</b><br><br>
- <ul>
-
- <li><b>on [timer]</b><br>
- Switch on the actor. If parameter <b>timer</b> is used the command will
- only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>off [timer]</b><br>
- Switch off the actor. If parameter <b>timer</b> is used the command will
- only be executed if timeAutomatic is activated.
- </li><br>
- <li><a href="#setExtensions">set extensions</a> are supported.
- </li><br>
- <li><b>level <value> [timer]</b><br>
- Set actor to a desired absolut level. If parameter <b>timer</b> is used the
- command will only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>modeChange [on|off]</b><br>
- Inverts the on/off state of a switch actor or change then modus of a dimming actor.
- </li><br>
- <li><b>stairwellFunction [on|off]</b><br>
- Activates the stairwell function of a switch/dimming actor.
- </li><br>
- <li><b>stairwellTime <sec></b><br>
- Set the stairwell time.
- </li><br>
-
- </ul>
- <b>Blind actor commands:</b><br><br>
- <ul>
-
- <li><b>blindsMode [on|off]</b><br>
- Activates the blinds mode.
- </li><br>
- <li><b>slatPosition <value></b><br>
- Set the slat to a desired absolut level.
- </li><br>
- <li><b>defaultSlatPos <value></b><br>
- Set the default slat position.
- </li><br>
- <li><b>slatRunTime <msec></b><br>
- Set the slat running time.
- </li><br>
- <li><b>tiltInSunPos [on|off]</b><br>
- Tilt slat after blind moved to sun position.
- </li><br>
- <li><b>tiltInVentPos [on|off]</b><br>
- Tilt slat after blind moved to ventilation position.
- </li><br>
- <li><b>tiltAfterMoveLevel [on|off]</b><br>
- Tilt slat after blind moved to an absolute position.
- </li><br>
- <li><b>tiltAfterStopDown [on|off]</b><br>
- Tilt slat after stopping blind while moving down.
- </li><br>
-
- </ul>
- <b>Thermostat commands:</b><br><br>
- <ul>
- <li><b>desired-temp <temp> [timer]</b><br>
- Set desired temperature. <temp> must be between -40 and 80
- Celsius, and precision is half a degree. If parameter <b>timer</b>
- is used the command will only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>tempUp [timer]</b><br>
- Increases the desired temperature by half a degree. If parameter <b>timer</b>
- is used the command will only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>tempDown [timer]</b><br>
- Decrease the desired temperature by half a degree. If parameter <b>timer</b>
- is used the command will only be executed if timeAutomatic is activated.
- </li><br>
- <li><b>temperatureThreshold[1|2|3|4] <temp></b><br>
- Set temperature threshold 1 to 4. <temp> must be between -40 and 80
- Celsius, and precision is half a degree.
- </li><br>
- <li><b>actTempLimit [timer]</b><br>
- Set desired temperature to the selected temperatureThreshold. If parameter
- <b>timer</b> is used the command will only be executed if timeAutomatic is
- activated.
- </li><br>
-
- </ul>
- <b>SX5 commands:</b><br><br>
- <ul>
-
- <li><b>10minuteAlarm [on|off]</b><br>
- Activates the alarm sound of the SX5 when the door is left open for longer than 10 minutes.
- </li><br>
- <li><b>2000cycleAlarm [on|off]</b><br>
- Activates the alarm sounds of the SX5 when the SX5 has run 2000 cycles.
- </li><br>
- <li><b>automaticClosing [off|30|60|90|120|150|180|210|240]</b><br>
- Set the automatic closing time of the SX5 (sec).
- </li><br>
- <li><b>openSpeed [11|15|19]</b><br>
- Set the open speed of the SX5 (cm/sec).
- </li><br>
- <li><b>backJump [on|off]</b><br>
- If activated the SX5 moves briefly in the respective opposite direction after reaching the end point.
- </li><br>
- <li><b>getConfig</b><br>
- Sends a config request message to the weather sensor.
- </li><br>
-
- </ul>
- <b>Weather sensor commands:</b><br><br>
- <ul>
-
- <li><b>getConfig</b><br>
- Sends a configuration request message.
- </li><br>
- <li><b>getTime</b><br>
- Sends a time request message.
- </li><br>
- <li><b>getWeather</b><br>
- Sends a weather data request message.
- </li><br>
- <li><b>writeConfig</b><br>
- Write the configuration back to the weather sensor.
- </li><br>
- <li><b>DCF [on|off]</b><br>
- Switch the DCF receiver on or off.
- </li><br>
- <li><b>time</b><br>
- Set the current system time to the weather sensor.
- </li><br>
- <li><b>interval <value></b><br>
- Set the interval time for automatic transmittion of the weather data.<br>
- <value>: off or 1 to 100 minutes
- </li><br>
- <li><b>latitude <value></b><br>
- Set the latitude of the weather sensor position<br>
- <value>: 0 to 90
- </li><br>
- <li><b>longitude <value></b><br>
- Set the longitude of the weather sensor position<br>
- <value>: -90 to 90
- </li><br>
- <li><b>timezone <value></b><br>
- Set the time zone of the weather sensor<br>
- <value>: 0 to 23
- </li><br>
- <li><b>triggerDawn <value1> ... [<value5>]</b><br>
- Sets up to 5 trigger values for a dawn event.<br>
- <value[n]>: off or 1 to 100 lux
- </li><br>
- <li><b>triggerDusk <value1> ... [<value5>]</b><br>
- Sets up to 5 trigger values for a dusk event.<br>
- <value[n]>: off or 1 to 100 Lux
- </li><br>
- <li><b>triggerRain [on|off]</b><br>
- Switch the trigger of the rain event on or off.
- </li><br>
- <li><b>triggerSun <value1>:<sun1>:<shadow1>[:<temperature1>] ... [<value5>:<sun5>:<shadow5>[:<temperature5>]]</b><br>
- Sets up to 5 trigger values for a sun event.<br>
- <value[n]>: off or 1 to 100 kLux<br>
- <sun[n]>: time to detect sun, 1 to 30 minutes<br>
- <shadow[n]>: time to detect shadow, 1 to 30 minutes<br>
- <temperature[n]>: optional minimum temperature, -5 to 26 °C
- </li><br>
- <li><b>triggerSunDirction <startangle1>:<width1> ... [<startangle5>:<width5>]</b><br>
- If enabled, the respective sun event will only be triggered, if sunDirection is in the specified range.<br>
- <startangle[n]>: off or 0 to 292.5 degrees (stepsize 22.5°)<br>
- <width[n]>: 45 to 180 degrees (stepsize 45°)<br>
- </li><br>
- <li><b>triggerSunHeight <startangle1>:<width1> ... [<startangle5>:<width5>]</b><br>
- If enabled, the respective sun event will only be triggered, if sunHeight is in the specified range.<br>
- <startangle[n]>: off or 0 to 65 degrees (stepsize 13°)<br>
- <width[n]>: 26 or 52 degrees<br>
- </li><br>
- <li><b>triggerTemperature <value1> ... [<value5>]</b><br>
- Sets up to 5 trigger values for a temperature event.<br>
- <value[n]>: off or -40 to 80 °C
- </li><br>
- <li><b>triggerWind <value1> ... [<value5>]</b><br>
- Sets up to 5 trigger values for a wind event.<br>
- <value[n]>: off or 1 to 31 m/s
- </li><br>
- </ul><br>
- </ul>
- <br>
- <a name="DUOFERN_get"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="DUOFERN_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a></li><br>
- <li><b>timeout <sec></b><br>
- After sending a command to an actor, the actor must respond with its status within this time. If no status message is received,
- up to two getStatus commands are resend.<br>
- Default 60s.
- </li><br>
- <li><b>toggleUpDown</b><br>
- If attribute is set, a stop command is send instead of the up or down command if the roller shutter is moving.
- </li><br>
- <li><b>positionInverse</b><br>
- If attribute is set, the position value of the roller shutter is inverted.
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="DUOFERNSTICK"></a>
- <h3>DUOFERNSTICK</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DUOFERNSTICK'>DE</a>]</div>
- <ul>
- The DUOFERNSTICK is the fhem module for the Rademacher DuoFern USB stick. <br>
-
- <br><br>
- <a name="DUOFERNSTICK_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> DUOFERNSTICK <device> <code></code><br><br>
- <device> specifies the serial port to communicate with the DuoFern stick.<br>
- <code> specifies the radio code of the DuoFern stick.<br>
- <br>
- The baud rate must be 115200 baud.<br>
- The code of the DuoFern stick must start with 6F.
- <br><br>
- Example:<br>
- <ul>
- <code>define myDuoFernStick DUOFERNSTICK COM5@115200 6FEDCB</code><br>
- <code>define myDuoFernStick DUOFERNSTICK /dev/serial/by-id/usb-Rademacher_DuoFern_USB-Stick_WR0455TN-if00-port0@115200 6FEDCB</code><br>
- </ul>
- </ul>
- <br>
- <a name="DUOFERNSTICK_set"></a>
- <p><b>Set</b></p>
- <ul>
- <li><b>pair</b><br>
- Set the DuoFern stick in pairing mode for 60 seconds. Any DouFern device set into
- pairing mode in this time will be paired with the DuoFern stick.
- </li><br>
- <li><b>unpair</b><br>
- Set the DuoFern stick in unpairing mode for 60 seconds. Any DouFern device set into
- unpairing mode in this time will be unpaired from the DuoFern stick.
- </li><br>
- <li><b>reopen</b><br>
- Reopens the connection to the device and reinitializes it.
- </li><br>
- <li><b>statusBroadcast</b><br>
- Sends a status request message to all DuoFern devices.
- </li><br>
- <li><b>remotePair <code></b><br>
- Activates the pairing mode on the device specified by the code.<br>
- Some actors accept this command in unpaired mode up to two hours afte power up.
- </li><br>
- <li><b>raw <rawmsg></b><br>
- Sends a raw message.
- </li><br>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="DUOFERNSTICK_attr"></a>
- <b>Attributes</b>
- <ul>
- N/A
- </ul>
- <br>
- </ul>
- <p><a name="Dashboard"></a>
- <h3>Dashboard</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Dashboard'>DE</a>]</div>
- <ul>
- Creates a Dashboard in any group can be arranged. The positioning may depend the Groups and column width are made<br>
- arbitrarily by drag'n drop. Also, the width and height of a Group can be increased beyond the minimum size.<br>
- <br>
-
- <a name="Dashboarddefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Dashboard</code>
- <br><br>
- Example:<br>
- <ul>
- <code>define anyViews Dashboard</code>
- </ul><br>
-
- <b>Bestpractice beginner configuration</b>
- <br><br>
- <code>
- define anyViews Dashboard<br>
- attr anyViews dashboard_colcount 2<br>
- attr anyviews dashboard_rowcentercolwidth 30,70<br>
- attr anyViews dashboard_tab1groups <Group1>,<Group2>,<Group3><br>
- </code>
- </ul>
- <br>
- <a name="Dashboardset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> lock</code><br><br>
- locks the Dashboard so that no position changes can be made<br>
- <code>set <name> unlock</code><br><br>
- unlock the Dashboard<br>
- </ul>
- <br>
-
- <a name="Dashboardget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="Dashboardattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="dashboard_tabcount"></a>
- <li>dashboard_tabcount<br>
- Returns the number of displayed tabs. (Does not need to be set any more. It is read automatically from the configured tabs)
- Default: 1
- </li><br>
- <a name="dashboard_activetab"></a>
- <li>dashboard_activetab<br>
- Specifies which tab is activated. Can be set manually, but is also set by the switch "Set" to the currently active tab.
- Default: 1
- </li><br>
- <a name="dashboard_tabXname"></a>
- <li>dashboard_tabXname<br>
- Title of Tab at position X.
- </li><br>
- <a name="dashboard_tabXsorting"></a>
- <li>dashboard_tabXsorting<br>
- Contains the position of each group in Tab X. Value is written by the "Set" button. It is not recommended to take manual changes.
- </li><br>
- <a name="dashboard_row"></a>
- <li>dashboard_row<br>
- To select which rows are displayed. top only; center only; bottom only; top and center; center and bottom; top,center and bottom.<br>
- Default: center
- </li><br>
- <a name="dashboard_width"></a>
- <li>dashboard_width<br>
- To determine the Dashboardwidth. The value can be specified, or an absolute width value (eg 1200) in pixels in% (eg 80%).<br>
- Default: 100%
- </li><br>
- <a name="dashboard_rowcenterheight"></a>
- <li>dashboard_rowcenterheight<br>
- Height of the center row in which the groups may be positioned. <br>
- Default: 400
- </li><br>
- <a name="dashboard_rowcentercolwidth"></a>
- <li>dashboard_rowcentercolwidth<br>
- 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.
- 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,
- the second value of the width of the second column, etc. Is the sum of the width greater than 100 it is reduced.
- 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
- ignores the excess values��.<br>
- Default: 100
- </li><br>
- <a name="dashboard_rowtopheight"></a>
- <li>dashboard_rowtopheight<br>
- Height of the top row in which the groups may be positioned. <br>
- Default: 250
- </li><br>
- <a name="dashboard_rowbottomheight"></a>
- <li>"dashboard_rowbottomheight<br>
- Height of the bottom row in which the groups may be positioned.<br>
- Default: 250
- </li><br>
- <a name="dashboard_tabXgroups"></a>
- <li>dashboard_tabXgroups<br>
- Comma-separated list of the names of the groups to be displayed in Tab X.<br>
- Each group can be given an icon for this purpose the group name, the following must be completed ":<icon>@<color>"<br>
- Example: Light:Icon_Fisch@blue,AVIcon_Fisch@red,Single Lights:Icon_Fisch@yellow<br/>
- Additionally a group can contain a regular expression to show all groups matching a criteria.
- Example: .*Light.* to show all groups that contain the string "Light"
- </li><br>
- <a name="dashboard_tabXdevices"></a>
- <li>dashboard_tabXdevices<br>
- devspec list of devices that should appear in the tab. The format is:<br/>
- GROUPNAME:devspec1,devspec2,...,devspecN:ICONNAME</br/>
- 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/>
- <a href="#devspec">Dev-Spec</a>
- </li><br>
- <a name="dashboard_tabXicon"></a>
- <li>dashboard_tabXicon<br>
- 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.
- </li><br>
- <a name="dashboard_colcount"></a>
- <li>dashboard_colcount<br>
- Number of columns in which the groups can be displayed. Nevertheless, it is possible to have multiple groups <br>
- to be positioned in a column next to each other. This is depend on the width of columns and groups. <br>
- Default: 1
- </li><br>
- <a name="dashboard_tabXcolcount"></a>
- <li>dashboard_tabXcolcount<br>
- Number of columns for a specific tab in which the groups can be displayed. Nevertheless, it is possible to have multiple groups <br>
- to be positioned in a column next to each other. This depends on the width of columns and groups. <br>
- Default: <dashboard_colcount>
- </li><br>
- <a name="dashboard_tabXbackgroundimage"></a>
- <li>dashboard_tabXbackgroundimage<br>
- 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.
- Standard:
- </li><br>
- <a name="dashboard_flexible"></a>
- <li>dashboard_flexible<br>
- 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/>
- The value for this parameter also defines the grid, in which the position "snaps in".
- Default: 0
- </li><br>
- <a name="dashboard_showfullsize"></a>
- <li>dashboard_showfullsize<br>
- Hide FHEMWEB Roomliste (complete left side) and Page Header if Value is 1.<br>
- Default: 0
- </li><br>
- <a name="dashboard_showtabs"></a>
- <li>dashboard_showtabs<br>
- Displays the Tabs/Buttonbar on top or bottom, or hides them. If the Buttonbar is hidden lockstate is "lock" is used.<br>
- Default: tabs-and-buttonbar-at-the-top
- </li><br>
- <a name="dashboard_showtogglebuttons"></a>
- <li>dashboard_showtogglebuttons<br>
- Displays a Toogle Button on each Group do collapse.<br>
- Default: 0
- </li><br>
- <a name="dashboard_backgroundimage"></a>
- <li>dashboard_backgroundimage<br>
- Displays a background image for the complete dashboard. The image is not stretched in any way so the size should match/extend the
- dashboard height/width.
- Default:
- </li><br>
- <a name="dashboard_debug"></a>
- <li>dashboard_debug<br>
- Show Hiddenfields. Only for Maintainer's use.<br>
- Default: 0
- </li><br>
- </ul>
- </ul>
- <p><a name="DbLog"></a>
- <h3>DbLog</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DbLog'>DE</a>]</div>
- <ul>
- <br>
- With DbLog events can be stored in a database. SQLite, MySQL/MariaDB and PostgreSQL are supported databases. <br><br>
-
- <b>Prereqisites</b> <br><br>
-
- The Perl-modules <code>DBI</code> and <code>DBD::<dbtype></code> are needed to be installed (use <code>cpan -i <module></code>
- if your distribution does not have it).
- <br><br>
-
- On a debian based system you may install these modules for instance by: <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>DBI</b> </td><td>: <code> sudo apt-get install libdbi-perl </code> </td></tr>
- <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>
- <tr><td> <b>SQLite</b> </td><td>: <code> sudo apt-get install sqlite3 libdbi-perl libdbd-sqlite3-perl </code> </td></tr>
- <tr><td> <b>PostgreSQL</b> </td><td>: <code> sudo apt-get install libdbd-pg-perl </code> </td></tr>
- </table>
- </ul>
- <br>
- <br>
-
- <b>Preparations</b> <br><br>
-
- At first you need to setup the database. <br>
- Sample code and Scripts to prepare a MySQL/PostgreSQL/SQLite database you can find in
- <a href="https://svn.fhem.de/trac/browser/trunk/fhem/contrib/dblog">SVN -> contrib/dblog/db_create_<DBType>.sql</a>. <br>
- (<b>Caution:</b> The local FHEM-Installation subdirectory ./contrib/dblog doesn't contain the freshest scripts !!)
- <br><br>
-
- The database contains two tables: <code>current</code> and <code>history</code>. <br>
- The latter contains all events whereas the former only contains the last event for any given reading and device.
- Please consider the <a href="#DbLogattr">attribute</a> DbLogType implicitly to determine the usage of tables
- <code>current</code> and <code>history</code>.
- <br><br>
-
- The columns have the following meaning: <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> TIMESTAMP </td><td>: timestamp of event, e.g. <code>2007-12-30 21:45:22</code> </td></tr>
- <tr><td> DEVICE </td><td>: device name, e.g. <code>Wetterstation</code> </td></tr>
- <tr><td> TYPE </td><td>: device type, e.g. <code>KS300</code> </td></tr>
- <tr><td> EVENT </td><td>: event specification as full string, e.g. <code>humidity: 71 (%)</code> </td></tr>
- <tr><td> READING </td><td>: name of reading extracted from event, e.g. <code>humidity</code> </td></tr>
- <tr><td> VALUE </td><td>: actual reading extracted from event, e.g. <code>71</code> </td></tr>
- <tr><td> UNIT </td><td>: unit extracted from event, e.g. <code>%</code> </td></tr>
- </table>
- </ul>
- <br>
- <br>
-
- <b>create index</b> <br>
- Due to reading performance, e.g. on creation of SVG-plots, it is very important that the <b>index "Search_Idx"</b>
- or a comparable index (e.g. a primary key) is applied.
- A sample code for creation of that index is also available in mentioned scripts of
- <a href="https://svn.fhem.de/trac/browser/trunk/fhem/contrib/dblog">SVN -> contrib/dblog/db_create_<DBType>.sql</a>.
- <br><br>
-
- The index "Search_Idx" can be created, e.g. in database 'fhem', by these statements (also subsequently): <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>MySQL</b> </td><td>: <code> CREATE INDEX Search_Idx ON `fhem`.`history` (DEVICE, READING, TIMESTAMP); </code> </td></tr>
- <tr><td> <b>SQLite</b> </td><td>: <code> CREATE INDEX Search_Idx ON `history` (DEVICE, READING, TIMESTAMP); </code> </td></tr>
- <tr><td> <b>PostgreSQL</b> </td><td>: <code> CREATE INDEX "Search_Idx" ON history USING btree (device, reading, "timestamp"); </code> </td></tr>
- </table>
- </ul>
- <br>
-
- For the connection to the database a <b>configuration file</b> is used.
- The configuration is stored in a separate file to avoid storing the password in the main configuration file and to have it
- visible in the output of the <a href="https://fhem.de/commandref.html#list">list</a> command.
- <br><br>
-
- The <b>configuration file</b> should be copied e.g. to /opt/fhem and has the following structure you have to customize
- suitable to your conditions (decomment the appropriate raws and adjust it): <br><br>
-
- <pre>
- ####################################################################################
- # database configuration file
- #
- # NOTE:
- # If you don't use a value for user / password please delete the leading hash mark
- # and write 'user => ""' respectively 'password => ""' instead !
- #
- #
- ## for MySQL
- ####################################################################################
- #%dbconfig= (
- # connection => "mysql:database=fhem;host=<database host>;port=3306",
- # user => "fhemuser",
- # password => "fhempassword",
- # # optional enable(1) / disable(0) UTF-8 support (at least V 4.042 is necessary)
- # utf8 => 1
- #);
- ####################################################################################
- #
- ## for PostgreSQL
- ####################################################################################
- #%dbconfig= (
- # connection => "Pg:database=fhem;host=<database host>",
- # user => "fhemuser",
- # password => "fhempassword"
- #);
- ####################################################################################
- #
- ## for SQLite (username and password stay empty for SQLite)
- ####################################################################################
- #%dbconfig= (
- # connection => "SQLite:dbname=/opt/fhem/fhem.db",
- # user => "",
- # password => ""
- #);
- ####################################################################################
- </pre>
- <br>
-
- <a name="DbLogdefine"></a>
- <b>Define</b>
- <ul>
- <br>
-
- <code>define <name> DbLog <configfilename> <regexp></code>
- <br><br>
- <code><configfilename></code> is the prepared <b>configuration file</b>. <br>
- <code><regexp></code> is identical to the specification of regex in the <a href="https://fhem.de/commandref.html#FileLog">FileLog</a> definition.
- <br><br>
-
- <b>Example:</b>
- <ul>
- <code>define myDbLog DbLog /etc/fhem/db.conf .*:.*</code><br>
- all events will stored into the database
- </ul>
- <br>
-
- After you have defined your DbLog-device it is recommended to run the <b>configuration check</b> <br><br>
- <ul>
- <code>set <name> configCheck</code> <br>
- </ul>
- <br>
-
- This check reports some important settings and gives recommendations back to you if proposals are indentified.
- <br><br>
-
- DbLog distinguishes between the synchronous (default) and asynchronous logmode. The logmode is adjustable by the
- <a href="#DbLogattr">attribute</a> asyncMode. Since version 2.13.5 DbLog is supporting primary key (PK) set in table
- current or history. If you want use PostgreSQL with PK it has to be at lest version 9.5.
- <br><br>
-
- The content of VALUE will be optimized for automated post-processing, e.g. <code>yes</code> is translated to <code>1</code>
- <br><br>
-
- The stored values can be retrieved by the following code like FileLog:<br>
- <ul>
- <code>get myDbLog - - 2012-11-10 2012-11-10 KS300:temperature::</code>
- </ul>
- <br>
-
- <b>transfer FileLog-data to DbLog </b> <br><br>
- There is the special module 98_FileLogConvert.pm available to transfer filelog-data to the DbLog-database. <br>
- The module can be downloaded <a href="https://svn.fhem.de/trac/browser/trunk/fhem/contrib/98_FileLogConvert.pm"> here</a>
- or from directory ./contrib instead.
- Further informations and help you can find in the corresponding <a href="https://forum.fhem.de/index.php/topic,66383.0.html">
- Forumthread </a>. <br><br><br>
-
- <b>Reporting and Management of DbLog database content</b> <br><br>
- By using <a href="https://fhem.de/commandref.html#SVG">SVG</a> database content can be visualized. <br>
- Beyond that the module <a href="https://fhem.de/commandref.html#DbRep">DbRep</a> can be used to prepare tabular
- database reports or you can manage the database content with available functions of that module.
- <br><br><br>
-
- <b>Troubleshooting</b> <br><br>
- If after successful definition the DbLog-device doesn't work as expected, the following notes may help:
- <br><br>
-
- <ul>
- <li> Have the preparatory steps as described in commandref been done ? (install software components, create tables and index) </li>
- <li> Was "set <name> configCheck" executed after definition and potential errors fixed or rather the hints implemented ? </li>
- <li> If configDB is used ... has the database configuration file been imported into configDB (e.g. by "configDB fileimport ./db.conf") ? </li>
- <li> When creating a SVG-plot and no drop-down list with proposed values appear -> set attribute "DbLogType" to "Current/History". </li>
- </ul>
- <br>
-
- If the notes don't lead to success, please increase verbose level of the DbLog-device to 4 or 5 and observe entries in
- logfile relating to the DbLog-device.
-
- For problem analysis please post the output of "list <name>", the result of "set <name> configCheck" and the
- logfile entries of DbLog-device to the forum thread.
- <br><br>
-
- </ul>
- <br>
- <br>
- <a name="DbLogset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> addCacheLine YYYY-MM-DD HH:MM:SS|<device>|<type>|<event>|<reading>|<value>|[<unit>] </code><br><br>
- <ul> In asynchronous mode a new dataset is inserted to the Cache and will be processed at the next database sync cycle.
- <br><br>
-
- <b>Example:</b> <br>
- set <name> addCacheLine 2017-12-05 17:03:59|MaxBathRoom|MAX|valveposition: 95|valveposition|95|% <br>
- </ul><br>
-
- <code>set <name> addLog <devspec>:<Reading> [Value] </code><br><br>
- <ul> Inserts an additional log entry of a device/reading combination into the database.
- Optionally you can enter a "Value" that is used as reading value for the dataset. If the value isn't specified (default),
- the current value of the specified reading will be inserted into the database. The field "$EVENT" will be filled automatically
- by "addLog". The device can be declared by a <a href="#devspec">device specification (devspec)</a>.
- "Reading" will be evaluated as regular expression.
- By the addLog-command NO additional events will be created !<br><br>
-
- <b>Examples:</b> <br>
- set <name> addLog SMA_Energymeter:Bezug_Wirkleistung <br>
- set <name> addLog TYPE=SSCam:state <br>
- set <name> addLog MyWetter:(fc10.*|fc8.*) <br>
- set <name> addLog MyWetter:(wind|wind_ch.*) 20 <br>
- set <name> addLog TYPE=CUL_HM:FILTER=model=HM-CC-RT-DN:FILTER=subType!=(virtual|):(measured-temp|desired-temp|actuator) <br>
- </ul><br>
-
- <code>set <name> clearReadings </code><br><br>
- <ul> This function clears readings which were created by different DbLog-functions. </ul><br>
- <code>set <name> commitCache </code><br><br>
- <ul>In asynchronous mode (<a href="#DbLogattr">attribute</a> asyncMode=1), the cached data in memory will be written into the database
- and subsequently the cache will be cleared. Thereby the internal timer for the asynchronous mode Modus will be set new.
- 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
- point of time into the database. </ul><br>
- <code>set <name> configCheck </code><br><br>
- <ul>This command checks some important settings and give recommendations back to you if proposals are identified.
- </ul><br>
-
- <code>set <name> count </code><br/><br/>
- <ul>Count records in tables current and history and write results into readings countCurrent and countHistory.</ul><br/>
- <code>set <name> countNbl </code><br/><br/>
- <ul>The non-blocking execution of "set <name> count".</ul><br/>
-
- <code>set <name> deleteOldDays <n></code><br/><br/>
- <ul>Delete records from history older than <n> days. Number of deleted records will be written into reading lastRowsDeleted.</ul><br/>
-
- <code>set <name> deleteOldDaysNbl <n></code><br/><br/>
- <ul>Is identical to function "deleteOldDays" whereupon deleteOldDaysNbl will be executed non-blocking. </ul><br/>
- <code>set <name> eraseReadings </code><br><br>
- <ul> This function deletes all readings except reading "state". </ul><br>
- <a name="DbLogsetexportCache"></a>
- <code>set <name> exportCache [nopurge | purgecache] </code><br><br>
- <ul>If DbLog is operating in asynchronous mode, it's possible to exoprt the cache content into a textfile.
- The file will be written to the directory (global->modpath)/log/ by default setting. The detination directory can be
- changed by the <a href="#DbLogattr">attribute</a> expimpdir. <br>
- The filename will be generated automatically and is built by a prefix "cache_", followed by DbLog-devicename and the
- present timestmp, e.g. "cache_LogDB_2017-03-23_22-13-55". <br>
- There are two options possible, "nopurge" respectively "purgecache". The option determines whether the cache content
- will be deleted after export or not.
- Using option "nopurge" (default) the cache content will be preserved. <br>
- The <a href="#DbLogattr">attribute</a> "exportCacheAppend" defines, whether every export process creates a new export file
- (default) or the cache content is appended to an existing (newest) export file.
- </ul><br>
-
- <code>set <name> importCachefile <file> </code><br><br>
- <ul>Imports an textfile into the database which has been written by the "exportCache" function.
- The allocatable files will be searched in directory (global->modpath)/log/ by default and a drop-down list will be
- generated from the files which are found in the directory.
- The source directory can be changed by the <a href="#DbLogattr">attribute</a> expimpdir. <br>
- Only that files will be shown which are correlate on pattern starting with "cache_", followed by the DbLog-devicename. <br>
- For example a file with the name "cache_LogDB_2017-03-23_22-13-55", will match if Dblog-device has name "LogDB". <br>
- After the import has been successfully done, a prefix "impdone_" will be added at begin of the filename and this file
- ddoesn't appear on the drop-down list anymore. <br>
- If you want to import a cachefile from another source database, you may adapt the filename so it fits the search criteria
- "DbLog-Device" in its name. After renaming the file appeares again on the drop-down list. </ul><br>
- <code>set <name> listCache </code><br><br>
- <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>
- <code>set <name> purgeCache </code><br><br>
- <ul>In asynchronous mode (<a href="#DbLogattr">attribute</a> asyncMode=1), the in memory cached data will be deleted.
- With this command data won't be written from cache into the database. </ul><br>
-
- <code>set <name> reduceLog <n> [average[=day]] [exclude=deviceRegExp1:ReadingRegExp1,deviceRegExp2:ReadingRegExp2,...]</code> <br><br>
- <ul>Reduces records older than <n> days to one record each hour (the 1st) per device & reading. <br><br>
- <b>CAUTION:</b> It is strongly recommended to check if the default INDEX 'Search_Idx' exists on the table 'history'! <br>
- 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>
-
- With the optional argument 'average' not only the records will be reduced, but all numerical values of an hour
- will be reduced to a single average. <br>
- With the optional argument 'average=day' not only the records will be reduced, but all numerical values of a
- day will be reduced to a single average. (implies 'average') <br>
- You can optional set the last argument to "EXCLUDE=deviceRegExp1:ReadingRegExp1,deviceRegExp2:ReadingRegExp2,...."
- to exclude device/readings from reduceLog. <br>
- You can optional set the last argument to "INCLUDE=Database-deviceRegExp:Database-ReadingRegExp" to delimit
- the SELECT statement which is executet on the database. This reduces the system RAM load and increases the
- performance. (Wildcards are % and _) <br>
- </ul><br>
-
- <code>set <name> reduceLogNbl <n> [average[=day]] [exclude=deviceRegExp1:ReadingRegExp1,deviceRegExp2:ReadingRegExp2,...]</code> <br><br>
- <ul>Same function as "set <name> reduceLog" but FHEM won't be blocked due to this function is implemented non-blocking ! <br>
- </ul><br>
- <code>set <name> reopen [n] </code><br/><br/>
- <ul>Perform a database disconnect and immediate reconnect to clear cache and flush journal file if no time [n] was set. <br>
- If optionally a delay time of [n] seconds was set, the database connection will be disconnect immediately but it was only reopened
- after [n] seconds. In synchronous mode the events won't saved during that time. In asynchronous mode the events will be
- stored in the memory cache and saved into database after the reconnect was done. </ul><br/>
- <code>set <name> rereadcfg </code><br/><br/>
- <ul>Perform a database disconnect and immediate reconnect to clear cache and flush journal file.<br/>
- Probably same behavior als reopen, but rereadcfg will read the configuration data before reconnect.</ul><br/>
-
- <code>set <name> userCommand <validSqlStatement></code><br/><br/>
- <ul><b>DO NOT USE THIS COMMAND UNLESS YOU REALLY (REALLY!) KNOW WHAT YOU ARE DOING!!!</b><br/><br/>
- Performs any (!!!) sql statement on connected database. Usercommand and result will be written into
- corresponding readings.</br>
- The result can only be a single line. If the SQL-Statement seems to deliver a multiline result, it can be suitable
- to use the analysis module <a href=https://fhem.de/commandref.html#DbRep>DbRep</a>.</br>
- If the database interface delivers no result (undef), the reading "userCommandResult" contains the message
- "no result".
- </ul><br/>
- </ul><br>
- <a name="DbLogget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> ReadingsVal <device> <reading> <default></code><br/>
- <code>get <name> ReadingsTimestamp <device> <reading> <default></code><br/>
- <br/>
- Retrieve one single value, use and syntax are similar to ReadingsVal() and ReadingsTimestamp() functions.<br/>
- </ul>
- <br/>
- <br/>
- <ul>
- <code>get <name> <infile> <outfile> <from>
- <to> <column_spec> </code>
- <br><br>
- Read data from the Database, used by frontends to plot data without direct
- access to the Database.<br>
- <ul>
- <li><in><br>
- A dummy parameter for FileLog compatibility. Sessing by defaultto <code>-</code><br>
- <ul>
- <li>current: reading actual readings from table "current"</li>
- <li>history: reading history readings from table "history"</li>
- <li>-: identical to "history"</li>
- </ul>
- </li>
- <li><out><br>
- A dummy parameter for FileLog compatibility. Setting by default to <code>-</code>
- to check the output for plot-computing.<br>
- Set it to the special keyword
- <code>all</code> to get all columns from Database.
- <ul>
- <li>ALL: get all colums from table, including a header</li>
- <li>Array: get the columns as array of hashes</li>
- <li>INT: internally used by generating plots</li>
- <li>-: default</li>
- </ul>
- </li>
- <li><from> / <to><br>
- Used to select the data. Please use the following timeformat or
- an initial substring of it:<br>
- <ul><code>YYYY-MM-DD_HH24:MI:SS</code></ul></li>
- <li><column_spec><br>
- For each column_spec return a set of data separated by
- a comment line on the current connection.<br>
- Syntax: <device>:<reading>:<default>:<fn>:<regexp><br>
- <ul>
- <li><device><br>
- The name of the device. Case sensitive. Using a the joker "%" is supported.</li>
- <li><reading><br>
- The reading of the given device to select. Case sensitive. Using a the joker "%" is supported.
- </li>
- <li><default><br>
- no implemented yet
- </li>
- <li><fn>
- One of the following:
- <ul>
- <li>int<br>
- Extract the integer at the beginning of the string. Used e.g.
- for constructs like 10%</li>
- <li>int<digit><br>
- Extract the decimal digits including negative character and
- decimal point at the beginning og the string. Used e.g.
- for constructs like 15.7°C</li>
- <li>delta-h / delta-d<br>
- Return the delta of the values for a given hour or a given day.
- Used if the column contains a counter, as is the case for the
- KS300 rain column.</li>
- <li>delta-ts<br>
- Replaced the original value with a measured value of seconds since
- the last and the actual logentry.
- </li>
- </ul></li>
- <li><regexp><br>
- The string is evaluated as a perl expression. The regexp is executed
- before <fn> parameter.<br>
- Note: The string/perl expression cannot contain spaces,
- as the part after the space will be considered as the
- next column_spec.<br>
- <b>Keywords</b>
- <li>$val is the current value returned from the Database.</li>
- <li>$ts is the current timestamp returned from the Database.</li>
- <li>This Logentry will not print out if $val contains th keyword "hide".</li>
- <li>This Logentry will not print out and not used in the following processing
- if $val contains th keyword "ignore".</li>
- </li>
- </ul></li>
- </ul>
- <br><br>
- Examples:
- <ul>
- <li><code>get myDbLog - - 2012-11-10 2012-11-20 KS300:temperature</code></li>
- <li><code>get myDbLog current ALL - - %:temperature</code></li><br>
- you will get all actual readings "temperature" from all logged devices.
- Be careful by using "history" as inputfile because a long execution time will be expected!
- <li><code>get myDbLog - - 2012-11-10_10 2012-11-10_20 KS300:temperature::int1</code><br>
- like from 10am until 08pm at 10.11.2012</li>
- <li><code>get myDbLog - all 2012-11-10 2012-11-20 KS300:temperature</code></li>
- <li><code>get myDbLog - - 2012-11-10 2012-11-20 KS300:temperature KS300:rain::delta-h KS300:rain::delta-d</code></li>
- <li><code>get myDbLog - - 2012-11-10 2012-11-20 MyFS20:data:::$val=~s/(on|off).*/$1eq"on"?1:0/eg</code><br>
- return 1 for all occurance of on* (on|on-for-timer etc) and 0 for all off*</li>
- <li><code>get myDbLog - - 2012-11-10 2012-11-20 Bodenfeuchte:data:::$val=~s/.*B:\s([-\.\d]+).*/$1/eg</code><br>
- Example of OWAD: value like this: <code>"A: 49.527 % B: 66.647 % C: 9.797 % D: 0.097 V"</code><br>
- and output for port B is like this: <code>2012-11-20_10:23:54 66.647</code></li>
- <li><code>get DbLog - - 2013-05-26 2013-05-28 Pumpe:data::delta-ts:$val=~s/on/hide/</code><br>
- Setting up a "Counter of Uptime". The function delta-ts gets the seconds between the last and the
- actual logentry. The keyword "hide" will hide the logentry of "on" because this time
- is a "counter of Downtime"</li>
- </ul>
- <br><br>
- </ul>
- <b>Get</b> when used for webcharts
- <ul>
- <code>get <name> <infile> <outfile> <from>
- <to> <device> <querytype> <xaxis> <yaxis> <savename> </code>
- <br><br>
- Query the Database to retrieve JSON-Formatted Data, which is used by the charting frontend.
- <br>
- <ul>
- <li><name><br>
- The name of the defined DbLog, like it is given in fhem.cfg.</li>
- <li><in><br>
- A dummy parameter for FileLog compatibility. Always set to <code>-</code></li>
- <li><out><br>
- A dummy parameter for FileLog compatibility. Set it to <code>webchart</code>
- to use the charting related get function.
- </li>
- <li><from> / <to><br>
- Used to select the data. Please use the following timeformat:<br>
- <ul><code>YYYY-MM-DD_HH24:MI:SS</code></ul></li>
- <li><device><br>
- A string which represents the device to query.</li>
- <li><querytype><br>
- A string which represents the method the query should use. Actually supported values are: <br>
- <code>getreadings</code> to retrieve the possible readings for a given device<br>
- <code>getdevices</code> to retrieve all available devices<br>
- <code>timerange</code> to retrieve charting data, which requires a given xaxis, yaxis, device, to and from<br>
- <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>
- <code>deletechart</code> to delete a saved chart. Requires a given id which was set on save of the chart<br>
- <code>getcharts</code> to get a list of all saved charts.<br>
- <code>getTableData</code> to get jsonformatted data from the database. Uses paging Parameters like start and limit.<br>
- <code>hourstats</code> to get statistics for a given value (yaxis) for an hour.<br>
- <code>daystats</code> to get statistics for a given value (yaxis) for a day.<br>
- <code>weekstats</code> to get statistics for a given value (yaxis) for a week.<br>
- <code>monthstats</code> to get statistics for a given value (yaxis) for a month.<br>
- <code>yearstats</code> to get statistics for a given value (yaxis) for a year.<br>
- </li>
- <li><xaxis><br>
- A string which represents the xaxis</li>
- <li><yaxis><br>
- A string which represents the yaxis</li>
- <li><savename><br>
- A string which represents the name a chart will be saved with</li>
- <li><chartconfig><br>
- A jsonstring which represents the chart to save</li>
- <li><pagingstart><br>
- An integer used to determine the start for the sql used for query 'getTableData'</li>
- <li><paginglimit><br>
- An integer used to set the limit for the sql used for query 'getTableData'</li>
- </ul>
- <br><br>
- Examples:
- <ul>
- <li><code>get logdb - webchart "" "" "" getcharts</code><br>
- Retrieves all saved charts from the Database</li>
- <li><code>get logdb - webchart "" "" "" getdevices</code><br>
- Retrieves all available devices from the Database</li>
- <li><code>get logdb - webchart "" "" ESA2000_LED_011e getreadings</code><br>
- Retrieves all available Readings for a given device from the Database</li>
- <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>
- Retrieves charting data, which requires a given xaxis, yaxis, device, to and from<br>
- Will ouput a JSON like this: <code>[{'TIMESTAMP':'2013-02-11 00:10:10','VALUE':'0.22431388090756'},{'TIMESTAMP'.....}]</code></li>
- <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>
- Will save a chart in the database with the given name and the chart configuration parameters</li>
- <li><code>get logdb - webchart "" "" "" deletechart "" "" 7</code><br>
- Will delete a chart from the database with the given id</li>
- </ul>
- <br><br>
- </ul>
-
- <a name="DbLogattr"></a>
- <b>Attributes</b>
- <br><br>
-
- <ul><b>addStateEvent</b>
- <ul>
- <code>attr <device> addStateEvent [0|1]
- </code><br>
- As you probably know the event associated with the state Reading is special, as the "state: "
- string is stripped, i.e event is not "state: on" but just "on". <br>
- Mostly it is desireable to get the complete event without "state: " stripped, so it is the default behavior of DbLog.
- That means you will get state-event complete as "state: xxx". <br>
- In some circumstances, e.g. older or special modules, it is a good idea to set addStateEvent to "0".
- Try it if you have trouble with the default adjustment.
- <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>asyncMode</b>
- <ul>
- <code>attr <device> asyncMode [1|0]
- </code><br>
-
- This attribute determines the operation mode of DbLog. If asynchronous mode is active (asyncMode=1), the events which should be saved
- at first will be cached in memory. After synchronisation time cycle (attribute syncInterval), or if the count limit of datasets in cache
- is reached (attribute cacheLimit), the cached events get saved into the database using bulk insert.
- If the database isn't available, the events will be cached in memeory furthermore, and tried to save into database again after
- the next synchronisation time cycle if the database is available. <br>
- In asynchronous mode the data insert into database will be executed non-blocking by a background process.
- You can adjust the timeout value for this background process by attribute "timeout" (default 86400s). <br>
- In synchronous mode (normal mode) the events won't be cached im memory and get saved into database immediately. If the database isn't
- available the events are get lost. <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>commitMode</b>
- <ul>
- <code>attr <device> commitMode [basic_ta:on | basic_ta:off | ac:on_ta:on | ac:on_ta:off | ac:off_ta:on]
- </code><br>
-
- Change the usage of database autocommit- and/or transaction- behavior. <br>
- This attribute is an advanced feature and should only be used in a concrete case of need or support case. <br><br>
-
- <ul>
- <li>basic_ta:on - autocommit server basic setting / transaktion on (default) </li>
- <li>basic_ta:off - autocommit server basic setting / transaktion off </li>
- <li>ac:on_ta:on - autocommit on / transaktion on </li>
- <li>ac:on_ta:off - autocommit on / transaktion off </li>
- <li>ac:off_ta:on - autocommit off / transaktion on (autocommit off set transaktion on implicitly) </li>
- </ul>
-
- </ul>
- </ul>
- <br>
- <ul><b>cacheEvents</b>
- <ul>
- <code>attr <device> cacheEvents [2|1|0]
- </code><br>
- <ul>
- <li>cacheEvents=1: creates events of reading CacheUsage at point of time when a new dataset has been added to the cache. </li>
- <li>cacheEvents=2: creates events of reading CacheUsage at point of time when in aychronous mode a new write cycle to the
- database starts. In that moment CacheUsage contains the number of datasets which will be written to
- the database. </li><br>
- </ul>
- </ul>
- </ul>
- <br>
-
- <ul><b>cacheLimit</b>
- <ul>
- <code>
- attr <device> cacheLimit <n>
- </code><br>
-
- In asynchronous logging mode the content of cache will be written into the database and cleared if the number <n> datasets
- in cache has reached (default: 500). Thereby the timer of asynchronous logging mode will be set new to the value of
- attribute "syncInterval". In case of error the next write attempt will be started at the earliest after syncInterval/2. <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>colEvent</b>
- <ul>
- <code>
- attr <device> colEvent <n>
- </code><br>
-
- The field length of database field EVENT will be adjusted. By this attribute the default value in the DbLog-device can be
- adjusted if the field length in the databse was changed nanually. If colEvent=0 is set, the database field
- EVENT won't be filled . <br>
- <b>Note:</b> <br>
- If the attribute is set, all of the field length limits are valid also for SQLite databases as noticed in Internal COLUMNS ! <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>colReading</b>
- <ul>
- <code>
- attr <device> colReading <n>
- </code><br>
-
- The field length of database field READING will be adjusted. By this attribute the default value in the DbLog-device can be
- adjusted if the field length in the databse was changed nanually. If colReading=0 is set, the database field
- READING won't be filled . <br>
- <b>Note:</b> <br>
- If the attribute is set, all of the field length limits are valid also for SQLite databases as noticed in Internal COLUMNS ! <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>colValue</b>
- <ul>
- <code>
- attr <device> colValue <n>
- </code><br>
-
- The field length of database field VALUE will be adjusted. By this attribute the default value in the DbLog-device can be
- adjusted if the field length in the databse was changed nanually. If colEvent=0 is set, the database field
- VALUE won't be filled . <br>
- <b>Note:</b> <br>
- If the attribute is set, all of the field length limits are valid also for SQLite databases as noticed in Internal COLUMNS ! <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>DbLogType</b>
- <ul>
- <code>
- attr <device> DbLogType [Current|History|Current/History]
- </code><br>
-
- This attribute determines which table or which tables in the database are wanted to use. If the attribute isn't set,
- the adjustment <i>history</i> will be used as default. <br>
-
-
- The meaning of the adjustments in detail are: <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=10%> <col width=90%> </colgroup>
- <tr><td> <b>Current</b> </td><td>Events are only logged into the current-table.
- The entries of current-table will evaluated with SVG-creation. </td></tr>
- <tr><td> <b>History</b> </td><td>Events are only logged into the history-table. No dropdown list with proposals will created with the
- SVG-creation. </td></tr>
- <tr><td> <b>Current/History</b> </td><td>Events will be logged both the current- and the history-table.
- The entries of current-table will evaluated with SVG-creation. </td></tr>
- <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
- and can be filled up with a customizable extract of the history-table by using a
- <a href="http://fhem.de/commandref.html#DbRep">DbRep-device</a> command
- "set <DbRep-name> tableCurrentFillup" (advanced feature). </td></tr>
- </table>
- </ul>
- <br>
- <br>
-
- <b>Note:</b> <br>
- The current-table has to be used to get a Device:Reading-DropDown list when a SVG-Plot will be created. <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>DbLogSelectionMode</b>
- <ul>
- <code>
- attr <device> DbLogSelectionMode [Exclude|Include|Exclude/Include]
- </code><br>
-
- Thise DbLog-Device-Attribute specifies how the device specific Attributes DbLogExclude and DbLogInclude are handled.
- If this Attribute is missing it defaults to "Exclude".
- <ul>
- <li>Exclude: DbLog behaves just as usual. This means everything specified in the regex in DEF will be logged by default and anything excluded
- via the DbLogExclude attribute will not be logged</li>
- <li>Include: Nothing will be logged, except the readings specified via regex in the DbLogInclude attribute </li>
- <li>Exclude/Include: Just almost the same as Exclude, but if the reading matches the DbLogExclude attribute, then
- it will further be checked against the regex in DbLogInclude whicht may possibly re-include the already
- excluded reading. </li>
- </ul>
- </ul>
- </ul>
- <br>
- <ul><b>DbLogInclude</b>
- <ul>
- <code>
- attr <device> DbLogInclude regex:MinInterval,[regex:MinInterval] ...
- </code><br>
-
- A new Attribute DbLogInclude will be propagated
- to all Devices if DBLog is used. DbLogInclude works just like DbLogExclude but
- to include matching readings.
- See also DbLogSelectionMode-Attribute of DbLog-Device which takes influence on
- on how DbLogExclude and DbLogInclude are handled. <br>
-
- <b>Example</b> <br>
- <code>attr MyDevice1 DbLogInclude .*</code> <br>
- <code>attr MyDevice2 DbLogInclude state,(floorplantext|MyUserReading):300,battery:3600</code>
- </ul>
- </ul>
- <br>
-
- <ul><b>DbLogExclude</b>
- <ul>
- <code>
- attr <device> DbLogExclude regex:MinInterval,[regex:MinInterval] ...
- </code><br>
-
- A new Attribute DbLogExclude will be propagated to all Devices if DBLog is used.
- DbLogExclude will work as regexp to exclude defined readings to log. Each individual regexp-group are separated by comma.
- If a MinInterval is set, the logentry is dropped if the defined interval is not reached and value vs. lastvalue is eqal.
- <br><br>
-
- <b>Example</b> <br>
- <code>attr MyDevice1 DbLogExclude .*</code> <br>
- <code>attr MyDevice2 DbLogExclude state,(floorplantext|MyUserReading):300,battery:3600</code>
- </ul>
- </ul>
- <br>
- <ul><b>excludeDevs</b>
- <ul>
- <code>
- attr <device> excludeDevs <devspec1>,<devspec2>,<devspec..>
- </code><br>
-
- The devices "devspec1", "devspec2" up to "devspec.." are excluded from logging into database. This attribute
- will only be evaluated if internal "NOTIFYDEV" is not defined.
- Thereby devices can be explicit excluded from logging. The devices to exclude can be specified as
- <a href="#devspec">device-specification</a>.
- For further informations about devspec please see <a href="#devspec">device-specification</a>. <br><br>
-
- <b>Example</b> <br>
- <code>
- attr <device> excludeDevs global,Log.*,Cam.*,TYPE=DbLog
- </code><br>
- # The devices global respectively devices starting with "Log" or "Cam" and devices with Type=DbLog
- are excluded from database logging. <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>expimpdir</b>
- <ul>
- <code>
- attr <device> expimpdir <directory>
- </code><br>
-
- If the cache content will be exported by <a href="#DbLogsetexportCache">"exportCache"</a> or the "importCachefile"
- command, the file will be written into or read from that directory. The default directory is
- "(global->modpath)/log/".
- Make sure the specified directory is existing and writable. <br><br>
-
- <b>Example</b> <br>
- <code>
- attr <device> expimpdir /opt/fhem/cache/
- </code><br>
- </ul>
- </ul>
- <br>
-
- <ul><b>exportCacheAppend</b>
- <ul>
- <code>
- attr <device> exportCacheAppend [1|0]
- </code><br>
-
- If set, the export of cache ("set <device> exportCache") appends the content to the newest available
- export file. If there is no exististing export file, it will be new created. <br>
- If the attribute not set, every export process creates a new export file . (default)<br/>
- </ul>
- </ul>
- <br>
-
- <ul><b>noNotifyDev</b>
- <ul>
- <code>
- attr <device> noNotifyDev [1|0]
- </code><br>
-
- Enforces that NOTIFYDEV won't set and hence won't used. <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>noSupportPK</b>
- <ul>
- <code>
- attr <device> noSupportPK [1|0]
- </code><br>
-
- Deactivates the support of a set primary key by the module.<br>
- </ul>
- </ul>
- <br>
-
- <ul><b>syncEvents</b>
- <ul>
- <code>attr <device> syncEvents [1|0]
- </code><br>
-
- events of reading syncEvents will be created. <br>
- </ul>
- </ul>
- <br>
- <ul><b>shutdownWait</b>
- <ul>
- <code>attr <device> shutdownWait <n>
- </code><br>
- causes fhem shutdown to wait n seconds for pending database commit<br/>
- </ul>
- </ul>
- <br>
-
- <ul><b>showproctime</b>
- <ul>
- <code>attr <device> [1|0]
- </code><br>
-
- If set, the reading "sql_processing_time" shows the required execution time (in seconds) for the sql-requests. This is not calculated
- for a single sql-statement, but the summary of all sql-statements necessary for within an executed DbLog-function in background.
- The reading "background_processing_time" shows the total time used in background. <br>
- </ul>
- </ul>
- <br>
- <ul><b>showNotifyTime</b>
- <ul>
- <code>attr <device> showNotifyTime [1|0]
- </code><br>
-
- If set, the reading "notify_processing_time" shows the required execution time (in seconds) in the DbLog
- Notify-function. This attribute is practical for performance analyses and helps to determine the differences of time
- required when the operation mode was switched from synchronous to the asynchronous mode. <br>
-
- </ul>
- </ul>
- <br>
-
- <ul><b>syncInterval</b>
- <ul>
- <code>attr <device> syncInterval <n>
- </code><br>
-
- If DbLog is set to asynchronous operation mode (attribute asyncMode=1), with this attribute you can setup the interval in seconds
- used for storage the in memory cached events into the database. THe default value is 30 seconds. <br>
-
- </ul>
- </ul>
- <br>
-
- <ul><b>suppressAddLogV3</b>
- <ul>
- <code>attr <device> suppressAddLogV3 [1|0]
- </code><br>
-
- If set, verbose3-Logfileentries done by the addLog-function will be suppressed. <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>suppressUndef</b>
- <ul>
- <code>
- attr <device> ignoreUndef <n>
- </code><br>
- suppresses all undef values when returning data from the DB via get <br>
- <b>Example</b> <br>
- <code>#DbLog eMeter:power:::$val=($val>1500)?undef:$val</code>
- </ul>
- </ul>
- <br>
- <ul><b>timeout</b>
- <ul>
- <code>
- attr <device> timeout <n>
- </code><br>
- setup timeout of the write cycle into database in asynchronous mode (default 86400s) <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>useCharfilter</b>
- <ul>
- <code>
- attr <device> useCharfilter [0|1] <n>
- </code><br>
- If set, only ASCII characters from 32 to 126 are accepted in event.
- That are the characters " A-Za-z0-9!"#$%&'()*+,-.\/:;<=>?@[\\]^_`{|}~" .<br>
- Mutated vowel and "�" are transcribed (e.g. ä to ae). (default: 0). <br>
- </ul>
- </ul>
- <br>
-
- <ul><b>valueFn</b>
- <ul>
- <code>
- attr <device> valueFn {}
- </code><br>
-
- Perl expression that can use and change values of $TIMESTAMP, $DEVICE, $DEVICETYPE, $READING, $VALUE (value of reading) and
- $UNIT (unit of reading value).
- It also has readonly-access to $EVENT for evaluation in your expression. <br>
- If $TIMESTAMP should be changed, it must meet the condition "yyyy-mm-dd hh:mm:ss", otherwise the $timestamp wouldn't
- be changed.
- In addition you can set the variable $IGNORE=1 if you want skip a dataset from logging. <br><br>
-
- <b>Examples</b> <br>
- <code>
- attr <device> valueFn {if ($DEVICE eq "living_Clima" && $VALUE eq "off" ){$VALUE=0;} elsif ($DEVICE eq "e-power"){$VALUE= sprintf "%.1f", $VALUE;}}
- </code> <br>
- # change value "off" to "0" of device "living_Clima" and rounds value of e-power to 1f <br><br>
- <code>
- attr <device> valueFn {if ($DEVICE eq "SMA_Energymeter" && $READING eq "state"){$IGNORE=1;}}
- </code><br>
- # don't log the dataset of device "SMA_Energymeter" if the reading is "state" <br><br>
- <code>
- attr <device> valueFn {if ($DEVICE eq "Dum.Energy" && $READING eq "TotalConsumption"){$UNIT="W";}}
- </code><br>
- # set the unit of device "Dum.Energy" to "W" if reading is "TotalConsumption" <br><br>
- </ul>
- </ul>
- <br>
-
- <ul><b>verbose4Devs</b>
- <ul>
- <code>
- attr <device> verbose4Devs <device1>,<device2>,<device..>
- </code><br>
-
- If verbose level 4 is used, only output of devices set in this attribute will be reported in FHEM central logfile. If this attribute
- isn't set, output of all relevant devices will be reported if using verbose level 4.
- The given devices are evaluated as Regex. <br>
-
- <b>Example</b> <br>
- <code>
- attr <device> verbose4Devs sys.*,.*5000.*,Cam.*,global
- </code><br>
- # The devices starting with "sys", "Cam" respectively devices are containing "5000" in its name and the device "global" will be reported in FHEM
- central Logfile if verbose=4 is set. <br>
- </ul>
- </ul>
- <br>
- </ul>
- <p><a name="DbRep"></a>
- <h3>DbRep</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#DbRep'>DE</a>]</div>
- <ul>
- <br>
- 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
- 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>
-
- All database operations are implemented nonblocking. Optional the execution time of SQL-statements in background can also be determined and provided as reading.
- (refer to <a href="#DbRepattr">attributes</a>). <br>
- All existing readings will be deleted when a new operation starts. By attribute "readingPreventFromDel" a comma separated list of readings which are should prevent
- from deletion can be provided. <br><br>
-
- Currently the following functions are provided: <br><br>
-
- <ul><ul>
- <li> Selection of all datasets within adjustable time limits. </li>
- <li> Exposure of datasets of a Device/Reading-combination within adjustable time limits. </li>
- <li> Selection of datasets by usage of dynamically calclated time limits at execution time. </li>
- <li> Highlighting doublets when select and display datasets (fetchrows) </li>
- <li> Calculation of quantity of datasets of a Device/Reading-combination within adjustable time limits and several aggregations. </li>
- <li> The calculation of summary-, difference-, maximum-, minimum- and averageValues of numeric readings within adjustable time limits and several aggregations. </li>
- <li> write back results of summary-, difference-, maximum-, minimum- and average calculation into the database </li>
- <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>
- <li> export of datasets to file (CSV-format). </li>
- <li> import of datasets from file (CSV-Format). </li>
- <li> rename of device/readings in datasets </li>
- <li> change of reading values in the database </li>
- <li> automatic rename of device names in datasets and other DbRep-definitions after FHEM "rename" command (see <a href="#DbRepAutoRename">DbRep-Agent</a>) </li>
- <li> Execution of arbitrary user specific SQL-commands </li>
- <li> creation of backups of the database in running state non-blocking (MySQL, SQLite) </li>
- <li> transfer dumpfiles to a FTP server after backup incl. version control</li>
- <li> restore of SQLite-dumps and MySQL serverSide-backups non-blocking </li>
- <li> optimize the connected database (optimizeTables, vacuum) </li>
- <li> report of existing database processes (MySQL) </li>
- <li> purge content of current-table </li>
- <li> fill up the current-table with a (tunable) extract of the history-table</li>
- <li> delete consecutive datasets with different timestamp but same values (clearing up consecutive doublets) </li>
- <li> Repair of a corrupted SQLite database ("database disk image is malformed") </li>
- <li> transmission of datasets from source database into another (Standby) database (syncStandby) </li>
- </ul></ul>
- <br>
-
- 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.
- Please read more in section <a href="#DbRepAutoRename">DbRep-Agent</a> . <br><br>
-
- DbRep provides a UserExit function. By that interface the user can execute own program code dependent from free
- definable Reading/Value-combinations (Regex). The interface works without respectively independent from event
- generation.
- Further informations you can find as described at <a href="#DbRepattr">attribute</a> "userExitFn". <br><br>
-
- FHEM-Forum: <br>
- <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>
-
- <br>
-
- <b>Preparations </b> <br><br>
-
- The module requires the usage of a DbLog instance and the credentials of the database definition will be used. <br>
- Only the content of table "history" will be included if isn't other is explained. <br><br>
-
- Overview which other Perl-modules DbRep is using: <br><br>
-
- Net::FTP (only if FTP-Transfer after database dump is used) <br>
- Net::FTPSSL (only if FTP-Transfer with encoding after database dump is used) <br>
- POSIX <br>
- Time::HiRes <br>
- Time::Local <br>
- Scalar::Util <br>
- DBI <br>
- Color (FHEM-module) <br>
- IO::Compress::Gzip <br>
- IO::Uncompress::Gunzip <br>
- Blocking (FHEM-module) <br><br>
-
- Due to performance reason the following index should be created in addition: <br>
- <code>
- CREATE INDEX Report_Idx ON `history` (TIMESTAMP, READING) USING BTREE;
- </code>
- </ul>
- <br>
- <a name="DbRepdefine"></a>
- <b>Definition</b>
- <br>
- <ul>
- <code>
- define <name> DbRep <name of DbLog-instance>
- </code>
-
- <br><br>
- (<name of DbLog-instance> - name of the database instance which is wanted to analyze needs to be inserted)
- </ul>
- <br><br>
- <a name="DbRepset"></a>
- <b>Set </b>
- <ul>
- Currently following set-commands are included. They are used to trigger the evaluations and define the evaluation option option itself.
- The criteria of searching database content and determine aggregation is carried out by setting several <a href="#DbRepattr">attributes</a>.
- <br><br>
-
- <ul><ul>
- <li><b> averageValue [display | writeToDB]</b>
- - calculates the average value of database column "VALUE" between period given by
- timestamp-<a href="#DbRepattr">attributes</a> which are set.
- The reading to evaluate must be specified by attribute "reading". <br>
- By attribute "averageCalcForm" the calculation variant for average determination will be configured.
- At the moment the following methods are implemented: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>avgArithmeticMean</b> </td><td>: the arithmetic average is calculated (default) </td></tr>
- <tr><td> <b>avgDailyMeanGWS</b> </td><td>: calculates the daily medium temperature according the
- <a href='https://www.dwd.de/DE/leistungen/klimadatendeutschland/beschreibung_tagesmonatswerte.html'>specifications</a> of german weather service. <br>
- This variant uses aggregation "day" automatically. </td></tr>
- <tr><td> <b>avgTimeWeightMean</b> </td><td>: calcultes a time weighted average mean value is calculated </td></tr>
- </table>
- </ul>
- <br>
-
- Is no or the option "display" specified, the results are only displayed. Using
- option "writeToDB" the calculated results are stored in the database with a new reading
- name. <br>
- The new readingname is built of a prefix and the original reading name.
- The prefix is made up of the creation function and the aggregation. <br>
- The timestamp of the new stored readings is deviated from aggregation period,
- unless no unique point of time of the result can be determined.
- The field "EVENT" will be filled with "calculated".<br><br>
-
- <ul>
- <b>Example of building a new reading name from the original reading "totalpac":</b> <br>
- avgam_day_totalpac <br>
- # <creation function>_<aggregation>_<original reading> <br>
- </ul>
- </li><br>
-
- <li><b> cancelDump </b> - stops a running database dump. </li> <br>
-
- <li><b> changeValue </b> - changes the saved value of readings.
- If the selection is limited to particular device/reading-combinations by
- <a href="#DbRepattr">attribute</a> "device" respectively "reading", it is considered as well
- as possibly defined time limits by time attributes (time.*). <br>
- If no limits are set, the whole database is scanned and the specified value will be
- changed. <br><br>
-
- <ul>
- <b>Syntax: </b> <br>
- set <name> changeValue "<old string>","<new string>" <br><br>
-
- The strings have to be quoted and separated by comma.
- A "string" can be: <br>
-
- <pre>
- <old string> : * a simple string with/without spaces, e.g. "OL 12"
- * a string with usage of SQL-wildcard, e.g. "%OL%"
-
- <new string> : * a simple string with/without spaces, e.g. "12 kWh"
- * Perl code embedded in {}, e.g. {$VALUE = (split(",",$VALUE))[1]}.
- The perl expression the variables $VALUE and $UNIT are committed to. The variables are changable within
- the perl code. The returned value of VALUE and UNIT are saved into the database field
- VALUE respectively UNIT of the dataset.
- </pre>
-
- <b>Examples: </b> <br>
- set <name> changeValue "OL","12 OL" <br>
- # the old field value "OL" is changed to "12 OL". <br><br>
-
- set <name> changeValue "%OL%","12 OL" <br>
- # contains the field VALUE the substring "OL", it is changed to "12 OL". <br><br>
-
- set <name> changeValue "12 kWh","{$VALUE,$UNIT = split(" ",$VALUE)}" <br>
- # the old field value "12 kWh" is splitted to VALUE=12 and UNIT=kWh and saved into the database fields <br><br>
- set <name> changeValue "24%","{$VALUE = (split(" ",$VALUE))[0]}" <br>
- # if the old field value begins with "24", it is splitted and VALUE=24 is saved (e.g. "24 kWh")
- <br><br>
-
- Summarized the relevant attributes to control function changeValue are: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>device</b> </td><td>: selection only of datasets which contain <device> </td></tr>
- <tr><td> <b>reading</b> </td><td>: selection only of datasets which contain <reading> </td></tr>
- <tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
- <tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or perl-routine) before start of changeValue </td></tr>
- <tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after changeValue is finished </td></tr>
- </table>
- </ul>
- <br>
- <br>
-
- <b>Note:</b> <br>
- Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
- is operating in asynchronous mode to avoid FHEMWEB from blocking. <br><br>
- </li> <br>
- </ul>
-
- <li><b> countEntries [history|current] </b> - provides the number of table-entries (default: history) between period set
- by timestamp-<a href="#DbRepattr">attributes</a> if set.
- If timestamp-attributes are not set, all entries of the table will be count.
- The <a href="#DbRepattr">attributes</a> "device" and "reading" can be used to
- limit the evaluation. </li> <br>
-
-
- <li><b> delEntries </b> - deletes all database entries or only the database entries specified by <a href="#DbRepattr">attributes</a> Device and/or
- Reading and the entered time period between "timestamp_begin", "timestamp_end" (if set) or "timeDiffToNow/timeOlderThan". <br><br>
-
- <ul>
- "timestamp_begin" is set: deletes db entries <b>from</b> this timestamp until current date/time <br>
- "timestamp_end" is set : deletes db entries <b>until</b> this timestamp <br>
- both Timestamps are set : deletes db entries <b>between</b> these timestamps <br><br>
-
- Due to security reasons the attribute <a href="#DbRepattr">attribute</a> "allowDeletion" needs to be set to unlock the
- delete-function. <br>
- </li>
- <br>
- </ul>
-
- <li><b> delSeqDoublets [adviceRemain | adviceDelete | delete]</b> - show respectively delete identical sequentially datasets.
- Therefore Device,Reading and Value of the sequentially datasets are compared.
- Not deleted are the first und the last dataset of a aggregation period (e.g. hour,day,week and so on) as
- well as the datasets before or after a value change (database field VALUE). <br>
- The <a href="#DbRepattr">attributes</a> to define the scope of aggregation,time period, device and reading are
- considered. If attribute aggregation is not set or set to "no", it will change to the default aggregation
- period "day". For datasets containing numerical values it is possible to determine a variance with <a href="#DbRepattr">attribute</a>
- "seqDoubletsVariance". Up to this value consecutive numerical datasets are handled as identical and should be
- deleted.
- <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>adviceRemain</b> </td><td>: simulates the remaining datasets in database after delete-operation (nothing will be deleted !) </td></tr>
- <tr><td> <b>adviceDelete</b> </td><td>: simulates the datasets to delete in database (nothing will be deleted !) </td></tr>
- <tr><td> <b>delete</b> </td><td>: deletes the consecutive doublets (see example) </td></tr>
- </table>
- </ul>
- <br>
- Due to security reasons the attribute <a href="#DbRepattr">attribute</a> "allowDeletion" needs to be set for
- execute the "delete" option. <br>
- The amount of datasets to show by commands "delSeqDoublets adviceDelete", "delSeqDoublets adviceRemain" is
- initially limited (default: 1000) and can be adjusted by <a href="#DbRepattr">attribute</a> "limit".
- The adjustment of "limit" has no impact to the "delSeqDoublets delete" function, but affects <b>ONLY</b> the
- display of the data. <br>
- Before and after this "delSeqDoublets" it is possible to execute a FHEM command or Perl-script
- (please see <a href="#DbRepattr">attributes</a> "executeBeforeProc" and "executeAfterProc").
- <br><br>
-
- <ul>
- <b>Example</b> - the remaining datasets after executing delete-option are are marked as <b>bold</b>: <br><br>
- <ul>
- <b>2017-11-25_00-00-05__eg.az.fridge_Pwr__power 0 </b> <br>
- 2017-11-25_00-02-26__eg.az.fridge_Pwr__power 0 <br>
- 2017-11-25_00-04-33__eg.az.fridge_Pwr__power 0 <br>
- 2017-11-25_01-06-10__eg.az.fridge_Pwr__power 0 <br>
- <b>2017-11-25_01-08-21__eg.az.fridge_Pwr__power 0 </b> <br>
- <b>2017-11-25_01-08-59__eg.az.fridge_Pwr__power 60.32 </b> <br>
- <b>2017-11-25_01-11-21__eg.az.fridge_Pwr__power 56.26 </b> <br>
- <b>2017-11-25_01-27-54__eg.az.fridge_Pwr__power 6.19 </b> <br>
- <b>2017-11-25_01-28-51__eg.az.fridge_Pwr__power 0 </b> <br>
- 2017-11-25_01-31-00__eg.az.fridge_Pwr__power 0 <br>
- 2017-11-25_01-33-59__eg.az.fridge_Pwr__power 0 <br>
- <b>2017-11-25_02-39-29__eg.az.fridge_Pwr__power 0 </b> <br>
- <b>2017-11-25_02-41-18__eg.az.fridge_Pwr__power 105.28</b> <br>
- <b>2017-11-25_02-41-26__eg.az.fridge_Pwr__power 61.52 </b> <br>
- <b>2017-11-25_03-00-06__eg.az.fridge_Pwr__power 47.46 </b> <br>
- <b>2017-11-25_03-00-33__eg.az.fridge_Pwr__power 0 </b> <br>
- 2017-11-25_03-02-07__eg.az.fridge_Pwr__power 0 <br>
- 2017-11-25_23-37-42__eg.az.fridge_Pwr__power 0 <br>
- <b>2017-11-25_23-40-10__eg.az.fridge_Pwr__power 0 </b> <br>
- <b>2017-11-25_23-42-24__eg.az.fridge_Pwr__power 1 </b> <br>
- 2017-11-25_23-42-24__eg.az.fridge_Pwr__power 1 <br>
- <b>2017-11-25_23-45-27__eg.az.fridge_Pwr__power 1 </b> <br>
- <b>2017-11-25_23-47-07__eg.az.fridge_Pwr__power 0 </b> <br>
- 2017-11-25_23-55-27__eg.az.fridge_Pwr__power 0 <br>
- <b>2017-11-25_23-48-15__eg.az.fridge_Pwr__power 0 </b> <br>
- <b>2017-11-25_23-50-21__eg.az.fridge_Pwr__power 59.1 </b> <br>
- <b>2017-11-25_23-55-14__eg.az.fridge_Pwr__power 52.31 </b> <br>
- <b>2017-11-25_23-58-09__eg.az.fridge_Pwr__power 51.73 </b> <br>
- </ul>
- </ul>
-
- </li>
- <br>
- <br>
-
- <li><b> deviceRename </b> - renames the device name of a device inside the connected database (Internal DATABASE).
- The devicename will allways be changed in the <b>entire</b> database. Possibly set time limits or restrictions by
- <a href="#DbRepattr">attributes</a> device and/or reading will not be considered. <br><br>
-
- <ul>
- <b>Example: </b> <br>
- set <name> deviceRename <old device name>,<new device name> <br>
- # The amount of renamed device names (datasets) will be displayed in reading "device_renamed". <br>
- # If the device name to be renamed was not found in the database, a WARNUNG will appear in reading "device_not_renamed". <br>
- # Appropriate entries will be written to Logfile if verbose >= 3 is set.
- <br><br>
-
- <b>Note:</b> <br>
- Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
- is operating in asynchronous mode to avoid FHEMWEB from blocking. <br><br>
- </li> <br>
- </ul>
-
- <li><b> diffValue [display | writeToDB]</b>
- - calculates the difference of database column "VALUE" between period given by
- <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or "timeDiffToNow / timeOlderThan".
- The reading to evaluate must be defined using attribute "reading".
- This function is mostly reasonable if readingvalues are increasing permanently and don't write value-differences to the database.
- The difference will be generated from the first available dataset (VALUE-Field) to the last available dataset between the
- specified time linits/aggregation, in which a balanced difference value of the previous aggregation period will be transfered to the
- following aggregation period in case this period contains a value. <br>
- An possible counter overrun (restart with value "0") will be considered (compare <a href="#DbRepattr">attribute</a> "diffAccept"). <br><br>
-
- If only one dataset will be found within the evalution period, the difference can be calculated only in combination with the balanced
- difference of the previous aggregation period. In this case a logical inaccuracy according the assignment of the difference to the particular aggregation period
- can be possible. Hence in warning in "state" will be placed and the reading "less_data_in_period" with a list of periods
- with only one dataset found in it will be created.
- <br><br>
-
- <ul>
- <b>Note: </b><br>
- Within the evaluation respectively aggregation period (day, week, month, etc.) you should make available at least one dataset
- at the beginning and one dataset at the end of each aggregation period to take the difference calculation as much as possible.
- <br>
- <br>
- </ul>
-
- Is no or the option "display" specified, the results are only displayed. Using
- option "writeToDB" the calculation results are stored in the database with a new reading
- name. <br>
- The new readingname is built of a prefix and the original reading name.
- The prefix is made up of the creation function and the aggregation. <br>
- The timestamp of the new stored readings is deviated from aggregation period,
- unless no unique point of time of the result can be determined.
- The field "EVENT" will be filled with "calculated".<br><br>
-
- <ul>
- <b>Example of building a new reading name from the original reading "totalpac":</b> <br>
- diff_day_totalpac <br>
- # <creation function>_<aggregation>_<original reading> <br>
- </ul>
- </li><br>
-
- <li><b> dumpMySQL [clientSide | serverSide]</b>
- - creates a dump of the connected MySQL database. <br>
- Depending from selected option the dump will be created on Client- or on Server-Side. <br>
- The variants differs each other concerning the executing system, the creating location, the usage of
- attributes, the function result and the needed hardware ressources. <br>
- The option "clientSide" e.g. needs more powerful FHEM-Server hardware, but saves all available
- tables inclusive possibly created views. <br>
- With attribute "dumpCompress" a compression of dump file after creation can be switched on.
- <br><br>
-
- <ul>
- <b><u>Option clientSide</u></b> <br>
- The dump will be created by client (FHEM-Server) and will be saved in FHEM log-directory by
- default.
- The target directory can be set by <a href="#DbRepattr">attribute</a> "dumpDirLocal" and has to be
- writable by the FHEM process. <br>
- Before executing the dump a table optimization can be processed optionally (see attribute
- "optimizeTablesBeforeDump") as well as a FHEM-command (attribute "executeBeforeProc").
- After the dump a FHEM-command can be executed as well (see attribute "executeAfterProc"). <br><br>
-
- <b>Note: <br>
- To avoid FHEM from blocking, you have to operate DbLog in asynchronous mode if the table
- optimization want to be used ! </b> <br><br>
-
- By the <a href="#DbRepattr">attributes</a> "dumpMemlimit" and "dumpSpeed" the run-time behavior of the function can be
- controlled to optimize the performance and demand of ressources. <br><br>
- The attributes relevant for function "dumpMySQL clientSide" are: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> dumpComment </td><td>: User comment in head of dump file </td></tr>
- <tr><td> dumpCompress </td><td>: compress of dump files after creation </td></tr>
- <tr><td> dumpDirLocal </td><td>: the local destination directory for dump file creation </td></tr>
- <tr><td> dumpMemlimit </td><td>: limits memory usage </td></tr>
- <tr><td> dumpSpeed </td><td>: limits CPU utilization </td></tr>
- <tr><td> dumpFilesKeep </td><td>: number of dump files to keep </td></tr>
- <tr><td> executeBeforeProc </td><td>: execution of FHEM command (or perl-routine) before dump </td></tr>
- <tr><td> executeAfterProc </td><td>: execution of FHEM command (or perl-routine) after dump </td></tr>
- <tr><td> optimizeTablesBeforeDump </td><td>: table optimization before dump </td></tr>
- </table>
- </ul>
- <br>
-
- After a successfull finished dump the old dumpfiles are deleted and only the number of files
- defined by attribute "dumpFilesKeep" (default: 3) remain in the target directory
- "dumpDirLocal". If "dumpFilesKeep = 0" is set, all
- dumpfiles (also the current created file), are deleted. This setting can be helpful, if FTP transmission is used
- and the created dumps are only keep remain in the FTP destination directory. <br><br>
- The <b>naming convention of dump files</b> is: <dbname>_<date>_<time>.sql[.gzip] <br><br>
-
- The created dumpfile may imported on the MySQL-Server by e.g.: <br><br>
-
- <ul>
- mysql -u <user> -p <dbname> < <filename>.sql <br><br>
- </ul>
-
- to restore the database from the dump. <br><br><br>
-
-
- <b><u>Option serverSide</u></b> <br>
- The dump will be created on the MySQL-Server and will be saved in its Home-directory
- by default. <br>
- The whole history-table (not the current-table) will be exported <b>CSV-formatted</b> without
- any restrictions. <br>
-
- Before executing the dump a table optimization can be processed optionally (see attribute
- "optimizeTablesBeforeDump") as well as a FHEM-command (attribute "executeBeforeProc"). <br><br>
-
- <b>Note: <br>
- To avoid FHEM from blocking, you have to operate DbLog in asynchronous mode if the table
- optimization want to be used ! </b> <br><br>
-
- After the dump a FHEM-command can be executed as well (see attribute "executeAfterProc"). <br><br>
-
- The attributes relevant for function "dumpMySQL serverSide" are: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> dumpDirRemote </td><td>: destination directory of dump file on remote server </td></tr>
- <tr><td> dumpCompress </td><td>: compress of dump files after creation </td></tr>
- <tr><td> dumpDirLocal </td><td>: the local mounted directory dumpDirRemote </td></tr>
- <tr><td> dumpFilesKeep </td><td>: number of dump files to keep </td></tr>
- <tr><td> executeBeforeProc </td><td>: execution of FHEM command (or perl-routine) before dump </td></tr>
- <tr><td> executeAfterProc </td><td>: execution of FHEM command (or perl-routine) after dump </td></tr>
- <tr><td> optimizeTablesBeforeDump </td><td>: table optimization before dump </td></tr>
- </table>
- </ul>
- <br>
-
- The target directory can be set by <a href="#DbRepattr">attribute</a> "dumpDirRemote".
- It must be located on the MySQL-Host and has to be writable by the MySQL-server process. <br>
- The used database user must have the "FILE"-privilege. <br><br>
-
- <b>Note:</b> <br>
- If the internal version management of DbRep should be used and the size of the created dumpfile be
- reported, you have to mount the remote MySQL-Server directory "dumpDirRemote" on the client
- and publish it to the DbRep-device by fill out the <a href="#DbRepattr">attribute</a>
- "dumpDirLocal". <br>
- Same is necessary if ftp transfer after dump is to be used (attribute "ftpUse" respectively "ftpUseSSL").
- <br><br>
- <ul>
- <b>Example: </b> <br>
- attr <name> dumpDirRemote /volume1/ApplicationBackup/dumps_FHEM/ <br>
- attr <name> dumpDirLocal /sds1/backup/dumps_FHEM/ <br>
- attr <name> dumpFilesKeep 2 <br><br>
-
- # The dump will be created remote on the MySQL-Server in directory
- '/volume1/ApplicationBackup/dumps_FHEM/'. <br>
- # The internal version management searches in local mounted directory '/sds1/backup/dumps_FHEM/'
- for present dumpfiles and deletes these files except the last two versions. <br>
- <br>
- </ul>
-
- If the internal version management is used, after a successfull finished dump old dumpfiles will
- be deleted and only the number of attribute "dumpFilesKeep" (default: 3) would remain in target
- directory "dumpDirLocal" (the mounted "dumpDirRemote").
- In that case FHEM needs write permissions to the directory "dumpDirLocal". <br><br>
- The <b>naming convention of dump files</b> is: <dbname>_<date>_<time>.csv[.gzip] <br><br>
-
- You can start a restore of table history from serverSide-Backup by command: <br><br>
- <ul>
- set <name> <restoreMySQL> <filename>.csv[.gzip] <br><br>
- </ul>
-
- <br><br>
- <b><u>FTP-Transfer after Dump</u></b> <br>
- If those possibility is be used, the <a href="#DbRepattr">attribute</a> "ftpUse" or
- "ftpUseSSL" has to be set. The latter if encoding for FTP is to be used.
- The module also carries the version control of dump files in FTP-destination by attribute
- "ftpDumpFilesKeep". <br>
- Further <a href="#DbRepattr">attributes</a> are: <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> ftpUse </td><td>: FTP Transfer after dump will be switched on (without SSL encoding) </td></tr>
- <tr><td> ftpUser </td><td>: User for FTP-server login, default: anonymous </td></tr>
- <tr><td> ftpUseSSL </td><td>: FTP Transfer with SSL encoding after dump </td></tr>
- <tr><td> ftpDebug </td><td>: debugging of FTP communication for diagnostics </td></tr>
- <tr><td> ftpDir </td><td>: directory on FTP-server in which the file will be send into (default: "/") </td></tr>
- <tr><td> ftpDumpFilesKeep </td><td>: leave the number of dump files in FTP-destination <ftpDir> (default: 3) </td></tr>
- <tr><td> ftpPassive </td><td>: set if passive FTP is to be used </td></tr>
- <tr><td> ftpPort </td><td>: FTP-Port, default: 21 </td></tr>
- <tr><td> ftpPwd </td><td>: password of FTP-User, not set by default </td></tr>
- <tr><td> ftpServer </td><td>: name or IP-address of FTP-server. <b>absolutely essential !</b> </td></tr>
- <tr><td> ftpTimeout </td><td>: timeout of FTP-connection in seconds (default: 30). </td></tr>
- </table>
- </ul>
- <br>
- <br>
- </ul>
-
- </li><br>
-
- <li><b> dumpSQLite </b> - creates a dump of the connected SQLite database. <br>
- This function uses the SQLite Online Backup API and allow to create a consistent backup of the
- database during the normal operation.
- The dump will be saved in FHEM log-directory by default.
- The target directory can be defined by <a href="#DbRepattr">attribute</a> "dumpDirLocal" and
- has to be writable by the FHEM process. <br>
- Before executing the dump a table optimization can be processed optionally (see attribute
- "optimizeTablesBeforeDump").
- <br><br>
-
- <b>Note: <br>
- To avoid FHEM from blocking, you have to operate DbLog in asynchronous mode if the table
- optimization want to be used ! </b> <br><br>
-
- Before and after the dump a FHEM-command can be executed (see attribute "executeBeforeProc",
- "executeAfterProc"). <br><br>
-
- The attributes relevant for function "dumpMySQL serverSide" are: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> dumpCompress </td><td>: compress of dump files after creation </td></tr>
- <tr><td> dumpDirLocal </td><td>: the local mounted directory dumpDirRemote </td></tr>
- <tr><td> dumpFilesKeep </td><td>: number of dump files to keep </td></tr>
- <tr><td> executeBeforeProc </td><td>: execution of FHEM command (or perl-routine) before dump </td></tr>
- <tr><td> executeAfterProc </td><td>: execution of FHEM command (or perl-routine) after dump </td></tr>
- <tr><td> optimizeTablesBeforeDump </td><td>: table optimization before dump </td></tr>
- </table>
- </ul>
- <br>
-
- After a successfull finished dump the old dumpfiles are deleted and only the number of attribute
- "dumpFilesKeep" (default: 3) remain in the target directory "dumpDirLocal". If "dumpFilesKeep = 0" is set, all
- dumpfiles (also the current created file), are deleted. This setting can be helpful, if FTP transmission is used
- and the created dumps are only keep remain in the FTP destination directory. <br><br>
- The <b>naming convention of dump files</b> is: <dbname>_<date>_<time>.sqlitebkp[.gzip] <br><br>
-
- The database can be restored by command "set <name> restoreSQLite <filename>" <br>
- The created dump file can be transfered to a FTP-server. Please see explanations about FTP-
- transfer in topic "dumpMySQL". <br><br>
- </li><br>
-
- <li><b> eraseReadings </b> - deletes all created readings in the device, except reading "state" and readings, which are
- contained in exception list defined by attribute "readingPreventFromDel".
- </li><br>
-
- <li><b> exportToFile </b> - exports DB-entries to a file in CSV-format of time period set by time attributes.
- Limitations of selections can be set by <a href="#DbRepattr">attributes</a> Device and/or Reading.
- The filename will be defined by <a href="#DbRepattr">attribute</a> "expimpfile". <br>
- By setting attribute "aggregation" the export of datasets will be splitted into time slices
- recording the specified aggregation.
- Is, for example, "aggregation = month" set, the data are selected in monthly packets and written
- into the exportfile. Thereby the usage of main memory is optimized if very large amount of data
- is exported and avoid the "died prematurely" error.
- </li> <br>
-
- <li><b> fetchrows [history|current] </b>
- - provides <b>all</b> table entries (default: history)
- of time period set by time <a href="#DbRepattr">attributes</a> respectively selection conditions
- by attributes "device" and "reading".
- An aggregation set will <b>not</b> be considered. <br>
- The direction of data selection can be determined by <a href="#DbRepattr">attribute</a>
- "fetchRoute". <br><br>
-
- Every reading of result is composed of the dataset timestring , an index, the device name
- and the reading name.
- The function has the capability to reconize multiple occuring datasets (doublets).
- Such doublets are marked by an index > 1. <br>
- Doublets can be highlighted in terms of color by setting attribut e"fetchMarkDuplicates". <br><br>
-
- <b>Note:</b> <br>
- Highlighted readings are not displayed again after restart or rereadcfg because of they are not
- saved in statefile. <br><br>
-
- This attribute is preallocated with some colors, but can be changed by colorpicker-widget: <br><br>
-
- <ul>
- <code>
- attr <DbRep-Device> widgetOverride fetchMarkDuplicates:colorpicker
- </code>
- </ul>
- <br>
-
- The readings of result are composed like the following sceme: <br><br>
-
- <ul>
- <b>Example:</b> <br>
- 2017-10-22_03-04-43__1__SMA_Energymeter__Bezug_WirkP_Kosten_Diff <br>
- # <date>_<time>__<index>__<device>__<reading>
- </ul>
- <br>
- For a better overview the relevant attributes are listed here in a table: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>fetchRoute</b> </td><td>: direction of selection read in database </td></tr>
- <tr><td> <b>limit</b> </td><td>: limits the number of datasets to select and display </td></tr>
- <tr><td> <b>fetchMarkDuplicates</b> </td><td>: Highlighting of found doublets </td></tr>
- <tr><td> <b>device</b> </td><td>: select only datasets which are contain <device> </td></tr>
- <tr><td> <b>reading</b> </td><td>: select only datasets which are contain <reading> </td></tr>
- <tr><td> <b>time.*</b> </td><td>: A number of attributes to limit selection by time </td></tr>
- </table>
- </ul>
- <br>
- <br>
- <b>Note:</b> <br>
- Although the module is designed non-blocking, a huge number of selection result (huge number of rows)
- can overwhelm the browser session respectively FHEMWEB.
- Due to the sample space can be limited by <a href="#DbRepattrlimit">attribute</a> "limit".
- Of course ths attribute can be increased if your system capabilities allow a higher workload. <br><br>
- </li> <br>
-
- <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>
-
- <ul>
- <b>input format: </b> Date,Time,Value,[Unit] <br>
- # Unit is optional, attributes of device, reading must be set ! <br>
- # If "Value=0" has to be inserted, use "Value = 0.0" to do it. <br><br>
-
- <b>example:</b> 2016-08-01,23:00:09,TestValue,TestUnit <br>
- # Spaces are NOT allowed in fieldvalues ! <br>
- <br>
-
- <b>Note: </b><br>
- Please consider to insert AT LEAST two datasets into the intended time / aggregatiom period (day, week, month, etc.) because of
- it's needed by function diffValue. Otherwise no difference can be calculated and diffValue will be print out "0" for the respective period !
- <br>
- <br>
- </li>
- </ul>
-
- <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>
-
- <ul>
- <b>dataset format: </b> "TIMESTAMP","DEVICE","TYPE","EVENT","READING","VALUE","UNIT" <br><br>
- # The fields "TIMESTAMP","DEVICE","TYPE","EVENT","READING" and "VALUE" have to be set. The field "UNIT" is optional.
- The file content will be imported transactional. That means all of the content will be imported or, in case of error, nothing of it.
- 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.
- It could lead to blocking or overload FHEM ! <br><br>
-
- <b>Example: </b> "2016-09-25 08:53:56","STP_5000","SMAUTILS","etotal: 11859.573","etotal","11859.573","" <br>
- <br>
- </li> <br>
- </ul>
-
- <li><b> maxValue [display | writeToDB]</b>
- - calculates the maximum value of database column "VALUE" between period given by
- <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or "timeDiffToNow / timeOlderThan".
- The reading to evaluate must be defined using attribute "reading".
- The evaluation contains the timestamp of the <b>last</b> appearing of the identified maximum value
- within the given period. <br>
-
- Is no or the option "display" specified, the results are only displayed. Using
- option "writeToDB" the calculated results are stored in the database with a new reading
- name. <br>
- The new readingname is built of a prefix and the original reading name.
- The prefix is made up of the creation function and the aggregation. <br>
- The timestamp of the new stored readings is deviated from aggregation period,
- unless no unique point of time of the result can be determined.
- The field "EVENT" will be filled with "calculated".<br><br>
-
- <ul>
- <b>Example of building a new reading name from the original reading "totalpac":</b> <br>
- max_day_totalpac <br>
- # <creation function>_<aggregation>_<original reading> <br>
- </ul>
- </li><br>
-
- <li><b> minValue [display | writeToDB]</b>
- - calculates the minimum value of database column "VALUE" between period given by
- <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or "timeDiffToNow / timeOlderThan".
- The reading to evaluate must be defined using attribute "reading".
- The evaluation contains the timestamp of the <b>first</b> appearing of the identified minimum
- value within the given period. <br>
-
- Is no or the option "display" specified, the results are only displayed. Using
- option "writeToDB" the calculated results are stored in the database with a new reading
- name. <br>
- The new readingname is built of a prefix and the original reading name.
- The prefix is made up of the creation function and the aggregation. <br>
- The timestamp of the new stored readings is deviated from aggregation period,
- unless no unique point of time of the result can be determined.
- The field "EVENT" will be filled with "calculated".<br><br>
-
- <ul>
- <b>Example of building a new reading name from the original reading "totalpac":</b> <br>
- min_day_totalpac <br>
- # <creation function>_<aggregation>_<original reading> <br>
- </ul>
- </li><br>
- <li><b> optimizeTables </b> - optimize tables in the connected database (MySQL). <br>
- Before and after an optimization it is possible to execute a FHEM command.
- (please see <a href="#DbRepattr">attributes</a> "executeBeforeProc", "executeAfterProc")
- <br><br>
-
- <ul>
- <b>Note:</b> <br>
- Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
- is operating in asynchronous mode to avoid FHEMWEB from blocking. <br><br>
- </li><br>
- </ul>
-
- <li><b> readingRename </b> - renames the reading name of a device inside the connected database (see Internal DATABASE).
- The readingname will allways be changed in the <b>entire</b> database. Possibly set time limits or restrictions by
- <a href="#DbRepattr">attributes</a> device and/or reading will not be considered. <br><br>
-
- <ul>
- <b>Example: </b> <br>
- set <name> readingRename <old reading name>,<new reading name> <br>
- # The amount of renamed reading names (datasets) will be displayed in reading "reading_renamed". <br>
- # If the reading name to be renamed was not found in the database, a WARNUNG will appear in reading "reading_not_renamed". <br>
- # Appropriate entries will be written to Logfile if verbose >= 3 is set.
- <br><br>
-
- <b>Note:</b> <br>
- Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
- is operating in asynchronous mode to avoid FHEMWEB from blocking. <br><br>
- </li> <br>
- </ul>
- <li><b> repairSQLite </b> - repairs a corrupted SQLite database. <br>
- A corruption is usally existent when the error message "database disk image is malformed"
- appears in reading "state" of the connected DbLog-device.
- If the command was started, the connected DbLog-device will firstly disconnected from the
- database for 10 hours (36000 seconds) automatically (breakup time). After the repair is
- finished, the DbLog-device will be connected to the (repaired) database immediately. <br>
- As an argument the command can be completed by a differing breakup time (in seconds). <br>
- The corrupted database is saved as <database>.corrupt in same directory. <br><br>
-
- <ul>
- <b>Example: </b><br>
- set <name> repairSQLite <br>
- # the database is trying to repair, breakup time is 10 hours <br>
- set <name> repairSQLite 600 <br>
- # the database is trying to repair, breakup time is 10 minutes
- <br><br>
-
- <b>Note:</b> <br>
- It can't be guaranteed, that the repair attempt proceed successfully and no data loss will result.
- Depending from corruption severity data loss may occur or the repair will fail even though
- no error appears during the repair process. Please make sure a valid backup took place ! <br><br>
- </li> <br>
- </ul>
-
- <li><b> restoreMySQL <file>.csv[.gzip] </b> - imports the content of table history from a serverSide-backup. <br>
- The function provides a drop-down-list of files which can be used for restore.
- Therefore you have to mount the remote directory "dumpDirRemote" of the MySQL-Server on the
- Client and make it usable to the DbRep-device by setting the <a href="#DbRepattr">attribute</a>
- "dumpDirLocal". <br>
- All files with extension "csv[.gzip]" and if the filename is beginning with the name of the connected database
- (see Internal DATABASE) are listed. <br><br>
- </li><br>
-
- <li><b> restoreSQLite <File>.sqlitebkp[.gzip] </b> - restores a backup of SQLite database. <br>
- The function provides a drop-down-list of files which can be used for restore.
- The data stored in the current database are deleted respectively overwritten.
- All files with extension "sqlitebkp[.gzip]" and if the filename is beginning with the name of the connected database
- will are listed. <br><br>
- </li><br>
- <li><b> sqlCmd </b> - executes an arbitrary user specific command. <br>
- If the command contains a operation to delete data, the <a href="#DbRepattr">attribute</a>
- "allowDeletion" has to be set for security reason. <br>
- The statement doesn't consider limitations by attributes "device", "reading", "time.*"
- respectively "aggregation". <br>
- If the <a href="#DbRepattr">attribute</a> "timestamp_begin" respectively "timestamp_end"
- is assumed in the statement, it is possible to use placeholder "<b>§timestamp_begin§</b>" respectively
- "<b>§timestamp_end§</b>" on suitable place. <br><br>
-
- If you want update a dataset, you have to add "TIMESTAMP=TIMESTAMP" to the update-statement to avoid changing the
- original timestamp. <br><br>
-
- <ul>
- <b>Examples of SQL-statements: </b> <br><br>
- <ul>
- <li>set <name> sqlCmd select DEVICE, count(*) from history where TIMESTAMP >= "2017-01-06 00:00:00" group by DEVICE having count(*) > 800 </li>
- <li>set <name> sqlCmd select DEVICE, count(*) from history where TIMESTAMP >= "2017-05-06 00:00:00" group by DEVICE </li>
- <li>set <name> sqlCmd select DEVICE, count(*) from history where TIMESTAMP >= §timestamp_begin§ group by DEVICE </li>
- <li>set <name> sqlCmd select * from history where DEVICE like "Te%t" order by `TIMESTAMP` desc </li>
- <li>set <name> sqlCmd select * from history where `TIMESTAMP` > "2017-05-09 18:03:00" order by `TIMESTAMP` desc </li>
- <li>set <name> sqlCmd select * from current order by `TIMESTAMP` desc </li>
- <li>set <name> 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>
- <li>set <name> sqlCmd delete from current </li>
- <li>set <name> sqlCmd delete from history where TIMESTAMP < "2016-05-06 00:00:00" </li>
- <li>set <name> sqlCmd update history set TIMESTAMP=TIMESTAMP,VALUE='Val' WHERE VALUE='TestValue' </li>
- <li>set <name> sqlCmd select * from history where DEVICE = "Test" </li>
- <li>set <name> 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>
- </ul>
- <br>
-
- The result of the statement will be shown in <a href="#DbRepReadings">Reading</a> "SqlResult".
- The formatting of result can be choosen by <a href="#DbRepattr">attribute</a> "sqlResultFormat", as well as the used
- field separator can be determined by <a href="#DbRepattr">attribute</a> "sqlResultFieldSep". <br><br>
-
- The module provides a command history once a sqlCmd command was executed successfully.
- To use this option, activate the attribute "sqlCmdHistoryLength" with list lenght you want. <br><br>
-
- For a better overview the relevant attributes for sqlCmd are listed in a table: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>allowDeletion</b> </td><td>: activates capabilty to delete datasets </td></tr>
- <tr><td> <b>sqlResultFormat</b> </td><td>: determines presentation style of command result </td></tr>
- <tr><td> <b>sqlResultFieldSep</b> </td><td>: choice of a useful field separator for result </td></tr>
- <tr><td> <b>sqlCmdHistoryLength</b> </td><td>: activates command history and length </td></tr>
- </table>
- </ul>
- <br>
- <br>
- <b>Note:</b> <br>
- Even though the module works non-blocking regarding to database operations, a huge
- sample space (number of rows/readings) could block the browser session respectively
- FHEMWEB.
- If you are unsure about the result of the statement, you should preventively add a limit to
- the statement. <br><br>
- </li><br>
- </ul>
- <li><b> sqlCmdHistory </b> - If history is activated by <a href="#DbRepattr">attribute</a> "sqlCmdHistoryLength", an already
- successfully executed sqlCmd-command can be repeated from a drop-down list. <br>
- By execution of the last list entry, "__purge_historylist__", the list itself can be deleted. <br>
- If the statement contains "," this character is displayed as "<c>" in the history
- list due to technical restrictions. <br>
- </li><br>
- <li><b> sumValue [display | writeToDB]</b>
- - calculates the summary of database column "VALUE" between period given by
- <a href="#DbRepattr">attributes</a> "timestamp_begin", "timestamp_end" or
- "timeDiffToNow / timeOlderThan". The reading to evaluate must be defined using attribute
- "reading". Using this function is mostly reasonable if value-differences of readings
- are written to the database. <br>
- Is no or the option "display" specified, the results are only displayed. Using
- option "writeToDB" the calculation results are stored in the database with a new reading
- name. <br>
- The new readingname is built of a prefix and the original reading name.
- The prefix is made up of the creation function and the aggregation. <br>
- The timestamp of the new stored readings is deviated from aggregation period,
- unless no unique point of time of the result can be determined.
- The field "EVENT" will be filled with "calculated".<br><br>
-
- <ul>
- <b>Example of building a new reading name from the original reading "totalpac":</b> <br>
- sum_day_totalpac <br>
- # <creation function>_<aggregation>_<original reading> <br>
- </li> <br>
- </ul>
- <br>
-
- <li><b> syncStandby <DbLog-Device Standby> </b>
- - datasets of the connected database (source) are transmitted into another database
- (Standby-database). <br>
- Here the "<DbLog-Device Standby>" is the DbLog-Device what is connected to the
- Standby-database. <br><br>
- All the datasets which are determined by timestamp-<a href="#DbRepattrlimit">attributes</a>
- or respectively the attributes "device", "reading" are transmitted. <br>
- The datasets are transmitted in time slices accordingly to the adjusted aggregation.
- If the attribute "aggregation" has value "no" or "month", the datasets are transmitted
- automatically in daily time slices into standby-database.
- Source- and Standby-database can be of different types.
- <br><br>
- The relevant attributes to control the syncStandby function are: <br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> <b>aggregation</b> </td><td>: adjustment of time slices for data transmission (hour,day,week) </td></tr>
- <tr><td> <b>device</b> </td><td>: transmit only datasets which are contain <device> </td></tr>
- <tr><td> <b>reading</b> </td><td>: transmit only datasets which are contain <reading> </td></tr>
- <tr><td> <b>time.*</b> </td><td>: A number of attributes to limit selection by time </td></tr>
- </table>
- </ul>
- <br>
- <br>
- </li> <br>
-
- <li><b> tableCurrentFillup </b> - the current-table will be filled u with an extract of the history-table.
- The <a href="#DbRepattr">attributes</a> for limiting time and device, reading are considered.
- Thereby the content of the extract can be affected. In the associated DbLog-device the attribute "DbLogType" should be set to
- "SampleFill/History". </li> <br>
-
- <li><b> tableCurrentPurge </b> - deletes the content of current-table. There are no limits, e.g. by attributes "timestamp_begin", "timestamp_end", device, reading
- and so on, considered. </li> <br>
- <li><b> vacuum </b> - optimize tables in the connected database (SQLite, PostgreSQL). <br>
- Before and after an optimization it is possible to execute a FHEM command.
- (please see <a href="#DbRepattr">attributes</a> "executeBeforeProc", "executeAfterProc")
- <br><br>
-
- <ul>
- <b>Note:</b> <br>
- Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
- is operating in asynchronous mode to avoid FHEM from blocking. <br><br>
- </li>
- </ul><br>
-
- <br>
- </ul></ul>
-
- <b>For all evaluation variants (except sqlCmd,deviceRename,readingRename) applies: </b> <br>
- In addition to the needed reading the device can be complemented to restrict the datasets for reporting / function.
- If no time limit attribute is set but aggregation is set, the period from the oldest dataset in database to the current
- date/time will be used as selection criterion. If the oldest dataset wasn't identified, then '1970-01-01 01:00:00' is used
- as start date (see get <name> "minTimestamp" also).
- If both time limit attribute and aggregation isn't set, the selection on database is runnung without timestamp criterion.
- <br><br>
-
- <b>Note: </b> <br>
-
- 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.
-
- <br><br>
- </ul>
- <a name="DbRepget"></a>
- <b>Get </b>
- <ul>
- The get-commands of DbRep provide to retrieve some metadata of the used database instance.
- Those are for example adjusted server parameter, server variables, datadasestatus- and table informations. THe available get-functions depending of
- the used database type. So for SQLite curently only "get svrinfo" is usable. The functions nativ are delivering a lot of outpit values.
- They can be limited by function specific <a href="#DbRepattr">attributes</a>. The filter has to be setup by a comma separated list.
- SQL-Wildcard (%) can be used to setup the list arguments.
- <br><br>
-
- <b>Note: </b> <br>
- After executing a get-funktion in detail view please make a browser refresh to see the results !
- <br><br>
-
- <ul><ul>
- <li><b> blockinginfo </b> - list the current system wide running background processes (BlockingCalls) together with their informations.
- If character string is too long (e.g. arguments) it is reported shortened.
- </li>
- <br><br>
-
- <li><b> dbstatus </b> - lists global informations about MySQL server status (e.g. informations related to cache, threads, bufferpools, etc. ).
- Initially all available informations are reported. Using the <a href="#DbRepattr">attribute</a> "showStatus" the quantity of
- results can be limited to show only the desired values. Further detailed informations of items meaning are
- explained <a href=http://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html>there</a>. <br>
-
- <br><ul>
- <b>Example</b> <br>
- get <name> dbstatus <br>
- attr <name> showStatus %uptime%,%qcache% <br>
- # Only readings containing "uptime" and "qcache" in name will be created
- </li>
- <br><br>
- </ul>
-
- <li><b> dbvars </b> - lists global informations about MySQL system variables. Included are e.g. readings related to InnoDB-Home, datafile path,
- memory- or cache-parameter and so on. The Output reports initially all available informations. Using the
- <a href="#DbRepattr">attribute</a> "showVariables" the quantity of results can be limited to show only the desired values.
- Further detailed informations of items meaning are explained
- <a href=http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html>there</a>. <br>
-
- <br><ul>
- <b>Example</b> <br>
- get <name> dbvars <br>
- attr <name> showVariables %version%,%query_cache% <br>
- # Only readings containing "version" and "query_cache" in name will be created
- </li>
- <br><br>
- </ul>
- <li><b> minTimestamp </b> - Identifies the oldest timestamp in the database (will be executed implicitely at FHEM start).
- The timestamp is used as begin of data selection if no time attribut is set to determine the
- start date.
- </li>
- <br><br>
- <li><b> procinfo </b> - reports the existing database processes in a summary table (only MySQL). <br>
- Typically only the own processes of the connection user (set in DbLog configuration file) will be
- reported. If all precesses have to be reported, the global "PROCESS" right has to be granted to the
- user. <br>
- As of MariaDB 5.3 for particular SQL-Statements a progress reporting will be provided
- (table row "PROGRESS"). So you can track, for instance, the degree of processing during an index
- creation. <br>
- Further informations can be found
- <a href=https://mariadb.com/kb/en/mariadb/show-processlist/>there</a>. <br>
- </li>
- <br><br>
- <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
- on the database type. Using the <a href="#DbRepattr">attribute</a> "showSvrInfo" the quantity of results can be limited to show only
- the desired values. Further detailed informations of items meaning are explained
- <a href=https://msdn.microsoft.com/en-us/library/ms711681(v=vs.85).aspx>there</a>. <br>
-
- <br><ul>
- <b>Example</b> <br>
- get <name> svrinfo <br>
- attr <name> showSvrInfo %SQL_CATALOG_TERM%,%NAME% <br>
- # Only readings containing "SQL_CATALOG_TERM" and "NAME" in name will be created
- </li>
- <br><br>
- </ul>
-
- <li><b> tableinfo </b> - access detailed informations about tables in MySQL database which is connected by the DbRep-device.
- All available tables in the connected database will be selected by default.
- Using the<a href="#DbRepattr">attribute</a> "showTableInfo" the results can be limited to tables you want to show.
- 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>
-
- <br><ul>
- <b>Example</b> <br>
- get <name> tableinfo <br>
- attr <name> showTableInfo current,history <br>
- # Only informations related to tables "current" and "history" are going to be created
- </li>
- <br><br>
- </ul>
- <br>
- </ul></ul>
-
- </ul>
- <a name="DbRepattr"></a>
- <b>Attributes</b>
- <br>
- <ul>
- Using the module specific attributes you are able to define the scope of evaluation and the aggregation. <br><br>
-
- <b>Note for SQL-Wildcard Usage:</b> <br>
- Within the attribute values of "device" and "reading" you may use SQL-Wildcard "%", Character "_" is not supported as a wildcard.
- The character "%" stands for any characters. <br>
- This rule is valid to all functions <b>except</b> "insert", "importFromFile" and "deviceRename". <br>
- The function "insert" doesn't allow setting the mentioned attributes containing the wildcard "%". <br>
- In readings the wildcard character "%" will be replaced by "/" to meet the rules of allowed characters in readings.
- <br><br>
-
- <ul><ul>
- <li><b>aggregation </b> - Aggregation of Device/Reading-selections. Possible is hour, day, week, month or "no".
- Delivers e.g. the count of database entries for a day (countEntries), Summation of
- difference values of a reading (sumValue) and so on. Using aggregation "no" (default) an
- aggregation don't happens but the output contaims all values of Device/Reading in the defined time period. </li> <br>
- <li><b>allowDeletion </b> - unlocks the delete-function </li> <br>
-
- <li><b>averageCalcForm </b> - specifies the calculation variant of average peak by "averageValue".
- </li><br>
- <li><b>device </b> - Selection of a particular device. <br>
- You can specify <a href="https://fhem.de/commandref.html#devspec">device specifications (devspec)</a>. <br>
- Inside of device specifications a SQL wildcard (%) will be evaluated as a normal ASCII-character.
- The device names are derived from device specification and the active devices in FHEM before
- SQL selection will be carried out. </li> <br>
-
- <ul>
- <b>Examples:</b> <br>
- <code>attr <name> device TYPE=DbRep</code> <br>
- # select datasets of active present devices with Type "DbRep" <br>
- <code>attr <name> device MySTP_5000</code> <br>
- # select datasets of device "MySTP_5000" <br>
- <code>attr <name> device SMA.*</code> <br>
- # select datasets of devices starting with "SMA" <br>
- <code>attr <name> device SMA_Energymeter,MySTP_5000</code> <br>
- # select datasets of devices "SMA_Energymeter" and "MySTP_5000" <br>
- <code>attr <name> device %5000</code> <br>
- # select datasets of devices ending with "5000" <br>
- </ul>
- <br><br>
- <li><b>diffAccept </b> - valid for function diffValue. diffAccept determines the threshold, up to that a calaculated difference between two
- straight sequently datasets should be commenly accepted (default = 20). <br>
- Hence faulty DB entries with a disproportional high difference value will be eliminated and don't tamper the result.
- If a threshold overrun happens, the reading "diff_overrun_limit_<diffLimit>" will be generated
- (<diffLimit> will be substituted with the present prest attribute value). <br>
- The reading contains a list of relevant pair of values. Using verbose=3 this list will also be reported in the FHEM
- logfile.
- </li><br>
- <ul>
- Example report in logfile if threshold of diffAccept=10 overruns: <br><br>
-
- DbRep Rep.STP5000.etotal -> data ignored while calc diffValue due to threshold overrun (diffAccept = 10): <br>
- 2016-04-09 08:50:50 0.0340 -> 2016-04-09 12:42:01 13.3440 <br><br>
-
- # The first dataset with a value of 0.0340 is untypical low compared to the next value of 13.3440 and results a untypical
- high difference value. <br>
- # Now you have to decide if the (second) dataset should be deleted, ignored of the attribute diffAccept should be adjusted.
- </ul><br>
-
- <li><b>disable </b> - deactivates the module </li> <br>
-
- <li><b>dumpComment </b> - User-comment. It will be included in the header of the created dumpfile by
- command "dumpMySQL clientSide". </li> <br>
-
- <li><b>dumpCompress </b> - if set, the dump files are compressed after operation of "dumpMySQL" bzw. "dumpSQLite" </li> <br>
-
- <li><b>dumpDirLocal </b> - Target directory of database dumps by command "dumpMySQL clientSide"
- (default: "{global}{modpath}/log/" on the FHEM-Server). <br>
- In this directory also the internal version administration searches for old backup-files
- and deletes them if the number exceeds attribute "dumpFilesKeep".
- The attribute is also relevant to publish a local mounted directory "dumpDirRemote" to
- DbRep. </li> <br>
-
- <li><b>dumpDirRemote </b> - Target directory of database dumps by command "dumpMySQL serverSide"
- (default: the Home-directory of MySQL-Server on the MySQL-Host). </li> <br>
-
- <li><b>dumpMemlimit </b> - tolerable memory consumption for the SQL-script during generation period (default: 100000 characters).
- Please adjust this parameter if you may notice memory bottlenecks and performance problems based
- on it on your specific hardware. </li> <br>
-
- <li><b>dumpSpeed </b> - Number of Lines which will be selected in source database with one select by dump-command
- "dumpMySQL ClientSide" (default: 10000).
- This parameter impacts the run-time and consumption of resources directly. </li> <br>
- <li><b>dumpFilesKeep </b> - The specified number of dumpfiles remain in the dump directory (default: 3).
- If there more (older) files has been found, these files will be deleted after a new database dump
- was created successfully.
- The global attrubute "archivesort" will be considered. </li> <br>
-
- <li><b>executeAfterProc </b> - you can specify a FHEM-command which should be executed <b>after dump</b>. <br>
- Perl functions have to be enclosed in {} .<br><br>
- <ul>
- <b>Example:</b> <br><br>
- attr <name> executeAfterProc set og_gz_westfenster off; <br>
- attr <name> executeAfterProc {adump ("<name>")} <br><br>
-
- # "adump" is a function defined in 99_myUtils.pm e.g.: <br>
-
- <pre>
- sub adump {
- my ($name) = @_;
- my $hash = $defs{$name};
- # own function, e.g.
- Log3($name, 3, "DbRep $name -> Dump finished");
-
- return;
- }
- </pre>
- </ul>
- </li>
-
- <li><b>executeBeforeProc </b> - you can specify a FHEM-command which should be executed <b>before dump</b>. <br>
- Perl functions have to be enclosed in {} .<br><br>
- <ul>
- <b>Example:</b> <br><br>
- attr <name> executeBeforeProc set og_gz_westfenster on; <br>
- attr <name> executeBeforeProc {bdump ("<name>")} <br><br>
-
- # "bdump" is a function defined in 99_myUtils.pm e.g.: <br>
-
- <pre>
- sub bdump {
- my ($name) = @_;
- my $hash = $defs{$name};
- # own function, e.g.
- Log3($name, 3, "DbRep $name -> Dump starts now");
-
- return;
- }
- </pre>
- </ul>
- </li>
- <li><b>expimpfile </b> - Path/filename for data export/import </li> <br>
-
- <li><b>fetchMarkDuplicates </b>
- - Highlighting of multiple occuring datasets in result of "fetchrows" command </li> <br>
-
- <li><b>fetchRoute [descent | ascent] </b> - specify the direction of data selection of the fetchrows-command. <br><br>
- <ul>
- <b>descent</b> - the data are read descent (default). If
- amount of datasets specified by attribut "limit" is exceeded,
- the newest x datasets are shown. <br><br>
- <b>ascent</b> - the data are read ascent . If
- amount of datasets specified by attribut "limit" is exceeded,
- the oldest x datasets are shown. <br>
- </ul>
-
- </li> <br><br>
-
- <li><b>ftpUse </b> - FTP Transfer after dump will be switched on (without SSL encoding). The created
- database backup file will be transfered non-blocking to the FTP-Server (Attribut "ftpServer").
- </li> <br>
-
- <li><b>ftpUseSSL </b> - FTP Transfer with SSL encoding after dump. The created database backup file will be transfered
- non-blocking to the FTP-Server (Attribut "ftpServer"). </li> <br>
-
- <li><b>ftpUser </b> - User for FTP-server login, default: "anonymous". </li> <br>
-
- <li><b>ftpDebug </b> - debugging of FTP communication for diagnostics. </li> <br>
-
- <li><b>ftpDir </b> - directory on FTP-server in which the file will be send into (default: "/"). </li> <br>
-
- <li><b>ftpDumpFilesKeep </b> - leave the number of dump files in FTP-destination <ftpDir> (default: 3). Are there more
- (older) dump files present, these files are deleted after a new dump was transfered successfully. </li> <br>
-
- <li><b>ftpPassive </b> - set if passive FTP is to be used </li> <br>
-
- <li><b>ftpPort </b> - FTP-Port, default: 21 </li> <br>
-
- <li><b>ftpPwd </b> - password of FTP-User, is not set by default </li> <br>
-
- <li><b>ftpServer </b> - name or IP-address of FTP-server. <b>absolutely essential !</b> </li> <br>
-
- <li><b>ftpTimeout </b> - timeout of FTP-connection in seconds (default: 30). </li> <br>
-
- <a name="DbRepattrlimit"></a>
- <li><b>limit </b> - limits the number of selected datasets by the "fetchrows", or the shown datasets of "delSeqDoublets adviceDelete",
- "delSeqDoublets adviceRemain" commands (default: 1000).
- This limitation should prevent the browser session from overload and
- avoids FHEMWEB from blocking. Please change the attribut according your requirements or change the
- selection criteria (decrease evaluation period). </li> <br>
-
- <li><b>optimizeTablesBeforeDump </b> - if set to "1", the database tables will be optimized before executing the dump
- (default: 0).
- Thereby the backup run-time time will be extended. <br><br>
- <ul>
- <b>Note</b> <br>
- The table optimizing cause locking the tables and therefore to blocking of
- FHEM if DbLog isn't working in asynchronous mode (DbLog-attribute "asyncMode") !
- <br>
- </ul>
- </li> <br>
- <li><b>reading </b> - Selection of a particular reading.
- More than one reading are specified as a comma separated list. <br>
- If SQL wildcard (%) is set in a list, it will be evaluated as a normal ASCII-character. <br>
- </li> <br>
-
- <ul>
- <b>Examples:</b> <br>
- <code>attr <name> reading etotal</code> <br>
- <code>attr <name> reading et%</code> <br>
- <code>attr <name> reading etotal,etoday</code> <br>
- </ul>
- <br><br>
- <li><b>readingNameMap </b> - the name of the analyzed reading can be overwritten for output </li> <br>
- <li><b>role </b> - the role of the DbRep-device. Standard role is "Client". The role "Agent" is described
- in section <a href="#DbRepAutoRename">DbRep-Agent</a>. </li> <br>
- <li><b>readingPreventFromDel </b> - comma separated list of readings which are should prevent from deletion when a
- new operation starts </li> <br>
-
- <li><b>seqDoubletsVariance </b> - accepted variance (+/-) for the command "set <name> delSeqDoublets". <br>
- The value of this attribute describes the variance up to it consecutive numeric values (VALUE) of
- datasets are handled as identical and should be deleted. "seqDoubletsVariance" is an absolut numerical value,
- which is used as a positive as well as a negative variance. </li> <br>
- <ul>
- <b>Examples:</b> <br>
- <code>attr <name> seqDoubletsVariance 0.0014 </code> <br>
- <code>attr <name> seqDoubletsVariance 1.45 </code> <br>
- </ul>
- <br><br>
- <li><b>showproctime </b> - if set, the reading "sql_processing_time" shows the required execution time (in seconds)
- for the sql-requests. This is not calculated for a single sql-statement, but the summary
- of all sql-statements necessara for within an executed DbRep-function in background. </li> <br>
- <li><b>showStatus </b> - limits the sample space of command "get <name> dbstatus". SQL-Wildcard (%) can be used. </li> <br>
- <ul>
- <b>Example: </b><br>
- attr <name> showStatus %uptime%,%qcache% <br>
- # Only readings with containing "uptime" and "qcache" in name will be shown <br>
- </ul><br>
-
- <li><b>showVariables </b> - limits the sample space of command "get <name> dbvars". SQL-Wildcard (%) can be used. </li> <br>
- <ul>
- <b>Example: </b><br>
- attr <name> showVariables %version%,%query_cache% <br>
- # Only readings with containing "version" and "query_cache" in name will be shown <br>
- </ul><br>
-
- <li><b>showSvrInfo </b> - limits the sample space of command "get <name> svrinfo". SQL-Wildcard (%) can be used. </li> <br>
- <ul>
- <b>Example: </b><br>
- attr <name> showSvrInfo %SQL_CATALOG_TERM%,%NAME% <br>
- # Only readings with containing "SQL_CATALOG_TERM" and "NAME" in name will be shown <br>
- </ul><br>
-
- <li><b>showTableInfo </b> - limits the tablename which is selected by command "get <name> tableinfo". SQL-Wildcard
- (%) can be used. </li> <br>
- <ul>
- <b>Example: </b><br>
- attr <name> showTableInfo current,history <br>
- # Only informations about tables "current" and "history" will be shown <br>
- </ul><br>
-
- <li><b>sqlCmdHistoryLength </b>
- - activates the command history of "sqlCmd" and determines the length of it </li> <br>
-
- <li><b>sqlResultFieldSep </b> - determines the used field separator (default: "|") in the result of command "set <name> sqlCmd". </li> <br>
- <li><b>sqlResultFormat </b> - determines the formatting of the "set <name> sqlCmd" command result.
- Possible options are: <br><br>
- <ul>
- <b>separated </b> - every line of the result will be generated sequentially in a single
- reading. (default) <br><br>
- <b>mline </b> - the result will be generated as multiline in
- <a href="#DbRepReadings">Reading</a> SqlResult.
- <br><br>
- <b>sline </b> - the result will be generated as singleline in
- <a href="#DbRepReadings">Reading</a> SqlResult.
- Datasets are separated by "]|[". <br><br>
- <b>table </b> - the result will be generated as an table in
- <a href="#DbRepReadings">Reading</a> SqlResult. <br><br>
- <b>json </b> - creates <a href="#DbRepReadings">Reading</a> SqlResult as a JSON
- coded hash.
- Every hash-element consists of the serial number of the dataset (key)
- and its value. </li> <br><br>
-
-
- To process the result, you may use a userExitFn in 99_myUtils for example: <br>
- <pre>
- sub resfromjson {
- my ($name,$reading,$value) = @_;
- my $hash = $defs{$name};
- if ($reading eq "SqlResult") {
- # only reading SqlResult contains JSON encoded data
- my $data = decode_json($value);
-
- foreach my $k (keys(%$data)) {
-
- # use your own processing from here for every hash-element
- # e.g. output of every element that contains "Cam"
- my $ke = $data->{$k};
- if($ke =~ m/Cam/i) {
- my ($res1,$res2) = split("\\|", $ke);
- Log3($name, 1, "$name - extract element $k by userExitFn: ".$res1." ".$res2);
- }
- }
- }
- return;
- }
- </pre>
- </ul>
- <br>
-
-
- <li><b>timeYearPeriod </b> - By this attribute an annual time period will be determined for database data selection.
- The time limits are calculated dynamically during execution time. Every time an annual period is determined.
- Periods of less than a year are not possible to set. <br>
- This attribute is particularly intended to make reports synchronous to an account period, e.g. of an energy- or gas provider.
- </li> <br>
-
- <ul>
- <b>Example:</b> <br><br>
- attr <name> timeYearPeriod 06-25 06-24 <br><br>
-
- # evaluates the database within the time limits 25. june AAAA and 24. june BBBB. <br>
- # The year AAAA respectively year BBBB is calculated dynamically depending of the current date. <br>
- # If the current date >= 25. june and =< 31. december, than AAAA = current year and BBBB = current year+1 <br>
- # If the current date >= 01. january und =< 24. june, than AAAA = current year-1 and BBBB = current year
- </ul>
- <br><br>
-
- <li><b>timestamp_begin </b> - begin of data selection (*) </li> <br>
-
- <li><b>timestamp_end </b> - end of data selection. If not set the current date/time combination will be used. (*) </li> <br>
-
- (*) The format of timestamp is as used with DbLog "YYYY-MM-DD HH:MM:SS". For the attributes "timestamp_begin", "timestamp_end"
- you can also use one of the following entries. The timestamp-attribute will be dynamically set to: <br><br>
- <ul>
- <b>current_year_begin</b> : matches "<current year>-01-01 00:00:00" <br>
- <b>current_year_end</b> : matches "<current year>-12-31 23:59:59" <br>
- <b>previous_year_begin</b> : matches "<previous year>-01-01 00:00:00" <br>
- <b>previous_year_end</b> : matches "<previous year>-12-31 23:59:59" <br>
- <b>current_month_begin</b> : matches "<current month first day> 00:00:00" <br>
- <b>current_month_end</b> : matches "<current month last day> 23:59:59" <br>
- <b>previous_month_begin</b> : matches "<previous month first day> 00:00:00" <br>
- <b>previous_month_end</b> : matches "<previous month last day> 23:59:59" <br>
- <b>current_week_begin</b> : matches "<first day of current week> 00:00:00" <br>
- <b>current_week_end</b> : matches "<last day of current week> 23:59:59" <br>
- <b>previous_week_begin</b> : matches "<first day of previous week> 00:00:00" <br>
- <b>previous_week_end</b> : matches "<last day of previous week> 23:59:59" <br>
- <b>current_day_begin</b> : matches "<current day> 00:00:00" <br>
- <b>current_day_end</b> : matches "<current day> 23:59:59" <br>
- <b>previous_day_begin</b> : matches "<previous day> 00:00:00" <br>
- <b>previous_day_end</b> : matches "<previous day> 23:59:59" <br>
- <b>current_hour_begin</b> : matches "<current hour>:00:00" <br>
- <b>current_hour_end</b> : matches "<current hour>:59:59" <br>
- <b>previous_hour_begin</b> : matches "<previous hour>:00:00" <br>
- <b>previous_hour_end</b> : matches "<previous hour>:59:59" <br> </ul><br>
-
- Make sure that "timestamp_begin" < "timestamp_end" is fulfilled. <br><br>
-
- <ul>
- <b>Example:</b> <br><br>
- attr <name> timestamp_begin current_year_begin <br>
- attr <name> timestamp_end current_year_end <br><br>
-
- # Analyzes the database between the time limits of the current year. <br>
- </ul>
- <br><br>
-
- <b>Note </b> <br>
-
- If the attribute "timeDiffToNow" will be set, the attributes "timestamp_begin" respectively "timestamp_end" will be deleted if they were set before.
- The setting of "timestamp_begin" respectively "timestamp_end" causes the deletion of attribute "timeDiffToNow" if it was set before as well.
- <br><br>
-
- <li><b>timeDiffToNow </b> - the <b>begin</b> of data selection will be set to the timestamp <b>"<current time> -
- <timeDiffToNow>"</b> dynamically (e.g. if set to 86400, the last 24 hours are considered by data
- selection). The time period will be calculated dynamically at execution time. </li> <br>
- <ul>
- <b>Examples for input format:</b> <br>
- <code>attr <name> timeDiffToNow 86400</code> <br>
- # the start time is set to "current time - 86400 seconds" <br>
- <code>attr <name> timeDiffToNow d:2 h:3 m:2 s:10</code> <br>
- # the start time is set to "current time - 2 days 3 hours 2 minutes 10 seconds" <br>
- <code>attr <name> timeDiffToNow m:600</code> <br>
- # the start time is set to "current time - 600 minutes" gesetzt <br>
- <code>attr <name> timeDiffToNow h:2.5</code> <br>
- # the start time is set to "current time - 2,5 hours" <br>
- </ul>
- <br><br>
- <li><b>timeOlderThan </b> - the <b>end</b> of data selection will be set to the timestamp <b>"<aktuelle Zeit> -
- <timeOlderThan>"</b> dynamically. Always the datasets up to timestamp
- "<current time> - <timeOlderThan>" will be considered (e.g. if set to
- 86400, all datasets older than one day are considered). The time period will be calculated dynamically at
- execution time. <br>
- The valid input format for attribute "timeOlderThan" is identical to attribute "timeDiffToNow". </li> <br>
- <li><b>timeout </b> - set the timeout-value for Blocking-Call Routines in background in seconds (default 86400) </li> <br>
- <li><b>userExitFn </b> - provides an interface to execute user specific program code. <br>
- To activate the interfaace at first you should implement the subroutine which will be
- called by the interface in your 99_myUtls.pm as shown in by the example: <br>
- <pre>
- sub UserFunction {
- my ($name,$reading,$value) = @_;
- my $hash = $defs{$name};
- ...
- # e.g. output transfered data
- Log3 $name, 1, "UserExitFn $name called - transfer parameter are Reading: $reading, Value: $value " ;
- ...
- return;
- }
- </pre>
- The interface activation takes place by setting the subroutine name into the attribute.
- Optional you may set a Reading:Value combination (Regex) as argument. If no Regex is
- specified, all value combinations will be evaluated as "true" (related to .*:.*).
- <br><br>
-
- <ul>
- <b>Example:</b> <br>
- attr <device> userExitFn UserFunction .*:.* <br>
- # "UserFunction" is the name of subroutine in 99_myUtils.pm.
- </ul>
- <br>
-
- The interface works generally without and independent from Events.
- If the attribute is set, after every reading generation the Regex will be evaluated.
- If the evaluation was "true", set subroutine will be called.
- For further processing following parameters will be forwarded to the function: <br><br>
-
- <ul>
- <li>$name - the name of the DbRep-Device </li>
- <li>$reading - the name of the created reading </li>
- <li>$value - the value of the reading </li>
-
- </ul>
- </li>
- <br><br>
-
- </ul></ul></ul>
- <a name="DbRepReadings"></a>
- <b>Readings</b>
- <br>
- <ul>
- 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
- that unsuitable or invalid readings would remain.<br><br>
-
- In addition the following readings will be created: <br><br>
-
- <ul><ul>
- <li><b>state </b> - contains the current state of evaluation. If warnings are occured (state = Warning) compare Readings
- "diff_overrun_limit_<diffLimit>" and "less_data_in_period" </li> <br>
-
- <li><b>errortext </b> - description about the reason of an error state </li> <br>
-
- <li><b>background_processing_time </b> - the processing time spent for operations in background/forked operation </li> <br>
-
- <li><b>sql_processing_time </b> - the processing time wasted for all sql-statements used for an operation </li> <br>
-
- <li><b>diff_overrun_limit_<diffLimit></b> - contains a list of pairs of datasets which have overrun the threshold (<diffLimit>)
- of calculated difference each other determined by attribute "diffAccept" (default=20). </li> <br>
-
- <li><b>less_data_in_period </b> - contains a list of time periods within only one dataset was found. The difference calculation considers
- the last value of the aggregation period before the current one. Valid for function "diffValue". </li> <br>
- <li><b>SqlResult </b> - result of the last executed sqlCmd-command. The formatting can be specified
- by <a href="#DbRepattr">attribute</a> "sqlResultFormat" </li> <br>
-
- <li><b>sqlCmd </b> - contains the last executed sqlCmd-command </li> <br>
-
- </ul></ul>
- <br><br>
- </ul>
- <a name="DbRepAutoRename"></a>
- <b>DbRep Agent - automatic change of device names in databases and DbRep-definitions after FHEM "rename" command</b>
- <br>
- <ul>
- 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
- react automatically on renaming devices in your FHEM installation. The DbRep device is now called DbRep-Agent. <br><br>
-
- By the DbRep-Agent the following features are activated when a FHEM-device has being renamed: <br><br>
-
- <ul><ul>
- <li> in the database connected to the DbRep-Agent (Internal Database) dataset containing the old device name will be searched and renamed to the
- to the new device name in <b>all</b> affected datasets. </li> <br>
-
- <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
- the renamed device will be going on in the database. </li> <br>
-
- <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".
- Because of that, reporting definitions will be kept consistent automatically if devices are renamed in FHEM. </li> <br>
- </ul></ul>
-
- 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
- and checked: <br><br>
-
- <ul><ul>
- <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,
- you could define same numbers of DbRep-Agents as well as DbLog-devices are defined. </li> <br>
-
- <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
- permitted. If a DbRep-device of privious type "Client" has changed an Agent, furthermore not permitted attributes will be deleted if set. </li> <br>
- </ul></ul>
-
- 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
- function don't running into timeout set the timeout attribute to an appropriate value, especially if there are databases with huge datasets to evaluate.
- As well as all the other database operations of this module, the autorename operation will be executed nonblocking. <br><br>
-
- <ul>
- <b>Example </b> of definition of a DbRep-device as an Agent: <br><br>
- <code>
- define Rep.Agent DbRep LogDB <br>
- attr Rep.Agent devStateIcon connected:10px-kreis-gelb .*disconnect:10px-kreis-rot .*done:10px-kreis-gruen <br>
- attr Rep.Agent icon security <br>
- attr Rep.Agent role Agent <br>
- attr Rep.Agent room DbLog <br>
- attr Rep.Agent showproctime 1 <br>
- attr Rep.Agent stateFormat { ReadingsVal("$name","state", undef) eq "running" ? "renaming" : ReadingsVal("$name","state", undef). " »; ProcTime: ".ReadingsVal("$name","sql_processing_time", undef)." sec"} <br>
- attr Rep.Agent timeout 86400 <br>
- </code>
- <br>
- </ul>
-
- <b>Note:</b> <br>
- Even though the function itself is designed non-blocking, make sure the assigned DbLog-device
- is operating in asynchronous mode to avoid FHEMWEB from blocking. <br><br>
-
- </ul>
- <p><a name="Dooya"></a>
- <h3>Dooya protocol</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Dooya'>DE</a>]</div>
- <ul>
- The Dooya protocol is used by a wide range of devices,
- which are either senders or receivers/actuators.
- The RECIVING and SENDING of Dooya commands is implemented in the SIGNALduino, so this module currently supports
- devices like blinds and shutters. The Dooya protocol is used from a lot of different shutter companies in Germanyr. Examples are Rohrmotor24 or Nobily.
- <br><br>
- <pre>
- <code>4: sduino/msg READ: MU;P0=4717;P1=-1577;P2=284;P3=-786;P4=649;P5=-423;D=01232345[......]445232;CP=2;</code>
- <code>4: sduino: Fingerprint for MU Protocol id 16 -> Dooya shutter matches, trying to demodulate</code>
- <code>4: sduino: decoded matched MU Protocol id 16 dmsg u16#370658E133 length 40</code>
- <code>4: SIGNALduino_unknown Protocol: 16</code>
- <code>4: SIGNALduino_unknown converted to bits: 0011011100000110010110001110000100110011</code>
- <code>4: SIGNALduino_unknown / shutter Dooya 0011011100000110010110001110000100110011 received</code>
- <code>4: 00110111000001100101100 1110 0001 0011 0011</code>
- <code>4: SIGNALduino_unknown found shutter from Dooya. id=3606104, remotetype=14, channel=1, direction=down, all_shutters=false</code>
- </pre>
-
- <br> a <a href="#SIGNALduino">SIGNALduino</a> device (must be defined first) <br>
- <br>
- <br>
-
- <a name="Dooyadefine"></a>
- <br>
- <b>Define</b>
- <br>
- <ul>
- <code>define <name> Dooya <id>_<channel> </code>
- <br>
- <br>
- The id is a 28-digit binar code, that uniquely identifies a single remote control.
- <br>
- Pairing is done by setting the shutter in programming mode, either by disconnecting/reconnecting the power,
- and by pressing the program button on an already associated remote.
- <br>
- Once the shutter is in programming mode, send the "prog" command from within FHEM to complete the pairing.
- The shutter will peep shortly to indicate completion.
- <br>
- You are now able to control this blind from FHEM, the receiver thinks it is just another remote control or the real exist remote.
- For the shutter it´s the same.
- <ul>
- <li><code><id></code> is a 28 digit binar number that uniquely identifies FHEM as a new remote control.
- <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
- and you can give every one an other channel. (0 to 15, 0 ist the MASTER and conrols all other channels.)
- 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>
- </ul>
- <br>
- Examples:
- <ul>
- <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>
- <br>
- <code>define Rollo_1 Dooya 0011011100000110010110001110_1</code><br> Rollo_1 channel 1<br>
- <code>define Rollo_2 Dooya 0011011100000110010110101110_2</code><br> Rollo_2 channel 2<br>
- </ul>
- </ul>
- <br>
- <a name="Dooyaset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<time>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- on
- off
- stop
- pos value (0..100) # see note
- prog # Special, see note
- </pre>
- Examples:
- <ul>
- <code>set rollo_1 on</code><br>
- <code>set rollo_1 on,sleep 1,rollo_2 on,sleep 1,rollo_3 on</code><br>
- <code>set rollo_1 off</code><br>
- <code>set rollo_1 pos 50</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>prog is a special command used to pair the receiver to FHEM:
- Set the receiver in programming mode and send the "prog" command from FHEM to finish pairing.<br>
- The shutter will peep shortly to indicate success.
- </li>
- <li>pos value<br>
-
- The position is variying between 0 completely open and 100 for covering the full window.
- The position must be between 0 and 100 and the appropriate
- attributes drive-down-time-to-100, drive-down-time-to-close,
- drive-up-time-to-100 and drive-up-time-to-open must be set.<br>
- </li>
- </ul>
- The position reading distinuishes between multiple cases
- <ul>
- <li>Without timing values set only generic values are used for status and position: <pre>open, closed, moving</pre> are used
- </li>
- <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
- the device is considered to only vary between 0 and 100 (100 being completely closed)
- </li>
- <li>With full timing values set the device is considerd a window shutter (Rolladen) with a difference between
- covering the full window (position 100) and being completely closed (position 200)
- </li>
- </ul>
- </ul>
- <br>
- <b>Get</b>
- <ul>N/A</ul><br>
- <a name="Dooyaattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="IODev"></a>
- <li>IODev<br>
- Set the IO or physical device which should be used for sending signals
- for this "logical" device. It must be the SIGNALduino.<br>
- Note: The IODev has to be set, otherwise no commands will be sent!<br>
- </li><br>
- <a name="channel"></a>
- <li>channel<br>
- Set the channel of the remote. You can use 0 (MASTER) to 15.<br>
- Note: The MASTER conrols all remotes with the same ID!!!<br>
- </li><br>
-
- <a name="SignalRepeats"></a>
- <li>SignalRepeats<br>
- Set the repeats for sending signal. You can use 5, 10, 15 and 20.
- </li><br>
-
- <a name="additionalPosReading"></a>
- <li>additionalPosReading<br>
- Position of the shutter will be stored in the reading <code>pos</code> as numeric value.
- Additionally this attribute might specify a name for an additional reading to be updated with the same value than the pos.
- </li><br>
- <a name="eventMap"></a>
- <li>eventMap<br>
- Replace event names and set arguments. The value of this attribute
- consists of a list of space separated values, each value is a colon
- separated pair. The first part specifies the "old" value, the second
- the new/desired value. If the first character is slash(/) or comma(,)
- then split not by space but by this character, enabling to embed spaces.
- Examples:
- <ul><code>
- attr store eventMap on:open off:closed<br>
- attr store eventMap /on-for-timer 10:open/off:closed/<br>
- set store open
- </code>
- </ul>
- </li>
- <br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <a name="attrdummy"></a>
- <li>dummy<br>
- Set the device attribute dummy to define devices which should not
- output any radio signals. Associated notifys will be executed if
- the signal is received. Used e.g. to react to a code from a sender, but
- it will not emit radio signal if triggered in the web frontend.
- </li><br>
- <li><a href="#loglevel">loglevel</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <a name="model"></a>
-
- <a name="ignore"></a>
- <li>ignore<br>
- Ignore this device, e.g. if it belongs to your neighbour. The device
- won't trigger any FileLogs/notifys, issued commands will silently
- ignored (no RF signal will be sent out, just like for the <a
- href="#attrdummy">dummy</a> attribute). The device won't appear in the
- list command (only if it is explicitely asked for it), nor will it
- appear in commands which use some wildcard/attribute as name specifiers
- (see <a href="#devspec">devspec</a>). You still get them with the
- "ignored=1" special devspec.
- </li><br>
- <a name="drive-down-time-to-100"></a>
- <li>drive-down-time-to-100<br>
- The time the blind needs to drive down from "open" (pos 0) to pos 100.<br>
- In this position, the lower edge touches the window frame, but it is not completely shut.<br>
- For a mid-size window this time is about 12 to 15 seconds.
- </li><br>
- <a name="drive-down-time-to-close"></a>
- <li>drive-down-time-to-close<br>
- The time the blind needs to drive down from "open" (pos 0) to "close", the end position of the blind.<br>
- This is about 3 to 5 seonds more than the "drive-down-time-to-100" value.
- </li><br>
- <a name="drive-up-time-to-100"></a>
- <li>drive-up-time-to-100<br>
- The time the blind needs to drive up from "close" (endposition) to "pos 100".<br>
- This usually takes about 3 to 5 seconds.
- </li><br>
- <a name="drive-up-time-to-open"></a>
- <li>drive-up-time-to-open<br>
- The time the blind needs drive up from "close" (endposition) to "open" (upper endposition).<br>
- This value is usually a bit higher than "drive-down-time-to-close", due to the blind's weight.
- </li><br>
- </ul>
- <br>
- <a name="Dooyaevents"></a>
- <b>Generated events:</b>
- <ul>
- From a Dooya device you can receive one of the following events.
- <li>on</li>
- <li>off</li>
- <li>stop</li>
- Which event is sent is device dependent and can sometimes be configured on
- the device.
- </ul>
- </ul>
- <p><a name="EC3000"></a>
- <h3>EC3000</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EC3000'>DE</a>]</div>
- <ul>
- The Energy Count 3000 is a AC mains plug with integrated power meter functionality from CONRAD.<br><br>
- It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
- <a name="EC3000Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EC3000 <addr></code> <br>
- <br>
- addr is a 4 digit hex number to identify the EC3000 device.
- Note: devices are autocreated on reception of the first message.<br>
- </ul>
- <br>
- <a name="EC3000_Set"></a>
- <b>Set</b>
- <ul>
- </ul><br>
- <a name="EC3000_Get"></a>
- <b>Get</b>
- <ul>
- </ul><br>
- <a name="EC3000_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>consumption</li>
- <li>consumptionMax</li>
- <li>consumptionNow</li>
- </ul><br>
- <a name="EC3000_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>offLevel<br>
- a power level less or equal <code>offLevel</code> is considered to be off</li>
- </ul><br>
- </ul>
- <p><a name="ECMD"></a>
- <h3>ECMD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ECMD'>DE</a>]</div>
- <ul>
- Any physical device with request/response-like communication capabilities
- over a serial line or TCP connection can be defined as ECMD device. A practical example
- of such a device is the AVR microcontroller board AVR-NET-IO from
- <a href="http://www.pollin.de">Pollin</a> with
- <a href="http://www.ethersex.de/index.php/ECMD">ECMD</a>-enabled
- <a href="http://www.ethersex.de">Ethersex</a> firmware. The original
- NetServer firmware from Pollin works as well. There is a plenitude of use cases.<p>
- A physical ECMD device can host any number of logical ECMD devices. Logical
- devices are defined as <a href="#ECMDDevice">ECMDDevice</a>s in fhem.
- ADC 0 to 3 and I/O port 0 to 3 of the above mentioned board
- are examples of such logical devices. ADC 0 to 3 all belong to the same
- device class ADC (analog/digital converter). I/O port 0 to 3 belong to the device
- class I/O port. By means of extension boards you can make your physical
- device drive as many logical devices as you can imagine, e.g. IR receivers,
- LC displays, RF receivers/transmitters, 1-wire devices, etc.<p>
- Defining one fhem module for any device class would create an unmanageable
- number of modules. Thus, an abstraction layer is used. You create a device class
- on the fly and assign it to a logical ECMD device. The
- <a href="#ECMDClassdef">class definition</a>
- names the parameters of the logical device, e.g. a placeholder for the number
- of the ADC or port, as well as the get and set capabilities. Worked examples
- are to be found in the documentation of the <a href="#ECMDDevice">ECMDDevice</a> device.
- <br><br>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module
- if the module is connected via serial Port or USB.<p>
- <a name="ECMDcharcoding"></a>
- <b>Character coding</b><br><br>
- ECMD is suited to process any character including non-printable and control characters.
- User input for raw data, e.g. for setting attributes, and the display of raw data, e.g. in the log,
- is perl-encoded according to the following table (ooo stands for a three-digit octal number):<BR>
- <table>
- <tr><th>character</th><th>octal</th><th>code</th></tr>
- <tr><td>Bell</td><td>007</td><td>\a</td></tr>
- <tr><td>Backspace</td><td>008</td><td>\008</td></tr>
- <tr><td>Escape</td><td>033</td><td>\e</td></tr>
- <tr><td>Formfeed</td><td>014</td><td>\f</td></tr>
- <tr><td>Newline</td><td>012</td><td>\n</td></tr>
- <tr><td>Return</td><td>015</td><td>\r</td></tr>
- <tr><td>Tab</td><td>011</td><td>\t</td></tr>
- <tr><td>backslash</td><td>134</td><td>\134 or \\</td></tr>
- <tr><td>any</td><td>ooo</td><td>\ooo</td></tr>
- </table><br>
- In user input, use \134 for backslash to avoid conflicts with the way FHEM handles continuation lines.
- <br><br>
- <a name="ECMDdefine"></a>
- <b>Define</b><br><br>
- <ul>
- <code>define <name> ECMD telnet <IPAddress:Port></code><br><br>
- or<br><br>
- <code>define <name> ECMD serial <SerialDevice>[<@BaudRate>]</code>
- <br><br>
- Defines a physical ECMD device. The keywords <code>telnet</code> or
- <code>serial</code> are fixed.<br><br>
- Examples:
- <ul>
- <code>define AVRNETIO ECMD telnet 192.168.0.91:2701</code><br>
- <code>define AVRNETIO ECMD serial /dev/ttyS0</code><br>
- <code>define AVRNETIO ECMD serial /dev/ttyUSB0@38400</code><br>
- </ul>
- <br>
- </ul>
- <a name="ECMDset"></a>
- <b>Set</b><br><br>
- <ul>
- <code>set <name> classdef <classname> <filename></code>
- <br><br>
- Creates a new device class <code><classname></code> for logical devices.
- The class definition is in the file <code><filename></code>. You must
- create the device class before you create a logical device that adheres to
- that definition.
- <br><br>
- Example:
- <ul>
- <code>set AVRNETIO classdef /etc/fhem/ADC.classdef</code><br>
- </ul>
- <br>
- <code>set <name> reopen</code>
- <br><br>
- Closes and reopens the device. Could be handy if connection is lost and cannot be
- reestablished automatically.
- <br><br>
- </ul>
- <a name="ECMDget"></a>
- <b>Get</b><br><br>
- <ul>
- <code>get <name> raw <command></code>
- <br><br>
- Sends the command <code><command></code> to the physical ECMD device
- <code><name></code> and reads the response. In the likely case that
- the command needs to be terminated by a newline character, you have to
- resort to a <a href="#perl"><perl special></a>.
- <br><br>
- Example:
- <ul>
- <code>get AVRNETIO raw { "ip\n" }</code><br>
- </ul>
- </ul>
- <br><br>
- <a name="ECMDattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li>classdefs<br>A colon-separated list of <classname>=<filename>.
- The list is automatically updated if a class definition is added. You can
- directly set the attribute. Example: <code>attr myECMD classdefs ADC=/etc/fhem/ADC.classdef:GPIO=/etc/fhem/AllInOne.classdef</code></li>
- <li>split <separator><br>
- Some devices send several readings in one transmission. The split attribute defines the
- separator to split such transmissions into separate messages. The regular expression for
- matching a reading is then applied to each message in turn. After splitting, the separator
- <b>is</b> still part of the single messages. Separator can be a single- or multi-character string,
- e.g. \n or \r\n.
- Example: <code>attr myECMD split \n</code> splits <code>foo 12\nbar off\n</code> into
- <code>foo 12\n</code> and <code>bar off\n</code>.</li>
- <li>logTraffic <loglevel><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>
- <li>timeout <seconds><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>
- <li>partial <seconds><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>
- <li>requestSeparator <separator><br>
- A single command from FHEM to the device might need to be broken down into several requests.
- A command string is split at all
- occurrences of the request separator. The request separator itself is removed from the command string and thus is
- 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.
- </li>
- <li>responseSeparator <separator><br>
- 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.
- The response separator is only appended to commands split by means of a
- 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.
- </li>
- <li>autoReopen <timeout>,<delay><br>
- If this attribute is set, the device is automatically reopened if no bytes were written for <timeout> seconds or more. After reopening
- FHEM waits <delay> seconds before writing to the device. Use the delay with care because it stalls FHEM completely.
- </li>
- <li>stop<br>
- Disables read/write access to the device if set to 1. No data is written to the physical ECMD device. A read request always returns an undefined result.
- This attribute can be used to temporarily disable a device that is not available.
- </li>
- <li><a href="#verbose">verbose</a></li>
- </ul>
- <br><br>
- <b>Separators</b>
- <br><br>
- <i>When to use the split and partial attributes?</i><p>
- 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>
- Set the <code>split</code> attribute if you
- receive several responses in one transmission, like <code>reply1\r\nreply2\r\n</code>.<p>
- <i>When to use the requestSeparator and responseSeparator attributes?</i><p>
- 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
- as defined in the <a href="#ECMDClassdef">class definition</a> are broken down into several request/response
- interactions with the physical device. The request separator is not sent to the physical device.<p>
- Set the <code>responseSeparator</code> attribute to separate the responses received for a command
- broken down into several requests by means of a request separator. This is useful for easier postprocessing.<p>
- Example: you want to send the requests <code>request1</code> and <code>request2</code> in one command. The
- physical device would respond with <code>response1</code> and <code>response2</code> respectively for each
- of the requests. You set the request separator to \000 and the response separator to \001 and you define
- the command as <code>request1\000request2\000</code>. The command is broken down into <code>request1</code>
- and <code>request2</code>. <code>request1</code> is sent to the physical device and <code>response1</code>
- is received, followed by sending <code>request2</code> and receiving <code>response2</code>. The final
- result is <code>response1\001response2\001</code>.<p>
- You can think of this feature as of a macro. Splitting and partial matching is still done per single
- request/response within the macro.<p>
- <a name="ECMDDatagram"></a>
- <b>Datagram monitoring and matching</b>
- <br><br>
- 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>
- 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>
- 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.
- Example: <code>#!foo\r\n (\043\041\146\157\157\015\012)</code>.<p>
- 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.
- <br><br>
- <a name="ECMDConnection"></a>
- <b>Connection error handling</b>
- <br><br>
- This modules handles unexpected disconnects of devices as follows (on Windows only for TCP connections):<p>
- 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
- 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>
- Please design your class definitions in such a way that the double sending of data does not bite you in any case.
- <br><br>
- <a name="ECMDClassdef"></a>
- <b>Class definition</b>
- <br><br>
- The class definition for a logical ECMD device class is contained in a text file.
- The text file is made up of single lines. Empty lines and text beginning with #
- (hash) are ignored. Therefore make sure not to use hashes in commands.<br>
- The following commands are recognized in the device class definition:<br><br>
- <ul>
- <li><code>params <parameter1> [<parameter2> [<parameter3> ... ]]</code><br><br>
- Declares the names of the named parameters that must be present in the
- <a href="#ECMDDevicedefine">definition of the logical ECMD device</a>.
- <br><br>
- </li>
- <li><code>state <reading></code><br><br>
- Normally, the state reading is set to the latest command or reading name followed
- by the value, if any. This command sets the state reading to the value of the
- named reading if and only if the reading is updated.<br><br>
- </li>
- <li><code>set <commandname> cmd { <a href="#perl"><perl special></a> }</code><br>
- <code>get <commandname> cmd { <a href="#perl"><perl special></a> }</code>
- <br><br>
- Declares a new set or get command <code><commandname></code>. If the user invokes the set or get command <code><commandname></code>, the string that results from the execution of the <perl special> is sent to the physical device.<p>
- A request separator (see <a href="#ECMDattr">Attributes</a>)
- 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.
- The result string for the command is the
- concatenation of all responses received from the physical device, optionally with response separators
- (see <a href="#ECMDattr">Attributes</a>) in between.
- <br><br>
- </li>
- <li>
- <code>set <commandname> expect "<regex>"</code><br>
- <code>get <commandname> expect "<regex>"</code>
- <br><br>
- Declares what FHEM expects to receive after the execution of the get or set command <code><commandname></code>. <code><regex></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.
- <code><regex></code> must match the entire reply, as in <code>m/^<regex>$/</code>.
- Particularly, broken connections can only be detected if something is expected (see <a href="#ECMDConnection">Connection error handling</a>).
- <br><br>
- </li>
- <li>
- <code>set <commandname> postproc { <a href="#perl"><perl special></a> }</code><br>
- <code>get <commandname> postproc { <a href="#perl"><perl special></a> }</code>
- <br><br>
- Declares a postprocessor for the command <code><commandname></code>. The data received from the physical device in reply to the get or set command <code><commandname></code> is processed by the Perl code <code><perl command></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.
- <br><br>
- </li>
- <li>
- <code>set <commandname> params <parameter1> [<parameter2> [<parameter3> ... ]]</code><br>
- <code>get <commandname> params <parameter1> [<parameter2> [<parameter3> ... ]]</code>
- <br><br>
- Declares the names of the named parameters that must be present in the
- set or get command <code><commandname></code></a>. Be careful not to use a parameter name that
- is already used in the device definition (see <code>params</code> above).
- <br><br>
- </li>
- <li>
- <code>reading <reading> match "<regex>"</code>
- <br><br>
- Declares a new reading named <code><reading></code>. A spontaneous data transmission from the physical device that matches the Perl regular expression <code><regex></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.
- <code><regex></code> must match the entire reply, as in <code>m/^<regex>$/</code>.
- <br><br>
- </li>
- <li>
- <code>reading <reading> postproc { <a href="#perl"><perl special></a> }</code>
- <br><br>
- Declares a postprocessor for the reading <code><reading></code>. The data received for the named reading is processed by the Perl code <code><perl command></code>. This works analogously to the <code>postproc</code> spec for set and get commands.
- <br><br>
- </li>
- </ul>
- The perl specials in the definitions above can
- contain macros:<br><br>
- <ul>
- <li>The macro <code>%NAME</code> will expand to the device name.</li>
- <li>The macro <code>%TYPE</code> will expand to the device type.</li>
- <li>The macro <code>%<parameter></code> will expand to the
- current value of the named parameter. This can be either a parameter
- from the device definition or a parameter from the set or get
- command.</li>
- <li>The macro substitution occurs before perl evaluates the
- expression. It is a plain text substitution. Be careful not to use parameters with overlapping names like
- <code>%pin</code> and <code>%pin1</code>.</li>
- <li>If in doubt what happens, run the commands with loglevel 5 and
- inspect the log file.</li>
- </ul><br><br>
- The rules outlined in the <a href="#perl">documentation of perl specials</a>
- for the <code><perl command></code> in the postprocessor definitions apply.
- <b>Note:</b> Beware of undesired side effects from e.g. doubling of semicolons!
- </ul>
- <p><a name="ECMDDevice"></a>
- <h3>ECMDDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ECMDDevice'>DE</a>]</div>
- <ul>
- <br>
- <a name="ECMDDevicedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ECMDDevice [<classname> [<parameter1> [<parameter2> [<parameter3> ... ]]]]</code>
- <br><br>
- Defines a logical ECMD device. The number of given parameters must match those given in
- the <a href="#ECMDClassdef">class definition</a> of the device class <code><classname></code>.<p>
-
- Normally, the logical ECMDDevice is attached to the latest previously defined physical ECMD device
- for I/O. Use the <code>IODev</code> attribute of the logical ECMDDevice to attach to any
- physical ECMD device, e.g. <code>attr myRelais2 IODev myAVRNETIO</code>. In such a case the correct
- reference to the class cannot be made at the time of definition of the device. Thus, you need to
- omit the <classname> and <parameter> references in the definition of the device and use the
- <code>class</code> <a href="#ECMDDeviceattr">attribute</a> instead.
- <br><br>
- Examples:
- <ul>
- <code>define myADC ECMDDevice ADC</code><br>
- <code>define myRelais1 ECMDDevice relais 8</code><br>
- <code>define myRelais2 ECMDDevice</code><br>
- <code>attr myRelais2 IODev myAVRNETIO</code><br>
- <code>attr myRelais2 class relais 8</code>
- </ul>
- <br>
- </ul>
- <a name="ECMDDeviceset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <commandname> [<parameter1> [<parameter2> [<parameter3> ... ]]]</code>
- <br><br>
- The number of given parameters must match those given for the set command <code><commandname></code> definition in
- the <a href="#ECMDClassdef">class definition</a>.<br><br>
- If <code>set <commandname></code> is invoked the perl special in curly brackets from the command definition
- is evaluated and the result is sent to the physical ECMD device.
- <br><br>
- Example:
- <ul>
- <code>set myRelais1 on</code><br>
- <code>set myDisplay text This\x20text\x20has\x20blanks!</code><br>
- </ul>
- <br>
- </ul>
- <a name="ECMDDeviceget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <commandname> [<parameter1> [<parameter2> [<parameter3> ... ]]]</code>
- <br><br>
- The number of given parameters must match those given for the get command <code><commandname></code> definition in
- the <a href="#ECMDClassdef">class definition</a>.<br><br>
- If <code>get <commandname></code> is invoked the perl special in curly brackets from the command definition
- is evaluated and the result is sent to the physical ECMD device. The response from the physical ECMD device is returned
- and the state of the logical ECMD device is updated accordingly.
- <br><br>
- Example:
- <ul>
- <code>get myADC value 3</code><br>
- </ul>
- <br>
- </ul>
- <a name="ECMDDeviceattr"></a>
- <b>Attributes</b>
- <ul>
- <li>class<br>
- If you omit the <classname> and <parameter> references in the
- <a href="#ECMDDevicedefine">definition</a> of the device, you have to add them
- separately as an attribute. Example: <code>attr myRelais2 class relais 8</code>.</li>
- <li>noState<br>
- Changes of readings do not change the state reading if this attribute is set to a non-zero value.
- For example, this is desirable if you need to avoid the second event created by changing the state
- reading. Previously created state readings can be deleted by means of <a href="#deletereading">deletereading</a>.
- The user can define the value shown in the state of the device by means
- of the <a href="#stateFormat">stateFormat</a> attribute.</li>
- <li><a href="#verbose">verbose</a></li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br><br>
- <b>Example 1</b>
- <br><br>
- <ul>
- The following example shows how to access the ADC of the AVR-NET-IO board from
- <a href="http://www.pollin.de">Pollin</a> with
- <a href="http://www.ethersex.de/index.php/ECMD">ECMD</a>-enabled
- <a href="http://www.ethersex.de">Ethersex</a> firmware.<br><br>
- The class definition file <code>/etc/fhem/ADC.classdef</code> looks as follows:<br><br>
- <code>
- get value cmd {"adc get %channel\n"} <br>
- get value params channel<br>
- get value expect "\d+\n"<br>
- get value postproc { s/^(\d+)\n$/$1/;; $_ }<br>
- </code>
- <br>
- In the fhem configuration file or on the fhem command line we do the following:<br><br>
- <code>
- define AVRNETIO ECMD telnet 192.168.0.91:2701 # define the physical device<br>
- attr AVRNETIO classdefs ADC=/etc/fhem/ADC.classdef # define the device class ADC<br>
- define myADC ECDMDevice ADC # define the logical device myADC with device class ADC<br>
- get myADC value 1 # retrieve the value of analog/digital converter number 1<br>
- </code>
- <br>
- The get command is evaluated as follows: <code>get value</code> has one named parameter
- <code>channel</code>. In the example the literal <code>1</code> is given and thus <code>%channel</code>
- is replaced by <code>1</code> to yield <code>"adc get 1\n"</code> after macro substitution. Perl
- evaluates this to a literal string which is send as a plain ethersex command to the AVR-NET-IO. The
- board returns something like <code>024\n</code> for the current value of analog/digital converter number 1. The postprocessor keeps only the digits.
- <br><br>
- </ul>
- <b>Example 2</b>
- <br><br>
- <ul>
- The following example shows how to switch a relais driven by pin 3 (bit mask 0x08) of I/O port 2 on for
- one second and then off again.<br><br>
- The class definition file <code>/etc/fhem/relais.classdef</code> looks as follows:<br><br>
- <code>
- params pinmask<br>
- 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>
- set on expect ".*"<br>
- set on postproc {s/^OK\nOK\nOK\nOK\n$/success/; "$_" eq "success" ? "ok" : "error"; }<br>
- </code>
- <br>
- In the fhem configuration file or on the fhem command line we do the following:<br><br>
- <code>
- define AVRNETIO ECMD telnet 192.168.0.91:2701 # define the physical device<br>
- attr AVRNETIO classdefs relais=/etc/fhem/relais.classdef # define the device class relais<br>
- attr AVRNETIO requestSeparator \000<br>
- define myRelais ECMDDevice 8 # define the logical device myRelais with pin mask 8<br>
- set myRelais on # execute the "on" command<br>
- </code>
- <br>
- The set command is evaluated as follows: <code>%pinmask</code>
- is replaced by <code>8</code> to yield
- <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
- evaluates this to a literal string. This string is split into lines (with trailing newline characters)
- <code>
- <ul>
- <li>io set ddr 2 ff\n</li>
- <li>ioset port 2 08\n</li>
- <li>wait 1000\n</li>
- <li>io set port 2 00\n</li>
- </ul>
- </code>
- These lines are sent as a plain ethersex commands to the AVR-NET-IO one by one. After
- each line the answer from the physical device is read back. They are concatenated and returned
- for further processing by the <code>postproc</code> command.
- For any of the four plain ethersex commands, the AVR-NET-IO returns the string <code>OK\n</code>. They are
- concatenated. The postprocessor takes the result from <code>$_</code>,
- substitutes it by the string <code>success</code> if it is <code>OK\nOK\nOK\nOK\n</code>, and then either
- returns the string <code>ok</code> or the string <code>error</code>. If the responseSeparator was set to \000,
- 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>.
- <br><br>
- </ul>
- <b>Example 3</b>
- <br><br>
- <ul>
- The following example shows how to implement a sandbox.<br><br>
- The class definition file <code>/etc/fhem/DummyServer.classdef</code> looks as follows:<br><br>
- <code>
- reading foo match "\d+\n"<br>
- reading foo postproc { s/^(\d+).*$/$1/;; $_ }<br>
- </code>
- <br>
- In the fhem configuration file or on the fhem command line we do the following:<br><br>
- <code>
- define myDummyServer ECMD telnet localhost:9999 # define the physical device<br>
- set myDummyServer classdef DummyServer /etc/fhem/DummyServer.classdef # define the device class DummyServer<br>
- define myDummyClient ECDMDevice DummyServer # define a logical device with device class DummyServer<br>
- </code>
- <p>
- 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>
-
- Start FHEM.<p>
-
- Then enter the number 4711 at the stdin of the running netcat server.<p>
-
- 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.
- <br><br>
- </ul>
- </ul>
- <p><a name="EDIPLUG"></a>
- <h3>EDIPLUG</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EDIPLUG'>DE</a>]</div>
- FHEM module to control the Edimax Smart Plug Switches SP-2101W and SP-1101W (http://www.edimax.com)<br>
- 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>
- SP-2101W - Edimax Smart Plug Switch with Power Meter<br>
- SP-1101W - Edimax Smart Plug Switch<br>
- requires XML:Simple -> sudo apt-get install libxml-simple-perl<br>
- <br>
- <ul>
- <a name="EDIPLUGdefine"></a>
- <b>Define</b>
- <ul>
- define <name> EDIPLUG < IP_EDIMAX_Device (or FQDN) ><br>
- Example:<br>
- <li>define myediplug EDIPLUG 192.168.0.99</li>
- <li>define myediplug EDIPLUG ediplug.myhome.net</li>
- </ul>
- <a name="EDIPLUGset"></a>
- <b>Set</b>
- <ul>
- <li>on => switch power on</li>
- <li>off => switch power off</li>
- <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>
- use (DayOfWeek) 00:00 24:00 on to switch the complete day on</li>
- <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>
- <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>
- <li>delete => delete timelist of one day : DayOfWeek(0-6)</li>
- <li>day => enable/disable timeschedule for one day : DayOfWeek(0-6) on/off</li>
- </ul>
- <a name="EDIPLUGget"></a>
- <b>Get</b><ul>
- <li>info => shows MAC , Firmware Version , Model , Name</li>
- <li>power => shows all Power informations ( model SP-2101W only)</li>
- <li>schedule => show all internal on/off timetables</li>
- <li>status => show on/off state</li>
- </ul>
- <a name="EDIPLUGattr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval => polling interval (default 60)</li>
- <li>timeout => max. time to wait in seconds (default 2)</li>
- <li>read-only => only read (Get) from device (default 0)</li>
- <li>user => username (default admin)</li>
- <li>password => password (default 1234)</li>
- </ul>
- <br>
- <b>Readings</b>
- <ul>
- <li>0.So -> switching times Sunday</li>
- <li>0.So.state -> Sunday switching on/off</li>
- <li>.</li>
- <li>.</li>
- <li>.</li>
- <li>6.Sa -> switching times Saturday</li>
- <li>6.Sa.state -> Saturday switching on/off ( model SP-2101W only )</li>
- <li>last_Toggle_Time ( model SP-2101W only )</li>
- <li>current ( model SP-2101W only )</li>
- <li>power_now ( model SP-2101W only )</li>
- <li>power_day ( model SP-2101W only )</li>
- <li>power_week ( model SP-2101W only )</li>
- <li>power_month ( model SP-2101W only )</li>
- </ul>
- </ul>
- <p><a name="EGPM"></a>
- <h3>EGPM Socket</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EGPM'>DE</a>]</div>
- <ul>
- Defines a Socket from EGPM2LAN Module. If the global Module AUTOCREATE is enabled,
- this device will be created automatically. For manual Setup, pls. see the description of <a href="#EGPM2LAN">EGPM2LAN</a>.
- <br><br>
- <a name="EGPMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EGPM <device> <socket-nr></code>
- <br>
- </ul>
- <br>
- <a name="EGPMset"></a>
- <b>Set</b>
- <ul><code>set <name> <[on|off|toggle]></code><br>
- Switches the socket on or of.
- </ul>
- <ul><code>set <name> <[on-for-timer|off-for-timer|on-till|off-till|blink|intervals]></code><br>
- Switches the socket for a specified time+duration or n-times. For Details see <a href="#setExtensions">set extensions</a>
- </ul><br>
- Example:
- <ul>
- <code>define lamp1 EGPM mainswitch 1</code><br>
- <code>set lamp1 on</code><br>
- </ul>
- <br>
- <a name="EGPMget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="EGPMattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="EGPM2LANevents"></a>
- <b>Generated events</b>
- <ul>
- <li>EGPM <name> <[on|off]></li>
- </ul>
- </ul>
- <p><a name="EGPM2LAN"></a>
- <h3>EGPM2LAN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EGPM2LAN'>DE</a>]</div>
- <ul>
- <br>
- <a name="EGPM2LANdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EGPM2LAN <IP-Address></code><br>
- <br>
- Creates a Gembird ® <a href="http://energenie.com/item.aspx?id=7557" >Energenie EG-PM2-LAN</a> device to switch up to 4 sockets over the network.
- If you have more than one device, it is helpful to connect and set names for your sockets over the web-interface first.
- The name settings will be adopted to FHEM and helps you to identify the sockets. Please make sure that you´re logged off from the Energenie web-interface otherwise you can´t control it with FHEM at the same time.<br>
- Create a <a href="#EGPM">EGPM-Module</a> to control a single socket with additional features.<br>
- <b>EG-PMS2-LAN with surge protector feature was not tested until now.</b>
- </ul><br>
- <a name="EGPM2LANset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> password [<one-word>]</code><br>
- Encrypt and store device-password in FHEM. Leave empty to remove the password.<br>
- 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>
- <br>
- <code>set <name> <[on|off|toggle]> <socketnr.></code><br>
- Switch the socket on or off.<br>
- <br>
- <code>set <name> <[on|off]> <all></code><br>
- Switch all available sockets on or off.<br>
- <br>
- <code>set <name> <staterequest></code><br>
- Update the device information and the state of all sockets.<br>
- If <a href="#autocreate">autocreate</a> is enabled, an <a href="#EGPM">EGPM</a> device will be created for each socket.<br>
- <br>
- <code>set <name> <clearreadings></code><br>
- Removes all readings from the list to get rid of old socketnames.
- </ul>
- <br>
- <a name="EGPM2LANget"></a>
- <b>Get</b>
- <ul><code>get <name> state</code><br>
- Returns a text like this: "1: off 2: on 3: off 4: off" or the last error-message if something went wrong.<br>
- </ul><br>
- <a name="EGPM2LANattr"></a>
- <b>Attributes</b>
- <ul>
- <li>stateDisplay</li>
- 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.
- <li>autocreate</li>
- Default: <b>on</b> <a href="#EGPM">EGPM</a>-devices will be created automatically with a <b>set</b>-command.
- Change this attribute to value <b>off</b> to avoid that mechanism.
- <li><a href="#loglevel">loglevel</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <br>
- <br>
- Example:
- <ul>
- <code>define mainswitch EGPM2LAN 10.192.192.20</code><br>
- <code>set mainswitch password SecretGarden</code><br>
- <code>set mainswitch on 1</code><br>
- </ul>
- </ul>
- <p><a name="EIB"></a>
- <h3>EIB / KNX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EIB'>DE</a>]</div>
- <div>
- <p>EIB/KNX is a standard for building automation / home automation.
- It is mainly based on a twisted pair wiring, but also other mediums (ip, wireless) are specified.</p>
- <p>While the module <a href="#TUL">TUL</a> represents the connection to the EIB network,
- the EIB modules represent individual EIB devices. This module provides a basic set of operations (on, off, on-till, etc.)
- to switch on/off EIB devices. Sophisticated setups can be achieved by combining a number of
- EIB module instances or by sending raw hex values to the network (set <devname> raw <hexval>).</p>
- <p>EIB/KNX defines a series of Datapoint Type as standard data types used
- to allow general interpretation of values of devices manufactured by different companies.
- These datatypes are used to interpret the status of a device, so the state in FHEM will then
- show the correct value.</p>
- <p><a name="EIBdefine"></a> <b>Define</b></p>
- <div>
- <code>define <name> EIB <main group> [<additional group> ..]</code>
-
- <p>Define an EIB device, connected via a <a href="#TUL">TUL</a>. The
- <group> parameters are either a group name notation (0-15/0-15/0-255) or the hex representation of the value (0-f0-f0-ff).
- The <main group> is used for sending of commands to the EIB network.</p>
- <p>The state of the instance will be updated when a new state is received from the network for any of the given groups.
- 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
- responded back on a second group.</p>
- <p>For actors and sensors the <a href="#autocreate">autocreate</a> module may help.</p>
- <p>Example:</p>
- <pre>
- define lamp1 EIB 0/10/12
- define lamp1 EIB 0/10/12 0/0/5
- define lamp1 EIB 0A0C
- </pre>
- </div>
-
- <p><a name="EIBset"></a> <b>Set</b></p>
- <div>
- <code>set <name> <value> [<time> g<groupnr>]</code>
- <p>where value one of:</p>
- <li><b>on</b> switch on device</li>
- <li><b>off</b> switch off device</li>
- <li><b>on-for-timer</b> <secs> switch on the device for the given time. After the specified seconds a switch off command is sent.</li>
- <li><b>on-till</b> <time spec> switches the device on. The device will be switched off at the given time.</li>
- <li><b>raw</b> <hexvalue> sends the given value as raw data to the device.</li>
- <li><b>value</b> <decimal value> transforms the value according to the chosen model and send the result to the device.</li>
- <p>Example:</p>
- <pre>
- set lamp1 on
- set lamp1 off
- set lamp1 on-for-timer 10
- set lamp1 on-till 13:15:00
- set lamp1 raw 234578
- set lamp1 value 23.44
- </pre>
- <p>When as last argument a g<groupnr> is present, the command will be sent
- to the EIB group indexed by the groupnr (starting by 1, in the order as given in Define).</p>
- <pre>
- define lamp1 EIB 0/10/01 0/10/02
- set lamp1 on g2 (will send "on" to 0/10/02)
- </pre>
- <p>A dimmer can be used with a slider as shown in following example:</p>
- <pre>
- define dim1 EIB 0/0/5
- attr dim1 model percent
- attr dim1 webCmd value
- </pre>
-
- <p>The current date and time can be sent to the bus by the following settings:</p>
- <pre>
- define timedev EIB 0/0/7
- attr timedev model time
- attr timedev eventMap /value now:now/
- attr timedev webCmd now
-
- define datedev EIB 0/0/8
- attr datedev model date
- attr datedev eventMap /value now:now/
- attr datedev webCmd now
-
- # send every midnight the new date
- define dateset at *00:00:00 set datedev value now
-
- # send every hour the current time
- define timeset at +*01:00:00 set timedev value now
- </pre>
- </div>
-
- <p><a name="EIBget"></a> <b>Get</b></p>
- <div>
- <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>
- The answer from the bus-device is not shown in the toolbox, but is treated like a regular telegram.</p>
- </div>
-
- <p><a name="EIBattr"></a> <b>Attributes</b></p>
- <div>
- <a href="#IODev">IODev</a><br>
- <a href="#alias">alias</a><br>
- <a href="#comment">comment</a><br>
- <a href="#devStateIcon">devStateIcon</a><br>
- <a href="#devStateStyle">devStateStyle</a><br>
- <a href="#do_not_notify">do_not_notify</a><br>
- <a href="#dummy">dummy</a><br>
- <a href="#readingFnAttributes">readingFnAttributes</a><br>
- <a href="#event-aggregator">event-aggregator</a><br>
- <a href="#event-min-interval">event-min-interval</a><br>
- <a href="#event-on-change-reading">event-on-change-reading</a><br>
- <a href="#event-on-update-reading">event-on-update-reading</a><br>
- <a href="#eventMap">eventMap</a><br>
- <a href="#group">group</a><br>
- <a href="#icon">icon</a><br>
- <a href="#ignore">ignore</a><br>
- <a href="#room">room</a><br>
- <a href="#showtime">showtime</a><br>
- <a href="#sortby">sortby</a><br>
- <a href="#stateFormat">stateFormat</a><br>
- <a href="#userReadings">userReadings</a><br>
- <a href="#userattr">userattr</a><br>
- <a href="#verbose">verbose</a><br>
- <a href="#webCmd">webCmd</a><br>
- <a href="#widgetOverride">widgetOverride</a><br>
- <br>
-
- <p><a name="EIBreadingX"></a> <b>EIBreadingX</b></p>
- <div>
- Enable additional readings for this EIB-device. With this Attribute set, a reading setG<x> will be updated when a set command is issued from FHEM, a reading getG<x> will be updated as soon a Value is received from EIB-Bus (<x> 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.
- <p>If set to 1, the following additional readings will be available:</p>
- <pre>
- setGx will be updated on a SET command issued by FHEM. <x> stands for the groupnr. - see define statement
- getGx will be updated on reception of a message from EIB-bus.
- </pre>
- <p>Example:</p>
- <pre>
- define myDimmer EIB 0/1/1 0/1/2
- attr myDimmer EIBreadingX 1
- attr myDimmer model dpt1 dpt5 # GA 0/1/1 will be interpreted as on/off, GA 0/1/2 will be handled as dpt5
- attr myDimmer stateFormat getG2 % # copies actual dim-level (as received from dimmer) into STATE
- </pre>
- <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 <device> model <dpt1> <dpt2> <dpt3></code></p>
- </div>
-
- <p><a name="EIBreadingSender"></a> <b>EIBreadingSender</b></p>
- <div>
- Enable an additional reading for this EIB-device. With this Attribute set, a reading sender will be updated any time a new telegram arrives.
- <p>If set to 1, the following additional reading will be available: <pre>sender</pre></p>
- <pre>
- sender will be updated any time a new telegram arrives at this group-adress
- </pre>
- <p>Example:</p>
- <pre>
- define myDimmer EIB 0/1/1
- attr myDimmer EIBreadingSender 1
- </pre>
- </div>
- <p><a name="EIBanswerReading"></a> <b>EIBanswerReading</b></p>
- <div>
- If enabled, FHEM answers on read requests. The content of state is send to the bus as answer.
- <p>If set to 1, read-requests are answered</p>
- <p>Example:</p>
- <pre>
- define myValue EIB 0/1/1
- attr myValue EIBanswerReading 1
- </pre>
- </div>
- <p><a name="EIBreadingRegex"></a> <b>EIBreadingRegex</b></p>
- <div>
- 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, ...
- This function has only an impact on the content of state - no other functions are disturbed.
- <p>Example:</p>
- <pre>
- define myLamp EIB 0/1/1 0/1/2 0/1/2
- attr myLamp EIBreadingRegex getG[1]:/steuern: getG[2]:/status: getG[3]:/sperre:
- attr myLamp EIBreadingRegex devStateIcon status.on:general_an status.off:general_aus sperre.on:lock
- </pre>
- </div>
- <p><a name="EIBwritingRegex"></a> <b>EIBwritingRegex</b></p>
- 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, ...
- This function has only an impact on the content of state - no other functions are disturbed.
- <p>Example:</p>
- <pre>
- define myLockObject EIB 0/1/1
- attr myLamp EIBwritingRegex setG1:on/LOCKED setG1:/UNLOCKED
- </pre>
- </div>
- <p><a name="model"></a> <b>model</b></p>
- <div>
- <p>This attribute is mandatory!</p>
- 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>
- <br>
- <U>dpt1</U> - 1 bit<br>
- Will be interpreted as on/off, 1=on 0=off and vice versa<br>
- <br>
- <U>dpt3</U> - Discrete Dim-Message<br>
- Usage: set value to +/-0..100. -54 means dim down by 50%<br>
- <br>
- <U>dpt5</U> - 1 byte unsigned<br>
- dpt5.003 - angle in degrees<br>
- angle - same as dpt5.003<br>
- dpt5.004 - percent<br>
- percent - same as above<br>
- percent255 - scaled percentage: 255=100%<br>
- <br>
- <U>dpt6</U> - 1 byte signed <br>
- dpt6.001 - percent<br>
- dpt6.010<br>
- <br>
- <U>dpt7</U> - 2 byte unsigned<br>
- length - mm<br>
- current - mA<br>
- brightness<br>
- timeperiod - ms<br>
- timeperiod - min<br>
- timeperiod - h<br>
- <br>
- <U>dpt9</U> - 2 byte float<br>
- tempsensor<br>
- lightsensor<br>
- speedsensor<br>
- speedsensor-km/h<br>
- pressuresensor<br>
- rainsensor<br>
- time1sensor<br>
- time2sensor<br>
- humiditysensor<br>
- airqualitysensor<br>
- voltage-mV<br>
- current-mA2<br>
- current-mA2<br>
- power<br>
- powerdensity<br>
- <br>
- <U>dpt10</U> - time hh:mm:ss<br>
- dpt10_ns - same as DPT10, seconds always 0<br>
- time - receiving has no effect, sending any value contains actual system time. For examle use set timedev value now<br>
- <br>
- <U>dpt11</U> - date dd.mm.yyyy<br>
- date - receiving has no effect, sending any value contains actual system date. For examle use set timedev value now<br>
- <br>
- <U>dpt12</U> - 4 byte unsigned<br>
- <br>
- <U>dpt13</U> - 4 byte signed<br>
- <br>
- <U>dpt14</U> - 4 byte float<br>
- <br>
- <U>dpt16</U> - text, use with "string": set textdev string Hallo Welt<br>
- </div>
- </div>
- <p><a name="EM"></a>
- <h3>EM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EM'>DE</a>]</div>
- <ul>
- <a name="EMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EM <em1010pc-device></code>
- <br><br>
- Define a EM1010PC USB device. As the EM1010PC was not designed to be used
- with a PC attached to it all the time, it won't transmit received signals
- automatically, fhem has to poll it every 5 minutes.<br>
- Currently there is no way to read the internal log of the EM1010PC with
- fhem, use the program em1010.pl in the contrib directory for this
- purpose.<br><br>
- Examples:
- <ul>
- <code>define em EM /dev/elv_em1010pc</code><br>
- </ul>
- </ul>
- <br>
- <a name="EMset"></a>
- <b>Set</b>
- <ul>
- <code>set EM <value></code>
- <br><br>
- where <code>value</code> is either time or reset.<br>
- If time has arguments of the form YYYY-MM-DD HH:MM:SS, then the specified
- time will be set, else the time from the host.<br>
- Note: after reset you should set the time.
- </ul>
- <br>
- <a name="EMget"></a>
- <b>Get</b>
- <ul>
- <code>get EM <value></code>
- <br><br>
- where <code>value</code> is either version or time.
- </ul>
- <a name="EMattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (em1010pc)</li>
- <li><a href="#attrdummy">dummy</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="EMEM"></a>
- <h3>EMEM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EMEM'>DE</a>]</div>
- <ul>
- <br>
- <a name="EMEMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EMEM <device-number></code>
- <br><br>
- Define up to 4 EM1000EM attached to the EM1010PC. The device number must
- be between 5 and 8.
- Defining an EMEM will schedule an internal task, which reads the
- status of the device every 5 minutes, and triggers notify/filelog commands.
- <br>Note: Currently this device does not support a "set" function.
- <br><br>
- Example:
- <ul>
- <code>define emem EMEM 5</code><br>
- </ul>
- </ul>
- <br>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="EMEMget"></a>
- <b>Get</b>
- <ul>
- <code>get EMEM status</code>
- <br><br>
- This is the same command which is scheduled every 5 minutes internally.
- </ul>
- <br>
- <a name="EMEMattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (EM1000EM)</li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#IODev">IODev</a></li><br>
- </ul>
- <br>
- </ul>
- <p><a name="EMGZ"></a>
- <h3>EMGZ</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EMGZ'>DE</a>]</div>
- <ul>
- <a name="EMGZdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EMGZ <device-number></code>
- <br><br>
- Define up to 4 EM1000GZ attached to the EM1010PC. The device number must
- be between 9 and 12.
- Defining an EMGZ will schedule an internal task, which reads the
- status of the device every 5 minutes, and triggers notify/filelog commands.
- <br><br>
- Example:
- <ul>
- <code>define emgz EMGZ 9</code><br>
- </ul>
- </ul>
- <a name="EMGZset"></a>
- <b>Set</b>
- <ul>
- <code>set EMGZdevice <param> <value></code><br><br>
- where param is:
- <ul>
- <li>price<br>
- The price of one KW in EURO (use e.g. 0.20 for 20 Cents). It is used
- only on the EM1010PC display, it is of no interest for FHEM.</li>
- </ul>
- </ul>
- <br>
- <a name="EMGZget"></a>
- <b>Get</b>
- <ul>
- <code>get EMGZ status</code>
- <br><br>
- This is the same command which is scheduled every 5 minutes internally.
- </ul>
- <br>
- <a name="EMGZattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (EM1000GZ)</li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#IODev">IODev</a></li><br>
- </ul>
- <br>
- </ul>
- <p><a name="EMT7110"></a>
- <h3>EMT7110</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EMT7110'>DE</a>]</div>
- <ul>
- The EMT7110 is a plug with integrated power meter functionality.<br>
- It can be integrated into FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
- 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>
- This can be done using the initCommands attribute of the JeeLink.<br><br>
- If you have only 9.579 kbit/s sensors use this setting:<br>
- <code>attr myJeeLink initCommands 1r v</code><br><br>
- If you have also 17.241 kbit/s sensors (like TX29...) use this setting:<br>
- <code>attr myJeeLink initCommands 30t v</code><br>
- 30t means that the JeeLink toggles the data rate every 30 Seconds.<br>
-
-
- <br><a name="EMT7110_Define"></a>
- <b>Define</b>
- <code>define <name> EMT7110 <addr></code> <br>
- addr is a 4 digit hex number to identify the EMT7110 device.<br>
- To enable autocreate for a certain time you must set LaCrossePairForSec in the <a href="#JeeLink">JeeLink</a> IODevice device.<br>
- <br>
- <a name="EMT7110_Set"></a>
- <b>Set</b>
- <ul>
- <li>
- resetAccumulatedPower<br>
- Sets the accumulatedPowerOffset attribute to the current value of accumulatedPowerMeasured.
- Don't forget to call save to write the new value to fhem.cfg
- </li>
- </ul><br>
- <a name="EMT7110_Get"></a>
- <b>Get</b>
- <ul>
- </ul><br>
- <a name="EMT7110_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>accumulatedPowerMeasured<br>
- The accumulated power sent by the EMT7110. The EMT7110 accumulates the power even if it was removed and reconnected to the power outlet.
- The only way to reset it is to remove and reinsert the batteries in the EMT7110.
- </li><br>
-
- <li>accumulatedPower<br>
- Is accumulatedPowerMeasured minus the value of the accumulatedPowerOffset attribute value
- This reading is used for the A: part of state
- </li><br>
-
- <li>costs<br>
- Is accumulatedPower * pricePerKWH attribute value
- </li><br>
-
- <li>current<br>
- The measured current in mA
- </li><br>
-
- <li>power<br>
- The measured power in Watt
- </li><br>
-
- <li>voltage<br>
- The measured voltage in Volt
- </li><br>
- </ul>
- <a name="EMT7110_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>accumulatedPowerOffset<br>
- See accumulatedPower reading
- </li><br>
-
- <li>pricePerKWH<br>
- See costs reading
- </li><br>
-
- </ul><br>
- </ul>
- <p><a name="EMWZ"></a>
- <h3>EMWZ</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EMWZ'>DE</a>]</div>
- <ul>
- <a name="EMWZdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EMWZ <device-number></code>
- <br><br>
- Define up to 4 EM1000WZ attached to the EM1010PC. The device number must
- be between 1 and 4. Defining an EMWZ will schedule an internal task, which
- reads the status of the device every 5 minutes, and triggers notify/filelog
- commands. <br><br>
- Example:
- <ul>
- <code>define emwz EMWZ 1</code><br>
- </ul>
- </ul>
- <br>
- <a name="EMWZset"></a>
- <b>Set</b>
- <ul>
- <code>set EMWZdevice <param> <value></code><br><br>
- where param is one of:
- <ul>
- <li>rperkw<br>
- Number of rotations for a KiloWatt of the EM1000WZ device (actually
- of the device where the EM1000WZ is attached to). Without setting
- this correctly, all other readings will be incorrect.</li>
- <li>alarm<br>
- Alarm in WATT. if you forget to set it, the default value is
- rediculously low (random), and if a value above this threshold is
- received, the EM1010PC will start beeping once every minute. It can
- be very annoying.</li>
- <li>price<br>
- The price of one KW in EURO (use e.g. 0.20 for 20 Cents). It is used
- only on the EM1010PC display, it is of no interest for FHEM.</li>
- </ul>
- </ul>
- <br>
- <a name="EMWZget"></a>
- <b>Get</b>
- <ul>
- <code>get EMWZ status</code>
- <br><br>
- This is the same command which is scheduled every 5 minutes internally.
- </ul>
- <br>
- <a name="EMWZattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (EM1000WZ)</li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#IODev">IODev</a></li><br>
- </ul>
- <br>
- </ul>
- <p><a name="ENECSYSGW"></a>
- <h3>ENECSYSGW</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ENECSYSGW'>DE</a>]</div>
- <ul>
- Module to access the ENECSYS gateway (http://www.ENECSYS.com/products/gateway/).<br /><br />
- The actual micro-inverter devices are defined as <a href="#ENECSYSINV">ENECSYSINV</a> devices.
- <br /><br />
- All newly found inverter devices are autocreated and added to the room ENECSYSINV.
- <br /><br />
- <a name="ENECSYSGW_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ENECSYSGW [<host>] [<interval>]</code><br />
- <br />
- Defines an ENECSYSGW device with address <host>.<br /><br />
- The gateway will be polled every <interval> seconds. The default is 10 and minimum is 5.<br /><br />
- Examples:
- <ul>
- <code>define gateway ENECSYSGW 10.0.1.1</code><br />
- </ul>
- </ul><br />
- </ul><br />
- <p><a name="ENECSYSINV"></a>
- <h3>ENECSYSINV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ENECSYSINV'>DE</a>]</div>
- <ul>
- <br />
- <a name="ENECSYSINV_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ENECSYSINV <id> [<interval>]</code><br />
- <br />
- Defines an micro-inverter device connected to an <a href="#ENECSYSGW">ENECSYSGW</a>.<br /><br />
- Examples:
- <ul>
- <code>define SolarPanel1 ENECSYSINV 100123456</code><br />
- </ul>
- </ul><br />
- <a name="ENECSYSINV_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>acfrequency<br />
- the alternating current frequency reported from the device. Should be around 50 Hz in Europe.</li>
- <li>acpower<br />
- the alternating current power</li>
- <li>acvolt<br />
- the alternating current voltage</li>
- <li>dccurrent<br />
- the direct current</li>
- <li>dcpower<br />
- the direct current power</li>
- <li>dcvolt<br />
- the direct current voltage</li>
- <li>efficiency<br />
- the efficiency of the inverter</li>
- <li>lifetime<br />
- the sum of collected energy of the inverter</li>
- <li>temperature<br />
- the temperature of the inverter</li>
- <li>state<br />
- the current state (equal to dcpower) </li>
- </ul><br />
- </ul><br />
- <p> <p>
- <a name="ENIGMA2" id="ENIGMA2"></a>
- </p>
- <h3>
- ENIGMA2
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ENIGMA2'>DE</a>]</div>
- <ul>
- <a name="ENIGMA2define" id="ENIGMA2define"></a> <b>Define</b>
- <ul>
- <code>define <name> ENIGMA2 <ip-address-or-hostname> [[[[<port>] [<poll-interval>]] [<http-user>]] [<http-password>]]</code><br>
- <br>
- This module controls ENIGMA2 based devices like Dreambox or VUplus receiver via network connection.<br>
- <br>
- Defining an ENIGMA2 device will schedule an internal task (interval can be set with optional parameter <poll-interval> in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
- <br>
- Example:<br>
- <ul>
- <code>define SATReceiver ENIGMA2 192.168.0.10<br>
- <br>
- # With custom port<br>
- define SATReceiver ENIGMA2 192.168.0.10 8080<br>
- <br>
- # With custom interval of 20 seconds<br>
- define SATReceiver ENIGMA2 192.168.0.10 80 20<br>
- <br>
- # With HTTP user credentials<br>
- define SATReceiver ENIGMA2 192.168.0.10 80 20 root secret</code>
- </ul>
- </ul><br>
- <br>
- <a name="ENIGMA2set" id="ENIGMA2set"></a> <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code><br>
- <br>
- Currently, the following commands are defined.<br>
- <ul>
- <li>
- <b>on</b> - powers on the device and send a WoL magic package if needed
- </li>
- <li>
- <b>off</b> - turns the device in standby mode
- </li>
- <li>
- <b>toggle</b> - switch between on and off
- </li>
- <li>
- <b>shutdown</b> - turns the device in deepstandby mode
- </li>
- <li>
- <b>reboot</b> - reboots the device
- </li>
- <li>
- <b>restartGui</b> - restarts the GUI / ENIGMA2 process
- </li>
- <li>
- <b>channel</b> channel,0...999,sRef - zap to specific channel or service reference
- </li>
- <li>
- <b>channelUp</b> - zap to next channel
- </li>
- <li>
- <b>channelDown</b> - zap to previous channel
- </li>
- <li>
- <b>volume</b> 0...100 - set the volume level in percentage
- </li>
- <li>
- <b>volumeUp</b> - increases the volume level
- </li>
- <li>
- <b>volumeDown</b> - decreases the volume level
- </li>
- <li>
- <b>mute</b> on,off,toggle - controls volume mute
- </li>
- <li>
- <b>play</b> - starts/resumes playback
- </li>
- <li>
- <b>pause</b> - pauses current playback or enables timeshift
- </li>
- <li>
- <b>stop</b> - stops current playback
- </li>
- <li>
- <b>record</b> - starts recording of current channel
- </li>
- <li>
- <b>input</b> tv,radio - switches between tv and radio mode
- </li>
- <li>
- <b>statusRequest</b> - requests the current status of the device
- </li>
- <li>
- <b>remoteControl</b> UP,DOWN,... - sends remote control commands; see remoteControl help for full command list<br />
- Note: You may add the word "long" after the command to simulate a long key press.
- </li>
- <li>
- <b>showText</b> text - sends info message to screen to be displayed for 8 seconds
- </li>
- <li>
- <b>msg</b> yesno,info... - allows more complex messages as showText, see commands as listed below
- </li>
- </ul>
- <ul>
- <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'.
- The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Messaging</u><br>
- <br>
- <ul>
- 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>
- <br>
- <u>Type Selection:</u><br>
- <ul>
- <code>msg yesno<br>
- msg info<br>
- msg message<br>
- msg attention<br></code>
- </ul><br>
- <br>
- The following parameter are essentially needed after type specification:
- <ul>
- <code>msg <TYPE> <TIMEOUT> <YOUR MESSAGETEXT><br></code>
- </ul>
- </ul>
- </ul><br>
- <br>
- <a name="ENIGMA2get" id="ENIGMA2get"></a> <b>Get</b>
- <ul>
- <code>get <name> <what></code><br>
- <br>
- Currently, the following commands are defined:<br>
- <br>
- <ul>
- <code>channel<br>
- currentMedia<br>
- currentTitle<br>
- mute<br>
- nextTitle<br>
- power<br>
- providername<br>
- servicevideosize<br>
- input<br>
- streamUrl<br>
- volume<br></code>
- </ul>
- </ul><br>
- <br>
- <a name="ENIGMA2attr" id="ENIGMA2attr"></a> <b>Attributes</b><br>
- <ul>
- <ul>
- <li>
- <b>bouquet-tv</b> - service reference address where the favorite television bouquet can be found (initially set automatically during define)
- </li>
- <li>
- <b>bouquet-radio</b> - service reference address where the favorite radio bouquet can be found (initially set automatically during define)
- </li>
- <li>
- <b>disable</b> - Disable polling (true/false)
- </li>
- <li>
- <b>http-method</b> - HTTP access method to be used; e.g. a FritzBox might need to use POST instead of GET (GET/POST)
- </li>
- <li>
- <b>http-noshutdown</b> - Set FHEM-internal HttpUtils connection close behaviour (defaults=1)
- </li>
- <li>
- <b>https</b> - Access box via secure HTTP (true/false)
- </li>
- <li>
- <b>ignoreState</b> - Do not check for available device before sending commands to it (true/false)
- </li>
- <li>
- <b>lightMode</b> - reduces regular queries (resulting in less functionality), e.g. for low performance devices. (true/false)
- </li>
- <li>
- <b>macaddr</b> - manually set specific MAC address for device; overwrites value from reading "lanmac". (true/false)
- </li>
- <li>
- <b>remotecontrol</b> - Explicitly set specific remote control unit format. This will only be considered for set-command <strong>remoteControl</strong> as of now.
- </li>
- <li>
- <b>timeout</b> - Set different polling timeout in seconds (default=6)
- </li>
- <li>
- <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)
- </li>
- </ul>
- </ul><br>
- <br>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <ul>
- <li>
- <b>acg</b> - Shows Automatic Gain Control value in percent; reflects overall signal quality strength
- </li>
- <li>
- <b>apid</b> - Shows the audio process ID for current channel
- </li>
- <li>
- <b>ber</b> - Shows Bit Error Rate for current channel
- </li>
- <li>
- <b>channel</b> - Shows the service name of current channel or media file name; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentMedia</b> - The service reference ID of current channel; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentTitle</b> - Shows the title of the running event; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>enigmaversion</b> - Shows the installed version of ENIGMA2
- </li>
- <li>
- <b>eventcurrenttime</b> - Shows the current time of running event as UNIX timestamp
- </li>
- <li>
- <b>eventcurrenttime_hr</b> - Shows the current time of running event in human-readable format
- </li>
- <li>
- <b>eventcurrenttime_next</b> - Shows the current time of next event as UNIX timestamp
- </li>
- <li>
- <b>eventcurrenttime_next_hr</b> - Shows the current time of next event in human-readable format
- </li>
- <li>
- <b>eventdescription</b> - Shows the description of running event
- </li>
- <li>
- <b>eventdescriptionextended</b> - Shows the extended description of running event
- </li>
- <li>
- <b>eventdescriptionextended_next</b> - Shows the extended description of next event
- </li>
- <li>
- <b>eventdescription_next</b> - Shows the description of next event
- </li>
- <li>
- <b>evenduration</b> - Shows the total duration time of running event in seconds
- </li>
- <li>
- <b>evenduration_hr</b> - Shows the total duration time of running event in human-readable format
- </li>
- <li>
- <b>evenduration_next</b> - Shows the total duration time of next event in seconds
- </li>
- <li>
- <b>evenduration_next_hr</b> - Shows the total duration time of next event in human-readable format
- </li>
- <li>
- <b>eventname</b> - Shows the name of running event
- </li>
- <li>
- <b>eventname_next</b> - Shows the name of next event
- </li>
- <li>
- <b>eventremaining</b> - Shows the remaining duration time of running event in seconds
- </li>
- <li>
- <b>eventremaining_hr</b> - Shows the remaining duration time of running event in human-readable format
- </li>
- <li>
- <b>eventremaining_next</b> - Shows the remaining duration time of next event in seconds
- </li>
- <li>
- <b>eventremaining_next_hr</b> - Shows the remaining duration time of next event in human-readable format
- </li>
- <li>
- <b>eventstart</b> - Shows the starting time of running event as UNIX timestamp
- </li>
- <li>
- <b>eventstart_hr</b> - Shows the starting time of running event in human readable format
- </li>
- <li>
- <b>eventstart_next</b> - Shows the starting time of next event as UNIX timestamp
- </li>
- <li>
- <b>eventstart_next_hr</b> - Shows the starting time of next event in human readable format
- </li>
- <li>
- <b>eventtitle</b> - Shows the title of the running event
- </li>
- <li>
- <b>eventtitle_next</b> - Shows the title of the next event
- </li>
- <li>
- <b>fpversion</b> - Shows the firmware version for the front processor
- </li>
- <li>
- <b>hddX_capacity</b> - Shows the total capacity of the installed hard drive in GB
- </li>
- <li>
- <b>hddX_free</b> - Shows the free capacity of the installed hard drive in GB
- </li>
- <li>
- <b>hddX_model</b> - Shows hardware details for the installed hard drive
- </li>
- <li>
- <b>imageversion</b> - Shows the version for the installed software image
- </li>
- <li>
- <b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>iswidescreen</b> - Indicates widescreen format - 0=off 1=on
- </li>
- <li>
- <b>lanmac</b> - Shows the device MAC address
- </li>
- <li>
- <b>model</b> - Shows details about the device hardware
- </li>
- <li>
- <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
- </li>
- <li>
- <b>nextTitle</b> - Shows the title of the next event; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>onid</b> - The ON ID
- </li>
- <li>
- <b>pcrpid</b> - The PCR process ID
- </li>
- <li>
- <b>pmtpid</b> - The PMT process ID
- </li>
- <li>
- <b>power</b> - Reports the power status of the device (can be "on" or "off")
- </li>
- <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>
- <li>
- <b>providername</b> - Service provider of current channel
- </li>
- <li>
- <b>recordings</b> - Number of active recordings
- </li>
- <li>
- <b>recordingsX_name</b> - name of active recording no. X
- </li>
- <li>
- <b>recordingsX_servicename</b> - servicename of active recording no. X
- </li>
- <li>
- <b>recordings_next</b> - Shows the time of next recording as UNIX timestamp
- </li>
- <li>
- <b>recordings_next_hr</b> - Shows the time of next recording as human-readable format
- </li>
- <li>
- <b>recordings_next_counter</b> - Shows the time until next recording starts in seconds
- </li>
- <li>
- <b>recordings_next_counter_hr</b> - Shows the time until next recording starts human-readable format
- </li>
- <li>
- <b>recordings_next_name</b> - name of next recording
- </li>
- <li>
- <b>recordings_next_servicename</b> - servicename of next recording
- </li>
- <li>
- <b>recordings_error</b> - counter for failed recordings in timerlist
- </li>
- <li>
- <b>recordings_finished</b> - counter for finished recordings in timerlist
- </li>
- <li>
- <b>servicename</b> - Name for current channel
- </li>
- <li>
- <b>servicereference</b> - The service reference ID of current channel
- </li>
- <li>
- <b>servicevideosize</b> - Video resolution for current channel
- </li>
- <li>
- <b>sid</b> - The S-ID
- </li>
- <li>
- <b>snr</b> - Shows Signal to Noise for current channel in percent
- </li>
- <li>
- <b>snrdb</b> - Shows Signal to Noise in dB
- </li>
- <li>
- <b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "absent")
- </li>
- <li>
- <b>tsid</b> - The TS ID
- </li>
- <li>
- <b>tuner_X</b> - Details about the used tuner hardware
- </li>
- <li>
- <b>txtpid</b> - The TXT process ID
- </li>
- <li>
- <b>videoheight</b> - Height of the video resolution for current channel
- </li>
- <li>
- <b>videowidth</b> - Width of the video resolution for current channel
- </li>
- <li>
- <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
- </li>
- <li>
- <b>vpid</b> - The Video process ID
- </li>
- <li>
- <b>webifversion</b> - Type and version of the used web interface
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="EQ3BT"></a>
- <h3>EQ3BT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EQ3BT'>DE</a>]</div>
- <ul>
- EQ3BT is used to control a EQ3 Bluetooth Smart Radiator Thermostat<br><br>
- <b>Note:</b> The bluez package is required to run this module. Please check if gatttool executable is available on your system.
-
- <br>
- <br>
- <a name="EQ3BTdefine" id="EQ3BTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EQ3BT <mac address></code><br>
- <br>
- Example:
- <ul>
- <code>define livingroom.thermostat EQ3BT 00:33:44:33:22:11</code><br>
- </ul>
- </ul>
-
- <br>
- <a name="EQ3BTset" id="EQ3BTset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code><br>
- The following commands are defined:<br><br>
- <ul>
- <li><code><b>desiredTemperature</b> [4.5...29.5]</code> - set the temperature</li>
- <li><code><b>boost</b> on/off</code> - activate boost command</li>
- <li><code><b>mode</b> manual/automatic</code> - set manual/automatic mode</li>
- <li><code><b>updateStatus</b></code> - read current thermostat state and update readings</li>
- <li><code><b>eco</b> </code> - set eco temperature</li>
- <li><code><b>comfort</b> </code> - set comfort temperature</li>
- </ul>
- <br>
- </ul>
-
- <a name="EQ3BTget" id="EQ3BTget"></a>
- <b>Get</b>
- <ul>
- <code>n/a</code>
- </ul>
- <br>
-
- <a name="EQ3BTattr" id="EQ3BTattr"></a>
- <b>attr</b>
- <ul>
- <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>
- </ul>
- <br>
- </ul>
- <p><a name="ESA2000"></a>
- <h3>ESA2000</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ESA2000'>DE</a>]</div>
- <ul>
- The ESA2000 module interprets ESA1000 or ESA2000 type of messages received by the CUL.
- <br><br>
- <a name="ESA2000define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ESA2000 <code>
- [base1 base2]</code> <br>
- <br>
- <code> is the 4 digit HEX code identifying the devices.<br><br>
- <b>base1/2</b> is added to the total kwh as a base (Hoch- und Niedertarifzählerstand).
- </ul>
- <br>
- <a name="ESA2000set"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="ESA2000get"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="ESA2000attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#model">model</a> (esa2000-led, esa2000-wz, esa2000-s0, esa1000wz-ir, esa1000wz-s0, esa1000wz-led, esa1000gas)</li><br>
- <li><a href="#IODev">IODev</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- </ul>
- <br>
- </ul>
- <p><a name="ESPEasy"></a>
- <h3>ESPEasy</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ESPEasy'>DE</a>]</div>
- <ul>
- <p>Provides access and control to Espressif ESP8266 WLAN-SoC w/ ESPEasy</p>
- Notes:
- <ul>
- <li>You have to define a bridge device before any logical device can be
- defined.
- </li>
- <li>You have to configure your ESP to use "FHEM HTTP" controller protocol.
- Furthermore ESP controller IP must match FHEM's IP address. ESP controller
- port and the FHEM ESPEasy bridge port must be the same.
- </li>
- <li>
- Max. 2 ESPEasy bridges can be defined at the same time: 1 for IPv4 and 1 for IPv6
- </li>
- <li>Further information about this module is available here:
- <a href="https://forum.fhem.de/index.php/topic,55728.0.html">Forum #55728</a>
- </li>
- <br>
- <li><b>UPDATE:
- </li>
- <li></b>For security reasons: if one or more of your ESPEasy device uses a
- public IP address then you have to enable this explicitly or the device(s)
- will be ignored/rejected:
- </li>
- <ul>
- <li>
- Enable all ESPEasy device IP addresses/subnets/regexs with the help of
- bridge attributes
- <a href="#ESPEasy_bridge_attr_allowedips">allowedIPs</a> /
- <a href="#ESPEasy_bridge_attr_deniedips">deniedIPs</a>.
- </li>
- <li>
- Enable authentication: see attribute
- <a href="#ESPEasy_bridge_attr_authentication">authentication</a> and
- bridge set <a href="#ESPEasy_bridge_set_user">user</a>
- / <a href="#ESPEasy_bridge_set_pass">pass</a> commands.
- </li>
- </ul>
- <br>
- </ul>
- Requirements:
- <ul>
- <li>
- ESPEasy build >= <a href="https://github.com/ESP8266nu/ESPEasy"
- target="_new">R128</a> (self compiled) or an ESPEasy precompiled image
- >= <a href="http://www.letscontrolit.com/wiki/index.php/ESPEasy#Loading_firmware" target="_new">R140_RC3</a><br>
- </li>
- <li>perl module JSON<br>
- Use "cpan install JSON" or operating system's package manager to install
- Perl JSON Modul. Depending on your os the required package is named:
- libjson-perl or perl-JSON.
- </li>
- </ul>
- <h4>ESPEasy Bridge</h4>
- <a name="ESPEasy_bridge_define"></a>
- <b>Define </b>(bridge)<br><br>
- <ul>
- <code>define <name> ESPEasy bridge <[IPV6:]port></code><br><br>
- <li>
- <a name=""><code><name></code></a><br>
- Specifies a device name of your choise.<br>
- example: <code>ESPBridge</code>
- </li><br>
- <li>
- <a name=""><code><port></code></a><br>
- Specifies TCP port for incoming ESPEasy http requests. This port must
- <u>not</u> be used by any other application or daemon on your system and
- must be in the range 1024..65535 unless you run your FHEM installation
- with root permissions (not recommanded).<br>
- If you want to define an IPv4 and an IPv6 bridge on the same TCP port
- (recommanded) then it might be necessary on (some?) Linux
- distributions to activate IPV6_V6ONLY socket option. Use <code>"echo
- 1>/proc/sys/net/ipv6/bindv6only"</code> or systemctl for that purpose.<br>
- eg. <code>8383</code><br>
- eg. <code>IPV6:8383</code><br>
- Example:<br>
- <code>define ESPBridge ESPEasy bridge 8383</code></li><br>
- </ul>
- <br><a name="ESPEasy_bridge_get"></a>
- <b>Get </b>(bridge)<br><br>
- <ul>
- <li><a name="ESPEasy_bridge_get_reading"><reading></a><br>
- returns the value of the specified reading</li>
- <br>
- <li><a name="ESPEasy_bridge_get_queueSize">queueSize</a><br>
- returns number of entries for each queue (<ip>:number
- [<ip>:number] [...]).
- </li><br>
- <li><a name="ESPEasy_bridge_get_user">user</a><br>
- returns username used by basic authentication for incoming requests.
- </li><br>
- <li><a name="ESPEasy_bridge_get_pass">pass</a><br>
- returns password used by basic authentication for incoming requests.
- </li><br>
- </ul>
- <br><a name="ESPEasy_bridge_set"></a>
- <b>Set </b>(bridge)<br><br>
- <ul>
- <li><a name="ESPEasy_bridge_set_help">help</a><br>
- Shows set command usage<br>
- required values: <code>help|pass|user|clearQueue</code></li><br>
- <li><a name="ESPEasy_bridge_set_clearqueue">clearQueue</a><br>
- Used to erase all command queues.<br>
- required value: <code><none></code><br>
- eg. : <code>set ESPBridge clearQueue</code></li><br>
- <li><a name="ESPEasy_bridge_set_pass">pass</a><br>
- Specifies password used by basic authentication for incoming requests.<br>
- Note that attribute <a href="#ESPEasy_bridge_attr_authentication">authentication</a>
- must be set to enable basic authentication, too.<br>
- required value: <code><password></code><br>
- eg. : <code>set ESPBridge pass secretpass</code></li><br>
- <li><a name="ESPEasy_bridge_set_user">user</a><br>
- Specifies username used by basic authentication for incoming requests.<br>
- Note that attribute <a href="#ESPEasy_bridge_attr_authentication">authentication</a>
- must be set to enable basic authentication, too.<br>
- required value: <code><username></code><br>
- eg. : <code>set ESPBridge user itsme</code></li><br>
- </ul>
- <br><a name="ESPEasy_bridge_attr"></a>
- <b>Attributes </b>(bridge)<br><br>
- <ul>
- <li><a name="ESPEasy_bridge_attr_allowedips">allowedIPs</a><br>
- Used to limit IPs or IP ranges of ESPs which are allowed to commit data.
- <br>
- Specify IP, IP/netmask, regexp or a comma separated list of these values.
- Netmask can be written as bitmask or dotted decimal. Domain names for dns
- lookups are not supported.<br>
- Possible values: IPv64 address, IPv64/netmask, regexp<br>
- Default: 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16,
- fe80::/10, fc00::/7, ::1
- <br><br>
- Examles:<br>
- <table><tr><td>
- 10.68.30.147
- </td><td>
- => IPv4 single address
- </td></tr><tr><td>
- 10.68.30.0/25
- </td><td>
- => IPv4 CIDR network 192.168.30.0-127
- </td></tr><tr><td>
- 10.68.30.8/255.255.248.0
- </td><td>
- => IPv4 CIDR network 192.168.30.8-15
- </td></tr><tr><td>
- 192.168.30.1([0-4][0-9]|50)
- </td><td>
- => IPv4 range w/ regexp: 192.168.30.100-150
- </td></tr><tr><td>
- 2001:1a59:50a9::aaaa
- </td><td>
- => IPv6 single address
- </td></tr><tr><td>
- 2001:1a59:50a9::/48
- </td><td>
- => IPv6 network 2001:1a59:50a9::/48
- </td></tr><tr><td>
- 2001:1a59:50a9::01[0-4][0-9]
- </td><td>
- => IPv6 range w/ regexp: 2001:1a59:50a9::0100-0149
- </tr></td>
- </table>
- <span style="font-size:small;">Note that short IPv6 notation (::) must be
- used in conjunction with regexps.</span>
- </li><br>
- <li><a name="ESPEasy_bridge_attr_authentication">authentication</a><br>
- Used to enable basic authentication for incoming requests.<br>
- Note that user, pass and authentication attribute must be set to activate
- basic authentication<br>
- Possible values: 0,1<br>
- Default: 0</li><br>
- <li><a name="ESPEasy_bridge_attr_autocreate">autocreate</a><br>
- Used to overwrite global autocreate setting.<br>
- Global autocreate setting will be detected by global attribut
- 'autoload_undefined_devices'<br>
- Possible values: 0,1<br>
- Default: 0 (disabled)</li><br>
- <li><a name="ESPEasy_bridge_attr_autosave">autosave</a><br>
- Used to overwrite global autosave setting.<br>
- Global autosave setting will be detected by global attribut 'autosave'.
- <br>
- Possible values: 0,1<br>
- Default: 0 (disabled)</li><br>
- <li><a name="ESPEasy_bridge_attr_combinedevices">combineDevices</a><br>
- Used to gather all ESP devices of a single ESP into 1 FHEM device even if
- different ESP devices names are used.<br>
- Possible values: 0, 1, IPv64 address, IPv64/netmask, ESPname or a comma
- separated list consisting of these values.<br>
- Netmasks can be written as bitmask or dotted decimal. Domain names for dns
- lookups are not supported.<br>
- Default: 0 (disabled for all ESPs)<br>
- Eg. 1 (globally enabled)<br>
- Eg. ESP01,ESP02<br>
- Eg. 10.68.30.1,10.69.0.0/16,ESP01,2002:1a59:50a9::/48</li><br>
- <li><a name="ESPEasy_bridge_attr_deniedips">deniedIPs</a><br>
- Used to define IPs or IP ranges of ESPs which are denied to commit data.
- <br>
- Syntax see <a href="#ESPEasy_bridge_attr_allowedips">allowedIPs</a>.<br>
- This attribute will overwrite any IP or range defined by
- <a href="#ESPEasy_bridge_attr_allowedips">allowedIPs</a>.<br>
- Default: none (no IPs are denied)</li><br>
- <li><a name="ESPEasy_bridge_attr_disable">disable</a><br>
- Used to disable device.<br>
- Possible values: 0,1<br>
- Default: 0 (eanble)</li><br>
- <li><a name="ESPEasy_bridge_attr_httpreqtimeout">httpReqTimeout</a><br>
- Specifies seconds to wait for a http answer from ESP8266 device.<br>
- Possible values: 4..60<br>
- Default: 10 seconds</li><br>
- <li><a name="ESPEasy_bridge_attr_maxhttpsessions">maxHttpSessions</a><br>
- Limit maximal concurrent outgoing http sessions to a single ESP.<br>
- Set to 0 to disable this feature. At the moment (ESPEasy R147) it seems
- to be possible to send 5 "concurrent" requests if nothing else keeps the
- esp working.<br>
- Possible values: 0..9<br>
- Default: 3</li><br>
- <li><a name="ESPEasy_bridge_attr_maxqueuesize">maxQueueSize</a><br>
- Limit maximal queue size (number of commands in queue) for outgoing http
- requests.<br>
- If command queue size is reached (eg. ESP is offline) any further
- command will be ignored and discard.<br>
- Possible values: >10<br>
- Default: 250</li><br>
- <li><a name="ESPEasy_bridge_attr_resendfailedcmd">resendFailedCmd</a><br>
- Used to resend commands when http request returned an error<br>
- Possible values: 0,1<br>
- Default: 0 (disabled)</li><br>
- <li><a name="ESPEasy_bridge_attr_uniqids">uniqIDs</a><br>
- This attribute has been removed.</li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a>
- </li><br>
- </ul>
- <h4>ESPEasy Device</h4>
- <a name="ESPEasy_device_define"></a>
- <b>Define </b>(logical device)<br><br>
- <ul>
- Notes: Logical devices will be created automatically if any values are
- received by the bridge device and autocreate is not disabled. If you
- configured your ESP in a way that no data is send independently then you
- have to define logical devices. At least wifi rssi value could be defined
- to use autocreate and presence detection.<br><br>
- <code>define <name> ESPEasy <ip|fqdn> <port> <IODev> <identifier></code><br><br>
- <li>
- <a name=""><code><name></code></a><br>
- Specifies a device name of your choise.<br>
- example: <code>ESPxx</code>
- </li><br>
- <li>
- <a name=""><code><ip|fqdn></code></a><br>
- Specifies ESP IP address or hostname.<br>
- example: <code>172.16.4.100</code><br>
- example: <code>espxx.your.domain.net</code>
- </li><br>
- <li>
- <a name=""><code><port></code></a><br>
- Specifies http port to be used for outgoing request to your ESP. Should be 80<br>
- example: <code>80</code>
- </li><br>
- <li>
- <a name=""><code><IODev></code></a><br>
- Specifies your ESP bridge device. See above.<br>
- example: <code>ESPBridge</code>
- </li><br>
- <li>
- <a name=""><code><identifier></code></a><br>
- Specifies an identifier that will bind your ESP to this device.<br>
- This identifier must be specified in this form:<br>
- <esp name>_<esp device name>.<br>
- If bridge attribute <a href="#ESPEasy_bridge_attr_combinedevices">combineDevices</a> is used then <esp name> is used, only.<br>
- ESP name and device name can be found here:<br>
- <esp name>: => ESP GUI => Config => Main Settings => Name<br>
- <esp device name>: => ESP GUI => Devices => Edit => Task Settings => Name<br>
- example: <code>ESPxx_DHT22</code><br>
- example: <code>ESPxx</code>
- </li><br>
- <li>Example:<br>
- <code>define ESPxx ESPEasy 172.16.4.100 80 ESPBridge EspXX_SensorXX</code>
- </li><br>
- </ul>
- <br><a name="ESPEasy_device_get"></a>
- <b>Get </b>(logical device)<br><br>
- <ul>
- <li><a name="ESPEasy_device_get_reading"><reading></a><br>
- returns the value of the specified reading
- </li><br>
- <li><a name="ESPEasy_bridge_get_pinmap">pinMap</a><br>
- returns possible alternative pin names that can be used in commands
- </li><br>
- </ul>
- <br><a name="ESPEasy_device_set"></a>
- <b>Set </b>(logical device)
- <br><br>
- <ul>
- Notes:<br>
- - Commands are case insensitive.<br>
- - Users of Wemos D1 mini or NodeMCU can use Arduino pin names instead of
- GPIO numbers.<br>
- D1 => GPIO5, D2 => GPIO4, ...,TX => GPIO1 (see: get
- <a href="#ESPEasy_bridge_get_pinmap">pinMap</a>)<br>
- - low/high state can be written as 0/1 or on/off
- <br>
- <br>
- <li><a name="ESPEasy_device_set_clearreadings">clearReadings</a><br>
- Delete all readings that are auto created by received sensor values
- since last FHEM restart.<br>
- <ul>
- <li>arguments: <code>none</code></li>
- <li>example: set <esp> clearReadings</li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_help">help</a><br>
- Shows set command usage.<br>
- <ul>
- <li>arguments: <code>a valid set command</code></li>
- <li>example: <code>set <esp> help gpio</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_raw">raw</a><br>
- Can be used for own ESP plugins or new ESPEasy commands that are not
- considered by this module at the moment. Any argument will be sent
- directly to the ESP.
- <ul>
- <li>arguments: raw <cmd> [<arg1>] [<arg2>] [<...>]</li>
- <li>example: set <esp> raw myCommand p1 p2 p3</li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_statusrequest">statusRequest</a><br>
- Trigger a statusRequest for configured GPIOs (see attribut pollGPIOs)
- and do a presence check<br>
- <ul>
- <li>arguments: <code>n/a</code></li>
- <li>example: <code>set <esp> statusRequest</code></li>
- </ul><br>
- </li><br>
- </ul>
- <i><b>Note:</b> The following commands are built-in ESPEasy Software commands
- that are send directly to the ESP after passing a syntax check. A detailed
- description can be found here:
- <a href="http://www.letscontrolit.com/wiki/index.php/ESPEasy_Command_Reference"
- target="_NEW">ESPEasy Command Reference</a></i><br><br>
- <ul>
- </ul>
- <u>ESPEasy generic I/O commands:</u><br><br>
- <ul>
- <li><a name="ESPEasy_device_set_gpio">GPIO</a><br>
- Switch output pins to high/low<br>
- <ul>
- <li>arguments: <code><pin> <0|1|off|on></code></li>
- <li>example: <code>set <esp> gpio 14 on</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_pwm">PWM</a><br>
- Direct PWM control of output pins<br>
- <ul>
- <li>arguments: <code><pin> <level></code></li>
- <li>example: <code>set <esp> pwm 14 512</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_pwmfade">PWMFADE</a><br>
- Fade output pins to a pwm value<br>
- <ul>
- <li>arguments: <code><pin> <target pwm> <duration 1-30s></code></li>
- <li>example: <code>set <esp> pwmfade 14 1023 10</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_pulse">Pulse</a><br>
- Direct pulse control of output pins<br>
- <ul>
- <li>arguments: <code><pin> <0|1|off|on> <duration></code></li>
- <li>example: <code>set <esp> pulse 14 on 10</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_logpulse">LongPulse</a><br>
- Direct pulse control of output pins (duration in s)<br>
- <ul>
- <li>arguments: <code><pin> <0|1|off|on> <duration></code></li>
- <li>example: <code>set <esp> longpulse 14 on 10</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_logpulse_ms">LongPulse_ms</a><br>
- Direct pulse control of output pins (duration in ms)<br>
- <ul>
- <li>arguments: <code><pin> <0|1|off|on> <duration></code></li>
- <li>example: <code>set <esp> longpulse_ms 14 on 10000</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_pcfgpio">PCFGpio</a><br>
- Control PCF8574 (8-bit I/O expander for I2C-bus)<br>
- <ul>
- <li>arguments: <code><port> <0|1|off|on></code></li>
- <li>example: <code>set <esp> PCFGpio 128 on</code></li>
- </ul>
- Port numbering see:
- <a href="https://www.letscontrolit.com/wiki/index.php/PCF8574#Input">
- ESPEasy Wiki PCF8574</a>
- </li><br>
- <li><a name="ESPEasy_device_set_pcfpulse">PCFPulse</a><br>
- Control PCF8574 (8-bit I/O expander for I2C-bus)
- <ul>
- <li>arguments: <code><port> <0|1|off|on> <duration></code></li>
- <li>example: <code>set <esp> PCFPulse 128 on 10</code></li>
- </ul>
- Port numbering see:
- <a href="https://www.letscontrolit.com/wiki/index.php/PCF8574#Input">
- ESPEasy Wiki PCF8574</a>
- </li><br>
- <li><a name="ESPEasy_device_set_pcflongpulse">PCFLongPulse</a><br>
- Control on PCF8574 (8-bit I/O expander for I2C-bus)
- <ul>
- <li>arguments: <code><port> <0|1|off|on> <duration></code></li>
- <li>example: <code>set <esp> PCFLongPulse 128 on 10</code></li>
- </ul>
- Port numbering see:
- <a href="https://www.letscontrolit.com/wiki/index.php/PCF8574#Input">
- ESPEasy Wiki PCF8574</a>
- </li><br>
- <li><a name="ESPEasy_device_set_mcpgpio">MCPGPIO</a><br>
- Control MCP23017 output pins (16-Bit I/O Expander with Serial Interface)<br>
- <ul>
- <li>arguments: <code><port> <0|1|off|on></code></li>
- <li>example: <code>set <esp> MCPGPIO 48 on</code></li>
- </ul>
- Port numbering see:
- <a href="https://www.letscontrolit.com/wiki/index.php/MCP23017#Input">
- ESPEasy Wiki MCP23017</a>
- </li><br>
- <li><a name="ESPEasy_device_set_mcppulse">MCPPulse</a><br>
- Pulse control on MCP23017 output pins (duration in ms)<br>
- <ul>
- <li>arguments: <code><port> <0|1|off|on> <duration></code></li>
- <li>example: <code>set <esp> MCPPulse 48 on 100</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_mcplongpulse">MCPLongPulse</a><br>
- Longpulse control on MCP23017 output pins (duration in s)<br>
- <ul>
- <li>arguments: <code><port> <0|1|off|on> <duration></code></li>
- <li>example: <code>set <esp> MCPLongPulse 48 on 2</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_pcapwm">pcapwm</a><br>
- Control PCA9685 (16-channel / 12-bit PWM I2C-bus controller)<br>
- <ul>
- <li>arguments: <code><pin 0-15> <level 0-4095></code></li>
- <li>example: <code>set <esp> pcapwm 15 4095</code></li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy motor control commands:</u><br><br>
- <ul>
- <li><a name="ESPEasy_device_set_servo">Servo</a><br>
- Direct control of servo motors<br>
- <ul>
- <li>arguments: <code><servoNo> <pin> <position></code></li>
- <li>example: <code>set <esp> servo 1 14 100</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_motorshieldcmd">MotorShieldCMD</a><br>
- Control a DC motor or stepper<br>
- <ul>
- <li>
- arguments: <code>DCMotor <motornumber> <forward|backward|release> <speed></code><br>
- arguments: <code>Stepper <motornumber> <forward|backward|release> <steps> <single|double|interleave|microstep></code>
- </li>
- <li>
- example: <code>set <esp> MotorShieldCMD DCMotor 1 forward 10</code><br>
- example: <code>set <esp> MotorShieldCMD Stepper 1 backward 25 single</code>
- </li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy display related commands:</u><br>
- <ul><br>
- <li><a name="ESPEasy_device_set_lcd">lcd</a><br>
- Write text messages to LCD screen<br>
- Pay attention to attributes
- <a href="#ESPEasy_device_attr_displaytextencode">displayTextEncode</a> and
- <a href="#ESPEasy_device_attr_displaytextwidth">displayTextWidth</a>.<br>
- <ul>
- <li>arguments: <code><row> <col> <text></code></li>
- <li>example: <code>set <esp> lcd 1 1 Test a b c</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_lcdcmd">lcdcmd</a><br>
- Control LCD screen<br>
- <ul>
- <li>arguments: <code><on|off|clear></code></li>
- <li>example: <code>set <esp> lcdcmd clear</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_oled">oled</a><br>
- Write text messages to OLED screen<br>
- Pay attention to attributes
- <a href="#ESPEasy_device_attr_displaytextencode">displayTextEncode</a> and
- <a href="#ESPEasy_device_attr_displaytextwidth">displayTextWidth</a>.<br>
- <ul>
- <li>arguments: <code><row> <col> <text></code></li>
- <li>example: <code>set <esp> oled 1 1 Test a b c</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_oledcmd">oledcmd</a><br>
- Control OLED screen<br>
- <ul>
- <li>arguments: <code><on|off|clear></code></li>
- <li>example: <code>set <esp> oledcmd clear</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_oledframedcmd">oledframedcmd</a><br>
- Switch oledframed on/off<br>
- <ul>
- <li>arguments: <code><on|off></code></li>
- <li>example: <code>set <esp> oledframedcmd on</code></li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy DMX related commands:</u>
- <ul><br>
- <li><a name="ESPEasy_device_set_dmx">dmx</a><br>
- Send DMX commands to a device<br>
- <ul>
- <li>arguments: <code><on|off|log|value|channel=value[,value][...]></code></li>
- <li>example: <code>set <esp> dmx 1=255,2=127</code></li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy LED/Lights related commands:</u>
- <ul><br>
- <li><a name="ESPEasy_device_set_lights">Lights</a> (plugin can be found <a
- href="https://github.com/ddtlabs/ESPEasy-Plugin-Lights target="_NEW">here</a>)<br>
- Control a rgb or ct light<br>
- <ul>
- <li>arguments: <code><rgb|ct|pct|on|off|toggle> [<hex-rgb|color-temp|pct-value>] [<fading time>]</code></li>
- <li>examples:<br>
- <code>set <esp> lights rgb aa00aa</code><br>
- <code>set <esp> lights rgb aa00aa 10</code><br>
- <code>set <esp> lights ct 3200</code><br>
- <code>set <esp> lights ct 3200 10</code><br>
- <code>set <esp> lights pct 50</code><br>
- <code>set <esp> lights on</code><br>
- <code>set <esp> lights off</code><br>
- <code>set <esp> lights toggle</code><br>
- </li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_nfx">nfx</a> (plugin can be found
- <a target="_blank" href="https://github.com/djcysmic/NeopixelBusFX">here</a>)<br>
- Control nfx plugin<br>
- Note: To use FHEMWEB's colorpicker and slider widgets you have to set
- Attribut <a href="ESPEasy_device_attr_maplightscmds">mapLightCmds</a>.
- <ul>
- <li>arguments: <code><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> [<rgb>] [<fadeing time>] [<delay time>]</code></li>
- <li>examples:<br>
- <code>
- set <esp> nfx all 00ff00 100<br>
- set <esp> nfx rgb aa00ff 1000 10<br>
- set <esp> nfx line 0 100 f0f0f0c<br>
- </code>
- </li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_candle">candle</a><br>
- Control candle rgb plugin<br>
- <ul>
- <li>arguments:
- <code>CANDLE:<FlameType>:<Color>:<Brightness></code></li>
- <li>example: <code>set <esp> CANDLE:4:FF0000:200</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_neopixel">neopixel</a><br>
- Control neopixel plugin (single LED)<br>
- <ul>
- <li>arguments: <code><led nr> <red 0-255> <green 0-255> <blue 0-255></code></li>
- <li>example: <code>set <esp> neopixel 1 255 255 255</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_neopixelall">neopixelall</a><br>
- Control neopixel plugin (all together)<br>
- <ul>
- <li>arguments: <code><red 0-255> <green 0-255> <blue 0-255></code></li>
- <li>example: <code>set <esp> neopixelall 255 255 255</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_neopixelline">neopixelline</a><br>
- Control neopixel plugin (line)<br>
- <ul>
- <li>arguments: <code><start led no> <stop led no> <red 0-255> <green 0-255> <blue 0-255></code></li>
- <li>example: <code>set <esp> neopixelline 1 5 0 127 255</code></li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy sound related commands:</u>
- <ul><br>
- <li><a name="ESPEasy_device_set_tone">tone</a><br>
- Play a tone on a pin via a speaker or piezo element (ESPEasy >=
- 2.0.0-dev6)
- <br>
- <ul>
- <li>arguments: <code><pin> <freq Hz> <duration s></code></li>
- <li>example: <code>set <esp> tone 14 4000 1</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_rtttl">rtttl</a><br>
- Play melodies via <a target="_NEW"
- href="https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification">RTTTL</a>
- (ESPEasy >= 2.0.0-dev6)
- <br>
- <ul>
- <li>arguments: <rtttl> <pin>:<rtttl codes></li>
- <li>example: <code>set <esp> rtttl 14:d=10,o=6,b=180,c,e,g</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_buzzer">buzzer</a><br>
- Beep a short time<br>
- <ul>
- <li>arguments: <code>none</code></li>
- <li>example: <code>set <esp> buzzer</code></li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy miscellaneous commands:</u>
- <ul><br>
- <li><a name="ESPEasy_device_set_event">Event</a><br>
- Trigger an ESP event. Such events can be used in ESP Easy rules.<br>
- <ul>
- <li>arguments: <code><string></code></li>
- <li>example: <code>set <esp> event testevent</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_irsend">irsend</a><br>
- Send ir codes via "Infrared Transmit" Plugin<br>
- Supported protocols are: NEC, JVC, RC5, RC6, SAMSUNG, SONY, PANASONIC at
- the moment. As long as official documentation is missing you can find
- some details here:
- <a href="http://www.letscontrolit.com/forum/viewtopic.php?f=5&t=328" target="_NEW">
- IR Transmitter thread #1</a> and
- <a
- href="https://www.letscontrolit.com/forum/viewtopic.php?t=328&start=61" target="_NEW">
- IR Transmitter thread #61</a>.<br>
- <ul>
- <li>
- arguments: <code><NEC|JVC|RC5|RC6|SAMSUNG|SONY|PANASONIC> <hex code> <bit length></code><br>
- arguments: <code><RAW> <B32 raw> <frequenz> <pulse length> <blank length></code>
- </li>
- <li>
- example: <code>set <esp> irsend NEC 7E81542B 32</code><br>
- example: <code>set <esp> irsend RAW 3U0GGL8AGGK588A22K58ALALALAGL1A22LAK45ALALALALALALALALAL1AK5 38 512 256</code>
- </li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_serialsend">serialsend</a><br>
- Used for ser2net plugin<br>
- <ul>
- <li>arguments: <code><string></code></li>
- <li>example: <code>set <esp> serialsend test</code></li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy administrative commands</u> (be careful !!!):
- <ul><br>
- <li><a name="ESPEasy_device_set_erase">erase</a><br>
- Wipe out ESP flash memory<br>
- <ul>
- <li>arguments: <code>none</code></li>
- <li>example: <code>set <esp> erase</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_reboot">reboot</a><br>
- Used to reboot your ESP<br>
- <ul>
- <li>arguments: <code>none</code></li>
- <li>example: <code>set <esp> reboot</code></li>
- </ul>
- </li><br>
- <li><a name="ESPEasy_device_set_reset">reset</a><br>
- Do a factory reset on the ESP<br>
- <ul>
- <li>arguments: <code>none</code></li>
- <li>example: <code>set <esp> reset</code></li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy experimental commands:</u> (The following commands can be changed or removed at any time)
- <ul><br>
- <li><a name="ESPEasy_device_set_rgb">rgb</a><br>
- Used to control a rgb light wo/ an ESPEasy plugin.<br>
- You have to set attribute <a href="#ESPEasy_device_attr_rgbgpios">rgbGPIOs</a> to
- enable this feature. Default colorpicker mode is HSVp but can be adjusted
- with help of attribute <a href="#ESPEasy_device_attr_colorpicker">colorpicker</a>
- to HSV or RGB. Set attribute <a href="#webCmd">webCmd</a> to rgb to
- display a colorpicker in FHEMWEB room view and on detail page.<br>
- <ul>
- <li>
- arguments: <code><rrggbb>|on|off|toggle</code>
- </li>
- <li>
- examples:<br>
- <code>set <esp> rgb 00FF00</code><br>
- <code>set <esp> rgb on</code><br>
- <code>set <esp> rgb off</code><br>
- <code>set <esp> rgb toggle</code><br>
- </li>
- <li>Full featured example:<br>
- attr <ESP> colorpicker HSVp<br>
- attr <ESP> devStateIcon { ESPEasy_devStateIcon($name) }<br>
- attr <ESP> Interval 30<br>
- attr <ESP> parseCmdResponse status,pwm<br>
- attr <ESP> pollGPIOs D6,D7,D8<br>
- attr <ESP> rgbGPIOs D6,D7,D8<br>
- attr <ESP> webCmd rgb:rgb ff0000:rgb 00ff00:rgb 0000ff:toggle:on:off
- </li>
- </ul>
- </li><br>
- </ul>
- <u>ESPEasy deprecated commands:</u> (will be removed in a later version)
- <ul><br>
- <li><a name="ESPEasy_device_set_status">status</a><br>
- Request esp device status (eg. gpio)<br>
- See attributes: parseCmdResponse, readingPrefixGPIO, readingSuffixGPIOState
- <ul>
- <li>arguments: <code><pin></code></li>
- <li>example: <code>set <esp> status 14</code></li>
- </ul>
- </li><br>
- </ul>
- <br><a name="ESPEasy_device_attr"></a>
- <b>Attributes</b> (logical device)<br><br>
- <ul>
- <li><a name="ESPEasy_device_attr_adjustvalue">adjustValue</a><br>
- Used to adjust sensor values<br>
- Must be a space separated list of <reading>:<formula>.
- Reading can be a regexp. Formula can be an arithmetic expression like
- 'round(($VALUE-32)*5/9,2)'.
- If $VALUE is omitted in formula then it will be added to the beginning of
- the formula. So you can simple write 'temp:+20' or '.*:*4'<br>
- Modified or ignored values are marked in the system log (verbose 4). Use
- verbose 5 logging to see more details.<br>
- If the used sub function returns 'undef' then the value will be ignored.
- <br>
- The following variables can be used if necessary:
- <ul>
- <li>$VALUE contains the original value</li>
- <li>$READING contains the reading name</li>
- <li>$NAME contains the device name</li>
- </ul>
- Default: none<br>
- Eg. <code>attr ESPxx adjustValue humidity:+0.1
- temperature*:($VALUE-32)*5/9</code><br>
- Eg. <code>attr ESPxx adjustValue
- .*:my_OwnFunction($NAME,$READING,$VALUE)</code><br>
- <br>
- Sample function to ignore negative values:<br>
- <code>
- sub my_OwnFunction($$$) {<br>
- my ($name,$reading,$value) = @_;<br>
- return ($value < 0) ? undef : $value;<br>
- }<br>
- </code>
- </li><br>
- <li><a name="ESPEasy_device_attr_colorpicker">colorpicker</a><br>
- Used to select colorpicker mode<br>
- Possible values: RGB,HSV,HSVp<br>
- Default: HSVp
- </li><br>
- <li><a name="ESPEasy_device_attr_colorpickerctcw">colorpickerCTcw</a><br>
- Used to select ct colorpicker's cold white color temperature in Kelvin<br>
- Possible values: > colorpickerCTww<br>
- Default: 6000
- </li><br>
- <li><a name="ESPEasy_device_attr_colorpickerctww">colorpickerCTww</a><br>
- Used to select ct colorpicker's warm white color temperature in Kelvin<br>
- Possible values: < colorpickerCTcw<br>
- Default: 2000
- </li><br>
- <li><a name="ESPEasy_device_attr_disable">disable</a><br>
- Used to disable device<br>
- Possible values: 0,1<br>
- Default: 0
- </li><br>
- <li><a name="ESPEasy_device_attr_displaytextencode">displayTextEncode</a><br>
- Used to disable url encoding for text that is send to oled/lcd displays.
- Useful if you want to encode the text by yourself.<br>
- Possible values: 0,1<br>
- Default: 1 (enabled)
- </li><br>
- <li><a name="ESPEasy_device_attr_displaytextwidth">displayTextWidth</a><br>
- Used to specify number of characters per display line.<br>
- If set then all characters before and after the text on the same line will
- be overwritten with spaces. Attribute
- <a href="#ESPEasy_device_attr_displaytextencode">displayTextEncode</a> must not be
- disabled to use this feature. A 128x64px display has 16 characters per
- line if you are using a 8px font.<br>
- Possible values: integer<br>
- Default: 0 (disabled)
- </li><br>
- <li><a name="ESPEasy_device_attr_interval">Interval</a><br>
- Used to set polling interval for presence check and GPIOs polling in
- seconds. 0 will disable this feature.<br>
- Possible values: secs > 10.<br>
- Default: 300
- </li><br>
- <li><a href="#IODev">IODev</a><br>
- Used to select I/O device (ESPEasy Bridge).
- </li><br>
- <li><a name="ESPEasy_device_attr_maplightscmds">mapLightCmds</a><br>
- Enable the following commands and map them to the specified ESPEasy
- command: rgb, ct, pct, on, off, toggle, dim, line, one, all, fade,
- colorfade, rainbow, kitt, comet, theatre, scan, dualscan, twinkle,
- twinklefade, sparkle, wipe, fire, stop, fadetime, fadedelay, count, speed,
- bgcolor. Ask the ESPEasy maintainer to add more if required.<br>
- Needed to use FHEM's colorpicker or slider widgets to control a
- rgb/ct/effect/... plugin.<br>
- required values: <code>a valid set command</code><br>
- eg. <code>attr <esp> mapLightCmds Lights</code>
- </li><br>
- <li><a name="ESPEasy_device_attr_presencecheck">presenceCheck</a><br>
- Used to enable/disable presence check for ESPs<br>
- Presence check determines the presence of a device by readings age. If any
- reading of a device is newer than <a href="#ESPEasy_device_attr_interval">interval</a>
- seconds then it is marked as being present. This kind of check works for
- ESP devices in deep sleep too but require at least 1 reading that is
- updated regularly. Therefore the ESP must send the corresponding data
- regularly (ESP device option "delay").<br>
- Possible values: 0,1<br>
- Default: 1 (enabled)
- </li><br>
- <li><a name="ESPEasy_device_attr_readingswitchtext">readingSwitchText</a><br>
- Use on,off instead of 1,0 for readings if ESP device is a switch.<br>
- Possible values: 0,1<br>
- Default: 1 (enabled)
- </li><br>
- <li><a name="ESPEasy_device_attr_setstate">setState</a><br>
- Summarize received values in state reading.<br>
- A positive number determines the number of characters used for abbreviated
- reading names. Only readings with an age less than
- <a href="#ESPEasy_device_attr_interval">interval</a> will be considered. If your are
- not satisfied with format or behavior of setState then disable this
- attribute (set to 0) and use global attributes userReadings and/or
- stateFormat to get what you want.<br>
- Possible values: integer >=0<br>
- Default: 3 (enabled with 3 characters abbreviation)
- </li><br>
- The following two attributes should only be use in cases where ESPEasy
- software do not send data on status changes and no rule/dummy can be used
- to do that. Useful for commands like PWM, STATUS, ...
- <br><br>
- <li><a name="ESPEasy_device_attr_parsecmdresponse">parseCmdResponse</a><br>
- Used to parse response of commands like GPIO, PWM, STATUS, ...<br>
- Specify a module command or comma separated list of commands as argument.
- Commands are case insensitive.<br>
- Only necessary if ESPEasy software plugins do not send their data
- independently. Useful for commands like STATUS, PWM, ...<br>
- Possible values: <set cmd>[,<set cmd>][,...]<br>
- Default: status<br>
- Eg. <code>attr ESPxx parseCmdResponse status,pwm</code>
- </li><br>
- <li><a name="ESPEasy_device_attr_pollgpios">pollGPIOs</a><br>
- Used to enable polling for GPIOs status. This polling will do same as
- command 'set ESPxx status <device> <pin>'<br>
- Possible values: GPIO number or comma separated GPIO number list<br>
- Default: none<br>
- Eg. <code>attr ESPxx pollGPIOs 13,D7,D2</code>
- </li>
- <br>
- The following two attributes control naming of readings that are
- generated by help of parseCmdResponse and pollGPIOs (see above)
- <br><br>
- <li><a name="ESPEasy_device_attr_readingprefixgpio">readingPrefixGPIO</a><br>
- Specifies a prefix for readings based on GPIO numbers. For example:
- "set ESPxx pwm 13 512" will switch GPIO13 into pwm mode and set pwm to
- 512. If attribute readingPrefixGPIO is set to PIN and attribut
- <a href="#ESPEasy_device_attr_parsecmdresponse">parseCmdResponse</a> contains pwm
- command then the reading name will be PIN13.<br>
- Possible Values: <code>string</code><br>
- Default: GPIO
- </li><br>
- <li><a name="ESPEasy_device_attr_readingsuffixgpiostate">readingSuffixGPIOState</a><br>
- Specifies a suffix for the state-reading of GPIOs (see Attribute
- <a href="#ESPEasy_device_attr_pollgpios">pollGPIOs</a>)<br>
- Possible Values: <code>string</code><br>
- Default: no suffix<br>
- Eg. attr ESPxx readingSuffixGPIOState _state
- </li><br>
- <li>
- <a href="#readingFnAttributes">readingFnAttributes</a>
- </li><br>
- <b>Experimental</b> (The following attributes can be changed or removed at
- any time):<br><br>
- <li><a name="ESPEasy_device_attr_rgbgpios">rgbGPIOs</a><br>
- Use to define GPIOs your lamp is conneted to. Must be set to be able to
- use <a href="#ESPEasy_device_set_rgb">rgb</a> set command.<br>
- Possible values: Comma separated tripple of ESP pin numbers or arduino pin
- names<br>
- Eg: 12,13,15<br>
- Eg: D6,D7,D8<br>
- Default: none
- </li><br>
- </ul>
- </ul>
- <p><a name="ElectricityCalculator"></a>
- <h3>ElectricityCalculator</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ElectricityCalculator'>DE</a>]</div>
- <ul>
- <table>
- <tr>
- <td>
- The ElectricityCalculator Module calculates the electrical energy consumption and costs of one ore more electricity meters.<BR>
- 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>
- <BR>
- 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>
- <BR>
- The ElectricityCalculator module provides several current, historical, statistical values around with respect to one or more electricity meter and creates respective readings.<BR>
- <BR>
- To avoid waiting for max. 12 months to have realistic values, the readings <BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterDay1st</code>,<BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterMonth1st</code>,<BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterYear1st</code> and<BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterMeter1st</code><BR>
- must be corrected with real values by using the <code>setreading</code> - command.<BR>
- 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>
- <BR>
- Intervalls smaller than 10s will be discarded to avoid peaks due to fhem blockages (e.g. DbLog - reducelog).
- <BR>
- </td>
- </tr>
- </table>
-
- <table><tr><td><a name="ElectricityCalculatorDefine"></a><b>Define</b></td></tr></table>
- <table><tr><td><ul><code>define <name> ElectricityCalculator <regex></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><name></code> : </td><td>The name of the calculation device. (E.g.: "myElectricityCalculator")</td></tr>
- <tr><td><code><regex></code> : </td><td>A valid regular expression (also known as regex or regexp) of the event where the counter can be found</td></tr>
- </table>
- </ul></ul>
- <table><tr><td><ul>Example: <code>define myElectricityCalculator ElectricityCalculator myElectricityCounter:countersA.*</code></ul></td></tr></table>
- <BR>
- <table>
- <tr><td><a name="ElectricityCalculatorSet"></a><b>Set</b></td></tr>
- <tr><td>
- <ul>
- The set - function sets individual values for example to correct values after power loss etc.<BR>
- The set - function works only for readings which have been stored in the CalculatorDevice.<BR>
- The Readings being stored in the Counter - Device need to be changed individially with the <code>set</code> - command.<BR>
- </ul>
- </td></tr>
- </table>
- <BR>
- <table>
- <tr><td><a name="ElectricityCalculatorGet"></a><b>Get</b></td></tr>
- <tr><td>
- <ul>
- The get - function just returns the individual value of the reading.<BR>
- The get - function works only for readings which have been stored in the CalculatorDevice.<BR>
- The Readings being stored in the Counter - Device need to be read individially with <code>get</code> - command.<BR>
- </ul>
- </td></tr>
- </table>
- <BR>
- <table>
- <tr><td><a name="ElectricityCalculatorAttr"></a><b>Attributes</b></td></tr>
- <tr><td>
- <ul>
- If the below mentioned attributes have not been pre-defined completly beforehand, the program will create the ElectricityCalculator specific attributes with default values.<BR>
- In addition the global attributes e.g. <a href="#room">room</a> can be used.<BR>
- </ul>
- </td></tr>
- </table>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value is provided by your local electricity supplier and is shown on your electricity bill.<BR>
- For UK and US users it may known under "standing charge". Please make sure it is based on one year!<BR>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>Currency</code> : </li></td><td> One of the pre-defined list of currency symbols [€,£,$].<BR>
- The default value is €<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 0 = enabled.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value for this offset will be calculated as follows W<sub>Offset</sub> = W<sub>Mechanical</sub> - W<sub>Module</sub><BR>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>ElectricityKwhPerCounts</code> : </li></td><td> A valid float number of electric energy in kWh per counting ticks.<BR>
- 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>
- 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>
- The default value is 1 (= the counter is already providing kWh)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>ElectricityPricePerKWh</code> : </li></td><td> A valid float number for electric energy price in the chosen currency per kWh.<BR>
- The value is provided by your local electricity supplier and is shown on your electricity bill.<BR>
- The default value is 0.2567<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 5 (May)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The CalculatorDevice is the device which has been created with this module.<BR>
- The CounterDevice is the Device which is reading the mechanical Electricity-meter.<BR>
- The default value is CalculatorDevice - Therefore the readings will be written into this device.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- It defines which SI-prefix for the power value shall be used. The power value will be divided accordingly by multiples of 1000.
- The default value is W (Watt).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="ElectricityCalculatorReadings"></a><b>Readings</b></td></tr>
- <tr><td>
- <ul>
- As soon the device has been able to read at least 2 times the counter, it automatically will create a set of readings:<BR>
- The placeholder <code><DestinationDevice></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>
- The placeholder <code><SourceCounterReading></code> is the reading based on the defined regular expression where the counting ticks are coming from.<BR>
- </ul>
- </td></tr>
- </table>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterCurrent</code> : </li></td><td>Current indicated total electric energy consumption as shown on mechanical electricity meter. Correct Offset-attribute if not identical.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterDay1st</code> : </li></td><td>The first meter reading after midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterDayLast</code> : </li></td><td>The last meter reading of the previous day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterMonth1st</code> : </li></td><td>The first meter reading after midnight of the first day of the month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterMonthLast</code> : </li></td><td>The last meter reading of the previous month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterMeterLast</code> : </li></td><td>The last meter reading of the previous meter reading year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterYear1st</code> : </li></td><td>The first meter reading after midnight of the first day of the year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterYearLast</code> : </li></td><td>The last meter reading of the previous year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostDayLast</code> : </li></td><td>Energy costs of the last day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostMeterLast</code> : </li></td><td>Energy costs in the chosen currency of the last electricity meter period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostMonthLast</code> : </li></td><td>Energy costs in the chosen currency of the last month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostYearLast</code> : </li></td><td>Energy costs of the last calendar year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostDay</code> : </li></td><td>Energy consumption in kWh since the beginning of the current day (midnight).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostMonth</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostYear</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyDay</code> : </li></td><td>Energy consumption in kWh since the beginning of the current day (midnight).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyDayLast</code> : </li></td><td>Total Energy consumption in kWh of the last day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyMeterLast</code> : </li></td><td>Total Energy consumption in kWh of the last electricity-meter reading period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyMonth</code> : </li></td><td>Energy consumption in kWh since the beginning of the current month (midnight of the first).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyMonthLast</code> : </li></td><td>Total Energy consumption in kWh of the last month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyYear</code> : </li></td><td>Energy consumption in kWh since the beginning of the current year (midnight of the first).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyYearLast</code> : </li></td><td>Total Energy consumption in kWh of the last calendar year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_MonthMeterReading</code> : </li></td><td>Number of month since last meter reading. The month when the reading occured is the first month = 1.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerCurrent</code> : </li></td><td>Current electric Power. (Average Power between current and previous measurement.)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerDayAver</code> : </li></td><td>Average electric Power since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerDayMax</code> : </li></td><td>Maximum Power peak since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerDayMin</code> : </li></td><td>Minimum Power peak since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- </ul>
- <p><a name="EleroDrive"></a>
- <h3>EleroDrive</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EleroDrive'>DE</a>]</div>
- <ul>
- This mudule implements an Elero drive. It uses EleroStick as IO-Device.
- <br><br>
-
- <a name="EleroDrive_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EleroDrive <channel></code> <br>
- <channel> specifies the channel of the transmitter stick that shall be used.
- <br><br>
- </ul>
-
- <a name="EleroDrive_Set"></a>
- <b>Set</b>
- <ul>
- <li>moveDown<br>
- </li>
- <li>moveUp<br>
- </li>
- <li>stop<br>
- </li>
- <li>moveIntermediate<br>
- </li>
- <li>moveTilt<br>
- </li>
- <li>refresh<br>
- </li>
- </ul>
- <br>
- <a name="EleroDrive_Get"></a>
- <b>Get</b>
- <ul>
- <li>no gets<br>
- </li><br>
- </ul>
- <a name="EleroDrive_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>IODev<br>
- The name of the IO-Device, normally the name of the EleroStick definition</li>
-
- <li>TopToBottomTime<br>
- The time in seconds this drive needs for a complete run from the top to the bottom or vice versa</li>
-
- <li>IntermediatePercent<br>
- Percent open when in intermediate position</li>
-
- <li>TiltPercent<br>
- Percent open when in tilt position</li>
-
- </ul><br>
-
- <a name="EleroDrive_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>position<br>
- Current position of the drive (top_position, bottom_position, ...)</li>
-
- <li>percentClosed<br>
- 0 ... 100<br>
- 100 is completely closed, 0 is completely open</li>
- </ul><br>
- </ul>
- <p><a name="EleroStick"></a>
- <h3>EleroStick</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EleroStick'>DE</a>]</div>
- <ul>
- This module provides the IODevice for EleroDrive and other future modules that implement Elero components<br>
- It handles the communication with an "Elero Transmitter Stick"
- <br><br>
- <a name="EleroStick_Define"></a>
- <b>Define</b>
- <ul>
- <li>
- <code>define <name> EleroStick <port></code> <br>
- <port> specifies the serial port where the transmitter stick is attached.<br>
- The name of the serial-device depends on your OS. Example: /dev/ttyUSB1@38400<br>
- The baud rate must be 38400 baud.<br><br>
- </li>
- </ul>
-
- <a name="EleroStick_Set"></a>
- <b>Set</b>
- <ul>
- <li>no sets<br>
- </li><br>
- </ul>
- <a name="EleroStick_Get"></a>
- <b>Get</b>
- <ul>
- <li>no gets<br>
- </li><br>
- </ul>
- <a name="EleroStick_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>Clients<br>
- The received data gets distributed to a client (e.g. EleroDrive, ...) that handles the data.
- This attribute tells, which are the clients, that handle the data. If you add a new module to FHEM, that shall handle
- data distributed by the EleroStick module, you must add it to the Clients attribute.
- </li>
- <br>
- <li>MatchList<br>
- The MatchList defines, which data shall be distributed to which device.<br>
- It can be set to a perl expression that returns a hash that is used as the MatchList<br>
- Example: <code>attr myElero MatchList {'1:EleroDrive' => '.*'}</code>
- </li>
- <br>
- <li>ChannelTimeout<br>
- The delay, how long the modul waits for an answer after sending a command to a drive.<br>
- Default is 5 seconds.
- </li>
- <br>
- <li>Delay<br>
- If something like structure send commands very fast, Delay (seconds) throttles the transmission down that the Elero-system gets time to handle each command.
- </li>
- <br>
- <li>DisableTimer<br>
- Disables the periodically request of the status. Should normally not be set to 1.
- </li>
-
- <br>
- <li>SwitchChannels<br>
- Comma separated list of channels that are a switch device.
- </li>
-
- <br>
- <li>Interval<br>
- When all channels are checkt, this number of seconds will be waited, until the channels will be checked again.<br>
- Default is 60 seconds.
- </li><br>
- </ul>
-
- <a name="EleroStick_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>state<br>
- disconnected or opened if a transmitter stick is connected</li>
- <li>SendType<br>
- Type of the last command sent to the stick</li>
- <li>SendMsg<br>
- Last command sent to the stick</li>
- <li>AnswerType<br>
- Type of the last Answer received from the stick</li>
- <li>AnswerMsg<br>
- Last Answer received from the stick</li>
- </ul><br>
- </ul>
- <p><a name="EleroSwitch"></a>
- <h3>EleroSwitch</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EleroSwitch'>DE</a>]</div>
- <ul>
- This mudule implements an Elero switch. It uses EleroStick as IO-Device.
- <br><br>
-
- <a name="EleroSwitch_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EleroSwitch <channel></code> <br>
- <channel> specifies the channel of the transmitter stick that shall be used.
- <br><br>
- </ul>
-
- <a name="EleroSwitch_Set"></a>
- <b>Set</b>
- <ul>
- <li>on<br>
- </li>
- <li>off<br>
- </li>
- <li>dim1<br>
- </li>
- <li>dim2<br>
- </li>
- <li>refresh<br>
- </li>
- </ul>
- <br>
- <a name="EleroSwitch_Get"></a>
- <b>Get</b>
- <ul>
- <li>no gets<br>
- </li><br>
- </ul>
- <a name="EleroSwitch_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>IODev<br>
- The name of the IO-Device, normally the name of the EleroStick definition</li>
- </ul><br>
-
- <a name="EleroSwitch_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>state<br>
- Current state of the switch (on, off, dim1, dim2)</li>
- </ul><br>
- </ul>
- <p><a name="EnOcean"></a>
- <h3>EnOcean</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#EnOcean'>DE</a>]</div>
- <ul><br>
- <b>Quick Links</b>
- <ul>
- <li><a href="#EnOceanget">Get Commands</a></li>
- <li><a href="#EnOceanset">Set Commands</a></li>
- <li><a href="#EnOceanattr">Attributes</a></li>
- <li><a href="#EnOceanevents">Generated Events</a></li>
- </ul><br><br>
- EnOcean devices are sold by numerous hardware vendors (e.g. Eltako, Peha, etc),
- using the RF Protocol provided by the EnOcean Alliance.<br><br>
- Depending on the function of the device an specific device profile is used, called
- EnOcean Equipment Profile (EEP). The specific definition of a device is referenced by
- the EEP (RORG-FUNC-TYPE). Basically four groups (RORG) will be differed, e. g.
- RPS (switches), 1BS (contacts), 4BS, VLD (sensors and controller). Some manufacturers use
- additional proprietary extensions. RORG MSC is not supported except for few exceptions.
- Further technical information can be found at the
- <a href="http://www.enocean-alliance.org/de/enocean_standard/">EnOcean Alliance</a>,
- see in particular the
- <a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a>
- <br><br>
- The supplementary Generic Profiles approach instead defines a language to communicate the
- transmitted data types and ranges. The devices becomes self describing on their data
- structures in communication. The Generic Profiles include a language definition with
- a parameter selection that covers every possible measured value to be transmitted.
- Therefore, the approach does not only define parameters for the value recalculation algorithm
- but also includes specific signal definition. (e.g. physical units). Further technical
- information can be found at the
- <a href="https://www.enocean-alliance.org/fileadmin/redaktion/enocean_alliance/pdf/GenericProfiles_V1_Extract.pdf">Generic Profiles 1.0 Abstract</a>
- <br><br>
- Smart Acknowledge (Smart Ack) enables a special bidirectional communication. The communication is managed by a
- Controller that responds to the devices telegrams with acknowledges. Smart Ack is a bidirectional communication
- protocol between two actors. At least one actor must be an energy autarkic Sensor, and at least one must be a line
- powered Controller (Fhem). A sensor sends its data and expects the answer telegram in a predefined very short
- time slot. In this time Sensors receiver is active. For this purpose we declare a Post Master with Mail Boxes.
- A Mail Box is like a letter box for a Sensor and it specific to a single sender. Telegrams from Fhem are collected
- into the Mail Box. A Sensor can reclaim telegrams that are in his Mail Box.
- <br><br>
- Fhem recognizes a number of devices automatically. In order to teach-in, for
- some devices the sending of confirmation telegrams has to be turned on.
- Some equipment types and/or device models must be manually specified.
- Do so using the <a href="#EnOceanattr">attributes</a>
- <a href="#subType">subType</a> and <a href="#model">model</a>, see chapter
- <a href="#EnOceanset">Set</a> and
- <a href="#EnOceanevents">Generated events</a>. With the help of additional
- <a href="#EnOceanattr">attributes</a>, the behavior of the devices can be
- changed separately.
- <br><br>
- Fhem and the EnOcean devices must be trained with each other. To this, Fhem
- must be in the learning mode, see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>,
- <a href="#EnOcean_smartAck">Smart Ack Learning</a> and <a href="#TCM_learningMode">learningMode</a>.
- The teach-in procedure depends on the type of the devices.
- <br><br>
- Switches (EEP RPS) and contacts (EEP 1BS) are recognized when receiving the first message.
- Contacts can also send a teach-in telegram. Fhem not need this telegram.
- Sensors (EEP 4BS) has to send a teach-in telegram. The profile-less
- 4BS teach-in procedure transfers no EEP profile identifier and no manufacturer
- ID. In this case Fhem does not recognize the device automatically. The proper
- device type must be set manually, use the <a href="#EnOceanattr">attributes</a>
- <a href="#subType">subType</a>, <a href="#manufID">manufID</a> and/or
- <a href="#model">model</a>. If the EEP profile identifier and the manufacturer
- ID are sent the device is clearly identifiable. Fhem automatically assigns
- these devices to the correct profile.
- <br><br>
- 4BS devices can also be taught in special cases by using of confirmation telegrams. This method
- is used for the EnOcean Tipp-Funk devices. The function is activated via the attribute [<a href="#EnOcean_teachMethod">teachMethod</a>] = confirm.<br>
- For example the remote device Eltako TF100D can be learned as follows
- <ul><br>
- <code>define <name> EnOcean H5-38-08</code><br>
- set TF100D in learning mode<br>
- <code>set <name> teach</code>
- </ul>
- <br>
- Some 4BS, VLD or MSC devices must be paired bidirectional,
- see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.
- <br><br>
- Devices that communicate encrypted, has to taught-in through specific procedures.
- <br><br>
- Smart Ack Learning is a futher process where devices exchange information about each
- other in order to create the logical links in the EnOcean network and a Post Master Mail Box.
- It can result in Learn In or Learn Out, see <a href="#EnOcean_smartAck">Smart Ack Learning</a>.
- <br><br>
- Fhem supports many of most common EnOcean profiles and manufacturer-specific
- devices. Additional profiles and devices can be added if required.
- <br><br>
- In order to enable communication with EnOcean remote stations a
- <a href="#TCM">TCM</a> module is necessary.
- <br><br>
- Please note that EnOcean repeaters also send Fhem data telegrams again.
- Use the TCM <code>attr <name> <a href="#blockSenderID">blockSenderID</a> own</code>
- to block receiving telegrams with a TCM SenderIDs.
- <br><br>
- <b>Observing Functions</b><br>
- <ul>
- Interference or overloading of the radio transmission can prevent the reception of Fhem
- commands at the receiver. With the help of the observing function Fhem checks the reception
- of the acknowledgment telegrams of the actuator. If within one second no acknowledgment
- telegram is received, the last set command is sent again.
- The set command is repeated a maximum of 5 times. The maximum number can be specified in the attribute
- <a href="#EnOcean_observeCmdRepetition">observeCmdRepetition</a>.<br>
- The function can only be used if the actuator immediately after the reception of
- the set command sends an acknowledgment message.<br>
- The observing function is turned on by the Attribute <a href="#EnOcean_observe">observe.</a>
- In addition, further devices can be monitored. The names of this devices can be entered in the
- <a href="#EnOcean_observeRefDev">observeRefDev</a> attribute. If additional device are specified,
- the monitoring is stopped as soon as the first acknowledgment telegram of one of the devices was received (OR logic).
- If the <a href="#EnOcean_observeLogic">observeLogic</a> attribute is set to "and", the monitoring is stopped when a telegram
- was received by all devices (AND logic). Please note that the name of the own device has also to be entered in the
- <a href="#EnOcean_observeRefDev">observeRefDev</a> if required.<br>
- If the maximum number of retries is reached and still no all acknowledgment telegrams has been received, the reading
- "observeFailedDev" shows the faulty devices and the command can be executed, that is stored in the
- <a href="#EnOcean_observeErrorAction">observeErrorAction</a> attribute.
- <br><br>
- </ul>
- <b>Energy Management</b><br>
- <ul>
- <li><a href="#demand_response">Demand Response</a> (EEP A5-37-01)</li>
- Demand Response (DR) is a standard to allow utility companies to send requests for reduction in power
- consumption during peak usage times. It is also used as a means to allow users to reduce overall power
- comsumption as energy prices increase. The EEP was designed with a very flexible setting for the level
- (0...15) as well as a default level whereby the transmitter can specify a specific level for all
- controllers to use (0...100 % of either maximum or current power output, depending on the load type).
- The profile also includes a timeout setting to indicate how long the DR event should last if the
- DR transmitting device does not send heartbeats or subsequent new DR levels.<br>
- The DR actor controls the target actuators such as switches, dimmers etc. The DR actor
- is linked to the FHEM target actors via the attribute <a href="#EnOcean_demandRespRefDev">demandRespRefDev</a>.<br>
- <ul>
- <li>Standard actions are available for the following profiles:</li>
- <ul>
- <li>switch (setting the switching command for min, max by the attribute <a href="#EnOcean_demandRespMin">demandRespMin</a>,
- <a href="#EnOcean_demandRespMax">demandRespMax</a>)</li>
- <li>gateway/switching (on, off)</li>
- <li>gateway/dimming (dim 0...100, relative to the max or current set value)</li>
- <li>lightCtrl.01 (dim 0...255)</li>
- <li>actuator.01 (dim 0...100)</li>
- <li>roomSensorControl.01 (setpoint 0...255)</li>
- <li>roomSensorControl.05 (setpoint 0...255 or nightReduction 0...5 for Eltako devices)</li>
- <li>roomCtrlPanel.00 (roomCtrlMode comfort|economy)</li>
- </ul>
- <li>On the target actuator can be specified alternatively a freely definable command.
- The command sequence is stored in the attribute <a href="#EnOcean_demandRespAction">demandRespAction</a>.
- The command sequence can be designed similar to "notify". For the command sequence predefined variables can be used,
- eg. $LEVEL. This actions can be executed very flexible depending on the given energy
- reduction levels.
- </li>
- <li>Alternatively or additionally, a custom command sequence in the DR profile itself
- can be stored.
- </li>
- </ul>
- The profile has a master and slave mode.
- <ul>
- <li>In slave mode, demand response data telegrams received eg a control unit of the power utility,
- evaluated and the corresponding commands triggered on the linked target actuators. The behavior in
- slave mode can be changed by multiple attributes.
- </li>
- <li>In master mode, the demand response level is set by set commands and thus sends a corresponding
- data telegram and the associated target actuators are controlled. The demand response control
- value are specified by "level", "power", "setpoint" "max" or "min". Each other settings are
- calculated proportionally. In normal operation, ie without power reduction, the control value (level)
- is 15. Through the optional parameters "powerUsageScale", "randomStart", "randomEnd" and "timeout"
- the control behavior can be customized. The threshold at which the reading "powerUsageLevel"
- between "min" and "max" switch is specified with the attribute
- <a href="#EnOcean_demandRespThreshold">demandRespThreshold</a>.
- </li>
- </ul>
- Additional information about the profile itself can be found in the EnOcean EEP documentation.
- <br><br>
- </ul>
- <b>Remote Management</b><br>
- <ul>
- Remote Management allows EnOcean devices to be configured and maintained over the air.
- Thanks to Remote Management, sensors or switches IDs, for instance, can be stored or deleted from
- already installed actuators or gateways which are hard to access. Remote Management also allows querying
- debug information from the Remote Device and calling some manufacturer implemented functions.<br>
- Remote Management is performed by the Remote Manager, operated by the actor, on the
- managed Remote Device (Sensor, Gateway). The management is done through a series of
- commands and responding answers. Actor sends the commands to the Remote Device. Remote
- Device sends answers to the actor. The commands indicate the Remote Device what to do.
- Remote Device answers if requested by the command. The commands belong to one of the
- main use case categories, which are:
- <ul>
- <li>Security</li>
- <li>Locate / indentify remote device</li>
- <li>Get status</li>
- <li>Extended function</li>
- </ul>
- The management is often done with a group of Remote Devices. Commands are sent as
- addressed unicast telegrams, usually. In special cases broadcast transmission is also available.
- To avoid telegram collisions the Remote Devices respond to broadcast commands with a
- random delay.<br>
- The Security, Locate, and Get Status options provide to the actor basic operability of Remote
- management. Their purpose is to ensure the proper work of Remote Management when
- operating with several Remote Devices. These functions behave in the same way on every
- Remote Device. Every product that supports Remote Management provides these options.<br>
- Extended functions provide the real benefit of Remote Management. They vary from Remote
- Device to Remote Device. They depend on how and where the Remote Device is used.
- Therefore, not every Remote Device provides every extended function. It depends on the
- programmer / customer what extended functions he wants to add. There is a list of specified
- commands, but the manufacturer can also add manufacturer specific extended functions. These
- functions are identified by the manufacturer ID.<br>
- More information can be found on the <a href="http://www.enocean.com">EnOcean websites</a>.<br><ber>
- Fhem operates primarily as a remote manager. For tests but also a client device can be created.
- <br><br>
- The remote manager function must be activated for the desired device by
- <ul><br>
- <code>attr <remote device name> remote manager</code><br>
- </ul>
- <br><br>
- The remote client device must be defined as follows<br>
- <ul><br>
- <code>define <client name> EnOcean C5-00-00</code><br>
- </ul><br>
- and has to by unlocked for t seconds
- <ul><br>
- <code>set <client name> unlock <t/s></code><br>
- </ul><br>
- Only one remote management client device should be defined.<br><br>
- For security reasons the remote management commands can only be accessed in the unlock
- period. The period can be entered in two cases:
- <ul>
- <li>Within 30min after device power-up if no CODE is set</li>
- <li>Within 30min after an unlock command with a correct 32bit security code is received</li>
- </ul>
- The unlock/lock period can be accessed only with the security code. The security code can be
- set whenever the Remote Device accepts remote management commands.<br>
- When the Remote Device is locked it does not respond to any command, but unlock and ping.
- When a wrong security code is received the Remote Device does not process unlock commands
- for a security period of 30 seconds.<br>
- Security code=0x000000 is the default value and has to be interpreted as: no CODE has been
- set. The actor can also set the security code to 0x000000 from a previously set value. If no
- security code is set, unlock after the unlock period is not processed. Only ping will be
- processed. Remote Management is not available until next power up. 0xFFFFFFFF is reserved
- and can not be used as security code.<br><br>
- To administrate a remote device whose Remote ID must be known. The Remote ID can be determined
- as follows:
- <ul><br>
- <code>attr <name> remote manager</code><br>
- power-up the remote device<br>
- <code>get <name> remoteID</code><br><br>
- </ul>
- All commands are described in the remote management chapters of the <a href="#EnOcean_remoteSet">set</a>-
- and <a href="#EnOcean_remoteGet">get</a>-commands.<br><br>
- The Remote Management Function is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_remoteCode">remoteCode</a></li>
- <li><a href="#EnOcean_remoteEEP">remoteEEP</a></li>
- <li><a href="#EnOcean_remoteID">remoteID</a></li>
- <li><a href="#EnOcean_remoteManagement">remoteManagement</a></li>
- <li><a href="#EnOcean_remoteManufID">remoteManufID</a></li>
- </ul><br>
- The content of events is described in the chapter <a href="#EnOcean_remoteEvents">Remote Management Events</a><br><br>.
- The following extended functions are supported:
- <ul>
- <li>210:remoteLinkTableInfo</li>
- <li>211:remoteLinkTable</li>
- <li>212:remoteLinkTable</li>
- <li>213:remoteLinkTableGP</li>
- <li>214:remoteLinkTableGP</li>
- <li>220:remoteLearnMode</li>
- <li>221:remoteTeach</li>
- <li>224:remoteReset</li>
- <li>225:remoteRLT</li>
- <li>226:remoteApplyChanges</li>
- <li>227:remoteProductID</li>
- <li>230:remoteDevCfg</li>
- <li>231:remoteDevCfg</li>
- <li>232:remoteLinkCfg</li>
- <li>233:remoteLinkCfg</li>
- <li>240:remoteAck</li>
- <li>250:remoteRepeater</li>
- <li>251:remoteRepeater</li>
- <li>252:remoteRepeaterFilter</li>
- </ul>
- <br><br>
- </ul>
- <b>Radio Link Test</b><br>
- <ul>
- Units supporting the Radio Link Test (RLT) shall offer a functionality that allows for radio link testing between them
- (Position A to Position B, point-to-point only). Fhem support at least 1BS and 4BS test messages. When two units
- perform radio link testing one unit needs to act in a mode called RLT Master and the other unit needs to act in
- a mode called RLT Slave. Fhem acts as RLT Master (subType radioLinkTest).<br>
- The Radio Link Test device must be defined as follows<br>
- <ul><br>
- <code>define <name> EnOcean A5-3F-00</code><br>
- </ul><br>
- and has to by activated
- <ul><br>
- <code>set <name> standby</code><br>
- </ul><br>
- Alternatively, the device can also be created automatically by autocreate. Only one RLT device may be defined in FHEM.<br>
- After activation the RLT Master listens for RLT Query messages. On reception of at least one RLT Query messsage the
- RLT Master responds and starts transmission of RLT MasterTest messages. After that the RLT Master awaits the response
- from the RLT Slave.<br>
- A radio link test communication consits of a minimum of 16 and a maximum of 256 RLT MasterTest messages. When the
- radio link test communication is completed the RLT Master gets deactivated automatically. The test results can be
- found in the log file.
- <br><br>
- </ul>
- <b>Security features</b><br>
- <ul>
- The receiving and sending of encrypted messages is supported. This module currently allows the secure operating mode of PTM 215
- based switches.<br>
- To receive secured telegrams, you first have to start the teach in mode via<br><br>
- <code>set <IODev> teach <t/s></code><br><br>
- and then doing the following on the PTM 215 module:<br>
- <ul>
- <li>Remove the switch cover of the module</li>
- <li>Press both buttons of one rocker side (A0 & A1 or B0 & B1)</li>
- <li>While keeping the buttons pressed actuate the energy bow twice.</li><br>
- </ul>
- This generates two teach-in telegrams which create a Fhem device with the subType "switch.00" and synchronize the Fhem with
- the PTM 215. Both the Fhem and the PTM 215 now maintain a counter which is used to generate a rolling code encryption scheme.
- Also during teach-in, a private key is transmitted to the Fhem. The counter value is allowed to desynchronize for a maximum of
- 128 counts, to allow compensating for missed telegrams, if this value is crossed you need to teach-in the PTM 215 again. Also
- if your Fhem installation gets erased including the state information, you need to teach in the PTM 215 modules again (which
- you would need to do anyway).<br><br>
- To send secured telegrams, you first have send a secure teach-in to the remode device<br><br>
- <ul>
- <code>set <name> teachInSec</code><br><br>
- </ul>
- As for the security of this solution, if someone manages to capture the teach-in telegrams, he can extract the private key,
- so the added security isn't perfect but relies on the fact, that none listens to you setting up your installation.
- <br><br>
- The cryptographic functions need the additional Perl modules Crypt/Rijndael and Crypt/Random. The module must be installed manually.
- With the help of CPAN at the operating system level, for example,<br><br>
- <ul>
- <code>/usr/bin/perl -MCPAN -e 'install Crypt::Rijndael'</code><br>
- <code>/usr/bin/perl -MCPAN -e 'install Crypt::Random'</code>
- </ul>
- <br><br>
- </ul>
- <a name="EnOceandefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> EnOcean <DEF> [<EEP>]|getNextID|<EEP></code>
- <br><br>
- Define an EnOcean device, connected via a <a href="#TCM">TCM</a> modul. The
- <DEF> is the SenderID/DestinationID of the device (8 digit hex number), for example
- <ul><br>
- <code>define switch1 EnOcean FFC54500</code><br>
- </ul><br>
- In order to control devices, you cannot reuse the SenderIDs/
- DestinationID of other devices (like remotes), instead you have to create
- your own, which must be in the allowed SenderID range of the underlying Fhem
- IO device, see <a href="#TCM">TCM</a> BaseID, LastID. For this first query the
- <a href="#TCM">TCM</a> with the <code>get <tcm> baseID</code> command
- for the BaseID. You can use up to 128 IDs starting with the BaseID shown there.
- If you are using an Fhem SenderID outside of the allowed range, you will see an
- ERR_ID_RANGE message in the Fhem log.<br>
- FHEM can assign a free SenderID alternatively, for example
- <ul><br>
- <code>define switch1 EnOcean getNextID</code><br>
- </ul><br>
- If the EEP is known, the appropriate device can be created with the basic parameters, for example
- <ul><br>
- <code>define sensor1 EnOcean FFC54500 A5-02-05</code><br>
- </ul><br>
- or
- <ul><br>
- <code>define sensor1 EnOcean A5-02-05</code><br>
- </ul><br>
- Inofficial EEP for special devices
- <ul>
- <li>G5-07-01 PioTek-Tracker<br></li>
- <li>G5-10-12 Room Sensor and Control Unit [Eltako FUTH65D]<br></li>
- <li>G5-38-08 Gateway, Dimming [Eltako FSG, FUD]<br></li>
- <li>H5-38-08 Gateway, Dimming [Eltako TF61D, TF100D]<br></li>
- <li>M5-38-08 Gateway, Switching [Eltako FSR14]<br></li>
- <li>N5-38-08 Gateway, Switching [Eltako TF61L, TF61R, TF100A, TF100L]<br></li>
- <li>G5-3F-7F Shutter [Eltako FSB]<br></li>
- <li>H5-3F-7F Shutter [Eltako TF61J]<br></li>
- <li>L6-02-01 Smoke Detector [Eltako FRW]<br></li>
- <li>G5-ZZ-ZZ Light and Presence Sensor [Omnio Ratio eagle-PM101]<br></li>
- <li>ZZ-ZZ-ZZ EnOcean RAW profile<br></li>
- <br><br>
- </ul>
- The <a href="#autocreate">autocreate</a> module may help you if the actor or sensor send
- acknowledge messages or teach-in telegrams. In order to control this devices e. g. switches with
- additional SenderIDs you can use the attributes <a href="#subDef">subDef</a>,
- <a href="#subDef0">subDef0</a> and <a href="#subDefI">subDefI</a>.<br>
- Fhem communicates unicast, if bidirectional 4BS or UTE teach-in is used, see
- <a href="#EnOcean_teach-in"> Bidirectional Teach-In / Teach-Out</a>. In this case
- Fhem send unicast telegrams with its SenderID and the DestinationID of the device.
- <br><br>
- </ul>
- <a name="EnOceaninternals"></a>
- <b>Internals</b>
- <ul>
- <li>DEF: 0000000 ... FFFFFFFF|<EEP><br>
- EnOcean DestinationID or SenderID<br>
- If the attributes subDef* are set, this values are used as EnOcean SenderID.<br>
- For an existing device, the device can be re-parameterized by entering the EEP.<br>
- </li>
- <li><IODev>_DestinationID: 0000000 ... FFFFFFFF<br>
- Received destination address, Broadcast radio: FFFFFFFF<br>
- </li>
- <li><IODev>_RSSI: LP/dBm<br>
- Received signal strength indication (best value of all received subtelegrams)<br>
- </li>
- <li><IODev>_ReceivingQuality: excellent|good|bad<br>
- excellent: RSSI >= -76 dBm (internal standard antenna sufficiently)<br>
- good: RSSI < -76 dBm and RSSI >= -87 dBm (good antenna necessary)<br>
- bad: RSSI < -87 dBm (repeater required)<br>
- </li>
- <li><IODev>_RepeatingCounter: 0...2<br>
- Number of forwardings by repeaters<br>
- </li>
- <br><br>
- </ul>
- <a name="EnOceanset"></a>
- <b>Set</b>
- <ul>
- <li><a name="EnOcean_teach-in">Teach-In / Teach-Out</a>
- <ul>
- <li>Teach-in remote devices</li>
- <br>
- <code>set <IODev> teach <t/s></code>
- <br><br>
- Set Fhem in the learning mode.<br>
- A device, which is then also put in this state is to paired with
- Fhem. Bidirectional Teach-In / Teach-Out is used for some 4BS, VLD and MSC devices,
- e. g. EEP 4BS, RORG A5-20-01 (Battery Powered Actuator).<br>
- Bidirectional Teach-In for 4BS, UTE and Generic Profiles are supported.<br>
- <code>IODev</code> is the name of the TCM Module.<br>
- <code>t/s</code> is the time for the learning period.
- <br><br>
- Types of learning modes see <a href="#TCM_learningMode">learningMode</a>
- <br><br>
- Example:
- <ul><code>set TCM_0 teach 600</code></ul>
- <br>
- <li>RPS profiles Teach-In (switches)</li>
- <br>
- <code>set <name> A0|AI|B0|BI|C0|CI|D0|DI</code>
- <br><br>
- Send teach-in telegram to remote device.
- <br><br>
- <li>1BS profiles Teach-In (contact)</li>
- <br>
- <code>set <name> teach</code>
- <br><br>
- Send teach-in telegram to remote device.
- <br><br>
- <li>4BS profiles Teach-In (sensors, dimmer, room controller etc.)</li>
- <br>
- <code>set <name> teach</code>
- <br><br>
- Send teach-in telegram to remote device.<br>
- If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
- is assigned automatically.
- <br><br>
- <li>UTE - Universal Uni- and Bidirectional Teach-In</li>
- <br>
- <code>set <name> teachIn|teachOut</code>
- <br><br>
- Send teach-in telegram to remote device.<br>
- If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
- is assigned automatically.
- <br><br>
- <li>Generic Profiles Teach-In</li>
- <br>
- <code>set <name> teachIn|teachOut</code>
- <br><br>
- Send teach-in telegram to remote device.<br>
- If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
- is assigned automatically.
- <br><br>
- <li>Secure Devices Teach-In</li>
- <br>
- <code>set <name> teachInSec</code>
- <br><br>
- Secure teach-in to the remode device.<br>
- If no SenderID (attr subDef) was assigned before a learning telegram is sent for the first time, a free SenderID
- is assigned automatically.
- <br><br>
- </ul>
- </li>
- <li><a name="EnOcean_smartAck">Smart Ack Learning</a>
- <ul>
- <li>Teach-in remote Smart Ack devices</li>
- <br>
- <code>set <IODev> smartAckLearn <t/s></code>
- <br><br>
- Set Fhem in the Smart Ack learning mode.<br>
- The post master fuctionality must be activated using the command <code>smartAckMailboxMax</code> in advance.<br>
- The simple learnmode is supported, see <a href="#TCM_smartAckLearnMode">smartAckLearnMode</a><br>
- A device, which is then also put in this state is to paired with
- Fhem. Bidirectional learn in for 4BS, UTE and Generic Profiles are supported.<br>
- <code>IODev</code> is the name of the TCM Module.<br>
- <code>t/s</code> is the time for the learning period.
- <br><br>
- Example:
- <ul><code>set TCM_0 smartAckLearn 600</code></ul>
- <br>
- </ul>
- </li>
- <li><a name="EnOcean_remoteSet">Remote Management</a>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>remoteAction<br>
- sent action command to perfoms an action, depending on the functionality of the device</li>
- <li>remoteApplyChanges devCfg|linkTable|no_change<br>
- apply changes</li>
- <li>remoteDevCfg <index> <value><br>
- set configuration</li>
- <li>remoteLinkTable in|out <index> <ID> <EEP> <channel><br>
- set link table content</li>
- <li>remoteLinkCfg in|out <index> <data index> <value><br>
- set link based configuration</li>
- <li>remoteLinkTableGP in|out <index> <GP channel description><br>
- set link table content</li>
- <li>remoteLock<br>
- locks the remote device or local client</li>
- <li>remoteLearnMode in|out|off <index><br>
- initiate remote learn-in or learn-out of inbound index</li>
- <li>remoteReset devCfg|linkTableIn|linkTableOut|no_change<br>
- reset to defaults</li>
- <li>remoteRLT on|off <number of RLT slaves><br>
- reset to defaults</li>
- <li>remoteRepeater on|off|filter <level> <filter structure><br>
- set repeater functions</li>
- <li>remoteRepeaterFilter apply|block|delete|deleteAll destinationID|sourceID|rorg|rssi <filter value><br>
- set repeater functions</li>
- <li>remoteSetCode<br>
- set the remote security code</li>
- <li>remoteTeach <channel><br>
- request teach-in telegram from channel 00..FF</li>
- <li>remoteUnlock [1...1800]<br>
- unlocks the remote device or local client<br>
- The unlock period can be set in the client mode between 1s and 1800 s.</li>
- <br>
- [<channel>] = 00...FF<br>
- [<EEP>] = <RORG>-<function>-<type><br>
- [<filter structure>] = AND|OR<br>
- [<filter value>] = <destinationID>|<sourceID>|<RORG>|<LP/dBm><br>
- [<GP channel description>] = <name of channel 00>:<O|I>:<channel type>:<signal type>:<value type>[:<resolution>[:<engineering min>:<scaling min>:<engineering max>:<scaling max>]]<br>
- [<ID>] = 00000001...FFFFFFFE<br>
- [<index>] = 00...FF<br>
- [<number of RLT slaves>] = 01..7F<br>
- [<level>] = 1|2<br>
- [<data index>] = 0000...FFFF<br>
- [<value>] = n x 00...FF<br>
- </ul><br>
- </li><br>
- <li>Switch, Pushbutton Switch (EEP F6-02-01 ... F6-03-02)<br>
- RORG RPS [default subType]
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of A0, AI, B0, BI, C0, CI, D0, DI,
- combinations of these and released. First and second action can be sent
- simultaneously. Separate first and second action with a comma.<br>
- In fact we are trying to emulate a PT200 type remote.<br>
- If you define an <a href="#eventMap">eventMap</a> attribute with on/off,
- then you will be able to easily set the device from the <a
- href="#FHEMWEB">WEB</a> frontend.<br>
- <a href="#setExtensions">set extensions</a> are supported, if the corresponding
- <a href="#eventMap">eventMap</a> specifies the <code>on</code> and <code>off</code>
- mappings, for example <code>attr <name> eventMap on-till:on-till AI:on A0:off</code>.<br>
- With the help of additional <a href="#EnOceanattr">attributes</a>, the
- behavior of the devices can be adapt.<br>
- The attr subType must be switch. This is done if the device was created by autocreate.
- <br><br>
- Example:
- <ul><code>
- set switch1 BI<br>
- set switch1 B0,CI<br>
- attr eventMap BI:on B0:off<br>
- set switch1 on<br>
- </code></ul><br>
- </ul>
- </li>
- <li>Staircase off-delay timer (EEP F6-02-01 ... F6-02-02)<br>
- RORG RPS [Eltako FTN14, tested with Eltako FTN14 only]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>on<br>
- issue switch on command</li>
- <li>released<br>
- start timer</li>
- </ul><br>
- Set attr eventMap to B0:on BI:off, attr subType to switch, attr
- webCmd to on:released and if needed attr switchMode to pushbutton manually.<br>
- The attr subType must be switch. This is done if the device was created by autocreate.<br>
- Use the sensor type "Schalter" for Eltako devices. The Staircase
- off-delay timer is switched on when pressing "on" and the time will be started
- when pressing "released". "released" immediately after "on" is sent if
- the attr switchMode is set to "pushbutton".
- </li>
- <br><br>
- <li>Pushbutton Switch (EEP D2-03-00)<br>
- RORG VLD [EnOcean PTM 215 Modul]
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teachIn<br>
- initiate UTE teach-in</li>
- <li>teachInSec<br>
- initiate secure teach-in</li>
- <li>teachOut<br>
- initiate UTE teach-out</li>
- <li>A0|AI|B0|BI<br>
- issue switch command</li>
- <li>A0,B0|A0,AI|AI,B0|AI,BI<br>
- issue switch command</li>
- <li>pressed<br>
- energy bow pressed</li>
- <li>pressed34<br>
- 3 or 4 buttons and energy bow pressed</li>
- <li>released<br>
- energy bow released</li><br>
- </ul>
- First and second action can be sent simultaneously. Separate first and second action with a comma.<br>
- If you define an <a href="#eventMap">eventMap</a> attribute with on/off,
- then you will be able to easily set the device from the <a href="#FHEMWEB">WEB</a> frontend.<br>
- <a href="#setExtensions">set extensions</a> are supported, if the corresponding
- <a href="#eventMap">eventMap</a> specifies the <code>on</code> and <code>off</code>
- mappings, for example <code>attr <name> eventMap on-till:on-till AI:on A0:off</code>.<br>
- If <a href="#EnOcean_comMode">comMode</a> is set to biDir the device can be controlled bidirectionally.<br>
- With the help of additional <a href="#EnOceanattr">attributes</a>, the behavior of the devices can be adapt.<br>
- The attr subType must be switch.00. This is done if the device was created by autocreate.
- <br><br>
- <ul>
- Example:
- <ul><code>
- set switch1 BI<br>
- set switch1 B0,CI<br>
- attr eventMap BI:on B0:off<br>
- set switch1 on<br>
- </code></ul><br>
- </ul>
- </li>
- <li>Single Input Contact, Door/Window Contact (EEP D5-00-01)<br>
- RORG 1BS [tested with Eltako FSR14]
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>closed<br>
- issue closed command</li>
- <li>open<br>
- issue open command</li>
- <li>teach<br>
- initiate teach-in</li>
- </ul><br>
- The attr subType must be contact. The attribute must be set manually.
- </li><br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-02)<br>
- [Thermokon SR04 PTS]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in</li>
- <li>setpoint [0 ... 255]<br>
- Set the actuator to the specifed setpoint.</li>
- <li>setpointScaled [<floating-point number>]<br>
- Set the actuator to the scaled setpoint.</li>
- <li>fanStage [auto|0|1|2|3]<br>
- Set fan stage</li>
- <li>switch [on|off]<br>
- Set switch</li>
- </ul><br>
- The actual temperature will be taken from the temperature reported by
- a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
- primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
- If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
- command is sent when the reference device is updated.<br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled setting
- setpointScaled.<br>
- The attr subType must be roomSensorControl.05. The attribute must be set manually.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-03)<br>
- [used for IntesisBox PA-AC-ENO-1i]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in</li>
- <li>setpoint [0 ... 255]<br>
- Set the actuator to the specifed setpoint.</li>
- <li>setpointScaled [<floating-point number>]<br>
- Set the actuator to the scaled setpoint.</li>
- <li>fanStage [auto|0|1|2|3]<br>
- Set fan stage</li>
- <li>switch [on|off]<br>
- Set switch</li>
- </ul><br>
- The actual temperature will be taken from the temperature reported by
- a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
- primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
- If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
- command is sent when the reference device is updated.<br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled setting
- setpointScaled.<br>
- The attr subType must be roomSensorControl.05 and attr manufID must be 019. The attribute must be set manually.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (A5-10-06 plus night reduction)<br>
- [Eltako FTR65DS, FTR65HS]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in</li>
- <li>desired-temp [t/°C [lock|unlock]]<br>
- Set the desired temperature.</li>
- <li>nightReduction [t/K [lock|unlock]]<br>
- Set night reduction</li>
- <li>setpointTemp [t/°C [lock|unlock]]<br>
- Set the desired temperature</li>
- </ul><br>
- The actual temperature will be taken from the temperature reported by
- a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
- primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
- If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpointTemp
- command is sent when the reference device is updated.<br>
- This profil can be used with a further Room Sensor and Control Unit Eltako FTR55*
- to control a heating/cooling relay FHK12, FHK14 or FHK61. If Fhem and FTR55*
- is teached in, the temperature control of the FTR55* can be either blocked
- or to a setpoint deviation of +/- 3 K be limited. For this use the optional parameter
- [block] = lock|unlock, unlock is default.<br>
- The attr subType must be roomSensorControl.05 and attr manufID must be 00D.
- The attributes must be set manually.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-10)<br>
- [Thermokon SR04 * rH, Thanos SR *]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in</li>
- <li>setpoint [0 ... 255]<br>
- Set the actuator to the specifed setpoint.</li>
- <li>setpointScaled [<floating-point number>]<br>
- Set the actuator to the scaled setpoint.</li>
- <li>switch [on|off]<br>
- Set switch</li>
- </ul><br>
- The actual temperature will be taken from the temperature reported by
- a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
- primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
- The actual humidity will be taken from the humidity reported by
- a humidity reference device <a href="#EnOcean_humidityRefDev">humidityRefDev</a>
- primarily or from the attribute <a href="#EnOcean_humidity">humidity</a> if it is set.<br>
- If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
- command is sent when the reference device is updated.<br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled setting
- setpointScaled.<br>
- The attr subType must be roomSensorControl.01. The attribute must be set manually.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-12)<br>
- [Eltako FUTH65D]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in</li>
- <li>setpoint [0 ... 255]<br>
- Set the actuator to the specifed setpoint.</li>
- <li>setpointScaled [<floating-point number>]<br>
- Set the actuator to the scaled setpoint.</li>
- <li>switch [on|off]<br>
- Set switch</li>
- </ul><br>
- The actual temperature will be taken from the temperature reported by
- a temperature reference device <a href="#temperatureRefDev">temperatureRefDev</a>
- primarily or from the attribute <a href="#actualTemp">actualTemp</a> if it is set.<br>
- If the attribute <a href="#EnOcean_setCmdTrigger">setCmdTrigger</a> is set to "refDev", a setpoint
- command is sent when the reference device is updated.<br>
- The attr subType must be roomSensorControl.01 and attr manufID must be 00D. The attribute must be set manually.
- </li>
- <br><br>
- <li>Battery Powered Actuator (EEP A5-20-01)<br>
- [Kieback&Peter MD15-FTL-xx]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>setpoint setpoint/%<br>
- Set the actuator to the specifed setpoint (0...100). The setpoint can also be set by the
- <a href="#EnOcean_setpointRefDev">setpointRefDev</a> device if it is set.</li>
- <li>setpointTemp t/°C<br>
- Set the actuator to the specifed temperature setpoint. The temperature setpoint can also be set by the
- <a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a> device if it is set.<br>
- The FHEM PID controller calculates the actuator setpoint based on the temperature setpoint. The controller's
- operation can be set via the PID parameters <a href="#EnOcean_pidFactor_P">pidFactor_P</a>,
- <a href="#EnOcean_pidFactor_I">pidFactor_I</a> and <a href="#EnOcean_pidFactor_D">pidFactor_D</a>.<br>
- If the attribute pidCtrl is set to off, the PI controller of the actuator is used (selfCtrl mode). Please
- read the instruction manual of the device, whether the device has an internal PI controller.<br></li>
- <li>runInit<br>
- Maintenance Mode: Run init sequence</li>
- <li>valveOpens<br>
- Maintenance Mode: Valve opens<br>
- After the valveOpens command, the valve remains open permanently and can no longer be controlled by Fhem.
- By pressing the button on the device itself, the actuator is returned to its normal operating state.</li>
- <li>valveCloses<br>
- Maintenance Mode: Valve closes</li>
- </ul><br>
- The Heating Radiator Actuating Drive is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_pidActorCallBeforeSetting">pidActorCallBeforeSetting</a></li>
- <li><a href="#EnOcean_pidActorErrorAction">pidActorErrorAction</a></li>
- <li><a href="#EnOcean_pidActorErrorPos">pidActorErrorPos</a></li>
- <li><a href="#EnOcean_pidActorLimitLower">pidActorLimitLower</a></li>
- <li><a href="#EnOcean_pidActorLimitUpper">pidActorLimitUpper</a></li>
- <li><a href="#EnOcean_pidCtrl">pidCtrl</a></li>
- <li><a href="#EnOcean_pidDeltaTreshold">pidDeltaTreshold</a></li>
- <li><a href="#EnOcean_pidFactor_P">pidFactor_P</a></li>
- <li><a href="#EnOcean_pidFactor_I">pidFactor_I</a></li>
- <li><a href="#EnOcean_pidFactor_D">pidFactor_D</a></li>
- <li><a href="#EnOcean_pidIPortionCallBeforeSetting">pidIPortionCallBeforeSetting</a></li>
- <li><a href="#EnOcean_pidSensorTimeout">pidSensorTimeout</a></li>
- <li><a href="#EnOcean_rcvRespAction">rcvRespAction</a></li>
- <li><a href="#EnOcean_setpointRefDev">setpointRefDev</a></li>
- <li><a href="#EnOcean_setpointSummerMode">setpointSummerMode</a></li>
- <li><a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a></li>
- <li><a href="#temperatureRefDev">temperatureRefDev</a></li>
- <li><a href="#EnOcean_summerMode">summerMode</a></li>
- </ul>
- The actual temperature will be reported by the Heating Radiator Actuating Drive or by the
- <a href="#temperatureRefDev">temperatureRefDev</a> if it is set. The internal temperature sensor
- of the Micropelt iTRV is not suitable as an actual temperature value for the PID controller.
- An external room thermostat is required.<br>
- The attr event-on-change-reading .* shut not by set. The PID controller expects periodic events.
- If these are missing, a communication alarm is signaled.<br>
- The attr subType must be hvac.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.<br>
- The command is not sent until the device wakes up and sends a message, usually
- every 10 minutes.
- </li>
- <br><br>
- <li>Heating Radiator Actuating Drive (EEP A5-20-04)<br>
- [Holter SmartDrive MX]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>setpoint setpoint/%<br>
- Set the actuator to the specifed setpoint (0...100). The setpoint can also be set by the
- <a href="#EnOcean_setpointRefDev">setpointRefDev</a> device if it is set.</li>
- <li>setpointTemp t/°C<br>
- Set the actuator to the specifed temperature setpoint. The temperature setpoint can also be set by the
- <a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a> device if it is set.<br>
- The FHEM PID controller calculates the actuator setpoint based on the temperature setpoint. The controller's
- operation can be set via the PID parameters <a href="#EnOcean_pidFactor_P">pidFactor_P</a>,
- <a href="#EnOcean_pidFactor_I">pidFactor_I</a> and <a href="#EnOcean_pidFactor_D">pidFactor_D</a>.</li>
- <li>runInit<br>
- Maintenance Mode: Run init sequence</li>
- <li>valveOpens<br>
- Maintenance Mode: Valve opens<br>
- After the valveOpens command, the valve remains open permanently and can no longer be controlled by Fhem.
- By pressing the button on the device itself, the actuator is returned to its normal operating state.</li>
- <li>valveCloses<br>
- Maintenance Mode: Valve closes</li>
- </ul><br>
- The Heating Radiator Actuating Drive is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_blockKey">blockKey</a></li>
- <li><a href="#EnOcean_displayOrientation">displayOrientation</a></li>
- <li><a href="#EnOcean_measurementCtrl">measurementCtrl</a></li>
- <li><a href="#model">model</a></li>
- <li><a href="#EnOcean_pidActorCallBeforeSetting">pidActorCallBeforeSetting</a></li>
- <li><a href="#EnOcean_pidActorErrorAction">pidActorErrorAction</a></li>
- <li><a href="#EnOcean_pidActorErrorPos">pidActorErrorPos</a></li>
- <li><a href="#EnOcean_pidActorLimitLower">pidActorLimitLower</a></li>
- <li><a href="#EnOcean_pidActorLimitUpper">pidActorLimitUpper</a></li>
- <li><a href="#EnOcean_pidCtrl">pidCtrl</a></li>
- <li><a href="#EnOcean_pidDeltaTreshold">pidDeltaTreshold</a></li>
- <li><a href="#EnOcean_pidFactor_P">pidFactor_P</a></li>
- <li><a href="#EnOcean_pidFactor_I">pidFactor_I</a></li>
- <li><a href="#EnOcean_pidFactor_D">pidFactor_D</a></li>
- <li><a href="#EnOcean_pidIPortionCallBeforeSetting">pidIPortionCallBeforeSetting</a></li>
- <li><a href="#EnOcean_pidSensorTimeout">pidSensorTimeout</a></li>
- <li><a href="#EnOcean_setpointRefDev">setpointRefDev</a></li>
- <li><a href="#EnOcean_setpointTempRefDev">setpointTempRefDev</a></li>
- <li><a href="#temperatureRefDev">temperatureRefDev</a></li>
- <li><a href="#EnOcean_summerMode">summerMode</a></li>
- <li><a href="#EnOcean_wakeUpCycle">wakeUpCycle</a></li>
- </ul>
- The actual temperature will be reported by the Heating Radiator Actuating Drive or by the
- <a href="#temperatureRefDev">temperatureRefDev</a> if it is set.<br>
- The attr event-on-change-reading .* shut not by set. The PID controller expects periodic events.
- If these are missing, a communication alarm is signaled.<br>
- The attr subType must be hvac.04. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.<br>
- The OEM version of the Holter SmartDrive MX has an internal PID controller. This function is activated by
- attr <device> model Holter_OEM and attr <device> pidCtrl off.<br>
- The command is not sent until the device wakes up and sends a message, usually
- every 5 minutes.
- </li>
- <br><br>
- <li>Generic HVAC Interface (EEP A5-20-10)<br>
- [IntesisBox PA-AC-ENO-1i]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>ctrl auto|0...100<br>
- Set control variable</li>
- <li>fanSpeed auto|1...14<br>
- Set fan speed</li>
- <li>occupancy occupied|off|standby|unoccupied<br>
- Set room occupancy</li>
- <li>on<br>
- Set on</li>
- <li>off<br>
- Set off</li>
- <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>
- Set mode</li>
- <li>teach<br>
- Teach-in</li>
- <li>vanePosition auto|horizontal|position_2|position_3|position_4|vertical|swing|vertical_swing|horizontal_swing|hor_vert_swing|stop_swing<br>
- Set vane position</li>
- </ul><br>
- The attr subType must be hvac.10. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Generic HVAC Interface - Error Control (EEP A5-20-11)<br>
- [IntesisBox PA-AC-ENO-1i]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>externalDisable disable|enable<br>
- Set external disablement</li>
- <li>remoteCtrl disable|enable<br>
- Dieable/enable remote controller</li>
- <li>teach<br>
- Teach-in</li>
- <li>window closed|opened<br>
- Set window state</li>
- </ul><br>
- The attr subType must be hvac.11. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Energy management, <a name="demand_response">demand response</a> (EEP A5-37-01)<br>
- demand response master commands<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>level 0...15 [<powerUsageScale> [<randomStart> [<randomEnd> [timeout]]]]<br>
- set demand response level</li>
- <li>max [<powerUsageScale> [<randomStart> [<randomEnd> [timeout]]]]<br>
- set power usage level to max</li>
- <li>min [<powerUsageScale> [<randomStart> [<randomEnd> [timeout]]]]<br>
- set power usage level to min</li>
- <li>power power/% [<powerUsageScale> [<randomStart> [<randomEnd> [timeout]]]]<br>
- set power</li>
- <li>setpoint 0...255 [<powerUsageScale> [<randomStart> [<randomEnd> [timeout]]]]<br>
- set setpoint</li>
- <li>teach<br>
- initiate teach-in</li>
- </ul><br>
- [<powerUsageScale>] = max|rel, [<powerUsageScale>] = max is default<br>
- [<randomStart>] = yes|no, [<randomStart>] = no is default<br>
- [<randomEnd>] = yes|no, [<randomEnd>] = no is default<br>
- [timeout] = 0/min | 15/min ... 3825/min, [timeout] = 0 is default<br>
- The attr subType must be energyManagement.01.<br>
- This is done if the device was created by autocreate.<br>
- </li>
- <br><br>
- <li><a name="Gateway">Gateway</a> (EEP A5-38-08)<br>
- The Gateway profile include 7 different commands (Switching, Dimming,
- Setpoint Shift, Basic Setpoint, Control variable, Fan stage, Blind Central Command).
- The commands can be selected by the attribute gwCmd or command line. The attribute
- entry has priority.<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li><gwCmd> <cmd> [subCmd]<br>
- initiate Gateway commands by command line</li>
- <li><cmd> [subCmd]<br>
- initiate Gateway commands if attribute gwCmd is set.</li>
- </ul><br>
- The attr subType must be gateway. Attribute gwCmd can also be set to
- switching|dimming|setpointShift|setpointBasic|controlVar|fanStage|blindCmd.<br>
- This is done if the device was created by autocreate.<br>
- For Eltako devices attributes must be set manually.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Switching<br>
- [Eltako FLC61, FSA12, FSR14]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in mode</li>
- <li>on [lock|unlock]<br>
- issue switch on command</li>
- <li>off [lock|unlock]<br>
- issue switch off command</li>
- <li><a href="#setExtensions">set extensions</a> are supported.</li>
- </ul><br>
- The attr subType must be gateway and gwCmd must be switching. This is done if the device was
- created by autocreate.<br>
- For Eltako devices attributes must be set manually. For Eltako FSA12 attribute model must be set
- to Eltako_FSA12.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Dimming<br>
- [Eltako FUD12, FUD14, FUD61, FUD70, FSG14, ...]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>dim/% [rampTime/s [lock|unlock]]<br>
- issue dim command</li>
- <li>teach<br>
- initiate teach-in mode</li>
- <li>on [lock|unlock]<br>
- issue switch on command</li>
- <li>off [lock|unlock]<br>
- issue switch off command</li>
- <li>dim dim/% [rampTime/s [lock|unlock]]<br>
- issue dim command</li>
- <li>dimup dim/% [rampTime/s [lock|unlock]]<br>
- issue dim command</li>
- <li>dimdown dim/% [rampTime/s [lock|unlock]]<br>
- issue dim command</li>
- <li><a href="#setExtensions">set extensions</a> are supported.</li>
- </ul><br>
- rampTime Range: t = 1 s ... 255 s or 0 if no time specified,
- for Eltako: t = 1 = fast dimming ... 255 = slow dimming or 0 = dimming speed on the dimmer used<br>
- The attr subType must be gateway and gwCmd must be dimming. This is done if the device was
- created by autocreate.<br>
- For Eltako devices attributes must be set manually. Use the sensor type "PC/FVS" for Eltako devices.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Dimming of fluorescent lamps<br>
- [Eltako FSG70, tested with Eltako FSG70 only]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>on<br>
- issue switch on command</li>
- <li>off<br>
- issue switch off command</li>
- <li><a href="#setExtensions">set extensions</a> are supported.</li>
- </ul><br>
- The attr subType must be gateway and gwCmd must be dimming. Set attr eventMap to B0:on BI:off,
- attr subTypeSet to switch and attr switchMode to pushbutton manually.<br>
- Use the sensor type "Richtungstaster" for Eltako devices.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Setpoint shift<br>
- [untested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in mode</li>
- <li>shift 1/K <br>
- issue Setpoint shift</li>
- </ul><br>
- Shift Range: T = -12.7 K ... 12.8 K<br>
- The attr subType must be gateway and gwCmd must be setpointShift.
- This is done if the device was created by autocreate.<br>
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Basic Setpoint<br>
- [untested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in mode</li>
- <li>basic t/°C<br>
- issue Basic Setpoint</li>
- </ul><br>
- Setpoint Range: t = 0 °C ... 51.2 °C<br>
- The attr subType must be gateway and gwCmd must be setpointBasic.
- This is done if the device was created by autocreate.<br>
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Control variable<br>
- [untested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in mode</li>
- <li>presence present|absent|standby<br>
- issue Room occupancy</li>
- <li>energyHoldOff normal|holdoff<br>
- issue Energy hold off</li>
- <li>controllerMode auto|heating|cooling|off<br>
- issue Controller mode</li>
- <li>controllerState auto|override <0 ... 100> <br>
- issue Control variable override</li>
- </ul><br>
- Override Range: cvov = 0 % ... 100 %<br>
- The attr subType must be gateway and gwCmd must be controlVar.
- This is done if the device was created by autocreate.<br>
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Fan stage<br>
- [untested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate teach-in mode</li>
- <li>stage 0 ... 3|auto<br>
- issue Fan Stage override</li>
- </ul><br>
- The attr subType must be gateway and gwCmd must be fanStage.
- This is done if the device was created by autocreate.<br>
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- <a name="Blind Command Central">Blind Command Central</a><br>
- [not fully tested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>position/% [α/°]<br>
- drive blinds to position with angle value</li>
- <li>teach<br>
- initiate teach-in mode</li>
- <li>status<br>
- Status request</li>
- <li>opens<br>
- issue blinds opens command</li>
- <li>up tu/s ta/s<br>
- issue roll up command</li>
- <li>closes<br>
- issue blinds closes command</li>
- <li>down td/s ta/s<br>
- issue roll down command</li>
- <li>position position/% [α/°]<br>
- drive blinds to position with angle value</li>
- <li>stop<br>
- issue blinds stops command</li>
- <li>runtimeSet tu/s td/s<br>
- set runtime parameter</li>
- <li>angleSet ta/s<br>
- set angle configuration</li>
- <li>positionMinMax positionMin/% positionMax/%<br>
- set min, max values for position</li>
- <li>angleMinMax αo/° αs/°<br>
- set slat angle for open and shut position</li>
- <li>positionLogic normal|inverse<br>
- set position logic</li>
- </ul><br>
- Runtime Range: tu|td = 0 s ... 255 s<br>
- Select a runtime up and a runtime down that is at least as long as the
- shading element or roller shutter needs to move from its end position to
- the other position.<br>
- Position Range: position = 0 % ... 100 %<br>
- Angle Time Range: ta = 0 s ... 25.5 s<br>
- Runtime value for the sunblind reversion time. Select the time to revolve
- the sunblind from one slat angle end position to the other end position.<br>
- Slat Angle: α|αo|αs = -180 ° ... 180 °<br>
- Position Logic, normal: Blinds fully opens corresponds to Position = 0 %<br>
- Position Logic, inverse: Blinds fully opens corresponds to Position = 100 %<br>
- The attr subType must be gateway and gwCmd must be blindCmd.<br>
- See also attributes <a href="#EnOcean_sendDevStatus">sendDevStatus and <a href="#EnOcean_serviceOn">serviceOn</a></a><br>
- The profile is linked with controller profile, see <a href="#Blind Status">Blind Status</a>.<br>
- </li>
- <br><br>
- <li>Extended Lighting Control (EEP A5-38-09)<br>
- [untested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>teach<br>
- initiate remote teach-in</li>
- <li>on<br>
- issue switch on command</li>
- <li>off<br>
- issue switch off command</li>
- <li>dim dim [rampTime/s]<br>
- issue dim command</li>
- <li>dimup rampTime/s<br>
- issue dim command</li>
- <li>dimdown rampTime/s<br>
- issue dim command</li>
- <li>stop<br>
- stop dimming</li>
- <li>rgb <red color value><green color value><blue color value><br>
- issue color value command</li>
- <li>scene drive|store 0..15<br>
- store actual value in the scene or drive to scene value</li>
- <li>dimMinMax <min value> <max value><br>
- set minimal and maximal dimmer value</li>
- <li>lampOpHours 0..65535<br>
- set the operation hours of the lamp</li>
- <li>block unlock|on|off|local<br>
- locking local operations</li>
- <li>meteringValues 0..65535 mW|W|kW|MW|Wh|kWh|MWh|GWh|mA|mV<br>
- set a new value for the energy metering (overwrite the actual value with the selected unit)</li>
- <li>meteringValues 0..6553.5 A|V<br>
- set a new value for the energy metering (overwrite the actual value with the selected unit)</li>
- <li><a href="#setExtensions">set extensions</a> are supported.</li>
- </ul><br>
- color values: 00 ... FF hexadecimal<br>
- rampTime Range: t = 1 s ... 65535 s or 1 if no time specified, ramping time can be set by attribute
- <a href="#EnOcean_rampTime">rampTime</a><br>
- The attr subType or subTypSet must be lightCtrl.01. This is done if the device was created by autocreate.<br>
- The subType is associated with the subtype lightCtrlState.02.
- </li>
- <br><br>
- <li><a name="Manufacturer Specific Applications">Manufacturer Specific Applications</a> (EEP A5-3F-7F)<br>
- Shutter<br>
- [Eltako FSB12, FSB14, FSB61, FSB70, tested with Eltako devices only]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>position/% [α/°]<br>
- drive blinds to position with angle value</li>
- <li>anglePos α/°<br>
- drive blinds to angle value</li>
- <li>closes<br>
- issue blinds closes command</li>
- <li>down td/s<br>
- issue roll down command</li>
- <li>opens<br>
- issue blinds opens command</li>
- <li>position position/% [α/°]<br>
- drive blinds to position with angle value</li>
- <li>stop<br>
- issue stop command</li>
- <li>teach<br>
- initiate teach-in mode</li>
- <li>up tu/s<br>
- issue roll up command</li>
- </ul><br>
- Run-time Range: tu|td = 1 s ... 255 s<br>
- Position Range: position = 0 % ... 100 %<br>
- Slat Angle Range: α = -180 ° ... 180 °<br>
- Angle Time Range: ta = 0 s ... 6 s<br>
- The devive can only fully controlled if the attributes <a href="#angleMax">angleMax</a>,
- <a href="#angleMin">angleMin</a>, <a href="#angleTime">angleTime</a>,
- <a href="#shutTime">shutTime</a> and <a href="#shutTimeCloses">shutTimeCloses</a>,
- are set correctly.
- If <a href="#EnOcean_settingAccuracy">settingAccuracy</a> is set to high, the run-time is sent in 1/10 increments.<br>
- Set attr subType to manufProfile, manufID to 00D and attr model to Eltako_FSB14|FSB61|FSB70|TF manually.<br>
- Use the sensor type "Szenentaster/PC" for Eltako devices.
- </li>
- <br><br>
- <li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-12)<br>
- [Telefunken Funktionsstecker, PEHA Easyclick, AWAG Elektrotechnik AG Omnio UPS 230/xx,UPD 230/xx, NodOn in-wall module, smart plug]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>autoOffTime t/s [<channel>]<br>
- set auto Off timer</li>
- <li>delayOffTime t/s [<channel>]<br>
- set delay Off timer</li>
- <li>dim/% [<channel> [<rampTime>]]<br>
- issue dimming command</li>
- <li>extSwitchMode unavailable|switch|pushbutton|auto [<channel>]<br>
- set external interface mode</li>
- <li>extSwitchType toggle|direction [<channel>]<br>
- set external interface type</li>
- <li>on [<channel>]<br>
- issue switch on command</li>
- <li>off [<channel>]<br>
- issue switch off command</li>
- <li>dim dim/% [<channel> [<rampTime>]]<br>
- issue dimming command</li>
- <li>local dayNight day|night, day is default<br>
- set the user interface indication</li>
- <li>local defaultState on|off|last, off is default<br>
- set the default setting of the output channels when switch on</li>
- <li>local localControl enabled|disabled, disabled is default<br>
- enable the local control of the device</li>
- <li>local overCurrentShutdown off|restart, off is default<br>
- set the behavior after a shutdown due to an overcurrent</li>
- <li>local overCurrentShutdownReset not_active|trigger, not_active is default<br>
- trigger a reset after an overcurrent</li>
- <li>local rampTime<1...3> 0/s, 0.5/s ... 7/s, 7.5/s, 0 is default<br>
- set the dimming time of timer 1 ... 3</li>
- <li>local teachInDev enabled|disabled, disabled is default<br>
- enable the taught-in devices with different EEP</li>
- <li>measurement delta 0/s ... 4095/s, 0 is default<br>
- define the difference between two displayed measurements </li>
- <li>measurement mode energy|power, energy is default<br>
- define the measurand</li>
- <li>measurement report query|auto, query is default<br>
- specify the measurement method</li>
- <li>measurement reset not_active|trigger, not_active is default<br>
- resetting the measured values</li>
- <li>measurement responseTimeMax 10/s ... 2550/s, 10 is default<br>
- set the maximum time between two outputs of measured values</li>
- <li>measurement responseTimeMin 1/s ... 255/s, 1 is default<br>
- set the minimum time between two outputs of measured values</li>
- <li>measurement unit Ws|Wh|KWh|W|KW, Ws is default<br>
- specify the measurement unit</li>
- <li>roomCtrlMode off|comfort|comfort-1|comfort-2|economy|buildingProtection<br>
- set pilot wire mode</li>
- <li>special repeater off|1|2<br>
- set repeater level of device (additional NodOn command)
- </li>
- </ul><br>
- [autoOffTime] = 0 s ... 0.1 s ... 6553.4 s<br>
- [delayOffTime] = 0 s ... 0.1 s ... 6553.4 s<br>
- [channel] = 0...29|all|input, all is default<br>
- The default channel can be specified with the attr <a href="#EnOcean_defaultChannel">defaultChannel</a>.<br>
- [rampTime] = 1..3|switch|stop, switch is default<br>
- The attr subType must be actuator.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Blind Control for Position and Angle (D2-05-00 - D2-05-01)<br>
- [AWAG Elektrotechnik AG OMNIO UPJ 230/12, REGJ12/04M ]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>opens [<channel>]<br>
- issue blinds opens command</li>
- <li>closes [<channel>]<br>
- issue blinds closes command</li>
- <li>position position/% [[α/%] [[<channel>] [directly|opens|closes]]]<br>
- drive blinds to position with angle value</li>
- <li>anglePos α/% [<channel>]<br>
- drive blinds to angle value</li>
- <li>stop [<channel>]<br>
- issue stop command</li>
- <li>alarm [<channel>]<br>
- set actuator to the "alarm" mode. When the actuator ist set to the "alarm" mode neither local
- nor central positioning and configuration commands will be executed. Before entering the "alarm"
- mode, the actuator will execute the "alarm action" as configured by the attribute <a href="#EnOcean_alarmAction">alarmAction</a>
- </li>
- <li>lock [<channel>]<br>
- set actuator to the "blockade" mode. When the actuator ist set to the "blockade" mode neither local
- nor central positioning and configuration commands will be executed.
- </li>
- <li>unlock [<channel>]<br>
- issue unlock command</li>
- </ul><br>
- Channel Range: 1 ... 4|all, default is all<br>
- Position Range: position = 0 % ... 100 %<br>
- Slat Angle Range: α = 0 % ... 100 %<br>
- The devive can only fully controlled if the attributes <a href="#EnOcean_alarmAction">alarmAction</a>,
- <a href="#angleTime">angleTime</a>, <a href="#EnOcean_reposition">reposition</a> and <a href="#shutTime">shutTime</a>
- are set correctly.<br>
- With the attribute <a name="EnOcean_defaultChannel">defaultChannel</a> the default channel can be specified.<br>
- The attr subType must be blindsCtrl.00 or blindsCtrl.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Multisensor Windows Handle (D2-06-01)<br>
- [Soda GmbH]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>presence absent|present<br>
- set vacation mode</li>
- <li>handleClosedClick disable|enable<br>
- set handle closed click feature</li>
- <li>batteryLowClick disable|enable<br>
- set battery low click feature</li>
- <li>teachSlave contact|windowHandleClosed|windowHandleOpen|windowHandleTilted<br>
- sent teach-in to the slave devices (contact: EEP: D5-00-01, windowHandle: EEP F6-10-00)<br>
- The events window or handle will get forwarded once a slave-device contact or windowHandle is taught in.
- </li>
- <li>updateInterval t/s<br>
- set sensor update interval</li>
- <li>blinkInterval t/s<br>
- set vacation blink interval</li>
- </ul><br>
- sensor update interval Range: updateInterval = 5 ... 65535<br>
- vacation blick interval Range: blinkInterval = 3 ... 255<br>
- The multisensor window handle is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_subDefH">subDefH</a></li>
- <li><a href="#EnOcean_subDefW">subDefW</a></li>
- </ul>
- The attr subType must be multisensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Control Panels (D2-10-00 - D2-10-02)<br>
- [Kieback & Peter RBW322-FTL]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>buildingProtectionTemp t/°C<br>
- set building protection temperature</li>
- <li>clearCmds [<channel>]<br>
- clear waiting commands</li>
- <li>comfortTemp t/°C<br>
- set comfort temperature</li>
- <li>config<br>
- Setting the configuration of the room controller, the configuration parameters are set using attributes.</li>
- <li>cooling auto|off|on|no_change<br>
- switch cooling</li>
- <li>deleteTimeProgram<br>
- delete time programs of the room controller</li>
- <li>desired-temp t/°C<br>
- set setpoint temperature</li>
- <li>economyTemp t/°C<br>
- set economy temperature</li>
- <li>fanSpeed fanspeed/%<br>
- set fan speed</li>
- <li>fanSpeedMode central|local<br>
- set fan speed mode</li>
- <li>heating auto|off|on|no_change<br>
- switch heating</li>
- <li>preComfortTemp t/°C<br>
- set pre comfort temperature</li>
- <li>roomCtrlMode buildingProtectionTemp|comfortTemp|economyTemp|preComfortTemp<br>
- select setpoint temperature</li>
- <li>setpointTemp t/°C<br>
- set current setpoint temperature</li>
- <li>time<br>
- set time and date of the room controller </li>
- <li>timeProgram<br>
- set time programms of the room contoller</li>
- <li>window closed|open<br>
- put the window state</li>
- </ul><br>
- Setpoint Range: t = 0 °C ... 40 °C<br>
- The room controller is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_blockDateTime">blockDateTime</a></li>
- <li><a href="#EnOcean_blockDisplay">blockDisplay</a></li>
- <li><a href="#EnOcean_blockFanSpeed">blockFanSpeed</a></li>
- <li><a href="#EnOcean_blockMotion">blockMotion</a></li>
- <li><a href="#EnOcean_blockProgram">blockProgram</a></li>
- <li><a href="#EnOcean_blockOccupany">blockOccupancy</a></li>
- <li><a href="#EnOcean_blockTemp">blockTemp</a></li>
- <li><a href="#EnOcean_blockTimeProgram">blockTimeProgram</a></li>
- <li><a href="#EnOcean_blockSetpointTemp">blockSetpointTemp</a></li>
- <li><a href="#EnOcean_daylightSavingTime">daylightSavingTime</a></li>
- <li><a href="#EnOcean_displayContent">displayContent</a></li>
- <li><a href="#EnOcean_pollInterval">pollInterval</a></li>
- <li><a href="#EnOcean_temperatureScale">temperatureScale</a></li>
- <li><a href="#EnOcean_timeNotation">timeNotation</a></li>
- <li><a href="#EnOcean_timeProgram[1-4]">timeProgram[1-4]</a></li>
- </ul>
- The attr subType must be roomCtrlPanel.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Room Control Panels (D2-11-01 - D2-11-08)<br>
- [Thermokon EasySens SR06 LCD-2T/-2T rh -4T/-4T rh]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>cooling on|off, default [colling] = off<br>
- set cooling symbol at the display</li>
- <li>desired-temp t/°C<br>
- set setpoint temperature</li>
- <li>fanSpeed auto|off|1|2|3<br>
- set fan speed</li>
- <li>heating on|off, default [heating] = off<br>
- set heating symbol at the display</li>
- <li>occupancy occupied|unoccupied<br>
- set occupancy state</li>
- <li>setpointTemp t/°C<br>
- set current setpoint temperature</li>
- <li>setpointShiftMax t/K<br>
- set setpoint shift max</li>
- <li>setpointType setpointTemp|setpointShift<br>
- set setpoint type</li>
- <li>window closed|open, default [window] = closed<br>
- set window open symbol at the display</li>
- </ul><br>
- Setpoint Range: t = 5 °C ... 40 °C<br>
- Setpoint Shift Max Range: t = 0 K ... 10 K<br>
- The attr subType must be roomCtrlPanel.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired by Smart Ack,
- see <a href="#EnOcean_smartAck">SmartAck Learning</a>.
- </li>
- <br><br>
- <li>Fan Control (D2-20-00 - D2-20-02)<br>
- [Maico ECA x RC/RCH, ER 100 RC, untested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>on<br>
- fan on</li>
- <li>off<br>
- fan off</li>
- <li>desired-temp [t/°C]<br>
- set setpoint temperature</li>
- <li>fanSpeed fanspeed/%|auto|default<br>
- set fan speed</li>
- <li>humidityThreshold rH/%<br>
- set humidity threshold</li>
- <li>roomSize 0...350/m<sup>2</sup>|default|not_used<br>
- set room size</li>
- <li>setpointTemp [t/°C]<br>
- set current setpoint temperature</li>
- </ul><br>
- Setpoint Range: t = 0 °C ... 40 °C<br>
- The fan controller is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_setCmdTrigger">setCmdTrigger</a></li>
- <li><a href="#EnOcean_switchHysteresis">switchHysteresis</a></li>
- <li><a href="#temperatureRefDev">temperatureRefDev</a></li>
- </ul>
- The attr subType must be fanCtrl.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>. The profile
- behaves like a master. Only one fan can be taught as a slave.
- </li>
- <br><br>
- <li>Heat Recovery Ventilation (D2-50-00 - D2-50-11)<br>
- [untested]<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>ventilation off|1...4|auto|demand|supplyAir|exhaustAir<br>
- select ventilation mode/level</li>
- <li>heatExchangerBypass opens|closes<br>
- override of automatic heat exchanger bypass control</li>
- <li>startTimerMode<br>
- enable timer operation mode</li>
- <li>CO2Threshold default|1/%<br>
- override CO2 threshold for CO2 control in automatic mode</li>
- <li>humidityThreshold default|rH/%<br>
- override humidity threshold for humidity control in automatic mode</li>
- <li>airQuatityThreshold default|1/%<br>
- override air qualidity threshold for air qualidity control in automatic mode</li>
- <li>roomTemp default|t/°C<br>
- override room temperature threshold for room temperature control mode</li>
- </ul><br>
- roomTemp Range: t = -63 °C ... 63 °C<br>
- xThreshold Range: 0 % ... 100 %<br>
- The attr subType must be heatRecovery.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Valve Control (EEP D2-A0-01)<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>closes<br>
- issue closes command (master)</li>
- <li>opens<br>
- issue opens command (master)</li>
- <li>closed<br>
- issue closed command (slave)</li>
- <li>open<br>
- issue open command (slave)</li>
- <li>teachIn<br>
- initiate UTE teach-in (slave)</li>
- <li>teachOut<br>
- initiate UTE teach-out (slave)</li>
- </ul><br>
- The valve controller is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_devMode">devMode</a></li>
- </ul>
- The attr subType must be valveCtrl.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>. The profile
- behaves like a master or slave, see <a href="#EnOcean_devMode">devMode</a>.
- </li>
- <br><br>
- <li>Generic Profiles<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li><00 ... 64>-<channel name> <value><br>
- set channel value</li>
- <li>channelName <channel number>-<channel name><br>
- rename channel</li>
- <li>teachIn<br>
- sent teach-in telegram</li>
- <li>teachOut<br>
- sent teach-out telegram</li>
- </ul><br>
- The generic profile device is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_comMode">comMode</a></li>
- <li><a href="#EnOcean_devMode">devMode</a></li>
- <li><a href="#EnOcean_gpDef">gpDef</a></li>
- <li><a href="#EnOcean_manufID">manufID</a></li>
- </ul>
- The attr subType must be genericProfile. This is done if the device was
- created by autocreate. If the profile in slave mode is operated, especially the channel
- definition in the gpDef attributes must be entered manually.
- </li>
- <br><br>
- <li>RAW Command<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>1BS|4BS|GPCD|GPSD|GPTI|GPTR|MSC|RPS|UTE|VLD data [status]<br>
- sent data telegram</li>
- </ul><br>
- [data] = <1-byte hex ... 512-byte hex><br>
- [status] = 0x00 ... 0xFF<br>
- With the help of this command data messages in hexadecimal format can be sent.
- Telegram types (RORG) 1BS, 4BS, RPS, MSC, UTE, VLD, GPCD, GPSD, GPTI and GPTR are supported.
- For further information, see <a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a> and
- Generic Profiles.
- </li>
- <br><br>
- <li>Radio Link Test<br>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>standby|stop<br>
- set RLT Master state
- </li>
- </ul><br>
- The Radio Link Test device is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_rltRepeat">rltRepeat</a></li>
- <li><a href="#EnOcean_rltType">rltType</a></li>
- </ul>
- The attr subType must be readioLinkTest. This is done if the device was
- created by autocreate or manually by <code>define <name> EnOcean A5-3F-00</code><br>.
- </li>
- <br><br>
- </ul></ul>
- <a name="EnOceanget"></a>
- <b>Get</b>
- <ul>
- <li><a name="EnOcean_remoteGet">Remote Management</a>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>remoteDevCfg <start data index> <end data index><br>
- get device configuration between start index and end index</li>
- <li>remoteFunctions<br>
- get a list of the supported extended functions</li>
- <li>remoteID<br>
- get the remote device ID</li>
- <li>remoteLinkTableInfo<br>
- query supported link table info</li>
- <li>remoteLinkCfg in|out <index> <start data index> <end data index> <length><br>
- get link table between start index and end index</li>
- <li>remoteLinkTable in|out <start index> <end index><br>
- get link table between start index and end index</li>
- <li>remoteLinkTableGP in|out <index><br>
- get link table GP entry with index</li>
- <li>remotePing<br>
- get a ping response from the remote device</li>
- <li>remoteProductID<br>
- query product ID</li>
- <li>remoteRepeater<br>
- asks for the repeater status of the remote device</li>
- <li>remoteStatus<br>
- asks for the status info of the remote device</li>
- <br>
- [<data index>] = 0000...FFFF<br>
- [<index>] = 00...FF<br>
- [<length>] = n x 00...FF<br>
- </ul>
- </li><br><br>
- <li>Dual Channel Switch Actuator (EEP A5-11-059)<br>
- [untested]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>state<br>
- status request</li>
- </ul><br>
- The attr subType or subTypSet must be switch.05. This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Extended Lighting Control (EEP A5-38-09)<br>
- [untested]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>state<br>
- status request</li>
- </ul><br>
- The attr subType or subTypSet must be lightCtrl.01. This is done if the device was created by autocreate.<br>
- The subType is associated with the subtype lightCtrlState.02.
- </li>
- <br><br>
- <li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-12)<br>
- [Telefunken Funktionsstecker, PEHA Easyclick, AWAG Elektrotechnik AG Omnio UPS 230/xx,UPD 230/xx, NodOn in-wall module, smart plug]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>roomCtrlMode<br>
- get pilot wire mode</li>
- <li>settings [<channel>]<br>
- get external interface settings</li>
- <li>state [<channel>]<br>
- </li>
- <li>measurement <channel> energy|power<br>
- </li>
- <li>special <channel> health|load|voltage|serialNumber<br>
- additional Permondo SmartPlug PSC234 commands
- </li>
- <li>special <channel> firmwareVersion|reset|taughtInDevID|taughtInDevNum<br>
- additional NodOn commands
- </li>
- </ul><br>
- The default channel can be specified with the attr <a href="#EnOcean_defaultChannel">defaultChannel</a>.<br>
- The attr subType must be actuator.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Blind Control for Position and Angle (D2-05-00)<br>
- [AWAG Elektrotechnik AG OMNIO UPJ 230/12, REGJ12/04M]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>position [<channel>]<br>
- query position and angle value</li>
- </ul><br>
- Channel Range: 1 ... 4|all, default is all<br>
- The devive can only fully controlled if the attributes <a href="#EnOcean_alarmAction">alarmAction</a>,
- <a href="#angleTime">angleTime</a>, <a href="#EnOcean_reposition">reposition</a> and <a href="#shutTime">shutTime</a>
- are set correctly.<br>
- With the attribute <a name="EnOcean_defaultChannel">defaultChannel</a> the default channel can be specified.<br>
- The attr subType must be blindsCtrl.00 or blindsCrtl.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Multisensor Windows Handle (D2-06-01)<br>
- [Soda GmbH]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>config<br>
- get configuration settings</li>
- <li>log<br>
- get log data</li>
- </ul><br>
- The multisensor window handle is configured using the following attributes:<br>
- <ul>
- <li><a href="#EnOcean_subDefH">subDefH</a></li>
- <li><a href="#EnOcean_subDefW">subDefW</a></li>
- </ul>
- The attr subType must be multisensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Control Panels (D2-10-00 - D2-10-02)<br>
- [Kieback & Peter RBW322-FTL]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>config<br>
- get the configuration of the room controler</li>
- <li>data<br>
- get data</li>
- <li>roomCtrl<br>
- get the parameter of the room controler</li>
- <li>timeProgram<br>
- get the time program</li>
- </ul><br>
- The attr subType must be roomCtrlPanel.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Fan Control (D2-20-00 - D2-20-02)<br>
- [Maico ECA x RC/RCH, ER 100 RC, untested]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>state<br>
- get the state of the room controler</li>
- </ul><br>
- The attr subType must be fanCtrl.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Heat Recovery Ventilation (D2-50-00 - D2-50-11)<br>
- [untested]<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>basicState<br>
- get the basic state</li>
- <li>extendedState<br>
- get the extended state</li>
- </ul><br>
- The attr subType must be heatRecovery.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Valve Control (EEP D2-A0-01)<br>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is
- <li>state<br>
- get the state of the valve controler (master)</li>
- </ul><br>
- The attr subType must be valveCtrl.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>. The profile
- behaves like a master or slave, see <a href="#EnOcean_devMode">devMode</a>.
- </li>
- <br><br>
- </ul><br>
- <a name="EnOceanattr"></a>
- <b>Attributes</b>
- <ul>
- <ul>
- <li><a name="actualTemp">actualTemp</a> t/°C<br>
- The value of the actual temperature, used by a Room Sensor and Control Unit
- or when controlling HVAC components e. g. Battery Powered Actuators (MD15 devices). Should by
- filled via a notify from a distinct temperature sensor.<br>
- If absent, the reported temperature from the HVAC components is used.
- </li>
- <li><a name="EnOcean_alarmAction">alarmAction</a> <channel1>[:<channel2>[:<channel3>[:<channel4>]]]<br>
- [alarmAction] = no|stop|opens|closes, default is no<br>
- Action that is executed before the actuator is entering the "alarm" mode.<br>
- Notice subType blindsCrtl.00, blindsCrtl.01: The attribute can only be set while the actuator is online.
- </li>
- <li><a name="angleMax">angleMax</a> αs/°, [αs] = -180 ... 180, 90 is default.<br>
- Slat angle end position maximum.<br>
- angleMax is supported for shutter.
- </li>
- <li><a name="angleMin">angleMin</a> αo/°, [αo] = -180 ... 180, -90 is default.<br>
- Slat angle end position minimum.<br>
- angleMin is supported for shutter.
- </li>
- <li><a name="angleTime">angleTime</a> <channel1>[:<channel2>[:<channel3>[:<channel4>]]]<br>
- subType blindsCtrl.00, blindsCtrl.01: [angleTime] = 0|0.01 .. 2.54, 0 is default.<br>
- subType manufProfile: [angleTime] = 0 ... 6, 0 is default.<br>
- Runtime value for the sunblind reversion time. Select the time to revolve
- the sunblind from one slat angle end position to the other end position.<br>
- Notice subType blindsCrtl.00: The attribute can only be set while the actuator is online.
- </li>
- <li><a name="EnOcean_blockDateTime">blockDateTime</a> yes|no, [blockDateTime] = no is default.<br>
- blockDateTime is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockDisplay">blockDisplay</a> yes|no, [blockDisplay] = no is default.<br>
- blockDisplay is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockFanSpeed">blockFanSpeed</a> yes|no, [blockFanSpeed] = no is default.<br>
- blockFanSpeed is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockKey">blockKey</a> yes|no, [blockKey] = no is default.<br>
- blockKey is supported for roomCtrlPanel.00 and hvac.04.
- </li>
- <li><a name="EnOcean_blockMotion">blockMotion</a> yes|no, [blockMotion] = no is default.<br>
- blockMotion is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockOccupany">blockOccupancy</a> yes|no, [blockOccupancy] = no is default.<br>
- blockOccupancy is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockTemp">blockTemp</a> yes|no, [blockTemp] = no is default.<br>
- blockTemp is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockTimeProgram">blockTimeProgram</a> yes|no, [blockTimeProgram] = no is default.<br>
- blockTimeProgram is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockSetpointTemp">blockSetpointTemp</a> yes|no, [blockSetpointTemp] = no is default.<br>
- blockSetPointTemp is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_blockUnknownMSC">blockUnknownMSC</a> yes|no,
- [blockUnknownMSC] = no is default.<br>
- If the structure of the MSC telegrams can not interpret the raw data to be output. Setting this attribute to yes,
- the output can be suppressed.
- </li>
- <li><a name="EnOcean_comMode">comMode</a> biDir|confirm|uniDir, [comMode] = uniDir is default.<br>
- Communication Mode between an enabled EnOcean device and Fhem.<br>
- Unidirectional communication means a point-to-multipoint communication
- relationship. The EnOcean device e. g. sensors does not know the unique
- Fhem SenderID.<br>
- If the attribute is set to confirm Fhem awaits confirmation telegrams from the remote device.<br>
- Bidirectional communication means a point-to-point communication
- relationship between an enabled EnOcean device and Fhem. It requires all parties
- involved to know the unique Sender ID of their partners. Bidirectional communication
- needs a teach-in / teach-out process, see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <li><a name="EnOcean_dataEnc">dataEnc</a> VAES|AES-CBC, [dataEnc] = VAES is default<br>
- Data encryption algorithm
- </li>
- <li><a name="EnOcean_defaultChannel">defaultChannel</a> <channel>
- subType actuator.01: [defaultChannel] = all|input|0 ... 29, all is default.<br>
- subType blindsCtrl.00, blindsCtrl.01: [defaultChannel] = all|1 ... 4, all is default.<br>
- Default device channel
- </li>
- <li><a name="EnOcean_daylightSavingTime">daylightSavingTime</a> supported|not_supported, [daylightSavingTime] = supported is default.<br>
- daylightSavingTime is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_demandRespAction">demandRespAction</a> <command><br>
- Command being executed after an demand response command is set. If <command> is enclosed in {},
- then it is a perl expression, if it is enclosed in "", then it is a shell command,
- else it is a "plain" fhem.pl command (chain). In the <command> you can access the demand response
- readings $TYPE, $NAME, $LEVEL, $SETPOINT, $POWERUSAGE, $POWERUSAGESCALE, $POWERUSAGELEVEL, $STATE. In addition,
- the variables $TARGETNAME, $TARGETTYPE, $TARGETSTATE can be used if the action is executed
- on the target device. This data is available as a local variable in perl, as environment variable for shell
- scripts, and will be textually replaced for Fhem commands.
- </li>
- <li><a name="EnOcean_demandRespMax">demandRespMax</a> A0|AI|B0|BI|C0|CI|D0|DI, [demandRespMax] = B0 is default<br>
- Switch command which is executed if the demand response switches to a maximum.
- </li>
- <li><a name="EnOcean_demandRespMin">demandRespMin</a> A0|AI|B0|BI|C0|CI|D0|DI, [demandRespMax] = BI is default<br>
- Switch command which is executed if the demand response switches to a minimum.
- </li>
- <li><a name="EnOcean_demandRespRefDev">demandRespRefDev</a> <name><br>
- </li>
- <li><a name="EnOcean_demandRespRandomTime">demandRespRandomTime</a> t/s [demandRespRandomTime] = 1 is default<br>
- Maximum length of the random delay at the start or end of a demand respose event in slave mode.
- </li>
- <li><a name="EnOcean_demandRespThreshold">demandRespThreshold</a> 0...15 [demandRespTheshold] = 8 is default<br>
- Threshold for switching the power usage level between minimum and maximum in the master mode.
- </li>
- <li><a name="EnOcean_demandRespTimeoutLevel">demandRespTimeoutLevel</a> max|last [demandRespTimeoutLevel] = max is default<br>
- Demand response timeout level in slave mode.
- </li>
- <li><a name="devChannel">devChannel</a> 00 ... FF, [devChannel] = FF is default<br>
- Number of the individual device channel, FF = all channels supported by the device
- </li>
- <li><a name="destinationID">destinationID</a> multicast|unicast|00000001 ... FFFFFFFF,
- [destinationID] = multicast is default<br>
- Destination ID, special values: multicast = FFFFFFFF, unicast = [DEF]
- </li>
- <li><a name="EnOcean_devMode">devMode</a> master|slave, [devMode] = master is default.<br>
- device operation mode.
- </li>
- <li><a href="#devStateIcon">devStateIcon</a></li>
- <li><a name="EnOcean_dimMax">dimMax</a> dim/%|off, [dimMax] = 255 is default.<br>
- maximum brightness value<br>
- dimMax is supported for the profile gateway/dimming.
- </li>
- <li><a name="EnOcean_dimMin">dimMin</a> dim/%|off, [dimMax] = off is default.<br>
- minimum brightness value<br>
- If [dimMax] = off, then the actuator takes down the ramp time set there.
- dimMin is supported for the profile gateway/dimming.
- </li>
- <li><a name="dimValueOn">dimValueOn</a> dim/%|last|stored,
- [dimValueOn] = 100 is default.<br>
- Dim value for the command "on".<br>
- The dimmer switched on with the value 1 % ... 100 % if [dimValueOn] =
- 1 ... 100.<br>
- The dimmer switched to the last dim value received from the
- bidirectional dimmer if [dimValueOn] = last.<br>
- The dimmer switched to the last Fhem dim value if [dimValueOn] =
- stored.<br>
- dimValueOn is supported for the profile gateway/dimming.
- </li>
- <li><a href="#EnOcean_disable">disable</a> 0|1<br>
- If applied set commands will not be executed.
- </li>
- <li><a href="#EnOcean_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...<br>
- Space separated list of HH:MM tupels. If the current time is between
- the two time specifications, set commands will not be executed. Instead of
- HH:MM you can also specify HH or HH:MM:SS. To specify an interval
- spawning midnight, you have to specify two intervals, e.g.:
- <ul>
- 23:00-24:00 00:00-01:00
- </ul>
- </li>
- <li><a name="EnOcean_displayContent">displayContent</a>
- humidity|off|setpointTemp|temperatureExtern|temperatureIntern|time|default|no_change, [displayContent] = no_change is default.<br>
- displayContent is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_displayOrientation">displayOrientation</a> rad/°, [displayOrientation] = 0|90|180|270, 0 is default.<br>
- Display orientation of the actuator
- </li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a name="EnOcean_eep">eep</a> <00...FF>-<00...3F>-<00...7F><br>
- EnOcean Equipment Profile (EEP)
- <li><a href="#eventMap">eventMap</a></li>
- </li>
- <li><a name="EnOcean_gpDef">gpDef</a> <name of channel 00>:<O|I>:<channel type>:<signal type>:<value type>[:<resolution>[:<engineering min>:<scaling min>:<engineering max>:<scaling max>]] ...
- <name of channel 64>:<O|I>:<channel type>:<signal type>:<value type>[:<resolution>[:<engineering min>:<scaling min>:<engineering max>:<scaling max>]]
- <br>
- Generic Profiles channel definitions are set automatically in master mode. If the profile in slave mode is operated, the channel
- definition must be entered manually. For each channel, the channel definitions are to be given in ascending order. The channel
- parameters to be specified in decimal. First, the outgoing channels (direction = O) are to be defined, then the incoming channels
- (direction = I) should be described. The channel numbers are assigned automatically starting with 00th.
- </li>
- <li><a name="gwCmd">gwCmd</a> switching|dimming|setpointShift|setpointBasic|controlVar|fanStage|blindCmd<br>
- Gateway Command Type, see <a href="#Gateway">Gateway</a> profile
- </li>
- <li><a name="EnOcean_humidity">humidity</a> rH/%<br>
- The value of the actual humidity, used by a Room Sensor and Control Unit. Should by
- filled via a notify from a distinct humidity sensor.
- </li>
- <li><a name="EnOcean_humidityRefDev">humidityRefDev</a> <name><br>
- Name of the device whose reference value is read. The reference values is
- the reading humidity.
- </li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#IODev">IODev</a></li>
- <li><a name="EnOcean_keyRcv">keyRcv</a> <private key 16 byte hex><br>
- Private Key for receive direction
- </li>
- <li><a name="EnOcean_keySnd">keySnd</a> <private key 16 byte hex><br>
- Private Key for send direction
- </li>
- <li><a name="EnOcean_macAlgo">macAlgo</a> no|3|4<br>
- MAC Algorithm
- </li>
- <li><a name="EnOcean_manufID">manufID</a> <000 ... 7FF><br>
- Manufacturer ID number
- </li>
- <li><a name="EnOcean_measurementCtrl">measurementCtrl</a> enable|disable<br>
- Enable or disable the temperature measurements (room and feed temperature) of the actuator. If the temperature
- measurements are turned off, an external temperature sensor must be exists, see attribute
- <a href="#temperatureRefDev">temperatureRefDev</a>.
- </li>
- <li><a href="#model">model</a></li>
- <li><a name="EnOcean_observe">observe</a> off|on, [observe] = off is default.<br>
- Observing and repeating the execution of set commands
- </li>
- <li><a name="EnOcean_observeCmdRepetition">observeCmdRepetition</a> 1..5, [observeCmdRepetition] = 2 is default.<br>
- Maximum number of command retries
- </li>
- <li><a name="EnOcean_observeErrorAction">observeErrorAction</a> <command><br>
- Command being executed after an error. If <command> is enclosed in {},
- then it is a perl expression, if it is enclosed in "", then it is a shell command,
- else it is a "plain" fhem.pl command (chain). In the <command> you can access the set
- command. $TYPE, $NAME, $FAILEDDEV, $EVENT, $EVTPART0, $EVTPART1, $EVTPART2, etc. contains the space separated
- set parts. The <a href="#eventMap">eventMap</a> replacements are taken into account. This data
- is available as a local variable in perl, as environment variable for shell
- scripts, and will be textually replaced for Fhem commands.
- </li>
- <li><a name="EnOcean_observeInterval">observeInterval</a> 1/s ... 255/s, [observeInterval] = 1 is default.<br>
- Interval between two observations
- </li>
- <li><a name="EnOcean_observeLogic">observeLogic</a> and|or, [observeLogic] = or is default.<br>
- Observe logic
- </li>
- <li><a name="EnOcean_observeRefDev">observeRefDev</a> <name> [<name> [<name>]],
- [observeRefDev] = <name of the own device> is default<br>
- Names of the devices to be observed. The list must be separated by spaces.
- </li>
- <li><a name="EnOcean_pidActorCallBeforeSetting">pidActorCallBeforeSetting</a>,
- [pidActorCallBeforeSetting] = not defined is default<br>
- Callback-function, which can manipulate the actorValue. Further information see modul PID20.
- </li>
- <li><a name="EnOcean_pidActorErrorAction">pidActorErrorAction</a> freeze|errorPos,
- [pidActorErrorAction] = freeze is default<br>
- required action on error
- </li>
- <li><a name="EnOcean_pidActorErrorPos">pidActorErrorPos</a> valvePos/%,
- [pidActorErrorPos] = 0...100, 0 is default<br>
- actor's position to be used in case of error
- </li>
- <li><a name="EnOcean_pidActorLimitLower">pidActorLimitLower</a> valvePos/%,
- [pidActorLimitLower] = 0...100, 0 is default<br>
- lower limit for actor
- </li>
- <li><a name="EnOcean_pidActorLimitUpper">pidActorLimitUpper</a> valvePos/%,
- [pidActorLimitUpper] = 0...100, 100 is default<br>
- upper limit for actor
- </li>
- <li><a name="EnOcean_pidCtrl">pidCtrl</a> on|off,
- [pidCtrl] = on is default<br>
- Activate the Fhem PID regulator
- </li>
- <li><a name="EnOcean_pidDeltaTreshold">pidDeltaTreshold</a> <floating-point number>,
- [pidDeltaTreshold] = 0 is default<br>
- if delta < delta-threshold the pid will enter idle state
- </li>
- <li><a name="EnOcean_pidFactor_P">pidFactor_P</a> <floating-point number>,
- [pidFactor_P] = 25 is default<br>
- P value for PID
- </li>
- <li><a name="EnOcean_pidFactor_I">pidFactor_I</a> <floating-point number>,
- [pidFactor_I] = 0.25 is default<br>
- I value for PID
- </li>
- <li><a name="EnOcean_pidFactor_D">pidFactor_D</a> <floating-point number>,
- [pidFactor_D] = 0 is default<br>
- D value for PID
- </li>
- <li><a name="EnOcean_pidIPortionCallBeforeSetting">pidIPortionCallBeforeSetting</a>
- [pidIPortionCallBeforeSetting] = not defined is default<br>
- Callback-function, which can manipulate the value of I-Portion. Further information see modul PID20.
- </li>
- <li><a name="EnOcean_pidSensorTimeout">pidSensorTimeout t/s</a>
- [pidSensorTimeout] = 3600 is default<br>
- number of seconds to wait before sensor <a href="#temperatureRefDev">temperatureRefDev</a> will be recognized n/a
- </li>
- <li><a name="EnOcean_pollInterval">pollInterval</a> t/s, [pollInterval] = 10 is default.<br>
- [pollInterval] = 1 ... 1440.<br>
- pollInterval is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_rampTime">rampTime</a> t/s or relative, [rampTime] = 1 is default.<br>
- No ramping or for Eltako dimming speed set on the dimmer if [rampTime] = 0.<br>
- Gateway/dimmung: Ramping time 1 s to 255 s or relative fast to low dimming speed if [rampTime] = 1 ... 255.<br>
- lightCtrl.01: Ramping time 1 s to 65535 s<br>
- rampTime is supported for gateway, command dimming and lightCtrl.01.
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><a name="EnOcean_rcvRespAction">rcvRespAction</a> <command><br>
- Command being executed after an message from the aktor is received and before an response message is sent.
- If <command> is enclosed in {}, then it is a perl expression, if it is enclosed in "", then it is a shell command,
- else it is a "plain" fhem.pl command (chain). In the <command> you can access the name of the device by using $NAME
- and the current readings $ACTUATORSTATE, $BATTERY, $COVER, $ENERGYINPUT, $ENERGYSTORAGE, $MAINTENANCEMODE, $OPERATIONMODE,
- $ROOMTEMP, $SELFCTRL, $SETPOINT, $SETPOINTTEMP, $SUMMERMODE, $TEMPERATURE, $WINDOW for the subType hvac.01 and $NAME,
- $BATTERY, $FEEDTEMP, $MAINTENANCEMODE, $OPERATIONMODE, $ROOMTEMP, $SETPOINT, $SETPOINTTEMP, $SUMMERMODE, $TEMPERATURE
- for the subType hvac.04.
- This data is available as a local variable in perl, as environment variable for shell
- scripts, and will be textually replaced for Fhem commands.
- </li>
- <li><a name="EnOcean_remoteCode">remoteCode</a> <00000000...FFFFFFFE><br>
- Remote Management Security Code, 00000000 is interpreted as on code has been set.
- </li>
- <li><a name="EnOcean_remoteEEP">remoteEEP</a> <00...FF>-<00...3F>-<00...7F><br>
- Remote Management EnOcean Equipment Profile (EEP)
- </li>
- <li><a name="EnOcean_remoteID">remoteID</a> <00000001...FFFFFFFE><br>
- Remote Management Remote Device ID
- </li>
- <li><a name="EnOcean_remoteManagement">remoteManagement</a> client|manager|off,
- [remoteManagement] = off is default.<br>
- Enable Remote Management for the device.
- </li>
- <li><a name="EnOcean_remoteManufID">remoteManufID</a> <000...7FF><br>
- Remote Management Manufacturer ID
- </li>
- <li><a name="repeatingAllowed">repeatingAllowed</a> yes|no,
- [repeatingAllowed] = yes is default.<br>
- EnOcean Repeater in the transmission range of Fhem may forward data messages
- of the device, if the attribute is set to yes.
- </li>
- <li><a name="EnOcean_releasedChannel">releasedChannel</a> A|B|C|D|I|0|auto, [releasedChannel] = auto is default.<br>
- Attribute releasedChannel determines via which SenderID (subDefA ... subDef0) the command released is sent.
- If [releasedChannel] = auto, the SenderID the last command A0, AI, B0, BI, C0, CI, D0 or DI is used.
- Attribute releasedChannel is supported for attr switchType = central and attr switchType = channel.
- </li>
- <li><a name="EnOcean_reposition">reposition</a> directly|opens|closes, [reposition] = directly is default.<br>
- Attribute reposition specifies how to adjust the internal positioning tracker before going to the new position.
- </li>
- <li><a name="EnOcean_rlcAlgo">rlcAlgo</a> 2++|3++<br>
- RLC Algorithm
- </li>
- <li><a name="EnOcean_rlcRcv">rlcRcv</a> <rolling code 2 or 3 byte hex><br>
- Rolling Code for receive direction
- </li>
- <li><a name="EnOcean_rlcSnd">rlcSnd</a> <rolling code 2 or 3 byte hex><br>
- Rolling Code for send direction
- </li>
- <li><a name="EnOcean_rlcTX">rlcTX</a> false|true<br>
- Rolling Code is expected in the received telegram
- </li>
- <li><a name="EnOcean_rltRepeat">rltRepeat</a> 16|32|64|128|256,
- [rltRepeat] = 16 is default.<br>
- Number of RLT MasterTest messages sent
- </li>
- <li><a name="EnOcean_rltType">rltType</a> 1BS|4BS,
- [rltType] = 4BS is default.<br>
- Type of RLT MasterTest message
- </li>
- <li><a name="scaleDecimals">scaleDecimals</a> 0 ... 9<br>
- Decimal rounding with x digits of the scaled reading setpoint
- </li>
- <li><a name="EnOcean_teachMethod">teachMethod</a> 1BS|4B|confirm|GP|RPS|smartAck|STE|UTE<br>
- teach-in method
- </li>
- <li><a name="scaleMax">scaleMax</a> <floating-point number><br>
- Scaled maximum value of the reading setpoint
- </li>
- <li><a name="scaleMin">scaleMin</a> <floating-point number><br>
- Scaled minimum value of the reading setpoint
- </li>
- <li><a name="EnOcean_secLevel">secLevel</a> encapsulation|encryption|off, [secLevel] = off is default<br>
- Security level of the data
- </li>
- <li><a name="EnOcean_secMode">secMode</a> rcv|snd|bidir<br>
- Telegram direction, which is secured
- </li>
- <li><a name="EnOcean_sendDevStatus">sendDevStatus</a> no|yes, [sendDevStatus] = no is default.<br>
- Send new status of the device.
- </li>
- <li><a name="sensorMode">sensorMode</a> switch|pushbutton,
- [sensorMode] = switch is default.<br>
- The status "released" will be shown in the reading state if the
- attribute is set to "pushbutton".
- </li>
- <li><a name="EnOcean_serviceOn">serviceOn</a> no|yes,
- [serviceOn] = no is default.<br>
- Device in Service Mode.
- </li>
- <li><a name="EnOcean_setCmdTrigger">setCmdTrigger</a> man|refDev, [setCmdTrigger] = man is default.<br>
- Operation mode to send set commands<br>
- If the attribute is set to "refDev", a device-specific set command is sent when the reference device is updated.
- For the subType "roomSensorControl.05" and "fanCrtl.00" the reference "temperatureRefDev" is supported.<br>
- For the subType "roomSensorControl.01" the references "humidityRefDev" and "temperatureRefDev" are supported.<br>
- </li>
- <li><a name="EnOcean_setpointRefDev">setpointRefDev</a> <name><br>
- Name of the device whose reference value is read. The reference values is
- the reading setpoint.
- </li>
- <li><a name="EnOcean_setpointSummerMode">setpointSummerMode</a> valvePos/%,
- [setpointSummerMode] = 0...100, 0 is default<br>
- Valve position in summer operation
- </li>
- <li><a name="EnOcean_setpointTempRefDev">setpointTempRefDev</a> <name><br>
- Name of the device whose reference value is read. The reference values is
- the reading setpointTemp.
- </li>
- <li><a name="EnOcean_settingAccuracy">settingAccuracy</a> high|low,
- [settingAccuracy] = low is default.<br>
- set setting accurancy.
- </li>
- <li><a href="#showtime">showtime</a></li>
- <li><a name="shutTime">shutTime</a> <channel1>[:<channel2>[:<channel3>[:<channel4>]]]<br>
- subType blindsCtrl.00, blindsCtrl.01: [shutTime] = 5 ... 300, 300 is default.<br>
- subType manufProfile: [shutTime] = 1 ... 255, 255 is default.<br>
- Use the attr shutTime to set the time delay to the position "Halt" in
- seconds. Select a delay time that is at least as long as the shading element
- or roller shutter needs to move from its end position to the other position.<br>
- Notice subType blindsCrtl.00: The attribute can only be set while the actuator is online.
- </li>
- <li><a name="shutTimeCloses">shutTimeCloses</a> t/s, [shutTimeCloses] = 1 ... 255,
- [shutTimeCloses] = [shutTime] is default.<br>
- Set the attr shutTimeCloses to define the runtime used by the commands opens and closes.
- Select a runtime that is at least as long as the value set by the delay switch of the actuator.
- <br>
- shutTimeCloses is supported for shutter.
- </li>
- <li><a name="subDef">subDef</a> <EnOcean SenderID>,
- [subDef] = [DEF] is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset) to control a bidirectional switch or actor.<br>
- In order to control devices that send acknowledge telegrams, you cannot reuse the ID of this
- devices, instead you have to create your own, which must be in the
- allowed ID-Range of the underlying IO device. For this first query the
- <a href="#TCM">TCM</a> with the "<code>get <tcm> idbase</code>" command. You can use
- up to 128 IDs starting with the base shown there.<br>
- If [subDef] = getNextID FHEM can assign a free SenderID alternatively. The system configuration
- needs to be reloaded. The assigned SenderID will only displayed after the system configuration
- has been reloaded, e.g. Fhem command rereadcfg.
- </li>
- <li><a name="subDefA">subDefA</a> <EnOcean SenderID>,
- [subDefA] = [subDef] is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = A0|AI|released<br>
- Used with switch type "channel". Set attr switchType to channel.<br>
- subDefA is supported for switches.<br>
- Second action is not sent.<br>
- If [subDefA] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
- displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
- </li>
- <li><a name="subDefB">subDefB</a> <EnOcean SenderID>,
- [subDefB] = [subDef] is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = B0|BI|released<br>
- Used with switch type "channel". Set attr switchType to channel.<br>
- subDefB is supported for switches.<br>
- Second action is not sent.<br>
- If [subDefB] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
- displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
- </li>
- <li><a name="subDefC">subDefC</a> <EnOcean SenderID>,
- [subDefC] = [subDef] is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = C0|CI|released<br>
- Used with switch type "channel". Set attr switchType to channel.<br>
- subDefC is supported for switches.<br>
- Second action is not sent.<br>
- If [subDefC] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
- displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
- </li>
- <li><a name="subDefD">subDefD</a> <EnOcean SenderID>,
- [subDefD] = [subDef] is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = D0|DI|released<br>
- Used with switch type "channel". Set attr switchType to channel.<br>
- subDefD is supported for switches.<br>
- Second action is not sent.<br>
- If [subDefD] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
- displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
- </li>
- <li><a name="subDef0">subDef0</a> <EnOcean SenderID>,
- [subDef0] = [subDef] is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = A0|B0|C0|D0|released<br>
- Used with switch type "central". Set attr switchType to central.<br>
- Use the sensor type "zentral aus/ein" for Eltako devices.<br>
- subDef0 is supported for switches.<br>
- Second action is not sent.<br>
- If [subDef0] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
- displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
- </li>
- <li><a name="subDefI">subDefI</a> <EnOcean SenderID>,
- [subDefI] = [subDef] is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset) for [value] = AI|BI|CI|DI<br>
- Used with switch type "central". Set attr switchType to central.<br>
- Use the sensor type "zentral aus/ein" for Eltako devices.<br>
- subDefI is supported for switches.<br>
- Second action is not sent.<br>
- If [subDefI] = getNextID FHEM can assign a free SenderID alternatively. The assigned SenderID will only
- displayed after the system configuration has been reloaded, e.g. Fhem command rereadcfg.
- </li>
- <li><a name="EnOcean_subDefH">subDefH</a> <EnOcean SenderID>,
- [subDefH] = undef is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset)<br>
- Used with subType "multisensor.00". If the attribute subDefH is set, the position of the window handle as EEP F6-10-00
- (windowHandle) telegram is forwarded.<br>
- If [subDefH] = getNextID FHEM can assign a free SenderID alternatively.
- </li>
- <li><a name="EnOcean_subDefW">subDefW</a> <EnOcean SenderID>,
- [subDefW] = undef is default.<br>
- SenderID (<a href="#TCM">TCM</a> BaseID + offset)<br>
- Used with subType "multisensor.00". If the attribute subDefW is set, the window state as EEP D5-00-01
- (contact) telegram is forwarded.<br>
- If [subDefW] = getNextID FHEM can assign a free SenderID alternatively.
- </li>
- <li><a href="#subType">subType</a></li>
- <li><a name="subTypeSet">subTypeSet</a> <type of device>, [subTypeSet] = [subType] is default.<br>
- Type of device (EEP Profile) used for sending commands. Set the Attribute manually.
- The profile has to fit their basic profile. More information can be found in the basic profiles.
- </li>
- <li><a name="EnOcean_summerMode">summerMode</a> off|on,
- [summerMode] = off is default.<br>
- Put Battery Powered Actuator (hvac.01) or Heating Radiator Actuating Drive (hvac.04) in summer operation
- to reduce energy consumption. If [summerMode] = on, the set commands are not executed.
- </li>
- <li><a name="EnOcean_switchHysteresis">switchHysteresis</a> <value>,
- [switchHysteresis] = 1 is default.<br>
- Switch Hysteresis
- </li>
- <li><a name="switchMode">switchMode</a> switch|pushbutton,
- [switchMode] = switch is default.<br>
- The set command "released" immediately after <value> is sent if the
- attribute is set to "pushbutton".
- </li>
- <li><a name="switchType">switchType</a> direction|universal|central|channel,
- [switchType] = direction is default.<br>
- EnOcean Devices support different types of sensors, e. g. direction
- switch, universal switch or pushbutton, central on/off.<br>
- For Eltako devices these are the sensor types "Richtungstaster",
- "Universalschalter" or "Universaltaster", "Zentral aus/ein".<br>
- With the sensor type <code>direction</code> switch on/off commands are
- accepted, e. g. B0, BI, released. Fhem can control an device with this
- sensor type unique. This is the default function and should be
- preferred.<br>
- Some devices only support the <code>universal switch
- </code> or <code>pushbutton</code>. With a Fhem command, for example,
- B0 or BI is switched between two states. In this case Fhem cannot
- control this device unique. But if the Attribute <code>switchType
- </code> is set to <code>universal</code> Fhem synchronized with
- a bidirectional device and normal on/off commands can be used.
- If the bidirectional device response with the channel B
- confirmation telegrams also B0 and BI commands are to be sent,
- e g. channel A with A0 and AI. Also note that confirmation telegrams
- needs to be sent.<br>
- Partly for the switchType <code>central</code> two different SenderID
- are required. In this case set the Attribute <code>switchType</code> to
- <code>central</code> and define the Attributes
- <a href="#subDef0">subDef0</a> and <a href="#subDefI">subDefI</a>.<br>
- Furthermore, SenderIDs can be used depending on the channel A, B, C or D.
- In this case set the Attribute switchType to <code>channel</code> and define
- the Attributes <a href="#subDefA">subDefA</a>, <a href="#subDefB">subDefB</a>,
- <a href="#subDefC">subDefC</a>, or <a href="#subDefD">subDefD</a>.
- </li>
- <li><a name="temperatureRefDev">temperatureRefDev</a> <name><br>
- Name of the device whose reference value is read. The reference values is
- the reading temperature.
- </li>
- <li><a name="EnOcean_temperatureScale">temperatureScale</a> F|C|default|no_change, [temperatureScale] = no_change is default.<br>
- temperatureScale is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_timeNotation">timeNotation</a> 12|24|default|no_change, [timeNotation] = no_change is default.<br>
- timeNotation is supported for roomCtrlPanel.00.
- </li>
- <li><a name="EnOcean_timeProgram[1-4]">timeProgram[1-4]</a> <period> <starttime> <endtime> <roomCtrlMode>, [timeProgam[1-4]] = <none> is default.<br>
- [period] = FrMo|FrSu|ThFr|WeFr|TuTh|MoWe|SaSu|MoFr|MoSu|Su|Sa|Fr|Th|We|Tu|Mo<br>
- [starttime] = [00..23]:[00|15|30|45]<br>
- [endtime] = [00..23]:[00|15|30|45]<br>
- [roomCtrlMode] = buildingProtection|comfort|economy|preComfort<br>
- The Room Control Panel Kieback & Peter RBW322-FTL supports only [roomCtrlMode] = comfort.<br>
- timeProgram is supported for roomCtrlPanel.00.
- </li>
- <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>
- Transmission cycle of the tracker.
- </li>
- <li><a name="EnOcean_updateState">updateState</a> default|yes|no, [updateState] = default is default.<br>
- update reading state after set commands
- </li>
- <li><a name="EnOcean_uteResponseRequest">uteResponseRequest</a> yes|no<br>
- request UTE teach-in/teach-out response message, the standard value depends on the EEP profil
- </li>
- <li><a href="#verbose">verbose</a></li>
- <li><a name="EnOcean_wakeUpCycle">wakeUpCycle</a> t/s, [wakeUpCycle] = 10 s ... 151200 s, 300 s is default.<br>
- Transmission cycle of the actuator.
- </li>
- <li><a href="#webCmd">webCmd</a></li>
- </ul>
- </ul>
- <br>
- <a name="EnOceanevents"></a>
- <b>Generated events</b>
- <ul>
- <ul>
- <li><a name="EnOcean_remoteEvents">Remote Management</a><br>
- <ul>
- <li>remoteDevCfg<0000...FFFF>: <device config></li>
- <li>remoteFunction<01...99>: <remote function number>:<remote manufacturer ID>:<explanation></li>
- <li>remoteLastFunctionNumber: 001...FFF</li>
- <li>remoteLastStatusReturnCode: 00...FF</li>
- <li>remoteLearn: not_supported|supported</li>
- <li>remoteLinkCfg<in|out><00...FF>: <data index>:<device config></li>
- <li>remoteLinkTableDesc<in|out><00...FF>: <DeviceID>:<EEP>:<channel></li>
- <li>remoteLinkTableGPDesc<in|out><00...FF>: <name of channel 00>:<O|I>:<channel type>:<signal type>:<value type>[:<resolution>[:<engineering min>:<scaling min>:<engineering max>:<scaling max>]]</li>
- <li>remoteProductID: 00000000...FFFFFFFF</li>
- <li>remoteRepeaterFilter: AND|OR</li>
- <li>remoteRepeaterFunction: on|off|filter</li>
- <li>remoteRepeaterLevel: 1|2</li>
- <li>remoteTeach: not_supported|supported</li>
- <li>remoteRSSI: LP/dBm</li>
- <li>teach: <result of teach procedure></li>
- </ul>
- </li>
- <br><br>
- <li>Switch (EEP F6-02-01 ... F6-03-02)<br>
- <ul>
- <li>A0</li>
- <li>AI</li>
- <li>B0</li>
- <li>BI</li>
- <li>C0</li>
- <li>CI</li>
- <li>D0</li>
- <li>DI</li>
- <li><BtnX,BtnY> First and second action where BtnX and BtnY is
- one of the above, e.g. A0 BI or D0 CI</li>
- <li>buttons: pressed|released</li>
- <li>state: <BtnX>[,<BtnY>]</li>
- </ul><br>
- Switches (remote controls) or actors with more than one
- (pair) keys may have multiple channels e. g. B0/BI, A0/AI with one
- SenderID or with separate addresses.
- </li>
- <br><br>
- <li>Pushbutton Switch, Pushbutton Input Module (EEP F6-02-01 ... F6-02-02, F6-01-01)<br>
- [Eltako FT55, FSM12, FSM61, FTS12]<br>
- <ul>
- <li>A0</li>
- <li>AI</li>
- <li>B0</li>
- <li>BI</li>
- <li>C0</li>
- <li>CI</li>
- <li>D0</li>
- <li>DI</li>
- <li><BtnX,BtnY> First and second action where BtnX and BtnY is
- one of the above, e.g. A0,BI or D0,CI</li>
- <li>released</li>
- <li>buttons: pressed|released</li>
- <li>state: <BtnX>[,<BtnY>] [released]</li>
- </ul><br>
- The status of the device may become "released", this is not the case for a normal switch.<br>
- Set attr model to Eltako_FT55|FSM12|FSM61|FTS12 or attr sensorMode to pushbutton manually.
- </li>
- <br><br>
- <li>Pushbutton Switch (EEP F6-3F-7F)<br>
- [Eltako FGW14/FAM14 with internal decryption and RS-485 communication]<br>
- <ul>
- <li>A0</li>
- <li>AI</li>
- <li>B0</li>
- <li>BI</li>
- <li>C0</li>
- <li>CI</li>
- <li>D0</li>
- <li>DI</li>
- <li><BtnX,BtnY> First and second action where BtnX and BtnY is
- one of the above, e.g. A0,BI or D0,CI</li>
- <li>released</li>
- <li>buttons: pressed|released</li>
- <li>state: <BtnX>[,<BtnY>] [released]</li>
- </ul><br>
- Set attr subType to switch.7F and manufID to 00D.<br>
- The status of the device may become "released", this is not the case for
- a normal switch. Set attr sensorMode to pushbutton manually.
- </li>
- <br><br>
- <li>Pushbutton Switch (EEP D2-03-00)<br>
- [EnOcean PTM 215 Modul]<br>
- <ul>
- <li>A0</li>
- <li>AI</li>
- <li>B0</li>
- <li>BI</li>
- <li><BtnX,BtnY> First and second action where BtnX and BtnY is
- one of the above, e.g. A0,BI</li>
- <li>pressed</li>
- <li>released</li>
- <li>teach: <result of teach procedure></li>
- <li>energyBow: pressed|released</li>
- <li>state: <BtnX>|<BtnX>,<BtnY>|released|pressed|teachIn|teachOut</li>
- </ul><br>
- The attr subType must be switch.00. This is done if the device was
- created by autocreate. Set attr sensorMode to pushbutton manually if needed.
- </li>
- <br><br>
- <li>Heating/Cooling Relay (EEP F6-02-01 ... F6-02-02)<br>
- [Eltako FAE14, FHK14, untested]<br>
- <ul>
- <li>controllerMode: auto|off</li>
- <li>energyHoldOff: normal|holdoff</li>
- <li>buttons: pressed|released</li>
- </ul><br>
- Set attr subType to switch and model to Eltako_FAE14|FHK14 manually. In addition
- every telegram received from a teached-in temperature sensor (e.g. FTR55H)
- is repeated as a confirmation telegram from the Heating/Cooling Relay
- FAE14, FHK14. In this case set attr subType to e. g. roomSensorControl.05
- and attr manufID to 00D.
- </li>
- <br><br>
- <li>Key Card Activated Switch (EEP F6-04-01)<br>
- [Eltako FKC, FKF, FZS, untested]<br>
- <ul>
- <li>keycard_inserted</li>
- <li>keycard_removed</li>
- <li>state: keycard_inserted|keycard_removed</li>
- </ul><br>
- Set attr subType to keycard manually.
- </li>
- <br><br>
- <li>Wind Speed Threshold Detector (EEP F6-05-00)<br>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>alarm: dead_sensor|off</li>
- <li>windSpeed: dead_sensor|on|off</li>
- <li>battery: low|ok</li>
- <li>state: on|off</li>
- </ul><br>
- Set attr subType to windSpeed.00 manually.
- </li>
- <br><br>
- <li>Liquid Leakage Sensor (EEP F6-05-01)<br>
- [untested]<br>
- <ul>
- <li>dry</li>
- <li>wet</li>
- <li>state: dry|wet</li>
- </ul><br>
- Set attr subType to liquidLeakage manually.
- </li>
- <br><br>
- <li>Smoke Detector (EEP F6-05-02)<br>
- [Eltako FRW]<br>
- <ul>
- <li>smoke-alarm</li>
- <li>off</li>
- <li>alarm: dead_sensor|smoke-alarm|off</li>
- <li>battery: low|ok</li>
- <li>state: smoke-alarm|off</li>
- </ul><br>
- Set attr subType to smokeDetector.02 manually.
- </li>
- <br><br>
- <li>Window Handle (EEP F6-10-00, D2-03-10)<br>
- [HOPPE SecuSignal, Eltako FHF, Eltako FTKE]<br>
- <ul>
- <li>closed</li>
- <li>open</li>
- <li>tilted</li>
- <li>open_from_tilted</li>
- <li>state: closed|open|tilted|open_from_tilted</li>
- </ul><br>
- The device windowHandle or windowHandle.10 should be created by autocreate.
- </li>
- <br><br>
- <li>Single Input Contact, Door/Window Contact<br>
- 1BS Telegram (EEP D5-00-01)<br>
- [EnOcean STM 320, STM 329, STM 250, Eltako FTK, Peha D 450 FU]
- <ul>
- <li>closed</li>
- <li>open</li>
- <li>teach: <result of teach procedure></li>
- <li>state: open|closed</li>
- </ul></li>
- The device should be created by autocreate.
- <br><br>
- <li>Temperature Sensors with with different ranges (EEP A5-02-01 ... A5-02-30)<br>
- [EnOcean STM 330, Eltako FTF55, Thermokon SR65 ...]<br>
- <ul>
- <li>t/°C</li>
- <li>temperature: t/°C (Sensor Range: t = <t min> °C ... <t max> °C)</li>
- <li>state: t/°C</li>
- </ul><br>
- The attr subType must be tempSensor.01 ... tempSensor.30. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Temperatur and Humidity Sensor (EEP A5-04-02)<br>
- [Eltako FAFT60, FIFT63AP]<br>
- <ul>
- <li>T: t/°C H: rH/% B: unknown|low|ok</li>
- <li>battery: unknown|low|ok</li>
- <li>energyStorage: unknown|empty|charged|full</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>temperature: t/°C (Sensor Range: t = -20 °C ... 60 °C)</li>
- <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 6.6 V)
- <li>state: T: t/°C H: rH/% B: unknown|low|ok</li>
- </ul><br>
- The attr subType must be tempHumiSensor.02 and attr
- manufID must be 00D for Eltako Devices. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Temperatur and Humidity Sensor (EEP A5-04-03)<br>
- [untsted]<br>
- <ul>
- <li>T: t/°C H: rH/%</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>telegramType: heartbeat|event</li>
- <li>temperature: t/°C (Sensor Range: t = -20 °C ... 60 °C)</li>
- <li>state: T: t/°C H: rH/%</li>
- </ul><br>
- The attr subType must be tempHumiSensor.03. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Barometric Sensor (EEP A5-05-01)<br>
- [untested]<br>
- <ul>
- <li>P/hPa</li>
- <li>airPressure: P/hPa (Sensor Range: P = 500 hPa ... 1150 hPa</li>
- <li>telegramType: heartbeat|event</li>
- <li>state: P/hPa</li>
- </ul><br>
- The attr subType must be baroSensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Light Sensor (EEP A5-06-01)<br>
- [Eltako FAH60, FAH63, FIH63, Thermokon SR65 LI]<br>
- <ul>
- <li>E/lx</li>
- <li>brightness: E/lx (Sensor Range: 300 lx ... 30 klx, 600 lx ... 60 klx
- , Sensor Range for Eltako: E = 0 lx ... 100 lx, 300 lx ... 30 klx)</li>
- <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
- <li>state: E/lx</li>
- </ul><br>
- Eltako devices only support Brightness.<br>
- The attr subType must be lightSensor.01 and attr manufID must be 00D
- for Eltako Devices. This is done if the device was created by
- autocreate.
- </li>
- <br><br>
- <li>Light Sensor (EEP A5-06-02)<br>
- [untested]<br>
- <ul>
- <li>E/lx</li>
- <li>brightness: E/lx (Sensor Range: 0 lx ... 1020 lx</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.1 V)</li>
- <li>state: E/lx</li>
- </ul><br>
- The attr subType must be lightSensor.02. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Light Sensor (EEP A5-06-03)<br>
- [untested]<br>
- <ul>
- <li>E/lx</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
- <li>errorCode: 251 ... 255</li>
- <li>state: E/lx</li>
- </ul><br>
- The attr subType must be lightSensor.03. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Light Sensor (EEP A5-06-04)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C E: E/lx B: ok|low</li>
- <li>battery: ok|low</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 65535 lx)</li>
- <li>energyStorage: 1/%</li>
- <li>temperature: t/°C (Sensor Range: t = -20 °C ... 60 °C)</li>
- <li>state: T: t/°C E: E/lx B: ok|low</li>
- </ul><br>
- The attr subType must be lightSensor.04. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Light Sensor (EEP A5-06-05)<br>
- [untested]<br>
- <ul>
- <li>E/lx</li>
- <li>brightness: E/lx (Sensor Range: 0 lx ... 10200 lx</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.1 V)</li>
- <li>state: E/lx</li>
- </ul><br>
- The attr subType must be lightSensor.05. This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Occupancy Sensor (EEP A5-07-01, A5-07-02)<br>
- [EnOcean EOSW]<br>
- <ul>
- <li>on|off</li>
- <li>battery: ok|low</li>
- <li>button: pressed|released</li>
- <li>current: I/µA (Sensor Range: I = 0 V ... 127.0 µA)</li>
- <li>errorCode: 251 ... 255</li>
- <li>motion: on|off</li>
- <li>sensorType: ceiling|wall</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be occupSensor.<01|02>. This is done if the device was
- created by autocreate. Current is the solar panel current. Some values are
- displayed only for certain types of devices.
- </li>
- <br><br>
- <li>Eltako/PioTek-Tracker TF-TTB (EEP A5-07-01)<br>
- <ul>
- <li>on|off</li>
- <li>battery: ok|low</li>
- <li>button: pressed|released</li>
- <li>motion: on|off</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be occupSensor.01. This is done if the device was
- created by autocreate. The attr model has to be set manually to tracker.
- Alternatively, the profile will be defined with inofficial EEP G5-07-01.<br>
- The transmission cycle is set using the attribute <a href="#EnOcean_trackerWakeUpCycle">trackerWakeUpCycle</a>.
- </li>
- <br><br>
- <li>Occupancy Sensor (EEP A5-07-03)<br>
- [untested]<br>
- <ul>
- <li>M: on|off E: E/lx U: U/V</li>
- <li>battery: ok|low</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
- <li>errorCode: 251 ... 255</li>
- <li>motion: on|off</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>state: M: on|off E: E/lx U: U/V</li>
- </ul><br>
- The attr subType must be occupSensor.03. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Light, Temperatur and Occupancy Sensor (EEP A5-08-01 ... A5-08-03)<br>
- [Eltako FABH63, FBH55, FBH63, FIBH63, Thermokon SR-MDS, PEHA 482 FU-BM DE]<br>
- <ul>
- <li>M: on|off E: E/lx P: absent|present T: t/°C U: U/V</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 510, 1020, 1530 or 2048 lx)</li>
- <li>motion: on|off</li>
- <li>presence: absent|present</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 51 °C or -30 °C ... 50 °C)</li>
- <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
- <li>state: M: on|off E: E/lx P: absent|present T: t/°C U: U/V</li>
- </ul><br>
- Eltako and PEHA devices only support Brightness and Motion.<br>
- The attr subType must be lightTempOccupSensor.<01|02|03> and attr
- manufID must be 00D for Eltako Devices. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Gas Sensor, CO Sensor (EEP A5-09-01)<br>
- [untested]<br>
- <ul>
- <li>CO: c/ppm (Sensor Range: c = 0 ppm ... 255 ppm)</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 255 °C)</li>
- <li>state: c/ppm</li>
- </ul><br>
- The attr subType must be COSensor.01. This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Gas Sensor, CO Sensor (EEP A5-09-02)<br>
- [untested]<br>
- <ul>
- <li>CO: c/ppm (Sensor Range: c = 0 ppm ... 1020 ppm)</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 51.0 °C)</li>
- <li>voltage: U/V</li> (Sensor Range: U = 0 V ... 5.1 V)
- <li>state: c/ppm</li>
- </ul><br>
- The attr subType must be COSensor.02. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Gas Sensor, CO2 Sensor (EEP A5-09-04)<br>
- [Thermokon SR04 CO2 *, Eltako FCOTF63, untested]<br>
- <ul>
- <li>airQuality: high|mean|moderate|low (Air Quality Classes DIN EN 13779)</li>
- <li>CO2: c/ppm (Sensor Range: c = 0 ppm ... 2550 ppm)</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 51 °C)</li>
- <li>state: T: t/°C H: rH/% CO2: c/ppm AQ: high|mean|moderate|low</li>
- </ul><br>
- The attr subType must be tempHumiCO2Sensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Gas Sensor, Volatile organic compounds (VOC) Sensor (EEP A5-09-05, A5-09-0C)<br>
- [untested]<br>
- <ul>
- <li>concentration: c/[unit] (Sensor Range: c = 0 ... 655350</li>
- <li>concentrationUnit: ppb|μ/m3</li>
- <li>vocName: Name of last measured VOC</li>
- <li>state: c/[unit]</li>
- </ul><br>
- The attr subType must be vocSensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Gas Sensor, Radon Sensor (EEP A5-09-06)<br>
- [untested]<br>
- <ul>
- <li>Rn: A m3/Bq (Sensor Range: A = 0 Bq/m3 ... 1023 Bq/m3)</li>
- <li>state: A m3/Bq</li>
- </ul><br>
- The attr subType must be radonSensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Gas Sensor, Particles Sensor (EEP A5-09-07)<br>
- [untested]<br>
- Three channels with particle sizes of up to 10 μm, 2.5 μm and 1 μm are supported<br>.
- <ul>
- <li>particles_10: p m3/μg | inactive (Sensor Range: p = 0 μg/m3 ... 511 μg/m3)</li>
- <li>particles_2_5: p m3/μg | inactive (Sensor Range: p = 0 μg/m3 ... 511 μg/m3)</li>
- <li>particles_1: p m3/μg | inactive (Sensor Range: p = 0 μg/m3 ... 511 μg/m3)</li>
- <li>state: PM10: p m3/μg PM2_5: p m3/μg PM1: p m3/μg</li>
- </ul><br>
- The attr subType must be particlesSensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>CO2 Sensor (EEP A5-09-08, A5-09-09)<br>
- [untested]<br>
- <ul>
- <li>CO2: c/ppm (Sensor Range: c = 0 ppm ... 2000 ppm)</li>
- <li>powerFailureDetection: detected|not_detected</li>
- <li>state: c/ppm</li>
- </ul><br>
- The attr subType must be CO2Sensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>H Sensor (EEP A5-09-0A)<br>
- [untested]<br>
- <ul>
- <li>c/ppm</li>
- <li>voltage: U/V (Sensor Range: U = 2 V ... 5 V)</li>
- <li>H: c/ppm (Sensor Range: c = 0 ppm ... 2000 ppm)</li>
- <li>temperature: t/°C (Sensor Range: t = -20 °C ... 60 °C)</li>
- <li>state: c/ppm</li>
- </ul><br>
- The attr subType must be HSensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Radiation Sensor (EEP A5-09-0B)<br>
- [untested]<br>
- <ul>
- <li>1/[unit]</li>
- <li>radioactivity: 1/[unit] (Sensor Range: c = 0 [unit] ... 65535 [unit])</li>
- <li>unit: uSv/h|cpm|Bq/L|Bq/kg</li>
- <li>voltage: U/V (Sensor Range: U = 2 V ... 5 V)</li>
- <li>state: 1/[unit]</li>
- </ul><br>
- The attr subType must be radiationSensor.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-01 ... A5-10-0D)<br>
- [Eltako FTR55*, Thermokon SR04 *, Thanos SR *]<br>
- <ul>
- <li>T: t/°C SP: 0 ... 255 F: 0|1|2|3|auto SW: 0|1</li>
- <li>fanStage: 0|1|2|3|auto</li>
- <li>switch: on|off</li>
- <li>setpoint: 0 ... 255</li>
- <li>setpointScaled: <floating-point number></li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: T: t/°C SP: 0 ... 255 F: 0|1|2|3|auto SW: on|off</li><br>
- Alternatively for Eltako devices
- <li>T: t/°C SPT: t/°C NR: t/°C</li>
- <li>block: lock|unlock</li>
- <li>nightReduction: t/K</li>
- <li>setpointTemp: t/°C</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: T: t/°C SPT: t/°C NR: t/K</li><br>
- </ul><br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
- setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
- adjust the scaling alternatively.<br>
- The attr subType must be roomSensorControl.05 and attr
- manufID must be 00D for Eltako Devices. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-04-01, A5-10-10 ... A5-10-14)<br>
- [Eltako FUTH65D, Thermokon SR04 * rH, Thanos SR *]<br>
- <ul>
- <li>T: t/°C H: rH/% SP: 0 ... 255 SW: 0|1</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>switch: 0|1</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>setpoint: 0 ... 255</li>
- <li>setpointScaled: <floating-point number></li>
- <li>state: T: t/°C H: rH/% SP: 0 ... 255 SW: 0|1</li>
- </ul><br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
- setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
- adjust the scaling alternatively.<br>
- The attr subType must be roomSensorControl.01 and attr
- manufID must be 00D for Eltako Devices. This is
- done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-15 ... A5-10-17)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C SP: 0 ... 63 P: absent|present</li>
- <li>presence: absent|present</li>
- <li>temperature: t/°C (Sensor Range: t = -10 °C ... 41.2 °C)</li>
- <li>setpoint: 0 ... 63</li>
- <li>setpointScaled: <floating-point number></li>
- <li>state: T: t/°C SP: 0 ... 63 P: absent|present</li>
- </ul><br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
- setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
- adjust the scaling alternatively.<br>
- The attr subType must be roomSensorControl.02. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-18)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
- <li>fan: 0|1|2|3|4|5|auto|off</li>
- <li>presence: absent|present|disabled</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>setpoint: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
- </ul><br>
- The attr subType must be roomSensorControl.18. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-19)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
- <li>fan: 0|1|2|3|4|5|auto|off</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>presence: absent|present|disabled</li>
- <li>setpoint: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled</li>
- </ul><br>
- The attr subType must be roomSensorControl.19. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-1A)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled U: U/V</li>
- <li>errorCode: 251 ... 255</li>
- <li>fan: 0|1|2|3|4|5|auto|off</li>
- <li>presence: absent|present|disabled</li>
- <li>setpoint: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>state: T: t/°C F: 0|1|2|3|4|5|auto|off SP: t/°C P: absent|present|disabled U: U/V</li>
- </ul><br>
- The attr subType must be roomSensorControl.1A. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-1B)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off P: absent|present|disabled U: U/V</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
- <li>errorCode: 251 ... 255</li>
- <li>fan: 0|1|2|3|4|5|auto|off</li>
- <li>presence: absent|present|disabled</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>state: T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off P: absent|present|disabled U: U/V</li>
- </ul><br>
- The attr subType must be roomSensorControl.1B. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-1C)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: E/lx P: absent|present|disabled</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
- <li>fan: 0|1|2|3|4|5|auto|off</li>
- <li>presence: absent|present|disabled</li>
- <li>setpoint: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: T: t/°C B: E/lx F: 0|1|2|3|4|5|auto|off SP: E/lx P: absent|present|disabled</li>
- </ul><br>
- The attr subType must be roomSensorControl.1C. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-1D)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: rH/% P: absent|present|disabled</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>fan: 0|1|2|3|4|5|auto|off</li>
- <li>presence: absent|present|disabled</li>
- <li>setpoint: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: T: t/°C H: rH/% F: 0|1|2|3|4|5|auto|off SP: rH/% P: absent|present|disabled</li>
- </ul><br>
- The attr subType must be roomSensorControl.1D. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Sensor and Control Unit (EEP A5-10-1F)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C F: 0|1|2|3|auto SP: 0 ... 255 P: absent|present|disabled</li>
- <li>fan: 0|1|2|3|auto</li>
- <li>presence: absent|present|disabled</li>
- <li>setpoint: 0 ... 255</li>
- <li>setpointScaled: <floating-point number></li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: T: t/°C F: 0|1|2|3|auto SP: 0 ... 255 P: absent|present|disabled</li>
- </ul><br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
- setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
- adjust the scaling alternatively.<br>
- The attr subType must be roomSensorControl.1F. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Room Operation Panel (EEP A5-10-20, A5-10-21)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C H: rH/% SP: 0 ... 255 B: ok|low</li>
- <li>activity: yes|no</li>
- <li>battery: ok|low</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>setpoint: 0 ... 255</li>
- <li>setpointMode: auto|frostProtect|setpoint</li>
- <li>setpointScaled: <floating-point number></li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: t/°C H: rH/% SP: 0 ... 255 B: ok|low</li>
- </ul><br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
- setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
- adjust the scaling alternatively.<br>
- The attr subType must be roomSensorControl.20. This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Room Operation Panel (EEP A5-10-22, A5-10-23)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C H: rH/% SP: 0 ... 255 F: auto|off|1|2|3 O: occupied|unoccupied</li>
- <li>fanSpeed: auto|off|1|2|3</li>
- <li>humidity: rH/% (Sensor Range: rH = 0 % ... 100 %)</li>
- <li>occupancy: occupied|unoccupied</li>
- <li>setpoint: 0 ... 255</li>
- <li>setpointScaled: <floating-point number></li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: t/°C H: rH/% SP: 0 ... 255 F: auto|off|1|2|3 O: occupied|unoccupied</li>
- </ul><br>
- The scaling of the setpoint adjustment is device- and vendor-specific. Set the
- attributes <a href="#scaleMax">scaleMax</a>, <a href="#scaleMin">scaleMin</a> and
- <a href="#scaleDecimals">scaleDecimals</a> for the additional scaled reading
- setpointScaled. Use attribut <a href="#userReadings">userReadings</a> to
- adjust the scaling alternatively.<br>
- The attr subType must be roomSensorControl.22.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Lighting Controller State (EEP A5-11-01)<br>
- [untested]<br>
- <ul>
- <li>on|off</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 510 lx)</li>
- <li>contact: open|closed</li>
- <li>daylightHarvesting: enabled|disabled</li>
- <li>dim: 0 ... 255</li>
- <li>presence: absent|present</li>
- <li>illum: 0 ... 255</li>
- <li>mode: switching|dimming</li>
- <li>powerRelayTimer: enabled|disabled</li>
- <li>powerSwitch: on|off</li>
- <li>repeater: enabled|disabled</li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be lightCtrlState.01 This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Temperature Controller Output (EEP A5-11-02)<br>
- [untested]<br>
- <ul>
- <li>t/°C</li>
- <li>alarm: on|off</li>
- <li>controlVar: cvar (Sensor Range: cvar = 0 % ... 100 %)</li>
- <li>controllerMode: auto|heating|cooling|off</li>
- <li>controllerState: auto|override</li>
- <li>energyHoldOff: normal|holdoff</li>
- <li>fan: 0 ... 3|auto</li>
- <li>presence: present|absent|standby|frost</li>
- <li>setpointTemp: t/°C (Sensor Range: t = 0 °C ... 51.2 °C)</li>
- <li>state: t/°C</li>
- </ul><br>
- The attr subType must be tempCtrlState.01 This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li><a name="Blind Status">Blind Status</a> (EEP A5-11-03)<br>
- [untested, experimental status]<br>
- <ul>
- <li>open|closed|not_reached|not_available</li>
- <li>alarm: on|off|no endpoints defined|not used</li>
- <li>anglePos: α/° (Sensor Range: α = -180 ° ... 180 °)</li>
- <li>endPosition: open|closed|not_reached|not_available</li>
- <li>position: pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
- <li>positionMode: normal|inverse</li>
- <li>serviceOn: yes|no</li>
- <li>shutterState: opens|closes|stopped|not_available</li>
- <li>state: open|closed|not_reached|not_available</li>
- </ul><br>
- The attr subType must be shutterCtrlState.01 This is done if the device was
- created by autocreate.<br>
- The profile is linked with <a href="#Blind Command Central">Blind Command Central</a>.
- The profile <a href="#Blind Command Central">Blind Command Central</a>
- controls the devices centrally. For that the attributes subDef, subTypeSet
- and gwCmd have to be set manually.
- </li>
- <br><br>
- <li>Extended Lighting Status (EEP A5-11-04)<br>
- [untested]<br>
- <ul>
- <li>on|off</li>
- <li>alarm: off|lamp_failure|internal_failure|external_periphery_failure</li>
- <li>blue: 0 ... 255</li>
- <li>current: <formula symbol>/<unit> (Sensor range: <formula symbol> = 0 ... 65535 <unit></li>
- <li>currentUnit: mA|A</li>
- <li>dim: 0 ... 255</li>
- <li>energy: <formula symbol>/<unit> (Sensor range: <formula symbol> = 0 ... 65535 <unit></li>
- <li>energyUnit: Wh|kWh|MWh|GWh</li>
- <li>green: 0 ... 255</li>
- <li>measuredValue: <formula symbol>/<unit> (Sensor range: <formula symbol> = 0 ... 65535 <unit></li>
- <li>measureUnit: unknown</li>
- <li>lampOpHours: t/h |unknown (Sensor range: t = 0 h ... 65535 h)</li>
- <li>power: <formula symbol>/<unit> (Sensor range: <formula symbol> = 0 ... 65535 <unit></li>
- <li>powerSwitch: on|off</li>
- <li>powerUnit: mW|W|kW|MW</li>
- <li>red: 0 ... 255</li>
- <li>rgb: RRGGBB (red (R), green (G) or blue (B) color component values: 00 ... FF)</li>
- <li>serviceOn: yes|no</li>
- <li>voltage: <formula symbol>/<unit> (Sensor range: <formula symbol> = 0 ... 65535 <unit></li>
- <li>voltageUnit: mV|V</li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be lightCtrlState.02 This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Dual Channel Switch Actuator (EEP A5-11-05)<br>
- [untested]<br>
- <ul>
- <li>1: on|off 2: on|off</li>
- <li>channel1: on|off</li>
- <li>channel2: on|off</li>
- <li>workingMode: 1 ... 4</li>
- <li>state: 1: on|off 2: on|off</li>
- </ul><br>
- The attr subType must be switch.05. This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Automated meter reading (AMR), Counter (EEP A5-12-00)<br>
- [Thermokon SR-MI-HS, untested]<br>
- <ul>
- <li>1/s</li>
- <li>currentValue<00 ... 15>: 1/s</li>
- <li>counter<00 ... 15>: 0 ... 16777215</li>
- <li>state: 1/s</li>
- </ul><br>
- The attr subType must be autoMeterReading.00. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Automated meter reading (AMR), Electricity (EEP A5-12-01)<br>
- [Eltako FSS12, DSZ14DRS, DSZ14WDRS, Thermokon SR-MI-HS, untested]<br>
- [Eltako FWZ12-16A tested]<br>
- <ul>
- <li>P/W</li>
- <li>power: P/W</li>
- <li>energy<0 ... 15>: E/kWh</li>
- <li>currentTariff: 0 ... 15</li>
- <li>serialNumber: S-<nnnnnn></li>
- <li>state: P/W</li>
- </ul><br>
- The attr subType must be autoMeterReading.01 and attr
- manufID must be 00D for Eltako Devices. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Automated meter reading (AMR), Gas, Water (EEP A5-12-02, A5-12-03)<br>
- [untested]<br>
- <ul>
- <li>Vs/l</li>
- <li>flowrate: Vs/l</li>
- <li>consumption<0 ... 15>: V/m3</li>
- <li>currentTariff: 0 ... 15</li>
- <li>state: Vs/l</li>
- </ul><br>
- The attr subType must be autoMeterReading.02|autoMeterReading.03.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Automated meter reading (AMR), Temperatur, Load (EEP A5-12-04)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C W: m/g B: full|ok|low|empty</li>
- <li>battery: full|ok|low|empty</li>
- <li>temperature: t/°C (Sensor Range: t = -40 °C ... 40 °C)</li>
- <li>weight: m/g</li>
- <li>state: T: t/°C W: m/g B: full|ok|low|empty</li>
- </ul><br>
- The attr subType must be autoMeterReading.04.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Automated meter reading (AMR), Temperatur, Container Sensor (EEP A5-12-05)<br>
- [untested]<br>
- <ul>
- <li>T: t/°C L: <location0 ... location9> B: full|ok|low|empty</li>
- <li>amount: 0 ... 10</li>
- <li>battery: full|ok|low|empty</li>
- <li>location<0 ... 9>: possessed|not_possessed</li>
- <li>temperature: t/°C (Sensor Range: t = -40 °C ... 40 °C)</li>
- <li>state: T: t/°C L: <location0 ... location9> B: full|ok|low|empty</li>
- </ul><br>
- The attr subType must be autoMeterReading.05.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Automated meter reading (AMR), Current Meter 16 Channels (EEP A5-12-10)<br>
- [untested]<br>
- <ul>
- <li>I/mA</li>
- <li>current<00 ... 15>: I/mA (Sensor Range: I = 0 mA ... 16777215 mA)</li>
- <li>electricChange<00 ... 15>: Q/Ah (Sensor Range: Q = 0 Ah ... 16777215 Ah)</li>
- <li>currentTariff: 00 ... 15</li>
- <li>state: I/mA</li>
- </ul><br>
- The attr subType must be autoMeterReading.10. This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Environmental Applications<br>
- Weather Station (EEP A5-13-01)<br>
- Sun Intensity (EEP A5-13-02)<br>
- [Eltako FWS61]<br>
- <ul>
- <li>T: t/°C B: E/lx W: Vs/m IR: yes|no</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 999 lx)</li>
- <li>dayNight: day|night</li>
- <li>hemisphere: north|south</li>
- <li>isRaining: yes|no</li>
- <li>sunEast: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
- <li>sunSouth: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
- <li>sunWest: E/lx (Sensor Range: E = 1 lx ... 150 klx)</li>
- <li>temperature: t/°C (Sensor Range: t = -40 °C ... 80 °C)</li>
- <li>windSpeed: Vs/m (Sensor Range: V = 0 m/s ... 70 m/s)</li>
- <li>state:T: t/°C B: E/lx W: Vs/m IR: yes|no</li>
- </ul><br>
- Brightness is the strength of the dawn light. SunEast,
- sunSouth and sunWest are the solar radiation from the respective
- compass direction. IsRaining is the rain indicator.<br>
- The attr subType must be environmentApp and attr manufID must be 00D
- for Eltako Devices. This is done if the device was created by
- autocreate.<br>
- The Eltako Weather Station FWS61 supports not the day/night indicator
- (dayNight).<br>
- </li>
- <br><br>
- <li>Environmental Applications<br>
- Data Exchange (EEP A5-13-03)<br>
- Time and Day Exchange (EEP A5-13-04)<br>
- Direction Exchange (EEP A5-13-05)<br>
- Geographic Exchange (EEP A5-13-06)<br>
- <ul>
- <li>azimuth: α/° (Sensor Range: α = 0 ° ... 359 °)</li>
- <li>date: JJJJ-MM-DD</li>
- <li>elevation: β/° (Sensor Range: β = -90 ° ... 90 °)</li>
- <li>latitude: φ/° (Sensor Range: φ = -90 ° ... 90 °)</li>
- <li>longitude: λ/° (Sensor Range: λ = -180 ° ... 180 °)</li>
- <li>time: hh:mm:ss [AM|PM]</li>
- <li>timeSource: GPS|RTC</li>
- <li>weekday: Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday</li>
- </ul><br>
- The attr subType must be environmentApp. This is done if the device was created by
- autocreate.
- </li>
- <br><br>
- <li>Environmental Applications<br>
- Sun Position and Radiation (EEP A5-13-10)<br>
- [untested]<br>
- <ul>
- <li>SRA: E m2/W SNA: α/° SNE: β/°</li>
- <li>dayNight: day|night</li>
- <li>solarRadiation: E m2/W (Sensor Range: E = 0 W/m2 ... 2000 W/m2)</li>
- <li>sunAzimuth: α/° (Sensor Range: α = -90 ° ... 90 °)</li>
- <li>sunElevation: β/° (Sensor Range: β = 0 ° ... 90 °)</li>
- <li>state:SRA: E m2/W SNA: α/° SNE: β/°</li>
- </ul><br>
- The attr subType must be environmentApp. This is done if the device was created by
- autocreate.
- </li>
- <br><br>
- <li>Wind Sensor (EEP A5-13-07)<br>
- [Hideki, untested]<br>
- <ul>
- <li>Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
- <li>battery: ok|low</li>
- <li>windSpeedAverage: Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
- <li>windSpeedDirection: NNE|NE|ENE|E|ESE|SE|SSE|S|SSW|SW|WSW|W|WNW|NW|NNW|N</li>
- <li>windSpeedMax: Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
- <li>state:Vh/km (Sensor Range: V = 0 km/h ... 199.9 km/h)</li>
- </ul><br>
- The attr subType must be windSensor.01. This is done if the device was created by
- autocreate.<br>
- </li>
- <br><br>
- <li>Rain Sensor (EEP A5-13-08)<br>
- [Hideki, untested]<br>
- <ul>
- <li>H/mm</li>
- <li>battery: ok|low</li>
- <li>rain: H/mm</li>
- <li>state:H/mm</li>
- </ul><br>
- The amount of rainfall is calculated at intervals of 183 s.<br>
- The attr subType must be rainSensor.01. This is done if the device was created by
- autocreate.<br>
- </li>
- <br><br>
- <li>Multi-Func Sensor (EEP A5-14-01 ... A5-14-06)<br>
- [untested]<br>
- <ul>
- <li>C: open|closed V: on|off E: E/lx U: U/V</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx, over range)</li>
- <li>contact: open|closed</li>
- <li>errorCode: 251 ... 255</li>
- <li>vibration: on|off</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>state: C: open|closed V: on|off E: E/lx U: U/V</li>
- </ul><br>
- The attr subType must be multiFuncSensor. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Dual Door Contact (EEP A5-14-07, A5-14-08)<br>
- [untested]<br>
- <ul>
- <li>C: open|closed B: unlocked|locked V: on|off U: U/V</li>
- <li>alarm: dead_sensor</li>
- <li>block: unlocked|locked</li>
- <li>contact: open|closed</li>
- <li>vibration: on|off</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>state: C: open|closed B: unlocked|locked V: on|off U: U/V</li>
- </ul><br>
- The attr subType must be doorContact. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Window/Door Contact (EEP A5-14-09, A5-14-0A)<br>
- [untested]<br>
- <ul>
- <li>W: open|tilt|closed B: unlocked|locked V: on|off U: U/V</li>
- <li>alarm: dead_sensor</li>
- <li>vibration: on|off</li>
- <li>voltage: U/V (Sensor Range: U = 0 V ... 5.0 V)</li>
- <li>window: open|tilt|closed</li>
- <li>state: W: open|tilt|closed V: on|off U: U/V</li>
- </ul><br>
- The attr subType must be windowContact. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Battery Powered Actuator (EEP A5-20-01)<br>
- [Kieback&Peter MD15-FTL-xx]<br>
- <ul>
- <li>T: t/°C SPT: t/°C SP: setpoint/%</li>
- <li>actuatorState: obstructed|ok</li>
- <li>alarm: no_response_from_actuator</li>
- <li>battery: ok|low</li>
- <li>cover: open|closed</li>
- <li>delta: <floating-point number></li>
- <li>energyInput: enabled|disabled</li>
- <li>energyStorage: charged|empty</li>
- <li>maintenanceMode: off|runInit|valveClosed|valveOpend:runInit</li>
- <li>operationMode: off|setpoint|setpointTemp</li>
- <li>p_d: <floating-point number></li>
- <li>p_i: <floating-point number></li>
- <li>p_p: <floating-point number></li>
- <li>pidAlarm: actuator_in_errorPos|dead_sensor|no_temperature_value|setpoint_device_missing</li>
- <li>pidState: alarm|idle|processing|start|stop|</li>
- <li>roomTemp: t/°C</li>
- <li>selfCtl: on|off</li>
- <li>setpoint: setpoint/%</li>
- <li>setpointSet: setpoint/%</li>
- <li>setpointCalc: setpoint/%</li>
- <li>setpointTemp: t/°C</li>
- <li>setpointTempSet: t/°C</li>
- <li>teach: <result of teach procedure></li>
- <li>temperature: t/°C</li>
- <li>waitingCmds: no_change|runInit|setpoint|setpointTemp|valveCloses|valveOpens</li>
- <li>wakeUpCycle: t/s</li>
- <li>window: open|closed</li>
- <li>state: T: t/°C SPT: t/°C SP: setpoint/%</li>
- </ul><br>
- The internal temperature sensor (roomTemp) of the Micropelt iTRV is not suitable as
- a room thermostat.<br>
- The attr subType must be hvac.01. This is done if the device was created by
- autocreate.
- </li>
- <br><br>
- <li>Heating Radiator Actuating Drive (EEP A5-20-04)<br>
- [Holter SmartDrive MX]<br>
- <ul>
- <li>T: t/°C SPT: t/°C SP: setpoint/%</li>
- <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>
- <li>battery: ok|empty</li>
- <li>blockKey: yes|no</li>
- <li>delta: <floating-point number></li>
- <li>feedTemp: t/°C</li>
- <li>maintenanceMode: off|runInit|valveClosed|valveOpend:runInit</li>
- <li>measurementState: active|inactive</li>
- <li>operationMode: off|setpoint|setpointTemp</li>
- <li>p_d: <floating-point number></li>
- <li>p_i: <floating-point number></li>
- <li>p_p: <floating-point number></li>
- <li>pidAlarm: actuator_in_errorPos|dead_sensor|no_temperature_value|setpoint_device_missing</li>
- <li>pidState: alarm|idle|processing|start|stop|</li>
- <li>roomTemp: t/°C</li>
- <li>setpoint: setpoint/%</li>
- <li>setpointSet: setpoint/%</li>
- <li>setpointCalc: setpoint/%</li>
- <li>setpointTemp: t/°C</li>
- <li>setpointTempSet: t/°C</li>
- <li>teach: <result of teach procedure></li>
- <li>temperature: t/°C</li>
- <li>waitingCmds: no_change|runInit|setpoint|setpointTemp|valveCloses|valveOpens</li>
- <li>state: T: t/°C SPT: t/°C SP: setpoint/%</li>
- </ul><br>
- The attr subType must be hvac.04. This is done if the device was created by
- autocreate.
- </li>
- <br><br>
- <li>Generic HVAC Interface (EEP A5-20-10)<br>
- [IntesisBox PA-AC-ENO-1i]<br>
- <ul>
- <li>on|off</li>
- <li>ctrl: auto|0...100</li>
- <li>fanSpeed: auto|1...14</li>
- <li>occupancy: occupied|off|standby|unoccupied</li>
- <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>
- <li>vanePosition: auto|horizontal|position_2|position_3|position_4|vertical|swing|vertical_swing|horizontal_swing|hor_vert_swing|stop_swing</li>
- <li>powerSwitch: on|off</li>
- <li>teach: <result of teach procedure></li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be hvac.10. This is done if the device was created by
- autocreate.
- </li>
- <br><br>
- <li>Generic HVAC Interface - Error Control (EEP A5-20-11)<br>
- [IntesisBox PA-AC-ENO-1i]<br>
- <ul>
- <li>error|ok</li>
- <li>alarm: error|ok</li>
- <li>errorCode: 0...65535</li>
- <li>externalDisable: disable|enable</li>
- <li>keyCardDisable: disable|enable</li>
- <li>otherDisable: disable|enable</li>
- <li>powerSwitch: on|off</li>
- <li>remoteCtrl: disable|enable</li>
- <li>teach: <result of teach procedure></li>
- <li>window: closed|opened</li>
- <li>windowDisable: disable|enable</li>
- <li>state: error|ok</li>
- </ul><br>
- The attr subType must be hvac.11. This is done if the device was created by
- autocreate.
- </li>
- <br><br>
- <li>Digital Input (EEP A5-30-01, A5-30-02)<br>
- [Thermokon SR65 DI, untested]<br>
- <ul>
- <li>open|closed</li>
- <li>battery: ok|low (only EEP A5-30-01)</li>
- <li>contact: open|closed</li>
- <li>teach: <result of teach procedure></li>
- <li>state: open|closed</li>
- </ul><br>
- The attr subType must be digitalInput.01 or digitalInput.02. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Digital Input (EEP A5-30-03)<br>
- 4 digital Inputs, Wake, Temperature [untested]<br>
- <ul>
- <li>T: t/°C I: 0|1 0|1 0|1 0|1 W: 0|1</li>
- <li>in0: 0|1</li>
- <li>in1: 0|1</li>
- <li>in2: 0|1</li>
- <li>in3: 0|1</li>
- <li>teach: <result of teach procedure></li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>wake: high|low</li>
- <li>state: T: t/°C I: 0|1 0|1 0|1 0|1 W: high|low</li>
- </ul><br>
- The attr subType must be digitalInput.03. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Digital Input (EEP A5-30-04)<br>
- 3 digital Inputs, 1 digital Input 8 bits [untested]<br>
- <ul>
- <li>0|1 0|1 0|1 0...255</li>
- <li>in0: 0|1</li>
- <li>in1: 0|1</li>
- <li>in2: 0|1</li>
- <li>in3: 0...255</li>
- <li>teach: <result of teach procedure></li>
- <li>state: 0|1 0|1 0|1 0...255</li>
- </ul><br>
- The attr subType must be digitalInput.04. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Digital Input, single input contact, retransmission, battery monitor (EEP A5-30-05)<br>
- [untested]<br>
- <ul>
- <li>error|event|heartbeat</li>
- <li>battery: U/V (Range: U = 0 V ... 3.3 V</li>
- <li>signalIdx: 0 ... 127</li>
- <li>teach: <result of teach procedure></li>
- <li>telegramType: event|heartbeat</li>
- <li>state: error|event|heartbeat</li>
- </ul><br>
- The attr subType must be digitalInput.05. This is done if the device was
- created by autocreate.
- </li>
- <li>Energy management, demand response (EEP A5-37-01)<br>
- <br>
- <ul>
- <li>on|off|waiting_for_start|waiting_for_stop</li>
- <li>level: 0...15</li>
- <li>powerUsage: powerUsage/%</li>
- <li>powerUsageLevel: max|min</li>
- <li>powerUsageScale: rel|max</li>
- <li>randomEnd: yes|no</li>
- <li>randomStart: yes|no</li>
- <li>setpoint: 0...255</li>
- <li>teach: <result of teach procedure></li>
- <li>timeout: yyyy-mm-dd hh:mm:ss</li>
- <li>state: on|off|waiting_for_start|waiting_for_stop</li>
- </ul><br>
- The attr subType must be energyManagement.01. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Switching<br>
- [Eltako FLC61, FSA12, FSR14]<br>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>executeTime: t/s (Sensor Range: t = 0.1 s ... 6553.5 s or 0 if no time specified)</li>
- <li>executeType: duration|delay</li>
- <li>block: lock|unlock</li>
- <li>teach: <result of teach procedure></li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be gateway and gwCmd must be switching. This is done if the device was
- created by autocreate.<br>
- For Eltako devices attributes must be set manually. Eltako devices only send on/off.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Dimming<br>
- [Eltako FUD14, FUD61, FUD70, FSG14, ...]<br>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>block: lock|unlock</li>
- <li>dim: dim/% (Sensor Range: dim = 0 % ... 100 %)</li>
- <li>dimValueLast: dim/%<br>
- Last value received from the bidirectional dimmer.</li>
- <li>dimValueStored: dim/%<br>
- Last value saved by <code>set <name> dim <value></code>.</li>
- <li>rampTime: t/s (Sensor Range: t = 1 s ... 255 s or 0 if no time specified,
- for Eltako: t = 1 = fast dimming ... 255 = slow dimming or 0 = dimming speed on the dimmer used)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be gateway, gwCmd must be dimming and attr manufID must be 00D
- for Eltako Devices. This is done if the device was created by autocreate.<br>
- For Eltako devices attributes must be set manually. Eltako devices only send on/off and dim.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Setpoint shift<br>
- [untested]<br>
- <ul>
- <li>1/K</li>
- <li>setpointShift: 1/K (Sensor Range: T = -12.7 K ... 12.8 K)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: 1/K</li>
- </ul><br>
- The attr subType must be gateway, gwCmd must be setpointShift.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Basic Setpoint<br>
- [untested]<br>
- <ul>
- <li>t/°C</li>
- <li>setpoint: t/°C (Sensor Range: t = 0 °C ... 51.2 °C)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: t/°C</li>
- </ul><br>
- The attr subType must be gateway, gwCmd must be setpointBasic.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Control variable<br>
- [untested]<br>
- <ul>
- <li>auto|heating|cooling|off</li>
- <li>controlVar: cvov (Sensor Range: cvov = 0 % ... 100 %)</li>
- <li>controllerMode: auto|heating|cooling|off</li>
- <li>controllerState: auto|override</li>
- <li>energyHoldOff: normal|holdoff</li>
- <li>presence: present|absent|standby</li>
- <li>teach: <result of teach procedure></li>
- <li>state: auto|heating|cooling|off</li>
- </ul><br>
- The attr subType must be gateway, gwCmd must be controlVar.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Gateway (EEP A5-38-08)<br>
- Fan stage<br>
- [untested]<br>
- <ul>
- <li>0 ... 3|auto</li>
- <li>teach: <result of teach procedure></li>
- <li>state: 0 ... 3|auto</li>
- </ul><br>
- The attr subType must be gateway, gwCmd must be fanStage.
- This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Extended Lighting Control (EEP A5-38-09)<br>
- [untested]<br>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>block: unlock|on|off|local</li>
- <li>blue: <blue channel value> (Range: blue = 0 ... 255)</li>
- <li>dimMax: <maximum dimming value> (Range: dim = 0 ... 255)</li>
- <li>dimMin: <minimum dimming value> (Range: dim = 0 ... 255)</li>
- <li>green: <green channel value> (Range: green = 0 ... 255)</li>
- <li>rampTime: t/s (Range: t = 0 s ... 65535 s)</li>
- <li>red: <red channel value> (Range: red = 0 ... 255)</li>
- <li>rgb: RRGGBB (red (R), green (G) or blue (B) color component values: 00 ... FF)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: on|off</li>
- </ul><br>
- Another readings, see subtype lightCtrlState.02.<br>
- The attr subType or subTypSet must be lightCtrl.01. This is done if the device was created by autocreate.<br>
- The subType is associated with the subtype lightCtrlState.02.
- </li>
- <br><br>
- <li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
- Wireless Analog Input Module<br>
- [Thermokon SR65 3AI, untested]<br>
- <ul>
- <li>I1: U/V I2: U/V I3: U/V</li>
- <li>input1: U/V (Sensor Range: U = 0 V ... 10 V)</li>
- <li>input2: U/V (Sensor Range: U = 0 V ... 10 V)</li>
- <li>input3: U/V (Sensor Range: U = 0 V ... 10 V)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: I1: U/V I2: U/V I3: U/V</li>
- </ul><br>
- The attr subType must be manufProfile and attr manufID must be 002
- for Thermokon Devices. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
- Thermostat Actuator<br>
- [AWAG omnio UPH230/1x]<br>
- <ul>
- <li>on|off</li>
- <li>emergencyMode<channel>: on|off</li>
- <li>nightReduction<channel>: on|off</li>
- <li>setpointTemp<channel>: t/°C</li>
- <li>teach: <result of teach procedure></li>
- <li>temperature<channel>: t/°C</li>
- <li>window<channel>: on|off</li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be manufProfile and attr manufID must be 005
- for AWAG omnio Devices. This is done if the device was created by autocreate.
- </li>
- <br><br>
- <li>Manufacturer Specific Applications (EEP A5-3F-7F)<br><br>
- Shutter (EEP F6-02-01 ... F6-02-02)<br>
- [Eltako FSB12, FSB14, FSB61, FSB70]<br>
- <ul>
- <li>open|open_ack<br>
- The status of the device will become "open" after the TOP endpoint is
- reached, or it has finished an "opens" or "position 0" command.</li>
- <li>closed<br>
- The status of the device will become "closed" if the BOTTOM endpoint is
- reached</li>
- <li>stop<br>
- The status of the device become "stop" if stop command is sent.</li>
- <li>not_reached<br>
- The status of the device become "not_reached" between one of the endpoints.</li>
- <li>anglePos: α/° (Sensor Range: α = -180 ° ... 180 °)</li>
- <li>endPosition: open|open_ack|closed|not_reached|not_available</li>
- <li>position: pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: open|open_ack|closed|not_reached|stop|teach</li>
- </ul><br>
- The values of the reading position and anglePos are updated automatically,
- if the command position is sent or the reading state was changed
- manually to open or closed.<br>
- Set attr subType file, attr manufID to 00D and attr model to
- Eltako_FSB14|FSB61|FSB70 manually.
- </li>
- <br><br>
- <li>Electronic switches and dimmers with Energy Measurement and Local Control (D2-01-00 - D2-01-12)<br>
- [Telefunken Funktionsstecker, PEHA Easyclick, AWAG Elektrotechnik AG Omnio UPS 230/xx,UPD 230/xx]<br>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>autoOffTime<1...29|All|Input>: 1/s</li>
- <li>channel<0...29|All|Input>: on|off</li>
- <li>delayOffTime<1...29|All|Input>: 1/s</li>
- <li>dayNight: day|night</li>
- <li>defaultState: on|off|last</li>
- <li>devTemp: t/°C|invalid</li>
- <li>devTempState: ok|max|warning</li>
- <li>dim<0...29|Input>: dim/% (Sensor Range: dim = 0 % ... 100 %)</li>
- <li>energy<channel>: E/[Ws|Wh|KWh]</li>
- <li>energyUnit<channel>: Ws|Wh|KWh</li>
- <li>error<channel>: ok|warning|failure|not_supported</li>
- <li>extSwitchMode<1...29|All|Input>: unavailable|switch|pushbutton|auto</li>
- <li>extSwitchType<1...29|All|Input>: toggle|direction</li>
- <li>firmwareVersion: [000000 ... FFFFFF]</li>
- <li>loadClassification: no</li>
- <li>localControl<channel>: enabled|disabled</li>
- <li>loadLink: connected|disconnected</li>
- <li>loadOperation: 3-wire</li>
- <li>loadState: on|off</li>
- <li>measurementMode: energy|power</li>
- <li>measurementReport: auto|query</li>
- <li>measurementReset: not_active|trigger</li>
- <li>measurementDelta: E/[Ws|Wh|KWh|W|KW]</li>
- <li>measurementUnit: Ws|Wh|KWh|W|KW</li>
- <li>overCurrentOff<channel>: executed|ready</li>
- <li>overCurrentShutdown<channel>: off|restart</li>
- <li>overCurrentShutdownReset<channel>: not_active|trigger</li>
- <li>power<channel>: P/[W|KW]</li>
- <li>powerFailure<channel>: enabled|disabled</li>
- <li>powerFailureDetection<channel>: detected|not_detected</li>
- <li>powerUnit<channel>: W|KW</li>
- <li>rampTime<1...3l>: 1/s</li>
- <li>responseTimeMax: 1/s</li>
- <li>responseTimeMin: 1/s</li>
- <li>roomCtrlMode: off|comfort|comfort-1|comfort-2|economy|buildingProtection</li>
- <li>serialNumber: [00000000 ... FFFFFFFF]</li>
- <li>taughtInDevID<00...23>: [00000001 ... FFFFFFFE]</li>
- <li>taughtInDevNum: [0 ... 23]</li>
- <li>teach: <result of teach procedure></li>
- <li>teachInDev: enabled|disabled</li>
- <li>state: on|off</li>
- </ul>
- <br>
- The attr subType must be actuator.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Blind Control for Position and Angle (D2-05-00)<br>
- [AWAG Elektrotechnik AG OMNIO UPJ 230/12]<br>
- <ul>
- <li>open<br>
- The status of the device will become "open" after the TOP endpoint is
- reached, or it has finished an "opens" or "position 0" command.</li>
- <li>closed<br>
- The status of the device will become "closed" if the BOTTOM endpoint is
- reached</li>
- <li>stop<br>
- The status of the device become "stop" if stop command is sent.</li>
- <li>not_reached<br>
- The status of the device become "not_reached" between one of the endpoints.</li>
- <li>pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
- <li>anglePos<channel>: α/% (Sensor Range: α = 0 % ... 100 %)</li>
- <li>block<channel>: unlock|lock|alarm</li>
- <li>endPosition<channel>: open|closed|not_reached|unknown</li>
- <li>position<channel>: unknown|pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: open|closed|in_motion|stopped|pos/% (Sensor Range: pos = 0 % ... 100 %)</li>
- </ul>
- <br>
- The attr subType must be blindsCtrl.00 or blindsCtrl.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Multisensor Window Handle (D2-06-01)<br>
- [Soda GmbH]<br>
- <ul>
- <li>T: t/°C H: -|rH/% E: -|E/lx M: off|on|invalid|not_supported|unknown</li>
- <li>alarms: <alarms> (Range: alarms = 00000000 ... FFFFFFFF)</li>
- <li>battery: ok|low</li>
- <li>batteryLowClick: enabled|disabled</li>
- <li>burglaryAlarm: off|on|invalid|not_supported|unknown</li>
- <li>handle: up|down|left|right|invalid|not_supported|unknown</li>
- <li>blinkInterval: t/s|unknown (Range: t = 3 s ... 255 s)</li>
- <li>blinkIntervalSet: t/s|unknown (Range: t = 3 s ... 255 s)</li>
- <li>brightness: E/lx|over_range|invalid|not_supported|unknown (Sensor Range: E = 0 lx ... 60000 lx)</li>
- <li>buttonLeft: pressed|released|invalid|not_supported|unknown</li>
- <li>buttonLeftPresses: <buttonLeftPresses> (Range: buttonLeftPresses = 00000000 ... FFFFFFFF)</li>
- <li>buttonRight: pressed|released|invalid|not_supported|unknown</li>
- <li>buttonRightPresses: <buttonRightPresses> (Range: buttonRightPresses = 00000000 ... FFFFFFFF)</li>
- <li>energyStorage: 1/%|unknown</li>
- <li>handleClosedClick: enabled|disabled</li>
- <li>handleMoveClosed: <handleMoveClosed> (Range: handleMoveClosed = 00000000 ... FFFFFFFF)</li>
- <li>handleMoveOpend: <handleMoveOpend> (Range: handleMoveOpend = 00000000 ... FFFFFFFF)</li>
- <li>handleMoveTilted: <handleMoveTilted> (Range: handleMoveTilted = 00000000 ... FFFFFFFF)</li>
- <li>humidity: rH/%|invalid|not_supported|unknown</li>
- <li>motion: off|on|invalid|not_supported|unknown</li>
- <li>powerOns: <powerOns> (Range: powerOns = 00000000 ... FFFFFFFF)</li>
- <li>presence: absent|present|invalid|not_supported|unknown</li>
- <li>protectionAlarm: off|on|invalid|not_supported|unknown</li>
- <li>temperature: t/°C|invalid|not_supported|unknown (Sensor Range: t = -20 °C ... 60 °C)</li>
- <li>updateInterval: t/s|unknown (Range: t = 5 s ... 65535 s)</li>
- <li>updateIntervalSet: t/s|unknown (Range: t = 5 s ... 65535 s)</li>
- <li>waitingCmds: <integer number></li>
- <li>window: undef|not_tilted|tilted|invalid|not_supported|unknown</li>
- <li>windowTilts: <windowTilts> (Range: windowTilts = 00000000 ... FFFFFFFF)</li>
- <li>state: T: t/°C H: -|rH/% E: -|E/lx M: off|on|invalid|not_supported|unknown</li>
- </ul><br>
- The attr subType must be multisensor.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Room Control Panels (D2-10-00 - D2-10-02)<br>
- [Kieback & Peter RBW322-FTL]<br>
- <ul>
- <li>T: t/°C H: -|rH/% F: 0 ... 100/% SPT: t/°C O: -|absent|present M: -|on|off</li>
- <li>battery: ok|low|empty|-</li>
- <li>cooling: auto|on|off|-</li>
- <li>customWarning[1|2]: on|off</li>
- <li>fanSpeed: 0 ... 100/%</li>
- <li>fanSpeedMode: central|local</li>
- <li>heating: auto|on|off|-</li>
- <li>humidity: -|rH/%</li>
- <li>moldWarning: on|off</li>
- <li>motion: on|off|-</li>
- <li>occupancy: -|absent|present</li>
- <li>roomCtrlMode: buildingProtection|comfort|economy|preComfort</li>
- <li>setpointBuildingProtectionTemp: -|t/°C (Range: t = 0 °C ... 40 °C)</li>
- <li>setpointComfortTemp: -|t/°C (Range: t = 0 °C ... 40 °C)</li>
- <li>setpointEconomyTemp: -|t/°C (Range: t = 0 °C ... 40 °C)</li>
- <li>setpointPreComfortTemp: -|t/°C (Range: t = 0 °C ... 40 °C)</li>
- <li>setpointTemp: t/°C (Range: t = 0 °C ... 40 °C)</li>
- <li>solarPowered: yes|no</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>window: closed|open</li>
- <li>state: T: t/°C H: -|rH/% F: 0 ... 100/% SPT: t/°C O: -|absent|present M: -|on|off</li>
- </ul><br>
- The attr subType must be roomCtrlPanel.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Room Control Panels (D2-11-01 - D2-11-08)<br>
- [Thermokon EasySens SR06 LCD-2T/-2T rh -4T/-4T rh]<br>
- <ul>
- <li>T: t/°C H: rH/% SPT: t/°C F: auto|off|1|2|3</li>
- <li>cooling: on|off</li>
- <li>fanSpeed: auto|off|1|2|3</li>
- <li>heating: on|off</li>
- <li>humidity: rH/%</li>
- <li>occupancy: occupied|unoccupied</li>
- <li>setpointBase: t/°C (Range: t = 15 °C ... 30 °C)</li>
- <li>setpointShift: t/K (Range: t = -10 K ... 10 K)</li>
- <li>setpointShiftMax: t/K (Range: t = 0 K ... 10 K)</li>
- <li>setpointTemp: t/°C (Range: t = 5 °C ... 40 °C)</li>
- <li>setpointType: setpointTemp|setpointShift</li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>trigger: heartbeat|sensor|input</li>
- <li>window: closed|open</li>
- <li>state: T: t/°C H: rH/% SPT: t/°C F: auto|off|1|2|3</li>
- </ul><br>
- The attr subType must be roomCtrlPanel.01. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired by Smart Ack,
- see <a href="#EnOcean_smartAck">SmartAck Learning</a>.
- </li>
- <br><br>
- <li>Fan Control (D2-20-00 - D2-20-02)<br>
- [Maico ECA x RC/RCH, ER 100 RC, untested]<br>
- <ul>
- <li>on|off|not_supported</li>
- <li>fanSpeed: 0 ... 100/%</li>
- <li>error: ok|air_filter|hardware|not_supported</li>
- <li>humidity: rH/%|not_supported</li>
- <li>humidityCtrl: disabled|enabled|not_supported</li>
- <li>roomSize: 0...350/m<sup>2</sup>|max</li>
- <li>roomSizeRef: unsed|not_used|not_supported</li>
- <li>setpointTemp: t/°C (Range: t = 0 °C ... 40 °C)</li>
- <li>teach: <result of teach procedure></li>
- <li>temperature: t/°C (Sensor Range: t = 0 °C ... 40 °C)</li>
- <li>state: on|off|not_supported</li>
- </ul><br>
- The attr subType must be fanCtrl.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>AC Current Clamp (D2-32-00 - D2-32-02)<br>
- [untested]<br>
- <ul>
- <li>I1: I/A I2: I/A I3: I/A</li>
- <li>current1: I/A (Range: I = 0 A ... 4095 A)</li>
- <li>current2: I/A (Range: I = 0 A ... 4095 A)</li>
- <li>current3: I/A (Range: I = 0 A ... 4095 A)</li>
- <li>teach: <result of teach procedure></li>
- <li>state: I1: I/A I2: I/A I3: I/A</li>
- </ul><br>
- The attr subType must be currentClamp.00|currentClamp.01|currentClamp.02. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>LED Controller Status (EEP D2-40-00 - D2-40-01)<br>
- [untested]<br>
- <ul>
- <li>on|off</li>
- <li>blue: 0 % ... 100 %</li>
- <li>daylightHarvesting: on|off</li>
- <li>demandResp: on|off</li>
- <li>dim: 0 % ... 100 %</li>
- <li>green: 0 % ... 100 %</li>
- <li>occupany: unoccupied|occupied|unknown</li>
- <li>powerSwitch: on|off</li>
- <li>red: 0 % ... 100 %</li>
- <li>rgb: RRGGBB (red (R), green (G) or blue (B) color component values: 00 ... FF)</li>
- <li>teach: <result of teach procedure></li>
- <li>telegramType: event|heartbeat</li>
- <li>state: on|off</li>
- </ul><br>
- The attr subType must be ledCtrlState.00|ledCtrlState.01 This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Heat Recovery Ventilation (D2-50-00 - D2-50-11)<br>
- [untested]<br>
- <ul>
- <li>off|1...4|auto|demand|supplyAir|exhaustAir</li>
- <li>airQualidity1: 1/%</li>
- <li>airQualidity2: 1/%</li>
- <li>airQualidityThreshold: default|1/%</li>
- <li>CO2Threshold: default|1/%</li>
- <li>coolingProtection: on|off</li>
- <li>defrost: on|off</li>
- <li>deviceMode: master|slave</li>
- <li>drainHeater: on|off</li>
- <li>exhaustAirFlap: closed|opend</li>
- <li>exhaustAirFlow: h/m3 (Sensor Range: Q = 0 m3/h ... 1023 m3/h)</li>
- <li>exhaustFanSpeed: min (Sensor Range: n = 0 / min ... 4095 / min)</li>
- <li>exhaustTemp: t/°C (Sensor Range: t = -63 °C ... 63 °C)</li>
- <li>fault: bbbbbbbb bbbbbbbb bbbbbbbb bbbbbbbb (b = 0|1)</li>
- <li>filterMaintenance: required|not_required</li>
- <li>fireplaceSafetyMode: disabled|enabled</li>
- <li>heatExchangerBypass: closed|opend</li>
- <li>humidityThreshold: default|rH/%</li>
- <li>info: bbbbbbbb bbbbbbbb (b = 0|1)</li>
- <li>input: bbbbbbbb bbbbbbbb (b = 0|1)</li>
- <li>operationHours: [0 ... 589815]</li>
- <li>output: bbbbbbbb bbbbbbbb (b = 0|1)</li>
- <li>outdoorAirHeater: on|off</li>
- <li>outdoorTemp: t/°C (Sensor Range: t = -63 °C ... 63 °C)</li>
- <li>roomTemp: t/°C (Sensor Range: t = -63 °C ... 63 °C)</li>
- <li>roomTempCtrl: on|off</li>
- <li>roomTempSet: default|t/°C (Sensor Range: t = -63 °C ... 63 °C)</li>
- <li>supplyAirFlow: h/m3 (Sensor Range: Q = 0 m3/h ... 1023 m3/h)</li>
- <li>supplyAirFlap: closed|opend</li>
- <li>supplyAirHeater: on|off</li>
- <li>supplyFanSpeed: min (Sensor Range: n = 0 / min ... 4095 / min)</li>
- <li>supplyTemp: t/°C (Sensor Range: t = -63 °C ... 63 °C)</li>
- <li>SWVersion: [0 ... 4095]</li>
- <li>timerMode: on|off</li>
- <li>weeklyTimer: on|off</li>
- <li>state: off|1...4|auto|demand|supplyAir|exhaustAir</li>
- </ul><br>
- The attr subType must be heatRecovery.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Valve Control (EEP D2-A0-01)<br>
- <ul>
- <li>opens</li>
- <li>open</li>
- <li>closes</li>
- <li>closed</li>
- <li>teach: <result of teach procedure></li>
- <li>state: opens|open|closes|closed|teachIn|teachOut</li>
- </ul><br>
- The attr subType must be valveCtrl.00. This is done if the device was
- created by autocreate. To control the device, it must be bidirectional paired,
- see <a href="#EnOcean_teach-in">Bidirectional Teach-In / Teach-Out</a>.
- </li>
- <br><br>
- <li>Liquid Leakage Sensor (EEP D2-B0-51)<br>
- [untested]<br>
- <ul>
- <li>dry</li>
- <li>wet</li>
- <li>state: dry|wet</li>
- </ul><br>
- The attr subType must be liquidLeakage.51. This is done if the device was
- created by autocreate.
- </li>
- <br><br>
- <li>Generic Profiles<br>
- <ul>
- <li><00...64>-<channel name>: <value></li>
- <li><00...64>-<channel name>Unit: <value></li>
- <li><00...64>-<channel name>ValueType: value|setpointAbs|setpointRel</li>
- <li><00...64>-<channel name>ChannelType: teachIn|data|flag|enum</li>
- <li>teach: <result of teach procedure></li>
- </ul><br>
- The attr subType must be genericProfile. This is done if the device was
- created by autocreate. If the profile in slave mode is operated, especially the channel
- definition in the gpDef attributes must be entered manually.
- </li>
- <br><br>
- <li>RAW Command<br>
- <ul>
- <li>RORG: 1BS|4BS|ENC|MCS|RPS|SEC|STE|UTE|VLD</li>
- <li>dataSent: data (Range: 1 Byte hex ... 512 Byte hex)</li>
- <li>statusSent: status (Range: 0x00 ... 0xFF)</li>
- <li>state: RORG: rorg DATA: data STATUS: status ODATA: odata</li>
- </ul><br>
- With the help of this command data messages in hexadecimal format can be sent and received.
- The telegram types (RORG) 1BS and RPS are always received protocol-specific.
- For further information, see
- <a href="http://www.enocean-alliance.org/eep/">EnOcean Equipment Profiles (EEP)</a>.
- <br>
- Set attr subType to raw manually.
- </li>
- <br><br>
- <li>Light and Presence Sensor<br>
- [Omnio Ratio eagle-PM101]<br>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>brightness: E/lx (Sensor Range: E = 0 lx ... 1000 lx)</li>
- <li>channel1: on|off<br>
- Motion message in depending on the brightness threshold</li>
- <li>channel2: on|off<br>
- Motion message</li>
- <li>motion: on|off<br>
- Channel 2</li>
- <li>state: on|off<br>
- Channel 2</li>
- </ul><br>
- The sensor also sends switching commands (RORG F6) with the SenderID-1.<br>
- Set attr subType to PM101 manually. Automatic teach-in is not possible,
- since no EEP and manufacturer ID are sent.
- </li>
- <br><br>
- <li>Radio Link Test<br>
- <ul>
- <li>standby|active|stopped</li>
- <li>msgLost: msgLost/%</li>
- <li>rssiMasterAvg: LP/dBm</li>
- <li>state: standby|active|stopped<br></li>
- </ul><br>
- The attr subType must be readioLinkTest. This is done if the device was
- created by autocreate or manually by <code>define <name> EnOcean A5-3F-00</code><br>.
- </li>
- </ul>
- </ul>
- <p><a name="FBAHA"></a>
- <h3>FBAHA</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FBAHA'>DE</a>]</div>
- <ul>
- <br>Note: Fritz!OS 6.90 and later does not offer the AHA service needed by
- this module. Use the successor FBAHAHTTP instead of this module.<br>
- This module connects to the AHA server (AVM Home Automation) on a FRITZ!Box.
- It serves as the "physical" counterpart to the <a href="#FBDECT">FBDECT</a>
- devices. Note: you have to enable the access to this feature in the FRITZ!Box
- frontend first.
- <br><br>
- <a name="FBAHAdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FBAHA <device></code>
- <br>
- <br>
- <device> is either a <host>:<port> combination, where
- <host> is normally the address of the FRITZ!Box running the AHA server
- (fritz.box or localhost), and <port> 2002, or
- UNIX:SEQPACKET:/var/tmp/me_avm_home_external.ctl, the latter only works on
- the fritz.box. With FRITZ!OS 5.50 the network port is available, on some
- Labor variants only the UNIX socket is available.<br>
- Example:
- <ul>
- <code>define fb1 FBAHA fritz.box:2002</code><br>
- <code>define fb1 FBAHA UNIX:SEQPACKET:/var/tmp/me_avm_home_external.ctl</code><br>
- </ul>
- </ul>
- <br>
- <a name="FBAHAset"></a>
- <b>Set</b>
- <ul>
- <li>createDevs<br>
- create a FHEM device for each DECT device found on the AHA-Host, see also
- get devList.
- </li>
- <li>reopen<br>
- close and reopen the connection to the AHA server. Debugging only.
- </li>
- <li>reregister<br>
- release existing registration handle, and get a new one. Debugging only.
- </li>
- </ul>
- <br>
- <a name="FBAHAget"></a>
- <b>Get</b>
- <ul>
- <li>devList<br>
- return a list of devices with short info.
- </li>
- </ul>
- <br>
- <a name="FBAHAattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#dummy">dummy</a></li>
- </ul>
- <br>
- <a name="FBAHAevents"></a>
- <b>Generated events:</b>
- <ul>
- <li>UNDEFINED FBDECT_$ahaName_${NR} FBDECT $id"
- </li>
- </ul>
- <br>
- As sometimes the FRITZ!Box reassigns the internal id's of the FBDECT devices,
- the FBAHA module compares upon connect/reconnect the stored names (FBNAME)
- with the current value. This feature will only work, if you assign each
- FBDECT device a unique Name in the FRITZ!Box, and excecute the FHEM "get
- FBDECTDEVICE devInfo" command, which saves the FBNAME reading.<br>
- </ul>
- <p><a name="FBAHAHTTP"></a>
- <h3>FBAHAHTTP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FBAHAHTTP'>DE</a>]</div>
- <ul>
- This module connects to the AHA server (AVM Home Automation) on a FRITZ!Box
- via HTTP, it is a successor/drop-in replacement for the FBAHA module. It is
- necessary, as the FBAHA interface is deprecated by AVM. Since the AHA HTTP
- interface do not offer any notification mechanism, the module is regularly
- polling the FRITZ!Box.<br>
- Important: For an existing installation with an FBAHA device, defining a
- new FBAHAHTTP device will change the IODev of all FBDECT devices from the
- old FBAHA to this FBAHAHTTP device, and it will delete the FBAHA device.<br>
- This module serves as the "physical" counterpart to the <a
- href="#FBDECT">FBDECT</a> devices. Note: you have to enable the access to
- Smart Home in the FRITZ!Box frontend for the fritzbox-user, and take care
- to configure the login in the home network with username AND password.
- <br><br>
- <a name="FBAHAHTTPdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FBAHAHTTP <hostname></code><br>
- <br>
- <hostnamedevice> is most probably fritz.box.
- Example:
- <ul>
- <code>define fb1 FBAHAHTTP fritz.box</code><br>
- </ul>
- Note: to specify HTTPS for the connection use https://fritz.box as
- hostname. To explicitly specify the port, postfix the hostname with :port,
- as in https://fritz.box:443
- </ul>
- <br>
- <a name="FBAHAHTTPset"></a>
- <b>Set</b>
- <ul>
- <li>password <password><br>
- This is the only way to set the password
- </li>
- <li>refreshstate<br>
- The state of all devices is polled every <polltime> seconds (default
- is 300). This command forces a state-refresh.
- </li>
- </ul>
- <br>
- <a name="FBAHAHTTPget"></a>
- <b>Get</b>
- <ul>N/A</ul>
- <br>
- <a name="FBAHAHTTPattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#async_delay">async_delay</a><br>
- additional delay inserted, when switching more than one device, default
- is 0.2 seconds. Note: even with async_delay 0 there will be a delay, as
- FHEM avoids sending commands in parallel, to avoid malfunctioning of the
- Fritz!BOX AHA server).
- </li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#fritzbox-user">fritzbox-user</a></li>
- <li><a name="polltime">polltime</a><br>
- measured in seconds, default is 300 i.e. 5 minutes
- </li>
- <li><a name="fbTimeout">fbTimeout</a><br>
- timeout for getting answer from the Fritz!BOX. Default is 4 (seconds).
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="FBDECT"></a>
- <h3>FBDECT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FBDECT'>DE</a>]</div>
- <ul>
- This module is used to control AVM FRITZ!DECT devices via FHEM, see also the
- <a href="#FBAHA">FBAHA</a> or <a href="#FBAHAHTTP">FBAHAHTTP</a> module for
- the base.
- <br><br>
- <a name="FBDECTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FBDECT [<FBAHAname>:]<id> props</code>
- <br>
- <br>
- Example:
- <ul>
- <code>define lamp FBDECT 16 switch,powerMeter</code><br>
- </ul>
- <b>Note:</b>Usually the device is created via
- <a href="#autocreate">autocreate</a>. If you rename the corresponding FBAHA
- device, take care to modify the FBDECT definitions, as it is not done
- automatically.
- </ul>
- <br>
- <br>
- <a name="FBDECTset"></a>
- <b>Set</b>
- <ul>
- <li>on/off<br>
- set the device on or off.
- </li>
- <li>desired-temp <value><br>
- set the desired temp on a Comet DECT (FBAHAHTTP IOdev only)
- </li>
- <li><a href="#setExtensions">set extensions</a> are supported.
- </li>
- <li>msgInterval <sec><br>
- Number of seconds between the sensor messages (FBAHA IODev only).
- </li>
- </ul>
- <br>
- <a name="FBDECTget"></a>
- <b>Get</b>
- <ul>
- <li>devInfo<br>
- report device information (FBAHA IODev only)
- </li>
- </ul>
- <br>
- <a name="FBDECTattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#model">model</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="FBDECTevents"></a>
- <b>Generated events:</b>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>set_on</li>
- <li>set_off</li>
- <li>current: $v A</li>
- <li>voltage: $v V</li>
- <li>power: $v W</li>
- <li>energy: $v Wh</li>
- <li>powerFactor: $v"</li>
- <li>temperature: $v C (measured)</li>
- <li>tempadjust: $v C</li>
- <li>options: uninitialized</li>
- <li>options: powerOnState:[on|off|last],lock:[none,webUi,remoteFb,button]</li>
- <li>control: disabled</li>
- <li>control: on power < $v delay:$d sec do:state [on|off]</li>
- <li>relaytimes: disabled</li>
- <li>relaytimes: HEX</li>
- </ul>
- </ul>
- <p><a name="FB_CALLLIST"></a>
- <h3>FB_CALLLIST</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FB_CALLLIST'>DE</a>]</div>
- <ul>
- The FB_CALLLIST module creates a call history list by processing events of a <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a> definition.
- It logs all calls and displays them in a historic table.
- <br><br>
- You need a defined FB_CALLMONITOR instance where you can attach FB_CALLLIST to process the call events.<br><br>
- 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>).
- <br><br>
- The icons have different colors.<br><br>
- <ul>
- <li><font color="blue"><b>blue</b></font> - incoming call (active or finished)</li>
- <li><font color="green"><b>green</b></font> - outgoing call (active or finished)</li>
- <li><font color="red"><b>red</b></font> - missed incoming call</li>
- </ul>
- <br>
- If you use no icons (see <a href="#FB_CALLLIST_show-icons">show-icons</a>) the following states will be shown:<br><br>
- <ul>
- <li><code><b><= ((o))</b></code></td><td> - outgoing call (ringing) - icon: <code><b>outgoing.ring</b></code></li>
- <li><code><b>=> ((o))</b></code></td><td> - incoming call (ringing) - icon: <code><b>incoming.ring</b></code></li>
- <br>
- <li><code><b><= [=]</b></code></td><td> - outgoing call (currently active) - icon: <code><b>outgoing.connected</b></code></li>
- <li><code><b>=> [=]</b></code></td><td> - incoming call (currently active) - icon: <code><b>incoming.connected</b></code></li>
- <br>
- <li><code><b><= X</b></code></td><td> - outgoing unsuccessful call (nobody picked up) - icon: <code><b>outgoing.missed</b></code></li>
- <li><code><b>=> X</b></code></td><td> - incoming unsuccessful call (missed call) - icon: <code><b>incoming.missed</b></code></li>
- <br>
- <li><code><b>=> O_O</b></code></td><td> - incoming finished call recorded on answering machine - icon: <code><b>incoming.tam</b></code></li>
- <br>
- <li><code><b><=</b></code></td><td> - outgoing finished call - icon: <code><b>outgoing.done</b></code></li>
- <li><code><b>=></b></code></td><td> - incoming finished call - icon: <code><b>incoming.done</b></code></li>
- </ul>
- <br>
- The default icon mapping for all states can be changed by the corresponding attribute.
- <br>
- <br>
- <a name="FB_CALLLIST_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FB_CALLLIST <FB_CALLMONITOR name></code><br>
- </ul>
- <br>
- <a name="FB_CALLLIST_set"></a>
- <b>Set</b><br>
- <ul>
- <li><b>clear</b> - clears the list completely</li>
- </ul>
- <br>
- <a name="FB_CALLLIST_get"></a>
- <b>Get</b><br>
- <ul>
- No get commands implemented.
- </ul>
- <br>
- <a name="FB_CALLLIST_attr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <li><a name="FB_CALLLIST_answMachine-is-missed-call">answMachine-is-missed-call</a> 0,1</li>
- 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".
- <br><br>
- Possible values: 0 => disabled, 1 => enabled (answering machine calls will be treated as "missed call").<br>
- Default Value is 0 (disabled)<br><br>
- <li><a name="FB_CALLLIST_connection-mapping">connection-mapping</a> <hash></li>
- Defines a custom mapping of connection names to custom values. The mapping is performed in a hash table.<br><br>
- e.g.<br>
- <ul>
- <code>attr <name> connection-mapping {'DECT_1' => 'Mobile Kitchen', 'FON1' => 'Fax'}</code>
- </ul><br>
- The mapped name will be displayed in the table instead of the original value from FB_CALLMONITOR.
- <br><br>
- Default Value: <i>empty</i> (no mapping is performed)
- <br><br>
- <li><a name="FB_CALLLIST_create-readings">create-readings</a> 0,1</li>
- 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>
- Possible values: 0 => no readings will be created, 1 => readings and events will be created.<br>
- Default Value is 0 (no readings will be created)<br><br>
- <li><a name="FB_CALLLIST_disable">disable</a> 0,1,2,3</li>
- Optional attribute to disable the call list. When disabled, call events will not be processed and the list wouldn't be updated accordingly. Depending on the value, the call list can
- <br><br>
- Possible values:<ul>
- <li>0 => FB_CALLLIST is activated, proccess events and updates the table</li>
- <li>1 => Events will NOT be processed. table will NOT be updated (stays as it is)</li>
- <li>2 => Events will NOT be processed. table just shows "disabled" (no items)</li>
- <li>3 => Events will NOT be processed. table will NOT be shown entirely</li>
- </ul><br>
- Default Value is 0 (activated)<br><br>
- <li><a name="FB_CALLLIST_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH:MM...</li>
- Optional attribute to disable event processing and updates of the call list during a specific time interval. The attribute contains a space separated list of HH:MM tupels.
- If the current time is between any of these time specifications, the callist will be disabled and no longer updated.
- Instead of HH:MM you can also specify HH or HH:MM:SS.
- <br><br>To specify an interval spawning midnight, you have to specify two intervals, e.g.:
- <pre>23:00-24:00 00:00-01:00</pre>
- Default Value is <i>empty</i> (no intervals defined, calllist is always active)<br><br>
- <li><a name="FB_CALLLIST_processEventsWhileDisabled">processEventsWhileDisabled</a> 0,1</li>
- If enabled, events where still be processed, even FB_CALLLIST is disabled (see <a href="#FB_CALLLIST_disable">disable</a> and <a href="#FB_CALLLIST_disabledForIntervals">disabledForIntervals</a>). So after re-enabling FB_CALLLIST, all calls during disabled state are completely available.
- <br><br>
- Possible values: 0 => no event processing when FB_CALLIST is disabled, 1 => events are still processed, even FB_CALLLIST is disabled<br>
- Default Value is 0 (no event processing when disabled)<br><br>
- <li><a name="FB_CALLLIST_expire-calls-after">expire-calls-after</a> <time frame></li>
- 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.
- <br><br>A time frame can be specified as follows:
- <ul>
- <li>as minutes: <code>1 minute</code> or <code>30 minutes</code></li>
- <li>as hours: <code>1 hour</code> or <code>12 hours</code></li>
- <li>as days: <code>1 day</code> or <code>5 days</code></li>
- <li>as months: <code>1 month</code> or <code>6 months</code> (in this case one month is equal to 30 days)</li>
- <li>as years: <code>1 year</code> or <code>2 years</code> (in this case one year is equal to 365 days)</li>
- </ul>
- <br>
- <b>IMPORTANT:</b> In this case, the ending time of each call is checked, not the beginning time.<br><br>
- 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>).
- The value <code>0</code> means no expiry of calls, so no calls will be deleted because of expiry.<br><br>
- Default Value is 0 (no calls will be deleted because of expiry)<br><br>
- <li><a name="FB_CALLLIST_external-mapping">external-mapping</a> <hash></li>
- Defines a custom mapping of external connection values (reading: external_connection) to custom values. The mapping is performed in a hash table.<br><br>
- e.g.<br>
- <ul>
- <code>attr <name> external-mapping {'ISDN' => 'Fixed Network', 'SIP0' => 'Operator A', 'SIP1' => 'Operator B'}</code>
- </ul><br>
- <li><a name="FB_CALLLIST_icon-mapping">icon-mapping</a> <hash></li>
- Defines a custom mapping of call states to custom icons. The mapping is performed in a hash table.<br><br>
- e.g.<br>
- <ul>
- <code>attr <name> icon-mapping {'incoming.connected' => 'phone_ring_in@yellow', 'outgoing.missed' => 'phone_missed_out@red'}</code>
- </ul><br>
- 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>".
- <br><br>
- Possible values and their default icon are:<br><br>
- <ul>
- <li><b>incoming.ring</b> => phone_ring@blue</li>
- <li><b>outgoing.ring</b> => phone_ring@green</li>
- <li><b>incoming.connected</b> => phone_ring_in@blue</li>
- <li><b>outgoing.connected</b> => phone_ring_in@green</li>
- <li><b>incoming.missed</b> => phone_missed_in@red</li>
- <li><b>outgoing.missed</b> => phone_missed_out@green</li>
- <li><b>incoming.done</b> => phone_call_end_in@blue</li>
- <li><b>outgoing.done</b> => phone_call_end_out@green</li>
- <li><b>incoming.tam</b> => phone_answering@blue</li>
- </ul>
- <br><br>
- Default Value: <i>empty</i> (no mapping is performed)<br><br>
- <li><a name="FB_CALLLIST_internal-number-filter">internal-number-filter</a> <hash></li>
- This attribute accepts a list of comma seperated internal numbers for
- filtering incoming or outgoing calls by a specific list of internal numbers
- or a hash for filtering and mapping numbers to text.<br>
- <br>
- e.g.<br>
- <ul>
- <code>attr <name> internal-number-filter 304050,304060<br><br>
- attr <name> internal-number-filter {'304050' => 'business', '304060' => 'private'}</code>
- </ul>
- <br><b>Important:</b> Depending on your provider, the internal number can contain a location area code.
- The internal-number-filter must contain the same number as it is displayed in the call list.
- This can be with or without location area code depending on your provider.
- <br><br>
- 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.
- <br><br>
- Default Value: <i>empty</i> (all internal numbers should be used, no exclusions and no mapping is performed)
- <br><br>
- <li><a name="FB_CALLLIST_language">language</a> en,de</li>
- 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>
- Possible values: en => English , de => German<br>
- Default Value is en (English)<br><br>
- <li><a name="FB_CALLLIST_list-type">list-type</a> all,incoming,outgoing,missed-calls,completed,active</li>
- Defines what type of calls should be displayed in the list.<br><br>
- Default Value is "all"<br><br>
- <li><a name="FB_CALLLIST_list-order">list-order</a> descending,ascending</li>
- Defines whether the newest call should be on top of the list (descending) or on the bottom of the list (ascending).<br><br>
- Default Value is descending (first call at top of the list)<br><br>
- <li><a name="FB_CALLLIST_no-heading">no-heading</a> 0,1</li>
- If activated the headline with a link to the detail page of the current definition will be hidden.<br><br>
- Possible values: 0 => the heading line will be shown , 1 => the heading line will not be shown<br>
- Default Value is 0 (the heading line will be shown)<br><br>
- <li><a name="FB_CALLLIST_no-table-header">no-table-header</a> 0,1</li>
- If activated the table header containing the name of each column for the current definition will be hidden.<br><br>
- Possible values: 0 => the table header will be shown , 1 => the table header will not be shown<br>
- Default Value is 0 (the table header will be shown)<br><br>
- <li><a name="FB_CALLLIST_number-cmd">number-cmd</a> <command></li>
- 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: { ... } ).
- The placeholder <code>$NUMBER</code> will be replaced with the current external number of each row.
- <br><br>
- This can be used for example to initiate a call to this number.
- e.g.:<br><br>
- <ul>
- <li><code>set FRITZBOX call $NUMBER</code></li>
- <li><code>{dialNumber("$NUMBER")}</code></li>
- </ul>
- <br>
- If not set, no link will be shown in the list.<br><br>
- <li><a name="FB_CALLLIST_number-of-calls">number-of-calls</a> 1..40</li>
- Defines the maximum number of displayed call entries in the list.<br><br>
- Default Value is 5 calls<br><br>
- <li><a name="FB_CALLLIST_show-icons">show-icons</a> 0,1</li>
- Normally the call state is shown with icons (used from the openautomation icon set).
- You need to have openautomation in your iconpath attribute of your appropriate FHEMWEB definition to use this icons.
- If you don't want to use icons you can deactivate them with this attribute.<br><br>
- Possible values: 0 => no icons , 1 => use icons<br>
- Default Value is 1 (use icons)<br><br>
- <li><a name="FB_CALLLIST_time-format-string">time-format-string</a> <string></li>
- Defines a format string which should be used to format the timestamp values.
- It contains several placeholders for different elements of a date/time.
- The possible values are standard POSIX strftime() values. Common placeholders are:<br><br>
- <ul>
- <li><code>%a</code> - The abbreviated weekday name</li>
- <li><code>%b</code> - The abbreviated month name</li>
- <li><code>%S</code> - The second as a decimal number</li>
- <li><code>%M</code> - The minutes as a decimal number</li>
- <li><code>%H</code> - The hours as a decimal number</li>
- <li><code>%d</code> - The day of the month as a decimal number</li>
- <li><code>%m</code> - The month as a decimal number</li>
- <li><code>%Y</code> - The year as a decimal number including the century.</li>
- </ul><br>
- There are further placeholders available.
- Please consult the manpage of <code>strftime()</code> or the documentation of your perl interpreter to find out more.
- <br><br>
- Default value is "%a, %d %b %Y %H:%M:%S" ( = "Sun, 07 Jun 2015 12:50:09")<br><br>
- <li><a name="FB_CALLLIST_visible-columns">visible-columns</a> row,state,timestamp,name,number,internal,external,connection,duration</li>
- Defines the visible columns, as well as the order in which these columns are displayed in the call list (from left to right).
- Not all columns must be displayed, you can select only a subset of columns which will be displayed.
- <br><br>
- The possible values represents the corresponding column.
- The column "row" represents the row number within the current list.
- <br><br>
- Possible values: a combination of <code>row,state,timestamp,name,number,internal,external,connection,duration</code><br>
- Default Value is "row,state,timestamp,name,number,internal,external,connection,duration" (show all columns)<br><br>
- </ul>
- <br>
- <a name="FB_CALLLIST_events"></a>
- <b>Generated Events:</b><br><br>
- <ul>
- 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>).
- </ul>
- </ul>
- <p><a name="FB_CALLMONITOR"></a>
- <h3>FB_CALLMONITOR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FB_CALLMONITOR'>DE</a>]</div>
- <ul>
- The FB_CALLMONITOR module connects to a AVM FritzBox Fon and listens for telephone
- <a href="#FB_CALLMONITOR_events">events</a> (Receiving incoming call, Making a call)
- <br><br>
- In order to use this module with fhem you <b>must</b> enable the Callmonitor feature via
- telephone shortcode.<br><br>
- <ul>
- <code>#96*5* - for activating<br>#96*4* - for deactivating</code>
- </ul>
-
- <br>
- Just dial the shortcode for activating on one of your phones, after 3 seconds just hang up. The feature is now activated.
- <br><br>
- After activating the Callmonitor-Support in your FritzBox, this module is able to
- generate an event for each external call. Internal calls were not be detected by the Callmonitor.
- <br><br>
- This module work with any FritzBox Fon model.
- <br><br>
-
- <a name="FB_CALLMONITOR_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FB_CALLMONITOR <ip-address>[:port]</code><br>
- <br>
- port is 1012 by default.
- <br>
- </ul>
- <br>
- <a name="FB_CALLMONITOR_set"></a>
- <b>Set</b>
- <ul>
- <li><b>reopen</b> - close and reopen the connection</li>
- <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>
- <li><b>rereadPhonebook</b> - Reloads the FritzBox phonebook (from given file, via telnet or directly if available)</li>
- <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>
- <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>
- </ul>
- <br>
- <a name="FB_CALLMONITOR_get"></a>
- <b>Get</b>
- <ul>
- <li><b>search <phone-number></b> - returns the name of the given number via reverse-search (internal phonebook, cache or internet lookup)</li>
- <li><b>showPhonebookIds</b> - returns a list of all available phonebooks on the FritzBox (not available when using telnet to retrieve remote phonebook)</li>
- <li><b>showPhonebookEntries</b> - returns a list of all currently known phonebook entries (only available when using phonebook funktionality)</li>
- <li><b>showCacheEntries</b> - returns a list of all currently known cache entries (only available when using reverse search caching funktionality)</li>
- <li><b>showTextfileEntries</b> - returns a list of all known entries from user given textfile (only available when using reverse search caching funktionality)</li>
- </ul>
- <br>
- <a name="FB_CALLMONITOR_attr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a> 0,1</li><br>
- <li><a name="FB_CALLMONITOR_disable">disable</a> 0,1</li>
- Optional attribute to disable the Callmonitor. When disabled, no phone events can be detected.
- <br><br>
- Possible values: 0 => Callmonitor is activated, 1 => Callmonitor is deactivated.<br>
- Default Value is 0 (activated)<br><br>
- <li><a name="FB_CALLMONITOR_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...</li>
- Optional attribute to disable FB_CALLMONITOR during specific time intervals. The attribute contains a space separated list of HH:MM tupels.
- If the current time is between any of these time specifications, no phone events will be processed.
- Instead of HH:MM you can also specify HH or HH:MM:SS.
- <br><br>To specify an interval spawning midnight, you have to specify two intervals, e.g.:
- <pre>23:00-24:00 00:00-01:00</pre>
- Default Value is <i>empty</i> (no intervals defined, FB_CALLMONITOR is always active)<br><br>
- <li><a name="FB_CALLMONITOR_answMachine-is-missed-call">answMachine-is-missed-call</a> 0,1</li>
- 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>).
- <br><br>
- Possible values: 0 => disabled, 1 => enabled (answering machine calls will be treated as "missed call").<br>
- Default Value is 0 (disabled)<br><br>
- <li><a name="FB_CALLMONITOR_reverse-search">reverse-search</a> (phonebook,textfile,dasoertliche.de,11880.com,search.ch,dasschnelle.at,herold.at)</li>
- Enables the reverse searching of the external number (at dial and call receiving).
- This attribute contains a comma separated list of providers which should be used to reverse search a name to a specific phone number.
- 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.
- <br><br>per default, reverse search is disabled.<br><br>
- <li><a name="FB_CALLMONITOR_reverse-search-cache">reverse-search-cache</a> 0,1</li>
- If this attribute is activated each reverse-search result from an internet provider is saved in an internal cache
- 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>
- Possible values: 0 => off , 1 => on<br>
- Default Value is 0 (off)<br><br>
- <li><a name="FB_CALLMONITOR_reverse-search-cache-file">reverse-search-cache-file</a> <file></li>
- Write the internal reverse-search-cache to the given file and use it next time FHEM starts.
- So all reverse search results are persistent written to disk and will be used instantly after FHEM starts.<br><br>
- <li><a name="FB_CALLMONITOR_reverse-search-text-file">reverse-search-text-file</a> <file></li>
- Define a custom list of numbers and their according names in a textfile. This file uses comma separated values per line in form of:
- <pre>
- <number1>,<name1>
- <number2>,<name2>
- ...
- <numberN>,<nameN>
- </pre>
- 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.
- <br><br>
- <li><a name="FB_CALLMONITOR_reverse-search-phonebook-file">reverse-search-phonebook-file</a> <file></li>
- 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.
- The phonebook file can be obtained by an export via FritzBox web UI<br><br>
- Default value is /var/flash/phonebook (phonebook filepath on FritzBox)<br><br>
- <li><a name="FB_CALLMONITOR_remove-leading-zero">remove-leading-zero</a> 0,1</li>
- If this attribute is activated, a leading zero will be removed from the external number (e.g. in telefon systems).<br><br>
- Possible values: 0 => off , 1 => on<br>
- Default Value is 0 (off)<br><br>
- <li><a name="FB_CALLMONITOR_unique-call-ids">unique-call-ids</a> 0,1</li>
- 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>
- Possible values: 0 => off , 1 => on<br>
- Default Value is 0 (off)<br><br>
- <li><a name="FB_CALLMONITOR_local-area-code">local-area-code</a> <number></li>
- Use the given local area code for reverse search in case of a local call (e.g. 0228 for Bonn, Germany)<br><br>
- <li><a name="FB_CALLMONITOR_country-code">country-code</a> <number></li>
- 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>
- Default Value is 0049 (Germany)<br><br>
- <li><a name="FB_CALLMONITOR_check-deflection">check-deflections</a> 0,1</li>
- 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>
- Possible values: 0 => off , 1 => on<br>
- Default Value is 0 (off)<br><br>
- <li><a name="FB_CALLMONITOR_fritzbox-remote-phonebook">fritzbox-remote-phonebook</a> 0,1</li>
- 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>
- Possible values: 0 => off , 1 => on (use remote connection to obtain FritzBox phonebook)<br>
- Default Value is 0 (off)<br><br>
- <li><a name="FB_CALLMONITOR_fritzbox-remote-phonebook-via">fritzbox-remote-phonebook-via</a> tr064,web,telnet</li>
- 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>
- Possible values: tr064,web,telnet<br>
- Default Value is tr064 (retrieve phonebooks via TR-064 interface)<br><br>
- <li><a name="FB_CALLMONITOR_fritzbox-remote-phonebook-exclude">fritzbox-remote-phonebook-exclude</a> <list></li>
- 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>
- Default Value: <i>empty</i> (all phonebooks should be used, no exclusions)<br><br>
- <li><a name="FB_CALLMONITOR_fritzbox-user">fritzbox-user</a> <username></li>
- 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>
- <li><a name="FB_CALLMONITOR_apiKeySearchCh">apiKeySearchCh</a> <API-Key></li>
- A private API key from <a href="https://tel.search.ch/api/getkey" target="_new">tel.search.ch</a> to perform a reverse search via search.ch (see attribute <a href=#FB_CALLMONITOR_reverse-search">reverse-search</a>). Without an API key, no reverse search via search.ch is not possible<br><br>
- </ul>
- <br>
-
- <a name="FB_CALLMONITOR_events"></a>
- <b>Generated Events:</b><br><br>
- <ul>
- <li><b>event</b> (call|ring|connect|disconnect) - which event in detail was triggerd</li>
- <li><b>direction</b> (incoming|outgoing) - the call direction in general (incoming or outgoing call)</li>
- <li><b>external_number</b> - The participants number which is calling (event: ring) or beeing called (event: call)</li>
- <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>
- <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>
- <li><b>internal_connection</b> - The internal connection (FON1, FON2, ISDN, DECT, ...) which is used to take or perform the call</li>
- <li><b>external_connection</b> - The external connection ("POTS" => fixed line, "SIPx" => VoIP account, "ISDN", "GSM" => mobile call via GSM/UMTS stick) which is used to take or perform the call</li>
- <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>
- <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>
- <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>
- </ul>
- </ul>
- <p><a name="FHEM2FHEM"></a>
- <h3>FHEM2FHEM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FHEM2FHEM'>DE</a>]</div>
- <ul>
- FHEM2FHEM is a helper module to connect separate FHEM installations.
- <br><br>
- <a name="FHEM2FHEMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FHEM2FHEM <host>[:<portnr>][:SSL]
- [LOG:regexp|RAW:devicename] {portpassword}
- </code>
- <br>
- <br>
- Connect to the <i>remote</i> FHEM on <host>. <portnr> is a telnet
- port on the remote FHEM, defaults to 7072. The optional :SSL suffix is
- needed, if the remote FHEM configured SSL for this telnet port. In this case
- the IO::Socket::SSL perl module must be installed for the local host too.<br>
- Note: if the remote FHEM is on a separate host, the telnet port on the remote
- FHEM musst be specified with the global option.<br>
- The next parameter specifies the connection
- type:
- <ul>
- <li>LOG<br>
- Using this type you will receive all events generated by the remote FHEM,
- just like when using the <a href="#inform">inform on</a> command, and you
- can use these events just like any local event for <a
- href="#FileLog">FileLog </a> or <a href="#notify">notify</a>.
- The regexp will prefilter the events distributed locally, for the syntax
- see the notify definition.<br>
- Drawbacks: the remote devices wont be created locally, so list wont
- show them and it is not possible to manipulate them from the local
- FHEM. It is possible to create a device with the same name on both FHEM
- instances, but if both of them receive the same event (e.g. because both
- of them have a CUL attached), then all associated FileLogs/notifys will be
- triggered twice.<br>
- If the remote device is created with the same name locally (e.g. as dummy),
- then the local readings are also updated.
- </li>
- <li>RAW<br>
- By using this type the local FHEM will receive raw events from the remote
- FHEM device <i>devicename</i>, just like if it would be attached to the
- local FHEM.
- Drawback: only devices using the Dispatch function (CUL, FHZ, CM11,
- SISPM, RFXCOM, TCM, TRX, TUL) generate raw messages, and you must create a
- FHEM2FHEM instance for each remote device.<br>
- <i>devicename</i> must exist on the local
- FHEM server too with the same name and same type as the remote device, but
- with the device-node "none", so it is only a dummy device.
- All necessary attributes (e.g. <a href="#rfmode">rfmode</a> if the remote
- CUL is in HomeMatic mode) must also be set for the local device.
- Do not reuse a real local device, else duplicate filtering (see dupTimeout)
- won't work correctly.
- </li>
- </ul>
- The last parameter specifies an optional portpassword, if the remote server
- activated <a href="#portpassword">portpassword</a>.
- <br>
- Examples:
- <ul>
- <code>define ds1 FHEM2FHEM 192.168.178.22:7072 LOG:.*</code><br>
- <br>
- <code>define RpiCUL CUL none 0000</code><br>
- <code>define ds2 FHEM2FHEM 192.168.178.22:7072 RAW:RpiCUL</code><br>
- and on the RPi (192.168.178.22):<br>
- <code>rename CUL_0 RpiCUL</code><br>
- </ul>
- </ul>
- <br>
- <a name="FHEM2FHEMset"></a>
- <b>Set </b>
- <ul>
- <li>reopen<br>
- Reopens the connection to the device and reinitializes it.</li><br>
- </ul>
- <a name="FHEM2FHEMget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="FHEM2FHEMattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a name="#eventOnly">eventOnly</a><br>
- if set, generate only events, do not set corresponding readings.
- This is a compatibility feature, available only for LOG-Mode.
- </li>
- <li><a name="#addStateEvent">addStateEvent</a><br>
- if set, state events are transmitted correctly. Notes: this is relevant
- only with LOG mode, setting it will generate an additional "reappeared"
- Log entry, and the remote FHEM must support inform onWithState (i.e. must
- be up to date).
- </li>
- <li><a name="#excludeEvents">excludeEvents <regexp></a>
- do not publish events matching <regexp>
- </li>
- </ul>
- </ul>
- <p><a name="FHEMWEB"></a>
- <h3>FHEMWEB</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FHEMWEB'>DE</a>]</div>
- <ul>
- FHEMWEB is the builtin web-frontend, it also implements a simple web
- server (optionally with Basic-Auth and HTTPS).
- <br> <br>
- <a name="FHEMWEBdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FHEMWEB <tcp-portnr> [global|IP]</code>
- <br><br>
- Enable the webfrontend on port <tcp-portnr>. If global is specified,
- then requests from all interfaces (not only localhost / 127.0.0.1) are
- serviced. If IP is specified, then FHEMWEB will only listen on this IP.<br>
- To enable listening on IPV6 see the comments <a href="#telnet">here</a>.
- <br>
- </ul>
- <br>
- <a name="FHEMWEBset"></a>
- <b>Set</b>
- <ul>
- <li>rereadicons<br>
- reads the names of the icons from the icon path. Use after adding or
- deleting icons.
- </li>
- <li>clearSvgCache<br>
- delete all files found in the www/SVGcache directory, which is used to
- cache SVG data, if the SVGcache attribute is set.
- </li>
- </ul>
- <br>
- <a name="FHEMWEBget"></a>
- <b>Get</b>
- <ul>
- <li>icon <logical icon><br>
- returns the absolute path to the logical icon. Example:
- <ul>
- <code>get myFHEMWEB icon FS20.on<br>
- /data/Homeautomation/fhem/FHEM/FS20.on.png
- </code>
- </ul>
- </li>
- <li>pathlist<br>
- return FHEMWEB specific directories, where files for given types are
- located
- <br><br>
- </ul>
- <a name="FHEMWEBattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="addHtmlTitle"></a>
- <li>addHtmlTitle<br>
- If set to 0, do not add a title Attribute to the set/get/attr detail
- widgets. This might be necessary for some screenreaders. Default is 1.
- </li><br>
- <li><a href="#addStateEvent">addStateEvent</a></li><br>
- <li>alias_<RoomName><br>
- If you define a userattr alias_<RoomName> and set this attribute
- for a device assgined to <RoomName>, then this value will be used
- when displaying <RoomName>.<br>
- Note: you can use the userattr alias_.* to allow all rooms, but in this
- case the attribute dropdown in the device detail view won't work for the
- alias_.* attributes.
- </li><br>
- <li><a href="#allowfrom">allowfrom</a></li>
- </li><br>
- <li>allowedCommands, basicAuth, basicAuthMsg<br>
- Please create these attributes for the corresponding <a
- href="#allowed">allowed</a> device, they are deprecated for the FHEMWEB
- instance from now on.
- </li><br>
- <li>allowedHttpMethods<br>
- FHEMWEB implements the GET, POST and OPTIONS HTTP methods. Some external
- devices require the HEAD method, which is not implemented correctly in
- FHEMWEB, as FHEMWEB always returns a body, which, according to the spec,
- is wrong. As in some cases this not a problem, enabling GET may work.
- To do this, set this attribute to GET|POST|HEAD, default ist GET|POST.
- OPTIONS is always enabled.
- </li><br>
- <a name="closeConn"></a>
- <li>closeConn<br>
- If set, a TCP Connection will only serve one HTTP request. Seems to
- solve problems on iOS9 for WebApp startup.
- </li><br>
- <a name="column"></a>
- <li>column<br>
- Allows to display more than one column per room overview, by specifying
- the groups for the columns. Example:<br>
- <ul><code>
- attr WEB column LivingRoom:FS20,notify|FHZ,notify DiningRoom:FS20|FHZ
- </code></ul>
- In this example in the LivingRoom the FS20 and the notify group is in
- the first column, the FHZ and the notify in the second.<br>
- Notes: some elements like SVG plots and readingsGroup can only be part of
- a column if they are part of a <a href="#group">group</a>.
- This attribute can be used to sort the groups in a room, just specify
- the groups in one column.
- Space in the room and group name has to be written as %20 for this
- attribute. Both the room name and the groups are regular expressions.
- </li>
- <br>
- <a name="confirmDelete"></a>
- <li>confirmDelete<br>
- confirm delete actions with a dialog. Default is 1, set it to 0 to
- disable the feature.
- </li>
- <br>
- <a name="confirmJSError"></a>
- <li>confirmJSError<br>
- JavaScript errors are reported in a dialog as default.
- Set this attribute to 0 to disable the reporting.
- </li>
- <br>
- <a name="CORS"></a>
- <li>CORS<br>
- If set to 1, FHEMWEB will supply a "Cross origin resource sharing"
- header, see the wikipedia for details.
- </li>
- <br>
- <a name="csrfToken"></a>
- <li>csrfToken<br>
- If set, FHEMWEB requires the value of this attribute as fwcsrf Parameter
- for each command. It is used as countermeasure for Cross Site Resource
- Forgery attacks. If the value is random, then a random number will be
- generated on each FHEMWEB start. If it is set to the literal string
- none, no token is expected. Default is random for featurelevel 5.8 and
- greater, and none for featurelevel below 5.8 </li><br>
- <a name="csrfTokenHTTPHeader"></a>
- <li>csrfTokenHTTPHeader<br>
- If set (default), FHEMWEB sends the token with the X-FHEM-csrfToken HTTP
- header, which is used by some clients. Set it to 0 to switch it off, as
- a measurre against shodan.io like FHEM-detection.</li><br>
- <a name="CssFiles"></a>
- <li>CssFiles<br>
- Space separated list of .css files to be included. The filenames
- are relative to the www directory. Example:
- <ul><code>
- attr WEB CssFiles pgm2/mystyle.css
- </code></ul>
- </li><br>
- <a name="Css"></a>
- <li>Css<br>
- CSS included in the header after the CssFiles section.
- </li><br>
- <a name="cmdIcon"></a>
- <li>cmdIcon<br>
- Space separated list of cmd:iconName pairs. If set, the webCmd text is
- replaced with the icon. An easy method to set this value is to use
- "Extend devStateIcon" in the detail-view, and copy its value.<br>
- Example:<ul>
- attr lamp cmdIcon on:control_centr_arrow_up off:control_centr_arrow_down
- </ul>
- </li><br>
- <a name="defaultRoom"></a>
- <li>defaultRoom<br>
- show the specified room if no room selected, e.g. on execution of some
- commands. If set hides the <a href="#motd">motd</a>. Example:<br>
- attr WEB defaultRoom Zentrale
- </li>
- <br>
- <a name="devStateIcon"></a>
- <li>devStateIcon<br>
- First form:<br>
- <ul>
- Space separated list of regexp:icon-name:cmd triples, icon-name and cmd
- may be empty.<br>
- If the state of the device matches regexp, then icon-name will be
- displayed as the status icon in the room, and (if specified) clicking
- on the icon executes cmd. If fhem cannot find icon-name, then the
- status text will be displayed.
- Example:<br>
- <ul>
- attr lamp devStateIcon on:closed off:open<br>
- attr lamp devStateIcon on::A0 off::AI<br>
- attr lamp devStateIcon .*:noIcon<br>
- </ul>
- Note: if the image is referencing an SVG icon, then you can use the
- @colorname suffix to color the image. E.g.:<br>
- <ul>
- attr Fax devStateIcon on:control_building_empty@red
- off:control_building_filled:278727
- </ul>
- If the cmd is noFhemwebLink, then no HTML-link will be generated, i.e.
- nothing will happen when clicking on the icon or text.
- </ul>
- Second form:<br>
- <ul>
- Perl code enclosed in {}. If the code returns undef, then the default
- icon is used, if it retuns a string enclosed in <>, then it is
- interpreted as an html string. Else the string is interpreted as a
- devStateIcon of the first fom, see above.
- Example:<br>
- {'<div
- style="width:32px;height:32px;background-color:green"></div>'}
- </ul>
- </li>
- <br>
- <a name="devStateStyle"></a>
- <li>devStateStyle<br>
- Specify an HTML style for the given device, e.g.:<br>
- <ul>
- attr sensor devStateStyle style="text-align:left;;font-weight:bold;;"<br>
- </ul>
- </li>
- <br>
- <li>deviceOverview<br>
- Configures if the device line from the room view (device icon, state
- icon and webCmds/cmdIcons) should also be shown in the device detail
- view. Can be set to always, onClick, iconOnly or never. Default is
- always.
- </li><br>
- <a name="editConfig"></a>
- <li>editConfig<br>
- If this FHEMWEB attribute is set to 1, then you will be able to edit
- the FHEM configuration file (fhem.cfg) in the "Edit files" section.
- After saving this file a rereadcfg is executed automatically, which has
- a lot of side effects.<br>
- </li><br>
- <a name="editFileList"></a>
- <li>editFileList<br>
- Specify the list of Files shown in "Edit Files" section. It is a
- newline separated list of triples, the first is the Title, the next is
- the directory to search for, the third the regular expression. Default
- is:
- <ul>
- <code>
- Own modules and helper files:$MW_dir:^(.*sh|[0-9][0-9].*Util.*pm|.*cfg|.*holiday|myUtilsTemplate.pm|.*layout)$<br>
- Gplot files:$FW_gplotdir:^.*gplot$<br>
- Styles:$FW_cssdir:^.*(css|svg)$<br>
- </code>
- </ul>
- NOTE: The directory spec is not flexible: all .js/.css/_defs.svg files
- come from www/pgm2 ($FW_cssdir), .gplot files from $FW_gplotdir
- (www/gplot), everything else from $MW_dir (FHEM).
- </li><br>
- <a name="endPlotNow"></a>
- <li>endPlotNow<br>
- If this FHEMWEB attribute is set to 1, then day and hour plots will
- end at current time. Else the whole day, the 6 hour period starting at
- 0, 6, 12 or 18 hour or the whole hour will be shown. This attribute
- is not used if the SVG has the attribute startDate defined.<br>
- </li><br>
- <a name="endPlotToday"></a>
- <li>endPlotToday<br>
- If this FHEMWEB attribute is set to 1, then week and month plots will
- end today. Else the current week or the current month will be shown.
- <br>
- </li><br>
- <a name="fwcompress"></a>
- <li>fwcompress<br>
- Enable compressing the HTML data (default is 1, i.e. yes, use 0 to switch it off).
- </li>
- <br>
- <a name="hiddengroup"></a>
- <li>hiddengroup<br>
- Comma separated list of groups to "hide", i.e. not to show in any room
- of this FHEMWEB instance.<br>
- Example: attr WEBtablet hiddengroup FileLog,dummy,at,notify
- </li>
- <br>
- <a name="hiddengroupRegexp"></a>
- <li>hiddengroupRegexp<br>
- One regexp for the same purpose as hiddengroup.
- </li>
- <br>
- <a name="hiddenroom"></a>
- <li>hiddenroom<br>
- Comma separated list of rooms to "hide", i.e. not to show. Special
- values are input, detail and save, in which case the input areas, link
- to the detailed views or save button is hidden (although each aspect
- still can be addressed through URL manipulation).<br>
- The list can also contain values from the additional "Howto/Wiki/FAQ"
- block.
- </li>
- <br>
- <a name="hiddenroomRegexp"></a>
- <li>hiddenroomRegexp<br>
- One regexp for the same purpose as hiddenroom. Example:
- <ul>
- attr WEB hiddenroomRegexp .*config
- </ul>
- Note: the special values input, detail and save cannot be specified
- with hiddenroomRegexp.
- </li>
- <br>
- <a name="HTTPS"></a>
- <li>HTTPS<br>
- Enable HTTPS connections. This feature requires the perl module
- IO::Socket::SSL, to be installed with cpan -i IO::Socket::SSL or
- apt-get install libio-socket-ssl-perl; OSX and the FritzBox-7390
- already have this module.<br>
- A local certificate has to be generated into a directory called certs,
- this directory <b>must</b> be in the <a href="#modpath">modpath</a>
- directory, at the same level as the FHEM directory.
- <ul>
- mkdir certs<br>
- cd certs<br>
- openssl req -new -x509 -nodes -out server-cert.pem -days 3650 -keyout server-key.pem
- </ul>
- <br>
- </li>
- <a name="icon"></a>
- <li>icon<br>
- Set the icon for a device in the room overview. There is an
- icon-chooser in FHEMWEB to ease this task. Setting icons for the room
- itself is indirect: there must exist an icon with the name
- ico<ROOMNAME>.png in the iconPath.
- </li>
- <br>
- <a name="iconPath"></a>
- <li>iconPath<br>
- colon separated list of directories where the icons are read from.
- The directories start in the fhem/www/images directory. The default is
- $styleSheetPrefix:default:fhemSVG:openautomation<br>
- Set it to fhemSVG:openautomation to get only SVG images.
- </li>
- <br>
- <a name="JavaScripts"></a>
- <li>JavaScripts<br>
- Space separated list of JavaScript files to be included. The filenames
- are relative to the www directory. For each file an additional
- user-settable FHEMWEB attribute will be created, to pass parameters to
- the script. The name of this additional attribute gets the Param
- suffix, directory and the fhem_ prefix will be deleted. Example:
- <ul><code>
- attr WEB JavaScripts codemirror/fhem_codemirror.js<br>
- attr WEB codemirrorParam { "theme":"blackboard", "lineNumbers":true }
- </code></ul>
- </li><br>
- <a name="longpoll"></a>
- <li>longpoll [0|1|websocket]<br>
- If activated, the browser is notifed when device states, readings or
- attributes are changed, a reload of the page is not necessary.
- Default is 1 (on), use 0 to deactivate it.<br>
- If websocket is specified, then this API is used to notify the browser,
- else HTTP longpoll. Note: some older browser do not implement websocket.
- </li>
- <br>
- <a name="longpollSVG"></a>
- <li>longpollSVG<br>
- Reloads an SVG weblink, if an event should modify its content. Since
- an exact determination of the affected events is too complicated, we
- need some help from the definition in the .gplot file: the filter used
- there (second parameter if the source is FileLog) must either contain
- only the deviceName or have the form deviceName.event or deviceName.*.
- This is always the case when using the <a href="#plotEditor">Plot
- editor</a>. The SVG will be reloaded for <b>any</b> event triggered by
- this deviceName. Default is off.
- </li>
- <br>
- <a name="mainInputLength"></a>
- <li>mainInputLength<br>
- length of the maininput text widget in characters (decimal number).
- </li>
- <br>
- <a name="menuEntries"></a>
- <li>menuEntries<br>
- Comma separated list of name,html-link pairs to display in the
- left-side list. Example:<br>
- attr WEB menuEntries fhem.de,http://fhem.de,culfw.de,http://culfw.de<br>
- attr WEB menuEntries
- AlarmOn,http://fhemhost:8083/fhem?cmd=set%20alarm%20on<br>
- </li>
- <br>
- <a name="nameDisplay"></a>
- <li>nameDisplay<br>
- The argument is perl code, which is executed for each single device in
- the room to determine the name displayed. $DEVICE is the name of the
- current device, and $ALIAS is the value of the alias attribute or the
- name of the device, if no alias is set. E.g. you can add a a global
- userattr named alias_hu for the Hungarian translation, and specify
- nameDisplay for the hungarian FHEMWEB instance as
- <ul>
- AttrVal($DEVICE, "alias_hu", $ALIAS)
- </ul>
- </li>
- <br>
- <a name="nrAxis"></a>
- <li>nrAxis<br>
- the number of axis for which space should be reserved on the left and
- right sides of a plot and optionaly how many axes should realy be used
- on each side, separated by comma: left,right[,useLeft,useRight]. You
- can set individual numbers by setting the nrAxis of the SVG. Default is
- 1,1.
- </li><br>
- <a name="ploteditor"></a>
- <li>ploteditor<br>
- Configures if the <a href="#plotEditor">Plot editor</a> should be shown
- in the SVG detail view.
- Can be set to always, onClick or never. Default is always.
- </li><br>
- <a name="plotEmbed"></a>
- <li>plotEmbed 0<br>
- SVG plots are rendered as part of <embed> tags, as in the past
- this was the only way to display SVG, and it allows to render them in
- parallel, see plotfork.
- Setting plotEmbed to 0 will render SVG in-place, but as a side-effect
- makes the plotfork attribute meaningless.<br>
- </li><br>
- <a name="plotfork"></a>
- <li>plotfork [<Δp>]<br>
- If set to a nonzero value, run part of the processing (e.g. <a
- href="#SVG">SVG</a> plot generation or <a href="#RSS">RSS</a> feeds) in
- parallel processes. Actually, child processes are forked whose
- priorities are the FHEM process' priority plus Δp.
- Higher values mean lower priority. e.g. use Δp= 10 to renice the
- child processes and provide more CPU power to the main FHEM process.
- Δp is optional and defaults to 0.<br>
- Note: do not use it
- on Windows and on systems with small memory footprint.
- </li><br>
- <a name="plotmode"></a>
- <li>plotmode<br>
- Specifies how to generate the plots:
- <ul>
- <li>SVG<br>
- The plots are created with the <a href="#SVG">SVG</a> module.
- This is the default.</li>
- <li>gnuplot-scroll<br>
- The plots are created with the gnuplot program. The gnuplot
- output terminal PNG is assumed. Scrolling to historical values
- is also possible, just like with SVG.</li>
- <li>gnuplot-scroll-svg<br>
- Like gnuplot-scroll, but the output terminal SVG is assumed.</li>
- </ul>
- </li><br>
- <a name="plotsize"></a>
- <li>plotsize<br>
- the default size of the plot, in pixels, separated by comma:
- width,height. You can set individual sizes by setting the plotsize of
- the SVG. Default is 800,160 for desktop, and 480,160 for
- smallscreen.
- </li><br>
- <a name="plotWeekStartDay"></a>
- <li>plotWeekStartDay<br>
- Start the week-zoom of the SVG plots with this day.
- 0 is Sunday, 1 is Monday, etc.<br>
- </li><br>
- <a name="redirectCmds"></a>
- <li>redirectCmds<br>
- Clear the browser URL window after issuing the command by redirecting
- the browser, as a reload for the same site might have unintended
- side-effects. Default is 1 (enabled). Disable it by setting this
- attribute to 0 if you want to study the command syntax, in order to
- communicate with FHEMWEB.
- </li>
- <br>
- <a name="refresh"></a>
- <li>refresh<br>
- If set, a http-equiv="refresh" entry will be genererated with the given
- argument (i.e. the browser will reload the page after the given
- seconds).
- </li><br>
- <a name="reverseLogs"></a>
- <li>reverseLogs<br>
- Display the lines from the logfile in a reversed order, newest on the
- top, so that you dont have to scroll down to look at the latest entries.
- Note: enabling this attribute will prevent FHEMWEB from streaming
- logfiles, resulting in a considerably increased memory consumption
- (about 6 times the size of the file on the disk).
- </li>
- <br>
- <a name="roomIcons"></a>
- <li>roomIcons<br>
- Space separated list of room:icon pairs, to override the default
- behaviour of showing an icon, if there is one with the name of
- "icoRoomName". This is the correct way to remove the icon for the room
- Everything, or to set one for rooms with / in the name (e.g.
- Anlagen/EDV). The first part is treated as regexp, so space is
- represented by a dot. Example:<br>
- attr WEB roomIcons Anlagen.EDV:icoEverything
- </li>
- <br>
- <a name="smallscreenCommands"></a>
- <li>smallscreenCommands<br>
- If set to 1, commands, slider and dropdown menues will appear in
- smallscreen landscape mode.
- </li><br>
- <a name="sortby"></a>
- <li>sortby<br>
- Take the value of this attribute when sorting the devices in the room
- overview instead of the alias, or if that is missing the devicename
- itself. If the sortby value is enclosed in {} than it is evaluated as a
- perl expression. $NAME is set to the device name.
- </li>
- <br>
- <a name="showUsedFiles"></a>
- <li>showUsedFiles<br>
- In the Edit files section, show only the used files.
- Note: currently this is only working for the "Gplot files" section.
- </li>
- <br>
- <a name="sortRooms"></a>
- <li>sortRooms<br>
- Space separated list of rooms to override the default sort order of the
- room links. As the rooms in this attribute are actually regexps, space
- in the roomname has to be specified as dot (.).
- Example:<br>
- attr WEB sortRooms DG OG EG Keller
- </li>
- <br>
-
- <li>sslVersion<br>
- See the global attribute sslVersion.
- </li><br>
- <a name="styleData"></a>
- <li>styleData<br>
- data-storage used by dynamic styles like f18
- </li><br>
- <a name="stylesheetPrefix"></a>
- <li>stylesheetPrefix<br>
- prefix for the files style.css, svg_style.css and svg_defs.svg. If the
- file with the prefix is missing, the default file (without prefix) will
- be used. These files have to be placed into the FHEM directory, and can
- be selected directly from the "Select style" FHEMWEB menu entry. Example:
- <ul>
- attr WEB stylesheetPrefix dark<br>
- <br>
- Referenced files:<br>
- <ul>
- darksvg_defs.svg<br>
- darksvg_style.css<br>
- darkstyle.css<br>
- </ul>
- <br>
- </ul>
- <b>Note:</b>if the argument contains the string smallscreen or touchpad,
- then FHEMWEB will optimize the layout/access for small screen size (i.e.
- smartphones) or touchpad devices (i.e. tablets)<br>
- The default configuration installs 3 FHEMWEB instances: port 8083 for
- desktop browsers, port 8084 for smallscreen, and 8085 for touchpad.<br>
- If touchpad or smallscreen is specified, then WebApp support is
- activated: After viewing the site on the iPhone or iPad in Safari, you
- can add a link to the home-screen to get full-screen support. Links are
- rendered differently in this mode to avoid switching back to the "normal"
- browser.
- </li>
- <br>
- <a name="SVGcache"></a>
- <li>SVGcache<br>
- if set, cache plots which won't change any more (the end-date is prior
- to the current timestamp). The files are written to the www/SVGcache
- directory. Default is off.<br>
- See also the clearSvgCache command for clearing the cache.
- </li><br>
- <a name="title"></a>
- <li>title<br>
- Sets the title of the page. If enclosed in {} the content is evaluated.
- </li><br>
- <a name="viewport"></a>
- <li>viewport<br>
- Sets the "viewport" attribute in the HTML header. This can for
- example be used to force the width of the page or disable zooming.<br>
- Example: attr WEB viewport
- width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no
- </li><br>
- <a name="webCmd"></a>
- <li>webCmd<br>
- Colon separated list of commands to be shown in the room overview for a
- certain device. Has no effect on smallscreen devices, see the
- devStateIcon command for an alternative.<br>
- Example:
- <ul>
- attr lamp webCmd on:off:on-for-timer 10<br>
- </ul>
- <br>
-
- The first specified command is looked up in the "set device ?" list
- (see the <a href="#setList">setList</a> attribute for dummy devices).
- If <b>there</b> it contains some known modifiers (colon, followed
- by a comma separated list), then a different widget will be displayed.
- See also the widgetOverride attribute below. Examples:
- <ul>
- define d1 dummy<br>
- attr d1 webCmd state<br>
- attr d1 readingList state<br>
- attr d1 setList state:on,off<br><br>
-
- define d2 dummy<br>
- attr d2 webCmd state<br>
- attr d2 readingList state<br>
- attr d2 setList state:slider,0,1,10<br><br>
-
- define d3 dummy<br>
- attr d3 webCmd state<br>
- attr d3 readingList state<br>
- attr d3 setList state:time<br>
- </ul>
- If the command is state, then the value will be used as a command.<br>
- Note: this is an attribute for the displayed device, not for the FHEMWEB
- instance.
- </li>
- <br>
- <a name="webCmdLabel"></a>
- <li>webCmdLabel<br>
- Colon separated list of labels, used to prefix each webCmd. The number
- of labels must exactly match the number of webCmds. To implement
- multiple rows, insert a return character after the text and before the
- colon.</li></br>
- <a name="webname"></a>
- <li>webname<br>
- Path after the http://hostname:port/ specification. Defaults to fhem,
- i.e the default http address is http://localhost:8083/fhem
- </li><br>
- <a name="widgetOverride"></a>
- <li>widgetOverride<br>
- Space separated list of name:modifier pairs, to override the widget
- for a set/get/attribute specified by the module author.
- Following is the list of known modifiers:
- <ul>
- <!-- INSERT_DOC_FROM: www/pgm2/fhemweb.*.js -->
- <li>knob,min:1,max:100,... - shows the jQuery knob widget. The parameters
- are a comma separated list of key:value pairs, where key does not have to
- contain the "data-" prefix. For details see the jQuery-knob
- definition.<br> Example:
- attr dimmer widgetOverride dim:knob,min:1,max:100,step:1,linecap:round
- </li>
- <p><p> <li>uzsuToggle,state1,state2 - dispay a toggle button with two possible
- states. the first is the active state.</li>
- <li>uzsuSelect,val1,val2,... - display a button bar with a button per value
- from which multiple values can be selected. the result is comma
- separated.</li>
- <li>uzsuSelectRadio,val1,val2,... - display a button bar with a button per
- value from which only one value can be selected.</li>
- <li>uzsuDropDown,val1,val2,... - display a dropdown with all values.</li>
- <li>uzsuTimerEntry[,modifier2] - combine uzsuSelect, uzsuDropDown and
- uzsuToggle into a single line display to select a timer entry. an
- optional modifier can be given to select the switching value. see
- examples below. the result is a comma separated list of days followed by
- a time, an enabled indicator and the switching value all separated by a|.
- eg: Mo,Di,Sa,So|00:00|enabled|19.5</li>
- <li>uzsu[,modifier2] - combine multiple uzsuTimerEntry widets to allow the
- setting of multiple switching times an optional modifier can be given to
- select the switching value. see examples below. the result is a space
- separeted list of uzsuTimerEntry results. Examples:
- <ul>
- attr myToggle widgetOverride state:uzsuToggle,123,xyz<br>
- attr mySelect widgetOverride state:uzsuSelect,abc,123,456,xyz<br>
- attr myTemp widgetOverride state:uzsuDropDown,18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23<br>
- attr myTimerEntry widgetOverride state:uzsuTimerEntry<br>
- attr myTimer widgetOverride state:uzsu<br>
- <br>
- the following gives some examples of for the modifier2 parameter of uzsuTimerEntry and uzsu to
- combine the setting of a timer with another widget to select the switching value :
- <pre>
- ... widgetOverride state:uzsu,slider,0,5,100 -> a slider
- ... widgetOverride state:uzsu,uzsuToggle,off,on -> a on/off button
- ... widgetOverride state:uzsu,uzsuDropDown,18,19,20,21,22,23 -> a dropDownMenue
- ... widgetOverride state:uzsu,knob,min:18,max:24,step:0.5,linecap:round,fgColor:red -> a knob widget
- ... widgetOverride state:uzsu,colorpicker -> a colorpicker
- ... widgetOverride state:uzsu,colorpicker,CT,2700,50,5000 -> a colortemperature selector
- </pre>
- </ul>
- </li>
- <p> <li>colorpicker,RGB - create an RGB colorpicker</li>
- <li>colorpicker,HSV - create an HSV colorpicker to set an rgb value</li>
- <li>colorpicker,HSVp - create an HSV popup colorpicker to set an rgb value</li>
- <li>colorpicker,HSV,<hue>,<min>,<step>,<max>,<sat>,<min>,<step>,<max>,<bri>,<min>,<step>,<max>
- - create an HSV colorpicker that uses <hue>, <sat> and <bri> as commands
- to set the color. can also be used with HSVp to create a popup colorpicker<br>
- 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>
- <li>colorpicker,CT,<min>,<step>,<max> - create a color temperature colorpicker</li>
- <li>colorpicker,BRI,<min>,<step>,<max> - create a brightness colorpicker</li>
- <li>colorpicker,HUE,<min>,<step>,<max> - create a hue colorpicker</li>
- please see the fhem wiki <a href='https://wiki.fhem.de/wiki/Color#Colorpicker'>Color</a> section for example screenshots.<br><br>
- <p><br>
- <u>To the icon.* widgets listed below applies:</u><br>
- <color> 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>
- <icon> is the icon name.<br>
- [class<classname>@] as prefix in front of the second parameter, assigns a css-class to the icons.<br>
- Examples for import with raw definition, will be found in <a href="https://wiki.fhem.de/wiki/FHEMWEB/Widgets">FHEMWEB-Widgets</a>
- <li>iconRadio,[class<classname>@][use4icon@]<select color>,<value>,<icon>[@<color>][,<value>,<icon>[@<color>]]...
- - displays Icons as radio button and returns value if pushed.<br>
- <value> return or compare value. If a numerical sequence of <value> is specified, the current value will match the next higher <value>. It is allowed to place non numerical <value> in front of or after the sequence but not in between. The numerical sequence has to be ascendind or descending.<br>
- <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>
- <select color> the background color of the selected icon or the icon color if the prefix <i>use4icon@</i> is used.<br>
- The widget contains a CSS-class "iconRadio_widget".<br>
- </li>
- <li>
- iconButtons,[class<classname>@][use4icon@]<select color>,<value>,<icon>[@<color>][,<value>,<icon>[@<color>]]...
- - displays Icons as button bar and returns comma separated values of pushed buttons.<br>
- <value> return value.<br>
- <select color> the background color of the selected icon or the icon color if the prefix <i>use4icon@</i> is used.<br>
- The widget contains a CSS-class "iconButtons_widget".<br>
- </li>
- <li>iconLabel[,[class<classname>@]<reference value>,[<icon>][@<color>]][,<reference value>,[<icon>][@<color>]]...
- - displays states by colorized values, labels and icons, if the current
- value fits to the reference value. A state is described by a parameter peer.
- The number of peers is arbitrarily. A peer consists of a <reference
- value> and an optional display value with an optional color value
- <reference value> is a number or a regular expression.<br>
- If <icon> is no icon name, the text will be displayed, otherwise
- the icon. If nothing is specified, the current value will be displayed.<br>
- </li>
- <li>iconSwitch,[class<classname>@]<reference value>,[<icon>][@<color>][,<reference value>,[<icon>][@<color>]]...
- - switches cyclic after actuation to the diplayed state and the actual
- value is set to the reference Value. A state is described by a
- parameter peer. The number of peers is arbitrarily. A peer consists
- of a <reference value> and an optional display value with an
- optional color value [<icon>][@<color>].<br>
- <reference value> is a number or a string.<br>
- If <icon> is no icon name, the text will be displayed, otherwise
- the icon. If nothing is specified, the reference value will be displayed.<br>
- </li>
- <br>
- <p><p><p> <li>:sortable,val1,val2,... - create a new list from the elements of the
- given list, can add new elements by entering a text, or delete some from
- the list. This new list can be sorted via drag & drop. The result is
- a comma separated list. </li>
- <li>:sortable-strict,val1,val2,... - it behaves like :sortable, without the
- possibility to enter text.</li>
- <li>:sortable-given,val1,val2,... - the specified list can be sorted via drag
- & drop, no elements can be added or deleted. </li>
- <p> <li>noArg - show no input field.</li>
- <li>time - show a JavaScript driven timepicker.<br>
- Example: attr FS20dev widgetOverride on-till:time</li>
- <li>textField - show an input field.<br>
- Example: attr WEB widgetOverride room:textField</li>
- <li>textFieldNL - show the input field and hide the label.</li>
- <li>textField-long - show an input-field, but upon
- clicking on the input field open a textArea (60x25).</li>
- <li>textFieldNL-long - the behaviour is the same
- as :textField-long, but no label is displayed.</li>
- <li>slider,<min>,<step>,<max>[,1] - show
- a JavaScript driven slider. The optional ,1 at the end
- avoids the rounding of floating-point numbers.</li>
- <li>multiple,<val1>,<val2>,..." - present a
- multiple-value-selector with an additional textfield. The result is
- comman separated.</li>
- <li>multiple-strict,<val1>,<val2>,... - like :multiple, but
- without the textfield.</li>
- <li>selectnumbers,<min>,<step>,<max>,<number of
- digits after decimal point>,lin|log10" - display a select widget
- generated with values from min to max with step.<br>
- lin generates a constantly increasing series. log10 generates an
- exponentially increasing series to base 10, step is related to the
- exponent, e.g. 0.0625.</li>
- <li>select,<val1>,<val2>,... - show a dropdown with all values.
- <b>NOTE</b>: this is also the fallback, if no modifier is found.</li>
- <p><p> </ul>
- </li>
- <br>
- </ul>
- </ul>
- <p><a name="FHT"></a>
- <h3>FHT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FHT'>DE</a>]</div>
- <ul>
- Fhem can receive FHT radio (868.35 MHz) messages either through an <a
- href="#FHZ">FHZ</a> or an <a href="#CUL">CUL</a> device, so this must be
- defined first.<br><br>
- <a name="FHTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FHT <fhtaddress></code>
- <br><br>
- <code><fhtaddress></code> is a four digit hex number,
- corresponding to the address of the FHT80b device.
- <br>
- Examples:
- <ul>
- <code>define wz FHT 3232</code><br>
- </ul>
- <br>
- See the FHT section in <a href="#set">set</a> for more.
- </ul>
- <br>
- <a name="FHTset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <valuetype> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul><code>
- desired-temp<br>
- day-temp night-temp<br>
- report1 report2<br>
- refreshvalues<br>
- mode<br>
- holiday1 holiday2 # see mode holiday_short or holiday<br>
- manu-temp # No clue what it does.<br>
- year month day hour minute<br>
- time date<br>
- lowtemp-offset # Alarm-Temp.-Differenz<br>
- windowopen-temp<br>
- mon-from1 mon-to1 mon-from2 mon-to2<br>
- tue-from1 tue-to1 tue-from2 tue-to2<br>
- wed-from1 wed-to1 wed-from2 wed-to2<br>
- thu-from1 thu-to1 thu-from2 thu-to2<br>
- fri-from1 fri-to1 fri-from2 fri-to2<br>
- sat-from1 sat-to1 sat-from2 sat-to2<br>
- sun-from1 sun-to1 sun-from2 sun-to2<br>
- </code></ul>
- Examples:
- <ul>
- <code>set wz desired-temp 22.5</code><br>
- <code>set fl desired-temp 20.5 day-temp 19.0 night-temp 16.0</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>Following events are reported (more or less regularly) by each FHT
- device: <code>measured-temp actuator actuator1...actuator8
- warnings</code><br>
- You can use these strings for <a href="#notify">notify</a> or
- <a href="#FileLog">FileLog</a> definitions.
- <ul>
- <li>warnings can contain following strings:
- none, Battery low,Temperature too low, Window open,
- Fault on window sensor
- </li>
- <li>actuator (without a suffix) stands for all actuators.</li>
- <li>actuator or actuator1..8 can take following values:
- <ul>
- <li><value>%<br>
- This is the normal case, the actuator is instructed to
- open to this value.
- </li>
- <li>offset <value>%<br>
- The actuator is running with this offset.
- </li>
- <li>lime-protection<br>
- The actuator was instructed to execute the lime-protection
- procedure.
- </li>
- <li>synctime<br>
- If you select Sond/Sync on the FHT80B, you'll see a count
- down.
- </li>
- <li>test<br>
- The actuator was instructed by the FHT80b to emit a beep.
- </li>
- <li>pair<br>
- The the FHT80b sent a "you-belong-to-me" to this actuator.
- </li>
- </ul></li>
- </ul></li>
- <br>
- <li>The FHT is very economical (or lazy), it accepts one message from the
- FHZ1x00 every 115+x seconds, where x depends on the fhtaddress. Don't
- be surprised if your command is only accepted 10 minutes later by the
- device. FHT commands are buffered in the FHZ1x00/CUL till they are
- sent to the FHT, see the related <code>fhtbuf</code> entry in the
- <code><a href="#get">get</a></code> section.<br> You can send up to 8
- commands in one message at once to the FHT if you specify them all as
- arguments to the same set command, see the example above.
- </li>
- <br>
- <li>time sets hour and minute to local time</li><br>
- <li>date sets year, month and date to local time</li><br>
- <li>refreshvalues is an alias for report1 255 report2 255</li><br>
- <li>All <code>*-temp</code> values need a temperature
- as argument, which will be rounded to 0.5 Celsius.<br>
- Temperature values must between 5.5 and 30.5 Celsius. Value 5.5 sets
- the actuator to OFF, value 30.5 set the actuator to ON</li><br>
- <li><code>mode</code> is one of <code>auto, manual, holiday or
- holiday_short.</code><br>
- If the mode is either holiday or holiday_short, then the mode
- switches back to auto at the specified day and time independent of
- the current mode of the device and the desired temperature will be
- set to the night or day temperature according to the defined weekly
- schedule stored within the device.
- In case of mode holiday
- <ul>
- <li>holiday1 sets the end-day of the holiday (at 00:00)</li>
- <li>holiday2 sets the end-month of the holiday</li>
- </ul>
- For holiday_short (party mode)
- <ul>
- <li>holiday1 sets the absolute hour to switch back from this mode (in
- 10-minute steps, max 144)</li>
- <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>
- </ul>
- Example:
- <ul>
- <li>current date is 29 Jan, time is 18:05</li>
- <li>you want to switch to party mode until tomorrow 1:00</li>
- <li>set holiday1 to 6 (6 x 10min = 1hour) and holiday2 to 30</li>
- </ul>
- The temperature for the holiday period is set by the
- desired-temperature parameter.<br>
- Note that you cannot set holiday mode for days earlier than the day
- after tomorrow, for this you must use holiday_short.<br>
- The parameters holiday1 and holiday2 must be set in one command
- together with mode.<br>
- Example:
- <ul>
- set FHT1 mode holiday holiday1 24 holiday2 12 desired-temp 14
- </ul>
- Please note: If the event time specified by the holiday parameters
- has already past, then the device will immediately switch back to
- auto mode including the selection of the corresponding day or night
- temperature. This is valid at least for FHT80b model 2 and 3, Lifetec
- MD12050. For those devices setting holiday_short with a holiday1
- value of 0 and without the parameter holiday2 e.g.
- <ul>
- set FHT1 mode holiday_short holiday1 0
- </ul>
- will immediately switch back the device to mode auto including the
- adjustment of the desired- temp parameter.
- Some elderly FHT models, however, only switch the mode to auto, if
- the event is within the past, but don't adjust the desired
- temperature. In this case specifying appropriate values for the
- parameters holiday1 and holiday2 thus defining an event in the very
- near future (e.g. 10 minutes) could be the solution to force a switch
- back to the correct automatic mode.
- </li>
- <br>
- <li>The <code>*-from1/*-from2/*-to1/*-to2</code> valuetypes need a time
- spec as argument in the HH:MM format. They define the periods, where
- the day-temp is valid. The minute (MM) will be rounded to 10, and
- 24:00 means off.</li><br>
- <li>To synchronize the FHT time and to "wake" muted FHTs it is adviseable
- to schedule following command:<br>
- <code>define fht_sync at +*3:30 set TYPE=FHT time</code>
- </li>
- <br>
- <li><code>report1</code> with parameter 255 requests all settings for
- monday till sunday to be sent. The argument is a bitfield, to request
- unique values add up the following:
- <ul>
- <li> 1: monday</li>
- <li> 2: tuesday</li>
- <li> 4: thursday</li>
- <li> 8: wednesday</li>
- <li>16: friday</li>
- <li>32: saturday</li>
- <li>64: sunday</li>
- </ul>
- measured-temp and actuator is sent along if it is considered
- appropriate
- by the FHT.
- <br><br>
- <b>Note:</b> This command generates a lot of RF traffic, which can
- lead to further problems, especially if the reception is not clear.
- </li><br>
- <li><code>report2</code> with parameter 255 requests the following
- settings to be reported: day-temp night-temp windowopen-temp
- lowtemp-offset desired-temp measured-temp mode warnings.
- The argument is (more or less) a bitfield, to request unique values
- add up the following:
- <ul>
- <li> 1: warnings</li>
- <li> 2: mode</li>
- <li> 4: day-temp, night-temp, windowopen-temp</li>
- <li> 8: desired-temp</li>
- <li>64: lowtemp-offset</li>
- </ul>
- measured-temp and actuator is sent along if it is considered
- appropriate by the FHT.</li>
- <br>
- <li><code>lowtemp-offset</code> needs a temperature as argument, valid
- values must be between 1.0 and 5.0 Celsius.<br> It will trigger a
- warning if <code>desired-temp - measured-temp >
- lowtemp-offset</code> in a room for at least 1.5 hours after the last
- desired-temp change.</li>
- <br>
- <li>FHEM optionally has an internal software buffer for FHT devices.
- This buffer should prevent transmission errors. If there is no
- confirmation for a given period, FHEM resends the command. You can
- see the queued commands with <a href="#list">list</a>
- <fht-device>.
- See the <a href="#fhtsoftbuffer">fhtsoftbuffer</a>,
- <a href="#retrycount">retrycount</a> and
- <a href="#minfhtbuffer">minfhtbuffer</a> attributes for details.
- </li>
- <br>
- <li>If a buffer is still in the softbuffer, it will be sent in the
- following order:<br> <code>desired-temp,mode,report1,report2,
- holiday1,holiday2,day-temp,night-temp, [all other commands]</code>
- </li>
- <br>
- </ul>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="FHTattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#attrdummy">dummy</a><br>
- <b>Note:</b>It makes sense to define an FHT device even for an FHT8b,
- else you will receive "unknown FHT device, please define one" message
- for each FHT8b as the CUL is reporting the 8b valve messages. But you
- should set the dummy attribute for these devices, else the internal FHT
- buffer of the CUL will be filled with data for the 8b's which is never
- consumed. If the buffer is full, you'll get "EOB" messages from the CUL,
- and you cannot transmit any data to the 80b's</li><br>
- <a name="retrycount"></a>
- <li>retrycount<br>
- If the <a href="#fhtsoftbuffer">fhtsoftbuffer</a> attribute is set, then
- resend commands <code>retrycount</code> times if after 240 seconds
- no confirmation message is received from the corresponding FHT
- device.<br>
- Default is 1.</li><br>
- <a name="minfhtbuffer"></a>
- <li>minfhtbuffer<br>
- FHEM won't send commands to the FHZ if its fhtbuffer is below
- this value, default is 0. If this value is low, then the ordering of
- fht commands (see the note in the FHT section of <a href="#set">set</a>)
- has little effect, as only commands in the softbuffer can be
- prioritized. The maximum value should be 7 below the hardware maximum
- (see fhtbuf).
- </li><br>
- <a name="lazy"></a>
- <li>lazy<br>
- If the lazy attribute is set, FHEM won't send commands to the FHT if
- the current reading and the value to be set are already identical. This
- may help avoiding conflicts with the max-1%-time-on-air rule in large
- installations. Not set per default.
- </li><br>
- <a name="tmpcorr"></a>
- <li>tmpcorr<br>
- Correct the temperature reported by the FHT by the value specified.
- Note: only the measured-temp value reported by FHEM (used for logging)
- will be modified.
- </li><br>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#model">model</a> (fht80b)</li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="FHTevents"></a>
- <b>Generated events:</b>
- <ul>
- <li>actuator</li>
- <li>actuator1 actuator2 actuator3 actuator4<br>
- actuator5 actuator6 actuator7 actuator8<br>
- (sent if you configured an offset for the associated valve)</li>
- <li>mon-from1 mon-to1 mon-from2 mon-to2</li>
- <li>tue-from1 tue-to1 tue-from2 tue-to2</li>
- <li>wed-from1 wed-to1 wed-from2 wed-to2</li>
- <li>thu-from1 thu-to1 thu-from2 thu-to2</li>
- <li>fri-from1 fri-to1 fri-from2 fri-to2</li>
- <li>sat-from1 sat-to1 sat-from2 sat-to2</li>
- <li>sun-from1 sun-to1 sun-from2 sun-to2</li>
- <li>mode</li>
- <li>holiday1 holiday2</li>
- <li>desired-temp</li>
- <li>measured-temp measured-low measured-high</li>
- <li>warnings</li>
- <li>manu-temp</li>
- <li>year month day hour minute</li>
- <li>day-temp night-temp lowtemp-offset windowopen-temp</li>
- <li>ack can-xmit can-rcv ack2 start-xmit end-xmit
- (only if the CUL is configured to transmit FHT protocol data)</li>
- </ul>
- <br>
- </ul>
- <p><a name="FHT8V"></a>
- <h3>FHT8V</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FHT8V'>DE</a>]</div>
- <ul>
- Fhem can directly control FHT8V type valves via a <a href="#CUL">CUL</a>
- device without an intermediate FHT. This paragraph documents one of the
- building blocks, the other is the <a href="#PID">PID</a> device.
- <br>
- <br>
- <a name="FHT8Vdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FHT8V <housecode> [IODev|FHTID]</code>
- <br><br>
- <code><housecode></code> is a four digit hex number,
- and must have the following relation to the housecode of the corresponding CUL
- device:
- <ul>given the CUL housecode as AABB, then this housecode must be
- of the form CCBB, where CC is greater or equal to AA, but less then AA+8.
- </ul>
- This form is chosen so that the CUL can update all FHT8V valve states
- within 2 minutes.
- <br>
- <br>
- <code><IODev></code> must be specified if the last defined CUL device
- is not the one to use. Usually this is done voa the <a
- href="#IODev">IODev</a> attribute, but as the address checked is performed
- at the definition, we must use an exception here.<br>
- As an alternative you can specify the FHTID of the assigned IODev device
- (instead of the IODev itself), this method is needed if you are using FHT8V
- through FHEM2FHEM.
- <br>
- Examples:
- <ul>
- <code>define wz FHT8V 3232</code><br>
- </ul>
- </ul>
- <br>
- <a name="FHT8Vset"></a>
- <b>Set </b>
- <ul>
- <li>set <name> valve <value;><br>
- Set the valve to the given value (in percent, from 0 to 100).
- </li>
- <li>set <name> pair<br>
- Pair the valve with the CUL.
- </li>
- <li>set <name> decalc<br>
- Start a decalcifying cycle on the given valve
- </li>
- </ul>
- <br>
- <a name="FHT8Vget"></a>
- <b>Get </b>
- <ul>
- <li>get <name> valve<br>
- Read back the valve position from the CUL FHT buffer, and convert it to percent (from 0 to 100).
- </li>
- </ul>
- <br>
- <a name="FHT8Vattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#eventMap">eventMap</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="FHZ"></a>
- <h3>FHZ</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FHZ'>DE</a>]</div>
- <ul>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module
- if the devices is connected via USB or a serial port.
- <br><br>
- <a name="FHZdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FHZ <serial-device></code> <br>
- <br>
- Specifies the serial port to communicate with the FHZ1000PC or FHZ1300PC.
- The name(s) of the serial-device(s) depends on your distribution. <br>
- If the serial-device is called none, then no device will be opened, so you
- can experiment without hardware attached.<br>
- The program can service multiple devices, FS20 and FHT device commands will
- be sent out through the last FHZ device defined before the definition of
- the FS20/FHT device. To change the association, use the IODev attribute.<br>
- <br>
- For GNU/Linux you may want to read our <a href="linux.html">hints for
- GNU/Linux</a> about <a href="linux.html#multipledevices">multiple USB
- devices</a>.<br>
- <b>Note:</b>The firmware of the FHZ1x00 will drop commands if the airtime
- for the last hour would exceed 1% (which corresponds roughly to 163
- commands). For this purpose there is a command counter for the last hour
- (see list FHZDEVICE), which triggers with "TRANSMIT LIMIT EXCEEDED" if
- there were more than 163 commands in the last hour.<br><br>
- If you experience problems (for verbose 4 you get a lot of "Bad CRC
- message" in the log), then try to define your device as <br> <code>define
- <name> FHZ <serial-device> strangetty</code><br>
- </ul>
- <br>
- <a name="FHZset"></a>
- <b>Set </b>
- <ul>
- <code>set FHZ <variable> [<value>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul>
- FHTcode<br>
- initFS20<br>
- initHMS<br>
- stopHMS<br>
- initfull<br>
- raw<br>
- open<br>
- reopen<br>
- close<br>
- time<br>
- </ul>
- Notes:
- <ul>
- <li>raw is used to send out "raw" FS20/FHT messages ("setters" only - no query messages!).
- See message byte streams in FHEM/00_FHZ.pm and the doc directory for some examples.</li>
- <li>In order to set the time of your FHT's, schedule this command every
- minute:<br>
- <code>define fhz_timer at +*00:01:00 set FHZ time</code><br>
- See the <a href="#verbose">verbose</a> to prevent logging of
- this command.
- </li>
- <li>FHTcode is a two digit hex number (from 00 to 63?) and sets the
- central FHT code, which is used by the FHT devices. After changing
- it, you <b>must</b> reprogram each FHT80b with: PROG (until Sond
- appears), then select CEnt, Prog, Select nA.</li>
- <li>If the FHT ceases to work for FHT devices whereas other devices
- (e.g. HMS, KS300) continue to work, a<ul>
- <code>set FHZ initfull</code></ul> command could help. Try<ul>
- <code>set FHZ reopen</code></ul> if the FHZ
- ceases to work completely. If all else fails, shutdown fhem, unplug
- and replug the FHZ device. Problems with FHZ may also be related to
- long USB cables or insufficient power on the USB - use a powered hub
- to improve this particular part of such issues.
- See <a href="http://fhem.de/USB.html">our USB page</a>
- for detailed USB / electromag. interference troubleshooting.</li>
- <li><code>initfull</code> issues the initialization sequence for the FHZ
- device:<br>
- <ul><code>
- get FHZ init2<br>
- get FHZ serial<br>
- set FHZ initHMS<br>
- set FHZ initFS20<br>
- set FHZ time<br>
- set FHZ raw 04 01010100010000<br>
- </code></ul></li>
- <li><code>reopen</code> closes and reopens the serial device port. This
- implicitly initializes the FHZ and issues the
- <code>initfull</code> command sequence.</li>
- <li><code>stopHMS</code> probably is the inverse of <code>initHMS</code>
- (I don't have authoritative info on what exactly it does).</li>
- <li><code>close</code> closes and frees the serial device port until you open
- it again with <code>open</code>, e.g. useful if you need to temporarily
- 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>
- </ul>
- </ul>
- <br>
- <a name="FHZget"></a>
- <b>Get</b>
- <ul>
- <code>get FHZ <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul>
- init1<br>
- init2<br>
- init3<br>
- serial<br>
- fhtbuf<br>
- </ul>
- Notes:
- <ul>
- <li>The mentioned codes are needed for initializing the FHZ1X00</li>
- <li>The answer for a command is also displayed by <code>list FHZ</code>
- </li>
- <li>
- The FHZ1x00PC has a message buffer for the FHT (see the FHT entry in
- the <a href="#set">set</a> section). If the buffer is full, then newly
- issued commands will be dropped, if the attribute <a
- href="#fhtsoftbuffer">fhtsoftbuffer</a> is not set.
- <code>fhtbuf</code> returns the free memory in this buffer (in hex),
- an empty buffer in the FHZ1000 is 2c (42 bytes), in the FHZ1300 is 4a
- (74 bytes). A message occupies 3 + 2x(number of FHT commands) bytes,
- this is the second reason why sending multiple FHT commands with one
- <a href="#set"> set</a> is a good idea. The first reason is, that
- these FHT commands are sent at once to the FHT.
- </li>
- </ul>
- </ul>
- <br>
- <a name="FHZattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="do_not_notify"></a>
- <li>do_not_notify<br>
- Disable FileLog/notify/inform notification for a device. This affects
- the received signal, the set and trigger commands.</li><br>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <a name="loglevel"></a>
- <li>loglevel<br>
- <b>Note:</b>Deprecated! The module maintainer is encouraged to replace it
- with verbose.<br><br>
- Set the device loglevel to e.g. 6 if you do not wish messages from a
- given device to appear in the global logfile (FHZ/FS20/FHT). E.g. to
- set the FHT time, you should schedule "set FHZ time" every minute, but
- this in turn makes your logfile unreadable. These messages will not be
- generated if the FHZ attribute loglevel is set to 6.<br>
- On the other hand, if you have to debug a given device, setting its
- loglevel to a smaller value than the value of the global verbose attribute,
- it will output its messages normally seen only with higher global verbose
- levels.
- </li> <br>
- <li><a href="#model">model</a> (fhz1000,fhz1300)</li><br>
- <a name="fhtsoftbuffer"></a>
- <li>fhtsoftbuffer<br>
- As the FHZ command buffer for FHT devices is limited (see fhtbuf),
- and commands are only sent to the FHT device every 120 seconds,
- the hardware buffer may overflow and FHT commands get lost.
- Setting this attribute implements an "unlimited" software buffer.<br>
- Default is disabled (i.e. not set or set to 0).</li><br>
- </ul>
- <br>
- </ul>
- <p><a name="FLOORPLAN"></a>
- <h3>FLOORPLAN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FLOORPLAN'>DE</a>]</div>
- <ul>
- Implements an additional entry "Floorplans" to your fhem menu, leading to a userinterface without fhem-menu, rooms or devicelists.
- Devices can be displayed at a defined coordinate on the screen, usually with a clickable icon allowing to switch
- 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.
- Use floorplanstyle.css to adapt the representation.<br>
- Step-by-step setup guides are available in
- <a href="http://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/docs/fhem-floorplan-installation-guide.pdf?format=raw">english</a> and
- <a href="http://www.fhemwiki.de/wiki/Floorplan_Installations-Leitfaden" target="_blank">german</a>. <br>
- <br>
- <a name="FLOORPLANdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FLOORPLAN </code>
- <br><br>
- <b>Hint:</b> Store fp_<name>.png in your image folder (www/images/default , www/pgm2 or FHEM) to use it as background picture.<br><br>
- Example:
- <ul>
- <code>
- define Groundfloor FLOORPLAN<br>
- fp_Groundfloor.png
- </code><br>
- </ul>
- </ul>
- <br>
- <a name="FLOORPLANset"></a>
- <b>Set </b>
- <ul>
- <li>N/A</li>
- </ul>
- <br>
- <a name="FLOORPLANget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> config</code>
- <br>
- Displays the configuration of the floorplan <name> with all attributes. Can be used in an include-file.
- </ul>
- <br>
- <a name="FLOORPLANattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="fp_fpname">userattr fp_<name> <top>,<left>[,<style>[,<description>]]</a><br><br>
- A <a href="#userattr">userattr</a> fp_<name> will be created automatically if it does not exist yet.<br>
- <ul>
- <li>top = screen-position, pixels from top of screen</li>
- <li>left = screen-position, pixels from left of screen</li>
- <li>style =
- <ul>
- <li>0 icon/state only</li>
- <li>1 devicename and icon/state</li>
- <li>2 devicename, icon/state and commands</li>
- <li>3 device-reading and optional description</li>
- <li>4 S300TH-specific, displays temperature above humidity</li>
- <li>5 icon/state and commands</li>
- <li>6 device-reading, reading-timestamp and optional description</li>
- <li>7 commands only</li>
- <li>8 commands popup</li>
- </ul>
- </li>
- <li>description will be displayed instead of the original devicename</li>
- </ul></li><br>
- Examples:<br>
- <ul>
- <table>
- <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>
- <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>
- <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>
- <tr><td><code>attr myFHT fp_Groundfloor 300,20,10,Temperature</code></td><td><code>#display given Text + FHT-temperature</code></td></tr>
- </table>
- </ul>
- <b>Hint:</b> no blanks between parameters<br><br>
- <li><a name="fp_arrange">fp_arrange</a><br>
- Activates the "arrange mode" which shows an additional menu on the screen to choose style and description.<br>
- When the arrange-mode is activated, devices can be placed freely on the screen by drag&drop.
- allowing to place devices easily on the screen.<br>
- Example:
- <ul>
- <code>attr Groundfloor fp_arrange 1</code><br>
- <code>attr Groundfloor fp_arrange WEB #activates arrange mode for frontend-device WEB only</code><br><br>
- </ul>
- </li>
- <li><a name="stylesheet">stylesheet</a><br>
- Explicitely sets your personal stylesheet for the floorplan. This overrides the standard stylesheet.
- 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
- <code>stylesheetPrefix</code> is also prepended to the stylesheet for floorplans.<br>
- All stylesheets must be stored in the stylesheet subfolder of the fhem filesystem hierarchy. Store your personal
- stylesheet along with <code>floorplanstyle.css</code> in the same folder.<br>
- Example:
- <ul>
- <code>attr Groundfloor stylesheet myfloorplanstyle.css</code><br><br>
- </ul>
- </li>
- <li><a name="fp_default">fp_default</a><br>
- The floorplan startscreen is skipped if this attribute is assigned to one of the floorplans in your installation.
- </li>
- Example:
- <ul>
- <code>attr Groundfloor fp_default 1</code><br><br>
- </ul>
- <li><a name="fp_noMenu">fp_noMenu</a><br>
- Suppresses the menu which usually shows the links to all your floorplans.
- </li>
- Example:
- <ul>
- <code>attr Groundfloor fp_noMenu 1</code><br><br>
- </ul>
- <li><a name="commandfield">commandfield</a><br>
- Adds a fhem-commandfield to the floorplan screen.
- </li>
- Example:
- <ul>
- <code>attr Groundfloor commandfield 1</code><br><br>
- </ul>
-
- <li><a name="fp_backgroundimg">fp_backgroundimg</a><br>
- Allows to choose a background-picture independent of the floorplan-name.
- </li>
- Example:
- <ul>
- <code>attr Groundfloor fp_backgroundimg foobar.png</code><br><br>
- </ul>
-
- <li><a name="fp_viewport">fp_viewport</a><br>
- Allows usage of a user-defined viewport-value for touchpad.<br>
- Default-viewport-value is "width=768".
- </li>
-
- <a name="fp_roomIcons"></a>
- <li>fp_roomIcons<br>
- Space separated list of floorplan:icon pairs, to assign icons
- to the floorplan-menu, just like the functionality for rooms
- in FHEMWEB. Example:<br>
- attr Grundriss fp_roomIcons Grundriss:control_building_empty Media:audio_eq
- </li>
-
- <li><a name="fp_inherited">Inherited from FHEMWEB</a><br>
- The following attributes are inherited from the underlying <a href="#FHEMWEB">FHEMWEB</a> instance:<br>
- <ul>
- <a href="#smallscreen">smallscreen</a><br>
- <a href="#touchpad">touchpad</a><br>
- <a href="#refresh">refresh</a><br>
- <a href="#plotmode">plotmode</a><br>
- <a href="#plotsize">plotsize</a><br>
- <a href="#webname">webname</a><br>
- <a href="#redirectCmds">redirectCmds</a><br>
- <a href="#longpoll">longpoll</a><br>
- <a href="#allowedCommands">allowedCommands</a><br>
- </ul>
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="FRAMEBUFFER"></a>
- <h3>FRAMEBUFFER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRAMEBUFFER'>DE</a>]</div>
- <ul>
- Provides a device to display arbitrary content on a linux framebuffer device<p>
- You need to have the perl module <code>GD</code> installed. This module is most likely not
- available for small systems like Fritz!Box.<p>
- FRAMEBUFFER uses <a href="#RSS">RSS</a> to create an image that is displayed on the framebuffer.<br>
- The binary program fbvs is required to display the image. You can download it from <a href="https://github.com/kaihs/fbvs">github</a>.
- </p>
- <a name="FRAMEBUFFERdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRAMEBUFFER <framebuffer_device_name></code><br><br>
- Defines a framebuffer device. <code><framebuffer_device_name></code> is the name of the linux
- device file for the kernel framebuffer device, e.g. /dev/fb1 or /dev/fb0.
-
- Examples:
- <ul>
- <code>define display FRAMEBUFFER /dev/fb1</code><br>
- <code>define TV FRAMEBUFFER /dev/fb0</code><br>
- </ul>
- <br>
- </ul>
- <a name="FRAMBUFFERset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> absLayoutNo <number></code>
- <br><br>
- A list of layout files can be defined with <code>attr layoutList</code>, see below.
- This command selects the layout with the given number from this list and displays it.
- This can e.g. be useful if bound to a key of a remote control to display a specific layout.
- <br><br>
- </ul>
- <ul>
- <code>set <name> layoutFilename <name> [<timeout in seconds>]</code>
- <br><br>
- Displays the image described by the layout in file <name>. If <name> is an absolute path
- name it is used as is to access the file. Otherwise the attribute <layoutBasedir> is prepended to
- the <name>.
- If a timeout is given, the image is only displayed for timeout seconds before the previously displayed image
- is displayed again.
- Useful for displaying an image only for a certain time after an event has occured.
- <br><br>
- </ul>
- <ul>
- <code>set <name> relLayoutNo <number></code>
- <br><br>
- Like absLayoutNo this displays a certain image from the layoutList. Here <number> is added to the current
- layout number.
- So<br>
- <code>set <name> relLayoutNo 1</code>
- displays the next image from the list while<br>
- <code>set <name> relLayoutNo -1</code><br>
- displays the previous one.
- Useful if bound to a next/previous key on a remote control to scroll through all defined layouts.
- <br><br>
- </ul>
- <ul>
- <code>set <name> updateDisplay</code>
- <br><br>
- Refreshes the display defined by the currently active layout.
- <br><br>
- </ul>
- <a name="FRAMEUFFERattr"></a>
- <b>Attributes</b>
- <br>
- <ul>
- <code>size <width>x<height></code><br>
- The dimensions of the display in pixels.
- Images will generated using this size. If the size is greater than the actual display
- size they will be scaled to fit. As this requires computing performance it should be avoided by
- defining the size to match the display size.
- <br>Example<br>
- <code>attr <name> size 128x160</code>
- <br><br>
- </ul>
- <ul>
- <code>layoutBasedir <directory name></code><br>
- Directory that contains the layout files. If a layout filename is specified using a relative path
- <code>layoutBasedir</code> will be prepended before accessing the file.
- <br>Example<br>
- <code>attr <name> layoutBasedir /opt/fhem/layouts</code>
- <br><br>
- </ul>
- <ul>
- <code>layoutList <file1> [<file2>] ...</code>
- <br>Space separated list of layout files.
- These will be used by <code>absLayoutNo</code> and <code>relLayoutNo</code>.
- <code>layoutBasedir</code> will be prepended to each file if it is a relative path.
- <br>Example<br>
- <code>attr <name> layoutList standard.txt wetter.txt schalter.txt</code>
- <br><br>
- </ul>
- <ul>
- <code>update_interval <interval></code>
- <br>Update interval in minutes.
- The currently displayed layout will be refreshed every <interval> minutes. The first
- interval will be scheduled to the beginning of the next minute to help create an accurate
- time display.<br>
- <br>Example<br>
- <code>attr <name> update_interval 1</code>
- <br><br>
- </ul>
- <ul>
- <code>debugFile <file></code><br>
- Normally the generated image isn't written to a file. To ease debugging of layouts the generated image is written to the
- filename specified by this attribute.
- This attribute shouldn't be set during normal operation.
- <br><br>
- </ul>
- <ul>
- <code>startLayoutNo <number></code><br>
- The number of the layout to be displayed on startup of the FRAMEBUFFER device.
- <br><br>
- </ul>
- <ul>bgcolor <color><br>Sets the background color. <color> is
- a 6-digit hex number, every 2 digits determining the red, green and blue
- color components as in HTML color codes (e.g.<code>FF0000</code> for red, <code>C0C0C0</code> for light gray).
- <br><br>
- </ul>
- <ul>enableCmd <fhem cmd><br>
- if set this command is executed before a layout with a timeout is displayed. This can e.g. be used to enable a backlight.
- <br><br>
- </ul>
- <ul>disableCmd <fhem cmd><br>
- if set this command is executed after a layout with a timeout has expired. This can e.g. be used to disable a backlight.
- </ul>
- <br><br>
- <b>Usage information</b>
- <br>
- <ul>
- This module requires the binary program fbvs to be installed in /usr/local/bin and it must be executable
- by user fhem.
- fbvs (framebuffer viewer simple) is a stripped down version of fbv that can only display png images. It reads
- the image from stdin, displays it on the framebuffer and terminates afterwards.
- This module generates a png image based on a layout description internally and then pipes it to fbvs for display.
- </ul>
- <br>
- <a name="FRAMEBUFFERlayout"></a>
- <b>Layout definition</b>
- <br>
- <ul>
- 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.
- </ul>
- </ul>
- <p><a name="FRITZBOX"></a>
- <h3>FRITZBOX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRITZBOX'>DE</a>]</div>
- <div>
- <ul>
- Controls some features of a Fritz!Box router. Connected Fritz!Fon's (MT-F, MT-D, C3, C4) can be used as
- signaling devices. MP3 files and Text2Speech can be played as ring tone or when calling phones.
- <br>
- For detail instructions, look at and please maintain the <a href="http://www.fhemwiki.de/wiki/FRITZBOX"><b>FHEM-Wiki</b></a>.
- <br/><br/>
- 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.
- <br/><br/>
- 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>
- <br>
- The modul was tested on Fritz!Box 7390 and 7490 with Fritz!OS 6.20 and higher.
- <br>
- Check also the other Fritz!Box moduls: <a href="#SYSMON">SYSMON</a> and <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>.
- <br>
- <i>The modul uses the Perl modul 'Net::Telnet', 'JSON::XS', 'LWP', 'SOAP::Lite' for remote access.</i>
- <br/><br/>
- <a name="FRITZBOXdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> FRITZBOX [host]</code>
- <br/>
- 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".
- <br/><br/>
- Example: <code>define Fritzbox FRITZBOX</code>
- <br/><br/>
- The FritzOS has a hidden function (easter egg).
- <br>
- <code>define MyEasterEgg weblink htmlCode { FRITZBOX_fritztris("Fritzbox") }</code>
- <br/><br/>
- </ul>
-
- <a name="FRITZBOXset"></a>
- <b>Set</b>
- <ul>
- <br>
- <li><code>set <name> alarm <number> [on|off] [time] [once|daily|Mo|Tu|We|Th|Fr|Sa|So]</code>
- <br>
- 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.
- <br>
- Requires the API: Telnet or webcm.
- </li><br>
- <li><code>set <name> call <number> [duration] [say:text|play:MP3URL]</code>
- <br>
- 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.
- Say and play requires the API: Telnet or webcm.
- </li><br>
- <li><code>set <name> checkAPIs</code>
- <br>
- Restarts the initial check of the programming interfaces of the FRITZ!BOX.
- </li><br>
- <li><code>set <name> customerRingTone <internalNumber> <fullFilePath></code>
- <br>
- Uploads the file fullFilePath on the given handset. Only mp3 or G722 format is allowed.
- <br>
- The file has to be placed on the file system of the fritzbox.
- <br>
- The upload takes about one minute before the tone is available.
- </li><br>
- <li><code>set <name> dect <on|off></code>
- <br>
- Switches the DECT base of the box on or off. Requires the API: Telnet or webcm.
- </li><br>
- <li><code>set <name> diversity <number> <on|off></code>
- <br>
- Switches the call diversity number (1, 2 ...) on or off.
- 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).
- <br>
- 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.
- </li><br>
- <li><code>set <name> guestWLAN <on|off></code>
- <br>
- Switches the guest WLAN on or off. The guest password must be set. If necessary, the normal WLAN is also switched on.
- </li><br>
- <li><code>set <name> moh <default|sound|customer> [<MP3FileIncludingPath|say:Text>]</code>
- <br>
- Example: <code>set fritzbox moh customer say:Die Wanne ist voll</code>
- <br>
- <code>set fritzbox moh customer /var/InternerSpeicher/warnung.mp3</code>
- <br>
- 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.
- <br>
- </li><br>
- <li><code>set <name> password <password></code>
- <br>
- Stores the password for remote telnet access.
- </li><br>
- <li><code>set <name> ring <intNumbers> [duration [ringTone]] [show:Text] [say:Text | play:MP3URL]</code>
- <dt>Example:</dt>
- <dd>
- <code>set fritzbox ring 611,612 5 Budapest show:It is raining</code>
- <br>
- <code>set fritzbox ring 611 8 say:(en)It is raining</code>
- <br>
- <code>set fritzbox ring 610 10 play:http://raspberrypi/sound.mp3</code>
- </dd>
- Rings the internal numbers for "duration" seconds and (on Fritz!Fons) with the given "ring tone" name.
- Different internal numbers have to be separated by a comma (without spaces).
- <br>
- Default duration is 5 seconds. The Fritz!Box can create further delays. Default ring tone is the internal ring tone of the device.
- Ring tone will be ignored for collected calls (9 or 50).
- <br>
- If the call is taken the callee hears the "music on hold" which can also be used to transmit messages.
- <br>
- The parameter <i>ringtone, show:, say:</i> and <i>play:</i> require the API Telnet or webcm.
- <br/><br/>
- If the <a href=#FRITZBOXattr>attribute</a> 'ringWithIntern' is specified, the text behind 'show:' will be shown as the callers name.
- Maximal 30 characters are allowed.
- <br/><br/>
- On Fritz!Fons the parameter 'say:' can be used to let the phone speak a message (max. 100 characters) instead of using the ringtone.
- 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.
- Say and play <u>may</u> work only with one single Fritz!Fon at a time.
- <br>
- The behaviour may vary depending on the Fritz!OS.
- </li><br>
- <li><code>set <name> sendMail [to:<Address>] [subject:<Subject>] [body:<Text>]</code>
- <br>
- Sends an email via the email notification service that is configured in push service of the Fritz!Box.
- Use "\n" for line breaks in the body.
- All parameters can be omitted. Make sure the messages are not classified as junk by your email client.
- <br>
- Requires Telnet access to the box.
- <br>
- </li><br>
- <li><code>set <name> startRadio <internalNumber> [name or number]</code>
- <br>
- Plays the internet radio on the given Fritz!Fon. Default is the current <u>ring tone</u> radio station of the phone.
- So, <b>not</b> the station that is selected at the handset.
- An available internet radio can be selected by its name or (reading) number.
- <br>
- </li><br>
- <li><code>set <name> tam <number> <on|off></code>
- <br>
- Switches the answering machine number (1, 2 ...) on or off.
- The answering machine has to be created on the Fritz!Box web interface.
- </li><br>
- <li><code>set <name> update</code>
- <br>
- Starts an update of the device readings.
- </li><br>
- <li><code>set <name> wlan <on|off></code>
- <br>
- Switches WLAN on or off.
- </li><br>
- </ul>
- <a name="FRITZBOXget"></a>
- <b>Get</b>
- <ul>
- <br>
- <li><code>get <name> ringTones</code>
- <br>
- Shows the list of ring tones that can be used.
- </li><br>
- <li><code>get <name> shellCommand <Command></code>
- <br>
- Runs the given command on the Fritz!Box shell and returns the result.
- Can be used to run shell commands not included in this modul.
- <br>
- Only available if the attribute "allowShellCommand" is set.
- </li><br>
- <li><code>get <name> tr064Command <service> <control> <action> [[argName1 argValue1] ...] </code>
- <br>
- Executes TR-064 actions (see <a href="http://avm.de/service/schnittstellen/">API description</a> of AVM).
- <br>
- argValues with spaces have to be enclosed in quotation marks.
- <br>
- Example: <code>get Fritzbox tr064Command X_AVM-DE_OnTel:1 x_contact GetDECTHandsetInfo NewDectID 1</code>
- <br>
- Only available if the attribute "allowTR064Command" is set.
- </li><br>
- <li><code>get <name> tr064ServiceListe</code>
- <br>
- Shows a list of TR-064 services and actions that are allowed on the device.
- </li><br>
- </ul>
-
- <a name="FRITZBOXattr"></a>
- <b>Attributes</b>
- <ul>
- <br>
- <li><code>allowShellCommand <0 | 1></code>
- <br>
- Enables the get command "shellCommand"
- </li><br>
- <li><code>allowTR064Command <0 | 1></code>
- <br>
- Enables the get command "tr064Command"
- </li><br>
- <li><code>boxUser <user name></code>
- <br>
- User name that is used for TR064 or other web based access. By default no user name is required to login.
- <br>
- If the Fritz!Box is configured differently, the user name has to be defined with this attribute.
- </li><br>
- <li><code>defaultCallerName <Text></code>
- <br>
- The default text to show on the ringing phone as 'caller'.
- <br>
- This is done by temporarily changing the name of the calling internal number during the ring.
- <br>
- Maximal 30 characters are allowed. The attribute "ringWithIntern" must also be specified.
- <br>
- Required API: Telnet or webcmd
- </li><br>
- <li><code>defaultUploadDir <fritzBoxPath></code>
- <br>
- This is the default path that will be used if a file name does not start with / (slash).
- <br>
- 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
- </li><br>
- <li><code>forceTelnetConnection <0 | 1></code>
- <br>
- Always use telnet for remote access (instead of access via the WebGUI or TR-064).
- <br>
- This attribute should be enabled for older boxes/firmwares.
- </li><br>
- <li><code>fritzBoxIP <IP Address></code>
- <br>
- Depreciated.
- </li><br>
- <li><code>INTERVAL <seconds></code>
- <br>
- Polling-Interval. Default is 300 (seconds). Smallest possible value is 60.
- </li><br>
- <li><code>m3uFileLocal </path/fileName></code>
- <br>
- 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).
- <br>
- 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.
- 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.
- <br>
- 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.
- </li><br>
- <li><code>ringWithIntern <1 | 2 | 3></code>
- <br>
- To ring a fon a caller must always be specified. Default of this modul is 50 "ISDN:Wählhilfe".
- <br>
- To show a message (default: "FHEM") during a ring the internal phone numbers 1-3 can be specified here.
- The concerned analog phone socket <u>must</u> exist.
- </li><br>
-
- <li><code>telnetTimeOut <seconds></code>
- <br>
- Maximal time to wait for an answer during a telnet session. Default is 10 s.
- </li><br>
- <li><code>telnetUser <user name></code>
- <br>
- User name that is used for telnet access. By default no user name is required to login.
- <br>
- If the Fritz!Box is configured differently, the user name has to be defined with this attribute.
- </li><br>
- <li><code>useGuiHack <0 | 1></code>
- <br>
- 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.
- </li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="FRITZBOXreading"></a>
- <b>Readings</b>
- <ul><br>
- <li><b>alarm</b><i>1</i> - Name of the alarm clock <i>1</i></li>
- <li><b>alarm</b><i>1</i><b>_state</b> - Current state of the alarm clock <i>1</i></li>
- <li><b>alarm</b><i>1</i><b>_target</b> - Internal number of the alarm clock <i>1</i></li>
- <li><b>alarm</b><i>1</i><b>_time</b> - Alarm time of the alarm clock <i>1</i></li>
- <li><b>alarm</b><i>1</i><b>_wdays</b> - Weekdays of the alarm clock <i>1</i></li>
- <br>
- <li><b>box_dect</b> - Current state of the DECT base</li>
- <li><b>box_fwVersion</b> - Firmware version of the box, if outdated then '(old)' is appended</li>
- <li><b>box_guestWlan</b> - Current state of the guest WLAN</li>
- <li><b>box_guestWlanCount</b> - Number of devices connected to guest WLAN</li>
- <li><b>box_guestWlanRemain</b> - Remaining time until the guest WLAN is switched off</li>
- <li><b>box_ipExtern</b> - Internet IP of the Fritz!Box</li>
- <li><b>box_model</b> - Fritz!Box model</li>
- <li><b>box_moh</b> - music-on-hold setting</li>
- <li><b>box_model</b> - Fritz!Box model</li>
- <li><b>box_powerRate</b> - current power in percent of maximal power</li>
- <li><b>box_rateDown</b> - average download rate in the last update interval</li>
- <li><b>box_rateUp</b> - average upload rate in the last update interval</li>
- <li><b>box_stdDialPort</b> - standard caller port when using the dial function of the box</li>
- <li><b>box_tr064</b> - application interface TR-064 (needed by this modul)</li>
- <li><b>box_tr069</b> - provider remote access TR-069 (safety issue!)</li>
- <li><b>box_wlanCount</b> - Number of devices connected via WLAN</li>
- <li><b>box_wlan_2.4GHz</b> - Current state of the 2.4 GHz WLAN</li>
- <li><b>box_wlan_5GHz</b> - Current state of the 5 GHz WLAN</li>
- <br>
- <li><b>dect</b><i>1</i> - Name of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_alarmRingTone</b> - Alarm ring tone of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_custRingTone</b> - Customer ring tone of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_fwVersion</b> - Firmware Version of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_intern</b> - Internal number of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_intRingTone</b> - Internal ring tone of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_manufacturer</b> - Manufacturer of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_model</b> - Model of the DECT device <i>1</i></li>
- <li><b>dect</b><i>1</i><b>_radio</b> - Current internet radio station ring tone of the DECT device <i>1</i></li>
- <br>
- <li><b>diversity</b><i>1</i> - Own (incoming) phone number of the call diversity <i>1</i></li>
- <li><b>diversity</b><i>1</i><b>_dest</b> - Destination of the call diversity <i>1</i></li>
- <li><b>diversity</b><i>1</i><b>_state</b> - Current state of the call diversity <i>1</i></li>
- <br>
- <li><b>fon</b><i>1</i> - Internal name of the analog FON port <i>1</i></li>
- <li><b>fon</b><i>1</i><b>_intern</b> - Internal number of the analog FON port <i>1</i></li>
- <li><b>fon</b><i>1</i><b>_out</b> - Outgoing number of the analog FON port <i>1</i></li>
- <br>
- <li><b>gsm_internet</b> - connection to internet established via GSM stick</li>
- <li><b>gsm_rssi</b> - received signal strength indication (0-100)</li>
- <li><b>gsm_state</b> - state of the connection to the GSM network</li>
- <li><b>gsm_technology</b> - GSM technology used for data transfer (GPRS, EDGE, UMTS, HSPA)</li>
- <br>
- <li><b>mac_</b><i>01_26_FD_12_01_DA</i> - MAC address and name of an active network device.
- <br>
- 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>
- <br>
- <li><b>radio</b><i>01</i> - Name of the internet radio station <i>01</i></li>
- <br>
- <li><b>tam</b><i>1</i> - Name of the answering machine <i>1</i></li>
- <li><b>tam</b><i>1</i><b>_newMsg</b> - New messages on the answering machine <i>1</i></li>
- <li><b>tam</b><i>1</i><b>_oldMsg</b> - Old messages on the answering machine <i>1</i></li>
- <li><b>tam</b><i>1</i><b>_state</b> - Current state of the answering machine <i>1</i></li>
- <br>
- <li><b>user</b><i>01</i> - Name of user/IP <i>1</i> that is under parental control</li>
- <li><b>user</b><i>01</i>_thisMonthTime - this month internet usage of user/IP <i>1</i> (parental control)</li>
- <li><b>user</b><i>01</i>_todaySeconds - today's internet usage in seconds of user/IP <i>1</i> (parental control)</li>
- <li><b>user</b><i>01</i>_todayTime - today's internet usage of user/IP <i>1</i> (parental control)</li>
- </ul>
- <br>
- </ul>
- </div>
- <p><a name="FRM"></a>
- <h3>FRM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM'>DE</a>]</div>
- <ul>
- This module enables FHEM to communicate with a device that implements the <a href="http://www.firmata.org">Firmata</a> protocol
- (e.g. an <a href="http://www.arduino.cc">Arduino</a>).<br><br>
- The connection between FHEM and the Firmata device can be established by serial port, USB, LAN or WiFi.<br><br>
-
- A single FRM device can serve multiple FRM clients from this list:<br><br>
- <a href="#FRM_IN">FRM_IN</a>,
- <a href="#FRM_OUT">FRM_OUT</a>,
- <a href="#FRM_AD">FRM_AD</a>,
- <a href="#FRM_PWM">FRM_PWM</a>,
- <a href="#FRM_I2C">FRM_I2C</a>,
- <a href="#FRM_SERVO">FRM_SERVO</a>,
- <a href="#FRM_RGB">FRM_RGB</a>,
- <a href="#FRM_ROTENC">FRM_ROTENC</a>,
- <a href="#FRM_STEPPER">FRM_STEPPER</a>,
- <a href="#FRM_LCD">FRM_LCD</a>,
- <a href="#OWX">OWX</a>,
- <a href="#I2C_LCD">I2C_LCD</a>,
- <a href="#I2C_DS1307">I2C_DS1307</a>,
- <a href="#I2C_PCA9532">I2C_PCA9532</a>,
- <a href="#I2C_PCA9685">I2C_PCA9685</a>,
- <a href="#I2C_PCF8574">I2C_PCF8574</a>,
- <a href="#I2C_MCP23008">I2C_MCP23008</a>,
- <a href="#I2C_MCP23017">I2C_MCP23017</a>,
- <a href="#I2C_MCP342x">I2C_MCP342x</a>,
- <a href="#I2C_SHT21">I2C_SHT21</a>,
- <a href="#I2C_SHT3x">I2C_SHT3x</a>,
- <a href="#I2C_BME280">I2C_BME280</a>,
- <a href="#I2C_BMP180">I2C_BMP180</a>,
- <a href="#I2C_BH1750">I2C_BH1750</a>,
- <a href="#I2C_TSL2561">I2C_TSL2561</a>,
- <a href="#I2C_K30">I2C_K30</a>,
- <a href="#I2C_LM75A">I2C_LM75A</a><br><br>
-
- Each client stands for a pin of the Firmata device configured for a specific use
- (digital/analog in/out) or an integrated circuit connected to Firmata device by I2C.<br><br>
-
- Note: This module is based on the Perl module <a href="https://github.com/jnsbyr/perl-firmata">Device::Firmata</a>
- (perl-firmata). A suitable version of perl-firmata is distributed with FHEM (see subdirectory FHEM/lib/Device/Firmata).
- You can download the latest version of perl-firmata <a href="https://github.com/jnsbyr/perl-firmata/archive/master.zip">
- as a single zip</a> file from github.<br><br>
-
- Note: This module may require the Device::SerialPort or Win32::SerialPort module if you attach the device via serial port
- or USB and the operating system sets unsuitable default parameters for serial devices.<br><br>
- <a name="FRMdefine"></a>
- <b>Define</b><br><br>
-
- <code>define <name> FRM {<device> | <port> [global]}</code> <br><br>
-
- <ul>
- <li>serial and USB connected devices:<br><br>
- <code><device></code> specifies the serial port to communicate with the Firmata device.
- The name of the serial-device depends on your distribution, under
- linux the cdc_acm kernel module is responsible, and usually a
- /dev/ttyACM0 device will be created. If your distribution does not have a
- cdc_acm module, you can force usbserial to handle the Firmata device by the
- following command:<br>
- <code>modprobe usbserial vendor=0x03eb product=0x204b</code></br>
- In this case the device is most probably /dev/ttyUSB0.<br><br>
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyACM0@38400<br><br>
- If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
- perl module Device::SerialPort is not needed, and FHEM opens the device
- with simple file io. This might work if the operating system uses the same
- defaults for the serial parameters as the Firmata device, e.g. some Linux
- distributions and OSX.<br><br>
- An Arduino compatible device should either use 'StandardFirmata' or 'ConfigurableFirmata' without NetworkFirmata.
- </li><br>
-
- <li>network connected devices:<br><br>
- <code><port></code> specifies the port the FRM device listens on. If <code>global</code> is
- specified the socket is bound to all local IP addresses, otherwise to localhost
- only.<br><br>
- The connection is initiated by the Firmata device in client-mode. Therefore the IP address and port
- of the FHEM server has to be configured in the Firmata device, so it knows where to connect to.<br>
- For multiple Firmata you need separate FRM devices configured to different ports.<br><br>
- An Arduino compatible device should run one of 'StandardFirmataEthernet', 'StandardFirmataWiFi',
- 'ConfigurableFirmata' with NetworkFirmata or 'ConfigurableFirmataWiFi'.
- </li><br>
-
- <li>no device:<br><br>
- If <code><device></code> is set to <code>none</code>, no connection will be opened and you
- can experiment without hardware attached.<br>
- </li>
- </ul>
- <br>
- StandardFirmata supports digital and analog-I/O, servos and I2C. In addition to that ConfigurableFirmata supports 1-Wire and stepper motors.<br><br>
-
- You can find StandardFirmata, StandardFirmataEthernet and StandardFirmataWiFi in the Arduino IDE in the menu 'File->Examples->Firmata'<br><br>
-
- <a href="https://github.com/firmata/arduino/tree/configurable/examples/ConfigurableFirmata">ConfigurableFirmata</a>
- can be installed using the library manager of the Arduino IDE.<br><br>
-
- Further information can be found at the FRM client devices listed above and the
- <a href="http://www.fhemwiki.de/wiki/Arduino_Firmata#Installation_ConfigurableFirmata">FHEM-Wiki</a>.<br><br>
-
- <a name="FRMset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>set <name> reinit</code><br>
- reinitializes the FRM client devices attached to this FRM device
- </li><br>
-
- <li>
- <code>set <name> reset</code><br>
- performs a software reset on the Firmata device and disconnects form the Firmata device - after the Firmata device reconnects the attached FRM client devices are reinitialized
- </li>
- </ul>
- <br><br>
-
- <a name="FRMattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>resetDeviceOnConnect {0|1}, default: 1<br>
- Reset the Firmata device immediately after connect to force default Firmata startup state:
- All pins with analog capability are configured as input, all other (digital) pins are configured as output
- and the input pin reporting, the I2C configuration and the serial port configuration are cancelled and will
- be reinitialized.
- </li><br>
-
- <li>i2c-config <write-read-delay>, no default<br>
- Configure the Arduino for ic2 communication. Definig this attribute will enable I2C on all
- i2c_pins received by the capability-query issued during initialization of FRM.<br>
- As of Firmata 2.3 you can set a delay-time (in microseconds, max. 32767, default: 0) that will be
- inserted into I2C protocol when switching from write to read. This may be necessary because Firmata
- I2C write does not block on the FHEM side so consecutive I2C write/read operations get queued and
- will be executed on the Firmata device in a different time sequence. Use the maximum operation
- time required by the connected I2C devices (e.g. 30000 for the BMP180 with triple oversampling,
- see I2C device manufacturer documentation for details).<br>
- See: <a href="http://www.firmata.org/wiki/Protocol#I2C">Firmata Protocol details about I2C</a>
- </li><br>
-
- <li>sampling-interval <interval>, default: 1000 ms<br>
- Configure the interval Firmata reports analog data to FRM (in milliseconds, max. 32767).<br>
- This interval applies to the operation of <a href="#FRM_I2C">FRM_I2C</a>.<br>
- See: <a href="http://www.firmata.org/wiki/Protocol#Sampling_Interval">Firmata Protocol details about Sampling Interval</a>
- </li><br>
-
- <li>software-serial-config <port>:<rx pin>:<tx pin>, no default<br>
- For using a software serial port (port number 8, 9, 10 or 11) two I/O pins must be specified.
- The rx pin must have interrupt capability and the tx pin must have digital output capability.<br>
- See: <a href="https://www.arduino.cc/en/Reference/SoftwareSerial">Arduino SoftwareSerial Library</a>
- </li><br>
-
- <li>errorExclude <regexp>, no default<br>
- If set will exclude a string message received from the Firmata device that matches the given regexp
- from being logged at verbose=3 and will assign the data to the reading <i>stringMessage</i> instead
- of <i>error</i>. Logging will still be done at verbose=5.
- </li><br>
-
- <li>disable {0|1}, default: 0<br>
- Disables this devices if set to 1.
- </li>
- </ul>
- <br><br>
- <a name="FRMreadings"></a>
- <b>Readings</b><br>
- <ul>
- <li>state<br>
- Possible values are: <i>defined | disabled</i> and depending on the connection type:<br>
- serial: <i>opened | connected | Initialized | disconnected</i><br>
- network: <i>listening | connected | Initialized</i>
- </li><br>
-
- <li>error<br>
- Data of last string message received from Firmata device, typically (but not necessarily) an error of the last operation.
- Data prefixed with <i>I2C</i> will additionally be assigned to the internal reading <i>I2C_ERROR</i>.
- </li><br>
-
- <li>stringMessage<br>
- Data of last string message received from Firmata device that matches attribute <i>errorExclude</i>.
- </li>
- </ul>
- <br><br>
-
- <a name="FRMinternals"></a>
- <b>Internals</b><br>
- <ul>
- <li><code>DRIVER_VERSION</code><br>
- Version of the Perl module Device::Firmata (perl-firmata), should be 0.63 or higher.
- </li><br>
-
- <li><code>protocol_version</code><br>
- Firmata protocol version reported by the Firmata device.
- </li><br>
-
- <li><code>firmware</code><br>
- Firmata firmware name reported by the Firmata device (this is typically the Arduino project name).
- </li><br>
-
- <li><code>firmware_version</code><br>
- Firmata firmware version reported by the Firmata device.
- </li><br>
-
- <li><code>xxx_pins | xxx_resolutions | xxx_ports</code><br>
- Pin capability reported by the Firmata device, where <code>xxx</code> can be one of the following:
- <ul>
- <li><code>input | pullup:</code> digital input, see <a href="#FRM_IN">FRM_IN</a></li>
- <li><code>output:</code> digital output, see <a href="#FRM_OUT">FRM_OUT</a></li>
- <li><code>analog:</code> analog input with ADC of given resolution, see <a href="#FRM_AD">FRM_AD</a></li>
- <li><code>pwm:</code> digital output with PWM capability with DAC of given resolution, see <a href="#FRM_PWM">FRM_PWM</a></li>
- <li><code>servo:</code> analog output with servo capability of given resolution, see <a href="#FRM_SERVO">FRM_SERVO</a></li>
- <li><code>i2c:</code> I2C compatible pin, FRM can be used as IODev of another FHEM I2C device</li>
- <li><code>onewire:</code> OneWire compatible pin, FRM can be used as IODev of <a href="#OWX">OWX</a></li>
- <li><code>stepper:</code> stepper output pin of given resolution, see <a href="#FRM_STEPPER">FRM_STEPPER</a></li>
- <li><code>encoder:</code> rotary encoder input pin of given resolution, see <a href="#FRM_ROTENC">FRM_ROTENC</a></li>
- <li><code>serial:</code> serial rx/tx pin of given port, FRM can be used as serial device of another FHEM device,
- see <a href="#FRMnotes">notes</a>
- </li>
- </ul><br>
-
- <i>Note:</i> A reported capability is a minimum requirement but does not guarantee that this pin function is
- really available. Some reasons for this are (a) boards with same model name may have different hardware and
- firmware revisions with different hardwired special functions for specific pins and (b) a pin function may
- depend on the Arduino platform and specific library version. When something does not work on the fist pin
- you try and you can rule out a wiring problem try some other pins or try to find manufacturer documentation.
- </li>
- </ul>
- <br><br>
-
- <a name="FRMnotes"></a>
- <b>Notes</b><br>
- <ul>
- <li><code>Digital Pins</code><br>
- WARNING: Stock Firmata has a notable default: At the end of the initialization phase of the Firmata device
- after boot or reset and before a host connection can be established all pins with analog input capability will be configured
- as analog input and all pins with "only" digial I/O capability are configured as outputs and set to off. ConfigurableFirmata
- is a little bit more selective in this respect and will only do this if you enable AnalogInputFirmata or DigitalOutputFirmata
- respectively. If your board has a pin without analog capability and you have wired this pin as a digital input this behaviour
- might damage your circuit. CPUs typically set input mode for GPIO pins when resetting to prevent this.<br><br>
-
- You should look for the function "<code>void systemResetCallback()</code>" in your Firmata sketch and change
- "<code>Firmata.setPinMode(i, OUTPUT);</code>" to "<code>Firmata.setPinMode(i, INPUT);</code>" to get a save initial state or
- completely customize the default state of each pin according to your needs by replacing the Firmata reset code.
- </li><br>
-
- <li><code>Serial Ports</code><br>
- A serial device can be connected to a serial port of a network connected Firmata device instead of being directly connected
- to your FHEM computer. This way the Firmata device will become a serial over LAN (SOL) adapter. To use such a remote serial
- port in other FHEM modules you need to set the serial device descriptor to:<br><br>
-
- <code>FHEM:DEVIO:<FRM device name>:<serial port>@<baud rate></code><br><br>
-
- To use a serial port both the RX and TX pin of this port must be available via Firmata, even if one of the pins will not be used.
- Depending on the Firmata version the first hardware serial port (port 0) cannot be used even with network connected
- devices because port 0 is still reserved for the Arduino host communication.
- On some Arduinos you can use software serial ports (ports 8 to 11). FRM supports a maximum of one software serial port that can
- be activated using the software-serial-config attribute.<br><br>
-
- In current Firmata versions serial setup options (data bits, parity, stop bits) cannot be configured but may be compiled into the
- Firmata Firmware (see function "<code>((HardwareSerial*)serialPort)->begin(baud, options)</code>" in SerialFirmata.cpp of the
- Firmata library).<br><br>
-
- Not all FHEM modules for serial devices are compatible with this mode of operation. It will not work if (1) the FHEM module requires
- hardware handshake or direct IO of serial pin like CTS or DTR or (2) the FHEM module does not support the syntax of serial device
- descriptor (e.g. the <a href="#HEATRONIC">HEATRONIC</a> module works perfectly with a single line patch).
- </li>
- </ul>
- </ul>
- <br>
- <p><a name="FRM_AD"></a>
- <h3>FRM_AD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_AD'>DE</a>]</div>
- <ul>
- This module represents a pin of a <a href="http://www.firmata.org">Firmata device</a>
- that should be configured as an analog input.<br><br>
-
- Requires a defined <a href="#FRM">FRM</a> device to work. The pin must be listed in the internal reading "<a href="#FRMinternals">analog_pins</a>"<br>
- of the FRM device (after connecting to the Firmata device) to be used as analog input.<br><br>
-
- <a name="FRM_ADdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_AD <pin></code><br><br>
-
- Defines the FRM_AD device. <pin> is the arduino-pin to use.
- </ul><br>
-
- <a name="FRM_ADset"></a>
- <b>Set</b><br>
- <ul>
- N/A<br>
- </ul><br>
-
- <a name="FRM_ADget"></a>
- <b>Get</b><br>
- <ul>
- <li>reading<br>
- returns the voltage-level equivalent at the arduino-pin. The min value is zero and the max value<br>
- depends on the Firmata device (see internal reading "<a href="#FRMinternals">analog_resolutions</a>" of the FRM device.<br>
- For 10 bits resolution the range is 0 to 1023 (also see <a href="http://arduino.cc/en/Reference/AnalogRead">analogRead()</a> for details)<br></li>
- <li>alarm-upper-threshold<br>
- returns the current state of 'alarm-upper-threshold'. Values are 'on' and 'off' (Defaults to 'off')<br>
- 'alarm-upper-threshold' turns 'on' whenever the 'reading' is higher than the attribute 'upper-threshold'<br>
- it turns 'off' again as soon 'reading' falls below 'alarm-upper-threshold'</li>
- <li>alarm-lower-threshold<br>
- returns the current state of 'alarm-lower-threshold'. Values are 'on' and 'off' (Defaults to 'off')<br>
- 'alarm-lower-threshold' turns 'on' whenever the 'reading' is lower than the attribute 'lower-threshold'<br>
- it turns 'off' again as soon 'reading rises above 'alarm-lower-threshold'</li>
- <li>state<br>
- returns the 'state' reading</li>
- </ul><br>
-
- <a name="FRM_ADattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>upper-threshold<br>
- sets the 'upper-threshold'. Whenever the 'reading' exceeds this value 'alarm-upper-threshold' is set to 'on'<br>
- As soon 'reading' falls below the 'upper-threshold' 'alarm-upper-threshold' turns 'off' again<br>
- Defaults to the max pin resolution plus one.</li>
- <li>lower-threshold<br>
- sets the 'lower-threshold'. Whenever the 'reading' falls below this value 'alarm-lower-threshold' is set to 'on'<br>
- As soon 'reading' rises above the 'lower-threshold' 'alarm-lower-threshold' turns 'off' again<br>
- Defaults to -1.</li>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul><br>
-
- <a name="FRM_ADnotes"></a>
- <b>Notes</b><br>
- <ul>
- <li>attribute <i>stateFormat</i><br>
- In most cases it is a good idea to assign "reading" to the attribute <i>stateFormat</i>. This will show the
- current value of the pin in the web interface.
- </li>
- </ul>
- </ul><br>
- <p><a name="FRM_I2C"></a>
- <h3>FRM_I2C</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_I2C'>DE</a>]</div>
- <ul>
- represents an integrated curcuit connected to the i2c-pins of an <a href="http://www.arduino.cc">Arduino</a>
- running <a href="http://www.firmata.org">Firmata</a><br>
- Requires a defined <a href="#FRM">FRM</a>-device to work.<br>
- this FRM-device has to be configures for i2c by setting attr 'i2c-config' on the FRM-device<br>
- it reads out the ic-internal storage in intervals of 'sampling-interval' as set on the FRM-device<br><br>
-
- <a name="FRM_I2Cdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_I2C <i2c-address> <register> <bytes-to-read></code> <br>
- Specifies the FRM_I2C device.<br>
- <li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
- <li>register is the (device-internal) address to start reading bytes from.</li>
- <li>bytes-to-read is the number of bytes read from the ic</li>
- </ul>
-
- <br>
- <a name="FRM_I2Cset"></a>
- <b>Set</b><br>
- <ul>
- N/A<br>
- </ul>
- <a name="FRM_I2Cget"></a>
- <b>Get</b><br>
- <ul>
- N/A<br>
- </ul><br>
- <a name="FRM_I2Cattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul>
- </ul>
- <br>
- <p><a name="FRM_IN"></a>
- <h3>FRM_IN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_IN'>DE</a>]</div>
- <ul>
- This module represents a pin of a <a href="http://www.firmata.org">Firmata device</a>
- that should be configured as a digital input.<br><br>
- Requires a defined <a href="#FRM">FRM</a> device to work. The pin must be listed in
- the internal reading <a href="#FRMinternals">"input_pins" or "pullup_pins"</a><br>
- of the FRM device (after connecting to the Firmata device) to be used as digital input with or without pullup.<br><br>
- <a name="FRM_INdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_IN <pin></code> <br>
- Defines the FRM_IN device. <pin>> is the arduino-pin to use.
- </ul>
- <br>
- <a name="FRM_INset"></a>
- <b>Set</b><br>
- <ul>
- <li>alarm on|off<br>
- set the alarm to on or off. Used to clear the alarm.<br>
- The alarm is set to 'on' whenever the count reaches the threshold and doesn't clear itself.</li>
- </ul><br>
- <a name="FRM_INget"></a>
- <b>Get</b>
- <ul>
- <li>reading<br>
- returns the logical state of the arduino-pin. Values are 'on' and 'off'.<br></li>
- <li>count<br>
- returns the current count. Contains the number of toggles of the arduino-pin.<br>
- Depending on the attribute 'count-mode' every rising or falling edge (or both) is counted.</li>
- <li>alarm<br>
- returns the current state of 'alarm'. Values are 'on' and 'off' (Defaults to 'off')<br>
- 'alarm' doesn't clear itself, has to be set to 'off' explicitly.</li>
- <li>state<br>
- returns the 'state' reading</li>
- </ul><br>
- <a name="FRM_INattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>activeLow <yes|no></li>
- <li>count-mode none|rising|falling|both<br>
- Determines whether 'rising' (transitions from 'off' to 'on') of falling (transitions from 'on' to 'off')<br>
- edges (or 'both') are counted. Defaults to 'none'</li>
- <li>count-threshold <number><br>
- sets the theshold-value for the counter. Whenever 'count' reaches the 'count-threshold' 'alarm' is<br>
- set to 'on'. Use 'set alarm off' to clear the alarm.</li>
- <li>reset-on-threshold-reached yes|no<br>
- if set to 'yes' reset the counter to 0 when the threshold is reached (defaults to 'no').
- </li>
- <li>internal-pullup on|off<br>
- allows to switch the internal pullup resistor of arduino to be en-/disabled. Defaults to off.
- </li>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul><br>
- <a name="FRM_INnotes"></a>
- <b>Notes</b><br>
- <ul>
- <li>attribute <i>stateFormat</i><br>
- In most cases it is a good idea to assign "reading" to the attribute <i>stateFormat</i>. This will show the state
- of the pin in the web interface.
- </li>
- </ul>
- </ul><br>
- <p><a name="FRM_LCD"></a>
- <h3>FRM_LCD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_LCD'>DE</a>]</div>
- <ul>
- deprecated, use <a href="#I2C_LCD">I2C_LCD</a>
- </ul>
- <p><a name="FRM_OUT"></a>
- <h3>FRM_OUT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_OUT'>DE</a>]</div>
- <ul>
- This module represents a pin of a <a href="http://www.firmata.org">Firmata device</a>
- that should be configured as a digital output.<br><br>
-
- Requires a defined <a href="#FRM">FRM</a> device to work. The pin must be listed in
- the internal reading "<a href="#FRMinternals">output_pins</a>"<br>
- of the FRM device (after connecting to the Firmata device) to be used as digital output.<br><br>
-
- <a name="FRM_OUTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_OUT <pin></code> <br>
- Defines the FRM_OUT device. <pin>> is the arduino-pin to use.
- </ul><br>
-
- <a name="FRM_OUTset"></a>
- <b>Set</b><br>
- <ul>
- <code>set <name> on|off</code><br><br>
- </ul>
- <ul>
- <a href="#setExtensions">set extensions</a> are supported<br>
- </ul><br>
-
- <a name="FRM_OUTget"></a>
- <b>Get</b><br>
- <ul>
- N/A
- </ul><br>
-
- <a name="FRM_OUTattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>restoreOnStartup <on|off>, default: on<br>
- Set output value in Firmata device on FHEM startup (if device is already connected) and
- whenever the <em>setstate</em> command is used.
- </li>
- <li>restoreOnReconnect <on|off>, default: on<br>
- Set output value in Firmata device after IODev is initialized.
- </li>
- <li>activeLow <yes|no>, default: no</li>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li>valueMode <send|receive|bidirectional>, default: send<br>
- Define how the reading <em>value</em> is updated:<br>
- <ul>
- <li>send - after sending</li>
- <li>receive - after receiving</li>
- <li>bidirectional - after sending and receiving</li>
- </ul>
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul><br>
-
- <a name="FRM_OUTnotes"></a>
- <b>Notes</b><br>
- <ul>
- <li>attribute <i>stateFormat</i><br>
- In most cases it is a good idea to assign "value" to the attribute <i>stateFormat</i>. This will show the state
- of the pin in the web interface.
- </li>
- <li>attribute <i>valueMode</i><br>
- For modes "receive<" and "bidirectional" to work the default Firmata application code must
- be modified in function "<code>setPinModeCallback</code>":<br>
- add "<ins> || mode == OUTPUT</ins>" to the if condition for "<code>portConfigInputs[pin / 8] |= (1 << (pin & 7));</code>" to enable<br>
- reporting the output state (as if the pin were an input). This is of interest if you have custom code in your Firmata device that can change<br>
- the state of an output or you want a feedback from the Firmata device after the output state was changed.
- </li>
- </ul>
- </ul><br>
- <p><a name="FRM_PWM"></a>
- <h3>FRM_PWM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_PWM'>DE</a>]</div>
- <ul>
- This module represents a pin of a <a href="http://www.firmata.org">Firmata device</a>
- that should be configured as a pulse width modulated output (PWM).<br><br>
-
- Requires a defined <a href="#FRM">FRM</a> device to work. The pin must be listed in the internal reading "<a href="#FRMinternals">pwm_pins</a>"<br>
- of the FRM device (after connecting to the Firmata device) to be used as PWM output.<br><br>
-
- <a name="FRM_PWMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_PWM <pin></code><br><br>
-
- Defines the FRM_PWM device. <pin>> is the arduino-pin to use.
- </ul><br>
-
- <a name="FRM_PWMset"></a>
- <b>Set</b><br>
- <ul>
- <li><code>set <name> on</code><br>
- sets the pulse-width to 100%<br>
- </li>
- <li>
- <code>set <name> off</code><br>
- sets the pulse-width to 0%<br>
- </li>
- <li>
- <a href="#setExtensions">set extensions</a> are supported<br>
- </li>
- <li>
- <code>set <name> toggle</code><br>
- toggles the pulse-width in between to the last value set by 'value' or 'dim' and 0 respectivly 100%<br>
- </li>
- <li>
- <code>set <name> value <value></code><br>
- sets the pulse-width to the value specified<br>
- The min value is zero and the max value depends on the Firmata device (see internal reading<br>
- "<a href="#FRMinternals">pwm_resolutions</a>" of the FRM device). For 8 bits resolution the range
- is 0 to 255 (also see <a href="http://arduino.cc/en/Reference/AnalogWrite">analogWrite()</a> for details)<br>
- </li>
- <li>
- <code>set <name> dim <value></code><br>
- sets the pulse-width to the value specified in percent<br>
- Range is from 0 to 100<br>
- </li>
- <li>
- <code>set <name> dimUp</code><br>
- increases the pulse-width by 10%<br>
- </li>
- <li>
- <code>set <name> dimDown</code><br>
- decreases the pulse-width by 10%<br>
- </li>
- </ul><br>
-
- <a name="FRM_PWMget"></a>
- <b>Get</b><br>
- <ul>
- N/A
- </ul><br>
-
- <a name="FRM_PWMattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>restoreOnStartup <on|off></li>
- <li>restoreOnReconnect <on|off></li>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul><br>
-
- <a name="FRM_PWMnotes"></a>
- <b>Notes</b><br>
- <ul>
- <li>attribute <i>stateFormat</i><br>
- In most cases it is a good idea to assign "value" to the attribute <i>stateFormat</i>. This will show the
- current value of the pin in the web interface.
- </li>
- </ul>
- </ul><br>
- <p><a name="FRM_RGB"></a>
- <h3>FRM_RGB</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_RGB'>DE</a>]</div>
- <ul>
- 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>
- <br>
- The value set will be output by the specified pins as pulse-width-modulated signals.<br>
- Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
-
- <a name="FRM_RGBdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_RGB <pin> <pin> <pin> [pin...]</code> <br>
- Defines the FRM_RGB device. <pin>> are the arduino-pin to use.<br>
- For rgb-controlled devices first pin drives red, second pin green and third pin blue.
- </ul>
-
- <br>
- <a name="FRM_RGBset"></a>
- <b>Set</b><br>
- <ul>
- <code>set <name> on</code><br>
- sets the pulse-width of all configured pins to 100%</ul><br>
- <ul>
- <code>set <name> off</code><br>
- sets the pulse-width of all configured pins to 0%</ul><br>
- <ul>
- <a href="#setExtensions">set extensions</a> are supported</ul><br>
- <ul>
- <code>set <name> toggle</code><br>
- 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>
- <ul>
- <code>set <name> rgb <value></code><br>
- sets the pulse-width of all channels at once. Also sets the value toggle can switch to<br>
- Value is encoded as hex-string, 2-digigs per channel (e.g. FFFFFF for reguler rgb)</ul><br>
- <ul>
- <code>set <name> pct <value></code><br>
- dims all channels at once while leving the ratio in between the channels unaltered.<br>
- Range is 0-100 ('pct' stands for 'percent')</ul><br>
- <ul>
- <code>set <name> dimUp</code><br>
- dims up by 10%</ul><br>
- <ul>
- <code>set <name> dimDown</code><br>
- dims down by 10%</ul><br>
- <a name="FRM_RGBget"></a>
- <b>Get</b><br>
- <ul>
- <code>get <name> rgb</code><br>
- returns the values set for all channels. Format is hex, 2 nybbles per channel.
- </ul><br>
- <ul>
- <code>get <name> RGB</code><br>
- returns the values set for all channels in normalized format. Format is hex, 2 nybbles per channel.
- Values are scaled such that the channel with the highest value is set to FF. The real values are calculated
- by multipying each byte with the value of 'pct'.
- </ul><br>
- <ul>
- <code>get <name> pct</code><br>
- returns the value of the channel with the highest value scaled to the range of 0-100 (percent).
- </ul><br>
- <a name="FRM_RGBattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>restoreOnStartup <on|off></li>
- <li>restoreOnReconnect <on|off></li>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul>
- </ul>
- <br>
- <p><a name="FRM_ROTENC"></a>
- <h3>FRM_ROTENC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_ROTENC'>DE</a>]</div>
- <ul>
- 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>
- Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
-
- <a name="FRM_ROTENCdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_ROTENC <pinA> <pinB> [id]</code> <br>
- Defines the FRM_ROTENC device. <pinA>> and <pinA>> are the arduino-pins to use.<br>
- [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>
- </ul>
-
- <br>
- <a name="FRM_ROTENCset"></a>
- <b>Set</b><br>
- <li>reset<br>
- resets to value of 'position' to 0<br></li>
- <li>offset <value><br>
- set offset value of 'position'<br></li>
- <a name="FRM_ROTENCget"></a>
- <b>Get</b>
- <ul>
- <li>position<br>
- returns the position of the rotary-encoder attached to pinA and pinB of the arduino<br>
- the 'position' is the sum of 'value' and 'offset'<br></li>
- <li>offset<br>
- returns the offset value<br>
- on shutdown of fhem the latest position-value is saved as new offset.<br></li>
- <li>value<br>
- returns the raw position value as it's reported by the rotary-encoder attached to pinA and pinB of the arduino<br>
- this value is reset to 0 whenever Arduino restarts or Firmata is reinitialized<br></li>
- </ul><br>
- <a name="FRM_ROTENCattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul>
- </ul>
- <br>
- <p><a name="FRM_SERVO"></a>
- <h3>FRM_SERVO</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_SERVO'>DE</a>]</div>
- <ul>
- represents a pin of an <a href="http://www.arduino.cc">Arduino</a> running <a href="http://www.firmata.org">Firmata</a>
- configured to drive a pwm-controlled servo-motor.<br>
- 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>
- Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
-
- <a name="FRM_SERVOdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_SERVO <pin></code> <br>
- Defines the FRM_SERVO device. <pin>> is the arduino-pin to use.
- </ul>
-
- <br>
- <a name="FRM_SERVOset"></a>
- <b>Set</b><br>
- <ul>
- <code>set <name> angle <value></code><br>sets the angle of the servo-motors shaft to the value specified (in degrees).<br>
- </ul>
- <a name="FRM_SERVOget"></a>
- <b>Get</b><br>
- <ul>
- N/A
- </ul><br>
- <a name="FRM_SERVOattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li>min-pulse<br>
- sets the minimum puls-width to use. Defaults to 544. For most servos this translates into a rotation of 180° counterclockwise.</li>
- <li>max-pulse<br>
- sets the maximum puls-width to use. Defaults to 2400. For most servos this translates into a rotation of 180° clockwise</li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul>
- </ul>
- <br>
- <p><a name="FRM_STEPPER"></a>
- <h3>FRM_STEPPER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FRM_STEPPER'>DE</a>]</div>
- <ul>
- 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>
- Requires a defined <a href="#FRM">FRM</a>-device to work.<br><br>
-
- <a name="FRM_STEPPERdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FRM_STEPPER [DRIVER|TWO_WIRE|FOUR_WIRE] <directionPin> <stepPin> [motorPin3 motorPin4] stepsPerRev [stepper-id]</code><br>
- Defines the FRM_STEPPER device.
- <li>[DRIVER|TWO_WIRE|FOUR_WIRE] defines the control-sequence being used to drive the motor.
- <ul>
- <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>
- <li>FOUR_WIRE: motor is attached via four wires each driving one coil individually.</li>
- <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
- 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>
- </ul>
- </li>
- <li>
- <ul>
- <li>The sequence of control signals for 4 control wires is as follows:<br>
- <br>
- <code>
- Step C0 C1 C2 C3<br>
- 1 1 0 1 0<br>
- 2 0 1 1 0<br>
- 3 0 1 0 1<br>
- 4 1 0 0 1<br>
- </code>
- </li>
- <li>The sequence of controls signals for 2 control wires is as follows:<br>
- (columns C1 and C2 from above):<br>
- <br>
- <code>
- Step C0 C1<br>
- 1 0 1<br>
- 2 1 1<br>
- 3 1 0<br>
- 4 0 0<br>
- </code>
- </li>
- </ul>
- </li>
- <li>
- 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>
- that can be archived either by rearranging the physical connections, or by mapping the connection to the pin-definitions in FRM_STEPPERS define:<br>
- 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>
- <code>define stepper FRM_STEPPER FOUR_WIRE 7 5 6 8 64 0</code><br>
- when being connected to the arduio with:<br>
- <code>motor pin1 <-> arduino pin5<br>
- motor pin2 <-> arduino pin6<br>
- motor pin3 <-> arduino pin7<br>
- motor pin4 <-> arduino pin8<br>
- motor pin5 <-> ground</code><br>
- </li>
- </ul>
-
- <br>
- <a name="FRM_STEPPERset"></a>
- <b>Set</b><br>
- <ul>
- <code>set <name> reset</code>
- <li>resets the reading 'position' to 0 without moving the motor</li>
- <br>
- <code>set <name> position <position> [speed] [acceleration] [deceleration]</code>
- <li>moves the motor to the absolute position specified. positive or negative integer<br>
- 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>
- acceleration and deceleration are optional.<br>
- </li>
- <br>
- <code>set <name> step <stepstomove> [speed] [accel] [decel]</code>
- <li>moves the motor the number of steps specified. positive or negative integer<br>
- speed, accelleration and deceleration are optional.<br>
- </li>
- </ul>
- <a name="FRM_STEPPERget"></a>
- <b>Get</b><br>
- <ul>
- N/A
- </ul><br>
- <a name="FRM_STEPPERattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>restoreOnStartup <on|off></li>
- <li>restoreOnReconnect <on|off></li>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#FRM">FRM</a> to use. (Optional, only required if there is more
- than one FRM-device defined.)
- </li>
- <li>>speed (same meaning as in 'set position')</li>
- <li>acceleration (same meaning as in 'set position')</li>
- <li>deceleration (same meaning as in 'set position')</li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul>
- </ul>
- <br>
- <p><a name="FReplacer"></a>
- <h3>FReplacer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FReplacer'>DE</a>]</div>
- <ul>
- 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>
- The typical use case is a custom designed SVG graphics template file which contains place holders that will be replaced with actual values.<br>
- 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.
- <br><br>
- <a name="FReplacerdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> FReplacer <InputFile> <OutputFile> <Interval></code>
- <br><br>
- 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>
- <br>
- Example:<br>
- <ul><code>define fr FReplacer /opt/fhem/www/images/template.svg /opt/fhem/www/images/status.svg 60</code></ul>
- </ul>
- <br>
- <a name="FReplacerconfiguration"></a>
- <b>Configuration of FReplacer Devices</b><br><br>
- <ul>
- 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
- <br><br>
- Example:<br>
- <ul><code>
- define fr FReplacer /opt/fhem/www/images/template.svg /opt/fhem/www/images/status.svg 60 <br>
- attr fr Rep01Regex HeizungStat<br>
- attr fr Rep01Reading WP:Status<br>
- attr fr Rep01MaxAge 600:Heizung Aus<br>
- attr fr Rep02Regex AbluftTemp<br>
- attr fr Rep02Reading Lueftung:Temp_Abluft<br>
- attr fr Rep02Format "%.1f"<br>
- attr fr Rep03Regex AussenTemp<br>
- attr fr Rep03Expr sprintf("%.1f", ReadingsVal("Lueftung", "Temp_Aussen", 0))<br>
- </code></ul>
- <br>
- 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>
- you have to specify the external conversion command with the attribute PostCommand, for Example:<br>
- <ul><code>
- attr fr PostCommand convert /opt/fhem/www/images/status.svg -type GrayScale -depth 8 /opt/fhem/www/images/status.png 2>/dev/null &
- </code></ul>
- <br>
- If you want to convert the replacement text from Readings to UTF8, e.g. to make special characters / umlauts display correctly, specify
- <ul><code>
- attr fr ReplacementEncode UTF-8
- </code></ul>
- <br>
- </ul>
-
- <a name="FReplacerset"></a>
- <b>Set-Commands</b><br>
- <ul>
- <li><b>ReplaceNow</b></li>
- starts a replace without waiting for the interval
- </ul>
- <br>
- <a name="FReplacerget"></a>
- <b>Get-Commands</b><br>
- <ul>
- none
- </ul>
- <br>
- <a name="FReplacerReadings"></a>
- <b>Readings</b><br>
- <ul>
- <li><b>LastUpdate</b></li>
- 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.
- </ul>
- <br>
- <a name="FReplacerattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><b>Rep[0-9]+Regex</b></li>
- defines the regex to be used for finding the right string to be replaced with the corresponding Reading / Expr result
- <li><b>Rep[0-9]+Reading</b></li>
- defines a device and reading to be used as replacement value. It is specified as devicename:readingname:default_value.<br>
- The default_value is optional and defaults to 0. If the reading doesn't exist, default_value is used.
- <li><b>Rep[0-9]+Text</b></li>
- Use static text as replacement value.
- <li><b>Rep[0-9]+Tidy</b></li>
- XML encode special characters in this replacement.
- <li><b>Rep[0-9]+MaxAge</b></li>
- 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>
- If you specify the replacement as {expr} then it is evaluated as a perl expression instead of a string.<br>
- <li><b>Rep[0-9]+MinValue</b></li>
- 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>
- If you specify the replacement as {expr} then it is evaluated as a perl expression instead of a string.<br>
- <li><b>Rep[0-9]+MaxValue</b></li>
- 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>
- If you specify the replacement as {expr} then it is evaluated as a perl expression instead of a string.<br>
- <li><b>Rep[0-9]+Expr</b></li>
- 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>
- If only RepExpr is specified then readings can be retrieved with the perl function ReadingsVal() inside the expression. <br>
- If neither RepExpr nor RepReading is specified then the match for the correspondig regex will be replaced with an empty string.
- <li><b>Rep[0-9]+Format</b></li>
- defines an optional format string to be used in a sprintf statement to format the replacement before it is applied.<br>
- Can be used with RepReading or RepExpr or both.
- <li><b>Rep[0-9]+SVG</b></li>
- defines a SVG Plot be used as replacement. It is specified as the name of a defined fhem SVG.<br>
- 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.
- <li><b>LUTimeFormat</b></li>
- defines a time format string (see Posix strftime format) to be used when creating the reading LastUpdate.
- <li><b>PostCommand</b></li>
- Execute an external command after writing the output file, e.g. to convert a resulting SVG file to a PNG file.
- 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>
- <code> attr fr PostCommand convert /opt/fhem/www/images/status.svg
- -type GrayScale -depth 8 /opt/fhem/www/images/status.png 2>/dev/null & </code><br>
- a more advanced example that starts inkscape before Imagemagick to make sure that embedded Icons in a SVG file are converted
- correctly could be <br>
- <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>
- or even <br>
- <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>
- 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
- <li><b>ReplacementEncode</b></li>
- defines an encoding to apply to the replacement string, e.g. UTF-8
- <li><b>disable</b></li>
- disables the update timer
- </ul>
- </ul>
- <p><a name="FS20"></a>
- <h3>FS20</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FS20'>DE</a>]</div>
- <ul>
- The FS20 protocol is used by a wide range of devices, which are either of
- the sender/sensor category or the receiver/actuator category. The radio
- (868.35 MHz) messages are either received through an <a href="#FHZ">FHZ</a>
- or an <a href="#CUL">CUL</a> device, so this must be defined first.
- <br><br>
- <a name="FS20define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FS20 <housecode> <button>
- [fg <fgaddr>] [lm <lmaddr>] [gm FF] </code>
- <br><br>
- The values of housecode, button, fg, lm, and gm can be either defined as
- hexadecimal value or as ELV-like "quad-decimal" value with digits 1-4. We
- will reference this ELV-like notation as ELV4 later in this document. You
- may even mix both hexadecimal and ELV4 notations, because FHEM can detect
- the used notation automatically by counting the digits.<br>
- <ul>
- <li><code><housecode></code> is a 4 digit hex or 8 digit ELV4 number,
- corresponding to the housecode address.</li>
- <li><code><button></code> is a 2 digit hex or 4 digit ELV4 number,
- corresponding to a button of the transmitter.</li>
- <li>The optional <code><fgaddr></code> specifies the function group.
- It is a 2 digit hex or 4 digit ELV address. The first digit of the hex
- address must be F or the first 2 digits of the ELV4 address must be
- 44.</li>
- <li>The optional <code><lmaddr></code> specifies the local
- master. It is a 2 digit hex or 4 digit ELV address. The last digit of the
- hex address must be F or the last 2 digits of the ELV4 address must be
- 44.</li>
- <li>The optional gm specifies the global master, the address must be FF if
- defined as hex value or 4444 if defined as ELV4 value.</li>
- </ul>
- <br>
- Examples:
- <ul>
- <code>define lamp FS20 7777 00 fg F1 gm F</code><br>
- <code>define roll1 FS20 7777 01</code><br>
- <code>define otherlamp FS20 24242424 1111 fg 4412 gm 4444</code><br>
- <code>define otherroll1 FS20 24242424 1114</code>
- </ul>
- </ul>
- <br>
- <a name="FS20set"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<time>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul><code>
- dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50%<br>
- dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br>
- dimdown<br>
- dimup<br>
- dimupdown<br>
- off<br>
- off-for-timer<br>
- on # dimmer: set to value before switching it off<br>
- on-for-timer # see the note<br>
- on-old-for-timer # set to previous (before switching it on)<br>
- ramp-on-time # time to reach the desired dim value on dimmers<br>
- ramp-off-time # time to reach the off state on dimmers<br>
- reset<br>
- sendstate<br>
- timer<br>
- toggle # between off and previous dim val<br>
- </code></ul>
- The <a href="#setExtensions"> set extensions</a> are also supported.<br>
- <br>
- Examples:
- <ul>
- <code>set lamp on</code><br>
- <code>set lamp1,lamp2,lamp3 on</code><br>
- <code>set lamp1-lamp3 on</code><br>
- <code>set lamp on-for-timer 12</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>Use reset with care: the device forgets even the housecode.
- </li>
- <li>As the FS20 protocol needs about 0.22 seconds to transmit a
- sequence, a pause of 0.22 seconds is inserted after each command.
- </li>
- <li>The FS20ST switches on for dim*%, dimup. It does not respond to
- sendstate.</li>
- <li>If the timer is set (i.e. it is not 0) then on, dim*,
- and *-for-timer will take it into account (at least by the FS20ST).
- </li>
- <li>The <code>time</code> argument ranges from 0.25sec to 4 hours and 16
- minutes. As the time is encoded in one byte there are only 112
- distinct values, the resolution gets coarse with larger values. The
- program will report the used timeout if the specified one cannot be
- set exactly. The resolution is 0.25 sec from 0 to 4 sec, 0.5 sec
- from 4 to 8 sec, 1 sec from 8 to 16 sec and so on. If you need better
- precision for large values, use <a href="#at">at</a> which has a 1
- sec resolution.</li>
- </ul>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="FS20attr"></a>
- <b>Attributes</b>
- <ul>
- <a name="IODev"></a>
- <li>IODev<br>
- Set the IO or physical device which should be used for sending signals
- for this "logical" device. An example for the physical device is an FHZ
- or a CUL. Note: Upon startup FHEM assigns each logical device
- (FS20/HMS/KS300/etc) the last physical device which can receive data
- for this type of device. The attribute IODev needs to be used only if
- you attached more than one physical device capable of receiving signals
- for this logical device.</li><br>
- <a name="eventMap"></a>
- <li>eventMap<br>
- Replace event names and set arguments. The value of this attribute
- consists of a list of space separated values, each value is a colon
- separated pair. The first part specifies the "old" value, the second
- the new/desired value. If the first character is slash(/) or komma(,)
- then split not by space but by this character, enabling to embed spaces.
- Examples:<ul><code>
- attr store eventMap on:open off:closed<br>
- attr store eventMap /on-for-timer 10:open/off:closed/<br>
- set store open
- </code></ul>
- </li><br>
- <a name="attrdummy"></a>
- <li>dummy<br>
- Set the device attribute dummy to define devices which should not
- output any radio signals. Associated notifys will be executed if
- the signal is received. Used e.g. to react to a code from a sender, but
- it will not emit radio signal if triggered in the web frontend.
- </li><br>
- <a name="follow-on-for-timer"></a>
- <li>follow-on-for-timer<br>
- schedule a "setstate off;trigger off" for the time specified as argument to
- the on-for-timer command. Or the same with on, if the command is
- off-for-timer.
- </li><br>
- <a name="follow-on-timer"></a>
- <li>follow-on-timer<br>
- Like with follow-on-for-timer schedule a "setstate off;trigger off", but
- this time for the time specified as argument in seconds to this attribute.
- This is used to follow the pre-programmed timer, which was set previously
- with the timer command or manually by pressing the button on the device,
- see your manual for details. Works for on and dim commands.
- </li><br>
- <a name="model"></a>
- <li>model<br>
- The model attribute denotes the model type of the device.
- The attributes will (currently) not be used by the fhem.pl directly.
- It can be used by e.g. external programs or web interfaces to
- distinguish classes of devices and send the appropriate commands
- (e.g. "on" or "off" to a fs20st, "dim..%" to fs20du etc.).
- The spelling of the model names are as quoted on the printed
- documentation which comes which each device. This name is used
- without blanks in all lower-case letters. Valid characters should be
- <code>a-z 0-9</code> and <code>-</code> (dash),
- other characters should be ommited. Here is a list of "official"
- devices:<br><br>
- <b>Sender/Sensor</b>: fs20fms fs20hgs fs20irl fs20kse fs20ls
- fs20pira fs20piri fs20piru fs20s16 fs20s20 fs20s4 fs20s4a fs20s4m
- fs20s4u fs20s4ub fs20s8 fs20s8m fs20sd fs20sn fs20sr fs20ss
- fs20str fs20tc1 fs20tc6 fs20tfk fs20tk fs20uts fs20ze fs20bf fs20si3<br><br>
- <b>Dimmer</b>: fs20di fs20di10 fs20du<br><br>
- <b>Receiver/Actor</b>: fs20as1 fs20as4 fs20ms2 fs20rgbsa fs20rst
- fs20rsu fs20sa fs20sig fs20sm4 fs20sm8 fs20st fs20su fs20sv fs20ue1
- fs20usr fs20ws1
- </li><br>
- <a name="ignore"></a>
- <li>ignore<br>
- Ignore this device, e.g. if it belongs to your neighbour. The device
- won't trigger any FileLogs/notifys, issued commands will silently
- ignored (no RF signal will be sent out, just like for the <a
- href="#attrdummy">dummy</a> attribute). The device won't appear in the
- list command (only if it is explicitely asked for it), nor will it
- appear in commands which use some wildcard/attribute as name specifiers
- (see <a href="#devspec">devspec</a>). You still get them with the
- "ignored=1" special devspec.
- </li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li>useSetExtensions<br>
- Setting it to 0 you can disable using the Setextensions. Deffault is 1.
- </li><br>
- </ul>
- <br>
- <a name="FS20events"></a>
- <b>Generated events:</b>
- <ul>
- From an FS20 device you can receive one of the following events.
- <li>on</li>
- <li>off</li>
- <li>toggle</li>
- <li>dimdown</li>
- <li>dimup</li>
- <li>dimupdown</li>
- <li>on-for-timer</li>
- Which event is sent is device dependent and can sometimes configured on
- the device.
- </ul>
- </ul>
- <p><a name="FTUISRV"></a>
- <h3>FTUISRV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FTUISRV'>DE</a>]</div>
- <ul>
- Provides a mini HTTP server plugin for FHEMWEB for the specific use with FTUI.
- It serves files from a given directory and parses them according to specific rules.
- 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).
-
- FTUISRV is an extension to <a href="FTUISRV">FHEMWEB</a> and code is based on HTTPSRV. You must install FHEMWEB to use FTUISRV.</p>
-
- FTUISRV is able to handled includes and replacements in files before sending the result back to the client (Browser).
- Special handling of files is ONLY done if the filenames include the specific pattern ".ftui." in the filename.
- For example a file named "test.ftui.html" would be handled specifically in FTUISRV.
-
- <br><br>
- FTUI files can contain the following elements
- <ul><br>
- <li><code><?ftui-inc="name" varname1="content1" ... varnameN="contentN" ?></code> <br>
- INCLUDE statement: Including other files that will be embedded in the result at the place of the include statement.
- Additionally in the embedded files the variables listed as varnamex will be replaced by the content
- enclosed in double quotes (").
- <br>
- The quotation marks and the spaces between the variable replacements and before the final ? are significant and can not be ommitted.
- <br>Example: <code><?ftui-inc="temphum-inline.ftui.part" thdev="sensorWZ" thformat="top-space-2x" thtemp="measured-temp" ?></code>
- </li><br>
- <li><code><?ftui-if=( expression ) ?> ... [ <?ftui-else ?> ... ] <?ftui-endif ?> </code> <br>
- 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 .
- <br>
- Example: <code><?ftui-if=( [tempdevice:batteryok] ) ?> ... <?ftui-else ?> ... <?ftui-endif ?> </code>
- <br>
- Note: The expression is not automatically evaluated in perl, if this is needed there should be the set-logic for perl expressions being used
- Example: <code><?ftui-if=( {( ReadingsVal("tempdevice","batteryok","") eq "ok" )} ) ?> ... <?ftui-else ?> ... <?ftui-endif ?> </code>
- </li><br>
- <li><code><?ftui-loopinc="name" loopvariable=( loop-expression ) varname1="content1" ... varnameN="contentN" ?></code> <br>
- 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
- <br>
- The quotation marks and the spaces between the variable replacements and before the final ? are significant and can not be ommitted.
- <br>Example: <code><?ftui-loopinc="temphum-inline.ftui.part" thdev=( list TYPE=CUL_TX ) thformat="top-space-2x" thtemp="measured-temp" ?></code>
- </li><br>
-
- <li><code><?ftui-key=varname ?></code> <br>
- VARIABLE specification: Replacement of variables with given parameters in the include statement (or the include header).
- The text specified for the corresponding variable will be inserted at the place of the FTUI-Statement in parentheses.
- There will be no space or other padding added before or after the replacement,
- the replacement will be done exactly as specified in the definition in the include
- <br>Example: <code><?ftui-key=measured-temp ?></code>
- </li><br>
- <li><code><?ftui-header="include name" varname1[="defaultcontent1"] .. varnameN[="defaultcontentN"] ?></code> <br>
- HEADER definition: Optional header for included files that can be used also to specify which variables are used in the include
- file and optionally specify default content for the variables that will be used if no content is specified in the include statement.
- the header is removed from the output given by FTUISRV.
- Headers are only required if default values should be specified and are helpful in showing the necessary variable names easy for users.
- (The name for the include does not need to be matching the file name)
- <br>Example: <code><?ftui-header="TempHum inline" thdev thformat thtemp="temperature" ?></code>
- 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)
- <br>Example: <code><?ftui-header="TempHum inline" thdev thformat thbattery=[temphm:batteryok] thtemp="temperature" ?></code>
- <br>
- 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:
- Example: <code><?ftui-header="TempHum inline" thdev thformat thbattery=[<ftui-key=thdev ?\>:batteryok] thtemp="temperature" ?></code>
- </li><br>
- </ul>
-
- <br><br>
- <a name="FTUISRVdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> <infix> <directory> <friendlyname></code><br><br>
- Defines the HTTP server. <code><infix></code> is the portion behind the FHEMWEB base URL (usually
- <code>http://hostname:8083/fhem</code>), <code><directory></code> is the absolute path the
- files are served from, and <code><friendlyname></code> is the name displayed in the side menu of FHEMWEB.<p><p>
- <br>
- </ul>
- <a name="FTUISRVset"></a>
- <b>Set</b>
- <ul>
- n/a
- </ul>
- <br><br>
- <a name="FTUISRVattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li><code>validateFiles <0,1,2></code><br>
- Allows basic validation of HTML/Part files on correct opening/closing tags etc.
- 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 !)
- </li>
- <li><code>validateResult <0,1,2></code><br>
- Allows basic validation of HTML content on correct opening/closing tags etc. Here the resulting content provided to the browser
- (after parsing) are validated (setting to 1 means validation is done / 2 means also the full parsing is logged (Attention very verbose !)
- </li>
- <li><code>templateFiles <relative paths separated by :></code><br>
- 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.
- </li>
- </ul>
- <br><br>
- </ul>
- <p><a name="FULLY"></a>
- <h3>FULLY</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FULLY'>DE</a>]</div>
- <ul>
- Module for controlling of Fully browser on Android tablets.
- </br></br>
-
- <a name="HMCCUdefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> FULLY <HostOrIP> <password> [<poll-interval>]</code>
- <br/><br/>
- The parameter <i>password</i> is the password set in Fully browser.
- </ul>
- <br/>
-
- <a name="FULLYset"></a>
- <b>Set</b><br/><br/>
- <ul>
- <li><b>set <name> brightness 0-255</b><br/>
- Adjust screen brightness.
- </li><br/>
- <li><b>set <name> clearCache</b><br/>
- Clear browser cache.
- </li><br/>
- <li><b>set <name> exit</b><br/>
- Terminate Fully.
- </li><br/>
- <li><b>set <name> motionDetection { on | off }</b><br/>
- Turn motion detection by camera on or off.
- </li><br/>
- <li><b>set <name> { lock | unlock }</b><br/>
- Lock or unlock display.
- </li><br/>
- <li><b>set <name> { on | off }</b><br/>
- Turn tablet display on or off.
- </li><br/>
- <li><b>set <name> on-for-timer [{ <Seconds> | <u>forever</u> | off }]</b><br/>
- Set timer for display. Default is forever.
- </li><br/>
- <li><b>set <name> restart</b><br/>
- Restart Fully.
- </li><br/>
- <li><b>set <name> speak <text></b><br/>
- Audio output of <i>text</i>. If <i>text</i> contains blanks it must be enclosed
- in double quotes. The text can contain device readings in format [device:reading].
- </li><br/>
- <li><b>set <name> url [<URL>]</b><br/>
- Navigate to <i>URL</i>. If no URL is specified navigate to start URL.
- </li><br/>
- </ul>
- <br/>
-
- <a name="FULLYget"></a>
- <b>Get</b><br/><br/>
- <ul>
- <li><b>get <name> info</b><br/>
- Display Fully information.
- </li><br/>
- <li><b>get <name> stats</b><br/>
- Show Fully statistics.
- </li><br/>
- <li><b>get <name> update</b><br/>
- Update readings.
- </li><br/>
- </ul>
- <br/>
-
- <a name="FULLYattr"></a>
- <b>Attributes</b><br/>
- <br/>
- <ul>
- <li><b>disable <0 | 1></b><br/>
- Disable device and automatic polling.
- </li><br/>
- <li><b>pingBeforeCmd <Count></b><br/>
- Send <i>Count</i> ping request to tablet before executing commands. Valid values
- for <i>Count</i> are 0,1,2. Default is 0 (do not send ping request).
- </li><br/>
- <li><b>pollInterval <seconds></b><br/>
- Set polling interval for FULLY device information.
- If <i>seconds</i> is 0 polling is turned off. Valid values are from 10 to
- 86400 seconds.
- </li><br/>
- <li><b>requestTimeout <seconds></b><br/>
- Set timeout for http requests. Default is 4 seconds.
- </li><br/>
- <li><b>repeatCommand <Count></b><br/>
- Repeat fully command on failure. Valid values for <i>Count</i> are 0,1,2. Default
- is 0 (do not repeat commands).
- </li><br/>
- </ul>
- </ul>
- <p><a name="FileLog"></a>
- <h3>FileLog</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#FileLog'>DE</a>]</div>
- <ul>
- <br>
- <a name="FileLogdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> FileLog <filename> <regexp> [readonly]</code>
- <br><br>
- Log events to <code><filename></code>. The log format is
- <ul><code><br>
- YYYY-MM-DD_HH:MM:SS <device> <event><br>
- <br></code></ul>
- The regexp will be checked against the device name
- devicename:event or timestamp:devicename:event combination.
- The regexp must match the complete string, not just a part of it.
- <br>
- <code><filename></code> may contain %-wildcards of the
- POSIX strftime function of the underlying OS (see your strftime manual).
- Common used wildcards are:
- <ul>
- <li><code>%d</code> day of month (01..31)</li>
- <li><code>%m</code> month (01..12)</li>
- <li><code>%Y</code> year (1970...)</li>
- <li><code>%w</code> day of week (0..6); 0 represents Sunday</li>
- <li><code>%j</code> day of year (001..366)</li>
- <li><code>%U</code> week number of year with Sunday as first day of week (00..53)</li>
- <li><code>%W</code> week number of year with Monday as first day of week (00..53)</li>
- </ul>
- FHEM also replaces <code>%L</code> by the value of the global logdir attribute.<br>
- Before using <code>%V</code> for ISO 8601 week numbers check if it is
- correctly supported by your system (%V may not be replaced, replaced by an
- empty string or by an incorrect ISO-8601 week number, especially
- at the beginning of the year)
- If you use <code>%V</code> you will also have to use %G
- instead of %Y for the year!<br>
- If readonly is specified, then the file is used only for visualisation, and
- it is not opened for writing.
- Examples:
- <ul>
- <code>define lamplog FileLog %L/lamp.log lamp</code><br>
- <code>define wzlog FileLog ./log/wz-%Y-%U.log
- wz:(measured-temp|actuator).*</code><br>
- With ISO 8601 week numbers, if supported:<br>
- <code>define wzlog FileLog ./log/wz-%G-%V.log
- wz:(measured-temp|actuator).*</code><br>
- </ul>
- <br>
- </ul>
- <a name="FileLogset"></a>
- <b>Set </b>
- <ul>
- <li>reopen
- <ul>
- Reopen a FileLog after making some manual changes to the
- logfile.
- </ul>
- </li>
- <li>clear
- <ul>
- Clears and reopens the logfile.
- </ul>
- </li>
- <li>addRegexpPart <device> <regexp>
- <ul>
- add a regexp part, which is constructed as device:regexp. The parts
- are separated by |. Note: as the regexp parts are resorted, manually
- constructed regexps may become invalid.
- </ul>
- </li>
- <li>removeRegexpPart <re>
- <ul>
- remove a regexp part. Note: as the regexp parts are resorted, manually
- constructed regexps may become invalid.<br>
- The inconsistency in addRegexpPart/removeRegexPart arguments originates
- from the reusage of javascript functions.
- </ul>
- </li>
- <li>absorb secondFileLog
- <ul>
- merge the current and secondFileLog into one file, add the regexp of the
- secondFileLog to the current one, and delete secondFileLog.<br>
- This command is needed to create combined plots (weblinks).<br>
- <b>Notes:</b>
- <ul>
- <li>secondFileLog will be deleted (i.e. the FHEM definition).</li>
- <li>only the current files will be merged.</li>
- <li>weblinks using secondFilelog will become broken, they have to be
- adopted to the new logfile or deleted.</li>
- </ul>
- </ul>
- </li>
- <br>
- </ul>
- <br>
- <a name="FileLogget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <infile> <outfile> <from>
- <to> <column_spec> </code>
- <br><br>
- Read data from the logfile, used by frontends to plot data without direct
- access to the file.<br>
- <ul>
- <li><infile><br>
- Name of the logfile to open. Special case: "-" is the currently active
- logfile, "CURRENT" opens the file corresponding to the "from"
- parameter.
- </li>
- <li><outfile><br>
- If it is "-", you get the data back on the current connection, else it
- is the prefix for the output file. If more than one file is specified,
- the data is separated by a comment line for "-", else it is written in
- separate files, numerated from 0.
- </li>
- <li><from> <to><br>
- Used to grep the data. The elements should correspond to the
- timeformat or be an initial substring of it.</li>
- <li><column_spec><br>
- For each column_spec return a set of data in a separate file or
- separated by a comment line on the current connection.<br>
- Syntax: <col>:<regexp>:<default>:<fn><br>
- <ul>
- <li><col>
- The column number to return, starting at 1 with the date.
- If the column is enclosed in double quotes, then it is a fix text,
- not a column number.</li>
- <li><regexp>
- If present, return only lines containing the regexp. Case sensitive.
- </li>
- <li><default><br>
- If no values were found and the default value is set, then return
- one line containing the from value and this default. We need this
- feature as gnuplot aborts if a dataset has no value at all.
- </li>
- <li><fn>
- One of the following:
- <ul>
- <li>int<br>
- Extract the integer at the beginning og the string. Used e.g.
- for constructs like 10%</li>
- <li>delta-h or delta-d<br>
- Return the delta of the values for a given hour or a given day.
- Used if the column contains a counter, as is the case for the
- KS300 rain column.</li>
- <li>everything else<br>
- The string is evaluated as a perl expression. @fld is the
- current line splitted by spaces. Note: The string/perl
- expression cannot contain spaces, as the part after the space
- will be considered as the next column_spec.</li>
- </ul></li>
- </ul></li>
- </ul>
- <br><br>
- Example:
- <ul><code><br>
- get outlog out-2008.log - 2008-01-01 2008-01-08 4:IR:int: 9:IR::
- </code></ul>
- <br>
- </ul>
- <a name="FileLogattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#addStateEvent">addStateEvent</a></li><br><br>
- <a name="archivedir"></a>
- <a name="archivecmd"></a>
- <a name="nrarchive"></a>
- <li>archivecmd / archivedir / nrarchive<br>
- When a new FileLog file is opened, the FileLog archiver wil be called.
- This happens only, if the name of the logfile has changed (due to
- time-specific wildcards, see the <a href="#FileLog">FileLog</a>
- section), and there is a new entry to be written into the file.
- <br>
- If the attribute archivecmd is specified, then it will be started as a
- shell command (no enclosing " is needed), and each % in the command
- will be replaced with the name of the old logfile.<br>
- If this attribute is not set, but nrarchive is set, then nrarchive old
- logfiles are kept along the current one while older ones are moved to
- archivedir (or deleted if archivedir is not set).<br>
- Note: "old" means here the first ones in the alphabetically soreted
- list. <br>
- Note: setting these attributes for the global instance will effect the
- <a href="#logfile">FHEM logfile</a> only.
- </li><br>
- <a name="archiveCompress"></a>
- <li>archiveCompress<br>
- If nrarchive, archivedir and archiveCompress is set, then the files
- in the archivedir will be compressed.
- </li><br>
- <a name="createGluedFile"></a>
- <li>createGluedFile<br>
- If set (to 1), and the SVG-Plot requests a time-range wich is stored
- in two files, a temporary file with the content of both files will be
- created, in order to satisfy the request.
- </li><br>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <br>
- <a name="eventOnThreshold"></a>
- <li>eventOnThreshold<br>
- If set (to a nonzero number), the event linesInTheFile will be
- generated, if the lines in the file is a multiple of the set number.
- Note: the counter is only correct for files created after this
- feature was implemented. A FHEM crash or kill will falsify the counter.
- </li><br>
- <li><a href="#ignoreRegexp">ignoreRegexp</a></li>
- <a name="logtype"></a>
- <li>logtype<br>
- Used by the pgm2 webfrontend to offer gnuplot/SVG images made from the
- logs. The string is made up of tokens separated by comma (,), each
- token specifies a different gnuplot program. The token may contain a
- colon (:), the part before the colon defines the name of the program,
- the part after is the string displayed in the web frontend. Currently
- following types of gnuplot programs are implemented:<br>
- <ul>
- <li>fs20<br>
- Plots on as 1 and off as 0. The corresponding filelog definition
- for the device fs20dev is:<br>
- define fslog FileLog log/fs20dev-%Y-%U.log fs20dev
- </li>
- <li>fht<br>
- Plots the measured-temp/desired-temp/actuator lines. The
- corresponding filelog definitions (for the FHT device named
- fht1) looks like:<br>
- <code>define fhtlog1 FileLog log/fht1-%Y-%U.log fht1:.*(temp|actuator).*</code>
- </li>
- <li>temp4rain10<br>
- Plots the temperature and rain (per hour and per day) of a
- ks300. The corresponding filelog definitions (for the KS300
- device named ks300) looks like:<br>
- define ks300log FileLog log/fht1-%Y-%U.log ks300:.*H:.*
- </li>
- <li>hum6wind8<br>
- Plots the humidity and wind values of a
- ks300. The corresponding filelog definition is the same as
- above, both programs evaluate the same log.
- </li>
- <li>text<br>
- Shows the logfile as it is (plain text). Not gnuplot definition
- is needed.
- </li>
- </ul>
- Example:<br>
- attr ks300log1 logtype
- temp4rain10:Temp/Rain,hum6wind8:Hum/Wind,text:Raw-data
- </li><br>
- <li><a href="#mseclog">mseclog</a></li><br>
- <a name="reformatFn"></a>
- <li>reformatFn<br>
- used to convert "foreign" logfiles for the SVG Module, contains the
- name(!) of a function, which will be called with a "raw" line from the
- original file, and has to return a line in "FileLog" format.<br>
- E.g. to visualize the NTP loopstats, set reformatFn to ntpLoopstats, and
- copy the following into your 99_myUtils.pm:
- <pre><code>
- sub
- ntpLoopstats($)
- {
- my ($d) = @_;
- return $d if($d !~ m/^(\d{5}) (\d+)\.(\d{3}) (.*)$/);
- my ($r, $t) = ($4, FmtDateTime(($1-40587)*86400+$2));
- $t =~ s/ /_/;
- return "$t ntpLoopStats $r";
- }</code></pre>
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="GAEBUS"></a>
- <h3>GAEBUS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GAEBUS'>DE</a>]</div>
- <ul>
- <table>
- <tr><td>
- The GAEBUS module is the representation of a Ebus connector in FHEM.
- The GAEBUS module is designed to connect to ebusd (ebus daemon) via a socket connection (default is port 8888) <br>
- </td></tr>
- </table>
- <a name="GAEBUS"></a>
- <b>Define</b>
- <ul>
- <code>define <name> GAEBUS <device-addr>[:<port>] [<interval>];</code> <br>
- <br>
- <device-addr>[:<port>] specifies the host:port of the ebusd device. E.g.
- 192.168.0.244:8888 or servername:8888. When using the standard port, the port can be omitted.
- <br><br>
- Example:<br><br>
- <code>define ebus1 GAEBUS localhost 300</code>
- <br><br>
- When initializing the object no device specific commands are known. Please call "get ebusd_find" to read in supported commands from ebusd.<br>
- After fresh restart of ebusd it may take a while until all supported devices and their commands are visible.<br>
- </ul>
- <br>
- <a name="GAEBUS"></a>
- <b>Set </b>
- <ul>
- <li>reopen<br>
- Will close and open the socket connection.
- </li><br>
- <li>[r]~<class> <variable-name>~<comment><br>
- Will define a attribute with the following syntax:<br>
- [r]~<class>~<variable-name>~<br>
- Valid combinations are read from ebusd (using "get ebusd_find") and are selectable.<br>
- Values from the attributes will be used as the name for the reading which are read from ebusd in the interval specified.<br>
- The content of <comment$gt; is dropped and not added to the attribute name.<br>
- </li><br>
- <li>[w]~<class> <variable-name>~<comment><br>
- Will define a attribute with the following syntax:<br>
- [w]~<class>~<variable-name><br>
- They will only appear if the attribute "ebusWritesEnabled" is set to "1"<br>
- Valid combinations are read from ebusd (using "get ebusd_find") and are selectable.<br>
- Values from the attributes will be used for set commands to modify parameters for ebus devices<br>
- Hint: if the values for the attributes are prefixed by "set-" then all possible parameters will be listed in one block<br>
- The content of <comment$gt; is dropped and not added to the attribute name.<br>
- </li><br>
- </ul>
- <a name="GAEBUS"></a>
- <b>Get</b>
- <ul>
- <li>ebusd_info<br>
- Execude <i>info</i> command on ebusd and show result.
- </li><br>
- <li>ebusd_find<br>
- Execude <i>find</i> command on ebusd. Result will be used to display supported "set" and "get" commands.
- </li><br>
- <li>ebusd_hex<br>
- Will pass the input value to the "hex" command of ebusd. See "ebusctl help hex" for valid parameters.<br>
- This command is only available if "ebusWritesEnabled" is set to '1'.<br>
- </li><br>
- <li>reading <reading-name><br>
- Will read the actual value form ebusd and update the reading.
- </li><br>
- <li>[r]~<class> <variable-name>~<comment><br>
- Will read this variable from the ebusd and show the result as a popup.<br>
- Valid combinations are read from ebusd (using "get ebusd_find") and are selectable.<br>
- </li><br>
- <li>removeCommentFromAttributeNames<br>
- This will migrate the former used attribute names of format "[rw]~<class> <variable-name>~<comment>"
- into the format "[rw]~<class> <variable-name>".<br>
- It is only available if such attributes are defined.<br>
- </li><br>
- </ul>
- <br>
- <a name="GAEBUS"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#attrdummy">disable</a></li><br>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#loglevel">loglevel</a></li><br>
- <li>ebusWritesEnabled 0,1<br>
- disable (0) or enable (1) that commands can be send to ebus devices<br>
- See also description for Set and Get<br>
- If Attribute is missing, default value is 0 (disable writes)<br>
- </li><br>
- <li>Attributes of the format<br>
- <code>[r]~<class>~<variable-name></code><br>
- define variables that can be retrieved from the ebusd.
- They will appear when they are defined by a "set" command as described above.<br>
- The value assigned to an attribute specifies the name of the reading for this variable.<br>
- If ebusd returns a list of semicolon separated values then several semicolon separated readings can be defined.<br>
- "dummy" is a placeholder for a reading that will be ignored. (e.g.: temperature;dummy;pressure).<br>
- The name of the reading can be suffixed by "<:number>" which is a multiplicator for
- the evaluation within the specified interval. (eg. OutsideTemp:3 will evaluate this reading every 3-th cycle)<br>
- All text followed the reading seperated by a blank is given as an additional parameter to ebusd.
- This can be used to request a single value if more than one is retrieved from ebus.<br>
- If "+f" is given as an additional parameter this will remove the "-f" option from the ebusd request. This will return the value stored in ebusd instead of requesting it freshly.<br>
- </li><br>
- <li>Attributes of the format<br>
- <code>[w]~<class>~<variable-name></code><br>
- define parameters that can be changed on ebus devices (using the write command from ebusctl)
- They will appear when they are defined by a "set" command as described above.<br>
- The value assigned to an attribute specifies the name that will be used in set to change a parameter for a ebus device.<br>
- </li><br>
- <li>valueFormat<br>
- Defines a map to format values within GAEBUS.<br>
- All readings can be formated using syntax of sprinf.
- 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.
- <br>
- Example: { "temperature" => "%0.2f"; "from-to" => "%s-%s" }<br>
- </li><br>
- </ul>
- <br>
- </ul>
- <p> <p>
- <a name="GEOFANCY" id="GEOFANCY"></a>
- </p>
- <h3>
- GEOFANCY
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GEOFANCY'>DE</a>]</div>
- <ul>
- <li>Provides a webhook receiver for geofencing, e.g. via the following apps:<br>
- <br>
- </li>
- <li>
- <a href="https://itunes.apple.com/app/id615538630">Geofency (iOS)</a>
- </li>
- <li>
- <a href="https://itunes.apple.com/app/id725198453">Locative (iOS)</a>
- </li>
- <li>
- <a href="http://www.egigeozone.de">EgiGeoZone (Android)</a>
- </li>
- <li>
- <a href="https://www.microsoft.com/en-us/store/apps/smart-geofences/9nblggh4rk3k">SMART Geofences (Windows 10, Windows 10 Mobile)</a>
- </li>
- <li>
- <p>
- Note: GEOFANCY is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You need to install FHEMWEB to use GEOFANCY.
- </p><a name="GEOFANCYdefine" id="GEOFANCYdefine"></a> <b>Define</b>
- <ul>
- <code>define <name> GEOFANCY <infix></code><br>
- <br>
- Defines the webhook server. <code><infix></code> is the portion behind the FHEMWEB base URL (usually <code>http://hostname:8083/fhem</code>)<br>
- <br>
- Example:
- <ul>
- <code>define geofancy GEOFANCY geo</code><br>
- </ul><br>
- The webhook will be reachable at http://hostname:8083/fhem/geo in that case.<br>
- <br>
- </ul><a name="GEOFANCYset" id="GEOFANCYset"></a> <b>Set</b>
- <ul>
- <li>
- <b>clear</b> readings can be used to cleanup auto-created readings from deprecated devices.
- </li>
- </ul><br>
- <br>
- <a name="GEOFANCYattr" id="GEOFANCYattr"></a> <b>Attributes</b><br>
- <br>
- <ul>
- <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>
- Separate using <i>blank</i> to rename multiple device UUIDs.<br>
- <br>
- 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.
- </li>
- </ul><br>
- <br>
- <b>Usage information / Hints on Security</b><br>
- <br>
- <ul>
- Likely your FHEM installation is not reachable directly from the internet (good idea!).<br>
- 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>
- <br>
- 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>
- <br>
- 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>
- <br>
- To make that reverse proxy available from the internet, just forward the appropriate port via your internet router.<br>
- <br>
- 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.
- </ul><br>
- <br>
- <b>Integration with Home Automation</b><br>
- <br>
- <ul>
- 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.
- </ul>
- </li>
- </ul>
- <p><a name="GHoma"></a>
- <h3>GHoma</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GHoma'>DE</a>]</div>
- (en | <a href="commandref_DE.html#GHoma">de</a>)
- <ul>
- <ul>
- Connects fhem to an G-Homa adapter plug<br><br>
- <b>preliminary:</b><br>
- <li>Configure WLAN settings (Firmware <= 1.06):<br>
- bring device in AP mode (press button for more than 3s, repeat this step until the LED is permanently on)<br>
- Now connect with your computer to G-Home network.<br>
- Browse to 10.10.100.254 (username:password = admin:admin)<br>
- In STA Setting insert your WLAN settings<br>
- </li>
- <li>Configure WLAN settings:<br>
- bring device in AP mode (press button for more than 3s, repeat this step until the LED is permanently on)<br>
- Configure WLAN with G-Homa App.<br>
- </li>
- <li>Configure Network Parameters setting (Firmware <= 1.06):<br>
- Other Setting -> Protocol to TCP-Client<br>
- Other Setting -> Port ID (remember value for FHEM settings)<br>
- Other Setting -> Server Address (IP of your FHEM Server)<br>
- </li>
- <li>Configure Network Parameters settings:<br>
- Use <code>set ... ConfigAll</code> from server device to set parameters automaticly.<br>
- </li>
-
- <li>Optional:<br>
- Block all outgoing connections for G-Homa in your router.<br>
- </li>
- </ul>
- <br><br>
-
- <a name="GHomadefine"></a>
- <b>Define</b><br>
- <ul>
- <code>define <name> GHoma <port></code> <br>
- Specifies the GHoma server device.<br>
- New adapters will be added automaticaly after first connection.<br>
- You can also manyally add an adapter:<br>
- <code>define <name> GHoma <Id></code> <br>
- where <code>Id</code> is the last 6 numbers of the plug's MAC address<br>
- Example: MAC= AC:CF:23:A5:E2:3B -> Id= A5E23B<br>
- <br>
- </ul>
- <a name="GHomaset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul><code>
- off<br>
- on<br>
- </code>
- </ul>
- The <a href="#setExtensions"> set extensions</a> are also supported.<br>
- <br>
- For server device:
- <code>set <name> ConfigAll [IP|hostname|FQDN]</code><br>
- Setting all GHoma plugs via UDP broadcast to TCP client of FHEM servers address and port of GHoma server device.<br>
- </ul>
- <a name="GHomaattr"></a>
- <b>Attributes</b><br>
- <ul>
- For plug devices:
- <ul><li>restoreOnStartup<br>
- Restore switch state after reboot<br>
- Default: last, valid values: last, on, off<br><br>
- </li>
- <li>restoreOnReinit<br>
- Restore switch state after reconnect<br>
- Default: last, valid values: last, on, off<br><br>
- </li>
- <li>blocklocal<br>
- Restore switch state to reading state immideately after local switching<br>
- Default: no, valid values: no, yes<br><br>
- </li></ul>
- For server devices:
- <ul><li>allowfrom<br>
- Regexp of allowed ip-addresses or hostnames. If set,
- only connections from these addresses are allowed.<br><br>
- </li></ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="GOOGLECAST"></a>
- <h3>GOOGLECAST</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GOOGLECAST'>DE</a>]</div>
- <ul>
- GOOGLECAST is used to control your Google Cast device<br><br>
- <b>Note</b><br>Make sure that python3 is installed. Following packages are required:
- <ul>
- <li>sudo apt-get install libwww-perl python-enum34 python-dev libextutils-makemaker-cpanfile-perl python3-pip cpanminus</li>
- <li>sudo pip3 install pychromecast --upgrade</li>
- <li>sudo pip3 install youtube-dl --upgrade</li>
- <li>sudo INLINE_PYTHON_EXECUTABLE=/usr/bin/python3 cpanm Inline::Python</li>
- </ul>
- <br>
- <br>
- <a name="GOOGLECASTdefine" id="GOOGLECASTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> GOOGLECAST <name></code><br>
- <br>
- Example:
- <ul>
- <code>define livingroom.chromecast GOOGLECAST livingroom</code><br><br>
- Wait a few seconds till presence switches to online...<br><br>
- <code>set livingroom.chromecast play https://www.youtube.com/watch?v=YE7VzlLtp-4</code><br>
- </ul>
- <br>
- Following media types are supported:<br>
- <a href="https://developers.google.com/cast/docs/media">Supported media formats</a><br>
- Play with youtube-dl works for following URLs:<br>
- <a href="https://rg3.github.io/youtube-dl/supportedsites.html">Supported youtube-dl sites</a><br>
- <br>
- </ul>
- <br>
- <a name="GOOGLECASTset" id="GOOGLECASTset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code><br>
- The following commands are defined:<br><br>
- <ul>
- <li><code><b>play</b> URL</code> - play from URL</li>
- <li><code><b>play</b></code> - play, like resume if paused previsously</li>
- <li><code><b>playFavorite</b></code> - plays URL from favoriteURL_[1-5]</li>
- <li><code><b>stop</b></code> - stop, stops current playback</li>
- <li><code><b>pause</b></code> - pause</li>
- <li><code><b>quitApp</b></code> - quit current application, like YouTube</li>
- <li><code><b>skip</b></code> - skip track and play next</li>
- <li><code><b>rewind</b></code> - rewind track and play it again</li>
- <li><code><b>displayWebsite</b></code> - displayWebsite on Chromecast Video</li>
- </ul>
- <br>
- </ul>
-
- <a name="GOOGLECASTattr" id="GOOGLECASTattr"></a>
- <b>Attributes</b>
- <ul>
- <li><code><b>favoriteURL_[1-5]</b></code> - save URL to play afterwards with playFavorite [1-5]</li>
- </ul>
- <br>
- <a name="GOOGLECASTget" id="GOOGLECASTget"></a>
- <b>Get</b>
- <ul>
- <code>n/a</code>
- </ul>
- <br>
- </ul>
- <p> <a name="GUEST" id="GUEST"></a>
- <h3>GUEST</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GUEST'>DE</a>]</div>
- <ul>
- <a name="GUESTdefine" id="GUESTdefine"></a> <b>Define</b>
- <ul>
- <code>define <rg_GuestName> GUEST [<device name(s) of resident group(s)>]</code><br>
- <br>
- Provides a special virtual device to represent a guest of your home.<br>
- Based on the current state and other readings, you may trigger other actions within FHEM.<br>
- <br>
- Used by superior module <a href="#RESIDENTS">RESIDENTS</a> but may also be used stand-alone.<br>
- <br />
- Use comma separated list of resident device names for multi-membership (see example below).<br />
- <br>
- Example:<br>
- <ul>
- <code># Standalone<br>
- define rg_Guest GUEST<br>
- <br>
- # Typical group member<br>
- define rg_Guest GUEST rgr_Residents # to be member of resident group rgr_Residents<br>
- <br>
- # Member of multiple groups<br>
- define rg_Guest GUEST rgr_Residents,rgr_Guests # to be member of resident group rgr_Residents and rgr_Guests</code>
- </ul>
- </ul><br>
- <br>
- <a name="GUESTset" id="GUESTset"></a> <b>Set</b>
- <ul>
- <code>set <rg_GuestName> <command> [<parameter>]</code><br>
- <br>
- Currently, the following commands are defined.<br>
- <ul>
- <li>
- <b>location</b> - sets reading 'location'; see attribute rg_locations to adjust list shown in FHEMWEB
- </li>
- <li>
- <b>mood</b> - sets reading 'mood'; see attribute rg_moods to adjust list shown in FHEMWEB
- </li>
- <li>
- <b>state</b> home,gotosleep,asleep,awoken,absent,none switch between states; see attribute rg_states to adjust list shown in FHEMWEB
- </li>
- <li>
- <b>create</b>
- <li><i>locationMap</i> add a pre-configured weblink device using showing a Google Map if readings locationLat+locationLong are present.</li>
- <li><i>wakeuptimer</i> add several pre-configurations provided by RESIDENTS Toolkit. See separate section in <a href="#RESIDENTS">RESIDENTS module commandref</a> for details.</li>
- </li>
- </ul>
- <ul>
- <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'.
- The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Possible states and their meaning</u><br>
- <br>
- <ul>
- This module differs between 6 states:<br>
- <br>
- <ul>
- <li>
- <b>home</b> - individual is present at home and awake
- </li>
- <li>
- <b>gotosleep</b> - individual is on it's way to bed
- </li>
- <li>
- <b>asleep</b> - individual is currently sleeping
- </li>
- <li>
- <b>awoken</b> - individual just woke up from sleep
- </li>
- <li>
- <b>absent</b> - individual is not present at home but will be back shortly
- </li>
- <li>
- <b>none</b> - guest device is disabled
- </li>
- </ul>
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Presence correlation to location</u><br>
- <br>
- <ul>
- Under specific circumstances, changing state will automatically change reading 'location' as well.<br>
- <br>
- 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>
- <br>
- 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.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Auto Gone</u><br>
- <br>
- <ul>
- Whenever an individual is set to 'absent', a trigger is started to automatically change state to 'gone' after a specific timeframe.<br>
- Default value is 16 hours.<br>
- <br>
- This behaviour can be customized by attribute rg_autoGoneAfter.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Synchronizing presence with other ROOMMATE or GUEST devices</u><br>
- <br>
- <ul>
- 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>
- 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>
- <br>
- Please note that individuals with current state 'none' or 'gone' (in case of roommates) will not be touched.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Location correlation to state</u><br>
- <br>
- <ul>
- Under specific circumstances, changing location will have an effect on the actual state as well.<br>
- <br>
- 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>
- <br>
- 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>
- <br>
- 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>
- Arriving at home will reset the value of 'wayhome' to '0'.<br>
- <br>
- 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>
- <br>
- <code>define n_rg_Guest.location notify geofancy:currLoc_Guest.* set rg_Guest:FILTER=location!=$EVTPART1 location $EVTPART1</code><br>
- <br>
- By defining geofencing zones called 'home' and 'wayhome' in the iOS app, you automatically get all the features of automatic state changes described above.
- </ul>
- </ul><br>
- <br>
- <a name="GUESTattr" id="GUESTattr"></a> <b>Attributes</b><br>
- <ul>
- <ul>
- <li>
- <b>rg_autoGoneAfter</b> - hours after which state should be auto-set to 'gone' when current state is 'absent'; defaults to 16 hours
- </li>
- <li>
- <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)
- </li>
- <li>
- <b>rg_lang</b> - overwrite global language setting; helps to set device attributes to translate FHEMWEB display text
- </li>
- <li>
- <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'
- </li>
- <li>
- <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"
- </li>
- <li>
- <b>rg_locationWayhome</b> - leaving a location matching these will set reading wayhome to 1; separate entries by space; defaults to "wayhome"
- </li>
- <li>
- <b>rg_locations</b> - list of locations to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
- </li>
- <li>
- <b>rg_moodDefault</b> - the mood that should be set after arriving at home or changing state from awoken to home
- </li>
- <li>
- <b>rg_moodSleepy</b> - the mood that should be set if state was changed to gotosleep or awoken
- </li>
- <li>
- <b>rg_moods</b> - list of moods to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
- </li>
- <li>
- <b>rg_noDuration</b> - may be used to disable continuous, non-event driven duration timer calculation (see readings durTimer*)
- </li>
- <li>
- <b>rg_passPresenceTo</b> - synchronize presence state with other GUEST or GUEST devices; separte devices by space
- </li>
- <li>
- <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.
- </li>
- <li>
- <b>rg_realname</b> - whenever GUEST wants to use the realname it uses the value of attribute alias or group; defaults to group
- </li>
- <li>
- <b>rg_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
- </li>
- <li>
- <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
- </li>
- <li>
- <b>rg_wakeupDevice</b> - reference to enslaved DUMMY devices used as a wake-up timer (part of RESIDENTS Toolkit's wakeuptimer)
- </li>
- </ul>
- </ul><br>
- <br>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <ul>
- <li>
- <b>durTimerAbsence</b> - timer to show the duration of absence from home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>durTimerAbsence_cr</b> - timer to show the duration of absence from home in computer readable format (minutes)
- </li>
- <li>
- <b>durTimerPresence</b> - timer to show the duration of presence at home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>durTimerPresence_cr</b> - timer to show the duration of presence at home in computer readable format (minutes)
- </li>
- <li>
- <b>durTimerSleep</b> - timer to show the duration of sleep in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>durTimerSleep_cr</b> - timer to show the duration of sleep in computer readable format (minutes)
- </li>
- <li>
- <b>lastArrival</b> - timestamp of last arrival at home
- </li>
- <li>
- <b>lastAwake</b> - timestamp of last sleep cycle end
- </li>
- <li>
- <b>lastDeparture</b> - timestamp of last departure from home
- </li>
- <li>
- <b>lastDurAbsence</b> - duration of last absence from home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurAbsence_cr</b> - duration of last absence from home in computer readable format (minutes)
- </li>
- <li>
- <b>lastDurPresence</b> - duration of last presence at home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurPresence_cr</b> - duration of last presence at home in computer readable format (minutes)
- </li>
- <li>
- <b>lastDurSleep</b> - duration of last sleep in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurSleep_cr</b> - duration of last sleep in computer readable format (minutes)
- </li>
- <li>
- <b>lastLocation</b> - the prior location
- </li>
- <li>
- <b>lastMood</b> - the prior mood
- </li>
- <li>
- <b>lastSleep</b> - timestamp of last sleep cycle begin
- </li>
- <li>
- <b>lastState</b> - the prior state
- </li>
- <li>
- <b>lastWakeup</b> - time of last wake-up timer run
- </li>
- <li>
- <b>lastWakeupDev</b> - device name of last wake-up timer
- </li>
- <li>
- <b>location</b> - the current location
- </li>
- <li>
- <b>mood</b> - the current mood
- </li>
- <li>
- <b>nextWakeup</b> - time of next wake-up program run
- </li>
- <li>
- <b>nextWakeupDev</b> - device name for next wake-up program run
- </li>
- <li>
- <b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
- </li>
- <li>
- <b>state</b> - reflects the current state
- </li>
- <li>
- <b>wakeup</b> - becomes '1' while a wake-up program of this resident is being executed
- </li>
- <li>
- <b>wayhome</b> - depending on current location, it can become '1' if individual is on his/her way back home
- </li>
- <li>
- <br>
- <br>
- The following readings will be set to '-' if state was changed to 'none':<br>
- lastArrival, lastDurAbsence, lastLocation, lastMood, location, mood
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="GardenaSmartBridge"></a>
- <h3>GardenaSmartBridge</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GardenaSmartBridge'>DE</a>]</div>
- <ul>
- <u><b>Prerequisite</b></u>
- <br><br>
- <li>In combination with GardenaSmartDevice this FHEM Module controls the communication between the GardenaCloud and connected Devices like Mover, Watering_Computer, Temperature_Sensors</li>
- <li>Installation of the following packages: apt-get install libio-socket-ssl-perl</li>
- <li>The Gardena-Gateway and all connected Devices must be correctly installed in the GardenaAPP</li>
- </ul>
- <br>
- <a name="GardenaSmartBridgedefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> GardenaSmartBridge <Account-EMail> <Account-Passwort></code>
- <br><br>
- Beispiel:
- <ul><br>
- <code>define Gardena_Bridge GardenaSmartBridge me@email.me secret</code><br>
- </ul>
- <br>
- <Account-EMail> Email Adresse which was used in the GardenaAPP<br>
- <Account-Passwort> Passwort which was used in the GardenaAPP<br>
- 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.
- <br><br>
- <a name="GardenaSmartBridgereadings"></a>
- <br><br>
- <b>Readings</b>
- <ul>
- <li>address - your Adress (Longversion)</li>
- <li>authorized_user_ids - </li>
- <li>city - Zip, City</li>
- <li>devices - Number of Devices in the Cloud (Gateway included)</li>
- <li>lastRequestState - Last Status Result</li>
- <li>latitude - Breitengrad des GrundstĂźcks</li>
- <li>longitude - Längengrad des Grundstßcks</li>
- <li>name - Name of your Garden � Default �My Garden�</li>
- <li>state - State of the Bridge</li>
- <li>token - SessionID</li>
- <li>zones - </li>
- </ul>
- <br><br>
- <a name="GardenaSmartBridgeset"></a>
- <b>set</b>
- <ul>
- <li>getDeviceState - Starts a Datarequest</li>
- <li>getToken - Gets a new Session-ID</li>
- </ul>
- <br><br>
- <a name="GardenaSmartBridgeattributes"></a>
- <b>Attributes</b>
- <ul>
- <li>debugJSON - </li>
- <li>disable - Disables the Bridge</li>
- <li>interval - Interval in seconds (Default=300)</li>
- </ul>
- </ul>
- <p><a name="GardenaSmartDevice"></a>
- <h3>GardenaSmartDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GardenaSmartDevice'>DE</a>]</div>
- <ul>
- In combination with GardenaSmartBridge this FHEM Module controls the GardenaSmart Device using the GardenaCloud
- <br><br>
- Once the Bridge device is created, the connected devices are automatically recognized and created in FHEM. <br>
- From now on the devices can be controlled and changes in the GardenaAPP are synchronized with the state and readings of the devices.
- <a name="GardenaSmartDevicereadings"></a>
- <br><br><br>
- <b>Readings</b>
- <ul>
- <li>battery-charging - Indicator if the Battery is charged (0/1) or with newer Firmware (false/true)</li>
- <li>battery-level - load percentage of the Battery</li>
- <li>battery-rechargeable_battery_status - healthyness of the battery (out_of_operation/replace_now/low/ok)</li>
- <li>device_info-category - category of device (mower/watering_computer)</li>
- <li>device_info-last_time_online - timestamp of last radio contact</li>
- <li>device_info-manufacturer - manufacturer</li>
- <li>device_info-product - product type</li>
- <li>device_info-serial_number - serial number</li>
- <li>device_info-sgtin - </li>
- <li>device_info-version - firmware version</li>
- <li>firmware-firmware_command - firmware command (idle/firmware_cancel/firmware_upload/unsupported)</li>
- <li>firmware-firmware_status - firmware status </li>
- <li>firmware-firmware_update_start - indicator when a firmwareupload is started</li>
- <li>firmware-firmware_upload_progress - progress indicator of firmware update</li>
- <li>firmware-inclusion_status - inclusion status</li>
- <li>internal_temperature-temperature - internal device temperature</li>
- <li>mower-error - actual error message
- <ul>
- <li>no_message</li>
- <li>outside_working_area</li>
- <li>no_loop_signal</li>
- <li>wrong_loop_signal</li>
- <li>loop_sensor_problem_front</li>
- <li>loop_sensor_problem_rear</li>
- <li>trapped</li>
- <li>upside_down</li>
- <li>low_battery</li>
- <li>empty_battery</li>
- <li>no_drive</li>
- <li>lifted</li>
- <li>stuck_in_charging_station</li>
- <li>charging_station_blocked</li>
- <li>collision_sensor_problem_rear</li>
- <li>collision_sensor_problem_front</li>
- <li>wheel_motor_blocked_right</li>
- <li>wheel_motor_blocked_left</li>
- <li>wheel_drive_problem_right</li>
- <li>wheel_drive_problem_left</li>
- <li>cutting_system_blocked</li>
- <li>invalid_sub_device_combination</li>
- <li>settings_restored</li>
- <li>electronic_problem</li>
- <li>charging_system_problem</li>
- <li>tilt_sensor_problem</li>
- <li>wheel_motor_overloaded_right</li>
- <li>wheel_motor_overloaded_left</li>
- <li>charging_current_too_high</li>
- <li>temporary_problem</li>
- <li>guide_1_not_found</li>
- <li>guide_2_not_found</li>
- <li>guide_3_not_found</li>
- <li>difficult_finding_home</li>
- <li>guide_calibration_accomplished</li>
- <li>guide_calibration_failed</li>
- <li>temporary_battery_problem</li>
- <li>battery_problem</li>
- <li>alarm_mower_switched_off</li>
- <li>alarm_mower_stopped</li>
- <li>alarm_mower_lifted</li>
- <li>alarm_mower_tilted</li>
- <li>connection_changed</li>
- <li>connection_not_changed</li>
- <li>com_board_not_available</li>
- <li>slipped</li>
- </ul>
- </li>
- <li>mower-manual_operation - (0/1) or with newer Firmware (false/true)</li>
- <li>mower-override_end_time - manual override end time</li>
- <li>mower-source_for_next_start - source for the next start
- <ul>
- <li>no_source</li>
- <li>mower_charging</li>
- <li>completed_cutting_autotimer</li>
- <li>week_timer</li>
- <li>countdown_timer</li>
- <li>undefined</li>
- </ul>
- </li>
- <li>mower-status - mower state (see state)</li>
- <li>mower-timestamp_next_start - timestamp of next scheduled start</li>
- <li>radio-connection_status - state of connection</li>
- <li>radio-quality - percentage of the radio quality</li>
- <li>radio-state - radio state (bad/poor/good/undefined)</li>
- <li>state - state of the mower
- <ul>
- <li>paused</li>
- <li>ok_cutting</li>
- <li>ok_searching</li>
- <li>ok_charging</li>
- <li>ok_leaving</li>
- <li>wait_updating</li>
- <li>wait_power_up</li>
- <li>parked_timer</li>
- <li>parked_park_selected</li>
- <li>off_disabled</li>
- <li>off_hatch_open</li>
- <li>unknown</li>
- <li>error</li>
- <li>error_at_power_up</li>
- <li>off_hatch_closed</li>
- <li>ok_cutting_timer_overridden</li>
- <li>parked_autotimer</li>
- <li>parked_daily_limit_reached</li>
- </ul>
- </li>
- </ul>
- <br><br>
- <a name="GardenaSmartDeviceattributes"></a>
- <b>Attributes</b>
- <ul>
- <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>
- <li>model - </li>
- </ul>
- <br><br>
- <a name="GardenaSmartDeviceset"></a>
- <b>set</b>
- <ul>
- <li>parkUntilFurtherNotice</li>
- <li>parkUntilNextTimer</li>
- <li>startOverrideTimer - 0 to 59 Minutes</li>
- <li>startResumeSchedule</li>
- </ul>
- </ul>
- <p><a name="GasCalculator"></a>
- <h3>GasCalculator</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GasCalculator'>DE</a>]</div>
- <ul>
- <table>
- <tr>
- <td>
- The GasCalculator Module calculates the gas consumption and costs of one ore more gas counters.<BR>
- 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>
- <BR>
- 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>
- <BR>
- The GasCalculator module provides several current, historical, statistical predictable values around with respect to one or more gas-counter and creates respective readings.<BR>
- <BR>
- To avoid waiting for max. 12 months to have realistic values, the readings <code><DestinationDevice>_<SourceCounterReading>_Vol1stDay</code>, <code><DestinationDevice>_<SourceCounterReading>_Vol1stMonth</code>, <code><DestinationDevice>_<SourceCounterReading>_Vol1stYear</code> and <code><DestinationDevice>_<SourceCounterReading>_Vol1stMeter</code> must be corrected with real values by using the <code>setreading</code> - command.
- 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>
- <BR>
- </td>
- </tr>
- </table>
-
- <table><tr><td><a name="GasCalculatorDefine"></a><b>Define</b></td></tr></table>
- <table><tr><td><ul><code>define <name> GasCalculator <regex></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><name></code> : </td><td>The name of the calculation device. Recommendation: "myGasCalculator".</td></tr>
- <tr><td><code><regex></code> : </td><td>A valid regular expression (also known as regex or regexp) of the event where the counter can be found</td></tr>
- </table>
- </ul></ul>
- <table><tr><td><ul>Example: <code>define myGasCalculator GasCalculator myGasCounter:countersA.*</code></ul></td></tr></table>
- <BR>
- <table>
- <tr><td><a name="GasCalculatorSet"></a><b>Set</b></td></tr>
- <tr><td>
- <ul>
- The set - function sets individual values for example to correct values after power loss etc.<BR>
- The set - function works only for readings which have been stored in the CalculatorDevice.<BR>
- The Readings being stored in the Counter - Device need to be changed individially with the <code>set</code> - command.<BR>
- </ul>
- </td></tr>
- </table>
- <BR>
- <table>
- <tr><td><a name="GasCalculatorGet"></a><b>Get</b></td></tr>
- <tr><td>
- <ul>
- The get - function just returns the individual value of the reading.<BR>
- The get - function works only for readings which have been stored in the CalculatorDevice.<BR>
- The Readings being stored in the Counter - Device need to be read individially with <code>get</code> - command.<BR>
- </ul>
- </td></tr>
- </table>
- <BR>
- <table>
- <tr><td><a name="GasCalculatorAttr"></a><b>Attributes</b></td></tr>
- <tr><td>
- <ul>
- If the below mentioned attributes have not been pre-defined completly beforehand, the program will create the GasCalculator specific attributes with default values.<BR>
- In addition the global attributes e.g. <a href="#room">room</a> can be used.<BR>
- </ul>
- </td></tr>
- </table>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value is provided by your local gas provider is shown on your gas bill.<BR>
- For UK users it may known under "Standing Charge". Please make sure it is based on one year<BR>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>Currency</code> : </li></td><td> One of the pre-defined list of currency symbols [€,£,$].<BR>
- The default value is €<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 0 = enabled.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value for this offset will be calculated as follows V<sub>Offset</sub> = V<sub>Mechanical</sub> - V<sub>Module</sub><BR>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>GasCubicPerCounts</code> : </li></td><td> A valid float number of the ammount of volume per ticks.<BR>
- 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>
- The default value is 0.01<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>GasNominalHeatingValue</code> : </li></td><td> A valid float number for the gas heating value in [kWh/ chosen Volume].<BR>
- The value is provided by your local gas provider is shown on your gas bill.<BR>
- The default value is 10.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value is provided by your local gas provider is shown on your gas bill.<BR>
- The default value is 1.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value is provided by your local gas provider is shown on your gas bill.<BR>
- The default value is 0.0654<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 5 (May)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The CalculatorDevice is the device which has been created with this module.<BR>
- The CounterDevice is the Device which is reading the mechanical gas-meter.<BR>
- The default value is CalculatorDevice - Therefore the readings will be written into this device.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>Volume</code> : </li></td><td> One of the pre-defined list of volume symbols [m³,ft³].<BR>
- The default value is m³<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="GasCalculatorReadings"></a><b>Readings</b></td></tr>
- <tr><td>
- <ul>
- As soon the device has been able to read at least 2 times the counter, it automatically will create a set readings:<BR>
- The placeholder <code><DestinationDevice></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>
- The placeholder <code><SourceCounterReading></code> is the reading based on the defined regular expression.<BR>
- </ul>
- </td></tr>
- </table>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostDayLast</code> : </li></td><td>Energy costs of the last day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostMeterLast</code> : </li></td><td> Energy costs in the chosen currency of the last gas-meter period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostMonth</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostMonthLast</code> : </li></td><td>Energy costs in the chosen currency of the last month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostYear</code> : </li></td><td>Energy costs in the chosen currency since the beginning of the current year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyCostYearLast</code> : </li></td><td>Energy costs of the last calendar year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyDay</code> : </li></td><td>Energy consumption in kWh since the beginning of the current day (midnight).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyDayLast</code> : </li></td><td>Total Energy consumption in kWh of the last day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyMeterLast</code> : </li></td><td>Total Energy consumption in kWh of the last gas-meter reading period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyMonth</code> : </li></td><td>Energy consumption in kWh since the beginning of the current month (midnight of the first).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyMonthLast</code> : </li></td><td>Total Energy consumption in kWh of the last month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyYear</code> : </li></td><td>Energy consumption in kWh since the beginning of the current year (midnight of the first).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_EnergyYearLast</code> : </li></td><td>Total Energy consumption in kWh of the last calendar year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_MonthMeterReading</code> : </li></td><td>Number of month since last meter reading. The month when the reading occured is the first month = 1.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_Meter</code> : </li></td><td>Current indicated total volume consumption on mechanical gas meter. Correct Offset-attribute if not identical.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerCurrent</code> : </li></td><td>Current heating Power. (Average between current and previous measurement.)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerDayAver</code> : </li></td><td>Average heating Power since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerDayMax</code> : </li></td><td>Maximum power peak since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_PowerDayMin</code> : </li></td><td>Minimum power peak since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_Vol1stDay</code> : </li></td><td>First volume reading of the current day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_VolLastDay</code> : </li></td><td>Volume reading of the previous day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_Vol1stMonth</code> : </li></td><td>First volume reading of the current month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_VolLastMonth</code> : </li></td><td>Volume reading of the previous month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_Vol1stYear</code> : </li></td><td>First volume reading of the current year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_VolLastYear</code> : </li></td><td>Volume reading of the previous year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_Vol1stMeter</code> : </li></td><td>First volume reading of the first day of the month of the current meter reading period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_VolLastMeter</code> : </li></td><td>Volume reading of the first day of the month of the last meter reading period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- </ul>
- <p><a name="GoogleAuth"></a>
- <h3>GoogleAuth</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#GoogleAuth'>DE</a>]</div>
- <ul>
- GoogleAuthenticator provides two-factor-authentication using one-time-passwords (token).<br/>
- These tokens are generated using the mobile app �Google Authenticator� for example on a smartphone.<br/>
- See <a href="https://en.wikipedia.org/wiki/Google_Authenticator">https://en.wikipedia.org/wiki/Google_Authenticator</a>
- for more informations.<br/>
- <br/>
- <br/>
- <b>Prerequesits</b><br/>
- <br/>
- <li>The fhem implementation of the Google Authenticator is credited to the following publication:<br/>
- <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>
- <br/>
- <li>Module uses following additional Perl modules:<br/>
- <br/>
- <ul><code>Convert::Base32 Authen::OATH Crypt::URandom</code></ul>
- <br/>
- If not already installed in your environment, please install them using appropriate commands from your environment.<br/>
- <br/>
- Package installation in debian environments:<br/>
- <br/>
- <ul><code>apt-get install libconvert-base32-perl libauthen-oath-perl libcrypt-urandom-perl</code></ul></li>
- <br/>
- <br/>
-
- <a name="GoogleAuthdefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> GoogleAuth</code><br/>
- <br/>
- Example:<br/><br/>
- <ul><code>define googleAuth GoogleAuth</code><br/></ul>
- </ul>
- <br/>
- <br/>
- <a name="GoogleAuthset"></a>
- <b>Set Commands</b><br/><br/>
- <ul>
- <li><code>set <name> new</code><br/>
- <br/>
- Generates a new secret key and displays the corresponding QR image.<br/>
- Using the photo function of the Google Authenticator app,<br/>
- this QR image can be used to transfer the secret key to the app.
- </li>
- <br/>
- <li><code>set <name> revoke</code><br/>
- <br/>
- Remove existing key.<br/>
- <b>You can not create a new key before</b> an existing key was deleted.<br/>
- </li>
- </ul>
- <br/>
- <br/>
- <a name="GoogleAuthget"></a>
- <b>Get Commands</b><br/><br/>
- <ul>
- <li><code>get <name> check <token></code><br/>
- <br/>
- Check the validity of a given token; return value is 1 for a valid token, otherwise -1.<br/>
- <ul>
- <li>Token always consists of six numerical digits and will change every 30 seconds.</li>
- <li>Token is valid if it matches one of three tokens calculated by FHEM<br/>
- using three timestamps: -30 seconds, now and +30 seconds.<br/>
- This behavior can be changed by attribute ga_strictCheck.</li>
- </ul>
- <br/>
- </li>
- <li><code>gAuth(<name>,<token>)</code><br/>
- <br/>
- For easy use in your own functions you can call function gAuth(),<br/>
- which will return same result codes as the "get" command.
- </li>
- </ul>
- <br/>
- <br/>
- <a name="GoogleAuthattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <li><b>ga_labelName</b> - define a Name to identify PassCode inside the app.<br/>
- <b>Do not use any special characters,</b> except SPACE, in this attribute!</li>
- <li><b>ga_qrSize</b> - select image size of qr code</li>
- <li><b>ga_showKey</b> - show key for manual use if set to 1</li>
- <li><b>ga_showLink</b> - show link to qr code if set to 1</li>
- <li><b>ga_showQR</b> - show qr code if set to 1</li>
- <li><b>ga_strictCheck</b><br/>
- AttrVal = 1 : check given token against one token<br/>
- AttrVal = 0 : check given token against three tokens(default)</li>
- </ul>
- <br/>
- <br/>
- <a name="GoogleAuthreadings"></a>
- <b>Generated Readings/Events</b><br/><br/>
- <ul>
- <li><b>lastResult</b> - contains result from last token check</li>
- <li><b>state</b> - "active" if a key is set, otherwise "defined"</li>
- </ul>
- <br/>
- <br/>
- </ul>
- <p><a name="HCS"></a>
- <h3>HCS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HCS'>DE</a>]</div>
- <ul>
- Defines a virtual device for monitoring thermostats (FHT, HM-CC-TC, MAX, Z-Wave) to control a central
- heating unit.<br><br>
- <a name="HCSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> HCS <device></code>
- <br><br>
- <ul>
- <li><code><device></code> the name of a predefined device to switch.</li>
- </ul>
- <br>
- The HCS (heating control system) device monitors the state of all detected thermostats
- in a free definable interval (by default: 10 min).
- <br><br>
- Regulation for heating requirement or suppression of the request can be controlled by
- valve position or measured temperature (default) using also free definable thresholds.
- In doing so, the HCS device also includes the hysteresis between two states.
- <br><br>
- Example for monitoring measured temperature:
- <ul>
- Threshold temperature for heating requirement: 0.5 (default)<br>
- Threshold temperature for idle: 0.5 (default)<br>
- <br>
- Heating is required when the measured temperature of a thermostat is lower than
- 0.5° Celsius as the desired temperature. HCS then activates the defined device
- until the measured temperature of the thermostat is 0.5° Celsius higher as the
- desired temperature (threshold for idle). In this example, both tresholds are equal.
- </ul>
- <br>
- Example for monitoring valve position:
- <ul>
- Threshold valve position for heating requirement: 40% (default)<br>
- Threshold valve position for idle: 35% (default)<br>
- <br>
- Heating is required when the "open" position of a valve is more than 40%. HCS then
- activates the defined device until the "open" position of the valve has lowered to
- 35% or less (threshold for idle).
- </ul>
- <br>
- The HCS device supports an optional eco mode. The threshold oriented regulation by
- measured temperature or valve position can be overridden by setting economic thresholds.
- <br><br>
-
- Example:
- <ul>
- Threshold temperature economic mode on: 16° Celsius<br>
- Threshold temperature economic mode off: 17° Celsius<br>
- <br>
-
- HCS activates the defined device until the measured temperature of one ore more
- thermostats is lower or equal than 16° Celsius. If a measured temperature of one
- or more thermostats is higher or equal than 17° Celsius, HCS switch of the defined
- device (if none of the measured temperatures of all thermostats is lower or equal as
- 16° Celsius).
- </ul>
- <br>
-
- In addition, the HCS device supports an optional temp-sensor. The threshold and economic
- oriented regulation can be overriden by the reading of the temp-sensor (overdrive mode).
- <br><br>
- Example:
- <ul>
- Threshold temperature reading for heating requirement: 10° Celsius<br>
- Threshold temperature reading for idle: 18° Celsius<br>
- <br>
- Is a measured temperature ore valve position reaching or exceeding the threshold for
- heating requirement, but the temperature reading is more than 18° Celcius, the
- selected device will stay deactivated. The measured temperature or valve-position
- oriented regulation has been overridden by the temperature reading in this example.
- </ul>
- <br>
- The HCS device automatically detects devices which are ignored. Furthermore, certain
- devices can also be excluded of the monitoring manually.
- <br><br>
- To reduce the transmission load, use the attribute event-on-change-reading, e.g.
- <code>attr <name> event-on-change-reading state,devicestate,eco,overdrive</code>
- <br><br>
- To avoid frequent switching "on" and "off" of the device, a timeout (in minutes) can be set
- using the attribute <code>idleperiod</code>.
- <br><br>
- <a name="HCSget"></a>
- <b>Get </b>
- <ul>
- <li><code>values</code><br>
- returns the actual values of each device
- </li>
- </ul>
- <br>
- <a name="HCSset"></a>
- <b>Set</b>
- <ul>
- <li><code>eco <on>|<off></code><br>
- enable (<code>on</code>) or disable (<code>off</code>) the economic mode.
- </li>
- <li><code>interval <value></code><br>
- <code>value</code> modifies the interval of reading the actual valve positions.
- The unit is minutes.
- </li>
- <li><code>mode <thermostat>|<valve></code><br>
- changes the operational mode:<br>
- <code>thermostat</code> controls the heating demand by defined temperature
- thresholds.<br>
- <code>valve</code> controls the heating demand by defined valve position thresholds.
- </li>
- <li><code>on</code><br>
- restarts the monitoring after shutdown by <code>off</code> switch.<br>
- HCS device starts up automatically upon FHEM start or after new device implementation!
- </li>
- <li><code>off</code><br>
- shutdown of monitoring, can be restarted by using the <code>on</code> command.
- </li>
- </ul>
- <br>
- <a name="HCSattr"></a>
- <b>Attributes</b>
- <ul>
- <li><code>deviceCmdOn</code> (mandatory)<br>
- command to activate the device, e.g. <code>on</code>.
- Default value: <code>on</code>
- </li>
- <li><code>deviceCmdOff</code> (mandatory)<br>
- command to deactivate the device, e.g. <code>off</code>.
- Default value: <code>off</code>
- </li>
- <li><code>ecoTemperatureOn</code> (Required by <code>eco</code> mode)<br>
- defines threshold for measured temperature upon which device is allways switched on
- </li>
- <li><code>ecoTemperatureOff</code> (Required by <code>eco</code> mode)<br>
- defines threshold for measured temperature upon which device is switched off
- </li>
- <li><code>exclude</code> (optional)<br>
- space or comma separated list of devices (FHT or HM-CC-TC) for excluding from
- monitoring
- </li>
- <li><code>idleperiod</code> (mandatory)<br>
- locks the device to be switched for the specified period. The unit is minutes.
- Default value: <code>10</code>
- </li>
- <li><code>mode</code> (mandatory)<br>
- defines the operational mode:<br>
- <code>thermostat</code> controls the heating demand by defined temperature
- thresholds.<br>
- <code>valve</code> controls the heating demand by defined valve position thresholds.<br>
- Default value: <code>thermostat</code>
- </li>
- <li><code>sensor</code> (optional)<br>
- device name of the temp-sensor
- </li>
- <li><code>sensorThresholdOn</code> (Required by <code>sensor</code>)<br>
- threshold for temperature reading activating the defined device
- Must be set if <code>sensor</code> has been defined
- </li>
- <li><code>sensorThresholdOff</code> (Required by <code>sensor</code>)<br>
- threshold for temperature reading deactivating the defined device.
- Must be set if <code>sensor</code> has been defined
- </li>
- <li><code>sensorReading</code> (Required by <code>sensor</code>)<br>
- name which is used for saving the "reading" of the defined temp-sensor.
- </li>
- <li><code>thermostatThresholdOn</code> (Required by operational mode <code>thermostat</code>)<br>
- defines delta threshold between desired and measured temperature upon which device
- is switched on (heating required).<br>
- Default value: <code>0.5</code>
- </li>
- <li><code>thermostatThresholdOff</code> (Required by operational mode <code>thermostat</code>)<br>
- defines delta threshold between desired and measured temperature upon which
- device is switched off (idle).<br>
- Default value: <code>0.5</code>
- </li>
- <li><code>valveThresholdOn</code> (Required by operational mode <code>valve</code>)<br>
- defines threshold of valve-position upon which device is switched on (heating
- required).<br>
- Default value: <code>40</code>
- </li>
- <li><code>valveThresholdOff</code> (Required by operational mode <code>valve</code>)<br>
- defines threshold of valve-position upon which device is switched off (idle).<br>
- Default value: <code>35</code>
- </li>
- <li><a href="#disable"><code>disable</code></a></li>
- <li><a href="#do_not_notify"><code>do_not_notify</code></a></li>
- <li><a href="#event-on-change-reading"><code>event-on-change-reading</code></a><br>
- default value: <code>state,devicestate,eco,overdrive</code>
- </li>
- <li><a href="#event-on-update-reading"><code>event-on-update-reading</code></a></li>
- <li><a href="#verbose"><code>verbose</code></a><br>
- verbose 4 (or lower) shows a complete statistic of scanned devices (FHT or HM-CC-TC).<br>
- verbose 3 shows a short summary of scanned devices.<br>
- verbose 2 suppressed the above messages.
- </li>
- </ul>
- <br>
- </ul>
- <br>
- </ul>
- <p><a name="HEATRONIC"></a>
- <h3>HEATRONIC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HEATRONIC'>DE</a>]</div>
- <ul>
- The HEATRONIC module interprets messages received from the HT-Bus of a Junkers Boiler. <br/>
- Possible Adapters are described in http://www.mikrocontroller.net/topic/317004 (only in german).
-
- <br/><br/>
- <a name="HEATRONIC_Define"></a>
- <B>Define:</B><br/>
- <ul><code>define <name> HEATRONIC <serial-device | <proxy-server IP-address:port></code>
-
- <B>Example for serial-device:</B></br>
- <ul>
- <code> define Boiler HEATRONIC /dev/ttyUSB0@9600</code>
- </ul><br/>
-
- <B>Example for proxy-server:</B></br>
- <ul>
- <code> define Boiler HEATRONIC 192.168.2.11:8088</code>
- </ul></ul><br/>
-
- <a name="HEATRONIC_set"><b>Set:</b></a>
- <ul>
- <code>set <name> <param> <value></code><br/>
- <ul>(only possible with ht_pitiny- or ht_piduino-adapters)</ul><br/>
- where param is one of:
- <ul>
- <li>hc1_Trequired <temp><br>
- sets the 'heating' temperature-niveau for heating circuit 1 (permanent)<br/>
- 0.5 celsius resolution - temperature between 10 and 30 celsius
- </li>
- <li>hc1_mode [ auto | comfort | eco | frost ]<br>
- sets the working mode for heating circuit 1<br>
- <ul>
- <li>auto : the timer program is active and the summer configuration is in effect</li>
- <li>comfort: manual by 'comfort' working mode, no timer program is in effect</li>
- <li>eco : manual by 'eco' working mode, no timer program is in effect</li>
- <li>frost : manual by 'frost' working mode, no timer program is in effect</li>
- </ul></li>
- </ul><br/>
- Examples:
- <ul>
- <code>set Boiler hc1_Trequired 22.5</code><br>
- <code>set Boiler hc1_mode eco</code>
- </ul><br/>
- </ul><br/>
-
- <a name="HEATRONIC_attributes"><b>Attributes:</b></a>
- <ul>
- <li><B>interval_ch_time, interval_ch_Tflow_measured, interval_dhw_Tmeasured, interval_dhw_Tcylinder</B><br/>
- interval (in seconds) to update the corresponding values
- </li><br/>
- <li><B>minDiff_ch_Tflow_measured</B><br/>
- minimal difference (in degrees, e.g. 0.2) to update the corresponding values
- </li><br/>
- </ul>
-
- <a name="HEATRONIC_readings"><b>Readings:</b></a>
- <ul>
- <li><B>ch_Tflow_desired</B><br/>
- required flow temperature (in domestic hot water mode value of max vessel temperature)<br>
- </li><br/>
- <li><B>ch_Tflow_measured</B><br/>
- current measured flow temperature
- </li><br/>
- <li><B>ch_Treturn</B><br/>
- current measured return temperature
- </li><br/>
- <li><B>ch_Tmixer</B><br/>
- current measured mixer temperature
- </li><br/>
- <li><B>ch_mode</B><br/>
- current operation mode (0=off, 1=heating, 2=domestic hot water)
- </li><br/>
- <li><B>ch_code</B><br/>
- current operation code or extended error code (see manual of boiler)
- </li><br/>
- <li><B>ch_code</B><br/>
- error code (see manual of boiler)
- </li><br/>
- <li><B>ch_burner_fan</B><br/>
- status of burner fan (0=off, 1=running)
- </li><br/>
- <li><B>ch_burner_operation</B><br/>
- burner status (0=off, 1=on)
- </li><br/>
- <li><B>ch_pump_heating</B><br/>
- status of the heating pump(0=off, 1=running)
- </li><br/>
- <li><B>ch_pump_cylinder</B><br/>
- status of cylinder loading pump (0=off, 1=running)
- </li><br/>
- <li><B>ch_pump_circulation</B><br/>
- status of circulation pump (0=off, 1=running)
- </li><br/>
- <li><B>ch_burner_power</B><br/>
- burner power in percent
- </li><br/>
- <li><B>ch_pump_heating_power</B><br/>
- power of heating power in percent
- </li><br/>
- <li><B>ch_Toutside</B><br/>
- outside temperature
- </li><br/>
- <li><B>ch_runtime_total</B><br/>
- runtime of burner in minutes (heating and domestic hot water)
- </li><br/>
- <li><B>ch_runtime_ch</B><br/>
- runtime of burner in minutes (heating only)
- </li><br/>
- <li><B>ch_runtime_dhw</B><br/>
- runtime of burner in minutes (domestic hot water only)
- </li><br/>
- <li><B>ch_starts_tot</B><br/>
- count of burner operations (heating and domestic hot water)
- </li><br/>
- <li><B>ch_starts_ch</B><br/>
- count of burner operations (heating only)
- </li><br/>
- <li><B>ch_starts_dhw</B><br/>
- count of burner operations (domestic hot water only)
- </li><br/>
- <li><B>ch_time</B><br/>
- system time of boiler
- </li><br/>
-
- <li><B>hc1_Tdesired .. hc4_Tdesired</B><br/>
- required room temperature for heating circuit 1-4
- </li><br/>
- <li><B>hc1_Tmeasured .. hc4_Tmeasured</B><br/>
- current measured room temperature for heating circuit 1-4
- </li><br/>
- <li><B>hc1_Tmode .. hc4_Tmode</B><br/>
- operating mode for heating circuit 1-4
- </li><br/>
- <li><B>dhw_Tdesired</B><br/>
- required domestic hot water temperature
- </li><br/>
- <li><B>dhw_Tmeasured</B><br/>
- current measured domestic hot water temperature
- </li><br/>
- <li><B>dhw_Tcylinder</B><br/>
- current measured domestic hot water temperature at the top of the cylinder
- </li><br/>
- <li><B>sol_Tcollector</B><br/>
- temperature of collector groupp 1
- </li><br/>
- <li><B>sol_Tcylinder_bottom</B><br/>
- temperature at the bottom of solar cylinder
- </li><br/>
- <li><B>sol_yield_last_hour</B><br/>
- yield of collector in the last hour
- </li><br/>
- <li><B>sol_yield_2</B><br/>
- This value is unkown at the moment. The name can be changed later.
- </li><br/>
- <li><B>sol_pump</B><br/>
- status of solar circuit pump (0=off, 1=running)
- </li><br/>
- <li><B>sol_runtime</B><br/>
- runtime of solar pump in minutes
- </li><br/>
- </ul>
- </ul>
- <p><a name="HEOSGroup"></a>
- <h3>HEOSGroup</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HEOSGroup'>DE</a>]</div>
- <ul>
- <u><b>HEOSGroup</b></u>
- <br><br>
- 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).
- <br><br>
- 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.
- <br>
- <br>
- Groups can be created from a player with "groupWithMember".
- <br><br>
- Example:
- <ul><br>
- <code>set living groupWithMember kitchen</code><br>
- </ul>
- <br>
- ... creates a group named "living+kitchen" with player "living" as leader and player "kitchen" as member.
- <a name="HEOSGroupreadings"></a>
- <br><br>
- <a name="HEOSGroupreadings"></a>
- <br><br>
- <b>Readings</b>
- <ul>
- <li>channel - nr of now playing favorite</li>
- <li>currentAlbum - name of now playing album</li>
- <li>currentArtist - name of now playing artist</li>
- <li>currentImageUrl - URL of cover art, station logo, etc.</li>
- <li>currentMedia - type of now playing media (song|station|genre|artist|album|container)</li>
- <li>currentMid - media ID</li>
- <li>currentQid - queue ID</li>
- <li>currentSid - source ID</li>
- <li>currentStation - name of now playing station</li>
- <li>currentTitle - name of now playing title</li>
- <li>error - last error</li>
- <li>gid - group ID</li>
- <li>leader - leader of the group</li>
- <li>member - member(s) of the group</li>
- <li>mute - player mute state (on|off)</li>
- <li>name - name of player (received from app)</li>
- <li>playStatus - state of player (play|pause|stop)</li>
- <li>repeat - player repeat state (on_all|on_one|off)</li>
- <li>shuffle - player shuffle state (on|off)</li>
- <li>state - state of player connection (on|off)</li>
- <li>volume - player volume level (0-100)</li>
- <li>volumeDown - player volume step level (1-10, default 5)</li>
- <li>volumeUp - player volume step level (1-10, default 5)</li>
- </ul>
- <br><br>
- <a name="HEOSGroupset"></a>
- <b>set</b>
- <ul>
- <li>channel <nr> - plays favorite <nr> created with app</li>
- <li>channelUp - switches to next favorite</li>
- <li>channelDown- switches to previous favorite</li>
- <li>clearGroup - dissolves the group (sets state to off)</li>
- <li>getGroupInfo - get media info of the group</li>
- <li>mute on|off - set mute state on|off</li>
- <li>next - play next title in queue</li>
- <li>pause - set state of player to "pause"</li>
- <li>play - set state of player to "play"</li>
- <li>playPlaylist <myList> - play playlist <myList></li>
- <li>prev - play previous title in queue</li>
- <li>repeat - set player repeat state (on_all|on_one|off)</li>
- <li>shuffle - set player shuffle state on|off</li>
- <li>stop - set state of player to "stop"</li>
- <li>volume - set volume 0..100</li>
- <li>volumeDown - reduce volume by <volumeDown></li>
- <li>volumeUp - increase volume by <volumeUp></li>
- </ul>
- <br><br>
- <a name="HEOSGroupstate"></a>
- <b>state</b>
- <ul>
- <li>state of group (on|off)</li>
- </ul>
- </ul>
- <p><a name="HEOSMaster"></a>
- <h3>HEOSMaster</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HEOSMaster'>DE</a>]</div>
- <ul>
- <u><b>HEOSMaster</b></u>
- <br><br>
- 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).
- <br><br>
- <b>Prerequisite</b>
- <ul>
- <li>Installation of the following packages: apt-get install libjson-perl libnet-telnet-perl libencode-perl
- </li>
- </ul>
- <br>
- <a name="HEOSMasterdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> HEOSMaster <IP address></code>
- <br><br>
- Example:
- <ul><br>
- <code>define MyMasterBox HEOSMaster 192.168.178.67</code><br>
- </ul>
- <br>
- <IP address> 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.
- <a name="HEOSMasterreadings"></a>
- <br><br>
- <b>Readings</b>
- <ul>
- <li>enableChangeEvents - state of the event reproduction at CLI master (on|off)</li>
- <li>heosAccount - signed_out | signed_in as <HEOSAccount></li>
- <li>lastCommand - last executed command</li>
- <li>lastPlayerId - player id of the device, which executed the last command</li>
- <li>lastPlayerName - player name of the device, which executed the last command</li>
- <li>lastResult - result of the last executed command</li>
- <li>state - state of the HEOSMaster</li>
- </ul>
- <br><br>
- <a name="HEOSMasterset"></a>
- <b>set</b>
- <ul>
- <li>checkAccount - checks Your HEOS account</li>
- <li>enableChangeEvents - activates the event reproduction at the CLI master</li>
- <li>getGroups - get a list of all groups and creates the devices, if not done already</li>
- <li>getPlayers - get a list of all players and creates the devices, if not yet existing</li>
- <li>password - set the password of Your HEOS account</li>
- <li>reboot - reboot of the CLI interface at HEOSMaster</li>
- <li>reopen - tries to establish a new socket connection with CLI master</li>
- <li>signAccount In|Out - sign in|out Your HEOS account (attr MyMasterBox heosUsername <username>)</li>
- </ul>
- <br><br>
- <a name="HEOSMasterget"></a>
- <b>get</b>
- <ul>
- <li>ShowAccount - shows Your HEOS account</li>
- </ul>
- <br><br>
- <a name="HEOSMasterstate"></a>
- <b>state</b>
- <ul>
- <li>connected - the HEOSmaster is connected to the CLI Master</li>
- <li>not connected - the HEOSmaster is not connected to the CLI Master</li>
- </ul>
- <br><br>
- <a name="HEOSMasterattributes"></a>
- <b>attributes</b>
- <ul>
- <li>heosUsername - username of Your HEOS account</li>
- </ul>
- <br><br>
- </ul>
- </ul>
-
- <p><a name="HEOSPlayer"></a>
- <h3>HEOSPlayer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HEOSPlayer'>DE</a>]</div>
- <ul>
- <u><b>HEOSPlayer</b></u>
- <br><br>
- 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).
- <br><br>
- 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.
- <a name="HEOSPlayerreadings"></a>
- <br><br>
- <b>Readings</b>
- <ul>
- <li>channel - nr of now playing favorite</li>
- <li>currentAlbum - name of now playing album</li>
- <li>currentArtist - name of now playing artist</li>
- <li>currentImageUrl - URL of cover art, station logo, etc.</li>
- <li>currentMedia - type of now playing media (song|station|genre|artist|album|container)</li>
- <li>currentMid - media ID</li>
- <li>currentQid - queue ID</li>
- <li>currentSid - source ID</li>
- <li>currentStation - name of now playing station</li>
- <li>currentTitle - name of now playing title</li>
- <li>error - last error</li>
- <li>gid - ID of group, in which player is member</li>
- <li>ip-address - ip address of the player</li>
- <li>lineout - lineout level type (variable|Fixed)</li>
- <li>model - model of HEOS speaker (e.g. HEOS 1)</li>
- <li>mute - player mute state (on|off)</li>
- <li>name - name of player (received from app)</li>
- <li>network - network connection type (wired|wifi)</li>
- <li>playStatus - state of player (play|pause|stop)</li>
- <li>repeat - player repeat state (on_all|on_one|off)</li>
- <li>shuffle - player shuffle state (on|off)</li>
- <li>state - state of player connection (on|off)</li>
- <li>version - software version of HEOS speaker</li>
- <li>volume - player volume level (0-100)</li>
- <li>volumeDown - player volume step level (1-10, default 5)</li>
- <li>volumeUp - player volume step level (1-10, default 5)</li>
- </ul>
- <br><br>
- <a name="HEOSPlayerset"></a>
- <b>set</b>
- <ul>
- <li>aux - uses source at aux-input of player</li>
- <li>channel <nr> - plays favorite <nr> created with app</li>
- <li>channelUp - switches to next favorite</li>
- <li>channelDown- switches to previous favorite</li>
- <li>clear queue - clears the queue</li>
- <li>deletePlaylist <myList> - clears playlist <myList></li>
- <li>set <hp1> groupWithMember <hp2> - creates group with hp1 as leader and hp2 as member</li>
- <li>input sid[,cid][,mid] - set input source-id[,container-id][,media-id] </li>
- <ul>
- <code>Example: set kitchen input 1027,1772574848,inputs/tvaudio<br>
- starts "tv audio" on player "kitchen"</code>
- </ul>
- <li>mute on|off - set mute state on|off</li>
- <li>next - play next title in queue</li>
- <li>pause - set state of player to "pause"</li>
- <li>play - set state of player to "play"</li>
- <li>playPlaylist <myList> - play playlist <myList></li>
- <li>playQueueItem <nr> - play title <nr> in queue</li>
- <li>prev - play previous title in queue</li>
- <li>repeat - set player repeat state (on_all|on_one|off)</li>
- <li>saveQueue <myList> - save queue as <myList></li>
- <li>shuffle - set player shuffle state on|off</li>
- <li>stop - set state of player to "stop"</li>
- <li>volume - set volume 0..100</li>
- <li>volumeDown - reduce volume by <volumeDown></li>
- <li>volumeUp - increase volume by <volumeUp></li>
- </ul>
- <br><br>
- <a name="HEOSPlayerget"></a>
- <b>get</b>
- <ul>
- <li>ls - list music sources (input, playlists, favorites, music services, ...) </li>
- <li>channelscount - number of favorites</li>
- </ul>
- <br><br>
- <a name="HEOSPlayerstate"></a>
- <b>state</b>
- <ul>
- <li>state of player connection (on|off)</li>
- </ul>
- <br><br>
- <a name="HEOSPlayerattributes"></a>
- <b>attributes</b>
- <ul>
- <li>channelring - when reaching the last favorite ChannelUp/Down switches in circle, i.e. to the first/last favorite again</li>
- <li>mute2play - if mute switch on speaker is pressed, the stream stops</li>
- </ul>
- </ul>
- <p><a name="HMCCU"></a>
- <h3>HMCCU</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMCCU'>DE</a>]</div>
- <ul>
- The module provides an interface between FHEM and a Homematic CCU2. HMCCU is the
- I/O device for the client devices HMCCUDEV and HMCCUCHN. The module requires the
- additional Perl modules IO::File, RPC::XML::Client, RPC::XML::Server and SubProcess
- (part of FHEM).
- </br></br>
- <a name="HMCCUdefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> HMCCU <HostOrIP> [<ccu-number>] [waitforccu=<timeout>]</code>
- <br/><br/>
- Example:<br/>
- <code>define myccu HMCCU 192.168.1.10</code>
- <br/><br/>
- The parameter <i>HostOrIP</i> is the hostname or IP address of a Homematic CCU2. If you have
- more than one CCU you can specifiy a unique CCU number with parameter <i>ccu-number</i>. With
- option <i>waitforccu</i> HMCCU will wait for the specified time if CCU is not reachable.
- Parameter <i>timeout</i> should be a multiple of 20 in seconds. Warning: This option could
- block the start of FHEM for <i>timeout</i> seconds.
- <br/>
- For automatic update of Homematic device datapoints and FHEM readings one have to:
- <br/><br/>
- <ul>
- <li>Define used RPC interfaces with attribute 'rpcinterfaces'</li>
- <li>Start RPC servers with command 'set rpcserver on'</li>
- <li>Optionally enable automatic start of RPC servers with attribute 'rpcserver'</li>
- </ul><br/>
- Than start with the definition of client devices using modules HMCCUDEV (CCU devices)
- and HMCCUCHN (CCU channels) or with command 'get devicelist create'.<br/>
- Maybe it's helpful to set the following FHEM standard attributes for the HMCCU I/O
- device:<br/><br/>
- <ul>
- <li>Shortcut for RPC server control: eventMap /rpcserver on:on/rpcserver off:off/</li>
- </ul>
- </ul>
- <br/>
-
- <a name="HMCCUset"></a>
- <b>Set</b><br/><br/>
- <ul>
- <li><b>set <name> ackmessages</b><br/>
- Acknowledge device was unreachable messages in CCU.
- </li><br/>
- <li><b>set <name> cleardefaults</b><br/>
- Clear default attributes imported from file.
- </li><br/>
- <li><b>set <name> datapoint {<[ccu:]ccuobject>|<hmccu:fhemobject>}.
- <datapoint> <value></b><br/>
- Set datapoint of CCU channel in "raw" mode. The value is not scaled or substituted. If
- target object is preceded by string "hmccu:" the following parameter <i>fhemobject</i>
- must be a FHEM device of type HMCCUDEV or HMCCUCHN. If device type is HMCCUDEV the device
- name must be followed by a ':' and a valid channel number.<br/><br/>
- Examples:<br/>
- <code>set d_ccu datapoint ABC1234567:1.STATE true</code><br/>
- <code>set d_ccu datapoint hmccu:mychndevice.STATE true</code><br/>
- <code>set d_ccu datapoint hmccu:mydevdevice:1.STATE true</code>
- </li><br/>
- <li><b>set <name> defaults</b><br/>
- Set default attributes for I/O device.
- </li><br/>
- <li><b>set <name> delete <ccuobject> [<objecttype>]</b><br/>
- Delete object in CCU. Default object type is OT_VARDP. Valid object types are<br/>
- OT_DEVICE=device, OT_VARDP=variable.
- </li><br/>
- <li><b>set <name> execute <program></b><br/>
- Execute a CCU program.
- <br/><br/>
- Example:<br/>
- <code>set d_ccu execute PR-TEST</code>
- </li><br/>
- <li><b>set <name> hmscript {<script-file>|'!'<function>|'['<code>']'} [dump]
- [<parname>=<value> [...]]</b><br/>
- Execute Homematic script on CCU. If script code contains parameter in format $parname
- they are substituted by corresponding command line parameters <i>parname</i>.<br/>
- If output of script contains lines in format Object=Value readings in existing
- corresponding FHEM devices will be set. <i>Object</i> can be the name of a CCU system
- variable or a valid channel and datapoint specification. Readings for system variables
- are set in the I/O device. Datapoint related readings are set in client devices. If option
- 'dump' is specified the result of script execution is displayed in FHEM web interface.
- Execute command without parameters will list available script functions.
- </li><br/>
- <li><b>set <name> importdefaults <filename></b><br/>
- Import default attributes from file.
- </li><br/>
- <li><b>set <name> rpcserver {on | off | restart}</b><br/>
- Start, stop or restart RPC server(s). This command executed with option 'on'
- will fork a RPC server process for each RPC interface defined in attribute 'rpcinterfaces'.
- Until operation is completed only a few set/get commands are available and you
- may get the error message 'CCU busy'.
- </li><br/>
- <li><b>set <name> var <variable> <Value></b><br/>
- Set CCU system variable value. Special characters \_ in <i>value</i> are
- substituted by blanks.
- </li>
- </ul>
- <br/>
-
- <a name="HMCCUget"></a>
- <b>Get</b><br/><br/>
- <ul>
- <li><b>get <name> aggregation {<rule>|all}</b><br/>
- Process aggregation rule defined with attribute ccuaggregate.
- </li><br/>
- <li><b>get <name> configdesc {<device>|<channel>}</b><br/>
- Get configuration parameter description of CCU device or channel (similar
- to device settings in CCU). Not every CCU device or channel provides a configuration
- parameter description. So result may be empty.
- </li><br/>
- <li><b>get <name> defaults</b><br/>
- List device types and channels with default attributes available.
- </li><br/>
- <li><b>get <name> deviceinfo <device-name> [{State | <u>Value</u>}]</b><br/>
- List device channels and datapoints. If option 'State' is specified the device is
- queried directly. Otherwise device information from CCU is listed.
- </li><br/>
- <li><b>get <name> devicelist [dump]</b><br/>
- Read list of devices and channels from CCU. This command is executed automatically
- after the definition of an I/O device. It must be executed manually after
- module HMCCU is reloaded or after devices have changed in CCU (added, removed or
- renamed). With option 'dump' devices are displayed in browser window. If a RPC
- server is running HMCCU will raise events "<i>count</i> devices added in CCU" or
- "<i>count</i> devices deleted in CCU". It's recommended to set up a notification
- which reacts with execution of command 'get devicelist' on these events.
- </li><br/>
- <li><b>get <name> devicelist create <devexp> [t={chn|<u>dev</u>|all}]
- [p=<prefix>] [s=<suffix>] [f=<format>] [defattr] [duplicates]
- [save] [<attr>=<value> [...]]</b><br/>
- With option 'create' HMCCU will automatically create client devices for all CCU devices
- and channels matching specified regular expression. With option t=chn or t=dev (default)
- the creation of devices is limited to CCU channels or devices.<br/>
- Optionally a <i>prefix</i> and/or a
- <i>suffix</i> for the FHEM device name can be specified. The parameter <i>format</i>
- defines a template for the FHEM device names. Prefix, suffix and format can contain
- format identifiers which are substituted by corresponding values of the CCU device or
- channel: %n = CCU object name (channel or device), %d = CCU device name, %a = CCU address.
- In addition a list of default attributes for the created client devices can be specified.
- If option 'defattr' is specified HMCCU tries to set default attributes for device.
- With option 'duplicates' HMCCU will overwrite existing devices and/or create devices
- for existing device addresses. Option 'save' will save FHEM config after device definition.
- </li><br/>
- <li><b>get <name> dump {datapoints|devtypes} [<filter>]</b><br/>
- Dump all Homematic devicetypes or all devices including datapoints currently
- defined in FHEM.
- </li><br/>
- <li><b>get <name> dutycycle</b><br/>
- Read CCU interface and gateway information. For each interface/gateway the following
- information is stored in readings:<br/>
- iface_addr_n = interface address<br/>
- iface_type_n = interface type<br/>
- iface_conn_n = interface connection state (1=connected, 0=disconnected)<br/>
- iface_ducy_n = duty cycle of interface (0-100)
- </li><br/>
- <li><b>get <name> exportdefaults <filename></b><br/>
- Export default attributes into file.
- </li><br/>
- <li><b>get <name> firmware</b><br/>
- Get available firmware downloads from eq-3.de. List FHEM devices with current and available
- firmware version. Firmware versions are only displayed after RPC server has been started.
- </li><br/>
- <li><b>get <name> parfile [<parfile>]</b><br/>
- Get values of all channels / datapoints specified in <i>parfile</i>. The parameter
- <i>parfile</i> can also be defined as an attribute. The file must contain one channel /
- definition per line.
- <br/><br/>
- The syntax of Parfile entries is:
- <br/><br/>
- {[<interface>.]<channel-address> | <channel-name>}
- [.<datapoint-expr>] [<subst-rules>]
- <br/><br/>
- Empty lines or lines starting with a # are ignored.
- </li><br/>
- <li><b>get <name> rpcstate</b><br/>
- Check if RPC server process is running.
- </li><br/>
- <li><b>get <name> update [<devexp> [{State | <u>Value</u>}]]</b><br/>
- Update all datapoints / readings of client devices with <u>FHEM device name</u>(!) matching
- <i>devexp</i>. With option 'State' all CCU devices are queried directly. This can be
- time consuming.
- </li><br/>
- <li><b>get <name> updateccu [<devexp> [{State | <u>Value</u>}]]</b><br/>
- Update all datapoints / readings of client devices with <u>CCU device name</u>(!) matching
- <i>devexp</i>. With option 'State' all CCU devices are queried directly. This can be
- time consuming.
- </li><br/>
- <li><b>get <name> vars <regexp></b><br/>
- Get CCU system variables matching <i>regexp</i> and store them as readings.
- </li>
- </ul>
- <br/>
-
- <a name="HMCCUattr"></a>
- <b>Attributes</b><br/>
- <br/>
- <ul>
- <li><b>ccuaggregate <rule>[;...]</b><br/>
- Define aggregation rules for client device readings. With an aggregation rule
- it's easy to detect if some or all client device readings are set to a specific
- value, i.e. detect all devices with low battery or detect all open windows.<br/>
- Aggregation rules are automatically executed as a reaction on reading events of
- HMCCU client devices. An aggregation rule consists of several parameters separated
- by comma:<br/><br/>
- <ul>
- <li><b>name:<rule-name></b><br/>
- Name of aggregation rule</li>
- <li><b>filter:{name|alias|group|room|type}=<incl-expr>[!<excl-expr>]</b><br/>
- Filter criteria, i.e. "type=^HM-Sec-SC.*"</li>
- <li><b>read:<read-expr></b><br/>
- Expression for reading names, i.e. "STATE"</li>
- <li><b>if:{any|all|min|max|sum|avg|lt|gt|le|ge}=<value></b><br/>
- Condition, i.e. "any=open" or initial value, i.e. max=0</li>
- <li><b>else:<value></b><br/>
- Complementary value, i.e. "closed"</li>
- <li><b>prefix:{<text>|RULE}</b><br/>
- Prefix for reading names with aggregation results</li>
- <li><b>coll:{<attribute>|NAME}[!<default-text>]</b><br/>
- Attribute of matching devices stored in aggregation results. Default text in case
- of no matching devices found is optional.</li>
- <li><b>html:<template-file></b><br/>
- Create HTML code with matching devices.</li>
- </ul><br/>
- Aggregation results will be stored in readings <i>prefix</i>count, <i>prefix</i>list,
- <i>prefix</i>match, <i>prefix</i>state and <i>prefix</i>table.<br/><br/>
- Format of a line in <i>template-file</i> is <keyword>:<html-code>. See
- FHEM Wiki for an example. Valid keywords are:<br/><br/>
- <ul>
- <li><b>begin-html</b>: Start of html code.</li>
- <li><b>begin-table</b>: Start of table (i.e. the table header)</li>
- <li><b>row-odd</b>: HTML code for odd lines. A tag <reading/> is replaced by a matching device.</li>
- <li><b>row-even</b>: HTML code for event lines.</li>
- <li><b>end-table</b>: End of table.</li>
- <li><b>default</b>: HTML code for no matches.</li>
- <li><b>end-html</b>: End of html code.</li>
- </ul><br/>
- Example: Find open windows<br/>
- name=lock,filter:type=^HM-Sec-SC.*,read:STATE,if:any=open,else:closed,prefix:lock_,coll:NAME!All windows closed<br/><br/>
- Example: Find devices with low batteries. Generate reading in HTML format.<br/>
- 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/>
- </li><br/>
- <li><b>ccudef-hmstatevals <subst-rule[;...]></b><br/>
- Set global rules for calculation of reading hmstate.
- </li><br/>
- <li><b>ccudef-readingfilter <filter-rule[;...]></b><br/>
- Set global reading/datapoint filter. This filter is added to the filter specified by
- client device attribute 'ccureadingfilter'.
- </li><br/>
- <li><b>ccudef-readingformat {name | address | <u>datapoint</u> | namelc | addresslc |
- datapointlc}</b><br/>
- Set global reading format. This format is the default for all readings except readings
- of virtual device groups.
- </li><br/>
- <li><b>ccudef-readingname <old-readingname-expr>:[+]<new-readingname>
- [;...]</b><br/>
- Set global rules for reading name substitution. These rules are added to the rules
- specified by client device attribute 'ccureadingname'.
- </li><br/>
- <li><b>ccudef-substitute <subst-rule>[;...]</b><br/>
- Set global substitution rules for datapoint value. These rules are added to the rules
- specified by client device attribute 'substitute'.
- </li><br/>
- <li><b>ccudefaults <filename></b><br/>
- Load default attributes for HMCCUCHN and HMCCUDEV devices from specified file. Best
- practice for creating a custom default attribute file is by exporting predefined default
- attributes from HMCCU with command 'get exportdefaults'.
- </li><br/>
- <li><b>ccuflags {extrpc, procrpc, <u>intrpc</u>}</b><br/>
- Control behaviour of several HMCCU functions:<br/>
- ackState - Acknowledge command execution by setting STATE to error or success.<br/>
- dptnocheck - Do not check within set or get commands if datapoint is valid<br/>
- intrpc - Use internal RPC server. This is the default.<br/>
- extrpc - Use external RPC server provided by module HMCCURPC. If no HMCCURPC device
- exists HMCCU will create one after command 'set rpcserver on'.<br/>
- logEvents - Write events from CCU into FHEM logfile<br/>
- noReadings - Do not write readings<br/>
- </li><br/>
- <li><b>ccuget {State | <u>Value</u>}</b><br/>
- Set read access method for CCU channel datapoints. Method 'State' is slower than
- 'Value' because each request is sent to the device. With method 'Value' only CCU
- is queried. Default is 'Value'.
- </li><br/>
- <li><b>ccuReqTimeout <Seconds></b><br/>
- Set timeout for CCU request. Default is 4 seconds. This timeout affects several
- set and get commands, i.e. "set datapoint" or "set var". If a command runs into
- a timeout FHEM will block for <i>Seconds</i>.
- </li>
- <li><b>ccureadings {0 | <u>1</u>}</b><br/>
- Deprecated. Readings are written by default. To deactivate readings set flag noReadings
- in attribute ccuflags.
- </li><br/>
- <li><b>parfile <filename></b><br/>
- Define parameter file for command 'get parfile'.
- </li><br/>
- <li><b>rpcdevice <devicename></b><br/>
- Specify name of external RPC device of type HMCCURPC.
- </li><br/>
- <li><b>rpcinterfaces <interface>[,...]</b><br/>
- Specify list of CCU RPC interfaces. HMCCU will register a RPC server for each interface.
- Interface BidCos-RF is default and always active. Valid interfaces are:<br/><br/>
- <ul>
- <li>BidCos-Wired (Port 2000)</li>
- <li>BidCos-RF (Port 2001)</li>
- <li>Homegear (Port 2003)</li>
- <li>HmIP-RF (Port 2010)</li>
- <li>HVL (Port 7000)</li>
- <li>CUxD (Port 8701)</li>
- <li>VirtualDevice (Port 9292)</li>
- </ul>
- </li><br/>
- <li><b>rpcinterval <Seconds></b><br/>
- Specifiy how often RPC queue is read. Default is 5 seconds.
- </li><br/>
- <li><b>rpcport <value[,...]></b><br/>
- Deprecated, use 'rpcinterfaces' instead. Specify list of RPC ports on CCU. Default is
- 2001. Valid RPC ports are:<br/><br/>
- <ul>
- <li>2000 = Wired components</li>
- <li>2001 = BidCos-RF (wireless 868 MHz components with BidCos protocol)</li>
- <li>2003 = Homegear (experimental)</li>
- <li>2010 = HM-IP (wireless 868 MHz components with IPv6 protocol)</li>
- <li>7000 = HVL (Homematic Virtual Layer devices)</li>
- <li>8701 = CUxD (only supported with external RPC server HMCCURPC)</li>
- <li>9292 = CCU group devices (especially heating groups)</li>
- </ul>
- </li><br/>
- <li><b>rpcqueue <queue-file></b><br/>
- Specify name of RPC queue file. This parameter is only a prefix (including the
- pathname) for the queue files with extension .idx and .dat. Default is
- /tmp/ccuqueue. If FHEM is running on a SD card it's recommended that the queue
- files are placed on a RAM disk.
- </li><br/>
- <li><b>rpcserver {on | <u>off</u>}</b><br/>
- Specify if RPC server is automatically started on FHEM startup.
- </li><br/>
- <li><b>rpcserveraddr <ip-or-name></b><br/>
- Specify network interface by IP address or DNS name where RPC server should listen
- on. By default HMCCU automatically detects the IP address. This attribute should be used
- if the FHEM server has more than one network interface.
- </li><br/>
- <li><b>rpcserverport <base-port></b><br/>
- Specify base port for RPC server. The real listening port of an RPC server is
- calculated by the formula: base-port + rpc-port + (10 * ccu-number). Default
- value for <i>base-port</i> is 5400.<br/>
- The value ccu-number is only relevant if more than one CCU is connected to FHEM.
- Example: If <i>base-port</i> is 5000, protocol is BidCos (rpc-port 2001) and only
- one CCU is connected the resulting RPC server port is 5000+2001+(10*0) = 7001.
- </li><br/>
- <li><b>substitute <subst-rule>:<substext>[,...]</b><br/>
- Define substitions for datapoint values. Syntax of <i>subst-rule</i> is<br/><br/>
- [[<channelno.>]<datapoint>[,...]!]<{#n1-m1|regexp1}>:<text1>[,...]
- <br/>
- Substitutions for parfile values must be specified in parfiles.
- </li><br/>
- <li><b>stripchar <character></b><br/>
- Strip the specified character from variable or device name in set commands. This
- is useful if a variable should be set in CCU using the reading with trailing colon.
- </li>
- </ul>
- </ul>
- <p><a name="HMCCUCHN"></a>
- <h3>HMCCUCHN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMCCUCHN'>DE</a>]</div>
- <ul>
- The module implements Homematic CCU channels as client devices for HMCCU. A HMCCU I/O device must
- exist before a client device can be defined. If a CCU channel is not found execute command
- 'get devicelist' in I/O device.
- </br></br>
- <a name="HMCCUCHNdefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> HMCCUCHN {<channel-name> | <channel-address>}
- [readonly] [defaults] [iodev=<iodev-name>]</code>
- <br/><br/>
- If option 'readonly' is specified no set command will be available. With option 'defaults'
- some default attributes depending on CCU device type will be set. Default attributes are only
- available for some device types.<br/>
- The define command accepts a CCU2 channel name or channel address as parameter.
- <br/><br/>
- Examples:<br/>
- <code>define window_living HMCCUCHN WIN-LIV-1 readonly</code><br/>
- <code>define temp_control HMCCUCHN BidCos-RF.LEQ1234567:1</code>
- <br/><br/>
- The interface part of a channel address must not be specified. The default is 'BidCos-RF'.
- Channel addresses can be found with command 'get deviceinfo <devicename>' executed
- in I/O device.
- </ul>
- <br/>
-
- <a name="HMCCUCHNset"></a>
- <b>Set</b><br/><br/>
- <ul>
- <li><b>set <name> clear [<reading-exp>]</b><br/>
- Delete readings matching specified reading name expression. Default expression is '.*'.
- Readings 'state' and 'control' are not deleted.
- </li><br/>
- <li><b>set <name> config [device] [<rpcport>] <parameter>=<value>]
- [...]</b><br/>
- Set config parameters of CCU channel. This is equal to setting device parameters in CCU.
- Valid parameters can be listed by using commands 'get configdesc' or 'get configlist'.
- With option 'device' specified parameters are set in device instead of channel.
- </li><br/>
- <li><b>set <name> datapoint <datapoint> <value> [...]</b><br/>
- Set datapoint values of a CCU channel. If parameter <i>value</i> contains special
- character \_ it's substituted by blank.
- <br/><br/>
- Examples:<br/>
- <code>set temp_control datapoint SET_TEMPERATURE 21</code><br/>
- <code>set temp_control datapoint AUTO_MODE 1 SET_TEMPERATURE 21</code>
- </li><br/>
- <li><b>set <name> defaults</b><br/>
- Set default attributes for CCU device type. Default attributes are only available for
- some device types and for some channels of a device type.
- </li><br/>
- <li><b>set <name> devstate <value></b><br/>
- Set state of a CCU device channel. The state datapoint of a channel must be defined
- by setting attribute 'statedatapoint' to a valid datapoint name.
- <br/><br/>
- Example:<br/>
- <code>set light_entrance devstate true</code>
- </li><br/>
- <li><b>set <name> <statevalue></b><br/>
- Set state of a CCU device channel to <i>StateValue</i>. The state datapoint of a channel
- must be defined by setting attribute 'statedatapoint'. The available state values must
- be defined by setting attribute 'statevals'.
- <br/><br/>
- Example: Turn switch on<br/>
- <code>
- attr myswitch statedatapoint STATE<br/>
- attr myswitch statevals on:true,off:false<br/>
- set myswitch on
- </code>
- </li><br/>
- <li><b>set <name> toggle</b><br/>
- Toggle state datapoint between values defined by attribute 'statevals'. This command is
- only available if attribute 'statevals' is set. Toggling supports more than two state
- values.
- <br/><br/>
- Example: Toggle blind actor<br/>
- <code>
- attr myswitch statedatapoint LEVEL<br/>
- attr myswitch statevals up:100,down:0<br/>
- set myswitch toggle
- </code>
- </li><br/>
- <li><b>set <name> on-for-timer <ontime></b><br/>
- Switch device on for specified number of seconds. This command is only available if
- channel contains a datapoint ON_TIME. The attribute 'statevals' must contain at least a
- value for 'on'. The attribute 'statedatapoint' must be set to a writeable datapoint.
- <br/><br/>
- Example: Turn switch on for 300 seconds<br/>
- <code>
- attr myswitch statedatapoint STATE<br/>
- attr myswitch statevals on:true,off:false<br/>
- set myswitch on-for-timer 300
- </code>
- </li><br/>
- <li><b>set <name> on-till <timestamp></b><br/>
- Switch device on until <i>timestamp</i>. Parameter <i>timestamp</i> can be a time in
- format HH:MM or HH:MM:SS. This command is only available if channel contains a datapoint
- ON_TIME. The attribute 'statevals' must contain at least a value for 'on'. The Attribute
- 'statedatapoint' must be set to a writeable datapoint.
- </li><br/>
- <li><b>set <name> pct <value> [<ontime> [<ramptime>]]</b><br/>
- Set datapoint LEVEL of a channel to the specified <i>value</i>. Optionally a <i>ontime</i>
- and a <i>ramptime</i> (both in seconds) can be specified. This command is only available
- if channel contains at least a datapoint LEVEL and optionally datapoints ON_TIME and
- RAMP_TIME. The parameter <i>ontime</i> can be specified in seconds or as timestamp in
- format HH:MM or HH:MM:SS. If <i>ontime</i> is 0 it's ignored. This syntax can be used to
- modify the ramp time only.
- <br/><br/>
- Example: Turn dimmer on for 600 second. Increase light to 100% over 10 seconds<br>
- <code>
- attr myswitch statedatapoint LEVEL<br/>
- attr myswitch statevals on:100,off:0<br/>
- set myswitch pct 100 600 10
- </code>
- </li><br/>
- </ul>
- <br/>
-
- <a name="HMCCUCHNget"></a>
- <b>Get</b><br/><br/>
- <ul>
- <li><b>get <name> config [device] [<filter-expr>]</b><br/>
- Get configuration parameters of CCU channel. If attribute 'ccureadings' is 0 results
- are displayed in browser window. Parameters can be filtered by <i>filter-expr</i>.
- Parameters to be stored as readings must be part of 'ccureadingfilter'. If option
- 'device' is specified parameters of device are read.
- </li><br/>
- <li><b>get <name> configdesc [device]</b><br/>
- Get description of configuration parameters of CCU channel or device if option 'device'
- is specified.
- </li><br/>
- <li><b>get <name> configlist [device] [<filter-expr>]</b><br/>
- Get configuration parameters of CCU channel. Parameters can be filtered by
- <i>filter-expr</i>. With option 'device' device parameters are listed.
- </li><br/>
- <li><b>get <name> datapoint <datapoint></b><br/>
- Get value of a CCU channel datapoint.
- </li><br/>
- <li><b>get <name> defaults</b><br/>
- Display default attributes for CCU device type.
- </li><br/>
- <li><b>get <name> deviceinfo [{State | <u>Value</u>}]</b><br/>
- Display all channels and datapoints of device with datapoint values and types.
- </li><br/>
- <li><b>get <name> devstate</b><br/>
- Get state of CCU device. Default datapoint STATE can be changed by setting
- attribute 'statedatapoint'. Command will fail if state datapoint does not exist in
- channel.
- </li><br/>
- <li><b>get <name> update [{State | <u>Value</u>}]</b><br/>
- Update all datapoints / readings of channel. With option 'State' the device is queried.
- This request method is more accurate but slower then 'Value'.
- </li>
- </ul>
- <br/>
-
- <a name="HMCCUCHNattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
- to '.*'.
- <br/><br/>
- <li><b>ccucalculate <value-type>:<reading>[:<dp-list>[;...]</b><br/>
- Calculate special values like dewpoint based on datapoints specified in
- <i>dp-list</i>. The result is stored in <i>reading</i>. The following <i>values</i>
- are supported:<br/>
- dewpoint = calculate dewpoint, <i>dp-list</i> = <temperature>,<humidity><br/>
- abshumidity = calculate absolute humidity, <i>dp-list</i> = <temperature>,<humidity><br/>
- inc = increment datapoint value considering reset of datapoint, <i>dp-list</i> = <counter-datapoint><br/>
- min = calculate minimum continuously, <i>dp-list</i> = <datapoint><br/>
- max = calculate maximum continuously, <i>dp-list</i> = <datapoint><br/>
- sum = calculate sum continuously, <i>dp-list</i> = <datapoint><br/>
- avg = calculate average continuously, <i>dp-list</i> = <datapoint><br/>
- Example:<br/>
- <code>dewpoint:taupunkt:1.TEMPERATURE,1.HUMIDITY</code>
- </li><br/>
- <li><b>ccuflags {nochn0, trace}</b><br/>
- Control behaviour of device:<br/>
- ackState: Acknowledge command execution by setting STATE to error or success.<br/>
- nochn0: Prevent update of status channel 0 datapoints / readings.<br/>
- trace: Write log file information for operations related to this device.
- </li><br/>
- <li><b>ccuget {State | <u>Value</u>}</b><br/>
- Set read access method for CCU channel datapoints. Method 'State' is slower than 'Value'
- because each request is sent to the device. With method 'Value' only CCU is queried.
- Default is 'Value'.
- </li><br/>
- <li><b>ccureadings {0 | <u>1</u>}</b><br/>
- If set to 1 values read from CCU will be stored as readings. Default is 1.
- </li><br/>
- <li><b>ccureadingfilter <filter-rule[;...]></b><br/>
- Only datapoints matching specified expression are stored as readings.<br/>
- Syntax for <i>filter-rule</i> is either:<br/>
- [N:]{<channel-name>|<channel-number>}!<RegExp> or:<br/>
- [N:][<channel-number>.]<RegExp><br/>
- If <i>channel-name</i> or <i>channel-number</i> is specified the following rule
- applies only to this channel.
- By default all datapoints will be stored as readings. Attribute ccudef-readingfilter
- of I/O device will be checked before this attribute.<br/>
- If a rule starts with 'N:' the filter is negated which means that a reading is
- stored if rule doesn't match.
- </li><br/>
- <li><b>ccureadingformat {address[lc] | name[lc] | datapoint[lc]}</b><br/>
- Set format of reading names. Default for virtual device groups is 'name'. The default for all
- other device types is 'datapoint'. If set to 'address' format of reading names
- is channel-address.datapoint. If set to 'name' format of reading names is
- channel-name.datapoint. If set to 'datapoint' format is channel-number.datapoint. With
- suffix 'lc' reading names are converted to lowercase.
- </li><br/>
- <li><b>ccureadingname <old-readingname-expr>:[+]<new-readingname>[;...]</b><br/>
- Set alternative or additional reading names or group readings. Only part of old reading
- name matching <i>old-readingname-exptr</i> is substituted by <i>new-readingname</i>.
- If <i>new-readingname</i> is preceded by '+' an additional reading is created. If
- <i>old-readingname-expr</i> matches more than one reading the values of these readings
- are stored in one reading. This makes sense only in some cases, i.e. if a device has
- several pressed_short datapoints and a reading should contain a value if any button
- is pressed.<br/><br/>
- Examples:<br/>
- <code>
- # Rename readings 0.LOWBAT and 0.LOW_BAT as battery<br/>
- attr mydev ccureadingname 0.(LOWBAT|LOW_BAT):battery<br/>
- # Add reading battery as a copy of readings LOWBAT and LOW_BAT.<br/>
- # Rename reading 4.SET_TEMPERATURE as desired-temp<br/>
- attr mydev ccureadingname 0.(LOWBAT|LOW_BAT):+battery;1.SET_TEMPERATURE:desired-temp<br/>
- # Store values of readings n.PRESS_SHORT in new reading pressed.<br/>
- # Value of pressed is 1/true if any button is pressed<br/>
- attr mydev ccureadingname [1-4].PRESSED_SHORT:+pressed
- </code>
- </li><br/>
- <li><b>ccuscaleval <datapoint>:<factor>[,...]</b><br/>
- <b>ccuscaleval <[!]datapoint>:<min>:<max>:<minn>:<maxn>[,...]
- </b><br/>
- Scale, spread, shift and optionally reverse values before executing set datapoint commands
- or after executing get datapoint commands / before storing values in readings.<br/>
- If first syntax is used during get the value read from CCU is devided by <i>factor</i>.
- During set the value is multiplied by factor.<br/>
- With second syntax one must specify the interval in CCU (<i>min,max</i>) and the interval
- in FHEM (<i>minn, maxn</i>). The scaling factor is calculated automatically. If parameter
- <i>datapoint</i> starts with a '!' the resulting value is reversed.
- <br/><br/>
- Example: Scale values of datapoint LEVEL for blind actor and reverse values<br/>
- <code>
- attr myblind ccuscale !LEVEL:0:1:0:100
- </code>
- </li><br/>
- <li><b>ccuverify {<u>0</u> | 1 | 2}</b><br/>
- If set to 1 a datapoint is read for verification after set operation. If set to 2 the
- corresponding reading will be set to the new value directly after setting a datapoint
- in CCU without any verification.
- </li><br/>
- <li><b>controldatapoint <datapoint></b><br/>
- Set datapoint for device control. Can be use to realize user defined control elements for
- setting control datapoint. For example if datapoint of thermostat control is
- SET_TEMPERATURE one can define a slider for setting the destination temperature with
- following attributes:<br/><br/>
- attr mydev controldatapoint SET_TEMPERATURE<br/>
- attr mydev webCmd control<br/>
- attr mydev widgetOverride control:slider,10,1,25
- </li><br/>
- <li><b>disable {<u>0</u> | 1}</b><br/>
- Disable client device.
- </li><br/>
- <li><b>hmstatevals <subst-rule>[;...]</b><br/>
- Define building rules and substitutions for reading hmstate. Syntax of <i>subst-rule</i>
- is<br/>
- [=<reading>;]<datapoint-expr>!<{#n1-m1|regexp}>:<text>[,...]
- <br/><br/>
- The syntax is almost the same as of attribute 'substitute', except there's no channel
- specification possible for datapoint and parameter <i>datapoint-expr</i> is a regular
- expression.<br/>
- The value of the I/O device attribute 'ccudef-hmstatevals' is appended to the value of
- this attribute. The default value of 'ccudef-hmstatevals' is
- '^UNREACH!(1|true):unreachable;LOW_?BAT!(1|true):warn_battery'.
- Normally one should not specify a substitution rule for the "good" value of an error
- datapoint (i.e. 0 for UNREACH). If none of the rules is matching, reading 'hmstate' is set
- to value of reading 'state'.<br/>
- Parameter <i>text</i> can contain variables in format ${<i>varname</i>}. The variable
- $value is substituted by the original datapoint value. All other variables must match
- with a valid datapoint name or a combination of channel number and datapoint name
- seperated by a '.'.<br/>
- Optionally the name of the HomeMatic state reading can be specified at the beginning of
- the attribute in format =<reading>;. The default reading name is 'hmstate'.
- </li><br/>
- <li><b>peer <datapoints>:<condition>:
- {ccu:<object>=<value>|hmccu:<object>=<value>|
- fhem:<command>}</b><br/>
- Logically peer datapoints of a HMCCUCHN or HMCCUDEV device with another device or any
- FHEM command.<br/>
- Parameter <i>datapoints</i> is a comma separated list of datapoints in format
- <i>channelno.datapoint</i> which can trigger the action.<br/>
- Parameter <i>condition</i> is a valid Perl expression which can contain
- <i>channelno.datapoint</i> names as variables. Variables must start with a '$' or a '%'.
- If a variable is preceded by a '$' the variable is substituted by the converted datapoint
- value (i.e. "on" instead of "true"). If variable is preceded by a '%' the raw value
- (i.e. "true") is used. If '$' or '%' is doubled the previous values will be used.<br/>
- If the result of this operation is true, the action specified after the second colon
- is executed. Three types of actions are supported:<br/>
- <b>hmccu</b>: Parameter <i>object</i> refers to a FHEM device/datapoint in format
- <device>:<channelno>.<datapoint><br/>
- <b>ccu</b>: Parameter <i>object</i> refers to a CCU channel/datapoint in format
- <channel>.<datapoint>. <i>channel</i> can be a channel name or address.<br/>
- <b>fhem</b>: The specified <i>command</i> will be executed<br/>
- If action contains the string $value it is substituted by the current value of the
- datapoint which triggered the action. The attribute supports multiple peering rules
- separated by semicolons and optionally by newline characters.<br/><br/>
- Examples:<br/>
- # Set FHEM device mydummy to value if formatted value of 1.STATE is 'on'<br/>
- <code>attr mydev peer 1.STATE:'$1.STATE' eq 'on':fhem:set mydummy $value</code><br/>
- # Set 2.LEVEL of device myBlind to 100 if raw value of 1.STATE is 1<br/>
- <code>attr mydev peer 1.STATE:'%1.STATE' eq '1':hmccu:myBlind:2.LEVEL=100</code><br/>
- # Set 1.STATE of device LEQ1234567 to true if 1.LEVEL < 100<br/>
- <code>attr mydev peer 1.LEVEL:$1.LEVEL < 100:ccu:LEQ1234567:1.STATE=true</code><br/>
- # Set 1.STATE of device LEQ1234567 to true if current level is different from old level<br/>
- <code>attr mydev peer 1.LEVEL:$1.LEVEL != $$1.LEVEL:ccu:LEQ1234567:1.STATE=true</code><br/>
- </li><br/>
- <li><b>statedatapoint <datapoint></b><br/>
- Set state datapoint used by some commands like 'set devstate'.
- </li><br/>
- <li><b>statevals <text>:<text>[,...]</b><br/>
- Define substitution for values of set commands. The parameters <i>text</i> are available
- as set commands.
- <br/><br/>
- Example:<br/>
- <code>
- attr my_switch statevals on:true,off:false<br/>
- set my_switch on
- </code>
- </li><br/>
- <li><b>stripnumber [<datapoint-expr>!]{<u>0</u>|1|2|-n|%fmt}[;...]</b><br/>
- Remove trailing digits or zeroes from floating point numbers, round or format
- numbers. If attribute is negative (-0 is valid) floating point values are rounded
- to the specified number of digits before they are stored in readings. The meaning of
- values 0,1,2 is:<br/>
- 0 = Floating point numbers are stored as read from CCU (i.e. with trailing zeros)<br/>
- 1 = Trailing zeros are stripped from floating point numbers except one digit.<br/>
- 2 = All trailing zeros are stripped from floating point numbers.<br/>
- With %fmt one can specify any valid sprintf() format string.<br/>
- If <i>datapoint-expr</i> is specified the formatting applies only to datapoints
- matching the regular expression.<br/>
- Example:<br>
- <code>
- attr myDev stripnumber TEMPERATURE!%.2f degree
- </code>
- </li><br/>
- <li><b>substexcl <reading-expr></b><br/>
- Exclude values of readings matching <i>reading-expr</i> from substitution. This is helpful
- for reading 'control' if the reading is used for a slider widget and the corresponding
- datapoint is assigned to attribute statedatapoint and controldatapoint.
- </li><br/>
- <li><b>substitute <subst-rule>[;...]</b><br/>
- Define substitutions for datapoint/reading values. Syntax of <i>subst-rule</i> is<br/><br/>
- [[<channelno>.]<datapoint>[,...]!]<{#n1-m1|regexp}>:<text>[,...]
- <br/><br/>
- Parameter <i>text</i> can contain variables in format ${<i>varname</i>}. The variable
- ${value} is
- substituted by the original datapoint value. All other variables must match with a valid
- datapoint name or a combination of channel number and datapoint name seperated by a '.'.
- <br/><br/>
- Example: Substitute the value of datapoint TEMPERATURE by the string
- 'T=<i>val</i> deg' and append current value of datapoint 1.HUMIDITY<br/>
- <code>
- attr my_weather substitute TEMPERATURE!.+:T=${value} deg H=${1.HUMIDITY}%
- </code><br/><br/>
- If rule expression starts with a hash sign a numeric datapoint value is substituted if
- it fits in the number range n <= value <= m.
- <br/><br/>
- Example: Interpret LEVEL values 100 and 0 of dimmer as "on" and "off"<br/>
- <code>
- attr my_dim substitute LEVEL!#0-0:off,#1-100:on
- </code>
- </li>
- </ul>
- </ul>
- <p><a name="HMCCUDEV"></a>
- <h3>HMCCUDEV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMCCUDEV'>DE</a>]</div>
- <ul>
- The module implements Homematic CCU devices as client devices for HMCCU. A HMCCU I/O device must
- exist before a client device can be defined. If a CCU channel is not found execute command
- 'get devicelist' in I/O device.<br/>
- This reference contains only commands and attributes which differ from module
- <a href="#HMCCUCHN">HMCCUCHN</a>.
- </br></br>
- <a name="HMCCUDEVdefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> HMCCUDEV {<device> | 'virtual'} [<statechannel>]
- [readonly] [defaults] [{group={device|channel}[,...]|groupexp=regexp]
- [iodev=<iodev-name>]</code>
- <br/><br/>
- If option 'readonly' is specified no set command will be available. With option 'defaults'
- some default attributes depending on CCU device type will be set. Default attributes are only
- available for some device types. Parameter <i>statechannel</i> corresponds to attribute
- 'statechannel'.<br/>
- A HMCCUDEV device supports CCU group devices. The CCU devices or channels related to a group
- device are specified by using options 'group' or 'groupexp' followed by the names or
- addresses of the CCU devices or channels. By using 'groupexp' one can specify a regular
- expression for CCU device or channel names.<br/>
- It's also possible to group any kind of CCU devices or channels without defining a real
- group in CCU by using option 'virtual' instead of a CCU device specification.
- <br/><br/>
- Examples:<br/>
- <code>
- # Simple device by using CCU device name<br/>
- define window_living HMCCUDEV WIN-LIV-1<br/>
- # Simple device by using CCU device address and with state channel<br/>
- define temp_control HMCCUDEV BidCos-RF.LEQ1234567 1<br/>
- # Simple read only device by using CCU device address and with default attributes<br/>
- define temp_sensor HMCCUDEV BidCos-RF.LEQ2345678 1 readonly defaults
- # Group device by using CCU group device and 3 group members<br/>
- define heating_living HMCCUDEV GRP-LIV group=WIN-LIV,HEAT-LIV,THERM-LIV
- </code>
- <br/>
- </ul>
- <br/>
-
- <a name="HMCCUDEVset"></a>
- <b>Set</b><br/><br/>
- <ul>
- <li><b>set <name> clear [<reading-exp>]</b><br/>
- <a href="#HMCCUCHNset">see HMCCUCHN</a>
- </li><br/>
- <li><b>set <name> config [<channel-number>] <parameter>=<value>
- [...]</b><br/>
- Set configuration parameter of CCU device or channel. Valid parameters can be listed by
- using command 'get configdesc'.
- </li><br/>
- <li><b>set <name> datapoint [<channel-number>.]<datapoint>
- <value> [...]</b><br/>
- Set datapoint values of a CCU device channel. If channel number is not specified
- state channel is used. String \_ is substituted by blank.
- <br/><br/>
- Example:<br/>
- <code>set temp_control datapoint 2.SET_TEMPERATURE 21</code><br/>
- <code>set temp_control datapoint 2.AUTO_MODE 1 2.SET_TEMPERATURE 21</code>
- </li><br/>
- <li><b>set <name> defaults</b><br/>
- Set default attributes for CCU device type. Default attributes are only available for
- some device types.
- </li><br/>
- <li><b>set <name> devstate <value></b><br/>
- Set state of a CCU device channel. Channel and state datapoint must be defined as
- attribute 'statedatapoint'. If <i>value</i> contains string \_ it is substituted by blank.
- </li><br/>
- <li><b>set <name> on-for-timer <ontime></b><br/>
- <a href="#HMCCUCHNset">see HMCCUCHN</a>
- </li><br/>
- <li><b>set <name> on-till <timestamp></b><br/>
- <a href="#HMCCUCHNset">see HMCCUCHN</a>
- </li><br/>
- <li><b>set <name> pct <value;> [<ontime> [<ramptime>]]</b><br/>
- <a href="#HMCCUCHNset">see HMCCUCHN</a>
- </li><br/>
- <li><b>set <name> <statevalue></b><br/>
- State datapoint of a CCU device channel is set to 'statevalue'. State channel and state
- datapoint must be defined as attribute 'statedatapoint'. Values for <i>statevalue</i>
- are defined by setting attribute 'statevals'.
- <br/><br/>
- Example:<br/>
- <code>
- attr myswitch statedatapoint 1.STATE<br/>
- attr myswitch statevals on:true,off:false<br/>
- set myswitch on
- </code>
- </li><br/>
- <li><b>set <name> toggle</b><br/>
- <a href="#HMCCUCHNset">see HMCCUCHN</a>
- </li><br/>
- <li><b>ePaper Display</b><br/><br/>
- This display has 5 text lines. The lines 1,2 and 4,5 are accessible via config parameters
- TEXTLINE_1 and TEXTLINE_2 in channels 1 and 2. Example:<br/><br/>
- <code>
- define HM_EPDISP HMCCUDEV CCU_EPDISP<br/>
- set HM_EPDISP config 2 TEXTLINE_1=Line1<br/>
- set HM_EPDISP config 2 TEXTLINE_2=Line2<br/>
- set HM_EPDISP config 1 TEXTLINE_1=Line4<br/>
- set HM_EPDISP config 1 TEXTLINE_2=Line5<br/>
- </code>
- <br/>
- The lines 2,3 and 4 of the display can be accessed by setting the datapoint SUBMIT of the
- display to a string containing command tokens in format 'parameter=value'. The following
- commands are allowed:
- <br/><br/>
- <ul>
- <li>text1-3=Text - Content of display line 2-4</li>
- <li>icon1-3=IconCode - Icons of display line 2-4</li>
- <li>sound=SoundCode - Sound</li>
- <li>signal=SignalCode - Optical signal</li>
- <li>pause=Seconds - Pause between signals (1-160)</li>
- <li>repeat=Count - Repeat count for sound (0-15)</li>
- </ul>
- <br/>
- IconCode := ico_off, ico_on, ico_open, ico_closed, ico_error, ico_ok, ico_info,
- ico_newmsg, ico_svcmsg<br/>
- SignalCode := sig_off, sig_red, sig_green, sig_orange<br/>
- SoundCode := snd_off, snd_longlong, snd_longshort, snd_long2short, snd_short, snd_shortshort,
- snd_long<br/><br/>
- Example:<br/>
- <code>
- set HM_EPDISP datapoint 3.SUBMIT text1=Line2,text2=Line3,text3=Line4,sound=snd_short,
- signal=sig_red
- </code>
- </li>
- </ul>
- <br/>
-
- <a name="HMCCUDEVget"></a>
- <b>Get</b><br/><br/>
- <ul>
- <li><b>get <name> config [<channel-number>] [<filter-expr>]</b><br/>
- Get configuration parameters of CCU device. If attribute 'ccureadings' is set to 0
- parameters are displayed in browser window (no readings set). Parameters can be filtered
- by <i>filter-expr</i>.
- </li><br/>
- <li><b>get <name> configdesc [<channel-number>] [<rpcport>]</b><br/>
- Get description of configuration parameters for CCU device. Default value for Parameter
- <i>rpcport</i> is 2001 (BidCos-RF). Other valid values are 2000 (wired) and 2010 (HMIP).
- </li><br/>
- <li><b>get <name> configlist [<channel-number>] [<filter-expr>]</b><br/>
- Display configuration parameters of CCU device. Parameters can be filtered by
- <i>filter-expr</i>.
- </li><br/>
- <li><b>get <name> datapoint [<channel-number>.]<datapoint></b><br/>
- Get value of a CCU device datapoint. If <i>channel-number</i> is not specified state
- channel is used.
- </li><br/>
- <li><b>get <name> defaults</b><br/>
- <a href="#HMCCUCHNget">see HMCCUCHN</a>
- </li><br/>
- <li><b>get <name> deviceinfo [{State | <u>Value</u>}]</b><br/>
- Display all channels and datapoints of device with datapoint values and types.
- </li><br/>
- <li><b>get <name> devstate</b><br/>
- Get state of CCU device. Attribute 'statechannel' must be set. Default state datapoint
- STATE can be modified by attribute 'statedatapoint'.
- </li><br/>
- <li><b>get <name> update [{State | <u>Value</u>}]</b><br/>
- <a href="#HMCCUCHNget">see HMCCUCHN</a>
- </li><br/>
- </ul>
- <br/>
-
- <a name="HMCCUDEVattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- To reduce the amount of events it's recommended to set attribute 'event-on-change-reading'
- to '.*'.<br/><br/>
- <li><b>ccucalculate <value-type>:<reading>[:<dp-list>[;...]</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccuflags {nochn0, trace}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccuget {State | <u>Value</u>}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccureadings {0 | <u>1</u>}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccureadingfilter <filter-rule[,...]></b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccureadingformat {address[lc] | name[lc] | datapoint[lc]}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccureadingname <old-readingname-expr>:<new-readingname>[,...]</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccuscaleval <datapoint>:<factor>[,...]</b><br/>
- ccuscaleval <[!]datapoint>:<min>:<max>:<minn>:<maxn>[,...]<br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>ccuverify {0 | 1 | 2}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>controldatapoint <channel-number.datapoint></b><br/>
- Set channel number and datapoint for device control.
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>disable {<u>0</u> | 1}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>hmstatevals <subst-rule>[;...]</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>peer [<datapoints>:<condition>:
- {ccu:<object>=<value>|hmccu:<object>=<value>|fhem:<command>}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>statechannel <channel-number></b><br/>
- Channel for setting device state by devstate command. Deprecated, use attribute
- 'statedatapoint' instead.
- </li><br/>
- <li><b>statedatapoint [<channel-number>.]<datapoint></b><br/>
- Set state channel and state datapoint for setting device state by devstate command.
- Default is STATE. If 'statedatapoint' is not defined at least attribute 'statechannel'
- must be set.
- </li><br/>
- <li><b>statevals <text>:<text>[,...]</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>stripnumber {0 | 1 | 2 | -n}</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>substexcl <reading-expr></b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- <li><b>substitute <subst-rule>[;...]</b><br/>
- <a href="#HMCCUCHNattr">see HMCCUCHN</a>
- </li><br/>
- </ul>
- </ul>
- <p><a name="HMCCURPC"></a>
- <h3>HMCCURPC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMCCURPC'>DE</a>]</div>
- <ul>
- The module provides thread based RPC servers for receiving events from HomeMatic CCU2.
- A HMCCURPC device acts as a client device for a HMCCU I/O device. Normally RPC servers of
- HMCCURPC are started from HMCCU I/O device.
- </br></br>
- <a name="HMCCURPCdefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> HMCCURPC {<HostOrIP>|iodev=<DeviceName>}</code>
- <br/><br/>
- Examples:<br/>
- <code>define myccurpc HMCCURPC 192.168.1.10</code><br/>
- <code>define myccurpc HMCCURPC iodev=myccudev</code><br/>
- <br/><br/>
- The parameter <i>HostOrIP</i> is the hostname or IP address of a Homematic CCU2.
- The I/O device can also be specified with parameter iodev.
- </ul>
- <br/>
-
- <a name="HMCCURPCset"></a>
- <b>Set</b><br/><br/>
- <ul>
- <li><b> set <name> deregister <interface></b><br/>
- Deregister RPC server for <i>interface</i>. Parameter <i>interface</i> is a valid
- CCU interface name (i.e. BidCos-RF).
- </li><br/>
- <li><b> set <name> rpcrequest <port> <method> [<parameters>]</b><br/>
- Send RPC request to CCU. The result is displayed in FHEM browser window. Parameter
- <port> is a valid RPC port (i.e. 2001 for BidCos).
- </li><br/>
- <li><b>set <name> rpcserver { on | off }</b><br/>
- Start or stop RPC server(s). This command is only available if expert mode is activated.
- </li><br/>
- </ul>
-
- <a name="HMCCURPCget"></a>
- <b>Get</b><br/><br/>
- <ul>
- <li><b>get <name> rpcevent</b><br/>
- Show RPC server events statistics.
- </li><br/>
- <li><b>get <name> rpcstate</b><br/>
- Show RPC thread states.
- </li><br/>
- </ul>
-
- <a name="HMCCURPCattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <li><b>ccuflags { expert }</b><br/>
- Set flags for controlling device behaviour. Meaning of flags is:<br/>
- expert - Activate expert mode<br/>
- keepThreads - Do not delete thread objects after RPC server has been stopped<br/>
- reconnect - Try to re-register at CCU if no events received for rpcEventTimeout seconds<br/>
- </li><br/>
- <li><b>rpcAcceptTimeout <seconds></b><br/>
- Specify timeout for accepting incoming connections. Default is 1 second. Increase this
- value by 1 or 2 seconds on slow systems.
- </li><br/>
- <li><b>rpcConnTimeout <seconds></b><br/>
- Specify timeout of CCU connection handling. Default is 10 second.
- </li><br/>
- <li><b>rpcEventTimeout {<seconds>|<interface:seconds>}[,...]</b><br/>
- Specify timeout for CCU events. Default is 600 seconds. If timeout occurs an event
- is triggered. If set to 0 the timeout is ignored. If no <i>interface</i> is specified
- timeout is applied to all interfaces. For valid values for <i>interface</i> see
- attribute rpcInterfaces.
- </li><br/>
- <li><b>rpcInterfaces { BidCos-Wired, BidCos-RF, HmIP-RF, VirtualDevices, CUxD, Homegear, HVL }</b><br/>
- Select RPC interfaces. If attribute is missing the corresponding attribute of I/O device
- (HMCCU device) is used. Interface BidCos-RF is default and always active.
- </li><br/>
- <li><b>rpcMaxEvents <count></b><br/>
- Specify maximum number of events read by FHEM during one I/O loop. If FHEM performance
- slows down decrease this value. On a fast system this value can be increased to 100.
- Default value is 50.
- </li><br/>
- <li><b>rpcQueueSize <count></b><br/>
- Specify maximum size of event queue. When this limit is reached no more CCU events
- are forwarded to FHEM. In this case increase this attribute or increase attribute
- <b>rpcMaxEvents</b>. Default value is 500.
- </li><br/>
- <li><b>rpcServer { on | off }</b><br/>
- If set to 'on' start RPC server(s) after FHEM start. Default is 'off'.
- </li><br/>
- <li><b>rpcServerAddr <ip-address></b><br/>
- Set local IP address of RPC servers on FHEM system. If attribute is missing the
- corresponding attribute of I/O device (HMCCU device) is used or IP address is
- detected automatically. This attribute should be set if FHEM is running on a system
- with multiple network interfaces.
- </li><br/>
- <li><b>rpcServerPort <port></b><br/>
- Specify TCP port number used for calculation of real RPC server ports.
- If attribute is missing the corresponding attribute of I/O device (HMCCU device)
- is used. Default value is 5400.
- </li><br/>
- <li><b>rpcTriggerTime <seconds></b><br/>
- Set time to wait before triggering I/O again after an I/O error "no reader" occurred.
- Default value is 10 seconds, 0 will deactivate error handling for this kind of error.
- On fast systems this value can be set to 5 seconds. Higher values Reduce number of
- log messages written if FHEM is busy and not able to read data from CCU.
- </li><br/>
- <li><b>rpcWaitTime <microseconds></b><br/>
- Specify time to wait for data processing thread after each loop. Default value is
- 100000 microseconds.
- </li><br/>
- <li><b>rpcWriteTimeout <seconds></b><br/>
- The data processing thread will wait the specified time for FHEM input socket to
- become writeable. Default value is 0.001 seconds.
- </li>
- </ul>
- </ul>
- <p><a name="HMCCURPCPROC"></a>
- <h3>HMCCURPCPROC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMCCURPCPROC'>DE</a>]</div>
- <ul>
- The module provides a subprocess based RPC server for receiving events from HomeMatic CCU2.
- A HMCCURPCPROC device acts as a client device for a HMCCU I/O device. Normally RPC servers of
- type HMCCURPCPROC are started or stopped from HMCCU I/O device via command 'set rpcserver on,off'.
- HMCCURPCPROC devices will be created automatically by I/O device when RPC server is started.
- There should be no need for creating HMCCURPCPROC devices manually.
- </br></br>
- <a name="HMCCURPCPROCdefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> HMCCURPCPROC {<HostOrIP>|iodev=<DeviceName>}
- {<port>|<interface>}</code>
- <br/><br/>
- Examples:<br/>
- <code>define myccurpc HMCCURPCPROC 192.168.1.10 2001</code><br/>
- <code>define myccurpc HMCCURPCPROC iodev=myccudev BidCos-RF</code><br/>
- <br/><br/>
- The parameter <i>HostOrIP</i> is the hostname or IP address of a Homematic CCU2.
- The I/O device can also be specified with parameter iodev. Supported interfaces or
- ports are:
- <table>
- <tr><td><b>Port</b></td><td><b>Interface</b></td></tr>
- <tr><td>2000</td><td>BidCos-Wired</td></tr>
- <tr><td>2001</td><td>BidCos-RF</td></tr>
- <tr><td>2010</td><td>HmIP-RF</td></tr>
- <tr><td>7000</td><td>HVL</td></tr>
- <tr><td>8701</td><td>CUxD</td></tr>
- <tr><td>9292</td><td>Virtual</td></tr>
- </table>
- </ul>
- <br/>
-
- <a name="HMCCURPCPROCset"></a>
- <b>Set</b><br/><br/>
- <ul>
- <li><b> set <name> rpcrequest <method> [<parameters>]</b><br/>
- Send RPC request to CCU. The result is displayed in FHEM browser window. See EQ-3
- RPC XML documentation for mor information about valid methods and requests.
- </li><br/>
- <li><b>set <name> rpcserver { on | off }</b><br/>
- Start or stop RPC server. This command is only available if expert mode is activated.
- </li><br/>
- </ul>
-
- <a name="HMCCURPCPROCget"></a>
- <b>Get</b><br/><br/>
- <ul>
- <li><b>get <name> rpcevent</b><br/>
- Show RPC server events statistics.
- </li><br/>
- <li><b>get <name> rpcstate</b><br/>
- Show RPC process state.
- </li><br/>
- </ul>
-
- <a name="HMCCURPCPROCattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <li><b>ccuflags { flag-list }</b><br/>
- Set flags for controlling device behaviour. Meaning of flags is:<br/>
- ccuInit - RPC server initialization depends on ListDevice RPC call issued by CCU.
- This flag is not supported by interfaces CUxD and HVL.<br/>
- expert - Activate expert mode<br/>
- logEvents - Events are written into FHEM logfile if verbose is 4<br/>
- queueEvents - Always write events into queue and send them asynchronously to FHEM.
- Frequency of event transmission to FHEM depends on attribute rpcConnTimeout.<br/>
- reconnect - Try to re-register at CCU if no events received for rpcEventTimeout seconds<br/>
- </li><br/>
- <li><b>rpcAcceptTimeout <seconds></b><br/>
- Specify timeout for accepting incoming connections. Default is 1 second. Increase this
- value by 1 or 2 seconds on slow systems.
- </li><br/>
- <li><b>rpcConnTimeout <seconds></b><br/>
- Specify timeout of incoming CCU connections. Default is 1 second. Value must be greater than 0.
- </li><br/>
- <li><b>rpcEventTimeout <seconds></b><br/>
- Specify timeout for CCU events. Default is 600 seconds. If timeout occurs an event
- is triggered. If set to 0 the timeout is ignored. If ccuflag reconnect is set the
- RPC device tries to establish a new connection to the CCU.
- </li><br/>
- <li><b>rpcMaxEvents <count></b><br/>
- Specify maximum number of events read by FHEM during one I/O loop. If FHEM performance
- slows down decrease this value and increase attribute rpcQueueSize. Default value is 100.
- Value must be greater than 0.
- </li><br/>
- <li><b>rpcMaxIOErrors <count></b><br/>
- Specifiy maximum number of I/O errors allowed when sending events to FHEM before a
- message is written into FHEM log file. Default value is 100. Set this attribute to 0
- to disable error counting.
- </li><br/>
- <li><b>rpcQueueSend <events></b><br/>
- Maximum number of events sent to FHEM per accept loop. Default is 70. If set to 0
- all events in queue are sent to FHEM. Transmission is stopped when an I/O error occurrs
- or specified number of events has been sent.
- </li><br/>
- <li><b>rpcQueueSize <count></b><br/>
- Specify maximum size of event queue. When this limit is reached no more CCU events
- are forwarded to FHEM. In this case increase this value or increase attribute
- <b>rpcMaxEvents</b>. Default value is 500.
- </li><br/>
- <li><b>rpcServerAddr <ip-address></b><br/>
- Set local IP address of RPC servers on FHEM system. If attribute is missing the
- corresponding attribute of I/O device (HMCCU device) is used or IP address is
- detected automatically. This attribute should be set if FHEM is running on a system
- with multiple network interfaces.
- </li><br/>
- <li><b>rpcServerPort <port></b><br/>
- Specify TCP port number used for calculation of real RPC server ports.
- If attribute is missing the corresponding attribute of I/O device (HMCCU device)
- is used. Default value is 5400.
- </li><br/>
- <li><b>rpcStatistics <count></b><br/>
- Specify amount of events after which statistic data is sent to FHEM. Default value
- is 500.
- </li><br/>
- <li><b>rpcWriteTimeout <seconds></b><br/>
- Wait the specified time for socket to become readable or writeable. Default value
- is 0.001 seconds.
- </li>
- </ul>
- </ul>
- <p><a name="HMLAN"></a>
- <h3>HMLAN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMLAN'>DE</a>]</div>
- <ul>
- The HMLAN is the fhem module for the eQ-3 HomeMatic LAN Configurator.<br>
- 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/>
- <br/>
- 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/>
- <br>
- In order to use it with fhem you <b>must</b> disable the encryption first with the "HomeMatic Lan Interface Configurator"<br>
- (which is part of the supplied Windows software), by selecting the device, "Change IP Settings", and deselect "AES Encrypt Lan Communication".<br/>
- <br/>
- This device can be used in parallel with a CCU and (readonly) with fhem. To do this:
- <ul>
- <li>start the fhem/contrib/tcptee.pl program</li>
- <li>redirect the CCU to the local host</li>
- <li>disable the LAN-Encryption on the CCU for the Lan configurator</li>
- <li>set the dummy attribute for the HMLAN device in fhem</li>
- </ul>
- <br/><br/>
- <a name="HMLANdefine"><b>Define</b></a>
- <ul>
- <code>define <name> HMLAN <ip-address>[:port]</code><br>
- <br>
- port is 1000 by default.<br/>
- If the ip-address is called none, then no device will be opened, so you can experiment without hardware attached.
- </ul>
- <br><br>
- <a name="HMLANset"><b>Set</b></a>
- <ul>
- <li><a href="#hmPairForSec">hmPairForSec</a></li>
- <li><a href="#hmPairSerial">hmPairSerial</a></li>
- <li><a href="#hmreopen">reopen</a>
- reconnect the device
- </li>
- <li><a href="#hmrestart">restart</a>
- Restart the device
- </li>
- <li><a href="#HMLANset_reassignIDs">reassignIDs</a>
- Syncs the IDs between HMLAN and the FHEM list.
- Usually this is done automatically and only is recomended if there is a difference in counts.
- </li>
- <br><br>
- </ul>
- <a name="HMLANget"><b>Get</b></a>
- <ul>
- <li><a href="#HMLANgetassignIDs">assignIDs</a>
- Gibt eine Liste aller diesem IO zugewiesenen IOs aus.
- </li>
- </ul>
- <br><br>
- <a name="HMLANattr"><b>Attributes</b></a>
- <ul>
- <li><a href="#addvaltrigger">addvaltrigger</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#HMLANlogIDs">logIDs</a><br>
- enables selective logging of HMLAN messages. A list of HMIds or names can be
- entered, comma separated, which shall be logged.<br>
- The attribute only allows device-IDs, not channel IDs.
- Channel-IDs will be modified to device-IDs automatically.
- <b>all</b> will log raw messages for all HMIds<br>
- <b>sys</b> will log system related messages like keep-alive<br>
- in order to enable all messages set "<b>all,sys</b>"<br>
- </li>
- <li><a name="HMLANloadLevel">loadLevel</a><br>
- loadlevel will be mapped to reading vaues. <br>
- 0:low,30:mid,40:batchLevel,90:high,99:suspended<br>
- the batchLevel value will be set to 40 if not entered. This is the level at which
- background message generation e.g. for autoReadReg will be stopped<br>
- </li>
- <li><a href="#hmId">hmId</a></li>
- <li><a name="HMLANhmKey">hmKey</a></li>
- <li><a name="HMLANhmKey2">hmKey2</a></li>
- <li><a name="HMLANhmKey3">hmKey3</a></li>
- <li><a name="HMLANhmKey4">hmKey4</a></li>
- <li><a name="HMLANhmKey5">hmKey5</a><br>
- AES keys for the HMLAN adapter. <br>
- The key is converted to a hash. If a hash is given directly it is not converted but taken directly.
- Therefore the original key cannot be converted back<br>
- </li>
- <li><a href="#hmProtocolEvents">hmProtocolEvents</a></li><br>
- <li><a name="HMLANrespTime">respTime</a><br>
- Define max response time of the HMLAN adapter in seconds. Default is 1 sec.<br/>
- Longer times may be used as workaround in slow/instable systems or LAN configurations.</li>
- <li><a name="HMLAN#wdTimer">wdTimer</a><br>
- Time in sec to trigger HMLAN. Values between 5 and 25 are allowed, 25 is default.<br>
- It is <B>not recommended</B> to change this timer. If problems are detected with <br>
- HLMLAN disconnection it is advisable to resolve the root-cause of the problem and not symptoms.</li>
- <li><a name="HMLANhmLanQlen">hmLanQlen</a><br>
- defines queuelength of HMLAN interface. This is therefore the number of
- simultanously send messages. increasing values may cause higher transmission speed.
- It may also cause retransmissions up to data loss.<br>
- Effects can be observed by watching protocol events<br>
- 1 - is a conservatibe value, and is default<br>
- 5 - is critical length, likely cause message loss</li>
- </ul><br>
- <a name="HMLANparameter"><b>parameter</b></a>
- <ul>
- <li><B>assignedIDsCnt</B><br>
- number of IDs that are assigned to HMLAN by FHEM.
- If the number reported by HMLAN differ it will be reported as 'reported'.<br>
- It is recommended to resync HMLAN using the command 'assignIDs'.
- </li>
- <li><B>msgKeepAlive</B><br>
- performance of keep-alive messages. <br>
- <B>dlyMax</B>: maximum delay of sheduled message-time to actual message send.<br>
- <B>bufferMin</B>: minimal buffer left to before HMLAN would likely disconnect
- due to missing keepAlive message. bufferMin will be reset to 30sec if
- attribut wdTimer is changed.<br>
- if dlyMax is high (several seconds) or bufferMin goes to "0" (normal is 4) the system
- suffers on internal delays. Reasons for the delay might be explored. As a quick solution
- wdTimer could be decreased to trigger HMLAN faster.</li>
- <li><B>msgLoadCurrent</B><br>
- Current transmit load of HMLAN. When capacity reaches 100% HMLAN stops sending and waits for
- reduction. See also:
- <a href="#HMLANloadLevel">loadLevel</a><br></li>
- <li><B>msgLoadHistoryAbs</B><br>
- Historical transmition load of IO.</li>
- <li><B>msgParseDly</B><br>
- calculates the delay of messages in ms from send in HMLAN until processing in FHEM.
- It therefore gives an indication about FHEM system performance.
- </li>
- </ul><br>
- <a name="HMLANreadings"><b>parameter and readings</b></a>
- <ul>
- <li><B>prot_disconnect</B> <br>recent HMLAN disconnect</li>
- <li><B>prot_init</B> <br>recent HMLAN init</li>
- <li><B>prot_keepAlive</B> <br>HMLAN disconnect likely do to slow keep-alive sending</li>
- <li><B>prot_ok</B> <br>recent HMLAN ok condition</li>
- <li><B>prot_timeout</B> <br>recent HMLAN timeout</li>
- <li><B>prot_Warning-HighLoad</B> <br>high load condition entered - HMLAN has about 10% performance left</li>
- <li><B>prot_ERROR-Overload</B> <br>overload condition - HMLAN will receive bu tno longer transmitt messages</li>
- <li><B>prot_Overload-released</B><br>overload condition released - normal operation possible</li>
- </ul>
- </ul>
- <p><a name="HMS"></a>
- <h3>HMS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMS'>DE</a>]</div>
- <ul>
- <a name="HMSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> HMS <housecode></code>
- <br><br>
- <code><housecode></code> is a four digit hex number,
- corresponding to the address of the HMS device.
- <br>
- Examples:
- <ul>
- <code>define temp HMS 1234</code><br>
- </ul>
- Notes:<br>
- <ul>
- <li>Currently supported devices are the HMS100-T HMS100-TF HMS100-WD
- HMS100-MG HMS100-TFK HMS100-CO HMS100-FIT RM100-2 RM100-3</li>
- <li>The housecode of the HMS devices may change if the battery is renewed.
- In order to make life easier, you can define a "wildcard" device for each
- type of HMS device. First the real device-id will be checked, then the
- wildcard device id. The wildcards are:
- <ul>
- <li>1000 for the HMS100-TF</li>
- <li>1001 for the HMS100-T</li>
- <li>1002 for the HMS100-WD</li>
- <li>1003 for the RM100-2</li>
- <li>1004 for the HMS100-TFK</li>
- <li>1006 for the HMS100-MG</li>
- <li>1008 for the HMS100-CO</li>
- <li>100e for the HMS100-FIT</li>
- </ul>
- </li>
- <li>Some battery low notifications are not yet implemented (RM100,
- HMS100WD).</li>
- <li>Please test your installation before relying on the
- functionality.</li>
- </ul>
- <br>
- </ul>
- <br>
- <a name="HMSset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="HMSget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="HMSattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#model">model</a> (hms100-t hms100-tf hms100-wd hms100-mg
- hms100-co hms100-tfk hms100-fit rm100-2)</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="HMUARTLGW"></a>
- <h3>HMUARTLGW</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMUARTLGW'>DE</a>]</div>
- <ul>
- HMUARTLGW provides support for the eQ-3 HomeMatic Wireless LAN Gateway
- (HM-LGW-O-TW-W-EU) and the eQ-3 HomeMatic UART module (HM-MOD-UART), which
- is part of the HomeMatic wireless module for the Raspberry Pi
- (HM-MOD-RPI-PCB).<br>
- <br><br>
- <a name="HMUARTLGHW_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> HMUARTLGW <device></code><br><br>
- The <device>-parameter depends on the device-type:
- <ul>
- <li>HM-MOD-UART: <device> specifies the serial port to communicate
- with. The baud-rate is fixed at 115200 and does not need to be
- specified.<br>
- If the HM-MOD-UART is connected to the network by a serial bridge,
- the connection has to be defined in an URL-like format
- (<code>uart://ip:port</code>).</li>
- <li>HM-LGW-O-TW-W-EU: <device> specifies the IP address or hostname
- of the gateway, optionally followed by : and the port number of the
- BidCoS-port (default when not specified: 2000).</li>
- </ul>
- <br><br>
- Examples:<br>
- <ul>
- <li>Local HM-MOD-UART at <code>/dev/ttyAMA0</code>:<br>
- <code>define myHmUART HMUARTLGW /dev/ttyAMA0</code><br> </li>
- <li>LAN Gateway at <code>192.168.42.23</code>:<br>
- <code>define myHmLGW HMUARTLGW 192.168.42.23</code><br> </li>
- <li>Remote HM-MOD-UART using <code>socat</code> on a Raspberry Pi:<br>
- <code>define myRemoteHmUART HMUARTLGW uart://192.168.42.23:12345</code><br><br>
- Remote Raspberry Pi:<br><code>$ socat TCP4-LISTEN:12345,fork,reuseaddr /dev/ttyAMA0,raw,echo=0,b115200</code></li>
- </ul>
- </ul>
- <br>
- <a name="HMUARTLGW_set"></a>
- <p><b>Set</b></p>
- <ul>
- <li>close<br>
- Closes the connection to the device.
- </li>
- <li><a href="#hmPairForSec">hmPairForSec</a></li>
- <li><a href="#hmPairSerial">hmPairSerial</a></li>
- <li>open<br>
- Opens the connection to the device and initializes it.
- </li>
- <li>reopen<br>
- Reopens the connection to the device and reinitializes it.
- </li>
- <li>restart<br>
- Reboots the device.
- </li>
- <li>updateCoPro </path/to/firmware.eq3><br>
- Update the coprocessor-firmware (reading D-firmware) from the
- supplied file. Source for firmware-images (version 1.4.1, official
- eQ-3 repository):<br>
- <ul>
- <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>
- <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>
- Please also make sure that D-LANfirmware is at least at version
- 1.1.5. To update to this version, use the eQ-3 CLI tools (see wiki)
- 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>
- <b>Do not flash hm-lgw-o-tw-w-eu_update.eq3 with updateCoPro!</b></li>
- </ul>
- </li>
- </ul>
- <br>
- <a name="HMUARTLGW_get"></a>
- <p><b>Get</b></p>
- <ul>
- <li>assignIDs<br>
- Returns the HomeMatic devices currently assigned to this IO-device.
- </li>
- </ul>
- <br>
- <a name="HMUARTLGW_attr"></a>
- <b>Attributes</b>
- <ul>
- <li>csmaCa<br>
- Enable or disable CSMA/CA (Carrier sense multiple access with collision
- avoidance), also known as listen-before-talk.<br>
- Default: 0 (disabled)
- </li>
- <li>dummy<br>
- Do not interact with the device at all, only define it.<br>
- Default: not set
- </li>
- <li>dutyCycle<br>
- Enable or disable the duty-cycle check (1% rule) performed by the
- wireless module.<br>
- Disabling this might be illegal in your country, please check with local
- regulations!<br>
- Default: 1 (enabled)
- </li>
- <li><a href="#hmId">hmId</a></li>
- <li><a name="HMLANhmKey">hmKey</a></li>
- <li><a name="HMLANhmKey2">hmKey2</a></li>
- <li><a name="HMLANhmKey3">hmKey3</a></li>
- <li>lgwPw<br>
- AES password for the eQ-3 HomeMatic Wireless LAN Gateway. The default
- password is printed on the back of the device (but can be changed by
- the user). If AES communication is enabled on the LAN Gateway (default),
- this attribute has to be set to the correct value or communication will
- not be possible. In addition, the perl-module Crypt::Rijndael (which
- provides the AES cipher) must be installed.
- </li>
- <li>loadEvents<br>
- Enables logging of the wireless load (in percent of the allowed maximum
- sending-time) of the interface.
- Default: 0 (disabled)
- </li>
- <li>logIDs<br>
- Enables selective logging of HMUARTLGW messages. A list of comma separated
- HMIds or HM device names/channel names can be entered which shall be logged.<br>
- <ul>
- <li><i>all</i>: will log raw messages for all HMIds</li>
- <li><i>sys</i>: will log system related messages like keep-alive</li>
- </ul>
- In order to enable all messages set: <i>all,sys</i>
- </li>
- <li>qLen<br>
- Maximum number of commands in the internal queue of the HMUARTLGW module.
- New commands when the queue is full are dropped. Each command has a maximum
- lifetime of 3s when active, so the worst-case delay of a command is qLen * 3s
- (3 minutes with default settings).<br>
- Default: 60
- </li>
- </ul>
- <br>
- </ul>
- <p>
- <a name="HMinfo"></a>
- <h3>HMinfo</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMinfo'>DE</a>]</div>
- <ul>
- HMinfo is a module to support getting an overview of
- eQ-3 HomeMatic devices as defines in <a href="#CUL_HM">CUL_HM</a>. <br><br>
- <B>Status information and counter</B><br>
- HMinfo gives an overview on the CUL_HM installed base including current conditions.
- Readings and counter will not be updated automatically due to performance issues. <br>
- Command <a href="#HMinfoupdate">update</a> must be used to refresh the values.
- <ul><code><br>
- set hm update<br>
- </code></ul><br>
- Webview of HMinfo providee details, basically counter about how
- many CUL_HM entities experience exceptional conditions. It contains
- <ul>
- <li>Action Detector status</li>
- <li>CUL_HM related IO devices and condition</li>
- <li>Device protocol events which are related to communication errors</li>
- <li>count of certain readings (e.g. batterie) and conditions - <a href="#HMinfoattr">attribut controlled</a></li>
- <li>count of error condition in readings (e.g. overheat, motorErr) - <a href="#HMinfoattr">attribut controlled</a></li>
- </ul>
- <br>
- It also allows some HM wide commands such
- as store all collected register settings.<br><br>
- Commands are executed on all HM entities.
- If applicable and evident execution is restricted to related entities.
- e.g. rssi is executed on devices only since channels do not support rssi values.<br><br>
- <a name="HMinfoFilter"><b>Filter</b></a>
- <ul> can be applied as following:<br><br>
- <code>set <name> <cmd> <filter> [<param>]</code><br>
- whereby filter has two segments, typefilter and name filter<br>
- [-dcasev] [-f <filter>]<br><br>
- filter for <b>types</b> <br>
- <ul>
- <li>d - device :include devices</li>
- <li>c - channels :include channels</li>
- <li>v - virtual :supress fhem virtual</li>
- <li>p - physical :supress physical</li>
- <li>a - aktor :supress actor</li>
- <li>s - sensor :supress sensor</li>
- <li>e - empty :include results even if requested fields are empty</li>
- <li>2 - alias :display second name alias</li>
- </ul>
- and/or filter for <b>names</b>:<br>
- <ul>
- <li>-f <filter> :regexp to filter entity names </li>
- </ul>
- Example:<br>
- <ul><code>
- set hm param -d -f dim state # display param 'state' for all devices whos name contains dim<br>
- set hm param -c -f ^dimUG$ peerList # display param 'peerList' for all channels whos name is dimUG<br>
- set hm param -dcv expert # get attribut expert for all channels,devices or virtuals<br>
- </code></ul>
- </ul>
- <br>
- <a name="HMinfodefine"><b>Define</b></a>
- <ul>
- <code>define <name> HMinfo</code><br>
- Just one entity needs to be defined without any parameter.<br>
- </ul>
- <br>
- <a name="HMinfoget"><b>Get</b></a>
- <ul>
- <li><a name="#HMinfomodels">models</a><br>
- list all HM models that are supported in FHEM
- </li>
- <li><a name="#HMinfoparam">param</a> <a href="#HMinfoFilter">[filter]</a> <name> <name>...<br>
- returns a table of parameter values (attribute, readings,...)
- for all entities as a table
- </li>
- <li><a name="#HMinforegister">register</a> <a href="#HMinfoFilter">[filter]</a><br>
- provides a tableview of register of an entity
- </li>
- <li><a name="#HMinforegCheck">regCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
- performs a consistency check on register readings for completeness
- </li>
- <li><a name="#HMinfopeerCheck">peerCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
- performs a consistency check on peers. If a peer is set in a channel
- it will check wether the peer also exist on the opposit side.
- </li>
- <li><a name="#HMinfopeerXref">peerXref</a> <a href="#HMinfoFilter">[filter]</a><br>
- provides a cross-reference on peerings, a kind of who-with-who summary over HM
- </li>
- <li><a name="#HMinfoconfigCheck">configCheck</a> <a href="#HMinfoFilter">[filter]</a><br>
- performs a consistency check of HM settings. It includes regCheck and peerCheck
- </li>
- <li><a name="#HMinfoconfigChkResult">configChkResult</a><br>
- returns the results of a previous executed configCheck
- </li>
- <li><a name="#HMinfotemplateList">templateList [<name>]</a><br>
- list defined templates. If no name is given all templates will be listed<br>
- </li>
- <li><a name="#HMinfotemplateUsg">templateUsg</a> <template> [sortPeer|sortTemplate]<br>
- templare usage<br>
- template filters the output
- </li>
- <li><a name="#HMinfomsgStat">msgStat</a> <a href="#HMinfoFilter">[filter]</a><br>
- statistic about message transferes over a week<br>
- </li>
- <li><a name="#HMinfoprotoEvents">protoEvents </a><a href="#HMinfoFilter">[filter]</a> <br>
- <B>important view</B> about pending commands and failed executions for all devices in a single table.<br>
- Consider to clear this statistic use <a name="#HMinfoclear">clear msgEvents</a>.<br>
- </li>
- <li><a name="#HMinforssi">rssi </a><a href="#HMinfoFilter">[filter]</a><br>
- statistic over rssi data for HM entities.<br>
- </li>
- <li><a name="#HMinfotemplateChk">templateChk</a> <a href="#HMinfoFilter">[filter]</a> <template> <peer:[long|short]> [<param1> ...]<br>
- verifies if the register-readings comply to the template <br>
- Parameter are identical to <a href="#HMinfotemplateSet">templateSet</a><br>
- The procedure will check if the register values match the ones provided by the template<br>
- If no peer is necessary use <b>none</b> to skip this entry<br>
- Example to verify settings<br>
- <ul><code>
- set hm templateChk -f RolloNord BlStopUpLg none 1 2 # RolloNord, no peer, parameter 1 and 2 given<br>
- set hm templateChk -f RolloNord BlStopUpLg peerName:long # RolloNord peerName, long only<br>
- set hm templateChk -f RolloNord BlStopUpLg peerName # RolloNord peerName, long and short<br>
- set hm templateChk -f RolloNord BlStopUpLg peerName:all # RolloNord peerName, long and short<br>
- set hm templateChk -f RolloNord BlStopUpLg all:long # RolloNord any peer, long only<br>
- set hm templateChk -f RolloNord BlStopUpLg all # RolloNord any peer,long and short<br>
- set hm templateChk -f Rollo.* BlStopUpLg all # each Rollo* any peer,long and short<br>
- set hm templateChk BlStopUpLg # each entities<br>
- set hm templateChk # all assigned templates<br>
- set hm templateChk sortTemplate # all assigned templates sortiert nach Template<br>
- set hm templateChk sortPeer # all assigned templates sortiert nach Peer<br>
- </code></ul>
- </li>
- </ul>
- <a name="HMinfoset"><b>Set</b></a>
- <ul>
- Even though the commands are a get funktion they are implemented
- as set to allow simple web interface usage<br>
- <li><a name="#HMinfoupdate">update</a><br>
- updates HM status counter.
- </li>
- <li><a name="#HMinfoautoReadReg">autoReadReg</a> <a href="#HMinfoFilter">[filter]</a><br>
- schedules a read of the configuration for the CUL_HM devices with attribut autoReadReg set to 1 or higher.
- </li>
- <li><a name="#HMinfoclear">clear</a> <a href="#HMinfoFilter">[filter]</a> [msgEvents|readings|msgStat|register|rssi]<br>
- executes a set clear ... on all HM entities<br>
- <ul>
- <li>protocol relates to set clear msgEvents</li>
- <li>set clear msgEvents for all device with protocol errors</li>
- <li>readings relates to set clear readings</li>
- <li>rssi clears all rssi counters </li>
- <li>msgStat clear HM general message statistics</li>
- <li>register clears all register-entries in readings</li>
- </ul>
- </li>
- <li><a name="#HMinfosaveConfig">saveConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
- performs a save for all HM register setting and peers. See <a href="#CUL_HMsaveConfig">CUL_HM saveConfig</a>.<br>
- <a ref="#HMinfopurgeConfig">purgeConfig</a> will be executed automatically if the stored filesize exceeds 1MByte.<br>
- </li>
- <li><a name="#HMinfoarchConfig">archConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
- performs <a href="#HMinfosaveConfig">saveConfig</a> for entities that appeare to have achanged configuration.
- It is more conservative that saveConfig since incomplete sets are not stored.<br>
- Option -a force an archieve for all devices that have a complete set of data<br>
- </li>
- <li><a name="#HMinfoloadConfig">loadConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
- loads register and peers from a file saved by <a href="#HMinfosaveConfig">saveConfig</a>.<br>
- It should be used carefully since it will add data to FHEM which cannot be verified. No readings will be replaced, only
- missing readings will be added. The command is mainly meant to be fill in readings and register that are
- hard to get. Those from devices which only react to config may not easily be read. <br>
- Therefore it is strictly up to the user to fill valid data. User should consider using autoReadReg for devices
- that can be read.<br>
- The command will update FHEM readings and attributes. It will <B>not</B> reprogramm any device.
- </li>
- <li><a name="#HMinfopurgeConfig">purgeConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
- purge (reduce) the saved config file. Due to the cumulative storage of the register setting
- purge will use the latest stored readings and remove older one.
- See <a href="#CUL_HMsaveConfig">CUL_HM saveConfig</a>.
- </li>
- <li><a name="#HMinfoverifyConfig">verifyConfig</a> <a href="#HMinfoFilter">[filter] [<file>]</a><br>
- Compare date in config file to the currentactive data and report differences.
- Possibly usable with a known-good configuration that was saved before.
- It may make sense to purge the config file before.
- See <a href="#CUL_HMpurgeConfig">CUL_HM purgeConfig</a>.
- </li>
-
- <br>
- <li><a name="#HMinfotempList">tempList</a> <a href="#HMinfoFilter">[filter] [save|restore|verify|status|genPlot] [<file>]</a><br>
- this function supports handling of tempList for thermstates.
- It allows templists to be saved in a separate file, verify settings against the file
- and write the templist of the file to the devices. <br>
- <ul>
- <li><B>save</B> saves tempList readings of the system to the file. <br>
- Note that templist as available in FHEM is put to the file. It is up to the user to make
- sure the data is actual<br>
- Storage is not cumulative - former content of the file will be removed</li>
- <li><B>restore</B> available templist as defined in the file are written directly
- to the device</li>
- <li><B>verify</B> file data is compared to readings as present in FHEM. It does not
- verify data in the device - user needs to ensure actuallity of present readings</li>
- <li><B>status</B> gives an overview of templates being used by any CUL_HM thermostat. It alls showes
- templates being defined in the relevant files.
- <br></li>
- <li><B>genPlot</B> generates a set of records to display templates graphicaly.<br>
- Out of the given template-file it generates a .log extended file which contains log-formated template data. timestamps are
- set to begin Year 2000.<br>
- A prepared .gplot file will be added to gplot directory.<br>
- Logfile-entity <file>_Log will be added if not already present. It is necessary for plotting.<br>
- SVG-entity <file>_SVG will be generated if not already present. It will display the graph.<br>
- <br></li>
- <li><B>file</B> name of the file to be used. Default: <B>tempList.cfg</B></li>
- <br>
- <li><B>filename</B> is the name of the file to be used. Default ist <B>tempList.cfg</B></li>
- File example<br>
- <ul><code>
- entities:HK1_Climate,HK2_Clima<br>
- tempListFri>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
- tempListMon>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
- tempListSat>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0<br>
- tempListSun>08:00 14.0 15:00 18.0 21:30 19.0 24:00 14.0<br>
- tempListThu>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
- tempListTue>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 15.0<br>
- tempListWed>07:00 14.0 16:00 18.0 21:00 19.0 24:00 14.0<br>
- entities:hk3_Climate<br>
- tempListFri>06:00 17.0 12:00 21.0 23:00 20.0 24:00 19.5<br>
- tempListMon>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
- tempListSat>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
- tempListSun>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
- tempListThu>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
- tempListTue>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
- tempListWed>06:00 17.0 12:00 21.0 23:00 20.0 24:00 17.0<br>
- </code></ul>
- File keywords<br>
- <li><B>entities</B> comma separated list of entities which refers to the temp lists following.
- The actual entity holding the templist must be given - which is channel 04 for RTs or channel 02 for TCs</li>
- <li><B>tempList...</B> time and temp couples as used in the set tempList commands</li>
- </ul>
- <br>
- </li>
- <br>
- <li><a name="#HMinfocpRegs">cpRegs <src:peer> <dst:peer> </a><br>
- allows to copy register, setting and behavior of a channel to
- another or for peers from the same or different channels. Copy therefore is allowed
- intra/inter device and intra/inter channel. <br>
- <b>src:peer</b> is the source entity. Peer needs to be given if a peer behabior beeds to be copied <br>
- <b>dst:peer</b> is the destination entity.<br>
- Example<br>
- <ul><code>
- set hm cpRegs blindR blindL # will copy all general register (list 1)for this channel from the blindR to the blindL entity.
- This includes items like drive times. It does not include peers related register (list 3/4) <br>
- set hm cpRegs blindR:Btn1 blindL:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindL<br>
- set hm cpRegs blindR:Btn1 blindR:Btn2 # copy behavior of Btn1/blindR relation to Btn2/blindR, i.e. inside the same Actor<br>
- </code></ul>
- <br>
- Restrictions:<br>
- <ul>
- 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>
- cpRegs is only allowed between <u>identical models</u><br>
- cpRegs expets that all <u>readings are up-to-date</u>. It is up to the user to ensure data consistency.<br>
- </ul>
- </li>
- <li><a name="#HMinfotemplateDef">templateDef <name> <param> <desc> <reg1:val1> [<reg2:val2>] ...</a><br>
- define a template.<br>
- <b>param</b> gives the names of parameter necesary to execute the template. It is template dependant
- and may be onTime or brightnesslevel. A list of parameter needs to be separated with colon<br>
- param1:param2:param3<br>
- if del is given as parameter the template is removed<br>
- <b>desc</b> shall give a description of the template<br>
- <b>reg:val</b> is the registername to be written and the value it needs to be set to.<br>
- In case the register is from link set and can destinguist between long and short it is necessary to leave the
- leading sh or lg off. <br>
- if parameter are used it is necessary to enter p. as value with p0 first, p1 second parameter
- <br>
- Example<br>
- <ul><code>
- set hm templateDef SwOnCond level:cond "my description" CtValLo:p0 CtDlyOn:p1 CtOn:geLo<br>
- set hm templateDef SwOnCond del # delete a template<br>
- set hm templateDef SwOnCond fromMaster <masterChannel> <peer:[long|short]># define a template with register as of the example<br>
- set hm templateDef SwOnCond fromMaster myChannel peerChannel:long # <br>
- </code></ul>
- </li>
- <li><a name="#HMinfotemplateSet">templateSet</a> <entity> <template> <peer:[long|short]> [<param1> ...]<br>
- sets a bunch of register accroding to a given template. Parameter may be added depending on
- the template setup. <br>
- templateSet will collect and accumulate all changes. Finally the results are written streamlined.<br>
- <b>entity:</b> peer is the source entity. Peer needs to be given if a peer behabior beeds to be copied <br>
- <b>template:</b> one of the programmed template<br>
- <b>peer:</b> [long|short]:if necessary a peer needs to be given. If no peer is used enter '0'.
- with a peer it should be given whether it is for long or short keypress<br>
- <b>param:</b> number and meaning of parameter depends on the given template<br>
- Example could be (templates not provided, just theoretical)<br>
- <ul><code>
- set hm templateSet Licht1 staircase FB1:short 20 <br>
- set hm templateSet Licht1 staircase FB1:long 100 <br>
- </code></ul>
- Restrictions:<br>
- <ul>
- User must ensure to read configuration prior to execution.<br>
- templateSet may not setup a complete register block but only a part if it. This is up to template design.<br>
- <br>
- </ul>
- </li>
- <li><a name="#HMinfotemplateDel">templateDel</a> <entity> <template> <peer:[long|short]> ]<br>
- remove a template installed by templateSet
- <br>
- </li>
- <li><a name="#HMinfotemplateExe">templateExe</a> <template> <br>
- executes the register write once again if necessary (e.g. a device had a reset)<br>
- </li>
- <li><a name="#HMinfodeviceReplace">x-deviceReplace</a> <oldDevice> <newDevice> <br>
- replacement of an old or broken device with a replacement. The replacement needs to be compatible - FHEM will check this partly. It is up to the user to use it carefully. <br>
- The command needs to be executed twice for safety reasons. The first call will return with CAUTION remark. Once issued a second time the old device will be renamed, the new one will be named as the old one. Then all peerings, register and templates are corrected as best as posible. <br>
- NOTE: once the command is executed devices will be reconfigured. This cannot be reverted automatically. <br>
- Replay of teh old confg-files will NOT restore the former configurations since also registers changed! Exception: proper and complete usage of templates!<br>
- In case the device is configured using templates with respect to registers a verification of the procedure is very much secure. Otherwise it is up to the user to supervice message flow for transmission failures. <br>
- </li>
- </ul>
- <br>
- <br><br>
- <a name="HMinfoattr"><b>Attributes</b></a>
- <ul>
- <li><a name="#HMinfosumStatus">sumStatus</a><br>
- Warnings: list of readings that shall be screend and counted based on current presence.
- I.e. counter is the number of entities with this reading and the same value.
- Readings to be searched are separated by comma. <br>
- Example:<br>
- <ul><code>
- attr hm sumStatus battery,sabotageError<br>
- </code></ul>
- will cause a reading like<br>
- W_sum_batterie ok:5 low:3<br>
- W_sum_sabotageError on:1<br>
- <br>
- Note: counter with '0' value will not be reported. HMinfo will find all present values autonomously<br>
- Setting is meant to give user a fast overview of parameter that are expected to be system critical<br>
- </li>
- <li><a name="#HMinfosumERROR">sumERROR</a>
- Similar to sumStatus but with a focus on error conditions in the system.
- Here user can add reading<b>values</b> that are <b>not displayed</b>. I.e. the value is the
- good-condition that will not be counted.<br>
- This way user must not know all error values but it is sufficient to supress known non-ciritical ones.
- <br>
- Example:<br>
- <ul><code>
- attr hm sumERROR battery:ok,sabotageError:off,overheat:off,Activity:alive:unknown<br>
- </code></ul>
- will cause a reading like<br>
- <ul><code>
- ERR_batterie low:3<br>
- ERR_sabotageError on:1<br>
- ERR_overheat on:3<br>
- ERR_Activity dead:5<br>
- </code></ul>
- </li>
- <li><a name="#HMinfoautoUpdate">autoUpdate</a>
- retriggers the command update periodically.<br>
- Example:<br>
- <ul><code>
- attr hm autoUpdate 00:10<br>
- </code></ul>
- will trigger the update every 10 min<br>
- </li>
- <li><a name="#HMinfoautoArchive">autoArchive</a>
- if set fhem will update the configFile each time the new data is available.
- The update will happen with <a ref="#HMinfoautoUpdate">autoUpdate</a>. It will not
- work it autoUpdate is not used.<br>
- see also <a ref="#HMinfoarchConfig">archConfig</a>
- <br>
- </li>
- <li><a name="#HMinfohmAutoReadScan">hmAutoReadScan</a>
- defines the time in seconds CUL_HM tries to schedule the next autoRead
- from the queue. Despite this timer FHEM will take care that only one device from the queue will be
- handled at one point in time. With this timer user can stretch timing even further - to up to 300sec
- min delay between execution. <br>
- Setting to 1 still obeys the "only one at a time" prinzip.<br>
- Note that compressing will increase message load while stretch will extent waiting time.<br>
- </li>
- <li><a name="#HMinfohmIoMaxDly">hmIoMaxDly</a>
- max time in seconds CUL_HM stacks messages if the IO device is not ready to send.
- If the IO device will not reappear in time all command will be deleted and IOErr will be reported.<br>
- Note: commands will be executed after the IO device reappears - which could lead to unexpected
- activity long after command issue.<br>
- default is 60sec. max value is 3600sec<br>
- </li>
- <li><a name="#HMinfoconfigDir">configDir</a>
- default directory where to store and load configuration files from.
- This path is used as long as the path is not given in a filename of
- a given command.<br>
- It is used by commands like <a ref="#HMinfotempList">tempList</a> or <a ref="#HMinfosaveConfig">saveConfig</a><br>
- </li>
- <li><a name="#HMinfoconfigFilename">configFilename</a>
- default filename used by
- <a ref="#HMinfosaveConfig">saveConfig</a>,
- <a ref="#HMinfopurgeConfig">purgeConfig</a>,
- <a ref="#HMinfoloadConfig">loadConfig</a><br>
- <a ref="#HMinfoverifyConfig">verifyConfig</a><br>
- </li>
- <li><a name="#HMinfoconfigTempFile">configTempFile<,configTempFile2><,configTempFile2> </a>
- Liste of Templfiles (weekplan) which are considered in HMInfo and CUL_HM<br>
- Files are comma separated. The first file is default. Its name may be skipped when setting a tempalte.<br>
- </li>
- <li><a name="#HMinfohmManualOper">hmManualOper</a>
- set to 1 will prevent any automatic operation, update or default settings
- in CUL_HM.<br>
- </li>
- <li><a name="#HMinfohmDefaults">hmDefaults</a>
- set default params for HM devices. Multiple attributes are possible, comma separated.<br>
- example:<br>
- attr hm hmDefaults hmProtocolEvents:0_off,rssiLog:0<br>
- </li>
- <li><a name="#HMinfoautoLoadArchive">autoLoadArchive</a>
- if set the register config will be loaded after reboot automatically. See <a ref="#HMinfoloadConfig">loadConfig</a> for details<br>
- </li>
-
- </ul>
- <br>
- <a name="HMinfovariables"><b>Variables</b></a>
- <ul>
- <li><b>I_autoReadPend:</b> Info:list of entities which are queued to retrieve config and status.
- This is typically scheduled thru autoReadReg</li>
- <li><b>ERR___rssiCrit:</b> Error:list of devices with RSSI reading n min level </li>
- <li><b>W_unConfRegs:</b> Warning:list of entities with unconfirmed register changes. Execute getConfig to clear this.</li>
- <li><b>I_rssiMinLevel:</b> Info:counts of rssi min readings per device, clustered in blocks</li>
-
- <li><b>ERR__protocol:</b> Error:count of non-recoverable protocol events per device.
- Those events are NACK, IOerr, ResendFail, CmdDel, CmdPend.<br>
- Counted are the number of device with those events, not the number of events!</li>
- <li><b>ERR__protoNames:</b> Error:name-list of devices with non-recoverable protocol events</li>
- <li><b>I_HM_IOdevices:</b> Info:list of IO devices used by CUL_HM entities</li>
- <li><b>I_actTotal:</b> Info:action detector state, count of devices with ceratin states</li>
- <li><b>ERRactNames:</b> Error:names of devices that are not alive according to ActionDetector</li>
- <li><b>C_sumDefined:</b> Count:defined entities in CUL_HM. Entites might be count as
- device AND channel if channel funtion is covered by the device itself. Similar to virtual</li>
- <li><b>ERR_<reading>:</b> Error:count of readings as defined in attribut
- <a href="#HMinfosumERROR">sumERROR</a>
- that do not match the good-content. </li>
- <li><b>ERR_names:</b> Error:name-list of entities that are counted in any ERR_<reading>
- W_sum_<reading>: count of readings as defined in attribut
- <a href="#HMinfosumStatus">sumStatus</a>. </li>
- Example:<br>
- <ul><code>
- ERR___rssiCrit LightKittchen,WindowDoor,Remote12<br>
- ERR__protocol NACK:2 ResendFail:5 CmdDel:2 CmdPend:1<br>
- ERR__protoNames LightKittchen,WindowDoor,Remote12,Ligth1,Light5<br>
- ERR_battery: low:2;<br>
- ERR_names: remote1,buttonClara,<br>
- I_rssiMinLevel 99>:3 80<:0 60<:7 59<:4<br>
- W_sum_battery: ok:5;low:2;<br>
- W_sum_overheat: off:7;<br>
- C_sumDefined: entities:23 device:11 channel:16 virtual:5;<br>
- </code></ul>
- </ul>
- </ul>
- <p> <a name="HMtemplate"></a><h3>HMtemplate</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HMtemplate'>DE</a>]</div>
- <ul>
- 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>
- The editor allowes to define, edit, copy and assign and delete templates.
- <br>
- Required: HMinfo needs to be instantiated.
-
- <a name="HMtemplate"></a><b>Set</b>
- <ul>
- following commands are available:
- <ul>
- <li><B>defTmpl <name></B><a name="HMtemplate_defTmpl"></a><br>
- Define a new template. Procedure is given in internals once the command is issued.<br>
- <li><B><a href="#HMtemplate_tpl_type">tpl_type</a></B>choose whether the template will be:
- <ul>
- <li><B>basic</B> not peer related register only</li>
- <li><B>peer-both</B> only peer related register, setting short and long press reaction in one template</li>
- <li><B>peer-Short</B> only peer related register, will define one short or long press behavior</li>
- <li><B>peer-Long</B> only peer related register, will define one short or long press behavior</li>
- </ul>
- </li>
- <li><B><a href="#HMtemplate_tpl_source">tpl_source</a></B>select the entity which will be used as master for the template
- </li>
- <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.
- </li>
- <li><B><a href="#HMtemplate_tpl_params">tpl_params</a></B>if the template shall have parameter those need to be defined next. <br>
- parameter will allow to use one template with selected registers to be defined upon appling to the entity.
- </li>
- <li><B><a href="#HMtemplate_tpl_description">tpl_description</a></B>enter a free text to describe what the entity is about
- </li>
- <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.
- </li>
- <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.
- </li>
- </li>
- <li><B>delete <name></B><a name="HMtemplate_delete"></a><br>
- Delete an existing template<br>
- </li>
- <li><B>edit <name></B><a name="HMtemplate_edit"></a><br>
- Edit an existing template. Change register, parameter and description by change the attributes. See also defTmpl<br>
- saveAs can be used to create a copy of the template.<br>
- </li>
- <li><B>select <name></B><a name="HMtemplate_select"></a><br>
- Apply an existing template to a entity<br>
- Once the command is issued it is necessary to select the entity, peer and short/long which the entity shall be applied to.<br>
- If the template has parameter the value needs to be set. <br>
- Finally <B>apply</B> the template to teh entity.
- </li>
- <li><B>dismiss</B><a name="HMtemplate_dismiss"></a><br>
- reset HMtemplate and come back to init status
- </li>
- <li><B>save, saveAs</B><a name="HMtemplate_save"></a><br>
- save a template once it is defined
- </li>
- </ul>
- </ul>
-
-
-
- </ul>
- <p><a name="HOMBOT"></a>
- <h3>HOMBOT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HOMBOT'>DE</a>]</div>
- <ul>
- <u><b>HOMBOT - LG Homebot robotic vacuum cleaner</b></u>
- <br>
- After successfully hacking (WiFi-Mod) your Hombot, this Modul enables you to integrate your Hombot to FHEM.
- The Connection-Interface between FHEM and Hombot is served by Luigi HTTP Server.
- With this Module, the following is possible:
- <ul>
- <li>Readings about the Status will be saved.</li>
- <li>Choice of cleaning mode</li>
- <li>Start cleaning</li>
- <li>Stop cleaning</li>
- <li>Return to Homebase</li>
- <li>Assign Nickname</li>
- <li>Schedule Weekprogram</li>
- <li>Activate 'Repeat' and 'Turbo'</li>
- </ul>
-
- <br>
- You need to set up the device for the Hombot like this.
- <br><br>
- <a name="HOMBOTdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> HOMBOT <IP-ADRESS></code>
- <br><br>
- Example:
- <ul><br>
- <code>define Roberta HOMBOT 192.168.0.23</code><br>
- </ul>
- <br>
- This command creates a HOMBOT-Device in room HOMBOT. The parameter <IP-ADRESS> determines the IP-Address of your Hombot.<br>
- 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.
- <br>
- </ul>
- <br><br>
- <b><u>The first Readings should already appear after setting up the Device entity. </u></b>
- <br><br><br>
- <a name="HOMBOTreadings"></a>
- <b>Readings</b>
- <ul>
- <li>at_* - Reading for the week schedule. Start time for respective day.</li>
- <li>batteryPercent - Battery status in percent %</li>
- <li>cleanMode - Current cleanmode</li>
- <li>cpu_* - Information about CPU load</li>
- <li>currentBumping - Count of collisions with obstacles</li>
- <li>firmware - current installed firmware version</li>
- <li>hombotState - Status of Hombot</li>
- <li>lastClean - Date and Time of last cleaning</li>
- <li>lastSetCommandError - last error message from set command</li>
- <li>lastSetCommandState - last status from set command. Command (un)successfully send</li>
- <li>lastStatusRequestError - last error message from statusRequest command</li>
- <li>lastStatusRequestState - last status from statusRequest command. Command (un)successfully send</li>
- <li>luigiSrvVersion - Version of Luigi HTTP Servers of Hombot</li>
- <li>nickname - Name of Hombot</li>
- <li>num* - Previous started and ended cleanings in corresponding modes</li>
- <li>repeat - Cleaning will repeated Yes/No</li>
- <li>state - Module status</li>
- <li>turbo - Turbo active Yes/No</li>
- </ul>
- <br><br>
- <a name="HOMBOTset"></a>
- <b>Set</b>
- <ul>
- <li>cleanMode - set cleaning mode (ZZ-ZigZag / SB-Cell by Cell / SPOT-Spiralcleaning</li>
- <li>cleanStart - Start cleaning</li>
- <li>homing - Stop cleaning and move Hombot back to Base</li>
- <li>nickname - Sets HomBot's Nickname. Not visible in Reading until restart of Luigi-Server or HomBot itself.</li>
- <li>pause - Will pause the cleaning process</li>
- <li>repeat - Repeat cleaning? (true/false)</li>
- <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>
- <li>statusRequest - Requests new Statusreport from Device</li>
- <li>turbo - Activation of Turbomode (true/false)</li>
- </ul>
- <br><br>
- </ul>
- <p><a name="HOMEMODE"></a>
- <h3>HOMEMODE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HOMEMODE'>DE</a>]</div>
- <ul>
- <i>HOMEMODE</i> is designed to represent the overall home state(s) in one device.<br>
- It uses the attribute userattr extensively.<br>
- It has been optimized for usage with homebridge as GUI.<br>
- You can also configure CMDs to be executed on specific events.<br>
- There is no need to create notify(s) or DOIF(s) to achieve common tasks depending on the home state(s).<br>
- It's also possible to control ROOMMATE/GUEST devices states depending on their associated presence device.<br>
- 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>
- 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>
- A lot of placeholders are available for usage within the HomeCMD or HomeText attributes (see Placeholders).<br>
- All your energy and power measuring sensors can be added and calculated total readings for energy and power will be created.<br>
- You can also add your local outside temperature and humidity sensors and you'll get ice warning e.g.<br>
- If you also add your Yahoo weather device you'll also get short and long weather informations and weather forecast.<br>
- You can monitor added contact and motion sensors and execute CMDs depending on their state.<br>
- A simple alarm system is included, so your contact and motion sensors can trigger alarms depending on the current alarm mode.<br>
- A lot of customizations are possible, e.g. special event (holiday) calendars and locations.<br>
- <p><b>General information:</b></p>
- <ul>
- <li>
- The HOMEMODE device is refreshing itselfs every 5 seconds by calling HOMEMODE_GetUpdate and subfunctions.<br>
- This is the reason why some automations (e.g. daytime or season) are delayed up to 4 seconds.<br>
- All automations triggered by external events (other devices monitored by HOMEMODE) and the execution of the HomeCMD attributes will not be delayed.
- </li>
- <li>
- Each created timer will be created as at device and its name will start with "atTmp_" and end with "_<name of your HOMEMODE device>". You may list them with "list TYPE=at:FILTER=NAME=atTmp_.*_<name of your HOMEMODE device>".
- </li>
- <li>
- Seasons can also be adjusted (date and text) in attribute HomeSeasons
- </li>
- <li>
- 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>
- 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.
- </li>
- <li>
- 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.
- </li>
- </ul>
- <br>
- <p>A german Wiki page is also available at <a href="https://wiki.fhem.de/wiki/Modul_HOMEMODE" target="_blank">https://wiki.fhem.de/wiki/Modul_HOMEMODE</a>. There you can find lots of example code.</p>
- <br>
- <a name="HOMEMODE_define"></a>
- <p><b>define [optional]</b></p>
- <ul>
- <code>define <name> HOMEMODE</code><br><br>
- <code>define <name> HOMEMODE [RESIDENTS-MASTER-DEVICE]</code><br>
- </ul>
- <br>
- <a name="HOMEMODE_set"></a>
- <p><b>set <required> [optional]</b></p>
- <ul>
- <li>
- <b><i>anyoneElseAtHome <on/off></i></b><br>
- turn this on if anyone else is alone at home who is not a registered resident<br>
- e.g. an animal or unregistered guest<br>
- 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>
- placeholder %AEAH% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>deviceDisable <DEVICE></i></b><br>
- disable HOMEMODE integration for given device<br>
- placeholder %DISABLED% is available in all HomeCMD attributes<br>
- placeholders %DEVICE% and %ALIAS% are available in HomeCMDdeviceDisable attribute
- </li>
- <li>
- <b><i>deviceEnable <DEVICE></i></b><br>
- enable HOMEMODE integration for given device<br>
- placeholder %DISABLED% is available in all HomeCMD attributes<br>
- placeholders %DEVICE% and %ALIAS% are available in HomeCMDdeviceEnable attribute
- </li>
- <li>
- <b><i>dnd <on/off></i></b><br>
- turn "do not disturb" mode on or off<br>
- e.g. to disable notification or alarms or, or, or...<br>
- placeholder %DND% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>dnd-for-minutes <MINUTES></i></b><br>
- turn "do not disturb" mode on for given minutes<br>
- will return to the current (daytime) mode
- </li>
- <li>
- <b><i>location <arrival/home/bed/underway/wayhome></i></b><br>
- switch to given location manually<br>
- placeholder %LOCATION% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>mode <morning/day/afternoon/evening/night/gotosleep/asleep/absent/gone/home></i></b><br>
- switch to given mode manually<br>
- placeholder %MODE% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>modeAlarm <armaway/armhome/armnight/confirm/disarm></i></b><br>
- switch to given alarm mode manually<br>
- placeholder %MODEALARM% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>modeAlarm-for-minutes <armaway/armhome/armnight/disarm> <MINUTES></i></b><br>
- switch to given alarm mode for given minutes<br>
- will return to the previous alarm mode
- </li>
- <li>
- <b><i>panic <on/off></i></b><br>
- turn panic mode on or off<br>
- placeholder %PANIC% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>updateHomebridgeMapping</i></b><br>
- will update the attribute homebridgeMapping of the HOMEMODE device depending on the available informations
- </li>
- <li>
- <b><i>updateInternalForce</i></b><br>
- will force update all internals of the HOMEMODE device<br>
- 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
- </li>
- </ul>
- <br>
- <a name="HOMEMODE_get"></a>
- <p><b>get <required> [optional]</b></p>
- <ul>
- <li>
- <b><i>contactsOpen <all/doorsinside/doorsoutside/doorsmain/outside/windows></i></b><br>
- get a list of all/doorsinside/doorsoutside/doorsmain/outside/windows open contacts<br>
- placeholders %OPEN% (open contacts outside) and %OPENCT% (open contacts outside count) are available in all HomeCMD attributes
- </li>
- <li>
- <b><i>devicesDisabled</i></b><br>
- get new line separated list of currently disabled devices<br>
- placeholder %DISABLED% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>mode</i></b><br>
- get current mode<br>
- placeholder %MODE% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>modeAlarm</i></b><br>
- get current modeAlarm<br>
- placeholder %MODEALARM% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>publicIP</i></b><br>
- get the public IP address<br>
- placeholder %IP% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>sensorsTampered</i></b><br>
- get a list of all tampered sensors<br>
- placeholder %TAMPERED% is available in all HomeCMD attributes
- </li>
- <li>
- <b><i>weather <long/short></i></b><br>
- get weather information in given format<br>
- please specify the outputs in attributes HomeTextWeatherLong and HomeTextWeatherShort<br>
- placeholders %WEATHER% and %WEATHERLONG% are available in all HomeCMD attributes
- </li>
- <li>
- <b><i>weatherForecast [DAY]</i></b><br>
- get weather forecast for given day<br>
- if DAY is omitted the forecast for tomorrow (2) will be returned<br>
- please specify the outputs in attributes HomeTextWeatherForecastToday, HomeTextWeatherForecastTomorrow and HomeTextWeatherForecastInSpecDays<br>
- placeholders %FORECAST% (tomorrow) and %FORECASTTODAY% (today) are available in all HomeCMD attributes
- </li>
- </ul>
- <br>
- <a name="HOMEMODE_attr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <b><i>HomeAdvancedDetails</i></b><br>
- show more details depending on the monitored devices<br>
- 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>
- values: none, detail, both, room<br>
- default: none
- </li>
- <li>
- <b><i>HomeAdvancedUserAttr</i></b><br>
- more HomeCMD userattr will be provided<br>
- additional attributes for each resident and each calendar event<br>
- values: 0 or 1<br>
- default: 0
- </li>
- <li>
- <b><i>HomeAutoAlarmModes</i></b><br>
- set modeAlarm automatically depending on mode<br>
- if mode is set to "home", modeAlarm will be set to "disarm"<br>
- if mode is set to "absent", modeAlarm will be set to "armaway"<br>
- if mode is set to "asleep", modeAlarm will be set to "armnight"<br>
- modeAlarm "home" can only be set manually<br>
- values 0 or 1, value 0 disables automatically set modeAlarm<br>
- default: 1
- </li>
- <li>
- <b><i>HomeAutoArrival</i></b><br>
- set resident's location to arrival (on arrival) and after given minutes to home<br>
- values from 0 to 5999.9 in minutes, value 0 disables automatically set arrival<br>
- default: 0
- </li>
- <li>
- <b><i>HomeAutoAsleep</i></b><br>
- set user from gotosleep to asleep after given minutes<br>
- values from 0 to 5999.9 in minutes, value 0 disables automatically set asleep<br>
- default: 0
- </li>
- <li>
- <b><i>HomeAutoAwoken</i></b><br>
- force set resident from asleep to awoken, even if changing from alseep to home<br>
- after given minutes awoken will change to home<br>
- values from 0 to 5999.9 in minutes, value 0 disables automatically set awoken after asleep<br>
- default: 0
- </li>
- <li>
- <b><i>HomeAutoDaytime</i></b><br>
- daytime depending home mode<br>
- values 0 or 1, value 0 disables automatically set daytime<br>
- default: 1
- </li>
- <li>
- <b><i>HomeAutoPresence</i></b><br>
- automatically change the state of residents between home and absent depending on their associated presence device<br>
- values 0 or 1, value 0 disables auto presence<br>
- default: 0
- </li>
- <li>
- <b><i>HomeAutoPresenceSuppressState</i></b><br>
- suppress state(s) for HomeAutoPresence (p.e. gotosleep|asleep)<br>
- if set this/these state(s) of a resident will not affect the residents to change to absent by its presence device<br>
- p.e. for misteriously disappearing presence devices in the middle of the night<br>
- default:
- </li>
- <li>
- <b><i>HomeCMDalarmSmoke</i></b><br>
- cmds to execute on any smoke alarm state
- </li>
- <li>
- <b><i>HomeCMDalarmSmoke-<on/off></i></b><br>
- cmds to execute on smoke alarm state on/off
- </li>
- <li>
- <b><i>HomeCMDalarmTampered</i></b><br>
- cmds to execute on any tamper alarm state
- </li>
- <li>
- <b><i>HomeCMDalarmTampered-<on/off></i></b><br>
- cmds to execute on tamper alarm state on/off
- </li>
- <li>
- <b><i>HomeCMDalarmTriggered</i></b><br>
- cmds to execute on any alarm state
- </li>
- <li>
- <b><i>HomeCMDalarmTriggered-<on/off></i></b><br>
- cmds to execute on alarm state on/off
- </li>
- <li>
- <b><i>HomeCMDanyoneElseAtHome</i></b><br>
- cmds to execute on any anyoneElseAtHome state
- </li>
- <li>
- <b><i>HomeCMDanyoneElseAtHome-<on/off></i></b><br>
- cmds to execute on anyoneElseAtHome state on/off
- </li>
- <li>
- <b><i>HomeCMDcontact</i></b><br>
- cmds to execute if any contact has been triggered (open/tilted/closed)
- </li>
- <li>
- <b><i>HomeCMDbatteryLow</i></b><br>
- cmds to execute if any battery sensor has low battery
- </li>
- <li>
- <b><i>HomeCMDcontactClosed</i></b><br>
- cmds to execute if any contact has been closed
- </li>
- <li>
- <b><i>HomeCMDcontactOpen</i></b><br>
- cmds to execute if any contact has been opened
- </li>
- <li>
- <b><i>HomeCMDcontactDoormain</i></b><br>
- cmds to execute if any contact of type doormain has been triggered (open/tilted/closed)
- </li>
- <li>
- <b><i>HomeCMDcontactDoormainClosed</i></b><br>
- cmds to execute if any contact of type doormain has been closed
- </li>
- <li>
- <b><i>HomeCMDcontactDoormainOpen</i></b><br>
- cmds to execute if any contact of type doormain has been opened
- </li>
- <li>
- <b><i>HomeCMDcontactOpenWarning1</i></b><br>
- cmds to execute on first contact open warning
- </li>
- <li>
- <b><i>HomeCMDcontactOpenWarning2</i></b><br>
- cmds to execute on second (and more) contact open warning
- </li>
- <li>
- <b><i>HomeCMDcontactOpenWarningLast</i></b><br>
- cmds to execute on last contact open warning
- </li>
- <li>
- <b><i>HomeCMDdaytime</i></b><br>
- cmds to execute on any daytime change
- </li>
- <li>
- <b><i>HomeCMDdaytime-<%DAYTIME%></i></b><br>
- cmds to execute on specific day time change
- </li>
- <li>
- <b><i>HomeCMDdnd</i></b><br>
- cmds to execute on any dnd state
- </li>
- <li>
- <b><i>HomeCMDdnd-<on/off></i></b><br>
- cmds to execute on dnd state on/off
- </li>
- <li>
- <b><i>HomeCMDevent</i></b><br>
- cmds to execute on each calendar event
- </li>
- <li>
- <b><i>HomeCMDevent-<%CALENDAR%>-each</i></b><br>
- cmds to execute on each event of the calendar
- </li>
- <li>
- <b><i>HomeCMDevent-<%CALENDAR%>-<%EVENT%>-begin</i></b><br>
- cmds to execute on start of a specific calendar event
- </li>
- <li>
- <b><i>HomeCMDevent-<%CALENDAR%>-<%EVENT%>-end</i></b><br>
- cmds to execute on end of a specific calendar event
- </li>
- <li>
- <b><i>HomeCMDfhemDEFINED</i></b><br>
- cmds to execute on any defined device
- </li>
- <li>
- <b><i>HomeCMDfhemINITIALIZED</i></b><br>
- cmds to execute on fhem start
- </li>
- <li>
- <b><i>HomeCMDfhemSAVE</i></b><br>
- cmds to execute on fhem save
- </li>
- <li>
- <b><i>HomeCMDfhemUPDATE</i></b><br>
- cmds to execute on fhem update
- </li>
- <li>
- <b><i>HomeCMDicewarning</i></b><br>
- cmds to execute on any ice warning state
- </li>
- <li>
- <b><i>HomeCMDicewarning-<on/off></i></b><br>
- cmds to execute on ice warning state on/off
- </li>
- <li>
- <b><i>HomeCMDlocation</i></b><br>
- cmds to execute on any location change of the HOMEMODE device
- </li>
- <li>
- <b><i>HomeCMDlocation-<%LOCATION%></i></b><br>
- cmds to execute on specific location change of the HOMEMODE device
- </li>
- <li>
- <b><i>HomeCMDmode</i></b><br>
- cmds to execute on any mode change of the HOMEMODE device
- </li>
- <li>
- <b><i>HomeCMDmode-absent-belated</i></b><br>
- cmds to execute belated to absent<br>
- belated time can be adjusted with attribute "HomeModeAbsentBelatedTime"
- </li>
- <li>
- <b><i>HomeCMDmode-<%MODE%></i></b><br>
- cmds to execute on specific mode change of the HOMEMODE device
- </li>
- <li>
- <b><i>HomeCMDmode-<%MODE%>-resident</i></b><br>
- cmds to execute on specific mode change of the HOMEMODE device triggered by any resident
- </li>
- <li>
- <b><i>HomeCMDmode-<%MODE%>-<%RESIDENT%></i></b><br>
- cmds to execute on specific mode change of the HOMEMODE device triggered by a specific resident
- </li>
- <li>
- <b><i>HomeCMDmodeAlarm</i></b><br>
- cmds to execute on any alarm mode change
- </li>
- <li>
- <b><i>HomeCMDmodeAlarm-<armaway/armhome/armnight/confirm/disarm></i></b><br>
- cmds to execute on specific alarm mode change
- </li>
- <li>
- <b><i>HomeCMDmotion</i></b><br>
- cmds to execute on any recognized motion of any motion sensor
- </li>
- <li>
- <b><i>HomeCMDmotion-<on/off></i></b><br>
- cmds to execute if any recognized motion of any motion sensor ends/starts
- </li>
- <li>
- <b><i>HomeCMDpanic</i></b><br>
- cmds to execute on any panic state
- </li>
- <li>
- <b><i>HomeCMDpanic-<on/off></i></b><br>
- cmds to execute on if panic is turned on/off
- </li>
- <li>
- <b><i>HomeCMDpresence-<absent/present></i></b><br>
- cmds to execute on specific presence change of the HOMEMODE device
- </li>
- <li>
- <b><i>HomeCMDpresence-<absent/present>-device</i></b><br>
- cmds to execute on specific presence change of any presence device
- </li>
- <li>
- <b><i>HomeCMDpresence-<absent/present>-resident</i></b><br>
- cmds to execute on specific presence change of a specific resident
- </li>
- <li>
- <b><i>HomeCMDpresence-<absent/present>-<%RESIDENT%></i></b><br>
- cmds to execute on specific presence change of a specific resident
- </li>
- <li>
- <b><i>HomeCMDpresence-<absent/present>-<%RESIDENT%>-<%DEVICE%></i></b><br>
- cmds to execute on specific presence change of a specific resident's presence device<br>
- only available if more than one presence device is available for a resident
- </li>
- <li>
- <b><i>HomeCMDseason</i></b><br>
- cmds to execute on any season change
- </li>
- <li>
- <b><i>HomeCMDseason-<%SEASON%></i></b><br>
- cmds to execute on specific season change
- </li>
- <li>
- <b><i>HomeCMDuwz-warn</i></b><br>
- cmds to execute on any UWZ warning state
- </li>
- <li>
- <b><i>HomeCMDuwz-warn-<begin/end></i></b><br>
- cmds to execute on UWZ warning state begin/end
- </li>
- <li>
- <b><i>HomeDaytimes</i></b><br>
- space separated list of time|text pairs for possible daytimes starting with the first event of the day (lowest time)<br>
- default: 05:00|morning 10:00|day 14:00|afternoon 18:00|evening 23:00|night
- </li>
- <li>
- <b><i>HomeEventsHolidayDevices</i></b><br>
- devspec of Calendar/holiday calendars
- </li>
- <li>
- <b><i>HomeEventsCalendarDevices</i></b><br>
- devspec of Calendar/holiday calendars
- </li>
- <li>
- <b><i>HomeIcewarningOnOffTemps</i></b><br>
- 2 space separated temperatures for ice warning on and off<br>
- default: 2 3
- </li>
- <li>
- <b><i>HomeLanguage</i></b><br>
- overwrite language from gloabl device<br>
- default: EN (language setting from global device)
- </li>
- <li>
- <b><i>HomeModeAbsentBelatedTime</i></b><br>
- time in minutes after changing to absent to execute "HomeCMDmode-absent-belated"<br>
- if mode changes back (to home e.g.) in this time frame "HomeCMDmode-absent-belated" will not be executed<br>
- default:
- </li>
- <li>
- <b><i>HomeModeAlarmArmDelay</i></b><br>
- time in seconds for delaying modeAlarm arm... commands<br>
- 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>
- values from 0 to 99999<br>
- default: 0
- </li>
- <li>
- <b><i>HomeAtTmpRoom</i></b><br>
- add this room to temporary at(s) (generated from HOMEMODE)<br>
- default:
- </li>
- <li>
- <b><i>HomePresenceDeviceAbsentCount-<ROOMMATE/GUEST></i></b><br>
- number of resident associated presence device to turn resident to absent<br>
- default: maximum number of available presence device for each resident
- </li>
- <li>
- <b><i>HomePresenceDevicePresentCount-<ROOMMATE/GUEST></i></b><br>
- number of resident associated presence device to turn resident to home<br>
- default: 1
- </li>
- <li>
- <b><i>HomePresenceDeviceType</i></b><br>
- comma separated list of presence device types<br>
- default: PRESENCE
- </li>
- <li>
- <b><i>HomePublicIpCheckInterval</i></b><br>
- numbers from 1-99999 for interval in minutes for public IP check<br>
- default: 0 (disabled)
- </li>
- <li>
- <b><i>HomeResidentCmdDelay</i></b><br>
- time in seconds to delay the execution of specific residents commands after the change of the residents master device<br>
- normally the resident events occur before the HOMEMODE events, to restore this behavior set this value to 0<br>
- default: 1 (second)
- </li>
- <li>
- <b><i>HomeSeasons</i></b><br>
- space separated list of date|text pairs for possible seasons starting with the first season of the year (lowest date)<br>
- default: 01.01|spring 06.01|summer 09.01|autumn 12.01|winter
- </li>
- <li>
- <b><i>HomeSensorAirpressure</i></b><br>
- main outside airpressure sensor
- </li>
- <li>
- <b><i>HomeSensorWindspeed</i></b><br>
- main outside wind speed sensor
- </li>
- <li>
- <b><i>HomeSensorsBattery</i></b><br>
- devspec of battery sensors with a battery reading<br>
- all sensors with a percentage battery value or a ok/low/nok battery value are applicable
- </li>
- <li>
- <b><i>HomeSensorsBatteryLowPercentage</i></b><br>
- percentage to recognize a sensors battery as low (only percentage based sensors)<br>
- default: 50
- </li>
- <li>
- <b><i>HomeSensorsBatteryReading</i></b><br>
- a single word for the battery reading<br>
- this is only here available as global setting for all devices<br>
- default: battery
- </li>
- <li>
- <b><i>HomeSensorsContact</i></b><br>
- devspec of contact sensors<br>
- each applied contact sensor will get the following attributes, attributes will be removed after removing the contact sensors from the HOMEMODE device.<br>
- <ul>
- <li>
- <b><i>HomeContactType</i></b><br>
- specify each contacts sensor's type, choose one of: doorinside, dooroutside, doormain, window<br>
- while applying contact sensors to the HOMEMODE device, the value of this attribute will be guessed by device name or device alias
- </li>
- <li>
- <b><i>HomeModeAlarmActive</i></b><br>
- specify the alarm mode(s) by regex in which the contact sensor should trigger open/tilted as alerts<br>
- while applying contact sensors to the HOMEMODE device, the value of this attribute will be set to armaway by default<br>
- choose one or a combination of: armaway|armhome|armnight<br>
- default: armaway
- </li>
- <li>
- <b><i>HomeOpenDontTriggerModes</i></b><br>
- specify the HOMEMODE mode(s)/state(s) by regex in which the contact sensor should not trigger open warnings<br>
- choose one or a combination of all available modes of the HOMEMODE device<br>
- if you don't want open warnings while sleeping a good choice would be: gotosleep|asleep<br>
- default:
- </li>
- <li>
- <b><i>HomeOpenDontTriggerModesResidents</i></b><br>
- comma separated list of residents whose state should be the reference for HomeOpenDontTriggerModes instead of the mode of the HOMEMODE device<br>
- 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>
- default:
- </li>
- <li>
- <b><i>HomeOpenMaxTrigger</i></b><br>
- maximum number how often open warning should be triggered<br>
- default: 0
- </li>
- <li>
- <b><i>HomeReadings</i></b><br>
- 2 space separated readings for contact sensors open state and tamper alert<br>
- this is the device setting which will override the global setting from attribute HomeSensorsContactReadings from the HOMEMODE device<br>
- default: state sabotageError
- </li>
- <li>
- <b><i>HomeValues</i></b><br>
- regex of open, tilted and tamper values for contact sensors<br>
- this is the device setting which will override the global setting from attribute HomeSensorsContactValues from the HOMEMODE device<br>
- default: open|tilted|on
- </li>
- <li>
- <b><i>HomeOpenTimes</i></b><br>
- space separated list of minutes after open warning should be triggered<br>
- first value is for first warning, second value is for second warning, ...<br>
- if less values are available than the number given by HomeOpenMaxTrigger, the very last available list entry will be used<br>
- this is the device setting which will override the global setting from attribute HomeSensorsContactOpenTimes from the HOMEMODE device<br>
- default: 10
- </li>
- <li>
- <b><i>HomeOpenTimeDividers</i></b><br>
- space separated list of trigger time dividers for contact sensor open warnings depending on the season of the HOMEMODE device.<br>
- dividers in same order and same number as seasons in attribute HomeSeasons<br>
- dividers are not used for contact sensors of type doormain and doorinside!<br>
- this is the device setting which will override the global setting from attribute HomeSensorsContactOpenTimeDividers from the HOMEMODE device<br>
- values from 0.001 to 99.999<br>
- default:
- </li>
- </ul>
- </li>
- <li>
- <b><i>HomeSensorsContactReadings</i></b><br>
- 2 space separated readings for contact sensors open state and tamper alert<br>
- 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>
- default: state sabotageError
- </li>
- <li>
- <b><i>HomeSensorsContactValues</i></b><br>
- regex of open, tilted and tamper values for contact sensors<br>
- 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>
- default: open|tilted|on
- </li>
- <li>
- <b><i>HomeSensorsContactOpenTimeDividers</i></b><br>
- space separated list of trigger time dividers for contact sensor open warnings depending on the season of the HOMEMODE device.<br>
- dividers in same order and same number as seasons in attribute HomeSeasons<br>
- dividers are not used for contact sensors of type doormain and doorinside!<br>
- 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>
- values from 0.001 to 99.999<br>
- default:
- </li>
- <li>
- <b><i>HomeSensorsContactOpenTimeMin</i></b><br>
- minimal open time for contact sensors open wanings<br>
- default:
- </li>
- <li>
- <b><i>HomeSensorsContactOpenTimes</i></b><br>
- space separated list of minutes after open warning should be triggered<br>
- first value is for first warning, second value is for second warning, ...<br>
- if less values are available than the number given by HomeOpenMaxTrigger, the very last available list entry will be used<br>
- 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>
- default: 10
- </li>
- <li>
- <b><i>HomeSensorHumidityOutside</i></b><br>
- main outside humidity sensor<br>
- if HomeSensorTemperatureOutside also has a humidity reading, you don't need to add the same sensor here
- </li>
- <li>
- <b><i>HomeSensorTemperatureOutside</i></b><br>
- main outside temperature sensor<br>
- if this sensor also has a humidity reading, you don't need to add the same sensor to HomeSensorHumidityOutside
- </li>
- <li>
- <b><i>HomeSensorsLuminance</i></b><br>
- devspec of sensors with luminance measurement capabilities<br>
- these devices will be used for total luminance calculations<br>
- please set the corresponding reading for luminance in attribute HomeSensorsLuminanceReading (if different to luminance) before applying snesors here
- </li>
- <li>
- <b><i>HomeSensorsLuminanceReading</i></b><br>
- a single word for the luminance reading<br>
- this is only here available as global setting for all devices<br>
- default: luminance
- </li>
- <li>
- <b><i>HomeSensorsMotion</i></b><br>
- devspec of motion sensors<br>
- each applied motion sensor will get the following attributes, attributes will be removed after removing the motion sensors from the HOMEMODE device.<br>
- <ul>
- <li>
- <b><i>HomeModeAlarmActive</i></b><br>
- specify the alarm mode(s) by regex in which the motion sensor should trigger motions as alerts<br>
- while applying motion sensors to the HOMEMODE device, the value of this attribute will be set to armaway by default<br>
- choose one or a combination of: armaway|armhome|armnight<br>
- default: armaway (if sensor is of type inside)
- </li>
- <li>
- <b><i>HomeSensorLocation</i></b><br>
- specify each motion sensor's location, choose one of: inside, outside<br>
- default: inside
- </li>
- <li>
- <b><i>HomeReadings</i></b><br>
- 2 space separated readings for motion sensors open/closed state and tamper alert<br>
- this is the device setting which will override the global setting from attribute HomeSensorsMotionReadings from the HOMEMODE device<br>
- default: state sabotageError
- </li>
- <li>
- <b><i>HomeValues</i></b><br>
- regex of open and tamper values for motion sensors<br>
- this is the device setting which will override the global setting from attribute HomeSensorsMotionValues from the HOMEMODE device<br>
- default: open|on
- </li>
- </ul>
- </li>
- <li>
- <b><i>HomeSensorsMotionReadings</i></b><br>
- 2 space separated readings for motion sensors open/closed state and tamper alert<br>
- 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>
- default: state sabotageError
- </li>
- <li>
- <b><i>HomeSensorsMotionValues</i></b><br>
- regex of open and tamper values for motion sensors<br>
- 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>
- default: open|on
- </li>
- <li>
- <b><i>HomeSensorsPowerEnergy</i></b><br>
- devspec of sensors with power and energy readings<br>
- these devices will be used for total calculations
- </li>
- <li>
- <b><i>HomeSensorsPowerEnergyReadings</i></b><br>
- 2 space separated readings for power/energy sensors power and energy readings<br>
- default: power energy
- </li>
- <li>
- <b><i>HomeSensorsSmoke</i></b><br>
- devspec of smoke sensors<br>
- </li>
- <li>
- <b><i>HomeSensorsSmokeReading</i></b><br>
- reading for smoke sensors on/off state<br>
- default: state
- </li>
- <li>
- <b><i>HomeSensorsSmokeValue</i></b><br>
- regex of on values for smoke sensors<br>
- default: on
- </li>
- <li>
- <b><i>HomeSpecialLocations</i></b><br>
- comma separated list of additional locations<br>
- default:
- </li>
- <li>
- <b><i>HomeSpecialModes</i></b><br>
- comma separated list of additional modes<br>
- default:
- </li>
- <li>
- <b><i>HomeTextAndAreIs</i></b><br>
- pipe separated list of your local translations for "and", "are" and "is"<br>
- default: and|are|is
- </li>
- <li>
- <b><i>HomeTextClosedOpen</i></b><br>
- pipe separated list of your local translation for "closed" and "open"<br>
- default: closed|open
- </li>
- <li>
- <b><i>HomeTextRisingConstantFalling</i></b><br>
- pipe separated list of your local translation for "rising", "constant" and "falling"<br>
- default: rising|constant|falling
- </li>
- <li>
- <b><i>HomeTextNosmokeSmoke</i></b><br>
- pipe separated list of your local translation for "no smoke" and "smoke"<br>
- default: so smoke|smoke
- </li>
- <li>
- <b><i>HomeTextTodayTomorrowAfterTomorrow</i></b><br>
- pipe separated list of your local translations for "today", "tomorrow" and "day after tomorrow"<br>
- this is used by weather forecast<br>
- default: today|tomorrow|day after tomorrow
- </li>
- <li>
- <b><i>HomeTextWeatherForecastInSpecDays</i></b><br>
- your text for weather forecast in specific days<br>
- placeholders can be used!<br>
- default:
- </li>
- <li>
- <b><i>HomeTextWeatherForecastToday</i></b><br>
- your text for weather forecast today<br>
- placeholders can be used!<br>
- default:
- </li>
- <li>
- <b><i>HomeTextWeatherForecastTomorrow</i></b><br>
- your text for weather forecast tomorrow and the day after tomorrow<br>
- placeholders can be used!<br>
- default:
- </li>
- <li>
- <b><i>HomeTextWeatherNoForecast</i></b><br>
- your text for no available weather forecast<br>
- default: No forecast available
- </li>
- <li>
- <b><i>HomeTextWeatherLong</i></b><br>
- your text for long weather information<br>
- placeholders can be used!<br>
- default:
- </li>
- <li>
- <b><i>HomeTextWeatherShort</i></b><br>
- your text for short weather information<br>
- placeholders can be used!<br>
- default:
- </li>
- <li>
- <b><i>HomeTrendCalcAge</i></b><br>
- time in seconds for the max age of the previous measured value for calculating trends<br>
- default: 900
- </li>
- <li>
- <b><i>HomeTriggerAnyoneElseAtHome</i></b><br>
- your anyoneElseAtHome trigger device (device:reading:valueOn:valueOff)<br>
- default:
- </li>
- <li>
- <b><i>HomeTriggerPanic</i></b><br>
- your panic alarm trigger device (device:reading:valueOn[:valueOff])<br>
- valueOff is optional<br>
- valueOn will toggle panic mode if valueOff is not given<br>
- default:
- </li>
- <li>
- <b><i>HomeUWZ</i></b><br>
- your local UWZ device<br>
- default:
- </li>
- <li>
- <b><i>HomeYahooWeatherDevice</i></b><br>
- your local yahoo weather device<br>
- default:
- </li>
- <li>
- <b><i>disable</i></b><br>
- disable HOMEMODE device and stop executing CMDs<br>
- values 0 or 1<br>
- default: 0
- </li>
- <li>
- <b><i>disabledForIntervals</i></b><br>
- disable the HOMEMODE device for intervals
- default:
- </li>
- </ul>
- <br>
- <a name="HOMEMODE_read"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- <b><i>alarmSmoke</i></b><br>
- list of triggered smoke sensors
- </li>
- <li>
- <b><i>alarmSmoke_ct</i></b><br>
- count of triggered smoke sensors
- </li>
- <li>
- <b><i>alarmSmoke_hr</i></b><br>
- (human readable) list of triggered smoke sensors
- </li>
- <li>
- <b><i>alarmState</i></b><br>
- current state of alarm system (includes current alarms - for homebridgeMapping)
- </li>
- <li>
- <b><i>alarmTriggered</i></b><br>
- list of triggered alarm sensors (contact/motion sensors)
- </li>
- <li>
- <b><i>alarmTriggered_ct</i></b><br>
- count of triggered alarm sensors (contact/motion sensors)
- </li>
- <li>
- <b><i>alarmTriggered_hr</i></b><br>
- (human readable) list of triggered alarm sensors (contact/motion sensors)
- </li>
- <li>
- <b><i>anyoneElseAtHome</i></b><br>
- anyoneElseAtHome on or off
- </li>
- <li>
- <b><i>contactsDoorsInsideOpen</i></b><br>
- list of names of open contact sensors of type doorinside
- </li>
- <li>
- <b><i>batteryLow</i></b><br>
- list of names of sensors with low battery
- </li>
- <li>
- <b><i>batteryLow_ct</i></b><br>
- count of sensors with low battery
- </li>
- <li>
- <b><i>batteryLow_hr</i></b><br>
- (human readable) list of sensors with low battery
- </li>
- <li>
- <b><i>contactsDoorsInsideOpen_ct</i></b><br>
- count of open contact sensors of type doorinside
- </li>
- <li>
- <b><i>contactsDoorsInsideOpen_hr</i></b><br>
- (human readable) list of open contact sensors of type doorinside
- </li>
- <li>
- <b><i>contactsDoorsMainOpen</i></b><br>
- list of names of open contact sensors of type doormain
- </li>
- <li>
- <b><i>contactsDoorsMainOpen_ct</i></b><br>
- count of open contact sensors of type doormain
- </li>
- <li>
- <b><i>contactsDoorsMainOpen_hr</i></b><br>
- (human readable) list of open contact sensors of type doormain
- </li>
- <li>
- <b><i>contactsDoorsOutsideOpen</i></b><br>
- list of names of open contact sensors of type dooroutside
- </li>
- <li>
- <b><i>contactsDoorsOutsideOpen_ct</i></b><br>
- count of open contact sensors of type dooroutside
- </li>
- <li>
- <b><i>contactsDoorsOutsideOpen_hr</i></b><br>
- (human readable) list of contact sensors of type dooroutside
- </li>
- <li>
- <b><i>contactsOpen</i></b><br>
- list of names of all open contact sensors
- </li>
- <li>
- <b><i>contactsOpen_ct</i></b><br>
- count of all open contact sensors
- </li>
- <li>
- <b><i>contactsOpen_hr</i></b><br>
- (human readable) list of all open contact sensors
- </li>
- <li>
- <b><i>contactsOutsideOpen</i></b><br>
- list of names of open contact sensors outside (sensor types: dooroutside,doormain,window)
- </li>
- <li>
- <b><i>contactsOutsideOpen_ct</i></b><br>
- count of open contact sensors outside (sensor types: dooroutside,doormain,window)
- </li>
- <li>
- <b><i>contactsOutsideOpen_hr</i></b><br>
- (human readable) list of open contact sensors outside (sensor types: dooroutside,doormain,window)
- </li>
- <li>
- <b><i>contactsWindowsOpen</i></b><br>
- list of names of open contact sensors of type window
- </li>
- <li>
- <b><i>contactsWindowsOpen_ct</i></b><br>
- count of open contact sensors of type window
- </li>
- <li>
- <b><i>contactsWindowsOpen_hr</i></b><br>
- (human readable) list of open contact sensors of type window
- </li>
- <li>
- <b><i>daytime</i></b><br>
- current daytime (as configured in HomeDaytimes) - independent from the mode of the HOMEMODE device<br>
- </li>
- <li>
- <b><i>dnd</i></b><br>
- dnd (do not disturb) on or off
- </li>
- <li>
- <b><i>devicesDisabled</i></b><br>
- comma separated list of disabled devices
- </li>
- <li>
- <b><i>energy</i></b><br>
- calculated total energy
- </li>
- <li>
- <b><i>event-<%CALENDAR%></i></b><br>
- current event of the (holiday) CALENDAR device(s)
- </li>
- <li>
- <b><i>humidty</i></b><br>
- current humidty of the Yahoo weather device or of your own sensor (if available)
- </li>
- <li>
- <b><i>humidtyTrend</i></b><br>
- trend of the humidty over the last hour<br>
- possible values: constant, rising, falling
- </li>
- <li>
- <b><i>icawarning</i></b><br>
- ice warning<br>
- values: 0 if off and 1 if on
- </li>
- <li>
- <b><i>lastAbsentByPresenceDevice</i></b><br>
- last presence device which went absent
- </li>
- <li>
- <b><i>lastAbsentByResident</i></b><br>
- last resident who went absent
- </li>
- <li>
- <b><i>lastActivityByPresenceDevice</i></b><br>
- last active presence device
- </li>
- <li>
- <b><i>lastActivityByResident</i></b><br>
- last active resident
- </li>
- <li>
- <b><i>lastAsleepByResident</i></b><br>
- last resident who went asleep
- </li>
- <li>
- <b><i>lastAwokenByResident</i></b><br>
- last resident who went awoken
- </li>
- <li>
- <b><i>lastBatteryLow</i></b><br>
- last sensor with low battery
- </li>
- <li>
- <b><i>lastCMDerror</i></b><br>
- last occured error and command(chain) while executing command(chain)
- </li>
- <li>
- <b><i>lastContact</i></b><br>
- last contact sensor which triggered open
- </li>
- <li>
- <b><i>lastContactClosed</i></b><br>
- last contact sensor which triggered closed
- </li>
- <li>
- <b><i>lastGoneByResident</i></b><br>
- last resident who went gone
- </li>
- <li>
- <b><i>lastGotosleepByResident</i></b><br>
- last resident who went gotosleep
- </li>
- <li>
- <b><i>lastInfo</i></b><br>
- last shown item on infopanel (HomeAdvancedDetails)
- </li>
- <li>
- <b><i>lastMotion</i></b><br>
- last sensor which triggered motion
- </li>
- <li>
- <b><i>lastMotionClosed</i></b><br>
- last sensor which triggered motion end
- </li>
- <li>
- <b><i>lastPresentByPresenceDevice</i></b><br>
- last presence device which came present
- </li>
- <li>
- <b><i>lastPresentByResident</i></b><br>
- last resident who came present
- </li>
- <li>
- <b><i>light</i></b><br>
- current light reading value
- </li>
- <li>
- <b><i>location</i></b><br>
- current location
- </li>
- <li>
- <b><i>luminance</i></b><br>
- average luminance of all motion sensors (if available)
- </li>
- <li>
- <b><i>luminanceTrend</i></b><br>
- trend of the luminance over the last hour<br>
- possible values: constant, rising, falling
- </li>
- <li>
- <b><i>mode</i></b><br>
- current mode
- </li>
- <li>
- <b><i>modeAlarm</i></b><br>
- current mode of alarm system
- </li>
- <li>
- <b><i>motionsInside</i></b><br>
- list of names of open motion sensors of type inside
- </li>
- <li>
- <b><i>motionsInside_ct</i></b><br>
- count of open motion sensors of type inside
- </li>
- <li>
- <b><i>motionsInside_hr</i></b><br>
- (human readable) list of open motion sensors of type inside
- </li>
- <li>
- <b><i>motionsOutside</i></b><br>
- list of names of open motion sensors of type outside
- </li>
- <li>
- <b><i>motionsOutside_ct</i></b><br>
- count of open motion sensors of type outside
- </li>
- <li>
- <b><i>motionsOutside_hr</i></b><br>
- (human readable) list of open motion sensors of type outside
- </li>
- <li>
- <b><i>motionsSensors</i></b><br>
- list of all names of open motion sensors
- </li>
- <li>
- <b><i>motionsSensors_ct</i></b><br>
- count of all open motion sensors
- </li>
- <li>
- <b><i>motionsSensors_hr</i></b><br>
- (human readable) list of all open motion sensors
- </li>
- <li>
- <b><i>power</i></b><br>
- calculated total power
- </li>
- <li>
- <b><i>prevMode</i></b><br>
- previous mode
- </li>
- <li>
- <b><i>presence</i></b><br>
- presence of any resident
- </li>
- <li>
- <b><i>pressure</i></b><br>
- current air pressure of the Yahoo weather device
- </li>
- <li>
- <b><i>prevActivityByResident</i></b><br>
- previous active resident
- </li>
- <li>
- <b><i>prevContact</i></b><br>
- previous contact sensor which triggered open
- </li>
- <li>
- <b><i>prevContactClosed</i></b><br>
- previous contact sensor which triggered closed
- </li>
- <li>
- <b><i>prevLocation</i></b><br>
- previous location
- </li>
- <li>
- <b><i>prevMode</i></b><br>
- previous mode
- </li>
- <li>
- <b><i>prevMotion</i></b><br>
- previous sensor which triggered motion
- </li>
- <li>
- <b><i>prevMotionClosed</i></b><br>
- previous sensor which triggered motion end
- </li>
- <li>
- <b><i>prevModeAlarm</i></b><br>
- previous alarm mode
- </li>
- <li>
- <b><i>publicIP</i></b><br>
- last checked public IP address
- </li>
- <li>
- <b><i>season</i></b><br>
- current season as configured in HomeSeasons<br>
- </li>
- <li>
- <b><i>sensorsTampered</i></b><br>
- list of names of tampered sensors
- </li>
- <li>
- <b><i>sensorsTampered_ct</i></b><br>
- count of tampered sensors
- </li>
- <li>
- <b><i>sensorsTampered_hr</i></b><br>
- (human readable) list of tampered sensors
- </li>
- <li>
- <b><i>state</i></b><br>
- current state
- </li>
- <li>
- <b><i>temperature</i></b><br>
- current temperature of the Yahoo weather device or of your own sensor (if available)
- </li>
- <li>
- <b><i>temperatureTrend</i></b><br>
- trend of the temperature over the last hour<br>
- possible values: constant, rising, falling
- </li>
- <li>
- <b><i>twilight</i></b><br>
- current twilight reading value
- </li>
- <li>
- <b><i>twilightEvent</i></b><br>
- current twilight event
- </li>
- <li>
- <b><i>uwz_warnCount</i></b><br>
- current UWZ warn count
- </li>
- <li>
- <b><i>wind</i></b><br>
- current wind speed of the Yahoo weather
- </li>
- </ul>
- <a name="HOMEMODE_placeholders"></a>
- <p><b>Placeholders</b></p>
- <p>These placeholders can be used in all HomeCMD attributes</p>
- <ul>
- <li>
- <b><i>%ADDRESS%</i></b><br>
- mac address of the last triggered presence device
- </li>
- <li>
- <b><i>%ALIAS%</i></b><br>
- alias of the last triggered resident
- </li>
- <li>
- <b><i>%ALARM%</i></b><br>
- value of the alarmTriggered reading of the HOMEMODE device<br>
- will return 0 if no alarm is triggered or a list of triggered sensors if alarm is triggered
- </li>
- <li>
- <b><i>%ALARMCT%</i></b><br>
- value of the alarmTriggered_ct reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%ALARMHR%</i></b><br>
- value of the alarmTriggered_hr reading of the HOMEMODE device<br>
- will return 0 if no alarm is triggered or a (human readable) list of triggered sensors if alarm is triggered<br>
- can be used for sending msg e.g.
- </li>
- <li>
- <b><i>%AMODE%</i></b><br>
- current alarm mode
- </li>
- <li>
- <b><i>%AEAH%</i></b><br>
- state of anyoneElseAtHome, will return 1 if on and 0 if off
- </li>
- <li>
- <b><i>%ARRIVERS%</i></b><br>
- will return a list of aliases of all registered residents/guests with location arrival<br>
- this can be used to welcome residents after main door open/close<br>
- e.g. Peter, Paul and Marry
- </li>
- <li>
- <b><i>%AUDIO%</i></b><br>
- audio device of the last triggered resident (attribute msgContactAudio)<br>
- if attribute msgContactAudio of the resident has no value the value is trying to be taken from device globalMsg (if available)<br>
- can be used to address resident specific msg(s) of type audio, e.g. night/morning wishes
- </li>
- <li>
- <b><i>%BE%</i></b><br>
- is or are of condition reading of monitored Yahoo weather device<br>
- can be used for weather (forecast) output
- </li>
- <li>
- <b><i>%BATTERYLOW%</i></b><br>
- alias (or name if alias is not set) of the last battery sensor which reported low battery
- </li>
- <li>
- <b><i>%BATTERYLOWALL%</i></b><br>
- list of aliases (or names if alias is not set) of all battery sensor which reported low battery currently
- </li>
- <li>
- <b><i>%BATTERYLOWCT%</i></b><br>
- number of battery sensors which reported low battery currently
- </li>
- <li>
- <b><i>%CONDITION%</i></b><br>
- value of the condition reading of monitored Yahoo weather device<br>
- can be used for weather (forecast) output
- </li>
- <li>
- <b><i>%CONTACT%</i></b><br>
- value of the lastContact reading (last opened sensor)
- </li>
- <li>
- <b><i>%DEFINED%</i></b><br>
- name of the previously defined device<br>
- can be used to trigger actions based on the name of the defined device<br>
- only available within HomeCMDfhemDEFINED
- </li>
- <li>
- <b><i>%DAYTIME%</i></b><br>
- value of the daytime reading of the HOMEMODE device<br>
- can be used to trigger day time specific actions
- </li>
- <li>
- <b><i>%DEVICE%</i></b><br>
- name of the last triggered presence device<br>
- can be used to trigger actions depending on the last present/absent presence device
- </li>
- <li>
- <b><i>%DEVICEA%</i></b><br>
- name of the last triggered absent presence device
- </li>
- <li>
- <b><i>%DEVICEP%</i></b><br>
- name of the last triggered present presence device
- </li>
- <li>
- <b><i>%DISABLED%</i></b><br>
- comma separated list of disabled devices
- </li>
- <li>
- <b><i>%DND%</i></b><br>
- state of dnd, will return 1 if on and 0 if off
- </li>
- <li>
- <b><i>%DURABSENCE%</i></b><br>
- value of the durTimerAbsence_cr reading of the last triggered resident
- </li>
- <li>
- <b><i>%DURABSENCELAST%</i></b><br>
- value of the lastDurAbsence_cr reading of the last triggered resident
- </li>
- <li>
- <b><i>%DURPRESENCE%</i></b><br>
- value of the durTimerPresence_cr reading of the last triggered resident
- </li>
- <li>
- <b><i>%DURPRESENCELAST%</i></b><br>
- value of the lastDurPresence_cr reading of the last triggered resident
- </li>
- <li>
- <b><i>%DURSLEEP%</i></b><br>
- value of the durTimerSleep_cr reading of the last triggered resident
- </li>
- <li>
- <b><i>%DURSLEEPLAST%</i></b><br>
- value of the lastDurSleep_cr reading of the last triggered resident
- </li>
- <li>
- <b><i>%<CALENDARNAME>%</i></b><br>
- will return the current event of the given calendar name, will return 0 if event is none<br>
- can be used to trigger actions on any event of the given calendar
- </li>
- <li>
- <b><i><%CALENDARNAME-EVENTNAME%></i></b><br>
- will return 1 if given event of given calendar is current, will return 0 if event is not current<br>
- can be used to trigger actions during specific events only (Christmas?)
- </li>
- <li>
- <b><i>%FORECAST%</i></b><br>
- will return the weather forecast for tomorrow<br>
- can be used in msg or tts
- </li>
- <li>
- <b><i>%FORECASTTODAY%</i></b><br>
- will return the weather forecast for today<br>
- can be used in msg or tts
- </li>
- <li>
- <b><i>%HUMIDITY%</i></b><br>
- value of the humidity reading of the HOMEMODE device<br>
- can be used for weather info in HomeTextWeather attributes e.g.
- </li>
- <li>
- <b><i>%HUMIDITYTREND%</i></b><br>
- value of the humidityTrend reading of the HOMEMODE device<br>
- possible values: constant, rising, falling
- </li>
- <li>
- <b><i>%ICE%</i></b><br>
- will return 1 if ice warning is on, will return 0 if ice warning is off<br>
- can be used to send ice warning specific msg(s) in specific situations, e.g. to warn leaving residents
- </li>
- <li>
- <b><i>%IP%</i></b><br>
- value of reading publicIP<br>
- can be used to send msg(s) with (new) IP address
- </li>
- <li>
- <b><i>%LIGHT%</i></b><br>
- value of the light reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%LOCATION%</i></b><br>
- value of the location reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%LOCATIONR%</i></b><br>
- value of the location reading of the last triggered resident
- </li>
- <li>
- <b><i>%LUMINANCE%</i></b><br>
- average luminance of motion sensors (if available)
- </li>
- <li>
- <b><i>%LUMINANCETREND%</i></b><br>
- value of the luminanceTrend reading of the HOMEMODE device<br>
- possible values: constant, rising, falling
- </li>
- <li>
- <b><i>%MODE%</i></b><br>
- current mode of the HOMEMODE device
- </li>
- <li>
- <b><i>%MODEALARM%</i></b><br>
- current alarm mode
- </li>
- <li>
- <b><i>%MOTION%</i></b><br>
- value of the lastMotion reading (last opened sensor)
- </li>
- <li>
- <b><i>%NAME%</i></b><br>
- name of the HOMEMODE device itself (same as %SELF%)
- </li>
- <li>
- <b><i>%OPEN%</i></b><br>
- value of the contactsOutsideOpen reading of the HOMEMODE device<br>
- can be used to send msg(s) in specific situations, e.g. to warn leaving residents of open contact sensors
- </li>
- <li>
- <b><i>%OPENCT%</i></b><br>
- value of the contactsOutsideOpen_ct reading of the HOMEMODE device<br>
- can be used to send msg(s) in specific situations depending on the number of open contact sensors, maybe in combination with placeholder %OPEN%
- </li>
- <li>
- <b><i>%OPENHR%</i></b><br>
- value of the contactsOutsideOpen_hr reading of the HOMEMODE device<br>
- can be used to send msg(s)
- </li>
- <li>
- <b><i>%PANIC%</i></b><br>
- state of panic, will return 1 if on and 0 if off
- </li>
- <li>
- <b><i>%RESIDENT%</i></b><br>
- name of the last triggered resident
- </li>
- <li>
- <b><i>%PRESENT%</i></b><br>
- presence of the HOMEMODE device<br>
- will return 1 if present or 0 if absent
- </li>
- <li>
- <b><i>%PRESENTR%</i></b><br>
- presence of last triggered resident<br>
- will return 1 if present or 0 if absent
- </li>
- <li>
- <b><i>%PRESSURE%</i></b><br>
- value of the pressure reading of the HOMEMODE device<br>
- can be used for weather info in HomeTextWeather attributes e.g.
- </li>
- <li>
- <b><i>%PRESSURETREND%</i></b><br>
- value of the pressureTrend reading of the Yahoo weather device<br>
- can be used for weather info in HomeTextWeather attributes e.g.
- </li>
- <li>
- <b><i>%PREVAMODE%</i></b><br>
- previous alarm mode of the HOMEMODE device
- </li>
- <li>
- <b><i>%PREVCONTACT%</i></b><br>
- previous open contact sensor
- </li>
- <li>
- <b><i>%PREVMODE%</i></b><br>
- previous mode of the HOMEMODE device
- </li>
- <li>
- <b><i>%PREVMODER%</i></b><br>
- previous state of last triggered resident
- </li>
- <li>
- <b><i>%PREVMOTION%</i></b><br>
- previous open motion sensor
- </li>
- <li>
- <b><i>%SEASON%</i></b><br>
- value of the season reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%SELF%</i></b><br>
- name of the HOMEMODE device itself (same as %NAME%)
- </li>
- <li>
- <b><i>%SENSORSBATTERY%</i></b><br>
- all battery sensors from internal SENSORSBATTERY
- </li>
- <li>
- <b><i>%SENSORSCONTACT%</i></b><br>
- all contact sensors from internal SENSORSCONTACT
- </li>
- <li>
- <b><i>%SENSORSENERGY%</i></b><br>
- all energy sensors from internal SENSORSENERGY
- </li>
- <li>
- <b><i>%SENSORSMOTION%</i></b><br>
- all motion sensors from internal SENSORSMOTION
- </li>
- <li>
- <b><i>%SENSORSSMOKE%</i></b><br>
- all smoke sensors from internal SENSORSSMOKE
- </li>
- <li>
- <b><i>%SMOKE%</i></b><br>
- value of the alarmSmoke reading of the HOMEMODE device<br>
- will return 0 if no smoke alarm is triggered or a list of triggered sensors if smoke alarm is triggered
- </li>
- <li>
- <b><i>%SMOKECT%</i></b><br>
- value of the alarmSmoke_ct reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%SMOKEHR%</i></b><br>
- value of the alarmSmoke_hr reading of the HOMEMODE device<br>
- will return 0 if no smoke alarm is triggered or a (human readable) list of triggered sensors if smoke alarm is triggered<br>
- can be used for sending msg e.g.
- </li>
- <li>
- <b><i>%TAMPERED%</i></b><br>
- value of the sensorsTampered reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%TAMPEREDCT%</i></b><br>
- value of the sensorsTampered_ct reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%TAMPEREDHR%</i></b><br>
- value of the sensorsTampered_hr reading of the HOMEMODE device<br>
- can be used for sending msg e.g.
- </li>
- <li>
- <b><i>%TEMPERATURE%</i></b><br>
- value of the temperature reading of the HOMEMODE device<br>
- can be used for weather info in HomeTextWeather attributes e.g.
- </li>
- <li>
- <b><i>%TEMPERATURETREND%</i></b><br>
- value of the temperatureTrend reading of the HOMEMODE device<br>
- possible values: constant, rising, falling
- </li>
- <li>
- <b><i>%TWILIGHT%</i></b><br>
- value of the twilight reading of the HOMEMODE device
- </li>
- <li>
- <b><i>%TWILIGHTEVENT%</i></b><br>
- current twilight event
- </li>
- <li>
- <b><i>%TOBE%</i></b><br>
- are or is of the weather condition<br>
- useful for phrasing sentens
- </li>
- <li>
- <b><i>%UWZ%</i></b><br>
- UWZ warnings count
- </li>
- <li>
- <b><i>%UWZLONG%</i></b><br>
- all current UWZ warnings as long text
- </li>
- <li>
- <b><i>%UWZSHORT%</i></b><br>
- all current UWZ warnings as short text
- </li>
- <li>
- <b><i>%WEATHER%</i></b><br>
- value of "get <HOMEMODE> weather short"<br>
- can be used for for msg weather info e.g.
- </li>
- <li>
- <b><i>%WEATHERLONG%</i></b><br>
- value of "get <HOMEMODE> weather long"<br>
- can be used for for msg weather info e.g.
- </li>
- <li>
- <b><i>%WIND%</i></b><br>
- value of the wind reading of the HOMEMODE device<br>
- can be used for weather info in HomeTextWeather attributes e.g.
- </li>
- <li>
- <b><i>%WINDCHILL%</i></b><br>
- value of the wind_chill reading of the Yahoo weather device<br>
- can be used for weather info in HomeTextWeather attributes e.g.
- </li>
- </ul>
- <p>These placeholders can only be used within HomeTextWeatherForecast attributes</p>
- <ul>
- <li>
- <b><i>%CONDITION%</i></b><br>
- value of weather forecast condition
- </li>
- <li>
- <b><i>%DAY%</i></b><br>
- day number of weather forecast
- </li>
- <li>
- <b><i>%HIGH%</i></b><br>
- value of maximum weather forecast temperature
- </li>
- <li>
- <b><i>%LOW%</i></b><br>
- value of minimum weather forecast temperature
- </li>
- </ul>
- <p>These placeholders can only be used within HomeCMDcontact, HomeCMDmotion and HomeCMDalarm attributes</p>
- <ul>
- <li>
- <b><i>%ALIAS%</i></b><br>
- alias of the last triggered contact/motion/smoke sensor
- </li>
- <li>
- <b><i>%SENSOR%</i></b><br>
- name of the last triggered contact/motion/smoke sensor
- </li>
- <li>
- <b><i>%STATE%</i></b><br>
- state of the last triggered contact/motion/smoke sensor
- </li>
- </ul>
- <p>These placeholders can only be used within calendar event related HomeCMDevent attributes</p>
- <ul>
- <li>
- <b><i>%CALENDAR%</i></b><br>
- name of the calendar
- </li>
- <li>
- <b><i>%DESCRIPTION%</i></b><br>
- description of current event of the calendar (not applicable for holiday devices)
- </li>
- <li>
- <b><i>%EVENT%</i></b><br>
- summary of current event of the calendar
- </li>
- <li>
- <b><i>%PREVEVENT%</i></b><br>
- summary of previous event of the calendar
- </li>
- </ul>
- <p>These placeholders can only be used within HomeCMDdeviceDisable and HomeCMDdeviceEnable attributes</p>
- <ul>
- <li>
- <b><i>%DEVICE%</i></b><br>
- name of the disabled/enabled device
- </li>
- <li>
- <b><i>%ALIAS%</i></b><br>
- alias of the disabled/enabled device
- </li>
- </ul>
- </ul>
- <p> <p>
- <a name="HP1000" id="HP1000"></a>
- </p>
- <h3>
- HP1000
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HP1000'>DE</a>]</div>
- <ul>
- <div>
- <a name="HP1000define" id="HP10000define"></a> <b>Define</b>
- <div>
- <ul>
- <code>define <WeatherStation> HP1000 [<ID> <PASSWORD>]</code><br>
- <br>
- 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>
- There needs to be a dedicated FHEMWEB instance with attribute webname set to "weatherstation".<br>
- No other name will work as it's hardcoded in the weather station device itself!<br>
- If necessary, this module will create a matching FHEMWEB instance named WEBweatherstation during initial definition.<br>
- <br>
- As the URI has a fixed coding as well there can only be one single instance of this module FHEM installation.<br>
- <br>
- Example:<br>
- <div>
- <code># unprotected instance where ID and PASSWORD will be ignored<br>
- define WeatherStation HP1000<br>
- <br>
- # protected instance: Weather Station needs to be configured<br>
- # to send this ID and PASSWORD for data to be accepted<br>
- define WeatherStation HP1000 MyHouse SecretPassword</code>
- </div><br>
- IMPORTANT: In your hardware device, make sure you use a DNS name as most revisions cannot handle IP addresses correctly.<br>
- You might want to check to install a firmware update from <a href="http://www.foshk.com/support/">here</a>.
- </ul>
- </div><br>
- </div>
- <br>
- <a name="HP1000Attr" id="HP10000Attr"></a> <b>Attributes</b>
- <div>
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <a name="wu_id"></a><li><b>wu_id</b></li>
- Weather Underground (Wunderground) station ID
- <a name="wu_password"></a><li><b>wu_password</b></li>
- Weather Underground (Wunderground) password
- <a name="wu_dataValues"></a><li><b>wu_dataValues</b></li>
- Add or replace values before pushing data to Weather Underground.<br>
- Format is key=value while value may be of <a href="#set">set magic format</a>
- <a name="wu_indoorValues"></a><li><b>wu_indoorValues</b></li>
- Include indoor values for Weather Underground (defaults to 1=yes)
- <a name="wu_push"></a><li><b>wu_push</b></li>
- Enable or disable to push data forward to Weather Underground (defaults to 0=no)
- <a name="wu_pushValues"></a><li><b>wu_pushValues</b></li>
- Restrict values to be transferred to Weather Underground,
- otherwise all values will be transferred.
- <a name="wu_realtime"></a><li><b>wu_realtime</b></li>
- Send the data to the WU realtime server instead of using the standard server (defaults to 1=yes)
- </ul>
- </div>
- </ul>
- <p><a name="HTTPMOD"></a>
- <h3>HTTPMOD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HTTPMOD'>DE</a>]</div>
- <ul>
- 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.
- It queries a given URL with Headers and data defined by attributes. <br>
- From the HTTP Response it extracts Readings named in attributes using Regexes, JSON or XPath also defined by attributes. <br>
- To send information to a device, set commands can be configured using attributes.
- <br><br>
- <b>Prerequisites</b>
- <ul>
- <br>
- <li>
- This Module uses the non blocking HTTP function HttpUtils_NonblockingGet provided by FHEM's HttpUtils in a new Version published in December 2013.<br>
- If not already installed in your environment, please update FHEM or install it manually using appropriate commands from your environment.<br>
- 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.
- </li>
-
- </ul>
- <br>
- <a name="HTTPMODdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> HTTPMOD <URL> <Interval></code>
- <br><br>
- The module connects to the given URL every Interval seconds, sends optional headers
- and data and then parses the response.<br>
- 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>
- <br>
- Example:<br>
- <br>
- <ul><code>define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60</code></ul>
- </ul>
- <br>
- <a name="HTTPMODconfiguration"></a>
- <b>Simple configuration of HTTP Devices</b><br><br>
- <ul>
- In a simple configuration you don't need to define get or set commands. One common HTTP request is automatically sent in the
- interval specified in the define command and to the URL specified in the define command.<br>
- Optional HTTP headers can be specified as <code>attr requestHeader1</code> to <code>attr requestHeaderX</code>, <br>
- optional POST data as <code>attr requestData</code> and then
- pairs of <code>attr readingXName</code> and <code>attr readingXRegex</code>,
- <code>attr readingXXPath</code>, <code>attr readingXXPath-Strict</code> or <code>attr readingXJSON</code>
- to define how values are parsed from the HTTP response and in which readings they are stored. <br>
- (The old syntax <code>attr readingsNameX</code> and <code>attr readingsRegexX</code> is still supported
- but it can go away in a future version of HTTPMOD so the new one with <code>attr readingXName</code>
- and <code>attr readingXRegex</code> should be preferred.
- <br><br>
- Example for a PoolManager 5:<br><br>
- <ul><code>
- define PM HTTPMOD http://MyPoolManager/cgi-bin/webgui.fcgi 60<br>
- attr PM reading01Name PH<br>
- attr PM reading01Regex 34.4001.value":[ \t]+"([\d\.]+)"<br>
- <br>
- attr PM reading02Name CL<br>
- attr PM reading02Regex 34.4008.value":[ \t]+"([\d\.]+)"<br>
- <br>
- attr PM reading03Name3TEMP<br>
- attr PM reading03Regex 34.4033.value":[ \t]+"([\d\.]+)"<br>
- <br>
- attr PM requestData {"get" :["34.4001.value" ,"34.4008.value" ,"34.4033.value", "14.16601.value", "14.16602.value"]}<br>
- attr PM requestHeader1 Content-Type: application/json<br>
- attr PM requestHeader2 Accept: */*<br>
- <br>
- 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>
- </code></ul>
- <br>
- The regular expressions used will take the value that matches a capture group. This is the part of the regular expression inside ().
- In the above example "([\d\.]+)" refers to numerical digits or points between double quotation marks. Only the string consiting of digits and points
- will match inside (). This piece is assigned to the reading.
-
- You can also use regular expressions that have several capture groups which might be helpful when parsing tables. In this case an attribute like
- <code><ul>
- reading02Regex something[ \t]+([\d\.]+)[ \t]+([\d\.]+)
- </code></ul>
- could match two numbers. When you specify only one reading02Name like
- <code><ul>
- reading02Name Temp
- </code></ul>
- 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.
- You can also specify individual names for several readings that get parsed from one regular expression with several capture groups by
- defining attributes
- <code><ul>
- reading02-1Name<br>
- reading02-2Name
- ...
- </code></ul>
- The same notation can be used for formatting attributes like readingXOMap, readingXFormat and so on.<br>
- <br>
- 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.
- <br>
- </ul>
- <br>
- <a name="HTTPMODformat"></a>
- <b>formating and manipulating values / readings</b><br><br>
- <ul>
- Values that are parsed from an HTTP response can be further treated or formatted with the following attributes:<br>
- <ul><code>
- (reading|get)[0-9]*(-[0-9]+)?OExpr<br>
- (reading|get)[0-9]*(-[0-9]+)?OMap<br>
- (reading|get)[0-9]*(-[0-9]+)?Format<br>
- (reading|get)[0-9]*(-[0-9]+)?Decode<br>
- (reading|get)[0-9]*(-[0-9]+)?Encode
- </code></ul>
- 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)
- or for all readings in a get command (defined by getXX) or for all readings in the main reading list (defined by readingXX):
- <ul><code>
- reading01Format %.1f
- </code></ul>
- will format the reading with the name specified by the attribute reading01Name to be numerical with one digit after the decimal point. <br>
- If the attribute reading01Regex is used and contains several capture groups then the format will be applied to all readings thet are parsed
- by this regex unless these readings have their own format specified by reading01-1Format, reading01-2Format and so on.
- <br>
- <ul><code>
- reading01-2Format %.1f
- </code></ul>
- Can be used in cases where a regular expression specified as reading1regex contains several capture groups or an xpath specified
- as reading01XPath creates several readings.
- In this case reading01-2Format specifies the format to be applied to the second match.
- <br>
- <ul><code>
- readingFormat %.1f
- </code></ul>
- applies to all readings defined by a reading-Attribute that have no more specific format.
- <br>
- <br>
- 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>
- 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>
- Example:<br>
- <ul><code>
- attr PM reading03OExpr $val * 10<br>
- </code></ul>
- Just like in the above example of the readingFormat attributes, readingOExpr and the other following attributes
- can be applied on several levels.
- <br>
- <br>
- To map a raw numerical value to a name, you can use the readingOMap attribute.
- It defines a mapping from raw values read from the device to visible values like "0:mittig, 1:oberhalb, 2:unterhalb". <br>
- Example:<br>
- <ul><code>
- attr PM reading02-3OMap 0:kalt, 1:warm, 2:sehr warm
- </code></ul>
- <br>
- 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>
-
- To convert character sets, the module can first decode a string read from the device and then encode it again. For example:
- <ul><code>
- attr PM getDecode UTF-8
- </code></ul>
- This applies to all readings defined for Get-Commands.
-
- </ul>
- <br>
- <a name="HTTPMODsetconfiguration"></a>
- <b>Configuration to define a <code>set</code> command and send data to a device</b><br><br>
- <ul>
- When a set option is defined by attributes, the module will use the value given to the set command
- and translate it into an HTTP-Request that sends the value to the device. <br>
- HTTPMOD has a built in replacement that replaces $val in URLs, headers or Post data with the value passed in the set command.<br>
- This value is internally stored in the internal "value" ($hash->{value}) so it can also be used in a user defined replacement.
- <br>
- Extension to the above example for a PoolManager 5:<br><br>
- <ul><code>
- attr PM set01Name HeizungSoll <br>
- attr PM set01URL http://MyPoolManager/cgi-bin/webgui.fcgi?sid=$sid <br>
- attr PM set01Hint 6,10,20,30 <br>
- attr PM set01Min 6 <br>
- attr PM set01Max 30 <br>
- attr PM setHeader1 Content-Type: application/json <br>
- attr PM set01Data {"set" :{"34.3118.value" :"$val" }} <br>
- </code></ul>
- <br>
- This example defines a set option with the name HeizungSoll. <br>
- By issuing <code>set PM HeizungSoll 10</code> in FHEM, the value 10 will be sent in the defined HTTP
- Post to URL <code>http://MyPoolManager/cgi-bin/webgui.fcgi</code> and with Post Data as <br>
- <code>{"set" :{"34.3118.value" :"10" }}</code><br>
- The optional attributes set01Min and set01Max define input validations that will be checked in the set function.<br>
- 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>
- <br>
- The HTTP response to such a request will be ignored unless you specify the attribute <code>setParseResponse</code>
- for all set commands or <code>set01ParseResponse</code> for the set command with number 01.<br>
- 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
- Format, Encode, Decode, OMap and OExpr to manipulate / format the values read.
- <br>
- 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:
- <ul><code>
- attr PM set01TextArg
- </code></ul>
- If a set command should not require a parameter at all, then you can specify the attribute NoArg. For example:
- <ul><code>
- attr PM set03Name On
- attr PM set03NoArg
- </code></ul>
- <br>
-
- </ul>
- <br>
- <a name="HTTPMODgetconfiguration"></a>
- <b>Configuration to define a <code>get</code> command</b><br><br>
- <ul>
-
- When a get option is defined by attributes, the module allows querying additional values from the device that require
- individual HTTP-Requests or special parameters to be sent<br><br>
- Extension to the above example:<br><br>
- <ul><code>
- attr PM get01Name MyGetValue <br>
- attr PM get01URL http://MyPoolManager/cgi-bin/directory/webgui.fcgi?special=1?sid=$sid <br>
- attr PM getHeader1 Content-Type: application/json <br>
- attr PM get01Data {"get" :{"30.1234.value"}} <br>
- </code></ul>
- <br>
- This example defines a get option with the name MyGetValue. <br>
- By issuing <code>get PM MyGetValue</code> in FHEM, the defined HTTP request is sent to the device.<br>
- The HTTP response is then parsed using the same readingXXName and readingXXRegex attributes as above so
- additional pairs will probably be needed there for additional values.<br><br>
-
- If the new get parameter should also be queried regularly, you can define the following optional attributes:<br>
- <ul><code>
- attr PM get01Poll 1<br>
- attr PM get01PollDelay 300<br>
- </code></ul>
- <br>
- The first attribute includes this reading in the automatic update cycle and the second defines an
- alternative lower update frequency. When the interval defined initially in the define is over and the normal readings
- are read from the device, the update function will check for additional get parameters that should be included
- in the update cycle.
- 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
- is more than the given PollDelay. If not, this reading is skipped and it will be rechecked in the next cycle when
- interval is over again. So the effective PollDelay will always be a multiple of the interval specified in the initial define.<br>
- <br>
- 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.
-
- </ul>
- <br>
- <a name="HTTPMODsessionconfiguration"></a>
- <b>Handling sessions and logging in</b><br><br>
- <ul>
- In simple cases logging in works with basic authentication. In the case HTTPMOD accepts a username and password as part of the URL
- in the form http://User:Password@192.168.1.18/something<br>
- 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,
- here is how to configure this:
-
- when sending data to an HTTP-Device in a set, HTTPMOD will replace any <code>$sid</code> in the URL, Headers and Post data
- with the internal <code>$hash->{sid}</code>.
- To authenticate towards the device and give this internal a value, you can use an optional multi step login procedure
- defined by the following attributes: <br>
- <ul>
- <li>sid[0-9]*URL</li>
- <li>sid[0-9]*Data.*</li>
- <li>sid[0-9]*Header.*</li>
- <li>idRegex</li>
- <li>idJSON</li>
- <li>idXPath</li>
- <li>idXPath-Strict</li>
- <li>(get|set|sid)[0-9]*IdRegex</li>
- <li>(get|set|sid)[0-9]*IdJSON</li>
- <li>(get|set|sid)[0-9]*IdXPath</li>
- <li>(get|set|sid)[0-9]*IdXPath-Strict</li>
- </ul><br>
- 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>
- An extracted session Id will be stored in the internal <code>$hash->{sid}</code>.<br>
- HTTPMOD will create a sorted list of steps (the numbers between sid and URL / Data / Header)
- and the loop through these steps and send the corresponding requests to the device.
- For each step a $sid in a Header or Post Data will be replaced with the current content of <code>$hash->{sid}</code>. <br>
- 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>
- If for one step not all of the URL, Data or Header Attributes are set, then HTTPMOD tries to use a
- <code>sidURL</code>, <code>sidData.*</code> or <code>sidHeader.*</code> Attribue (without the step number after sid).
- This way parts that are the same for all steps don't need to be defined redundantly. <br>
- <br>
- To determine when this login procedure is necessary, HTTPMOD will first try to send a request without
- doing the login procedure. If the result contains an error that authentication is necessary, then a login is performed.
- To detect such an error in the HTTP response, you can again use a regular expression, JSON or XPath, this time with the attributes
- <ul>
- <li>reAuthRegex</li>
- <li>reAuthJSON</li>
- <li>reAuthXPath</li>
- <li>reAuthXPath-Strict</li>
- <li>[gs]et[0-9]*ReAuthRegex</li>
- <li>[gs]et[0-9]*ReAuthJSON</li>
- <li>[gs]et[0-9]*ReAuthXPath</li>
- <li>[gs]et[0-9]*ReAuthXPath-Strict</li>
- </ul>
- <br>
- reAuthJSON or reAuthXPath typically only extract one piece of data from a response.
- 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.
- 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,
- 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).
- 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>
- <br>
- Example for a multi step login procedure:
- <br><br>
- <ul><code>
- attr PM reAuthRegex /html/dummy_login.htm
- attr PM sidURL http://192.168.70.90/cgi-bin/webgui.fcgi?sid=$sid<br>
- attr PM sidHeader1 Content-Type: application/json<br>
- attr PM sid1IdRegex wui.init\('([^']+)'<br>
- attr PM sid2Data {"set" :{"9.17401.user" :"fhem" ,"9.17401.pass" :"password" }}<br>
- attr PM sid3Data {"set" :{"35.5062.value" :"128" }}<br>
- attr PM sid4Data {"set" :{"42.8026.code" :"pincode" }}<br>
- </ul></code>
- In this case HTTPMOD detects that a login is necessary by looking for the pattern /html/dummy_login.htm in the HTTP response.
- 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
- is sent in an HTTP get request. The response will contain a session id that is extraced with the regex wui.init\('([^']+)'.
- 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.
- 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>
- <br>
- 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>
- For such cases no sidIdRegex and no $sid in a user defined header is necessary.
-
- </ul>
- <br>
- <a name="HTTPMODjsonconfiguration"></a>
- <b>Parsing JSON</b><br><br>
- <ul>
- 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>
- The next example shows the data that can be requested from a Poolmanager with the following partial configuration:
- <ul><code>
- define test2 HTTPMOD none 0<br>
- attr test2 get01Name Chlor<br>
- attr test2 getURL http://192.168.70.90/cgi-bin/webgui.fcgi<br>
- attr test2 getHeader1 Content-Type: application/json<br>
- attr test2 getHeader2 Accept: */*<br>
- attr test2 getData {"get" :["34.4008.value"]}<br>
- </ul></code>
- The data in the HTTP response looks like this:
-
- <ul><pre>
- {
- "data": {
- "34.4008.value": "0.25"
- },
- "status": {
- "code": 0
- },
- "event": {
- "type": 1,
- "data": "48.30000.0"
- }
- }
- </ul></pre>
- the classic way to extract the value 0.25 into a reading with the name Chlor with a regex would have been
- <ul><code>
- attr test2 get01Regex 34.4008.value":[ \t]+"([\d\.]+)"
- </ul></code>
-
- with JSON you can write
- <ul><code>
- attr test2 get01JSON data_34.4008.value
- </code></ul>
- 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
- <ul><code>
- "modes":["Off","SimpleColor","RainbowChase","BobblySquares","Blobs","CuriousCat","Adalight","UDP","DMX"],
- </code></ul>
- a Configuration could be
- <ul><code>
- attr test2 get01Name ModesList
- attr test2 get01JSON modes
- </code></ul>
-
- The result will be treated as a list just like a list of XPath matches or Regex matches.
- So it will create readings ModlesList-1 ModesList-2 and so on as described above (simple Comfiguration).<br>
- You can also define a recombineExpr to recombine the match list into one reading e.g. as
- <ul><code>
- attr test2 reading01RecombineExpr join ",", @matchlist
- </code></ul>
-
- If you don't care about the naming of your readings, you can simply extract all JSON data with
- <ul><code>
- attr test2 extractAllJSON
- </ul></code>
- which would apply to all data read from this device and create the following readings out of the HTTP response shown above:<br>
-
- <ul><code>
- data_34.4008.value 0.25 <br>
- event_data 48.30000.0 <br>
- event_type 1 <br>
- status_code 0 <br>
- </ul></code>
-
- or you can specify
- <ul><code>
- attr test2 get01ExtractAllJSON
- </ul></code>
- which would only apply to all data read as response to the get command defined as get01.
- </ul>
- <br>
- <a name="HTTPMODxpathconfiguration"></a>
- <b>Parsing http / XML using xpath</b><br><br>
- <ul>
-
- Another alternative to regex parsing is the use of XPath to extract values from HTTP responses.<br>
- The following example shows how XML data can be parsed with XPath-Strict or HTML Data can be parsed with XPath. <br>
- Both work similar and the example uses XML Data parsed with the XPath-Strict option:
- If The XML data in the HTTP response looks like this:
-
- <ul><code>
- <root xmlns:foo="http://www.foo.org/" xmlns:bar="http://www.bar.org"><br>
- <actors><br>
- <actor id="1">Peter X</actor><br>
- <actor id="2">Charles Y</actor><br>
- <actor id="3">John Doe</actor><br>
- </actors><br>
- </root>
- </ul></code>
-
- with XPath you can write
- <ul><code>
- attr htest reading01Name Actor<br>
- attr htest reading01XPath-Strict //actor[2]/text()
- </ul></code>
- This will create a reading with the Name "Actor" and the value "Charles Y".<br>
- <br>
- Since XPath specifications can define several values / matches, HTTPMOD can also interpret these and store them in
- multiple readings:
- <ul><code>
- attr htest reading01Name Actor<br>
- attr htest reading01XPath-Strict //actor/text()
- </ul></code>
- will create the readings
- <ul><code>
- Actor-1 Peter X<br>
- Actor-2 Charles Y<br>
- Actor-3 John Doe
- </ul></code>
- </ul>
- <br>
- <a name="HTTPMODreplacements"></a>
- <b>Further replacements of URL, header or post data</b><br><br>
- <ul>
- 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>
- 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>
- 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>
- 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.
-
- 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>
- To support this HTTPMOD offers user defined replacements that are as well applied to a request before it is sent to the server.
- A replacement can be defined with the attributes
- <ul><code>
- "replacement[0-9]*Regex "<br>
- "replacement[0-9]*Mode "<br>
- "replacement[0-9]*Value "<br>
- "[gs]et[0-9]*Replacement[0-9]*Value "
- </ul></code>
- <br>
- A replacement always replaces a match of a regular expression.
- The way the replacement value is defined can be specified with the replacement mode. If the mode is <code>reading</code>,
- then the value is interpreted as the name of a reading of the same device or as device:reading to refer to another device.
- 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>
- 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>
- 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>
- <br>
- Example:
- <ul><code>
- attr mydevice getData {"get" :["%%value%%.value"]} <br>
- attr mydevice replacement01Mode text <br>
- attr mydevice replacement01Regex %%value%% <br>
- <br>
- attr mydevice get01Name Chlor <br>
- attr mydevice get01Replacement01Value 34.4008 <br>
- <br>
- attr mydevice get02Name Something<br>
- attr mydevice get02Replacement01Value 31.4024 <br>
- <br>
- attr mydevice get05Name profile <br>
- attr mydevice get05URL http://www.mydevice.local/getprofile?password=%%password%% <br>
- attr mydevice replacement02Mode key <br>
- attr mydevice replacement02Regex %%password%% <br>
- attr mydevice get05Replacement02Value password <br>
- </ul></code>
- defines that %%value%% will be replaced by a static text.<br>
- All Get commands will be HTTP post requests of a similar form. Only the %%value%% will be different from get to get.<br>
- 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>
- A second get will look the same except a different name and replacement value. <br>
- 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>
- <br>
- HTTPMOD has two built in replacements: One for session Ids and another one for the input value in a set command.
- 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:
- <ul><code>
- attr mydevice replacement01Mode internal<br>
- attr mydevice replacement01Regex %session% <br>
- attr mydevice replacement01Value sid<br>
- </ul></code>
- Now the internal <code>$hash->{sid}</code> will be used as a replacement for the placeholder %session%.<br>
- <br>
- 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.
- <br>
- The mode expression allows you to define your own replacement syntax:
- <ul><code>
- attr mydevice replacement01Mode expression <br>
- attr mydevice replacement01Regex {{([^}]+)}}<br>
- attr mydevice replacement01Value ReadingsVal("mydevice", $1, "")<br>
- attr mydevice getData {"get" :["{{temp}}.value"]}
- </ul></code>
- In this example any {{name}} in a URL, header or post data will be passed on to the perl function ReadingsVal
- which uses the string between {{}} as second parameter. This way one defined replacement can be used for many different
- readings.
-
- </ul>
- <br>
- <a name="HTTPMODaging"></a>
- <b>replacing reading values when they have not been updated / the device did not respond</b><br><br>
- <ul>
- 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.
- If you want to modify reading values that have not been updated for a number of seconds, you can use the attributes
- <ul><code>
- (reading|get)[0-9]*(-[0-9]+)?MaxAge<br>
- (reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacementMode<br>
- (reading|get)[0-9]*(-[0-9]+)?MaxAgeReplacement<br>
- </ul></code>
- Every time the module tries to read from a device, it will also check if readings have not been updated
- for longer than the MaxAge attributes allow. If readings are outdated, the MaxAgeReplacementMode defines how the affected
- reading values should be replaced. MaxAgeReplacementMode can be <code>text</code>, <code>expression</code> or <code>delete</code>. <br>
- MaxAge specifies the number of seconds that a reading should remain untouched before it is replaced. <br>
- MaxAgeReplacement contains either a static text that is used as replacement value or a Perl expression that is evaluated to
- give the replacement value. This can be used for example to replace a temperature that has not bee updated for more than 5 minutes
- with the string "outdated - was 12":
- <ul><code>
- attr PM readingMaxAge 300<br>
- attr PM readingMaxAgeReplacement "outdated - was " . $val <br>
- attr PM readingMaxAgeReplacementMode expression
- </ul></code>
- The variable $val contains the value of the reading before it became outdated.<br>
- If the mode is delete then the reading will be deleted if it has not been updated for the defined time.<br>
- 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.
- </ul>
- <br>
-
- <a name="HTTPMODset"></a>
- <b>Set-Commands</b><br>
- <ul>
- As defined by the attributes set.*Name<br>
- If you set the attribute enableControlSet to 1, the following additional built in set commands are available:<br>
- <ul>
- <li><b>interval</b></li>
- set new interval time in seconds and restart the timer<br>
- <li><b>reread</b></li>
- request the defined URL and try to parse it just like the automatic update would do it every Interval seconds
- without modifying the running timer. <br>
- <li><b>stop</b></li>
- stop interval timer.<br>
- <li><b>start</b></li>
- restart interval timer to call GetUpdate after interval seconds<br>
- <li><b>upgradeAttributes</b></li>
- convert the attributes for this device from the old syntax to the new one.<br>
- 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.
- <li><b>storeKeyValue</b></li>
- stores a key value pair in an obfuscated form in the file system. Such values can then be used in replacements where
- the mode is "key" e.g. to avoid storing passwords in the configuration in clear text<br>
- </ul>
- <br>
- </ul>
- <br>
- <a name="HTTPMODget"></a>
- <b>Get-Commands</b><br>
- <ul>
- as defined by the attributes get.*Name
- </ul>
-
-
-
- <br>
- <a name="HTTPMODattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
-
- <li><b>reading[0-9]+Name</b></li>
- the name of a reading to extract with the corresponding readingRegex, readingJSON, readingXPath or readingXPath-Strict<br>
- 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.
- <li><b>(get|set)[0-9]+Name</b></li>
- 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.
-
- <li><b>(get|set|reading)[0-9]+Regex</b></li>
- If this attribute is specified, the Regex defined here is used to extract the value from the HTTP Response
- and assign it to a Reading with the name defined in the (get|set|reading)[0-9]+Name attribute.<br>
- 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>
- The value to extract should be in a capture group / sub expression e.g. ([\d\.]+) in the above example.
- Multiple capture groups will create multiple readings (see explanation above)<br>
- 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>
- 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.
- 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.
- <li><b>(get|set|reading)[0-9]+RegOpt</b></li>
- 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,
- then you can specify RegOpt g which will case the matching to be done as /regex/g<br>
- The results will be trated the same way as multiple capture groups so the reading name will be extended with -number.
- For other possible regular expression modifiers see http://perldoc.perl.org/perlre.html#Modifiers
- <li><b>(get|set|reading)[0-9]+XPath</b></li>
- defines an xpath to one or more values when parsing HTML data (see examples above)<br>
- 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>
- <li><b>get|set|reading[0-9]+XPath-Strict</b></li>
- defines an xpath to one or more values when parsing XML data (see examples above)<br>
- 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>
- <li><b>(get|set|reading)[0-9]+AutoNumLen</b></li>
- 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
- 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.
- <li><b>(reading|get|set)[0-9]*AlwaysNum</b></li>
- 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.
- <li><b>get|set|reading[0-9]+JSON</b></li>
- defines a path to the JSON object wanted by concatenating the object names. See the above example.<br>
- 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>
- Please don't forget to also specify a name for a reading, get or set.
- 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>
- <li><b>(get|set|reading)[0-9]*RecombineExpr</b></li>
- defines an expression that is used in an eval to compute one reading value out of the list of matches. <br>
- 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>
- 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>
- <li><b>get[0-9]*CheckAllReadings</b></li>
- this attribute modifies the behavior of HTTPMOD when the HTTP Response of a get command is parsed. <br>
- If this attribute is set to 1, then additionally to the matching of get specific regexe (get[0-9]*Regex), XPath or JSON
- 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>
- This is automatically done if a get or set command is defined without its own parse attributes.
- <br>
-
- <li><b>(get|reading)[0-9]*OExpr</b></li>
- defines an optional expression that is used in an eval to compute / format a readings value after parsing an HTTP response<br>
- The raw value from the parsing will be in the variable $val.<br>
- 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>
- 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.
- <li><b>(get|reading)[0-9]*Expr</b></li>
- 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.
- <li><b>(get|reading)[0-9]*OMap</b></li>
- Map that defines a mapping from raw value parsed to visible values like "0:mittig, 1:oberhalb, 2:unterhalb". <br>
- If specified as readingOMap then the attribute value is a default for all other readings that don't specify
- an explicit reading[0-9]*Map.<br>
- 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.
- <li><b>(get|reading)[0-9]*Map</b></li>
- 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.
- <li><b>(get|set|reading)[0-9]*Format</b></li>
- Defines a format string that will be used in sprintf to format a reading value.<br>
- 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.
- 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>
- <li><b>(get|set|reading)[0-9]*Decode</b></li>
- 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.
- This can be used if the device delivers strings in an encoding like cp850 instead of utf8.<br>
- If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.
- 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>
- <li><b>(get|set|reading)[0-9]*Encode</b></li>
- 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.
- 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.
- If your reading values contain Umlauts and they are shown as strange looking icons then you probably need to use this feature.
- 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>
- <br>
-
- <li><b>(get|set)[0-9]*URL</b></li>
- URL to be requested for the get or set command.
- If this option is missing, the URL specified during define will be used.
- <li><b>(get|set)[0-9]*Data</b></li>
- optional data to be sent to the device as POST data when the get oer set command is executed.
- if this attribute is specified, an HTTP POST method will be sent instead of an HTTP GET
- <li><b>(get|set)[0-9]*NoData</b></li>
- can be used to override a more generic attribute that specifies POST data for all get commands.
- With NoData no data is sent and therefor the request will be an HTTP GET.
- <li><b>(get|set)[0-9]*Header.*</b></li>
- optional HTTP Headers to be sent to the device when the get or set command is executed
- <li><b>requestHeader.*</b></li>
- Define an optional additional HTTP Header to set in the HTTP request <br>
- <li><b>requestData</b></li>
- 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>
- <br>
- <li><b>get[0-9]+Poll</b></li>
- if set to 1 the get is executed automatically during the normal update cycle (after the interval provided in the define command has elapsed)
- <li><b>get[0-9]+PollDelay</b></li>
- if the value should not be read in each iteration (after the interval given to the define command), then a
- minimum delay can be specified with this attribute. This has only an effect if the above Poll attribute has
- 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>
- PollDelay can be specified as seconds or as x[0-9]+ which means a multiple of the interval in the define command.
- <br>
-
- <li><b>(get|set)[0-9]*TextArg</b></li>
- For a get command this defines that the command accepts a text value after the option name.
- By default a get command doesn't accept optional values after the command name.
- 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
- as replacement for $val or in a user defined replacement that uses the internal "value" ($hash->{value}).<br>
- If used for a set command then it defines that the value to be set doesn't require any validation / conversion.
- 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.
- <li><b>set[0-9]+Min</b></li>
- Minimum value for input validation.
- <li><b>set[0-9]+Max</b></li>
- Maximum value for input validation.
- <li><b>set[0-9]+IExpr</b></li>
- Perl Expression to compute the raw value to be sent to the device from the input value passed to the set.
- <li><b>set[0-9]+Expr</b></li>
- 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.
-
- <li><b>set[0-9]+IMap</b></li>
- 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.
- <li><b>set[0-9]+Map</b></li>
- 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.
- <li><b>set[0-9]+Hint</b></li>
- Explicit hint for fhemWEB that will be returned when set ? is seen.
- <li><b>set[0-9]*NoArg</b></li>
- Defines that this set option doesn't require arguments. It allows sets like "on" or "off" without further values.
- <li><b>set[0-9]*ParseResponse</b></li>
- defines that the HTTP response to the set will be parsed as if it was the response to a get command.
- <br>
- <li><b>(get|set)[0-9]*URLExpr</b></li>
- 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.
- <li><b>(get|set)[0-9]*DatExpr</b></li>
- 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.
- <li><b>(get|set)[0-9]*HdrExpr</b></li>
- 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.
- <br>
-
- <li><b>set[0-9]*ReAuthRegex</b></li>
- Regex that will detect when a session has expired during a set operation and a new login needs to be performed.
- It works like the global reAuthRegex but is used for set operations.
-
- <li><b>reAuthRegex</b></li>
- regular Expression to match an error page indicating that a session has expired and a new authentication for read access needs to be done.
- 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>
- This attribute is used for all requests. For set operations you can however specify individual reAuthRegexes with the set[0-9]*ReAuthRegex attributes.
- <li><b>reAuthAlways</b></li>
- if set to 1 will force authentication requests defined in the sid-attributes to be sent before each getupdate, get or set.
- <br><br>
- <li><b>sid[0-9]*URL</b></li>
- different URLs or one common URL to be used for each step of an optional login procedure.
- <li><b>sid[0-9]*IdRegex</b></li>
- different Regexes per login procedure step or one common Regex for all steps to extract the session ID from the HTTP response
- <li><b>sid[0-9]*Data.*</b></li>
- data part for each step to be sent as POST data to the corresponding URL
- <li><b>sid[0-9]*Header.*</b></li>
- HTTP Headers to be sent to the URL for the corresponding step
- <li><b>sid[0-9]*IgnoreRedirects</b></li>
- tell HttpUtils to not follow redirects for this authentication request
- <li><b>clearSIdBeforeAuth</b></li>
- will set the session id to "" before doing the authentication steps
- <li><b>authRetries</b></li>
- number of retries for authentication procedure - defaults to 1
- <br>
- <li><b>replacement[0-9]*Regex</b></li>
- 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.
- The regex defines which part of a header, data or URL should be replaced. The replacement is defined with the following attributes:
- <li><b>replacement[0-9]*Mode</b></li>
- Defines how the replacement should be done and what replacementValue means. Valid options are text, reading, internal and expression.
- <li><b>replacement[0-9]*Value</b></li>
- Defines the replacement. If the corresponding replacementMode is <code>text</code>, then value is a static text that is used as the replacement.<br>
- 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>
- 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>
- 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>
- 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.
- <li><b>[gs]et[0-9]*Replacement[0-9]*Value</b></li>
- This attribute can be used to override the replacement value for a specific get or set.
- <br>
- <li><b>get|reading[0-9]*MaxAge</b></li>
- Defines how long a reading is valid before it is automatically overwritten with a replacement when the read function is called the next time.
- <li><b>get|reading[0-9]*MaxAgeReplacement</b></li>
- specifies the replacement for MaxAge - either as a static text, the name of a reading / internal or as a perl expression.<br>
- 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>
- 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.
-
- <li><b>get|reading[0-9]*MaxAgeReplacementMode</b></li>
- specifies how the replacement is interpreted: can be text, reading, internal, expression and delete.
- <br>
- <li><b>get|reading[0-9]*DeleteIfUnmatched</b></li>
- 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>
- 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.
- <li><b>get|reading[0-9]*DeleteOnError</b></li>
- 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>
- The same restrictions as for DeleteIfUnmatched apply regarding a fhem restart.
- <br>
- <li><b>httpVersion</b></li>
- defines the HTTP-Version to be sent to the server. This defaults to 1.0.
- <li><b>sslVersion</b></li>
- 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
- <li><b>sslArgs</b></li>
- 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
- <code>attr myDevice sslArgs SSL_verify_mode,SSL_VERIFY_NONE</code>
- <li><b>noShutdown</b></li>
- pass the noshutdown flag to HTTPUtils for webservers that need it (some embedded webservers only deliver empty pages otherwise)
-
- <li><b>disable</b></li>
- stop communication with the Web_Server with HTTP requests while this attribute is set to 1
- <li><b>enableControlSet</b></li>
- enables the built in set commands interval, stop, start, reread, upgradeAttributes, storeKeyValue.
- <li><b>enableCookies</b></li>
- 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.
- 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.
- <li><b>showMatched</b></li>
- if set to 1 then HTTPMOD will create a reading with the name MATCHED_READINGS
- that contains the names of all readings that could be matched in the last request.
- <li><b>showError</b></li>
- if set to 1 then HTTPMOD will create a reading and event with the Name LAST_ERROR
- that contains the error message of the last error returned from HttpUtils.
- <li><b>removeBuf</b></li>
- This attribute has been removed. If set to 1 then HTTPMOD used to removes the internal named buf when a HTTP-response had been
- received. $hash->{buf} is used internally be Fhem httpUtils and used to be visible. This behavior of httpUtils has changed so removeBuf has become obsolete.
- <li><b>showBody</b></li>
- if set to 1 then the body of http responses will be visible as internal httpbody.
-
- <li><b>timeout</b></li>
- time in seconds to wait for an answer. Default value is 2
- <li><b>queueDelay</b></li>
- 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.
- <li><b>queueMax</b></li>
- 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
- <li><b>minSendDelay</b></li>
- Defines the minimum time between two HTTP Requests.
- <br>
- <li><b>alignTime</b></li>
- 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)
- <br>
- <li><b>enableXPath</b></li>
- This attribute should no longer be used. Please specify an HTTP XPath in the dedicated attributes shown above.
- <li><b>enableXPath-Strict</b></li>
- This attribute should no longer be used. Please specify an XML XPath in the dedicated attributes shown above.
- <li><b>parseFunction1</b> and <b>parseFunction2</b></li>
- These functions allow an experienced Perl / Fhem developer to plug in his own parsing functions.<br>
- 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.
- <li><b>preProcessRegex</b></li>
- can be used to fix a broken HTTP response before parsing. The regex should be a replacement regex like s/match/replacement/g and will be applied to the buffer.
- <li><b>Remarks regarding the automatically created userattr entries</b></li>
- 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.
- </ul>
- <br>
- <b>Author's notes</b><br><br>
- <ul>
- <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>
- </ul>
- </ul>
- <p><a name="HTTPSRV"></a>
- <h3>HTTPSRV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HTTPSRV'>DE</a>]</div>
- <ul>
- Provides a mini HTTP server plugin for FHEMWEB. It serves files from a given directory.
- It optionally accepts a query string to set readings of this device if an attribute allows the given reading<p>
- HTTPSRV is an extension to <a href="HTTPSRV">FHEMWEB</a>. You must install FHEMWEB to use HTTPSRV.</p>
- <a name="HTTPSRVdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> <infix> <directory> <friendlyname></code><br><br>
- Defines the HTTP server. <code><infix></code> is the portion behind the FHEMWEB base URL (usually
- <code>http://hostname:8083/fhem</code>), <code><directory></code> is the absolute path the
- files are served from, and <code><friendlyname></code> is the name displayed in the side menu of FHEMWEB.<p><p>
- Example:
- <ul>
- <code>define myJSFrontend HTTPSRV jsf /usr/share/jsfrontend My little frontend</code><br>
- or <br>
- <code>
- define kindleweb HTTPSRV kindle /opt/fhem/kindle Kindle Web<br>
- attr kindleweb readings KindleBatt
- </code><br>
- </ul>
- <br>
- </ul>
- <a name="HTTPSRVset"></a>
- <b>Set</b>
- <ul>
- n/a
- </ul>
- <br><br>
- <a name="HTTPSRVattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <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>
- <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>
- </ul>
- <br><br>
- <b>Usage information</b>
- <br><br>
- <ul>
- The above example on <code>http://hostname:8083/fhem</code> will return the file
- <code>/usr/share/jsfrontend/foo.html</code> for <code>http://hostname:8083/fhem/jsf/foo.html</code>.
- If no filename is given, the filename prescribed by the <code>directoryindex</code> attribute is returned.<p>
- Notice: All links are relative to <code>http://hostname:8083/fhem</code>.
- </ul>
- <br><br>
- </ul>
- <p><a name="HUEBridge"></a>
- <h3>HUEBridge</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HUEBridge'>DE</a>]</div>
- <ul>
- Module to access the bridge of the phillips hue lighting system.<br><br>
- The actual hue bulbs, living colors or living whites devices are defined as <a href="#HUEDevice">HUEDevice</a> devices.
- <br><br>
- All newly found devices and groups are autocreated at startup and added to the room HUEDevice.
- <br><br>
- Notes:
- <ul>
- <li>This module needs <code>JSON</code>.<br>
- Please install with '<code>cpan install JSON</code>' or your method of choice.</li>
- </ul>
- <br><br>
- <a name="HUEBridge_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> HUEBridge [<host>] [<interval>]</code><br>
- <br>
- Defines a HUEBridge device with address <host>.<br><br>
- If [<host>] is not given the module will try to autodetect the bridge with the hue portal services.<br><br>
- The bridge status will be updated every <interval> seconds. The default and minimum is 60.<br><br>
- After a new bridge is created the pair button on the bridge has to be pressed.<br><br>
- Examples:
- <ul>
- <code>define bridge HUEBridge 10.0.1.1</code><br>
- </ul>
- </ul><br>
- <a name="HUEBridge_Get"></a>
- <b>Get</b>
- <ul>
- <li>lights<br>
- list the lights known to the bridge.</li>
- <li>groups<br>
- list the groups known to the bridge.</li>
- <li>scenes [detail]<br>
- list the scenes known to the bridge.</li>
- <li>rule <id> <br>
- list the rule with <id>.</li>
- <li>rules [detail] <br>
- list the rules known to the bridge.</li>
- <li>sensors [detail] <br>
- list the sensors known to the bridge.</li>
- <li>whitelist<br>
- list the whitlist of the bridge.</li>
- </ul><br>
- <a name="HUEBridge_Set"></a>
- <b>Set</b>
- <ul>
- <li>autocreate<br>
- Create fhem devices for all bridge devices.</li>
- <li>autodetect<br>
- Initiate the detection of new ZigBee devices. After aproximately one minute any newly detected
- devices can be listed with <code>get <bridge> devices</code> and the corresponding fhem devices
- can be created by <code>set <bridge> autocreate</code>.</li>
- <li>delete <name>|<id><br>
- Deletes the given device in the bridge and deletes the associated fhem device.</li>
- <li>creategroup <name> <lights><br>
- Create a group out of <lights> in the bridge.
- The lights are given as a comma sparated list of fhem device names or bridge light numbers.</li>
- <li>deletegroup <name>|<id><br>
- Deletes the given group in the bridge and deletes the associated fhem device.</li>
- <li>savescene <name> <lights><br>
- Create a scene from the current state of <lights> in the bridge.
- The lights are given as a comma sparated list of fhem device names or bridge light numbers.</li>
- <li>modifyscene <id> <light> <light-args><br>
- Modifys the given scene in the bridge.</li>
- <li>scene <id><br>
- Recalls the scene with the given id.</li>
- <li>createrule <name> <conditions&actions json><br>
- Creates a new rule in the bridge.</li>
- <li>deleterule <id><br>
- Deletes the given rule in the bridge.</li>
- <li>createsensor <name> <type> <uniqueid> <swversion> <modelid><br>
- Creates a new CLIP (IP) sensor in the bridge.</li>
- <li>deletesensor <id><br>
- Deletes the given sensor in the bridge and deletes the associated fhem device.</li>
- <li>configsensor <id> <json><br>
- Write sensor config data.</li>
- <li>setsensor <id> <json><br>
- Write CLIP sensor status data.</li>
- <li>updatesensor <id> <json><br>
- Write sensor toplevel data.</li>
- <li>deletewhitelist <key><br>
- Deletes the given key from the whitelist in the bridge.</li>
- <li>touchlink<br>
- perform touchlink action</li>
- <li>checkforupdate<br>
- perform checkforupdate action</li>
- <li>statusRequest<br>
- Update bridge status.</li>
- <li>swupdate<br>
- Update bridge firmware. This command is only available if a new firmware is
- available (indicated by updatestate with a value of 2. The version and release date is shown in the reading swupdate.<br>
- A notify of the form <code>define HUEUpdate notify bridge:swupdate.* {...}</code>
- can be used to be informed about available firmware updates.<br></li>
- <li>inactive<br>
- inactivates the current device. note the slight difference to the
- disable attribute: using set inactive the state is automatically saved
- to the statefile on shutdown, there is no explicit save necesary.<br>
- this command is intended to be used by scripts to temporarily
- deactivate the harmony device.<br>
- the concurrent setting of the disable attribute is not recommended.</li>
- <li>active<br>
- activates the current device (see inactive).</li>
- </ul><br>
- <a name="HUEBridge_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li>httpUtils<br>
- 0 -> use HttpUtils_BlockingGet<br>
- 1 -> use HttpUtils_NonblockingGet<br>
- not set -> use old module specific implementation</li>
- <li>pollDevices<br>
- 1 -> the bridge will poll all lights in one go instead of each device polling itself independently<br>
- 2 -> the bridge will poll all devices in one go instead of each device polling itself independently<br>
- default is 1.</li>
- <li>createGroupReadings<br>
- create 'artificial' readings for group devices.</li>
- 0 -> create readings only for group devices where createGroupReadings ist set to 1
- 1 -> create readings for all group devices where createGroupReadings ist not set or set to 1
- undef -> do nothing
- <li>queryAfterSet<br>
- the bridge will request the real device state after a set command. default is 1.</li>
- <li>noshutdown<br>
- Some bridge devcies require a different type of connection handling. raspbee/deconz only works if the connection
- is not immediately closed, the phillips hue bridge now shows the same behavior. so this is now the default. </li>
- </ul><br>
- </ul><br>
- <p><a name="HUEDevice"></a>
- <h3>HUEDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HUEDevice'>DE</a>]</div>
- <ul>
- <br>
- <a name="HUEDevice_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> HUEDevice [group|sensor] <id> [<interval>]</code><br>
- <br>
- Defines a device connected to a <a href="#HUEBridge">HUEBridge</a>.<br><br>
- This can be a hue bulb, a living colors light or a living whites bulb or dimmer plug.<br><br>
- The device status will be updated every <interval> seconds. 0 means no updates.
- The default and minimum is 60 if the IODev has not set pollDevices to 1.
- The default ist 0 if the IODev has set pollDevices to 1.
- Groups are updated only on definition and statusRequest<br><br>
- Examples:
- <ul>
- <code>define bulb HUEDevice 1</code><br>
- <code>define LC HUEDevice 2</code><br>
- <code>define allLights HUEDevice group 0</code><br>
- </ul>
- </ul><br>
- <a name="HUEDevice_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>bri<br>
- the brightness reported from the device. the value can be betwen 1 and 254</li>
- <li>colormode<br>
- the current colormode</li>
- <li>ct<br>
- the colortemperature in mireds and kelvin</li>
- <li>hue<br>
- the current hue</li>
- <li>pct<br>
- the current brightness in percent</li>
- <li>onoff<br>
- the current on/off state as 0 or 1</li>
- <li>sat<br>
- the current saturation</li>
- <li>xy<br>
- the current xy color coordinates</li>
- <li>state<br>
- the current state</li>
- <br>
- Notes:
- <ul>
- <li>with current bridge firware versions groups have <code>all_on</code> and <code>any_on</code> readings,
- with older firmware versions groups have no readings.</li>
- <li>not all readings show the actual device state. all readings not related to the current colormode have to be ignored.</li>
- <li>the actual state of a device controlled by a living colors or living whites remote can be different and will
- be updated after some time.</li>
- </ul><br>
- </ul><br>
- <a name="HUEDevice_Set"></a>
- <b>Set</b>
- <ul>
- <li>on [<ramp-time>]</li>
- <li>off [<ramp-time>]</li>
- <li>toggle [<ramp-time>]</li>
- <li>statusRequest<br>
- Request device status update.</li>
- <li>pct <value> [<ramp-time>]<br>
- dim to <value><br>
- Note: the FS20 compatible dimXX% commands are also accepted.</li>
- <li>color <value><br>
- set colortemperature to <value> kelvin.</li>
- <li>bri <value> [<ramp-time>]<br>
- set brighness to <value>; range is 0-254.</li>
- <li>dimUp [delta]</li>
- <li>dimDown [delta]</li>
- <li>ct <value> [<ramp-time>]<br>
- set colortemperature to <value> in mireds (range is 154-500) or kelvin (range is 2000-6493).</li>
- <li>ctUp [delta]</li>
- <li>ctDown [delta]</li>
- <li>hue <value> [<ramp-time>]<br>
- set hue to <value>; range is 0-65535.</li>
- <li>hueUp [delta]</li>
- <li>hueDown [delta]</li>
- <li>sat <value> [<ramp-time>]<br>
- set saturation to <value>; range is 0-254.</li>
- <li>satUp [delta]</li>
- <li>satDown [delta]</li>
- <li>xy <x>,<y> [<ramp-time>]<br>
- set the xy color coordinates to <x>,<y></li>
- <li>alert [none|select|lselect]</li>
- <li>effect [none|colorloop]</li>
- <li>transitiontime <time><br>
- set the transitiontime to <time> 1/10s</li>
- <li>rgb <rrggbb><br>
- set the color to (the nearest equivalent of) <rrggbb></li>
- <br>
- <li>delayedUpdate</li>
- <li>immediateUpdate</li>
- <br>
- <li>savescene <id></li>
- <li>deletescene <id></li>
- <li>scene</li>
- <br>
- <li>lights <lights><br>
- Only valid for groups. Changes the list of lights in this group.
- The lights are given as a comma sparated list of fhem device names or bridge light numbers.</li>
- <li>rename <new name><br>
- Renames the device in the bridge and changes the fhem alias.</li>
- <br>
- <li><a href="#setExtensions"> set extensions</a> are supported.</li>
- <br>
- Note:
- <ul>
- <li><ramp-time> is given in seconds</li>
- <li>multiple paramters can be set at once separated by <code>:</code><br>
- Examples:<br>
- <code>set LC on : transitiontime 100</code><br>
- <code>set bulb on : bri 100 : color 4000</code><br></li>
- </ul>
- </ul><br>
- <a name="HUEDevice_Get"></a>
- <b>Get</b>
- <ul>
- <li>rgb</li>
- <li>RGB</li>
- <li>devStateIcon<br>
- returns html code that can be used to create an icon that represents the device color in the room overview.</li>
- </ul><br>
- <a name="HUEDevice_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>color-icon<br>
- 1 -> use lamp color as icon color and 100% shape as icon shape<br>
- 2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
- <li>createActionReadings<br>
- create readings for the last action in group devices</li>
- <li>createGroupReadings<br>
- create 'artificial' readings for group devices. default depends on the createGroupReadings setting in the bridge device.</li>
- <li>ignoreReachable<br>
- ignore the reachable state that is reported by the hue bridge. assume the device is allways reachable.</li>
- <li>setList<br>
- The list of know set commands for sensor type devices. one command per line, eg.: <code><br>
- attr mySensor setList present:{<json>}\<br>
- absent:{<json>}</code></li>
- <li>subType<br>
- extcolordimmer -> device has rgb and color temperatur control<br>
- colordimmer -> device has rgb controll<br>
- ctdimmer -> device has color temperature control<br>
- dimmer -> device has brightnes controll<br>
- switch -> device has on/off controll<br></li>
- <li>transitiontime<br>
- default transitiontime for all set commands if not specified directly in the set.</li>
- <li>delayedUpdate<br>
- 1 -> the update of the device status after a set command will be delayed for 1 second. usefull if multiple devices will be switched.
- </li>
- <li>devStateIcon<br>
- will be initialized to <code>{(HUEDevice_devStateIcon($name),"toggle")}</code> to show device color as default in room overview.</li>
- <li>webCmd<br>
- will be initialized to a device specific value according to subType.</li>
- </ul>
- </ul><br>
- <p><a name="HXB"></a>
- <h3>HXB</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HXB'>DE</a>]</div>
- <ul>
- <br>
- <a name="HXB"></a>
- <b>Define</b>
- <ul>
- <code>define <name> HXB</code><br>
- <br>
- Defines a Hexabus. You need one Hexabus to receive multicast messages from <a href="#HXBDevice">Hexabus devices</a>.
- Have a look at the <a href="https://github.com/mysmartgrid/hexabus/wiki">Hexabus wiki</a> for more information on Hexabus.
- <br><br>
- 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>.
- </ul>
- </ul>
- <p><a name="HXBDevice"></a>
- <h3>HXBDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HXBDevice'>DE</a>]</div>
- <ul>
- <br>
- <a name="HXB"></a>
- <b>Define</b>
- <ul>
- <code>define <name> HXB <IPv6Address></code><br>
- <br>
- Defines a Hexabus device at the IPv6 address <IPv6Address>. You need one <a href="#HXB">Hexabus</a>
- to receive multicast messages from Hexabus devices.
- Have a look at the <a href="https://github.com/mysmartgrid/hexabus/wiki">Hexabus wiki</a> for more information on Hexabus.
- <br><br>
- Example:
- <code>define myPlug fd01:1::50:c4ff:fe04:81ad</code>
- </ul>
- </ul>
- <p><a name="Heating_Control"></a>
- <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
- <h3>Heating Control</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Heating_Control'>DE</a>]</div>
- <ul>
- <br>
- <a name="Heating_Controldefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Heating_Control <device> [<language>] [<u>weekdays</u>] <profile> [<command>|<condition>]</code>
- <br><br>
- to set a weekly profile for <device>, eg. a heating sink.<br>
- You can define different switchingtimes for every day.<br>
- The new temperature is sent to the <device> automatically with <br><br>
- <code>set <device> (desired-temp|desiredTemperature) <temp></code><br><br>
- Because of the fhem-type of structures, a structures of heating sinks is sent "desired-temp":
- Use an explicit command if you have structures of MAX heating thermostats.<br>
- If you have defined a <condition> and this condition is false if the switchingtime has reached, no command will executed.<br>
- A other case is to define an own perl command with <command>.
- <p>
- The following parameter are defined:
- <ul><b>device</b><br>
- The device to switch at the given time.
- </ul>
- <p>
- <ul><b>language</b><br>
- Specifies the language used for definition and profiles.
- de,en,fr are possible. The parameter is optional.
- </ul>
- <p>
- <ul><b>weekdays</b><br>
- Specifies the days for all timer in the <b>Heating_Control</b>.
- The parameter is optional. For details see the weekdays part in profile.
- </ul>
- <p>
- <ul><b>profile</b><br>
- Define the weekly profile. All timings are separated by space. A switchingtime is defined
- by the following example: <br><br>
- <ul><b>[<weekdays>|]<time>|<parameter></b></ul><br>
- <u>weekdays:</u> optional, if not set every day of the week is used.<br>
- Otherwise you can define a day with its number or its shortname.<br>
- <ul>
- <li>0,su sunday</li>
- <li>1,mo monday</li>
- <li>2,tu tuesday</li>
- <li>3,we wednesday</li>
- <li>4 ...</li>
- <li>7,$we weekend ($we)</li>
- <li>8,!$we weekday (!$we)</li>
- </ul><br>
- 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>
- <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>
- <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.
- The symbolic value can be added an additional parameter: dayTemp:16 night-temp:15. See examples <br><br>
- </ul>
- <p>
- <ul><b>command</b><br>
- If no condition is set, all the rest is interpreted as a command. Perl-code is setting up
- by the well-known Block with {}.<br>
- Note: if a command is defined only this command is executed. In case of executing
- a "set desired-temp" command, you must define the hole commandpart explicitly by yourself.<br>
- <!----------------------------------------------------------------------------- -->
- <!----------------------------------------------------------------------------- -->
- <!-- -------------------------------------------------------------------------- -->
- The following parameter are replaced:<br>
- <ol>
- <li>$NAME => the device to switch</li>
- <li>$EVENT => the new temperature</li>
- </ol>
- </ul>
- <p>
- <ul><b>condition</b><br>
- if a condition is defined you must declare this with () and a valid perl-code.<br>
- The returnvalue must be boolean.<br>
- The parameter $NAME and $EVENT will be interpreted.
- </ul>
- <p>
- <b>Examples:</b>
- <ul>
- <code>define HCB Heating_Control Bad_Heizung 12345|05:20|21 12345|05:25|comfort 17:20|21 17:25|eco</code><br>
- Mo-Fr are setting the temperature at 05:20 to 21°C, and at 05:25 to <b>comfort</b>.
- Every day will be set the temperature at 17:20 to 21°C and 17:25 to <b>eco</b>.<p>
- <code>define HCW Heating_Control WZ_Heizung 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|12
- {fhem("set dummy on"); fhem("set $NAME desired-temp $EVENT");}</code><br>
- At the given times and weekdays only(!) the command will be executed.<p>
- <code>define HCW Heating_Control WZ_Heizung Sa-Su,We|08:00|21 (ReadingsVal("WeAreThere", "state", "no") eq "yes")</code><br>
- The temperature is only set if the dummy variable WeAreThere is "yes".<p>
- <code>define HCW Heating_Control WZ_Heizung en Su-Fr|{sunrise_abs()}|21 Mo-Fr|{sunset_abs()}|16</code><br>
- The device is switched at sunrise/sunset. Language: english.<p>
- <code>define HCW Heating_Control WZ_Heizung en Mo-Fr|{myFunction}|night-temp:18 Mo-Fr|{myFunction()}|dayTemp:16</code><br>
- The is switched at time myFunction(). It is sent the Command "night-temp 18" and "dayTemp 16".<p>
- If you want to have set all Heating_Controls their current value (after a temperature lowering phase holidays)
- you can call the function <b>Heating_Control_SetTemp("HC-device")</b> or <b>Heating_Control_SetAllTemps()</b>.<br>
- This call can be automatically coupled to a dummy by a notify:<br>
- <code>define HeizStatus2 notify Heating:. * {Heating_Control_SetAllTemps()}</code>
- <br><p>
- Some definitions without comment:
- <code><pre>
- define hc Heating_Control HeizungKueche de 7|23:35|25 34|23:30|22 23:30|16 23:15|22 8|23:45|16
- 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
- define hc Heating_Control HeizungKueche de 20:35|25 34|14:30|22 21:30|16 21:15|22 12|23:00|16
- define hw Heating_Control HeizungKueche de mo-so, $we|{sunrise_abs_dat($date)}|18 mo-so, $we|{sunset_abs_dat($date)}|22
- define ht Heating_Control HeizungKueche de mo-so,!$we|{sunrise_abs_dat($date)}|18 mo-so,!$we|{sunset_abs_dat($date)}|22
- define hh Heating_Control HeizungKueche de {sunrise_abs_dat($date)}|19 {sunset_abs_dat($date)}|21
- define hx Heating_Control HeizungKueche de 22:35|25 23:00|16
- </code></pre>
- the list of days can be set globaly for the whole Heating_Control:<p>
- <code><pre>
- define HeizungWohnen_an_wt Heating_Control HeizungWohnen de !$we 09:00|19 (heizungAnAus("Ein"))
- define HeizungWohnen_an_we Heating_Control HeizungWohnen de $we 09:00|19 (heizungAnAus("Ein"))
- define HeizungWohnen_an_we Heating_Control HeizungWohnen de 78 09:00|19 (heizungAnAus("Ein"))
- define HeizungWohnen_an_we Heating_Control HeizungWohnen de 57 09:00|19 (heizungAnAus("Ein"))
- define HeizungWohnen_an_we Heating_Control HeizungWohnen de fr,$we 09:00|19 (heizungAnAus("Ein"))
- </code></pre>
- An example to be able to temporarily boost the temperature for one hour:
- <code><pre>
- 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")}
- </code></pre>
- and using a "HeatingBath_Boost" dummy variable:
- <code><pre>
- define HeatingBath_Boost dummy
- attr HeatingBath_Boost setList state:0,23,24,25
- attr HeatingBath_Boost webCmd state
- define di_ResetBoostBath DOIF ([HeatingBath_Boost] > 0)
- ({Heating_Control_SetAllTemps()}, defmod di_ResetBoostBath_Reset at +01:00:00 set HeatingBath_Boost 0)
- DOELSE
- ({Heating_Control_SetAllTemps()})
- attr di_ResetBoostBath do always
- </code></pre>
- and the perl subroutine in 99_myUtils.pm (or the like)
- <code><pre>
- sub HC_BathWithBoost {
- my $numParams = @_;
- my ($degree, $boostPrefix) = @_;
- if ($numParams > 1)
- {
- my $boost = ReadingsVal($boostPrefix . "_Boost", "state", "0");
- return $boost if ($boost =~ m/^\d+$/) && ($boost > 0); # boost?
- }
- return $degree; # otherwise return given temperature
- }
- </code></pre>
- Now you can set "HeatingBath_Boost" in the web interface for a one-hour boost of 3 degrees in the bath.
- (you can trigger that using the PRESENCE function using your girlfriend's device... grin).
- Easy to extend this with a vacation timer using another dummy variable, here <code>VacationTemp</code>.<br>
- Then you can use the command
- <code>defmod defVacationEnd at 2016-12-30T00:00:00 set VacationTemp off, {Heating_Control_SetAllTemps()}</code>
- to stop the vacation temperature before you return in january 2017 and let the appartment heat up again.
- <code><pre>
- sub HC_BathWithBoost($) {
- my $vacation = ReadingsVal("VacationTemp", "state", "unfortunately not on vacation");
- return $vacation if $vacation =~ /^(\d+|eco)$/; # set vacation temperature if given
- my $numParams = @_;
- my ($degree, $boostPrefix) = @_;
- if ($numParams > 1)
- {
- my $boost = ReadingsVal($boostPrefix . "_Boost", "state", "0");
- return $boost if ($boost =~ m/^\d+$/) && ($boost > 0); # boost?
- }
- }
- </code></pre>
- 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!
- </ul>
- </ul>
- <a name="Heating_Controlset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="Heating_Controlget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="Heating_ControlLogattr"></a>
- <b>Attributes</b>
- <ul>
- <li>delayedExecutionCond <br>
- 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.
- <br><br>
- <b>Example:</b>
- <pre>
- attr hc delayedExecutionCond isDelayed("%HEATING_CONTROL","%WEEKDAYTIMER","%TIME","%NAME","%EVENT")
- </pre>
- the parameters %HEATING_CONTROL(timer name) %TIME %NAME(device name) %EVENT are replaced at runtime by the correct value.
- <br><br>
- <b>Example of a function:</b>
- <pre>
- sub isDelayed($$$$$) {
- my($hc, $wdt, $tim, $nam, $event ) = @_;
- my $theSunIsStillshining = ...
- return ($tim eq "16:30" && $theSunIsStillshining) ;
- }
- </pre>
- </li>
- <li>switchInThePast<br>
- 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.
- Heatings are always switched in the past.
- </li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#event-on-update-reading">event-on-update-reading</a></li>
- <li><a href="#event-on-change-reading">event-on-change-reading</a></li>
- <li><a href="#stateFormat">stateFormat</a></li>
- <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>
- </ul>
- <p><a name="Hideki"></a>
- <h3>Hideki</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Hideki'>DE</a>]</div>
- <ul>
- The Hideki module is a module for decoding weather sensors, which use the hideki protocol. Known brands are Bresser, Cresta, TFA and Hama.
- <br><br>
- <a name="Hideki_define"></a>
- <b>Supported Brands</b>
- <ul>
- <li>Hama</li>
- <li>Bresser</li>
- <li>TFA Dostman</li>
- <li>Arduinos with remote Sensor lib from Randy Simons</li>
- <li>Cresta</li>
- <li>Hideki (Anemometer | UV sensor | Rain level meter | Thermo/hygro-sensor)</li>
- <li>all other devices, which use the Hideki protocol</li>
- </ul>
- Please note, currently temp/hum devices are implemented. Please report data for other sensortypes.
- <a name="Hideki_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Hideki <code> </code> <br>
- <br>
- <code> is the address of the sensor device and
- 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
- the battery (this adress will change every time changing the battery).<br>
-
- If autocreate is enabled, the device will be defined via autocreate. This is also the preferred mode of defining such a device.
- </ul>
- <a name="Hideki_readings"></a>
- <b>Generated readings</b>
- <ul>
- <li>state (T:x H:y B:z)</li>
- <li>temperature (°C)</li>
- <li>humidity (0-100)</li>
- <li>battery (ok or low)</li>
- <li>channel (The Channelnumber (number if)</li>
- <br><i>- Hideki only -</i>
- <li>comfort_level (Status: Humidity OK... , Wet. More than 69% RH, Dry. Less than 40% RH, Temperature and humidity comfortable)</li>
- <li>package_number (reflect the package number in the stream starting at 1)</li><br>
- </ul>
-
-
- <a name="Hideki_unset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="Hideki_unget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="Hideki_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p> <div>
- <a name="HourCounter" id="HourCounter"></a>
- <h3>HourCounter</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#HourCounter'>DE</a>]</div>
- <div>
- <a name="HourCounterdefine" id="HourCounterdefine"></a> <b>Define</b>
- <div>
- <br />
- <code>define <name> HourCounter <pattern_for_ON> [<pattern_for_OFF>]</code><br />
- <br />
- Hourcounter can detect both the activiy-time and the inactivity-time of a property.<br />
- The "pattern_for_ON" identifies the events, that signal the activity of the desired property.<br />
- The "pattern_for_OFF" identifies the events, that signal the inactivity of the desired property.<br />
- <br />
- If "pattern_for_OFF" is not defined, any matching event of "patter_for_ON" will be counted.<br />
- Otherwise only the rising edges of "pattern_for_ON" will be counted.<br />
- This means a "pattern_for_OFF"-event must be detected before a "pattern_for_ON"-event is accepted.<br />
- <br />
- "pattern_for_ON" and "pattern_for_OFF" must be formed using the following structure:<br />
- <br />
- <code>device:[regexp]</code><br />
- <br />
- The forming-rules are the same as for the notify-command.<br />
- <br />
- <b>Example:</b><br />
- <br />
- <div>
- <code>define BurnerCounter HourCounter SHUTTER_TEST:on SHUTTER_TEST:off</code>
- </div>
- </div><br />
- <a name="HourCounterset" id="HourCounterset"></a> <b>Set-Commands</b>
- <div>
- <br />
- <code>set <name> calc</code><br />
- <br />
- <div>
- starts the calculation of pulse/pause-time.<br />
- </div><br />
- <br />
- <code>set <name> clear</code><br />
- <br />
- <div>
- clears the readings countsPerDay, countsOverall,pauseTimeIncrement, pauseTimePerDay, pauseTimeOverall,
- pulseTimeIncrement, pulseTimePerDay, pulseTimeOverall by setting to 0.<br />
- The reading clearDate is set to the current Date/Time.
- </div><br />
- <br />
- <code>set <name> countsOverall <value></code><br />
- <br />
- <div>
- Sets the reading countsOverall to the given value.This is the total-counter.
- </div><br />
- <br />
- <code>set <name> countsPerDay <value></code><br />
- <br />
- <div>
- Sets the reading countsPerDay to the given value. This reading will automatically be set to 0, after change
- of day.
- </div><br />
- <br />
- <code>set <name> pauseTimeIncrement <value></code><br />
- <br />
- <div>
- Sets the reading pauseTimeIncrement to the given value.<br />
- This reading in seconds is automatically set after a rising edge.
- </div><br />
- <br />
- <code>set <name> pauseTimeEdge <value></code><br />
- <br />
- <div>
- Sets the reading pauseTimeEdge to the given value.<br />
- This reading in seconds is automatically set after a rising edge.
- </div><br />
- <br />
- <code>set <name> pauseTimeOverall <value></code><br />
- <br />
- <div>
- Sets the reading pauseTimeOverall to the given value.<br />
- This reading in seconds is automatically adjusted after a change of pauseTimeIncrement.
- </div><br />
- <br />
- <code>set <name> pauseTimePerDay <value></code><br />
- <br />
- <div>
- Sets the reading pauseTimePerDay to the given value.<br />
- This reading in seconds is automatically adjusted after a change of pauseTimeIncrement and set to 0 after
- change of day.
- </div><br />
- <br />
- <code>set <name> pulseTimeIncrement <value></code><br />
- <br />
- <div>
- Sets the reading pulseTimeIncrement to the given value.<br />
- This reading in seconds is automatically set after a falling edge of the property.
- </div><br />
- <br />
- <code>set <name> pulseTimeEdge <value></code><br />
- <br />
- <div>
- Sets the reading pulseTimeEdge to the given value.<br />
- This reading in seconds is automatically set after a rising edge.
- </div><br />
- <br />
- <code>set <name> pulseTimeOverall <value></code><br />
- <br />
- <div>
- Sets the reading pulseTimeOverall to the given value.<br />
- This reading in seconds is automatically adjusted after a change of pulseTimeIncrement.
- </div><br />
- <br />
- <code>set <name> pulseTimePerDay <value></code><br />
- <br />
- <div>
- Sets the reading pulseTimePerDay to the given value.<br />
- This reading in seconds is automatically adjusted after a change of pulseTimeIncrement and set to 0 after
- change of day.
- </div><br />
- <br />
- <code>set <name> forceHourChange</code><br />
- <br />
- <div>
- This modifies the reading tickHour, which is automatically modified after change of hour.
- </div><br />
- <br />
- <code>set <name> forceDayChange</code><br />
- <br />
- <div>
- This modifies the reading tickDay, which is automatically modified after change of day.
- </div><br />
- <br />
- <code>set <name> forceWeekChange</code><br />
- <br />
- <div>
- This modifies the reading tickWeek, which is automatically modified after change of week.
- </div><br />
- <br />
- <code>set <name> forceMonthChange</code><br />
- <br />
- <div>
- This modifies the reading tickMonth, which is automatically modified after change of month.
- </div><br />
- <br />
- <code>set <name> forceYearChange</code><br />
- <br />
- <div>
- This modifies the reading tickYear, which is automatically modified after change of year.
- </div><br />
- <br />
- <code>set <name> app.* <value></code><br />
- <br />
- <div>
- Any reading with the leading term "app", can be modified.<br />
- This can be useful for user-readings.
- </div><br />
- </div><br />
- <a name="HourCounterget" id="HourCounterget"></a> <b>Get-Commands</b><br />
- <div>
- <br />
- <code>get <name> version</code><br />
- <br />
- <div>
- Get the current version of the module.
- </div><br />
- </div><br />
- <a name="HourCounterattr" id="HourCounterattr"></a> <b>Attributes</b>
- <br />
- <ul>
- <li><p><b>interval</b><br />
- the update interval for pulse/pause-time in minutes [default 60]</p></li>
- <li><p><a href="#readingFnAttributes">readingFnAttributes</a></p></li>
- </ul>
- <b>Additional information</b>
- <br />
- <ul>
- <li><p><a href="http://forum.fhem.de/index.php/topic,12216.0.html">Discussion in FHEM forum</a></p></li>
- <li><p><a href="http://www.fhemwiki.de/wiki/HourCounter">WIKI information in FHEM Wiki</a></p></li>
- <li><p>The file 99_UtilsHourCounter.pm is a reference implementation for user defined extensions.<br />
- It shows how to create sum values for hours,days, weeks, months and years.<br />
- This file is located in the sub-folder contrib. For further information take a look to FHEM Wiki.</p></li>
- </ul>
- </div>
- </div>
- <p><a name="Hyperion"></a>
- <h3>Hyperion</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Hyperion'>DE</a>]</div>
- <ul>
- With <i>Hyperion</i> it is possible to change the color or start an effect on a hyperion server.<br>
- It's also possible to control the complete color calibration (changes are temorary and will not be written to the config file).<br>
- The Hyperion server must have enabled the JSON server.<br>
- You can also restart Hyperion with different configuration files (p.e. switch input/grabber)<br>
- <br>
- <a name="Hyperion_define"></a>
- <p><b>Define</b></p>
- <ul>
- <code>define <name> Hyperion <IP or HOSTNAME> <PORT> [<INTERVAL>]</code><br>
- </ul>
- <br>
- <INTERVAL> is optional for periodically polling.<br>
- <br>
- <i>After defining "get <name> statusRequest" will be called once automatically to get the list of available effects and the current state of the Hyperion server.</i><br>
- <br>
- Example for running Hyperion on local system:
- <br><br>
- <ul>
- <code>define Ambilight Hyperion localhost 19444 10</code><br>
- </ul>
- <br>
- Example for running Hyperion on remote system:
- <br><br>
- <ul>
- <code>define Ambilight Hyperion 192.168.1.4 19444 10</code><br>
- </ul>
- <br><br>
- 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):
- <br><br>
- <ul>
- <code>fhem ALL=(ALL) NOPASSWD:/usr/bin/hyperiond,/bin/kill</code>
- </ul>
- <br>
- <a name="Hyperion_set"></a>
- <p><b>set <required> [optional]</b></p>
- <ul>
- <li>
- <i>addEffect <custom_name></i><br>
- add the current effect with the given name to the custom effects<br>
- can be altered after adding in attribute hyperionCustomEffects<br>
- device has to be in effect mode with a non-custom effect and given name must be a unique effect name
- </li>
- <li>
- <i>adjustBlue <0,0,255></i><br>
- adjust each color of blue separately (comma separated) (R,G,B)<br>
- values from 0 to 255 in steps of 1
- </li>
- <li>
- <i>adjustGreen <0,255,0></i><br>
- adjust each color of green separately (comma separated) (R,G,B)<br>
- values from 0 to 255 in steps of 1
- </li>
- <li>
- <i>adjustRed <255,0,0></i><br>
- adjust each color of red separately (comma separated) (R,G,B)<br>
- values from 0 to 255 in steps of 1
- </li>
- <li>
- <i>binary <restart/stop></i><br>
- restart or stop the hyperion binary<br>
- only available after successful "get <name> configFiles"
- </li>
- <li>
- <i>blacklevel <0.00,0.00,0.00></i><br>
- adjust blacklevel of each color separately (comma separated) (R,G,B)<br>
- values from 0.00 to 1.00 in steps of 0.01
- </li>
- <li>
- <i>clear <1000></i><br>
- clear a specific priority channel
- </li>
- <li>
- <i>clearall</i><br>
- clear all priority channels / switch to Ambilight mode
- </li>
- <li>
- <i>colorTemperature <255,255,255></i><br>
- adjust temperature of each color separately (comma separated) (R,G,B)<br>
- values from 0 to 255 in steps of 1
- </li>
- <li>
- <i>configFile <filename></i><br>
- restart the Hyperion server with the given configuration file (files will be listed automatically from the given directory in attribute hyperionConfigDir)<br>
- please omit the double extension of the file name (.config.json)<br>
- only available after successful "get <name> configFiles"
- </li>
- <li>
- <i>correction <255,255,255></i><br>
- adjust correction of each color separately (comma separated) (R,G,B)<br>
- values from 0 to 255 in steps of 1
- </li>
- <li>
- <i>dim <percent> [duration] [priority]</i><br>
- dim the rgb light to given percentage with optional duration in seconds and optional priority
- </li>
- <li>
- <i>dimDown [delta]</i><br>
- dim down rgb light by steps defined in attribute hyperionDimStep or by given value (default: 10)
- </li>
- <li>
- <i>dimUp [delta]</i><br>
- dim up rgb light by steps defined in attribute hyperionDimStep or by given value (default: 10)
- </li>
- <li>
- <i>effect <effect> [duration] [priority] [effectargs]</i><br>
- set effect (replace blanks with underscore) with optional duration in seconds and priority<br>
- effectargs can also be set as very last argument - must be a JSON string without any whitespace
- </li>
- <li>
- <i>gamma <1.90,1.90,1.90></i><br>
- adjust gamma of each color separately (comma separated) (R,G,B)<br>
- values from 0.00 to 5.00 in steps of 0.01
- </li>
- <li>
- <i>luminanceGain <1.00></i><br>
- adjust luminanceGain<br>
- values from 0.00 to 5.00 in steps of 0.01
- </li>
- <li>
- <i>luminanceMinimum <0.00></i><br>
- adjust luminanceMinimum<br>
- values from 0.00 to 5.00 in steps of 0.01
- </li>
- <li>
- <i>mode <clearall|effect|off|rgb></i><br>
- set the light in the specific mode with its previous value
- </li>
- <li>
- <i>off</i><br>
- set the light off while the color is black
- </li>
- <li>
- <i>on</i><br>
- set the light on and restore previous state
- </li>
- <li>
- <i>reopen</i><br>
- reopen the connection to the hyperion server
- </li>
- <li>
- <i>rgb <RRGGBB> [duration] [priority]</i><br>
- set color in RGB hex format with optional duration in seconds and priority
- </li>
- <li>
- <i>saturationGain <1.10></i><br>
- adjust saturationGain<br>
- values from 0.00 to 5.00 in steps of 0.01
- </li>
- <li>
- <i>saturationLGain <1.00></i><br>
- adjust saturationLGain<br>
- values from 0.00 to 5.00 in steps of 0.01
- </li>
- <li>
- <i>threshold <0.16,0.16,0.16></i><br>
- adjust threshold of each color separately (comma separated) (R,G,B)<br>
- values from 0.00 to 1.00 in steps of 0.01
- </li>
- <li>
- <i>toggle</i><br>
- toggles the light between on and off
- </li>
- <li>
- <i>toggleMode</i><br>
- toggles through all modes
- </li>
- <li>
- <i>valueGain <1.70></i><br>
- adjust valueGain<br>
- values from 0.00 to 5.00 in steps of 0.01
- </li>
- <li>
- <i>whitelevel <0.70,0.80,0.90></i><br>
- adjust whitelevel of each color separately (comma separated) (R,G,B)<br>
- values from 0.00 to 1.00 in steps of 0.01
- </li>
- </ul>
- <br>
- <a name="Hyperion_get"></a>
- <p><b>Get</b></p>
- <ul>
- <li>
- <i>configFiles</i><br>
- get the available config files in directory from attribute hyperionConfigDir<br>
- File names must have no spaces and must end with .config.json .<br>
- 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>
- Please watch the log for possible errors while getting config files.
- </li>
- <li>
- <i>devStateIcon</i><br>
- get the current devStateIcon
- </li>
- <li>
- <i>statusRequest</i><br>
- get the state of the Hyperion server,<br>
- get also the internals of Hyperion including available effects
- </li>
- </ul>
- <br>
- <a name="Hyperion_attr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <i>disable</i><br>
- stop polling and disconnect<br>
- default: 0
- </li>
- <li>
- <i>disabledForIntervals</i><br>
- stop polling in given time frames<br>
- default:
- </li>
- <li>
- <i>hyperionBin</i><br>
- path to the hyperion daemon<br>
- OpenELEC users may set hyperiond.sh as daemon<br>
- default: /usr/bin/hyperiond
- </li>
- <li>
- <i>hyperionConfigDir</i><br>
- path to the hyperion configuration files<br>
- default: /etc/hyperion/
- </li>
- <li>
- <i>hyperionCustomEffects</i><br>
- space separated list of JSON strings (without spaces - please replace spaces in effect names with underlines)<br>
- 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>
- 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}}
- </li>
- <li>
- <i>hyperionDefaultDuration</i><br>
- default duration<br>
- default: 0 = infinity
- </li>
- <li>
- <i>hyperionDefaultPriority</i><br>
- default priority<br>
- default: 0 = highest priority
- </li>
- <li>
- <i>hyperionDimStep</i><br>
- dim step for dimDown/dimUp<br>
- default: 10 (percent)
- </li>
- <li>
- <i>hyperionGainStep</i><br>
- valueGain step for valueGainDown/valueGainUp<br>
- default: 0.1
- </li>
- <li>
- <i>hyperionNoSudo</i><br>
- disable sudo for non-root ssh user<br>
- default: 0
- </li>
- <li>
- <i>hyperionSshUser</i><br>
- user name for executing SSH commands<br>
- default: pi
- </li>
- <li>
- <i>hyperionToggleModes</i><br>
- modes and order of toggleMode as comma separated list (min. 2 modes, max. 4 modes, each mode only once)<br>
- default: clearall,rgb,effect,off
- </li>
- <li>
- <i>hyperionVersionCheck</i><br>
- disable hyperion version check to (maybe) support prior versions<br>
- DO THIS AT YOUR OWN RISK! FHEM MAY CRASH UNEXPECTEDLY!<br>
- default: 1
- </li>
- <li>
- <i>queryAfterSet</i><br>
- 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>
- This is only used if periodically polling is enabled, without this polling the state will be queried automatically after set.<br>
- default: 1
- </li>
- </ul>
- <br>
- <a name="Hyperion_read"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- <i>adjustBlue</i><br>
- each color of blue separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>adjustGreen</i><br>
- each color of green separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>adjustRed</i><br>
- each color of red separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>blacklevel</i><br>
- blacklevel of each color separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>colorTemperature</i><br>
- temperature of each color separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>configFile</i><br>
- active/previously loaded configuration file, double extension (.config.json) will be omitted
- </li>
- <li>
- <i>correction</i><br>
- correction of each color separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>dim</i><br>
- active/previous dim value (rgb light)
- </li>
- <li>
- <i>duration</i><br>
- active/previous/remaining primary duration in seconds or infinite
- </li>
- <li>
- <i>effect</i><br>
- active/previous effect
- </li>
- <li>
- <i>effectArgs</i><br>
- active/previous effect arguments as JSON
- </li>
- <li>
- <i>gamma</i><br>
- gamma for each color separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>id</i><br>
- id of the Hyperion server
- </li>
- <li>
- <i>lastError</i><br>
- last occured error while communicating with the Hyperion server
- </li>
- <li>
- <i>luminanceGain</i><br>
- current luminanceGain
- </li>
- <li>
- <i>luminanceMinimum</i><br>
- current luminanceMinimum
- </li>
- <li>
- <i>mode</i><br>
- current mode
- </li>
- <li>
- <i>mode_before_off</i><br>
- previous mode before off
- </li>
- <li>
- <i>priority</i><br>
- active/previous priority
- </li>
- <li>
- <i>rgb</i><br>
- active/previous rgb
- </li>
- <li>
- <i>saturationGain</i><br>
- active saturationGain
- </li>
- <li>
- <i>saturationLGain</i><br>
- active saturationLGain
- </li>
- <li>
- <i>serverResponse</i><br>
- last Hyperion server response (success/ERROR)
- </li>
- <li>
- <i>state</i><br>
- current state
- </li>
- <li>
- <i>threshold</i><br>
- threshold of each color separately (comma separated) (R,G,B)
- </li>
- <li>
- <i>valueGain</i><br>
- valueGain - gain of the Ambilight
- </li>
- <li>
- <i>whitelevel</i><br>
- whitelevel of each color separately (comma separated) (R,G,B)
- </li>
- </ul>
- </ul>
- <p><a name="I2C_BH1750"></a>
- <h3>I2C_BH1750</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_BH1750'>DE</a>]</div>
- <ul>
- <a name="I2C_BH1750"></a>
- <p>
- Module for the I<sup>2</sup>C BH1750 light sensor.
- The BH1750 sensor supports a luminous flux from 0 up to 120k lx
- and a resolution up to 0.11lx.
- It supports different modes to be able to cover this large range of
- data. <br>
- The I2C_BH1750 module tries always to get
- the luminosity data from the sensor as good as possible. To achieve
- this the module first reads flux data in the least sensitive mode and then
- decides which mode to take to get best results.
-
- <br><br>
-
- For the I<sup>2</sup>C bus the same things are valid as described in the
- <a href="#I2C_TSL2561">I2C_TSL2561</a>
- module.<br>
- <b>Define</b>
- <ul>
- <code>define BH1750 I2C_BH1750 [I2C address]</code><br><br>
- I2C address must be 0x23 or 0x5C (if omitted default address 0x23 is used)
- <br>
- Examples:
- <pre>
- # define IO-Module:
- define I2C_2 RPII2C 2
- # Use IODev I2C_2 with default i2c address 0x23
- # set poll interval to 1 min
- # generate luminosity value only if difference to last value is at least 10%
- define BH1750 I2C_BH1750
- attr BH1750 IODev I2C_2
- attr BH1750 poll_interval 1
- attr BH1750 percentdelta 10
- </pre>
- </ul>
- <b>Set</b>
- <ul>
- <li><code>set <device name> update</code><br>
- Force immediate illumination measurement and restart a
- new poll_interval.
- Note that the new readings are not yet available after set returns
- because the
- measurement is performed asynchronously. Depending on the flux value
- this may require more than one second to complete.<br>
- </li>
- <li><code>set <device name> deleteminmax</code><br>
- Delete the minimum maximum readings to start new
- min/max measurement
- </li>
- </ul>
- <p>
- <b>Readings</b>
- <ul>
- <li>luminosity<br>
- Illumination measurement in the range of 0 to 121557 lx.<br>
- The generated luminosity value is stored with up to one
- fractional digit for values below 100 and
- rounded to 3 significant digits for all other values.
- Compared with the accuracy of the sensor it makes no
- sense to store the values with more precision.
- </li>
- <li>minimum<br>
- minimum of measured luminosity
- </li>
- <li>maximum<br>
- maximum of measured luminosity
- </li>
- <li>state<br>
- Default: Defined, Ok, Saturated, I2C Error
- </li>
- </ul>
- <p>
-
- <a name="I2C_BH1750attr"></a>
- <b>Attributes</b>
- <ul>
- <li>IODev<br>
- Set the name of an IODev module like RPII2C<br>
- Default: undefined<br>
- </li>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the sensor for new measured values.
- By changing this attribute a new illumination measurement will be triggered.<br>
- valid values: 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 30, 60<br>
- </li>
- <li>percentdelta<br>
- If set a luminosity reading is only generated if
- the difference between the current luminosity value and the last reading is
- at least percentdelta percents.<br>
- </li>
- <li>correction<br>
- Linear correction factor to be applied to the sensor value.
- Compared with a commercial light meter it seems that the values for my
- BH1750 are about 25% to low in day light (correction 1.25).
- The TLS2561 compares much better with the light meter but has the disadvantage
- that it saturates at about 40k lux.<br>
- The correction factor can also be used if your sensor is behind an opal glass.<br>
- valid range: 0.5 to 2.0<br>
- </li>
- </ul>
- <p>
- <br>
- </ul>
- <p><a name="I2C_BME280"></a>
- <h3>I2C_BME280</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_BME280'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_BME280">de</a>)
- <ul>
- <a name="I2C_BME280"></a>
- Provides an interface to the digital pressure/humidity sensor BME280
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <b>Define</b>
- <ul>
- <code>define BME280 I2C_BME280 [<I2C Address>]</code><br><br>
- without defined <code><I2C Address></code> 0x76 will be used as address<br>
- <br>
- Examples:
- <pre>
- define BME280 I2C_BME280 0x77
- attr BME280 poll_interval 5
- </pre>
- </ul>
- <a name="I2C_BME280set"></a>
- <b>Set</b>
- <ul>
- <code>set BME280 <readValues></code>
- <br><br>
- Reads current temperature, humidity and pressure values from the sensor.<br>
- Normaly this execute automaticly at each poll intervall. You can execute
- this manually if you want query the current values.
- <br><br>
- </ul>
- <a name="I2C_BME280attr"></a>
- <b>Attributes</b>
- <ul>
- <li>oversampling_t,oversampling_h,oversampling_p<br>
- Controls the oversampling settings of the temperature,humidity or pressure measurement in the sensor.<br>
- Default: 1, valid values: 0, 1, 2, 3, 4, 5<br>
- 0 switches the respective measurement off<br>
- 1 to 5 complies to oversampling value 2^value/2<br><br>
- </li>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the sensor for new measured
- values.<br>
- Default: 5, valid values: any whole number<br><br>
- </li>
- <li>roundTemperatureDecimal,roundHumidityDecimal,roundPressureDecimal<br>
- Round temperature, humidity or pressure values to given decimal places.<br>
- Default: 1, valid values: 0, 1, 2<br><br>
- </li>
- <li>altitude<br>
- if set, this altitude is used for calculating the pressure related to sea level (nautic null) NN<br><br>
- Note: this is a global attributes, e.g<br>
- <code>attr global altitude 220</code>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul><br>
- </ul>
- <p><a name="I2C_BMP180"></a>
- <h3>I2C_BMP180</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_BMP180'>DE</a>]</div>
- <ul>
- <a name="I2C_BMP180"></a>
- <p>
- With this module you can read values from the digital pressure sensors BMP180 and BMP085
- via the i2c bus on Raspberry Pi.<br><br>
- <b>There are two possibilities connecting to I2C bus:</b><br>
- <ul>
- <li><b>via RPII2C module</b><br>
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br><br>
- </li>
- <li><b>via HiPi library</b><br>
- Add these two lines to your <b>/etc/modules</b> file to load the I2C relevant kernel modules
- automaticly during booting your Raspberry Pi.<br>
- <code><pre>i2c-bcm2708
- i2c-dev</pre></code>
- Install HiPi perl modules:<br>
- <code><pre>wget http://raspberry.znix.com/hipifiles/hipi-install
- perl hipi-install</pre></code>
- To change the permissions of the I2C device create file:<br>
- <code><pre> /etc/udev/rules.d/98_i2c.rules</pre></code>
- with this content:<br>
- <code><pre>SUBSYSTEM=="i2c-dev", MODE="0666"</pre></code>
- <b>Reboot</b><br><br>
- To use the sensor on the second I2C bus at P5 connector
- (only for version 2 of Raspberry Pi) you must add the bold
- line of following code to your FHEM start script:
- <code><pre> case "$1" in
- 'start')
- <b>sudo hipi-i2c e 0 1</b>
- ...</pre></code>
- </li></ul>
- <p>
-
- <b>Define</b>
- <ul>
- <code>define BMP180 I2C_BMP180 [<I2C device>]</code><br><br>
- <I2C device> must not be used if you connect via RPII2C module. For HiPi it's mandatory. <br>
- <br>
- Examples:
- <pre>
- define BMP180 I2C_BMP180 /dev/i2c-0
- attr BMP180 oversampling_settings 3
- attr BMP180 poll_interval 5
- </pre>
- <pre>
- define BMP180 I2C_BMP180
- attr BMP180 IODev RPiI2CMod
- attr BMP180 oversampling_settings 3
- attr BMP180 poll_interval 5
- </pre>
- </ul>
- <a name="I2C_BMP180set"></a>
- <b>Set</b>
- <ul>
- <code>set BMP180 <readValues></code>
- <br><br>
- Reads the current temperature and pressure values from sensor.<br>
- Normaly this execute automaticly at each poll intervall. You can execute
- this manually if you want query the current values.
- <br><br>
- </ul>
- <a name="I2C_BMP180get"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="I2C_BMP180attr"></a>
- <b>Attributes</b>
- <ul>
- <li>oversampling_settings<br>
- Controls the oversampling setting of the pressure measurement in the sensor.<br>
- Default: 3, valid values: 0, 1, 2, 3<br><br>
- </li>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the sensor for new measured
- values.<br>
- Default: 5, valid values: 1, 2, 5, 10, 20, 30<br><br>
- </li>
- <li>roundTemperatureDecimal<br>
- Round temperature values to given decimal places.<br>
- Default: 1, valid values: 0, 1, 2<br><br>
- </li>
- <li>roundPressureDecimal<br>
- Round temperature values to given decimal places.<br>
- Default: 1, valid values: 0, 1, 2<br><br>
- </li>
- <li>altitude<br>
- if set, this altitude is used for calculating the pressure related to sea level (nautic null) NN<br><br>
- Note: this is a global attributes, e.g<br>
- <ul>
- attr global altitude 220
- </ul>
- </li>
- </ul>
- <br>
- <b>Notes</b>
- <ul>
- <li>I2C bus timing<br>
- For all sensor operations an I2C interface with blocking IO is assumed (e.g. RPII2C).
- If you use an I2C interface with non-blocking IO (e.g. FRM over ethernet) operation errors may occur,
- especially if setting the attribute oversampling_settings to a value higher than 1.
- This may be compensated depending on I2C interface used. For Firmata try setting the attribute
- i2c-config in the FRM module to a value of about 30000 microseconds.<br><br>
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="I2C_DS1307"></a>
- <h3>I2C_DS1307</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_DS1307'>DE</a>]</div>
- <ul>
- reads a DS1307 real-time clock chip via I2C.
- Requires a defined <a href="#I2C">I2C</a>-device to work.<br>
- <a name="I2C_DS1307define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_DS1307 <i2c-address></code> <br>
- Specifies the I2C_DS1307 device.<br>
- <li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
- </ul>
-
- <br>
- <a name="I2C_DS1307set"></a>
- <b>Set</b><br>
- <ul>
- <li><code>set <name> datetime</code>; set DS1307 time. Format is JJJJ-MM-DD HH:MM:SSdisplayed><br></li>
- <li><code>set <name> now</code><br></li>
- </ul>
-
- <a name="I2C_I2Cget"></a>
- <b>Get</b><br>
- <ul>
- N/A<br>
- </ul><br>
- <a name="I2C_DS1307attr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>poll_interval <seconds></li>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#I2C">I2C</a> to use. (Optional, only required if there is more
- than one I2C-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul>
- </ul>
- <br>
- <p><a name="I2C_EEPROM"></a>
- <h3>I2C_EEPROM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_EEPROM'>DE</a>]</div>
- <ul>
- <a name="I2C_EEPROM"></a>
- Provides an interface to an I2C EEPROM.<br>
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_EEPROMDefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_EEPROM <I2C Address></code><br>
- where <code><I2C Address></code> is without direction bit<br>
- </ul>
- <a name="I2C_EEPROMSet"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <byte address> <value></code><br><br>
- where <code><byte address></code> is a number (0..device specific) and <code><value></code> is a number (0..255)<br>
- both numbers can be written in decimal or hexadecimal notation.<br>
- <br>
- Example:
- <ul>
- <code>set eeprom1 0x02 0xAA</code><br>
- <code>set eeprom1 2 170</code><br>
- </ul><br>
- </ul>
- <a name="I2C_EEPROMGet"></a>
- <b>Get</b>
- <ul>
- <code>get <name></code>
- <br><br>
- refreshes all readings
- </ul><br>
- <ul>
- <code>get <name> <byte address> [Bit<bitnumber(0..7)>]</code>
- <br><br>
- returnes actual reading of stated <byte address> or a single bit of <byte address><br>
- Values are readout from readings, NOT from device!
- </ul><br>
-
- <a name="I2C_EEPROMAttr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the EEPROM content<br>
- Default: -, valid values: decimal number<br><br>
- </li>
- <li>EEPROM_size<br>
- Sets the storage size of the EEPROM<br>
- Default: 128, valid values: 128 (128bit), 2k (2048bit)<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="I2C_EMC1001"></a>
- <h3>I2C_EMC1001</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_EMC1001'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_EMC1001">de</a>)
- <ul>
- <a name="I2C_EMC1001"></a>
- Provides an interface to the digital temperature sensor EMC1001
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <b>Define</b>
- <ul>
- <code>define EMC1001 I2C_EMC1001 [<I2C Address>]</code><br><br>
- without defined <code><I2C Address></code> 0x48 will be used as address<br>
- <br>
- Examples:
- <pre>
- define EMC1001 I2C_EMC1001 0x48
- attr EMC1001 poll_interval 5
- attr roundTemperatureDecimal 2
- </pre>
- </ul>
- <a name="I2C_EMC1001set"></a>
- <b>Set</b>
- <ul>
- <code>set EMC1001 <readValues></code>
- <br><br>
- Reads current temperature values from the sensor.<br>
- Normaly this execute automaticly at each poll intervall. You can execute
- this manually if you want query the current values.
- <br><br>
- </ul>
- <a name="I2C_EMC1001attr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the sensor for new measured
- values.<br>
- Default: 5, valid values: any whole number<br><br>
- </li>
- <li>roundTemperatureDecimal<br>
- Round temperature values to given decimal places.<br>
- Default: 1, valid values: 0, 1, 2<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul><br>
- </ul>
- <p><a name="I2C_HDC1008"></a>
- <h3>I2C_HDC1008</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_HDC1008'>DE</a>]</div>
- <ul>
- <a name="I2C_HDC1008"></a>
- Provides an interface to the I2C_HDC1008 I2C Humidity sensor from <a href=" http://www.ti.com">Texas Instruments</a>.
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_HDC1008Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_HDC1008 [<I2C Address>]</code><br>
- where <code><I2C Address></code> is an 2 digit hexadecimal value<br>
- </ul>
- <a name="I2C_HDC1008Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> Update</code><br>
- Reads the current temperature and humidity values from sensor.<br><br>
- <code>set <name> Reset</code><br>
- Resets the sensor
- <code>set <name> Heater {on|off}</code><br>
- turns the sensor heater on or off
- </ul>
- <a name="I2C_HDC1008Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval<br>
- Set the polling interval in minutes to query data from sensor<br>
- Default: 5, valid values: 1,2,5,10,20,30<br><br>
- </li>
- <li>Resolution_Temperature<br>
- resolution for measurement temperature.<br>
- Standard: 14Bit, valid values: 11Bit, 14Bit<br><br>
- </li>
- <li>Resolution_Humidity<br>
- resolution for measurement humidity.<br>
- Standard: 14Bit, valid values: 8Bit, 11Bit, 14Bit<br><br>
- </li>
- <li>roundHumidityDecimal<br>
- Number of decimal places for humidity value<br>
- Default: 1, valid values: 0 1 2,...<br><br>
- </li>
- <li>roundTemperatureDecimal<br>
- Number of decimal places for temperature value<br>
- Default: 1, valid values: 0,1,2,...<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- </ul><br>
- </ul>
- <p><p><a name="I2C_K30"></a>
- <h3>I2C_K30</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_K30'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_K30">de</a>)
- <ul>
- <a name="I2C_K30"></a>
- Provides an interface to the K30 CO2 sensor from <a href="www.senseair.com">SenseAir</a>. This module
- expects the sensor to be connected via I2C (for a quick summary, see
- <a href="http://co2meters.com/Documentation/AppNotes/AN142-RaspberryPi-K_series.pdf">Application Note 142 "K-30/K-33 I2C on Raspberry Pi"</a>
- from co2meters.com).<br>
- On my Raspberry Pi 2, I needed to reduce I2C frequency to 90 kHz, otherwise most read/write cycles failed (add
- "options i2c_bcm2708 baudrate=90000", e.g. to /etc/modprobe.d/i2c-options.conf). I still see sporadic errors (about 5% of all readings
- 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
- doing CO2 measurement.
- The I2C messages are sent through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_K30Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_K30 [<I2C Address>]</code><br>
- where <code><I2C Address></code> is the configured I2C address of the sensor (default: 104, i.e. 0x68) <br>
- </ul>
- <a name="I2C_K30Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> readValues</code><br>
- Reads the current CO2 value from sensor.<br><br>
- </ul>
- <a name="I2C_K30Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query data from sensor<br>
- Default: 5, valid values: 1,2,5,10,20,30<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul><br>
- </ul>
- <p><a name="I2C_LCD"></a>
- <h3>I2C_LCD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_LCD'>DE</a>]</div>
- <ul>
- drives LiquidCrystal Displays (LCD) that are connected to Firmata (via I2C).
- Supported are Displays that use a PCF8574T as I2C Bridge (as found on eBay when searching for
- 'LCD' and 'I2C'). Tested is the 1602 type (16 characters, 2 Lines), the 2004 type (and other cheap chinise-made
- I2C-LCDs for Arduino) ship with the same library, so they should work as well.
- See <a name="LiquidCrystal tutorial">http://arduino.cc/en/Tutorial/LiquidCrystal</a> for details about
- how to hook up the LCD to the arduino.
- Requires a defined <a href="#I2C">I2C</a>-device to work.<br>
- this I2C-device has to be configures for i2c by setting attr 'i2c-config' on the I2C-device<br>
-
- <a name="I2C_LCDdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_LCD <size-x> <size-y> <i2c-address></code> <br>
- Specifies the I2C_LCD device.<br>
- <li>size-x is the number of characters per line</li>
- <li>size-y is the numbers of rows.</li>
- <li>i2c-address is the (device-specific) address of the ic on the i2c-bus</li>
- </ul>
-
- <br>
- <a name="I2C_LCDset"></a>
- <b>Set</b><br>
- <ul>
- <li><code>set <name> text <text to be displayed></code><br></li>
- <li><code>set <name> home</code><br></li>
- <li><code>set <name> clear</code><br></li>
- <li><code>set <name> display on|off</code><br></li>
- <li><code>set <name> cursor <...></code><br></li>
- <li><code>set <name> scroll left|right</code><br></li>
- <li><code>set <name> backlight on|off</code><br></li>
- <li><code>set <name> reset</code><br></li>
- <li><code>set <name> writeXY x-pos,y-pos,len[,l] <text to be displayed></code><br></li>
- </ul>
-
- <a name="I2C_I2Cget"></a>
- <b>Get</b><br>
- <ul>
- N/A<br>
- </ul><br>
- <a name="I2C_LCDattr"></a>
- <b>Attributes</b><br>
- <ul>
- <li>backLight <on|off></li>
- <li>autoClear <on|off></li>
- <li>autoBreak <on|off></li>
- <li>restoreOnStartup <on|off></li>
- <li>restoreOnReconnect <on|off></li>
- <li>replaceRegex ä=ae,cd+=ef,g=\x{DF}<br/>
- specify find=replace regex pattern eg for non-printable characters. \x{DF} will become char 223, which is º on my lcd.
- </li>
- <li>customChar<0-7><br/>
- 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>
- <li><a href="#IODev">IODev</a><br>
- Specify which <a href="#I2C">I2C</a> to use. (Optional, only required if there is more
- than one I2C-device defined.)
- </li>
- <li><a href="#eventMap">eventMap</a><br></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a><br></li>
- </ul>
- </ul>
- <br>
- <p><a name="I2C_LM75A"></a>
- <h3>I2C_LM75A</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_LM75A'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_LM75A">de</a>)
- <ul>
- <a name="I2C_LM75A"></a>
- Provides an interface to the LM75A I2C Temperature sensor.</a>.
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_LM75ADefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_LM75A [<I2C Address>]</code><br>
- where <code><I2C Address></code> is an 2 digit hexadecimal value<br>
- </ul>
- <a name="I2C_LM75ASet"></a>
- <b>Set</b>
- <ul>
- <code>set <name> readValues</code><br>
- Reads the current temperature values from sensor.<br><br>
- </ul>
- <a name="I2C_LM75AAttr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query data from sensor<br>
- Default: 5, valid values: 1,2,5,10,20,30<br><br>
- </li>
- <li>roundTemperatureDecimal<br>
- Number of decimal places for temperature value<br>
- Default: 1, valid values: 0 1 2<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul><br>
- </ul>
- <p><a name="I2C_MCP23008"></a>
- <h3>I2C_MCP23008</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_MCP23008'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_MCP23008">de</a>)
- <ul>
- <a name="I2C_MCP23008"></a>
- 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>
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_MCP23008Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_MCP23008 <I2C Address></code><br>
- where <code><I2C Address></code> is without direction bit<br>
- </ul>
- <a name="I2C_MCP23008Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <port[,port[...]]> <value></code><br><br>
- where <code><port></code> is one of PortA0 to PortA7 and <code><value></code> is one of:<br>
- <ul>
- <code>
- off<br>
- on<br>
- </code>
- </ul>
- <br>
- Example:
- <ul>
- <code>set mod1 PortA4 on</code><br>
- <code>set mod1 PortA4,PortA6 off</code><br>
- <code>set mod1 PortA4,A6 on</code><br>
- </ul><br>
- </ul>
- <a name="I2C_MCP23008Get"></a>
- <b>Get</b>
- <ul>
- <code>get <name></code>
- <br><br>
- refreshes all readings
- </ul><br>
- <a name="I2C_MCP23008Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the GPIO's level<br>
- Default: -, valid values: decimal number<br><br>
- </li>
- <li>OutputPorts<br>
- Comma separated list of ports that are used as Output<br>
- Ports not in this list can't be written<br>
- Default: no, valid values: A0-A7<br><br>
- </li>
- <li>OnStartup<br>
- Comma separated list of output ports and their desired state after start<br>
- Without this atribut all output ports will set to last state<br>
- Default: -, valid values: <port>=on|off|last where <port> = A0-A7<br><br>
- </li>
- <li>Pullup<br>
- Comma separated list of input ports which switch on their internal 100k pullup<br>
- Default: -, valid values: A0-A7<br><br>
- </li>
- <li>Interrupt<br>
- Comma separated list of input ports which will trigger the IntA/B pin<br>
- Default: -, valid values: A0-A7<br><br>
- </li>
- <li>invert_input<br>
- Comma separated list of input ports which use inverted logic<br>
- Default: -, valid values: A0-A7<br><br>
- </li>
- <li>InterruptOut<br>
- Configuration options for INT output pin<br>
- Values:<br>
- <ul>
- <li>
- active-low (INT output is active low)
- </li>
- <li>
- active-high (INT output is active high)
- </li>
- <li>
- open-drain (INTA output is open drain)
- </li><br>
- </ul>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="I2C_MCP23017"></a>
- <h3>I2C_MCP23017</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_MCP23017'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_MCP23017">de</a>)
- <ul>
- <a name="I2C_MCP23017"></a>
- 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>
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_MCP23017Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_MCP23017 <I2C Address></code><br>
- where <code><I2C Address></code> is without direction bit<br>
- </ul>
- <a name="I2C_MCP23017Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <port[,port[...]]> <value></code><br><br>
- where <code><port></code> is one of PortA0 to PortA7 / PortB0 to PortB7 and <code><value></code> is one of:<br>
- <ul>
- <code>
- off<br>
- on<br>
- </code>
- </ul>
- <br>
- Example:
- <ul>
- <code>set mod1 PortA4 on</code><br>
- <code>set mod1 PortA4,PortB6 off</code><br>
- <code>set mod1 PortA4,B6 on</code><br>
- </ul><br>
- </ul>
- <a name="I2C_MCP23017Get"></a>
- <b>Get</b>
- <ul>
- <code>get <name></code>
- <br><br>
- refreshes all readings
- </ul><br>
- <a name="I2C_MCP23017Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the GPIO's level<br>
- Default: -, valid values: decimal number<br><br>
- </li>
- <li>OutputPorts<br>
- Comma separated list of ports that are used as Output<br>
- Ports not in this list can't be written<br>
- Default: no, valid values: A0-A7, B0-B7<br><br>
- </li>
- <li>OnStartup<br>
- Comma separated list of output ports and their desired state after start<br>
- Without this atribut all output ports will set to last state<br>
- Default: -, valid values: <port>=on|off|last where <port> = A0-A7, B0-B7<br><br>
- </li>
- <li>Pullup<br>
- Comma separated list of input ports which switch on their internal 100k pullup<br>
- Default: -, valid values: A0-A7, B0-B7<br><br>
- </li>
- <li>Interrupt<br>
- Comma separated list of input ports which will trigger the IntA/B pin<br>
- Default: -, valid values: A0-A7, B0-B7<br><br>
- </li>
- <li>invert_input<br>
- Comma separated list of input ports which use inverted logic<br>
- Default: -, valid values: A0-A7, B0-B7<br><br>
- </li>
- <li>InterruptOut<br>
- Configuration options for INTA/INTB output pins<br>
- Values:<br>
- <ul>
- <li>
- separate_active-low (INTA/INTB outputs are separate for both ports and active low)
- </li>
- <li>
- separate_active-high (INTA/INTB outputs are separate for both ports and active high)
- </li>
- <li>
- separate_open-drain (INTA/INTB outputs are separate for both ports and open drain)
- </li>
- <li>
- connected_active-low (INTA/INTB outputs are internally connected and active low)
- </li>
- <li>
- connected_active-high (INTA/INTB outputs are internally connected and active high)
- </li>
- <li>
- connected_open-drain (INTA/INTB outputs are internally connected and open drain)
- </li><br>
- </ul>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="I2C_MCP342x"></a>
- <h3>I2C_MCP342x</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_MCP342x'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_MCP342x">de</a>)
- <ul>
- <a name="I2C_MCP342x"></a>
- Provides an interface to the MCP3422/3/4 A/D converter.
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_MCP342xDefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_MCP342x [[<I2C Address>] <n channels>]</code><br>
- where <I2C Address> is without direction bit and <n channels> is the number of A/D channels<br><br>
- </ul>
- <a name="I2C_MCP342xSet"></a>
- <b>Get</b>
- <ul>
- <code>get <name> [[[<channel>] <resolution> ] <gain>]</code><br>
- Returns the level on specific <channel>. <resolution> and <gain> will override attibutes for actual operation.
- Without attributes only the readings will be refreshed.<br><br>
- </ul>
- <a name="I2C_MCP342xAttr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query data from sensor<br>
- Default: 5, valid values: 1,2,5,10,20,30<br><br>
- </li>
- Following attributes are separate for all channels.<br><br>
- <li>ch1resolution<br>
- resolution settings<br>
- the bigger the resolution the longer the conversion time.<br>
- Default: 12, valid values: 12,14,16,18<br><br>
- </li>
- <li>ch1gain<br>
- gain setting<br>
- Important: the gain setting will reduce the measurement range an may produce an overflow. In this case "overflow" will be added to reading<br>
- Default: 1, valid values: 1,2,4,8<br><br>
- </li>
- <li>ch1factor<br>
- correction factor (will be mutiplied to channel value)<br>
- Default: 1, valid values: number<br><br>
- </li>
- <li>ch1roundDecimal<br>
- Number of decimal places for value<br>
- Default: 3, valid values: 0,1,2,3<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul><br>
- </ul>
- <p><a name="I2C_MMA845X"></a>
- <h3>I2C_MMA845X</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_MMA845X'>DE</a>]</div>
- <ul>
- 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).
- Note that the Freescale/NXP MMA8450 accelerometer, though similar, has a different register set and cannot be addressed by this module.
- <br><br>
- The I2C messages are sent through an interface module like <a href="#RPII2C">RPII2C</a> or <a href="#FRM">FRM</a>,
- so this device must be defined first and assigned as IODev attribute.
- <br><br>
- This module supports the following features:
- <ul>
- <li>read current acceleration (x, y, z)</li>
- <li>calibrate acceleration offsets</li>
- <li>orientation detection</li>
- <li>motion detection (at least one axis above threshold) or freefall detection (all axes below threshold)</li>
- <li>jolt detection (at least one axis change above threshold)</li>
- <li>single and/or double pulse (tap) detection</li>
- <li>detection event latching</li>
- <li>hardware interrupt signalling of detection events</li>
- </ul>
- <br>
- The accelerometer is configured for an output data rate of 200 Hz in normal oversampling mode with the low noise
- filter enabled providing a full scale range of +/-4 g as default. This output data rate can be changed if required.
- <br><br>
- The detection events (orientation, motion/freefall, jolt, pulse) can be signaled by one or two hardware outputs that can
- be used for interrupt driven operations without need for continuous polling. If the event latch is enabled, the events
- and the interrupt signals will remain set until the event source register is read, providing additional event details
- (e.g. axis, direction). With orientation detection the event latch is always enabled.
- <br><br>
- The acceleration measurement output can optionally be passed through a high-pass filter with a selectable cutoff frequency
- effectively eliminating the gravity offset of 1g to provide change detection instead of orientation detection.
- The motion/freefall detection will always bypass the high-pass filter while the jolt and pulse detections will always
- use the high-pass filter with default settings. When using motion detection you would typically not enable the gravity
- axis or set a threshold higher than 1 g.
- <br><br>
- While the orientation detection works well with the default settings the other detection modes typically require fine tuning
- of their parameters. To understand the detection modes and their parameters in detail please refer to the Freescale annotations
- AN4068 (orientation), AN4070 (freefall/motion), AN4071 (jolt) and AN4072 (pulse).
- <br><br>
- Several of the parameters represent a frequency [Hz], a threshold [g]/[°] or a duration [ms]. Their absolute values often
- depend on a combination of register settings requiring lookup tables. This module uses the raw binary values for these
- attributes making fine tuning easier because value granularity is always 1. If you need to translate between binary
- values and absolute values please refer to the device documentation.
- <br><br>
- <a name="I2C_MMA845Xdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <device name> I2C_MMA845X <I2C address></code>
- <br><br>
- <code><I2C address></code> may be 0x1C or 0x1D
- <br><br>
- Example:
- <pre>
- define MMA8452 I2C_MMA845X 0x1D
- attr MMA8452 IODev I2CModule
- attr MMA8452 pollInterval 5
- </pre>
- Notes:
- <ul>
- <br>
- <li>The I2C bus connection must be kept active between write and read with the MMA8451/MMA84512/MMA84513 devices
- (repeated start alias combined write/read). This communication mode is not the default on most platforms:
- <br><br>
- <u>Raspberry</u>:
- <ul>
- <li>Change parameter 'combined' of BCM2708 driver from N to Y.<br>
- Temporary: <code>sudo su - echo -n 1 > /sys/module/i2c_bcm2708/parameters/combined exit</code>.<br>
- Permanent: add <code>echo -n 1 > /sys/module/i2c_bcm2708/parameters/combined</code> to script
- <code>/etc/init.d/rc.local</code>.
- </li>
- <li>Set attribute <code>useHWLib</code> of your RPII2C device to <code>SMBus</code>
- (RPII2C's ioctl mode currently does not support combined write/read mode).
- </li>
- </ul>
- <br>
- <u>Firmata</u>:
- <ul>
- <li>Make sure to call <code>Wire.endTransmission(false)</code>. Currently requires manually changing the
- <code>ino</code> file (Standard Firmata) or <code>I2CFirmata.h</code> (Configurable Firmata).
- </li>
- </ul>
- </li>
- </ul>
- </ul>
- <br>
- <a name="I2C_MMA845Xset"></a>
- <b>Set</b><br>
- <ul>
- <ul>
- <li><code>set <device name> calibrate</code><br>
- Calibrate the acceleration offset based on the next sample assuming 1g gravity on any one axis.<br>
- Prerequisites: Align one axis with gravity and keep device stationary during calibration.
- </li>
- </ul>
- </ul>
- <br>
- <a name="I2C_MMA845Xget"></a>
- <b>Get</b><br>
- <ul>
- <ul>
- <li><code>get <device name> update</code><br>
- Request an update of the acceleration readings.
- </li>
- <br>
- <li><code>get <device name> orientation</code><br>
- Request an update of the orientation reading.
- </li>
- <li><code>get <device name> eventSources</code><br>
- Request an update of the event source readings.
- </li>
- <br>
- <li><code>get <device name> update</code><br>
- Perform manual polling, e.g. when attribute <code>pollInterval</code> is set to zero.
- At least one of <code>pollAccelerations</code>, <code>pollOrientation</code> or <code>pollEventSources</code> should be enabled.
- </li>
- </ul>
- </ul>
- <br>
- <a name="I2C_MMA845Xattr"></a>
- <b>Attributes</b>
- <ul>
- <code>attr <device name> <attribute name> <value></code>
- <br><br>
- Attributes:
- <ul>
- <li><i>IODev</i> <IODev device name><br>
- I2C IODev device name, <i>no default</i>, required
- </li>
- <li><i>pollInterval</i> <seconds><br>
- period for updating acceleration and event source readings, <i>default 10 s</i><br>
- fractional seconds are supported, use 0 to disable polling
- </li>
- <li><i>pollAccelerations</i> 0|1<br>
- include reading of accelerations when polling, <i>default 1</i><br>
- </li>
- <li><i>pollOrientation</i> 0|1<br>
- include reading of orientation when polling, <i>default 1</i><br>
- </li>
- <li><i>pollEventSources</i> 0|1<br>
- include reading of event sources when polling, <i>default 1</i><br>
- </li>
- <li><i>disable</i> 0|1<br>
- disables device (I2C operations), <i>default 0</i>
- </li>
- <li><i>outputDataRate</i> <frequency><br>
- 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>
- affects all timing parameters, is independent of pollInterval
- </li>
- <li><i>highPass</i> <function>[,<function>]<br>
- select which function should use the high-pass filter, may be any of outputData, jolt or pulse, <i>default jolt,pulse</i><br>
- activating the high-pass filter will remove the 1g offset in the gravity direction
- </li>
- <li><i>highPassCutoffFrequency</i> 0 ... 3<br>
- set the high-pass filter cutoff frequency, changes with on output data rate, <i>default 0</i><br>
- 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
- </li>
- <li><i>orientation...</i><br>
- orientation detection parameters, see device manual for details
- </li>
- <li><i>motion...</i><br>
- motion/freefall detection parameters, see device manual for details
- </li>
- <li><i>jolt...</i><br>
- jolt detection parameters, see device manual for details
- </li>
- <li><i>pulse...</i><br>
- pulse (tap) detection parameters, see device manual for details
- </li>
- <li><i>...EventLatch</i> 0|1<br>
- if enabled an event (and the hardware output) will stay latched until the event source register is read, <i>default 0</i><br>
- the corresponding event source reading will provide additional information about the event
- </li>
- <li><i>...Interrupt</i> 0|1|2<br>
- an event will also raise one of two hardware outputs, <i>default 0</i><br>
- use 0 to disable linking an event with an hardware outputs
- </li>
- </ul>
- </ul>
- <br>
- <b>Readings</b>
- <ul>
- <ul>
- <li><i>out...</i><br>
- acceleration for x, y and z axes [g]<br>
- the number of decimal places is limited to 3 to remove a significant amount of noise
- </li>
- <li><i>off...</i><br>
- acceleration offset for x, y and z axes from last calibration [g]<br>
- to adjust offsets manually at runtime, change offset readings and toggle disable attribute
- </li>
- <li><i>orientation</i><br>
- current orientation, orientation detection must be enabled, the reading is only updated on change<br>
- P=portrait + U=up/D=down or L=landscape + L=left/R=right, B=back or F=front, X=z-lockout
- </li>
- <li><i>...Event</i><br>
- source of last event, event and event latch must be enabled, the reading is only updated on change<br>
- motion/jolt/pulse: X, Y or Z for the affected axis preceded by a sign for the direction of the the event<br>
- pulse: additional pulse type indicator postfix S=single or D=double
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="I2C_PCA9532"></a>
- <h3>I2C_PCA9532</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_PCA9532'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_PCA9532">de</a>)
- <ul>
- <a name="I2C_PCA9532"></a>
- Provides an interface to the PCA9532 I2C 16 channel PWM IC.
- The PCA9532 has 2 independent PWM stages and every channel can be attached to on of these stages or directly turned on or off.
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_PCA9532Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_PCA9532 <I2C Address></code><br>
- where <code><I2C Address></code> is an 2 digit hexadecimal value<br>
- </ul>
- <a name="I2C_PCA9532Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <port> <value></code><br><br>
- <ul>
- <li>if <code><port></code> is one of Port0 to Port15, then <code><value></code> will be one of:<br>
- <ul>
- <code>
- off<br>
- on<br>
- PWM0 (output is switched with PWM0 frequency and duty cycle)<br>
- PWM1 (output is switched with PWM1 frequency and duty cycle)<br>
- </code>
- </ul>
- </li>
- <li>
- if <code><port></code> is PWM0 or PWM1, then <code><value></code> is an value between 0 and 255 and stands for the duty cycle of the PWM stage.
- </li>
- </ul>
- <br>
- Examples:
- <ul>
- <code>set mod1 Port4 PWM1</code><br>
- <code>set mod1 PWM1 128</code><br>
- </ul><br>
- </ul>
- <a name="I2C_PCA9532Get"></a>
- <b>Get</b>
- <ul>
- <code>get <name></code>
- <br><br>
- refreshes all readings
- </ul><br>
- <a name="I2C_PCA9532Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the GPIO's level<br>
- Default: -, valid values: decimal number<br><br>
- </li>
- <li>OutputPorts<br>
- Comma separated list of Portnumers that are used as Outputs<br>
- Only ports in this list can be written<br>
- Default: no, valid values: 0 1 2 .. 15<br><br>
- </li>
- <li>OnStartup<br>
- Comma separated list of output ports/PWM registers and their desired state after start<br>
- Without this atribut all output ports will set to last state<br>
- Default: -, valid values: <port>=on|off|PWM0|PWM1|last or PWM0|PWM1=0..255|last where <port> = 0 - 15<br><br>
- </li>
- <li>T0/T1<br>
- Sets PWM0/PWM1 to another Frequency. The Formula is: Fx = 152/(Tx + 1) The corresponding frequency value is shown under internals.<br>
- Default: 0 (152Hz), valid values: 0-255<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="I2C_PCA9685"></a>
- <h3>I2C_PCA9685</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_PCA9685'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_PCA9685">de</a>)
- <ul>
- <a name="I2C_PCA9685"></a>
- Provides an interface to the PCA9685 I2C 16 channel PWM IC.
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_PCA9685Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_PCA9685 <I2C Address> [<I2C Buffer Size>]</code><br>
- where <code><I2C Address></code> can be written as decimal value or 0xnn<br>
- <code><I2C Buffer Size></code> sets the maximum size of the I2C-Packet.
- Without this option the packet size is 30 Bytes (32 incl. Address and Register number).
- For RPII2C this option has no influence, cause it can deal with arbitrary packet sizes.<br>
- </ul>
- <a name="I2C_PCA9685Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <port> <dimvalue> [<delay>]</code><br><br>
- <li>where <code><port></code> is one of Port0 to Port15<br>
- and <code><dimvalue></code> one of<br>
- <ul>
- <code>
- off<br>
- on<br>
- 0..4095<br>
- </code>
- </ul>
- <code><delay></code> defines the switch on time inside the PWM counting loop. It does not have an influence to the duty cycle.
- Default value is 0 and, possible values are 0..4095<br>
- </li><br>
- <li>
- It is also possible to change more than one port at the same time. Just separate them by comma.
- If only the last of the comma separated ports has dimvalue (and delay), all ports will set to the same values.
- Sequently ports will set at once (useful for multi color LED's).<br>
- Also P instead of Port is Possible.
- </li><br>
-
- <br>
- Examples:
- <ul>
- <code>set mod1 Port04 543</code><br>
- <code>set mod1 Port4 434 765</code><br>
- <code>set mod1 Port1, Port14 434 765</code><br>
- <code>set mod1 Port1 on, P14 434 765</code><br>
- </ul><br>
- </ul>
- <a name="I2C_PCA9685Get"></a>
- <b>Get</b>
- <ul>
- <code>get <name></code>
- <br><br>
- refreshes all readings
- </ul><br>
- <a name="I2C_PCA9685Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>SUBADR1,SUBADR2,SUBADR3,ALLCALLADR<br>
- Alternative slave addresses, if you want to control more than one PCA9685 with one define
- Respective flag in modereg1 must be set as well<br>
- Default: SUBADR1=113,SUBADR2=114,SUBADR3=116,ALLCALLADR=112, valid values: valid I2C Address <br><br>
- </li>
- <li>OnStartup<br>
- Comma separated list of output ports/PWM registers and their desired state after start<br>
- Without this atribut all output ports will set to last state<br>
- Default: -, valid values: <port>=on|off|0..4095|last where <port> = 0 - 15<br><br>
- </li>
- <li>prescale<br>
- Sets PWM Frequency. The Formula is: Fx = 25MHz/(4096 * (prescale + 1)).
- The corresponding frequency value is shown under internals.
- If provided, attribute extClock will be used for frequency calculation. Otherwise 25MHz<br>
- Default: 30 (200Hz for 25MHz clock), valid values: 0-255<br><br>
- </li>
- <li>modereg1<br>
- Comma separated list of:
- <ul>
- <li>EXTCLK<br>
- If set the an external connected clock will be used instead of the internal 25MHz oscillator.
- Use the attribute extClock to provide the external oscillater value.
- </li>
- <li>SUBADR1<br>
- If set the PCA9685 responds to I2C-bus SUBADR 1.
- </li>
- <li>SUBADR2<br>
- If set the PCA9685 responds to I2C-bus SUBADR 2.
- </li>
- <li>SUBADR3<br>
- If set the PCA9685 responds to I2C-bus SUBADR 3.
- </li>
- <li>ALLCALLADR<br>
- If set the PCA9685 responds to I2C-bus ALLCALLADR address.
- </li>
- </ul>
- </li>
- <li>modereg2<br>
- Comma separated list of:
- <ul>
- <li>INVRT<br>
- If set the Output logic state is inverted.<br>
- </li>
- <li>OCH<br>
- If set the outputs changes on ACK (after every byte sent).<br>
- Otherwise the output changes on STOP command (bus write action finished)<br>
- </li>
- <li>OUTDRV<br>
- If set the outputs are configured with a totem pole structure.<br>
- Otherwise the outputs are configured with open-drain.<br>
- </li>
- Behaviour when OE = 1 (if OE = 0 the output will act according OUTDRV configuration):
- <li>OUTNE0<br>
- If set:<br>
- LEDn = 1 when OUTDRV = 1<br>
- LEDn = high-impedance when OUTDRV = 0<br>
- If not set:
- LEDn = 0.<br>
- </li>
- <li>OUTNE1<br>
- LEDn = high-impedance.<br>
- OUTNE1 overrides OUTNE0<br><br>
- </li>
- </ul>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="I2C_PCF8574"></a>
- <h3>I2C_PCF8574</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_PCF8574'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_PCF8574">de</a>)
- <ul>
- <a name="I2C_PCF8574"></a>
- 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>
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_PCF8574Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_PCF8574 <I2C Address></code><br>
- where <code><I2C Address></code> is without direction bit<br>
- </ul>
- <a name="I2C_PCF8574Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <port[,port[...]]> <value></code><br><br>
- <ul>
- <li><code><port></code> is one of Port0 to Port7 and <code><value></code> is one of:<br>
- <ul>
- <code>
- off<br>
- on<br>
- </code>
- </ul>
- </li>
- </ul>
- <br>
- Example:
- <ul>
- <code>set mod1 Port4 on</code><br>
- <code>set mod1 Port4,Port6 off</code><br>
- <code>set mod1 Port4,6 on</code><br>
- </ul><br>
- </ul>
- <a name="I2C_PCF8574Get"></a>
- <b>Get</b>
- <ul>
- <code>get <name></code>
- <br><br>
- refreshes all readings
- </ul><br>
- <a name="I2C_PCF8574Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the GPIO's level<br>
- Default: -, valid values: decimal number<br><br>
- </li>
- <li>InputPorts<br>
- Comma separated list of Portnumers that are used as Inputs<br>
- Ports in this list can't be written<br>
- Default: -, valid values: 0 - 7<br><br>
- </li>
- <li>InvrtPorts<br>
- Comma separated list of Portnumers that will be inverted<br>
- Default: -, valid values: 0 - 7<br><br>
- </li>
- <li>OnStartup<br>
- Comma separated list of output ports and their desired state after start<br>
- Without this atribut all output ports will set to last state<br>
- Default: -, valid values: <port>=on|off|last where <port> = 0 - 7<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="I2C_SHT21"></a>
- <h3>I2C_SHT21</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_SHT21'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_SHT21">de</a>)
- <ul>
- <a name="I2C_SHT21"></a>
- Provides an interface to the SHT21 I2C Humidity sensor from <a href="www.sensirion.com">Sensirion</a>.
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_SHT21Define"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_SHT21 [<I2C Address>]</code><br>
- where <code><I2C Address></code> is an 2 digit hexadecimal value<br>
- </ul>
- <a name="I2C_SHT21Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> readValues</code><br>
- Reads the current temperature and humidity values from sensor.<br><br>
- </ul>
- <a name="I2C_SHT21Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query data from sensor<br>
- Default: 5, valid values: 1,2,5,10,20,30<br><br>
- </li>
- <li>roundHumidityDecimal, roundTemperatureDecimal<br>
- Number of decimal places for humidity or temperature value<br>
- Default: 1, valid values: 0 1 2<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul><br>
- </ul>
- <p><a name="I2C_SHT3x"></a>
- <h3>I2C_SHT3x</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_SHT3x'>DE</a>]</div>
- (en | <a href="commandref_DE.html#I2C_SHT3x">de</a>)
- <ul>
- <a name="I2C_SHT3x"></a>
- Provides an interface to the SHT30/SHT31 I2C Humidity sensor from <a href="http:\\www.sensirion.com">Sensirion</a>.
- The I2C messages are sent through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <a name="I2C_SHT3xDefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> I2C_SHT3x [<I2C Address>]</code><br>
- where <code><I2C Address></code> is an 2 digit hexadecimal value:<br>
- ADDR (pin 2) connected to VSS (supply voltage): 0x44 (default, if <code><I2C Address></code> is not set)<br>
- ADDR (pin 2) connected to VDD (ground): 0x45<br>
- For compatible sensors also other values than 0x44 or 0x45 can be set.<br>
- <br>
- </ul>
- <a name="I2C_SHT3xSet"></a>
- <b>Set</b>
- <ul>
- <code>set <name> readValues</code><br>
- Reads the current temperature and humidity values from sensor.<br><br>
- </ul>
- <a name="I2C_SHT3xAttr"></a>
- <b>Attributes</b>
- <ul>
- <li>poll_interval<br>
- Set the polling interval in minutes to query data from sensor<br>
- Default: 5, valid values: 1,2,5,10,20,30<br><br>
- </li>
- <li>roundHumidityDecimal, roundTemperatureDecimal<br>
- Number of decimal places for humidity or temperature value<br>
- Default: 1, valid values: 0 1 2<br><br>
- </li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul><br>
- </ul>
- <p><a name="I2C_TSL2561"></a>
- <h3>I2C_TSL2561</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#I2C_TSL2561'>DE</a>]</div>
- <ul>
- <a name="I2C_TSL2561"></a>
- <p>
- With this module you can read values from the ambient light sensor TSL2561
- via the i2c bus on Raspberry Pi.<br>
- The luminosity value returned is a good human eye reponse approximation of an
- illumination measurement in the range of 0.1 to 40000+ lux (but not a replacement for a
- precision measurement, relation between measured value and true value may vary by 40%).
- <br><br>
-
- <b>There are two possibilities connecting to I2C bus:</b><br>
- <ul>
- <li><b>via IODev module</b><br>
- The I2C messages are send through an I2C interface module like <a href="#RPII2C">RPII2C</a>, <a href="#FRM">FRM</a>
- or <a href="#NetzerI2C">NetzerI2C</a> so this device must be defined first.<br>
- <b>attribute IODev must be set</b><br>
- <br>
- </li>
- <li><b>via HiPi library</b><br>
- Add these two lines to your <b>/etc/modules</b> file to load the I2C relevant kernel modules
- automaticly during booting your Raspberry Pi.<br>
- <code><pre>
- i2c-bcm2708
- i2c-dev
- </pre></code>
- Install HiPi perl modules:<br>
- <code><pre> wget http://raspberry.znix.com/hipifiles/hipi-install perl hipi-install</pre></code>
- To change the permissions of the I2C device create file:<br>
- <code><pre> /etc/udev/rules.d/98_i2c.rules</pre></code>
- with this content:<br>
- <code><pre> SUBSYSTEM=="i2c-dev", MODE="0666"</pre></code>
- <b>Reboot</b><br>
- <br>
- To use the sensor on the second I2C bus at P5 connector
- (only for version 2 of Raspberry Pi) you must add the bold
- line of following code to your FHEM start script:
- <code><pre>
- case "$1" in
- 'start')
- <b>sudo hipi-i2c e 0 1</b>
- ...
- </pre></code>
- </li>
- </ul>
- <p>
- <b>Define</b>
- <ul>
- <code>define TSL2561 I2C_TSL2561 [<I2C device>] <I2C address></code><br><br>
- <I2C device> mandatory for HiPi, must be omitted if you connect via IODev<br>
- <I2C address> may be 0x29, 0x39 or 0x49 (and 'AUTO' when using IODev to search for device at startup and after an I2C error)<br>
- <br>
- Examples:
- <pre>
- define TSL2561 I2C_TSL2561 /dev/i2c-0 0x39
- attr TSL2561 poll_interval 5
- </pre>
- <pre>
- define TSL2561 I2C_TSL2561 0x39
- attr TSL2561 IODev I2CModule
- attr TSL2561 poll_interval 5
- </pre>
- <pre>
- define TSL2561 I2C_TSL2561 AUTO
- attr TSL2561 IODev I2CModule
- attr TSL2561 poll_interval 5
- </pre>
- </ul>
- <b>Set</b>
- <ul>
- <code>get <name> update</code><br><br>
- Force immediate illumination measurement and restart a new poll_interval.<br><br>
- Note that the new readings are not yet available after set returns because the
- measurement is performed asynchronously. Depending on the attributes integration time,
- autoGain and autoIntegrationTime this may require more than one second to complete.
- </ul>
- <p>
- <b>Readings</b>
- <ul>
- <li>luminosity<br>
- Good human eye reponse approximation of an illumination measurement in the range of 0.1 to 40000+ lux.<br>
- Rounded to 3 significant digits or one fractional digit.
- </li>
- <li>broadband<br>
- Broadband spectrum sensor sample.<br>
- Enable attribute normalizeRawValues for continuous readings independed of actual gain and integration time settings.
- </li>
- <li>ir<br>
- Infrared spectrum sensor sample.<br>
- Enable attribute normalizeRawValues for continuous readings independed of actual gain and integration time settings.
- </li>
- <li>gain<br>
- sensor gain used for current luminosity measurement (1 or 16)<br>
- </li>
- <li>integrationTime<br>
- integration time in seconds used for current luminosity measurement<br>
- </li>
- <li>state<br>
- Default: Initialized, valid values: Undefined, Defined, Initialized, Saturated, Disabled, I2C Error
- </li>
- </ul>
- <p>
-
- <a name="I2C_TSL2561attr"></a>
- <b>Attributes</b>
- <ul>
- <li>IODev<br>
- Set the name of an IODev module. If undefined the perl modules HiPi::Device::I2C are required.<br>
- Default: undefined<br>
- </li>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the sensor for new measured values.
- By changing this attribute a new illumination measurement will be triggered.<br>
- Default: 5, valid values: 1, 2, 5, 10, 20, 30<br>
- </li>
- <li>gain<br>
- Set gain factor. Attribute will be ignored if autoGain is enabled.<br>
- Default: 1, valid values: 1, 16
- </li>
- <li>integrationTime<br>
- Set time in ms the sensor takes to measure the light. Attribute will be ignored if autoIntegrationTime is enabled.<br>
- Default: 13, valid values: 13, 101, 402<br>
- See this <a href="https://learn.sparkfun.com/tutorials/tsl2561-luminosity-sensor-hookup-guide/using-the-arduino-library">tutorial</a>
- for more details.
- </li>
- <li>autoGain<br>
- Enable auto gain. If set to 1, the gain parameter is adjusted automatically depending on light conditions.<br>
- Default: 1, valid values: 0, 1<br>
- </li>
- <li>autoIntegrationTime<br>
- Enable auto integration time. If set to 1, the integration time parameter is adjusted automatically depending on light conditions.<br>
- Default: 0, valid values: 0, 1<br>
- </li>
- <li>normalizeRawValues<br>
- 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>
- Default: 0, valid values: 0, 1<br>
- </li>
- <li>floatArithmetics<br>
- Enable float arithmetics.<br>
- If set to 0, the luminosity is calculated using int arithmetics (for very low powered platforms).<br>
- If set to 1, the luminosity is calculated using float arithmetics, yielding some additional precision.
- Default: 1, valid values: 0, 1<br>
- </li>
- <li>disable<br>
- Disable I2C bus access.<br>
- Default: 0, valid values: 0, 1
- </li>
- </ul>
- <p>
- <b>Notes</b>
- <ul>
- <li>Because the measurement may take several 100 milliseconds a measurement cycle will be executed asynchronously, so
- do not expect to have new values immediately available after "set update" returns. If autoGain or autoIntegrationTime
- are enabled, more than one measurement cycle will be required if light conditions change.
- </li>
- <li>With HiPi and especially IODev there are several I2C interfaces available, some blocking, some non-blocking and
- some with different physical layers. The module has no knowledge of the specific properties of an interface and
- therefore module operation and timing may not be exactly the same with each interface type.
- </li>
- <li>If AUTO is used as device address, one address per measurement cycle will be tested. Depending on your device address
- it may be necessary to execute "set update" several times to find your device.
- </li>
- <li>When using Firmata the I2C write/read delay attribute "i2c-config" of the FRM module can be set to any value.
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="IF"></a>
- <h3>IF</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#IF'>DE</a>]</div>
- <ul>
- <code>IF (<condition>) (<FHEM commands1>) ELSE (<FHEM commands2>)</code><br>
- <br>
- Executes <FHEM commands1> if <condition> is true, else <FHEM commands2> are executed.<br>
- <br>
- IF can be used anywhere where FHEM commands can be used.<br>
- <br>
- The ELSE-case is optional.<br>
- <br>
- The <condition> is the same as in perl-if.<br>
- <br>
- In addition, readings can be specified in the form:<br>
- <br>
- [<device>:<reading>:<format>|[<regular expression>]]<br>
- <br>
- In addition, internals can be specified with & in the form:<br>
- <br>
- [<device>:&<internal>:<format>|[<regular expression>]]<br>
- <br>
- <format> and [<regular expression>] are filter options und are optional.<br>
- <br>
- possible <format>:<br>
- <br>
- 'd' for decimal number<br>
- <br>
- If only the state of a device is to be used, then only the device can be specified:<br>
- <br>
- <code>[<device>]</code> corresponsed to <code>[<device>:&STATE]</code><br>
- <br>
- <b>Examples:</b><br>
- <br>
- IF in combination with at-module, Reading specified in the condition:<br>
- <br>
- <code>define check at +00:10 IF ([outdoor:humidity] > 70) (set switch1 off) ELSE (set switch1 on)<br></code>
- <br>
- IF state query of the device "outdoor" in the condition:<br>
- <br>
- <code>define check at +00:10 IF ([outdoor] eq "open") (set switch1 on)<br></code>
- <br>
- corresponds with details of the internal:<br>
- <br>
- <code>define check at +00:10 IF ([outdoor:&STATE] eq "open") (set switch1 on)<br></code>
- <br>
- If the reading "state" to be queried, then the name of reading is specified without &:<br>
- <br>
- <code>define check at +00:10 IF ([outdoor:state] eq "open") (set switch1 on)<br></code>
- <br>
- Nested IF commands (It can be entered in the DEF input on multiple lines with indentation for better representation):<br>
- <br>
- <code>define test notify lamp <br>
- IF ([lampe] eq "on") (<br>
- <ol>
- IF ([outdoor:humidity] < 70)<br>
- <ol>(set lamp off)</ol>
- ELSE<br>
- <ol>(set lamp on)</ol>
- </ol>
- ) ELSE<br>
- <ol>(set switch on)</ol><br>
- </code>
- Filter by numbers in Reading "temperature":<br>
- <br>
- <code>define settemp at 22:00 IF ([tempsens:temperature:d] >= 10) (set heating on)<br></code>
- <br>
- Filter by "on" and "off" in the status of the device "move":<br>
- <br>
- <code>define activity notify move IF ([move:&STATE:[(on|off)]] eq "on" and $we) (set lamp off)<br></code>
- <br>
- Example of the use of Readings in the then-case:<br>
- <br>
- <code>define temp at 18:00 IF ([outdoor:temperature] > 10) (set lampe [dummy])<br></code>
- <br>
- If an expression is to be evaluated first in a FHEM command, then it must be enclosed in brackets.<br>
- For example, if at 18:00 clock the outside temperature is higher than 10 degrees, the desired temperature is increased by 1 degree:<br>
- <br>
- <code>define temp at 18:00 IF ([outdoor:temperature] > 10) (set thermostat desired-temp {([thermostat:desired-temp:d]+1)})<br></code>
- <br>
- Multiple commands are separated by a comma instead of a semicolon, thus eliminating the doubling, quadrupling, etc. of the semicolon:<br>
- <br>
- <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>
- <br>
- If a comma in FHEM expression occurs, this must be additionally bracketed so that the comma is not recognized as a delimiter:<br>
- <br>
- <code>define check at +00:10 IF ([outdoor:humidity] > 10) ((set switch1,switch2 off))<br></code>
- <br>
- IF in combination with a define at multiple set commands:<br>
- <br>
- <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>
- <br>
- The comma can be combined as a separator between the FHEM commands with double semicolon, eg:<br>
- <br>
- <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>
- <br>
- sleep can be used with comma, it is not blocking:<br>
- <br>
- <code>define check at *10:00 IF ([indoor] eq "on") (sleep 2,set lampe1 on,sleep 3,set lampe2 on)</code><br>
- <br>
- 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>
- <br>
- <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>
- <br>
- Combination of Perl and FHEM commands ($NAME and $EVENT can also be used):<br>
- <br>
- <code>define mail notify door:open IF ([alarm] eq "on")({system("wmail $NAME:$EVENT")},set alarm_signal on)<br></code>
- </ul>
- <p><a name="IOhomecontrol"></a>
- <h3>IOhomecontrol</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#IOhomecontrol'>DE</a>]</div>
- <ul>
- <a name="IOhomecontroldefine"></a>
- <b>Define</b><br><br>
- <ul>
- <code>define <name> IOhomecontrol <model> <host> <pwfile> </code><br><br>
- Defines a IOhomecontrol device. <code><model></code> is a placeholder for future amendments. <code><host></code> is the IP address or hostname of the IOhomecontrol device. <code><pwfile></code> is a file that contains the password to log into the device.<br><br>
- Example:
- <ul>
- <code>define velux IOhomecontrol KLF200 192.168.0.91 /opt/fhem/etc/veluxpw.txt</code><br>
- </ul>
- <br><br>
- </ul>
- <a name="IOhomecontrolset"></a>
- <b>Set</b><br><br>
- <ul>
- <code>set <name> scene <id></code>
- <br><br>
- Runs the scene identified by <code><id></code> which can be either the numeric id of the scene or the scene's name.
- <br><br>
- Examples:
- <ul>
- <code>set velux scene 1</code><br>
- <code>set velux scene "all shutters down"</code><br>
- </ul>
- <br>
- Scene names with blanks must be enclosed in double quotes.
- <br><br>
- </ul>
- <a name="IOhomecontrolget"></a>
- <b>Get</b><br><br>
- <ul>
- <code>get <name> scenes</code>
- <br><br>
- Retrieves the ids and names of the scenes from the device.
- <br><br>
- Example:
- <ul>
- <code>get velux scenes</code><br>
- </ul>
- </ul>
- <br><br>
-
-
- <a name="IOhomecontrolattr"></a>
- <b>Attributes</b>
- <ul>
- <li>setCmds: a comma-separated list of set command definitions.
- Every definition is of the form <code><shorthand>=<command></code>. This defines a new single-word command <code><shorthand></code> as a substitute for <code><command></code>.<br>
- Example: <code>attr velux setCmds up=scene "3.dz.roll2 100%",down=scene "3.dz.roll2 0%"</code><br>
- 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>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br><br>
- </ul>
- <p><a name="IPCAM"></a>
- <h3>IPCAM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#IPCAM'>DE</a>]</div>
- <ul>
- <br>
- <a name"IPCAMdefine"></a>
- <strong>Define</strong>
- <ul>
- <code>define <name> IPCAM <ip[:port]></code>
- <br>
- <br>
- Defines a network camera device to trigger snapshots on events.
- <br>
- <br>
- Network cameras (IP cameras) usually have a build-in function to create
- snapshot images. This module enables the event- or time-controlled
- recording of these images.
- <br>
- In addition, this module allows the recording of many image formats like
- JPEG, PNG, GIF, TIFF, BMP, ICO, PPM, XPM, XBM and SVG. The only requirement
- is that the recorded image must be accessible via a URL.
- <br>
- So it is also possible to record images of e.g. a public Weather Camera
- from the internet or any picture of a website.
- <br>
- Furthermore, it is possible to control the camera via PTZ-mode or custom commands.
- <br>
- <br>
- Examples:
- <br>
- <br>
- A local ip-cam takes 5 snapshots with 10 seconds delay per call:
- <br>
- <ul>
- <code>define ipcam IPCAM 192.168.1.205</code><br>
- <code>attr ipcam delay 10</code><br>
- <code>attr ipcam path snapshot.cgi?user=foo&pwd=bar</code><br>
- <code>attr ipcam snapshots 5</code><br>
- <code>attr ipcam storage /srv/share/surveillance/snapshots</code><br>
- </ul>
- <br>
- A notify on a motion detection of a specified device:
- <br>
- <ul>
- <code>define MOTION.not.01 notify GH.ga.SEC.MD.01:.*on.* get ipcam image</code><br>
- </ul>
- <br>
- Send an eMail after snapshots are taken:
- <br>
- <ul>
- <code>define MOTION.not.02 notify ipcam:.*snapshots.* { myEmailFunction("%NAME") }</code><br>
- </ul>
- <br>
- A public web-cam takes only 1 snapshot per call:
- <br>
- <ul>
- <code>define schloss IPCAM www2.braunschweig.de</code><br>
- <code>attr schloss path webcam/schloss.jpg</code><br>
- <code>attr schloss storage /srv/share/surveillance/snapshots</code><br>
- </ul>
- <br>
- An at-Job takes every hour a snapshot:
- <br>
- <ul>
- <code>define snapshot_schloss at +*00:01:00 get schloss image</code><br>
- </ul>
- <br>
- Move the camera up:
- <br>
- <ul>
- <code>set ipcam tilt up</code>
- </ul>
- <br>
- Move the camera to a the predefined position 4:
- <br>
- <ul>
- <code>set ipcam pos 4</code>
- </ul>
- </ul>
- <br>
- <br>
- <a name="IPCAMset"></a>
- <strong>Set</strong>
- <ul>
- <code>set <name> <value> <argument></code>
- <br>
- <br>
- where <code>value</code> is one of:
- <br>
- <ul>
- <li><code>cmd 1 .. 15</code><br>
- Sets the camera to a custom defined command. The command must be defined as an
- attribute first.
- <br>
- You can define up to 15 custom commands. The given number always relates to an
- equivalent attribute <code>cmd<number></code>.
- </li>
- <li><code>pan <direction> [steps]</code><br>
- Move the camera to the given <code><direction></code>, where <code><direction></code>
- could be <code>left</code> or <code>right</code>.
- <br>
- The command always relates to an equivalent attribute <code>cmdPan<direction></code>.
- <br>
- Furthermore, a step size can be specified, which relates to the equivalent attribute
- <code>cmdStep</code>.
- </li>
- <li><code>pos 1 .. 15|home</code><br>
- Sets the camera to a custom defined position in PTZ mode. The position must be
- defined as an attribute first.
- <br>
- You can define up to 15 custom positions and a predefined home position. The given
- number always relates to an equivalent attribute <code>cmdPos<number></code>.
- </li>
- <li><code>tilt <direction> [steps]</code><br>
- Move the camera to the given <code><direction></code>, where <code><direction></code>
- could be <code>up</code> or <code>down</code>.
- <br>
- The command always relates to an equivalent attribute <code>cmdPan<direction></code>.
- <br>
- Furthermore, a step size can be specified, which relates to the equivalent attribute
- <code>cmdStep</code>.
- </li>
- <li><code>raw <argument></code><br>
- Sets the camera to a custom defined <code>argument</code>.
- </li>
- </ul>
- </ul>
- <br>
- <br>
- <a name="IPCAMget"></a>
- <strong>Get</strong>
- <ul>
- <code>get <name> <value></code>
- <br>
- <br>
- where <code>value</code> is one of:
- <br>
- <ul>
- <li><code>image</code><br>
- Get one or more images of the defined IP-Cam. The number of images<br>
- and the time interval between images can be specified using the<br>
- attributes <code>snapshots</code> and <code>delay</code>.
- </li>
- <li><code>last</code><br>
- Show the name of the last snapshot.
- </li>
- <li><code>snapshots</code><br>
- Show the total number of a image sequence.
- </li>
- </ul>
- </ul>
- <br>
- <a name="IPCAMattr"></a>
- <strong>Attributes</strong>
- <ul>
- <li>
- basicauth<br>
- If your camera supports authentication like <code>http://username:password@domain.com/</code>, you
- can store your creditials within the <code>basicauth</code> attribute.<br>
- If you prefer to store the credentials in a file (take a look at the attribute <code>credentials</code>)
- you have to set the placeholder <code>{USERNAME}</code> and <code>{PASSWORD}</code> in the basicauth string.
- These placeholders will be replaced with the values from the credentials file.<br>
- Example:<br> <code>attr ipcam3 basicauth {USERNAME}:{PASSWORD}</code>
- </li>
- <li>
- cmd01, cmd02, cmd03, .. cmd13, cdm14, cdm15<br>
- It is possible to define up to 15 custom commands.<br>
- Examples:<br>
- <code>attr ipcam cmd01 led_mode=0</code><br>
- <code>attr ipcam cmd02 resolution=8</code><br>
- </li>
- <li>
- cmdPanLeft, cmdPanRight, cmdTiltUp, cmdTiltDown, cmdStep<br>
- Depending of the camera model, are different commands necessary.<br>
- Examples:<br>
- <code>attr ipcam cmdTiltUp command=0</code><br>
- <code>attr ipcam cmdTiltDown command=2</code><br>
- <code>attr ipcam cmdPanLeft command=4</code><br>
- <code>attr ipcam cmdPanRight command=6</code><br>
- <code>attr ipcam cmdStep onstep</code><br>
- </li>
- <li>
- cmdPos01, cmdPos02, cmdPos03, .. cmdPos13, cmdPos14, cmdPos15, cmdPosHome
- It is possible to define up to 15 predefined position in PTZ-mode.<br>
- Examples:<br>
- <code>attr ipcam cmdPosHome command=25</code><br>
- <code>attr ipcam cmdPos01 command=31</code><br>
- <code>attr ipcam cmdPos02 command=33</code><br>
- </li>
- <li>
- credentials<br>
- Defines the location of the credentials file.<br>
- If you prefer to store your cam credentials in a file instead be a part of the
- URI (see attributes <code>path</code> and <code>query</code>), set the full path
- with filename on this attribute.<br>
- Example:<br>
- <code>attr ipcam3 credentials /etc/fhem/ipcam.conf</code><br><br>
- The credentials file has the following structure:<br>
- <pre>
- #
- # Webcam credentials
- #
- $credentials{<name_cam1>}{username} = "<your_username>";
- $credentials{<name_cam1>}{password} = "<your_password>";
- $credentials{<name_cam2>}{username} = "<your_username>";
- $credentials{<name_cam2>}{password} = "<your_password>";
- ...
- </pre>
- Replace <code><name_cam1></code> respectively <code><name_cam2></code>
- with the names of your defined ip-cams and <code><your_username></code> respectively
- <code><your_password></code> with your credentials (all without the brackets
- <code><</code> and <code>></code>!).
- </li>
- <li>
- delay<br>
- Defines the time interval between snapshots in seconds.<br>
- If more then one snapshot is taken, then it makes sense to define a short delay
- between the snapshots. On the one hand, the camera is not addressed in short intervals
- and the second may be better represented movements between images.<br>
- Example: <code>attr ipcam3 delay 10</code>
- </li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li>
- path<br>
- 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
- camera. Is the full URI of your ip-cam for example <code>http://CAMERA_IP/snapshot.cgi?user=admin&pwd=password</code>,
- then only the path and query part is specified here (without the leading slash (/).<br>
- Example:<br>
- <code>attr ipcam3 path snapshot.cgi?user=admin&pwd=password</code><br><br>
- If you prefer to store the credentials in a file (take a look at the attribute <code>credentials</code>)
- you have to set the placeholder <code>{USERNAME}</code> and <code>{PASSWORD}</code> in the path string. These placeholders
- will be replaced with the values from the credentials file.<br>
- Example:<br>
- <code>attr ipcam3 path snapshot.cgi?user={USERNAME}&pwd={PASSWORD}</code>
- </li>
- <li>
- pathCmd<br>
- Defines a path for the custom commands, if it is necessary.<br>
- Example:<br>
- <code>attr ipcam3 pathCmd set_misc.cgi</code>
- </li>
- <li>
- pathPanTilt<br>
- Defines a path for the PTZ-mode commands <code>pan</code>, <code>tilt</code> and <code>pos</code>,
- if it is necessary.<br>
- Example:<br>
- <code>attr ipcam3 pathPanTilt decoder_control.cgi?user={USERNAME}&pwd={PASSWORD}</code>
- </li>
- <li><a href="#showtime">showtime</a></li>
- <li>
- snapshots<br>
- Defines the total number of snapshots to be taken with the <code>get <name> image</code> command.
- If this attribute is not defined, then the default value is 1.<br>
- The snapshots are stored in the given path of the attribute <code>storage</code> and are
- numbered sequentially (starts with 1) like <code>snapshot_01</code>, <code>snapshot_02</code>, etc.
- Furthermore, an additional file <code>last</code> will be saved, which is identical with
- the last snapshot-image. The module checks the imagetype and stores all these files with
- the devicename and a correct extension, e.g. <code><devicename>_snapshot_01.jpg</code>.<br>
- If you like a timestamp instead a sequentially number, take a look at the attribute <code>timestamp</code>.<br>
- All files are overwritten on every <code>get <name> image</code> command (except: snapshots
- with a timestamp. So, keep an eye on your diskspace if you use a timestamp extension!).<br>
- Example:<br>
- <code>attr ipcam3 snapshots 5</code>
- </li>
- <li>
- storage<br>
- Defines the location for the file storage of the snapshots.<br>
- Default: <code>$modpath/www/snapshots</code><br>
- Example:<br>
- <code>attr ipcam3 storage /srv/share/surveillance/snapshots</code>
- </li>
- <li>
- timestamp<br>
- If this attribute is unset or set to 0, snapshots are stored with a sequentially number
- like <code><devicename>_snapshot_01.jpg</code>, <code><devicename>_snapshot_02.jpg</code>, etc.<br>
- If you like filenames with a timestamp postfix, e.g. <code><devicename>_20121023_002602.jpg</code>,
- set this attribute to 1.
- </li>
- </ul>
- <br>
- <a name="IPCAMevents"></a>
- <strong>Generated events</strong>
- <ul>
- <li>last: <name_of_device>_snapshot.<image_extension></li>
- <li>snapshots: <total_number_of_taken_snapshots_at_end></li>
- </ul>
- <br>
- </ul>
- <p><a name="IPWE"></a>
- <h3>IPWE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#IPWE'>DE</a>]</div>
- <ul>
- <br>
- <a name="IPWEdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> IPWE <hostname> [<delay>]</code>
- <br><br>
- Define a IPWE network attached weather data receiver device sold by ELV. Details see <a
- href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=21508">here</a>.
- It's intended to receive the same sensors as WS300 (8 T/H-Sensors and one kombi sensor),
- but can be accessed via http and telnet.
- <br>
- For unknown reason, my try to use the telnet interface was not working neither with raw sockets
- nor with Net::Telnet module. Therefore i choosed here the "easy" way
- to simple readout the http page and extract all data from the offered table. For this reason this module doesnt
- contain any option to configure this device.
- <br><br><b>Note:</b> You should give your sensors a name within the web interface, once they a received the first time.
- <br>To extract a single sensor simply match for this name or sensor id<br>
- <br>
- Attributes:
- <ul>
- <li><code>delay</code>: seconds between read accesses(default 300s)</li>
- </ul>
- <br>
- Example:
- <ul>
- <code>define ipwe IPWE ipwe1 120</code><br>
- </ul>
- <ul>
- <code>attr ipwe delay 600</code> : 10min between readouts<br>
- </ul>
- <br>
- </ul>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="IPWEget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> status</code>
- <br><br>
- Gets actual data from device for sensors with data
- <br><br>
- <code>get <name> <sensorname> </code>
- <br><br>
- will grep output from device for this sensorname
- <br><br>
- </ul>
- <a name="IPWEattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (ipwe)</li>
- <li>delay</li>
- <li><a href="#loglevel">loglevel</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="IT"></a>
- <h3>IT - InterTechno</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#IT'>DE</a>]</div>
- <ul>
- The InterTechno 433MHZ protocol is used by a wide range of devices, which are either of
- the sender/sensor or the receiver/actuator category.
- Momentarily, we are able to send and receive InterTechno commands.
- 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>
- This module supports the version 1 and version 3 of the Intertechno protocol.
- Newly found devices are added into the category "IT" by autocreate.
- Hint: IT protocol 1 devices are only created when pressing the on-button twice within 30 seconds.
- <br><br>
- <a name="ITdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> IT <housecode> <on-code> <off-code>
- [<dimup-code>] [<dimdown-code>] </code>
- <br>or<br>
- <code>define <name> IT <ITRotarySwitches|FLS100RotarySwitches> </code>
- <br>or<br>
- <code>define <name> IT <address 26 Bit> <group bit> <unit Code></code>
- <br>or<br>
- <code>define <name> IT HE800 <Transmitter ID> <Receiver ID></code>
- <br><br>
- The value of <housecode> 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.
- <br>
- Bit 11 and 12 are used for switching/dimming. Different manufacturers are using
- different bit-codes. You specifiy here the 2-digit code for off/on/dimup/dimdown
- using the tri state format, i.e., 0/1/F.
- <br>
- The value of ITRotarySwitches consists of the value of the alpha switch A-P and
- the numeric switch 1-16 as set on the intertechno device (for example A1 or G12). Please use the Wiki for more information how
- to decode your device.
- <br>
- The value of FLS100RotarySwitches consist of the value of the I,II,II,IV switch
- and the numeric 1,2,3,4 switch (for example I2 or IV4).
- <br>
- The value of ITRotarySwitches and FLS100RotarySwitches are internaly translated
- into a houscode value.
- <br>
- For the Intertechno protocol 3 the housecode consists of 26 numbers. Additionally 4 numbers are used as unit code as well as
- group code.
- <br>
- To add a new device in Fhem: define IT myITSwitch IT <Adresse 26 Bit> <Group bit> <Unit Code>
- <br><br>
- <b>Intertechno protocol 1 (ITv1)</b>
- <ul>
- <li><code><housecode></code> 10 numbers in tri state format (i.e., either 0/1/F) depending on the device.</li>
- <li><code><on-code> <off-code></code> 2 numbers in quad state format (0/1/F/D), containing the on-format;
- this number is added to the <housecode> to get the 12-number IT command that is acutally send.</li>
- <li>optional <code><dimup-code> <dimdown-code></code> 2 numbers in quad state format (0/1/F/D),
- contains the command for dimming;
- this number is added to the <housecode> to define tha actual 12-number sending command.</li>
- <li>Notice: orginal ITv1 devices are only defined using the on command.</li>
- <li>Devices which are nt orignal ITv1 devices cen be defined as follows:</li><br>
- To autocreate press twice "on" within 30 seconds. The Log gives:<br>
- <code>2016.11.27 11:47:37.753 4: sduinoD IT: 001F001000 not defined (Switch code: <b>11</b>)</code><br>
- <code>2016.11.27 11:47:37.755 2: autocreate: define IT_001F001000 IT 001F001000 0F F0</code><br><br>
- Now press "off" or any other button:<br>
- <code>2016.11.27 11:48:32.004 3: sduinoD IT: Code <b>1D</b> not supported by IT_001F001000.</code><br><br>
- 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>
- <code>DEF 001F001000 <b>11 1D</b></code><br><br>
- <li> <b>EV1527</b></li>
- If the housecode does not contain a valid (10) ITv1 tri state code, autocreate will define the deviceas EV1527.<br>
- <code><housecode></code> 1527xabcde , abcde is the collected housecode in hex format<br>
- <code><on-code> <off-code></code> 4 numbers bin number (0/1) containing the on command;
- this number is added to the housecode to get the entire 12-number sending command.<br>
- optional <code><dimup-code> <dimdown-code></code> 4 numbers in bin format (0/1),
- contains the command for dimming up or down;
- this number is added to the housecode to get the entire 12-number sending command.<br><br>
- If the device was autocreated the on/off- as well as the dimcode has to be adapted.<br>
- </ul>
- <br>
- <b>SBC_FreeTec</b><br>
- <ul>
- <li><code><housecode></code> 8 numbers in tri state format (0/1/F), depending from the used device.</li>
- <li><code><on-code></code> 4 numbers in tri state format, contains the on-command;
- this number is added to the housecode to form the 12-number sending command.</li>
- <li><code><off-code></code> 4 numbers in tri state format, contains the off-command;
- this number is added to the housecode to get the 12-number sending command.</li>
- </ul>
- <br>
- <b>HE800</b><br>
- <ul>
- <li><code><Transmitter ID></code> unique transmitter ID (1..65535)</li>
- <li><code><Receiver ID></code> receiver ID [0]1..15, 0=Broadcast 1-15 (HE844A button# 1-4 & MASTER=0, HE850 UNIT# 1-15, HE853 = 1)</li>
- </ul>
-
- <br>
- Examples:
- <ul>
- <code>define lamp IT 01FF010101 11 00 01 10</code><br>
- <code>define roll1 IT 111111111F 11 00 01 10</code><br>
- <code>define otherlamp IT 000000000F 11 10 00 00</code><br>
- <code>define otherroll1 IT FFFFFFF00F 11 10</code><br>
- <code>define IT_1527xe0fec IT 1527xe0fec 1001 0000</code><br>
- <code>define SBC_FreeTec_Steck1 IT FFF00FFF 000F 0000</code><br>
- <code>define itswitch1 IT A1</code><br>
- <code>define lamp IT J10</code><br>
- <code>define flsswitch1 IT IV1</code><br>
- <code>define lamp IT II2</code><br>
- <code>define HE800_TID1_SW1 IT HE800 1 1</code><br>
- </ul>
- <br>
- For Intertechno protocol 3 the <housecode> is a 26-digits number.
- Additionaly there is a 4-digits <unit code> and a 1-digit <group code>.
- <ul>
- <li><code><address></code> is a 26 digit number (0/1)</li>
- <li><code><group></code> is a 1 digit number (0/1)</li>
- <li><code><unit></code> is a 4 digit number (0/1)</li>
- </ul>
- <br>
- Examples:
- <ul>
- <code>define myITSwitch IT 00111100110101010110011111 0 0000</code>
- </ul>
-
- </ul>
- <br>
- <a name="ITset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<time>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- dimdown
- dimup
- off
- on
- on-till # Special, see the note
- dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50%
- dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br>
- <li><a href="#setExtensions">set extensions</a> are supported.</li>
- </pre>
- Examples:
- <ul>
- <code>set lamp on</code><br>
- <code>set lamp1,lamp2,lamp3 on</code><br>
- <code>set lamp1-lamp3 on</code><br>
- <code>set lamp off</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>on-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
- or { <perl code> }, where the perl-code returns a time specification).
- If the current time is greater than the specified time, the
- command is ignored, else an "on" command is generated, and for the
- given "till-time" an off command is scheduleld via the at command.
- </li>
- </ul>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="ITattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="IODev"></a>
- <li>IODev<br>
- Set the IO device which will be used to send signals
- for this device. An example for the physical device is a CUL or the SIGNALduino.
- Note: On startup, fhem WILL NOT automatically assign an
- IODevice to the Intertechno device! The attribute IODev needs ALLWAYS to be set manually!</li><br>
- <a name="eventMap"></a>
- <li>eventMap<br>
- Replace event names and set arguments. The value of this attribute
- consists of a list of space separated values. Each value is a colon
- separated pair. The first part specifies the value to be replaced, the second
- 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(,)
- as first character, then the values are not separated by space but by this character.
- Examples:
- <ul><code>
- attr store eventMap on:open off:closed<br>
- attr store eventMap /on-for-timer 10:open/off:closed/<br>
- set store open
- </code></ul>
- </li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <a name="attrdummy"></a>
- <li>dummy<br>
- Set the device attribute dummy to define devices which should not
- output any radio signals. Associated notifys will be executed if
- the signal is received. Used e.g. to react to a code from a sender, but
- it will not emit radio signal if triggered in the web frontend.
- </li><br>
- <li><a href="#loglevel">loglevel</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <a name="model"></a>
- <li>model<br>
- The model attribute denotes the type of the device.
- This attribute will (currently) not be used by Fhem directly.
- It can be used by e.g. external programs or web interfaces to
- distinguish classes of devices and send the appropriate commands
- (e.g. "on" or "off" to a switch, "dim..%" to dimmers etc.).
- The spelling of the model should match the modelname used in the
- documentation that comes which the device. The name should consist of
- lower-case characters without spaces. Valid characters are
- <code>a-z 0-9</code> and <code>-</code> (dash),
- other characters should not be used. Here is a list of "official"
- devices:<br>
- <b>Sender/Sensor</b>: itremote<br>
- <b>Dimmer</b>: itdimmer<br>
- <b>Receiver/Actor</b>: itswitch<br>
- <b>EV1527</b>: ev1527
- </li><br>
- <a name="ignore"></a>
- <li>ignore<br>
- Ignore this device, e.g., if it belongs to your neighbour. The device
- will not trigger any FileLogs/notifys, issued commands will be silently
- ignored (no RF signal will be sent out, just like for the <a
- href="#attrdummy">dummy</a> attribute). The device will not appear in the
- list command (only if it is explicitely asked for it), nor will it
- be affected by commands which use wildcards or attributes as name specifiers
- (see <a href="#devspec">devspec</a>). You still get them with the
- "ignored=1" special devspec.
- </li><br>
-
- <a name="ITclock"></a>
- <li>ITclock<br>
- IT clock is the smallest time length of any pulse while sending the Intertechno V1 protocol.<br>
- 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>
- 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>
- - 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>
- MS;P0=357;P2=-1128;P3=1155;P4=-428;P5=-11420;D=05023402020202020202020202020202020202023402340234;CP=0;SP=5;<br>
- 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>
- - at the CUL can the ITclock found out from the raw messages (X31).
- </li><br>
-
- <a name="ITfrequency"></a> </li>
- <li>ITfrequency<br>
- Sets the frequency of the sender.
- </li><br>
-
- <a name="ITrepetition"></a>
- <li>ITrepetition<br>
- Sets the number of repitions (default=6).
- </li><br>
- <a name="userV1setCodes"></a>
- <li>userV1setCodes<br>
- If an ITv1 protocol is used indivual setcodes can be added. Example:
- <ul><code>
- attr lamp userV1setCodes red:FD blue:1F<br>
- attr lamp userV1setCodes up:1001 down:1000 stop:1011
- </code></ul>
- </li><br>
-
- <a name="SIGNALduinoProtocolId"></a>
- <li>SIGNALduinoProtocolId<br>
- Using this attribute the protocol ID can be choosen if one uses a SIGNALduino.
- </li><br>
-
- </ul>
- <br>
- <a name="ITevents"></a>
- <b>Generated events:</b>
- <ul>
- The IT device generates the following events.
- <li>on</li>
- <li>off</li>
- <li>dimdown</li>
- <li>dimup<br></li>
- <li>dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50%<br>
- dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br></li>
- Which event is sent dependents on the device and can sometimes configured on
- the device.
- </ul>
- </ul>
- <p><a name="InfoPanel"></a>
- <h3>InfoPanel</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#InfoPanel'>DE</a>]</div>
- <ul>
- InfoPanel is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You must install FHEMWEB to use InfoPanel.<br/>
- <br/>
- <br/>
- <b>Prerequesits</b><br/>
- <br/>
- <ul>
- <li>InfoPanel is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You must install FHEMWEB to use InfoPanel.</li>
- <br/>
- <li>Module uses following additional Perl modules:<br/><br/>
- <ul><code>MIME::Base64 Image::Info</code></ul><br/>
- If not already installed in your environment, please install them using appropriate commands from your environment.<br/><br/>
- Package installation in debian environments: <code>apt-get install libmime-base64-perl libimage-info-perl</code></li>
- <br/>
- <li>You can use this module without the two additional perl modules, but in this case, you have to accept some limitations:<br/>
- <br/>
- <ul>
- <li>layout tag img can not be used</li>
- <li>layout tag plot can only handle scale = 1 and inline = 0</li>
- </ul>
- </li>
- </ul>
- <br/><br/>
-
- <a name="InfoPaneldefine"></a>
- <b>Define</b><br/><br/>
- <ul>
- <code>define <name> InfoPanel <layoutFileName></code><br/>
- <br/>
- Example:<br/><br>
- <ul><code>define myInfoPanel InfoPanel ./FHEM/panel.layout</code><br/></ul>
- </ul>
- <br/><br/>
- <a name="InfoPanelset"></a>
- <b>Set-Commands</b><br/><br/>
- <ul>
- <li><code>set <name> reread</code>
- <ul><br/>
- Rereads the <a href="#InfoPanellayout">layout definition</a> from the file.<br/><br/>
- <b>Important:</b><br/>
- <ul>
- Layout will be reread automatically if edited via fhem's "Edit files" function.<br/>
- Autoread can be disabled via <a href="#InfoPanelattr">attribute</a>.
- </ul>
- </ul></li><br/>
- <li><code>set <name> ovEnable <xconditionName></code>
- <ul><br/>
- set an override "1" to named xcondition
- </ul>
- </li><br/>
- <li><code>set <name> ovDisable <xconditionName></code>
- <ul><br/>
- set an override "0" to named xcondition
- </ul>
- </li><br/>
- <li><code>set <name> ovClear <xconditionName>|all;</code>
- <ul><br/>
- delete an existing overrides to named xcondition. "all" will clear all overrides.<br/>
- </ul>
- </li>
- </ul>
- <br/><br/>
- <a name="InfoPanelget"></a>
- <b>Get-Commands</b><br/><br/>
- <ul>
- <li><code>get <name> counter</code>
- <ul><br/>
- return value from internal counter<br/>
- </ul></li><br/>
- <li><code>get <name> layout</code>
- <ul><br/>
- return complete layout definition<br/>
- </ul></li><br/>
- <li><code>get <name> overrides</code>
- <ul><br/>
- return list of defined overrides<br/>
- </ul></li><br/>
- <br/>
- </ul>
- <br/><br/>
- <a name="InfoPanelattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <li><b>autoreread</b> - disables automatic layout reread after edit if set to 1</li>
- <li><b>refresh</b> - time (in seconds) after which the HTML page will be reloaded automatically.<br/>
- Any values below 60 seconds will not become valid.</li>
- <li><b>showTime</b> - disables generation timestamp in state if set to 0</li>
- <li><b>size</b> - The dimensions of the picture in the format
- <code><width>x<height></code></li>
- <li><b>useViewPort</b> - add viewport meta tag to fit mobile displays</li>
- <li><b>mobileApp</b> - add support for mobile fullscreen experience</li>
- <li><b>title</b> - webpage title to be shown in Browser</li>
- <br/>
- <li><b>bgcenter</b> - background images will not be centered if attribute set to 0. Default: show centered</li>
- <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>
- <li><b>bgdir</b> - directory containing background images</li>
- <li><b>bgopacity</b> - set opacity for background image, values 0...1.0</li>
- <li><b>tmin</b> - background picture will be shown at least <code>tmin</code> seconds,
- no matter how frequently the RSS feed consumer accesses the page.</li>
- <br/>
- <b>Important:</b> bgcolor and bgdir will be evaluated by <code>{ <a href="#perl"><perl special></a> }</code> use quotes for absolute values!<br/>
- </ul>
- <br/><br/>
- <a name="InfoPanelreadings"></a>
- <b>Generated Readings/Events:</b><br/><br/>
- <ul>
- <li>state - show time and date of last layout evaluation</li>
- </ul>
- <br/><br/>
- <a name="InfoPanellayout"></a>
- <b>Layout definition</b><br/>
- <br/>
- <ul>
- All parameters in curly brackets can be evaluated by <code>{ <a href="#perl"><perl special></a> }</code></br>
- <br/>
- <li><code>area <id> <x1> <y1> <x2> <y2> <{link}></code><br/>
- <br/>
- <ul>create a responsive area which will call a link when clicked.<br/>
- <br/>
- id = element id<br/>
- x1,y1 = upper left corner<br/>
- x2,y2 = lower right corner<br/>
- link = url to be called<br/>
- </ul></li><br/>
- <br>
- <li><code>boxcolor <{rgba}></code><br/>
- <br/>
- <ul>define an rgb color code to be used for filling button and textbox<br/>
- </ul></li><br/>
- <br>
- <li><code>button <id> <x1> <y1> <x2> <y2> <r1> <r2> <link> <text></code><br/>
- <br/>
- <ul>create a responsive colored button which will call a link when clicked.<br/>
- <br/>
- id = element id<br/>
- x1,y1 = upper left corner<br/>
- x2,y2 = lower right corner<br/>
- r1,r2 = radius for rounded corners<br/>
- link = url to be called<br/>
- text = text that will be written onto the button<br/>
- <br/>
- button will be filled with color defined by "boxcolor"<br/>
- text color will be read from "rgb" value<br/>
- </ul></li><br/>
- <br/>
- <li><code>buttonpanel</code><br/>
- <br/>
- <ul>needed once in your layout file if you intend to use buttons in the same layout.<br/>
- </ul></li><br/>
- <br/>
- <li><code>circle <id> <x> <y> <r> [<fill>] [<stroke-width>] [<link>]</code><br/>
- <br/>
- <ul>create a circle<br/>
- <br/>
- id = element id<br/>
- x,y = center coordinates of circle<br/>
- r = radius<br/>
- fill = circle will be filled with "rgb" color if set to 1. Default = 0<br/>
- stroke-width = defines stroke width to draw around the circle. Default = 0<br/>
- link = URL to be linked to item<br/>
- </ul></li><br/>
- <br/>
- <li><code>counter <id> <x> <y></code><br/>
- <br/>
- <ul>print internal counter<br/>
- <br/>
- id = element id<br/>
- x,y = position<br/>
- </ul></li><br/>
- <br/>
- <li><code>date <id> <x> <y></code><br/>
- <br/>
- <ul>print date<br/>
- <br/>
- id = element id<br/>
- x,y = position<br/>
- </ul></li><br/>
- <br/>
- <li><code>embed <id> <x> <y> <width> <height> <{object}></code><br/>
- <br/>
- <ul>embed any object<br/>
- <br/>
- id = element id<br/>
- x,y = position<br/>
- width,height = containers's dimension<br/>
- object = object to embed<br/>
- </ul></li><br/>
- <br/>
- <li><code>ellipse <id> <x> <y> <r1> <r2> [<fill>] [<stroke-width>] [<link>]</code><br/>
- <br/>
- <ul>create an ellipse<br/>
- <br/>
- id = element id<br/>
- x,y = center coordinates of ellipse<br/>
- r1,r2 = radius<br/>
- fill = ellipse will be filled with "rgb" color if set to 1. Default = 0<br/>
- stroke-width = defines stroke width to draw around the ellipse. Default = 0<br/>
- link = URL to be linked to item<br/>
- </ul></li><br/>
- <br/>
- <li><code>font <font-family></code><br/>
- <br/>
- <ul>define font family used for text elements (text, date, time, seconds ...)<br/>
- <br/>
- Example: <code>font arial</code><br/>
- </ul></li><br/>
- <br/>
- <li><code>group <id> open <x> <y><br/>
- group - close</code> (id will not be evaluated, just give any value)<br/>
- <br/>
- <ul>group items<br/>
- <br/>
- open|close = define start and end of group<br/>
- x,y = upper left corner as reference for all grouped items, will be inherited to all elements.<br/>
- <br/>
- Examples:<br/>
- <code>
- group - open 150 150<br/>
- rect ...<br/>
- img ...<br/>
- group - close<br/>
- </code>
- </ul></li><br/>
- <br/>
- <li><code>img <id> <x> <y> <scale> <link> <sourceType> <{dataSource}>s</code><br/>
- <br/>
- <ul>embed an image into InfoPanel<br/>
- <br/>
- id = element id<br/>
- x,y = upper left corner<br/>
- scale = scale to be used for resizing; may be factor or defined by width or height<br/>
- link = URL to be linked to item, use "" if not needed<br/>
- sourceType = file |Â url | data<br/>
- dataSource = where to read data from, depends on sourceType<br/>
- </ul></li><br/>
- <br/>
- <li><code>line <id> <x1> <y1> <x2> <y2> [<stroke>]</code><br/>
- <br/>
- <ul>draw a line<br/>
- <br/>
- id = element id<br/>
- x1,y1 = coordinates (start)<br/>
- x2,y2 = coordinates (end)<br/>
- stroke = stroke width for line; if omitted, default = 0<br/>
- </ul></li><br/>
- <br/>
- <li><code>moveby <x> <y></code><br/>
- <br/>
- <ul>move most recently x- and y-coordinates by given steps<br/>
- </ul></li><br/>
- <br/>
- <li><code>movecalculated <{perlSpecial x}> <{perlSpecial y}></code><br/>
- <br/>
- <ul>calculate x- and y-coordinates by perlSpecials<br/>
- </ul></li><br/>
- <br/>
- <li><code>moveto <x> <y></code><br/>
- <br/>
- <ul>move x- and y-coordinates to the given positon<br/>
- </ul></li><br/>
- <br/>
- <li><code>padding <width></code><br/>
- <br/>
- <ul>border width (in pixel) to be used in textboxes<br/>
- </ul></li><br/>
- <br/>
- <li><code>plot <id> <x> <y> <scale> <inline> <{plotName}></code><br/>
- <br/>
- <ul>embed an SVG plot into InfoPanel<br/>
- <br/>
- id = element id<br/>
- x,y = upper left corner<br/>
- scale = scale to be used for resizing; may be factor or defined by width or height<br/>
- inline = embed plot as data (inline=1) or as link (inline=0)<br/>
- plotName = name of desired SVG device from your fhem installation<br/>
- </ul></li><br/>
- <br/>
- <li><code>pop</code><br/>
- <br/>
- <ul>fetch last parameter set from stack and set it actice<br/>
- </ul></li><br/>
- <br/>
- <li><code>pt <[+-]font-size></code><br/>
- <br/>
- <ul>define font size used for text elements (text, date, time, seconds ...)<br/>
- can be given as absolute or relative value.<br/>
- <br/>
- Examples:<br/>
- <code>pt 12</code><br/>
- <code>pt +3</code><br/>
- <code>pt -2</code><br/>
- </ul></li><br/>
- <br/>
- <li><code>push</code><br/>
- <br/>
- <ul>push active parameter set onto stack<br/>
- </ul></li><br/>
- <br/>
- <li><code>rect <id> <x1> <y1> <x2> <y2> <r1> <r2> [<fill>] [<stroke-width>] [<link>]</code><br/>
- <br/>
- <ul>create a rectangle<br/>
- <br/>
- id = element id<br/>
- x1,y1 = upper left corner<br/>
- x2,y2 = lower right corner<br/>
- r1,r2 = radius for rounded corners<br/>
- fill = rectangle will be filled with "rgb" color if set to 1. Default = 0<br/>
- stroke-width = defines stroke width to draw around the rectangle. Default = 0<br/>
- link = URL to be linked to item<br/>
- </ul></li><br/>
- <br/>
- <li><code>rgb <{rgb[a]}></code><br/>
- <br/>
- <ul>define rgba value (hex digits!) used for text, lines, circles, ellipses<br/>
- <br/>
- <code>r = red value</code><br/>
- <code>g = green value</code><br/>
- <code>b = blue value</code><br/>
- <code>a = alpha value used for opacity; optional</code><br/>
- </ul></li><br/>
- <br/>
- <li><code>seconds <id> <x> <y> [<format>]</code><br/>
- <br/>
- <ul>print seconds<br/>
- <br/>
- id = element id<br/>
- x,y = position<br/>
- format = seconds will be preceeded by ':' if set to 'colon'; optional<br/>
- </ul></li><br/>
- <br/>
- <li><code>text <id> <x> <y> <{text}></code><br/>
- <br/>
- <ul>print text<br/>
- <br/>
- id = element id<br/>
- x,y = position<br/>
- text = text content to be printed<br/>
- </ul></li><br/>
- <br/>
- <li><code>textbox <id> <x> <y> <boxWidth> <boxHeight> <{link}> <{text}> </code><br/>
- <br/>
- <ul>create a textbox to print text with auto wrapping<br/>
- <br/>
- id = element id<br/>
- x,y = upper left corner<br/>
- boxWidth,boxHeight = dimensions of textbox<br/>
- link = url to be used when clicked; use "" if not needed<br/>
- text = text to be printed in textbox<br/>
- <br/>
- <b>Important:</b> textboxes are not responsive via area tag. Use optional link parameter in textbox tag<br/>
- </ul></li><br/>
- <br/>
- <li><code>textboxalign <align></code><br/>
- <br/>
- <ul>define horizontal alignment for text inside textboxes<br/>
- <br/>
- valid values: left center right justify<br/>
- </ul></li><br/>
- <br/>
- <li><code>textdesign <align></code><br/>
- <br/>
- <ul>define comma-separated list for text design and decoration<br/>
- <br/>
- valid values: underline overline line-through bold italic oblique clear<br/>
- <br/>
- Examples:<br/>
- <code>
- textdesign underline<br/>
- textdesign bold,italic,underline
- </code><br/>
- <br/>
- <b>Important:</b> "clear" resets all to default values!<br/>
- </ul></li><br/>
- <br/>
- <li><code>thalign <align></code><br/>
- <br/>
- <ul>define horizontal alignment for text output<br/>
- <br/>
- valid values: start middle end<br/>
- </ul></li><br/>
- <br/>
- <li><code>ticker <id> <x> <y> <width> <items> <speed> <{data}></code><br/>
- <br/>
- <ul>create a vertical ticker<br/>
- <br/>
- id = element id<br/>
- x,y = position<br/>
- width = width<br/>
- items = number of items to be displayed simultanously<br/>
- speed = scroll speed<br/>
- data = list of text items, separated by <code>\n</code><br/>
- </ul></li><br/>
- <br/>
- <li><code>time <id> <x> <y></code><br/>
- <br/>
- <ul>print time<br/>
- <br/>
- id = element id<br/>
- x,y = position<br/>
- </ul></li><br/>
- <br/>
- <li><code>tvalign <align></code><br/>
- <br/>
- <ul>define vertical alignment for text output<br/>
- <br/>
- valid values: auto baseline middle center hanging<br/>
- </ul></li><br/>
- <br/>
- </ul>
- <br/>
- <b>Author's notes</b><br/>
- <br/>
- <ul>
- <li>Have fun!</li><br/>
- </ul>
- </ul>
- <p><a name="Itach_IR"></a>
- <h3>Itach_IR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Itach_IR'>DE</a>]</div>
- <ul>
- Defines a device representing a physical Itach IR. Serves as communication layer for <a href="#Itach_IRDevice">Itach_IRDevice</a>.<br>
- For more information, check the <a href="http://www.fhemwiki.de/wiki/ITach">Wiki page</a>.<br>
-
- <a name="Itach_IRdefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> Itach_IR <IP-address></code><br>
- Example:<br>
- <code>define Itach Itach_IR 192.168.1.2</code>
- </ul>
- <a name="Itach_IRset"></a><br>
- <b>Set</b><br><ul>N/A</ul><br>
- <a name="Itach_IRDeviceget"></a><br>
- <b>Get</b><br><ul>N/A</ul><br>
- <a name="Itach_IRDeviceattr"></a><br>
- <b>Attributes</b>
- <ul>
- <li><a href="#verbose">verbose</a></li>
- <li>timeout<br>
- Can be used to change the timeout-value for tcp-communication. Default is 2.0.</li>
- </ul>
- </ul>
- <p><a name="Itach_IRDevice"></a>
- <h3>Itach_IRDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Itach_IRDevice'>DE</a>]</div>
- <ul>
- 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>
- 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.
- 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>
- For more information, check the <a href="http://www.fhemwiki.de/wiki/ITach">Wiki page</a>.<br>
-
- <a name="Itach_IRDevicedefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> Itach_IRDevice <IR-config-file></code><br>
- Store the IR-config-file in the same directory where fhem.cfg resides.<br>
- <b>Hint:</b> define an <a href="#Itach_IR">Itach_IR</a> device first!<br>
- Example:<br>
- <code>define IR_mac Itach_IRDevice IR-codes-mac.txt</code><br>
- <code>define IR_amp Itach_IRDevice IR-codes-media-amplifier.txt</code>
- </ul>
- <a name="Itach_IRDeviceset"></a><br>
- <b>Set</b><br>
- <code>set <name> <command> [<parameter>]</code><br><br>
- The list of available commands depends on the content of the IR-config-file.
- <br>There are only two module specific commands:
- <ul>
- <li><code>set <name> rereadIRfile</code><br>
- 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>
- <li><code>set <name> seqsingle <parameter></code><br>
- 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>
- </ul>
-
- <a name="Itach_IRDeviceget"></a><br>
- <b>Get</b>
- <ul>
- <li><code>get <name> validcommands</code><br>
- Lists the valid commands for this device according to your IR-config-file.</li>
- </ul>
-
- <a name="Itach_IRDeviceattr"></a><br>
- <b>Attributes</b>
- <ul>
- <li><a href="#verbose">verbose</a></li>
- <li><a href="#IODev">IODev</a><br>
- Needs to be stated if more than one ItachIR-device is part of your fhem-configuration.</li>
- </ul>
- </ul>
- <p><a name="Itach_Relay"></a>
- <h3>ITACH_RELAY</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Itach_Relay'>DE</a>]</div>
- <ul>
- Note: this module needs the Net::Telnet module.
- <br><br>
- <a name="ITACH_RELAYdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ITACH_RELAY <ip-address> <port></code>
- <br><br>
- Defines an Global Cache iTach Relay device (Box with 3 relays) via its ip address. <br><br>
- Examples:
- <ul>
- <code>define motor1 ITACH_RELAY 192.168.8.200 1</code><br>
- </ul>
- </ul>
- <br>
- <a name="ITACH_RELAYset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- off
- on
- toggle
- </pre>
- Examples:
- <ul>
- <code>set motor1 on</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>Toggle is special implemented. List name returns "on" or "off" even after a toggle command</li>
- </ul>
- </ul>
- </ul>
- <p>=item device
- =item summary reads OBIS data from measurement units
- =item summary_DE liest OBIS Daten von Messgeräten
- <a name="JSONMETER"></a>
- <h3>JSONMETER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#JSONMETER'>DE</a>]</div>
- <div>
- <ul>
- This module reads data from a measurement unit (so called smart meters for electricity, gas or heat)
- <br>
- that provides OBIS compliant data in JSON format on a webserver or on the FHEM file system.
- <br>
- It assumes normally, that the structur of the JSON data do not change.
- <br>
-
- <br>
-
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> JSONMETER <deviceType> [<ip address>] [poll-interval]</code>
- <br>
- Example: <code>define powermeter JSONMETER ITF 192.168.178.20 300</code>
- <br>
- <li><code><deviceType></code>
- <br>
- Mandatory. Used to define the path and port to extract the json file.
- <br>
- The attribute 'pathString' can be used to add login information to the URL path of predefined devices.
- <br>
- <ul>
- <li><b>ITF</b> - FROETEC Simplex ME one tariff electrical meter (N-ENERGY) (<a href="http://www.itf-froeschl.de">ITF Fröschl</a>)</li>
- <li><b>EFR</b> - <a href="http://www.efr.de">EFR</a> Smart Grid Hub for electrical meter (EON, N-ENERGY and EnBW)
- <br>
- use the 'pathstring' attribute to specifiy your login information
- <br>
- <code>attr <device> pathString ?LogName=<i>user</i>&LogPSWD=<i>password</i></code>
- </li>
- <li><b>LS110</b> - <a href="http://www.youless.nl/downloads-ls110.html">YouLess LS110</a> network sensor (counter) for electro mechanical electricity meter</li>
- <li><b>LS120</b> - <a href="http://www.youless.nl/winkel/product/ls120.html">YouLess LS120</a> new model</li>
- <li><b>url</b> - use the URL defined via the attributes 'pathString' and 'port'</li>
- <li><b>file</b> - use the file defined via the attribute 'pathString' (positioned in the FHEM file system)</li>
- </ul>
- </li><br>
- <li><code>[<ip address>]</code>
- <br>
- IP address of the phyisical device. (not needed for 'url' and 'file')
- </li><br>
- <li><code>[poll-interval]</code>
- <br>
- Optional. Default is 300 seconds. Smallest possible value is 10. With 0 it will only update on "manual" request.
- </li>
- </ul>
- <br>
- <b>Set</b>
- <ul>
- <li><code>activeTariff < 0 - 9 ></code>
- <br>
- 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>
- 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>
- 0 = without separate tariffs
- </li><br>
- <li><code>INTERVAL <polling interval></code>
- <br>
- Polling interval in seconds
- </li><br>
- <li><code>resetStatistics <statReadings></code>
- <br>
- Deletes the selected statistic values: <i>all, statElectricityConsumed..., statElectricityConsumedTariff..., statElectricityPower...</i>
- </li><br>
- <li><code>restartJsonAnalysis</code><br>
- Restarts the analysis of the json file for known readings (compliant to the OBIS standard).
- <br>
- This analysis happens normally only once if readings have been found.
- </li><br>
- <li><code>statusRequest</code>
- <br>
- Update device information
- </li>
- </ul>
- <br>
-
- <b>Get</b>
- <ul>
- <li><code>jsonFile</code>
- <br>
- extracts and shows the json data
- </li><br>
- <li><code>jsonAnalysis</code>
- <br>
- extracts the json data and shows the result of the analysis</li>
- </ul>
- <br>
- <a name="JSONMETERattr"></a>
- <b>Attributes</b>
- <ul>
- <li><code>alwaysAnalyse < 0 | 1 ></code>
- <br>
- Repeats by each update the json analysis - use if structure of json data changes
- <br>
- Normally the once analysed structure is saved to reduce CPU load.
- </li><br>
- <li><code>doStatistics < 0 | 1 ></code>
- <br>
- Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
- <br>
- Logging and visualisation of the statistics should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
- </li><br>
- <li><code>pathString <string></code>
- <ul>
- <li>if deviceType = 'file': specifies the local file name and path</li>
- <li>if deviceType = 'url': specifies the url path</li>
- <li>other deviceType: can be used to add login information to the url path of predefined devices</li>
- </ul>
- </li><br>
- <li><code>port <number></code>
- <br>
- Specifies the IP port for the deviceType 'url' (default is 80)
- </li><br>
- <li><code>timeOut <seconds></code>
- <br>
- Specifies the timeout for the reading of the raw data. (default is 10)
- <br>
- The run time of the reading process can be measured via "get <device> jsonFile".
- </li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- </div>
- <p><a name="Jabber"></a>
- <h3>Jabber</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Jabber'>DE</a>]</div>
- <ul>
- This Module allows FHEM to connect to the Jabber Network, send and receiving messages from and to a Jabber server.<br>
- <br>
- Jabber is another description for (XMPP) - a communications protocol for message-oriented middleware based
- on XML and - depending on the server - encrypt the communications channels.<br>
- For the user it is similar to other instant messaging Platforms like Facebook Chat, ICQ or Google's Hangouts
- but free, Open Source and by default encrypted between the Jabber servers.<br>
- <br>
- 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>
- Discuss the module in the <a href="http://forum.fhem.de/index.php/topic,18967.0.html">specific thread here</a>.<br>
- <br>
- This Module requires the following perl Modules to be installed (using SSL):<br>
- <ul>
- <li>Net::Jabber</li>
- <li>Net::XMPP</li>
- <li>Authen::SASL</li>
- <li>XML::Stream</li>
- <li>Net::SSLeay</li>
- </ul>
- <br>
- 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>
- If you want to use OTR you must compile and install Crypt::OTR from CPAN on your own.<br>
- <br>
- <br>
- <a name="JabberDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Jabber <server> <port> <username> <password> <TLS> <SSL></code><br>
- <br>
- You have to create an account on a free Jabber server or setup your own Jabber server.<br>
- <br>
- Example:
- <ul>
- <code>define JabberClient1 Jabber jabber.org 5222 myusername mypassword 1 0</code>
- </ul>
- <br>
- </ul>
- <br>
- <a name="JabberSet"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>set <name> msg <username> <msg></code>
- <br>
- sends a message to the specified username
- <br>
- Examples:
- <ul>
- <code>set JabberClient1 msg myname@jabber.org It is working!</code><br>
- </ul>
- </li>
- <br>
- <li>
- <code>set <name> msgmuc <channel> <msg></code>
- <br>
- sends a message to the specified MUC group channel
- <br>
- Examples:
- <ul>
- <code>set JabberClient1 msgmuc roomname@jabber.org Woot!</code><br>
- </ul>
- </li>
- <br>
- <li>
- <code>set <name> msgotr <username> <msg></code>
- <br>
- 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>
- If the user does not have OTR support the message is discarded.
- <br>
- Examples:
- <ul>
- <code>set JabberClient1 msgotr myname@jabber.org Meet me at 7pm at the place today :*</code><br>
- </ul>
- </li>
- <br>
- <li>
- <code>set <name> subscribe <username></code>
- <br>
- asks the username for authorization (not needed normally)
- <br>
- Example:
- <ul>
- <code>set JabberClient1 subscribe myname@jabber.org</code><br>
- </ul>
- </li>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="JabberAttr"></a>
- <b>Attributes</b>
- <ul>
- <a name="OnlineStatus"></a>
- <li><code>OnlineStatus available|unavailable</code><br>
- Sets the online status of the client, available (online in Clients) or unavailable (offline in Clients)<br>
- It is possible, on some servers, that FHEM can even recieve messages if the status is unavailable<br>
- <br>
- Default: <code>available</code>
- </li><br>
- <a name="ResourceName"></a>
- <li><code>ResourceName <name></code><br>
- In XMPP/Jabber you can have multiple clients connected with the same username. <br>
- The resource name finally makes the Jabber-ID unique to each client.<br>
- Here you can define the resource name.<br>
- <br>
- Default: <code>FHEM</code>
- </li><br>
- <a name="PollTimer"></a>
- <li><code>PollTimer <seconds></code><br>
- This is the interval in seconds at which the jabber server get polled.<br>
- Every interval the client checks if there are messages waiting and checks the connection to the server.<br>
- Don't set it over 10 seconds, as the client could get disconnected.<br>
- <br>
- Default: <code>2</code>
- </li><br>
- <a name="RecvWhitelist"></a>
- <li><code>RecvWhitelist <Regex></code><br>
- Only if the Regex match, the client accepts and interpret the message. Everything else will be discarded.<br>
- <br>
- Default: <code>.*</code><br>
- Examples:<br>
- <ul>
- <code>myname@jabber.org</code><br>
- <code>(myname1@jabber.org|myname2@xmpp.de)</code><br>
- </ul>
- </li><br>
- <a name="MucJoin"></a>
- <li><code>MucJoin channel1@server.com/mynick[:password]</code><br>
- Allows you to join one or more MUC's (Multi-User-Channel) with a specific Nick and a optional Password<br>
- <br>
- Default: empty (no messages accepted)<br>
- Examples:<br>
- <ul>
- Join a channel: <code>channel1@server.com/mynick</code><br>
- Join more channels: <code>channel1@server.com/mynick,channel2@server.com/myothernick</code><br>
- Join a channel with a password set: <code>channel1@server.com/mynick:password</code><br>
- </ul>
- </li><br>
- <a name="MucRecvWhitelist"></a>
- <li><code>MucRecvWhitelist <Regex></code><br>
- Same as RecvWhitelist but for MUC: Only if the Regex match, the client accepts and interpret the message. Everything else will be discarded.<br>
- <br>
- Default: empty (no messages accepted)<br>
- Examples:<br>
- <ul>
- All joined channels allowed: <code>.*</code><br>
- Specific channel allowed only: <code>mychannel@jabber.org</code><br>
- Specific Nick in channel allowed only: <code>mychannel@jabber.org/NickOfFriend</code><br>
- </ul>
- </li><br>
- <a name="OTREnable"></a>
- <li><code>OTREnable 1|0</code><br>
- Enabled the use of Crypt::OTR for end to end encryption between a device and FHEM<br>
- You must have Crypt::OTR installed and a private key is being generated the first time you enable this option<br>
- 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>
- Key generation is a one-time-task<br>
- <br>
- Default: empty (OTR disabled)
- </li><br>
- <a name="OTRSharedSecret"></a>
- <li><code>OTRSharedSecret aSecretKeyiOnlyKnow@@*</code><br>
- Optional shared secret to allow the other end to start a trust verification against FHEM with this shared key.<br>
- 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>
- This will allow to inform the user if the private key has changed (ex. in Man-in-the-Middle attacks)<br>
- <br>
- Default: empty, please define a shared secret on your own.
- </li><br>
- </ul>
- <br>
- <a name="JabberReadings"></a>
- <b>Generated Readings/Events:</b>
- <ul>
- <li>Private Messages
- <ul>
- <li><b>Message</b> - Complete message including JID and text</li>
- <li><b>LastMessage</b> - Only text portion of the Message</li>
- <li><b>LastSenderJID</b> - Only JID portion of the Message</li>
- </ul>
- </li><br>
- <li>Encrypted Private Messages (if OTREnable=1)
- <ul>
- <li><b>OTRMessage</b> - Complete decrypted message including JID and text</li>
- <li><b>OTRLastMessage</b> - Only text portion of the Message</li>
- <li><b>OTRLastSenderJID</b> - Only JID portion of the Message</li>
- </ul>
- </li><br>
- <li>MUC Room Messages (if MUCJoin is set)
- <ul>
- <li><b>MucMessage</b> - Complete message including room's JID and text</li>
- <li><b>MucLastMessage</b> - Only text portion of the Message</li>
- <li><b>MucLastSenderJID</b> - Only JID portion of the Message</li>
- </ul>
- </li>
- </ul>
- <br>
- <a name="JabberNotes"></a>
- <b>Author's Notes:</b>
- <ul>
- <li>You can react and reply on incoming private messages with a notify like this:<br>
- <pre><code>define Jabber_Notify notify JabberClient1:Message.* {
- my $lastsender=ReadingsVal("JabberClient1","LastSenderJID","0");
- my $lastmsg=ReadingsVal("JabberClient1","LastMessage","0");
- my $temperature=ReadingsVal("BU_Temperatur","temperature","0");
- fhem("set JabberClient1 msg ". $lastsender . " Temp: ".$temperature);
- }
- </code></pre>
- </li>
- <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>
- <pre><code>define Jabber_Notify notify JabberClient1:MucMessage.* {
- my $lastsender=ReadingsVal("JabberClient1","LastSenderJID","0");
- my $lastmsg=ReadingsVal("JabberClient1","LastMessage","0");
- my $temperature=ReadingsVal("BU_Temperatur","temperature","0");
- fhem("set JabberClient1 msgmuc ". $lastsender . " Temp: ".$temperature);
- }
- </code></pre>
- </li>
- <li>You can react and reply on OTR private messages with a notify like this:<br>
- <pre><code>define Jabber_Notify notify JabberClient1:OTRMessage.* {
- my $lastsender=ReadingsVal("JabberClient1","LastSenderJID","0");
- my $lastmsg=ReadingsVal("JabberClient1","LastMessage","0");
- my $temperature=ReadingsVal("BU_Temperatur","temperature","0");
- fhem("set JabberClient1 msgotr ". $lastsender . " Temp: ".$temperature);
- }
- </code></pre>
- </li>
- </ul>
- </ul>
- <p><a name="JawboneUp"></a>
- <h3>JawboneUp</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#JawboneUp'>DE</a>]</div>
- <ul>
- 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>
- All communication with the Jawbone services is handled as background-tasks, in order not to interfere with other FHEM services.
- <br><br>
- <b>Installation</b>
- Among the perl modules required for this module are: LWP::UserAgent, IO::Socket::SSL, WWW::Jawbone::Up.<br>
- At least WWW:Jawbone::Up doesn't seem to have a debian equivalent, so you'll need CPAN to install the modules.<br>
- Example: <code>cpan -i WWW::Jawbone::Up</code> should install the required perl modules for the Jawbone up.<br>
- 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>
- Some dependent modules might fail during self-test, in that case try a forced install: <code>cpan -i -f module-name</code>
- <br><br>
- <b>Error handling</b>
- If there are more than three consecutive API errors, the module disables itself. A "get update" re-enables the module.<br>
- API errors can be caused by wrong credentials or missing internet-connectivity or by a failure of the Jawbone server.<br><br>
- <b>Configuration</b>
- <a name="jawboneUp_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> JawboneUp <user> <password> [<interval>] </code><br>
- <br>
- Defines a JawboneUp device.<br>
- <b>Parameters</b>
- <ul>
- <li>name<br>
- A name for your jawbone device.</li>
- <li>user<br>
- Username (email) used as account-name for the jawbone service.</li>
- <li>password<br>
- The password for the jawbone service.</li>
- <li>interval<br>
- Optional polling intervall in seconds. Default is 3600, minimum is 300 (=5min). It is not recommended to go below 900sec.</li>
- </ul><br>
- Example:
- <ul>
- <code>define myJawboneUp JawboneUp me@foo.org myS3cret 3600</code><br>
- <code>attr myJawboneUp room Jawbone</code><br>
- </ul>
- </ul><br>
- <a name="jawboneUp_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>active_time<br>
- (Active time (seconds))</li>
- <li>bg_steps<br>
- (Step count)</li>
- <li>bmr_calories<br>
- (Resting calories)</li>
- <li>bmr_calories_day<br>
- (Average daily calories (without activities))</li>
- <li>calories<br>
- (Activity calories)</li>
- <li>distance<br>
- (Distance in km)</li>
- <li>longest_idle<br>
- (Inactive time in seconds)<br></li>
- <li>sleep_awake<br>
- (Awake time during sleep in seconds)</li>
- <li>sleep_asleep<br>
- (Actual sleep during sleep period, time in seconds)</li>
- <li>awakenings<br>
- (Awakenings)</li>
- <li>light<br>
- (Light sleep during sleep period, time in seconds)</li>
- <li>time_to_sleep<br>
- (Time to fall asleep in seconds)</li>
- <li>bedtime<br>
- (Time in bed)</li>
- <li>deep<br>
- (Deep sleep in seconds)</li>
- <li>awake<br>
- (Time awake in seconds)</li>
- <li>sleep_mode<br>
- (0: sleep mode inactive, 1: sleep mode active) Note: this is not real-time since updates depend on the module's poll-intervall</li>
- <li>stopwatch_mode<br>
- (0: not in stopwatch mode, 1: stopwatch mode active) Note: not suitable for real-time measurements for the reasons above.</li>
- </ul><br>
- <a name="jawboneUp_Get"></a>
- <b>Get</b>
- <ul>
- <li>update<br>
- trigger an update</li>
- </ul><br>
- <a name="jawboneUp_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval<br>
- the interval in seconds for updates. the default ist 3600 (=1h), minimum is 300 (=5min). It is not recommended to go below 900sec.</li>
- <li>disable<br>
- 1 -> disconnect and stop polling</li>
- </ul>
- </ul>
- <p><a name="JeeLink"></a>
- <h3>JeeLink</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#JeeLink'>DE</a>]</div>
- <ul>
- The JeeLink is a family of RF devices sold by <a href="http://jeelabs.com">jeelabs.com</a>.
- It is possible to attach more than one device in order to get better
- reception, fhem will filter out duplicate messages.<br><br>
- This module provides the IODevice for:
- <ul>
- <li><a href="#PCA301">PCA301</a> modules that implement the PCA301 protocol.</li>
- <li><a href="#LaCrosse">LaCrosse</a> modules that implement the IT+ protocol (Sensors like TX29DTH, TX35, ...).</li>
- <li>LevelSender for measuring tank levels</li>
- <li>EMT7110 energy meter</li>
- <li>Other Sensors like WT440XH (their protocol gets transformed to IT+)</li>
- </ul>
- <br>
- 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.
- <br><br>
- <a name="JeeLink_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> JeeLink <device></code> <br>
- <br>
- USB-connected devices:<br><ul>
- <device> specifies the serial port to communicate with the JeeLink.
- The name of the serial-device depends on your distribution, under
- linux the cdc_acm kernel module is responsible, and usually a
- /dev/ttyACM0 device will be created. If your distribution does not have a
- cdc_acm module, you can force usbserial to handle the JeeLink by the
- following command:<ul>modprobe usbserial vendor=0x0403
- product=0x6001</ul>In this case the device is most probably
- /dev/ttyUSB0.<br><br>
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyACM0@57600<br><br>
- If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
- perl module Device::SerialPort is not needed, and fhem opens the device
- with simple file io. This might work if the operating system uses sane
- defaults for the serial parameters, e.g. some Linux distributions and
- OSX. <br>
- </ul>
- <br>
- </ul>
- <a name="JeeLink_Set"></a>
- <b>Set</b>
- <ul>
- <li>raw <data><br>
- send <data> 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.
- </li><br>
- <li>reset<br>
- force a device reset closing and reopening the device.
- </li><br>
- <li>LaCrossePairForSec <sec> [ignore_battery]<br>
- enable autocreate of new LaCrosse sensors for <sec> seconds. If ignore_battery is not given only sensors
- sending the 'new battery' flag will be created.
- </li><br>
- <li>flash [firmwareName]<br>
- 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
- arduino IDE to flash the firmware into the JeeLink this provides a way to flash it directly from FHEM.<br><br>
- The firmwareName argument is optional. If not given, set flash checks the firmware type that is currently installed on the JeeLink and
- updates it with the same type.<br><br>
- There are some requirements:
- <ul>
- <li>avrdude must be installed on the host<br>
- On a linux systems like Cubietruck or Raspberry Pi this can be done with: sudo apt-get install avrdude</li>
- <li>the flashCommand attribute must be set.<br>
- This attribute defines the command, that gets sent to avrdude to flash the JeeLink.<br>
- The default is: avrdude -p atmega328P -c arduino -P [PORT] -D -U flash:w:[HEXFILE] 2>[LOGFILE]<br>
- It contains some place-holders that automatically get filled with the according values:<br>
- <ul>
- <li>[PORT]<br>
- is the port the JeeLink is connectd to (e.g. /dev/ttyUSB0)</li>
- <li>[HEXFILE]<br>
- is the .hex file that shall get flashed. There are three options (applied in this order):<br>
- - passed in set flash<br>
- - taken from the hexFile attribute<br>
- - the default value defined in the module<br>
- </li>
- <li>[LOGFILE]<br>
- The logfile that collects information about the flash process. It gets displayed in FHEM after finishing the flash process</li>
- </ul>
- </li>
- </ul>
- </li><br>
- <li>led <on|off><br>
- Is used to disable the blue activity LED
- </li><br>
- <li>beep<br>
- ...
- </li><br>
- <li>setReceiverMode<br>
- ...
- </li><br>
- </ul>
- <a name="JeeLink_Get"></a>
- <b>Get</b>
- <ul>
- </ul>
- <br>
- <a name="JeeLink_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>Clients<br>
- The received data gets distributed to a client (e.g. LaCrosse, EMT7110, ...) that handles the data.
- This attribute tells, which are the clients, that handle the data. If you add a new module to FHEM, that shall handle
- data distributed by the JeeLink module, you must add it to the Clients attribute.</li>
- <li>MatchList<br>
- can be set to a perl expression that returns a hash that is used as the MatchList<br>
- <code>attr myJeeLink MatchList {'5:AliRF' => '^\\S+\\s+5 '}</code></li>
- <li>initCommands<br>
- Space separated list of commands to send for device initialization.<br>
- This can be used e.g. to bring the LaCrosse Sketch into the data rate toggle mode. In this case initCommands would be: 30t
- </li>
- <li>flashCommand<br>
- See "Set flash"
- </li>
- <li>timeout<br>
- format: <timeout, checkInterval>
- Checks every 'checkInterval' seconds if the last data reception is longer than 'timout' seconds ago.<br>
- If this is the case, a reset is done for the IO-Device.
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="JsonList"></a>
- <h3>JsonList</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#JsonList'>DE</a>]</div>
- <ul>
- <b>Note</b>: this command is deprecated, use <a
- href="#JsonList2">jsonlist2</a> instead.<br><br>
- <code>jsonlist [<devspec>|<typespec>|ROOMS]</code>
- <br><br>
- Returns an JSON tree of all definitions, all notify settings and all at
- entries if no parameter is given. Can also be called via HTTP by
- http://fhemhost:8083/fhem?cmd=jsonlist&XHR=1
- <br><br>
- Example:
- <pre><code> fhem> jsonlist
- {
- "ResultSet": "full",
- "Results": [
- {
- "list": "Global",
- "devices": [
- {
- "DEF": "<no definition>",
- "NAME": "global",
- "NR": "1",
- "STATE": "<no definition>",
- "TYPE": "Global",
- "currentlogfile": "/var/log/fhem/fhem-2011-12.log",
- "logfile": "/var/log/fhem/fhem-%Y-%m.log",
- "ATTR": {
- "configfile": "/etc/fhem/fhem.conf",
- "logfile": "/var/log/fhem/fhem-%Y-%m.log",
- "modpath": "/usr/share/fhem",
- "pidfilename": "/var/run/fhem.pid",
- "port": "7072 global",
- "room": "Server",
- "statefile": "/var/cache/fhem/fhem.save",
- "verbose": "4",
- "version": "=VERS= from =DATE= ($Id: 98_JsonList.pm 12275 2016-10-05 14:33:55Z rudolfkoenig $)"
- },
- "READINGS": []
- }
- ]
- },
- {
- "list": "CM11",
- "devices": [
- {
- "DEF": "/dev/cm11",
- "DeviceName": "/dev/cm11",
- "FD": "14",
- "NAME": "CM11",
- "NR": "19",
- "PARTIAL": "null",
- "STATE": "Initialized",
- "TYPE": "CM11",
- "ATTR": {
- "model": "CM11"
- },
- "READINGS": []
- }
- ]
- },
- {
- [...placeholder for more entrys...]
- },
- ],
- "totalResultsReturned": 235
- }
- </code></pre>
- If specifying <code><devspec></code>, then a detailed status for
- <code><devspec></code> will be displayed, e.g.:
- <pre><code> fhem> jsonlist lamp1
- {
- "ResultSet": {
- "Results": {
- "ATTRIBUTES": {
- "alias": "Lamp on Sideboard",
- "model": "fs20st",
- "room": "Livingroom"
- },
- "BTN": "01",
- "CHANGED": "ARRAY",
- "CHANGETIME": "ARRAY",
- "CODE": {
- "1": "0b0b 01",
- "2": "0b0b 0f",
- "3": "0b0b f0",
- "4": "0b0b ff"
- },
- "DEF": "12341234 1112 lm 1144 fg 4411 gm 4444",
- "IODev": "CUN868",
- "NAME": "lamp1",
- "NR": "155",
- "READINGS": {
- "state": {
- "TIME": "2011-12-01 16:23:01",
- "VAL": "on"
- }
- },
- "STATE": "on",
- "TYPE": "FS20",
- "XMIT": "0b0b"
- }
- }
- }
- </code></pre>
- If specifying <code><typespec></code>, then a list with the status for
- the defined <code><typespec></code> devices will be displayed, e.g.:
- <pre><code> fhem> jsonlist HMS
- {
- "ResultSet": "devices#HMS",
- "Results": [
- {
- "name": "KG.ga.WD.01",
- "state": "Water Detect: off"
- },
- {
- "name": "KG.hz.GD.01",
- "state": "Gas Detect: off"
- },
- {
- "name": "KG.k1.TF.01",
- "state": "T: 16.6 H: 51.2 Bat: ok"
- },
- {
- "name": "NN.xx.RM.xx",
- "state": "smoke_detect: off"
- }
- ],
- "totalResultsReturned": 4
- }
- </code></pre>
- If specifying <code>ROOMS</code>, then a list with the defined rooms
- will be displayed, e.g.:
- <pre><code> fhem> jsonlist ROOMS
- {
- "ResultSet": "rooms",
- "Results": [
- "Bathroom",
- "Bedroom",
- "Children",
- "Diningroom",
- "Garden",
- "House",
- "Livingroom",
- "Office",
- "hidden"
- ],
- "totalResultsReturned": 15
- }
- </code></pre>
- </ul>
- <p><a name="JsonList2"></a>
- <h3>JsonList2</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#JsonList2'>DE</a>]</div>
- <ul>
- <code>jsonlist2 [<devspec>] [<value1> <value2> ...]</code>
- <br><br>
- This is a command, to be issued on the command line (FHEMWEB or telnet
- interface). Can also be called via HTTP by
- <ul>
- http://fhemhost:8083/fhem?cmd=jsonlist2&XHR=1
- </ul>
- Returns an JSON tree of the internal values, readings and attributes of the
- requested definitions.<br>
- If valueX is specified, then output only the corresponding internal (like DEF,
- TYPE, etc), reading (actuator, measured-temp) or attribute for all devices
- from the devspec.<br><br>
- <b>Note</b>: the old command jsonlist (without the 2 as suffix) is deprecated
- and will be removed in the future<br>
- </ul>
- <p><a name="KM271"></a>
- <h3>KM271</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KM271'>DE</a>]</div>
- <ul>
- KM271 is the name of the communication device for the Buderus Logamatic 2105
- or 2107 heating controller. It is connected via a serial line to the fhem
- computer. The fhem module sets the communication device into log-mode, which
- then will generate an event on change of the inner parameters. There are
- about 20.000 events a day, the FHEM module ignores about 90% of them, if the
- <a href="#all_km271_events">all_km271_events</a> attribute is not set.<br>
- <br><br>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module.
- <br><br>
- <a name="KM271define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> KM271 <serial-device-name></code>
- <br><br>
- Example:
- <ul>
- <code>define KM271 KM271 /dev tyS0@2400</code><br>
- </ul>
- </ul>
- <br>
- <a name="KM271set"></a>
- <b>Set</b>
- <ul>
- <code>set KM271 <param> [<value> [<values>]]</code><br><br>
- where param is one of:
- <ul>
- <li>hk1_tagsoll <temp><br>
- sets the by day temperature for heating circuit 1<br>
- 0.5 celsius resolution - temperature between 10 and 30 celsius</li>
- <li>hk2_tagsoll <temp><br>
- sets the by day temperature for heating circuit 2<br>
- (see above)</li>
- <li>hk1_nachtsoll <temp><br>
- sets the by night temperature for heating circuit 1<br>
- (see above)</li>
- <li>hk2_nachtsoll <temp><br>
- sets the by night temperature for heating circuit 2<br>
- (see above)</li>
- <li>hk1_urlaubsoll <temp><br>
- sets the temperature during holiday mode for heating circuit 1<br>
- (see above)</li>
- <li>hk2_urlaubsoll <temp><br>
- sets the temperature during holiday mode for heating circuit 2<br>
- (see above)</li>
- <li>hk1_aussenhalt_ab <temp><br>
- sets the threshold for working mode Aussenhalt for heating circuit 1<br>
- 1.0 celsius resolution - temperature between -20 and 10 celsius</li>
- <li>hk2_aussenhalt_ab <temp><br>
- sets the threshold for working mode Aussenhalt for heating circuit 2<br>
- (see above)</li>
- <li>hk1_betriebsart [automatik|nacht|tag]<br>
- sets the working mode for heating circuit 1<br>
- <ul>
- <li>automatik: the timer program is active and the summer configuration is in effect</li>
- <li>nacht: manual by night working mode, no timer program is in effect</li>
- <li>tag: manual by day working mode, no timer program is in effect</li>
- </ul></li>
- <li>hk2_betriebsart [automatik|nacht|tag]<br>
- sets the working mode for heating circuit 2<br>
- (see above)</li>
- <li>ww_soll <temp><br>
- sets the hot water temperature<br>
- 1.0 celsius resolution - temperature between 30 and 60 celsius</li>
- <li>ww_betriebsart [automatik|nacht|tag]<br>
- sets the working mode for hot water<br>
- <ul>
- <li>automatik: hot water production according to the working modes of both heating circuits</li>
- <li>nacht: no hot water at all</li>
- <li>tag: manual permanent hot water</li>
- </ul></li>
- <li>ww_on-till [localtime]<br>
- start hot water production till the given time is reached<br>
- localtime must have the format HH:MM[:SS]<br>
- 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>
- <li>ww_zirkulation [count]<br>
- count pumping phases for hot water circulation per hour<br>
- count must be between 0 and 7 with special meaning for<br>
- <ul>
- <li>0: no circulation at all</li>
- <li>7: circulation is always on</li>
- </ul></li>
- <li>sommer_ab <temp><br>
- temp defines the threshold for switching between summer or winter mode of the heater<br>
- 1.0 celsius resolution - temp must be between 9 and 31 with special meaning for<br>
- <ul>
- <li> 9: fixed summer mode (only hot water and frost protection)</li>
- <li>31: fixed winter mode</li>
- </ul></li>
- <li>frost_ab <temp><br>
- temp defines the threshold for activation of frost protection of the heater<br>
- 1.0 celsius resolution - temp must be between -20 and 10 celsius</li>
- <li>urlaub [count]<br>
- sets the duration of the holiday mode to count days<br>
- count must be between 0 and 99 with special meaning for<br>
- <ul>
- <li> 0: holiday mode is deactivated</li>
- </ul></li>
- <li>hk1_programm [eigen|familie|frueh|spaet|vormittag|nachmittag|mittag|single|senior]<br>
- sets the timer program for heating circuit 1<br>
- <ul>
- <li>eigen: the custom program defined by the user (see below) is used</li>
- <li>all others: predefined programs from Buderus for various situations (see Buderus manual for details)</li>
- </ul></li>
- <li>hk2_programm [eigen|familie|frueh|spaet|vormittag|nachmittag|mittag|single|senior]<br>
- sets the timer program for heating circuit 2<br>
- (see above)</li>
- <li>hk1_timer [<position> delete|<position> <on-day> <on-time> <off-day> <off-time>]<br>
- sets (or deactivates) a by day working mode time interval for the custom program of heating circuit 1<br>
- <ul>
- <li>position: addresses a slot of the custom timer program and must be between 1 and 21<br>
- 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>
- <li>on-day: first part of the on-timepoint<br>
- valid arguments are [mo|di|mi|do|fr|sa|so]</li>
- <li>on-time: second part of the on-timepoint<br>
- valid arguments have the format HH:MM (supported resolution: 10 min)</li>
- <li>off-day: first part of the off-timepoint<br>
- (see above)</li>
- <li>off-time: second part of the off-timepoint<br>
- valid arguments have the format HH:MM (supported resolution: 10 min)</li>
- </ul>
- 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.
- 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.
- The consistency of the program is in the responsibility of the user.
- <br><br>
- Example:
- <ul>
- <code>set KM271 hk1_timer 1 mo 06:30 mo 08:20</code><br>
- </ul><br>
- 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>
- <li>hk2_timer [<position> delete|<position> <on-day> <on-time> <off-day> <off-time>]<br>
- sets (or deactivates) a by day working mode time interval for the custom program of heating circuit 2<br>
- (see above)</li>
- <li>logmode<br>set to logmode / request all readings again</li>
- </ul>
- </ul>
- <br>
- <a name="KM271get"></a>
- <b>Get</b>
- <ul>
- <code>get KM271 <param></code><br><br>
- where param is one of:
- <ul>
- <li>l_fehler<br>
- gets the latest active error (code and message)</li>
- <li>l_fehlerzeitpunkt<br>
- gets the timestamp, when the latest active error occured (format of Perl-function 'time')</li>
- <li>l_fehleraktualisierung<br>
- gets the timestamp, of the latest update of an error status (format of Perl-function 'time')</li>
- </ul>
- </ul>
- <br>
- <a name="KM271attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <a name="all_km271_events"></a>
- <li>all_km271_events<br>
- If this attribute is set to 1, do not ignore following events:<br>
- HK1_Vorlaufisttemperatur, HK1_Mischerstellung, HK2_Vorlaufisttemperatur, HK2_Mischerstellung,
- Kessel_Vorlaufisttemperatur, Kessel_Integral, Kessel_Integral1<br>
- These events account for ca. 92% of all events.<br>
- All UNKNOWN events are ignored too, most of them were only seen
- directly after setting the device into logmode.
- </li>
- <a name="ww_timermode"></a>
- <li>ww_timermode [automatik|tag]<br>
- Defines the working mode for the ww_on-till command (default is tag).<br>
- ww_on-till will set the ww_betriebsart of the heater according to this attribute.
- </li>
- <a name="readingsFilter"></a>
- <li>readingsFilter<br>
- Regular expression for selection of desired readings.<br>
- Only readings which will match the regular expression will be used. All other readings are
- suppressed in the device and even in the logfile.
- </li>
- <a name="additionalNotify"></a>
- <li>additionalNotify<br>
- Regular expression for activation of notify for readings with normally suppressed events.<br>
- Useful for *_Vorlaufisttemperatur readings if notification should be activated only for a specific reading
- and not for all like all_km271_events.
- </li>
- </ul>
- <br>
- <a name="KM271events"></a>
- <b>Generated events:</b>
- <ul>
- <li>Abgastemperatur</li>
- <li>Aussentemperatur</li>
- <li>Aussentemperatur_gedaempft</li>
- <li>Brenner_Ansteuerung</li>
- <li>Brenner_Ausschalttemperatur</li>
- <li>Brenner_Einschalttemperatur</li>
- <li>Brenner_Laufzeit1_Minuten2</li>
- <li>Brenner_Laufzeit1_Minuten1</li>
- <li>Brenner_Laufzeit1_Minuten</li>
- <li>Brenner_Laufzeit2_Minuten2</li>
- <li>Brenner_Laufzeit2_Minuten1</li>
- <li>Brenner_Laufzeit2_Minuten</li>
- <li>Brenner_Mod_Stellglied</li>
- <li>ERR_Fehlerspeicher1</li>
- <li>ERR_Fehlerspeicher2</li>
- <li>ERR_Fehlerspeicher3</li>
- <li>ERR_Fehlerspeicher4</li>
- <li>ERR_Alarmstatus</li>
- <li>HK1_Ausschaltoptimierung</li>
- <li>HK1_Aussenhalt_ab</li>
- <li>HK1_Betriebswerte1</li>
- <li>HK1_Betriebswerte2</li>
- <li>HK1_Einschaltoptimierung</li>
- <li>HK1_Heizkennlinie_10_Grad</li>
- <li>HK1_Heizkennlinie_-10_Grad</li>
- <li>HK1_Heizkennlinie_0_Grad</li>
- <li>HK1_Mischerstellung</li>
- <li>HK1_Pumpe</li>
- <li>HK1_Raumisttemperatur</li>
- <li>HK1_Raumsolltemperatur</li>
- <li>HK1_Vorlaufisttemperatur</li>
- <li>HK1_Vorlaufsolltemperatur</li>
- <li>HK2_Ausschaltoptimierung</li>
- <li>HK2_Aussenhalt_ab</li>
- <li>HK2_Betriebswerte1</li>
- <li>HK2_Betriebswerte2</li>
- <li>HK2_Einschaltoptimierung</li>
- <li>HK2_Heizkennlinie_10_Grad</li>
- <li>HK2_Heizkennlinie_-10_Grad</li>
- <li>HK2_Heizkennlinie_0_Grad</li>
- <li>HK2_Mischerstellung</li>
- <li>HK2_Pumpe</li>
- <li>HK2_Raumisttemperatur</li>
- <li>HK2_Raumsolltemperatur</li>
- <li>HK2_Vorlaufisttemperatur</li>
- <li>HK2_Vorlaufsolltemperatur</li>
- <li>Kessel_Betrieb</li>
- <li>Kessel_Fehler</li>
- <li>Kessel_Integral</li>
- <li>Kessel_Integral1</li>
- <li>Kessel_Vorlaufisttemperatur</li>
- <li>Kessel_Vorlaufsolltemperatur</li>
- <li>Modulkennung</li>
- <li>NoData</li>
- <li>Versionsnummer_NK</li>
- <li>Versionsnummer_VK</li>
- <li>WW_Betriebswerte1</li>
- <li>WW_Betriebswerte2</li>
- <li>WW_Einschaltoptimierung</li>
- <li>WW_Isttemperatur</li>
- <li>WW_Pumpentyp</li>
- <li>WW_Solltemperatur</li>
- </ul>
- <br>
- As I cannot explain all the values, I logged data for a period and plotted
- each received value in the following logs:
- <ul>
- <li><a href="km271/km271_Aussentemperatur.png">Aussentemperatur</a></li>
- <li><a href="km271/km271_Betriebswerte.png">Betriebswerte</a></li>
- <li><a href="km271/km271_Brenneransteuerung.png">Brenneransteuerung</a></li>
- <li><a href="km271/km271_Brennerlaufzeit.png">Brennerlaufzeit</a></li>
- <li><a href="km271/km271_Brennerschalttemperatur.png">Brennerschalttemperatur</a></li>
- <li><a href="km271/km271_Heizkennlinie.png">Heizkennlinie</a></li>
- <li><a href="km271/km271_Kesselbetrieb.png">Kesselbetrieb</a></li>
- <li><a href="km271/km271_Kesselintegral.png">Kesselintegral</a></li>
- <li><a href="km271/km271_Ladepumpe.png">Ladepumpe</a></li>
- <li><a href="km271/km271_Raumsolltemperatur_HK1.png">Raumsolltemperatur_HK1</a></li>
- <li><a href="km271/km271_Vorlauftemperatur.png">Vorlauftemperatur</a></li>
- <li><a href="km271/km271_Warmwasser.png">Warmwasser</a></li>
- </ul>
- All of these events are reported directly after initialization (or after
- requesting logmode), along with some 60 configuration records (6byte long
- each). Most parameters from these records are reverse engeneered, they
- all start with CFG_ for configuration and PRG_ for timer program information.
- </ul>
- <p><a name="KM273"></a>
- <h3>KM273</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KM273'>DE</a>]</div>
- <ul>
- <i>KM273</i> implements the can bus communication with the buderus logatherm wps heat pump<br>
- The software expect an SLCAN compatible module like USBtin
- <br><br>
- <a name="KM273define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> KM273 <device></code>
- <br><br>
- Example: <code>define myKM273 KM273 /dev/ttyACM0@115200</code>
- <br><br>
- </ul>
- <br>
- <a name="KM273set"></a>
- <b>Set</b><br>
- <ul>
- <code>set <name> <option> <value></code>
- <br><br>
- Example:<br>
- <code>set myKM273 DHW_TIMEPROGRAM 1</code><br>
- <code>set myKM273 DHW_TIMEPROGRAM Always_On</code><br>
- <br>
- You can <i>set</i> any value to any of the following options.
- <br><br>
- Options:
- <ul>
- <li><i>DHW_CALCULATED_SETPOINT_TEMP</i><br>
- preset for hot water temperature</li>
- <li><i>DHW_TIMEPROGRAM</i><br>
- select: '0' or 'Always_On', '1' or 'Program_1', '2' or 'Program_2'</li>
- <li><i>DHW_PROGRAM_MODE</i><br>
- select: '0' or 'Automatic', '1' or 'Always_On', '2' or 'Always_Off'</li>
- <li><i>DHW_PROGRAM_1_1MON .. ROOM_PROGRAM_1_7SUN</i><br>
- value: 06:00 on 21:00 off </li>
- <li><i>DHW_PROGRAM_2_1MON .. ROOM_PROGRAM_2_7SUN</i><br>
- value: 06:00 on 21:00 off </li>
- <li><i>PUMP_DHW_PROGRAM1_START_TIME .. PUMP_DHW_PROGRAM4_STOP_TIME</i><br>
- dayly program for switching on and off the hot water circulation pump<br>
- you can set 4 time ranges where the pump should be switched on
- value: xx:xx</li>
- <li><i>HEATING_SEASON_MODE</i><br>
- select: '0' or 'Automatic', '1' or 'Always_On', '2' or 'Always_Off'</li>
- <li><i>ROOM_TIMEPROGRAM</i><br>
- time program for circuit 1<br>
- 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>
- <li><i>ROOM_PROGRAM_MODE</i><br>
- room program for circuit 1<br>
- select: '0' or 'Automatic', '1' or 'Normal', '2' or 'Exception', '3' or 'HeatingOff'</li>
- <li><i>ROOM_PROGRAM_1_1MON .. ROOM_PROGRAM_1_7SUN</i><br>
- times of Program_1 for circuit 1<br>
- value: 06:00 on 21:00 off </li>
- <li><i>ROOM_PROGRAM_2_1MON .. ROOM_PROGRAM_2_7SUN</i><br>
- times of Program_2 for circuit 1<br>
- value: 06:00 on 21:00 off </li>
- <li><i>MV_E12_EEPROM_TIME_PROGRAM</i><br>
- time program for circuit 2<br>
- 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>
- <li><i>MV_E12_EEPROM_ROOM_PROGRAM_MODE</i><br>
- room program for circuit 2<br>
- select: '0' or 'Automatic', '1' or 'Normal', '2' or 'Exception', '3' or 'HeatingOff'</li>
- <li><i>MV_E12_EEPROM_TIME_PROGRAM_1_1MON .. MV_E12_EEPROM_TIME_PROGRAM_1_7SUN</i><br>
- times of Program_1 for circuit 2<br>
- value: 06:00 on 21:00 off </li>
- <li><i>MV_E12_EEPROM_TIME_PROGRAM_2_1MON .. MV_E12_EEPROM_TIME_PROGRAM_2_7SUN</i><br>
- times of Program_2 for circuit 2<br>
- value: 06:00 on 21:00 off </li>
- <li><i>XDHW_STOP_TEMP</i><br>
- extra hot water temperature</li>
- <li><i>XDHW_TIME</i><br>
- hours for extra hot water</li>
- </ul>
- <br>
- Special Options:
- <ul>
- <li><i>ReadAll</i><br>
- read once all 2000..2600 paramater of the heatpump<br>
- the values will be logged into standard fhem log<br>
- on second read, only the changed values are logged
- </li>
- <li><i>RAW</i><br>
- Send CAN RAW message in USBTin/SLCAN format: read Riiiiiiii0, write TiiiiiiiiLvv...</li>
- </ul>
- </ul>
- <br>
- <a name="KM273get"></a>
- <b>Get</b><br>
- <ul>
- <code>get <name> <option></code>
- <br><br>
- You can <i>get</i> the value of any of the options described in
- <a href="#KM273set">paragraph "Set" above</a>. See
- <a href="http://fhem.de/commandref.html#get">commandref#get</a> for more info about
- the get command.
- </ul>
- <br>
- <a name="KM273attr"></a>
- <b>Attributes</b>
- <ul>
- <code>attr <name> <attribute> <value></code>
- <br><br>
- See <a href="http://fhem.de/commandref.html#attr">commandref#attr</a> for more info about
- the attr command.
- <br><br>
- Attributes:
- <ul>
- <li><i>DoNotPoll</i> 0|1<br>
- When you set DoNotPoll to "1", the module is only listening to the telegrams on CAN bus. The Parameter table is still read from heatpump! Default is "0".<br>
- </li>
- <li><i>ListenOnly</i> 0|1<br>
- When you set ListenOnly to "1", the module is only listening to the telegrams on CAN bus. Also the Parameter table isn't read from heatpump. Default is "0".<br>
- </li>
- <li><i>HeatCircuit2Active</i> 0|1<br>
- When you set HeatCircuit2Active to "1", the module read and set also the values for the second heating circuit E12. Default is "0".<br>
- </li>
- <li><i>AddToReadings</i> List of Variables<br>
- additional variables, which are not polled by the module can by added here<br>
- Example: attr myKM273 AddToReadings GT3_STATUS GT5_STATUS GT5_ANSLUTEN<br>
- </li>
- <li><i>AddToGetSet</i> List of Variables<br>
- additional variables, which are not in get/set list definded by the module can by added here<br>
- Example: attr myKM273 AddToGetSet ACCESS_LEVEL GT3_KORRIGERING GT5_KVITTERAD<br>
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="KNX"></a>
- <h3>KNX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KNX'>DE</a>]</div>
- <ul>
- <p>KNX is a standard for building automation / home automation.
- It is mainly based on a twisted pair wiring, but also other mediums (ip, wireless) are specified.</p>
- 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>
- <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)
- to switch on/off KNX devices. For numeric DPT you can use value (set <devname> value <177.45>). For string-DPT you can use string (set <devname> string <Hello World>). For other, non-defined
- dpt you can send raw hex values to the network (set <devname> raw <hexval>).<br>
- 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>
- <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.
- 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<group> and the sender
- address. For every set, there will be a reading with state and setG<group>.</p>
- <p><a name="KNXdefine"></a> <b>Define</b></p>
- <ul>
- <code>define <name> KNX <group>:<DPT>:<[;readingName]> [<group>:<DPT> ..] [IODev]</code>
-
- <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>
-
- <p>Define an KNX device, connected via a <a href="#TUL">TUL</a>. The <group> parameters are either a group name notation (0-15/0-15/0-255) or the hex representation of the value (0-f0-f0-ff).
- 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
- via a different group, you have to index it (set <devname> value <17.0> <g2>).<br>
- If you use the readingName, readings are based on this name (e.g. hugo-set, hugo-get for name hugo).</p>
- <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
- KNX_nnmmooo where nn is the line adress, mm the area and ooo the device.</p>
- <p>Example:</p>
- <pre>
- define lamp1 KNX 0/10/12:dpt1
- define lamp1 KNX 0/10/12:dpt1:meinName 0/0/5:dpt1.001
- define lamp1 KNX 0A0C:dpt1.003 myTul
- </pre>
- 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.
- Here on/off has to be supplied.<br>
- 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>
-
- <p>Example:</p>
- <pre>
- define rollo KNX 0/10/12:dpt1.008
- set rollo value off
- set rollo value on
- </pre>
-
- </ul>
-
- <p><a name="KNXset"></a> <b>Set</b></p>
- <ul>
- <code>set <name> <on, off></code> [g<groupnr>]
- <code>set <name> <on-for-timer, on-until> <time> [g<groupnr>]</code>
- <code>set <name> <value> [g<groupnr>]</code>
- <code>set <name> <string> [g<groupnr>]</code>
- <code>set <name> <raw> [g<groupnr>]</code>
-
- <p>Example:</p>
- <pre>
- set lamp1 on
- set lamp1 off
- set lamp1 on-for-timer 10
- set lamp1 on-until 13:15:00
- set foobar raw 234578
- set thermo value 23.44
- set message value Hallo Welt
- </pre>
- <p>When as last argument a g<groupnr> is present, the command will be sent
- to the KNX group indexed by the groupnr (starting by 1, in the order as given in define).</p>
- <pre>
- define lamp1 KNX 0/10/01:dpt1 0/10/02:dpt1
- set lamp1 on g2 (will send "on" to 0/10/02)
- </pre>
- <p>A dimmer can be used with a slider as shown in following example:</p>
- <pre>
- define dim1 KNX 0/0/5:dpt5.001
- attr dim1 slider 0,1,100
- attr dim1 webCmd value
- </pre>
-
- <p>The current date and time can be sent to the bus by the following settings:</p>
- <pre>
- define timedev KNX 0/0/7:dpt10
- attr timedev webCmd value now
-
- define datedev KNX 0/0/8:dpt11
- attr datedev webCmd value now
-
- # send every midnight the new date
- define dateset at *00:00:00 set datedev value now
-
- # send every hour the current time
- define timeset at +*01:00:00 set timedev value now
- </pre>
- </ul>
-
- <p><a name="KNXget"></a> <b>Get</b></p>
- <ul>
- <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>
- The answer from the bus-device is not shown in the toolbox, but is treated like a regular telegram.</p>
- </ul>
-
- <p><a name="KNXattr"></a> <b>Attributes</b></p>
- <ul><br>
- Common attributes:<br>
- <a href="#DbLogInclude">DbLogInclude</a><br>
- <a href="#DbLogExclude">DbLogExclude</a><br>
- <a href="#IODev">IODev</a><br>
- <a href="#alias">alias</a><br>
- <a href="#comment">comment</a><br>
- <a href="#devStateIcon">devStateIcon</a><br>
- <a href="#devStateStyle">devStateStyle</a><br>
- <a href="#do_not_notify">do_not_notify</a><br>
- <a href="#readingFnAttributes">readingFnAttributes</a><br>
- <a href="#event-aggregator">event-aggregator</a><br>
- <a href="#event-min-interval">event-min-interval</a><br>
- <a href="#event-on-change-reading">event-on-change-reading</a><br>
- <a href="#event-on-update-reading">event-on-update-reading</a><br>
- <a href="#eventMap">eventMap</a><br>
- <a href="#group">group</a><br>
- <a href="#icon">icon</a><br>
- <a href="#room">room</a><br>
- <a href="#showtime">showtime</a><br>
- <a href="#sortby">sortby</a><br>
- <a href="#stateFormat">stateFormat</a><br>
- <a href="#userReadings">userReadings</a><br>
- <a href="#userattr">userattr</a><br>
- <a href="#verbose">verbose</a><br>
- <a href="#webCmd">webCmd</a><br>
- <a href="#widgetOverride">widgetOverride</a><br>
- <br>
- </ul>
- <p><a name="KNXformat"></a> <b>format</b></p>
- <ul>
- The content of this attribute is added to every received value, before this is copied to state.
- <p>Example:</p>
- <pre>
- define myTemperature KNX 0/1/1:dpt5
- attr myTemperature format °C;
- </pre>
- </ul>
- <p><a name="KNXstateRegex"></a> <b>stateRegex</b></p>
- <ul>
- 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<group>:<state-value>. 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, ...
- 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
- <p>Example:</p>
- <pre>
- define myLamp KNX 0/1/1:dpt1 0/1/2:dpt1 0/1/2:dpt1
- attr myLamp stateRegex /getG1:/steuern:/ /getG2:/status:/ /getG3:/sperre:/ /setG[13]:/steuern:/ /setG[3]://
- attr myLamp devStateIcon status.on:general_an status.off:general_aus sperre.on:lock steuern.*:hourglass
- </pre>
- </ul>
- <p><a name="KNXstateCmd"></a> <b>stateCmd</b></p>
- <ul>
- You can supply a perl-command for modifying state. This command is executed directly before updating the reading - so after renaming, format and regex.
- Please supply a valid perl command like using the attribute stateFormat.
- Unlike stateFormat the stateCmd modifies also the content of the reading, not only the hash-conten for visualization.
- <p>Example:</p>
- <pre>
- define myLamp KNX 0/1/1:dpt1 0/1/2:dpt1 0/1/2:dpt1
- attr myLamp stateCmd {$state = sprintf("%s", ReadingsVal($name,"getG2","undef"))}
- </pre>
- </ul>
- <p><a name="KNXanswerReading"></a> <b>answerReading</b></p>
- <ul>
- If enabled, FHEM answers on read requests. The content of state is send to the bus as answer.
- <p>If set to 1, read-requests are answered</p>
- </ul>
- <p><a name="KNXlistenonly"></a> <b>listenonly</b></p>
- <ul>
- If set to 1, the device may not send any messages. As well answering requests although get is prohibited.
- </ul>
- <p><a name="KNXreadonly"></a> <b>readonly</b></p>
- <ul>
- If set to 1, the device may not send any messages. Answering requests are prohibited.Get is allowed.
- </ul>
- <p><a name="KNXslider"></a> <b>slider</b></p>
- <ul>
- slider <min>,<step>,<max><br>
- With this attribute you can add a slider to any device.
- <p>Example:</p>
- <pre>
- define myDimmer KNX 0/1/1:dpt5
- attr myDimmer slider 0,1,100
- attr myDimmer webCmd value
- </pre>
- </ul>
- <p><a name="KNXdpt"></a> <b>DPT - datapoint-types</b></p>
- <ul>
- <p>The following dpt are implemented and have to be assigned within the device definition.</p>
- dpt1 on, off<br>
- dpt1.001 on, off<br>
- dpt1.002 true, false<br>
- dpt1.003 enable, disable<br>
- dpt1.004 no ramp, ramp<br>
- dpt1.005 no alarm, alarm<br>
- dpt1.006 low, high<br>
- dpt1.007 decrease, increase<br>
- dpt1.008 up, down<br>
- dpt1.009 open, closed<br>
- dpt1.010 start, stop<br>
- dpt1.011 inactive, active<br>
- dpt1.012 not inverted, inverted<br>
- dpt1.013 start/stop, ciclically<br>
- dpt1.014 fixed, calculated<br>
- dpt1.015 no action, reset<br>
- dpt1.016 no action, acknowledge<br>
- dpt1.017 trigger, trigger<br>
- dpt1.018 not occupied, occupied<br>
- dpt1.019 closed, open<br>
- dpt1.021 logical or, logical and<br>
- dpt1.022 scene A, scene B<br>
- dpt1.023 move up/down, move and step mode<br>
- dpt2 value on, value off, value forceOn, value forceOff<br>
- dpt3 -100..+100<br>
- dpt5 0..255<br>
- dpt5.001 0..100 %<br>
- dpt5.003 0..360 °<br>
- dpt5.004 0..255 %<br>
- dpt6 -127..+127<br>
- dpt6.001 0..100 %<br>
- dpt7 0..65535<br>
- dpt7.001 0..65535 s<br>
- dpt7.005 0..65535 s<br>
- dpt7.005 0..65535 m<br>
- dpt7.012 0..65535 mA<br>
- dpt7.013 0..65535 lux<br>
- dpt8 -32768..32768<br>
- dpt8.005 -32768..32768 s<br>
- dpt8.010 -32768..32768 %<br>
- dpt8.011 -32768..32768 °<br>
- dpt9 -670760.0..+670760.0<br>
- dpt9.001 -670760.0..+670760.0 °<br>
- dpt9.004 -670760.0..+670760.0 lux<br>
- dpt9.005 -670760.0..+670760.0 m/s<br>
- dpt9.006 -670760.0..+670760.0 Pa<br>
- dpt9.007 -670760.0..+670760.0 %<br>
- dpt9.008 -670760.0..+670760.0 ppm<br>
- dpt9.009 -670760.0..+670760.0 mł/h<br>
- dpt9.010 -670760.0..+670760.0 s<br>
- dpt9.021 -670760.0..+670760.0 mA<br>
- dpt9.024 -670760.0..+670760.0 kW<br>
- dpt9.025 -670760.0..+670760.0 l/h<br>
- dpt9.026 -670760.0..+670760.0 l/h<br>
- dpt9.028 -670760.0..+670760.0 km/h<br>
- dpt10 01:00:00<br>
- dpt11 01.01.2000<br>
- dpt12 0..+Inf<br>
- dpt13 -Inf..+Inf<br>
- dpt13.010 -Inf..+Inf Wh<br>
- dpt13.013 -Inf..+Inf kWh<br>
- dpt14 -Inf.0..+Inf.0<br>
- dpt14.019 -Inf.0..+Inf.0 A<br>
- dpt14.027 -Inf.0..+Inf.0 V<br>
- dpt14.056 -Inf.0..+Inf.0 W<br>
- dpt14.057 -Inf.0..+Inf.0 cosΦ<br>
- dpt14.068 -Inf.0..+Inf.0 °C;<br>
- dpt14.076 -Inf.0..+Inf.0 m³<br>
- dpt16 String;<br>
- dpt16.000 ASCII-String;<br>
- dpt16.001 ISO-8859-1-String (Latin1);<br>
- dpt19 01.12.2010_01:00:00<br>
- dpt232 RGB-Value RRGGBB<br>
- </ul>
- </ul>
- <p><a name="KODI"></a>
- <h3>KODI</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KODI'>DE</a>]</div>
- <ul>
- <a name="XBMCdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> KODI <ip[:port]> <http|tcp> [<username>] [<password>]</code>
- <br><br>
- 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>
-
- <b>Prerequisites</b>
- <ul>
- <li>Requires XBMC "Frodo" 12.0.</li>
- <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>
- <li>The Perl module JSON is required. <br>
- On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
- Via CPAN: <code>cpan install JSON</code>
- To get it working on a Fritzbox the JSON module has to be installed manually.</li>
- </ul>
- 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
- for TCP. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC>here</a>.<br><br>
-
- 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.
- See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br><br>
- Example:<br><br>
- <ul>
- <code>
- define htpc KODI 192.168.0.10 tcp
- <br><br>
- define htpc KODI 192.168.0.10:9000 tcp # With custom port
- <br><br>
- define htpc KODI 192.168.0.10 http # Use HTTP instead of TCP - Note: to receive events use TCP!
- <br><br>
- define htpc KODI 192.168.0.10 http kodi passwd # Use HTTP with credentials - Note: to receive events use TCP!
- </code>
- </ul><br><br>
-
- Remote control:<br>
- 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
- following commands:<br><br>
- <ul>
- <code>
- define <rc_name> remotecontrol #adds the remote control
- <br><br>
- set <rc_name> layout KODI_RClayout #sets the layout for the remote control
- <br><br>
- set <rc_name> makenotify <KODI_device> #links the buttons to the actions
- </code>
- </ul><br><br>
-
- Known issues:<br>
- Kodi sometimes creates events twices. For example the Player.OnPlay event is created twice if play a song. Unfortunately this
- is a issue of Kodi. The fix of this bug is included in future version of Kodi (> 12.2).
-
- </ul>
-
- <a name="KODIset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code>
- <br><br>
- This module supports the following commands:<br>
-
- Player related commands:<br>
- <ul>
- <li><b>play [<all|audio|video|picture>]</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>
- <li><b>pause [<all|audio|video|picture>]</b> - pauses the playback</li>
- <li><b>playpause [<all|audio|video|picture>]</b> - toggles between play and pause for the given player</li>
- <li><b>stop [<all|audio|video|picture>]</b> - stop the playback</li>
- <li><b>next [<all|audio|video|picture>]</b> - jump to the next track</li>
- <li><b>prev [<all|audio|video|picture>]</b> - jump to the previous track or the beginning of the current track.</li>
- <li><b>goto <position> [<audio|video|picture>]</b> - Goes to the <position> in the playlist. <position> has to be a number.</li>
- <li><b>shuffle [<toggle|on|off>] [<audio|video|picture>]</b> - Enables/Disables shuffle mode. Without furhter parameters the shuffle mode is toggled.</li>
- <li><b>repeat <one|all|off> [<audio|video|picture>]</b> - Sets the repeat mode.</li>
- <li><b>open <URI></b> - Plays the resource located at the URI (can be a url or a file)</li>
- <li><b>opendir <path></b> - Plays the content of the directory</li>
- <li><b>openmovieid <path></b> - Plays a movie by id</li>
- <li><b>openepisodeid <path></b> - Plays an episode by id</li>
- <li><b>openchannelid <path></b> - Switches to channel by id</li>
- <li><b>addon <addonid> <parametername> <parametervalue></b> - Executes addon with one Parameter, for example set kodi addon script.json-cec command activate</li>
- <li><b>seek <hh:mm:ss></b> - seek to the specified time</li>
- </ul>
- <br>Input related commands:<br>
- <ul>
- <li><b>back</b> - Back-button</li>
- <li><b>down</b> - Down-button</li>
- <li><b>up</b> - Up-button</li>
- <li><b>left</b> - Left-button</li>
- <li><b>right</b> - Right-button</li>
- <li><b>home</b> - Home-button</li>
- <li><b>select</b> - Select-button</li>
- <li><b>info</b> - Info-button</li>
- <li><b>showosd</b> - Opens the OSD (On Screen Display)</li>
- <li><b>showcodec</b> - Shows Codec information</li>
- <li><b>exec <action></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>
- <li><b>send <text></b> - Sends <text> as input to Kodi</li>
- <li><b>jsonraw</b> - Sends raw JSON data to Kodi</li>
- </ul>
- <br>Libary related commands:<br>
- <ul>
- <li><b>videolibrary clean</b> - Removes non-existing files from the video libary</li>
- <li><b>videolibrary scan</b> - Scan for new video files</li>
- <li><b>audiolibrary clean</b> - Removes non-existing files from the audio libary</li>
- <li><b>audiolibrary scan</b> - Scan for new audio files</li>
- </ul>
- <br>Application related commands:<br>
- <ul>
- <li><b>activatewindow <name></b> - activates the window "name" of the following list:
- <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>
- </li>
- <li><b>mute [<0|1>]</b> - 1 for mute; 0 for unmute; by default the mute status will be toggled</li>
- <li><b>volume <n></b> - sets the volume to <n>. <n> must be a number between 0 and 100</li>
- <li><b>volumeDown <n></b> - volume down</li>
- <li><b>volumeUp <n></b> - volume up</li>
- <li><b>quit</b> - closes Kodi</li>
- <li><b>off</b> - depending on the value of the attribute "offMode" Kodi will be closed (see quit) or the system will be shut down, put into hibernation or stand by. Default is quit.</li>
- </ul>
- <br>System related commands:<br>
- <ul>
- <li><b>eject</b> - will eject the optical drive</li>
- <li><b>shutdown</b> - the Kodi host will be shut down</li>
- <li><b>suspend</b> - the Kodi host will be put into stand by</li>
- <li><b>hibernate</b> - the Kodi host will be put into hibernation</li>
- <li><b>reboot</b> - the Kodi host will be rebooted</li>
- <li><b>connect</b> - try to connect to the Kodi host immediately</li>
- </ul>
- </ul>
- <br><br>
- <u>Messaging</u>
- <ul>
- To show messages on Kodi (little message PopUp at the bottom right egde of the screen) you can use the following commands:<br>
- <code>set <KODI_device> msg <title> <msg> [<duration>] [<icon>]</code><br>
- 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
- 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
- of multiple words.
- </ul>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li><b>audiolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
- <li><b>currentAlbum</b> - album of the current song/musicvideo</li>
- <li><b>currentArtist</b> - artist of the current song/musicvideo</li>
- <li><b>currentMedia</b> - file/URL of the media item being played</li>
- <li><b>currentTitle</b> - title of the current media item</li>
- <li><b>currentTrack</b> - track of the current song/musicvideo</li>
- <li><b>episode</b> - episode number</li>
- <li><b>episodeid</b> - id of the episode in the video library</li>
- <li><b>fullscreen</b> - indicates if Kodi runs in fullscreen mode (on/off)</li>
- <li><b>label</b> - label of the current media item</li>
- <li><b>movieid</b> - id of the movie in the video library</li>
- <li><b>musicvideoid</b> - id of the musicvideo in the video library</li>
- <li><b>mute</b> - indicates if Kodi is muted (on/off)</li>
- <li><b>name</b> - software name (e.g. Kodi)</li>
- <li><b>originaltitle</b> - original title of the movie being played</li>
- <li><b>partymode</b> - indicates if Kodi runs in party mode (on/off) (not available for Plex)</li>
- <li><b>playlist</b> - Possible values: add, clear, remove</li>
- <li><b>playStatus</b> - Indicates the player status: playing, paused, stopped</li>
- <li><b>repeat</b> - current repeat mode (one/all/off)</li>
- <li><b>season</b> - season of the current episode</li>
- <li><b>showtitle</b> - title of the show being played</li>
- <li><b>shuffle</b> - indicates if the playback is shuffled (on/off)</li>
- <li><b>skin</b> - current skin of Kodi</li>
- <li><b>songid</b> - id of the song in the music library</li>
- <li><b>system</b> - Possible values: lowbattery, quit, restart, sleep, wake</li>
- <li><b>time</b> - current position in the playing media item (only updated on play/pause)</li>
- <li><b>totaltime</b> - total run time of the current media item</li>
- <li><b>type</b> - type of the media item. Possible values: episode, movie, song, musicvideo, picture, unknown</li>
- <li><b>version</b> - version of Kodi</li>
- <li><b>videolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
- <li><b>volume</b> - value between 0 and 100 stating the current volume setting</li>
- <li><b>year</b> - year of the movie being played</li>
- <li><b>3dfile</b> - is a 3D movie according to filename</li>
- <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>
- </ul>
- <br><br>
- <u>Remarks on the events</u><br><br>
- <ul>
- The event <b>playStatus = playing</b> indicates a playback of a media item. Depending on the event <b>type</b> different events are generated:
- <ul>
- <li><b>type = song</b> generated events are: <b>album, artist, file, title</b> and <b>track</b></li>
- <li><b>type = musicvideo</b> generated events are: <b>album, artist, file</b> and <b>title</b></li>
- <li><b>type = episode</b> generated events are: <b>episode, file, season, showtitle,</b> and <b>title</b></li>
- <li><b>type = movie</b> generated events are: <b>originaltitle, file, title,</b> and <b>year</b></li>
- <li><b>type = picture</b> generated events are: <b>file</b></li>
- <li><b>type = unknown</b> generated events are: <b>file</b></li>
- </ul>
- </ul>
- <br><br>
- <a name="KODIattr"></a>
- <b>Attributes</b>
- <ul>
- <li>compatibilityMode<br>
- This module can also be used to control Plex, since the JSON Api is mostly the same, but there are some differences.
- If you want to control Plex set the attribute <i>compatibilityMode</i> to <i>plex</i>.</li>
- <li>offMode<br>
- 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),
- <i>suspend</i> (puts system into stand by), and <i>shutdown</i> (shuts down the system). Default value is <i>quit</i></li>
- <li>fork<br>
- If Kodi does not run all the time it used to be the case that FHEM blocks because it cannot reach Kodi (only happened
- if TCP was used). If you encounter problems like FHEM not responding for a few seconds then you should set <code>attr <KODI_device> fork enable</code>
- which will move the search for Kodi into a separate process.</li>
- <li>updateInterval<br>
- 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>
- <li>disable<br>
- Disables the device. All connections will be closed immediately.</li>
- <li>jsonResponseReading<br>
- 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.
- Also an event is triggered upon each update.</li>
- </ul>
- </ul>
- <p><a name="KOPP_FC"></a>
- <h3>Kopp Free Control protocol</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KOPP_FC'>DE</a>]</div>
- <ul>
- <b>Please take into account: this protocol is under construction. Commands may change </b>
- <br><br>
- The Kopp Free Control protocol is used by Kopp receivers/actuators and senders.
- This module is able to send commands to Kopp actuators and receive commands from Kopp transmitters. Currently supports devices: dimmers, switches and blinds.
- The communication is done via a <a href="#CUL">CUL</a> or compatible device (e.g. CCD...).
- This devices must be defined before using this protocol.
- <br><br>
- <b>Assign the Kopp Free Control protocol to a CUL or compatible device</b>
- <ul>
- <code>define CUL_0 CUL /dev/ttyAMA0@38400 1234</code><br>
- <code>attr CUL_0 rfmode KOPP_FC</code>
- <br>
- This attribute ("rfmode KOPP_FC") assigns the Kopp protocol to device CUL_0<br>
- You may <b>not</b> assign/use a second protocol on this device
- <br>
- </ul>
- <br>
- <a name="KOPP_FCdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> KOPP_FC <Keycode> <Transmittercode1> <Transmittercode2> [<Keycode2>] [<Keycode3>]</code>
-
- <br>
- <br><li><code><name></code></li>
- name is the identifier (name) you plan to assign to your specific device (actuator) as done for any other FHEM device
-
- <br><br><li><code><Keycode></code></li>
- Keycode is a 2 digit hex code (1Byte) which reflects the transmitters key
-
- <br><br><li><code><Transmittercode1></code></li>
- Transmittercode1 is a 4 digit hex code. This code is specific for the transmitter itself.
-
- <br><br><li><code><Transmittercode2></code></li>
- Transmittercode2 is a 2 digit hex code and also specific for the transmitter, but I didn't see any difference while modifying this code.
- (seems this code don't matter the receiver).
-
- <br>Both codes (Transmittercode1/2) are also used to pair the transmitter with the receivers (remote switch, dimmer, blind..)
-
- <br><br><li><code>[<Keycode2>]</code></li>
- Keycode2 is an opional 2 digit hex code (1Byte) which reflects a second transmitters key
-
- <br><br><li><code>[<Keycode3>]</code></li>
- Keycode3 is an opional 2 digit hex code (1Byte) which reflects a third transmitters key
- <br>
- Some receivers like dimmers can be paired with two addional keys, which allow to switch the dimmer directly on or off.
- That means FHEM will always know the current state, which is not the case in one key mode (toggling between on and off)
-
- <br><br>
- Pairing is done by setting the receiver in programming mode by pressing the program button at the receiver<br>
- (small buttom, typically inside a hole).<br>
- Once the receiver is in programming mode send a command (or two, see dimmer above) from within FHEM to complete the pairing.
- For more details take a look to the data sheet of the corresponding receiver type.
- <br>
- You are now able to control the receiver from FHEM, the receiver handles FHEM just linke another remote control.
- </ul>
- <br>
- <a name="KOPP_FCset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <value></code>
- <br>
-
- <br><li><code><value></code></li>
- value is one of:
- <ul>
- <code>on</code><br>
- <code>off</code><br>
- <code>dimm</code><br>
- <code>stop</code><br>
- </ul>
-
- <pre>Examples:
- <code>set Dimmer on</code> # will toggle dimmer device on/off for 1Key remote control,
- <code> </code> will switch on for 3 key remote control
- <code>set Dimmer off</code> # will switch dimmer device off (3 key remote control)
- <code>set Dimmer dimm</code> # will start dimming process
- <code>set Dimmer stop</code> # will stop dimming process
- </pre>
- </ul>
- <a name="KOPP_FCattrib"></a>
- <b>Attributes</b>
- <ul>
- <code>attr <name> model <value></code>
- <br>
- <br><li><code><value></code></li>
- value is one of:
- <ul>
- <code>Switch_8080_01</code><br>
- <code>Switch_8080_01_2Key</code><br>
- <code>Blind_8080_02</code><br>
- <code>Timer_8080_04</code><br>
- <code>Dimm_8011_00</code><br>
- <code>Dimm_8011_00_3Key</code><br>
- </ul>
-
- </ul>
- <br>
-
- <b>Examples</b>
-
- <ul>
- <br>FHEM Config for Dimmer via 1 Key remote control:
- <ul>
- <code>define Dimmer KOPP_FC 65 FA5E 02</code><br>
- <code>attr Dimmer IODev CUL_0</code><br>
- <code>attr Dimmer devStateIcon OnOff:toggle:dimm dimm:dim50%:stop stop:on:dimm off:toggle:dimm</code><br>
- <code>attr Dimmer eventMap on:OnOff dimm:dimm stop:stop</code><br>
- <code>attr Dimmer group TestGroup</code><br>
- <code>attr Dimmer model Dimm_8011_00</code><br>
- <code>attr Dimmer room TestRoom</code><br>
- <code>attr Dimmer webCmd OnOff:dimm:stop</code><br>
- </ul>
-
- <br>FHEM Config for Dimmer via 3 Key remote control:
- <ul>
- <code>define SDimmer KOPP_FC 65 FA5E 02 55 75</code><br>
- <code>attr SDimmer IODev CUL_0</code><br>
- <code>attr SDimmer devStateIcon dimm:dim50%:stop stop:on:off on:on:off off:off:on</code><br>
- <code>attr SDimmer group TestGroup</code><br>
- <code>attr SDimmer icon light_pendant_light</code><br>
- <code>attr SDimmer model Dimm_8011_00_3Key</code><br>
- <code>attr SDimmer room TestRoom</code><br>
- <code>attr SDimmer webCmd on:dimm:stop:off</code><br>
- </ul>
- </ul>
- <br><br>
- <b>Additional Information you can find in corresponding FHEM Wiki</b>
- <ul><li><a href="http://www.fhemwiki.de/w/index.php?title=Kopp_Allgemein&redirect=no">Kopp Allgemein</a></li></ul>
- <br><br>
- </ul>
-
-
- <p>
- <a name="KOSTALPIKO"></a>
- <h3>KOSTALPIKO</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KOSTALPIKO'>DE</a>]</div>
- <div>
- <a name="KOSTALPIKOdefine" id="KOSTALPIKOdefine"></a> <b>Define</b>
- <div>
- <br />
- <code>define <name> KOSTALPIKO <ip-address> <user> <password></code><br />
- <br />
- The module reads the current values from web page of a Kostal Piko inverter.<br />
- It can also be used, to capture the values of global radiation, UV-index and sunshine duration<br />
- from a special web-site (proplanta) regardless of the existence of the inverter.<br />
- <br />
- <b>Parameters:</b><br />
- <ul>
- <li><b><ip-address></b> - the ip address of the inverter</li>
- <li><b><user></b> - the login-user for the inverter's web page</li>
- <li><b><password></b> - the login-password for the inverter's web page</li>
- </ul><br />
- <br />
- <b>Example:</b><br />
- <div>
- <code>define Kostal KOSTALPIKO 192.168.2.4 pvserver pvwr</code><br />
- </div>
- </div><br />
- <a name="KOSTALPIKOset" id="KOSTALPIKOset"></a> <b>Set-Commands</b>
- <div>
- <br />
- <code>set <name> captureGlobalRadiation</code><br />
- <div>
- The values for global radiation, UV-index and sunshine duration are immediately polled.
- </div><br />
- <br />
- <code>set <name> captureKostalData</code><br />
- <div>
- All values of the inverter are immediately polled.
- </div><br />
- </div><a name="KOSTALPIKOattr" id="KOSTALPIKOattr"></a> <b>Attributes</b><br />
- <br />
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><b>BAEnable</b> - if 1, data from ../BA.fhtml site is captured</li>
- <li><b>GR.Interval</b> - poll interval for global radiation in seconds</li>
- <li><b>GR.Link</b> - regionalised link the to the proplanta web page (global radiation, UV-index and sunshine
- duration)<br />
- (see Wiki for further information)</li>
- <li><b>delay</b> - poll interval for the values of the inverter in seconds</li>
- <li>
- <b>delayCounter</b> - delay counter for poll of invert's values beside AC.Power;<br />
- needed for fast acquisition scenarios to limit the log-output.
- </li>
- <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>
- </ul><br />
- <br />
- <a name="KOSTALPIKOreading" id="KOSTALPIKOreading"></a> <b>Generated Readings/Events</b><br />
- <br />
- <ul>
- <li><b>AC.Power</b> - the current power, captured only if the internal delayCounter = 0</li>
- <li><b>AC.Power.Fast</b> - the current power, on each poll cycle; used for fast acquisition scenarios</li>
- <li><b>Daily.Energie</b> - the current procduced energie of the day</li>
- <li><b>Daily.Energie.Last</b> - the value of daily energy at 23:00 clock</li>
- <li><b>Global.Radiation</b> - the value of global radiation (proplanta);useful for determing the expected energy amount of the day</li>
- <li><b>ModeNum</b> - the current processing state of the inverter (1=off 2=idle 3=active)</li>
- <li><b>Mode</b> - the german term for the current ModeNum</li>
- <li><b>Total.Energy</b> - the total produced energie</li>
- <li><b>generator.1.current</b> - the electrical current at string 1</li>
- <li><b>generator.2.current</b> - the electrical current at string 2</li>
- <li><b>generator.3.current</b> - the electrical current at string 3</li>
- <li><b>generator.1.voltage</b> - the voltage at string 1</li>
- <li><b>generator.2.voltage</b> - the voltage at string 2</li>
- <li><b>generator.3.voltage</b> - the voltage at string 3</li>
- <li><b>output.1.voltage</b> - the voltage at output 1</li>
- <li><b>output.2.voltage</b> - the voltage at output 2</li>
- <li><b>output.3.voltage</b> - the voltage at output 3</li>
- <li><b>output.1.power</b> - the power at output 1</li>
- <li><b>output.2.power</b> - the power at output 2</li>
- <li><b>output.3.power</b> - the power at output 3</li>
- <li><b>sensor.1</b> - the voltage at analog input 1</li>
- <li><b>sensor.2</b> - the voltage at analog input 2</li>
- <li><b>sensor.3</b> - the voltage at analog input 3</li>
- <li><b>sensor.4</b> - the voltage at analog input 4</li>
- <li><b>UV.Index</b> - the UV Index (proplanta)</li>
- <li><b>sunshine.duration</b> - the sunshine duration (proplanta)</li>
- </ul><br />
- <b>Additional Readings/Events, if BAEnable=1</b><br />
- <br />
- <ul>
- <li><b>Battery.CycleCount</b> - count of charge cycles</li>
- <li><b>Battery.StateOfCharge</b> - State of charge for the battery in percent</li>
- <li><b>Battery.Voltage</b> - the voltage of the battery</li>
- <li><b>Battery.ChargeCurrent</b> - the charge current of the battery</li>
- <li><b>Battery.Temperature</b> - the temperature of the battery</li>
- <li><b>Power.Solar</b> - the sum of the power produced by the solarinverter</li>
- <li><b>Power.Battery</b> - the power drawn from the battery</li>
- <li><b>Power.Net</b> - the power drawn from the main</li>
- <li><b>Power.Phase1</b> - the power used on phase L1</li>
- <li><b>Power.Phase2</b> - the power used on phase L2</li>
- <li><b>Power.Phase3</b> - the power used on phase L3</li>
- </ul><br />
- <br />
- <b>Additional information</b><br />
- <br />
- <ul>
- <li><a href="http://forum.fhem.de/index.php/topic,24409.msg175253.html#msg175253">Discussion in FHEM forum</a></li>
- <li><a href="http://www.fhemwiki.de/wiki/KostalPiko#FHEM-Modul">Information in FHEM Wiki</a></li>
- </ul>
- </div>
- <p><a name="KS300"></a>
- <h3>KS300</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KS300'>DE</a>]</div>
- <ul>
- Fhem can receive the KS300 or KS555 radio messages through the <a
- href="#FHZ">FHZ</a>, <a href="WS300">WS300</a> or <a href="#CUL">CUL</a>, so
- one of them must be defined first.<br> This module services messages received
- by the FHZ or CUL.<br> <br>
- <a name="KS300define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> KS300 <housecode> [ml/raincounter [wind-factor]]</code>
- <br><br>
- <code><housecode></code> is a four digit hex number, it must be
- specified foir historic reasons, and it is ignored.
- The ml/raincounter defaults to 255 ml, and it must be specified if you wish
- to set the wind factor, which defaults to 1.0. <br>
- Examples:
- <ul>
- <code>define ks1 KS300 1234</code><br>
- </ul>
- </ul>
- <br>
- <a name="KS300set"></a>
- <b>Set </b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="KS300get"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="KS300attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#eventMap">eventMap</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#model">model</a> (ks300)</li>
- <li>rainadjustment<br>
- If this attribute is set, fhem automatically considers rain counter
- resets after a battery change and random counter switches as
- experienced by some users. Default is 0 (off).</li>
- </ul>
- <br>
- </ul>
- <p><a name="KeyValueProtocol"></a>
- <h3>KeyValueProtocol</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#KeyValueProtocol'>DE</a>]</div>
- <ul>
- A generic module to receive key-value-pairs from an IODevice like JeeLink.<br>
- The data source can send any key/value pairs, which will get converted into readings.<br>
- The protocol that the sketch must send is: OK VALUES Key1=Value1,Key2=Value2, ...<br>
- <br>
-
- <a name="KeyValueProtocol_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> KeyValueProtocol <Type> <ID></code> <br>
- <br>
- </ul>
-
- <a name="KeyValueProtocol_Set"></a>
- <b>Set</b>
- <ul>
- </ul>
- <br>
- <a name="KeyValueProtocol_Get"></a>
- <b>Get</b>
- <ul>
- </ul>
- <br>
- <a name="KeyValueProtocol_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>Mapping<br>
- The Mapping attribute can optionally be used to translate the Keys.<br>
- The format is: ReceivedKey1=NewKey1,ReceivedKey2=NewKey2, ...<br>
- The Sketch can then send short Keys, which will get translated to long names.<br>
- Example: attr myKVP Mapping T=Temperature,H=Humidity<br>
- If the sketch then sends: OK VALUES T=12,H=70<br>
- you will get the readings Temperature and Humidity with the Values 12 and 70<br>
- </li>
- </ul>
- <br>
- <a name="KeyValueProtocol_Readings"></a>
- <b>Readings</b><br>
- <ul>
- Depending on the received data
- </ul>
- <br>
- </ul>
- <p><a name="LGTV"></a>
- <h3>LGTV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LGTV'>DE</a>]</div>
- <ul>
- <a name="LGTVdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> LGTV</code>
- <br><br>
- This module is expected to work with <a href="#xxLG7000">xxLG7000</a> as it's
- IODev. With LGTV and a compatible hardware module (currently, there's only
- xxLG7000), you are able to power your TV set on and off, query it's power state,
- select the input (AV, RGB, Composites, analogue TV, DVB-T, HDMI) or mute/unmute
- the volume.<br>
- Defining a LGTV device will schedule an internal task, which periodically reads
- the status of the TV set (power state; if power is on, query the selected input)
- and triggers notify/filelog commands.<br><br>
- Example:
- <ul>
- <code>define 47LG7000 LGTV</code><br>
- <code>attr 47LG7000 IODev <a href="#xxLG7000">myLG7k</a></code>
- </ul>
- <br>
- </ul>
- <a name="LGTVset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <what> <value></code>
- <br><br>
- Currently, the following commands are defined; not all may be available on a
- given TV set. An error messages should be recorded if e. g. the input in question
- is not usable.
- <pre>power on
- power off
- input AV1
- input AV2
- input AV3
- input AV3
- input Component
- input RGB
- input HDMI1
- input HDMI2
- input HDMI3
- input HDMI4
- input DVBT
- input PAL
- audio mute
- audio normal</pre>
- </ul>
- <a name="LGTVget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <what></code>
- <br><br>
- Currently, the following commands are defined; not all may be available on a
- given TV set. An error messages should be recorded if e. g. the input in question
- is not usable.
- <pre>power
- input
- audio</pre>
- </ul>
- <a name="LGTVattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li><a href="#loglevel">loglevel</a></li>
- <!-- <li><a href="#model">model</a> (M232Counter)</li> -->
- </ul>
- <br>
- <b>Implementator's note</b>
- <ul>
- The commands listed above are send 1:1 to the underlying IODev (e. g. xxLG7000); that IODev
- is responsible for translation into <i>whatever means</i> to invoke the function on the TV.
- It is my hope that other's will adopt this idea and write compatible low level drivers for other
- TV sets, to make this module (even ;)) more useful.
- </ul>
- <br>
- </ul>
- <p><a name="LGTV_IP12"></a>
- <h3>LGTV_IP12</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LGTV_IP12'>DE</a>]</div>
- <ul>
- This module controls LG SmartTV's which were released between 2012 - 2014 via network connection. You are able
- to switch query it's power state, control the TV channels, open and close apps and send all remote control commands.
- <br><br>
- 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.
- <br><br>
- <a name="LGTV_IP12_define"></a>
- <b>Define</b>
- <ul>
- <code>
- define <name> LGTV_IP12 <ip-address> [<status_interval>]
- <br><br>
- define <name> LGTV_IP12 <ip-address> [<off_status_interval>] [<on_status_interval>]
- </code>
- <br><br>
- Defining a LGTV_IP12 device will schedule an internal task (interval can be set
- with optional parameter <status_interval> in seconds, if not set, the value is 30
- seconds), which periodically reads the status of the TV (power state, current channel, input, ...)
- and triggers notify/FileLog commands.
- <br><br>
- Different status update intervals depending on the power state can be given also.
- If two intervals are given to the define statement, the first interval statement represents the status update
- interval in seconds in case the device is off. The second
- interval statement is used when the device is on.
- Example:<br><br>
- <ul><code>
- define TV LGTV_IP12 192.168.0.10
- <br><br>
- # With custom status interval of 60 seconds<br>
- define TV LGTV_IP12 192.168.0.10 60
- <br><br>
- # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
- define TV LGTV_IP12 192.168.0.10 60 10
- </code></ul>
- </ul>
- <br><br>
- <a name="LGTV_IP12_set"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <command> [<parameter>]</code>
- <br><br>
- Currently, the following commands are defined.
- <br><br>
- <ul>
- <li><b>channel</b> - set the current channel</li>
- <li><b>channelUp</b> - switches to next channel</li>
- <li><b>channelDown</b> - switches to previous channel</li>
- <li><b>removePairing</b> - deletes the pairing with the device</li>
- <li><b>showPairCode</b> - 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>
- <li><b>startApp</b> - start a installed app on the TV</li>
- <li><b>stopApp</b> - stops a running app on the TV</li>
- <li><b>statusRequest</b> - requests the current status of the device</li>
- <li><b>remoteControl</b> up,down,... - sends remote control commands</li>
- </ul>
- </ul>
- <br><br>
- <a name="LGTV_IP12get"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <reading></code>
- <br><br>
- Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
- <br><br>
- </ul>
- <br><br>
- <a name="LGTV_IP12_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a name="LGTV_IP12_disable">disable</a></li>
- Optional attribute to disable the internal cyclic status update of the TV. Manual status updates via statusRequest command is still possible.
- <br><br>
- Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.<br><br>
- <li><a name="LGTV_IP12_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...</li>
- 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.
- If the current time is between any of these time specifications, the cyclic update will be disabled.
- Instead of HH:MM you can also specify HH or HH:MM:SS.
- <br><br>To specify an interval spawning midnight, you have to specify two intervals, e.g.:
- <pre>23:00-24:00 00:00-01:00</pre>
- Default Value is <i>empty</i> (no intervals defined, cyclic update is always active)<br><br>
- <li><a name="LGTV_IP12_request-timeout">request-timeout</a></li>
- Optional attribute change the response timeout in seconds for all queries to the TV.
- <br><br>
- Possible values: 1-5 seconds. Default value is 4 seconds.<br><br>
- <li><a name="LGTV_IP12_pairingcode">pairingcode</a></li>
- 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>
- </ul>
- <br><br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li><b>3D</b> - The status of 3D playback (can be "true" or "false")</li>
- <li><b>channel</b> - The number of the current channel</li>
- <li><b>channelName</b> - The name of the current channel</li>
- <li><b>currentProgram</b> - The name of the running program of the current channel</li>
- <li><b>input</b> - The current input source (e.g. Antenna, Sattelite, HDMI1, ...)</li>
- <li><b>inputLabel</b> - The user defined name of the current input source</li>
- <li><b>mute</b> - Reports the current mute state (can be "on" or "off")</li>
- <li><b>power</b> - The power status (can be "on" or "off")</li>
- <li><b>volume</b> - Reports the volume state.</li>
- </ul>
- </ul>
- <p><a name="LGTV_WebOS"></a>
- <h3>LGTV_WebOS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LGTV_WebOS'>DE</a>]</div>
- <ul>
- 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 />
-
- <strong>Definition </strong><code>define <name> LGTV_WebOS <IP-Address></code>
- </p>
- <ul>
- <ul>
- 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.
- </ul>
- </ul>
- </p>
- <ul>
- <ul>
- Example:
- </ul>
- <ul>
- <code>define TV LGTV_WebOS 192.168.0.10 <br /></code><br /><br /></p>
- </ul>
- </ul>
- <p><code><strong>Set-Commands </strong><code>set <Name> <Command> [<Parameter>]</code></code></p>
- <ul>
- <ul>
- The following commands are supported in the actual version:
- </ul>
- </ul>
- <ul>
- <ul>
- <ul>
- <li><strong>connect </strong> - Connects to the TV at the defined address. When triggered the first time, a pairing is conducted</li>
- <li><strong>pairing </strong> - Sends a pairing request to the TV which needs to be confirmed by the user with remote control</li>
- <li><strong>screenMsg</strong> <Text> - Displays a message for 3-5s on the TV in the top right corner of the screen</li>
- <li><strong>mute</strong> on, off - Turns volume to mute. Depending on the audio connection, this needs to be set on the AV Receiver (see volume) </li>
- <li><strong>volume </strong>0-100, Slider - Sets the volume. Depending on the audio connection, this needs to be set on the AV Receiver (see mute)</li>
- <li><strong>volumeUp</strong> - Increases the volume by 1</li>
- <li><strong>volumeDown</strong> - Decreases the volume by 1</li>
- <li><strong>channelUp</strong> - Switches the channel to the next one</li>
- <li><strong>channelDown</strong> - Switches the channel to the previous one</li>
- <li><strong>getServiceList </strong> - Queries the running services on WebOS (in beta phase)</li>
- <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>
- <li><strong>off</strong> - Turns the TV off, when an active connection is established</li>
- <li><strong>launchApp</strong> <Application> - Activates an application out of the following list (Maxdome, AmazonVideo, YouTube, Netflix, TV, GooglePlay, Browser, Chili, TVCast, Smartshare, Scheduler, Miracast, TV) <br />Note: TV is an application in LG's terms and not an input connection</li>
- <li><strong>3D</strong> on,off - 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>
- <li><strong>stop</strong> - Stop command (depending on application)</li>
- <li><strong>play </strong>- Play command (depending on application)</li>
- <li><strong>pause </strong>- Pause command (depending on application)</li>
- <li><strong>rewind </strong>- Rewind command (depending on application)</li>
- <li><strong>fastForward </strong>- Fast Forward command (depending on application)</li>
- <li><strong>clearInputList </strong> - Clears list of Inputs</li>
- <li><strong>input </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>
- </ul>
- </ul>
- </ul><br /><br /></p>
- <p><strong>Get-Command</strong> <code>get <Name> <Readingname></code><br /></p>
- <ul>
- <ul>
- Currently, GET reads back the values of the current readings. Please see below for a list of Readings / Generated Events.
- </ul>
- </ul>
- <p><br /><strong>Attributes</strong></p>
- <ul>
- <ul>
- <li>disable</li>
- Optional attribute to deactivate the recurring status updates. Manual trigger of update is alsways possible.</br>
- Valid Values: 0 => recurring status updates, 1 => no recurring status updates.</p>
- </ul>
- </ul>
- <ul>
- <ul>
- <li>channelGuide</li>
- 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>
- Valid Values: 0 => no recurring TV Guide updates, 1 => recurring TV Guide updates.
- </ul>
- </ul>
- <ul>
- <ul>
- <li>pingPresence</li>
- current state of ping presence from TV. create a reading presence with values absent or present.
- </ul>
- </ul>
- <ul>
- <ul>
- <li>wakeOnLanMAC</li>
- Network MAC Address of the LG TV Networkdevice.
- </ul>
- </ul>
- <ul>
- <ul>
- <li>wakeOnLanBroadcast</li>
- Broadcast Address of the Network - wakeOnLanBroadcast <network>.255
- </ul>
- </ul>
- </ul>
- <p><a name="LIGHTIFY"></a>
- <h3>LIGHTIFY</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LIGHTIFY'>DE</a>]</div>
- <ul>
- Module to integrate a OSRAM LIGHTIFY gateway into FHEM;.<br><br>
- The actual LIGHTIFY lights are defined as <a href="#HUEDevice">HUEDevice</a> devices.
- <br><br>
- All newly found devices and groups are autocreated at startup and added to the room LIGHTIFY.
- <br><br>
- Notes:
- <ul>
- <li>Autocreate only works for the first gateway. Devices on other gateways have to be manualy defined.</li>
- </ul>
- <br><br>
- <a name="LIGTHIFY_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> LIGHTIFY <host></code><br>
- <br>
- Defines a LIGHTIFY gateway device with address <host>.<br><br>
- Examples:
- <ul>
- <code>define gateway LIGHTIFY 10.0.1.100</code><br>
- </ul>
- </ul><br>
- <a name="LIGHTIFY_Get"></a>
- <b>Get</b>
- <ul>
- </ul><br>
- <a name="LIGHTIFY_Set"></a>
- <b>Set</b>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>goToScene <sceneId></li>
- <li>setSoftOn <addr> <transitiontime></li>
- <li>setSoftOff <addr> <transitiontime></li>
- <li>reconnect<br>
- Closes and reopens the connection to the gateway.</li>
- <li>statusRequest<br>
- Update light status.</li>
- </ul><br>
- <a name="LIGHTIFY_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- </ul><br>
- </ul><br>
- <p><a name="LINDY_HDMI_SWITCH"></a>
- <h3>LINDY_HDMI_SWITCH</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LINDY_HDMI_SWITCH'>DE</a>]</div>
- <ul>
- Note: this module needs the Net::Telnet module.
- <br><br>
- <a name="LINDY_HDMI_SWITCHdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> LINDY_HDMI_SWITCH <ip-address> <port></code>
- <br><br>
- 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>
- Examples:
- <ul>
- <code>define livingroom.hdmi LINDY_HDMI_SWITCH 192.168.1.64 4999</code><br>
- </ul>
- </ul>
- <br>
- <a name="LINDY_HDMI_SWITCHset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- 11
- 12
- 13
- 14
- 21
- 22
- 23
- 24
- </pre>
- First digit is the output port, second digit is the input port.
- Example:
- <ul>
- <code>set livingroom.hdmi 12</code><br>
- </ul>
- <br>
- </ul>
- </ul>
- <p><a name="LIRC"></a>
- <h3>LIRC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LIRC'>DE</a>]</div>
- <ul>
- Generate FHEM-events when an LIRC device receives infrared signals.
- <br><br>
- Note: this module needs the Lirc::Client perl module.
- <br><br>
- <a name="LIRCdefine"></a>
- <b>Define</b>
- <ul>
- define <name> LIRC <lircrc_file><br>
- Example:<br>
- <ul>
- define Lirc LIRC /etc/lirc/lircrc
- </ul>
- Note: In the lirc configuration file you have to define each possible event.
- If you have this configuration
- <pre>
- begin
- prog = fhem
- button = pwr
- config = IrPower
- end</pre>
- and you press the pwr button the IrPower toggle event occures at fhem.
- <pre>
- define IrPower01 notify Lirc:IrPower set lamp toggle</pre>
- turns the lamp on and off.
- If you want a faster reaction to keypresses you have to change the
- defaultvalue of readytimeout from 5 seconds to e.g. 1 second in fhem.pl
- </ul>
- <br>
- <a name="LIRCset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="LIRCget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="LIRCattr"></a>
- <b>Attributes</b>
- <ul>
- </ul><br>
- </ul>
- <p><a name="LUXTRONIK2"></a>
- <h3>LUXTRONIK2</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LUXTRONIK2'>DE</a>]</div>
- <div>
- <ul>
- 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.
- <br>
- It has a built-in ethernet port, so it can be directly integrated into a local area network (LAN).
- <br>
- <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, V1.80, V1.81.</i>
- <br>
- More Info on the particular <a href="http://www.fhemwiki.de/wiki/Luxtronik_2.0">page of FHEM-Wiki</a> (in German).
- <br>
-
- <br>
-
- <a name="LUXTRONIK2define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> LUXTRONIK2 <IP-address[:Port]> [poll-interval]</code><br>
- If the pool interval is omitted, it is set to 300 (seconds). Smallest possible value is 10.
- <br>
- Usually, the port needs not to be defined.
- <br>
- Example: <code>define Heizung LUXTRONIK2 192.168.0.12 600</code>
- </ul>
- <br>
-
- <a name="LUXTRONIK2set"></a>
- <b>Set</b>
- <ul>A firmware check assures before each set operation that a heat pump with untested firmware is not damaged accidently.
- <li><code>activeTariff < 0 - 9 ></code>
- <br>
- Allows the separate measurement of the consumption (doStatistics = 1) within different tariffs.<br>
- 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>
- 0 = without separate tariffs
- </li><br>
- <li><code>INTERVAL <polling interval></code><br>
- Polling interval in seconds
- </li><br>
- <li><code>heatingCurveEndPoint <Temperarature></code><br>
- Sets the heating curve parameter. Adjustable in 0.1 steps.
- </li><br>
- <li><code>heatingCurveOffset <Temperarature></code><br>
- Sets the heating curve parameter. Adjustable in 0.1 steps.
- </li><br>
- <li><code>hotWaterTemperatureTarget <temperature></code><br>
- Target temperature of domestic hot water boiler in °C
- </li><br>
- <li><code>hotWaterCircPumpDeaerate <on | off></code><br>
- 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.
- <br>
- NOTE! It uses the deaerate function of the controller. So, the pump alternates always 5 minutes on and 5 minutes off.
- </li><br>
- <li><code>opModeHotWater <Mode></code><br>
- Operating Mode of domestic hot water boiler (Auto | Party | Off)
- </li><br>
- <li><code>resetStatistics <statReadings></code>
- <br>
- Deletes the selected statistic values <i>all, statBoilerGradientCoolDownMin, statAmbientTemp..., statElectricity..., statHours..., statHeatQ...</i>
- </li><br>
- <li><code>returnTemperatureHyst <Temperature></code>
- <br>
- Hysteresis of the returnTemperatureTarget of the heating controller. 0.5 K till 3 K. Adjustable in 0.1 steps.
- </li><br>
- <li><code>returnTemperatureSetBack <Temperature></code>
- <br>
- Decreasing or increasing of the returnTemperatureTarget by -5 K till + 5 K. Adjustable in 0.1 steps.
- </li><br>
- <li><code>statusRequest</code><br>
- Update device information
- </li><br>
- <li><code>synchClockHeatPump</code><br>
- Synchronizes controller clock with FHEM time. <b>!! This change is lost in case of controller power off!!</b></li>
- </ul>
- <br>
-
- <a name="LUXTRONIK2get"></a>
- <b>Get</b>
- <ul>
- <li><code>heatingCurveParameter <OutsideTemp1 SetTemp1 OutsideTemp2 SetTemp2></code>
- <br>
- Determines based on two points on the heating curve the respective heat curve parameter <i>heatingCurveEndPoint</i> and <i>heatingCurveOffset</i>.<br>
- These parameter can be set via the respective set commands.
- </li>
- <br>
- <li><code>rawData</code>
- <br>
- Shows a table with all parameter and operational values returned by the controller.<br>
- They can be assigned to device readings via the attributes <i>userHeatpumpParameters</i> und <i>userHeatpumpValues</i>.
- </li><br>
- </ul>
- <br>
-
- <a name="LUXTRONIK2attr"></a>
- <b>Attributes</b>
- <ul>
- <li><code>allowSetParameter < 0 | 1 ></code>
- <br>
- The <a href="#LUXTRONIK2set">parameters</a> of the heat pump controller can only be changed if this attribut is set to 1.
- </li><br>
- <li><code>autoSynchClock <delay></code>
- <br>
- 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.
- <br>
- <i>(A 'delayDeviceTimeCalc' <= 2 s can be caused by the internal calculation interval of the heat pump controller.)</i>
- </li><br>
- <li><code>compressor2ElectricalPowerWatt</code><br>
- Electrical power of the 2nd compressor to calculated the COP and estimate electrical consumption (calculations not implemented yet)
- </li><br>
- <li><code>doStatistics < 0 | 1 ></code>
- <br>
- Calculates statistic values: <i>statBoilerGradientHeatUp, statBoilerGradientCoolDown, statBoilerGradientCoolDownMin (boiler heat loss)</i>
- <br>
- Builds daily, monthly and yearly statistics for certain readings (average/min/max or cumulated values).
- <br>
- Logging and visualisation of the statistic should be done with readings of type 'stat<i>ReadingName</i><b>Last</b>'.
- </li><br>
- <li><code>heatPumpElectricalPowerWatt</code><br>
- Electrical power of the heat pump by a flow temperature of 35°C to calculated coefficency factor and estimate electrical consumption
- </li><br>
- <li><code>heatPumpElectricalPowerFactor</code><br>
- Change of electrical power consumption per 1 K flow temperature differenz to 35°C (e.g. 2% per 1 K = 0,02)
- </li><br>
- <li><code>heatRodElectricalPowerWatt</code><br>
- Electrical power of the heat rods (2nd heat source) to estimate electrical consumption
- </li><br>
- <li><code>ignoreFirmwareCheck < 0 | 1 ></code>
- <br>
- A firmware check assures before each set operation that a heatpump controller with untested firmware is not damaged accidently.
- <br>
- If this attribute is set to 1, the firmware check is ignored and new firmware can be tested for compatibility.
- </li><br>
- <li><code>statusHTML</code>
- <br>
- If set, a HTML-formatted reading named "floorplanHTML" is created. It can be used with the <a href="#FLOORPLAN">FLOORPLAN</a> module.
- <br>
- 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.
- </li><br>
- <li><code>userHeatpumpParameters <Index [Name][,Index2 [Name2],Index3 [Name3] ...]></code>
- <br>
- Allows to continuousely read the value of certian controler parameters. The index number of the parameter can be determined with the get command <i>rawData</i><br>
- In the attribute definition, a name can be writen behind the index number separated by a space. The respective parameter value will either be shown with the prefix "userParameter..." or under the given name. <br>
- Multiple indexes are separated by a comma.<br>
- If the readings are not used anymore the can be deleted with the FHEM command <a href="#deletereading">deleteReading</a>.
- </li><br>
- <li><code>userHeatpumpValues <Index Name[,Index2 Name2,Index3 Name3 ...]></code>
- <br>
- Allows to read out specific operational values. Proceed as with <i>userHeatpumpParameters</i>.
- </li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- </div>
- <p><a name="LaCrosse"></a>
- <h3>LaCrosse</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LaCrosse'>DE</a>]</div>
- <ul>
- FHEM module for LaCrosse Temperature and Humidity sensors and weather stations like WS 1600 (TX22 sensor).<br><br>
- It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
- The JeeNode sketch required for this module can be found in .../contrib/36_LaCrosse-pcaSerial.zip.<br><br>
- <a name="LaCrosseDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> LaCrosse <addr> [corr1...corr2]</code> <br>
- <br>
- addr is a 2 digit hex number to identify the LaCrosse device.<br>
- 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>
- Note: devices are autocreated only if LaCrossePairForSec is active for the <a href="#JeeLink">JeeLink</a> IODevice device.<br>
- </ul>
- <br>
- <a name="LaCrosse_Set"></a>
- <b>Set</b>
- <ul>
- <li>replaceBatteryForSec <sec> [ignore_battery]<br>
- sets the device for <sec> seconds into replace battery mode. the first unknown address that is
- received will replace the current device address. this can be partly automated with a readings group configured
- to show the battery state of all LaCrosse devices and a link/command to set replaceBatteryForSec on klick.
- </li>
- </ul><br>
- <a name="LaCrosse_Get"></a>
- <b>Get</b>
- <ul>
- </ul><br>
- <a name="LaCrosse_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>battery[]<br>
- ok or low</li>
- <li>temperature (°C)<br>
- Notice: see the filterThreshold attribute.</li>
- <li>humidity (%rH)</li>
- <li>Wind speed (m/s), gust (m/s) and direction (degree)</li>
- <li>Rain (mm)</li>
- </ul><br>
- <a name="LaCrosse_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>doAverage<br>
- use an average of the last 4 values for temperature and humidity readings</li>
- <li>doDewpoint<br>
- calculate dewpoint</li>
- <li>filterThreshold<br>
- if the difference between the current and previous temperature is greater than filterThreshold degrees
- the readings for this channel are not updated. the default is 10.</li>
- <li>resolution<br>
- the resolution in 1/10 degree for the temperature reading</li>
- <li>ignore<br>
- 1 -> ignore this device.</li>
- </ul><br>
- <b>Logging and autocreate</b><br>
- <ul>
- <li>If autocreate is not active (not defined or disabled) and LaCrosse is not contained in the ignoreTypes attribute of autocreate then
- 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>
- <li>The autocreateThreshold attribute of the autocreate module (see <a href="#autocreate">autocreate</a>) is respected. The default is 2:120, means, that
- autocreate will create a device for a sensor only, if the sensor was received at least two times within two minutes.</li>
- </ul>
- </ul>
- <p><a name="LaCrosseGateway"></a>
- <h3>LaCrosseGateway</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LaCrosseGateway'>DE</a>]</div>
- <ul>
- For more information about the LaCrosseGateway see here: <a href="http://www.fhemwiki.de/wiki/LaCrosseGateway">FHEM wiki</a>
- <br><br>
- <a name="LaCrosseGateway_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> LaCrosseGateway <device></code> <br>
- <br>
- USB-connected devices:<br><ul>
- <device> specifies the serial port to communicate with the LaCrosseGateway.
- The name of the serial-device depends on your distribution, under
- linux it is something like /dev/ttyACM0 or /dev/ttyUSB0.<br><br>
- </ul>
- Network-connected devices:<br><ul>
- <device> specifies the network device<br>
- Normally this is the IP-address and the port in the form ip:port<br>
- Example: 192.168.1.100:81<br>
- You must define the port number on the setup page of the LaCrosseGateway and use the same number here.<br>
- The default is 81
- <br><br>
- </ul>
- <br>
- </ul>
- <a name="LaCrosseGateway_Set"></a>
- <b>Set</b>
- <ul>
- <li>raw <data><br>
- send <data> to the LaCrosseGateway. The possible command can be found in the wiki.
- </li><br>
- <li>connect<br>
- tries to (re-)connect to the LaCrosseGateway. It does not reset the LaCrosseGateway but only try to get a connection to it.
- </li><br>
- <li>reboot<br>
- Reboots the ESP8266. Works only if we are connected (state is opened or initialized)
- </li><br>
- <li>LaCrossePairForSec <sec> [ignore_battery]<br>
- enable autocreate of new LaCrosse sensors for <sec> seconds. If ignore_battery is not given only sensors
- sending the 'new battery' flag will be created.
- </li><br>
- <li>flash<br>
- The LaCrosseGateway needs the right firmware to be able to receive and deliver the sensor data to fhem.<br>
- This provides a way to flash it directly from FHEM.
- </li><br>
-
- <li>nextionUpload<br>
- Requires LaCrosseGateway V1.24 or newer.<br>
- Sends a Nextion firmware file (.tft) to the LaCrosseGateway. The LaCrosseGateway then distributes it to a connected Nextion display.<br>
- 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
- </li><br>
-
- </ul>
- <a name="LaCrosseGateway_Get"></a>
- <b>Get</b>
- <ul>
- ---
- </ul>
- <br>
- <a name="LaCrosseGateway_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>Clients<br>
- The received data gets distributed to a client (e.g. LaCrosse, EMT7110, ...) that handles the data.
- This attribute tells, which are the clients, that handle the data. If you add a new module to FHEM, that shall handle
- data distributed by the LaCrosseGateway module, you must add it to the Clients attribute.
- </li><br>
- <li>MatchList<br>
- Can be set to a perl expression that returns a hash that is used as the MatchList
- </li><br>
- <li>initCommands<br>
- Space separated list of commands to send for device initialization.
- </li><br>
- <li>timeout<br>
- format: <timeout><br>
- Asks the LaCrosseGateway every timeout seconds if it is still alive. If there is no response it reconnects to the LaCrosseGateway.<br>
- Can be combined with the watchdog attribute. If the watchdog attribute is set, the LaCrosseGateway also will check if it gets
- a request within watchdog seconds and if not, it will reboot.
- watchdog must be longer than timeout and does only work in combination with timeout.<br>
- Both should not be too short because the LaCrosseGateway needs enough time to boot before the next check.<br>
- Good values are: timeout 60 and watchdog 300<br>
- This mode needs LaCrosseGateway V1.24 or newer.
- <br><br><u>Old version (still working):</u><br>
- format: <timeout, checkInterval><br>
- Checks every 'checkInterval' seconds if the last data reception is longer than 'timeout' seconds ago.<br>
- If this is the case, a new connect will be tried.
- </li><br>
- <li>watchdog<br>
- see timeout attribute.
- </li><br>
- <li>disable<br>
- if disabled, it does not try to connect and does not dispatch data
- </li><br>
- <li>kvp<br>
- defines how the incoming KVP-data of the LaCrosseGateway is handled<br>
- dispatch: (default) dispatch it to a KVP device<br>
- readings: create readings (e.g. RSSI, ...) in this device<br>
- both: dispatch and create readings
- </li><br>
- <li>ownSensors<br>
- defines how the incoming data of the internal LaCrosseGateway sensors is handled<br>
- dispatch: (default) dispatch it to a LaCrosse device<br>
- readings: create readings (e.g. temperature, humidity, ...) in this device<br>
- both: dispatch and create readings
- </li><br>
- <li>mode<br>
- USB, WiFi or Cable<br>
- Depending on how the LaCrosseGateway is connected, it must be handled differently (init, ...)
- </li><br>
-
- <li>tftFile<br>
- defines the .tft file that shall be used by the Nextion firmware upload (set nextionUpload)
- </li><br>
-
- <li>filter<br>
- defines a filter (regular expression) that is applied to the incoming data. If the regex matches, the data will be discarded.<br>
- This allows to suppress sensors, for example those of the neighbour.<br>
- The data of different kinds of sensors starts with (where xx is the ID):<br>
- LaCrosse sensor: OK 9 xx<br>
- EnergyCount 3000: OK 22 xx xx<br>
- EMT7110: OK EMT7110 xx xx<br>
- LevelSender: OK LS xx<br>
- Example: set lgw filter ^OK 22 117 196|^OK 9 49<br>
- will filter the LaCrosse sensor with ID "49" and the EC3000 with ID "117 196"
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="Level"></a>
- <h3>Level</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Level'>DE</a>]</div>
- <ul>
- FHEM module for Level.<br><br>
- It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
- 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>
- For more information see: http://forum.fhem.de/index.php/topic,23217.msg165163.html#msg165163<br><br>
-
- <a name="Level_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Level <addr></code> <br>
- addr is a 1 digit hex number (0 .. F) to identify the Level device.
- <br><br>
- </ul>
-
- <a name="Level_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>liters<br>
- Calculated liters based on distanceToBottom, distance and litersPerCm</li>
- <li>temperature<br>
- Measured temperature</li>
- <li>voltage<br>
- Measured battery voltage</li>
- <li>distance<br>
- Measured distance from the sensor to the fluid</li>
- <li>level<br>
- Calculated level based on the distanceToBottom attribute</li>
- </ul><br>
- <a name="Level_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>distanceToBottom<br>
- Distance from the ultra sonic sensor to the bottom of the tank</li>
- <li>litersPerCm<br>
- Liters for each cm level</li>
- </ul><br>
- </ul>
- <p><a name="LightScene"></a>
- <h3>LightScene</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LightScene'>DE</a>]</div>
- <ul>
- Allows to store the state of a group of lights and other devices and recall it later.
- Multiple states for one group can be stored.
- <br><br>
- <a name="LightScene_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> LightScene [<dev1>] [<dev2>] [<dev3>] ... </code><br>
- <br>
- Examples:
- <ul>
- <code>define light_group LightScene Lampe1 Lampe2 Dimmer1</code><br>
- <code>define kino_group LightScene LampeDecke LampeFernseher Fernseher Verstaerker</code><br>
- <code>define Wohnzimmer LightScene Leinwand Beamer TV Leselampe Deckenlampe</code><br>
- </ul>
- </ul><br>
- The device detail view will show an html overview of the current state of all included devices and all
- configured scenes with the device states for each. The column heading with the device names is clickable
- to go to detail view of this device. The first row that displays the current device state is clickable
- and should react like a click on the device icon in a room overview would. this can be used to interactively
- configure a new scene and save it with the command menu of the detail view. The first column of the table with
- the scene names ic clickable to activate the scene.<br><br>
- A weblink with a scene overview that can be included in any room or a floorplan can be created with:
- <ul><code>define wlScene weblink htmlCode {LightScene_2html("LightSceneName")}</code></ul>
- <a name="LightScene_Set"></a>
- <b>Set</b>
- <ul>
- <li>all <command><br>
- execute set <command> for alle devices in this LightScene</li>
- <li>save <scene_name><br>
- save current state for alle devices in this LightScene to <scene_name></li>
- <li>scene <scene_name><br>
- shows scene <scene_name> - all devices are switched to the previously saved state</li>
- <li>nextScene [nowrap]<br>
- activates the next scene in alphabetical order after the current scene or the first if no current scene is set.</li>
- <li>previousScene [nowrap]<br>
- activates the previous scene in alphabetical order before the current scene or the last if no current scene is set.</li>
- <li>set <scene_name> <device> [<cmd>]<br>
- set the saved state of <device> in <scene_name> to <cmd></li>
- <li>setcmd <scene_name> <device> [<cmd>]<br>
- set command to be executed for <device> in <scene_name> to <cmd>.
- <cmd> can be any commandline that fhem understands including multiple commands separated by ;;
- <ul>
- <li>set kino_group setcmd allOff LampeDecke sleep 30 ;; set LampeDecke off</li>
- <li>set light_group setcmd test Lampe1 sleep 10 ;; set Lampe1 on ;; sleep 5 ;; set Lampe1 off</li>
- </ul></li>
- <li>remove <scene_name><br>
- remove <scene_name> from list of saved scenes</li>
- <li>rename <scene_old_name> <scene_new_name><br>
- rename <scene_old_name> to <scene_new_name></li>
- </ul><br>
- <a name="LightScene_Get"></a>
- <b>Get</b>
- <ul>
- <li>scenes</li>
- <li>scene <scene_name></li>
- </ul><br>
- <a name="LightScene_Attr"></a>
- <b>Attributes</b>
- <ul>
- <a name="async_delay"></a>
- <li>async_delay<br>
- If this attribute is defined, unfiltered set commands will not be
- executed in the clients immediately. Instead, they are added to a queue
- to be executed later. The set command returns immediately, whereas the
- clients will be set timer-driven, one at a time. The delay between two
- timercalls is given by the value of async_delay (in seconds) and may be
- 0 for fastest possible execution.
- </li>
- <li>lightSceneParamsToSave<br>
- this attribute can be set on the devices to be included in a scene. it is set to a comma separated list of readings
- that will be saved. multiple readings separated by : are collated in to a single set command (this has to be supported
- by the device). each reading can have a perl expression appended with '@' that will be used to alter the $value used for
- the set command. this can for example be used to strip a trailing % from a dimmer state. this perl expression must not contain
- spaces,colons or commas.<br>
- in addition to reading names the list can also contain expressions of the form <code>abc -> xyz</code>
- 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
- string or as a perl expression enclosed in {} that returns this string.<br>
- <code>attr myReceiver lightSceneParamsToSave volume,channel</code><br>
- <code>attr myHueDevice lightSceneParamsToSave {(Value($DEVICE) eq "off")?"state":"bri : xy"}</code></li>
- <code>attr myDimmer lightSceneParamsToSave state@{if($value=~m/(\d+)/){$1}else{$value}}</code><br>
- <li>lightSceneRestoreOnlyIfChanged<br>
- this attribute can be set on the lightscene and/or on the individual devices included in a scene.
- the device settings have precedence over the scene setting.<br>
- 1 -> for each device do nothing if current device state is the same as the saved state<br>
- 0 -> always set the state even if the current state is the same as the saved state. this is the default</li>
- <li>followDevices<br>
- the LightScene tries to follow the switching state of the devices set its state to the name of the scene that matches.<br>
- 1 -> if no match is found state will be unchanged and a nomatch event will be triggered.<br>
- 2 -> if no match is found state will be set to unknown. depending on the scene and devices state can toggle multiple
- times. use a watchdog if you want to handle this.</li>
- <li>showDeviceCurrentState<br>
- show the current state of member devices in weblink</li>
- <li>switchingOrder<br>
- space separated list of <scene>:<deviceList> items that will give a per scene order
- in which the devices should be switched.<br>
- the devices from <deviceList> will come before all other devices of this LightScene;
- if the first character of the <deviceList> ist a ! the devices from the list will come after
- all other devices from this lightScene.<br>
- <scene> and each element of <deviceList> are treated as a regex.<br>
- Example: To switch a master power outlet before every other device at power on and after every device on power off:<br>
- <code>define media LightScene TV,DVD,Amplifier,masterPower<br>
- attr media switchingOrder .*On:masterPower,.* allOff:!.*,masterPower</code>
- </li>
- <li>traversalOrder<br>
- comma separated list of scene names that should be traversed by the prevoiusScene and nextScene commands.<br>
- default not set -> all scenes will be traversed in alphabetical order
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul><br>
- </ul>
- <p><a name="Log2Syslog"></a>
- <h3>Log2Syslog</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Log2Syslog'>DE</a>]</div>
- <ul>
- Send FHEM system log entries and/or FHEM events to an external syslog server. <br>
- The syslog protocol has been implemented according the specifications of <a href="https://tools.ietf.org/html/rfc5424"> RFC5424 (IETF)</a>,
- <a href="https://tools.ietf.org/html/rfc3164"> RFC3164 (BSD)</a> and the TLS transport protocol according to
- <a href="https://tools.ietf.org/pdf/rfc5425.pdf"> RFC5425</a>. <br>
- <br>
-
- <b>Prerequisits</b>
- <ul>
- <br/>
- The additional perl module "IO::Socket::INET" must be installed on your system. <br>
- Install this package from cpan or by <br><br>
-
- <code>apt-get install libio-socket-multicast-perl (only on Debian based installations) </code><br>
- </ul>
- <br>
-
- <a name="Log2Syslogdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> Log2Syslog <destination host> [ident:<ident>] [event:<regexp>] [fhem:<regexp>]</code><br>
- <br>
-
- <destination host> = host where the syslog server is running <br>
- [ident:<ident>] = optional program identifier. If not set the device name will be used as default <br>
- [event:<regexp>] = optional regex to filter events for logging <br>
- [fhem:<regexp>] = optional regex to filter fhem system log for logging <br><br>
-
- After definition the new device sends all new appearing fhem systemlog entries and events to the destination host,
- port=514/UDP format:IETF, immediately without further settings if the regex for fhem or event were set. <br>
- Without setting regex no fhem system log or event log will be forwarded. <br><br>
-
- The verbose level of FHEM system logs will convert into equivalent syslog severity level. <br>
- Thurthermore the message text will be scanned for signal terms "warning" and "error" (with case insensitivity).
- Dependent off the severity will be set equivalent as well. If a severity is already set by verbose level, it wil be overwritten
- by the level according to the signal term found in the message text. <br><br>
-
- <b>Lookup table Verbose-Level to Syslog severity level: </b><br><br>
- <ul>
- <table>
- <colgroup> <col width=40%> <col width=60%> </colgroup>
- <tr><td> <b>verbose-Level</b> </td><td> <b>Severity in Syslog</b> </td></tr>
- <tr><td> 0 </td><td> Critical </td></tr>
- <tr><td> 1 </td><td> Error </td></tr>
- <tr><td> 2 </td><td> Warning </td></tr>
- <tr><td> 3 </td><td> Notice </td></tr>
- <tr><td> 4 </td><td> Informational </td></tr>
- <tr><td> 5 </td><td> Debug </td></tr>
- </table>
- </ul>
- <br>
-
- <br>
- Example to log anything: <br>
- <br/>
- <code>define splunklog Log2Syslog fhemtest 192.168.2.49 ident:Test event:.* fhem:.* </code><br>
- <br/>
- will produce output like this raw example of a splunk syslog server:<br/>
- <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
- 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
- Aug 18 21:06:45 fhemtest.myds.me 1 2017-08-18T21:06:45 fhemtest.myds.me Test_event 13339 FHEM - : LogDB CacheUsage: 21
- 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
- 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
- </pre>
-
- The structure of the payload differs dependent of the used logFormat. <br><br>
-
- <b>logFormat IETF:</b> <br><br>
- "<PRIVAL>1 TIME MYHOST IDENT PID MID - : MESSAGE" <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=10%> <col width=90%> </colgroup>
- <tr><td> PRIVAL </td><td> priority value (coded from "facility" and "severity") </td></tr>
- <tr><td> TIME </td><td> timestamp according to RFC5424 </td></tr>
- <tr><td> MYHOST </td><td> Internal MYHOST </td></tr>
- <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>
- <tr><td> PID </td><td> sequential Payload-ID </td></tr>
- <tr><td> MID </td><td> fix value "FHEM" </td></tr>
- <tr><td> MESSAGE </td><td> the dataset to transfer </td></tr>
- </table>
- </ul>
- <br>
-
- <b>logFormat BSD:</b> <br><br>
- "<PRIVAL>MONAT TAG TIME MYHOST IDENT: : MESSAGE" <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=10%> <col width=90%> </colgroup>
- <tr><td> PRIVAL </td><td> priority value (coded from "facility" and "severity") </td></tr>
- <tr><td> MONAT </td><td> month according to RFC3164 </td></tr>
- <tr><td> TAG </td><td> day of month according to RFC3164 </td></tr>
- <tr><td> TIME </td><td> timestamp according to RFC3164 </td></tr>
- <tr><td> MYHOST </td><td> Internal MYHOST </td></tr>
- <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>
- <tr><td> MESSAGE </td><td> the dataset to transfer </td></tr>
- </table>
- </ul>
- <br>
-
- </ul>
- <br>
- <a name="Log2SyslogGet"></a>
- <b>Get</b>
- <ul>
- <br>
-
- <li><code>certinfo</code><br>
- <br>
- Show informations about the server certificate if a TLS-session was created (Reading "SSL_Version" isn't "n.a.").
- </li><br>
- </ul>
- <br>
-
-
- <a name="Log2Syslogattr"></a>
- <b>Attributes</b>
- <ul>
- <br/>
- <a name="addTimestamp"></a>
- <li><code>addTimestamp [0|1]</code><br>
- <br/>
- If set to 1, fhem timestamps will be logged too.<br/>
- Default behavior is to not log these timestamps, because syslog uses own timestamps.<br/>
- Maybe useful if mseclog is activated in fhem.<br/>
- <br/>
- Example output (raw) of a Splunk syslog server: <br>
- <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
- 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
- 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
- </pre>
- </li><br>
- <li><code>addStateEvent [0|1]</code><br>
- <br>
- If set to 1, events will be completed with "state" if a state-event appears.<br/>
- Default behavior is without getting "state".
- </li><br>
-
- <li><code>disable [0|1]</code><br>
- <br>
- disables the device.
- </li><br>
-
- <li><code>logFormat [BSD|IETF]</code><br>
- <br>
- Set the syslog protocol format. <br>
- Default value is "IETF" if not specified.
- </li><br>
-
- <li><code>protocol [TCP|UDP]</code><br>
- <br>
- Sets the socket protocol which should be used. You can choose UDP or TCP. <br>
- Default value is "UDP" if not specified.
- </li><br>
-
- <li><code>port</code><br>
- <br>
- The port of the syslog server is listening. (default 514)
- </li><br>
-
- <li><code>rateCalcRerun</code><br>
- <br>
- Rerun cycle for calculation of log transfer rate (Reading "Transfered_logs_per_minute") in seconds.
- Default is 60 seconds.
- </li><br>
-
- <li><code>timeout</code><br>
- <br>
- Timeout for connection to the syslog server (TCP).
- </li><br>
-
- <li><code>verbose</code><br>
- <br>
- To avoid loops, the output of verbose level of the Log2Syslog-Devices will only be reported into the local FHEM Logfile and
- no forwarded.
- </li><br>
-
- </ul>
- <br>
-
- <a name="Log2Syslogreadings"></a>
- <b>Readings</b>
- <ul>
- <br>
- <table>
- <colgroup> <col width=40%> <col width=60%> </colgroup>
- <tr><td><b>SSL_Algorithm</b> </td><td> used SSL algorithm if SSL is enabled and active </td></tr>
- <tr><td><b>SSL_Version</b> </td><td> the used TLS-version if encryption is enabled and is active</td></tr>
- <tr><td><b>Transfered_logs_per_minute</b> </td><td> the average number of forwarded logs/events per minute </td></tr>
- </table>
- <br>
- </ul>
-
- </ul>
- <p><a name="LuftdatenInfo"></a>
- <h3>LuftdatenInfo</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#LuftdatenInfo'>DE</a>]</div>
- (en | <a href="commandref_DE.html#LuftdatenInfo"><u>de</u></a>)
- <div>
- <ul>
- LuftdatenInfo is the FHEM module to read particulate matter, temperature
- and humidity values ��from the self-assembly particulate matter sensors
- from <a href="http://Luftdaten.info"><u>Luftdaten.info</u></a>.<br>
- The values ��can be queried directly from the server or locally.<br>
- There is an
- <a href="https://forum.fhem.de/index.php/topic,73879">
- <u>alternative Firmware</u>
- </a>
- to support more sensors.<br>
- <br>
- <b>Prerequisites</b>
- <ul>
- The Perl module "JSON" is required.<br>
- Under Debian (based) system, this can be installed using
- <code>"apt-get install libjson-perl"</code>.
- </ul>
- <br>
- <a name="LuftdatenInfodefine"></a>
- <b>Define</b>
- <ul>
- <code>
- define <name> LuftdatenInfo remote
- <SENSORID1> [<SENSORID2> ..]<br>
- define <name> LuftdatenInfo local <IP><br>
- define <name> LuftdatenInfo
- slave <master-name> <sensor1 sensor2 ...>
- </code><br>
- To query the data from the server, all affected SensorIDs must be
- specified. The IDs of the SDS01 stands right at
- <a href="http://maps.luftdaten.info/">
- <u>http://maps.luftdaten.info/</u>
- </a>
- . The DHT22 SensorID is usually the SDS011 SensorID + 1. While parsing
- the data the location values from all sensors will be compared and a
- message will be written into the log if they differ.<br>
- For a local query of the data, the IP address or hostname must be
- specified.<br>
- If several similar sensors are used, the duplicate values can be written
- in another device.
- </ul><br>
- <a name="LuftdatenInfoset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>statusRequest</code><br>
- Starts a status request.
- </li>
- </ul><br>
- <a name="LuftdatenInfoget"></a>
- <b>Get</b>
- <ul>
- <li>
- <code>sensors</code><br>
- Lists all senors.
- </li>
- </ul><br>
- <a name="LuftdatenInforeadings"></a>
- <b>Readings</b><br>
- <ul>
- <li>
- <code>altitude</code>
- </li>
- <li>
- <code>humidity</code><br>
- Relative humidity in %
- </li>
- <li>
- <code>illuminanceFull</code><br>
- Illuminace of the full spectrum in lux
- </li>
- <li>
- <code>illuminanceIR</code><br>
- Iilluminace of the IR spectrum in lux
- </li>
- <li>
- <code>illuminanceUV</code><br>
- Iilluminace of the UV spectrum in lux
- </li>
- <li>
- <code>illuminanceVisible</code><br>
- Iilluminace of the visible spectrum in lux
- </li>
- <li>
- <code>latitude</code>
- </li>
- <li>
- <code>location</code><br>
- location as "postcode city"<br>
- Only available with remote query.
- </li>
- <li>
- <code>longitude</code>
- </li>
- <li>
- <code>PM1</code><br>
- Quantity of particles with a diameter of less than 1 Îźm in Îźg/mÂł
- </li>
- <li>
- <code>PM2.5</code><br>
- Quantity of particles with a diameter of less than 2.5 Îźm in Îźg/mÂł
- </li>
- <li>
- <code>PM10</code><br>
- Quantity of particles with a diameter of less than 10 Îźm in Îźg/mÂł
- </li>
- <li>
- <code>pressure</code><br>
- Pressure in hPa
- </li>
- <li>
- <code>pressureNN</code><br>
- Pressure at sea level in hPa<br>
- Is calculated if pressure and temperature sensor are active and the
- sensor is not at sea level.<br>
- The height, can be determined by maps or SmartPhone, needs to be
- specified at the configuration page.
- </li>
- <li>
- <code>signal</code><br>
- WLAN signal strength in dBm<br>
- Only available with local query.
- </li>
- <li>
- <code>temperature</code><br>
- Temperature in °C
- </li>
- <li>
- <code>UVIntensity</code><br>
- UV intensity in W
- </li>
- <li>
- <code>UVRisk</code><br>
- UV risk from 1 to 5
- </li>
- </ul><br>
- <a name="LuftdatenInfoattr"></a>
- <b>Attribute</b>
- <ul>
- <li>
- <code>disable 1</code><br>
- No queries are started.
- </li>
- <li>
- <a href="#disabledForIntervals">
- <u><code>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM ...</code></u>
- </a>
- </li>
- <li>
- <code>interval <seconds></code><br>
- Interval in seconds in which queries are performed.<br>
- The default and minimum value is 300 seconds.
- </li>
- <li>
- <code>timeout <seconds></code><br>
- Timeout in seconds for the queries.<br>
- The default and minimum value is 5 seconds.
- </li>
- </ul>
- </ul>
- </div>
- <p><a name="M232"></a>
- <h3>M232</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#M232'>DE</a>]</div>
- <ul>
- <br>
- <a name="M232define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> M232 <m232-device></code>
- <br><br>
- Define a M232 device. You can attach as many M232 devices as you like. A
- M232 device provides 6 analog inputs (voltage 0..5V with 10 bit resolution)
- and 8 bidirectional digital ports. The eighth digital port can be used as a
- 16 bit counter (maximum frequency 3kHz). The M232 device needs to be
- connected to a 25pin sub-d RS232 serial port. A USB-to-serial converter
- works fine if no serial port is available.<br><br>
- Examples:
- <ul>
- <code>define m232 M232 /dev/ttyUSB2</code><br>
- </ul>
- <br>
- </ul>
- <a name="M232set"></a>
- <b>Set </b>
- <ul>
- <code>set <name> stop</code>
- <br><br>
- Stops the counter.
- <br><br>
- <code>set <name> start</code>
- <br><br>
- Resets the counter to zero and starts it.
- <br><br>
- <code>set <name> octet <value></code>
- <br><br>
- Sets the state of all digital ports at once, value is 0..255.
- <br><br>
- <code>set <name> io0..io7 0|1</code>
- <br><br>
- Turns digital port 0..7 off or on.
- <br><br>
- </ul>
- <a name="M232get"></a>
- <b>Get</b>
- <ul>
- <code>get <name> [an0..an5]</code>
- <br><br>
- Gets the reading of analog input 0..5 in volts.
- <br><br>
- <code>get <name> [io0..io7]</code>
- <br><br>
- Gets the state of digital ports 0..7, result is 0 or 1.
- <br><br>
- <code>get <name> octet</code>
- <br><br>
- Gets the state of all digital ports at once, result is 0..255.
- <br><br>
- <code>get <name> counter</code>
- <br><br>
- Gets the number of ticks of the counter since the last reset. The counter
- wraps around from 65,535 to 0 and <i>then stops</i>.
- See <a href="#M232Counter">M232Counter</a> for how we care about this.
- <br><br>
- </ul>
- <a name="M232attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (m232)</li>
- </ul>
- <br>
- </ul>
- <p><a name="M232Counter"></a>
- <h3>M232Counter</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#M232Counter'>DE</a>]</div>
- <ul>
- <a name="M232Counterdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> M232Counter [unit [factor [deltaunit [deltafactor]]]]</code>
- <br><br>
- Define at most one M232Counter for a M232 device. Defining a M232Counter
- will schedule an internal task, which periodically reads the status of the
- counter, and triggers notify/filelog commands. <code>unit</code> is the unit
- name, <code>factor</code> is used to calculate the reading of the counter
- from the number of ticks. <code>deltaunit</code> is the unit name of the counter
- differential per second, <code>deltafactor</code> is used to calculate the
- counter differential per second from the number of ticks per second.<br><br>
- Default values:
- <ul>
- <li>unit: ticks</li>
- <li>factor: 1.0</li>
- <li>deltaunit: ticks per second</li>
- <li>deltafactor: 1.0</li>
- </ul>
- <br>Note: the parameters in square brackets are optional. If you wish to
- specify an optional parameter, all preceding parameters must be specified
- as well.
- <br><br>Examples:
- <ul>
- <code>define counter M232Counter turns</code><br>
- <code>define counter M232Counter kWh 0.0008 kW 2.88</code>
- (one tick equals 1/1250th kWh)<br>
- </ul>
- <br>
- Do not forget to start the counter (with <code>set .. start</code> for
- M232) or to start the counter and set the reading to a specified value
- (with <code>set ... value</code> for M232Counter).<br><br>
- To avoid issues with the tick count reaching the end point, the device's
- internal counter is automatically reset to 0 when the tick count is 64,000
- or above and the reading <i>basis</i> is adjusted accordingly.
- <br><br>
- </ul>
- <a name="M232Counterset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> value <value></code>
- <br><br>
- Sets the reading of the counter to the given value. The counter is reset
- and started and the offset is adjusted to value/unit.
- <br><br>
- <code>set <name> interval <interval></code>
- <br><br>
- Sets the status polling interval in seconds to the given value. The default
- is 60 seconds.
- <br><br>
- </ul>
- <a name="M232Counterget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> status</code>
- <br><br>
- Gets the reading of the counter multiplied by the factor from the
- <code>define</code> statement. Wraparounds of the counter are accounted for
- by an offset (see reading <code>basis</code> in the output of the
- <code>list</code> statement for the device).
- <br><br>
- </ul>
- <a name="M232Counterattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li><a href="#model">model</a> (M232Counter)</li>
- </ul>
- <br>
- </ul>
- <p><a name="M232Voltage"></a>
- <h3>M232Voltage</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#M232Voltage'>DE</a>]</div>
- <ul>
- <br>
- <a name="M232Voltagedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> M232Voltage [an0..an5] [unit [factor]]</code>
- <br><br>
- Define as many M232Voltages as you like for a M232 device. Defining a
- M232Voltage will schedule an internal task, which reads the status of the
- analog input every minute, and triggers notify/filelog commands.
- <code>unit</code> is the unit name, <code>factor</code> is used to
- calibrate the reading of the analog input.<br><br>
- Note: the unit defaults to the string "volts", but it must be specified
- if you wish to set the factor, which defaults to 1.0. <br><br>
- Example:
- <ul>
- <code>define volt M232Voltage an0</code><br>
- <code>define brightness M232Voltage an5 lx 200.0</code><br>
- </ul>
- <br>
- </ul>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="M232Voltageget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> status</code>
- <br><br>
- </ul>
- <a name="M232Voltageattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li><a href="#model">model</a> (M232Voltage)</li>
- </ul>
- <br>
- </ul>
- <p><a name="MAX"></a>
- <h3>MAX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MAX'>DE</a>]</div>
- <ul>
- Devices from the eQ-3 MAX! group.<br>
- When heating thermostats show a temperature of zero degrees, they didn't yet send any data to the cube. You can
- force the device to send data to the cube by physically setting a temperature directly at the device (not through fhem).
- <br><br>
- <a name="MAXdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> MAX <type> <addr></code>
- <br><br>
- Define an MAX device of type <type> and rf address <addr>.
- The <type> is one of HeatingThermostat, HeatingThermostatPlus, WallMountedThermostat, ShutterContact, PushButton.
- The <addr> is a 6 digit hex number.
- You should never need to specify this by yourself, the <a href="#autocreate">autocreate</a> module will do it for you.<br>
- It's advisable to set event-on-change-reading, like
- <code>attr MAX_123456 event-on-change-reading .*</code>
- because the polling mechanism will otherwise create events every 10 seconds.<br>
- Example:
- <ul>
- <code>define switch1 MAX PushButton ffc545</code><br>
- </ul>
- </ul>
- <br>
- <a name="MAXset"></a>
- <b>Set</b>
- <ul>
- <li>desiredTemperature auto [<temperature>]<br>
- For devices of type HeatingThermostat only. If <temperature> is omitted,
- the current temperature according to the week profile is used. If <temperature> is provided,
- it is used until the next switch point of the week porfile. It maybe one of
- <ul>
- <li>degree celcius between 4.5 and 30.5 in 0.5 degree steps</li>
- <li>"on" or "off" set the thermostat to full or no heating, respectively</li>
- <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>
- </ul></li>
- <li>desiredTemperature [manual] <value> [until <date>]<br>
- For devices of type HeatingThermostat only. <value> maybe one of
- <ul>
- <li>degree celcius between 4.5 and 30.5 in 0.5 degree steps</li>
- <li>"on" or "off" set the thermostat to full or no heating, respectively</li>
- <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>
- </ul>
- The optional "until" clause, with <data> in format "dd.mm.yyyy HH:MM" (minutes may only be "30" or "00"!),
- sets the temperature until that date/time. Make sure that the cube/device has a correct system time.
- If the keepAuto attribute is 1 and the device is currently in auto mode, 'desiredTemperature <value>'
- behaves as 'desiredTemperature auto <value>'. If the 'manual' keyword is used, the keepAuto attribute is ignored
- and the device goes into manual mode.</li>
- <li>desiredTemperature boost<br>
- For devices of type HeatingThermostat only.
- Activates the boost mode, where for boostDuration minutes the valve is opened up boostValveposition percent.</li>
- <li>groupid <id><br>
- For devices of type HeatingThermostat only.
- 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>
- <li>ecoTemperature <value><br>
- 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>
- <li>comfortTemperature <value><br>
- 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>
- <li>measurementOffset <value><br>
- 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>
- <li>minimumTemperature <value><br>
- 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>
- <li>maximumTemperature <value><br>
- 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>
- <li>windowOpenTemperature <value><br>
- 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>
- <li>windowOpenDuration <value><br>
- 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>
- <li>decalcification <value><br>
- 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>
- <li>boostDuration <value><br>
- 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>
- <li>boostValveposition <value><br>
- 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>
- <li>maxValveSetting <value><br>
- 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>
- <li>valveOffset <value><br>
- 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>
- <li>factoryReset<br>
- Resets the device to factory values. It has to be paired again afterwards.<br>
- ATTENTION: When using this on a ShutterContact using the MAXLAN backend, the ShutterContact has to be triggered once manually to complete
- the factoryReset.</li>
- <li>associate <value><br>
- Associated one device to another. <value> can be the name of MAX device or its 6-digit hex address.<br>
- 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.
- <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>
- Associating HeatingThermostat and WallMountedThermostat makes them sync their desiredTemperature and uses the measured temperature of the
- WallMountedThermostat for control.</li>
- <li>deassociate <value><br>
- Removes the association set by associate.</li>
- <li>weekProfile [<day> <temp1>,<until1>,<temp2>,<until2>] [<day> <temp1>,<until1>,<temp2>,<until2>] ...<br>
- Allows setting the week profile. For devices of type HeatingThermostat or WallMountedThermostat only. Example:<br>
- <code>set MAX_12345 weekProfile Fri 24.5,6:00,12,15:00,5 Sat 7,4:30,19,12:55,6</code><br>
- sets the profile <br>
- <code>Friday: 24.5 °C for 0:00 - 6:00, 12 °C for 6:00 - 15:00, 5 °C for 15:00 - 0:00<br>
- Saturday: 7 °C for 0:00 - 4:30, 19 °C for 4:30 - 12:55, 6 °C for 12:55 - 0:00</code><br>
- while keeping the old profile for all other days.
- </li>
- </ul>
- <br>
- <a name="MAXget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="MAXattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <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>
- </ul>
- <br>
- <a name="MAXevents"></a>
- <b>Generated events:</b>
- <ul>
- <li>desiredTemperature<br>Only for HeatingThermostat and WallMountedThermostat</li>
- <li>valveposition<br>Only for HeatingThermostat</li>
- <li>battery</li>
- <li>temperature<br>The measured temperature (= measured temperature at sensor + measurementOffset), only for HeatingThermostat and WallMountedThermostat</li>
- </ul>
- </ul>
- <p><a name="MAXLAN"></a>
- <h3>MAXLAN</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MAXLAN'>DE</a>]</div>
- <ul>
- The MAXLAN is the fhem module for the eQ-3 MAX! Cube LAN Gateway.
- <br><br>
- 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>
- <br>
- <a name="MAXLANdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> MAXLAN <ip-address>[:port] [<pollintervall> [ondemand]]</code><br>
- <br>
- port is 62910 by default. (If your Cube listens on port 80, you have to update the firmware with
- the official MAX! software).
- If the ip-address is called none, then no device will be opened, so you
- can experiment without hardware attached.<br>
- The optional parameter <pollintervall> defines the time in seconds between each polling of data from the cube.<br>
- You may provide the option <code>ondemand</code> forcing the MAXLAN module to tear-down the connection as often as possible
- thus making the cube usable by other applications or the web portal.
- </ul>
- <br>
- <a name="MAXLANset"></a>
- <b>Set</b>
- <ul>
- <li>pairmode [<n>,cancel]<br>
- Sets the cube into pairing mode for <n> 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).
- Setting pairmode to "cancel" puts the cube out of pairing mode.</li>
- <li>raw <data><br>
- Sends the raw <data> to the cube.</li>
- <li>clock<br>
- 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>
- <code>attr ml set-clock-on-init</code><br>
- to your fhem.cfg to do this automatically on startup.</li>
- <li>factorReset<br>
- Reset the cube to factory defaults.</li>
- <li>reconnect<br>
- FHEM will terminate the current connection to the cube and then reconnect. This allows
- re-reading the configuration data from the cube, as it is only send after establishing a new connection.</li>
- </ul>
- <br>
- <a name="MAXLANget"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <br>
- <a name="MAXLANattr"></a>
- <b>Attributes</b>
- <ul>
- <li>set-clock-on-init<br>
- (Default: 1). Automatically call "set clock" after connecting to the cube.</li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- <li><a href="#addvaltrigger">addvaltrigger</a></li>
- <li>timezone<br>
- (Default: CET-CEST). Set MAX Cube timezone (requires "set clock" to take effect).<br>
- <b>NB.</b>Cube time and cubeTimeDifference will not change until Cube next connects.<br>
- <ul>
- <li>GMT-BST - (UTC +0, UTC+1)</li>
- <li>CET-CEST - (UTC +1, UTC+2)</li>
- <li>EET-EEST - (UTC +2, UTC+3)</li>
- <li>FET-FEST - (UTC +3)</li>
- <li>MSK-MSD - (UTC +4)</li>
- </ul>
- The following are settings with no DST (daylight saving time)
- <ul>
- <li>GMT - (UTC +0)</li>
- <li>CET - (UTC +1)</li>
- <li>EET - (UTC +2)</li>
- </ul>
- </li>
- </ul>
- </ul>
- <p><a name="MEDIAPORTAL"></a>
- <h3>MEDIAPORTAL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MEDIAPORTAL'>DE</a>]</div>
- <p>Connects to a running MediaPortal instance via the WifiRemote plugin</p>
- <h4>Example</h4>
- <p>
- <code>define wohnzimmer_Mediaportal MEDIAPORTAL 192.168.0.47:8017</code>
- </p>
- <a name="MEDIAPORTALdefine"></a>
- <h4>Define</h4>
- <b><code>define <name> MEDIAPORTAL host[:port]</code></b>
- <br /><br /> Define a Mediaportal interface to communicate with a Wifiremote-Plugin of a Mediaportal-System.<br />
- <p>
- <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>
- <a name="MEDIAPORTALset"></a>
- <h4>Set</h4>
- <ul>
- <li><b>Common Tasks</b><ul>
- <li><a name="MEDIAPORTAL_setter_connect">
- <b><code>connect</code></b></a>
- <br />Connects to Mediaportal immediately without waiting for the normal Fhem-Timeout for reconnect (30s).</li>
- <li><a name="MEDIAPORTAL_setter_powermode">
- <b><code>powermode <mode></code></b></a>
- <br />One of (logoff, suspend, hibernate, reboot, shutdown, exit). Sets the powermode, e.g. shutdown, for shutdown the computersystem of the Mediaportal-System.</li>
- <li><a name="MEDIAPORTAL_setter_reconnect">
- <b><code>reconnect</code></b></a>
- <br />Re-Connects to Mediaportal immediately.</li>
- </ul></li>
- <li><b>Control-Commands</b><ul>
- <li><a name="MEDIAPORTAL_setter_command">
- <b><code>command <command></code></b></a>
- <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>
- <li><a name="MEDIAPORTAL_setter_key">
- <b><code>key <keyvalue></code></b></a>
- <br />Sends the given key to the player.</li>
- <li><a name="MEDIAPORTAL_setter_sleep">
- <b><code>sleep</code></b></a>
- <br />Sends the hinernate-signal to Mediaportal. This command is a shortcut for "powermode hibernate"</li>
- <li><a name="MEDIAPORTAL_setter_wakeup">
- <b><code>wakeup</code></b></a>
- <br />Wakes the Mediaportal-System up (WakeUp-On-LAN).</li>
- </ul></li>
- <li><b>Play-Commands</b><ul>
- <li><a name="MEDIAPORTAL_setter_playchannel">
- <b><code>playchannel <channelID></code></b></a>
- <br />Plays the channel with the given ID.</li>
- <li><a name="MEDIAPORTAL_setter_playfile">
- <b><code>playfile <fileType> <filePath></code></b></a>
- <br />Plays the given file with the given type. FileType can be one of (audio, video).</li>
- <li><a name="MEDIAPORTAL_setter_playlist">
- <b><code>playlist <command> <param></code></b></a>
- <br />Sends the given playlistcommand with the given parameter. Command can be one of (play, loadlist, loadlist_shuffle, loadfrompath, loadfrompath_shuffle).</li>
- <li><a name="MEDIAPORTAL_setter_Volume">
- <b><code>Volume <volumelevel></code></b></a>
- <br />Sets the Volume to the given value.</li>
- </ul></li>
- </ul>
- <a name="MEDIAPORTALget"></a>
- <h4>Get</h4>
- <ul>
- <li><b>Common Tasks</b><ul>
- <li><a name="MEDIAPORTAL_getter_status">
- <b><code>status</code></b></a>
- <br />Call for the answer of a <code>status</code>-Message. e.g. Asynchronously retrieves the information of "Title" and "PlayStatus".</li>
- <li><a name="MEDIAPORTAL_getter_nowplaying">
- <b><code>nowplaying</code></b></a>
- <br />Call for the answer of a <code>nowplaying</code>-Message. e.g. Asynchronously retrieves the information of "Duration", "Position" and "File"".</li>
- </ul></li>
- </ul>
- <a name="MEDIAPORTALattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><b>Common</b><ul>
- <li><a name="MEDIAPORTAL_attribut_disable"><b><code>disable <value></code></b>
- </a><br />One of (0, 1). With this attribute you can disable the module.</li>
- <li><a name="MEDIAPORTAL_attribut_generateNowPlayingUpdateEvents"><b><code>generateNowPlayingUpdateEvents <value></code></b>
- </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>
- <li><a name="MEDIAPORTAL_attribut_HeartbeatInterval"><b><code>HeartbeatInterval <interval></code></b>
- </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>
- <li><a name="MEDIAPORTAL_attribut_macaddress"><b><code>macaddress <address></code></b>
- </a><br />Sets the MAC-Address for the Player. This is needed for WakeUp-Function. e.g. "90:E6:BA:C2:96:15"</li>
- </ul></li>
- <li><b>Authentication</b><ul>
- <li><a name="MEDIAPORTAL_attribut_authmethod"><b><code>authmethod <value></code></b>
- </a><br />One of (none, userpassword, passcode, both). With this value you can set the authentication-mode.</li>
- <li><a name="MEDIAPORTAL_attribut_password"><b><code>password <value></code></b>
- </a><br />With this value you can set the password for authentication.</li>
- <li><a name="MEDIAPORTAL_attribut_username"><b><code>username <value></code></b>
- </a><br />With this value you can set the username for authentication.</li>
- </ul></li>
- </ul>
- <p><a name="MOBILEALERTS"></a>
- <h3>MOBILEALERTS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MOBILEALERTS'>DE</a>]</div>
- <ul>
- The MOBILEALERTS is a fhem module for the german MobileAlerts devices and TFA WEATHERHUB devices.
- <br><br>
- The fhem module represents a MobileAlerts device. The connection is provided by the <a href="#MOBILEALERTSGW">MOBILELAERTSGW</a> module.
- Currently supported: MA10100, MA10101, MA10200, MA10230, MA10300, MA10650, MA10320PRO, MA10350, MA10410, MA10450, MA10660, MA10700, TFA 30.3312.02, MA10800, WL2000<br>
- Supported but untested: ./.<br>
- <br>
- <a name="MOBILEALERTSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> MOBILEALERTS <deviceID></code><br>
- <br>
- deviceID is the sensorcode on the sensor.
- </ul>
- <br>
- <a name="MOBILEALERTSreadings"></a>
- <b>Readings</b>
- <ul>
- <li>lastMsg<br>The last message received (always for unknown devices, for known devices only if attr lastMsg is set).</li>
- <li>deviceType<br>The devicetype.</li>
- <li>lastRcv<br>Timestamp of last message.</li>
- <li>actStatus<br>Shows 'unknown', 'alive', 'dead', 'switchedOff' depending on attribut actCycle</li>
- <li>txCounter<br>Counter of last message.</li>
- <li>triggered<br>1=last message was triggered by a event.</li>
- <li>tempertature, prevTemperature, temperatureIn, temperatureOut, prevTemperatureIn, prevTemperatureOut<br>Temperature (depending on device and attribut expert).</li>
- <li>tempertatureString, prevTemperatureString, temperatureInString, temperatureOutString, prevTemperatureInString, prevTemperatureOutString<br>Temperature as string (depending on device and attribut expert).</li>
- <li>state<br>State of device (short actual reading)</li>
- <li>humidity, prevHumidity, humidityIn, humidityOut, prevHumidityIn, prevHumidityOut<br>Humidity (depending on device and attribut expert).</li>
- <li>humidityString, prevHumidityString, humidityInString, humidityOutString, prevHumidityInString, prevHumidityOutString<br>Humidity as string (depending on device and attribut expert).</li>
- <li>wetness<br>Shows if sensor detects water.</li>
- <li>lastEvent, lastEvent<X> ,lastEventString, lastEvent<X>String<br>Time when last event (rain) happend (MA10650 only).</li>
- <li>mmRain, mmRainActHour, mmRainLastHour, mmRainActDay, mmRainYesterday<br>Rain since reset of counter, current hour, last hour, current day, yesterday.</li>
- <li>direction, directionInt<br>Direction of wind.</li>
- <li>windSpeed, gustSpeed<br>Windspeed.</li>
- </ul>
- <br>
- <a name="MOBILEALERTSset"></a>
- <b>Set</b>
- <ul>
- <li><code>set <name> clear <readings|counters></code><br>
- Clears the readings (all) or counters (like mmRain). </li>
- </ul>
- <br>
- <a name="MOBILEALERTSget"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <br>
- <a name="MOBILEALERTSattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li>lastMsg<br>
- If value 1 is set, the last received message will be logged as reading even if device is known.
- </li>
- <li>actCycle <[hhh:mm]|off><br>
- This value triggers a 'alive' and 'not alive' detection. [hhh:mm] is the maximum silent time for the device.
- The reading actStatus will show the states: 'unknown', 'alive', 'dead'.
- </li>
- <li>expert<br>
- Defines how many readings are show (0=only current, 1=previous, 4=all).
- </li>
- </ul>
- </ul>
- <p><a name="MOBILEALERTSGW"></a>
- <h3>MOBILEALERTSGW</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MOBILEALERTSGW'>DE</a>]</div>
- <ul>
- The MOBILEALERTSGW is a fhem module for the german MobileAlerts Gateway and TFA WEATHERHUB.
- <br><br>
- The fhem module makes simulates as http-proxy to intercept messages from the gateway.
- In order to use this module you need to configure the gateway to use the fhem-server with the defined port as proxy.
- You can do so with the command initgateway or by app.
- It automatically detects devices. The other devices are handled by the <a href="#MOBILEALERTS">MOBILELAERTS</a> module,
- which uses this module as its backend.<br>
- <br>
- <a name="MOBILEALERTSGWdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> MOBILEALERTSGW <port></code><br>
- <br>
- port is the port where the proxy server listens. The port must be free.
- </ul>
- <br>
- <a name="MOBILEALERTSGWreadings"></a>
- <b>Readings</b>
- <ul>
- <li>Gateways<br>List of known gateways</li>
- <li>GW_<Gateway-MAC>_lastSeen<br>Time when last message was received from gateway</li>
- <li>GW_<Gateway-MAC>_ip<br>IP-Adresse of gateway</li>
- <li>GW_<Gateway-MAC>_serial<br>Serialnumber of gateway</li>
- <li>GW_<Gateway-MAC>_proxy<br>on, off: setting of proxy (only after get config)</li>
- <li>GW_<Gateway-MAC>_proxyname<br>Name/IP of proxy (only after get config)</li>
- <li>GW_<Gateway-MAC>_proxyport<br>Port of proxy (only after get config)</li>
- <li>GW_<Gateway-MAC>_config<br>Complete configuration as hex-values (only after get config)</li>
- </ul>
- <br>
- <a name="MOBILEALERTSGWset"></a>
- <b>Set</b>
- <ul>
- <li><code>set <name> clear <readings></code><br>
- Clears the readings. </li>
- <li><code>set <name> initgateway <gatewayid></code><br>
- Sets the proxy in the gateway to the fhem-server. A reboot of the gateway may be needed in order to take effect.</li>
- <li><code>set <name> rebootgateway <gatewayid></code><br>
- Reboots the gateway.</li>
- </ul>
- <br>
- <a name="MOBILEALERTSGWget"></a>
- <b>Get</b>
- <ul>
- <li><code>get <name> config <IP or gatewayid> </code><br>
- Gets the config of a gateway or all gateways. IP or gatewayid are optional.
- If not specified it will search for alle Gateways in the local lan (Broadcast).</li>
- </ul>
- <br>
- <br>
- <a name="MOBILEALERTSGWattr"></a>
- <b>Attributes</b>
- <ul>
- <li>forward<br>
- If value 1 is set, the data will be forwarded to the MobileAlerts Server http://www.data199.com/gateway/put .
- </li>
- </ul>
- </ul>
- <p><a name="MPD"></a>
- <h3>MPD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MPD'>DE</a>]</div>
- 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>
- 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>
- FHEM Forum : <a href='http://forum.fhem.de/index.php/topic,18517.0.html'>Modul für MPD</a> ( in german )<br>
- Modul requires JSON -> sudo apt-get install libjson-perl <br>
- If you are using Mopidy with Spotify support you may also need LWP::UserAgent -> sudo apt-get install libwww-perl<br>
- <ul>
- <a name="MPDdefine"></a>
- <b>Define</b>
- <ul>
- define <name> MPD <IP MPD Server | default localhost> <Port MPD Server | default 6600><br>
- Example:<br>
- <pre>
- define myMPD MPD 192.168.0.99 7000
- </pre>
- if FHEM and MPD a running on the same device :
- <pre>
- define myMPD MPD
- </pre>
- </ul>
- <br>
- <a name="MPDset"></a>
- <b>Set</b><ul>
- <code>set <name> <what></code>
- <br> <br>
- Currently, the following commands are defined.<br>
- <br>
- play => like MPC play , start playing song in playlist<br>
- clear => like MPC clear , delete MPD playlist<br>
- stop => like MPC stop, stops playing <br>
- pause => like MPC pause<br>
- previous => like MPC previous, play previous song in playlist<br>
- next => like MPC next, play next song in playlist<br>
- random => like MPC random, toggel on/off<br>
- repeat => like MPC repeat, toggel on/off<br>
- toggle => toggles from play to stop or from stop/pause to play<br>
- updateDb => like MPC update<br>
- volume (%) => like MPC volume %, 0 - 100<br>
- volumeUp => inc volume ( + attr volumeStep size )<br>
- volumeDown => dec volume ( - attr volumeStep size )<br>
- playlist (playlistname|songnumber|position) set playlist on MPD Server. If songnumber and/or postion not defined<br>
- MPD starts playing with the first song at position 0<br>
- playfile (file) => create playlist + add file to playlist + start playing<br>
- IdleNow => send Idle command to MPD and wait for events to return<br>
- reset => reset MPD Modul<br>
- mpdCMD (cmd) => send a command to MPD Server ( <a href='http://www.musicpd.org/doc/protocol/'>MPD Command Ref</a> )<br>
- mute => on,off,toggle<br>
- seekcur (time) => Format: [[hh:]mm:]ss. Not before MPD version 0.20.<br>
- forward => jump forward in the current track as far as defined in the <i>seekStep</i> Attribute, default 7%<br>
- rewind => jump backwards in the current track, as far as defined in the <i>seekStep</i> Attribute, default 7%<br>
- channel (no) => loads the playlist with the given number<br>
- channelUp => loads the next playlist<br>
- channelDown => loads the previous playlist<br>
- save_bookmark => saves the current state of the playlist (track number and position inside the track) for the currently loaded playlist
- This will only work if the playlist was loaded through the module and if the attribute bookmarkDir is set. (not on radio streams !)<br>
- 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>
- </ul>
- <br>
- <a name="MPDget"></a>
- <b>Get</b><ul>
- <code>get <name> <what></code>
- <br> <br>
- Currently, the following commands are defined.<br>
- music => list all MPD music files in MPD databse<br>
- playlists => list all MPD playlist in MPD databse<br>
- playlistsinfo => show current playlist informations<br>
- webrc => HTML output for a simple Remote Control on FHEM webpage e.g :.<br>
- <pre>
- define <name> weblink htmlCode {fhem("get <name> webrc", 1)}
- attr <name> room MPD
- </pre>
- statusRequest => get MPD status<br>
- currentsong => get infos from current song in playlist<br>
- outputs => get name,id,status about all MPD output devices in /etc/mpd.conf<br>
- bookmarks => list all stored bookmarks<br>
- </ul>
- <br>
- <a name="MPDattr"></a>
- <b>Attributes</b>
- <ul>
- <li>password <pwd>, if password in mpd.conf is set</li>
- <li>loadMusic 1|0 => load titles from MPD database at startup (not supported by modipy)</li>
- <li>loadPlaylists 1|0 => load playlist names from MPD database at startup</li>
- <li>volumeStep 1|2|5|10 => Step size for Volume +/- (default 5)</li>
- <li>titleSplit 1|0 => split title to artist and title if no artist is given in songinfo (e.g. radio-stream default 1)</li>
- <li>timeout (default 1) => timeout in seconds for TCP connection timeout</li>
- <li>waits (default 60) => if idle process ends with error, seconds to wait</li>
- <li>stateMusic 1|0 => show Music DropDown box in web frontend</li>
- <li>statePlaylists 1|0 => show Playlists DropDown box in web frontend</li>
- <li>player mpd|mopidy|forked-daapd => which player is controlled by the module</li>
- <li>Cover Art functions from <a href="http://www.last.fm/"><b>Last.fm</b></a> :</li>
- <li>image_size -1|0|1|2|3 (default -1 = don't use artist images and album cover from Last.fm)<br>
- Last.fm is using diffrent image sizes :<br>
- 0 = 32x32 , 1 = 64x64 , 2 = 174x174 , 3 = 300x300</li>
- <li>artist_content 0|1 => store artist informations in Reading artist_content</li>
- <li>artist_summary 0|1 => stote more artist informations in Reading artist_summary<br>
- Example with readingsGroup :<br>
- <pre>
- define rg_artist readingsGroup <MPD name>:artist,artist_image_html,artist_summary
- attr rg_artist room MPD
- </pre></li>
- <li>cache (default lfm => /fhem/www/lfm) store artist image and album cover in a local directory</li>
- <li>unknown_artist_image => show this image if no other image is avalible (default : /fhem/icons/1px-spacer)</li>
- <li>bookmarkDir => set a writeable directory here to enable saving and restoring of playlist states using the set bookmark and get bookmark commands</li>
- <li>autoBookmark => set this to 1 to enable automatic loading and saving of playlist states whenever the playlist is changed using this module</li>
- <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>
- <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>
- <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>
- <li>no_playlistcollection (default 0) => if set to 1 , dont create reading playlistcollection</li>
- </ul>
- <br>
- <b>Readings</b>
- <ul>
- all MPD internal values<br>
- artist_image : (if using Last.fm)<br>
- artist_image_html : (if using Last.fm)<br>
- album_image : (if using Last.fm)<br>
- album_image_html : (if using Last.fm)<br>
- artist_content : (if using Last.fm)<br>
- artist_summary : (if using Last.fm)<br>
- currentTrackProvider : Radio / Bibliothek<br>
- playlistinfo : (TabletUI Medialist)<br>
- playlistcollection : (TabletUI)<br>
- playlistname : (TabletUI) current playlist name<br>
- playlist_num : current playlist number<br>
- playlist_json : (Medialist Modul)<br>
- rawTitle : Title information without changes from the modul
- </ul>
- </ul>
- <p><a name="MQTT"></a>
- <h3>MQTT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MQTT'>DE</a>]</div>
- <ul>
- <p>connects fhem to <a href="http://mqtt.org">mqtt</a>.</p>
- <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/>
- Each <a href="#MQTT_DEVICE">MQTT_DEVICE</a> acts as a bridge in between an fhem-device and mqtt.<br/>
- 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>
- <a name="MQTTdefine"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> MQTT <ip:port> [<username>] [<password>]</code></p>
- <p>Specifies the MQTT device.</p>
- </ul>
- <a name="MQTTset"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <p><code>set <name> connect</code><br/>
- (re-)connects the MQTT-device to the mqtt-broker</p>
- </li>
- <li>
- <p><code>set <name> disconnect</code><br/>
- disconnects the MQTT-device from the mqtt-broker</p>
- </li>
- <li>
- <p><code>set <name> publish [qos:?] [retain:?] <topic> <message></code><br/>
- sends message to the specified topic</p>
- </li>
- </ul>
- <a name="MQTTattr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <p>keep-alive<br/>
- sets the keep-alive time (in seconds).</p>
- </li>
- <li>
- <p><code>attr <name> last-will [qos:?] [retain:?] <topic> <message></code><br/>
- Support for MQTT feature "last will"
- </p>
- <p>example:<br/>
- <code>attr mqtt last-will /fhem/status crashed</code>
- </p>
- </li>
- <li>
- <p><code>attr <name> client-id client id</code><br/>
- redefines client id
- </p>
- <p>example:<br/>
- <code>attr mqtt client-id fhem1234567</code>
- </p>
- </li>
- <li>
- <p>on-connect, on-disconnect<br/>
- <code>attr <name> on-connect {Perl-expression} <topic> <message></code><br/>
- Publish the specified message to a topic at connect / disconnect (counterpart to lastwill) and / or evaluation of Perl expression<br/>
- If a Perl expression is provided, the message is sent only if expression returns true (for example, 1) or undef.<br/>
- The following variables are passed to the expression at evaluation: $hash, $name, $qos, $retain, $topic, $message.
- </p>
- <p>examples:<br/>
- <code>attr mqtt on-connect /topic/status connected</code><br/>
- <code>attr mqtt on-connect {Log3("abc",1,"on-connect")} /fhem/status connected</code>
- </p>
- </li>
- <li>
- <p>on-timeout<br/>
- <code>attr <name> on-timeout {Perl-expression}</code>
- evaluate the given Perl expression on timeout<br/>
- </p>
- </li>
- </ul>
- </ul>
- <p><a name="MQTT_BRIDGE"></a>
- <h3>MQTT_BRIDGE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MQTT_BRIDGE'>DE</a>]</div>
- <ul>
- <p>acts as a bridge in between an fhem-device and <a href="http://mqtt.org/">mqtt</a>-topics.</p>
- <p>requires a <a href="#MQTT">MQTT</a>-device as IODev<br/>
- 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>
- <a name="MQTT_BRIDGEdefine"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> MQTT_BRIDGE <fhem-device-name></code></p>
- <p>Specifies the MQTT device.<br/>
- <fhem-device-name> is the fhem-device this MQTT_BRIDGE is linked to.</p>
- </ul>
- <a name="MQTT_BRIDGEget"></a>
- <p><b>Get</b></p>
- <ul>
- <li>
- <p><code>get <name> readings</code><br/>
- retrieves all existing readings from fhem-device and configures (default-)topics for them.<br/>
- attribute 'publish-topic-base' is prepended if set.</p>
- </li>
- </ul>
- <a name="MQTT_BRIDGEattr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <p><code>attr <name> subscribeSet [{Perl-expression}] [qos:?] [retain:?] <topic></code><br/>
- configures a topic that will issue a 'set <message> whenever a message is received<br/>
- QOS and ratain can be optionally defined for this topic. <br/>
- 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)).
- </p>
- <p>Example:<br/>
- <code>attr mqttest subscribeSet {fhem("do somethin")} /topic/cmd</code>
- </p>
- </li>
- <li>
- <p><code>attr <name> subscribeSet_<reading> [{Perl-expression}] [qos:?] [retain:?] <topic></code><br/>
- configures a topic that will issue a 'set <reading> <message> whenever a message is received. see above
- for Perl-Expression/QOS/retain</p>
- <p>Example:<br/>
- <code>attr mqttest subscribeSet_cmd {if ($message eq "config") fhem("set $device getconfig");; 0} /topic/cmd</code>
- </p>
- </li>
- <li>
- <p><code>attr <name> publishState <topic></code><br/>
- configures a topic such that a message is sent to topic whenever the device state changes.</p>
- </li>
- <li>
- <p><code>attr <name> publishReading_<reading> <topic></code><br/>
- configures a topic such that a message is sent to topic whenever the device readings value changes.</p>
- </li>
- <li>
- <p><code>attr <name> publish-topic-base <topic></code><br/>
- this is used as base path when issueing 'get <device> readings' to construct topics to publish to based on the devices existing readings</p>
- </li>
- <li>
- <p><code>attr <name> retain <flags> ...</code><br/>
- Specifies the retain flag for all or specific readings. Possible values are 0, 1</p>
- <p>Examples:<br/>
- <code>attr mqttest retain 0</code><br/>
- defines retain 0 for all readings/topics (due to downward compatibility)<br>
- <code> retain *:0 1 test:1</code><br/>
- defines retain 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
- </p>
- </li>
- <li>
- <p><code>attr <name> qos <flags> ...</code><br/>
- 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>
- <p>Examples:<br/>
- <code>attr mqttest qos 0</code><br/>
- defines QOS 0 for all readings/topics (due to downward compatibility)<br>
- <code> retain *:0 1 test:1</code><br/>
- defines QOS 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
- </p>
- </li>
- </ul>
- </ul>
- <p><a name="MQTT_DEVICE"></a>
- <h3>MQTT_DEVICE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MQTT_DEVICE'>DE</a>]</div>
- <ul>
- <p>acts as a fhem-device that is mapped to <a href="http://mqtt.org/">mqtt</a>-topics.</p>
- <p>requires a <a href="#MQTT">MQTT</a>-device as IODev<br/>
- 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>
- <a name="MQTT_DEVICEdefine"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> MQTT_DEVICE</code><br/>
- Specifies the MQTT device.</p>
- </ul>
- <a name="MQTT_DEVICEset"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <p><code>set <name> <command></code><br/>
- sets reading 'state' and publishes the command to topic configured via attr publishSet</p>
- </li>
- <li>
- <p><code>set <name> <reading> <value></code><br/>
- sets reading <reading> and publishes the command to topic configured via attr publishSet_<reading></p>
- </li>
- <li>
- <p>The <a href="#setExtensions">set extensions</a> are supported with useSetExtensions attribute.<br/>
- Set eventMap if your publishSet commands are not on/off.</p>
- <p>example for true/false:<br/>
- <code>attr mqttest eventMap { dev=>{ 'true'=>'on', 'false'=>'off' }, usr=>{ '^on$'=>'true', '^off$'=>'false' }, fw=>{ '^on$'=>'on', '^off$'=>'off' } }</code></p>
- </li>
- </ul>
- <a name="MQTT_DEVICEattr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <p><code>attr <name> publishSet [[<reading>:]<commands_or_options>] <topic></code><br/>
- 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>
- <p>example:<br/>
- <code>attr mqttest publishSet on off switch:on,off level:slider,0,1,100 /topic/123</code>
- </p>
- </li>
- <li>
- <p><code>attr <name> publishSet_<reading> [<values>]* <topic></code><br/>
- configures reading that may be used to both set 'reading' (to optionally configured values) and publish to configured topic</p>
- </li>
- <li>
- <p><code>attr <name> autoSubscribeReadings <topic></code><br/>
- specify a mqtt-topic pattern with wildcard (e.c. 'myhouse/kitchen/+') and MQTT_DEVICE automagically creates readings based on the wildcard-match<br/>
- e.g a message received with topic 'myhouse/kitchen/temperature' would create and update a reading 'temperature'</p>
- </li>
- <li>
- <p><code>attr <name> subscribeReading_<reading> [{Perl-expression}] [qos:?] [retain:?] <topic></code><br/>
- mapps a reading to a specific topic. The reading is updated whenever a message to the configured topic arrives.<br/>
- QOS and ratain can be optionally defined for this topic. <br/>
- 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)).
- </p>
- <p>Example:<br/>
- <code>attr mqttest subscribeReading_cmd {fhem("set something off")} /topic/cmd</code>
- </p>
- </li>
- <li>
- <p><code>attr <name> retain <flags> ...</code><br/>
- Specifies the retain flag for all or specific readings. Possible values are 0, 1</p>
- <p>Examples:<br/>
- <code>attr mqttest retain 0</code><br/>
- defines retain 0 for all readings/topics (due to downward compatibility)<br>
- <code> retain *:0 1 test:1</code><br/>
- defines retain 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
- </p>
- </li>
- <li>
- <p><code>attr <name> qos <flags> ...</code><br/>
- 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>
- <p>Examples:<br/>
- <code>attr mqttest qos 0</code><br/>
- defines QOS 0 for all readings/topics (due to downward compatibility)<br>
- <code> retain *:0 1 test:1</code><br/>
- defines QOS 0 for all readings/topics except the reading 'test'. Retain for 'test' is 1<br>
- </p>
- </li>
- <li>
- <p><code>attr <name> useSetExtensions <flags></code><br/>
- If set to 1, then the <a href="#setExtensions">set extensions</a> are supported.</p>
- </li>
- </ul>
- </ul>
- <p><a name="MSG"></a>
- <h3>msg</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MSG'>DE</a>]</div>
- <ul>
- <code>msg [<type>] [<@device>|<e-mail address>] [<priority>] [|<title>|] <message></code>
- <br>
- <br>
- No documentation here yet, sorry.<br>
- <a href="http://forum.fhem.de/index.php/topic,39983.0.html">FHEM Forum</a>
- </ul>
- <p><a name="MSGFile"></a>
- <h3>MSGFile</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MSGFile'>DE</a>]</div>
- <ul>
- The MSGFile device is used to write arbitrary data to a file on disk
- or other media accessable through the filesystem. In order to write to a file,
- the access rights of the FHEM process to the specified file and path are relevant.
- To set the rights for a directory, please use OS related commands.
- <br><br>
- <a name="MSGFileDefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> MSGFile <filename></code><br><br>
- Specifies the MSGFile device. At definition the message counter is set to 0.
- A filename must be specified at definition.
- </ul>
- <br>
- Examples:
- <ul>
- <code>define myFile MSGFile</code>
- </ul><br>
- <a name="MSGFileSet"></a>
- <b>Set</b><br>
- <ul><code>set <name> add|clear|list|write [text]</code><br>
- Set is used to manipulate the message buffer of the device. The message
- buffer is an array of lines of data, stored serial based on the incoming
- time into the buffer. Lines of data inside the buffer could not be deleted
- anymore, except of flashing the whole buffer.<br>
- <ul><b>add</b><br> to add lines of data to the message buffer. All data behind
- "add" will be interpreted as text message. To add a carriage return to the data,
- please use the CR attribute.
- </ul>
- <ul><b>clear</b><br> to flash the message buffer and set the line counter to 0.
- All the lines of data are deleted and the buffer is flushed.</ul>
- <ul><b>list</b><br> to list the message buffer.</ul><br>
- <ul><b>write</b><br> to write the message buffer to the associated file.</ul><br>
- </ul><br>
- Examples:
- <ul>
- <code>set myFile add Dies ist Textzeile 1</code><br>
- <code>set myFile add Dies ist Textzeile 2</code><br>
- <code>set myFile clear</code><br>
- <br>
- Full working example to write two lines of data to a file:<br>
- <code>define myFile MSGFile /tmp/fhemtest.txt</code><br>
- <code>attr myFile filemode append</code><br>
- <code>set myFile add Textzeile 1</code><br>
- <code>set myFile add Textzeile 2</code><br>
- <code>set myFile write</code><br>
- <code>set myFile clear</code><br>
- </ul><br>
- <a name="MSGFileVattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="MSGFilefilename">filename</a><br>
- sets the filename, must be a fully qualified filename.
- FHEM must have the rights to write this file to the directory</li>
- <li><a href="MSGFilefilemode">filemode</a><br>
- sets the filemode, valid are "new" or "append"<br>
- new creates a new, empty file and writes the data to this file. Existing files are cleared, the data is lost!<br>
- append uses, if available, an existing file and writes the
- buffer data to the end of the file. If the file do not exist, it will
- be created</li>
- <li><a href="MSGFilenameCR">CR</a><br>
- set the option to write a carriage return at the end of the line.
- CR could be set to 0 or 1, 1 enables this feature</li>
- <li><a href="#loglevel">loglevel</a></li>
- </ul>
- </ul>
- <p><a name="MSGMail"></a>
- <h3>MSGMail</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MSGMail'>DE</a>]</div>
- <ul>
- The MSGMail device is used to send mail messages to a recipient by connecting
- to a SMTP server. Currently MSGMail supports only servers, that allow SSL secured connections
- like Googlemail, GMX, Yahoo or 1und1.
- MSGMail requires the perl pacakge <b>MAIL::Lite</b>.
- For SSL support, Net::SMTP version 3.06 is required. On systems with an older version of Net::SMTP,
- MSGMail requires the package <b>Net::SMTP::SSL</b>.
- <br><br>
- <a name="MSGMailDefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> MSGMail <from> <to> <smtphost> <authfile></code><br><br>
- Specifies the MSGMail device. At definition the message counter is set to 0.
- From, To, SMTPHost and the authfile (see attributes below) need to be defined
- at definition time.
- </ul>
- <br>
- Examples:
- <ul>
- <code>define myMail MSGMail from@address.com to@address.com smtp.provider.host /etc/msgauthfile</code>
- </ul><br>
- <a name="MSGMailSet"></a>
- <b>Set</b><br>
- <ul><code>set <name> add|clear|list|send [text]</code><br>
- Set is used to manipulate the message buffer of the device. The message
- buffer is an array of lines of data, stored serial based on the incoming
- time into the buffer. Lines of data inside the buffer could not be deleted
- anymore, except of flashing the whole buffer.<br>
- <ul><b>add</b><br> to add lines of data to the message buffer. All data behind
- "add" will be interpreted as text message. To add a carriage return to the data,
- please use the CR attribute.
- </ul>
- <ul><b>clear</b><br> to flush the message buffer and set the line counter to 0.
- All the lines of data are deleted and the buffer is flushed.</ul>
- <ul><b>list</b><br> to list the message buffer.<br></ul>
- <ul><b>send</b><br> to send the message buffer.<br></ul>
- <br>
- Examples:
- <ul>
- <code>set myMail add Dies ist Textzeile 1</code><br>
- <code>set myMail add Dies ist Textzeile 2</code><br>
- <code>set myMail clear</code><br><br>
- Full working example to send two lines of data to a recipent:<br>
- <code>define myMail MSGMail donald.duck@entenhausen.com dagobert.duck@duck-banking.com smtp.entenhausen.net /etc/fhem/msgmailauth</code><br>
- <code>attr myMail smtpport 9999</code><br>
- <code>attr myMail subject i need more money</code><br>
- <code>attr myMail CR 0</code><br>
- <code>set myMail add Please send me </code><br>
- <code>set myMail add 1.000.000 Taler</code><br>
- <code>set myMail send</code><br>
- <code>set myMail clear</code><br>
- </ul><br>
- </ul>
- <a name="MSGMailattr"></a>
- <b>Attributes</b>
- <ul>
- Almost all of these attributes are not optional, most of them could set at definition.<br>
- <li><a href="MSGMailFrom">from</a><br>
- sets the mail address of the sender</li>
- <li><a href="MSGMailTo">to</a><br>
- sets the mail address of the recipent</li>
- <li><a href="MSGMailsmtphost">smtphost</a><br>
- sets the name of the smtphost, for example for GMX
- you could use mail.gmx.net or for Googlemail the smtphost is
- smtp.googlemail.com</li>
- <li><a href="MSGMailsmtphost">smtpport</a> (optional)<br>
- sets the port of the smtphost, for example for GMX
- or for Googlemail the smtport is 465, which is also
- the default and do not need to be set</li>
- <li><a href="MSGMailsubject">subject</a> (optional)<br>
- sets the subject of this email. Per default the subject is set to "FHEM"<br>
- </li>
- <li><a href="MSGMailauthfile">authfile</a><br>
- sets the authfile for the SSL connection to the SMTP host<br>
- the authfile is a simple textfile with the userid in line 1 and
- the password in line 2.<br>
- Example:<br>
- <code>123user45</code><br>
- <code>strenggeheim</code><br>
- It is a good behaviour to protect this data and put the file, for
- example into the /etc directory and set the rights to 440
- (chmod 440 /etc/msgmailauthfile), so that not everyone could see the contents
- of the file. FHEM must have access to this file to read the userid and password.
- <br>
- </li>
- <li><a href="MSGMailmailtype">mailtype</a> plain|html<br>
- Use this attribute to select the contenttype to text/plain or text/html.
- If text/html is selected, valid html code must be provided as content. No checks are applied!
- Per default this attribute is 'plain'</li>
- <li><a href="MSGMailCR">CR</a><br>
- set the option to write a carriage return at the end of the line.
- CR could be set to 0 or 1, 1 enables this feature.
- Per default this attribute is enabled</li>
- <li><a href="#loglevel">loglevel</a></li>
- </ul>
- </ul>
- <p><a name="MYSENSORS"></a>
- <h3>MYSENSORS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MYSENSORS'>DE</a>]</div>
- <ul>
- <p>connects fhem to <a href="http://MYSENSORS.org">MYSENSORS</a>.</p>
- <p>A single MYSENSORS device can serve multiple <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> clients.<br/>
- Each <a href="#MYSENSORS_DEVICE">MYSENSORS_DEVICE</a> represents a mysensors node.<br/>
- <a name="MYSENSORSdefine"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> MYSENSORS <serial device>|<ip:port></code></p>
- <p>Specifies the MYSENSORS device.</p>
- </ul>
- <a name="MYSENSORSset"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <p><code>set <name> connect</code><br/>
- (re-)connects the MYSENSORS-device to the MYSENSORS-gateway</p>
- </li>
- <li>
- <p><code>set <name> disconnect</code><br/>
- disconnects the MYSENSORS-device from the MYSENSORS-gateway</p>
- </li>
- <li>
- <p><code>set <name> inclusion-mode on|off</code><br/>
- turns the gateways inclusion-mode on or off</p>
- </li>
- </ul>
- <a name="MYSENSORSattr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <p><code>att <name> autocreate</code><br/>
- enables auto-creation of MYSENSOR_DEVICE-devices on receival of presentation-messages</p>
- </li>
- <li>
- <p><code>att <name> requestAck</code><br/>
- request acknowledge from nodes.<br/>
- if set the Readings of nodes are updated not before requested acknowledge is received<br/>
- if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).
- May also be configured for individual nodes if not set for gateway.</p>
- </li>
- <li>
- <p><code>att <name> first-sensorid <<number <h; 255>></code><br/>
- configures the lowest node-id assigned to a mysensor-node on request (defaults to 20)</p>
- </li>
- </ul>
- </ul>
- <p><a name="MYSENSORS_DEVICE"></a>
- <h3>MYSENSORS_DEVICE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MYSENSORS_DEVICE'>DE</a>]</div>
- <ul>
- <p>represents a mysensors sensor attached to a mysensor-node</p>
- <p>requires a <a href="#MYSENSOR">MYSENSOR</a>-device as IODev</p>
- <a name="MYSENSORS_DEVICEdefine"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> MYSENSORS_DEVICE <Sensor-type> <node-id></code><br/>
- Specifies the MYSENSOR_DEVICE device.</p>
- </ul>
- <a name="MYSENSORS_DEVICEset"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <p><code>set <name> clear</code><br/>
- clears routing-table of a repeater-node</p>
- </li>
- <li>
- <p><code>set <name> time</code><br/>
- sets time for nodes (that support it)</p>
- </li>
- <li>
- <p><code>set <name> reboot</code><br/>
- reboots a node (requires a bootloader that supports it).<br/>
- Attention: Nodes that run the standard arduino-bootloader will enter a bootloop!<br/>
- Dis- and reconnect the nodes power to restart in this case.</p>
- </li>
- </ul>
- <a name="MYSENSORS_DEVICEattr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <p><code>attr <name> config [<M|I>]</code><br/>
- configures metric (M) or inch (I). Defaults to 'M'</p>
- </li>
- <li>
- <p><code>attr <name> setCommands [<command:reading:value>]*</code><br/>
- configures one or more commands that can be executed by set.<br/>
- e.g.: <code>attr <name> setCommands on:switch_1:on off:switch_1:off</code><br/>
- if list of commands contains both 'on' and 'off' <a href="#setExtensions">set extensions</a> are supported</p>
- </li>
- <li>
- <p><code>attr <name> setReading_<reading> [<value>]*</code><br/>
- configures a reading that can be modified by set-command<br/>
- e.g.: <code>attr <name> setReading_switch_1 on,off</code></p>
- </li>
- <li>
- <p><code>attr <name> mapReading_<reading> <childId> <readingtype> [<value>:<mappedvalue>]*</code><br/>
- configures the reading-name for a given childId and sensortype<br/>
- E.g.: <code>attr xxx mapReading_aussentemperatur 123 temperature</code></p>
- </li>
- <li>
- <p><code>att <name> requestAck</code><br/>
- request acknowledge from nodes.<br/>
- if set the Readings of nodes are updated not before requested acknowledge is received<br/>
- if not set the Readings of nodes are updated immediatly (not awaiting the acknowledge).<br/>
- May also be configured on the gateway for all nodes at once</p>
- </li>
- <li>
- <p><code>attr <name> mapReadingType_<reading> <new reading name> [<value>:<mappedvalue>]*</code><br/>
- configures reading type names that should be used instead of technical names<br/>
- E.g.: <code>attr xxx mapReadingType_LIGHT switch 0:on 1:off</code>
- to be used for mysensor Variabletypes that have no predefined defaults (yet)</p>
- </li>
- </ul>
- </ul>
- <p><a name="MaxScanner"></a>
- <h3>MaxScanner</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MaxScanner'>DE</a>]</div>
- <p>The MaxScanner-Module enables FHEM to capture temperature and valve-position of thermostats in regular intervals. <p/>
- <ul>
- <a name="MaxScannerdefine"></a>
- <b>Define</b>
- <ul>
- <br/>
- <code>define <name> MaxScanner </code>
- <br/>
- </ul>
- <br>
- <a name="MaxScannerset"></a>
- <b>Set-Commands</b>
- <ul>
- <code>set <name> run</code>
- <br/><br/>
- <ul>
- Runs the scanner loop immediately. (Is usually done by timer)
- </ul><br/>
- </ul>
-
- <a name="MaxScannerget"></a>
- <b>Get-Commands</b>
- <ul>
- <code>get <name> associatedDevices</code><br/><br/>
- <ul>Gets the asscociated devices (thermostats, shutterContacts)</ul><br/>
- </ul>
-
- <a name="MaxScannerattr"></a>
- <b>Attributes for the Scanner-Device</b><br/><br/>
-
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><p><b>disable</b><br/>When value=1, then the scanner device is disabled; possible values: 0,1; default: 0</p></li>
- <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>
- <li><p><b>scnMinInterval</b><br/>scan interval in minutes, when the calculated interval is lower,
- then scnMinintervall will be used instead;possible values: 3..60; default: 3</p></li>
- </ul>
- <br/>
-
- <a name="MaxScannerthermoattr"></a>
- <b>User-Attributes for the Thermostat-Device</b><br/>
- <ul>
- <li><p><b>scanTemp</b><br/>When value=1, then scanner will use the thermostat; possible values: 0,1; default: 0</p></li>
- <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>
- <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>
- <li><p><b>scnShutterList</b><br/>comma-separated list of shutterContacts associated with the thermostat</p></li>
- </ul>
- <br/>
-
- <b>Additional information</b><br/><br/>
- <ul>
- <li><a href="http://forum.fhem.de/index.php/topic,11624.0.html">Discussion in FHEM forum</a></li><br/>
- <li><a href="http://www.fhemwiki.de/wiki/MAX!_Temperatur-Scanner">WIKI information in FHEM Wiki</a></li><br/>
- </ul>
- </ul>
- <p><a name="MediaList"></a>
- <h3>MediaList</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MediaList'>DE</a>]</div>
- <ul>
- This module can support you to navigate trough you local connected
- music library. It can compile complex playlists and als an quick playing of
- an selected whole path.
- <br>
- Note: this module needs the following additional modules:<br>
- <ul>
- <li>libmp3-tag-perl</li>
- <li>libjson-xs-perl</li>
- <li>libmp3-info-perl</li>
- <li>libmath-round-perl</li>
- </ul>
- <br>
- <br>
- <a name="MediaList define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> MediaList <RootPath> </code>
- <br><br>
- Defines a new instanze of MediaList. The Rootpath defines your start directory.
- <br>
- Examples:
- <ul>
- <code>define MyMediaList MediaList /media/music</code><br>
- </ul>
- </ul>
- <br>
- <a name="MediaListReadings"></a>
- <b>Readings</b><br>
- <ul>
- <li><b>CurrentDir</b>:your navigated current directory</li>
- <li><b>FolderContent</b>:the folder content of CurrentDir</li>
- <li><b>SelectedItem</b>:the last selected Item from FolderContent</li>
- <li><b>currentdir_playlist</b>:playlist of CurrentDir</li>
- <li><b>currentdir_playlistduration</b>:duration of currentdir_playlist</li>
- <li><b>playlist</b>:your playlist ;)</li>
- <li><b>playlistduration</b>:duration of your playlist</li>
- </ul>
- <br>
- <a name="MediaListset"></a>
- <b>Set</b>
- <ul>
- <li><b>RequestedDirectory</b><br>
- Moving to given relative directory. An record of Reading <i>FolderContent</i> must be used.
- <br>Example:<br>
- <ul>
- <code>set <MyMediaList> RequestedDirectory AbbaMusic</code><br>
- </ul>
- </li>
- <li><b>Play</b><br>
- Submit the Playlist to your defined Targetdevice. You has to select which playlist you want to submit<br>
- <li><b>currentdir</b>: Submit the playlist of current directory, see Reading <i>currentdir_playlist</i></li>
- <li><b>playlist</b>: Submit the real playlist, see Reading <i>playlist</i></li>
- <br>Example:<br>
- <ul>
- <code>set <MyMediaList> Play currentdir</code><br>
- <code>set <MyMediaList> Play playlist</code><br>
- </ul>
- </li>
- <li><b>Playlist_New</b><br>
- Creates an new playlist.
- <br>Example:<br>
- <ul>
- <code>set <MyMediaList> Playlist_New MyNewPlaylist</code><br>
- </ul>
- </li>
- <li><b>Playlist_Add</b><br>
- Add an Track or complete currentdir to your playlist<br>
- <br>Example:
- <ul>
- <code>set <MyMediaList> Playlist_Add 0</code><br>
- Add first Track from Reading <i>currentdir_playlist</i> to your playlist<br>
- <code>set <MyMediaList> Playlist_Add</code><br>
- Add all Tracks from Reading <i>currentdir_playlist</i> to your playlist<br>
- </ul>
- </li>
- <li><b>Playlist_Del</b><br>
- Deletes an Track from your playlist.
- <br>Example:<br>
- <ul>
- <code>set <MyMediaList> Playlist_Del 0</code><br>
- Drops first Track from your Playlist
- </ul>
- </li>
- <li><b>Playlist_Empty</b><br>
- Makes your playlist empty.
- <br>Example:<br>
- <ul>
- <code>set <MyMediaList> Playlist_Empty</code><br>
- </ul>
- </li>
-
- </ul>
- <br>
- <a name="MediaListget"></a>
- <b>Get</b>
- <ul>N/A</ul><br>
- <a name="MediaListattr"></a>
- <b>Attributes</b>
- <ul>
- <li><b>MediaList_PlayerDevice</b><br>
- Definition of your Traget Player Device
- <br>Example:
- <ul>
- <code>attr <MyMediaList> MediaList_PlayerDevice Sonos_LivingRoom</code><br>
- <br>
- </ul>
- </li>
- <li><b>MediaList_PathReplaceFrom</b><br>
- Rewrite the local mediapath to an accessible path by Targetdevice. This Attribut define the FROM pattern.
- <br>Example:
- <ul>
- <code>attr <MyMediaList> MediaList_PathReplaceFrom /media/music/</code><br>
- <br>
- </ul>
- </li>
- <li><b>MediaList_PathReplaceTo</b><br>
- Rewrite the local mediapath to an accessible path by Targetdevice. This Attribut define the TO pattern.
- <br>Example:
- <ul>
- <code>attr <MyMediaList> MediaList_PathReplaceTo \\NAS/music/</code><br>
- <br>
- </ul>
- </li>
- <li><b>MediaList_PathReplaceToPic</b><br>
- Rewrites the local Cover path to an accessible path your Webbrowser, TabletUI. This Attribut define the TO pattern.
- The FROM pattern are defined by <i>MediaList_PathReplaceFrom</i>
- <br>Example:
- <ul>
- <code>attr <MyMediaList> MediaList_PathReplaceToPic https://192.168.1.30/music/</code><br>
- <br>For this example you has to share your music directory via Webserver
- </ul>
- </li>
- <li><b>MediaList_PlayerStartCommand</b><br>
- Definition of the Startcommand for your Targetdevice.
- <br>Example:
- <ul>
- <code>attr <MyMediaList> MediaList_PlayerStartCommand StartPlaylist file:<fullfile></code><br>
- <br> Command to insert the playlist into your Targetdevice ans starts playing. The definition of <i>fullfile</i>
- defines a internal dummy to rewrite it by a real playlistname
- </ul>
- </li>
-
- <li><b>MediaList_CacheFileDir</b><br>
- Definition of your cachefiledir. In this directory the playlist.m3u will be created. In cases of symlinks or
- music-copies, this directory will be used
- <br>Example:
- <ul>
- <code>attr <MyMediaList> MediaList_CacheFileDir /var/lib/mpd/playlists/</code><br>
- <code>attr <MyMediaList> MediaList_CacheFileDir cache/</code><br>
- </ul>
- </li>
- <li><b>MediaList_mkTempCopy</b><br>
- Definition if you want a playlist with remote files or local accessible files.<br>
- In case of using an sonos device, an remote file based playlist is sufficient.<br>
- In case of using an MPD, local files in MPD music directory must be used
- <br>Example:
- <ul>
- <code>attr <MyMediaList> MediaList_mkTempCopy none</code><br>
- In case of an Sonos Device<br>
- <code>attr <MyMediaList> MediaList_mkTempCopy symlink</code><br>
- In case of an MPD Device
- </ul>
- </li>
- </ul>
- </ul>
- <p><a name="MilightBridge"></a>
- <h3>MilightBridge</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MilightBridge'>DE</a>]</div>
- <ul>
- <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>
- <p>The Milight system is sold under various brands around the world including "LimitlessLED, EasyBulb, AppLamp"</p>
- <p>The API documentation is available here: <a href="http://www.limitlessled.com/dev/">http://www.limitlessled.com/dev/</a></p>
- <a name="MilightBridge_define"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> MilightBridge <host/ip:port></code></p>
- <p>Specifies the MilightBridge device.<br/>
- <host/ip> 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>
- </ul>
- <a name="MilightBridge_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- <b>state</b><br/>
- [Initialized|ok|unreachable]: Shows reachable status of bridge using "ping" check every 10 (checkInterval) seconds.
- </li>
- <li>
- <b>sendFail</b><br/>
- 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.
- </li>
- <li>
- <b>slot[0|1|2|3|4|5|6|7|8]</b><br/>
- 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.
- </li>
- </ul>
- <a name="MilightBridge_attr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <b>sendInterval</b><br/>
- Default: 100ms. The bridge has a minimum send delay of 100ms between commands.
- </li>
- <li>
- <b>checkInterval</b><br/>
- Default: 10s. Time after the bridge connection is re-checked.<br>
- If this is set to 0 checking is disabled and state = "Initialized".
- </li>
- <li>
- <b>protocol</b><br/>
- Default: udp. Change to tcp if you have enabled tcp mode on your bridge.
- </li>
- <li>
- <b>tcpPing</b><br/>
- If this attribute is defined, ping will use TCP instead of UDP.
- </li>
- </ul>
- </ul>
- <p><a name="MilightDevice"></a>
- <h3>MilightDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#MilightDevice'>DE</a>]</div>
- <ul>
- <p>This module represents a Milight LED Bulb or LED strip controller. It is controlled by a <a href="#MilightBridge">MilightBridge</a>.</p>
- <p>The Milight system is sold under various brands around the world including "LimitlessLED, EasyBulb, AppLamp"</p>
- <p>The API documentation is available here: <a href="http://www.limitlessled.com/dev/">http://www.limitlessled.com/dev/</a></p>
- <p>Requires perl module Math::Round</p>
- <a name="MilightDevice_define"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> MilightDevice <devType(RGB|RGBW|White)> <IODev> <slot></code></p>
- <p>Specifies the Milight device.<br/>
- <devType> One of RGB, RGBW, White depending on your device.<br/>
- <IODev> The <a href="#MilightBridge">MilightBridge</a> which the device is paired with.<br/>
- <slot> The slot on the <a href="#MilightBridge">MilightBridge</a> that the device is paired with or 'A' to group all slots.</p>
- </ul>
- <a name="MilightDevice_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- <b>state</b><br/>
- [on xxx|off|night]: Current state of the device / night mode (xxx = 0-100%).
- </li>
- <li>
- <b>brightness</b><br/>
- [0-100]: Current brightness level in %.
- </li>
- <li>
- <b>brightness_on</b><br/>
- [0-100]: The brightness level before the off command was sent. This allows the light to turn back on to the last brightness level.
- </li>
- <li>
- <b>rgb</b><br/>
- [FFFFFF]: HEX value for RGB.
- </li>
- <li>
- <b>previousState</b><br/>
- [hsv]: hsv value before last change. Can be used with <b>restorePreviousState</b> set command.
- </li>
- <li>
- <b>savedState</b><br/>
- [hsv]: hsv value that was saved using <b>saveState</b> set function
- </li>
- <li>
- <b>hue</b><br/>
- [0-360]: Current hue value.
- </li>
- <li>
- <b>saturation</b><br/>
- [0-100]: Current saturation value.
- </li>
- <li>
- <b>transitionInProgress</b><br/>
- [0|1]: Set to 1 if a transition is currently in progress for this device (eg. fade).
- </li>
- <li>
- <b>discoMode</b><br/>
- [0|1]: 1 if discoMode is enabled, 0 otherwise.
- </li>
- <li>
- <b>discoSpeed</b><br/>
- [0|1]: 1 if discoSpeed is increased, 0 if decreased. Does not mean much for RGBW
- </li>
- <li>
- <b>lastPreset</b><br/>
- [0..X]: Last selected preset.
- </li>
- <li>
- <b>ct</b><br/>
- [1-10]: Current colour temperature (3000=Warm,6500=Cold) for White devices.
- </li>
- </ul>
- <a name="MilightDevice_set"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <b>on <ramp_time (seconds)></b>
- </li>
- <li>
- <b>off <ramp_time (seconds)></b>
- </li>
- <li>
- <b>toggle</b>
- </li>
- <li>
- <b>night</b>
- </li>
- <li>
- <b>dim <percent(0..100)> [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
- Will be replaced by <i>brightness</i> at some point
- </li>
- <li>
- <b>dimup <percent change(0..100)> [seconds(0..x)]</b><br/>
- Special case: If percent change=100, seconds will be adjusted for actual change to go from current brightness.
- </li>
- <li>
- <b>dimdown <percent change(0..100)> [seconds(0..x)]</b><br/>
- Special case: If percent change=100, seconds will be adjusted for actual change to go from current brightness.
- </li>
- <li>
- <b>pair</b><br/>
- May not work properly. Sometimes it is necessary to use a remote to clear pairing first.
- </li>
- <li>
- <b>unpair</b><br/>
- May not work properly. Sometimes it is necessary to use a remote to clear pairing first.
- </li>
- <li>
- <b>restorePreviousState</b><br/>
- Set device to previous hsv state as stored in <b>previousState</b> reading.
- </li>
- <li>
- <b>saveState</b><br/>
- Save current hsv state to <b>savedState</b> reading.
- </li>
- <li>
- <b>restoreState</b><br/>
- Set device to saved hsv state as stored in <b>savedState</b> reading.
- </li>
- <li>
- <b>preset (0..X|+)</b><br/>
- Load preset (+ for next preset).
- </li>
- <li>
- <b>hsv <h(0..360)>,<s(0..100)>,<v(0..100)> [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
- Set hsv value directly
- </li>
- <li>
- <b>rgb RRGGBB [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
- Set rgb value directly or using colorpicker.
- </li>
- <li>
- <b>hue <(0..360)> [seconds(0..x)] [flags(l=long path|q=don't clear queue)]</b><br/>
- Set hue value.
- </li>
- <li>
- <b>saturation <s(0..100)> [seconds(0..x)] [flags(q=don't clear queue)]</b><br/>
- Set saturation value directly
- </li>
- <li>
- <b>discoModeUp</b><br/>
- Next disco Mode setting (for RGB and RGBW).
- </li>
- <li>
- <b>discoModeDown</b><br/>
- Previous disco Mode setting (for RGB).
- </li>
- <li>
- <b>discoSpeedUp</b><br/>
- Increase speed of disco mode (for RGB and RGBW).
- </li>
- <li>
- <b>discoSpeedDown</b><br/>
- Decrease speed of disco mode (for RGB and RGBW).
- </li>
- <li>
- <b>ct <3000-6500></b><br/>
- Colour temperature 3000=Warm White,6500=Cold White (10 steps) (for White devices only).
- </li>
- <li>
- <a href="#setExtensions"> set extensions</a> are supported.
- </li>
- </ul>
- <a name="MilightDevice_get"></a>
- <p><b>Get</b></p>
- <ul>
- <li>
- <b>rgb</b>
- </li>
- <li>
- <b>hsv</b>
- </li>
- </ul>
-
- <a name="MilightDevice_attr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <b>dimStep</b><br/>
- Allows you to modify the default dimStep if required.
- </li>
- <li>
- <b>defaultRampOn</b><br/>
- Set the default ramp time if not specified for on command.
- </li>
- <li>
- <b>defaultRampOff</b><br/>
- Set the default ramp time if not specified for off command.
- </li>
- <li>
- <b>presets</b><br/>
- List of hsv presets separated by spaces (eg 0,0,100 9,0,50).
- </li>
- <li>
- <b>colorCast</b><br/>
- Color shift values for red,yellow,green,cyan,blue,magenta (-29..29) for HSV color correction (eg 0,5,10,-5,0,0)
- </li>
- <li>
- <b>gamma</b><br/>
- Set gamma correction value for device (eg 0.8)
- </li>
- <li>
- <b>dimOffWhite</b><br/>
- Use a different switching logic for White bulbs to better handle packet loss.
- </li>
- <li>
- <b>updateGroupDevices</b><br/>
- Update the state of single devices switched with slot 'A'.
- </li>
- <li>
- <b>restoreAtStart</b><br/>
- Restore the state of devices at startup. Default 0 for slot 'A', 1 otherwise.
- </li>
- <li>
- <b>defaultBrightness</b><br/>
- Set the default brightness if not known. (Default: 36)
- </li>
- </ul>
- </ul>
- <p><a name="Modbus"></a>
- <h3>Modbus</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Modbus'>DE</a>]</div>
- <ul>
- Modbus defines a physical modbus interface and functions to be called from other logical modules / devices.
- This low level module takes care of the communication with modbus devices and provides Get, Set and cyclic polling
- of Readings as well as formatting and input validation functions.
- 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.
- <br>
- 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.
- It defines read / write functions for Modbus holding registers, input registers, coils and discrete inputs.
- <br><br>
-
- <b>Prerequisites</b>
- <ul>
- <li>
- This module requires the Device::SerialPort or Win32::SerialPort module.
- </li>
- </ul>
- <br>
- <a name="ModbusDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Modbus <device> </code>
- <br><br>
- 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.
- <br>
- Example:<br>
- <br>
- <ul><code>define ModBusLine Modbus /dev/ttyUSB1@9600</code></ul>
- <br>
- In this example the module opens the given serial interface and other logical modules can access several Modbus devices connected to this bus concurrently.
- 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.:
- <br>
- <ul><code>define ModBusLine Modbus /dev/ttyUSB2@38400,8,E,2</code></ul>
- <br>
- </ul>
- <br>
- <a name="ModbusSet"></a>
- <b>Set-Commands</b><br>
- <ul>
- this low level device module doesn't provide set commands for itself but implements set
- for logical device modules that make use of this module. See ModbusAttr for example.
- </ul>
- <br>
- <a name="ModbusGet"></a>
- <b>Get-Commands</b><br>
- <ul>
- this low level device module doesn't provide get commands for itself but implements get
- for logical device modules that make use of this module.
- </ul>
- <br>
- <a name="ModbusAttr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <li><b>queueDelay</b></li>
- modify the delay used when sending requests to the device from the internal queue, defaults to 1 second <br>
- <li><b>busDelay</b></li>
- 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>
- <li><b>clientSwitchDelay</b></li>
- 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>
- <li><b>dropQueueDoubles</b></li>
- prevents new request to be queued if the same request is already in the send queue<br>
- <li><b>skipGarbage</b></li>
- 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>
- For Modbus ASCII it skips bytes until the expected starting byte ":" is seen.
- <li><b>profileInterval</b></li>
- if set to something non zero it is the time period in seconds for which the module will create bus usage statistics.
- 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>
- The bus usage statistics create the following readings:
- <ul>
- <li><b>Profiler_Delay_sum</b></li>
- seconds used as delays to implement the defined sendDelay and commDelay
- <li><b>Profiler_Fhem_sum</b></li>
- seconds spend processing in the module
- <li><b>Profiler_Idle_sum</b></li>
- idle time
- <li><b>Profiler_Read_sum</b></li>
- seconds spent reading and validating the data read
- <li><b>Profiler_Send_sum</b></li>
- seconds spent preparing and sending data
- <li><b>Profiler_Wait_sum</b></li>
- seconds waiting for a response to a request
- <li><b>Statistics_Requests</b></li>
- number of requests sent
- <li><b>Statistics_Timeouts</b></li>
- timeouts encountered
- </ul>
- </ul>
- <br>
- </ul>
- <p><a name="ModbusAttr"></a>
- <h3>ModbusAttr</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ModbusAttr'>DE</a>]</div>
- <ul>
- 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.
- <br><br>
- <b>Prerequisites</b>
- <ul>
- <li>
- 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.
- </li>
- </ul>
- <br>
- <a name="ModbusAttrDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ModbusAttr <Id> <Interval></code><br>
- or<br>
- <code>define <name> ModbusAttr <Id> <Interval> <Address:Port> <RTU|ASCII|TCP></code><br>
- <br>
- The module connects to the Modbus device with Modbus Id <Id> 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 <Interval> seconds <br>
- <br>
- Examples:<br>
- <br>
- <ul><code>define WP ModbusAttr 1 60</code></ul><br>
- to go through a serial interface managed by an already defined basic modbus device. The protocol defaults to Modbus RTU<br>
- or <br>
- <ul><code>define WP ModbusAttr 20 0 ASCII</code></ul><br>
- 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>
- or <br>
- <ul><code>define WP ModbusAttr 5 60 192.168.1.122:504 TCP</code></ul><br>
- to talk Modbus TCP <br>
- or <br>
- <ul><code>define WP ModbusAttr 3 60 192.168.1.122:8000 RTU</code></ul><br>
- to talk Modbus RTU over TCP<br>
- </ul>
- <br>
- <a name="ModbusAttrConfiguration"></a>
- <b>Configuration of the module</b><br><br>
- <ul>
- The data objects (holding registers, input registers, coils or discrete inputs) of the device to be queried are defined using attributes.
- The attributes assign objects with their address to readings inside fhem and control
- how these readings are calculated from the raw values and how they are formatted.<br>
- Objects can also be written to the device and attributes define how this is done.<br><br>
-
- Example:<br>
- <pre>
- define PWP ModbusAttr 5 30
- attr PWP obj-h256-reading Temp_Wasser_ein
- attr PWP obj-h256-expr $val/10
- attr PWP obj-h258-reading Temp_Wasser_Aus
- attr PWP obj-h258-expr $val/10
- attr PWP obj-h262-reading Temp_Luft
- attr PWP obj-h262-expr $val / 10
- attr PWP obj-h770-reading Temp_Soll
- attr PWP obj-h770-expr $val / 10
- attr PWP obj-h770-set 1
- attr PWP obj-h770-setexpr $val * 10
- attr PWP obj-h770-max 32
- attr PWP obj-h770-min 10
- attr PWP obj-h770-hint 8,10,20,25,28,29,30,30.5,31,31.5,32
- attr PWP dev-h-combine 5
- attr PWP dev-h-defPoll 1
- attr PWP room Pool-WP
- attr PWP stateFormat {sprintf("%.1f Grad", ReadingsVal($name,"Temp_Wasser_Ein",0))}
- attr PWP webCmd Temp_Soll
- </pre>
-
- Attributes to define data objects start with obj- followed by a code that identifies the type and address
- of the data object. <br>
-
- Modbus devices offer the following types of data objects:
- <ul>
- <li> holding registers (16 bit objects that can be read and written)</li>
- <li> input registers (16 bit objects that can only be read)</li>
- <li> coils (single bit objects that can be read and written)</li>
- <li> discrete inputs (single bit objects that can only be read)</li>
- </ul>
- <br>
-
- The module uses the first character of these data object types to define attributes.
- Thus h770 refers to a holding register with the decimal address 770 and c120 refers to a coil with address 120.
- The address has to be specified as pure decimal number. The address counting starts at address 0<br><br>
-
- <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>
- 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.
- 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>
-
- An object attribute ending on <code>-set</code> creates a fhem set option.
- 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>
- The object attributes ending on <code>-min</code> and <code>-max</code> define min and max values for input validation
- 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>
-
- To define general properties of the device you can specify attributes starting with <code>dev-</code>.
- E.g. with <code>dev-timing-timeout</code> you can specify the timeout when waiting for a response from the device.
- With <code>dev-h-</code> you can specify several default values or general settings for all holding registers
- like the function code to be used when reading or writing holding registers.
- These attributes are optional and the module will use defaults that work in most cases. <br>
- <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.
- Without setting this attribute the module will start individual read requests for each object.
- 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.
- </ul>
- <a name="ModbusAttrSet"></a>
- <b>Set-Commands</b><br>
- <ul>
- are created based on the attributes defining the data objects.<br>
- Every object for which an attribute like <code>obj-xy-set</code> is set to 1 will create a valid set option.<br>
- 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).
- <ul>
- <li><code>interval <Interval></code></li>
- modifies the interval that was set during define.
- <li><code>stop</code></li>
- stops the interval timer that is used to automatically poll objects through modbus.
- <li><code>start</code></li>
- 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 <mydevice> stop</code> then you can start it again with <code>set <mydevice> start</code>.
- <li><code>reread</code></li>
- causes a read of all objects that are set to be polled in the defined interval. The interval timer is not modified.
- <br>
- <li><code>scanModbusObjects <startObj> - <endObj> <reqLen></code></li>
- 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
- holding registers with addresses between 100 and 120. <br>
- <code>set MyModbusAttrDevice scanModbusObjects h100-120</code><br>
- For each reply it gets, the module creates a reading like<br>
- <code>scan-h100 hex=0021, string=.!, s=8448, s>=33, S=8448, S>=33</code><br>
- the representation of the result as hex is 0021 and
- the ASCII representation is .!. s, s>, S and S> are different representations with their Perl pack-code.
- <li><code>scanModbusIds <startId> - <endId> <knownObj></code></li>
- scans for Modbus Ids on an RS485 Bus. The following set command for example starts a scan:<br>
- <code>set Device scanModbusId 1-7 h770</code><br>
- since many modbus devices don't reply at all if an object is requested that does not exist, scanModbusId
- needs the adress of an object that is known to exist.
- If a device with Id 5 replies to a read request for holding register 770, a reading like the following will be created:<br>
- <code>scanId-5-Response-h770 hex=0064, string=.d, s=25600, s>=100, S=25600, S>=100</code>
- <li><code>scanStop</code></li>
- stops any running scans.
- <li><code>saveAsModule <name></code></li>
- experimental: saves the definitions of obj- and dev- attributes in a new fhem module file as /tmp/98_ModbusGen<name>.pm.<br>
- 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
- as ModbusAttr with all the attributes to define objects, you can just define a device of the new type ModbusGen<name> and all the
- objects will be there by default. However all definitions can still be changed / overriden with the attribues defined in ModbusAttr if needed.
- </ul>
- </ul>
- <br>
- <a name="ModbusAttrGet"></a>
- <b>Get-Commands</b><br>
- <ul>
- 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 right field value.
- 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.
- </ul>
- <br>
- <a name="ModbusAttrattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <li><b>alignTime</b></li>
- 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)
- <li><b>enableControlSet</b></li>
- enables the built in set commands like interval, stop, start and reread (see above)
- <br>
-
- please also notice the attributes for the physical modbus interface as documented in 98_Modbus.pm
- <br>
-
- the following list of attributes can be applied to any data object by specifying the objects type and address in the variable part.
- 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
- (e.g. obj-len) which then applies as default for all objects:
- <li><b>obj-[cdih][1-9][0-9]*-reading</b></li>
- 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).
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-name</b></li>
- defines an optional internal name of this data object (this has no meaning for fhem and serves mainly documentation purposes.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-set</b></li>
- 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.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-min</b></li>
- defines a lower limit to the value that can be written to this data object. This ist just used for input validation.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-max</b></li>
- defines an upper limit to the value that can be written to this data object. This ist just used for input validation.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-hint</b></li>
- this is used for set options and tells fhemweb what selection to display for the set option (list or slider etc.)
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-expr</b></li>
- defines a perl expression that converts the raw value read from the device.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-ignoreExpr</b></li>
- defines a perl expression that returns 1 if a value should be ignored and the existing reading should not be modified
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-map</b></li>
- defines a map to convert values read from the device to more convenient values when the raw value is read from the device
- or back when the value to write has to be converted from the user value to a raw value that can be written.
- Example: 0:mittig, 1:oberhalb, 2:unterhalb
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-setexpr</b></li>
- defines a perl expression that converts the user specified value in a set to a raw value that can be sent to the device.
- This is typically the inversion of -expr above.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-format</b></li>
- defines a format string to format the value read e.g. %.1f
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-len</b></li>
- defines the length of the data object in registers. It defaults to 1.
- Some devices store 32 bit floating point values in two registers. In this case you should set this attribute to two.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-unpack</b></li>
- defines the unpack code to convert the raw data string read from the device to a reading.
- For an unsigned integer in big endian format this would be "n",
- for a signed 16 bit integer in big endian format this would be "s>"
- and for a 32 bit big endian float value this would be "f>". (see the perl documentation of the pack function).<br>
- 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>
- For a 32 bit float len should be at least 2.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-revRegs</b></li>
- this is only applicable to objects that span several input registers or holding registers. <br>
- when they are read then the order of the registers will be reversed before
- further interpretation / unpacking of the raw register string. The same happens before the object is written with a set command.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-bswapRegs</b></li>
- this is applicable to objects that span several input or holding registers. <br>
- 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.
- This functionality is most likely used for reading (ASCII) strings from the device that are stored as big-endian 16-bit values. <br>
- example: original reading is "324d3130203a57577361657320722020". After applying bswapRegs, the value will be "4d3230313a2057576173736572202020"
- which will result in the ASCII string "M201: WWasser ". Should be used with "(a*)" as -unpack value.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-decode</b></li>
- 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.
- This can be used if the device delivers strings in an encoding like cp850 instead of utf8.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-encode</b></li>
- 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.
- 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.
- <br>
- <li><b>obj-[ih][1-9][0-9]*-type</b></li>
- defines that this object has a user defined data type. Data types can be defined using the dev-type- attribues.<br>
- 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
- use this definition for each object as e.g. obj-h1234-type VT_R4<br>
- example:<br>
- <pre>
- attr WP dev-type-VT_R4-format %.1f
- attr WP dev-type-VT_R4-len 2
- attr WP dev-type-VT_R4-revRegs 1
- attr WP dev-type-VT_R4-unpack f>
-
- attr WP obj-h1234-reading Temp_Ist
- attr WP obj-h1234-type VT_R4
- </pre>
- <br>
-
- <li><b>obj-[cdih][1-9][0-9]*-showGet</b></li>
- every reading can also be requested by a get command. However these get commands are not automatically offered in fhemweb.
- By specifying this attribute, the get will be visible in fhemweb.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-poll</b></li>
- if set to 1 then this obeject is included in the cyclic update request as specified in the define command.
- If not set, then the object can manually be requested with a get command, but it is not automatically updated each interval.
- Note that this setting can also be specified as default for all objects with the dev- atributes described later.
- <br>
- <li><b>obj-[cdih][1-9][0-9]*-polldelay</b></li>
- this 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>
- 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 additional 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.
- <br>
- <br>
- <li><b>dev-([cdih]-)*read</b></li>
- specifies the function code to use for reading this type of object.
- The default is 3 for holding registers, 1 for coils, 2 for discrete inputs and 4 for input registers.
- <br>
- <li><b>dev-([cdih]-)*write</b></li>
- specifies the function code to use for writing this type of object.
- The default is 6 for holding registers and 5 for coils. Discrete inputs and input registers can not be written by definition.
- <br>
- <li><b>dev-([cdih]-)*combine</b></li>
- defines how many adjacent objects can be read in one request. If not specified, the default is 1
- <br>
- <li><b>dev-([cdih]-)*defLen</b></li>
- defines the default length for this object type. If not specified, the default is 1
- <br>
- <li><b>dev-([cdih]-)*defFormat</b></li>
- defines a default format string to use for this object type in a sprintf function on the values read from the device.
- <br>
- <li><b>dev-([cdih]-)*defExpr</b></li>
- defines a default Perl expression to use for this object type to convert raw values read.
- <br>
- <li><b>dev-([cdih]-)*defIgnoreExpr</b></li>
- defines a default Perl expression to decide when values should be ignored.
- <br>
- <li><b>dev-([cdih]-)*defUnpack</b></li>
- defines the default unpack code for this object type.
- <br>
- <li><b>dev-([cdih]-)*defRevRegs</b></li>
- defines that the order of registers for objects that span several registers will be reversed before
- further interpretation / unpacking of the raw register string
- <br>
- <li><b>dev-([cdih]-)*defBswapRegs</b></li>
- per device default for swapping the bytes in Registers (see obj-bswapRegs above)
- <br>
- <li><b>dev-([cdih]-)*defDecode</b></li>
- defines a default for decoding the strings read from a different character set e.g. cp850
- <br>
- <li><b>dev-([cdih]-)*defEncode</b></li>
- defines a default for encoding the strings read (or after decoding from a different character set) e.g. utf8
- <br>
- <li><b>dev-([cdih]-)*defPoll</b></li>
- if set to 1 then all objects of this type will be included in the cyclic update by default.
- <br>
- <li><b>dev-([cdih]-)*defShowGet</b></li>
- if set to 1 then all objects of this type will have a visible get by default.
- <br>
-
- <li><b>dev-type-XYZ-unpack, -len, -encode, -decode, -revRegs, -bswapRegs, -format, -expr, -map</b></li>
- 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.
- use obj-h123-type XYZ to assign this type to an object.
- <br>
-
- <li><b>dev-([cdih]-)*allowShortResponses</b></li>
- if set to 1 the module will accept a response with valid checksum but data lengh < lengh in header
- <br>
- <li><b>dev-h-brokenFC3</b></li>
- if set to 1 the module will change the parsing of function code 3 and 4 responses for devices that
- send the register address instead of the length in the response
- <br>
- <li><b>dev-c-brokenFC5</b></li>
- if set the module will use the hex value specified here instead of ff00 as value 1 for setting coils
- <br>
- <li><b>dev-timing-timeout</b></li>
- timeout for the device (defaults to 2 seconds)
- <br>
- <li><b>dev-timing-sendDelay</b></li>
- delay to enforce between sending two requests to the device. Default ist 0.1 seconds.
- <br>
- <li><b>dev-timing-commDelay</b></li>
- delay between the last read and a next request. Default ist 0.1 seconds.
- <br>
- <li><b>queueMax</b></li>
- max length of the send queue, defaults to 100
- <br>
- <li><b>nextOpenDelay</b></li>
- 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.
- <li><b>openTimeout</b></li>
- timeout to be used when opening a Modbus TCP connection (defaults to 3)
- <li><b>timeoutLogLevel</b></li>
- log level that is used when logging a timeout. Defaults to 3.
- <li><b>silentReconnect</b></li>
- if set to 1, then it will set the loglevel for "disconnected" and "reappeared" messages to 4 instead of 3
- <li><b>maxTimeoutsToReconnect</b></li>
- 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.
- <li><b>nonPrioritizedSet</b></li>
- 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.
- <li><b>sortUpdate</b></li>
- if set to 1, the requests during a getUpdate cycle will be sorted before queued.
-
- <li><b>disable</b></li>
- stop communication with the device while this attribute is set to 1. For Modbus over TCP this also closes the TCP connection.
- <br>
- </ul>
- <br>
- </ul>
- <p><a name="ModbusSET"></a>
- <h3>ModbusSET</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ModbusSET'>DE</a>]</div>
- <ul>
- ModbusSET uses the low level Modbus module to provide a way to communicate with Silent 10 heat pumps from SET.
- It probably works with other heat pumps from SET as well and since the control device used in these heat pumps
- is an iChill IC121 from Dixell, it could even work for other heat pumps with this controller as well or with few
- changes. It defines the modbus holding registers for the temperature sensors and reads them in a defined interval.
-
- <br>
- <b>Prerequisites</b>
- <ul>
- <li>
- This module requires the basic Modbus module which itsef requires Device::SerialPort or Win32::SerialPort module.
- </li>
- </ul>
- <br>
- <a name="ModbusSETDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ModbusSET <Id> <Interval></code>
- <br><br>
- The module connects to the heat pump with Modbus Id <Id> through an already defined modbus device and actively requests data from the heat pump every <Interval> seconds <br>
- <br>
- Example:<br>
- <br>
- <ul><code>define WP ModbusSET 1 60</code></ul>
- </ul>
- <br>
- <a name="ModbusSETConfiguration"></a>
- <b>Configuration of the module</b><br><br>
- <ul>
- apart from the modbus id and the interval which both are specified in the define command there is nothing that needs to be defined.
- However there are some attributes that can optionally be used to modify the behavior of the module. <br><br>
-
- The attributes that control which messages are sent / which data is requested every <Interval> seconds are:
- <pre>
- poll-Hyst_Mode
- poll-Temp_Luft
- poll-Temp_Wasser_Aus_Off
- poll-Temp_Wasser_Ein_Off
- poll-Temp_Wasser_Aus
- poll-Hysterese
- poll-Temp_Wasser_Ein
- poll-Temp_Soll
- poll-Temp_Luft_Off
- poll-Temp_Verdampfer
- poll-Temp_Verdampfer_Off
- </pre>
-
- if the attribute is set to 1, the corresponding data is requested every <Interval> seconds. If it is set to 0, then the data is not requested.
- by default the temperatures are requested if no attributes are set.<br>
- if some readings should be polled, but less frequently than the normal interval, you can specify a pollDelay-
- Attribute for the reading. <br>
- 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>
- 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.
- <br><br>
- Example:
- <pre>
- define WP ModbusSET 1 60
- attr WP poll-Temp_Soll 0
- attr WP pollDelay-Hysterese 300
- </pre>
- </ul>
- <a name="ModbusSETSet"></a>
- <b>Set-Commands</b><br>
- <ul>
- The following set options are available:
- <pre>
- Hysterese (defines the hysterese in Kelvin)
- Hyst_Mode (defines the interpretation of hysterese for the heating and can be set to mittig, oberhalb or unterhalb)
- Temp_Wasser_Aus_Off (offset of sensor in Kelvin - used to kalibrate)
- Temp_Wasser_Ein_Off (offset of sensor in Kelvin - used to kalibrate)
- Temp_Luft_Off (offset of sensor in Kelvin - used to kalibrate)
- Temp_Verdampfer_Off (offset of sensor in Kelvin - used to kalibrate)
- Temp_Soll (target temperature of the heating pump)
- </pre>
- </ul>
- <br>
- <a name="ModbusSETGet"></a>
- <b>Get-Commands</b><br>
- <ul>
- 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 right field value. To avoid huge option lists in FHEMWEB, only the most important Get options
- 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
- 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
- </ul>
- <br>
- <a name="ModbusSETattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br>
- <li><b>poll-Hyst_Mode</b></li>
- <li><b>poll-Temp_Luft</b></li>
- <li><b>poll-Temp_Wasser_Aus_Off</b></li>
- <li><b>poll-Temp_Wasser_Ein_Off</b></li>
- <li><b>poll-Temp_Wasser_Aus</b></li>
- <li><b>poll-Hysterese</b></li>
- <li><b>poll-Temp_Wasser_Ein</b></li>
- <li><b>poll-Temp_Soll</b></li>
- <li><b>poll-Temp_Luft_Off</b></li>
- <li><b>poll-Temp_Verdampfer</b></li>
- <li><b>poll-Temp_Verdampfer_Off</b></li>
- include a read request for the corresponding registers when sending requests every interval seconds <br>
- <li><b>pollDelay-*</b></li>
- set a delay for polling individual Readings. In case some readings should be polled less frequently than the
- normal delay specified during define. Specifying a pollDelay will not create an individual timer for
- polling this reading but check if the delay is over when the normal update interval is handled.<br>
- 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>
- 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.
- <li><b>dev-timing-timeout</b></li>
- set the timeout for reads, defaults to 2 seconds <br>
- <li><b>dev-timing-minSendDelay</b></li>
- minimal delay between two requests sent to this device
- <li><b>dev-timing-minCommDelay</b></li>
- minimal delay between requests or receptions to/from this device
- </ul>
- <br>
- </ul>
- <p><a name="ModbusTrovis5576"></a>
- <h3>ModbusTrovis5576</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ModbusTrovis5576'>DE</a>]</div>
- <ul>
- ModbusTrovis5576 uses the low level Modbus module to provide a way to communicate with the Samson Trovis 5576 Heating Management.
- It defines the modbus holding registers for the different values and reads them in a defined interval.
- <br /><br />
- <b>Prerequisites</b>
- <ul>
- <b>This module requires the basic <a href="#Modbus">Modbus</a> module which itsef requires Device::SerialPort or Win32::SerialPort module.</b>
- </ul><br />
-
- <b>Hardware Connection</b>
- <ul>
- 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 />
- Only the usual pins for serial communication (TD, RD and Ground) are needed.
- </ul><br />
-
- <b>Special meanings with Readings and the Heating Management System</b>
- <ul>
- 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 />
- If you want to switch back to autonomous mode you can set the appropriate Ebenen-Bit to "Autark".<br /><br />
-
- 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 />
- <b>Suggestion:</b><br />
- 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.
- </ul><br />
-
- <a name="ModbusTrovis5576Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ModbusTrovis5576 <ID> <Interval></code><br /><br />
- The module connects to the Samson Trovis 5576 Heating Management with the Modbus Id <ID> through an already defined Modbus device and actively requests data from the system every <Interval> seconds.<br /><br />
- Example:<br>
- <code>define heizung ModbusTrovis5576 255 60</code>
- </ul><br />
- <a name="ModbusTrovis5576Set"></a>
- <b>Set-Commands</b>
- <ul>
- The following set options are available:
- <ul>
- <li>Regelkreis 1 (Usually Wallmounted-Heatings):<ul>
- <li><b>RK1_Betriebsart</b>: Operating mode of Regelkreis 1. Possible values are Standby, Mond or Sonne.</li>
- <li><b>RK1_Betriebsart_EBN</b>: The Ebenen-Bit according to the Operating Mode. Possible values are GLT or Autark.</li>
- <li><b>RK1_Stellsignal</b>: The percent value of opening of the heat transportation valve.</li>
- <li><b>RK1_Stellsignal_EBN</b>: The Ebenen-Bit according to the heat transportation valve. Possible values are GLT or Autark.</li>
- <li><b>RK1_Umwaelzpumpe</b>: The on/off state of thr circulation pump. Possible values are An or Aus.</li>
- <li><b>RK1_Umwaelzpumpe_EBN</b>: The Ebenen-Bit according to the circulation pump. Possible values are GLT or Autark.</li>
- </ul></li>
-
- <li>Regelkreis 2 (Usually Floor Heating System):<ul>
- <li><b>RK2_Betriebsart</b>: Operating mode of Regelkreis 2. Possible values are Standby, Mond or Sonne.</li>
- <li><b>RK2_Betriebsart_EBN</b>: The Ebenen-Bit according to the Operating Mode. Possible values are GLT or Autark.</li>
- <li><b>RK2_Stellsignal</b>: The percent value of opening of the heat transportation valve.</li>
- <li><b>RK2_Stellsignal_EBN</b>: The Ebenen-Bit according to the heat transportation valve. Possible values are GLT or Autark.</li>
- <li><b>RK2_Umwaelzpumpe</b>: The on/off state of the circulation pump. Possible values are An or Aus.</li>
- <li><b>RK2_Umwaelzpumpe_EBN</b>: The Ebenen-Bit according to the circulation pump. Possible values are GLT or Autark.</li>
- </ul></li>
-
- <li>Drinkable Water Reservoir:<ul>
- <li><b>Wasser_Betriebsart</b>: Operating mode of the drinkable water system. Possible values are Standby, Mond or Sonne.</li>
- <li><b>Wasser_Betriebsart_EBN</b>: The Ebenen-Bit according to the Operating Mode. Possible values are GLT or Autark.</li>
- <li><b>Wasser_Speicherladepumpe</b>: The on/off state of the reservoir loading pump. Possible values are An or Aus.</li>
- <li><b>Wasser_Speicherladepumpe_EBN</b>: The Ebenen-Bit according to the Speicherladepumpe. Possible values are GLT or Autark.</li>
- <li><b>Wasser_Zirkulationspumpe</b>: The on/off state of the circular pump. Possible values are An or Aus.</li>
- <li><b>Wasser_Zirkulationspumpe_EBN</b>: The Ebenen-Bit according to the circular pump. Possible values are GLT or Autark.</li>
- <li><b>Wasser_ThermischeDesinfektion</b>: On/off state of the thermal disinfection. Possible values are An or Aus.</li>
- <li><b>Wasser_Temp_Soll</b>: The desired temperature for the drinkabke water reservoir.</li>
- <li><b>Wasser_Temp_Minimum</b>: The lowest temperature for the drinkable water reservoir.</li>
- <li><b>Wasser_Temp_Desinfektion</b>: The desired temperature of the thermal disinfection system.</li>
- </ul></li>
- </ul><br />
- All other Readings (along with their Meanings) which can only be read:<br />
- <ul>
- <li>Common Data:<ul>
- <li><b>Modellnummer</b>: Shows the modelnumber. Should be "5576".</li>
- <li><b>Aussen_Temp</b>: Shows the currently measured outside temperature in °C.</li>
- <li><b>Fehlerstatusregister_CL1</b>: Shows the current status register (CL1).</li>
- </ul></li>
-
- <li>Regelkreis 1 (Usually Wallmounted-Heatings):<ul>
- <li><b>RK1_Schalter</b>: Represent the current value of the rotary switch. Possible values are PA, Auto, Standby, Hand, Sonne or Mond.</li>
- <li><b>RK1_Frostschutzbetrieb</b>: On/off state of the frost protection mode of Regelkreis 1.</li>
- <li><b>RK1_Vorlauf_Temp</b>: Shows the currently measured flow temperature in °C of Regelkreis 1.</li>
- <li><b>RK1_Ruecklauf_Temp</b>: Shows the currently measured return temperature in °C of Regelkreis 1.</li>
- </ul></li>
-
- <li>Regelkreis 2 (Usually Floor Heating System):<ul>
- <li><b>RK2_Schalter</b>: Represent the current value of the rotary switch. Possible values are PA, Auto, Standby, Hand, Sonne or Mond.</li>
- <li><b>RK2_Frostschutzbetrieb</b>: On/off state of the frost protection mode of Regelkreis 2.</li>
- <li><b>RK2_Vorlauf_Temp</b>: Shows the currently measured flow temperature in °C of Regelkreis 2.</li>
- <li><b>RK2_Ruecklauf_Temp</b>: Shows the currently measured return temperature in °C of Regelkreis 2.</li>
- </ul></li>
-
- <li>Drinkable Water Reservoir:<ul>
- <li><b>Wasser_Schalter</b>: Represent the current value of the rotary switch. Possible values are PA, Auto, Standby, Hand, Sonne or Mond.</li>
- <li><b>Wasser_Frostschutzbetrieb</b>: On/off state of the frost protection mode of the drinkable water heating system.</li>
- <li><b>Wasser_Temp</b>: Shows the currently measured return temperature in °C of the drinkablr water reservoir.</li>
- </ul></li>
- </ul>
- </ul><br />
-
- <a name="ModbusTrovis5576Get"></a>
- <b>Get-Commands</b>
- <ul>
- 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.
- </ul><br />
-
- <a name="ModbusTrovis5576attr"></a>
- <b>Attribute</b>
- <ul>
- Only centralized Attributes are in use. Especially:
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul><br />
- </ul>
- <p><a name="N4HBUS"></a>
- <h3>N4HBUS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#N4HBUS'>DE</a>]</div>
- This module connects fhem to the net4home Bus. You need to define ojects with <a href="#N4MODULE">N4MODULE</a> to set or read
- data of th net4home bus.
- <br /><br />
- Further technical information can be found at the <a href="http://www.net4home.de">net4home.de</a> Homepage
- <br /><br />
- <a name="N4HBUS_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> N4HBUS <device></code>
- <br /> <br />
- <device> is a combination of <host>:<port>, where <host> is the IP address of the net4home Busconnector and <port> (default:3478).
- <br /> <br />
- Example:
- <ul>
- <code>define net4home N4HBUS 192.168.1.69:3478</code>
- </ul>
- <br />
- The device can also be connected to the busconnector on the same machine. <br />
- Default Port for communication is 3478. In case you need to change this please change also the Port in the conf of Busconnector service.
- </ul>
- <br />
- <a name="N4HBUS_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>state - current state of the Bus connection</li>
- </ul><br />
-
- <a name="N4HBUS_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>MI - a unique MI in the net4home environment (default:65281)</li>
- <li>OBJADR - a unique OBJADR in the net4home environment (default:32700)</li>
- </ul>
- <p><a name="N4HMODULE"></a>
- <h3>N4HMODULE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#N4HMODULE'>DE</a>]</div>
- fhem-Module to communicate with net4home modules via IP
- <br /><br />
- <ul>
- <br />
- <a name="N4HMODULE_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> N4HMODULE <device> <type> <objectaddress></code><br />
- <br />
- Defines a net4home device connected to a <a href="#N4HBUS">N4HBUS</a> device <br /><br />
- Examples:
- <ul>
- <code>define n4h_28204 N4HMODULE n4h 24 28204</code><br />
- </ul>
- Currently the following values are supported:<br />
-
- <b>Measurement</b><br />
- <ul>
- <li> 24 - Measurement,Temperature</li>
- <li> 25 - Measurement,Brightness</li>
- <li> 26 - Measurement,Humidity</li>
- <li> 34 - TLH-Regler H,Sollwert,Temperatur</li>
- <li> 95 - Ausgang, Jal, Motor AJ3</li>
- <li>210 - RF Reader</li>
- <li>240 - Measurement,Wind</li>
- <li>242 - Measurement,Pressure</li>
- <li>245 - Measurement,Rain</li>
- </ul>
- </ul><br />
- <a name="N4HMODULE_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>The readings are dependent of the object of the net4home bus module.<br /></li>
- </ul><br />
- <a name="N4HMODULE_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval<br>
- the interval in seconds used to send values to bus.</li>
- </ul>
- </ul>
- <p> <p>
- <a name="NEUTRINO" id="NEUTRINO"></a>
- </p>
- <h3>
- NEUTRINO
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#NEUTRINO'>DE</a>]</div>
- <ul>
- <a name="NEUTRINOdefine" id="NEUTRINOdefine"></a> <b>Define</b>
- <ul>
- <code>define <name> NEUTRINO <ip-address-or-hostname> [[[[<port>] [<poll-interval>]] [<http-user>]] [<http-password>]]</code><br>
- <br>
- This module controls NEUTRINO based devices like Coolstream receiver via network connection.<br>
- <br>
- Defining an NEUTRINO device will schedule an internal task (interval can be set with optional parameter <poll-interval> in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
- <br>
- Example:<br>
- <ul>
- <code>define SATReceiver NEUTRINO 192.168.0.10<br>
- <br>
- # With custom port<br>
- define SATReceiver NEUTRINO 192.168.0.10 8080<br>
- <br>
- # With custom interval of 20 seconds<br>
- define SATReceiver NEUTRINO 192.168.0.10 80 20<br>
- <br>
- # With HTTP user credentials<br>
- define SATReceiver NEUTRINO 192.168.0.10 80 20 root secret</code>
- </ul>
- </ul>
- <br>
- <br>
- <a name="NEUTRINOset" id="NEUTRINOset"></a> <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code><br>
- <br>
- Currently, the following commands are defined.<br>
- <ul>
- <li>
- <b>on</b> - powers on the device (standby mode)
- </li>
- <li>
- <b>off</b> - turns the device in standby mode
- </li>
- <li>
- <b>toggle</b> - switch between on and off (standby mode)
- </li>
- <li>
- <b>shutdown</b> - poweroff the device
- </li>
- <li>
- <b>reboot</b> - reboots the device
- </li>
- <li>
- <b>channel</b> - zap to specific channel
- </li>
- <li>
- <b>volume</b> 0...100 - set the volume level in percentage
- </li>
- <li>
- <b>mute</b> on,off,toggle - controls volume to mute
- </li>
- <li>
- <b>statusRequest</b> - requests the current status of the device
- </li>
- <li>
- <b>remoteControl</b> UP,DOWN,... - sends remote control command<br />
- </li>
- <li>
- <b>showText</b> text - sends info messages to be displayed on screen
- </li>
- <li>
- <b>showtextwithbutton</b> - sends info messagees to be displayed on screen with OK button
- </li>
- <br>
- <br>
- <br>
- </ul>
- </ul>
- <a name="NEUTRINOget" id="NEUTRINOget"></a> <b>Get</b>
- <ul>
- <code>get <name> <what></code><br>
- <br>
- Currently, the following commands are defined:<br>
- <br>
- <ul>
- <code>channel<br>
- channelurl<br>
- currentTitle<br>
- input<br>
- mute<br>
- power<br>
- volume<br></code>
- </ul>
- </ul><br>
- <br>
- <a name="NEUTRINOattr" id="NEUTRINOattr"></a> <b>Attributes</b><br>
- <ul>
- <ul>
- <li>
- <b>disable</b> - Disable polling (true/false)
- </li>
- <li>
- <b>http-noshutdown</b> - Set FHEM-internal HttpUtils connection close behaviour (defaults=0)
- </li>
- <li>
- <b>https</b> - Access box via secure HTTP (true/false)
- </li>
- <li>
- <b>timeout</b> - Set different polling timeout in seconds (default=2)
- </li>
- </ul>
- </ul><br>
- <br>
- <br>
- <b>Generated Readings:</b><br>
- <ul>
- <ul>
- <li>
- <b>ber</b> - Shows Bit Error Rate for current channel
- </li>
- <li>
- <b>bouquetnr</b> - Shows bouquet number for current channel
- </li>
- <li>
- <b>channel</b> - Shows the service name of current channel
- </li>
- <li>
- <b>channel_id</b> - Shows the channel id of current channel
- </li>
- <li>
- <b>channel_name</b> - Shows the channel name of current channel
- </li>
- <li>
- <b>channel_url</b> - Shows the channel url of current channel (use with vlc player)
- </li>
- <li>
- <b>currentTitle</b> - Shows the title of the running event
- </li>
- <li>
- <b>epg_current_channel_id</b> - Shows the channel id of epg information
- </li>
- <li>
- <b>epg_current_date</b> - Shows the date of epg information
- </li>
- <li>
- <b>egp_current_description</b> - Shows the current description of the current program
- </li>
- <li>
- <b>egp_current_duration_min</b> - Shows the current duration of the current program
- </li>
- <li>
- <b>egp_current_info1</b> - Displays the current information of the current program
- </li>
- <li>
- <b>egp_current_info2</b> - Displays the current information of the current program
- </li>
- <li>
- <b>egp_current_number</b> - Displays the current number(epg) of the current program
- </li>
- <li>
- <b>egp_current_start_sec</b> - Shows the current start time of the current program (ticks)
- </li>
- <li>
- <b>egp_current_start_t</b> - Shows the current start time of the current program
- </li>
- <li>
- <b>egp_current_stop_sec</b> - Shows the current stop time of the current program (ticks)
- </li>
- <li>
- <b>egp_current_stop_t</b> - Shows the current stop time of the current program
- </li>
- <li>
- <b>eventid</b> - Shows the current event id of the current program
- </li>
- <li>
- <b>image_*</b> - Shows image information of NEUTRINO
- </li>
- <li>
- <b>input</b> - Shows currently used input
- </li>
- <li>
- <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
- </li>
- <li>
- <b>power</b> - Reports the power status of the device (can be "on" or "off")
- </li>
- <li>
- <b>presence</b> - Reports the presence status of the receiver (can be "absent" or "present").
- </li>
- <li>
- <b>recordmode</b> - Reports the record mode of the device (can be "on" or "off")
- </li>
- <li>
- <b>recordmodetitle</b> - Reports the last record title
- </li>
- <li>
- <b>sig</b> - Shows signal for current channel in percent
- </li>
- <li>
- <b>snr</b> - Shows signal to noise for current channel in percent
- </li>
- <li>
- <b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "standby")
- </li>
- <li>
- <b>time_now</b> - Reports current time
- </li>
- <li>
- <b>time_raw_now</b> - Reports current time (ticks)
- </li>
- <li>
- <b>timerX</b> - Shows complete timer (Report from NEUTRINO)
- </li>
- <li>
- <b>timerXannounceTime</b> - Shows announce time of the timer
- </li>
- <li>
- <b>timerXname</b> - Shows channel name of the timer
- </li>
- <li>
- <b>timerXnumber</b> - Shows timer number
- </li>
- <li>
- <b>timerXrepcount</b> - Shows rep count of the timer
- </li>
- <li>
- <b>timerXrepeat</b> - Shows repeat time of the timer
- </li>
- <li>
- <b>timerXstartTime</b> - Shows start time of the timer
- </li>
- <li>
- <b>timerXstopTime</b> - Shows stop time of the timer
- </li>
- <li>
- <b>timerXtyp</b> - Shows type of the timer
- </li>
- <li>
- <b>timer_count</b> - Shows the number of timers
- </li>
- <li>
- <b>timer_count</b> - Shows the maximum number of timers
- </li>
- <li>
- <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="NUKIBridge"></a>
- <h3>NUKIBridge</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#NUKIBridge'>DE</a>]</div>
- <ul>
- <u><b>NUKIBridge - controls the Nuki Smartlock over the Nuki Bridge</b></u>
- <br>
- 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.
- <br><br>
- <a name="NUKIBridgedefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> NUKIBridge <HOST> <API-TOKEN></code>
- <br><br>
- Example:
- <ul><br>
- <code>define NBridge1 NUKIBridge 192.168.0.23 F34HK6</code><br>
- </ul>
- <br>
- This statement creates a NUKIBridge device with the name NBridge1 and the IP 192.168.0.23 as well as the token F34HK6.<br>
- After the bridge device is created, all available Smartlocks are automatically placed in FHEM.
- </ul>
- <br><br>
- <a name="NUKIBridgereadings"></a>
- <b>Readings</b>
- <ul>
- <li>0_nukiId - ID of the first found Nuki Smartlock</li>
- <li>0_name - Name of the first found Nuki Smartlock</li>
- <li>smartlockCount - number of all found Smartlocks</li>
- <li>bridgeAPI - API Version of bridge</li>
- <li>bridgeType - Hardware bridge / Software bridge</li>
- <li>currentTime - Current timestamp</li>
- <li>firmwareVersion - Version of the bridge firmware</li>
- <li>hardwareId - Hardware ID</li>
- <li>lastError - Last connected error</li>
- <li>serverConnected - Flag indicating whether or not the bridge is connected to the Nuki server</li>
- <li>serverId - Server ID</li>
- <li>uptime - Uptime of the bridge in seconds</li>
- <li>wifiFirmwareVersion- Version of the WiFi modules firmware</li>
- <br>
- The preceding number is continuous, starts with 0 und returns the properties of <b>one</b> Smartlock.
- </ul>
- <br><br>
- <a name="NUKIBridgeset"></a>
- <b>Set</b>
- <ul>
- <li>autocreate - Prompts to re-read all Smartlocks from the bridge and if not already present in FHEM, create the autimatic.</li>
- <li>callbackRemove - Removes a previously added callback</li>
- <li>clearLog - Clears the log of the Bridge (only hardwarebridge)</li>
- <li>factoryReset - Performs a factory reset (only hardwarebridge)</li>
- <li>fwUpdate - Immediately checks for a new firmware update and installs it (only hardwarebridge)</li>
- <li>info - Returns all Smart Locks in range and some device information of the bridge itself</li>
- <li>reboot - reboots the bridge (only hardwarebridge)</li>
- <br>
- </ul>
- <br><br>
- <a name="NUKIBridgeget"></a>
- <b>Get</b>
- <ul>
- <li>callbackList - List of register url callbacks. The Bridge register up to 3 url callbacks.</li>
- <li>logFile - Retrieves the log of the Bridge</li>
- <br>
- </ul>
- <br><br>
- <a name="NUKIBridgeattribut"></a>
- <b>Attributes</b>
- <ul>
- <li>disable - disables the Nuki Bridge</li>
- <br>
- </ul>
- </ul>
- <p><a name="NUKIDevice"></a>
- <h3>NUKIDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#NUKIDevice'>DE</a>]</div>
- <ul>
- <u><b>NUKIDevice - Controls the Nuki Smartlock</b></u>
- <br>
- 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>
- Normally the Nuki devices are automatically created by the bridge module.
- <br><br>
- <a name="NUKIDevicedefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> NUKIDevice <Nuki-Id> <IODev-Device></code>
- <br><br>
- Example:
- <ul><br>
- <code>define Frontdoor NUKIDevice 1 NBridge1</code><br>
- </ul>
- <br>
- This statement creates a NUKIDevice with the name Frontdoor, the NukiId 1 and the IODev device NBridge1.<br>
- After the device has been created, the current state of the Smartlock is automatically read from the bridge.
- </ul>
- <br><br>
- <a name="NUKIDevicereadings"></a>
- <b>Readings</b>
- <ul>
- <li>state - Status of the Smartlock or error message if any error.</li>
- <li>lockState - current lock status uncalibrated, locked, unlocked, unlocked (lock �n� go), unlatched, locking, unlocking, unlatching, motor blocked, undefined.</li>
- <li>name - name of the device</li>
- <li>paired - paired information false/true</li>
- <li>rssi - value of rssi</li>
- <li>succes - true, false Returns the status of the last closing command. Ok or not Ok.</li>
- <li>batteryCritical - Is the battery in a critical state? True, false</li>
- <li>battery - battery status, ok / low</li>
- </ul>
- <br><br>
- <a name="NUKIDeviceset"></a>
- <b>Set</b>
- <ul>
- <li>statusRequest - retrieves the current state of the smartlock from the bridge.</li>
- <li>lock - lock</li>
- <li>unlock - unlock</li>
- <li>unlatch - unlock / open Door</li>
- <li>unpair - Removes the pairing with a given Smart Lock</li>
- <li>locknGo - lock when gone</li>
- <li>locknGoWithUnlatch - lock after the door has been opened</li>
- <br>
- </ul>
- <br><br>
- <a name="NUKIDeviceattribut"></a>
- <b>Attributes</b>
- <ul>
- <li>disable - disables the Nuki device</li>
- <li>webhookFWinstance - Webinstanz of the Callback</li>
- <li>webhookHttpHostname - IP or FQDN of the FHEM Server Callback</li>
- <br>
- </ul>
- </ul>
- <p><a name="NUT"></a>
- <h3>NUT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#NUT'>DE</a>]</div>
- <ul>
- The Network UPS Tools (<a href="http://www.networkupstools.org">www.networkupstools.org</a>) provide support for Uninterruptable Power Supplies and the like.
- 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
- also be possible to control the UPS (start test, switch off).<br>
- 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
- <code>list theUPS</code>. Only ups.status is always read and used as the status of the device.<br>
- <br><br>
- <a name=NUTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> NUT <ups> [<host>[:<port>]]</code> <br>
- <br>
- <ups> is the name of a ups defined in the nut server.
- <br>
- [<host>[:<port>]] is the host of the nut server. If omitted, <code>localhost:3493</code> is used.
- <br><br>
- Example: <br>
- <code>define theUPS NUT myups otherserver</code>
- <br>
- </ul>
- <br>
- <a name="NUTset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="NUTget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="NUTattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a name="">pollState</a><br>
- Polling interval in seconds for the state of the ups. Default: 10</li><br>
- <li><a name="">pollVal</a><br>
- Polling interval in seconds of the other Readings. This should be a multiple of pollState. Default: 60</li><br>
- <li><a name="#NUT_asReadings">asReadings</a><br>
- Values of the UPS which are used as Readings (ups.status is read anyway)<br>
- Example:<br>
- <code>attr theUPS asReadings battery.charge,battery.runtime,input.voltage,ups.load,ups.power,ups.realpower</code> </li><br>
- </ul>
- </ul>
- <p><a name="Nello"></a>
- <h3>Nello</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Nello'>DE</a>]</div>
- <ul>
- 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>
- 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>
- After that, you can define the device and continue with login.<br>
- <b>ATTENTION:</b> If the login fails, try resetting your password using the recoverPassword function.<br>
- <b>Recommendation:</b> To receive instant events, call the detectDeviceID function after login.<br>
- <br>
- <p><b>Required Packages</b></p>
- <code>
- sudo apt-get install libcpan-meta-yaml-perl<br>
- sudo cpan -i Net::MQTT::Simple
- </code>
- <br>
- <br>
- <br>
- <a name="Nello_define"></a>
- <p><b>Define</b></p>
- <ul>
- <code>define <name> Nello</code><br>
- </ul>
- <br>
- <ul>
- Example: <code>define nello Nello</code><br>
- </ul>
- <br>
- <br>
- <a name="Nello_set"></a>
- <p><b>set <required> [ <optional> ]</b></p>
- <ul>
- <li>
- <i>login <username> <password></i><br>
- login to your created account
- </li>
- <li>
- <i>recoverPassword <username></i><br>
- recovers the password
- </li>
- <li>
- <i>detectDeviceID</i><br>
- detects your device ID by opening the door and creates MQTT helper (used for event hooks)
- </li>
- <li>
- <i>open [ <location_id> ]</i><br>
- opens the door for a given location (if the account has only access to one location the default one will be used automatically).
- </li>
- <li>
- <i>update</i><br>
- updates your locations and activities
- </li>
- </ul>
- <br>
- <a name="Nello_get"></a>
- <p><b>Get</b></p>
- <ul>
- N/A
- </ul>
- <br>
- <a name="Nello_attr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <i>updateInterval</i><br>
- the interval to fetch new activites in seconds<br>
- default: 900 (if deviceID is available), 15 otherwise
- </li>
- </ul>
- </ul>
- <p><a name="NetIO230B"></a>
- <h3>NetIO230B</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#NetIO230B'>DE</a>]</div>
- <ul>
- <p>
- fhem-module for NetIO 230B Power Distribution Unit (see: <a
- href="http://www.koukaam.se/showproduct.php?article_id=1502">NetIO 230B
- (koukaam.se)</a>)
- </p>
- Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
- <br />
- Please also note: the PDU must use firmware 3.1 or later and set to unencrypted mode.
- <br /><br />
- <a name="NETIO230Bdefine"></a>
- <b>Define</b>
- <ul>
- <li><code>define <name> NetIO230B <ip-address> <socket number(s)
- > [<user name> <password>]</code></li>
- <li><code>define <name> NetIO230B <ip-address> <socket number(s)
- > [<config file path>]</code></li>
- <p>
- Defines a switching device, where sockets can be switched
- </p>
- <ul>
- <li>separately (just use 0-4 as socket number)</li>
- <li>all together (use 1234 as socket number)</li>
- <li>in arbitrary groups (e.g 13 switches socket 1 and 3, 42
- switches socket 2 and 4, etc...), invalid numbers are
- ignored</li>
- </ul>
- <p>
- User name and password are optional. When no user name or
- password is passed, the module looks for a configfile at
- '/var/log/fhem/netio.conf'. If no config file is found, it
- uses 'admin/admin' as user/pass, since this is the default
- configuration for the device.
- <p>
- Alternatively you can pass a path to a configfile instead of
- the user/pass combo. (e.g. /var/tmp/tmp.conf)
- Configfile-Format:<br />
- <ul>
- <code>
- %config= (<br />
- host => "192.168.61.40",<br />
- user => "admin",<br />
- password => "admin"<br />
- );</code>
- <br /><br /><small>(All settings optional)</small>
- </ul>
- </p>
- <p>Examples:</p>
- <ul>
- <li><code>define Socket3 NetIO230B 192.168.178.10 3</code></li>
- <li><code>define Socket1_and_4 NetIO230B 192.168.178.10 14</code></li>
- <li><code>define coffeemaker NetIO230B 192.168.178.10 1 username secretpassword</code></li>
- <li><code>define coffeemaker_and_light NetIO230B 192.168.178.10 23 /var/log/kitchen.conf</code></li>
- </ul>
- </ul>
- <br>
- <a name="NETIO230Bget"></a>
- <b>Get </b>
- <ul>
- <code>get <name> state</code>
- <br><br>
- returns the state of the socket(s)<br>
- Example:
- <ul>
- <code>get coffeemaker_and_light</code> => <code>on or off</code><br>
- </ul>
- <br>
- </ul>
- <a name="NETIO230Bset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- on
- off
- </pre>
- Examples:
- <ul>
- <code>set coffeemaker_and_light on</code><br>
- </ul>
- <br>
- </ul>
- </ul>
- <p><a name="Netzer"></a>
- <h3>Netzer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Netzer'>DE</a>]</div>
- <ul>
- 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.
- 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.
- There are two pins usable as ADC channel, two as PMW outputs, three as counter and three can generate an interrupt.
- 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.
- If one of the input ports is configured to send interrupt events on GPIO Server, on every event all port values will be updated.
- All ports can be read and controlled individually by the function readingsProxy.
- <br><br>
- <a name="NetzerDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Netzer <host:port></code>
- <br><br>
- </ul>
- <a name="NetzerSet"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <port[_counter]> <value></code>
- <br>
- Where <value> 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 <port_counter> can be set.<br>
- Only ports with corresponding attr Port_[a-m] set to <code>PWM</code> or <code>out</code> can be used.<br>
- If Port attr is:<ul>
- <li>PWM <value> can be a number between 0 and 1023</li>
- <li>out <value> can be a number between 0 and 1</li>
- <li>cnt <port_counter> <value> can be a number between 0 and 32767</li>
- <br></ul>
- </ul>
- <b>Get</b>
- <ul>
- <code>get <name> [<port[_counter]>]</code>
- <br>
- If no <port> is set, all readings will be updated.<br>
- <port> 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 <port_counter> can be read.
- <br><br>
- </ul>
- <a name="NetzerAttr"></a>
- <b>Attributes</b>
- <ul>
- <a name="poll_interval"></a>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the sensor for new measured values.
- Default: 5, valid values: decimal number</li><br>
- <a name="Port_<port>"></a>
- <li>Port_<port><br>
- <ul>
- Configuration for Netzer port.<br>
- <port> is a character between <code>a</code> and <code>m</code>.<br>
- <li><code>in</code>: Port is defined as input. Same behavior as no attribute. Set is not avaliable for this port.<br>
- Can be used for all ports</li>
- <li><code>out</code>: Port is defined as output. Set is avaliable for this port with <value> between 0 and 1.<br>
- Can be used for all ports</li>
- <li><code>cnt</code>: Port is defined as input. Set is not avaliable for this port.<br>
- An second reading: Port_<port>_counter is avaiable.
- It can be updated with <code>get</code> an changed with <code>set</code>.<br>
- Port_<port>_counter <value> = 0-32767 or overflow if outside this range.<br>
- Can be used for ports a,b,c</li>
- <li><code>ADC</code>: Port is defined as analog input. <code>Get</code> <value> is 0-1023 according the voltage on port. Set is not avaliable for this port.<br>
- Can be used for ports e,f</li>
- <li><code>PWM</code>: Port is defined as PWM output. <code>Set</code> and <code>get</code> <value> is 0-1023 according the duty cycle on the port.<br>
- Can be used for ports d,j</li>
- </ul>
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="NetzerI2C"></a>
- <h3>NetzerI2C</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#NetzerI2C'>DE</a>]</div>
- <ul>
- <a name="NetzerI2C"></a>
- 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>
- <b>preliminary:</b><br>
- 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>
- <a name="NetzerI2CDefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> NetzerI2C <Device-Address:Port></code><br>
- where <code><Device-Address:Port></code> Device Address/ IP-Address and Serial Server TCP Port of the Netzer<br><br>
- </ul>
- <a name="NetzerI2CSet"></a>
- <b>Set</b>
- <ul>
- <li>
- Write one byte (or more bytes sequentially) directly to an I2C device (for devices that have only one register to write):<br>
- <code>set <name> writeByte <I2C Address> <value></code><br><br>
- </li>
- <li>
- Write one byte (or more bytes sequentially) to the specified register of an I2C device:<br>
- <code>set <name> writeByteReg <I2C Address> <Register Address> <value></code><br><br>
- </li>
- <li>
- Write n-bytes to an register range, beginning at the specified register:<br>
- <code>set <name> writeBlock <I2C Address> <Register Address> <value></code><br><br>
- </li>
- Examples:
- <ul>
- Write 0xAA to device with I2C address 0x60<br>
- <code>set test1 writeByte 60 AA</code><br>
- Write 0xAA to register 0x01 of device with I2C address 0x6E<br>
- <code>set test1 writeByteReg 6E 01 AA</code><br>
- Write 0xAA to register 0x01 of device with I2C address 0x6E, after it write 0x55 to register 0x02<br>
- <code>set test1 writeByteReg 6E 01 AA 55</code><br>
- Write 0xA4 to register 0x03, 0x00 to register 0x04 and 0xDA to register 0x05 of device with I2C address 0x60 as block operation<br>
- <code>set test1 writeBlock 60 03 A4 00 DA</code><br>
- </ul><br>
- </ul>
- <a name="NetzerI2CGet"></a>
- <b>Get</b>
- <ul>
- <code>get <name> read <I2C Address> [<Register Address> [<number of registers>]] </code>
- <br>
- gets value of I2C device's registers<br><br>
- Examples:
- <ul>
- Reads byte from device with I2C address 0x60<br>
- <code>get test1 writeByte 60</code><br>
- Reads register 0x01 of device with I2C address 0x6E.<br>
- <code>get test1 read 6E 01 AA 55</code><br>
- Reads register 0x03 to 0x06 of device with I2C address 0x60.<br>
- <code>get test1 read 60 03 4</code><br>
- </ul><br>
- </ul><br>
- <a name="NetzerI2CAttr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="Nextion"></a>
- <h3>Nextion</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Nextion'>DE</a>]</div>
- <ul>
- This module connects remotely to a Nextion display that is connected through a ESP8266 or similar serial to network connection
-
- <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.
- <br>
-
- 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>.
- <br><br>
- <a name="Nextiondefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Nextion <hostname/ip>:23 </code>
- <br><br>
- Defines a Nextion device on the given hostname / ip and port (should be port 23/telnetport normally)
- <br><br>
- Example: <code>define nxt Nextion 10.0.0.1:23</code><br>
- <br>
- </ul>
- <br><br>
-
- <a name="Nextionset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <what> [<value>]</code>
- <br><br>
- where <what> / <value> is one of
- <br><br>
- <li><code>raw <nextion command></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>
- <br>
- Examples:<br>
- <dl>
- <dt><code>set nxt raw page 0</code></dt>
- <dd> switch the display to page 0 <br> </dd>
- <dt><code>set nxt raw b0.txt</code></dt>
- <dd> get the text for button 0 <br> </dd>
- <dl>
- </li>
- <li><code>cmd <nextion command></code><br>same as raw
- </li>
- <li><code>page <0 - 9></code><br>set the page number given as new page on the nextion display.
- </li>
- <li><code>pageCmd <one or multiple page numbers separated by ,> <cmds></code><br>Execute the given commands if the current page on the screen is in the list given as page number.
- </li>
- </ul>
- <br><br>
- <a name="Nextionattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li><code>hasSendMe <0 or 1></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
- </li>
- <li><code>initCommands <series of commands></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>
- Example<br>
- <code>t1.txt="Hallo";p1.val=1;</code>
- </li>
-
- <li><code>initPage1 <series of commands></code> to <code>initPage9 <series of commands></code><br>When the corresponding page number will be displayed the given commands will be sent to the display. See also initCommands.<br>
- Example<br>
- <code>t1.txt="Hallo";p1.val=1;</code>
- </li>
- <li><code>expectAnswer <1 or 0></code><br>Specify if an answer from display is expected. If set to zero no answer is expected at any time on a command.
- </li>
- </ul>
- <br><br>
- <a name="Nextionreadings"></a>
- <b>Readings</b>
- <ul>
- <li><code>received <Hex values of the last received message from the display></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>
-
- <li><code>rectext <text or empty></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>
- <code>print "$bt0="<br>
- get bt0.val</code>
- </li>
-
- <li><code>currentPage <page number on the display></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>
-
- <li><code>cmdSent <cmd></code><br> Last cmd sent to the Nextion Display </li>
- <li><code>cmdResult <result text></code><br> Result of the last cmd sent to the display (or empty)</li>
-
-
- </ul>
- <br><br>
- </ul>
- <p><a name="Nmap"></a>
- <h3>Nmap</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Nmap'>DE</a>]</div>
- ( en | <a href="commandref_DE.html#Nmap"><u>de</u></a> )
- <div>
- <ul>
- Nmap is the FHEM module to perform a network scan with Nmap and to display information about the available network devices.<br>
- If a new device is detected, an event
- <code>"<name> new host: <hostname> (<IPv4>)"</code>
- is generated.<br>
- If a device with a known MAC address has been given a new IP, an event
- <code>"<name> new IP: <hostname> (<IPv4>)"</code>
- is generated.<br>
- <br>
- Prerequisites:
- <ul>
- The "Nmap" program and the Perl module "Nmap::Parser" are required.<br>
- Under Debian (based) system, these can be installed using
- <code>"apt-get install nmap libnmap-parser-perl"</code>
- .
- </ul>
- <br>
- <a name="Nmapdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Nmap <target specification></code><br>
- In the <target specification> are all target hosts, which are to be
- scanned.<br>
- The simplest case is the description of an IP destination address or a
- target host name for scanning.<br>
- To scan an entire network of neighboring hosts, Nmap supports CIDR-style
- addresses. Numbits can be appended to an IPv4 address or hostname, and
- Nmap will scan all IP addresses where the first numbits match those of
- the given IP or host name. For example, 192.168.10.0/24 would scan the
- 256 hosts between 192.168.10.0 and 192.168.10.255. 192.168.10.40/24 would
- scan exactly the same targets. It's also possible to scan multiple
- networks at the same time. For example 192.168.1.0/24 192.168.2.0/24
- would scan the 512 hosts between 192.168.1.0 and 192.168.2.255.<br>
- See
- <a href="https://nmap.org/man/de/man-target-specification.html">
- <u>Nmap Manpage (Specifying Destinations)</u>
- </a>.
- </ul><br>
- <a name="Nmapset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>clear readings</code><br>
- Deletes all readings except "state".
- </li>
- <li>
- <code>deleteOldReadings <s></code><br>
- Deletes all readings older than <s> seconds.
- </li>
- <li>
- <code>interrupt</code><br>
- Cancels a running scan.
- </li>
- <li>
- <code>statusRequest</code><br>
- Starts a network scan.
- </li>
- </ul><br>
- <a name="Nmapreadings"></a>
- <b>Readings</b><br>
- <ul>
- General Readings:
- <ul>
- <li>
- <code>NmapVersion</code><br>
- The version number of the installed Nmap program.
- </li>
- <li>
- <code>hostsScanned</code><br>
- The number of scanned addresses.
- </li>
- <li>
- <code>hostsUp</code><br>
- The number of available network devices.
- </li>
- <li>
- <code>knownHosts</code><br>
- The number of known network devices.
- </li>
- <li>
- <code>scanDuration</code><br>
- The scan time in seconds.
- </li>
- <li>
- <code>state</code><br>
- <ul>
- <li>
- <code>Initialized</code><br>
- Nmap has been defined or enabled.
- </li>
- <li>
- <code>running</code><br>
- A network scan is running.
- </li>
- <li>
- <code>done</code><br>
- Network scan completed successfully.
- </li>
- <li>
- <code>aborted</code><br>
- The network scan was aborted due to a timeout or by the user.
- </li>
- <li>
- <code>disabled</code><br>
- Nmap has been disabled.
- </li>
- </ul>
- </li>
- </ul>
- <br>
- Host-specific readings:
- <ul>
- <li>
- <code><metaReading>_alias</code><br>
- Alias ��which is specified under the attribute "devAlias" for the
- network device. If no alias is specified, the hostname is displayed.
- </li>
- <li>
- <code><metaReading>_hostname</code><br>
- Hostname of the network device. If this can not be determined, the IPv4
- address is displayed.
- </li>
- <li>
- <code><metaReading>_ip</code><br>
- IPv4 address of the network device.
- </li>
- <li>
- <code><metaReading>_lastSeen</code><br>
- The time at which the network device was last seen as.
- </li>
- <li>
- <code><metaReading>_macAddress</code><br>
- MAC address of the network device. This can only be determined if the
- scan is executed with root privileges.
- </li>
- <li>
- <code><metaReading>_macVendor</code><br>
- Probable manufacturer of the network device. This can only be
- determined if the scan is executed with root privileges.
- </li>
- <li>
- <code><metaReading>_state</code><br>
- State of the network device. Can be either "absent" or "present".
- </li>
- <li>
- <code><metaReading>_uptime</code><br>
- Time in seconds since the network device is reachable.
- </li>
- <li>
- <code><metaReading>_uptimeText</code><br>
- Time in "d days, hh hours, mm minutes, ss seconds" since the network
- device is reachable.
- </li>
- </ul>
- </ul><br>
- <a name="Nmapattr"></a>
- <b>Attribute</b>
- <ul>
- <li>
- <code>absenceThreshold <n></code><br>
- The number of network cans that must result in "absent" before the
- state of a network device changes to "absent". With this function you
- can verify the absence of a device before the status is changed to
- "absent". If this attribute is set to a value >1, the reading
- "<metaReading>_state" remains on "present" until the final status
- changes to "absent".
- </li>
- <li>
- <code>args <args></code><br>
- Arguments for the Nmap scan.<br>
- The default is "-sn".
- </li>
- <li>
- <code>deleteOldReadings <s></code><br>
- After a network scan, all host-specific readings older than <s>
- seconds are deleted
- </li>
- <li>
- <code>
- devAlias <ID>:<ALIAS> <ID2>:<ALIAS2> ...
- </code><br>
- A whitespace separated list of <ID>:<ALIAS> pairs that can be used to give an alias to network devices.<br>
- The ID can be MAC address, hostname or IPv4 address.<br>
- Examples:
- <ul>
- MAC address:
- <code>
- attr <name> devAlias 5C:51:88:A5:94:1F:Michaels_Handy_byMAC
- </code><br>
- Hostname:
- <code>
- attr <name> devAlias
- android-87c7a6221093d830:Michaels_Handy_byHOST
- </code><br>
- IPv4 address:
- <code>
- attr <name> devAlias 192.168.1.130:Michaels_Handy_byIP
- </code><br>
- </ul>
- </li>
- <li>
- <code>disable 1</code><br>
- A running scan is canceled and no new scans are started.
- </li>
- <li>
- <code>excludeHosts <target specification></code><br>
- All target hosts in the <target specification> are skipped during the scan.
- </li>
- <li>
- <code>interval <seconds></code><br>
- Interval in seconds in which the scan is performed.<br>
- The default value is 900 seconds and the minimum value is 30 seconds.
- </li>
- <li>
- <code>keepReadings 1</code><br>
- If a new IP address is recognized for a device with a known MAC
- address, the invalid readings are deleted unless this attribute is set.
- </li>
- <li>
- <code>leadingZeros 1</code><br>
- For the readings, the IPv4 addresses are displayed with leading zeros.
- </li>
- <li>
- <code>metaReading <metaReading></code><br>
- You can specify "alias", "hostname", "ip" or "macAddress" as
- <metaReading> and is the identifier for the readings.<br>
- The default is "ip".
- </li>
- <li>
- <code>path</code><br>
- Path under which the Nmap program is to be reached.<br>
- The default is "/urs/bin/nmap".
- </li>
- <li>
- <a href="#readingFnAttributes">
- <u><code>readingFnAttributes</code></u>
- </a>
- </li>
- <li>
- <code>sudo 1</code><br>
- The scan runs with root privileges.<br>
- The prerequisite is that the user has these rights under the FHEM. For
- the user "fhem", on a Debian (based) system, they can be set in the
- "/etc/sudoers" file. For this, the line "fhem ALL=(ALL) NOPASSWD:
- /usr/bin/nmap" must be inserted in the section "#User privilege
- specification".
- </li>
- </ul>
- </ul>
- </div>
- <p><a name="NotifyAndroidTV"></a>
- <h3>NotifyAndroidTV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#NotifyAndroidTV'>DE</a>]</div>
- <ul>
- This module allows you to send notifications to the
- <a href ='https://play.google.com/store/apps/details?id=de.cyberdream.androidtv.notifications.google'>
- Notifications for Android TV</a> and
- <a href ='https://www.amazon.de/Christian-Fees-Notifications-for-Fire/dp/B00OESCXEK'>
- Notifications for Fire TV</a> apps.
- <br><br>
- <code>set <name> msg bkgcolor=amber interrupt=true position=top-left transparency=0% duration=2 offset=10 icon=fhemicon title="der titel" das ist ein test</code>
- <br><br>
- <a name="NotifyAndroidTV_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> NotifyAndroidTV <host></code>
- <br><br>
- </ul>
- <a name="NotifyAndroidTV_Set"></a>
- <b>Set</b>
- <ul>
- <li>msg [options] <message><br>
- possible options are: bkgcolor, interrupt, position, transparency, duration, offset, offsety, width, type, icon, image, title, imageurl. use <code>set <name> notify</code> to see valid values.<br>
- <code>set nb msg ?</code> shows a help text<br>
- it is better to use imageurl instad of image as it is non blocking!<br>
- image can be given as <code>image={<perlCode>}</code></li>
- </ul><br>
- <a name="NotifyAndroidTV_Get"></a>
- <b>Get</b>
- <ul>none
- </ul><br>
- <a name="NotifyAndroidTV_Attr"></a>
- <b>Attr</b>
- <ul>none
- </ul>
- </ul><br>
- <p><a name="OBIS"></a>
- <h3>OBIS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OBIS'>DE</a>]</div>
- <ul>
- 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.
- <br><br>
- <b>Define</b>
- <ul>
- <code>define <name> OBIS device|none [MeterType] </code><br>
- <br>
- <device> specifies the serial port to communicate with the smartmeter.
- Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
- For example /dev/ttyUSB0. You may specify the baudrate used after the @ char.<br>
- <br>
- Optional: MeterType can be of
- <ul><li>VSM102 -> Voltcraft VSM102</li>
- <li>E110 -> Landis&&;Gyr E110</li>
- <li>E350USB -> Landis&&;Gyr E350 USB-Version</li>
- <li>Standard -> Data comes as plainText</li>
- <li>SML -> Smart Message Language</li></ul>
- <br>
- Example: <br>
- <code>define myPowerMeter OBIS /dev/ttyPlugwise@@9600,7,E,1 VSM102</code>
- <br>
- <br>
- </ul>
- <b>Attributes</b>
- <ul><li>
- <code>offset_feed <br>offset_energy</code><br>
- If your smartmeter is BEHIND the meter of your powersupplier, then you can hereby adjust
- the total-reading of your SM to that of your official one.
- </li><li>
- <code>channels</code><br>
- With this, you can rename the reported channels.<BR>e.g.:
- <code>attr myOBIS channels {"1.0.96.5.5.255"=>"Status","1.0.0.0.0.255"=>"Info","16.7"=>"Verbrauch"}></code>
- </li><li>
- <code>directions</code><br>
- Some Meters report feeding/comnsuming of power in a statusword.
- If this is set, you get an extra reading dir_total_consumption which defaults to "in" and "out".<BR>
- Here, you can change this text with, e.g.:
- <code>attr myOBIS directions {">" => "pwr consuming", "<"=>"pwr feeding"}</code>
- </li><li>
- <code>interval</code><br>
- The polling-interval in seconds. (Only useful in Polling-Mode)
- </li><li>
- <code>alignTime</code><br>
- Aligns the intervals to a given time. Each interval is repeatedly calculated.
- So if alignTime=00:00 and interval=600 aligns the interval to xx:00:00, xx:10:00, xx:20:00 etc....
- </li><li>
- <code>pollingMode</code><br>
- Changes from direct-read to polling-mode.
- Useful with meters, that send a continous datastream.
- Reduces CPU-load.
- </li><li>
- <code>unitReadings</code><br>
- Adds the units to the readings like w, wH, A etc.
- </li><li>
- <code>valueBracket</code><br>
- Sets, weather to use the value from the first or the second bracket, if applicable.
- Standard is "second"
- </li>
-
- <br>
- </ul></ul>
- <p> <p>
- <a name="ONKYO_AVR" id="ONKYO_AVR"></a>
- </p>
- <h3>
- ONKYO_AVR
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ONKYO_AVR'>DE</a>]</div>
- <ul>
- <a name="ONKYO_AVRdefine" id="ONKYO_AVRdefine"></a> <b>Define</b>
- <ul>
- <code>define <name> ONKYO_AVR <ip-address-or-hostname[:PORT]> [<protocol-version>]</code><br>
- <code>define <name> ONKYO_AVR <devicename[@baudrate]> [<protocol-version>]</code><br>
- <br>
- This module controls ONKYO A/V receivers in real-time via network connection.<br>
- 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>
- Use <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a> to control slave zones.<br>
- <br>
- Instead of IP address or hostname you may set a serial connection format for direct connectivity.<br>
- <br>
- <br>
- Example:<br>
- <ul>
- <code>
- define avr ONKYO_AVR 192.168.0.10<br>
- <br>
- # With explicit port<br>
- define avr ONKYO_AVR 192.168.0.10:60128<br>
- <br>
- # With explicit protocol version 2013 and later<br>
- define avr ONKYO_AVR 192.168.0.10 2013<br>
- <br>
- # With protocol version prior 2013<br>
- define avr ONKYO_AVR 192.168.0.10 pre2013
- <br>
- # With protocol version prior 2013 and serial connection<br>
- define avr ONKYO_AVR /dev/ttyUSB1@9600 pre2013
- </code>
- </ul>
- </ul><br>
- <br>
- <a name="ONKYO_AVRset" id="ONKYO_AVRset"></a> <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code><br>
- <br>
- Currently, the following commands are defined:<br>
- <ul>
- <li>
- <b>channel</b> - set active network service (e.g. Spotify)
- </li>
- <li>
- <b>currentTrackPosition</b> - seek to specific time for current track
- </li>
- <li>
- <b>input</b> - switches between inputs
- </li>
- <li>
- <b>inputDown</b> - switches one input down
- </li>
- <li>
- <b>inputUp</b> - switches one input up
- </li>
- <li>
- <b>mute</b> on,off - controls volume mute
- </li>
- <li>
- <b>muteT</b> - toggle mute state
- </li>
- <li>
- <b>next</b> - skip track
- </li>
- <li>
- <b>off</b> - turns the device in standby mode
- </li>
- <li>
- <b>on</b> - powers on the device
- </li>
- <li>
- <b>pause</b> - pause current playback
- </li>
- <li>
- <b>play</b> - start playback
- </li>
- <li>
- <b>power</b> on,off - set power mode
- </li>
- <li>
- <b>preset</b> - switches between presets
- </li>
- <li>
- <b>presetDown</b> - switches one preset down
- </li>
- <li>
- <b>presetUp</b> - switches one preset up
- </li>
- <li>
- <b>previous</b> - back to previous track
- </li>
- <li>
- <b>remoteControl</b> Send specific remoteControl command to device
- </li>
- <li>
- <b>repeat</b> off,all,all-folder,one - set repeat setting
- </li>
- <li>
- <b>repeatT</b> - toggle repeat state
- </li>
- <li>
- <b>shuffle</b> off,on,on-album,on-folder - set shuffle setting
- </li>
- <li>
- <b>shuffleT</b> - toggle shuffle state
- </li>
- <li>
- <b>sleep</b> 1..90,off - sets auto-turnoff after X minutes
- </li>
- <li>
- <b>stop</b> - stop current playback
- </li>
- <li>
- <b>toggle</b> - switch between on and off
- </li>
- <li>
- <b>volume</b> 0...100 - set the volume level in percentage
- </li>
- <li>
- <b>volumeUp</b> - increases the volume level
- </li>
- <li>
- <b>volumeDown</b> - decreases the volume level
- </li>
- </ul>
- <ul>
- <br>
- Other set commands may appear dynamically based on previously used "get avr remoteControl"-commands and resulting readings.<br>
- See "get avr remoteControl <Set-name> help" to get more information about possible readings and set values.
- </ul>
- </ul><br>
- <br>
- <a name="ONKYO_AVRget" id="ONKYO_AVRget"></a> <b>Get</b>
- <ul>
- <code>get <name> <what></code><br>
- <br>
- Currently, the following commands are defined:<br>
- <br>
- <ul>
- <li>
- <b>createZone</b> - creates a separate <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a> device for available zones of the device
- </li>
- <li>
- <b>remoteControl</b> - sends advanced remote control commands based on current zone; you may use "get avr remoteControl <Get-command> 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.
- </li>
- <li>
- <b>statusRequest</b> - clears cached settings and re-reads device XML configurations
- </li>
- </ul>
- </ul><br>
- <br>
- <a name="ONKYO_AVRattr" id="ONKYO_AVRattr"></a> <b>Attributes</b>
- <ul>
- <ul>
- <li>
- <b>connectionCheck</b> 1..120,off Pings the device every X seconds to verify connection status. Defaults to 60 seconds.
- </li>
- <li>
- <b>inputs</b> - 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.
- </li>
- <li>
- <b>model</b> - Contains the model name of the device. Cannot not be changed manually as it is going to be overwritten be the module.
- </li>
- <li>
- <b>volumeSteps</b> - When using set commands volumeUp or volumeDown, the volume will be increased or decreased by these steps. Defaults to 1.
- </li>
- <li>
- <b>volumeMax</b> 1...100 When set, any volume higher than this is going to be replaced by this value.
- </li>
- <li>
- <b>wakeupCmd</b> - 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.
- </li>
- </ul>
- </ul><br>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li>
- <b>audin_*</b> - Shows technical details about current audio input
- </li>
- <li>
- <b>brand</b> - Shows brand name of the device manufacturer
- </li>
- <li>
- <b>channel</b> - Shows current network service name when (e.g. streaming services like Spotify); part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentAlbum</b> - Shows current Album information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentArtist</b> - Shows current Artist information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentMedia</b> - currently no in use
- </li>
- <li>
- <b>currentTitle</b> - Shows current Title information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentTrack*</b> - Shows current track timer information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>deviceid</b> - Shows device name as set in device settings
- </li>
- <li>
- <b>deviceyear</b> - Shows model device year
- </li>
- <li>
- <b>firmwareversion</b> - Shows current firmware version
- </li>
- <li>
- <b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
- </li>
- <li>
- <b>playStatus</b> - Shows current network service playback status; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>power</b> - Reports the power status of the device (can be "on" or "off")
- </li>
- <li>
- <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.
- </li>
- <li>
- <b>repeat</b> - Shows current network service repeat status; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>screen*</b> - Experimental: Gives some information about text that is being shown via on-screen menu
- </li>
- <li>
- <b>shuffle</b> - Shows current network service shuffle status; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>sleep</b> - Reports current sleep state (can be "off" or shows timer in minutes)
- </li>
- <li>
- <b>state</b> - Reports current network connection status to the device
- </li>
- <li>
- <b>stateAV</b> - Zone status from user perspective combining readings presence, power, mute and playStatus to a useful overall status.
- </li>
- <li>
- <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
- </li>
- <li>
- <b>vidin_*</b> - Shows technical details about current video input before image processing
- </li>
- <li>
- <b>vidout_*</b> - Shows technical details about current video output after image processing
- </li>
- <li>
- <b>zones</b> - Shows total available zones of device
- </li>
- </ul>
- <br>
- Using remoteControl get-command might result in creating new readings in case the device sends any data.<br>
- </ul>
- <p> <p>
- <a name="ONKYO_AVR_ZONE" id="ONKYO_AVR_ZONE"></a>
- </p>
- <h3>
- ONKYO_AVR_ZONE
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ONKYO_AVR_ZONE'>DE</a>]</div>
- <ul>
- <a name="ONKYO_AVR_ZONEdefine" id="ONKYO_AVR_ZONEdefine"></a> <b>Define</b>
- <ul>
- <code>define <name> ONKYO_AVR_ZONE [<zone-id>]</code><br>
- <br>
- This is a supplement module for <a href="#ONKYO_AVR">ONKYO_AVR</a> representing zones.<br>
- <br>
- Example:<br>
- <ul>
- <code>
- define avr ONKYO_AVR_ZONE<br>
- <br>
- # For zone2<br>
- define avr ONKYO_AVR_ZONE 2<br>
- <br>
- # For zone3<br>
- define avr ONKYO_AVR_ZONE 3<br>
- <br>
- # For zone4<br>
- define avr ONKYO_AVR_ZONE 4
- </code>
- </ul>
- </ul><br>
- <br>
- <a name="ONKYO_AVRset" id="ONKYO_AVRset"></a> <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code><br>
- <br>
- Currently, the following commands are defined:<br>
- <ul>
- <li>
- <b>channel</b> - set active network service (e.g. Spotify)
- </li>
- <li>
- <b>input</b> - switches between inputs
- </li>
- <li>
- <b>inputDown</b> - switches one input down
- </li>
- <li>
- <b>inputUp</b> - switches one input up
- </li>
- <li>
- <b>mute</b> on,off - controls volume mute
- </li>
- <li>
- <b>muteT</b> - toggle mute state
- </li>
- <li>
- <b>next</b> - skip track
- </li>
- <li>
- <b>off</b> - turns the device in standby mode
- </li>
- <li>
- <b>on</b> - powers on the device
- </li>
- <li>
- <b>pause</b> - pause current playback
- </li>
- <li>
- <b>play</b> - start playback
- </li>
- <li>
- <b>power</b> on,off - set power mode
- </li>
- <li>
- <b>preset</b> - switches between presets
- </li>
- <li>
- <b>presetDown</b> - switches one preset down
- </li>
- <li>
- <b>presetUp</b> - switches one preset up
- </li>
- <li>
- <b>previous</b> - back to previous track
- </li>
- <li>
- <b>remoteControl</b> Send specific remoteControl command to device
- </li>
- <li>
- <b>repeat</b> off,all,all-folder,one - set repeat setting
- </li>
- <li>
- <b>repeatT</b> - toggle repeat state
- </li>
- <li>
- <b>shuffle</b> off,on,on-album,on-folder - set shuffle setting
- </li>
- <li>
- <b>shuffleT</b> - toggle shuffle state
- </li>
- <li>
- <b>sleep</b> 1..90,off - sets auto-turnoff after X minutes
- </li>
- <li>
- <b>stop</b> - stop current playback
- </li>
- <li>
- <b>toggle</b> - switch between on and off
- </li>
- <li>
- <b>volume</b> 0...100 - set the volume level in percentage
- </li>
- <li>
- <b>volumeUp</b> - increases the volume level
- </li>
- <li>
- <b>volumeDown</b> - decreases the volume level
- </li>
- </ul>
- <ul>
- <br>
- Other set commands may appear dynamically based on previously used "get avr remoteControl"-commands and resulting readings.<br>
- See "get avr remoteControl <Set-name> help" to get more information about possible readings and set values.
- </ul>
- </ul><br>
- <br>
- <a name="ONKYO_AVRget" id="ONKYO_AVRget"></a> <b>Get</b>
- <ul>
- <code>get <name> <what></code><br>
- <br>
- Currently, the following commands are defined:<br>
- <br>
- <ul>
- <li>
- <b>createZone</b> - creates a separate <a href="#ONKYO_AVR_ZONE">ONKYO_AVR_ZONE</a> device for available zones of the device
- </li>
- <li>
- <b>remoteControl</b> - sends advanced remote control commands based on current zone; you may use "get avr remoteControl <Get-command> 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.
- </li>
- </ul>
- </ul><br>
- <br>
- <a name="ONKYO_AVRattr" id="ONKYO_AVRattr"></a> <b>Attributes</b>
- <ul>
- <ul>
- <li>
- <b>inputs</b> - 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.
- </li>
- <li>
- <b>volumeSteps</b> - When using set commands volumeUp or volumeDown, the volume will be increased or decreased by these steps. Defaults to 1.
- </li>
- <li>
- <b>volumeMax</b> 1...100 When set, any volume higher than this is going to be replaced by this value.
- </li>
- <li>
- <b>wakeupCmd</b> - 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.
- </li>
- </ul>
- </ul><br>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li>
- <b>channel</b> - Shows current network service name when (e.g. streaming services like Spotify); part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentAlbum</b> - Shows current Album information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentArtist</b> - Shows current Artist information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentMedia</b> - currently no in use
- </li>
- <li>
- <b>currentTitle</b> - Shows current Title information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>currentTrack*</b> - Shows current track timer information; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>mute</b> - Reports the mute status of the device (can be "on" or "off")
- </li>
- <li>
- <b>playStatus</b> - Shows current network service playback status; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>power</b> - Reports the power status of the device (can be "on" or "off")
- </li>
- <li>
- <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.
- </li>
- <li>
- <b>repeat</b> - Shows current network service repeat status; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>shuffle</b> - Shows current network service shuffle status; part of FHEM-4-AV-Devices compatibility
- </li>
- <li>
- <b>state</b> - Reports current network connection status to the device
- </li>
- <li>
- <b>stateAV</b> - Zone status from user perspective combining readings presence, power, mute and playStatus to a useful overall status.
- </li>
- <li>
- <b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)
- </li>
- </ul>
- <br>
- Using remoteControl get-command might result in creating new readings in case the device sends any data.<br>
- </ul>
- <p><a name="OPENWEATHER"></a>
- <h3>OPENWEATHER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OPENWEATHER'>DE</a>]</div>
- <div>
- <ul>
- 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>.
- <br>
- It requires a registration on this website to obtain the necessary parameters.
- <br>
- It uses the perl moduls HTTP::Request, LWP::UserAgent, HTML::Parse and Digest::MD5.
- <br/><br/>
- <a name="OPENWEATHERdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> OPENWEATHER <project> <cityCode> <apiKey> [language]</code>
- <br>
- Example:
- <br>
- <code>define wetter OPENWEATHER projectx DE0001020 3c551bc20819c19ee88d</code>
- <br/><br/>
- 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>.
- <br/><br/>
- <li><code><project></code>
- <br>
- Name of the 'openweather' project (create with a user account on wetter.com).
- </li><br>
- <li><code><cityCode></code>
- <br>
- Code of the location for which the forecast is requested.
- The code is part of the URL of the weather forecast page. For example <i>DE0009042</i> in:
- <br>
- <i>http://www.wetter.com/wetter_aktuell/aktuelles_wetter/deutschland/rostock/<u>DE0009042</u>.html</i>
- </li><br>
- <li><code><apiKey></code>
- <br>
- Secret key that is provided when the user creates a 'openweather' project on wetter.com.
- </li><br>
- <li><code>[language]</code>
- <br>
- Optional. Default language of weather description is German. Change with <i>en</i> to English or <i>es</i> to Spanish.
- </li><br>
- The function <code>OPENWEATHER_Html</code> creates a HTML code for a vertically arranged weather forecast.
- <br>
- Example:
- <br>
- <code>define MyForecast weblink htmlCode { OPENWEATHER_Html("MyWeather") }</code>
- <br/><br/>
- </ul>
-
- <a name="OPENWEATHERset"></a>
- <b>Set</b>
- <ul>
- <br>
- <li><code>set <name> update</code>
- <br>
- The weather data are immediately polled from the website.
- </li><br>
- </ul>
- <a name="OPENWEATHERget"></a>
- <b>Get</b>
- <ul>
- <br>
- <li><code>get <name> apiResponse</code>
- <br>
- Shows the response of the web site.
- </li><br>
- </ul>
-
- <a name="OPENWEATHERattr"></a>
- <b>Attributes</b>
- <ul>
- <br>
- <li><code>disable <0 | 1></code>
- <br>
- Automatic update is stopped if set to 1.
- </li><br>
- <li><code>INTERVAL <seconds></code>
- <br>
- Polling interval for weather data in seconds (default and smallest value is 3600 = 1 hour). 0 will stop automatic updates.
- </li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="OPENWEATHERreading"></a>
- <b>Forecast readings</b>
- <ul>
- Note! The forecast values (in brackets) have first to be selected on the project setup page on wetter.com.
- <br/> <br/>
- <li><b>fc</b><i>0|1|2</i><b>_...</b> - forecast values for <i>today|tommorrow|in 2 days</i></li>
- <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>
- <li><b>fc</b><i>1</i><b>_temp</b><i>Min|Max</i> - <i>minimal|maximal</i> temperature for <i>tommorrow</i> in °C (tn,tx)</li>
- <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 °C</li>
- <li><b>fc</b><i>0</i><b>_chOfRain</b> - chance of rain <i>today</i> in % (pc)</li>
- <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>
- <li><b>fc</b><i>0</i><b>_weather</b> - weather situation <i>today</i> in German (w_txt)</li>
- <li><b>fc</b><i>0</i><b>_weatherCode</b> - code of weather situation <i>today</i> (w)</li>
- <li><b>fc</b><i>0</i><b>_wday</b> - German abbreviation of week day of <i>today</i> (d)</li>
- <li><b>fc</b><i>0</i><b>_wind</b> - wind speed <i>today</i> in km/h (ws)</li>
- <li><b>fc</b><i>0</i><b>_windDir</b> - wind direction <i>today</i> in ° (degree) (wd)</li>
- <li><b>fc</b><i>0</i><b>_windDirTxt</b> - wind direction <i>today</i> in text form (wd_txt</li>
- <li>etc.</li>
- </ul>
- <br>
- </ul>
- </div>
- <p><a name="OREGON"></a>
- <h3>OREGON</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OREGON'>DE</a>]</div>
- <ul>
- 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.
- See <a href="#RFXCOM">RFXCOM</a>.
- See <a href="#SIGNALduino">SIGNALduino</a>.
- <br><br>
- <a name="OREGONdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> OREGON <deviceid></code> <br>
- <br>
- <deviceid> 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:
- BTHR918, BTHR918N, PCR800 RGR918, RTGR328N, THN132N, THGR228N, THGR328N, THGR918, THR128, THWR288A, THGR810, UV138, UVN800, WGR918, WGR800, WTGR800_A, WTGR800_T.
- <br>
- 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.
- <br><br>
- Example: <br>
- <code>define Kaminzimmer OREGON BTHR918N_ab</code>
- <br>
- </ul>
- <br>
- <a name="OREGONset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="OREGONget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="OREGONattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- <p><a name="OWAD"></a>
- <h3>OWAD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWAD'>DE</a>]</div>
- <p>FHEM module to commmunicate with 1-Wire A/D converters<br /><br />
- <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
- (prerequisite: Add this module's name to the list of clients in OWServer).
- Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br/></p>
- <br /><h4>Example</h4>
- <p>
- <code>define OWX_AD OWAD 724610000000 45</code>
- <br />
- <code>attr OWX_AD DAlarm high</code>
- <br />
- <code>attr OWX_AD DName humidity</code>
- <br />
- <code>attr OWX_AD DUnit %</code>
- <br />
- <code>attr OWX_AD DFunction VD*31.907097-0.8088</code>
- <br />
- <code>attr OWX_AD DHigh 50.0</code>
- <br />
- </p><br />
- <a name="OWADdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWAD [<model>] <id> [<interval>]</code> or <br/>
- <code>define <name> OWAD <fam>.<id> [<interval>]</code>
- <br /><br /> Define a 1-Wire A/D converter.<br /><br /></p>
- <ul>
- <li>
- <code>[<model>]</code><br /> Defines the A/D converter model (and thus 1-Wire
- family id), currently the following values are permitted: <ul>
- <li>model DS2450 with family id 20 (default if the model parameter is
- omitted)</li>
- </ul>
- </li>
- <li>
- <code><fam></code>
- <br />2-character unique family id, see above
- </li>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the converter device without family id and CRC
- code </li>
- <li>
- <code><interval></code>
- <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
- </ul>
- <br />
- <a name="OWADset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owad_interval">
- <code>set <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
- </ul>
- <br />
- <a name="OWADget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owad_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- <li><a name="owad_reading">
- <code>get <name> reading</code></a><br />Obtain the measuement values. </li>
- <li><a name="owad_alarm">
- <code>get <name> alarm</code></a><br />Obtain the alarm values. </li>
- <li><a name="owad_status">
- <code>get <name> status</code></a><br />Obtain the i/o status values.
- </li>
- </ul>
- <br />
- <a name="OWADattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="owad_stateAL0"><code>attr <name> stateAL0 <string></code></a>
- <br />character string for denoting low normal condition, default is empty </li>
- <li><a name="owad_stateAH0"><code>attr <name> stateAH0 <string></code></a>
- <br />character string for denoting high normal condition, default is empty </li>
- <li><a name="owad_stateAL1"><code>attr <name> stateAL1 <string></code></a>
- <br />character string for denoting low alarm condition, default is �</li>
- <li><a name="owad_stateAH1"><code>attr <name> stateAH1 <string></code></a>
- <br />character string for denoting high alarm condition, default is �</li>
- <li><a name="owad_interval2">
- <code>attr <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
- </ul> For each of the following attributes, the channel identification A,B,C,D may be used. <ul>
- <li><a name="owad_cname"><code>attr <name> <channel>Name
- <string>[|<string>]</code></a>
- <br />name for the channel [|short name used in state reading]. </li>
- <li><a name="owad_cunit"><code>attr <name> <channel>Unit
- <string></code></a>
- <br />unit of measurement for this channel used in state reading (default "V", set to "none" for empty). </li>
- <li><a name="owad_cfunction"> <code>attr <name> <channel>Function
- <string></code></a>
- <br />arbitrary functional expression involving the variables VA,VB,VC,VD. VA is replaced by
- the (raw) measured voltage in channel A, etc. This attribute allows linearization of measurement
- curves as well as the mixing of various channels. </li>
- <li><a name="owad_calarm"><code>attr <name> <channel>Alarm
- <string></code></a>
- <br />alarm setting in this channel, either both, low, high or none (default). </li>
- <li><a name="owad_clow"><code>attr <name> <channel>Low
- <float></code></a>
- <br />measurement value for low alarm. </li>
- <li><a name="owad_chigh"><code>attr <name> <channel>High
- <float></code></a>
- <br />measurement value for highalarm. </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p><a name="OWCOUNT"></a>
- <h3>OWCOUNT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWCOUNT'>DE</a>]</div>
- <p>FHEM module to commmunicate with 1-Wire Counter/RAM DS2423 or its emulation DS2423emu <br />
- <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
- (prerequisite: Add this module's name to the list of clients in OWServer).
- Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br/><p/>
- <br /><h4>Example</h4><br />
- <code>define OWC OWCOUNT 1D.CE780F000000 60</code>
- <br />
- <code>attr OWC AName energy|W</code>
- <br />
- <code>attr OWC AUnit kWh</code>
- <br />
- <code>attr OWC APeriod hour</code>
- <br />
- <code>attr OWC ARate power|P</code>
- <br />
- <code>attr OWX_AMode daily</code>
- <br />
- <br />
- <a name="OWCOUNTdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWCOUNT [<model>] <id> [<interval>]</code> or <br/>
- <code>define <name> OWCOUNT <fam>.<id> [<interval>]</code>
- <br /><br /> Define a 1-Wire counter.<br /><br /></p>
- <ul>
- <li>
- <code>[<model>]</code><br /> Defines the counter model (and thus 1-Wire family
- id), currently the following values are permitted: <ul>
- <li>model DS2423 with family id 1D (default if the model parameter is
- omitted)</li>
- <li>model DS2423enew with family id 1D - emulator, works like DS2423</li>
- <li>model DS2423eold with family id 1D - emulator, works like DS2423 except that the internal memory is not present</li>
- </ul>
- </li>
- <li>
- <code><fam></code>
- <br />2-character unique family id, see above
- </li>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the converter device without family id and CRC
- code </li>
- <li>
- <code><interval></code>
- <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
- </ul>
- <br />
- <a name="OWCOUNTset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owcount_interval">
- <code>set <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.
- Log line after each interval <date> <name> <channel>: <value> <unit> <value> /
- <unit>/<period> <channel>: <value> <unit> / <value> <unit>/<period> <br />
- 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
- </li>
- <li><a name="owcount_memory">
- <code>set <name> memory <page> <string></code></a><br />Write 32 bytes to
- memory page 0..13 </li>
- <li><a name="owcount_midnight">
- <code>set <name> midnight <channel-name> <val></code></a><br />Write the
- day's starting value for counter <channel> (A, B or named channel, see
- below)</li>
- <li><a name="owcount_counter">
- <code>set <name> counter <channel-name> <val></code></a><br />Correct the midnight
- value such that counter <channel> (A, B or named channel, see
- below) displays value <val></li>
- </ul>
- <br />
- <a name="OWCOUNTget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owcount_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- <li><a name="owcount_memory2">
- <code>get <name> memory <page></code></a><br />Obtain 32 bytes from
- memory page 0..13 and store in cache <i>$hash->{owg_str}->[page]</i> as well as in reading "memory"</li>
- <li><a name="owcount_mcache">
- <code>get <name> mcache <page></code></a><br />Obtain 32 bytes from
- cache <i>$hash->{owg_str}->[page]</i> and display.</li>
- <li><a name="owcount_midnight2">
- <code>get <name> midnight <channel-name></code></a><br />Obtain the
- day's starting value for counter <channel> (A, B or named channel, see
- below)</li>
- <li><a name="owcount_month">
- <code>get <name> month</code></a><br />Returns cumulated and averaged monthly value if mode=daily, otherwise last day's and averaged value </li>
- <li><a name="owcount_year">
- <code>get <name> year</code></a><br />Returns cumulated and averaged yearly value if mode=daily, otherwise last months's and averaged value </li>
- <li><a name="owcount_raw">
- <code>get <name> raw <channel-name></code></a><br />Obtain the
- current raw value for counter <channel> (A, B or named channel, see below)</li>
- <li><a name="owcount_counters">
- <code>get <name> counters</code></a><br />Obtain the current value both
- counters</li>
- </ul>
- <br />
- <a name="OWCOUNTattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="owcount_logm"><code>attr <name> LogM
- <string></code></a>
- <br />device name (not file name) of monthly log file.
- Log line after midnight <new date> <name> <old day> <old date> <channel>: <value> <unit> <channel>: <value> <unit>
- <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
- </li>
- <li><a name="owcount_logy"><code>attr <name> LogY
- <string></code></a>
- <br />device name (not file name) of yearly log file.</li>
- <li><a name="owcount_interval2">
- <code>attr <name> interval <int></code></a>
- <br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
- <li><a name="owcount_nomemory"><code>attr <name> nomemory
- 0|1</code></a>
- <br />when set to 1, midnight values will be stored in files instead of the internal memory.</li>
- </ul>
- <p>For each of the following attributes, the channel identification A,B may be used.</p>
- <ul>
- <li><a name="owcount_cname"><code>attr <name> <channel>Name
- <string>[|<string>]</code></a>
- <br />name for the channel [|short name used in state reading]. </li>
- <li><a name="owcount_cunit"><code>attr <name> <channel>Unit
- <string&</code></a>
- <br />unit of measurement used in state reading (default "cts", set to "none" for empty).</li>
- <li><a name="owcount_crate"><code>attr <name> <channel>Rate
- <string>[|<string>]</code></a>
- <br />name for the channel rate [|short name used in state reading]</li>
- <li><a name="owcount_coffset"><code>attr <name> <channel>Offset
- <float></code></a>
- <br />offset added to the reading in this channel. </li>
- <li><a name="owcount_cfactor"><code>attr <name> <channel>Factor
- <float></code></a>
- <br />factor multiplied to (reading+offset) in this channel. </li>
- <li><a name="owcount_cmode"><code>attr <name> <channel>Mode daily |
- normal</code></a>
- <br />determines whether counter is nulled at start of day or running continuously </li>
- <li><a name="owcount_cperiod"><code>attr <name> <channel>Period hour(default) | minute |
- second</code></a>
- <br />period for rate calculation </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p><a name="OWDevice"></a>
- <h3>OWDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWDevice'>DE</a>]</div>
- <ul>
- <br>
- <a name="OWDevicedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> OWDevice <address> [<interval>]</code>
- <br><br>
- Defines a 1-wire device. The 1-wire device is identified by its <address>. It is
- served by the most recently defined <a href="#OWServer">OWServer</a>.
- <br><br>
- Devices beyond 1-wire hubs (DS2409, address family 1F) need to be addressed by the full path, e.g.
- <code>1F.0AC004000000/main/26.A157B6000000</code> (no leading slash). They are
- not automatically detected.
- <br><br>
- If <interval> is given, the OWServer is polled every <interval> seconds for
- a subset of readings.
- <br><br>
- OWDevice is a generic device. Its characteristics are retrieved at the time of the device's
- definition. The available readings that you can get or set as well as those that are
- regularly retrieved by polling can be seen when issuing the
- <code><a href="#list">list</a> <name></code> command.
- <br><br>
- The following devices are currently supported:
- <ul>
- <li>DS2401 - Silicon Serial Number</li>
- <li>DS1990A - Serial Number iButton</li>
- <li>DS2405 - Addressable Switch</li>
- <li>DS18S20 - High-Precision 1-Wire Digital Thermometer</li>
- <li>DS1920 - iButton version of the thermometer</li>
- <li>DS2406, DS2407 - Dual Addressable Switch with 1kbit Memory</li>
- <li>DS2436 - Battery ID/Monitor Chip</li>
- <li>DS2423 - 4kbit 1-Wire RAM with Counter</li>
- <li>DS2450 - Quad A/D Converter</li>
- <li>DS1822 - Econo 1-Wire Digital Thermometer</li>
- <li>DS2433 - 4kbit 1-Wire RAM</li>
- <li>DS2415 - 1-Wire Time Chip</li>
- <li>DS1904 - RTC iButton</li>
- <li>DS2438 - Smart Battery Monitor</li>
- <li>DS2417 - 1-Wire Time Chip with Interrupt</li>
- <li>DS18B20 - Programmable Resolution 1-Wire Digital Thermometer</li>
- <li>DS2408 - 1-Wire 8 Channel Addressable Switch</li>
- <li>DS2413 - Dual Channel Addressable Switch</li>
- <li>DS1825 - Programmable Resolution 1-Wire Digital Thermometer with ID</li>
- <li>DS2409 - Microlan Coupler (no function implemented)</li>
- <li>EDS0066 - Multisensor for temperature and pressure</li>
- <li>LCD - LCD controller by Louis Swart</li>
- </ul>
- <br><br>
- Adding more devices is simple. Look at the code (subroutine <code>OWDevice_GetDetails</code>).
- <br><br>
- This module is completely unrelated to the 1-wire modules with names all in uppercase.
- <br><br>
- <b>Note:</b>The state reading never triggers events to avoid confusion.<br><br>
- Example:
- <ul>
- <code>
- define myOWServer OWServer localhost:4304<br><br>
- get myOWServer devices<br>
- 10.487653020800 DS18S20<br><br>
- define myT1 OWDevice 10.487653020800<br><br>
- list myT1 10.487653020800<br>
- Internals:<br>
- ...<br>
- Readings:<br>
- 2012-12-22 20:30:07 temperature 23.1875<br>
- Fhem:<br>
- ...<br>
- getters:<br>
- address<br>
- family<br>
- id<br>
- power<br>
- type<br>
- temperature<br>
- templow<br>
- temphigh<br>
- polls:<br>
- temperature<br>
- setters:<br>
- alias<br>
- templow<br>
- temphigh<br>
- ...<br>
- </code>
- </ul>
- <br>
- </ul>
- <a name="OWDeviceset"></a>
- <b>Set</b>
- <ul>
- <li><code>set <name> interval <value></code>
- <br><br>
- <code>value</code> modifies the interval for polling data. The unit is in seconds.
- </li>
- <li><code>set <name> <reading> <value></code>
- <br><br>
- Sets <reading> to <value> for the 1-wire device <name>. The permitted values are defined by the underlying
- 1-wire device type.
- <br><br>
- Example:
- <ul>
- <code>set myT1 templow 5</code><br>
- </ul>
- <br>
- </li>
- </ul>
- <a name="OWDeviceget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <reading> <value></code>
- <br><br>
- Gets <reading> for the 1-wire device <name>. The permitted values are defined by the underlying
- 1-wire device type.
- <br><br>
- Example:
- <ul>
- <code>get myT1 temperature</code><br>
- </ul>
- <br>
- </ul>
- <a name="OWDeviceattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="IODev"></a>
- <li>IODev:
- Set the OWServer device which should be used for sending and receiving data
- for this OWDevice. Note: Upon startup fhem assigns each OWDevice
- to the last previously defined OWServer. Thus it is best if you define OWServer
- and OWDevices in blocks: first define the first OWServer and the OWDevices that
- belong to it, then continue with the next OWServer and the attached OWDevices, and so on.
- </li>
- <li>trimvalues: removes leading and trailing whitespace from readings. Default is 1 (on).</li>
- <li>cstrings: interprets reading as C-style string, i.e. stops reading on the first zero byte. Default is 0 (off).</li>
- <li>polls: a comma-separated list of readings to poll. This supersedes the list of default readings to poll.</li>
- <li>interfaces: supersedes the interfaces exposed by that device.</li>
- <li>model: preset with device type, e.g. DS18S20.</li>
- <li>resolution: resolution of temperature reading in bits, can be 9, 10, 11 or 12.
- Lower resolutions allow for faster retrieval of values from the bus.
- Particularly reasonable for large 1-wire installations to reduce busy times for FHEM.</li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br><br>
- </ul>
- <p><a name="OWFS"></a>
- <h3>OWFS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWFS'>DE</a>]</div>
- <ul>
- OWFS is a suite of programs that designed to make the 1-wire bus and its
- devices easily accessible. The underlying priciple is to create a virtual
- filesystem, with the unique ID being the directory, and the individual
- properties of the device are represented as simple files that can be read
- and written.<br><br>
- Note: You need the owperl module from
- <a href="http://owfs.org/index.php?page=owperl">http://owfs.org/</a>.
- <br><br>
- <a name="OWFSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> OWFS <owserver-ip:port> <model> [<id>]</code>
- <br><br>
- Define a 1-wire device to communicate with an OWFS-Server.<br><br>
- <code><owserver-ip:port></code>
- <ul>
- IP-address:port from OW-Server.
- </ul>
- <code><model></code>
- <ul>
- Define the <a href="#owfs_type">type</a> of the input device.
- Currently supportet: <code>DS1420, DS9097 (for passive Adapter)</code>
- </ul>
- <code><id></code>
- <ul>
- Corresponding to the <a href="#owfs_id">id</a> of the input device. Only for active Adapter.
- <br><br>
- </ul>
- Note:<br>
- If the <code>owserver-ip:port</code> is called <code>none</code>, then
- no device will be opened, so you can experiment without hardware attached.<br><br>
- Example:
- <ul>
- <code>#define an active Adapter:<br>
- define DS9490R OWFS 127.0.0.1:4304 DS1420 93302D000000</code><br>
- </ul>
- <br>
- <ul>
- <code>#define a passive Adapter:<br>
- define DS9097 OWFS 127.0.0.1:4304 DS9097</code><br>
- </ul>
- <br>
- </ul>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="OWFSget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is one of (not supported by passive Devices e.g. DS9097):<br>
- <ul>
- <li><a name="owfs_address"></a>
- <code>address</code> (read-only)<br>
- The entire 64-bit unique ID. address starts with the family code.<br>
- Given as upper case hexidecimal digits (0-9A-F).
- </li>
- <li><a name="owfs_crc8"></a>
- <code>crc8</code> (read-only)<br>
- The 8-bit error correction portion. Uses cyclic redundancy check. Computed
- from the preceeding 56 bits of the unique ID number.<br>
- Given as upper case hexidecimal digits (0-9A-F).
- </li>
- <li><a name="owfs_family"></a>
- <code>family</code> (read-only)<br>
- The 8-bit family code. Unique to each type of device.<br>
- Given as upper case hexidecimal digits (0-9A-F).
- </li>
- <li><a name="owfs_id"></a>
- <code>id</code> (read-only)<br>
- The 48-bit middle portion of the unique ID number. Does not include the
- family code or CRC.<br>
- Given as upper case hexidecimal digits (0-9A-F).
- </li>
- <li><a name="owfs_locator"></a>
- <code>locator</code> (read-only)<br>
- Uses an extension of the 1-wire design from iButtonLink company that
- associated 1-wire physical connections with a unique 1-wire code. If
- the connection is behind a Link Locator the locator will show a unique
- 8-byte number (16 character hexidecimal) starting with family code FE.<br>
- If no Link Locator is between the device and the master, the locator
- field will be all FF.
- </li>
- <li><a name="owfs_present"></a>
- <code>present</code> (read-only)<br>
- Is the device currently present on the 1-wire bus?
- </li>
- <li><a name="owfs_type"></a>
- <code>type</code> (read-only)<br>
- Part name assigned by Dallas Semi. E.g. DS2401 Alternative packaging
- (iButton vs chip) will not be distiguished.
- </li>
- <br>
- </ul>
- Examples:
- <ul>
- <code>get DS9490R type</code><br>
- <code>DS9490R type => DS1420</code><br><br>
- <code>get DS9490R address</code><br>
- <code>DS9490R address => 8193302D0000002B</code>
- </ul>
- <br>
- </ul>
- <a name="OWFSattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a name="owfs_temp-scale"></a>
- temp-scale<br>
- Specifies the temperature-scale unit:
- <ul>
- <li><code>C</code><br>
- Celsius. This is the default.</li>
- <li><code>F</code><br>
- Fahrenheit</li>
- <li><code>K</code><br>
- Kelvin</li>
- <li><code>R</code><br>
- Rankine</li>
- </ul>
- </li>
- </ul>
- <br>
- </ul>
- <p> <a name="OWID"></a>
- <h3>OWID</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWID'>DE</a>]</div>
- <p>FHEM module for 1-Wire devices that know only their unique ROM ID<br />
- <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
- Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br /></p>
- <br /><h4>Example</h4><br />
- <p>
- <code>define ROM1 OWX_ID OWCOUNT 09.CE780F000000 10</code>
- <br />
- </p><br />
- <a name="OWIDdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWID <fam> <id> [<interval>]</code> or <br/>
- <code>define <name> OWID <fam>.<id> [<interval>]</code>
- <br /><br /> Define a 1-Wire device.<br /><br />
- </p>
- <ul>
- <li>
- <code><fam></code>
- <br />2-character unique family id, see above
- </li>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the converter device without family id and CRC
- code
- </li>
- <li>
- <code><interval></code>
- <br />Interval in seconds for checking the presence of the device. The default is 300 seconds. </li>
- </ul>
- <br />
- <a name="OWIDset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owid_interval">
- <code>set <name> interval <int></code></a><br />
- Interval in seconds for checking the presence of the device. The default is 300 seconds. </li>
- </ul>
- <br />
- <a name="OWIDget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owid_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- <li><a name="owid_present">
- <code>get <name> present</code>
- </a>
- <br /> Returns 1 if this 1-Wire device is present, otherwise 0. </li>
- </ul>
- <h4>Attributes</h4>
- <ul><li><a name="owtherm_interval2">
- <code>attr <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p> <a name="OWLCD"></a>
- <h3>OWLCD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWLCD'>DE</a>]</div>
- <p>FHEM module to commmunicate with the <a
- href="http://www.louisswart.co.za/1-Wire_Overview.html">1-Wire LCD controller</a>
- from Louis Swart (1-Wire family id FF). See also the corresponding <a
- href="http://fhemwiki.de/wiki/1-Wire_Textdisplay">Wiki page.</a><br /><br />
- Note:<br /> This 1-Wire module so far works only with the OWX interface module. Please
- define an <a href="#OWX">OWX</a> device first. <br /></p>
- <br /><h4>Example</h4>
- <p>
- <code>define OWX_LCD OWLCD 9F0700000100</code>
- <br />
- </p>
- <br />
- <a name="OWLCDdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWLCD <id></code> or <br/>
- <code>define <name> OWLCD FF.<id></code>
- <br /><br /> Define a 1-Wire LCD device.<br /><br /></p>
- <ul>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the converter device without family id and CRC
- code </li>
- </ul>
- <br />
- <a name="OWLCDset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owlcd_icon">
- <code>set <name> icon <int> on|off|blink</code></a><br /> Set one of
- the icons 0..14 on, off or blinking</li>
- <li><a name="owlcd_icon2">
- <code>set <name> icon 15 0..6</code></a><br /> Set icon 15 to one of its
- values</li>
- <li><a name="owlcd_icon3">
- <code>set <name> icon none</code></a><br /> Set all icons off</li>
- <li><a name="owlcd_line">
- <code>set <name> line <int> <string></code></a><br /> Write
- LCD line 0..3 with some content </li>
- <li><a name="owlcd_memory">
- <code>set <name> memory <page> <string></code></a><br />Write
- memory page 0..6</li>
- <li><a name="owlcd_gpio">
- <code>set <name> gpio <value></code></a><br />Write state for all
- three gpio pins (value = 0..7, for each bit 0=ON, 1=OFF)</li>
- <li><a name="owlcd_gpiobit">
- <code>set <name> gpiobit <bit> <value></code></a><br />Write state for gpio pin no. 1..3,
- possible values are 0=ON, 1=OFF</li>
- <li><a name="owlcd_bl">
- <code>set <name> backlight ON|OFF</code></a><br />Switch backlight on or
- off</li>
- <li><a name="owlcd_lcd">
- <code>set <name> lcd ON|OFF</code></a><br />Switch LCD power on or
- off</li>
- <li><a name="owlcd_reset">
- <code>set <name> reset</code></a><br />Reset the display</li>
- <li><a name="owlcd_test">
- <code>set <name> test</code></a><br />Test the display</li>
- </ul>
- <br />
- <a name="owlcdget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owlcd_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- <li><a name="owlcd_memory2">
- <code>get <name> memory <page></code></a><br />Read memory page 0..6 </li>
- <li><a name="owlcd_gpio2">
- <code>get <name> gpio</code></a><br />Obtain state of all four input
- channels (15 = all off, 0 = all on)</li>
- <li><a name="owlcd_counter">
- <code>get <name> counter</code></a><br />Obtain state of all four input
- counters (4 x 16 Bit)</li>
- <li><a name="owlcd_version">
- <code>get <name> version</code></a><br />Obtain firmware version of the
- controller</li>
- </ul>
- <br />
- <a name="owlcdattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="owlcd_lcdgeometry">
- <code>attr <name> lcdgeometry <string></code></a><br />
- LCD geometry, values are 0-32-64-96 (default) or 0-64-20-84</li>
- <li><a name="owlcd_lcdgcontroller">
- <code>attr <name> lcdcontroller <string></code></a><br />
- LCD geometry, values are KS0073 (default) HD44780</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p> <a name="OWMULTI"></a>
- <h3>OWMULTI</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWMULTI'>DE</a>]</div>
- <p>FHEM module to commmunicate with 1-Wire multi-sensors, currently the DS2438 smart battery
- monitor<br /> <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
- (prerequisite: Add this module's name to the list of clients in OWServer).
- Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first.</p>
- <h4>Example</h4>
- <p>
- <code>define OWX_M OWMULTI 7C5034010000 45</code>
- <br />
- <code>attr OWX_M VName humidity|rH</code>
- <br />
- <code>attr OWX_M VUnit %</code>
- <br />
- <code>attr OWX_M VFunction (161.29 * V / VDD - 25.8065)/(1.0546 - 0.00216 * T)</code>
- </p>
- <a name="OWMULTIdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWMULTI [<model>] <id> [<interval>]</code> or <br/>
- <code>define <name> OWMULTI <fam>.<id> [<interval>]</code>
- <br /><br /> Define a 1-Wire multi-sensor</p>
- <ul>
- <li>
- <code>[<model>]</code><br /> Defines the sensor model (and thus 1-Wire family
- id), currently the following values are permitted: <ul>
- <li>model DS2438 with family id 26 (default if the model parameter is omitted).
- Measured is a temperature value, an external voltage and the current supply
- voltage</li>
- </ul>
- </li>
- <li>
- <code><fam></code>
- <br />2-character unique family id, see above
- </li>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the converter device without family id and CRC
- code </li>
- <li>
- <code><interval></code>
- <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
- </ul>
- <a name="OWMULTIset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owmulti_interval">
- <code>set <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
- </ul>
- <a name="OWMULTIget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owmulti_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- <li><a name="owmulti_reading">
- <code>get <name> reading</code></a><br />Obtain all three measurement values. </li>
- <li><a name="owmulti_temperature">
- <code>get <name> temperature</code></a><br />Obtain the temperature value. </li>
- <li><a name="owmulti_vdd">
- <code>get <name> VDD</code></a><br />Obtain the current supply voltage. </li>
- <li><a name="owmulti_raw">
- <code>get <name> raw</code></a><br />Obtain the raw readings for V and W.</li>
- </ul>
- <a name="OWMULTIattr"></a>
- <h4>Attributes</h4>
- <ul><li><a name="owtherm_interval2">
- <code>attr <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
- <li><a name="owmulti_vname"><code>attr <name> VName
- <string>[|<string>]</code></a>
- <br />name for the voltage channel [|short name used in state reading]. </li>
-
- <li><a name="owmulti_vunit"><code>attr <name> VUnit
- <string></code></a>
- <br />unit of measurement for the voltage channel used in state reading (default "V", set to "none" for empty).</li>
- <li><a name="owmulti_vfunction"><code>attr <name> VFunction
- <string></code></a>
- <br />arbitrary functional expression involving the values VDD, V, W and T. Example see
- above. <ul>
- <li>VDD is replaced by the measured supply voltage in Volt,</li>
- <li>V by the measured external voltage channel,</li>
- <li>W by the measured external sense channel,</li>
- <li>T by the measured and corrected temperature in its unit</li>
- </ul></li>
- <li><a name="owmulti_wname"><code>attr <name> WName
- <string>[|<string>]</code></a>
- <br />name for the sense channel [|short name used in state reading]. </li>
- <li><a name="owmulti_wunit"><code>attr <name> WUnit
- <string></code></a>
- <br />unit of measurement for the sense channel used in state reading (default �V", set to "none" for empty).</li>
- <li><a name="owmulti_wfunction"><code>attr <name> WFunction
- <string></code></a>
- <br />arbitrary functional expression involving the values VDD, V, W and T. Example and usage see
- above.</li>
- <li><a name="owmulti_tempOffset"><code>attr <name> tempOffset <float></code>
- </a>
- <br />temperature offset in °C added to the raw temperature reading. </li>
- <li><a name="owmulti_tempUnit"><code>attr <name> tempUnit
- Celsius|Kelvin|Fahrenheit</code>
- </a>
- <br />unit of measurement (temperature scale), default is Celsius = °C </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p><a name="OWSWITCH"></a>
- <h3>OWSWITCH</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWSWITCH'>DE</a>]</div>
- <p>FHEM module to commmunicate with 1-Wire Programmable Switches <br />
- <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
- (prerequisite: Add this module's name to the list of clients in OWServer).
- Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first.</p>
- <h4>Example</h4>
- <p>
- <code>define OWX_S OWSWITCH DS2413 B5D502000000 60</code>
- <br />
- <code>attr OWX_S AName light-a|la</code>
- <br />
- <code>attr OWX_S AUnit AN|AUS</code>
- </p>
- <a name="OWSWITCHdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWSWITCH [<model>] <id> [<interval>]</code> or <br/>
- <code>define <name> OWSWITCH <fam>.<id> [<interval>]</code>
- <br /><br /> Define a 1-Wire switch.<br /><br />
- <ul>
- <li>
- <code>[<model>]</code><br /> Defines the switch model (and thus 1-Wire family
- id), currently the following values are permitted: <ul>
- <li>model DS2413 with family id 3A (default if the model parameter is omitted).
- 2 Channel switch with onboard memory</li>
- <li>model DS2406 with family id 12. 2 Channel switch </li>
- <li>model DS2408 with family id 29. 8 Channel switch</li>
- </ul>
- </li>
- <li>
- <code><fam></code>
- <br />2-character unique family id, see above
- </li>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the device without family id and CRC
- code </li>
- <li>
- <code><interval></code>
- <br />Measurement interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
- </ul>
- <a name="OWSWITCHset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owswitch_interval">
- <code>set <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. </li>
- <li><a name="owswitch_output">
- <code>set <name> output <channel-name> on | off | on-for-timer <time> | off-for-timer <time></code>
- </a><br />Set
- value for channel (A,B,... or defined channel name). 1 = off, 0 = on in normal
- usage. See also the note above.<br/>
- on-for-timer/off-for-timer will set the desired value only for the given time,
- either given as hh:mm:ss or as integers seconds
- and then will return to the opposite value.</li>
- <li><a name="owswitch_gpio">
- <code>set <name> gpio <value></code></a><br />Set values for
- channels (For 2 channels: 3 = A and B off, 1 = B on 2 = A on 0 = both on)</li>
- <li><a name="owswitch_init">
- <code>set <name> init yes</code></a><br /> Re-initialize the device</li>
- </ul>
- <a name="OWSWITCHget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owswitch_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- <li><a name="owswitch_input">
- <code>get <name> input <channel-name></code></a><br /> state for
- channel (A,B, ... or defined channel name) This value reflects the measured value,
- not necessarily the one set as output state, because the output transistors are open
- collector switches. A measured state of 1 = OFF therefore corresponds to an output
- state of 1 = OFF, but a measured state of 0 = ON can also be due to an external
- shortening of the output, it will be signaled by appending the value of the attribute stateS to the reading.</li>
- <li><a name="owswitch_gpio">
- <code>get <name> gpio</code></a><br />Obtain state of all channels</li>
- </ul>
- <a name="OWSWITCHattr"></a>
- <h4>Attributes</h4>
- <ul><li><a name="owswitch_interval2">
- <code>attr <name> interval <int></code></a><br /> Measurement
- interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update.</li>
- </ul>For each of the following attributes, the channel identification A,B,...
- may be used. <ul>
- <li><a name="owswitch_states"><code><name> stateS <string></code></a>
- <br/> character string denoting external shortening condition (default is X, set to "none" for empty).</li>
- <li><a name="owswitch_cname"><code>attr <name> <channel>Name
- <string>[|<string>]</code></a>
- <br />name for the channel [|short name used in state reading] </li>
- <li><a name="owswitch_cunit"><code>attr <name> <channel>Unit
- <string>|<string></code></a>
- <br />display for on | off condition </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p><a name="OWServer"></a>
- <h3>OWServer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWServer'>DE</a>]</div>
- <ul>
- <br>
- <a name="OWServerdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> OWServer <protocol></code>
- <br><br>
- Defines a logical OWServer device. OWServer is the server component of the
- <a href="http://owfs.org">1-Wire Filesystem</a>. It serves as abstraction layer
- for any 1-wire devices on a host. <protocol> has
- format <hostname>:<port>. For details see
- <a href="http://owfs.org/index.php?page=owserver_protocol">owserver documentation</a>.
- <p>
- 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
- on CPAN has an issue which renders it useless for remote connections.
- <p>
- The ow* version 2.9 packages provided with Debian Jessie in combination with OWNet.pm as deployed with FHEM have issues.
- For Debian Jessie please either unzip
- <a href="http://forum.fhem.de/index.php?action=dlattach;topic=12219.0;attach=2463">owfs_2.8p17-1_all.zip</a> and install
- owserver, dependencies and what else you require with <code>dpkg -i <package>.deb</code> or use the latest OWNet.pm from Sourceforge.
- <p>
- The ow* version 3.1 packages provided with Debian Stretch are fine.
- <p>
- A typical working configuration file <code>/etc/owfs.conf</code> looks as follows:<p>
- <code>
- # server uses device /dev/onewire<br>
- server: device = /dev/onewire<br>
- # clients other than server use server<br>
- ! server: server = localhost:4304<br>
- # port<br>
- server: port = 4304<br>
- # owhttpd<br>
- http: port = 2121<br>
- # owftpd<br>
- ftp: port = 2120<br>
- </code>
- <p>
- The actual 1-wire devices are defined as <a href="#OWDevice">OWDevice</a> devices.
- If <a href="#autocreate">autocreate</a> is enabled, all the devices found are created at
- start of FHEM automatically.
- <br><br>
- This module is completely unrelated to the 1-wire modules with names all in uppercase.
- <br><br>
- Examples:
- <ul>
- <code>define myLocalOWServer OWServer localhost:4304</code><br>
- <code>define myRemoteOWServer OWServer raspi:4304</code><br>
- </ul>
- <br><br>
- Notice: if you get no devices add both <code>localhost</code> and the FQDN of your owserver as server directives
- to the owserver configuration file
- on the remote host.
- <br><br>
- </ul>
- <a name="OWServerset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of<br><br>
- <li><code>reopen</code><br>
- Reopens the connection to the owserver.
- </li>
- <li>owserver (OWFS) specific settings:
- <ul>
- <li><code>timeout/directory</code></li>
- <li><code>timeout/ftp</code></li>
- <li><code>timeout/ha7</code></li>
- <li><code>timeout/network</code></li>
- <li><code>timeout/presence</code></li>
- <li><code>timeout/serial</code></li>
- <li><code>timeout/server</code></li>
- <li><code>timeout/stable</code></li>
- <li><code>timeout/uncached</code></li>
- <li><code>timeout/usb</code></li>
- <li><code>timeout/volatile</code></li>
- <li><code>timeout/w1</code></li>
- <li><code>units/pressure_scale</code></li>
- <li><code>units/temperature_scale</code></li>
- </ul>
- </li>
- For further informations have look on <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver manual</a>).
- <br>
- </ul>
- <br><br>
- <a name="OWServerget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is one of<br><br>
- <li><code>devices</code><br>
- Lists the addresses and types of all 1-wire devices provided by the owserver. Also shows
- the corresponding <a href="#OWDevice">OWDevice</a> if one is defined for the respective 1-wire devices.
- </li>
- <li><code>errors</code><br>
- List a view of error statistics.</li>
- <li>owserver (OWFS) specific settings:
- <ul>
- <li><code>/settings/timeout/directory</code></li>
- <li><code>/settings/timeout/ftp</code></li>
- <li><code>/settings/timeout/ha7</code></li>
- <li><code>/settings/timeout/network</code></li>
- <li><code>/settings/timeout/presence</code></li>
- <li><code>/settings/timeout/serial</code></li>
- <li><code>/settings/timeout/server</code></li>
- <li><code>/settings/timeout/stable</code></li>
- <li><code>/settings/timeout/uncached</code></li>
- <li><code>/settings/timeout/usb</code></li>
- <li><code>/settings/timeout/volatile</code></li>
- <li><code>/settings/timeout/w1</code></li>
- <li><code>/settings/units/pressure_scale</code></li>
- <li><code>/settings/units/temperature_scale</code></li>
- <li><code>/uncached/alarm</code></li>
- </ul>
- </li>
- For further informations have look on <a href="http://owfs.org/uploads/owserver.1.html#sect41">owserver manual</a>).
- <br>
- </ul>
- <br><br>
- <a name="OWServerattr"></a>
- <b>Attributes</b>
- <ul>
- <li>nonblocking<br>
- Get all readings (OWServer / <a href="#OWDevice">OWDevice</a>) via a child process. This ensures, that FHEM
- is not blocked during communicating with the owserver.<br>
- Example:<br>
- <code> attr <name> nonblocking 1</code>
- </li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br><br>
- Note: unset <code>nonblocking</code> if you experience lockups of FHEM.
- </ul>
- <p><a name="OWTEMP"></a>
- <h3>OWTEMP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWTEMP'>DE</a>]</div>
- <ul>
- High-Precision 1-Wire Digital Thermometer.
- <br><br>
- Note:<br>
- Please define an <a href="#OWFS">OWFS</a> device first.
- <br><br>
- <a name="OWTEMPdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> OWTEMP <id> [<interval>] [<alarminterval>]</code>
- <br><br>
- Define a 1-wire Digital Thermometer device.<br><br>
- <code><id></code>
- <ul>
- Corresponding to the <a href="#owfs_id">id</a> of the input device.<br>
- Set <id> to <code>none</code>for demo mode.
- </ul>
- <code><interval></code>
- <ul>
- Sets the status polling intervall in seconds to the given value. The default is 300 seconds.
- </ul>
- <code><alarminterval></code>
- <ul>
- Sets the alarm polling intervall in seconds to the given value. The default is 300 seconds.
- <br><br>
- </ul>
- Note:<br>
- Currently supported <a href="#owfs_type">type</a>: <code>DS18S20</code>.<br><br>
- Example:
- <ul>
- <code>define KG.hz.TF.01 OWTEMP 14B598010800 300 60</code><br>
- </ul>
- <br>
- </ul>
- <a name="OWTEMPset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul>
- <li><a name="owtemp_templow"></a>
- <code>templow</code> (read-write)<br>
- The upper limit for the low temperature alarm state.
- </li>
- <li><a name="owtemp_temphigh"></a>
- <code>temphigh</code> (read-write)<br>
- The lower limit for the high temperature alarm state.
- </li>
- <li><a name="owtemp_ALARMINT"></a>
- <code>ALARMINT</code> (write-only)<br>
- Sets the alarm polling intervall in seconds to the given value.
- </li>
- <li><a name="owtemp_INTERVAL"></a>
- <code>INTERVAL</code> (write-only)<br>
- Sets the status polling intervall in seconds to the given value.
- </li>
- </ul>
- </ul><br>
- <a name="OWTEMPget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul>
- <li><a href="#owfs_address">address</a> (read-only)</li>
- <li><a href="#owfs_crc8">crc8</a> (read-only)</li>
- <li><a href="#owfs_family">family</a> (read-only)</li>
- <li><a href="#owfs_id">id</a> (read-only)</li>
- <li><a href="#owfs_locator">locator</a> (read-only)</li>
- <li><a href="#owfs_present">present</a> (read-only)</li>
- <li><a name="owtemp_temperature"></a>
- <code>temperature</code> (read-only)<br>
- Read by the chip at high resolution (~12 bits). Units are selected from
- the defined OWFS Device. See <a href="#owfs_temp-scale">temp-scale</a> for choices.
- </li>
- <li><a href="#owtemp_templow">templow</a> (read-write)</li>
- <li><a href="#owtemp_temphigh">temphigh</a> (read-write)</li>
- <li><a href="#owfs_type">type</a> (read-only)</li>
- <br>
- </ul>
- Examples:
- <ul>
- <code>get KG.hz.TF.01 type</code><br>
- <code>KG.hz.TF.01 type => DS18S20</code><br><br>
- <code>get KG.hz.TF.01 temperature</code><br>
- <code>KG.hz.TF.01 temperature => 38.2500 (Celsius)</code>
- </ul>
- <br>
- </ul>
- <a name="OWTEMPattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#IODev">IODev</a></li>
- </ul>
- <br>
- </ul>
-
- <p><a name="OWTHERM"></a>
- <h3>OWTHERM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWTHERM'>DE</a>]</div>
- <p>FHEM module to commmunicate with 1-Wire bus digital thermometer devices<br />
- <br />This 1-Wire module works with the OWX interface module or with the OWServer interface module
- (prerequisite: Add this module's name to the list of clients in OWServer).
- Please define an <a href="#OWX">OWX</a> device or <a href="#OWServer">OWServer</a> device first. <br />
- </p>
- <h4>Example</h4>
- <p>
- <code>define OWX_T OWTHERM DS18B20 E8D09B030000 300</code>
- <br />
- <code>attr OWX_T tempUnit Kelvin</code>
- <br />
- </p><br />
- <a name="OWTHERMdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWTHERM [<model>] <id> [<interval>]</code> or <br/>
- <code>define <name> OWTHERM <fam>.<id> [<interval>]</code>
- <br /><br /> Define a 1-Wire digital thermometer device.</p>
- <ul>
- <li>
- <code>[<model>]</code><br /> Defines the thermometer model (and thus 1-Wire family
- id) currently the following values are permitted: </p>
- <ul>
- <li>model DS1820 with family id 10 (default if the model parameter is omitted)</li>
- <li>model DS1822 with family id 22</li>
- <li>model DS18B20 with family id 28</li>
- </ul>
- </li>
- <li>
- <code><fam></code>
- <br />2-character unique family id, see above </li>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the thermometer device without family id and CRC
- code
- </li>
- <li>
- <code><interval></code>
- <br /> Temperature measurement interval in seconds. The default is 300 seconds.
- </li>
- </ul>
- <a name="OWTHERMset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owtherm_interval">
- <code>set <name> interval <int></code></a><br /> Temperature
- readout interval in seconds. The default is 300 seconds, a value of 0 disables the automatic update. <b>Attention:</b>This is the
- readout interval. Whether an actual temperature measurement is performed, is determined by the
- tempConv attribute </li>
- <li><a name="owtherm_tempHigh">
- <code>set <name> tempHigh <float></code></a>
- <br /> The high alarm temperature (on the temperature scale chosen by the attribute
- value) </li>
- <li><a name="owtherm_tempLow">
- <code>set <name> tempLow <float></code></a>
- <br /> The low alarm temperature (on the temperature scale chosen by the attribute
- value) </li>
- </ul>
- <br />
- <a name="OWTHERMget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owtherm_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- <li><a name="owtherm_temperature">
- <code>get <name> temperature</code></a><br />Obtain the temperature. </li>
- <li><a name="owtherm_alarm">
- <code>get <name> alarm</code></a><br />Obtain the alarm temperature
- values. </li>
- </ul>
- <br />
- <a name="OWTHERMattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="owtherm_stateAL"><code>attr <name> stateAL <string></code>
- </a>
- <br />character string for denoting low alarm condition, default is �</li>
- <li><a name="owtherm_stateAH"><code>attr <name> stateAH <string></code>
- </a>
- <br />character string for denoting high alarm condition, default is �</li>
- <li><a name="owtherm_tempConv">
- <code>attr <name> tempConv onkick|onread</code>
- </a>
- <br /> determines, whether a temperature measurement will happen when "kicked"
- through the OWX backend module (all temperature sensors at the same time), or on
- reading the sensor (1 second waiting time, default). </li>
- <li><a name="owtherm_tempOffset"><code>attr <name> tempOffset <float></code>
- </a>
- <br />temperature offset in °C added to the raw temperature reading. </li>
- <li><a name="owtherm_tempUnit"><code>attr <name> tempUnit
- none|Celsius|Kelvin|Fahrenheit</code>
- </a>
- <br />unit of measurement (temperature scale) for state reading (default is Celsius = °C, use "none" for empty).</li>
- <li><a name="owtherm_resolution">
- <code>attr <name> resolution 9|10|11|12</code></a><br /> Temperature
- resolution in bit, only relevant for DS18B20 </li>
- <li><a name="owtherm_interval2">
- <code>attr <name> interval <int></code></a><br /> Temperature
- readout interval in seconds. The default is 300 seconds. <b>Attention:</b>This is the
- readout interval. Whether an actual temperature measurement is performed, is determined by the
- tempConv attribute </li>
- <li><a name="owtherm_tempHigh2">
- <code>attr <name> tempHigh <float></code>
- </a>
- <br /> high alarm temperature (on the temperature scale chosen by the attribute
- value). </li>
- <li><a name="owtherm_tempLow2">
- <code>attr <name> tempLow <float></code>
- </a>
- <br /> low alarm temperature (on the temperature scale chosen by the attribute
- value). </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p><a name="OWVAR"></a>
- <h3>OWVAR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWVAR'>DE</a>]</div>
- <p>FHEM module to commmunicate with 1-Wire bus digital potentiometer devices of type DS2890<br />
- <br />This 1-Wire module works with the OWX interface module, but not yet with the OWServer interface module.
-
- </p>
- <a name="OWVARexample"></a>
- <h4>Example</h4>
- <p>
- <code>define OWX_P OWVAR E8D09B030000 </code>
- <br />
- <code>attr OWX_P Function 1.02 * V + 0.58 | (U-0.58) / 1.02</code>
- <br />
- </p><br />
- <a name="OWVARdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWVAR <id></code> or <br/>
- <code>define <name> OWVAR <fam>.<id> </code>
- <br /><br /> Define a 1-Wire digital potentiometer device.</p>
- <ul>
- <li>
- <code><fam></code>
- <br />2-character unique family id, must be 2C </li>
- <li>
- <code><id></code>
- <br />12-character unique ROM id of the thermometer device without family id and CRC
- code
- </li>
- </ul>
- <a name="OWVARset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owvar_value">
- <code>set <name> value <float></code></a>
- <br /> The value of the potentiometer resistance against ground. Arguments may be in the
- range of [0,100] without a Function attribute, or in the range needed for a <a href="#owvar_function">Function</a> </li>
- </ul>
- <br />
- <a name="OWVARget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owvar_id">
- <code>get <name> id</code></a>
- <br /> Returns the full 1-Wire device id OW_FAMILY.ROM_ID.CRC </li>
- </ul>
- <br />
- <a name="OWVARattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="owvar_cname"><code>attr <name> Name
- <string>[|<string>]</code></a>
- <br />name for the reading [|name used in state reading]. </li>
- <li><a name="owvar_cunit"><code>attr <name> Unit
- <string>[|<string>]</code></a>
- <br />unit of measurement used in state reading. </li>
- <li><a name="owvar_cfunction"> <code>attr <name> Function
- <string>|<string></code></a>
- <br />The first string is an arbitrary functional expression u(V) involving the variable V. V is replaced by
- the raw potentiometer reading (in the range of [0,100]). The second string must be the inverse
- function v(U) involving the variable U, such that U can be replaced by the value given in the
- <a href="#OWVARset">Set</a> argument. Care has to taken that v(U) is in the range [0,100].
- No check on the validity of these functions is performed,
- <b>singularities may crash FHEM.</b> <a href="#OWVARexample">Example see above</a>.
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
-
- <p><a name="OWX"></a>
- <h3>OWX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWX'>DE</a>]</div>
- <ul>
- <p> Backend module to commmunicate with 1-Wire bus devices</p>
- <ul>
- <li>via an active DS2480/DS9097U bus master interface attached to an USB
- port or </li>
- <li>via an active DS2480 bus master interface attached to a TCP/IP-UART interface </li>
- <li>via a network-attached CUNO or through a COC on the RaspBerry Pi</li>
- <li>via an Arduino running OneWireFirmata</li>
- </ul> Internally these interfaces are vastly different, read the corresponding <a
- href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire"> Wiki pages </a>.
- The passive DS9097 interface is no longer suppoorted.
- <a name="OWXdefine"></a>
- <h4>Define</h4>
- <p>To define a 1-Wire interface to communicate with a 1-Wire bus, several possibilities exist:
- <ul>
- <li><code>define <name> OWX <serial-device></code>, i.e. specify the serial device (e.g. USB port) to which the
- 1-Wire bus is attached, for example<br/><code>define OWio1 OWX /dev/ttyUSB1</code></li>
- <li><code>define <name> OWX <tcpip>[:<port>]</code>, i.e. specify the IP address and port to which the 1-Wire bus is attached. Attention: no socat program needed.
- Example:<br/><code>define OWio1 OWX 192.168.0.1:23</code></li>
- <li><code>define <name> OWX <cuno/coc-device></code>, i.e. specify the previously defined COC/CUNO to which the 1-Wire bus
- is attached, for example<br/><code>define OWio2 OWX COC</code></li>
- <li><code>define <name> OWX <firmata-device>:<firmata-pin></code>, i.e. specify the name and 1-Wire pin of the previously defined <a href="#FRM">FRM</a>
- device to which the 1-Wire bus is attached, for example<br/><code>define OWio3 OWX FIRMATA:10</code></li>
- </ul>
- <a name="OWXset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owx_reopen">
- <code>set <name> reopen</code>
- </a>
- <br />re-opens the interface and re-initializes the 1-Wire bus.
- </li>
- </ul>
- <br />
- <a name="OWXget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owx_alarms"></a>
- <code>get <name> alarms</code>
- <br />performs an "alarm search" for devices on the 1-Wire bus and, if found,
- generates an event in the log (not with all interface types). </li>
- <li><a name="owx_devices"></a>
- <code>get <name> devices</code>
- <br />redicovers all devices on the 1-Wire bus. If a device found has a
- previous definition, this is automatically used. If a device is found but has no
- definition, it is autocreated. If a defined device is not on the 1-Wire bus, it is
- autodeleted. </li>
- <li><a name="owx_version"></a>
- <code>get <name> version</code>
- <br />internal version number</li>
- </ul>
- <br />
- <a name="OWXattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="OWXasynchronous"><code>attr <name> asynchronous 0(default)|1</code></a>
- <br />if 1 the interface will run asynchronously;if 0 (default) then not</li>
- <li><a name="OWXtimeout"><code>attr <name> timeout <number></code></a>
- <br />time in seconds waiting for response of any 1-Wire device, or 1-Wire interface,default 5 s</li>
- <li><a name="OWXopendelay"><code>attr <name> opendelay <number> </code></a>
- <br />time in seconds waiting until a reopen ist attempted, default 60 s</li>
- <li><a name="OWXdokick"><code>attr <name> dokick 0|1</code></a>
- <br />if 1, the interface regularly kicks thermometers on the bus to do a temperature conversion,
- and to make an alarm check; if 0 (default) then not</li>
- <li><a name="OWXinterval"><code>attr <name> interval <number></code></a>
- <br />time interval in seconds for kicking temperature sensors and checking for alarms, default 300 s</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- <p><a name="OWX_ASYNC"></a>
- <h3>OWX_ASYNC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWX_ASYNC'>DE</a>]</div>
- <p> FHEM module to commmunicate with 1-Wire bus devices</p>
- <ul>
- <li>via an active DS2480 bus master interface attached to an USB port or </li>
- <li>via an Arduino running ConfigurableFirmata attached to USB</li>
- <li>via an Arduino running ConfigurableFirmata connecting to FHEM via Ethernet</li>
- </ul>
- <p>Internally these interfaces are vastly different, read the corresponding <a
- href="http://fhemwiki.de/wiki/Interfaces_f%C3%BCr_1-Wire"> Wiki pages </a></p>
- <p>OWX_ASYNC does pretty much the same job as <a href="#OWX">OWX</a> does, but using
- an asynchronous mode of communication</p>
- <br />
- <br />
- <h4>Example</h4><br />
- <p>
- <code>define OWio1 OWX_ASYNC /dev/ttyUSB1</code>
- <br />
- <code>define OWio3 OWX_ASYNC 10</code>
- <br />
- </p>
- <br />
- <a name="OWX_ASYNCdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> OWX_ASYNC <serial-device></code> or <br />
- <code>define <name> OWX_ASYNC <cuno/coc-device></code> or <br />
- <code>define <name> OWX_ASYNC <arduino-pin></code>
- <br /><br /> Define a 1-Wire interface to communicate with a 1-Wire bus.<br />
- <br />
- </p>
- <ul>
- <li>
- <code><serial-device></code> The serial device (e.g. USB port) to which the
- 1-Wire bus is attached.</li>
- <li>
- <code><cuno-device></code> The previously defined CUNO to which the 1-Wire bus
- is attached. </li>
- <li>
- <code><arduino-pin></code> The pin of the previous defined <a href="#FRM">FRM</a>
- to which the 1-Wire bus is attached. If there is more than one FRM device defined
- use <a href="#IODev">IODev</a> attribute to select which FRM device to use.</li>
- </ul>
- <br />
- <a name="OWX_ASYNCset"></a>
- <h4>Set</h4>
- <ul>
- <li><a name="owx_async_interval">
- <code>set <name> interval <value></code>
- </a>
- <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
- is 300 seconds).
- </li>
- <li><a name="owx_async_followAlarms">
- <code>set <name> followAlarms on|off</code>
- </a>
- <br /><br /> instructs the module to start an alarm search in case a reset pulse
- discovers any 1-Wire device which has the alarm flag set. </li>
- </ul>
- <br />
- <a name="OWX_ASYNCget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="owx_async_alarms"></a>
- <code>get <name> alarms</code>
- <br /><br /> performs an "alarm search" for devices on the 1-Wire bus and, if found,
- generates an event in the log (not with CUNO). </li>
- <li><a name="owx_async_devices"></a>
- <code>get <name> devices</code>
- <br /><br /> redicovers all devices on the 1-Wire bus. If a device found has a
- previous definition, this is automatically used. If a device is found but has no
- definition, it is autocreated. If a defined device is not on the 1-Wire bus, it is
- autodeleted. </li>
- </ul>
- <br />
- <a name="OWX_ASYNCattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="OWX_ASYNCdokick"><code>attr <name> dokick 0|1</code></a>
- <br />1 if the interface regularly kicks thermometers on the bus to do a temperature conversion,
- and to perform an alarm check, 0 if not</li>
- <li><a name="OWX_ASYNCbuspower"><code>attr <name> buspower real|parasitic</code></a>
- <br />parasitic if there are any devices on the bus that steal power from the data line.
- <br />Ensures that never more than a single device on the bus is talked to (throughput is throttled noticable!)
- <br />Automatically disables attribute 'dokick'.</li>
- <li><a name="OWX_ASYNCIODev"><code>attr <name> IODev <FRM-device></code></a>
- <br />assignes a specific FRM-device to OWX_ASYNC when working through an Arduino.
- <br />Required only if there is more than one FRM defined.</li>
- <li><a name="OWX_ASYNCmaxtimeouts"><code>attr <name> maxtimeouts <number></code></a>
- <br />maximum number of timeouts (in a row) before OWX_ASYNC disconnects itself from the
- busmaster and tries to establish a new connection</li>
- <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
- href="#event-on-update-reading">event-on-update-reading</a>, <a
- href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
- >room</a>, <a href="#eventMap">eventMap</a>,
- <a href="#webCmd">webCmd</a></li>
- </ul>
- <p><a name="OWX_CCC"></a>
- <h3>OWX_CCC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWX_CCC'>DE</a>]</div>
- <ul>
- See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
- </ul>
- <p><a name="OWX_FRM"></a>
- <h3>OWX_FRM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWX_FRM'>DE</a>]</div>
- <ul>
- See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
- </ul>
- <p><a name="OWX_SER"></a>
- <h3>OWX_SER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWX_SER'>DE</a>]</div>
- <ul>
- See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
- </ul>
- <p><a name="OWX_TCP"></a>
- <h3>OWX_TCP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#OWX_TCP'>DE</a>]</div>
- <ul>
- See <a href="/fhem/docs/commandref.html#OWX">OWX</a>
- </ul>
- <p><a name="PCA301"></a>
- <h3>PCA301</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PCA301'>DE</a>]</div>
- <ul>
- The PCA301 is a RF controlled AC mains plug with integrated power meter functionality from ELV.<br><br>
- It can be integrated in to FHEM via a <a href="#JeeLink">JeeLink</a> as the IODevice.<br><br>
- The JeeNode sketch required for this module can be found in .../contrib/arduino/36_PCA301-pcaSerial.zip.<br><br>
- <a name="PCA301Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> PCA301 <addr> <channel></code> <br>
- <br>
- addr is a 6 digit hex number to identify the PCA301 device.
- channel is a 2 digit hex number to identify the PCA301 device.<br><br>
- Note: devices are autocreated on reception of the first message.<br>
- </ul>
- <br>
- <a name="PCA301_Set"></a>
- <b>Set</b>
- <ul>
- <li>on</li>
- <li>off</li>
- <li>identify<br>
- Blink the status led for ~5 seconds.</li>
- <li>reset<br>
- Reset consumption counters</li>
- <li>statusRequest<br>
- Request device status update.</li>
- <li><a href="#setExtensions"> set extensions</a> are supported.</li>
- </ul><br>
- <a name="PCA301_Get"></a>
- <b>Get</b>
- <ul>
- </ul><br>
- <a name="PCA301_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>power</li>
- <li>consumption</li>
- <li>consumptionTotal<br>
- will be created as a default user reading to have a continous consumption value that is not influenced
- by the regualar reset or overflow of the normal consumption reading</li>
- </ul><br>
- <a name="PCA301_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>forceOn<br>
- try to switch on the device whenever an off status is received.</li>
- <li>offLevel<br>
- a power level less or equal <code>offLevel</code> is considered to be off. used only in conjunction with readonly.</li>
- <li>readonly<br>
- if set to a value != 0 all switching commands (on, off, toggle, ...) will be disabled.</li>
- <li>ignore<br>
- 1 -> ignore this device.</li>
- </ul><br>
- </ul>
- <p><a name="PHILIPS_AUDIO"></a>
- <h3>PHILIPS_AUDIO</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PHILIPS_AUDIO'>DE</a>]</div>
- <ul>
- <a name="PHILIPS_AUDIOdefine"></a>
- <b>Define</b>
- <br><br>
- <ul>
- <code>
- define <name> PHILIPS_AUDIO <device model> <ip-address> [<status_interval>]<br><br>
- define <name> PHILIPS_AUDIO <device model> [<off_status_interval>] [<on_status_interval>]
- </code>
- <br><br>
- This module controls a Philips Audio Player e.g. MCi, Streamium or Fidelio and potentially any other device controlled by the "myRemote" app.<br>
- You might also check, opening the following URL in the browser: http://[ip number of your device]:8889/index
- <br><br>
- (Tested on: AW9000, NP3500, NP3700 and NP3900)
- <br><br>
- Example:<br><br>
- <ul>
- <code>
- define player PHILIPS_AUDIO NP3900 192.168.0.15<br><br>
- # With custom status interval of 60 seconds<br>
- define PHAUDIO_player PHILIPS_AUDIO NP3900 192.168.0.15 <b>60</b><br><br>
- # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
- define PHAUDIO_player PHILIPS_AUDIO NP3900 192.168.0.15 <b>60 10</b><br>
- </code>
- <br>
- <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>
- </ul>
- </ul>
- <br>
- <a name="PHILIPS_AUDIOset"></a>
- <b>Set</b>
- <ul>
- <code>
- set <name> <command> [<parameter>]
- </code><br><br>
- <i>Note: Commands and parameters are case sensitive.</i><br>
- <ul><br>
- <li><b>favoriteAdd</b> – Adds currently played Internet Radio stream to favorites</li>
- <li><b>favoriteRemove</b> – Removes currently played Internet Radio stream from favorites</li>
- <li><b>getFavorites</b> – Reads stored favorites from the device (may take some time...)</li>
- <li><b>getMediaRendererDesc</b> – Reads device specific information (stored in the deviceInfo reading)</li>
- <li><b>getPresets</b> – Reads stored presets from the device (may take some time...)</li>
- <li><b>input</b> – Selects the following input</li>
- <ul>
- <li><b>analogAux</b> – Selects the analog AUX input (AW9000 only)</li>
- <li><b>digital1Coaxial</b> – Selects the digital coaxial input (AW9000 only)</li>
- <li><b>digital2Optical</b> – Selects the digital optical input (AW9000 only)</li>
- <li><b>internetRadio</b> – Selects the Internet Radio input</li>
- <li><b>mediaLibrary</b> – Selects the Media Library input (UPnP/DLNA server) (not available on AW9000)</li>
- <li><b>mp3Link</b> – Selects the analog MP3 Link input (not available on AW9000)</li>
- <li><b>onlineServices</b> – Selects the Online Services input</li>
- </ul>
- <li><b>mute [ on | off ]</b> – Mutes/unmutes the device</li>
- <li><b>player</b> – Player related commands</li>
- <ul>
- <li><b>next</b> – Selects next audio stream</li>
- <li><b>prev</b> – Selects previous audio stream</li>
- <li><b>play-pause</b> – Plays/pauses the current audio stream</li>
- <li><b>stop</b> – Stops the current audio stream</li>
- </ul>
- <li><b>repeat [ single | all | off]</b> – Selects the repeate mode</li>
- <li><b>selectFavorite [ name ]</b> – Selects a favorite. Empty if no favorites found. (see also getFavorites)</li>
- <li><b>selectFavoriteByNumber [ number ]</b> – Selects a favorite by its number. Empty if no favorites found. (see also getFavorites)</li>
- <li><b>selectPreset [ name ]</b> – Selects a preset. Empty if no presets found. (see also getPresets)</li>
- <li><b>selectPresetByNumber [ number ]</b> – Selects a preset by its number. Empty if no presets found. (see also getPresets)</li>
- <li><b>selectStream [ name ]</b> – 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>
- <li><b>shuffle [ on | off ]</b> – Sets the shuffle mode</li>
- <li><b>standbyButton</b> – Emulates the standby button. Toggles between standby and power on</li>
- <li><b>volume</b> – Sets the relative volume 0...100%</li>
- <li><b>volumeDown</b> – Sets the device specific volume by one decrement</li>
- <li><b>volumeStraight</b> – Sets the device specific absolute volume 0...64</li>
- <li><b>volumeUp</b> – Sets the device specific volume by one increment</li>
- </ul>
- </ul>
- <br>
- <a name="PHILIPS_AUDIOget"></a>
- <b>Get</b>
- <ul>
- <code>
- get <name> <reading> <reading name>
- </code>
- <ul>
- <br>
- <li><b>deviceInfo</b> – Returns device specific information</li>
- <li><b>reading</b></li>
- <ul>
- <li><b>input</b> – Returns current input or '-' if not playing</li>
- <li><b>listItem_xxx</b> – Returns player list item (limited to 999 entries)</li>
- <li><b>networkError</b> – Shows an occured current network error</li>
- <li><b>networkRequest</b> – Shows current network activity (idle/busy)</li>
- <li><b>power</b> – Returns power status (on/off)</li>
- <li><b>playerAlbum</b> – Returns the album name of played stream</li>
- <li><b>playerAlbumArt</b> – Returns the album art of played audio stream</li>
- <li><b>playerListStatus</b> – Returns current player list status (busy/ready)</li>
- <li><b>playerListTotalCount</b> – Returns number of player list entries</li>
- <li><b>playerPlayTime</b> – Returns audio stream duration</li>
- <li><b>playerPlaying</b> – Returns current player playing state (yes/no)</li>
- <li><b>playerRadioStation</b> – Returns the name of played radio station</li>
- <li><b>playerRadioStationInfo</b> – Returns additional info of the played radio station</li>
- <li><b>playerRepeat</b> – Returns current repeat mode (off/single/all)</li>
- <li><b>playerShuffle</b> – Returns current shuffle mode (on/off)</li>
- <li><b>playerState</b> – Returns current player state (home/browsing/playing)</li>
- <li><b>playerStreamFavorite</b> – Shows if audio stream is a favorite (yes/no)</li>
- <li><b>playerStreamRating</b> – Shows rating of the audio stream</li>
- <li><b>playerTitle</b> – Returns audio stream's title</li>
- <li><b>playerTotalTime</b> – Shows audio stream's total time</li>
- <li><b>presence</b> – Returns peresence status (present/absent)</li>
- <li><b>state</b> – Returns current state (on/off)</li>
- <li><b>totalFavorites</b> – Returns total number of stored favorites (see getFavorites)</li>
- <li><b>totalPresets</b> – Returns total number of stored presets (see getPresets)</li>
- <li><b>volume</b> – Returns current relative volume (0...100%)</li>
- <li><b>volumeStraight</b> – Returns current device absolute volume (0...64)</li>
- </ul>
- </ul>
- <br>
- </ul>
- <a name="PHILIPS_AUDIOattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <ul>
- <li><b>autoGetFavorites</b> – Automatically read favorites from device if none available (default off)</li>
- <li><b>autoGetPresets</b> – Automatically read presets from device if none available (default off)</li>
- <li><b>do_not_notify</b></li>
- <li><b>httpBufferTimeout</b> – Optional attribute defing the internal http buffer timeount (default 10)</li>
- <li><b>maxListItems</b> – Defines max. number of player list items (default 100)</li>
- <li><b>playerBrowsingTimeout</b> – 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>
- <li><b>readingFnAttributes</b></li>
- <li><b>requestTimeout</b> – Optional attribute defining the http response timeout (default 4 seconds)</li>
- </ul>
- </ul>
- <br>
- </ul>
- <p><a name="PHTV"></a>
- <h3>PHTV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PHTV'>DE</a>]</div>
- <ul>
- <a name="PHTVdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> PHTV <ip-address-or-hostname> [<poll-interval>]</code>
- <br><br>
- This module controls Philips TV devices and their Ambilight via network connection.<br><br>
- Defining a PHTV device will schedule an internal task (interval can be set
- with optional parameter <poll-interval> in seconds, if not set, the value is 45
- seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br><br>
- Example:<br>
- <ul><code>
- define PhilipsTV PHTV 192.168.0.10
- <br><br>
- # With custom interval of 20 seconds<br>
- define PhilipsTV PHTV 192.168.0.10 20
- </code></ul>
- <br>
- <br>
- <i>Note:</i> Some older devices might need to have the API activated first. If you get no response from your
- device, try to input "5646877223" on the remote while watching TV (which spells jointspace on the digits).
- A popup might appear stating the API was successfully enabled.
- </ul>
- <br>
- <br>
- <a name="PHTVset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <command> [<parameter>]</code>
- <br><br>
- Currently, the following commands are defined.<br>
- <ul>
- <li><b>on</b> - powers on the device and send a WoL magic package if needed</li>
- <li><b>off</b> - turns the device in standby mode</li>
- <li><b>toggle</b> - switch between on and off</li>
- <li><b>channel</b> channel,0...999,sRef - zap to specific channel or service reference</li>
- <li><b>channelUp</b> - zap to next channel</li>
- <li><b>channelDown</b> - zap to previous channel</li>
- <li><b>volume</b> 0...100 - set the volume level in percentage</li>
- <li><b>volumeStraight</b> 1...60 - set the volume level in device specific range</li>
- <li><b>volumeUp</b> - increases the volume level</li>
- <li><b>volumeDown</b> - decreases the volume level</li>
- <li><b>mute</b> on,off,toggle - controls volume mute</li>
- <li><b>input</b> ... - switches between inputs</li>
- <li><b>statusRequest</b> - requests the current status of the device</li>
- <li><b>remoteControl</b> UP,DOWN,... - sends remote control commands; see remoteControl help</li>
- <li><b>ambiHue</b> on,off - activates/disables Ambilight+Hue function</li>
- <li><b>ambiMode</b> internal,manual,expert - set source register for Ambilight</li>
- <li><b>ambiPreset</b> - set Ambilight to predefined state</li>
- <li><b>rgb</b> HEX,LED address - set an RGB value for Ambilight</li>
- <li><b>hue</b> 0-65534 - set the color hue value Ambilight</li>
- <li><b>sat</b> 0-255 - set the saturation value for Ambilight</li>
- <li><b>bri</b> 0-255 - set the brightness value for Ambilight</li>
- <li><b>play</b> - starts/resumes playback</li>
- <li><b>pause</b> - starts/resumes playback</li>
- <li><b>stop</b> - stops current playback</li>
- <li><b>record</b> - starts recording of current channel</li>
- </ul>
- </ul>
- <ul>
- <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'.
- The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
- </ul>
- <br>
- <br>
- <ul>
- <u>Advanced Ambilight Control</u><br>
- <br>
- <ul>
- 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>
- <br><br>
- LED addressing format:<br>
- <code><Layer><Side><LED number></code>
- <br><br>
- <u>Examples:</u><br>
- <ul>
- <code># set LED 0 on left side within layer 1 to color RED<br>
- set PhilipsTV rgb L1L0:FF0000
- <br><br>
- # set LED 0, 2 and 4 on left side within layer 1 to color RED<br>
- set PhilipsTV rgb L1L0:FF0000 L1L2:FF0000 L1L4:FF0000
- <br><br>
- # set complete right side within layer 1 to color GREEN<br>
- set PhilipsTV rgb L1R:00FF00
- <br><br>
- # set complete layer 1 to color BLUE
- set PhilipsTV rgb L1:0000FF</code>
- </ul><br>
- </ul>
- </ul>
- <br>
- <br>
- <br>
- <br>
- <ul>
- <u>Advanced Ambilight+HUE Control</u><br>
- <br>
- <ul>
- Linking to your HUE devices within attributes ambiHueLeft, ambiHueTop, ambiHueRight and ambiHueBottom uses some defaults to calculate the actual color.<br>
- More than one HUE device may be added using blank.<br>
- The following settings can be fine tuned for each HUE device:<br>
- <br>
- <li>LED(s) to be used as color source<br>
- 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>
- <li>saturation in percent of the original value (1-99, default=100)</li>
- <li>brightness in percent of the original value (1-99, default=100)</li>
- <br><br>
- Use the following addressing format for fine tuning:<br>
- <code>devicename:<LEDs$gt;:<saturation$gt;:<brightness$gt;</code>
- <br><br>
- <u>Examples:</u><br>
- <ul>
- <code># to push color from top to 2 HUE devices<br>
- attr PhilipsTV ambiHueTop HUEDevice0 HUEDevice1
- <br><br>
- # to use only LED 4 from the top as source<br>
- attr PhilipsTV ambiHueTop HUEDevice0:4
- <br><br>
- # to use a combination of LED's 1+2 as source<br>
- attr PhilipsTV ambiHueTop HUEDevice0:1-2
- <br><br>
- # to use LED's 1+2 and only 90% of their saturation<br>
- attr PhilipsTV ambiHueTop HUEDevice0:1-2:90
- <br><br>
- # to use LED's 1+2 and only 50% of their brightness<br>
- attr PhilipsTV ambiHueTop HUEDevice0:1-2::50
- <br><br>
- # to use LED's 1+2, 90% saturation and 50% brightness<br>
- attr PhilipsTV ambiHueTop HUEDevice0:1-2:90:50
- <br><br>
- # to use default LED settings but only adjust their brightness to 50%<br>
- attr PhilipsTV ambiHueTop HUEDevice0:::50</code>
- </ul><br>
- </ul>
- </ul>
- <br>
- <br>
- <a name="PHTVget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <what></code>
- <br><br>
- Currently, the following commands are defined:<br><br>
- <ul><code>channel<br>
- mute<br>
- power<br>
- input<br>
- volume<br>
- rgb<br>
- </code></ul>
- </ul>
- <br>
- <br>
- <a name="PHTVattr"></a>
- <b>Attributes</b><br>
- <ul><ul>
- <li><b>ambiHueLeft</b> - HUE devices that should get the color from left Ambilight.</li>
- <li><b>ambiHueTop</b> - HUE devices that should get the color from top Ambilight.</li>
- <li><b>ambiHueRight</b> - HUE devices that should get the color from right Ambilight.</li>
- <li><b>ambiHueBottom</b> - HUE devices that should get the color from bottom Ambilight.</li>
- <li><b>ambiHueLatency</b> - Controls the update interval for HUE devices in milliseconds; defaults to 200 ms.</li>
- <li><b>channelsMax</b> - Maximum amount of channels shown in FHEMWEB. Defaults to 80.</li>
- <li><b>disable</b> - Disable polling (true/false)</li>
- <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>
- <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>
- <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>
- <li><b>sequentialQuery</b> - avoid parallel queries for low-performance devices</li>
- <li><b>timeout</b> - Set different polling timeout in seconds (default=7)</li>
- </ul></ul>
- <br>
- <br>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul><ul>
- <li><b>ambiHue</b> - Ambilight+Hue status</li>
- <li><b>ambiLEDBottom</b> - Number of LEDs of bottom Ambilight</li>
- <li><b>ambiLEDLayers</b> - Number of physical LED layers</li>
- <li><b>ambiLEDLeft</b> - Number of LEDs of left Ambilight</li>
- <li><b>ambiLEDRight</b> - Number of LEDs of right Ambilight</li>
- <li><b>ambiLEDTop</b> - Number of LEDs of top Ambilight</li>
- <li><b>ambiMode</b> - current Ambilight color source</li>
- <li><b>channel</b> - Shows the service name of current channel; part of FHEM-4-AV-Devices compatibility</li>
- <li><b>country</b> - Set country</li>
- <li><b>currentMedia</b> - The preset number of this channel; part of FHEM-4-AV-Devices compatibility</li>
- <li><b>frequency</b> - Shows current channels frequency</li>
- <li><b>input</b> - Shows currently used input; part of FHEM-4-AV-Devices compatibility</li>
- <li><b>language</b> - Set menu language</li>
- <li><b>model</b> - Device model</li>
- <li><b>mute</b> - Reports the mute status of the device (can be "on" or "off")</li>
- <li><b>onid</b> - The ON ID</li>
- <li><b>power</b> - Reports the power status of the device (can be "on" or "off")</li>
- <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>
- <li><b>receiveMode</b> - Receiving mode (analog or DVB)</li>
- <li><b>rgb</b> - Current Ambilight color if ambiMode is not set to internal and all LEDs have the same color</li>
- <li><b>rgb_X</b> - Current Ambilight color of a specific LED if ambiMode is not set to internal</li>
- <li><b>serialnumber</b> - Device serial number</li>
- <li><b>servicename</b> - Name for current channel</li>
- <li><b>sid</b> - The S-ID</li>
- <li><b>state</b> - Reports current power state and an absence of the device (can be "on", "off" or "absent")</li>
- <li><b>systemname</b> - Device system name</li>
- <li><b>tsid</b> - The TS ID</li>
- <li><b>volume</b> - Reports current volume level of the receiver in percentage values (between 0 and 100 %)</li>
- <li><b>volumeStraight</b> - Reports current volume level of the receiver in device specific range</li>
- </ul></ul>
- </ul>
- <p><a name="PID20"></a>
- <h3>PID20</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PID20'>DE</a>]</div>
- <ul>
- <a name="PID20define"></a>
- <b>Define</b>
- <ul>
- <br/>
- <code>define <name> PID20 <sensor[:reading[:regexp]]> <actor:cmd ></code>
- <br/><br/>
- This module provides a PID device, using <sensor> and <actor><br/>
- </ul>
- <br/><br/>
- <a name="PID20set"></a>
- <b>Set-Commands</b><br/>
- <ul>
- <br/>
- <code>set <name> desired <value></code>
- <br/><br/>
- <ul>Set desired value for PID</ul>
- <br/>
- <br/>
- <code>set <name> start</code>
- <br/><br/>
- <ul>Start PID processing again, using frozen values from former stop.</ul>
- <br/>
- <br/>
- <code>set <name> stop</code>
- <br/><br/>
- <ul>PID stops processing, freezing all values.</ul>
- <br/>
- <br/>
- <code>set <name> restart <value></code>
- <br/><br/>
- <ul>Same as start, but uses value as start value for actor</ul>
- <br/>
- </ul>
- <br/><br/>
- <a name="PID20get"></a>
- <b>Get-Commands</b><br/>
- <ul>
- <br/>
- <code>get <name> params</code>
- <br/><br/>
- <ul>Get list containing current parameters.</ul>
- <br/>
- </ul>
- <br/><br/>
- <a name="PID20attr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <br/>
- <li><b>disable</b> - disable the PID device, possible values: 0,1; default: 0</li>
- <li><b>pidActorValueDecPlaces</b> - number of demicals, possible values: 0..5; default: 0</li>
- <li><b>pidActorInterval</b> - number of seconds to wait between to commands sent to actor; default: 180</li>
- <li><b>pidActorTreshold</b> - threshold to be reached before command will be sent to actor; default: 1</li>
- <li><b>pidActorErrorAction</b> - required action on error, possible values: freeze,errorPos; default: freeze</li>
- <li><b>pidActorErrorPos</b> - actor's position to be used in case of error; default: 0</li>
- <li><b>pidActorKeepAlive</b> - number of seconds to force command to be sent to actor; default: 1800</li>
- <li><b>pidActorLimitLower</b> - lower limit for actor; default: 0</li>
- <li><b>pidActorLimitUpper</b> - upper limit for actor; default: 100</li>
- <li><b>pidCalcInterval</b> - interval (seconds) to calculate new pid values; default: 60</li>
- <li><b>pidDeltaTreshold</b> - if delta < delta-threshold the pid will enter idle state; default: 0</li>
- <li><b>pidDesiredName</b> - reading's name for desired value; default: desired</li>
- <li><b>pidFactor_P</b> - P value for PID; default: 25</li>
- <li><b>pidFactor_I</b> - I value for PID; default: 0.25</li>
- <li><b>pidFactor_D</b> - D value for PID; default: 0</li>
- <li><b>pidMeasuredName</b> - reading's name for measured value; default: measured</li>
- <li><b>pidSensorTimeout</b> - number of seconds to wait before sensor will be recognized n/a; default: 3600</li>
- <li><b>pidReverseAction</b> - reverse PID operation mode, possible values: 0,1; default: 0</li>
- <li><b>pidUpdateInterval</b> - number of seconds to wait before an update will be forced for plotting; default: 300</li>
- <li><b>pidActorCallBeforeSetting</b> - an optional callback-function,which can manipulate the actorValue; default: not defined
- <pre>
- # Exampe for callback-function
- # 1. argument = name of PID20
- # 2. argument = current actor value
- sub PIDActorSet($$)
- {
- my ( $name, $actValue ) = @_;
- if ($actValue>70)
- {
- $actValue=100;
- }
- return $actValue;
- }</pre>
- </li>
- <li><b>pidIPortionCallBeforeSetting</b> - an optional callback-function, which can manipulate the value of I-Portion; default: not defined
- <pre>
- # Exampe for callback-function
- # 1. argument = name of PID20
- # 2. argument = current i-portion value
- sub PIDIPortionSet($$)
- {
- my ( $name, $actValue ) = @_;
- if ($actValue>70)
- {
- $actValue=70;
- }
- return $actValue;
- }</pre>
- </li>
- </ul>
- <br/><br/>
- <b>Generated Readings/Events:</b>
- <br/><br/>
- <ul>
- <li><b>actuation</b> - real actuation set to actor</li>
- <li><b>actuationCalc</b> - internal actuation calculated without limits</li>
- <li><b>delta</b> - current difference desired - measured</li>
- <li><b>desired</b> - desired value</li>
- <li><b>measured</b> - measured value</li>
- <li><b>p_p</b> - p value of pid calculation</li>
- <li><b>p_i</b> - i value of pid calculation</li>
- <li><b>p_d</b> - d value of pid calculation</li>
- <li><b>state</b> - current device state</li>
- <br/>
- Names for desired and measured readings can be changed by corresponding attributes (see above).<br/>
- </ul>
- <br/><br/>
- <b>Additional information</b><br/><br/>
- <ul>
- <li><a href="http://forum.fhem.de/index.php/topic,17067.0.html">Discussion in FHEM forum</a></li><br/>
- <li><a href="http://www.fhemwiki.de/wiki/PID20_-_Der_PID-Regler">Information in FHEM wiki</a></li><br/>
- </ul>
- </ul>
- <p><a name="PIFACE"></a>
- <h3>PIFACE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PIFACE'>DE</a>]</div>
- <ul>
- 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>
- PIFACE controls the input ports 0..7 and output ports 0..7.
- <ul>
- <li>The relays 0 and 1 have corresponding output port 0 and 1.</li>
- <li>The switches 0..3 have corresponding input ports 0..3 and must be read with attr portMode<0..7> = up</li>
- </ul>
- The status of the ports can be displayed periodically. The update of the states via interrupt is not supported.<br>
- The module can be periodically monitored by a watchdog function.<br>
- The ports can be read and controlled individually by the function <a href="#readingsProxy">readingsProxy</a>.<br>
- PIFACE is tested with the Raspbian OS.<br><br>
-
- <b>Preparatory Work</b><br>
- The use of PIFACE module requires some preparatory work. The module needs the <a href=http://wiringpi.com>Wiring Pi</a> tool.
- <ul>
- <br>
- Raspbian Wheezy<br>
- <li>Install it with<br>
- <code>git clone git://git.drogon.net/wiringPi<br>
- cd wiringPi<br>
- ./build</code><br>
- </li>
- Raspbian Jessie<br>
- <li>Install it with<br>
- <code>sudo apt-get install wiringpi</code><br>
- </li>
- <li>PiFace Digital need the SPI pins on the Raspberry Pi to be enabled in order to function.
- Start <code>sudo raspi-config</code>, select <code>Advanced Options</code>
- and set the <code>A5 SPI</code> option to "Yes".
- </li>
- <li>The function of the PiFace Digital can be tested at OS command line. For example:<br>
- <code>gpio -p readall</code><br>
- <code>gpio -p read 200</code><br>
- <code>gpio -p write 201 0</code> or <code>gpio -p write 201 1</code><br>
- </li>
- <li>The watchdog function monitors the input port 7 and the output port 7.<br>
- If the watchdog is enabled, this ports can not be used for other tasks.
- In order to monitor the input port 7, it must be connected to the ground!<br>
- The OS command "shutdown" must be enable for fhem if an OS restart is to
- be executed in case of malfunction. For example, with <code>chmod +s /sbin/shutdown</code>
- or <code>sudo chmod +s /sbin/shutdown</code>.<br>
- </li>
- </ul>
- <ul>
- <br>
- Raspbian Jessie<br>
- <li>PiFace Digital need the SPI pins on the Raspberry Pi to be enabled in order to function.
- Start <code>sudo raspi-config</code>, select <code>9 Advanced Options</code>
- and set the <code>A6 SPI</code> option to "Yes".
- </li>
- <li>The function of the PiFace Digital can be tested at OS command line. For example:<br>
- <code>gpio -p readall</code><br>
- <code>gpio -p read 200</code><br>
- <code>gpio -p write 201 0</code> or <code>gpio -p write 201 1</code><br>
- </li>
- <li>The watchdog function monitors the input port 7 and the output port 7.<br>
- If the watchdog is enabled, this ports can not be used for other tasks.
- In order to monitor the input port 7, it must be connected to the ground!<br>
- The OS command "shutdown" must be enable for fhem if an OS restart is to
- be executed in case of malfunction. For example, with <code>chmod +s /sbin/shutdown</code>
- or <code>sudo chmod +s /sbin/shutdown</code>.<br>
- </li>
- </ul>
- <br>
-
- <a name="PIFACEdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> PIFACE</code><br>
- </ul><br>
- <a name="PIFACEset"></a>
- <b>Set</b><br/>
- <ul>
- <br/>
- <code>set <name> <port> <value></code>
- <br/><br/>
- <ul>
- <li>set single port n to 1 (on) or 0 (off)<br/><br/>
- Examples:<br/>
- set <name> 3 1 => set port 3 on<br/>
- set <name> 5 0 => set port 5 off<br/></li>
- <br/>
- <li>set all ports in one command by bitmask<br/><br/>
- Example:<br/>
- set <name> all 255 => set all ports on<br/>
- set <name> all 0 => set all ports off<br/>
- set <name> all 170 => bitmask(170) = 10101010 => set ports 1 3 5 7 on, ports 0 2 4 6 off<br/>
- <br/>
- <ul>
- <code>port 76543210<br/>
- bit 10101010</code>
- </ul></li>
- </ul>
- </ul>
- <br>
- <a name="PIFACEget"></a>
- <b>Get</b><br/>
- <ul>
- <br/>
- <code>get <name> <port></code>
- <br/><br/>
- <ul>
- <li>get state of single port<br/><br/>
- Example:<br/>
- get <name> 3 => get state of port 3<br/>
- </li>
- <br/>
- <li>get state of input ports and update changed readings<br/><br/>
- Example:<br/>
- get <name> in => get state of all input ports<br/>
- </li>
- <br/>
- <li>get state of out ports and update changed readings<br/><br/>
- Example:<br/>
- get <name> out => get state of all output ports<br/>
- </li>
- <br/>
- <li>get state of input and out ports and update all readings<br/><br/>
- Example:<br/>
- get <name> all => get state of all ports<br/>
- </li>
- </ul>
- </ul>
- <br>
- <a name="PIFACEattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <li><a name="PIFACE_defaultState">defaultState</a> last|off|0|1,
- [defaultState] = off is default.<br>
- Restoration of the status of the output port after a Fhem reboot.
- </li>
- <li><a href="#PIFACE_disable">disable</a> 0|1<br>
- If applied set commands will not be executed.
- </li>
- <li><a href="#PIFACE_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...<br>
- Space separated list of HH:MM tupels. If the current time is between
- the two time specifications, set commands will not be executed. Instead of
- HH:MM you can also specify HH or HH:MM:SS. To specify an interval
- spawning midnight, you have to specify two intervals, e.g.:
- <ul>
- 23:00-24:00 00:00-01:00
- </ul>
- </li>
- <li><a name="PIFACE_pollInterval">pollInterval</a> off|1,2,...,9,10,
- [pollInterval] = off is default.<br>
- Define the polling interval of the input ports in seconds.
- </li>
- <li><a name="PIFACE_portMode<0..7>">portMode<0..7></a> tri|up,
- [portMode<0..7>] = tri is default.<br>
- This enables (up) or disables (tri) the internal pull-up resistor on the given input port.
- You need to enable the pull-up if you want to read any of the on-board switches on the PiFace board.
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><a name="PIFACE_watchdog">watchdog</a> off|on|silent,
- [watchdog] = off is default.<br>
- The function of the PiFace extension can be monitored periodically.
- The watchdog module checks the function of ports in7 and out7.
- If the watchdog function is to be used, ports in7 and out7 are reserved for this purpose.
- The port 7 must be connected to ground.<br>
- If [watchdog] = on, the result of which is periodically logged and written to the reading watchdog.<br>
- If [watchdog] = silent, FHEM is restarted after the first error detected.
- If the error could not be eliminated, then the Raspberry operating system is restarted.
- If the error is not corrected as well, the monitoring function is disabled and the error is logged.
- </li>
- <li><a name="PIFACE_watchdogInterval">watchdogInterval</a> 10..65535,
- [watchdogInterval] = 60 is default.<br>
- Interval between two monitoring tests in seconds.
- </li>
- </ul>
- <br>
- <b>Generated Readings/Events:</b>
- <br/><br/>
- <ul>
- <li><out0..out7>: 0|1<br>
- state of output port 0..7</li>
- <li><in0..in7>: 0|1<br>
- state of input port 0..7</li>
- <li>watchdog: off|ok|error|restart|start<br>
- state of the watchdog function</li>
- <li>state: active|error</li><br>
- </ul>
-
- </ul>
- <p><a name="PIONEERAVR"></a>
- <h3>PIONEERAVR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PIONEERAVR'>DE</a>]</div>
- <ul>
- This module allows to remotely control a Pioneer AV receiver (only the Main zone, other zones are controlled by the module PIONEERAVRZONE)
- equipped with an Ethernet interface or a RS232 port.
- It enables Fhem to
- <ul>
- <li>switch ON/OFF the receiver</li>
- <li>adjust the volume</li>
- <li>set the input source</li>
- <li>and configure some other parameters</li>
- </ul>
- <br><br>
- 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>
- and tested with a Pioneer AV receiver VSX-923 from <a href="http://www.pioneer.de">Pioneer</a>.
- <br><br>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module
- if the module is connected via serial Port or USB.
- <br><br>
- This module tries to
- <ul>
- <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>
- <li>forwards data to the module PIONEERAVRZONE to control the ZONEs of a Pioneer AV receiver</li>
- </ul>
- 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.
- Some Pioneer AV receivers offer more than one port though. From Pioneer recommend port numbers:00023,49152-65535, Invalid port numbers:00000,08102
- <br><br>
- <a name="PIONEERAVRdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> PIONEERAVR telnet <IPAddress:Port></code><br><br>
- or<br><br>
- <code>define <name> PIONEERAVR serial <SerialDevice>[<@BaudRate>]</code>
- <br><br>
- Defines a Pioneer AV receiver device (communication interface and main zone control). The keywords <code>telnet</code> or
- <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>
- Note: PIONEERAVRZONE devices to control zone2, zone3 and/or HD-zone are autocreated on reception of the first message for those zones.<br><br>
- Examples:
- <ul>
- <code>define VSX923 PIONEERAVR telnet 192.168.0.91:23</code><br>
- <code>define VSX923 PIONEERAVR serial /dev/ttyS0</code><br>
- <code>define VSX923 PIONEERAVR serial /dev/ttyUSB0@9600</code><br>
- </ul>
- <br>
- </ul>
- <a name="PIONEERAVRset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <what> [<value>]</code>
- <br><br>
- where <what> is one of
- <li><b>bass <-6 ... 6></b> - Bass from -6dB to + 6dB (is only available if tone = on and the ListeningMode supports it)</li>
- <li><b>channel <1 ... 9></b> - To change the tuner preset. Only available for input = 2 (Tuner)</li>
- <li><b>channelDown</b> - Changes to the next lower tuner preset. Only available for input = 2 (Tuner)</li>
- <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)
- <li><b>channelUp</b> - Changes to the next higher tuner preset. Only available for input = 2 (Tuner)</li>
- <li><b>down</b> - "arrow key down". Available for the same inputs as "play"</li>
- <li><b>enter</b> - "Enter key". Available for the same inputs as "play" </li>
- <li><b>eq <on|off></b> - Turns the equalizer on or off</li>
- <li><b>fwd</b> - Fast forward. Available for the same inputs as "play"</li>
- <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>
- <li><b>input <not on the Pioneer hardware deactivated input></b> The list of possible (i.e. not deactivated)
- inputs is read in during Fhem start and with <code>get <name> statusRequest</code>. Renamed inputs are shown with their new (renamed) name</li>
- <li><b>inputDown</b> - Select the next lower input for the Main Zone</li>
- <li><b>inputUp</b> - Select the next higher input for the Main Zone</li>
- <li><b>left</b> - "Arrow key left". Available for the same inputs as "play"</li>
- <li><b>listeningMode</b> - Sets a ListeningMode e.g. autoSourround, direct, action,...</li>
- <li><b>mcaccMemory <1...6></b> - Sets one of the 6 predefined MCACC settings for the Main Zone</li>
- <li><b>menu</b> - "Menu-key" of the remote control. Available for the same inputs as "play"</li>
- <li><b>mute <on|off|toggle></b> - Mute the Main Zone of the Pioneer AV Receiver. "mute = on" means: Zero volume</li>
- <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 <name> networkStandby on</code> should do this</li>
- <li><b>next</b> - Available for the same inputs as "play"</li>
- <li><b>off</b> - Switch the Main Zone to standby</li>
- <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>
- <li><b>pause</b> - Pause replay. Available for the same inputs as "play"</li>
- <li><b>play</b> - Starts replay for the following inputs:
- <ul>
- <li>usbDac</li>
- <li>ipodUsb</li>
- <li>xmRadio</li>
- <li>homeMediaGallery</li>
- <li>sirius</li>
- <li>adapterPort</li>
- <li>internetRadio</li>
- <li>pandora</li>
- <li>mediaServer</li>
- <li>favorites</li>
- <li>mhl</li>
- </ul>
- </li>
- <li><b>prev</b> - Changes to the previous title. Available for the same inputs as "play".</li>
- <li><b>raw <PioneerKommando></b> - Sends the command <code><PioneerCommand></code> unchanged to the Pioneer AV receiver. A list of all available commands is available in the Pioneer documentation mentioned above</li>
- <li><b>remoteControl <attr></b> - where <attr> is one of:
- <ul>
- <li>cursorDown</li>
- <li>cursorRight</li>
- <li>cursorLeft</li>
- <li>cursorEnter</li>
- <li>cursorReturn</li>
- <li>homeMenu</li>
- <li>statusDisplay</li>
- <li>audioParameter</li>
- <li>hdmiOutputParameter</li>
- <li>videoParameter</li>
- <li>homeMenu</li>
- Simulates the keys of the remote control. Warning: The cursorXX keys cannot change the inputs -> set <name> up ... can be used for this
- </ul>
- </li>
- <li><b>reopen</b> - Tries to reconnect Fhem to the Pioneer AV Receiver</li>
- <li><b>repeat</b> - Repeat for the following inputs: AdapterPort, Ipod, Favorites, InternetRadio, MediaServer. Cycles between
- <ul>
- <li>no repeat</li>
- <li>repeat current title</li>
- <li>repeat all titles</li>
- </ul>
- </li>
- <li><b>return</b> - "Return key". Available for the same inputs as "play"</li>
- <li><b>rev</b> - "rev key". Available for the same inputs as "play"</li>
- <li><b>right</b> - "Arrow key right". Available for the same inputs as "play"</li>
- <li><b>selectLine01 - selectLine08</b> - Available for the same inputs as "play". If there is an OSD you can select the lines directly</li>
- <li><b>shuffle</b> - Random replay. For the same inputs available as "repeat". Toggles between random on and off</li>
- <li><b>signalSelect <auto|analog|digital|hdmi|cycle></b> - Signal select function </li>
- <li><b>speakers <off|A|B|A+B></b> - Turns speaker A and or B on or off.</li>
- <li><b>standingWave <on|off></b> - Turns Standing Wave on or off for the Main Zone</li>
- <li><b>statusRequest</b> - Asks the Pioneer AV Receiver for information to update the modules readings</li>
- <li><b>stop</b> - Stops replay. Available for the same inputs as "play"</li>
- <li><b>toggle</b> - Toggle the Main Zone to/from Standby</li>
- <li><b>tone <on|bypass></b> - Turns tone on or in bypass</li>
- <li><b>treble <-6 ... 6></b> - Treble from -6dB to + 6dB (works only if tone = on and the ListeningMode permits it)</li>
- <li><b>up</b> - "Arrow key up". Available for the same inputs as "play"</li>
- <li><b>volume <0 ... 100></b> - Volume of the Main Zone in % of the maximum volume</li>
- <li><b>volumeDown</b> - Reduce the volume of the Main Zone by 0.5dB</li>
- <li><b>volumeUp</b> - Increase the volume of the Main Zone by 0.5dB</li>
- <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>
- <li><a href="#setExtensions">set extensions</a> are supported (except <code><blink></code> )</li>
- <br><br>
- Example:
- <ul>
- <code>set VSX923 on</code><br>
- </ul>
- <br>
- <code>set <name> reopen</code>
- <br><br>
- Closes and reopens the device. Could be handy if the connection between Fhem and the Pioneer AV receiver is lost and cannot be
- reestablished automatically.
- <br><br>
- </ul>
- <a name="PIONEERAVRget"></a>
- <b>Get</b>
- 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.
- <ul>
- <li><b>loadInputNames</b> - reads the names of the inputs from the Pioneer AV receiver and checks if those inputs are enabled</li>
- <li><b>audioInfo</b> - get the current audio parameters from the Pioneer AV receiver (e.g. audioInputSignal, audioInputFormatXX, audioOutputFrequency)</li>
- <li><b>display</b> - updates the reading 'display' and 'displayPrevious' with what is shown on the display of the Pioneer AV receiver</li>
- <li><b>bass</b> - updates the reading 'bass'</li>
- <li><b>channel</b> - </li>
- <li><b>currentListIpod</b> - updates the readings currentAlbum, currentArtist, etc. </li>
- <li><b>currentListNetwork</b> - </li>
- <li><b>display</b> - </li>
- <li><b>input</b> - </li>
- <li><b>listeningMode</b> - </li>
- <li><b>listeningModePlaying</b> - </li>
- <li><b>macAddress</b> - </li>
- <li><b>avrModel</b> - get the model of the Pioneer AV receiver, eg. VSX923 </li>
- <li><b>mute</b> - </li>
- <li><b>networkPorts</b> - get the open tcp/ip ports of the Pioneer AV Receiver</li>
- <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>
- <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>
- <li><b>power</b> - get the Power state of the Pioneer AV receiver </li>
- <li><b>signalSelect</b> - </li>
- <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>
- <li><b>speakers</b> - </li>
- <li><b>speakerSystem</b> - </li>
- <li><b>tone</b> - </li>
- <li><b>tunerFrequency</b> - get the current frequency the tuner is set to</li>
- <li><b>tunerChannelNames</b> - </li>
- <li><b>treble</b> - </li>
- <li><b>volume</b> - </li>
- </ul>
- <br><br>
- <a name="PIONEERAVRattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li>
- <b>connectionCheck</b> 1..120,off Pings the Pioneer AVR every X seconds to verify connection status. Defaults to 60 seconds.
- </li>
- <li>
- <b>timeout</b> 1,2,3,4,5,7,10,15 Max time in seconds till the Pioneer AVR replies to a ping. Defaults to 3 seconds.
- </li>
- <li><b>checkStatusStart <enable|disable></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>
- <li><b>checkStatusReconnect <enable|disable></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>
- <li><b>logTraffic <loglevel></b> - Enables logging of sent and received datagrams with the given loglevel.
- Control characters in the logged datagrams are escaped, i.e. a double backslash is shown for a single backslash,
- \n is shown for a line feed character,...</li>
- <li><b><a href="#verbose">verbose</a></b> - 0: log es less as possible, 5: log as much as possible</li>
- <li><b>volumeLimit <0 ... 100></b> - limits the volume to the given value</li>
- <li><b>volumeLimitStraight <-80 ... 12></b> - limits the volume to the given value</li>
- </ul>
- <br><br>
- <b>Generated Readings/Events:</b>
- <br/><br/>
- <ul>
- <li><b>audioAutoPhaseControlMS</b> - currently configured Auto Phase Control in ms</li>
- <li><b>audioAutoPhaseControlRevPhase</b> - acurrently configured Auto Phase Control reverse Phase -> 1 means: reverse phase</li>
- <li><b>audioInputFormat<XXX></b> - Shows if the channel XXX is available in the audio input signal (1 means: is available)</li>
- <li><b>audioInputFrequency</b> - Frequency of the input signal</li>
- <li><b>audioInputSignal</b> - Type of the input signal (z.B. ANALOG, PCM, DTS,...)</li>
- <li><b>audioOutputFormat<XXX></b> - Shows if the channel XXX is available in the audio output sgnal (1 means: is available)</li>
- <li><b>audioOutputFrequency</b> - Frequency of the audio output signal</li>
- <li><b>bass</b> - currently set bass</li>
- <li><b>channel</b> - Tuner Preset (1...9)</li>
- <li><b>channelStraight</b> - Tuner Preset as diplayed in the display of the Pioneer AV Receiver, e.g. A2</li>
- <li><b>display</b> - Currently dispayed text in the display of the Pioneer AV Receiver</li>
- <li><b>displayPrevious</b> - Previous displayed text</li>
- <li><b>eq</b> - Equalizer status of the Pioneer AV Receiver (on|off)</li>
- <li><b>hdmiOut</b> - Shows the currently selected HDMI-output(s)?</li>
- <li><b>input</b> - shows the currently selected input</li>
- <li><b>inputsList</b> - ":" separated list of all activated inputs</li>
- <li><b>listeningMode</b> - Currently set Listening Mode</li>
- <li><b>listeningModePlaying</b> - Currently used Listening Mode</li>
- <li><b>mcaccMemory</b> - MCACC Setting</li>
- <li><b>mute</b> - Mute (on|off)</li>
- <li><b>power</b> - Main Zone on or standby?</li>
- <li><b>pqlsWorking</b> - currently set PQLS</li>
- <li><b>presence</b> - Is the Pioneer AV Receiver reachable via ethernet?</li>
- <li><b>screenHirarchy</b> - Hirarchy of the currently shown On Screen Displays (OSD)</li>
- <li><b>screenLine01...08</b> - Content of the lines 01...08 of the OSD</li>
- <li><b>screenLineHasFocus</b> - Which line of the OSD has the focus?</li>
- <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>
- <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>
- <li><b>screenLineNumbersTotal</b> - How many lines has the full list</li>
- <li><b>screenLineNumbers</b> - How many lines has the OSD</li>
- <li><b>screenLineType01...08</b> - Which type has line 01...08? E.g. "directory", "Now playing", "current Artist",...</li>
- <li><b>screenName</b> - Name of the OSD</li>
- <li><b>screenReturnKey</b> - Is the "Return-Key" in this OSD available?</li>
- <li><b>screenTopMenuKey</b> - Is the "Menu-Key" in this OSD available?</li>
- <li><b>screenToolsKey</b> - Is the "Tools-Key" (Menu, edit, ipod control) in this OSD available?</li>
- <li><b>screenType</b> - Type of the OSD, e.g. "message", "List", "playing(play)",...</li>
- <li><b>speakerSystem</b> - Shows how the rear surround speaker connectors and the B-speaker connectors are used</li>
- <li><b>speakers</b> - Which speaker output connectors are active?</li>
- <li><b>standingWave</b> - Standing wave</li>
- <li>
- <b>state</b> - Is set while connecting from fhem to the Pioneer AV Receiver (disconnected|innitialized|off|on|opened)
- </li>
- <li>
- <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).
- </li>
- <li><b>tone</b> - Is the tone control turned on?</li>
- <li><b>treble</b> - Current value of treble</li>
- <li><b>tunerFrequency</b> - Tuner frequency</li>
- <li><b>volume</b> - Current value of volume (0%-100%)</li>
- <li><b>volumeStraight</b> - Current value of volume os displayed in the display of the Pioneer AV Receiver</li>
- </ul>
- <br><br>
- </ul>
- <p><a name="PIONEERAVRZONE"></a>
- <h3>PIONEERAVRZONE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PIONEERAVRZONE'>DE</a>]</div>
- <ul>
- <br>
- <a name="PIONEERAVRZONEdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> PIONEERAVRZONE <zone> </code>
- <br><br>
- Defines a Zone (zone2, zone3 or hdZone) of a PioneerAVR device.<br>
- Note: devices to control zone2, zone3 and/or HD-zone are autocreated on reception of the first message for those zones.<br><br>
-
- Normally, the PIONEERAVRZONE device is attached to the latest previously defined PIONEERAVR device
- for I/O. Use the <code>IODev</code> attribute of the PIONEERAVRZONE device to attach to any
- PIONEERAVR device, e.g. <code>attr myPioneerAvrZone2 IODev myPioneerAvr</code>.
- <br><br>
- Examples:
- <ul>
- <code>define myPioneerAvrZone2 PIONEERAVRZONE zone2</code><br>
- <code>attr myPioneerAvrZone2 IODev myPIONEERAVR</code>
- </ul>
- <br>
- </ul>
- <a name="PIONEERAVRZONEset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <what> [<value>]</code>
- <br><br>
- where <what> is one of
- <li>reopen</li>
- <li>off <br>put zone into standby</li>
- <li>on <br>turn zone on from standby</li>
- <li>toggle <br>toggles zone power</li>
- <li>volume <0 ... 100><br>zone volume in % of the maximum volume</li>
- <li>volumeUp<br>increases the zone volume by 0.5dB</li>
- <li>volumeDown<br>decreases the zone volume by 0.5dB</li>
- <li>volumeStraight<-80.5 ... 12><br>same values for zone volume as shown on the display of the Pioneer AV receiver</li>
- <li>mute <on|off|toggle></li>
- <li>input <not on the Pioneer hardware deactivated input><br>the list of possible (i.e. not deactivated)
- inputs is read in during Fhem start and with <code>get <name> statusRequest</code></li>
- <li>inputUp<br>change zone input to next input</li>
- <li>inputDown<br>change zone input to previous input</li>
- <li><a href="#setExtensions">set extensions</a> are supported (except <code><name></code>)</li>
- <br><br>
- Example:
- <ul>
- <code>set VSX923Zone2 on</code><br>
- </ul>
- <br><br>
- </ul>
- <a name="PIONEERAVRZONEget"></a>
- <b>Get</b>
- <ul>
- <li><code>get <name> input</code>
- <br><br>
- Update the reading for the zone input
- </li>
- </ul>
- <br><br>
- <a name="PIONEERAVRattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li>IOdev Name of the device which communicates with the phisical Pioneer AV receiver via ethernet or rs232</li>
- <li><a href="#verbose">verbose</a></li>
- </ul>
- <br><br>
- </ul>
- <p><a name="PLAYBULB"></a>
- <h3>MiPow Playbulb</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PLAYBULB'>DE</a>]</div>
- <p><span style="text-decoration: underline;"><strong>PLAYBULB -Smart Light from MIPOW.COM</strong></span></p>
- <p>This module integrates different smart lights from MIPOW into FHEM and displays several settings</p>
- <p> </p>
- <p><a name="PLAYBULBdefine"></a><strong>Define</strong><br /><code>define <name> PLAYBULB <MAC-ADDRESS></code></p>
- <p>Example: <code>define PlaybulbCandle PLAYBULB 0B:0B:0C:D0:E0:F0</code></p>
- <p> </p>
- <p>With this command a new PLAYBULB device in a room called PLAYBULB is created. The parameter <MAC-ADDRESS> defines the bluetooth MAC address of your mipow smart light.</p>
- <p> </p>
- <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>
- <p style="padding-left: 90px;">It seems like the devices accept only one active connection.</p>
- <p><br /><a name="PLAYBULBreadings"></a><strong>Readings</strong></p>
- <ul>
- <ul>
- <ul>
- <li>powerLevel - percentage of batterylevel</li>
- <li>powerCharge - state of charging (Playbulb Garden only)</li>
- <li>color - indicates if colormode is on or off</li>
- <li>devicename - given name of the device</li>
- <li>effect - indicates which effect is selected (Flash; Pulse; RainbowJump; RainbowFade; Candle; none)</li>
- <li>onoff - indicates if the device is turned on (1) or off (0)</li>
- <li>rgb - shows the selected color in hex by rgb (example: FF0000 is full red)</li>
- <li>sat - shows the selected saturation from 0 to 255 (seems to be inverted; 0 is full saturation)</li>
- <li>speed - shows the selected effect speed (possible: 20; 70; 120; 170)</li>
- <li>state - current state of PLAYBULB device</li>
- </ul>
- </ul>
- </ul>
- <p><a name="PLAYBULBset"></a><strong>Set</strong></p>
- <ul>
- <ul>
- <ul>
- <li>on - turns device on</li>
- <li>off - turns device off</li>
- <li>rgb - colorpicker,RGB; gives the possibility to set any hue, saturation, brightness</li>
- <li>sat - saturation slider from 0 to 255 steps 5</li>
- <li>effect - Flash,Pulse,RainbowJump,RainbowFade,Candle,none; activates the selected effect</li>
- <li>speed - slider: values are 170, 120, 70, 20</li>
- <li>color - on,of; switches the device to rgb or white</li>
- <li>statusRequest - is necessary to request state of the device</li>
- <li>deviceName - changes the name of the bluetoothdevice e.g. "PlaybulbCandle"</li>
- </ul>
- </ul>
- </ul>
- <p><br /><strong>Get na</strong></p>
- <p> </p>
- <p><strong>Attributes </strong></p>
- <ul>
- <ul>
- <ul>
- <li>model<br />BTL300_v5 # Candle Firmware 5<br />BTL300_v6 # Candle Firmware 6<br />BTL201_v2 # Smart<br />BTL201M_V16 # Smart (1/2017)<br />BTL505_v1 # Stripe<br />BTL400M_v18 # Garden<br />BTL100C_v10 # Color LED</li>
- <li>sshHost - IP or FQDN for SSH remote control</li>
- </ul>
- </ul>
- </ul>
- <p><br /><a name="PLAYBULBstate"></a><strong>state</strong></p>
- <ul>
- <ul>
- <ul>
- <li>set attribut model - is shown after initial define</li>
- <li>on - device is on</li>
- <li>off - device is off</li>
- <li>unreachable - connection to device lost</li>
- </ul>
- </ul>
- </ul>
- <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>
- <p><a name="POKEYS"></a>
- <h3>POKEYS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#POKEYS'>DE</a>]</div>
- <ul>
- The POKEYS module is used to control the LAN POKEYS device (<a href="http://www.poscope.com/pokeys56e">POKEYS56e</a>) which supports
- up to 56 digital input, analog inputs, counter inputs and digital outputs.
- Each port/pin has to be configured before it can be used.
- <br>
- <br>
- <a name="POKEYSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> POKEYS <ip-address> <pin> <io-state> [<time in ms>]</code> <br>
- <br>
- <code><ip-address></code> the IP address where the POKEYS device can be accessed<br>
- <code><pin></code> the pin number which should be configured<br>
- <code><io-state></code> the new io state of the pin <code>Obsolete(=undef) DigIn DigOut AdcIn DigInCtRise DigInCtFall ExtDigOut GetBasic </code> <br>
- <code><time in ms></code> optional else 1000ms: cyclic update time for Input pin <br>
- <br>
- Example:
- <ul>
- <code>define PoInfo POKEYS 192.168.178.34 0 GetBasic</code><br>
- # creates a virtual pin for getting infos about the device with the <code>get</code> command<br>
- <code>define Pin44in POKEYS 192.168.178.34 44 DigIn 200</code><br>
- # creates a digitial input port on pin 44<br>
- <code>define Pin25out POKEYS 192.168.178.34 25 DigOut</code><br>
- # creates a digial output port on pin 25<br>
- </ul>
- </ul> <br>
- <a name="POKEYSset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <state> [<time in ms>]</code> <br>
- <br>
- <code><state></code> can be <code>OFF ON OFF_PULSE ON_PULSE </code><br>
- <code><time in ms></code> optional else 1000ms hold time for the <code>ON_PULSE OFF_PULSE</code> state<br>
- <br>
- Example:
- <ul>
- <code>set Pin25out ON</code><br>
- # sets Pin25out to ON (0V)<br>
- </ul>
- </ul><br>
- <a name="POKEYSget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <type> </code> <br>
- <br>
- only supported for pins of type <code>GetBasic</code><br>
- <code><type></code> can be <code>Version DevName Serial User CPUload</code><br>
- <br>
- Example:
- <ul>
- <code>get PoInfo Version</code><br>
- # gets the version of the POKEYS device<br>
- </ul>
- </ul><br>
- <a name="POKEYSattr"></a>
- <b>Attributes</b>
- <ul>
- todo <br>
- </ul>
- <br>
- </ul>
- <p><a name="PRESENCE"></a>
- <h3>PRESENCE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PRESENCE'>DE</a>]</div>
- <ul>
- The PRESENCE module provides several possibilities to check the presence of mobile phones or similar mobile devices such as tablets.
- <br><br>
- This module provides several operational modes to serve your needs. These are:<br><br>
- <ul>
- <li><b>lan-ping</b> - A presence check of a device via network ping in your LAN/WLAN.</li>
- <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>
- <li><b>local-bluetooth</b> - A presence check by searching directly for a given bluetooth device nearby.</li>
- <li><b>function</b> - A presence check by using your own perl function which returns a presence state.</li>
- <li><b>shellscript</b> - A presence check by using an self-written script or binary which returns a presence state.</li>
- <li><b>event</b> - A presence check by listening to FHEM events of other definitions.</li>
- <li><b>lan-bluetooth</b> - A presence check of a bluetooth device via LAN network by connecting to a presenced or collectord instance.</li>
- </ul>
- <br>
- Each mode can be optionally configured with a specific check interval and a present check interval.<br><br>
- <ul>
- <li>check-interval - The interval in seconds between each presence check. Default value: 30 seconds</li>
- <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>
- </ul>
- <br><br>
- <a name="PRESENCE_define"></a>
- <b>Define</b><br><br>
- <ul><b>Mode: lan-ping</b><br><br>
- <code>define <name> PRESENCE lan-ping <ip-address> [ <check-interval> [ <present-check-interval> ] ]</code><br>
- <br>
- Checks for a network device via PING requests and reports its presence state.<br><br>
- <u>Example</u><br><br>
- <code>define iPhone PRESENCE lan-ping 192.168.179.21</code><br>
- <br>
- <b>Mode: fritzbox</b><br><br>
- <code>define <name> PRESENCE fritzbox <device-name/mac-address> [ <check-interval> [ <present-check-interval> ] ]</code><br>
- <br>
- 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>
- <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>
- <u>Example</u><br><br>
- <code>define iPhone PRESENCE fritzbox iPhone-6</code><br>
- <code>define iPhone PRESENCE fritzbox 00:06:08:05:0D:00</code><br><br>
- <b>Mode: local-bluetooth</b><br><br>
- <code>define <name> PRESENCE local-bluetooth <bluetooth-address> [ <check-interval> [ <present-check-interval> ] ]</code><br>
- <br>
- 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
- as a functional bluetooth device directly attached to your machine.<br><br>
- <u>Example</u><br><br>
- <code>define iPhone PRESENCE local-bluetooth 0a:8d:4f:51:3c:8f</code><br><br>
- <b>Mode: function</b><br><br>
- <code>define <name> PRESENCE function {...} [ <check-interval> [ <present-check-interval> ] ]</code><br>
- <br>
- 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>
- 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>
- <u>Example</u><br><br>
- <code>define iPhone PRESENCE function {snmpCheck("10.0.1.1","0x44d77429f35c")}</code><br><br>
- <b>Mode: shellscript</b><br><br>
- <code>define <name> PRESENCE shellscript "<path> [<arg1>] [<argN>]..." [ <check-interval> [ <present-check-interval> ] ]</code><br>
- <br>
- 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>
- 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>
- <u>Example</u><br><br>
- <code>define iPhone PRESENCE shellscript "/opt/check_device.sh iPhone"</code><br><br>
- <b>Mode: event</b><br><br>
- <code>define <name> PRESENCE evemt <absent-regexp> <present-regexp></code><br>
- <br>
- 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>
- If an event matches one of the provides regexps, the presence state will be changed.<br><br>
- <u>Example</u><br><br>
- <code>define Presence_John PRESENCE event Door_Switch:off Door_Switch:on</code><br><br>
- <b>Mode: lan-bluetooth</b><br><br>
- 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.
- The given device will be checked for presence status.<br>
- <br>
- <code>define <name> PRESENCE lan-bluetooth <bluetooth-address> <ip-address>[:port] [ <check-interval> ]</code><br>
- <br>
- The default port is 5111 (presenced). Alternatly you can use port 5222 (collectord)<br>
- <br>
- <u>Example</u><br><br>
- <code>define iPhone PRESENCE lan-bluetooth 0a:4f:36:d8:f9:89 127.0.0.1:5222</code><br><br>
- <u>presenced</u><br><br>
- <ul>The presence is a perl network daemon, which provides presence checks of multiple bluetooth devices over network.
- It listens on TCP port 5111 for incoming connections from a FHEM PRESENCE instance or a running collectord.<br>
- <PRE>
- Usage:
- presenced [-d] [-p <port>] [-P <filename>]
- presenced [-h | --help]
- Options:
- -p, --port
- TCP Port which should be used (Default: 5111)
- -P, --pid-file
- PID file for storing the local process id (Default: /var/run/presenced.pid)
- -d, --daemon
- detach from terminal and run as background daemon
- -n, --no-timestamps
- do not output timestamps in log messages
- -v, --verbose
- Print detailed log output
- -h, --help
- Print detailed help screen
- </PRE>
- It uses the hcitool command (provided by a <a href="http://www.bluez.org" target="_new">bluez</a> installation)
- to make a paging request to the given bluetooth address (like 01:B4:5E:AD:F6:D3). The devices must not be visible, but
- still activated to receive bluetooth requests.<br><br>
- If a device is present, this is send to FHEM, as well as the device name as reading.<br><br>
- The presenced is available as:<br><br>
- <ul>
- <li>direct perl script file: <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/presenced" target="_new">presenced</a></li>
- <li>.deb package for Debian/Raspbian (noarch): <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/deb/presenced-1.5.deb" target="_new">presenced-1.5.deb</a></li>
- </ul>
- </ul><br><br>
- <u>lepresenced</u><br><br>
- <ul>lepresenced is a Perl network daemon that provides presence checks of
- multiple bluetooth devices over network. In contrast to presenced,
- lepresenced covers <u>Bluetooth 4.0 (low energy) devices, i. e.
- Gigaset G-Tags, FitBit Charges.</u>
- lepresenced listens on TCP port 5333 for connections of a PRESENCE definition
- or collectord.<br>
- <PRE>
- Usage:
- lepresenced --bluetoothdevice <bluetooth device> --listenaddress <listen address> --listenport <listen port> --loglevel <log level> --daemon
- lepresenced -b <bluetooth device> -a <listen address> -p <listen port> -l <log level> -d
- valid log levels:
- LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG. Default: LOG_INFO
- Examples:
- lepresenced --bluetoothdevice hci0 --listenaddress 127.0.0.1 --listenport 5333 --daemon
- lepresenced --loglevel LOG_DEBUG --daemon
- </PRE>
- To detect the presence of a device, it uses the command <i>hcitool lescan</i> (package:
- <a href="http://www.bluez.org" target="_new">bluez</a>) to continuously listen to
- beacons of Bluetooth LE devices.
- <br><br>
- If a device is present, this is send to FHEM, as well as the device name as reading.<br><br>
- The presenced is available as:<br><br>
- <ul>
- <li>Perl script: <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/lepresenced" target="_new">lepresenced</a></li>
- <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>
- </ul>
- </ul><br><br>
- <u>collectord</u><br><br>
- <ul>
- The collectord is a perl network daemon, which handles connections to several presenced installations to search for multiple bluetooth devices over network.<br><br>
- It listens on TCP port 5222 for incoming connections from a FHEM presence instance.
- <PRE>
- Usage:
- collectord -c <configfile> [-d] [-p <port>] [-P <pidfile>]
- collectord [-h | --help]
- Options:
- -c, --configfile <configfile>
- The config file which contains the room and timeout definitions
- -p, --port
- TCP Port which should be used (Default: 5222)
- -P, --pid-file
- PID file for storing the local process id (Default: /var/run/collectord.pid)
- -d, --daemon
- detach from terminal and run as background daemon
- -n, --no-timestamps
- do not output timestamps in log messages
- -v, --verbose
- Print detailed log output
- -l, --logfile <logfile>
- log to the given logfile
- -h, --help
- Print detailed help screen
- </PRE>
- 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:
- <br><br>
- <PRE>
- # room definition
- # ===============
- #
- [room-name] # name of the room
- address=192.168.0.10 # ip-address or hostname
- port=5111 # tcp port which should be used (5111 is default)
- presence_timeout=120 # timeout in seconds for each check when devices are present
- absence_timeout=20 # timeout in seconds for each check when devices are absent
- [living room]
- address=192.168.0.11
- port=5111
- presence_timeout=180
- absence_timeout=20
- </PRE>
- 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>
- The collectord is available as:<br><br>
- <ul>
- <li>direct perl script file: <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/collectord" target="_new">collectord</a></li>
- <li>.deb package for Debian (noarch): <a href="https://svn.fhem.de/trac/export/HEAD/trunk/fhem/contrib/PRESENCE/deb/collectord-1.8.1.deb" target="_new">collectord-1.8.1.deb</a></li>
- </ul>
- </ul><br><br>
- </ul>
- <br>
- <a name="PRESENCE_set"></a>
- <b>Set</b>
- <ul>
- <li><b>statusRequest</b> - Schedules an immediatly check.</li>
- <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>
- <li><b>overrideInterval</b> - Override the check interval to the given number of seconds. (not applicable in mode "event" and "lan-bluetooth")</li>
- <li><b>clearOverride</b> - clear an active check interval override (only if set command overrideInterval was executed before)</li>
- </ul>
- <br>
- <a name="PRESENCE_get"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="PRESENCE_attr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a name="PRESENCE_disable">disable</a></li>
- If this attribute is activated, an active check will be disabled.<br><br>
- Possible values: 0 => not disabled , 1 => disabled<br>
- Default Value is 0 (not disabled)<br><br>
- <li><a name="PRESENCE_absenceThreshold">absenceThreshold</a></li><br> <i>(not applicable in mode "event" )</i><br>
- The number of checks that have to result in "absent" before the state of the PRESENCE definition is changed to "absent".
- This can be used to verify the absence of a device with multiple check runs before the state is finally changed to "absent".
- If this attribute is set to a value >1, the reading state and presence will be set to "maybe absent" during the absence verification.<br><br>
- Default Value is 1 (no absence verification)<br><br>
- <li><a name="PRESENCE_presenceThreshold">presenceThreshold</a></li><br> <i>(not applicable in mode "event" )</i><br>
- The number of checks that have to result in "present" before the state of the PRESENCE definition is changed to "present".
- This can be used to verify the permanent presence of a device with multiple check runs before the state is finally changed to "present".
- If this attribute is set to a value >1, the reading state and presence will be set to "maybe present" during the presence verification.<br><br>
- Default Value is 1 (no presence verification)<br><br>
- <li><a name="PRESENCE_absenceTimeout">absenceTimeout</a></li><br> <i>(only in mode "event" applicable)</i><br>
- The timeout after receiving an "absent" event, before the state of the PRESENCE definition is switched to "absent".
- This can be used to verify the permanent absence by waiting a specific time frame to not receive an "present" event.
- If this timeout is reached with no "present" event received in the meantime, the presence state will finally be set to "absent".
- The timeout is given in HH:MM:SS format, where hours and minutes are optional.
- 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>
- Default Value is 0 (no absence verification)<br><br>
- <li><a name="PRESENCE_presenceTimeout">presenceTimeout</a></li><br> <i>(only in mode "event" applicable)</i><br>
- The timeout after receiving an "present" event, before the state of the PRESENCE definition is switched to "present".
- This can be used to verify the permanent presence by waiting a specific time frame to not receive an "absent" event.
- If this timeout is reached with no "absent" event received in the meantime, the presence state will finally be set to "present".
- The timeout is given in HH:MM:SS format, where hours and minutes are optional.
- 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>
- Default Value is 0 (no presence verification)<br><br>
- <li><a name="PRESENCE_retryInterval">retryInterval</a></li><br> <i>(Not applicable in mode "event" or "lan-bluetooth")</i><br>
- The check interval in case a check is prematurely aborted and was unable to check the presence. In this case, PRESENCE reschedules
- the next check as retry within the given retry interval in seconds (usually lower than the regular check interval).
- <br><br>
- Default Value is 10 seconds<br><br>
- <li><a name="PRESENCE_retryCount">retryCount</a></li><br> <i>(Not applicable in mode "event" or "lan-bluetooth")</i><br>
- The maximum number of checks to perform within the retryInterval in case a check is prematurely aborted and was unable to check the presence.
- PRESENCE will try to retry after a failed check to a maximum of the given number of tries. If all retries fails also, it will uses afterwards
- the regular check interval.
- <br><br>
- Default Value is 3 (number of check retries)<br><br>
- <li><a name="PRESENCE_pingCount">pingCount</a></li> (Only in mode "ping" applicable)<br>
- 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>
- Default Value is 4 (packets)<br><br>
- <li><a name="PRESENCE_bluetoothHciDevice">bluetoothHciDevice</a></li> (Only in Mode "local-bluetooth" applicable)<br>
- 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>
- <li><a name="PRESENCE_fritzboxCheckSpeed">fritzboxCheckSpeed</a></li> (Only in Mode "fritzbox" applicable)<br>
- When this attribute is enabled, the network speed is checked in addition to the device state.<br>
- This only makes sense for wireless devices connected directly to the FritzBox.
- <br><br>
- Possible values: 0 => do not check speed, 1 => check speed when device is active<br>
- Default value is 0 (no speed check)
- <br><br>
- <li><a name="PRESENCE_powerCmd">powerCmd</a></li><br>
- Define a FHEM command, which powers on or off the device.<br><br>
- When executing the powerCmd (set command: power) following placeholders will be replaced by there corresponding values:<br><br>
- <ul>
- <li><code>$NAME</code> - name of the PRESENCE definition</li>
- <li><code>$ADDRESS</code> - the address of the PRESENCE definition as given in the define statement</li>
- <li><code>$ARGUMENT</code> - the argument given to the power set command (e.g. "on" or "off)</li>
- </ul>
- <br>
- Example FHEM commands:<br><br>
- <ul>
- <li><code>set PowerSwitch_1 on</code></li>
- <li><code>set PowerSwitch_1 $ARGUMENT</code></li>
- <li><code>"/opt/power_on.sh $ADDRESS"</code></li>
- <li><code>{powerOn("$ADDRESS", "username", "password")}</code></li>
- </ul>
- </ul>
- <br>
- <a name="PRESENCE_events"></a>
- <b>Generated readings/events:</b><br><br>
- <ul>
- <u>General readings/events:</u><br><br>
- <ul>
- <li><b>state</b>: (absent|maybe absent|present|maybe 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>
- <li><b>presence</b>: (absent|maybe absent|present|maybe present) - The presence state of the device. The value "maybe absent" only occurs if <a href="#PRESENCE_absenceThreshold">absenceThreshold</a> is activated. The value "maybe present" only occurs if <a href="#PRESENCE_presenceThreshold">presenceThreshold</a> is activated.</li>
- <li><b>powerCmd</b>: (executed|failed) - power command was executed or has failed</li>
- </ul><br><br>
- <u>Bluetooth specific readings/events:</u><br><br>
- <ul>
- <li><b>device_name</b>: $name - The name of the Bluetooth device in case it's present</li>
- </ul><br><br>
- <u>FRITZ!Box specific readings/events:</u><br><br>
- <ul>
- <li><b>speed</b>: $speed - The current speed of the checked device if attribute <a href="#PRESENCE_fritzboxCheckSpeed">fritzboxCheckSpeed</a> is activated</li>
- </ul><br><br>
- <u>presenced/collectord specific readings/events:</u><br><br>
- <ul>
- <li><b>command_accepted</b>: $command_accepted (yes|no) - Was the last command acknowleged and accepted by the presenced or collectord?</li>
- <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>
- </ul>
- </ul>
- </ul>
- <p><a name="PROPLANTA"></a>
- <h3>PROPLANTA</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PROPLANTA'>DE</a>]</div>
- <div>
- <ul>
- The module extracts weather data from <a href="http://www.proplanta.de">www.proplanta.de</a>.
- <br>
- The website provides a forecast for 12 days, for the first 7 days in a 3-hours-interval.
- <br>
- This modul causes a high CPU load. It is recommended to reduce the number of captured forecast days.
- <br>
- It uses the perl moduls HTTP::Request, LWP::UserAgent and HTML::Parse.
- <br/><br/>
- <a name="PROPLANTAdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> PROPLANTA [City] [CountryCode]</code>
- <br>
- Example:
- <br>
- <code>define wetter PROPLANTA Bern ch</code>
- <br>
- <code>define wetter PROPLANTA Wittingen+(Niedersachsen)</code>
- <br>
- <li><code>[City]</code>
- <br>
- Optional. The city must be selectable on <a href="http://www.proplanta.de">www.proplanta.de</a>.
- <br>
- Please pay attention to the <b>Capital</b> letters in the city names.
- Spaces within the name are replaced by a + (plus).
- </li><br>
- <li><code>[CountryCode]</code>
- <br>
- Optional. Possible values: de (default), at, ch, fr, it
- </li><br>
- The function <code>PROPLANTA_Html</code> creates a HTML code for a weather forecast for the given days (default is 3).
- <br>
- Example:
- <br>
- <code>define HTMLForecast weblink htmlCode { PROPLANTA_Html("ProPlanta_Wetter"[, days])}</code>
- <br/><br/>
- </ul>
- <br>
-
- <a name="PROPLANTAset"></a>
- <b>Set</b>
- <ul>
- <br>
- <li><code>set <name> update</code>
- <br>
- The weather data are immediately polled from the website.
- </li><br>
- </ul>
- <br>
-
- <a name="PROPLANTAattr"></a>
- <b>Attributes</b>
- <ul>
- <br>
- <li><code>forecastDays <4-14></code>
- <br>
- Number of days for which the forecast data shall be fetched. Default is 14 days (incl. today).
- </li><br>
- <li><code>INTERVAL <seconds></code>
- <br>
- Poll interval for weather data in seconds (default 3600 = 1 hour)
- </li><br>
- <li><code>URL <internet address></code>
- <br>
- URL to extract information from. Overwrites the values in the 'define' term.
- </li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <a name="PROPLANTAreading"></a>
- <b>Forecast readings</b>
- <ul>
- <br>
- <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>
- <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>
- <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>
- <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>
- <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>
- <li><b>fc</b><i>0</i><b>_dew</b> - dew formation <i>today</i> (0=none, 1=small, 2=medium, 3=strong)</li>
- <li><b>fc</b><i>0</i><b>_evapor</b> - evaporation <i>today</i> (0=none, 1=small, 2=medium, 3=strong)</li>
- <li><b>fc</b><i>0</i><b>_frost</b> - ground frost <i>today</i> (0=no, 1=yes)</li>
- <li><b>fc</b><i>0</i><b>_moon</b><i>Rise|Set</i> - moon <i>rise|set today</i></li>
- <li><b>fc</b><i>0</i><b>_rad</b> - global radiation <i>today</i></li>
- <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>
- <li><b>fc</b><i>0</i><b>_sun</b> - relative sun shine duration <i>today</i> in % (between sun rise and set)</li>
- <li><b>fc</b><i>0</i><b>_temp</b><i>Min|Max</i> - <i>minimal|maximal</i> temperature <i>today</i> in °C</li>
- <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 °C</li>
- <li><b>fc</b><i>0</i><b>_uv</b> - UV-Index <i>today</i></li>
- <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>
- <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>
- <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>
- <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 °</li>
- <li>etc.</li>
- </ul>
- <br>
- </ul>
- </div>
- <p><a name="PWM"></a>
- <h3>PWM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PWM'>DE</a>]</div>
- <ul>
- <table>
- <tr><td>
- The PMW module implements temperature regulation for heating systems only capeable of switching on/off.<br><br>
- 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>
- PWM defines a calculation unit and depents on objects based on PWMR which define the rooms to be heated.<br>
- <br>
- </td></tr>
- </table>
- <b>Define</b>
- <ul>
- <code>define <name> PWM [<interval>] [<cycletime>] [<minonofftime>] [<maxPulse>] [<maxSwitchOnPerCycle>,<maxSwitchOffPerCycle>] [<roomStayOn>,<roomStayOff>,<stayOnThreshold>] [<overallHeatingSwitch>[,<pulseThreshold>[,<followUpTime>[,<h_regexp_on>[,<delayTimeOn>]]]]]<br></code>
- <br>
- eg. define fb PWM 60 900 120 1 99,99 0,0,0 pumpactor<br>
- <br>
- Define a calculation object with the following parameters:<br>
- <ul>
- <li>interval<br>
- Calculate the pulses every <i>interval</i> seconds. Default is 60 seconds.<br>
- </li>
- <li>cycletime<br>
- Timeframe to which the pulses refere to. Default is 900 seconds (=15 Minutes). "valve position" of 100% calculates to "on" for this period.<br>
- </li>
- <li>minonofftime<br>
- Default is 120 seconds.
- Floor heating systems are driven by thermomechanic elements which react very slow. on/off status changes for lower periods are ignored.<br>
- </li>
- <li>maxPulse<br>
- Default is 1, which means that a device can be switched on for the full <i>cylcetime</i> period.<br>
- For energy saving reasons it may be wanted to prevent situations were all rooms are switched on (high energy usage) and afterwards off.<br>
- 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
- room the chance to be switched on.
- <br>
- </li>
- <li>maxSwitchOnPerCycle,maxSwitchoffPerCycle<br>
- Defaults are 99 for both values. This means that 99 PWMR object can be switched on or off at the same time.<br>
- To prevent energy usage peaks followend by "no energy consumption" situations set both values to "1".<br>
- This means after the room the the least energy required is switched off the next will be switched off.<br>
- Rooms are switched on or off one after the other (in <interval> cycles) and not all at one time.<br>
- Waiting times are honored by a addon to the pulse.<br>
- <br>
- </li>
- <li>roomStayOn,roomStayOff,stayOnThreshold<br>
- Defauts: <br>
- <i>roomStayOn</i> = 0 ... all rooms can be switched off at the same time.<br>
- <i>roomStayOff</i> = 0 ... all rooms can be switched on at the same time.<br>
- <i>stayOnThreshold</i> = 0 ... no impact.<br>
- For energy saving reasons the following may be set: "4,1,0.25". This means:<br>
- The room with the least pulse will be kept off (<i>roomsStayOff</i>=1)<br>
- 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.
- If the threshold is not reached (not so much heating required) then all rooms can be switched off at the same time.<br>
- <br>
- </li>
- <li><overallHeatingSwitch>[,<pulseThreshold>[,<followUpTime>[,<regexp_on>[,<delayTimeOn>]]]]<br>
- 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>
- <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>
- 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>
- <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>
- <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>
- <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>
- The pulse used for comparision is defined by attribute <i>overallHeatingSwitchRef</i>. Default is <i>maxPulse</i>.<br>
- <br>
- </li>
- </ul>
- <br>
- Example:<br>
- <br>
- <code>define fh PWM</code>
- <br>which is equal to<br>
- <code>define fh PWM 60 900 120 1 99,99 0,0,0</code>
- <br>Energy saving definition might be<br>
- <code>define fh PWM 60 900 120 0.85 1,1 4,1,0.25</code>
- <br><br>
-
- </ul>
- <br>
- <b>Set </b>
- <ul>
- <li>cycletime<br>
- Temporary change of parameter <i>cycletime</i>.
- </li><br>
- <li>interval<br>
- Temporary change of parameter <i>interval</i>.
- </li><br>
- <li>recalc<br>
- Cause recalculation that normally appeary every <i>interval</i> seconds.
- </li><br>
- </ul>
- <b>Get</b>
- <ul>
- <li>status<br>
- Retrieve content of variable <i>STATE</i>.
- </li><br>
- <li>timers<br>
- Retrieve values from the readings "timer?_??" from the attached rooms..<br>
- The readings define start and end times for different room temperatures.<br>
- This funktion will retrieve the first start and the last end time. <i>STATE</i>.
- </li><br>
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li>disable<br>
- Set to 1 will disable all calculations and STATE will be set to "disabled".<br>
- </li><br>
- <li>valveProtectIdlePeriod<br>
- Protect Valve by switching on actor for 300 seconds.<br>
- After <i>valveProtectIdlePeriod</i> number of days without switching the valve the actor is set to "on" for 300 seconds.
- overallHeatingSwitch is not affected.
- </li><br>
- <li>overallHeatingSwitchRef<br>
- Defines which reading is used for threshold comparision for <i>OverallHeatingSwitch</i> calculation. Possible values are:<br>
- <i>pulseMax</i>,
- <i>pulseSum</i>,
- <i>pulseAvg</i>,
- <i>pulseAvg2</i>,
- <i>pulseAvg3</i>,
- <i>avgPulseRoomsOn</i><br>
- pulseAvg is an average pulse of all rooms which should be switched to "on".<br>
- pulseAvg2 and pulseAvg3 refer to the 2 or 3 romms with highest pulses.
- </li><br>
- <li>overallHeatingSwitchThresholdTemp<br>
- Defines a reading for a temperature and a maximum value that prevents the overallHeatingSwitch from switching to "on".<br>
- Value has the following format: tsensor[:reading[:t_regexp]],maxValue.<br>
- <i>tsensor</i> defines the temperature sensor for the actual temperature.<br>
- <i>reading</i> defines the reading of the temperature sensor. Default is "temperature"<br>
- <i>t_regexp</i> defines a regular expression to be applied to the reading. Default is '(\d[\d\.]+)'.<br>
- if <i>maxValue</i> is reached as a temperature from tsensor then overallHeatingSwitch will not be switch to "on".<br>
- Example: tsensor,44 or tsensor:temperature,44 or tsensor:temperature:(\d+).*,44<br>
- The reading OverallHeatingSwitchTT_Off will be set to 1 if temperature from tsensor prevents <i>overallHeatingSwitch</i> from switching to "on".<br>
- 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>
- Using this parameter is on your own risk. Please test your settings very carefully.<br>
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="PWMR"></a>
- <h3>PWMR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PWMR'>DE</a>]</div>
- <ul>
- <table>
- <tr><td>
- The PMWR module defines rooms to be used for calculation within module PWM.<br><br>
- 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>
- PWM defines a calculation unit and depents on objects based on PWMR which define the rooms to be heated.<br>
- 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.
- <br>
- </td></tr>
- </table>
- <b>Define</b>
- <ul>
- <code>define <name> PWMR <IODev> <factor[,offset]> <tsensor[:reading:[t_regexp]]> <actor>[:<a_regexp_on>] [<window|dummy>[,<window>[:<w_regexp>]] [ <usePID=0> | <usePID=1>:<PFactor>:<IFactor>[,<ILookBackCnt>]:<DFactor>[,<DLookBackCnt>] | <usePID=2>:<PFactor>:<IFactor>:<DFactor>[,<DLookBackCnt>] ] <br></code>
- <br>
- Define a calculation object with the following parameters:<br>
- <ul>
- <li>IODev<br>
- Reference to an object of TYPE PWM. This object will switch on/off heating.<br>
- </li>
- <li>factor[,offset]<br>
- Pulse for PWM will be calculated as ((delta-temp * factor) ** 2) + offset.<br>
- <i>offset</i> defaults to 0.11<br>
- <i>factor</i> can be used to weight rooms.<br>
- </li>
- <li>tsensor[:reading[:t_regexp]]<br>
- <i>tsensor</i> defines the temperature sensor for the actual room temperature.<br>
- <i>reading</i> defines the reading of the temperature sensor. Default is "temperature"<br>
- <i>t_regexp</i> defines a regular expression to be applied to the reading. Default is '(\d[\d\.]+)'.<br>
- </li>
- <li>actor[:<a_regexp_on>]<br>
- The actor will be set to "on" of "off" to turn on/off heating.<br>
- <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>
- </li>
- <li><window|dummy>[,<window>[:<w_regexp>]<br>
- <i>window</i> defines several window devices that can prevent heating to be turned on.<br>
- If STATE matches the regular expression then the desired-temp will be decreased to frost-protect temperature.<br>
- 'dummy' can be used as a neutral value for window and will be ignored when processing the configuration.<br>
- <i>w_regexp</i> defines a regular expression to be applied to the reading. Default is '.*Open.*'.<br>
- </li>
- <li>
- <code><usePID=0></code><br>
- <i>usePID 0</i>: calculate Pulse based on parameters factor and offset.<br>
- Internals c_factor and c_foffset will reflect the values used for calculatio. Defaults are 1 and 0.11 (if not specified)<br>
- Readings PWMOnTime and PWMPulse will reflect the actual calculated Pulse.<br>
- </li>
- <li>
- <code><usePID=1>:<PFactor>:<IFactor>[,<ILookBackCnt>]:<DFactor>[,<DLookBackCnt>]</code><br>
- <i>PFactor</i>: Konstant for P. Default is 0.8.<br>
- <i>IFactor</i>: Konstant for I. Default is 0.3<br>
- <i>DFactor</i>: Konstant for D. Default is 0.5<br>
- <i>ILookBackCnt</i>: Buffer size to store previous temperatures. For I calculation all values will be used. Default is 5.<br>
- <i>DLookBackCnt</i>: Buffer size to store previous temperatures. For D calculation actual and oldest temperature will be used. Default is 10.<br>
- 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>
- Readings PID_DVal, PID_IVal, PID_PVal, PID_PWMOnTime and PID_PWMPulse will reflect the actual calculated PID values and Pulse.<br>
- </li>
- <li>
- <code><usePID=2>:<PFactor>:<IFactor>:<DFactor>[,<DLookBackCnt>]</code><br>
- <i>PFactor</i>: Konstant for P. Default is 0.8.<br>
- <i>IFactor</i>: Konstant for I. Default is 0.01<br>
- <i>DFactor</i>: Konstant for D. Default is 0<br>
- <i>DLookBackCnt</i>: Buffer size to store previous temperatures. For D calculation actual and oldest temperature will be used. Default is 10.<br>
- Internals c_PID_PFactor, c_PID_IFactor, c_PID_DFactor, c_PID_DLookBackCnt and c_PID_useit will reflect the above configuration values.<br>
- Readings PID_DVal, PID_IVal, PID_PVal, PID_PWMOnTime and PID_PWMPulse will reflect the actual calculated PID values and Pulse.<br>
- </li>
- </ul>
- <br>
- Example:<br>
- <br>
- <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen</code><br>
- <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen windowKitchen1,windowKitchen2</code><br>
- <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen windowKitchen1,windowKitchen2:.*Open.*</code><br>
- <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen windowKitchen1,windowKitchen2</code><br>
- <code>define roomKitchen PWMR fh 1,0.11 tempKitchen relaisKitchen dummy 0</code><br>
- <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 1:0.8:0.3:0.5</code><br>
- <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 1:0.8:0.3,5:0.5,10</code><br>
- <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 2:0.8:0.01:00</code><br>
- <code>define roomKitchen PWMR fh 0 tempKitchen relaisKitchen dummy 2:0.8:0.01:0.1,10</code><br>
- <br>
-
- </ul>
- <br>
- <b>Set </b>
- <ul>
- <li>factor<br>
- Temporary change of parameter <i>factor</i>.
- </li><br>
- <li>actor<br>
- 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.
- </li><br>
- <li>desired-temp<br>
- 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>
- Default for this period is 60 minutes, but it can be changed by attribute <i>autoCalcTemp</i>.<br>
- If <i>desired-temp</i> is not automatically calculated (attribute <i>autoCalcTemp</i> is 0) then this will set the actual target temperature.<br>
- </li><br>
- <li>manualTempDuration<br>
- Define the period how long <i>desired-temp</i> manually set will be valid. Default is 60 Minutes.<br>
- </li><br>
- <li>interval<br>
- Temporary change <i>INTERVAL</i> which defines how often <i>desired-temp</i> is calculated in autoCalcMode. Default is 300 seconds (5:00 Minutes).
- </li><br>
- <li>frostProtect<br>
- Sets attribute frostProtect to 1 (on) or 0 (off).
- </li><br>
- </ul>
- <b>Get </b>
- <ul>
- <li>previousTemps<br>
- Get conent of buffers defined by <i>ILookBackCnt</i> and <i>DLookBackCnt</i>.
- </li><br>
- </ul>
- <b>Attributes</b>
- <ul>
- <li>disable<br>
- PWMR objects with attribute disable set to <i>1</i> will be excluded in the calculation loop of the PWM object.
- </li><br>
- <li>frostProtect<br>
- Switch on (1) of off (0) frostProtectMode. <i>desired-temp</i> will be set to <i>tempFrostProtect</i> in autoCalcMode.
- </li><br>
- <li>autoCalcTemp<br>
- Switch on (1) of off (0) autoCalcMode. <i>desired-temp</i> will be set based on the below temperatures and rules in autoCalcMode.<br>
- Default is on.
- </li><br>
- <li>tempDay<br>
- Define day temperature. This will be referenced as "D" in the rules.
- </li><br>
- <li>tempNight<br>
- Define night temperature. This will be referenced as "N" in the rules.
- </li><br>
- <li>tempCosy<br>
- Define cosy temperature. This will be referenced as "C" in the rules.
- </li><br>
- <li>tempEnergy<br>
- Define energy saving temperature. This will be referenced as "E" in the rules.
- </li><br>
- <li>tempFrostProtect<br>
- Define temperature for frostProtectMode. See also <i>frostProtect</i>.
- </li><br>
- <li>tempRule1 ... tempRule5<br>
- Rule to calculate the <i>desired-temp</i> in autoCalcMode.<br>
- Format is: <weekday>[-<weekday] <time>,<temperatureSelector><br>
- weekday is one of Mo,Di,Mi,Do,Fr,Sa,So<br>
- time is in format hh:mm, e.g. 7:00 or 07:00<br>
- temperatureSelector is one of D,N,C,E<br>
- <br>
- Predefined are:<br>
- tempRule1: Mo-Fr 6:00,D 22:00,N<br>
- tempRule2: Sa-So 8:00,D 22:00,N<br>
- This results in tempDay 6:00-22:00 from Monday to Friday and tempNight outside this time window.<br>
- </li><br>
- <li>desiredTempFrom<br>
- 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>
- (Either by removing the attribute autoCalcTemp or explicitly setting it to '1'.).<br>
- If set correctly the desired-temp will be read from a reading of another device.<br>
- Format is <device>[:<reading>[:<regexp>]]<br>
- <i>device</i> defines the reference to the other object.<br>
- <i>reading</i> defines the reading that contains the value for desired-temp. Default is 'desired-temp'.<br>
- <i>regexp</i> defines a regular expression to extract the value used for 'desired-temp'. Default is '(\d[\d\.]+)'.
- If <i>regexp</i> does not match (e.g. reading is 'off') then tempFrostProtect is used.<br>
- Internals c_desiredTempFrom reflects the actual setting and d_name, d_reading und d_regexpTemp the values used.<br>
- If this attribute is used then state will change from "Calculating" to "From <device>".<br>
- Calculation of desired-temp is (like when using tempRules) based on the interval specified for this device (default is 300 seconds).<br>
- Special values "on" and "off" of Homematic devices are handled as c_tempC (set by attribute tempCosy) and c_tempFrostProtect (set by attribute tempFrostProtect).
- </li><br>
- <li>valueFormat<br>
- Defines a map to format values within PWMR.<br>
- The following reading can be formated using syntax of sprinf: temperature
- <br>
- Example: { "temperature" => "%0.2f" }
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="PW_Circle"></a>
- <h3>PW_Circles</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PW_Circle'>DE</a>]</div>
- <ul>
- The PW_Circles module is invoked by Plugwise. You need to define a Plugwise-Stick first.
- See <a href="#Plugwise">Plugwise</a>.
- <br>
- <a name="PW_Circle define"></a>
- <br>
- <b>Define</b>
- <ul>
- <code>define <name> PW_Circle <ShortAddress></code> <br>
- <br>
- <code><ShortAddress></code>
- <ul>
- specifies the short (last 4 Bytes) of the Circle received by the Plugwise-Stick. <br>
- </ul>
- <br><br>
- </ul>
- <b>Set</b>
- <ul>
- <code>on / off</code> <br>
- <ul>
- Turns the circle on or off<br><br>
- </ul>
- <code>on-for-timer / off-for-timer sec</code> <br>
- <ul>
- Turns the circle on or off for a given interval<br><br>
- </ul>
- <code>syncTime</code> <br>
- <ul>
- Syncronises the internal clock of the Circle with your PC's clock<br><br>
- </ul>
- <code>removeNode</code> <br>
- <ul>
- Removes this device from your Plugwise-network<br><br>
- </ul>
- <code>ping</code> <br>
- <ul>
- Ping the circle and write the Ping-Runtime to reading "ping" in format "q_in - q_out - pingTime"<br><br>
- </ul>
- <code>status</code> <br>
- <ul>
- Gets the current state of this cirle.<br><br>
- </ul>
- </ul>
-
- <br><br>
-
- <b>Attributes</b>
- <ul>
- <code>interval</code> <br>
- <ul>
- specifies the polling time for this circle<br>
- </ul>
- </ul>
- <br><br>
- <b>Example</b> <br>
- <ul><code>define Circle_2907CC9 PW_Circle 2907CC9</code></ul>
- <br>
-
- <br>
- </ul>
- <p><p><a name="PW_Scan"></a>
- <h3>PW_Scan</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PW_Scan'>DE</a>]</div>
- <ul>
- The PW_Scan module is invoked by Plugwise. You need to define a Plugwise-Stick first.
- See <a href="#PW_Scan">PW_Scan</a>.
- <br>
- <a name="PW_Scan define"></a>
- <br>
- <b>Define</b>
- <ul>
- <code>define <name> PW_Scan <ShortAddress></code> <br>
- <br>
- <code><ShortAddress></code>
- <ul>
- specifies the short (last 4 Bytes) of the PW_Scan received by the Plugwise-Stick. <br>
- </ul>
- <br>
- Example: <br>
- <code>define PW_Scan_2907CC9 PW_Scan 2907CC9</code>
- <br>
- </ul>
- <br>
- </ul>
- <p><p><a name="PW_Sense"></a>
- <h3>PW_Sense</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PW_Sense'>DE</a>]</div>
- <ul>
- The PW_Sense module is invoked by Plugwise. You need to define a Plugwise-Stick first.
- See <a href="#PW_Sense">PW_Sense</a>.
- <br>
- <a name="PW_Sense define"></a>
- <br>
- <b>Define</b>
- <ul>
- <code>define <name> PW_Sense <ShortAddress></code> <br>
- <br>
- <code><ShortAddress></code>
- <ul>
- specifies the short (last 4 Bytes) of the PW_Sense received by the Plugwise-Stick. <br>
- </ul>
- <br>
- Example: <br>
- <code>define PW_Sense_2907CC9 PW_Sense 2907CC9</code>
- <br>
- </ul>
- <br>
- </ul>
- <p><p><a name="PW_Switch"></a>
- <h3>PW_Switch</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PW_Switch'>DE</a>]</div>
- <ul>
- The PW_Switch module is invoked by Plugwise. You need to define a Plugwise-Stick first.
- See <a href="#PW_Switch">PW_Switch</a>.
- <br>
- <a name="PW_Switch define"></a>
- <br>
- <b>Define</b>
- <ul>
- <code>define <name> PW_Switch <ShortAddress></code> <br>
- <br>
- <code><ShortAddress></code>
- <ul>
- specifies the short (last 4 Bytes) of the Circle received by the Plugwise-Stick. <br>
- </ul>
- <br>
- Example: <br>
- <code>define PW_Switch_2907CC9 PW_Switch 2907CC9</code>
- <br>
- </ul>
- <b>Set</b>
- <ul>
- <code>syncTime</code> <br>
- <ul>
- Syncronises the internal clock of the Circle with your PC's clock<br><br>
- </ul>
- <code>removeNode</code> <br>
- <ul>
- Removes this device from your Plugwise-network<br><br>
- </ul>
- <code>ping</code> <br>
- <ul>
- Ping the circle and write the Ping-Runtime to reading "ping" in format "q_in - q_out - pingTime"<br><br>
- </ul>
- </ul>
- <br>
- </ul>
- <p><p><a name="PachLog"></a>
- <h3>PachLog</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PachLog'>DE</a>]</div>
- <ul>
- The PachLog-Module Logs SensorData like (temperature and humidity) to <a href=http://www.pachube.com>www.pachube.com</a>.
- <br><br>
- Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
- <br><br>
- <a name="PachLogdefine"></a>
- <b>Define</b>
- <ul>
- <br><code>define <name> PachLog <Pachube-API-Key></code> <br>
- <br>
- <Pachube-API-Key>:<br>
- The Pachube-API-Key however is what you need in your code to authenticate your application's access the Pachube service.<br>
- Don't share this with anyone: it's just like any other password.<br>
- <a href=http://www.pachube.com>www.pachube.com</a><br>
- </ul>
- <br>
- <a name="PachLogset"></a>
- <b>Set</b>
- <ul>
- <br>
- Add a new Device for Logging to www.pachube.com<br><br>
- <code>set <NAME> ADD <FHEM-DEVICENAME> FEED-NR:ID:READING:ID:READING</code><br><br>
- Example: KS300-Weather-Data<br><br>
- READINGS: temperature humidity wind rain<br><br>
- 1. Generate Input-Feed on www.pachube.com => Yout get your FEED-NR: 1234<br>
- 2. Add Datastreams to the Feed:<br>
- <ul>
- <table>
- <tr><td>ID</td><td>0</td><td>temperature</td></tr>
- <tr><td>ID</td><td>1</td><td>humidity</td></tr>
- <tr><td>ID</td><td>2</td><td>wind</td></tr>
- <tr><td>ID</td><td>3</td><td>rain</td></tr></table><br>
- </ul>
- 3. Add the KS300 to your PachLog-Device<br><br>
- <code>set <NAME> ADD <My-KS300> 1234:0temperature:1:humidity:2:wind:3:rain</code><br><br>
- Delete a Device form Logging to www.pachube.com<br><br>
- <code>set <NAME> DEL <FHEM-DEVICENAME></code><br><br>
- </ul>
- <br>
- <a name="PachLogget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="PachLogattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li>disable<br>
- Disables PachLog.
- Nor more Logging to www.pachube.com
- </li>
- </ul><br>
- </ul>
- <p><a name="PiXtendV2"></a>
- <h3>PiXtendV2</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PiXtendV2'>DE</a>]</div>
- <ul>
- PiXtend is a programmable logic controller (PLC) based on the Raspberry Pi.
- This FHEM-module allows to access the functions of the PiXtendV2-Board through the FHEM interface.
- PiXtend offers a variety of digital and analog inputs and outputs which are designed for industry standards
- and safe connections and thus is ideally suited for home automation.
- For more information about PiXtend(R) and this FHEM-module, see
- <a href="http://www.PiXtend.de" target="_blank">www.PiXtend.de</a> or
- <a href="http://www.PiXtend.com" target="_blank">www.PiXtend.com</a>.
- <br><br>
- <a name="PiXtendV2Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> PiXtendV2</code>
- <br><br>
- Example:
- <ul>
- <code>define pix PiXtendV2</code><br>
- </ul>
- </ul>
- <br>
- <a name="PiXtendV2Set"></a>
- <b>Set</b>
- <ul>
- Commands to configure the basic settings of the PiXtend start with an "_".<br>
- If a command supports multiple channels the "#"-sign has to be replaced with the channel number.<br>
- All Set-commands are case insensitive to guarantee an easy use.<br>
- For more information see the manuel for PiXtendV2 in the
- <a href="http://www.PiXtend.de/PiXtend/downloads/" target="_blank">download section</a>
- of our homepage.
- <br><br>
- Example:
- <ul>
- <code>set pix relayOut0 on</code><br>
- <code>set pix Relayout0 On</code><br>
- <code>set pix rElAyoUT0 oFf</code><br>
- </ul>
- <br><br>
-
- <li>_GPIO#Ctrl [input,output,DHT11,DHT22]<br>
- With this setting the GPIO can be configured as [input], [output] or as [DHT11] or [DHT22] as well, if a DHT sensor is connected to this GPIO.
- If a DHT is selected and connected, the GPIO can't simultaniously be used as a normal GPIO but the temperatur and humidity is read automatically.
- <br><br></li>
-
- <li>_GPIOPullupsEnable [yes,no]<br>
- This setting enables [yes] or disables [no] the possibility to set the internal pullup resistors via GPIOOut setting for all GPIOs.
- <br><br></li>
-
- <li>_JumperSettingAI# [5V,10V]<br>
- This setting affects the calculation of the voltage on the analog inputs and refers to the actual setting of the physical jumper on the PiXtend-Board [5V,10V].
- The default value is [10V] if no jumper is used.
- <br><br></li>
-
- <li>_StateLEDDisable [yes,no]<br>
- This setting disables [yes] or enables [no] the state LED on the PiXtend. If the LED is disabled it won't light up in case of an error.
- <br><br></li>
-
- <li>_WatchdogEnable [disable,125ms,1s,8s]<br>
- This setting allows to configure the watchdog timer. If the watchdog is configured, the PiXtend will go to safe state if no valid data transfer has
- occured within the selected timeout and thus can't be accessed anymore without a reset.
- <br><br></li>
- <li>AnalogOut# []<br>
- Sets the analog output to the selected voltage. The value can be a voltage between 0 V and 10 V
- or a raw value between 0 and 1023. To set the value to a voltage the value has to include a
- "." even if it is an even number.
- <br><br>
- Example:
- <ul>
- <code>set pix analogout0 2.5</code>   => sets analog output 0 to 2.5 V<br>
- <code>set pix analogout0 4.0</code>   => sets analog output 0 to 4 V<br>
- <code>set pix analogout0 223</code>   => sets analog output 0 to 10*(233/1024) = 1.09 V
- </ul>
- <br><br></li>
- <li>DigitalDebounce# [0-255]<br>
- Allows to debounce the digital inputs. A setting always affects two channels. So DigitalDebounce01 affects DigitalIn0 and DigitalIn1.
- The resulting delay is calculated by (selected value)*(100 ms). The selected value can be any number between 0 and 255.
- Debouncing can be usefull if a switch or button is connected to this input.
- <br><br>
- Example:
- <ul>
- <code>set pix digitaldebounce01 20</code>   => debounces DigitalIn0 and DigitalIn1 over (20*100ms) = 2s
- </ul>
- <br><br></li>
-
- <li>DigitalOut# [on,off,toggle]<br>
- Set the digital output HIGH [on] or LOW [off] or [toggle]s it.
- <br><br></li>
- <li>GPIODebounce# [0-255]<br>
- Allows to debounce the GPIO inputs. A setting always affects two channels. So GPIODebounce01 affects GPIOIn0 and GPIOIn1.
- The resulting delay is calculated by (selected value)*(100 ms). The selected value can be any number between 0 and 255.
- Debouncing can be usefull if a switch or button is connected to this input.
- <br><br>
- Example:
- <ul>
- <code>set pix gpiodebounce23 33</code>   => debounces GPIOIn2 and GPIOIn3 over (33*100ms) = 3.3s
- </ul>
- <br><br></li>
-
- <li>GPIOOut# [on,off,toggle]<br>
- Set the GPIO to HIGH [on] or LOW [off] or [toggle]s it, if it is configured as an output.
- If it is configured as an input, this command can enable [on] or disable [off] or [toggle] the internal pullup resistor for that GPIO,
- but therefore pullups have to be enabled globally via _GPIOPullupsEnable.
- <br><br></li>
- <li>PWM<br>
- The PiXtendV2 supports various PWM-Modes, which can be configured with this settings.
- For example a servo-mode to control servo-motors, a frequency-mode or a duty-cycle-mode are supported.
- For more information see the manuel for PiXtendV2 in the
- <a href="http://www.PiXtend.de/PiXtend/downloads/" target="_blank">download section</a>
- of our homepage.
- <br><br>
- PWM#Ctrl0 needs a value between 0 and 255<br>
- PWM#Ctrl1 needs a value between 0 and 65535 (or a value between 0 and 255)<br>
- PWM#A/B needs a value between 0 and 65535 (or a value between 0 and 255)
- <br><br></li>
- <li>RelayOut# [on,off,toggle]<br>
- Set the relay to HIGH [on] or LOW [off] or [toggle]s it.
- <br><br></li>
-
- <li>Reset<br>
- Resets the controller on the PiXtend, for example if it is in safe state and allows to access it again.
- <br><br></li>
-
- <li>RetainCopy [on,off]<br>
- If RetainCopy is enabled [on] the RetainDataOut that is written to the PiXtend will be received in RetainDataIn again.
- This can be usefull in some situations to see which data was send to the PiXtend.
- If it is disabled [off] the last stored data will be received.
- <br><br></li>
-
- <li>RetainDataOut [0-(RetainSize-1)] [0-255]<br>
- The PiXtendV2 supports the storage of retain data. If enabled, this data is stored in case of a power failure or if it is triggered by a watchdog timeout or the safe state command.
- The retain data is organized in bytes and each byte can be written individually with a value between 0 and 255.<br>
- As first parameter the command needs the byte index which is between 0 and the (RetainSize-1). The RetainSize is shown in the "Internals".
- As the second parameter a value is expected which should be stored.
- <br><br>
- Example:
- <ul>
- <code>set pix retaindataout 0 34</code>    => stores 34 in retain-data-byte 0<br>
- <code>set pix retaindataout 30 222</code>   => stores 222 in retain-data-byte 30
- </ul>
- <br><br></li>
-
- <li>RetainEnable [on,off]<br>
- The function of storing retain data on the PiXtend has to be enabled [on], otherwise no data is stored [off].
- The memory in which the data is stored supports 10.000 write-cycles.
- So the storage of retain data should only be used if it is really necessary.
- <br><br></li>
-
- <li>SafeState<br>
- This setting allows to force the PiXtend to enter the safe state . If retain storage is enabled the data will be stored. In safe state the PiXtend won't communicate with FHEM and can't be configured.
- To restart the PiXtend a reset has to be done.
- <br><br></li>
- </ul>
- <br>
- <a name="PiXtendV2Get"></a>
- <b>Get</b>
- <ul>
- If a command supports multiple channels the "#"-sign has to be replaced with the channel number.<br>
- All Get-commands are case insensitive to guarantee an easy use.<br>
- For more information see the manuel for PiXtendV2 in the
- <a href="http://www.PiXtend.de/PiXtend/downloads/" target="_blank">download section</a>
- of our homepage.
- The values can be returned as a string where the actual value is inside squared brackets or as raw values.
- To change the returned value an attribute has to be set.
- <br><br>
-
- <li>AnalogIn#<br>
- Returns the Value of the selected analog input.
- The result depends on the selected _JumperSettingAI# and the actual physical jumper position on the board.
- <br><br></li>
- <li>DigitalIn#<br>
- Returns the state 1 (HIGH) or 0 (LOW) of the digital input.
- <br><br></li>
- <li>GPIOIn#<br>
- Returns the state 1 (HIGH) or 0 (LOW) of the GPIO, independant of its configuration (input, output, ..).
- <br><br></li>
-
- <li>RetainDataIn [0-(RetainSize-1)]<br>
- Returns the value of the selected RetainDataIn-byte.
- <br><br></li>
- <li>Sensor# [temperature,humidity]<br>
- If a DHT-Sensor is connected to the corresponding GPIO and the _GPIO#Ctrl is set to DHT11 or DHT22 the
- temperature and humidity are measured and can be read.
- <br><br>
- Example:
- <ul>
- <code>set pix _GPIO0Ctrl DHT11</code><br>
- <code>get pix Sensor0 temperature</code>
- </ul>
- <br><br></li>
-
- <li>SysState<br>
- Returns the system state [defined, active, error] of the FHEM module.
- <br><br></li>
-
- <li>UCState<br>
- Returns the state of the PiXtend. If it is 1 everything is fine. If it is greater than 1 an error occured or is present and the PiXtend can't be configured.
- For more information see the manuel for PiXtendV2 in the
- <a href="http://www.PiXtend.de/PiXtend/downloads/" target="_blank">download section</a>
- of our homepage.
- <br><br></li>
- <li>UCWarnings<br>
- Returns a value that represents the PiXtend warnings.
- For more information see the manuel for PiXtendV2 in the
- <a href="http://www.PiXtend.de/PiXtend/downloads/" target="_blank">download section</a>
- of our homepage.
- <br><br></li>
- <li>Version<br>
- Returns the FHEM-module version and the microcontroller version [Model-Hardware-Firmware].
- <br><br></li>
- </ul>
- <br>
- <a name="PiXtendV2Readings"></a>
- <b>Readings</b>
- <ul>
- The FHEM-module for PiXtendV2 supports multiple readings from which most of them trigger an event when they have changed.
- The meaning of the readings is similar to the Get-commands.
- <br><br>
- <li>AnalogIn#<br>
- Shows the result of the measurment on the analog inputs in V.
- <br><br></li>
- <li>DigitalIn#<br>
- Shows the state 1 (HIGH) or 0 (LOW) of the digital inputs.
- <br><br></li>
-
- <li>Firmware<br>
- Shows the firmware version.
- <br><br></li>
-
- <li>GPIOIn#<br>
- Shows the state 1 (HIGH) or 0 (LOW) of the GPIOs, independant of their configuration (input, output, ..).
- <br><br></li>
-
- <li>Hardware<br>
- Shows the hardware version.
- <br><br></li>
-
- <li>Model<br>
- Shows the model.
- <br><br></li>
-
- <li>RetainDataIn<br>
- Shows the values of the RetainDataIn.
- The values of RetainDataIn are combined in one row, whereby the most left value represents Byte0 / RetainDataIn0.
- Each value is seperated by an " " and thus can be parsed very easy in perl:
- <br><br>
- Example:
- <ul>
- <code>my ($str) = ReadingsVal(pix, "RetainDataIn", "?")</code><br>
- <code>if($str ne "?"){</code><br>
-  <code>my @val = split(/ /, $str);</code>   => $val[0] contains Byte0, $val[1] Byte1, ...<br>
-  <code>...</code><br>
- <code>}</code>
- </ul>
- <br><br></li>
-
- <li>Sensor#T/H<br>
- Shows the temperature (T) in °C and the humidity (H) in % of the sensor that is connected to the corresponding GPIO.
- <br><br></li>
- <li>UCState<br>
- Shows the state of the PiXtend. If it is 1 everything is fine. If it is greater than 1 an error occured or is present and the PiXtend can't be configured.
- For more information see the manuel for PiXtendV2 in the
- <a href="http://www.PiXtend.de/PiXtend/downloads/" target="_blank">download section</a>
- of our homepage.
- <br><br></li>
- <li>UCWarnings<br>
- Shows a value that represents the PiXtend warnings.
- For more information see the manuel for PiXtendV2 in the
- <a href="http://www.PiXtend.de/PiXtend/downloads/" target="_blank">download section</a>
- of our homepage.
- <br><br></li>
- </ul>
- <br>
-
- <a name="PiXtendV2Attr"></a>
- <b>Attributes</b>
- <ul>
- The attribute name is case-sensitive.
- <br><br>
- <li>PiXtend_GetFormat [text,value]<br>
- Changes the style in which the values of the Get commands are returned. They can be returned as a message [text] or as a raw [value].
- Default is the presentation as a message.
- <br><br></li>
- <li>PiXtend_Parameter<br>
- With this attribute the base configuration (Set commands with a leading "_") can be saved as an attribute.
- Attributes are stored in the config file. Single commands are seperated with a space " " and each value is seperated by a ":".
- <br><br>
- Example:
- <ul>
- <code>attr pix PiXtend_Parameter _gpio0ctrl:dht11 _gpio3ctrl:dht22</code>
- </ul>
- <br><br></li>
-
- </ul>
- <br>
-
- </ul>
- <p><a name="Plugwise"></a>
- <h3>Plugwise</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Plugwise'>DE</a>]</div>
- <ul>
- This module is for the Plugwise-System.
- <br>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module
- if the devices is connected via USB or a serial port.
- Also needed: digest:CRC
- You can install these modules using CPAN.
- <br><br>
- <b>Define</b>
- <ul>
- <code>define <name> Plugwise <device> </code><br>
- </ul>
- <br>
- <device> specifies the serial port to communicate with the Plugwise-Stick.
- Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
- 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>
- <br>
- Example: <br>
- <code>define myPlugwise Plugwise /dev/ttyPlugwise@115200</code>
- <br>
- </ul>
- <br>
-
- <a name="PLUGWISEset"></a>
- <b>Set</b>
- <ul>
- <code>Scan_Circles</code>
- <ul>
- Initiates a scan for new devices and defines them.
- </ul><br><br>
- <code>syncTime</code>
- <ul>
- Syncs all reachable devices to the system-time.
- </ul><br><br>
- <code>reOpen</code>
- <ul>
- Closes and reopens the serial-Port. (useful in case of to many Errors)
- </ul><br><br>
- </ul>
- <br><br>
- <b>Attributes</b>
- <ul>
- <code>circlecount</code><br>
- <ul>
- Max. Number of Circles to be found by the Scan-Command
- <br><br>
- </ul>
- <code>interval</code><br>
- <ul>standard polling-interval for new Circles
- </ul><br><br>
- <code>autosync</code><br>
- <ul>Sends every n seconds a SyncTime to each device
- </ul><br><br>
- <code>WattFormat</code><br>
- <ul>A string representing the format of the power-readings.
- If not defined, it defaults to %0.f
- </ul><br><br>
- <code>showCom</code><br>
- <ul>Writes the complete communication matching a RegEx into the reading "communication"
- (can be viewed in EventMonitor or used with a FileLog)
- </ul><br><br>
-
- <br>
- </ul>
- <p><p> <a name="PostMe"></a>
- <h3>PostMe</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PostMe'>DE</a>]</div>
- <ul>
- <p> FHEM module to set up a system of sticky notes, similar to Post-Its™</p>
- <a name="PostMedefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <postit> PostMe</code>
- <br />Defines the PostMe system, <postit> is an arbitrary name for the system. </p>
- <a name="PostMeusage"></a>
- <h4>Usage</h4>
- See <a href="http://www.fhemwiki.de/wiki/Modul_PostMe">German Wiki page</a>
- <br/>
- An arbitrary number of lists may be added to the system with the <i>create</i> command.<br/>
- List items may consist of one or more words, and are added/removed by the <i>add</i> and
- <i>remove</i> command, but no separator characters are allowed in one item<br/>
- Attention: A comma "," is the <i>default</i> separator for list items, see attributes below.</br/>
- <p/>
- Meta data for items (=annotations)may be included in the items by using "[" and "]"; characters, e.g.<br/>
- <code>set <postit> add <name> <item> [<attribute1>="<data1>" ...</code><br/>
- These attribute-value pairs may be added, modified and removed with the <i>modify</i> command.
- <p/>
- <b>Special annotations</b> will be evaluated further, either on creation or manually by executing the commands<br/>
- <code>get <postit> special <name></code> resp. <code>get <postit> allspecial</code>
- <ul>
- <li>The attribute <i>at="<timespec/datespec>"</i>, when given a timespec/datespec value, will result in a single or multiple
- reminding messages for this item. The syntax for this timespec/datespec value is<br/>
- <code>(<HH:MM>|<HH:MM:SS>|<YYYY-MM-DD>T<HH:MM:SS>)[-<HH:MM>[P<number>]]</code>
- <br/>
- The first part is the time/date specification when the item is <i>due</i>.
- <br/>The second optional part beginning with a "-"-sign
- denotes how much time befor this date you want to be alerted.
- <br/>The third optional part beginning with a "P" character
- allows to specify a <number> of periodic reminders, the period given by the second part.<br/>
- Processing this attribute means, that several <i>at</i> devices will be set up in the room <i>hidden</i>
- that are triggered when at the specified times.
- See documentation in Wiki for examples.
- </li>
- <li>The attribute <i>notify="<eventspec>"</i>, when given an eventspec value, will result in a single or multiple
- reminding messages for this item.<br/>
- Processing this attribute means, that a <i>notify</i> device will be set up in the room <i>hidden</i>
- that is triggered when the event is detected.</li>
- </ul>
- The sticky notes may be integrated into any Web page by simply embedding the following tags
- <ul>
- <li> <code><embed src="/fhem/PostMe_widget?type=pins&postit=<postit>"/></code> <br/>
- to produce an interactive list of all PostMe names with pins from system <postit>.</li>
- <li> <code><embed src="/fhem/PostMe_widget?type=pin&postit=<postit>&name=<name>"/></code> <br/>
- to produce an interactive entry for PostMe <name>from system <postit></li>
- </ul>
- <br/>
- The module provides interface routines that may be called from your own Perl programs, see documentation in the Wiki.
- <br/>
- <a name="PostMeset"></a>
- <h4>Set</h4>
- <ul>
- <li><code>set <postit> create <name></code>
- <br />creates a sticky note named <name></li>
- <li><code>set <postit> rename <name> <newname></code>
- <br />renames the sticky note named <name> as <newname></li>
- <li><code>set <postit> delete <name></code>
- <br />deletes the sticky note named <name></li>
- <li><code>set <postit> add <name> <item></code>
- <br />adds to the sticky note named <name> an item <item></li>
- <li><code>set <postit> modify <name> <item> <attribute> <data></code>
- <br />adds/modifies/removes and attribute-value-pair <attribute>="<data>" to the item <item> on the sticky note named <name><br/>
- adding, if this attribute is not yet present; modification, if it is present - <data> will then be overwritten; removal, if no <data> is given</li>
- <li><code>set <postit> remove <name> <item></code><br />
- <code>set <postit> remove <name> item<number></code>
- <br />removes from the sticky note named <name> an item <item> or the one numbered <number> (starting at 0)</li>
- <li><code>set <postit> clear <name></code>
- <br />clears the sticky note named <name> from all items </li>
-
- </ul>
- <a name="PostMeget"></a>
- <h4>Get</h4>
- <ul>
- <li><code>get <postit> list <name></code>
- <br />Show the sticky note named <name> and its content</li>
- <li><code>get <postit> special <name></code>
- <br />Process the special annotations (see above) of the sticky note named <name></li>
- <li><code>get <postit> mail <name></code>
- <br />Send the sticky note named <name> and its content via eMail to a predefined
- recipient (e.g. sticky note <postme01Name> is sent to <postme01MailRec>).<br/> The mailing
- subroutine <postmeMsgFun> is called with three parameters for recipient, subject
- and text. </li>
- <li><code>get <postit> message <name></code>
- <br />Send the sticky note named <name> and its content via instant messenger to a predefined
- recipient (e.g. sticky note <postme01Name> is sent to <postme01MsgRec>).<br/> The messenger
- subroutine <postmeMsgFun> is called with three parameters for recipient, subject
- and text. </li>
- <li><code>get <postit> TTS <name></code>
- <br />Speak the sticky note named <name> and its content. The TTS
- subroutine <postmeTTSFun> is called with one parameter text. </li>
- <li><code>get <postit> JSON <name></code>
- <br />Return the sticky note named <name> in JSON format</li>
- <li><code>get <postit> all</code>
- <br />Show all sticky notes and their content</li>
- <li><code>get <postit> allspecial</code>
- <br />Process the special annotations (see above) of all sticky notes</li>
- <li><code>get <postit> version</code>
- <br />Display the version of the module</li>
- </ul>
- <a name="PostMeattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><code>attr <postit> postmeStd <name1,name2,...></code>
- <br />Comma separated list of standard sticky notes that will be created on device start.</li>
- <li><code>attr <postit> postmeClick 1|0 (default)</code>
- <br />If 0, embedded sticky notes will pop up on mouseover-events and vanish on mouseout-events (default).<br/>
- If 1, embedded sticky notes will pop up on click events and vanish after closing the note</li>
- <li><code>attr <postit> postmeIcon <string></code>
- <br />Icon for display of a sticky note</li>
- <li><code>attr <postit> postmeStyle SVG|HTML|jQuery (default)</code>
- <br />If jQuery, embedded sticky notes will produce jQuery code (default) <br/>
- If HTML, embedded sticky notes will produce HTML code <br/>
- If SVG, embedded sticky notes will produce SVG code</li>
- <li><code>attr <postit> listseparator <character></code>
- <br />Character used to separate list items (default ',')</li>
- </ul>
- Note, that in the parameters sent to the following functions, ":" serves as separator between list name and items,
- and "," serves as separator between items. They may be exchanged with simple regular expression operations.
- <ul>
- <li><code>attr <postit> postmeMailFun <string></code>
- <br />Function name for the eMail function. This subroutine
- is called with three parameters for recipient, subject
- and text.</li>
- <li><code>attr <postit> postmeMailRec(01|02|...) <string></code>
- recipient addresses for the above eMail function (per PostMe).</li>
- <li><code>attr <postit> postmeMsgFun <string></code>
- <br />Function name for the instant messenger function. This subroutine
- is called with three parameters for recipient, subject
- and text.</li>
- <li><code>attr <postit> postmeMsgRec(01|02|...) <string></code>
- recipient addresses for the above instant messenger function (per PostMe).</li>
- <li><code>attr <postit> postmeTTSFun <string></code>
- <br />Function name for the text-to-speech function. This subroutine
- is called with two parameters, the device name and the composite text.
- </li>
- <li><code>attr <postit> postmeTTSDev(01|02|...) <string></code>
- device name for the above TTS function.</li>
- <li>Standard attributes <a href="#alias">alias</a>, <a href="#comment">comment</a>, <a
- href="#event-on-update-reading">event-on-update-reading</a>, <a
- href="#event-on-change-reading">event-on-change-reading</a>, <a href="#room"
- >room</a>, <a href="#eventMap">eventMap</a>, <a href="#loglevel">loglevel</a>,
- <a href="#webCmd">webCmd</a></li>
- </ul>
- </ul>
- <p><a name="PrecipitationSensor"></a>
- <h3>PrecipitationSensor</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PrecipitationSensor'>DE</a>]</div>
- <ul>
- For more information about the PrecipitationSensor see here: <a href="https://forum.fhem.de/index.php?topic=73016.0">FHEM thread</a>
- <br><br>
- <a name="PrecipitationSensor_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> PrecipitationSensor <device></code> <br>
- <device> specifies the network device<br>
- Normally this is the IP-address and the port in the form ip:port<br>
- Example: 192.168.1.100:81<br>
- <br>
- </ul>
- <a name="PrecipitationSensor_Set"></a>
- <b>Set</b>
- <ul>
- <li>raw <data><br>
- send <data> to the PrecipitationSensor.
- </li><br>
- <li>connect<br>
- tries to (re-)connect to the PrecipitationSensor. It does not reset the PrecipitationSensor but only try to get a connection to it.
- </li><br>
- <li>reboot<br>
- Reboots the PrecipitationSensor. Works only if we are connected (state is opened or initialized)
- </li><br>
-
- <li>calibrate<br>
- Calibrates and saves the threshold levels of the PrecipitationSensor. Works only if we are connected (state is opened or initialized)</br>
- How to perform a calibration:</br>
- 1.) Place the sensor in a location with absolutely no motion within a radius of at least 3 meters<br>
- 2.) Set the "Publish interval" on the web interface to 60 seconds</br>
- 3.) Wait for at least 120 seconds before calling the "calibrate" command</br>
- 4.) The calibrated threshold levels "GroupMagThresh" will be updated after the next Publish interval cycle
- </li><br>
-
- <li>restPreciAmount<br>
- Resets the amount of precipitation. Works only if we are connected (state is opened or initialized)
- </li><br>
-
- <li>savesettings<br>
- Saves the changes to flash. Works only if we are connected (state is opened or initialized)
- </li><br>
- <li>flash<br>
- This provides a way to flash it directly from FHEM.
- </li><br>
-
- </ul>
- <a name="PrecipitationSensor_Get"></a>
- <b>Get</b>
- <ul>
- ---
- </ul>
- <br>
- <a name="PrecipitationSensor_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>initCommands<br>
- Space separated list of commands to send for initialization.
- </li><br>
- <li>timeout<br>
- format: <timeout><br>
- Asks the PrecipitationSensor every timeout seconds if it is still alive. If there is no response it reconnects to the PrecipitationSensor.<br>
- </li><br>
- <li>disable<br>
- if disabled, it does not try to connect
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="PushNotifier"></a>
- <h3>PushNotifier</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#PushNotifier'>DE</a>]</div>
- <ul>
- PushNotifier is a service to receive instant push notifications on your
- phone or tablet from a variety of sources.<br>
- You need an account to use this module.<br>
- For further information about the service see <a href="http://www.fhemwiki.de/wiki/PushNotifier">FhemWiki PushNotifier</a>.<br>
- <br>
- Discuss the module <a href="http://forum.fhem.de/index.php/topic,25440.0.html">here</a>.<br>
- <br>
- <br>
- <a name="PushNotifierDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> PushNotifier <apiToken> <appName> <user> <password> <deviceID></code><br>
- <br>
- You have to create an account to get the apiToken.<br>
- And you have to create an application to get the appToken.<br>
- <br>
- Example:
- <ul>
- <code>define PushNotifier1 PushNotifier 01234 appname user password 012</code>
- </ul>
- </ul>
- <br>
- <a name="PushNotifierSet"></a>
- <b>Set</b>
- <ul>
- <code>set <PushNotifier_device> message</code>
- <br>
- <br>
- Examples:
- <ul>
- <code>set PushNotifier1 message This is a text.</code><br>
- </ul>
- Linebreak:
- <ul>
- <code>set PushNotifier1 message This is a text._New Line.</code><br>
- </ul>
- </ul>
- <br>
- <a name="PushNotifierEvents"></a>
- <b>Generated events:</b>
- <ul>
- N/A
- </ul>
- </ul>
- <p><a name="Pushalot"></a>
- <h3>Pushalot</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Pushalot'>DE</a>]</div>
- <ul>
- Pushalot is a service to receive instant push notifications on your
- Windows Phone device from a variety of sources.<br>
- You need an account to use this module.<br>
- For further information about the service see <a href="https://pushalot.com" target="_blank">pushalot.com</a>.<br>
- <br>
- Discuss the module <a href="http://forum.fhem.de/index.php/topic,37775.0.html" target="_blank">here</a>.<br>
- <br>
- <br>
- <a name="PushalotDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Pushalot <token> [<source>]</code><br>
- <br>
- <table>
- <colgroup>
- <col style="width: 100px";"></col>
- <col></col>
- </colgroup>
- <tr>
- <td><token></td>
- <td>The token that identifies a pushalot-account. You need to create if no account yet.</td>
- </tr>
- <tr>
- <td><source></td>
- <td>The source defines what will be shown in the 'from'-field of the message (the sender).</td>
- </tr>
- </table>
- <br>
- Example:
- <ul>
- <code>define PushNotification Pushalot 123234 FHEM</code>
- </ul>
- </ul>
- <br>
- <a name="PushalotSet"></a>
- <b>Set</b>
- <ul>
- <code>set <Pushalot_device> "<message>" ["<title>"] ["<image>"] ["<link>"] ["<link_title>"] ["<important>"] ["<silent>"]</code>
- <br>
- <br>
- <table>
- <colgroup>
- <col style="width: 100px";"></col>
- <col></col>
- </colgroup>
- <tr>
- <td><message></td>
- <td>The message body that should appear in the message.</td>
- </tr>
- <tr>
- <td><title></td>
- <td>The title of the message.</td>
- </tr>
- <tr>
- <td><image></td>
- <td>An optional image URL that is shown in the message.</td>
- </tr>
- <tr>
- <td><link></td>
- <td>An optional link that should be appended to the message body.</td>
- </tr>
- <tr>
- <td><link_title></td>
- <td>An optional link title. If no title is set, the URL is shown as title in the message.</td>
- </tr>
- <tr>
- <td><important></td>
- <td>True|False: True if the message should be marked as 'important', otherwise False (Default)</td>
- </tr>
- <tr>
- <td><silent></td>
- <td>True|False: True if the message should be delivered silently (no notify sound is played), otherwise False (Default)</td>
- </tr>
- <tr>
- <td><time_to_live></td>
- <td>The time in minutes after which the message is automatically purged</td>
- </tr>
- </table>
- <br>
- Examples:
- <ul>
- <code>set PushNotification message "This is my message."</code><br>
- <code>set PushNotification message "This is my message." "With Title"</code><br>
- <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png"</code><br>
- <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png" "http://www.xyz.com"</code><br>
- <code>set PushNotification message "This is my message." "With Title" "http://www.xyz.com/image.png" "http://www.xyz.com" "Link Title" </code><br>
- <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>
- <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>
- <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>
- </ul>
- <br>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="PushalotAttr"></a>
- <b>Attributes</b> <ul>N/A</ul><br>
- <ul>
- </ul>
- <br>
- <a name="PushalotEvents"></a>
- <b>Generated events:</b>
- <ul>
- N/A
- </ul>
- </ul>
- <p><a name="Pushbullet"></a>
- <h3>Pushbullet</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Pushbullet'>DE</a>]</div>
- <ul>
- Pushbullet is a service to send instant push notifications to different devices. There are
- apps for iPhone, Android, Windows (Beta), Mac OS X and plugins for Chrome Firefox and Safari.<br>
- For further information about the service see <a target="_blank" href="https://pushbullet.com">pushbullet.com</a>.<br>
- <br>
- Discuss the module <a target="_blank" href="http://forum.fhem.de/index.php/topic,29796.0.html">here</a>.<br> <br><br>
- <a name="Pushbullet_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Pushbullet <accessToken></code><br>
- <br>
- Note:<br>
- <ul>
- <li>JSON has to be installed on the FHEM host.</li>
- <li>Register on pushbullet.com to get your accessToken.</li>
- </ul>
- </ul><br>
- <a name="Pushbullet_Set"></a>
- <b>Set</b>
- <ul>
- <li>clear<br>
- clear device readings</li>
- <li>contactAdd name | email<br>
- adds a contact. Spaces in name are allowed</li>
- <li>deviceDelete deviceName<br>
- deletes a device</li>
- <li>deviceRename deviceName | newDeviceName<br>
- renames a device</li>
- <li>link [| title | device]<br>
- sends a link with optional title and device. If no device is given, push goes to all your devices.</li>
- <li>list item1[, item2, item3, ... | title | device]<br>
- sends a list with one or more items, optional title and device. If no device is given, push goes to all your devices.</li>
- <li>message [| title | device]<br>
- sends a push notification with optional title and device. If no device is given, push goes to all your devices.</li>
- <br>
- Examples:<br>
- <ul>
- <code>set Pushbullet message This is a message.</code><br>
- sends a push notification with message "This is a message" without a title to all <b>your</b> devices.<br><br>
- <code>set Pushbullet message This is a message | A title</code><br>
- sends a push notification with message "This is a message" and title "A title" to all <b>your</b> devices.<br><br>
- <code>set Pushbullet message This is a message | A title | iPhone</code><br>
- sends a push notification with message "This is a message" and title "A title" to Device iPhone.<br><br>
- <code>set Pushbullet message This is a message | A title | Max Mustermann</code><br>
- sends a push notification with message "This is a message" and title "A title" to your contact Max Mustermann.<br>
- </ul>
- <br>
- Note:<br>
- Spaces before and after | are not needed.
- </ul><br>
-
- <a name="Pushbullet_Get"></a>
- <b>Get</b>
- <ul>
- <li>devices<br>
- reads your device list (devices + contacts) and set device readings</li>
- </ul><br>
- <a name="Pushbullet_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>defaultDevice<br>
- default device for pushmessages</li>
- <li>defaultTitle<br>
- default title for pushmessages. If it is undefined the defaultTitle will be FHEM</li>
- </ul>
- </ul>
- <p><a name="Pushover"></a>
- <h3>Pushover</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Pushover'>DE</a>]</div>
- <ul>
- Pushover is a service to receive instant push notifications on your
- phone or tablet from a variety of sources.<br>
- You need an account to use this module.<br>
- For further information about the service see <a href="https://pushover.net">pushover.net</a>.<br>
- <br>
- Installation of Perl module IO::Socket::SSL is mandatory to use this module (i.e. via 'cpan -i IO::Socket::SSL').<br>
- It is recommended to install Perl-JSON to make use of advanced functions like supplementary URLs.<br>
- <br>
- Discuss the module <a href="http://forum.fhem.de/index.php/topic,16215.0.html">here</a>.<br>
- <br>
- <br>
- <a name="PushoverDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Pushover <token> <user> [<infix>]</code><br>
- <br>
- You have to <a href="https://pushover.net/login">create an account</a> to get the user key.<br>
- And you have to <a href="https://pushover.net/apps/build">create an application</a> to get the API token.<br>
- <br>
- Attribute infix is optional to define FHEMWEB uri name for Pushover API callback function.<br>
- Callback URL may be set using attribute callbackUrl (see below).<br>
- Note: A uri name can only be used once within each FHEM instance!<br>
- <br>
- Example:
- <ul>
- <code>define Pushover1 Pushover 01234 56789</code>
- </ul>
- <ul>
- <code>define Pushover1 Pushover 01234 56789 pushCallback1</code>
- </ul>
- </ul>
- <br>
- <a name="PushoverSet"></a>
- <b>Set</b>
- <ul><b>msg</b><ul>
- <code>set <Pushover_device> msg <text> [<option1>=<value> <option2>="<value with space in it>" ...]</code>
- <br>
- <br>
- The following options may be used to adjust message content and delivery behavior:<br>
- <br>
- <code><b>message</b> </code> - type: text - Your message text. Using this option takes precedence; non-option text content will be discarded.<br>
- <code><b>device</b> </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>
- <code><b>title</b> </code> - type: text - Your message's title, otherwise your Pushover API app's name is used.<br>
- <code><b>action</b> </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>
- <code><b>url_title</b> </code> - type: text - A title for your FHEM command or supplementary URL, otherwise just the URL is shown.<br>
- <code><b>priority</b> </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>
- <code><b>retry</b> </code> - type: integer - Mandatory in combination with message priority >= 2.<br>
- <code><b>expire</b> </code> - type: integer - Mandatory in combination with message priority >= 2.<br>
- <code><b>cancel_id</b> </code> - type: text - Custom ID to immediate expire messages with priority >=2 and disable reoccuring notification.<br>
- <code><b>timestamp</b> </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>
- <code><b>sound</b> </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>
- <code><b>attachment</b> </code> - type: text - Path to an image file that should be attached to the message. The base path is relative to the FHEM directory and may be overwritten using the storage attribute.<br>
- <br>
- Examples:
- <ul>
- <code>set Pushover1 msg My first Pushover message.</code><br>
- <code>set Pushover1 msg My second Pushover message.\nThis time with two lines.</code><br>
- <code>set Pushover1 msg "Another Pushover message in double quotes."</code><br>
- <code>set Pushover1 msg 'Another Pushover message in single quotes.'</code><br>
- <code>set Pushover1 msg message="Pushover message using explicit option for text content." This part of the text will be ignored.</code><br>
- <code>set Pushover1 msg This is a message with a title. title="This is a subject"</code><br>
- <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>
- <code>set Pushover1 msg This message has an attachment! attachment="demolog/pictures/p1.jpg"</code><br>
- <code>set Pushover1 msg title=Emergency priority=2 retry=30 expire=3600 Security issue in living room.</code><br>
- <code>set Pushover1 msg title=Link Have a look to this website: url_title="Open" action="http://fhem.de/" expire=3600</code><br>
- <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>
- <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>
- </ul>
- <br>
- </ul></ul>
- <br>
- <br>
- <ul><b>msgCancel</b><ul>
- <code>set <Pushover_device> msgCancel <ID></code>
- <br>
- <br>
- Prematurely stopps reoccuring confirmation request for messages with priority >= 2.<br>
- <br>
- Example:
- <ul>
- <code>set Pushover1 msg title=Emergency priority=2 retry=30 expire=3600 Security Alarm in Living room. sound=siren cancel_id=SecurityAlarm</code><br>
- <code>set Pushover1 msgCancel SecurityAlarm</code>
- </ul>
- </ul></ul>
- <br>
- <br>
- <ul><b>msg</b> <u>(deprecated format)</u><ul>
- <code>set <Pushover_device> msg [title] <msg> [<device> <priority> <sound> [<retry> <expire> [<url_title> <action>]]]</code>
- <br>
- <br>
- Examples:
- <ul>
- <code>set Pushover1 msg 'This is a text.'</code><br>
- <code>set Pushover1 msg 'Title' 'This is a text.'</code><br>
- <code>set Pushover1 msg 'Title' 'This is a text.' '' 0 ''</code><br>
- <code>set Pushover1 msg 'Emergency' 'Security issue in living room.' '' 2 'siren' 30 3600</code><br>
- <code>set Pushover1 msg 'Hint' 'This is a reminder to do something' '' 0 '' 0 3600 'Click here for action' 'set device something'</code><br>
- <code>set Pushover1 msg 'Emergency' 'Security issue in living room.' '' 2 'siren' 30 3600 'Click here for action' 'set device something'</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <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)
- </li>
- <li>If device is empty, the message will be sent to all devices.
- </li>
- <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.
- </li>
- <li>If sound is empty, the default setting in the app will be used.
- </li>
- <li>If priority is higher or equal 2, retry and expire must be defined.
- </li>
- </ul>
- </ul></ul>
- <br>
- <br>
- <ul><b>glance</b><ul>
- <code>set <Pushover_device> glance [<text>] [<option1>=<value> <option2>="<value with space in it>" ...]</code>
- <br>
- <br>
- Update <a href="https://pushover.net/api/glances">Pushover's glances</a> on Apple Watch.<br>
- The following options may be used to adjust message content and delivery behavior:<br>
- <br>
- <code><b>title</b> </code> - type: text(100 characters) - A description of the data being shown, such as "Widgets Sold".<br>
- <code><b>text</b> </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>
- <code><b>subtext</b> </code> - type: text(100 characters) - A second line of data.<br>
- <code><b>count</b> </code> - type: integer(may be negative) - Shown on smaller screens; useful for simple counts.<br>
- <code><b>percent</b> </code> - type: integer(0-100) - Shown on some screens as a progress bar/circle.<br>
- <code><b>device</b> </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>
- <br>
- </ul></ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="PushoverAttr"></a>
- <b>Attributes</b>
- <ul>
- <li>
- <a href="#do_not_notify">do_not_notify</a>
- </li>
- <li>
- <a href="#disabledForIntervals">disabledForIntervals</a>
- </li>
- <li>
- <a href="#readingFnAttributes">readingFnAttributes</a>
- </li>
- <li>
- <a name="PushoverAttrcallbackUrl"></a><code>callbackUrl</code><br>
- Set the callback URL to be used to acknowledge messages with emergency priority or supplementary URLs.
- </li>
- <li><a name="PushoverAttrtimestamp"></a><code>timestamp</code><br>
- Send the unix timestamp with each message.
- </li>
- <li><a name="PushoverAttrtitle"></a><code>title</code><br>
- Will be used as title if title is not specified as an argument.
- </li>
- <li><a name="PushoverAttrdevice"></a><code>device</code><br>
- 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.
- </li>
- <li><a name="PushoverAttrpriority"></a><code>priority</code><br>
- 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
- </li>
- <li><a name="PushoverAttrexpire"></a><code>expire</code><br>
- 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.
- </li>
- <li><a name="PushoverAttrretry"></a><code>retry</code><br>
- When message priority is 2, this default value will be used for retry when not provided in the message.
- </li>
- <li><a name="PushoverAttrsound"></a><code>sound</code><br>
- Will be used as the default sound if sound argument is missing. If left blank the adjusted sound of the app will be used.
- </li>
- <li><a name="PushoverAttrstorage"></a><code>storage</code><br>
- Will be used as the default path when sending attachments, otherwise global attribute modpath will be used.
- </li>
- </ul>
- <br>
- <a name="PushoverEvents"></a>
- <b>Generated events:</b>
- <ul>
- N/A
- </ul>
- </ul>
- <p><a name="Pushsafer"></a>
- <h3>Pushsafer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Pushsafer'>DE</a>]</div>
- <ul>
- Pushsafer is a web service to receive instant push notifications on your
- iOS, Android or Windows 10 Phone or Desktop device from a variety of sources.<br>
- You need a Pushsafer account to use this module.<br>
- For further information about the service see <a href="https://www.pushsafer.com" target="_new">pushsafer.com</a>.<br>
- <br>
- This module is only capable to send messages via Pushsafer.<br>
- <br>
- <a name="PushsaferDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Pushsafer <key></code><br>
- <br>
- The parameter <key> 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>
- <br>
- Example:
- <ul>
- <code>define PushsaferAccount Pushsafer A1b2c3D4E5F6g7h8i9J0</code>
- </ul>
- </ul>
- <br>
- <a name="PushsaferSet"></a>
- <b>Set</b>
- <ul>
- <code>set <name> message <text> [<option1>=<value> <option2>=<value> ...]</code><br>
- <br>
- Currently only the message command is available to sent a message.<br>
- <br>
- So the very basic use case is to send a simple text message like the following example:<br>
- <br>
- <code>set PushsaferAccount message "My first Pushsafer message."</code><br>
- <br>
- To send a multiline message, use the placeholder "\n" to indicate a newline:<br>
- <br>
- <code>set PushsaferAccount message "My second Pushsafer message.\nThis time with two lines."</code><br>
- <br>
- <u>Optional Modifiers</u><br>
- <br>
- 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>
- <br>
- <code><b>title</b> </code> - short: <code>t </code> - type: text - A special title for the message text.<br>
- <code><b>device</b> </code> - short: <code>d </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>
- <code><b>sound</b> </code> - short: <code>s </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>
- <code><b>icon</b> </code> - short: <code>i </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>
- <code><b>vibration</b></code> - short: <code>v </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>
- <code><b>url</b> </code> - short: <code>u </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>
- <code><b>urlText</b> </code> - short: <code>ut</code> - type: text - A text that should be used to display a URL from the "url" option.<br>
- <code><b>key</b> </code> - short: <code>k </code> - type: text - Overrides the private key given in the define statement. Also an alias key can be used.<br>
- <code><b>ttl</b> </code> - short: <code>l </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>
- <code><b>picture</b> </code> - short: <code>p </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><name></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>
- <code><b>picture2</b> </code> - short: <code>p2</code> - type: text - same syntax as for option <code>"picture"</code><br>
- <code><b>picture3</b> </code> - short: <code>p3</code> - type: text - same syntax as for option <code>"picture"</code><br>
- <br>
- Examples:<br>
- <br>
- <ul>
- <code>set PushsaferAccount message "This is a message with a title." title="Super important"</code><br>
- <code>set PushsaferAccount message "Get down here\nWe're waiting" title="Lunch is ready" device=100</code><br>
- <code>set PushsaferAccount message "Server is down" sound=25 icon=5 vibration=3</code><br>
- <code>set PushsaferAccount message "Look at my photos" url="http://www.foo.com/myphotos" urlText="Summer Vacation"</code><br>
- <br>
- It is also possible to use the short-term versions of options:<br>
- <br>
- <code>set PushsaferAccount message "This is a message with a title." t="Super important"</code><br>
- <code>set PushsaferAccount message "Get down here\nWe're waiting" t="Lunch is ready" d=100</code><br>
- <code>set PushsaferAccount message "Server is down" s=25 i=5 v=3</code><br>
- <code>set PushsaferAccount message "Look at my photos" u="http://www.foo.com/myphotos" ut="Summer Vacation"</code><br>
- </ul>
- <br>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="PushsaferAttr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- </ul>
- <br>
- <a name="PushsaferEvents"></a>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li><b>lastSuccess</b> - The last successful status message received by the Pushsafer server</li>
- <li><b>lastError</b> - The last errur message received by the Pushsafer server</li>
- <li><b>availableMessages-<i><device ID></i>-<i><device name></i></b> - The remaining messages that can be send to this device</li>
- </ul>
- </ul>
- <p><a name="QRCode"></a>
- <h3>QRCode</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#QRCode'>DE</a>]</div>
- <ul>
- Devices of this module are used to generate an URL that will be used to generate
- and receive a QRCode from the service of TEC-IT<br/>
- The device will also display the generated QRCode in the device details. It can
- also provide the HTML-code used for display for other purposes (e.g. weblink devices)
- <br/><br/>
- <b>ATTENTION:</b>The sevice provider does not allow more than 30 QRCode generations / minute
- without special permission<br/><br/>
- See terms of sevice on TEC-IT homepage: http://qrcode.tec-it.com/de#TOS
- <br/><br/>
- <a name="QRCodedefine"></a>
- <b>Define</b><br/>
- <ul>
- <code>define <name> QRCode</code>
- <br/><br/>
- </ul>
- <br/>
- <a name="QRCodeset"></a>
- <b>Set</b><br/>
- <ul>
- <code>set <name> update</code><br/>
- Refreshes the QRCode-URL for Image generation.
- </ul>
- <br/>
- <a name="QRCodeattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <b>QRCode-URL relevant attributes</b>
- <br/><br/>
- The following attributes take influence on the QRCode generation.
- <br/><br/>
- If one of those attributes is changed, per default an auto update of the QRCode-URL is performed.
- <br/><br/>
- <li><a name="qrData">qrData</a><br/>
- This attribute is used to set the data that will be encoded in the QRCode.<br/>
- If this attribute is not set an error message is generatet.
- <br/><br/>
- </li>
- <li><a name="qrSize">qrSize</a><br/>
- Defines the size of the generated QRCode image<br/>
- Possible values are small, medium (default), large.
- <br/><br/>
- </li>
- <li><a name="qrResolutionDPI">qrResolutionDPI</a><br/>
- Defines the resolution for QRCode generaation<br/>
- Valid values are between 96 and 600 (Default is 300dpi)
- <br/><br/>
- </li>
- <li><a name="qrColor">qrColor</a><br/>
- Defines the foreground color of the genereted QRCode image<br/>
- This is a RGB color value in hex format (eg. FF0000 = red)
- Default is 000000 (black)
- <br/><br/>
- </li>
- <li><a name="qrBackColor">qrBackColor</a><br/>
- Defines the background color of the genereted QRCode image<br/>
- This is a RGB color value in hex format (eg. 0000FF = blue)
- Default is FFFFFF (white).
- <br/><br/>
- </li>
- <li><a name="qrTransparent">qrTransparent</a><br/>
- Defines that the background of the generated QRCode will be transparent<br/>
- Possible values are False (non-tranparent background) or True (transparent background)<br/>
- default is non-transparent.
- <br/><br/>
- </li>
- <li><a name="qrQuietZone">qrQuietZone</a><br/>
- defines the size of a quiet zone around the QRCode in the image.<br/>
- This is a blank zone making it easier to scan the QRCode for some scanners.<br/>
- Default ist 0, if attribute is not set.
- <br/><br/>
- </li>
- <li><a name="qrQuietUnit">qrQuietUnit</a><br/>
- specifies the unit for qrQuietZone attribute<br/>
- Possible values are mm (default), in (=inch), mil (=mils), mod (=Module) or px (=Pixel).
- <br/><br/>
- </li>
- <li><a name="qrCodepage">qrCodepage</a><br/>
- Used Codepage for QRCode generation.<br/>
- Possible values are UTF8 (default), Cyrillic or Ansi
- <br/><br/>
- </li>
- <li><a name="qrErrorCorrection">qrErrorCorrection</a><br/>
- Error correction used in generated QRCode image.<br/>
- Possible values are L (default), M,Q or H
- <br/><br/>
- </li>
-
- <b>Display relevant attributes</b>
- <br/><br/>
- The followin Attribute change the behaviour and display parameters for the detail view<br/>
- of QRCode devices in FHEMWEB. Therfore it changes the result of QRCode_getHtml function<br/>
- (see below.)<br/><br/>
- In cas of an error, neither QRCode, nor qrDisplayText will be displayed. Instead<br/>
- an error message is displayed.
- <br/><br/>
- <li><a name="qrDisplayWidth">qrDisplayWidth</a><br/>
- display width of the QRCode image<br/>
- Default is 200
- <br/><br/>
- </li>
- <li><a name="qrDisplayHeigth">qrDisplayHeight</a><br/>
- Display height of the QRCode image<br/>
- Default is 200
- <br/><br/>
- </li>
- <li><a name="qrDisplayData">qrDisplayData</a><br/>
- If set the contents or the reading data is displayed below the QRCode image<br/>
- Usually this is the contents of attribute qrData.
- <br/><br/>
- </li>
- <li><a name="qrDisplayNoImage">qrDisplaNoImage</a><br/>
- If set, the QRCode image will not be displayed
- <br/><br/>
- </li>
- <li><a name="qrDisplayText">qrDisplaText</a><br/>
- user defined text to be displayed below QRCode image
- <br/><br/>
- </li>
- <li><a name="qrDisplayNoText">qrDisplaNoText</a><br/>
- If this attribute is set, the text specified in qrDisplayText will not be displayed<br/>
- below QRCode image. So qrDisplayText doesn't have to be deleted.
- <br/><br/>
- </li>
- <li><a name="qrNoAutoUpdate">qrNoAutoUpdate</a><br/>
- If set not auto update will be processed for QRCode relevant attributes.
- <br/><br/>
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br/><br/>
- <a name="QRCodereadings"></a>
- <b>Generated Readings</b>
- <br/><br/>
- <ul>
- <br/>
- <li>data<br/>
- This reading contains the data to be encoded by the QRCode<br/>
- Usually this is the contents of attribute qrData.<br/>
- In case of an error it contains the error message.
- <br/><br/>
- </li>
- <li>qrcode_url<br/>
- By <code>set update</code> generated URL, used to get the QRCode image<br/>
- <br/><br/>
- </li>
- <li>state<br/>
- The state of the device<br/>
- Initially this is <code>defined</code> or the timestamp of last <code>set update</code>, or auto-update
- <br/><br/>
- </li>
- </ul>
- <br/><br/>
-
- <a name="QRCodefunctions"></a>
- <b>Usefull Funktionen</b>
- <br/><br/>
- The module comes with a useful function to provide the HTML code used for display in detail view of the<br/>
- QRCode device in FHEMWEB for other purposes, e.g. weblink.
- <br/><br/>
- <ul>
- <br/>
- <li><code>QRCode_getHtml($;$$)</code><br/><br/>
- Returns the HTML code for the specified QRCode device
- <br/><br/>
- Arguments:
- <br/><br/>
- <ul>
- <li>QRCodeDevice<br/>
- Name of the QRCode device as a string.
- </li>
- <li>noImage (Optional)<br/>
- The same as attribute qrDisplayNoImage<br/>
- </li>
- <li>noText (Optional)<br/>
- The same as attribute qrDisplayNoText<br/>
- </li>
- </ul>
- <br/><br/>
- Example:
- <br/><br/>
- <code>QRCode_getHtml('MyQRCode',1,0)</code>
- <br/><br/>
- Generate HTML code of (QRCode-) device named MyQRCode with QRCode image but not with the<br/>
- user defined Text (qrDisplayText).
-
-
- </li>
- </ul>
- </ul>
- <p> <p>
- <a name="RESIDENTS" id="RESIDENTS"></a>
- </p>
- <h3>
- RESIDENTS
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RESIDENTS'>DE</a>]</div>
- <ul>
- <a name="RESIDENTSdefine" id="RESIDENTSdefine"></a> <b>Define</b>
- <ul>
- <code>define <rgr_ResidentsName> RESIDENTS</code><br>
- <br>
- Provides a special virtual device to represent a group of individuals living at your home.<br>
- 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>
- Based on the current state and other readings, you may trigger other actions within FHEM.<br>
- <br>
- Example:<br>
- <ul>
- <code># Standalone<br>
- define rgr_Residents RESIDENTS</code>
- </ul>
- </ul><br>
- <br>
- <a name="RESIDENTSset" id="RESIDENTSset"></a> <b>Set</b>
- <ul>
- <code>set <rgr_ResidentsName> <command> [<parameter>]</code><br>
- <br>
- Currently, the following commands are defined.<br>
- <ul>
- <li>
- <b>addGuest</b> - creates a new GUEST device and adds it to the current RESIDENTS group. Just enter the dummy name and there you go.
- </li>
- <li>
- <b>addRoommate</b> - creates a new ROOMMATE device and adds it to the current RESIDENTS group. Just enter the first name and there you go.
- </li>
- <li>
- <b>removeGuest</b> - shows all GUEST members and allows to delete their dummy devices easily.
- </li>
- <li>
- <b>removeRoommate</b> - shows all ROOMMATE members and allows to delete their dummy devices easily.
- </li>
- <li>
- <b>state</b> home,gotosleep,asleep,awoken,absent,gone switch between states for all group members at once; see attribute rgr_states to adjust list shown in FHEMWEB
- </li>
- <li>
- <b>create</b> wakeuptimer add several pre-configurations provided by RESIDENTS Toolkit. See separate section for details.
- </li>
- </ul>
- <ul>
- <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'.
- The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Possible states and their meaning</u><br>
- <br>
- <ul>
- This module differs between 7 states:<br>
- <br>
- <ul>
- <li>
- <b>home</b> - residents are present at home and at least one of them is not asleep
- </li>
- <li>
- <b>gotosleep</b> - present residents are on their way to bed (if they are not asleep already)
- </li>
- <li>
- <b>asleep</b> - all present residents are currently sleeping
- </li>
- <li>
- <b>awoken</b> - at least one resident just woke up from sleep
- </li>
- <li>
- <b>absent</b> - no resident is currently at home but at least one will be back shortly
- </li>
- <li>
- <b>gone</b> - all residents left home for longer period
- </li>
- <li>
- <b>none</b> - no active member
- </li>
- </ul><br>
- <br>
- Note: State 'none' cannot explicitly be set. Setting state to 'gone' will be handled as 'none' for GUEST member devices.
- </ul>
- </ul><br>
- <br>
- <a name="RESIDENTSattr" id="RESIDENTSattr"></a> <b>Attributes</b><br>
- <ul>
- <ul>
- <li>
- <b>rgr_lang</b> - overwrite global language setting; helps to set device attributes to translate FHEMWEB display text
- </li>
- <li>
- <b>rgr_noDuration</b> - may be used to disable continuous, non-event driven duration timer calculation (see readings durTimer*)
- </li>
- <li>
- <b>rgr_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
- </li>
- <li>
- <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
- </li>
- <li>
- <b>rgr_wakeupDevice</b> - reference to enslaved DUMMY devices used as a wake-up timer (part of RESIDENTS Toolkit's wakeuptimer)
- </li>
- </ul>
- </ul><br>
- <br>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <ul>
- <li>
- <b>lastActivity</b> - the last state change of one of the group members
- </li>
- <li>
- <b>lastActivityBy</b> - the realname of the last group member with changed state
- </li>
- <li>
- <b>lastArrival</b> - timestamp of last arrival at home
- </li>
- <li>
- <b>lastAwake</b> - timestamp of last sleep cycle end
- </li>
- <li>
- <b>lastDeparture</b> - timestamp of last departure from home
- </li>
- <li>
- <b>lastDurAbsence</b> - duration of last absence from home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurAbsence_cr</b> - duration of last absence from home in computer readable format (minutes)
- </li>
- <li>
- <b>lastDurPresence</b> - duration of last presence at home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurPresence_cr</b> - duration of last presence at home in computer readable format (minutes)
- </li>
- <li>
- <b>lastDurSleep</b> - duration of last sleep in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurSleep_cr</b> - duration of last sleep in computer readable format (minutes)
- </li>
- <li>
- <b>lastSleep</b> - timestamp of last sleep cycle begin
- </li>
- <li>
- <b>lastState</b> - the prior state
- </li>
- <li>
- <b>lastWakeup</b> - time of last wake-up timer run
- </li>
- <li>
- <b>lastWakeupDev</b> - device name of last wake-up timer
- </li>
- <li>
- <b>nextWakeup</b> - time of next wake-up program run
- </li>
- <li>
- <b>nextWakeupDev</b> - device name for next wake-up program run
- </li>
- <li>
- <b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
- </li>
- <li>
- <b>residentsAbsent</b> - number of residents with state 'absent'
- </li>
- <li>
- <b>residentsAbsentDevs</b> - device name of residents with state 'absent'
- </li>
- <li>
- <b>residentsAbsentNames</b> - device alias of residents with state 'absent'
- </li>
- <li>
- <b>residentsAsleep</b> - number of residents with state 'asleep'
- </li>
- <li>
- <b>residentsAsleepDevs</b> - device name of residents with state 'asleep'
- </li>
- <li>
- <b>residentsAsleepNames</b> - device alias of residents with state 'asleep'
- </li>
- <li>
- <b>residentsAwoken</b> - number of residents with state 'awoken'
- </li>
- <li>
- <b>residentsAwokenDevs</b> - device name of residents with state 'awoken'
- </li>
- <li>
- <b>residentsAwokenNames</b> - device alias of residents with state 'awoken'
- </li>
- <li>
- <b>residentsGone</b> - number of residents with state 'gone'
- </li>
- <li>
- <b>residentsGoneDevs</b> - device name of residents with state 'gone'
- </li>
- <li>
- <b>residentsGoneNames</b> - device alias of residents with state 'gone'
- </li>
- <li>
- <b>residentsGotosleep</b> - number of residents with state 'gotosleep'
- </li>
- <li>
- <b>residentsGotosleepDevs</b> - device name of residents with state 'gotosleep'
- </li>
- <li>
- <b>residentsGotosleepNames</b> - device alias of residents with state 'gotosleep'
- </li>
- <li>
- <b>residentsHome</b> - number of residents with state 'home'
- </li>
- <li>
- <b>residentsHomeDevs</b> - device name of residents with state 'home'
- </li>
- <li>
- <b>residentsHomeNames</b> - device alias of residents with state 'home'
- </li>
- <li>
- <b>residentsTotal</b> - total number of all active residents despite their current state
- </li>
- <li>
- <b>residentsTotalAbsent</b> - number of all residents who are currently underway
- </li>
- <li>
- <b>residentsTotalAbsentDevs</b> - device name of all residents who are currently underway
- </li>
- <li>
- <b>residentsTotalAbsentNames</b> - device alias of all residents who are currently underway
- </li>
- <li>
- <b>residentsTotalGuests</b> - number of active guests who are currently treated as part of the residents scope
- </li>
- <li>
- <b>residentsTotalGuestsAbsent</b> - number of all active guests who are currently underway
- </li>
- <li>
- <b>residentsTotalGuestsAbsentDevs</b> - device name of all active guests who are currently underway
- </li>
- <li>
- <b>residentsTotalGuestsAbsentNames</b> - device alias of all active guests who are currently underway
- </li>
- <li>
- <b>residentsTotalGuestsPresent</b> - number of all active guests who are currently at home
- </li>
- <li>
- <b>residentsTotalGuestsPresentDevs</b> - device name of all active guests who are currently at home
- </li>
- <li>
- <b>residentsTotalGuestsPresentNames</b> - device alias of all active guests who are currently at home
- </li>
- <li>
- <b>residentsTotalRoommates</b> - number of residents treated as being a permanent resident
- </li>
- <li>
- <b>residentsTotalRoommatesAbsent</b> - number of all roommates who are currently underway
- </li>
- <li>
- <b>residentsTotalRoommatesAbsentDevs</b> - device name of all roommates who are currently underway
- </li>
- <li>
- <b>residentsTotalRoommatesAbsentNames</b> - device alias of all roommates who are currently underway
- </li>
- <li>
- <b>residentsTotalRoommatesPresent</b> - number of all roommates who are currently at home
- </li>
- <li>
- <b>residentsTotalRoommatesPresentDevs</b> - device name of all roommates who are currently at home
- </li>
- <li>
- <b>residentsTotalRoommatesPresentNames</b> - device alias of all roommates who are currently at home
- </li>
- <li>
- <b>residentsTotalPresent</b> - number of all residents who are currently at home
- </li>
- <li>
- <b>residentsTotalPresentDevs</b> - device name of all residents who are currently at home
- </li>
- <li>
- <b>residentsTotalPresentNames</b> - device alias of all residents who are currently at home
- </li>
- <li>
- <b>residentsTotalWakeup</b> - number of all residents which currently have a wake-up program being executed
- </li>
- <li>
- <b>residentsTotalWakeupDevs</b> - device name of all residents which currently have a wake-up program being executed
- </li>
- <li>
- <b>residentsTotalWakeupNames</b> - device alias of all residents which currently have a wake-up program being executed
- </li>
- <li>
- <b>residentsTotalWayhome</b> - number of all active residents who are currently on their way back home
- </li>
- <li>
- <b>residentsTotalWayhomeDevs</b> - device name of all active residents who are currently on their way back home
- </li>
- <li>
- <b>residentsTotalWayhomeNames</b> - device alias of all active residents who are currently on their way back home
- </li>
- <li>
- <b>residentsTotalWayhomeDelayed</b> - number of all residents who are delayed on their way back home
- </li>
- <li>
- <b>residentsTotalWayhomeDelayedDevs</b> - device name of all delayed residents who are currently on their way back home
- </li>
- <li>
- <b>residentsTotalWayhomeDelayedNames</b> - device alias of all delayed residents who are currently on their way back home
- </li>
- <li>
- <b>state</b> - reflects the current state
- </li>
- <li>
- <b>wakeup</b> - becomes '1' while a wake-up program of this resident group is being executed
- </li>
- </ul>
- </ul>
- <br>
- <br>
- <b>RESIDENTS Toolkit</b><br>
- <ul>
- <ul>
- 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>
- The following commands are currently available:<br>
- <br>
- <li>
- <b>wakeuptimer</b> - adds a wake-up timer dummy device with enhanced functions to start with wake-up automations
- <ul>
- 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>
- 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>
- <br>
- The wake-up behaviour may be influenced by the following device attributes:<br>
- <li>
- <i>wakeupAtdevice</i> - backlink the at device (mandatory)
- </li>
- <li>
- <i>wakeupDays</i> - only trigger macro at these days. Mon=1,Tue=2,Wed=3,Thu=4,Fri=5,Sat=6,Sun=0 (optional)
- </li>
- <li>
- <i>wakeupDefaultTime</i> - after triggering macro reset the wake-up time to this default value (optional)
- </li>
- <li>
- <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)
- </li>
- <li>
- <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)
- </li>
- <li>
- <i>wakeupMacro</i> - name of the notify macro device (mandatory)
- </li>
- <li>
- <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)
- </li>
- <li>
- <i>wakeupResetSwitcher</i> - DUMMY device to quickly turn on/off reset function (optional, device will be auto-created)
- </li>
- <li>
- <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)
- </li>
- <li>
- <i>wakeupUserdevice</i> - backlink to RESIDENTS, ROOMMATE or GUEST device to check it's status (mandatory)
- </li>
- <li>
- <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)
- </li>
- </ul>
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="RFHEM"></a>
- <h3>RFHEM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RFHEM'>DE</a>]</div>
- <ul>This module is a easy helper module to connect separate FHEM installations</ul>
- <ul>You can send commands to other installations or send them automatically.</ul>
- <b>Define</b>
- <ul><code>define <Name> RFHEM <hostname[:port]> <[pw]></code></ul><br>
- <ul><code>define remotePI RFHEM christian-pi test123</code></ul><br>
- <a name="RFHEM set"></a>
- <b>Set</b>
- <ul><code>set <Name> cmd <fhem command></code></ul><br>
- <ul><code>set remotePI cmd set lampe on</code></ul>
- <b>Attribute</b>
- <li>RFHEMdevs<br>
- a list of devices separated by comma
- all events of this devices will be set on the remote installation automatically
- there must be device with the same nameon the other side (dummys)
- </li><br>
- <li>RFHEMevents<br>
- a list of events separated by comma
- all events of RFHEMdevs will be set on the remote installation automatically
- </li><br>
- <ul>this modul can be perfectly used with notify:</ul>
- <ul><code>define LichtschlauchNotify notify wz.LichtschlauchDummy { fhem "set RemotePI cmd set Wohnzimmer.Lichtschlauch $EVENT" }</code></ul><br>
- <p><a name="RFXCOM"></a>
- <h3>RFXCOM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RFXCOM'>DE</a>]</div>
- <ul>
- 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>
- These receivers supports many protocols like Oregon Scientific weather sensors, RFXMeter devices, X10 security and lighting devices and others. <br>
- Currently the following parser modules are implemented: <br>
- <ul>
- <li> 41_OREGON.pm (see device <a href="#OREGON">OREGON</a>): Process messages Oregon Scientific weather sensors.
- See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> of
- Oregon Scientific weather sensors that could be received by the RFXCOM receivers.
- 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>
- </li>
- <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>
- <li> 43_RFXX10REC.pm (see device <a href="#RFXX10REC">RFXX10REC</a>): Process X10 security and X10 lighting devices. </li>
- </ul>
- <br>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module
- if the devices is connected via USB or a serial port.
- <br><br>
- <a name="RFXCOMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> RFXCOM <device> [noinit] </code><br>
- </ul>
- <br>
- USB-connected (80002):<br><ul>
- <device> specifies the USB port to communicate with the RFXCOM receiver.
- Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
- For example /dev/ttyUSB0.<br>
- <br>
- Example: <br>
- <code>define RFXCOMUSB RFXCOM /dev/ttyUSB0</code>
- <br>
- </ul>
- <br>
- Network-connected devices:
- <br><ul>
- <device> specifies the host:port of the device. E.g.
- 192.168.1.5:10001
- </ul>
- <ul>
- noninit is optional and issues that the RFXCOM device should not be
- initialized. This is useful if you share a RFXCOM device. It is also useful
- for testing to simulate a RFXCOM receiver via netcat or via FHEM2FHEM.
- <br>
- <br>
- Example: <br>
- <code>define RFXCOMTCP RFXCOM 192.168.1.5:10001</code>
- <br>
- <code>define RFXCOMTCP2 RFXCOM 192.168.1.121:10001 noinit</code>
- <br>
- </ul>
- <br>
- <ul>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li>longids<br>
- 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>
- Default is to use long IDs for all devices.
- <br><br>
- Examples:<PRE>
- # Do not use any long IDs for any devices:
- attr RFXCOMUSB longids 0
- # Use any long IDs for all devices (this is default):
- attr RFXCOMUSB longids 1
- # Use longids for BTHR918N devices.
- # Will generate devices names like BTHR918N_f3.
- attr RFXCOMUSB longids BTHR918N
- # Use longids for TX3_T and TX3_H devices.
- # Will generate devices names like TX3_T_07, TX3_T_01 ,TX3_H_07.
- attr RFXCOMUSB longids TX3_T,TX3_H</PRE>
- </li><br>
- </ul>
- </ul>
- <p><a name="RFXMETER"></a>
- <h3>RFXMETER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RFXMETER'>DE</a>]</div>
- <ul>
- The RFXMETER module interprets RFXCOM RFXMeter messages received by a RFXCOM receiver. You need to define an RFXCOM receiver first.
- See the <a href="#RFXCOM">RFXCOM</a>.
- <br><br>
- <a name="RFXMETERdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> RFXMETER <deviceid> [<scalefactor>] [<unitname>]</code> <br>
- <br>
- <deviceid> is the device identifier of the RFXMeter sensor and is a one byte hexstring (00-ff).
- <br>
- <scalefactor> is an optional scaling factor. It is multiplied to the value that is received from the RFXmeter sensor.
- <br>
- <unitname> is an optional string that describes the value units. It is added to the Reading generated to describe the values.
- <br><br>
- Example: <br>
- <code>define RFXWater RFXMETER 00 0.5 ltr</code>
- <br>
- <code>define RFXPower RFXMETER 01 0.001 kwh</code>
- <br>
- <code>define RFXGas RFXMETER 02 0.01 cu_m</code>
- <br>
- </ul>
- <br>
- <a name="RFXMETERset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="RFXMETERget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="RFXMETERattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- </ul>
- </ul>
- <p><a name="RFXX10REC"></a>
- <h3>RFXX10REC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RFXX10REC'>DE</a>]</div>
- <ul>
- 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.
- See <a href="#RFXCOM">RFXCOM</a>.
- <br><br>
- <a name="RFXX10RECdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> RFXX10REC <type> <deviceid> <devicelog> [<deviceid> <devicelog>] </code> <br>
- <br>
- <code><type></code>
- <ul>
- specifies the type of the X10 device: <br>
- X10 security devices:
- <ul>
- <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>
- <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>
- <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>
- <li> <code>kr18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
- </ul>
- X10 lighting devices:
- <ul>
- <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>
- <li> <code>x10</code> (All other x10 devices. Report [on|off] on both deviceids.)</li>
- </ul>
- </ul>
- <br>
- <code><deviceid></code>
- <ul>
- 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").
- A X10 lighting device has a house code A..P followed by a unitcode 1..16 (example "B1").
- </ul>
- <br>
- <code><devicelog></code>
- <ul>
- is the name of the Reading used to report. Suggested: "Window" or "Door" for ds10a, "motion" for motion sensors, "Smoke" for sd90.
- </ul>
- <br>
- <code><deviceid2></code>
- <ul>
- 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.
- </ul>
- <br>
- <code><devicelog2></code>
- <ul>
- is optional for the name used for the Reading of <code><deviceid2></code>.
- </ul>
- <br>
- Example: <br>
- <code>define livingroom_window RFXX10REC ds10a 72cd Window</code>
- <br>
- <code>define motion_sensor1 RFXX10REC ms10a 55c6 motion</code>
- <br>
- <code>define smoke_sensor1 RFXX10REC sd90 54d3 Smoke 54d3 Smoketest</code>
- <br>
- <code>define motion_sensor2 RFXX10REC ms14a A1 motion A2 light</code>
- <br>
- </ul>
- <br>
- <a name="RFXX10RECset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="RFXX10RECget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="RFXX10RECattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- </ul>
- </ul>
- <p> <a name="ROOMMATE" id="ROOMMATE"></a>
- <h3>ROOMMATE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ROOMMATE'>DE</a>]</div>
- <ul>
- <a name="ROOMMATEdefine" id="ROOMMATEdefine"></a> <b>Define</b>
- <ul>
- <code>define <rr_FirstName> ROOMMATE [<device name(s) of resident group(s)>]</code><br>
- <br>
- Provides a special virtual device to represent a resident of your home.<br>
- Based on the current state and other readings, you may trigger other actions within FHEM.<br>
- <br>
- Used by superior module <a href="#RESIDENTS">RESIDENTS</a> but may also be used stand-alone.<br>
- <br />
- Use comma separated list of resident device names for multi-membership (see example below).<br />
- <br>
- Example:<br>
- <ul>
- <code># Standalone<br>
- define rr_Manfred ROOMMATE<br>
- <br>
- # Typical group member<br>
- define rr_Manfred ROOMMATE rgr_Residents # to be member of resident group rgr_Residents<br>
- <br>
- # Member of multiple groups<br>
- define rr_Manfred ROOMMATE rgr_Residents,rgr_Parents # to be member of resident group rgr_Residents and rgr_Parents<br>
- <br>
- # Complex family structure<br>
- define rr_Manfred ROOMMATE rgr_Residents,rgr_Parents # Parent<br>
- define rr_Lisa ROOMMATE rgr_Residents,rgr_Parents # Parent<br>
- define rr_Rick ROOMMATE rgr_Residents,rgr_Children # Child1<br>
- define rr_Alex ROOMMATE rgr_Residents,rgr_Children # Child2</code>
- </ul>
- </ul><br>
- <br>
- <br>
- <a name="ROOMMATEset" id="ROOMMATEset"></a> <b>Set</b>
- <ul>
- <code>set <rr_FirstName> <command> [<parameter>]</code><br>
- <br>
- Currently, the following commands are defined.<br>
- <ul>
- <li>
- <b>location</b> - sets reading 'location'; see attribute rr_locations to adjust list shown in FHEMWEB
- </li>
- <li>
- <b>mood</b> - sets reading 'mood'; see attribute rr_moods to adjust list shown in FHEMWEB
- </li>
- <li>
- <b>state</b> home,gotosleep,asleep,awoken,absent,gone switch between states; see attribute rr_states to adjust list shown in FHEMWEB
- </li>
- <li>
- <b>create</b>
- <li><i>locationMap</i> add a pre-configured weblink device using showing a Google Map if readings locationLat+locationLong are present.</li>
- <li><i>wakeuptimer</i> add several pre-configurations provided by RESIDENTS Toolkit. See separate section in <a href="#RESIDENTS">RESIDENTS module commandref</a> for details.</li>
- </li>
- </ul>
- <ul>
- <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'.
- The string 'set-user' will ensure only non-admin set-commands can be executed when accessing FHEM using this FHEMWEB instance.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Possible states and their meaning</u><br>
- <br>
- <ul>
- This module differs between 6 states:<br>
- <br>
- <ul>
- <li>
- <b>home</b> - individual is present at home and awake
- </li>
- <li>
- <b>gotosleep</b> - individual is on it's way to bed
- </li>
- <li>
- <b>asleep</b> - individual is currently sleeping
- </li>
- <li>
- <b>awoken</b> - individual just woke up from sleep
- </li>
- <li>
- <b>absent</b> - individual is not present at home but will be back shortly
- </li>
- <li>
- <b>gone</b> - individual is away from home for longer period
- </li>
- </ul>
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Presence correlation to location</u><br>
- <br>
- <ul>
- Under specific circumstances, changing state will automatically change reading 'location' as well.<br>
- <br>
- 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>
- <br>
- 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.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Auto Gone</u><br>
- <br>
- <ul>
- Whenever an individual is set to 'absent', a trigger is started to automatically change state to 'gone' after a specific timeframe.<br>
- Default value is 36 hours.<br>
- <br>
- This behaviour can be customized by attribute rr_autoGoneAfter.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Synchronizing presence with other ROOMMATE or GUEST devices</u><br>
- <br>
- <ul>
- 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>
- 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>
- <br>
- Please note that individuals with current state 'gone' or 'none' (in case of guests) will not be touched.
- </ul>
- </ul><br>
- <br>
- <ul>
- <u>Location correlation to state</u><br>
- <br>
- <ul>
- Under specific circumstances, changing location will have an effect on the actual state as well.<br>
- <br>
- 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>
- <br>
- 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>
- <br>
- 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>
- Arriving at home will reset the value of 'wayhome' to '0'.<br>
- <br>
- 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>
- <br>
- <code>define n_rr_Manfred.location notify geofancy:currLoc_Manfred.* set rr_Manfred:FILTER=location!=$EVTPART1 location $EVTPART1</code><br>
- <br>
- By defining geofencing zones called 'home' and 'wayhome' in the iOS app, you automatically get all the features of automatic state changes described above.
- </ul>
- </ul><br>
- <br>
- <a name="ROOMMATEattr" id="ROOMMATEattr"></a> <b>Attributes</b><br>
- <ul>
- <ul>
- <li>
- <b>rr_autoGoneAfter</b> - hours after which state should be auto-set to 'gone' when current state is 'absent'; defaults to 36 hours
- </li>
- <li>
- <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)
- </li>
- <li>
- <b>rr_lang</b> - overwrite global language setting; helps to set device attributes to translate FHEMWEB display text
- </li>
- <li>
- <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'
- </li>
- <li>
- <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"
- </li>
- <li>
- <b>rr_locationWayhome</b> - leaving a location matching these will set reading wayhome to 1; separate entries by space; defaults to "wayhome"
- </li>
- <li>
- <b>rr_locations</b> - list of locations to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
- </li>
- <li>
- <b>rr_moodDefault</b> - the mood that should be set after arriving at home or changing state from awoken to home
- </li>
- <li>
- <b>rr_moodSleepy</b> - the mood that should be set if state was changed to gotosleep or awoken
- </li>
- <li>
- <b>rr_moods</b> - list of moods to be shown in FHEMWEB; separate entries by comma only and do NOT use spaces
- </li>
- <li>
- <b>rr_noDuration</b> - may be used to disable continuous, non-event driven duration timer calculation (see readings durTimer*)
- </li>
- <li>
- <b>rr_passPresenceTo</b> - synchronize presence state with other ROOMMATE or GUEST devices; separte devices by space
- </li>
- <li>
- <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.
- </li>
- <li>
- <b>rr_realname</b> - whenever ROOMMATE wants to use the realname it uses the value of attribute alias or group; defaults to group
- </li>
- <li>
- <b>rr_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
- </li>
- <li>
- <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
- </li>
- <li>
- <b>rr_wakeupDevice</b> - reference to enslaved DUMMY devices used as a wake-up timer (part of RESIDENTS Toolkit's wakeuptimer)
- </li>
- </ul>
- </ul><br>
- <br>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <ul>
- <li>
- <b>durTimerAbsence</b> - timer to show the duration of absence from home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>durTimerAbsence_cr</b> - timer to show the duration of absence from home in computer readable format (minutes)
- </li>
- <li>
- <b>durTimerPresence</b> - timer to show the duration of presence at home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>durTimerPresence_cr</b> - timer to show the duration of presence at home in computer readable format (minutes)
- </li>
- <li>
- <b>durTimerSleep</b> - timer to show the duration of sleep in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>durTimerSleep_cr</b> - timer to show the duration of sleep in computer readable format (minutes)
- </li>
- <li>
- <b>lastArrival</b> - timestamp of last arrival at home
- </li>
- <li>
- <b>lastAwake</b> - timestamp of last sleep cycle end
- </li>
- <li>
- <b>lastDeparture</b> - timestamp of last departure from home
- </li>
- <li>
- <b>lastDurAbsence</b> - duration of last absence from home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurAbsence_cr</b> - duration of last absence from home in computer readable format (minutes)
- </li>
- <li>
- <b>lastDurPresence</b> - duration of last presence at home in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurPresence_cr</b> - duration of last presence at home in computer readable format (minutes)
- </li>
- <li>
- <b>lastDurSleep</b> - duration of last sleep in human readable format (hours:minutes:seconds)
- </li>
- <li>
- <b>lastDurSleep_cr</b> - duration of last sleep in computer readable format (minutes)
- </li>
- <li>
- <b>lastLocation</b> - the prior location
- </li>
- <li>
- <b>lastMood</b> - the prior mood
- </li>
- <li>
- <b>lastSleep</b> - timestamp of last sleep cycle begin
- </li>
- <li>
- <b>lastState</b> - the prior state
- </li>
- <li>
- <b>lastWakeup</b> - time of last wake-up timer run
- </li>
- <li>
- <b>lastWakeupDev</b> - device name of last wake-up timer
- </li>
- <li>
- <b>location</b> - the current location
- </li>
- <li>
- <b>mood</b> - the current mood
- </li>
- <li>
- <b>nextWakeup</b> - time of next wake-up program run
- </li>
- <li>
- <b>nextWakeupDev</b> - device name for next wake-up program run
- </li>
- <li>
- <b>presence</b> - reflects the home presence state, depending on value of reading 'state' (can be 'present' or 'absent')
- </li>
- <li>
- <b>state</b> - reflects the current state
- </li>
- <li>
- <b>wakeup</b> - becomes '1' while a wake-up program of this resident is being executed
- </li>
- <li>
- <b>wayhome</b> - depending on current location, it can become '1' if individual is on his/her way back home
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="RPII2C"></a>
- <h3>RPII2C</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RPII2C'>DE</a>]</div>
- (en | <a href="commandref_DE.html#RPII2C">de</a>)
- <ul>
- <a name="RPII2C"></a>
- Provides access to Raspberry Pi's I2C interfaces for some logical modules and also directly.<br>
- This modul will basically work on every linux system that provides <code>/dev/i2c-x</code>.<br><br>
- <b>preliminary:</b><br>
- <ul>
- <li>
- load I2C kernel modules (choose <b>one</b> of the following options):<br>
- <ul>
- <li>
- open /etc/modules<br>
- <ul><code>sudo nano /etc/modules</code></ul><br>
- add these lines<br>
- <ul><code>
- i2c-dev<br>
- i2c-bcm2708<br>
- </code></ul>
- </li>
- <li>
- Since Kernel 3.18.x on raspberry pi and maybe on other boards too, device tree support was implemented and enabled by default.
- To enable I2C support just add
- <ul><code>device_tree_param=i2c0=on,i2c1=on</code></ul> to /boot/config.txt
- You can also enable just one of the I2C. In this case remove the unwantet one from the line.
- </li>
- <li>
- 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
- </li>
- reboot
- </ul>
- </li><br>
- <li>Choose <b>only one</b> of the three follwing methodes do grant access to <code>/dev/i2c-*</code> for FHEM user:
- <ul>
- <li>
- <code>sudo apt-get install i2c-tools<br>
- sudo adduser fhem i2c<br>
- sudo reboot</code><br>
- </li><br>
- <li>
- 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>
- <code>
- sudo chown fhem /dev/i2c-*<br>
- sudo chgrp dialout /dev/i2c-*<br>
- sudo chmod +t /dev/i2c-*<br>
- sudo chmod 660 /dev/i2c-*<br>
- </code>
- </li><br>
- <li>
- 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>
- WiringPi installation is described here: <a href="#RPI_GPIO">RPI_GPIO.</a><br>
- gpio utility will be automaticly used, if installed.<br>
- Important: to use I2C-0 at P5 connector you must use attribute <code>swap_i2c0</code>.<br>
- </li>
- </ul>
- </li><br>
- <li>
- <b>Optional</b>: access via IOCTL will be used (RECOMMENDED) if Device::SMBus is not present.<br>
- To access the I2C-Bus via the Device::SMBus module, following steps are necessary:<br>
- <ul><code>sudo apt-get install libmoose-perl<br>
- sudo cpan Device::SMBus</code></ul><br>
- </li>
- <li>
- <b>For Raspbian users only</b><br>
- 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>
- <ul><code>bcm2708.vc_i2c_override=1</code></ul><br>
- </li>
- </ul>
- <a name="RPII2CDefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <name> RPII2C <I2C Bus Number></code><br>
- where <code><I2C Bus Number></code> is the number of the I2C bus that should be used (0 or 1)<br><br>
- </ul>
- <a name="RPII2CSet"></a>
- <b>Set</b>
- <ul>
- <li>
- Write one byte (or more bytes sequentially) directly to an I2C device (for devices that have only one register to write):<br>
- <code>set <name> writeByte <I2C Address> <value></code><br><br>
- </li>
- <li>
- Write n-bytes to an register range (as an series of single register write operations), beginning at the specified register:<br>
- <code>set <name> writeByteReg <I2C Address> <Register Address> <value> [<value> [..]]</code><br><br>
- </li>
- <li>
- Write n-bytes directly to an I2C device (as an block write operation):<br>
- <code>set <name> writeBlock <I2C Address> <Register Address> <value> [<value> [..]]</code><br><br>
- </li>
- <li>
- Write n-bytes to an register range (as an block write operation), beginning at the specified register:<br>
- <code>set <name> writeBlockReg <I2C Address> <Register Address> <value> [<value> [..]]</code><br><br>
- </li><br>
- Examples:
- <ul>
- Write 0xAA to device with I2C address 0x60<br>
- <code>set test1 writeByte 60 AA</code><br>
- Write 0xAA to register 0x01 of device with I2C address 0x6E<br>
- <code>set test1 writeByteReg 6E 01 AA</code><br>
- Write 0xAA to register 0x01 of device with I2C address 0x6E, after it write 0x55 to 0x02 as two separate commands<br>
- <code>set test1 writeByteReg 6E 01 AA 55</code><br>
- 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>
- <code>set test1 writeBlock 60 03 A4 00 DA</code><br>
- </ul><br>
- </ul>
- <a name="RPII2CGet"></a>
- <b>Get</b>
- <ul>
- <li>
- Gets value of I2C device's registers:<br>
- <code>get <name> read <I2C Address> [<Register Address> [<number of registers>]]</code><br><br>
- </li>
- <li>
- Gets value of I2C device in blockwise mode:<br>
- <code>get <name> readblock <I2C Address> [<number of registers>]</code><br><br>
- </li>
- <li>
- Gets value of I2C device's registers in blockwise mode:<br>
- <code>get <name> readblockreg <I2C Address> <Register Address> [<number of registers>]</code><br><br>
- </li><br>
- Examples:
- <ul>
- Reads byte from device with I2C address 0x60<br>
- <code>get test1 read 60</code><br>
- Reads register 0x01 of device with I2C address 0x6E.<br>
- <code>get test1 read 6E 01 AA 55</code><br>
- Reads register 0x03 to 0x06 of device with I2C address 0x60.<br>
- <code>get test1 read 60 03 4</code><br>
- </ul><br>
- </ul><br>
- <a name="RPII2CAttr"></a>
- <b>Attributes</b>
- <ul>
- <li>swap_i2c0<br>
- Swap Raspberry Pi's I2C-0 from J5 to P5 rev. B<br>
- This attribute is for Raspberry Pi only and needs gpio utility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a> library.<br>
- Default: none, valid values: on, off<br><br>
- </li>
- <li>useHWLib<br>
- Change hardware access method.<br>
- Attribute exists only if both access methods are usable<br>
- Default: IOCTL, valid values: IOCTL, SMBus<br><br>
- </li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="RPI_GPIO"></a>
- <h3>RPI_GPIO</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RPI_GPIO'>DE</a>]</div>
- (en | <a href="commandref_DE.html#RPI_GPIO">de</a>)
- <ul>
- <a name="RPI_GPIO"></a>
- Raspberry Pi offers direct access to several GPIO via header P1 (and P5 on V2). The Pinout is shown in table under define.
- 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>
- 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>
- <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>
- <b>preliminary:</b><br>
- 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>
- After execution of following commands, GPIO's are usable whithin PRI_GPIO:<br>
- <ul><code>
- sudo adduser fhem gpio<br>
- sudo reboot
- </code></ul><br>
- 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>
- 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>
- Installation WiringPi:<br>
- <ul><code>
- sudo apt-get update<br>
- sudo apt-get upgrade<br>
- sudo apt-get install git-core<br>
- git clone git://git.drogon.net/wiringPi<br>
- cd wiringPi
- ./build
- </code></ul><br>
- 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>
- This can be done in <code>/etc/rc.local</code> (Examole for GPIO22 and 23):<br>
- <ul><code>
- echo 22 > /sys/class/gpio/export<br>
- echo 23 > /sys/class/gpio/export<br>
- chown -R fhem:root /sys/devices/virtual/gpio/* (or chown -R fhem:gpio /sys/devices/platform/gpio-sunxi/gpio/* for Banana Pi)<br>
- chown -R fhem:root /sys/class/gpio/*<br>
- </code></ul><br>
- <a name="RPI_GPIODefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> RPI_GPIO <GPIO number>[ <GPIO-Basedir>[ <WiringPi-gpio-utility>]]</code><br><br>
- all usable <code>GPIO number</code> can be found <a href="http://www.panu.it/raspberry/">here</a><br><br>
-
- Examples:
- <pre>
- define Pin12 RPI_GPIO 18
- attr Pin12 poll_interval 5
- define Pin12 RPI_GPIO 18 /sys/class/gpio /usr/somewhere/bin/gpio
- </pre>
- </ul>
- <a name="RPI_GPIOSet"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <ul><li>for output configured GPIO
- <ul><code>
- off<br>
- on<br>
- toggle<br>
- </code>
- </ul>
- The <a href="#setExtensions"> set extensions</a> are also supported.<br>
- </li>
- <li>for input configured GPIO
- <ul><code>
- readval
- </code></ul>
- readval refreshes the reading Pinlevel and, if attr toggletostate not set, the state value
- </ul>
- </li><br>
- Examples:
- <ul>
- <code>set Pin12 off</code><br>
- <code>set Pin11,Pin12 on</code><br>
- </ul><br>
- </ul>
- <a name="RPI_GPIOGet"></a>
- <b>Get</b>
- <ul>
- <code>get <name></code>
- <br><br>
- returns "high" or "low" regarding the actual status of the pin and writes this value to reading <b>Pinlevel</b>
- </ul><br>
- <a name="RPI_GPIOAttr"></a>
- <b>Attributes</b>
- <ul>
- <li>direction<br>
- Sets the GPIO direction to input or output.<br>
- Default: input, valid values: input, output<br><br>
- </li>
- <li>active_low<br>
- Inverts logical value<br>
- Default: off, valid values: on, off<br><br>
- </li>
- <li>interrupt<br>
- <b>can only be used with GPIO configured as input</b><br>
- enables edge detection for GPIO pin<br>
- on each interrupt event readings Pinlevel and state will be updated<br>
- Default: none, valid values: none, falling, rising, both<br>
- For "both" the reading Longpress will be added and set to on as long as kes hold down longer than 1s<br>
- 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>
- </li>
- <li>poll_interval<br>
- Set the polling interval in minutes to query the GPIO's level<br>
- Default: -, valid values: decimal number<br><br>
- </li>
- <li>toggletostate<br>
- <b>works with interrupt set to falling or rising only</b><br>
- if yes, state will be toggled at each interrupt event<br>
- Default: no, valid values: yes, no<br><br>
- </li>
- <li>pud_resistor<br>
- Sets the internal pullup/pulldown resistor<br>
- <b>Works only with installed gpio urility from <a href="http://wiringpi.com/download-and-install/">WiringPi</a> Library.</b><br>
- Default: -, valid values: off, up, down<br><br>
- </li>
- <li>debounce_in_ms<br>
- readout of pin value x ms after an interrupt occured. Can be used for switch debouncing<br>
- Default: 0, valid values: decimal number<br><br>
- </li>
- <li>restoreOnStartup<br>
- Restore Readings and sets after reboot<br>
- Default: last, valid values: last, on, off, no<br><br>
- </li>
- <li>unexportpin<br>
- do an unexport to /sys/class/gpio/unexport if the pin definition gets cleared (e.g. by rereadcmd, delete,...)<br>
- Default: yes, valid values: yes, no<br><br>
- </li>
- <li>longpressinterval<br>
- <b>works with interrupt set to both only</b><br>
- time in seconds, a port need to be high to set reading longpress to on<br>
- Default: 1, valid values: 0.1 - 10<br><br>
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="RSS"></a>
- <h3>RSS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RSS'>DE</a>]</div>
- <ul>
- Provides a freely configurable RSS feed and HTML page.<p>
- The media RSS feed delivers status pictures either in JPEG or PNG format.
-
- This media RSS feed can be used to feed a status display to a
- network-enabled photo frame.<p>
-
- In addition, a periodically refreshing HTML page is generated that shows the picture
- with an optional HTML image map.<p>
- You need to have the perl module <code>GD</code> installed. This module is most likely not
- available for small systems like Fritz!Box.<p>
- RSS is an extension to <a href="#FHEMWEB">FHEMWEB</a>. You must install FHEMWEB to use RSS.<p>
-
- Beginners might find the <a href="http://forum.fhem.de/index.php/topic,22520.0.html">RSS Workshop</a> useful.<p>
-
- A note on colors: Colors are specified as 6- or 8-digit hex numbers,
- every 2 digits determining the red, green and blue color components as in HTML
- color codes. The optional 7th and 8th digit code the alpha channel (transparency from
- 00 to 7F). Examples: <code>FF0000</code> for red, <code>C0C0C0</code> for light
- gray, <code>1C1C1C40</code> for semi-transparent gray.<p>
- <a name="RSSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> RSS jpg|png <hostname> <filename></code><br><br>
- Defines the RSS feed. <code>jpg</code> and <code>png</code> are fixed literals to select output format.
- <code><hostname></code> is the hostname of the fhem server as
- seen from the consumer of the RSS feed. <code><filename></code> is the
- name of the file that contains the <a href="RSSlayout">layout definition</a>.<p>
- Examples
- <ul>
- <code>define FrameRSS RSS jpg host.example.org /etc/fhem/layout</code><br>
- <code>define MyRSS RSS png 192.168.1.222 /var/fhem/conf/layout.txt</code><br>
- </ul>
- <br>
- The RSS feeds are at
- <ul>
- <code>http://host.example.org:8083/fhem/rss/FrameRSS.rss</code><br>
- <code>http://192.168.1.222:8083/fhem/rss/MyRSS.rss</code><br>
- </ul>
- <br>
-
- The pictures are at
- <ul>
- <code>http://host.example.org:8083/fhem/rss/FrameRSS.jpg</code><br>
- <code>http://192.168.1.222:8083/fhem/rss/MyRSS.png</code><br>
- </ul>
- <br>
-
- The HTML pages are at
- <ul>
- <code>http://host.example.org:8083/fhem/rss/FrameRSS.html</code><br>
- <code>http://192.168.1.222:8083/fhem/rss/MyRSS.html</code><br>
- </ul>
- <br>
-
- </ul>
- <a name="RSSset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> rereadcfg</code>
- <br><br>
- Rereads the <a href="RSSlayout">layout definition</a> from the file. Useful to enable
- changes in the layout on-the-fly.
- <br><br>
- </ul>
- <a name="RSSattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li>autoreread<br>If set to 1, layout is automatically reread when layout file has been changed
- by FHEMWEB file editor.</li><br>
- <li>size<br>The dimensions of the picture in the format
- <code><width>x<height></code>.</li><br>
- <li>bg<br>The directory that contains the background pictures (must be in JPEG, GIF or PNG format, file
- format is guessed from file name extension).</li><br>
- <li>bgcolor <color><br>Sets the background color. </li><br>
- <li>tmin<br>The background picture is shown at least <code>tmin</code> seconds,
- no matter how frequently the RSS feed consumer accesses the page.</li><br>
- <li>refresh <interval><br>Time in seconds after which the HTML page is automatically reloaded. Defaults to 60.
- Set <interval> to 0 to disable reloading.</li><br>
- <li>viewport<br>Adds a viewport directive to the HTML header.<br>
- Example: <code>attr FrameRSS viewport width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0</code><br>
- This scales the image to fit to the browser's viewport and inhibits zooming in or out on tablets.
- </li><br>
- <li>noscroll</br>Suppresses scrollbars in browsers, if set to 1.
- </li><br>
- <li>areas<br>HTML code that goes into the image map.<br>
- Example: <code>attr FrameRSS areas <area shape="rect" coords="0,0,200,200" href="http://fhem.de"/><area shape="rect" coords="600,400,799,599" href="http://has:8083/fhem" target="_top"/></code>
- </li><br>
- <li>itemtitle</br>Adds a title tag to the RSS item that contains the specified text.
- </li><br>
- <li>urlOverride<br>Overrides the URL in the generated feed.
- If you specify
- <code>attr <name> http://otherhost.example.org:8083/foo/bar</code>, the
- JPEG picture that is at
- <code>http://host.example.org:8083/fhem/rss/FrameRSS.jpg</code>
- will be referenced as
- <code>http://otherhost.example.org:8083/foo/bar/rss/FrameRSS.jpg</code>. This is useful when
- your FHEM URLs are rewritten, e.g. if FHEM is accessed by a Reverse Proxy.</li>
- <br>
- </ul>
- <br><br>
- <b>Usage information</b>
- <br><br>
- <ul>
- If a least one RSS feed is defined, the menu entry <code>RSS</code> appears in the FHEMWEB
- side menu. If you click it you get a list of all defined RSS feeds. The URL of any such is
- RSS feed is <code>http://hostname:port/fhem/rss/name.rss</code> with <code>hostname</code> and
- <code>name</code> from the RSS feed's <a href="RSSdefine">definition</a> and the <code>port</code>
- (usually 8083) and literal <code>/fhem</code> from the underlying <a href="#FHEMWEB">FHEMWEB</a>
- definition.<p>
- Example:
- <ul><code>http://host.example.org:8083/fhem/rss/FrameRSS.rss</code></ul><p>
- The media RSS feed points to a dynamically generated picture. The URL of the picture
- belonging to the RSS can be found by replacing the extension ".rss" in feed's URL by ".jpg" or ".png"
- depending on defined output format,<p>
- Example:
- <ul><code>http://host.example.org:8083/fhem/rss/FrameRSS.jpg</code></ul><p>
- <ul><code>http://192.168.100.200:8083/fhem/rss/FrameRSS.png</code></ul><p>
- To render the picture the current, or, if <code>tmin</code> seconds have elapsed, the next
- JPEG picture from the directory <code>bg</code> is chosen and scaled to the dimensions given
- in <code>size</code>. The background is black if no usable JPEG picture can be found. Next the
- script in the <a href="RSSlayout">layout definition</a> is used to superimpose items on
- the background.<p>
- You can directly access the URL of the picture in your browser. Reload the page to see
- how it works.<p>
- The media RSS feed advertises to refresh after 1 minute (ttl). Some photo frames ignore it and
- use their preset refresh rate. Go for a photo frame with an adjustable refresh rate (e.g
- every 5 seconds) if you have the choice!<p>
- This is how the fhem config part might look like:<p>
- <code>
- define ui FHEMWEB 8083 global<br><br>
- define FrameRSS RSS jpg host.example.org /etc/fhem/layout<br>
- attr FrameRSS size 800x600<br>
- attr FrameRSS bg /usr/share/pictures<br>
- attr FrameRSS tmin 10<br>
- </code>
- </ul>
- <a name="RSSlayout"></a>
- <b>Layout definition</b>
- <br><br>
- <ul>
- The layout definition is a script for placing items on the background. It is read top-down.
- It consists of layout control commands and items placement commands. Layout control
- commands define the appearance of subsequent items. Item placement commands actually
- render items.<p>
- Everything after a # is treated as a comment and ignored. You can fold long lines by
- putting a \ at the end.<p>
- <i>General notes</i><br>
- <ol>
- <li>Use double quotes to quote literal text if perl specials are allowed.</li>
- <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>
- </ol>
- <p>
- <i>Notes on coordinates</i><br>
- <ol>
- <li>(0,0) is the upper left corner.</li>
- <li>Coordinates equal or greater than 1 are considered to be absolute pixels, coordinates between 0 and 1 are considered to
- be relative to the total width or height of the picture.</li>
- <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>
- <!--<li>You can use <code>{ <a href="#perl"><perl special></a> }</code> for x and for y.</li>-->
- </ol>
- <p>
-
-
- <i>Layout control commands</i><p>
-
- <ul>
- <li>moveto <x> <y><br>Moves most recently used x- and y-coordinate to the given absolute or relative position.</li><br>
- <li>moveby <x> <y><br>Moves most recently used x- and y-coordinate by the given absolute or relative amounts.</li><br>
-
- <li>font "<font>"<br>Sets the font. <font> is the name of a TrueType font (e.g.
- <code>Arial</code>) or the full path to a TrueType font
- (e.g. <code>/usr/share/fonts/truetype/arial.ttf</code>),
- whatever works on your system.</li><br>
- <a name="rss_rgb"></a>
- <li>rgb "<color>"<br>Sets the color. You can use
- <code>{ <a href="#perl"><perl special></a> }</code> for <color>.</li><br>
- <li>pt <pt><br>Sets the font size in points. A + or - sign in front of the the number given
- for <pt> signifies a change of the font size relative to the current size. Otherwise the absolute
- size is set. You can use
- <code>{ <a href="#perl"><perl special></a> }</code> for <pt>.</li><br>
-
- <li>thalign|ihalign|halign "left"|"center"|"right"<br>Sets the horizontal alignment of text, image or both. Defaults to left-aligned. You can use
- <code>{ <a href="#perl"><perl special></a> }</code> instead of the literal alignment control word.</li><br>
-
- <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
- top-aligned for image. You can use
- <code>{ <a href="#perl"><perl special></a> }</code> instead of the literal alignment control word.</li><br>
-
- <li>linespace <space><br>Sets the line spacing in pixels for text boxes (see textbox item below).</li><br>
-
- <li>condition <condition><br>Subsequent layout control and item placement commands except for another condition command are ignored if and only if <condition> evaluates to false.</li><br>
-
- <li>push<br>The current parameter set (position, color, font name and size, text alignment and line spacing) is
- put (saved) on top of a stack.</li><br>
-
- <li>pop<br>The most recently saved (pushed) current parameter set is pulled from the top of the stack and restored.</li><br>
-
- </ul>
- <i>Item placement commands</i><p>
- <ul>
- <li>text <x> <y> <text><br>Renders the text <text> at the
- position (<x>, <y>) using the current font, font size and color.
- You can use
- <code>{ <a href="#perl"><perl special></a> }</code> for <text> to fully
- access device readings and do some programming on the fly. See below for examples.</li><br>
- <li>textbox <x> <y> <boxwidth> <text><br>Same as before but text is rendered
- in a box of horizontal width <boxwidth>.</li><br>
-
- <li>textboxf <x> <y> <boxwidth> <bgcolor> <text><br>Same as before but
- the textbox will be filled with the given background color <bgcolor> before drawing the text.
- <bgcolor> can be used with <code>{ <a href="#perl"><perl special></a> }</code> to evalute <a href="#rss_rgb">RGB</a> value.</li><br>
-
- <li>time <x> <y><br>Renders the current time in HH:MM format.</li><br>
-
- <li>seconds <x> <y> <format><br>Renders the curent seconds. Maybe useful for a RSS Clock.</li><br>
-
- <li>date <x> <y><br>Renders the current date in DD.MM.YYYY format.</li><br>
-
- <li>line <x1> <y1> <x2> <y2> [<thickness>]<br>Draws a line from position (<x1>, <y1>) to position (<x2>, <y2>) with optional thickness (default=1).</li><br>
- <li>rect <x1> <y1> <x2> <y2> [<filled>]<br>Draws a rectangle with corners at positions (<x1>, <y1>) and (<x2>, <y2>), which is filled if the <filled> 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>
-
- <li>img <x> <y> <['w' or 'h']s> <imgtype> <srctype> <arg> <br>Renders a picture at the
- position (<x>, <y>). The <imgtype> is one of <code>gif</code>, <code>jpeg</code>, <code>png</code>.
- The picture is scaled by the factor <s> (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 <srctype> is <code>file</code>, the picture
- is loaded from the filename <arg>, if <srctype> is <code>url</code> or <code>urlq</code>, the picture
- is loaded from the URL <arg> (with or without logging the URL), if <srctype> is <code>data</code>, the picture
- is piped in from data <arg>. You can use
- <code>{ <a href="#perl"><perl special></a> }</code> for <arg>. See below for example.<br>
- <b>Warning</b>: do not load the image from URL that is served by fhem as it leads to a deadlock.</li><br>
- <li>embed <x> <y> <z> <position> <id> <element><br>
- For HTML output: embeds a <code>div</code> element into the HTML page at (<x>,<y>) with z-order <z> and positioning <position> (use <code>absolute</code>). <id> is the <code>id</code> attribute of the
- <code>div</code> element and <element> is its content.<br>
- <b>Note:</b> There are several issues with different browsers when using this.</li><br>
-
- </ul>
- <i>Example</i><p>
- This is how a layout definition might look like:<p>
- <code>
- font /usr/share/fonts/truetype/arial.ttf # must be a TrueType font<br>
- rgb "c0c0c0" # HTML color notation, RGB<br>
- pt 48 # font size in points<br>
- time 0.10 0.90<br>
- pt 24<br>
- text 0.10 0.95 { ReadingsVal("MyWeather","temperature","?"). "C" }<br>
- moveby 0 -25<br>
- text x y "Another text"<br>
- img 20 530 0.5 png file { "/usr/share/fhem/www/images/weather/" . ReadingsVal("MyWeather","icon","") . ".png" }<br>
- embed 0 0 2 absolute plot1 { plotFromUrl('mySVG') }
- embed 10 200 2 absolute iframe1 "<iframe width=\"420\" height=\"315\" src=\"//www.youtube.com/embed/9HShl_ufOFI\" frameborder=\"0\" allowfullscreen></iframe>"
- </code>
- <p>
-
- <i>Special uses</i><p>
-
- You can display <a href="#SVG">SVG</a> plots with the aid of the helper function <code>plotAsPng(<name>[,<zoom>[,<offset>]])</code> (in 98_SVG.pm). Examples:<p>
- <code>
- img 20 30 0.6 png data { plotAsPng("mySVGPlot") }<BR>
- img 20 30 0.6 png data { plotAsPng("mySVGPlot","qday",-1) }
- </code>
- <p>
- 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>
-
- For HTML output, you can use <code>plotFromURL(<name>[,<zoom>[,<offset>]])</code> instead.
- </ul>
- </ul>
- <p><a name="RandomTimer"></a>
- <h1>RandomTimer</h1>
- <h2>Define</h2>
- <ul>
- <code><font size="+2">define <name> RandomTimer <timespec_start> <device> <timespec_stop> [<timeToSwitch>]</font></code><br>
- <br>
- Defines a device, that imitates the random switch functionality of a timer clock, like a <b>FS20 ZSU</b>.
- The idea to create it, came from the problem, that is was always a little bit tricky to install a timer clock before
- holiday: finding the manual, testing it the days before and three different timer clocks with three different manuals - a horror.<br>
- 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.
- <br><br>
- <h3>Descrition</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RandomTimer'>DE</a>]</div>
- a RandomTimer device starts at timespec_start switching device. Every (timeToSwitch
- seconds +-10%) it trys to switch device on/off. The switching period stops when the
- next time to switch is greater than timespec_stop.
- <br><br>
- </ul>
- <h3>Parameter</h3>
- <ul>
- <b>timespec_start</b>
- <br>
- The parameter <b>timespec_start</b> defines the start time of the timer with format: HH:MM:SS.
- It can be a Perlfunction as known from the <a href="#at">at</a> timespec .
- <br><br>
- <b>device</b>
- <br>
- The parameter <b>device</b> defines the fhem device that should be switched.
- <br><br>
- <b>timespec_stop</b>
- <br>
- The parameter <b>timespec_stop</b> defines the stop time of the timer with format: HH:MM:SS.
- It can be a Perlfunction as known from the timespec <a href="#at">at</a> .
- <br><br>
- <b>timeToSwitch</b>
- <br>
- The parameter <b>timeToSwitch</b> defines the time in seconds between two on/off switches.
- <br><br>
- </ul>
- <h3>Examples</h3>
- <ul>
- <li>
- <code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch +03:00:00 500</code><br>
- defines a timer that starts at sunset an ends 3 hous later. The timer trys to switch every 500 seconds(+-10%).
- </li><br><br>
- <li>
- <code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch *{sunset_abs(3*3600)} 480</code><br>
- defines a timer that starts at sunset and stops after sunset + 3 hours. The timer trys to switch every 480 seconds(+-10%).
- </li><br><br>
- <li>
- <code>define ZufallsTimerTisch RandomTimer *{sunset_abs()} StehlampeTisch 22:30:00 300</code><br>
- defines a timer that starts at sunset an ends at 22:30. The timer trys to switch every 300 seconds(+-10%).
- </li><br><br>
- </ul>
- <!-- -------------------------------------------------------------------------- -->
- <!-- Set ------------------------------------------------------------------ -->
- <!-- -------------------------------------------------------------------------- -->
- <a name="RandomTimerSet"></a>
- <h3>Set</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RandomTimerSet'>DE</a>]</div>
- <ul>
- N/A
- </ul>
- <!-- ----------------------------- -->
- <!-- Get ------------------------- -->
- <!-- Get ------------------------------------------------------------------ -->
- <!-- -------------------------------------------------------------------------- -->
- <a name="RandomTimerGet"></a>
- <h3>Get</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RandomTimerGet'>DE</a>]</div>
- <ul>
- N/A
- </ul>
- <!-- -------------------------------------------------------------------------- -->
- <!-- Attributes --------------------------------------------------------------- -->
- <!-- -------------------------------------------------------------------------- -->
- <a name="RandomTimerAttributes"></a>
- <h3>Attributes</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#RandomTimerAttributes'>DE</a>]</div>
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><a name="disableCond">disableCond</a><br>
- The default behavior of a RandomTimer is, that it works.
- To set the Randomtimer out of work, you can specify in the disableCond attibute a condition in perlcode that must evaluate to true.
- The Condition must be put into round brackets. The best way is to define
- a function in 99_utils.
- <br>
- <b>Examples</b>
- <pre>
- attr ZufallsTimerZ disableCond (!isVerreist())
- attr ZufallsTimerZ disableCond (Value("presenceDummy") ne "present")
- </pre>
- </li>
- <li><a name="keepDeviceAlive">keepDeviceAlive</a><br>
- The default behavior of a RandomTimer is, that it shuts down the device after stoptime is reached.
- The <b>keepDeviceAlive</b> attribute changes the behavior. If set, the device status is not changed when the stoptime is reached.
- <br>
- <b>Example</b>
- <pre>
- attr ZufallsTimerZ keepDeviceAlive
- </pre>
- </li>
- <li><a name="onOffCmd">onCmd, offCmd</a><br>
- Setting the on-/offCmd changes the command sent to the device. Standard is: "set <device> on".
- The device can be specified by a @.
- <br>
- <b>Examples</b>
- <pre>
- attr Timer oncmd {fhem("set @ on-for-timer 14")}
- attr Timer offCmd {fhem("set @ off 16")}
- attr Timer oncmd set @ on-for-timer 12
- attr Timer offCmd set @ off 12
- </pre>
- </li>
- the decision to switch on or off depends on the state of the device and is evaluated by the funktion Value(<device>). Value() must
- 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:
- <pre>
- attr stateFormat EDIPlug_01 {(ReadingsVal("EDIPlug_01","state","nF") =~ m/(ON|on)/i) ? "on" : "off" }
- </pre>
- if a devices Value() funktion does not evalute to on or off(like WLAN-Steckdose von Edimax) you get the message:
- <pre>
- [EDIPlug] result of function Value(EDIPlug_01) must be 'on' or 'off'
- </pre>
- <li><a name="switchmode">switchmode</a><br>
- Setting the switchmode you can influence the behavior of switching on/off.
- The parameter has the Format 999/999 and the default ist 800/200. The values are in "per mill".
- The first parameter sets the value of the probability that the device will be switched on when the device is off.
- The second parameter sets the value of the probability that the device will be switched off when the device is off.
- <b>Examples</b>
- <pre>
- attr ZufallsTimerZ switchmode 400/400
- </pre>
- </li>
- </ul>
- <p><a name="Revolt"></a>
- <h3>Revolt NC-5462</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Revolt'>DE</a>]</div>
- <ul>
- Provides voltage, current, frequency, power, pf, energy readings for Revolt NC-5462 devices via CUL.
- <br><br>
- <a name="RevoltDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Revolt <id></code>
- <br><br>
- <id> is a 4 digit hex number to identify the NC-5462 device.<br>
- Note: devices are autocreated on reception of the first message.<br>
- </ul>
- <br>
- <a name="RevoltReadings"></a>
- <b>Readings</b>
- <ul>
- <li>energy [kWh]</li>
- <li>power [W]</li>
- <li>voltage [V]</li>
- <li>current [A]</li>
- <li>frequency [Hz]</li>
- <li>Pf</li>
- </ul>
- </ul>
- <p><a name="Robonect"></a>
- <h3>Robonect</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Robonect'>DE</a>]</div>
- <ul>
- <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>
- <p><a name="RobonectDefine"></a> <b>Define</b></p>
- <ul>
- <code>define <name> Robonect <ip-adress or name></code>
-
- <p>Setting Winterschlaf prevents communicating with the mower.</p>
-
- <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>
- <p>Example:</p>
- <pre>
- define myMower Robonect 192.168.13.5
- define myMower Robonect myMowersDNSName
- </pre>
- </ul>
-
- <p><a name="RobonectSet"></a> <b>Set</b></p>
- <ul>
- <b>Set</b>
- <ul>
- <li>auto<br>
- 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
- mowing only if the timer supplies an active slot AND start is executed before.
- </li>
- <li>manuell<br>
- This sets the mower to manual mode. The internal timer is ignored. Mowing starts with start and ends with stop.
- </li>
- <li>home<br>
- This sends the mower directly home. Until you switch to auto or manuell, no further mowing work is done.
- </li>
- <li>feierabend<br>
- This sends the mower home for the rest of the actual timeslot. At the next active timeslot mowing is continued automatically.
- </li>
- <li>start<br>
- Start mowing in manual mode or in automatic mode at active timer-slot.
- </li>
- <li>stop<br>
- Stops mowing immediately. The mower does not drive home. It stands there, until battery is empty. Use with care!
- </li>
- <li>maehauftrag<br>
- 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>
- The parameters have to be named according the robonect-API (no doublechecking!).<br>
- <br>
- Example:<br>
- Lauch at 15:00, Duration 120 minutes, do not use a remote-start-point, do not change mode after finishing task
- <pre>
- set myMower maehauftrag start=15:00 duration=120 remotestart=0 after=4
- </pre>
- </li>
- <li>winterschlaf <on, off><br>
- If set to on, no polling is executet. Please use this during winter.
- </li>
- <li>user <user><br>
- One alternative to store authentication: username for robonect-logon is stored in FhemUtils or database (not encrypted).<br
- If set, the attributes regarding authentication are ignored.
- </li>
- <li>password <password><br>
- One alternative to store authentication: password for robonect-logon is stored in FhemUtils or database (not encrypted).<br
- If set, the attributes regarding authentication are ignored.
- </li>
- </ul>
- </ul>
- <p><a name="RobonectGet"></a> <b>Get</b></p>
- <ul>
- <b>Get</b>
- <ul>
- <li>status<br>
- Gets the actual state of the mower - normally not needed, because the status is polled cyclic.
- </li>
- <li>health<br>
- This one gets more detailed information - like voltages and temperatures. It is NOT SUPPORTED BY ALL MOWERS!!!<br>
- If enabled via attribute, health is polled accordingly status.
- </li>
- </ul>
- </ul>
-
- <p><a name="RobonectAttr"></a> <b>Attributes</b></p>
- <ul><br>
- Common attributes:<br>
- <a href="#DbLogInclude">DbLogInclude</a><br>
- <a href="#DbLogExclude">DbLogExclude</a><br>
- <a href="#IODev">IODev</a><br>
- <a href="#alias">alias</a><br>
- <a href="#comment">comment</a><br>
- <a href="#devStateIcon">devStateIcon</a><br>
- <a href="#devStateStyle">devStateStyle</a><br>
- <a href="#do_not_notify">do_not_notify</a><br>
- <a href="#readingFnAttributes">readingFnAttributes</a><br>
- <a href="#event-aggregator">event-aggregator</a><br>
- <a href="#event-min-interval">event-min-interval</a><br>
- <a href="#event-on-change-reading">event-on-change-reading</a><br>
- <a href="#event-on-update-reading">event-on-update-reading</a><br>
- <a href="#eventMap">eventMap</a><br>
- <a href="#group">group</a><br>
- <a href="#icon">icon</a><br>
- <a href="#room">room</a><br>
- <a href="#showtime">showtime</a><br>
- <a href="#sortby">sortby</a><br>
- <a href="#stateFormat">stateFormat</a><br>
- <a href="#userReadings">userReadings</a><br>
- <a href="#userattr">userattr</a><br>
- <a href="#verbose">verbose</a><br>
- <a href="#webCmd">webCmd</a><br>
- <a href="#widgetOverride">widgetOverride</a><br>
- <br>
- </ul>
- <p><a name="RobonectCredentials"></a> <b>credentials</b></p>
- <ul>
- If you supply a valid path to a credentials file, this combination is used to log in at robonect. This mechism overrules basicAuth.
- </ul>
- <p><a name="RobonectBasicAuth"></a> <b>basicAuth</b></p>
- <ul>
- You can supply username and password plain or base-64-encoded. For a base64-encoder, use google.
- <p>Example:</p>
- <pre>
- define myMower Robonect 192.168.5.1
- attr myMower basicAuth me:mySecret
- </pre>
- <pre>
- define myMower Robonect 192.168.5.1
- attr myMower basicAuth bWU6bXlTZWNyZXQ=
- </pre>
- </ul>
- <p><a name="RobonectPollInterval"></a> <b>pollInterval</b></p>
- <ul>
- Supplies the interval top poll the robonect in seconds. Per default 90s is set.
- </ul>
-
- <p><a name="RobonectTimeout"></a> <b>timeout</b></p>
- <ul>
- Timeout for httpData to recive data. Default is 4s.
- </ul>
-
- <p><a name="RobonectHealth"></a> <b>useHealth</b></p>
- <ul>
- If set to 1, the health-status of the mower will be polled. Be aware NOT ALL MOWERS ARE SUPPORTED!<br>
- Please refer to logfile or LAST_COMM_STATUS if the function does not seem to be working.
- </ul>
- </ul>
- <p><p><a name="S7"></a></p>
- <h3>S7</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7'>DE</a>]</div>
- <ul>
- <ul>
- <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>
- </ul>
- </ul>
- <p> </p>
- <ul>
- <ul>You can found a german wiki here: httl://www.fhemwiki.de/wiki/S7</ul>
- </ul>
- <p><br /><br /></p>
- <ul>
- <ul>For the communication the following modules have been implemented:
- <ul>
- <li>S7 … sets up the communication channel to the PLC</li>
- <li>S7_ARead … Is used for reading integer Values from the PLC</li>
- <li>S7_AWrite … Is used for write integer Values to the PLC</li>
- <li>S7_DRead … Is used for read bits</li>
- <li>S7_DWrite … Is used for writing bits.</li>
- </ul>
- </ul>
- </ul>
- <p><br /><br /></p>
- <ul>
- <ul>Reading work flow:</ul>
- </ul>
- <p><br /><br /></p>
- <ul>
- <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>
- </ul>
- <p><br /><br /></p>
- <ul>
- <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>
- </ul>
- <p> </p>
- <ul>
- <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>
- </ul>
- <p> </p>
- <ul>
- <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>
- </ul>
- <p><br /><br /><a name="S7define"></a><strong>Define</strong><code>define <name> S7 <PLC_address> <rack> <slot> [<Interval>] </code><br /><br /><code>define logo S7 10.0.0.241 2 0 </code></p>
- <ul>
- <ul>
- <ul>
- <ul>
- <li>PLC_address … IP address of the S7 PLC (For S5 see below)</li>
- <li>rack … rack of the PLC</li>
- <li>slot … slot of the PLC</li>
- <li>Interval … Intervall how often the modul should check if a reading is required</li>
- </ul>
- </ul>
- </ul>
- </ul>
- <p> </p>
- <ul>
- <ul>
- <ul>Note: For Siemens logo you should use a alternative (more simply configuration method):</ul>
- </ul>
- </ul>
- <p> </p>
- <ul>
- <ul>
- <ul><code>define logo S7 LOGO7 10.0.0.241</code></ul>
- </ul>
- </ul>
- <p> </p>
- <ul>
- <ul>
- <ul>Note: For Siemens S5 you must use a alternative (more simply configuration method):</ul>
- </ul>
- </ul>
- <p> </p>
- <ul>
- <ul>
- <ul>define logo S7 S5 /dev/tty1 in this case the PLC_address is the serial port number</ul>
- </ul>
- </ul>
- <p><br /><br /><strong>Attr</strong></p>
- <ul>
- <ul>The following attributes are supported:</ul>
- </ul>
- <p> </p>
- <ul>
- <ul>
- <ul>
- <li>MaxMessageLength</li>
- <li>receiveTimeoutMs</li>
- <li>Intervall</li>
- </ul>
- </ul>
- </ul>
- <p> </p>
- <ul>
- <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>
- <ul>receiveTimeoutMs ... timeout in ms for TCP receiving packages. Default Value 500ms. </ul>
- <ul>Intervall ... polling intervall in s </ul>
- </ul>
- <p><a name="S7_ARead"></a>
- <h3>S7_ARead</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7_ARead'>DE</a>]</div>
- <ul>
- This module is a logical module of the physical module S7. <br>
- This module provides analog data (signed / unsigned integer Values).<br>
- Note: you have to configure a PLC reading at the physical module (S7) first.<br>
- <br><br>
- <b>Define</b><br>
- <code>define <name> S7_ARead {inputs|outputs|flags|db} <DB> <start> {u8|s8|u16|s16|u32|s32}</code>
- <br><br>
- <ul>
- <li>inputs|outputs|flags|db � defines where to read.</li>
- <li>DB � Number of the DB</li>
- <li>start � start byte of the reading</li>
- <li>{u8|s8|u16|s16|u32|s32} � defines the datatype: </li>
- <ul>
- <li>u8 �. unsigned 8 Bit integer</li>
- <li>s8 �. signed 8 Bit integer</li>
- <li>u16 �. unsigned 16 Bit integer</li>
- <li>s16 �. signed 16 Bit integer</li>
- <li>u32 �. unsigned 32 Bit integer</li>
- <li>s32 �. signed 32 Bit integer</li>
- </ul>
- Note: the required memory area (start � start + datatypelength) need to be with in the configured PLC reading of the physical module.
- </ul>
- <br>
- <b>Attr</b><br>
- The following parameters are used to scale every reading<br>
- <ul>
- <li>multiplicator</li>
- <li>offset</li>
- </ul>
- newValue = <multiplicator> * Value + <offset>
- </ul>
- <p><p><a name="S7_AWrite"></a></p>
- <h3>S7_AWrite</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7_AWrite'>DE</a>]</div>
- <ul>
- <ul>This module is a logical module of the physical module S7.</ul>
- </ul>
- <ul>
- <ul>This module provides sending analog data (unsigned integer Values) to the PLC.</ul>
- </ul>
- <ul>
- <ul>Note: you have to configure a PLC writing at the physical modul (S7) first.</ul>
- </ul>
- <p><br /><br /><strong>Define</strong><br /><code>define <name> S7_AWrite {inputs|outputs|flags|db} <DB> <start> {u8|s8|u16|s16|u32|s32|float}</code><br /><br /></p>
- <ul>
- <ul>
- <ul>
- <ul>
- <li>db … defines where to read. Note currently only writing in to DB are supported.</li>
- <li>DB … Number of the DB</li>
- <li>start … start byte of the reading</li>
- <li>{u8|s8|u16|s16|u32|s32} … defines the datatype:</li>
- <ul>
- <li>u8 …. unsigned 8 Bit integer</li>
- <li>s8 …. signed 8 Bit integer</li>
- <li>u16 …. unsigned 16 Bit integer</li>
- <li>s16 …. signed 16 Bit integer</li>
- <li>u32 …. unsigned 32 Bit integer</li>
- <li>s32 …. signed 32 Bit integer</li>
- <li>float …. 4 byte float</li>
- </ul>
- </ul>
- Note: the required memory area (start – start + datatypelength) need to be with in the configured PLC writing of the physical module.</ul>
- </ul>
- </ul>
- <p>Logo 7 / Logo 8</p>
- <p style="padding-left: 60px;">For Logo7 / Logo 8 also a short notation is supportet:</p>
- <p><code>define <name> S7_AWrite {AI|AM|AQ|NAI|NAQ}X</code></p>
- <p><strong>Set</strong><br /><br /><code>set <name> S7_AWrite <value></code></p>
- <ul>
- <ul>
- <ul>
- <li>value … an numeric value</li>
- </ul>
- </ul>
- </ul>
- <p><p><a name="S7_Client"></a></p>
- <h3>S7_Client</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7_Client'>DE</a>]</div>
- <ul>
- <ul>abstract interface layer S7 / S5</ul>
- </ul>
- <p><a name="S7_DRead"></a>
- <h3>S7_DRead</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7_DRead'>DE</a>]</div>
- <ul>
- This module is a logical module of the physical module S7. <br>
- This module provides digital data (ON/OFF).<br>
- Note: you have to configure a PLC reading at the physical modul (S7) first.<br>
- <br><br>
- <b>Define</b>
- <ul>
- <code>define <name> S7_DRead {inputs|outputs|flags|db} <DB> <address></code>
- <ul>
- <li>inputs|outputs|flags|db � defines where to read.</li>
- <li>DB � Number of the DB</li>
- <li>address � address you want to read. bit number to read. Example: 10.3</li>
- </ul>
- Note: the required memory area need to be with in the configured PLC reading of the physical module.
- </ul>
- </ul>
- <p><p><a name="S7_DWrite"></a></p>
- <h3>S7_DWrite</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7_DWrite'>DE</a>]</div>
- <ul>
- <ul>This module is a logical module of the physical module S7.</ul>
- </ul>
- <ul>
- <ul>This module is used to set/unset a Bit in ad DB of the PLC.</ul>
- </ul>
- <ul>
- <ul>Note: you have to configure a PLC writing at the physical modul (S7) first.</ul>
- </ul>
- <p><br /><br /><br /><strong>Define</strong><code>define <name> S7_DWrite {db} <DB> <address></code></p>
- <ul>
- <ul>
- <ul>
- <ul>
- <li>db … defines where to read. Note currently only writing in to DB are supported.</li>
- <li>DB … Number of the DB</li>
- <li>address … address you want to write. bit number to read. Example: 10.6</li>
- </ul>
- Note: the required memory area need to be with in the configured PLC reading of the physical module.</ul>
- </ul>
- </ul>
- <p><strong>Set</strong><code>set <name> S7_AWrite {ON|OFF|TRIGGER};</code></p>
- <ul>
- <ul>Note: TRIGGER sets the bit for 1s to ON than it will set to OFF.</ul>
- </ul>
- <p><strong>Attr</strong><br /> The following parameters are used to scale every reading</p>
- <ul>
- <li>trigger_length ... sets the on-time of a trigger in Seconds. Note out can also use trigger_length less than 1</li>
- </ul>
- <p><p><a name="S7_S5Client"></a></p>
- <h3>S7_S5Client</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7_S5Client'>DE</a>]</div>
- <ul>
- <ul>low level interface to S5</ul>
- </ul>
- <p><p><a name="S7_S7Client"></a></p>
- <h3>S7_S7Client</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#S7_S7Client'>DE</a>]</div>
- <ul>
- <ul>low level interface to S7</ul>
- </ul>
- <p><a name="SCIVT"></a>
- <h3>SCIVT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SCIVT'>DE</a>]</div>
- <ul>
- <br>
- <a name="SCIVTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SCIVT <SCD-device></code>
- <br><br>
- Define a SCD series solar controler device. Details see <a
- href="http://english.ivt-hirschau.de/content.php?parent_id=CAT_64&doc_id=DOC_118">here</a>.
- You probably need a Serial to USB controller like the PL2303.
- <br>
- Defining an SCIVT device will schedule an internal task, which reads the
- status of the device every 5 minutes, and triggers notify/filelog commands.
- <br>Note: Currently this device does not support a "set" function, only
- a single get function which reads the device status immediately.
- <br><br>
- Example:
- <ul>
- <code>define scd SCIVT /dev/ttyUSB2</code><br>
- </ul>
- <br>
- </ul>
- <a name="SVICTset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SVICTget"></a>
- <b>Get</b>
- <ul>
- <code>get SCVIT data</code>
- <br>
- </ul>
- <br>
- <a name="SVICTattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (SCD)</li>
- </ul>
- <br>
- </ul>
- <p><a name="SD_RSL"></a>
- <h3>RSL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SD_RSL'>DE</a>]</div>
- The SD_RSL module decrypts and sends Conrad RSL messages sent by the SIGNALduino.<br>
- <br>
- <a name="SD_RSL_Define"></a>
- <b>Define</b>
- <ul>
- <p><code>define <name> SD_RSL <code>_<channel>_<button></code>
- <br>
- <br>
- <code><name></code> is any name assigned to the device.
- For a better overview it is recommended to use a name in the form "RSL_B1A800_1_2"
- <br /><br />
- <code><code></code> The code is 00000-FFFFFF
- <br /><br />
- <code><channel></code> The channel is 1-4
- <br /><br />
- <code><button></code> The button is 1-4
- <br /><br />
- </ul>
- <a name="SD_RSL_Set"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <value></code>
- <br /><br />
- <code><value></code> can be one of the following values:<br>
- <pre>
- off
- on
- </pre>
- </ul>
- <a name="SD_RSL_Get"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <a name="SD_RSL_Attr"></a>
- <b>Attribute</b>
- <ul>
- <li><a href="#IODev">IODev</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#eventMap">eventMap</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li>RSLrepetition<br>
- Set the repeats for sending signal.
- </li>
- </ul>
- <p><a name="SD_WS"></a>
- <h3>Weather Sensors various protocols</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SD_WS'>DE</a>]</div>
- <ul>
- The SD_WS module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
- <br>
- <b>Known models:</b>
- <ul>
- <li>Bresser 7009994</li>
- <li>Opus XT300</li>
- <li>BresserTemeo</li>
- <li>WH2 (TFA Dostmann/Wertheim 30.3157(Temperature only!) (sold in Germany), Agimex Rosenborg 66796 (sold in Denmark),ClimeMET CM9088 (Sold in UK)</li>
- <li>PV-8644 infactory Poolthermometer</li>
- </ul>
- <br>
- New received device are add in fhem with autocreate.
- <br><br>
- <a name="SD_WS_Define"></a>
- <b>Define</b>
- <ul>The received devices created automatically.<br>
- 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>
- If you want to use more sensors, than channels available, you can use the longid option to differentiate them.
- </ul>
- <br>
- <a name="SD_WS Events"></a>
- <b>Generated readings:</b>
- <br>Some devices may not support all readings, so they will not be presented<br>
- <ul>
- <li>State (T: H:)</li>
- <li>temperature (°C)</li>
- <li>humidity: (The humidity (1-100 if available)</li>
- <li>battery: (low or ok)</li>
- <li>channel: (The Channelnumber (number if)</li>
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <a name="SD_WS_Set"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SD_WS_Parse"></a>
- <b>Set</b> <ul>N/A</ul><br>
- </ul>
- <p><a name="SD_WS07"></a>
- <h3>Weather Sensors protocol #7</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SD_WS07'>DE</a>]</div>
- <ul>
- The SD_WS07 module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
- <br>
- <b>Known models:</b>
- <ul>
- <li>Eurochon EAS800z</li>
- <li>Technoline WS6750/TX70DTH</li>
- </ul>
- <br>
- New received devices are added in FHEM with autocreate.
- <br><br>
- <a name="SD_WS07_Define"></a>
- <b>Define</b>
- <ul>The received devices are created automatically.<br>
- 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>
- If you want to use more sensors, than channels available, you can use the longid option to differentiate them.
- </ul>
- <br>
- <a name="SD_WS07 Events"></a>
- <b>Generated readings:</b>
- <br>Some devices may not support all readings, so they will not be presented<br>
- <ul>
- <li>state (T: H:)</li>
- <li>temperature (°C)</li>
- <li>humidity: (the humidity 1-100)</li>
- <li>battery: (low or ok)</li>
- <li>channel: (the channelnumberf)</li>
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <a name="SD_WS07_Set"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SD_WS07_Get"></a>
- <b>Get</b> <ul>N/A</ul><br>
- </ul>
- <p><a name="SD_WS09"></a>
- <h3>Wether Sensors protocol #9</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SD_WS09'>DE</a>]</div>
- <ul>
- The SD_WS09 module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
- Requires Perl-Modul Digest::CRC. <br>
- <br>
- cpan install Digest::CRC or sudo apt-get install libdigest-crc-perl <br>
- <br>
- <br>
- <b>Known models:</b>
- <ul>
- <li>WS-0101 --> Model: WH1080</li>
- <li>TFA 30.3189 / WH1080 --> Model: WH1080</li>
- <li>1073 (WS1080) --> Model: WH1080</li>
- <li>WH3080 --> Model: WH1080</li>
- <li>CTW600 --> Model: CTW600 (??) </li>
- </ul>
- <br>
- New received device are add in fhem with autocreate.
- <br><br>
- <a name="SD_WS09_Define"></a>
- <b>Define</b>
- <ul>The received devices created automatically.<br>
- 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>
- If you want to use more sensors, you can use the longid option to differentiate them.
- </ul>
- <br>
- <a name="SD_WS09 Events"></a>
- <b>Generated readings:</b>
- <br>Some devices may not support all readings, so they will not be presented<br>
- <ul>
- <li>State (T: H: Ws: Wg: Wd: R: ) temperature, humidity, windSpeed, windGuest, windDirection, Rain</li>
- <li>Temperature (°C)</li>
- <li>Humidity: (The humidity (1-100 if available)</li>
- <li>Battery: (low or ok)</li>
- <li>ID: (The ID-Number (number if)</li>
- <li>windSpeed/windGuest (Unit_of_Wind)) and windDirection (N-O-S-W)</li>
- <li>Rain (mm)</li>
- <li>windDirectionAverage<br>
- As a result, the wind direction is returned, which are calculated from the current and past values
- via a kind of exponential mean value.
- The respective wind speed is additionally taken into account (higher speed means higher weighting)</li>
- <b>WH3080:</b>
- <li>UV Index</li>
- <li>Lux</li>
-
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li>Model: WH1080,CTW600
- </li>
- <li>windKorrektur: -3,-2,-1,0,1,2,3
- </li>
- <li>Unit_of_Wind<br>
- Unit of windSpeed and windGuest. State-Format: Value + Unit.
- <br>m/s,km/h,ft/s,mph,bft,knot
- </li><br>
-
- <li>WindDirAverageTime<br>
- default is 600s, time span to be considered for the calculation
- </li><br>
-
- <li>WindDirAverageMinSpeed<br>
- since the wind direction is usually not clear at very low wind speeds,
- minspeed can be used to specify a threshold value.
- <br>The (weighted) mean velocity < minspeed is returned undef
- </li><br>
-
- <li>WindDirAverageDecay<br>
- 1 -> all values ��are weighted equally <br>
- 0 -> only the current value is used. <br>
- in practice, you will take values ��around 0.75
- </li><br>
-
- <li>WS09_CRCAUS (set in Signalduino-Modul 00_SIGNALduino.pm)
- <br>0: CRC-Check WH1080 CRC-Summe = 0 on, default
- <br>2: CRC-Summe = 49 (x031) WH1080, set OK
- </li>
- </ul> <br>
- <a name="SD_WS09_Set"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SD_WS09_Parse"></a>
- <b>Parse</b> <ul>N/A</ul><br>
- </ul>
- <p><a name="SD_WS_Maverick"></a>
- <h3>Wether Sensors protocol #7</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SD_WS_Maverick'>DE</a>]</div>
- <ul>
- The SD_WS_Maverick module interprets temperature sensor messages received by a Device like CUL, CUN, SIGNALduino etc.<br>
- <br>
- <b>Known models:</b>
- <ul>
- <li>Eurochon EAS800z</li>
- <li>Technoline WS6750/TX70DTH</li>
- </ul>
- <br>
- New received device are add in fhem with autocreate.
- <br><br>
- <a name="SD_WS_Maverick_Define"></a>
- <b>Define</b>
- <ul>The received devices created automatically.<br>
- 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>
- If you want to use more sensors, than channels available, you can use the longid option to differentiate them.
- </ul>
- <br>
- <a name="SD_WS_Maverick Events"></a>
- <b>Generated readings:</b>
- <br>Some devices may not support all readings, so they will not be presented<br>
- <ul>
- <li>State (T: H:)</li>
- <li>temperature (°C)</li>
- <li>humidity: (The humidity (1-100 if available)</li>
- <li>battery: (low or ok)</li>
- <li>channel: (The Channelnumber (number if)</li>
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#model">model</a> ()</li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <a name="SD_WS_Maverick_Set"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SD_WS_Maverick_Parse"></a>
- <b>Set</b> <ul>N/A</ul><br>
- </ul>
- <p><a name="SHC"></a>
- <h3>SHC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SHC'>DE</a>]</div>
- <ul>
- SHC is the basestation module that supports a family of RF devices available
- at <a href="http://http://www.smarthomatic.org">www.smarthomatic.org</a>.
- This module provides the IODevice for the <a href="#SHCdev">SHCdev</a>
- modules that implement the SHCdev protocol.<br><br>
- 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.<br><br>
- <a name="SHC_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SHC <device></code><br>
- <br>
- <device> specifies the serial port to communicate with the SHC.
- The name of the serial-device depends on your distribution, under
- linux usually a /dev/ttyUSB0 device will be created.<br><br>
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyUSB0@57600. Please note that the default
- baudrate for the SHC base station is 19200 baud.<br><br>
- Example:<br>
- <ul>
- <code>define shc_base SHC /dev/ttyUSB0</code><br><br>
- </ul>
- </ul>
- <a name="SHC_Set"></a>
- <b>Set</b>
- <ul>
- <li>raw <data><br>
- not supported yet
- </li><br>
- </ul>
- <a name="SHC_Get"></a>
- <b>Get</b>
- <ul>
- <li>
- N/A
- </li><br>
- </ul>
- <a name="SHC_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>
- N/A
- </li><br>
- </ul>
- </ul>
- <p><a name="SHCdev"></a>
- <h3>SHCdev</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SHCdev'>DE</a>]</div>
- <ul>
- SHC is the device module that supports several device types available
- at <a href="http://www.smarthomatic.org">www.smarthomatic.org</a>.<br><br>
- These device are connected to the FHEM server through the SHC base station (<a href="#SHC">SHC</a>).<br><br>
- Currently supported are:<br>
- <ul>
- <li>EnvSensor</li>
- <li>PowerSwitch</li>
- <li>Dimmer</li>
- <li>RGBDimmer</li>
- <li>SoilMoistureMeter</li>
- </ul><br>
- <a name="SHCdev_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SHCdev <SenderID> [<AesKey>]</code><br>
- <br>
- <SenderID><br>
- is a number ranging from 0 .. 4095 to identify the SHCdev device.<br><br>
- <AesKey><br>
- is a optional number ranging from 0 .. 15 to select an encryption key.
- It is required for the basestation to communicate with remote devides
- The default value is 0.<br><br>
- Note: devices are autocreated on reception of the first message.<br>
- </ul>
- <br>
- <a name="SHCdev_Set"></a>
- <b>Set</b>
- <ul>
- <li>on<br>
- Supported by Dimmer and PowerSwitch (on always refers to pin1).
- </li><br>
- <li>off<br>
- Supported by Dimmer and PowerSwitch (off always refers to pin1).
- </li><br>
- <li>pct <0..100><br>
- Sets the brightness in percent. Supported by Dimmer.
- </li><br>
- <li>ani <AnimationMode> <TimeoutSec> <StartBrightness> <EndBrightness><br>
- Description and details available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#Dimmer_Animation">www.smarthomatic.org</a>
- Supported by Dimmer.
- </li><br>
- <li>statusRequest<br>
- Supported by Dimmer and PowerSwitch.
- </li><br>
- <li>Color <ColorNumber><br>
- A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#Dimmer_Color">www.smarthomatic.org</a>
- The color palette can be found <a href="http://www.smarthomatic.org/devices/rgb_dimmer.html">here</a>
- Supported by RGBDimmer.
- </li><br>
- <li>ColorAnimation <Repeat> <AutoReverse> <Time0> <ColorNumber0> <Time1> <ColorNumber1> ... up to 10 time/color pairs<br>
- A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#Dimmer_ColorAnimation">www.smarthomatic.org</a>
- The color palette can be found <a href="http://www.smarthomatic.org/devices/rgb_dimmer.html">here</a>
- Supported by RGBDimmer.
- </li><br>
- <li>DigitalPin <Pos> <On><br>
- A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPin">www.smarthomatic.org</a>
- Supported by PowerSwitch.
- </li><br>
- <li>DigitalPinTimeout <Pos> <On> <Timeout><br>
- A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPinTimeout">www.smarthomatic.org</a>
- Supported by PowerSwitch.
- </li><br>
- <li>DigitalPort <On><br>
- <On><br>
- is a bit array (0 or 1) describing the port state. If less than eight bits were provided zero is assumed.
- Example: set SHC_device DigitalPort 10110000 will set pin0, pin2 and pin3 to 1.<br>
- A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPort">www.smarthomatic.org</a>
- Supported by PowerSwitch.
- </li><br>
- <li>DigitalPortTimeout <On> <Timeout0> .. <Timeout7><br>
- <On><br>
- is a bit array (0 or 1) describing the port state. If less than eight bits were provided zero is assumed.
- Example: set SHC_device DigitalPort 10110000 will set pin0, pin2 and pin3 to 1.<br>
- <Timeout0> .. <Timeout7><br>
- are the timeouts for each pin. If no timeout is provided zero is assumed.
- A detailed description is available at <a href="http://www.smarthomatic.org/basics/message_catalog.html#GPIO_DigitalPortTimeout">www.smarthomatic.org</a>
- Supported by PowerSwitch.
- </li><br>
- <li><a href="#setExtensions"> set extensions</a><br>
- Supported by Dimmer and PowerSwitch.</li>
- </ul><br>
- <a name="SHCdev_Get"></a>
- <b>Get</b>
- <ul>
- <li>din <pin><br>
- Returns the state of the specified digital input pin for pin = 1..8. Or the state of all pins for pin = all.
- Supported by EnvSensor.
- </li><br>
- <li>ain <pin><br>
- Returns the state of the specified analog input pin for pin = 1..5. Or the state of all pins for pin = all.
- If the voltage of the pin is over the specied trigger threshold) it return 1 otherwise 0.
- Supported by EnvSensor.
- </li><br>
- <li>ain <pin><br>
- Returns the state of the specified analog input pin for pin = 1..5. Or the state of all pins for pin = all.
- If the voltage of the pin is over the specied trigger threshold) it return 1 otherwise 0.
- Supported by EnvSensor.
- </li><br>
- <li>ain_volt <pin><br>
- Returns the voltage of the specified analog input pin for pin = 1..5 in millivolts, ranging from 0 .. 1100 mV.
- Supported by EnvSensor.
- </li><br>
- </ul><br>
- <a name="SHCdev_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>devtype<br>
- The device type determines the command set, default web commands and the
- default devStateicon. Currently supported are: EnvSensor, Dimmer, PowerSwitch, RGBDimmer, SoilMoistureMeter.<br><br>
- Note: If the device is not set manually, it will be determined automatically
- on reception of a device type specific message. For example: If a
- temperature message is received, the device type will be set to EnvSensor.
- </li><br>
- <li>readonly<br>
- if set to a value != 0 all switching commands (on, off, toggle, ...) will be disabled.
- </li><br>
- <li>forceOn<br>
- try to switch on the device whenever an off status is received.
- </li><br>
- </ul><br>
- </ul>
- <p><a name="SIGNALduino"></a>
- <h3>SIGNALduino</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SIGNALduino'>DE</a>]</div>
- <table>
- <tr><td>
- The SIGNALduino ia based on an idea from mdorenka published at <a
- href="http://forum.fhem.de/index.php/topic,17196.0.html">FHEM Forum</a>.
- With the opensource firmware (see this <a
- href="https://github.com/RFD-FHEM/SIGNALduino">link</a>) it is capable
- to receive and send different protocols over different medias. Currently are 433Mhz protocols implemented.
- <br><br>
- The following device support is currently available:
- <br><br>
- Wireless switches <br>
- ITv1 & ITv3/Elro and other brands using pt2263 or arctech protocol--> uses IT.pm<br><br>
- 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>
- <br><br>
- Temperatur / humidity senso
- <ul>
- <li>PEARL NC7159, LogiLink WS0002,GT-WT-02,AURIOL,TCM97001, TCM27 and many more -> 14_CUL_TCM97001 </li>
- <li>Oregon Scientific v2 and v3 Sensors -> 41_OREGON.pm</li>
- <li>Temperatur / humidity sensors suppored -> 14_SD_WS07</li>
- <li>technoline WS 6750 and TX70DTH -> 14_SD_WS07</li>
- <li>Eurochon EAS 800z -> 14_SD_WS07</li>
- <li>CTW600, WH1080 -> 14_SD_WS09 </li>
- <li>Hama TS33C, Bresser Thermo/Hygro Sensor -> 14_Hideki</li>
- <li>FreeTec Aussenmodul NC-7344 -> 14_SD_WS07</li>
- </ul>
- <br><br>
- It is possible to attach more than one device in order to get better
- reception, fhem will filter out duplicate messages.<br><br>
- Note: this module require the Device::SerialPort or Win32::SerialPort
- module. It can currently only attatched via USB.
- </td>
- </tr>
- </table>
- <br>
- <a name="SIGNALduinodefine"></a>
- <b>Define</b><br>
- <code>define <name> SIGNALduino <device> </code> <br>
- <br>
- USB-connected devices (SIGNALduino):<br>
- <ul><li>
- <device> specifies the serial port to communicate with the SIGNALduino.
- The name of the serial-device depends on your distribution, under
- linux the cdc_acm kernel module is responsible, and usually a
- /dev/ttyACM0 or /dev/ttyUSB0 device will be created. If your distribution does not have a
- cdc_acm module, you can force usbserial to handle the SIGNALduino by the
- following command:
- <ul>
- modprobe usbserial
- vendor=0x03eb
- product=0x204b
- </ul>In this case the device is most probably
- /dev/ttyUSB0.<br><br>
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyACM0@57600<br><br>This is also the default baudrate
- It is recommended to specify the device via a name which does not change:
- e.g. via by-id devicename: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0@57600
- If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
- perl module Device::SerialPort is not needed, and fhem opens the device
- with simple file io. This might work if the operating system uses sane
- defaults for the serial parameters, e.g. some Linux distributions and
- OSX. <br><br>
- </li>
- </ul>
- <a name="SIGNALduinoattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="addvaltrigger">addvaltrigger</a><br>
- Create triggers for additional device values. Right now these are RSSI, RAWMSG and DMSG.
- </li>
- <li>blacklist_IDs<br>
- The blacklist works only if a whitelist not exist.
- </li>
- <li>cc1101_frequency<br>
- Since the PA table values ��are frequency-dependent, is at 868 MHz a value greater 800 required.
- </li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#attrdummy">dummy</a></li>
- <li>debug<br>
- This will bring the module in a very verbose debug output. Usefull to find new signals and verify if the demodulation works correctly.
- </li>
- <li>development<br>
- With development you can enable protocol decoding for protocolls witch are still in development and may not be very accurate implemented.
- This can result in crashes or throw high amount of log entrys in your logfile, so be careful to use this. <br><br>
-
- Protocols flagged with a developID flag are not loaded unless specified to do so.<br>
-
- 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>
- Specify "y" followed with the protocol id to enable it.<br><br>
- If the protocoll is developed well, but the logical module is not ready, developId => 'm' is set.<br>
- You can enable it with the attribute:<br>
- Specify "m" followed with the protocol id to enable it.<br>
- </li>
- <li>doubleMsgCheck_IDs<br>
- This attribute allows it, to specify protocols which must be received two equal messages to call dispatch to the modules.<br>
- You can specify multiple IDs wih a colon : 0,3,7,12<br>
- </li>
- <li>flashCommand<br>
- 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>
- The default is: avrdude -p atmega328P -c arduino -P [PORT] -D -U flash:w:[HEXFILE] 2>[LOGFILE]<br>
- It contains some place-holders that automatically get filled with the according values:<br>
- <ul>
- <li>[PORT]<br>
- is the port the Signalduino is connectd to (e.g. /dev/ttyUSB0) and will be used from the defenition</li>
- <li>[HEXFILE]<br>
- is the .hex file that shall get flashed. There are three options (applied in this order):<br>
- - passed in set flash as first argument<br>
- - taken from the hexFile attribute<br>
- - the default value defined in the module<br>
- </li>
- <li>[LOGFILE]<br>
- The logfile that collects information about the flash process. It gets displayed in FHEM after finishing the flash process</li>
- </ul>
-
- </li>
- <li>hardware<br>
- When using the flash command, you should specify what hardware you have connected to the usbport. Doing not, can cause failures of the device.
- </li>
- <li>minsecs<br>
- 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.
- If specified, then supported modules will discard new messages if minsecs isn't past.
- </li>
-
- <li>noMsgVerbose<br>
- With this attribute you can control the logging of debug messages from the io device.
- If set to 3, this messages are logged if global verbose is set to 3 or higher.
- </li>
- <li>longids<br>
- 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>
- Default is to not to use long IDs for all devices.
- <br><br>
- Examples:<PRE>
- # Do not use any long IDs for any devices:
- attr sduino longids 0
- # Use any long IDs for all devices (this is default):
- attr sduino longids 1
- # Use longids for BTHR918N devices.
- # Will generate devices names like BTHR918N_f3.
- attr sduino longids BTHR918N
- </PRE></li>
- <li>rawmsgEvent<br>
- When set to "1" received raw messages triggers events
- </li>
- <li>suppressDeviceRawmsg<br>
- When set to 1, the internal "RAWMSG" will not be updated with the received messages
- </li>
- <li>whitelistIDs<br>
- This attribute allows it, to specify whichs protocos are considured from this module.
- Protocols which are not considured, will not generate logmessages or events. They are then completly ignored.
- This makes it possible to lower ressource usage and give some better clearnes in the logs.
- You can specify multiple whitelistIDs wih a colon : 0,3,7,12<br>
- With a # at the beginnging whitelistIDs can be deactivated.
- </li><br>
- <li>WS09_CRCAUS<br>
- <br>0: CRC-Check WH1080 CRC = 0 on, default
- <br>2: CRC = 49 (x031) WH1080, set OK
- </li>
- </ul>
-
-
-
- <a name="SIGNALduinoget"></a>
- <b>Get</b>
- <ul>
- <li>version<br>
- return the SIGNALduino firmware version
- </li><br>
- <li>raw<br>
- Issue a SIGNALduino firmware command, and wait for one line of data returned by
- the SIGNALduino. See the SIGNALduino firmware code for details on SIGNALduino
- commands. With this line, you can send almost any signal via a transmitter connected
- </li><br>
- <li>cmds<br>
- Depending on the firmware installed, SIGNALduinos have a different set of
- possible commands. Please refer to the sourcecode of the firmware of your
- SIGNALduino to interpret the response of this command. See also the raw-
- command.
- </li><br>
- <li>protocolIDs<br>
- display a list of the protocol IDs
- </li><br>
- <li>ccconf<br>
- Only with cc1101 receiver.
- Read some CUL radio-chip (cc1101) registers (frequency, bandwidth, etc.),
- and display them in human readable form.
- </li><br>
- <li>ccpatable<br>
- read cc1101 PA table (power amplification for RF sending)
- </li><br>
- <li>ccreg<br>
- read cc1101 registers (99 reads all cc1101 registers)
- </li><br>
- </ul>
- <a name="SIGNALduinoset"></a>
- <b>SET</b>
- <ul>
- <li>raw<br>
- Issue a SIGNALduino firmware command, without waiting data returned by
- the SIGNALduino. See the SIGNALduino firmware code for details on SIGNALduino
- commands. With this line, you can send almost any signal via a transmitter connected
- To send some raw data look at these examples:
- P<protocol id>#binarydata#R<num of repeats>#C<optional clock> (#C is optional)
- <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
- <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
- <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
- <br>;
- </p>
- </li><br>
- <li>reset<br>
- This will do a reset of the usb port and normaly causes to reset the uC connected.
- </li><br>
- <li>close<br>
- Closes the connection to the device.
- </li><br>
- <li>flash [hexFile|url]<br>
- 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
- arduino IDE to flash the firmware into the SIGNALduino this provides a way to flash it directly from FHEM.
- You can specify a file on your fhem server or specify a url from which the firmware is downloaded
- There are some requirements:
- <ul>
- <li>avrdude must be installed on the host<br>
- On a Raspberry PI this can be done with: sudo apt-get install avrdude</li>
- <li>the hardware attribute must be set if using any other hardware as an Arduino nano<br>
- This attribute defines the command, that gets sent to avrdude to flash the uC.<br></li>
- <br>
-
- </ul>
- </li>
- <li>sendMsg<br>
- This command will create the needed instructions for sending raw data via the signalduino. Insteaf of specifying the signaldata by your own you specify
- a protocol and the bits you want to send. The command will generate the needed command, that the signalduino will send this.
- <br><br>
- Please note, that this command will work only for MU or MS protocols. You can't transmit manchester data this way.
- <br><br>
- Input args are:
- <p>
- P<protocol id>#binarydata#R<num of repeats>#C<optional clock> (#C is optional)
- <br>Example: P0#0101#R3#C500
- <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.
- <br>SR;R=3;P0=500;P1=-9000;P2=-4000;P3=-2000;D=03020302;
- </p>
-
- </li><br>
- <li>enableMessagetype<br>
- Allows you to enable the message processing for
- <ul>
- <li>messages with sync (syncedMS),</li>
- <li>messages without a sync pulse (unsyncedMU) </li>
- <li>manchester encoded messages (manchesterMC) </li>
- </ul>
- The new state will be saved into the eeprom of your arduino.
- </li><br>
- <li>disableMessagetype<br>
- Allows you to disable the message processing for
- <ul>
- <li>messages with sync (syncedMS),</li>
- <li>messages without a sync pulse (unsyncedMU)</li>
- <li>manchester encoded messages (manchesterMC) </li>
- </ul>
- The new state will be saved into the eeprom of your arduino.
- </li><br><br>
-
- <li>freq / bWidth / patable / rAmpl / sens<br>
- Only with CC1101 receiver.<br>
- Set the sduino frequency / bandwidth / PA table / receiver-amplitude / sensitivity<br>
-
- Use it with care, it may destroy your hardware and it even may be
- illegal to do so. Note: The parameters used for RFR transmission are
- not affected.<br>
- <ul>
- <li>freq sets both the reception and transmission frequency. Note:
- Although the CC1101 can be set to frequencies between 315 and 915
- MHz, the antenna interface and the antenna of the CUL is tuned for
- exactly one frequency. Default is 868.3 MHz (or 433 MHz)</li>
- <li>bWidth can be set to values between 58 kHz and 812 kHz. Large values
- are susceptible to interference, but make possible to receive
- inaccurately calibrated transmitters. It affects tranmission too.
- Default is 325 kHz.</li>
- <li>patable change the PA table (power amplification for RF sending)
- </li>
- <li>rAmpl is receiver amplification, with values between 24 and 42 dB.
- Bigger values allow reception of weak signals. Default is 42.
- </li>
- <li>sens is the decision boundary between the on and off values, and it
- is 4, 8, 12 or 16 dB. Smaller values allow reception of less clear
- signals. Default is 4 dB.</li>
- </ul>
- </li><br>
-
- </ul>
- <p><a name="SIGNALduino_un"></a>
- <h3>SIGNALduino_un</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SIGNALduino_un'>DE</a>]</div>
- <ul>
- 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
- <br><br>
- <a name="SIGNALduino_undefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SIGNALduino_un <code> ]</code> <br>
- <br>
- You can define a Device, but currently you can do nothing with it.
- Autocreate is also not enabled for this module.
- 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.
- The Module will try to process all messages, which where not handled by other modules.
-
- </ul>
- <br>
- <a name="SIGNALduino_unset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SIGNALduino_unget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="SIGNALduino_unattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#verbose">Verbose</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="SIP"></a>
- <h3>SIP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SIP'>DE</a>]</div>
- <ul>
- Define a SIP-Client device.<br>
- Wiki : <a href="https://wiki.fhem.de/wiki/SIP-Client">https://wiki.fhem.de/wiki/SIP-Client</a>
- <br>
- Forum : <a href="https://forum.fhem.de/index.php/topic,67443.0.html">https://forum.fhem.de/index.php/topic,67443.0.html</a>
- <br><br>
- <a name="SIPdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SIP</code>
- <br><br>
- Example:
- <ul>
- <code>define MySipClient SIP</code><br>
- </ul>
- </ul>
- <br>
- <a name="SIPset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>set <name> <SIP password></code><br>
- Stores the password for the SIP users. Without stored password the functions set call and set listen are blocked !<br>
- IMPORTANT : if you rename the fhem Device you must set the password again!
- </li>
- <li>
- <code>set <name> reset</code><br>
- Stop any listen process and initialize device.<br>
- </li>
- <li>
- <code>set <name> call <number> [<maxtime>] [<message>]</code><br>
- Start a call to the given number.<br>
- Optionally you can supply a max time. Default is 30.
- 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.
- </li>
- <li>
- <code>set <name> listen</code><br>
- attr sip_listen = dtmf :<br>
- 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>
- attr sip_listen = wfp :<br>
- 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>
- </li>
- </ul>
- <br>
- <a name="SIPattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#sip_audiofile_wfp">sip_audiofile_wfp</a><br>
- Audio file that will be played after <b>fetch</b> command. The audio file has to be generated via <br>
- sox <file>.wav -t raw -r 8000 -c 1 -e a-law <file>.al<br>
- since only raw audio format is supported.
- </li>
- <li><a href="#sip_audiofile_call">sip_audiofile_call</a></li>
- <li><a href="#sip_audiofile_dtmf">sip_audiofile_dtmf</a></li>
- <li><a href="#sip_audiofile_ok">sip_audiofile_ok</a></li>
- <li><a href="#sip_listen">sip_listen</a>(none , dtmf , wfp)</li>
- <li><a name="#sip_from">sip_from</a><br>
- My sip client info, defaults to sip:620@fritz.box
- </li>
- <li><a name="#sip_ip">sip_ip</a><br>
- external IP address of the FHEM server.
- </li>
- <li><a name="#sip_port">sip_port</a><br>
- Optionally portnumber used for sip client<br>
- If attribute is not set a random port number between 44000 and 45000 will be used
- </li>
- <li><a name="#sip_registrar">sip_registrar</a><br>
- Hostname or IP address of the SIP server you are connecting to, defaults to fritz.box.
- </li>
- <li><a name="#sip_ringtime">sip_ringtime</a><br>
- Ringtime for incomming calls (dtmf &wfp)
- </li>
- <li><a name="#sip_user">sip_user</a><br>
- User name of the SIP client, defaults to 620.
- </li>
- <li><a name="#sip_waittime">sip_waittime</a><br>
- Maximum waiting time in state listen_for_wfp it will wait to pick up the call.
- </li>
- <li><a name="#sip_dtmf_size">sip_dtmf_size</a><br>
- 1 to 4 , default is 2 ...
- </li>
- <li><a name="#sip_dtmf_loop">sip_dtmf_loop</a><br>
- once or loop , default once ...
- </li>
- <li><a name="#sip_force_interval">sip_force_interval</a><br>
- default 300
- </li>
- <li><a name="#sip_force_max">sip_force_max</a><br>
- default 99
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="SISPM"></a>
- <h3>SISPM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SISPM'>DE</a>]</div>
- <ul>
- <br>
- <a name="SISPMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SISPM </path/to/sispmctl></code>
- <br><br>
- <!--<div style="background-color: #ffaaaa;"> -->
- <div>
- When <i>using multiple SIS PMs on one host</i>, sispmctl up to and including V 2.7 has a bug:
- <pre>plug-2:# sispmctl -v -s -d 1 -g all -d 2 -g all
- SiS PM Control for Linux 2.7
- (C) 2004, 2005, 2006, 2007, 2008 by Mondrian Nuessle, (C) 2005, 2006 by Andreas Neuper.
- This program is free software.
- [...]
- Gembird #0 is USB device 013.This device is a 4-socket SiS-PM.
- [...]
- Gembird #1 is USB device 015.This device is a 4-socket SiS-PM.
- [...]
- Accessing Gembird #1 USB device 015
- Status of outlet 1: on
- Status of outlet 2: on
- Status of outlet 3: on
- Status of outlet 4: on
- Error performing requested action
- Libusb error string: error sending control message: Invalid argument
- Terminating
- *** glibc detected *** sispmctl: double free or corruption (fasttop): 0x000251e0 ***
- [...]</pre>
- Well, the fix is simple and will be sent upstream, but in case it's not incorporated
- at the time you need it, here it is; it's easy to apply even by hand ;-)
- <pre>
- --- src/main.c-old 2010-01-19 16:56:15.000000000 +0100
- +++ src/main.c 2010-01-19 16:54:56.000000000 +0100
- @@ -441,7 +441,7 @@
- }
- break;
- case 'd': // replace previous (first is default) device by selected one
- - if(udev!=NULL) usb_close (udev);
- + if(udev!=NULL) { usb_close (udev); udev=NULL; }
- devnum = atoi(optarg);
- if(devnum>=count) devnum=count-1;
- break;
- </pre></div><br>
- Defines a path to the program "sispmctl", which is used to control (locally attached)
- "Silver Shield Power Manager" devices. Usually these are connected to the local computer
- via USB, more than one "sispm" device per computer is supported. (Please note that, due
- to neglections in their USB driver, AVM's Fritz!Box 7170 (and derivates, like Deutsche
- Telekom's Speedport W901V) <b>is not</b> able to talk to these devices ... The Fritz!Box
- 72xx and 73xx should be fine.)
- The communication between FHEM and the Power Manager device is done by using the open
- source <a href="http://sispmctl.sourceforge.net/">sispmctl</a> program. Thus, for the
- time being, THIS functionality is only available running FHEM on Linux (or any other platform
- where you can get the sispmctl program compiled and running). On the bright side: by
- interfacing via commandline, it is possible to define multiple SISPM devices, e. g. with
- a wrapper that does execute sispmctl on a remote (Linux) system. And: sispmctl runs happily
- on Marvells SheevaPlug ;) <i>Please note:</i> if you're not running FHEM as root, you most likely
- have to make sispmctl setuid root (<code>chmod 4755 /path/to/sispmctl</code>) or fiddle with
- udev so that the devices of the Power Manager are owned by the user running FHEM.
- After defining a SISPM device, a first test is done, identifying attached PMs. If this
- succeeds, an internal task is scheduled to read the status every 30 seconds. (Reason
- being that someone else could have switched sockets externally to FHEM.)
- To actually control any power sockets, you need to define a <a href="#SIS_PMS">SIS_PMS</a>
- device ;) If autocreate is enabled, those should be autocreated for your convenience as
- soon as the first scan took place (30 seconds after the define).
- Implementation of SISPM.pm tries to be nice, that is it reads from the pipe only
- non-blocking (== if there is data), so it should be safe even to use it via ssh or
- a netcat-pipe over the Internet, but this, as well, has not been tested extensively yet.
- <br><br>
- Attributes:
- <ul>
- <li><code>model</code>: <code>SISPM</code> (ignored for now)</li>
- </ul>
- <br>
- Example:
- <ul>
- <code>define PMS_Terrarium SISPM /usr/bin/sispmctl</code><br>
- </ul>
- <br>
- </ul>
- <a name="SISPMset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SISPMget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="SISPMattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (SISPM)</li>
- </ul>
- <br>
- </ul>
- <p><a name="SIS_PMS"></a>
- <h3>SIS_PMS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SIS_PMS'>DE</a>]</div>
- <ul>
- This module is responsible for handling the actual sockets (power on,
- power off, toggle) on a "Silver Shield Power Manager", see <a href="#SISPM">SISPM</a>
- for how to define access to one (SIS_PMS stands for "Silver Shield Power Manager Socket").
- <br><br>
- <a name="SIS_PMSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SIS_PMS <serial> <socket></code>
- <br><br>
- To securely distinguish multiple attached Power Manager devices, the
- serial number of those is used. You get these with "sispmctl -s" - or
- just let autocreate define the sockets attached for you.<br>
- <ul>
- <li><code><serial></code> is the serial number of the Power Manager device, see above.</li>
- <li><code><socket></code> is a number between 1 and 4 (for a 4 socket model)</li>
- </ul>
- <br>
- Examples:
- <ul>
- <code>define lamp SIS_PMS 01:02:03:04:05 1</code><br>
- <code>define otherlamp SIS_PMS 01:02:03:04:05 3</code><br>
- <code>define tv SIS_PMS 01:01:38:44:55 1</code>
- </ul>
- </ul>
- <br>
- <a name="SIS_PMSset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<time>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- off
- on
- toggle
- on-till # Special, see the note
- off-till # Special, see the note
- </pre>
- Examples:
- <ul>
- <code>set lamp on</code><br>
- <code>set lamp1,lamp2,lamp3 on</code><br>
- <code>set lamp1-lamp3 on</code><br>
- <code>set hql_lamp on-till 18:45</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>As an external program is used, a noticeable delay may occur.</li>
- <li>*-till requires an absolute time in the "at" format (HH:MM:SS, HH:MM
- or { <perl code> }, where the perl-code returns a time
- specification).
- If the current time is greater than the specified time, then the
- command is ignored, else an "on" or "off" command, respectively, is
- generated, and for the given time an "off"/"on" command is
- scheduleld via the at command.</li>
- </ul>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="SIS_PMSattributes"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <a name="attrdummy"></a>
- <li>dummy<br>
- Set the device attribute dummy to define devices which should not
- output any signals. Associated notifys will be executed if the signal
- is received. Used e.g. to react to a code from a sender, but it will
- not actually switch if triggered in the web frontend.
- </li><br>
- <li><a href="#loglevel">loglevel</a></li><br>
- </ul>
- </ul>
- <p><a name="SMAEM"></a>
- <h3>SMAEM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SMAEM'>DE</a>]</div>
- <br>
- <a name="SMAEMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SMAEM </code><br>
- <br>
- Defines a SMA Energy Meter (SMAEM), a bidirectional energy meter/counter used in photovoltaics.
- <br><br>
- 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
- 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).
- <br><br>
- 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
- update the readings once a second by lowering the interval to 1 (Not recommended, since it puts FHEM under heavy load).
- <br><br>
- The parameter "disableSernoInReading" changes the way readings are named: if disableSernoInReading is false or unset, the readings will be named
- "SMAEM<serialnumber_>.....".
- If set to true, the prefix "SMAEM<serialnumber_>" is skipped.
- Set this to true if you only have one SMAEM device on your network and you want shorter reading names.
- If unsure, leave it unset.
- <br><br>
- 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>.
- </ul>
- <br>
- <br>
-
- <a name="SMAEMattr"></a>
- <b>Attribute</b>
- <ul>
- <li><b>disableSernoInReading</b> : prevents the prefix "SMAEM<serialnumber_>....." </li>
- <li><b>feedinPrice</b> : the individual amount of refund of one kilowatt hour</li>
- <li><b>interval</b> : evaluation interval in seconds </li>
- <li><b>disable</b> : 1 = the module is disabled </li>
- <li><b>diffAccept</b> : diffAccept determines the threshold, up to that a calaculated difference between two
- straight sequently meter readings (Readings with *_Diff) should be commenly accepted (default = 10). <br>
- Hence faulty DB entries with a disproportional high difference values will be eliminated, don't
- tamper the result and the measure cycles will be discarded. </li>
- <li><b>powerCost</b> : the individual amount of power cost per kWh </li>
- <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>
- </ul>
- <br>
- <a name="SMAEMreadings"></a>
- <b>Readings</b> <br><br>
- The created readings of SMAEM mostly are self-explanatory.
- However there are readings what maybe need some explanation. <br>
- <ul>
- <li><b><Phase>_THD</b> : (Total Harmonic Distortion) - Proportion or quota of total effective value
- of all harmonic component to effective value of fundamental component.
- Total ratio of harmonic component and interference of pure sinusoidal wave
- in %.
- It is a rate of interferences. d is 0, if sinusoidal voltage exists and a sinusoidal
- current exists as well. As larger d, as more harmonic component are existing.
- According EN 50160/1999 the value mustn't exceed 8 %.
- If a current interference is so powerful that it is causing a voltage interference of
- more than 5 % (THD), that points to an issue with electrical potential. </li>
- </ul>
- <br>
- <p><a name="SMAInverter"></a>
- <h3>SMAInverter</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SMAInverter'>DE</a>]</div>
- Module for the integration of a SMA Inverter over it's Speedwire (=Ethernet) Interface.<br>
- Tested on Sunny Tripower 6000TL-20 and Sunny Island 4.4 with Speedwire/Webconnect Piggyback.
- <br><br>
- Questions and discussions about this module you can find in the FHEM-Forum link:<br>
- <a href="https://forum.fhem.de/index.php/topic,56080.msg476525.html#msg476525">76_SMAInverter.pm - Abfrage von SMA Wechselrichter</a>.
- <br><br>
- <b>Requirements</b>
- <br><br>
- This module requires:
- <ul>
- <li>Perl Module: IO::Socket::INET (apt-get install libio-socket-multicast-perl) </li>
- <li>Perl Module: Date::Time (apt-get install libdatetime-perl) </li>
- <li>Perl Module: Time::HiRes</li>
- <li>FHEM Module: 99_SUNRISE_EL.pm</li>
- <li>FHEM Module: Blocking.pm</li>
- </ul>
- <br>
- <br>
- <b>Define</b>
- <ul>
- <code>define <name> SMAInverter <pin> <hostname/ip> </code><br>
- <br>
- <li>pin: User-Password of the SMA Inverter. Default is 0000. Can be changed by "Sunny Explorer" Windows Software</li>
- <li>hostname/ip: Hostname or IP-Adress of the inverter (or it's speedwire piggyback module).</li>
- <li>Port of the inverter is 9522 by default. Firewall has to allow connection on this port !</li>
- </ul>
- <b>Operation method</b>
- <ul>
- The module sends commands to the inverter and checks if they are supported by the inverter.<br>
- In case of a positive answer the data is collected and displayed in the readings according to the detail-level. <br>
- If more than one inverter is installed, set attributes "target-susyid" and "target-serial" with an appropriate value. <br><br>
- The normal operation time of the inverter is supposed from sunrise to sunset. In that time period the inverter will be polled.
- The time of sunrise and sunset will be calculated by functions of FHEM module 99_SUNRISE_EL.pm which is loaded automatically by default.
- Therefore the global attribute "longitude" and "latitude" should be set to determine the position of the solar system
- (see <a href="#SUNRISE_EL">Commandref SUNRISE_EL</a>). <br><br>
- By the attribute "suppressSleep" the sleep mode between sunset and sunrise can be suppressed. Using attribute "offset" you may prefer the sunrise and
- defer the sunset virtually. So the working period of the inverter will be extended. <br><br>
- In operating mode "automatic" the inverter will be requested periodically corresponding the preset attribute "interval". The operating mode can be
- switched to "manual" to realize the retrieval manually (e.g. to synchronize the requst with a SMA energy meter by notify). <br><br>
- During inverter operating time the average energy production of the last 5, 10 and 15 minutes will be calculated and displayed in the readings
- "avg_power_lastminutes_05", "avg_power_lastminutes_10" and "avg_power_lastminutes_15". <b>Note:</b> To permit a precise calculation, you should
- also set the real request interval into the attribute "interval" although you would use the "manual" operation mode ! <br><br>
- The retrieval of the inverter will be executed non-blocking. You can adjust the timeout value for this background process by attribute "timeout". <br>
- </ul>
- <b>Get</b>
- <br>
- <ul>
- <code>get <name> data</code>
- <br><br>
- The request of the inverter will be executed. Those possibility is especifically created for the "manual" operation mode (see attribute "mode").
- </ul>
- <b>Attributes</b>
- <ul>
- <li><b>interval</b> : Queryintreval in seconds </li>
- <li><b>detail-level</b> : "0" - Only Power and Energy / "1" - Including Voltage and Current / "2" - All values </li>
- <li><b>disable</b> : 1 = the module is disabled </li>
- <li><b>mode</b> : automatic = the inverter will be polled by preset interval, manual = query only by command "get <name> data" </li>
- <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
- period of the module. </li>
- <li><b>SBFSpotComp</b> : 1 = the readings are created like SBFSpot-style </li>
- <li><b>suppressSleep</b> : the sleep mode (after sunset, before sunrise) is deactivated and the inverter will be polled continuously. </li>
- <li><b>showproctime</b> : shows processing time in background and wasted time to retrieve inverter data </li>
- <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
- set the inverter-SUSyID to assign the inverter to the device definition.
- Default is 0xFFFF, means any SUSyID</li>
- <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
- set the inverter-Serialnumber to assign the inverter to the device definition.
- Default is 0xFFFFFFFF, means any Serialnumber</li>
- <li><b>timeout</b> : setup timeout of inverter data request (default 60s) </li>
- </ul>
- <b>Readings</b>
- <ul>
- <li><b>BAT_CYCLES / bat_cycles</b> : Battery recharge cycles </li>
- <li><b>BAT_IDC / bat_idc</b> : Battery Current </li>
- <li><b>BAT_TEMP / bat_temp</b> : Battery temperature </li>
- <li><b>BAT_UDC / bat_udc</b> : Battery Voltage </li>
- <li><b>ChargeStatus / chargestatus</b> : Battery Charge status </li>
- <li><b>CLASS / device_class</b> : Inverter Class </li>
- <li><b>PACMAX1 / pac_max_phase_1</b> : Nominal power in Ok Mode </li>
- <li><b>PACMAX1_2 / pac_max_phase_1_2</b> : Maximum active power device (Some inverters like SB3300/SB1200) </li>
- <li><b>PACMAX2 / pac_max_phase_2</b> : Nominal power in Warning Mode </li>
- <li><b>PACMAX3 / pac_max_phase_3</b> : Nominal power in Fault Mode </li>
- <li><b>Serialnumber / serial_number</b> : Inverter Serialnumber </li>
- <li><b>SPOT_ETODAY / etoday</b> : Today yield </li>
- <li><b>SPOT_ETOTAL / etotal</b> : Total yield </li>
- <li><b>SPOT_FEEDTM / feed-in_time</b> : Feed-in time </li>
- <li><b>SPOT_FREQ / grid_freq.</b> : Grid Frequency </li>
- <li><b>SPOT_IAC1 / phase_1_iac</b> : Grid current phase L1 </li>
- <li><b>SPOT_IAC2 / phase_2_iac</b> : Grid current phase L2 </li>
- <li><b>SPOT_IAC3 / phase_3_iac</b> : Grid current phase L3 </li>
- <li><b>SPOT_IDC1 / string_1_idc</b> : DC current input </li>
- <li><b>SPOT_IDC2 / string_2_idc</b> : DC current input </li>
- <li><b>SPOT_OPERTM / operation_time</b> : Operation Time </li>
- <li><b>SPOT_PAC1 / phase_1_pac</b> : Power L1 </li>
- <li><b>SPOT_PAC2 / phase_2_pac</b> : Power L2 </li>
- <li><b>SPOT_PAC3 / phase_3_pac</b> : Power L3 </li>
- <li><b>SPOT_PACTOT / total_pac</b> : Total Power </li>
- <li><b>SPOT_PDC1 / string_1_pdc</b> : DC power input 1 </li>
- <li><b>SPOT_PDC2 / string_2_pdc</b> : DC power input 2 </li>
- <li><b>SPOT_UAC1 / phase_1_uac</b> : Grid voltage phase L1 </li>
- <li><b>SPOT_UAC2 / phase_2_uac</b> : Grid voltage phase L2 </li>
- <li><b>SPOT_UAC3 / phase_3_uac</b> : Grid voltage phase L3 </li>
- <li><b>SPOT_UDC1 / string_1_udc</b> : DC voltage input </li>
- <li><b>SPOT_UDC2 / string_2_udc</b> : DC voltage input </li>
- <li><b>SUSyID / susyid</b> : Inverter SUSyID </li>
- <li><b>INV_TEMP / device_temperature</b> : Inverter temperature </li>
- <li><b>INV_TYPE / device_type</b> : Inverter Type </li>
- <li><b>POWER_IN / power_in</b> : Battery Charging power </li>
- <li><b>POWER_OUT / power_out</b> : Battery Discharging power </li>
- <li><b>INV_GRIDRELAY / gridrelay_status</b> : Grid Relay/Contactor Status </li>
- <li><b>INV_STATUS / device_status</b> : Inverter Status </li>
- <li><b>opertime_start</b> : Begin of iverter operating time corresponding the calculated time of sunrise with consideration of the
- attribute "offset" (if set) </li>
- <li><b>opertime_stop</b> : End of iverter operating time corresponding the calculated time of sunrise with consideration of the
- attribute "offset" (if set) </li>
- <li><b>modulstate</b> : shows the current module state "normal" or "sleep" if the inverter won't be requested at the time. </li>
- <li><b>avg_power_lastminutes_05</b> : average power of the last 5 minutes. </li>
- <li><b>avg_power_lastminutes_10</b> : average power of the last 10 minutes. </li>
- <li><b>avg_power_lastminutes_15</b> : average power of the last 15 minutes. </li>
- <li><b>inverter_processing_time</b> : wasted time to retrieve the inverter data </li>
- <li><b>background_processing_time</b> : total wasted time by background process (BlockingCall) </li>
- </ul>
- <br><br>
- <p><!-- ================================ -->
- <a name="SMARTMON"></a>
- <h3>SMARTMON</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SMARTMON'>DE</a>]</div>
- <ul>
- This module is a FHEM frontend to the Linux tool smartctl.
- It provides various information on the SMART System of the hard drive.
- <br><br>
- <b>Define</b>
- <br><br>
- <code>define <name> SMARTMON <device> [<Interval>]</code><br>
- <br>
- This statement creates a new SMARTMON instance.
- The parameters specify a device to be monitored and the update interval in minutes.<br>
- <br>
-
- Example: <code>define sm SMARTMON /dev/sda 60</code>
- <br>
- <br>
- <b>Readings:</b>
- <br><br>
- <ul>
- <li>last_exit_code<br>
- Exit code of smartctl.
- </li>
- <li>overall_health_test<br>
- Specifies the general condition of the HDD (PASSED or FAILED).
- </li>
- <br>
- <li>warnings<br>
- Specifies the number of stored alerts.
- </li>
- <br>
- Furthermore, the available SMART parameters can be displayed as Readings (RAW and / or (partially) interpreted).
- </ul>
- <br>
- <b>Get:</b><br><br>
- <ul>
- <li>version<br>
- Displays the module version.
- </li>
- <br>
- <li>update<br>
- Updates all readings.
- </li>
- <br>
- <li>list<br>
- Displays various information:
- <ul>
- <li>devices:<br>List of available devices in the system.</li>
- </ul><br>
- <ul>
- <li>info:<br>Information about the current device.</li>
- </ul><br>
- <ul>
- <li>data:<br>List of SMART parameters for the current device.</li>
- </ul><br>
- <ul>
- <li>health:<br>Information about overall health status for the device.</li>
- </ul><br>
- For the Last 3 commands can also be another Device specified (as an additional parameter).
- </li>
- <br>
- </ul><br>
- <b>Attributes:</b><br><br>
- <ul>
- <li>show_raw<br>
- Valid values: 0: no RAW Readings (default), 1: show all, are not included in interpreted Readings, 2: show all.
- </li>
- <br>
- <li>include<br>
- Comma separated list of IDs for desired SMART parameters. If nothing passed, all available values are displayed.
- </li>
- <br>
- <li>disable<br>
- Valid values: 0: Module active (default), 1: module is disabled (no updates).
- </li>
- <br>
- <li>parameters<br>
- Additional values for smartctl.
- </li>
- <br>
- </ul><br>
- For more information see cmartctrl documentation.
- </ul>
- <!-- ================================ -->
- <p><a name="SMASTP"></a>
- <h3>SMASTP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SMASTP'>DE</a>]</div>
- Module for the integration of a Sunny Tripower Inverter build by SMA over it's Speedwire (=Ethernet) Interface.<br>
- Tested on Sunny Tripower 6000TL-20, 10000-TL20 and 10000TL-10 with Speedwire/Webconnect Piggyback.
- <p>
- <b>Define</b>
- <ul>
- <code>define <name> SMASTP <pin> <hostname/ip> [port]</code><br>
- <br>
- <li>pin: User-Password of the SMA STP Inverter. Default is 0000. Can be changed by "Sunny Explorer" Windows Software</li>
- <li>hostname/ip: Hostname or IP-Adress of the inverter (or it's speedwire piggyback module).</li>
- <li>port: Port of the inverter. 9522 by default.</li>
- </ul>
- <p>
- <b>Modus</b>
- <ul>
- The module automatically detects the inactvity of the inverter due to a lack of light (night). <br>
- This inactivity is therefore called "nightmode". During nightmode, the inverter is not queried over the network.<br>
- By default nightmode is between 9pm and 5am. This can be changed by "starttime" (start of inverter <br>
- operation, end of nightmode) and "endtime" (end of inverter operation, start of nightmode).<br>
- Further there is the inactivitymode: in inactivitymode, the inverter is queried but readings are not updated.
- </ul>
- <b>Parameter</b>
- <ul>
- <li>interval: Queryintreval in seconds </li>
- <li>suppress-night-mode: The nightmode is deactivated </li>
- <li>suppress-inactivity-mode: The inactivitymode is deactivated </li>
- <li>starttime: Starttime of inverter operation (default 5am) </li>
- <li>endtime: Endtime of inverter operation (default 9pm) </li>
- <li>force-sleepmode: The nightmode is activated on inactivity, even the endtime is not reached </li>
- <li>enable-modulstate: Turns the reading "modulstate" (normal / inactive / sleeping) on </li>
- <li>alarm1-value, alarm2-value, alarm3-value: Set an alarm on the reading SpotP in watt.<br>
- The readings Alarm1..Alarm3 are set accordingly: -1 for SpotP < alarmX-value and 1 for SpotP >= alarmX-value </li>
- </ul>
- <b>Readings</b>
- <ul>
- <li>SpotP: spotpower - Current power in watt delivered by the inverter </li>
- <li>AvP01: average power 1 minute: average power in watt of the last minute </li>
- <li>AvP05: average power 5 minutes: average power in watt of the five minutes </li>
- <li>AvP15: average power 15 minutes: average power in watt of the fifteen minutes </li>
- <li>SpotPDC1: current d.c. voltage delivered by string 1 </li>
- <li>SpotPDC2: current d.c. voltage delivered by string 2 </li>
- <li>TotalTodayP: generated power in Wh of the current day </li>
- <li>AlltimeTotalP: all time generated power in Wh </li>
- <li>Alarm1..3: alrm trigger 1..3. Set by parameter alarmN-value </li>
- </ul>
- <p><a name="SML"></a>
- <h3>SML</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SML'>DE</a>]</div>
- <ul><p>
- This module supports "Intelligenter Strom Zhler"(ENBW) and "Sparzhler" (Yellow Strom).<br>
- The electricity meter will be polled in a defined interval (1-100) for new values.
- </p>
- <b>Define</b><br>
- <code>define <name> SML <host> <port> [<interval> <timeout>]</code><br>
- <p>
- Example:<br>
- define StromZ1 SML 192.168.178.20 <br>
- define StromZ2 SML 192.168.10.25 60 60 <br>
- </p>
- <b>Set</b><br>
- set <name> <value> <nummber><br>where value is one of:<br><br>
- <ul>
- <li><code>TOTALPOWER</code> </li>
- <li><code>YEARPOWER </code> </li>
- <li><code>MONTHPOWER</code> </li>
- <li><code>DAYPOWER </code> </li>
- <li><code>Interval </code> </li>
- </ul>
- <br>Example:<br>
- set <name> TOTALPOWER 12345 <br><br>
- <b>Get</b><br>
- get <name> <value> <br>where value is one of:<br>
- <ul>
- <li><code>TOTALPOWER</code></li>
- <li><code>YEARPOWER </code></li>
- <li><code>MONTHPOWER</code></li>
- <li><code>DAYPOWER </code></li>
- <li><code>Interval </code> </li>
- </ul>
- <br>Example:<br>
- get <name> DAYPOWER<br>
- get <name> YEARPOWER<br><br>
-
- </ul>
- <p><a name="SOMFY"></a>
- <h3>SOMFY - Somfy RTS / Simu Hz protocol</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SOMFY'>DE</a>]</div>
- <ul>
- The Somfy RTS (identical to Simu Hz) protocol is used by a wide range of devices,
- which are either senders or receivers/actuators.
- Right now only SENDING of Somfy commands is implemented in the CULFW, so this module currently only
- supports devices like blinds, dimmers, etc. through a <a href="#CUL">CUL</a> device (which must be defined first).
- Reception of Somfy remotes is only supported indirectly through the usage of an FHEMduino
- <a href="http://www.fhemwiki.de/wiki/FHEMduino">http://www.fhemwiki.de/wiki/FHEMduino</a>
- which can then be used to connect to the SOMFY device.
- <br><br>
- <a name="SOMFYdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SOMFY <address> [<encryption-key>] [<rolling-code>] </code>
- <br><br>
- The address is a 6-digit hex code, that uniquely identifies a single remote control channel.
- It is used to pair the remote to the blind or dimmer it should control.
- <br>
- Pairing is done by setting the blind in programming mode, either by disconnecting/reconnecting the power,
- or by pressing the program button on an already associated remote.
- <br>
- Once the blind is in programming mode, send the "prog" command from within FHEM to complete the pairing.
- The blind will move up and down shortly to indicate completion.
- <br>
- You are now able to control this blind from FHEM, the receiver thinks it is just another remote control.
- <ul>
- <li><code><address></code> is a 6 digit hex number that uniquely identifies FHEM as a new remote control channel.
- <br>You should use a different one for each device definition, and group them using a structure.
- </li>
- <li>The optional <code><encryption-key></code> is a 2 digit hex number (first letter should always be A)
- that can be set to clone an existing remote control channel.</li>
- <li>The optional <code><rolling-code></code> is a 4 digit hex number that can be set
- to clone an existing remote control channel.<br>
- If you set one of them, you need to pick the same address as an existing remote.
- Be aware that the receiver might not accept commands from the remote any longer,<br>
- if you used FHEM to clone an existing remote.
- <br>
- This is because the code is original remote's codes are out of sync.</li>
- <br>
- Rolling code and encryption key in the device definition will be always updated on commands sent and can be also changed manually by modifying the original definition (e.g in FHEMWeb - modify).
- </ul>
- <br>
- Examples:
- <ul>
- <code>define rollo_1 SOMFY 000001</code><br>
- <code>define rollo_2 SOMFY 000002</code><br>
- <code>define rollo_3_original SOMFY 42ABCD A5 0A1C</code><br>
- </ul>
- </ul>
- <br>
- <a name="SOMFYset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<time>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- on
- off
- go-my
- stop
- pos value (0..100) # see note
- prog # Special, see note
- wind_sun_9
- wind_only_a
- on-for-timer
- off-for-timer
- manual 0,...,100,200,on,off
- </pre>
- Examples:
- <ul>
- <code>set rollo_1 on</code><br>
- <code>set rollo_1,rollo_2,rollo_3 on</code><br>
- <code>set rollo_1-rollo_3 on</code><br>
- <code>set rollo_1 off</code><br>
- <code>set rollo_1 pos 50</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>prog is a special command used to pair the receiver to FHEM:
- Set the receiver in programming mode (eg. by pressing the program-button on the original remote)
- and send the "prog" command from FHEM to finish pairing.<br>
- The blind will move up and down shortly to indicate success.
- </li>
- <li>on-for-timer and off-for-timer send a stop command after the specified time,
- instead of reversing the blind.<br>
- This can be used to go to a specific position by measuring the time it takes to close the blind completely.
- </li>
- <li>pos value<br>
-
- The position is variying between 0 completely open and 100 for covering the full window.
- The position must be between 0 and 100 and the appropriate
- attributes drive-down-time-to-100, drive-down-time-to-close,
- drive-up-time-to-100 and drive-up-time-to-open must be set. See also positionInverse attribute.<br>
- </li>
- <li>wind_sun_9 and wind_only_a send special commands to the Somfy device that to represent the codes sent from wind and sun detector (with the respective code contained in the set command name)
- </li>
- <li>manual will only set the position without sending any commands to the somfy device - can be used to correct the position manually
- </li>
- </ul>
- The position reading distinuishes between multiple cases
- <ul>
- <li>Without timing values (see attributes) set only generic values are used for status and position: <pre>open, closed, moving</pre> are used
- </li>
- <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
- the device is considered to only vary between 0 and 100 (100 being completely closed)
- </li>
- <li>With full timing values set the device is considerd a window shutter (Rolladen) with a difference between
- covering the full window (position 100) and being completely closed (position 200)
- </li>
- </ul>
- </ul>
- <br>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="SOMFYattr"></a>
- <b>Attributes</b>
- <ul>
- <li>IODev<br>
- Set the IO or physical device which should be used for sending signals
- for this "logical" device. An example for the physical device is a CUL.<br>
- Note: The IODev has to be set, otherwise no commands will be sent!<br>
- If you have both a CUL868 and CUL433, use the CUL433 as IODev for increased range.
- </li><br>
- <li>positionInverse<br>
- 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.
- </li><br>
- <li>additionalPosReading<br>
- Position of the shutter will be stored in the reading <code>pos</code> as numeric value.
- Additionally this attribute might specify a name for an additional reading to be updated with the same value than the pos.
- </li><br>
- <li>fixed_enckey 1|0<br>
- If set to 1 the enc-key is not changed after a command sent to the device. Default is value 0 meaning enc-key is changed normally for the RTS protocol.
- </li><br>
-
- <li>eventMap<br>
- Replace event names and set arguments. The value of this attribute
- consists of a list of space separated values, each value is a colon
- separated pair. The first part specifies the "old" value, the second
- the new/desired value. If the first character is slash(/) or comma(,)
- then split not by space but by this character, enabling to embed spaces.
- Examples:<ul><code>
- attr store eventMap on:open off:closed<br>
- attr store eventMap /on-for-timer 10:open/off:closed/<br>
- set store open
- </code></ul>
- </li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#loglevel">loglevel</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li>model<br>
- The model attribute denotes the model type of the device.
- The attributes will (currently) not be used by the fhem.pl directly.
- It can be used by e.g. external programs or web interfaces to
- distinguish classes of devices and send the appropriate commands
- (e.g. "on" or "off" to a switch, "dim..%" to dimmers etc.).<br>
- The spelling of the model names are as quoted on the printed
- documentation which comes which each device. This name is used
- without blanks in all lower-case letters. Valid characters should be
- <code>a-z 0-9</code> and <code>-</code> (dash),
- other characters should be ommited.<br>
- Here is a list of "official" devices:<br>
- <b>Receiver/Actor</b>: somfyblinds<br>
- </li><br>
- <li>ignore<br>
- Ignore this device, e.g. if it belongs to your neighbour. The device
- won't trigger any FileLogs/notifys, issued commands will silently
- ignored (no RF signal will be sent out, just like for the <a
- href="#attrdummy">dummy</a> attribute). The device won't appear in the
- list command (only if it is explicitely asked for it), nor will it
- appear in commands which use some wildcard/attribute as name specifiers
- (see <a href="#devspec">devspec</a>). You still get them with the
- "ignored=1" special devspec.
- </li><br>
- <li>drive-down-time-to-100<br>
- The time the blind needs to drive down from "open" (pos 0) to pos 100.<br>
- In this position, the lower edge touches the window frame, but it is not completely shut.<br>
- For a mid-size window this time is about 12 to 15 seconds.
- </li><br>
- <li>drive-down-time-to-close<br>
- The time the blind needs to drive down from "open" (pos 0) to "close", the end position of the blind.<br>
- Note: If set, this value always needs to be higher than drive-down-time-to-100
- This is about 3 to 5 seonds more than the "drive-down-time-to-100" value.
- </li><br>
- <li>drive-up-time-to-100<br>
- The time the blind needs to drive up from "close" (endposition) to "pos 100".<br>
- This usually takes about 3 to 5 seconds.
- </li><br>
- <li>drive-up-time-to-open<br>
- The time the blind needs drive up from "close" (endposition) to "open" (upper endposition).<br>
- Note: If set, this value always needs to be higher than drive-down-time-to-100
- This value is usually a bit higher than "drive-down-time-to-close", due to the blind's weight.
- </li><br>
- </ul>
- </ul>
- <p><a name="SONOS"></a>
- <h3>SONOS</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SONOS'>DE</a>]</div>
- <p>FHEM-Module to communicate with the Sonos-System via UPnP</p>
- <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>
- <p>For correct functioning of this module it is neccessary to have some Perl-Modules installed, which are eventually installed already manually:<ul>
- <li><code>LWP::Simple</code></li>
- <li><code>LWP::UserAgent</code></li>
- <li><code>SOAP::Lite</code></li>
- <li><code>HTTP::Request</code></li></ul>
- Installation e.g. as Debian-Packages (via "sudo apt-get install <packagename>"):<ul>
- <li>LWP::Simple-Packagename (incl. LWP::UserAgent and HTTP::Request): libwww-perl</li>
- <li>SOAP::Lite-Packagename: libsoap-lite-perl</li></ul>
- <br />Installation e.g. as Windows ActivePerl (via Perl-Packagemanager)<ul>
- <li>Install Package LWP (incl. LWP::UserAgent and HTTP::Request)</li>
- <li>Install Package SOAP::Lite</li>
- <li>SOAP::Lite-Special for Versions after 5.18:<ul>
- <li>Add another Packagesource from suggestions or manual: Bribes de Perl (http://www.bribes.org/perl/ppm)</li>
- <li>Install Package: SOAP::Lite</li></ul></li></ul>
- <b>Windows ActivePerl 5.20 does currently not work due to missing SOAP::Lite</b></p>
- <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>
- <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>
- <p>The system consists of two different components:<br />
- 1. A UPnP-Client which runs as a standalone process in the background and takes the communications to the sonos-components.<br />
- 2. The FHEM-module itself which connects to the UPnP-client to make fhem able to work with sonos.<br /><br />
- The client will be started by the module itself if not done in another way.<br />
- You can start this client on your own (to let it run instantly and independent from FHEM):<br />
- <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>
- <h4>Example</h4>
- <p>
- Simplest way to define:<br />
- <b><code>define Sonos SONOS</code></b>
- </p>
- <p>
- Example with control over the used port and the isalive-checker-interval:<br />
- <b><code>define Sonos SONOS localhost:4711 45</code></b>
- </p>
- <a name="SONOSdefine"></a>
- <h4>Define</h4>
- <b><code>define <name> SONOS [upnplistener [interval [waittime [delaytime]]]]</code></b>
- <br /><br /> Define a Sonos interface to communicate with a Sonos-System.<br />
- <p>
- <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>
- <p>
- <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>
- <p>
- <b><code>[waittime]</code></b><br /> With this value you can configure the waiting time for the starting of the Subprocess.</p>
- <p>
- <b><code>[delaytime]</code></b><br /> With this value you can configure a delay time before starting the network-part.</p>
- <a name="SONOSset"></a>
- <h4>Set</h4>
- <ul>
- <li><b>Common Tasks</b><ul>
- <li><a name="SONOS_setter_RefreshShareIndex">
- <b><code>RefreshShareIndex</code></b></a>
- <br />Starts the refreshing of the library.</li>
- <li><a name="SONOS_setter_RescanNetwork">
- <b><code>RescanNetwork</code></b></a>
- <br />Restarts the player discovery.</li>
- </ul></li>
- <li><b>Control-Commands</b><ul>
- <li><a name="SONOS_setter_Mute">
- <b><code>Mute <state></code></b></a>
- <br />Sets the mute-state on all players.</li>
- <li><a name="SONOS_setter_PauseAll">
- <b><code>PauseAll</code></b></a>
- <br />Pause all Zoneplayer.</li>
- <li><a name="SONOS_setter_Pause">
- <b><code>Pause</code></b></a>
- <br />Alias for PauseAll.</li>
- <li><a name="SONOS_setter_StopAll">
- <b><code>StopAll</code></b></a>
- <br />Stops all Zoneplayer.</li>
- <li><a name="SONOS_setter_Stop">
- <b><code>Stop</code></b></a>
- <br />Alias for StopAll.</li>
- </ul></li>
- <li><b>Bookmark-Commands</b><ul>
- <li><a name="SONOS_setter_DisableBookmark">
- <b><code>DisableBookmark <Groupname></code></b></a>
- <br />Disables the group with the given name.</li>
- <li><a name="SONOS_setter_EnableBookmark">
- <b><code>EnableBookmark <Groupname></code></b></a>
- <br />Enables the group with the given name.</li>
- <li><a name="SONOS_setter_LoadBookmarks">
- <b><code>LoadBookmarks [Groupname]</code></b></a>
- <br />Loads the given group (or all if parameter not set) from the filesystem.</li>
- <li><a name="SONOS_setter_SaveBookmarks">
- <b><code>SaveBookmarks [Groupname]</code></b></a>
- <br />Saves the given group (or all if parameter not set) to the filesystem.</li>
- </ul></li>
- <li><b>Group-Commands</b><ul>
- <li><a name="SONOS_setter_Groups">
- <b><code>Groups <GroupDefinition></code></b></a>
- <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>
- </ul></li>
- </ul>
- <a name="SONOSget"></a>
- <h4>Get</h4>
- <ul>
- <li><b>Group-Commands</b><ul>
- <li><a name="SONOS_getter_Groups">
- <b><code>Groups</code></b></a>
- <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 />
- 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>
- </ul></li>
- </ul>
- <a name="SONOSattr"></a>
- <h4>Attributes</h4>
- '''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.
- <ul>
- <li><b>Common</b><ul>
- <li><a name="SONOS_attribut_coverLoadTimeout"><b><code>coverLoadTimeout <value></code></b>
- </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>
- <li><a name="SONOS_attribut_deviceRoomView"><b><code>deviceRoomView <Both|DeviceLineOnly></code></b>
- </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>
- <li><a name="SONOS_attribut_disable"><b><code>disable <value></code></b>
- </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>
- <li><a name="SONOS_attribut_getFavouritesListAtNewVersion"><b><code>getFavouritesListAtNewVersion <value></code></b>
- </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>
- <li><a name="SONOS_attribut_getPlaylistsListAtNewVersion"><b><code>getPlaylistsListAtNewVersion <value></code></b>
- </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>
- <li><a name="SONOS_attribut_getQueueListAtNewVersion"><b><code>getQueueListAtNewVersion <value></code></b>
- </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>
- <li><a name="SONOS_attribut_getRadiosListAtNewVersion"><b><code>getRadiosListAtNewVersion <value></code></b>
- </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>
- <li><a name="SONOS_attribut_getListsDirectlyToReadings"><b><code>getListsDirectlyToReadings <value></code></b>
- </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>
- <li><a name="SONOS_attribut_getLocalCoverArt"><b><code>getLocalCoverArt <value></code></b>
- </a><br />One of (0,1). With this attribute the loads and saves the Coverart locally (default till now).</li>
- <li><a name="SONOS_attribut_ignoredIPs"><b><code>ignoredIPs <IP-Address>[,IP-Address]</code></b>
- </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>
- <li><a name="SONOS_attribut_pingType"><b><code>pingType <string></code></b>
- </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>
- <li><a name="SONOS_attribut_reusePort"><b><code>reusePort <int></code></b>
- </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>
- <li><a name="SONOS_attribut_SubProcessLogfileName"><b><code>SubProcessLogfileName <Path></code></b>
- </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>
- <li><a name="SONOS_attribut_usedonlyIPs"><b><code>usedonlyIPs <IP-Adresse>[,IP-Adresse]</code></b>
- </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>
- </ul></li>
- <li><b>Bookmark Configuration</b><ul>
- <li><a name="SONOS_attribut_bookmarkSaveDir"><b><code>bookmarkSaveDir <path></code></b>
- </a><br /> Defines a directory where the saved bookmarks can be placed. If not defined, "." will be used.</li>
- <li><a name="SONOS_attribut_bookmarkTitleDefinition"><b><code>bookmarkTitleDefinition <Groupname>:<PlayerdeviceRegEx>:<TrackURIRegEx>:<MinTitleLength>:<RemainingLength>:<MaxAge>:<ReadOnly></code></b>
- </a><br /> Definition of Bookmarks for titles.</li>
- <li><a name="SONOS_attribut_bookmarkPlaylistDefinition"><b><code>bookmarkPlaylistDefinition <Groupname>:<PlayerdeviceRegEx>:<MinListLength>:<MaxListLength>:<MaxAge></code></b>
- </a><br /> Definition of bookmarks for playlists.</li>
- </ul></li>
- <li><b>Proxy Configuration</b><ul>
- <li><a name="SONOS_attribut_generateProxyAlbumArtURLs"><b><code>generateProxyAlbumArtURLs <int></code></b>
- </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>
- <li><a name="SONOS_attribut_proxyCacheDir"><b><code>proxyCacheDir <Path></code></b>
- </a><br />Defines a directory where the cached Coverfiles can be placed. If not defined "/tmp" will be used.</li>
- <li><a name="SONOS_attribut_proxyCacheTime"><b><code>proxyCacheTime <int></code></b>
- </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>
- <li><a name="SONOS_attribut_webname"><b><code>webname <String></code></b>
- </a><br /> With the attribute you can define the used webname for coverlinks. Defaults to 'fhem' if not given.</li>
- </ul></li>
- <li><b>Speak Configuration</b><ul>
- <li><a name="SONOS_attribut_targetSpeakDir"><b><code>targetSpeakDir <string></code></b>
- </a><br /> Defines, which Directory has to be used for the Speakfiles</li>
- <li><a name="SONOS_attribut_targetSpeakMP3FileConverter"><b><code>targetSpeakMP3FileConverter <string></code></b>
- </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>
- <li><a name="SONOS_attribut_targetSpeakMP3FileDir"><b><code>targetSpeakMP3FileDir <string></code></b>
- </a><br /> The directory which should be used as a default for text-embedded MP3-Files.</li>
- <li><a name="SONOS_attribut_targetSpeakURL"><b><code>targetSpeakURL <string></code></b>
- </a><br /> Defines, which URL has to be used for accessing former stored Speakfiles as seen from the SonosPlayer</li>
- <li><a name="SONOS_attribut_targetSpeakFileTimestamp"><b><code>targetSpeakFileTimestamp <int></code></b>
- </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>
- <li><a name="SONOS_attribut_targetSpeakFileHashCache"><b><code>targetSpeakFileHashCache <int></code></b>
- </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>
- <li><a name="SONOS_attribut_Speak1"><b><code>Speak1 <Fileextension>:<Commandline></code></b>
- </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>
- <li><a name="SONOS_attribut_Speak2"><b><code>Speak2 <Fileextension>:<Commandline></code></b>
- </a><br />See Speak1</li>
- <li><a name="SONOS_attribut_Speak3"><b><code>Speak3 <Fileextension>:<Commandline></code></b>
- </a><br />See Speak1</li>
- <li><a name="SONOS_attribut_Speak4"><b><code>Speak4 <Fileextension>:<Commandline></code></b>
- </a><br />See Speak1</li>
- <li><a name="SONOS_attribut_SpeakCover"><b><code>SpeakCover <Filename></code></b>
- </a><br />Defines a Cover for use by the speak generation process. If not defined the Fhem-logo will be used.</li>
- <li><a name="SONOS_attribut_Speak1Cover"><b><code>Speak1Cover <Filename></code></b>
- </a><br />See SpeakCover</li>
- <li><a name="SONOS_attribut_Speak2Cover"><b><code>Speak2Cover <Filename></code></b>
- </a><br />See SpeakCover</li>
- <li><a name="SONOS_attribut_Speak3Cover"><b><code>Speak3Cover <Filename></code></b>
- </a><br />See SpeakCover</li>
- <li><a name="SONOS_attribut_Speak4Cover"><b><code>Speak4Cover <Filename></code></b>
- </a><br />See SpeakCover</li>
- <li><a name="SONOS_attribut_SpeakGoogleURL"><b><code>SpeakGoogleURL <GoogleURL></code></b>
- </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>
- </ul></li>
- </ul>
- <p><a name="SONOSPLAYER"></a>
- <h3>SONOSPLAYER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SONOSPLAYER'>DE</a>]</div>
- <p>FHEM module to work with a Sonos Zoneplayer</p>
- <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>
- <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>
- <h4>Example</h4>
- <p>
- <code>define Sonos_Wohnzimmer SONOSPLAYER RINCON_000EFEFEFEF401400_MR</code>
- </p>
- <a name="SONOSPLAYERdefine"></a>
- <h4>Define</h4>
- <b><code>define <name> SONOSPLAYER <udn></code></b>
- <p>
- <b><code><udn></code></b><br /> MAC-Address based identifier of the zoneplayer</p>
- <a name="SONOSPLAYERset"></a>
- <h4>Set</h4>
- <ul>
- <li><b>Common Tasks</b><ul>
- <li><a name="SONOSPLAYER_setter_Alarm">
- <b><code>Alarm (Create|Update|Delete|Enable|Disable) <ID[,ID]|All> <Datahash></code></b></a>
- <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 => 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 => 1, Volume => 35, StartTime => '00:00:00', Duration => '00:15:00', Repeat => 0, Shuffle => 0, ProgramURI => 'x-rincon-buzzer:0', ProgramMetaData => '', Recurrence_Once => 0, Recurrence_Monday => 1, Recurrence_Tuesday => 1, Recurrence_Wednesday => 1, Recurrence_Thursday => 1, Recurrence_Friday => 1, Recurrence_Saturday => 0, Recurrence_Sunday => 0, IncludeLinkedZones => 0 }</li><li>set Sonos_Wohnzimmer Alarm Update 17 { Shuffle => 1 }</li><li>set Sonos_Wohnzimmer Alarm Delete 17 {}</li></ul></li>
- <li><a name="SONOSPLAYER_setter_AudioDelay">
- <b><code>AudioDelay <Level></code></b></a>
- <br /> Sets the audiodelay of the player to the given value. The value can range from 0 to 5.</li>
- <li><a name="SONOSPLAYER_setter_AudioDelayLeftRear">
- <b><code>AudioDelayLeftRear <Level></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_AudioDelayRightRear">
- <b><code>AudioDelayRightRear <Level></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_ButtonLockState">
- <b><code>ButtonLockState <int></code></b></a>
- <br />One of (0, 1) Sets the current state of the ButtonLockState.</li>
- <li><a name="SONOSPLAYER_setter_DailyIndexRefreshTime">
- <b><code>DailyIndexRefreshTime <Timestring></code></b></a>
- <br />Sets the current DailyIndexRefreshTime for the whole bunch of Zoneplayers.</li>
- <li><a name="SONOSPLAYER_setter_DialogLevel">
- <b><code>DialogLevel <State></code></b></a>
- <br /> Sets the dialoglevel for playbar-systems.</li>
- <li><a name="SONOSPLAYER_setter_ExportSonosBibliothek">
- <b><code>ExportSonosBibliothek <filename></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_Name">
- <b><code>Name <Zonename></code></b></a>
- <br />Sets the Name for this Zone</li>
- <li><a name="SONOSPLAYER_setter_NightMode">
- <b><code>NightMode <State></code></b></a>
- <br /> Sets the nightmode for playbar-systems.</li>
- <li><a name="SONOSPLAYER_setter_OutputFixed">
- <b><code>OutputFixed <State></code></b></a>
- <br /> Sets the outputfixed-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_Reboot">
- <b><code>Reboot</code></b></a>
- <br />Initiates a reboot on the Zoneplayer.</li>
- <li><a name="SONOSPLAYER_setter_ResetAttributesToDefault">
- <b><code>ResetAttributesToDefault <DeleteAllOtherAttributes></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_RoomIcon">
- <b><code>RoomIcon <Iconname></code></b></a>
- <br />Sets the Icon for this Zone</li>
- <li><a name="SONOSPLAYER_setter_SnoozeAlarm">
- <b><code>SnoozeAlarm <Timestring|Seconds></code></b></a>
- <br />Snoozes a currently playing alarm for the given time</li>
- <li><a name="SONOSPLAYER_setter_SubEnable">
- <b><code>SubEnable <State></code></b></a>
- <br /> Sets the substate for sub-systems.</li>
- <li><a name="SONOSPLAYER_setter_SubGain">
- <b><code>SubGain <Level></code></b></a>
- <br /> Sets the sub-gain for sub-systems. The value can range from -15 to 15.</li>
- <li><a name="SONOSPLAYER_setter_SubPolarity">
- <b><code>SubPolarity <Level></code></b></a>
- <br /> Sets the sub-polarity for sub-systems. The value can range from 0 to 2.</li>
- <li><a name="SONOSPLAYER_setter_SurroundEnable">
- <b><code>SurroundEnable <State></code></b></a>
- <br /> Sets the surround-state for surround-systems (like playbars).</li>
- <li><a name="SONOSPLAYER_setter_SurroundLevel">
- <b><code>SurroundLevel <Level></code></b></a>
- <br /> Sets the surround-level for surround-systems (like playbars). The value can range from -15 to 15.</li>
- <li><a name="SONOSPLAYER_setter_TruePlay">
- <b><code>TruePlay <State></code></b></a>
- <br />Sets the TruePlay-State of the given player.</li>
- <li><a name="SONOSPLAYER_setter_Wifi">
- <b><code>Wifi <State></code></b></a>
- <br />Sets the WiFi-State of the given Player. Can be 'off', 'persist-off' or 'on'.</li>
- </ul></li>
- <li><b>Playing Control-Commands</b><ul>
- <li><a name="SONOSPLAYER_setter_CurrentTrackPosition">
- <b><code>CurrentTrackPosition <TimePosition></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_Pause">
- <b><code>Pause</code></b></a>
- <br /> Pause the playing</li>
- <li><a name="SONOSPLAYER_setter_Previous">
- <b><code>Previous</code></b></a>
- <br /> Jumps to the beginning of the previous title.</li>
- <li><a name="SONOSPLAYER_setter_Play">
- <b><code>Play</code></b></a>
- <br /> Starts playing</li>
- <li><a name="SONOSPLAYER_setter_PlayURI">
- <b><code>PlayURI <songURI> [Volume]</code></b></a>
- <br />Plays the given MP3-File with the optional given volume.</li>
- <li><a name="SONOSPLAYER_setter_PlayURITemp">
- <b><code>PlayURITemp <songURI> [Volume]</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_Next">
- <b><code>Next</code></b></a>
- <br /> Jumps to the beginning of the next title</li>
- <li><a name="SONOSPLAYER_setter_Speak">
- <b><code>Speak <Volume> <Language> <Text></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_StartFavourite">
- <b><code>StartFavourite <Favouritename> [NoStart]</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_StartPlaylist">
- <b><code>StartPlaylist <Playlistname> [EmptyQueueBeforeImport]</code></b></a>
- <br /> Loads the given Playlist and starts playing immediately. For all Options have a look at "LoadPlaylist".</li>
- <li><a name="SONOSPLAYER_setter_StartRadio">
- <b><code>StartRadio <Radiostationname></code></b></a>
- <br /> Loads the named radiostation (favorite) and starts playing immediately. For all Options have a look at "LoadRadio".</li>
- <li><a name="SONOSPLAYER_setter_StartSearchlist">
- <b><code>StartSearchlist <Categoryname> <CategoryElement> [[TitlefilterRegEx]/[AlbumfilterRegEx]/[ArtistfilterRegEx] [maxElem]]</code></b></a>
- <br /> Loads the searchlist and starts playing immediately. For all Options have a look at "LoadSearchlist".</li>
- <li><a name="SONOSPLAYER_setter_Stop">
- <b><code>Stop</code></b></a>
- <br /> Stops the playing</li>
- <li><a name="SONOSPLAYER_setter_Track">
- <b><code>Track <TrackNumber|Random></code></b></a>
- <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>
- </ul></li>
- <li><b>Playing Settings</b><ul>
- <li><a name="SONOSPLAYER_setter_Balance">
- <b><code>Balance <BalanceValue></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_Bass">
- <b><code>Bass <BassValue></code></b></a>
- <br /> Sets the bass to the given value. The value can range from -10 to 10. Retrieves the new bassvalue as the result.</li>
- <li><a name="SONOSPLAYER_setter_CrossfadeMode">
- <b><code>CrossfadeMode <State></code></b></a>
- <br /> Sets the crossfade-mode. Retrieves the new mode as the result.</li>
- <li><a name="SONOSPLAYER_setter_LEDState">
- <b><code>LEDState <State></code></b></a>
- <br /> Sets the LED state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_Loudness">
- <b><code>Loudness <State></code></b></a>
- <br /> Sets the loudness-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_Mute">
- <b><code>Mute <State></code></b></a>
- <br /> Sets the mute-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_MuteT">
- <b><code>MuteT</code></b></a>
- <br /> Toggles the mute state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_Repeat">
- <b><code>Repeat <State></code></b></a>
- <br /> Sets the repeat-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_RepeatOne">
- <b><code>RepeatOne <State></code></b></a>
- <br /> Sets the repeatOne-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_RepeatOneT">
- <b><code>RepeatOneT</code></b></a>
- <br /> Toggles the repeatOne-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_RepeatT">
- <b><code>RepeatT</code></b></a>
- <br /> Toggles the repeat-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_Shuffle">
- <b><code>Shuffle <State></code></b></a>
- <br /> Sets the shuffle-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_ShuffleT">
- <b><code>ShuffleT</code></b></a>
- <br /> Toggles the shuffle-state. Retrieves the new state as the result.</li>
- <li><a name="SONOSPLAYER_setter_SleepTimer">
- <b><code>SleepTimer <Timestring|Seconds></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_Treble">
- <b><code>Treble <TrebleValue></code></b></a>
- <br /> Sets the treble to the given value. The value can range from -10 to 10. Retrieves the new treblevalue as the result.</li>
- <li><a name="SONOSPLAYER_setter_Volume">
- <b><code>Volume <VolumeLevel> [RampType]</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_VolumeD">
- <b><code>VolumeD</code></b></a>
- <br /> Turns the volume by volumeStep-ticks down.</li>
- <li><a name="SONOSPLAYER_setter_VolumeRestore">
- <b><code>VolumeRestore</code></b></a>
- <br /> Restores the volume of a formerly saved volume.</li>
- <li><a name="SONOSPLAYER_setter_VolumeSave">
- <b><code>VolumeSave <VolumeLevel></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_VolumeU">
- <b><code>VolumeU</code></b></a>
- <br /> Turns the volume by volumeStep-ticks up.</li>
- </ul></li>
- <li><b>Control the current Playlist</b><ul>
- <li><a name="SONOSPLAYER_setter_AddURIToQueue">
- <b><code>AddURIToQueue <songURI></code></b></a>
- <br />Adds the given MP3-File at the current position into the queue.</li>
- <li><a name="SONOSPLAYER_setter_CurrentPlaylist">
- <b><code>CurrentPlaylist</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_DeleteFromQueue">
- <b><code>DeleteFromQueue <index_of_elems></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_DeletePlaylist">
- <b><code>DeletePlaylist</code></b></a>
- <br /> Deletes the Sonos-Playlist with the given name. According to the possibilities of the playlistname have a close look at LoadPlaylist.</li>
- <li><a name="SONOSPLAYER_setter_EmptyPlaylist">
- <b><code>EmptyPlaylist</code></b></a>
- <br /> Clears the current queue</li>
- <li><a name="SONOSPLAYER_setter_LoadFavourite">
- <b><code>LoadFavourite <Favouritename></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_LoadPlaylist">
- <b><code>LoadPlaylist <Playlistname|Fhem-Devicename> [EmptyQueueBeforeImport]</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_LoadRadio">
- <b><code>LoadRadio <Radiostationname></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_LoadSearchlist">
- <b><code>LoadSearchlist <Categoryname> <CategoryElement> [[TitlefilterRegEx]/[AlbumfilterRegEx]/[ArtistfilterRegEx] [[*]maxElem[+|-]]]</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_SavePlaylist">
- <b><code>SavePlaylist <Playlistname></code></b></a>
- <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>
- </ul></li>
- <li><b>Groupcontrol</b><ul>
- <li><a name="SONOSPLAYER_setter_AddMember">
- <b><code>AddMember <devicename></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_CreateStereoPair">
- <b><code>CreateStereoPair <rightPlayerDevicename></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_GroupMute">
- <b><code>GroupMute <State></code></b></a>
- <br />Sets the mute state of the complete group in one step. The value can be on or off.</li>
- <li><a name="SONOSPLAYER_setter_GroupVolume">
- <b><code>GroupVolume <VolumeLevel></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_GroupVolumeD">
- <b><code>GroupVolumeD</code></b></a>
- <br /> Turns the group volume by volumeStep-ticks down.</li>
- <li><a name="SONOSPLAYER_setter_GroupVolumeU">
- <b><code>GroupVolumeU</code></b></a>
- <br /> Turns the group volume by volumeStep-ticks up.</li>
- <li><a name="SONOSPLAYER_setter_MakeStandaloneGroup">
- <b><code>MakeStandaloneGroup</code></b></a>
- <br />Makes this Player a standalone group.</li>
- <li><a name="SONOSPLAYER_setter_RemoveMember">
- <b><code>RemoveMember <devicename></code></b></a>
- <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>
- <li><a name="SONOSPLAYER_setter_SeparateStereoPair">
- <b><code>SeparateStereoPair</code></b></a>
- <br />Divides the stereo-pair into two independant devices.</li>
- <li><a name="SONOSPLAYER_setter_SnapshotGroupVolume">
- <b><code>SnapshotGroupVolume</code></b></a>
- <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>
- </ul></li>
- </ul>
- <a name="SONOSPLAYERget"></a>
- <h4>Get</h4>
- <ul>
- <li><b>Common</b><ul>
- <li><a name="SONOSPLAYER_getter_Alarm">
- <b><code>Alarm <ID></code></b></a>
- <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(<Devicename>, 'Alarmlist', ()))->{<ID>};</code>.</li>
- <li><a name="SONOSPLAYER_getter_EthernetPortStatus">
- <b><code>EthernetPortStatus <PortNumber></code></b></a>
- <br /> Gets the Ethernet-Portstatus of the given Port. Can be 'Active' or 'Inactive'.</li>
- <li><a name="SONOSPLAYER_getter_PossibleRoomIcons">
- <b><code>PossibleRoomIcons</code></b></a>
- <br /> Retreives a list of all possible Roomiconnames for the use with "set RoomIcon".</li>
- <li><a name="SONOSPLAYER_getter_SupportLinks">
- <b><code>SupportLinks</code></b></a>
- <br /> Shows a list with direct links to the player-support-sites.</li>
- <li><a name="SONOSPLAYER_getter_WifiPortStatus">
- <b><code>WifiPortStatus</code></b></a>
- <br /> Gets the Wifi-Portstatus. Can be 'Active' or 'Inactive'.</li>
- </ul></li>
- <li><b>Lists</b><ul>
- <li><a name="SONOSPLAYER_getter_Favourites">
- <b><code>Favourites</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_FavouritesWithCovers">
- <b><code>FavouritesWithCovers</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_Playlists">
- <b><code>Playlists</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_PlaylistsWithCovers">
- <b><code>PlaylistsWithCovers</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_Queue">
- <b><code>Queue</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_QueueWithCovers">
- <b><code>QueueWithCovers</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_Radios">
- <b><code>Radios</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_RadiosWithCovers">
- <b><code>RadiosWithCovers</code></b></a>
- <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>
- <li><a name="SONOSPLAYER_getter_SearchlistCategories">
- <b><code>SearchlistCategories</code></b></a>
- <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>
- </ul></li>
- <li><b>Informations on the current Title</b><ul>
- <li><a name="SONOSPLAYER_getter_CurrentTrackPosition">
- <b><code>CurrentTrackPosition</code></b></a>
- <br /> Retrieves the current timeposition inside a title</li>
- </ul></li>
- </ul>
- <a name="SONOSPLAYERattr"></a>
- <h4>Attributes</h4>
- '''Attention'''<br />The attributes can only be used after a restart of fhem, because it must be initially transfered to the subprocess.
- <ul>
- <li><b>Common</b><ul>
- <li><a name="SONOSPLAYER_attribut_disable"><b><code>disable <int></code></b>
- </a><br /> One of (0,1). Disables the event-worker for this Sonosplayer.</li>
- <li><a name="SONOSPLAYER_attribut_generateSomethingChangedEvent"><b><code>generateSomethingChangedEvent <int></code></b>
- </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>
- <li><a name="SONOSPLAYER_attribut_generateVolumeEvent"><b><code>generateVolumeEvent <int></code></b>
- </a><br /> One of (0,1). Enables an event generated at volumechanges if minVolume or maxVolume is set.</li>
- <li><a name="SONOSPLAYER_attribut_generateVolumeSlider"><b><code>generateVolumeSlider <int></code></b>
- </a><br /> One of (0,1). Enables a slider for volumecontrol in detail view.</li>
- <li><a name="SONOSPLAYER_attribut_getAlarms"><b><code>getAlarms <int></code></b>
- </a><br /> One of (0..1). Initializes a callback-method for Alarms. This included the information of the DailyIndexRefreshTime.</li>
- <li><a name="SONOSPLAYER_attribut_suppressControlButtons"><b><code>suppressControlButtons <int></code></b>
- </a><br /> One of (0,1). Enables the control-section shown under the Cover-/Titleview.</li>
- <li><a name="SONOSPLAYER_attribut_volumeStep"><b><code>volumeStep <int></code></b>
- </a><br /> One of (0..100). Defines the stepwidth for subsequent calls of <code>VolumeU</code> and <code>VolumeD</code>.</li>
- </ul></li>
- <li><b>Information Generation</b><ul>
- <li><a name="SONOSPLAYER_attribut_generateInfoSummarize1"><b><code>generateInfoSummarize1 <string></code></b>
- </a><br /> Generates the reading 'InfoSummarize1' with the given format. More Information on this in the examples-section.</li>
- <li><a name="SONOSPLAYER_attribut_generateInfoSummarize2"><b><code>generateInfoSummarize2 <string></code></b>
- </a><br /> Generates the reading 'InfoSummarize2' with the given format. More Information on this in the examples-section.</li>
- <li><a name="SONOSPLAYER_attribut_generateInfoSummarize3"><b><code>generateInfoSummarize3 <string></code></b>
- </a><br /> Generates the reading 'InfoSummarize3' with the given format. More Information on this in the examples-section.</li>
- <li><a name="SONOSPLAYER_attribut_generateInfoSummarize4"><b><code>generateInfoSummarize4 <string></code></b>
- </a><br /> Generates the reading 'InfoSummarize4' with the given format. More Information on this in the examples-section.</li>
- <li><a name="SONOSPLAYER_attribut_getTitleInfoFromMaster"><b><code>getTitleInfoFromMaster <int></code></b>
- </a><br /> One of (0, 1). Gets the current Playing-Informations from the Masterplayer (if one is present).</li>
- <li><a name="SONOSPLAYER_attribut_simulateCurrentTrackPosition"><b><code>simulateCurrentTrackPosition <int></code></b>
- </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>
- <li><a name="SONOSPLAYER_attribut_simulateCurrentTrackPositionPercentFormat"><b><code>simulateCurrentTrackPositionPercentFormat <Format></code></b>
- </a><br /> Defines the format of the percentformat in the Reading <code>currentTrackPositionSimulatedPercent</code>.</li>
- <li><a name="SONOSPLAYER_attribut_stateVariable"><b><code>stateVariable <string></code></b>
- </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>
- </ul></li>
- <li><b>Controloptions</b><ul>
- <li><a name="SONOSPLAYER_attribut_maxVolume"><b><code>maxVolume <int></code></b>
- </a><br /> One of (0..100). Define a maximal volume for this Zoneplayer</li>
- <li><a name="SONOSPLAYER_attribut_minVolume"><b><code>minVolume <int></code></b>
- </a><br /> One of (0..100). Define a minimal volume for this Zoneplayer</li>
- <li><a name="SONOSPLAYER_attribut_maxVolumeHeadphone"><b><code>maxVolumeHeadphone <int></code></b>
- </a><br /> One of (0..100). Define a maximal volume for this Zoneplayer for use with headphones</li>
- <li><a name="SONOSPLAYER_attribut_minVolumeHeadphone"><b><code>minVolumeHeadphone <int></code></b>
- </a><br /> One of (0..100). Define a minimal volume for this Zoneplayer for use with headphones</li>
- <li><a name="SONOSPLAYER_attribut_buttonEvents"><b><code>buttonEvents <Time:Pattern>[ <Time:Pattern> ...]</code></b>
- </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 />
- 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 />
- The event thrown is named <code>ButtonEvent</code>, the value is the defined button-sequence.<br />
- E.G.: <code>2:MM</code><br />
- 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>
- </ul></li>
- <li><a name="SONOSPLAYER_attribut_saveSleeptimerInAction"><b><code>saveSleeptimerInAction <int></code></b>
- </a><br /> One of (0..1). If set, a possibly set Attribute "stopSleeptimerInAction" will be ignored.</li>
- <li><a name="SONOSPLAYER_attribut_stopSleeptimerInAction"><b><code>stopSleeptimerInAction <int></code></b>
- </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>
- </ul>
- <a name="SONOSPLAYERexamples"></a>
- <h4>Examples / Tips</h4>
- <ul>
- <li><a name="SONOSPLAYER_examples_InfoSummarize">Format of InfoSummarize:</a><br />
- <code>infoSummarizeX := <NormalAudio>:summarizeElem:</NormalAudio> <StreamAudio>:summarizeElem:</StreamAudio>|:summarizeElem:</code><br />
- <code>:summarizeElem: := <:variable:[ prefix=":text:"][ suffix=":text:"][ instead=":text:"][ ifempty=":text:"]/[ emptyVal=":text:"]></code><br />
- <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 />
- <code>:text: := [Any text without double-quotes]</code><br /></li>
- </ul>
- <p><a name="SSCam"></a>
- <h3>SSCam</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SSCam'>DE</a>]</div>
- <ul>
- Using this Module you are able to operate cameras which are defined in Synology Surveillance Station (SVS) and execute
- functions of the SVS. It is based on the SVS API and supports the SVS version 7 and above.<br>
-
- At present the following functions are available: <br><br>
- <ul>
- <ul>
- <li>Start a Recording</li>
- <li>Stop a Recording (using command or automatically after the <RecordTime> period</li>
- <li>Trigger a Snapshot </li>
- <li>Deaktivate a Camera in Synology Surveillance Station</li>
- <li>Activate a Camera in Synology Surveillance Station</li>
- <li>Control of the exposure modes day, night and automatic </li>
- <li>switchover the motion detection by camera, by SVS or to deactivate </li>
- <li>control of motion detection parameters sensitivity, threshold, object size and percentage for release </li>
- <li>Retrieval of Camera Properties (also by Polling) as well as informations about the installed SVS-package</li>
- <li>Move to a predefined Preset-position (at PTZ-cameras) </li>
- <li>Start a predefined Patrol (at PTZ-cameras) </li>
- <li>Positioning of PTZ-cameras to absolute X/Y-coordinates </li>
- <li>continuous moving of PTZ-camera lense </li>
- <li>trigger of external events 1-10 (action rules in SVS) </li>
- <li>start and stop of camera livestreams, show the last recording and snapshot embedded </li>
- <li>fetch of livestream-Url's with key (login not needed in that case) </li>
- <li>playback of last recording and playback the last snapshot </li>
- <li>switch the Surveillance Station HomeMode on/off and retrieve the HomeModeState </li>
- <li>show the stored credentials of a device </li>
- <li>fetch the Surveillance Station Logs, exploit the newest entry as reading </li>
- <li>create a gallery of the last 1-10 snapshots (as a Popup or permanent weblink-Device) </li><br>
- </ul>
- </ul>
- 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>
- For example the recordings are stored for a defined time in Surveillance Station and will be deleted after that period.<br><br>
-
- If you like to discuss or help to improve this module please use FHEM-Forum with link: <br>
- <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>
-
- <b> Prerequisites </b> <br><br>
- This module uses the Perl-module JSON. <br>
- On Debian-Linux based systems this module can be installed by: <br><br>
-
- <code>sudo apt-get install libjson-perl</code> <br><br>
-
- SSCam is completely using the nonblocking functions of HttpUtils respectively HttpUtils_NonblockingGet. <br>
- 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>
- Further informations could be find among <a href="#SSCam_Credentials">Credentials</a>. <br><br>
-
- Overview which Perl-modules SSCam is using: <br><br>
-
- JSON <br>
- Data::Dumper <br>
- MIME::Base64 <br>
- Time::HiRes <br>
- HttpUtils (FHEM-module) <br><br>
-
- <a name="SSCamdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- There is a distinction between the definition of a camera-device and the definition of a Surveillance Station (SVS)
- device. Dependend on the kind of the defined device the internal MODEL will be set to CAM or SVS and a proper
- subset of the described set/get-commands are assigned to the device. <br>
- The scope of application of set/get-commands is denoted to every particular command (valid for CAM, SVS, CAM/SVS).
- <br><br>
-
- A camera-device will be defined by: <br><br>
-
- <code>define <name> SSCAM <camera name in SVS> <ServerAddr> [Port] </code> <br><br>
-
- At first the devices have to be set up and has to be operable in Synology Surveillance Station 7.0 and above. <br><br>
-
- A SVS-device to control functions of the Surveillance Station (SVS) will be defined by: <br><br>
-
- <code>define <name> SSCAM SVS <ServerAddr> [Port] </code> <br><br>
-
- In that case the term <camera name in SVS> become replaced by <b>SVS</b> only. <br><br>
-
- The Modul SSCam ist based on functions of Synology Surveillance Station API. <br>
-
- Currently the HTTP-protocol is supported to call Synology Disk Station. <br><br>
- The parameters are in detail:
- <br>
- <br>
-
- <table>
- <colgroup> <col width=15%> <col width=85%> </colgroup>
- <tr><td>name: </td><td>the name of the new device to use in FHEM</td></tr>
- <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>
- <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>
- <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>
- </table>
- <br><br>
- <b>Example:</b>
- <pre>
- <code>define CamCP SSCAM Carport 192.168.2.20 [5000]</code>
- creates a new camera device CamCP
- <code>define DS1 SSCAM SVS 192.168.2.20 [5000]</code>
- creares a new SVS device DS1
- </pre>
-
- When a new Camera is defined, as a start the recordingtime of 15 seconds will be assigned to the device.<br>
- Using the <a href="#SSCamattr">attribute</a> "rectime" you can adapt the recordingtime for every camera individually.<br>
- The value of "0" for rectime will lead to an endless recording which has to be stopped by a "set <name> off" command.<br>
- Due to a Log-Entry with a hint to that circumstance will be written. <br><br>
-
- If the <a href="#SSCamattr">attribute</a> "rectime" would be deleted again, the default-value for recording-time (15s) become active.<br><br>
- With <a href="#SSCamset">command</a> <b>"set <name> on [rectime]"</b> a temporary recordingtime is determinded which would overwrite the dafault-value of recordingtime <br>
- and the attribute "rectime" (if it is set) uniquely. <br><br>
- In that case the command <b>"set <name> on 0"</b> leads also to an endless recording as well.<br><br>
-
- If you have specified a pre-recording time in SVS it will be considered too. <br><br><br>
-
-
- <a name="SSCam_Credentials"></a>
- <b>Credentials </b><br><br>
-
- After a camera-device is defined, firstly it is needed to save the credentials. This will be done with command:
-
- <pre>
- set <name> credentials <username> <password>
- </pre>
-
- The password length has a maximum of 20 characters. <br>
- The operator can, dependend on what functions are planned to execute, create an user in DSM respectively in Synology Surveillance Station as well. <br>
- 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>
- The required minimum rights to execute functions are listed in a table further down. <br>
-
- 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>
- whereat the access to particular cameras can be restricted by the privilege profile (please see help function in SVS for details). <br>
- As best practice it is proposed to create an user in DSM as well as in SVS too: <br><br>
-
- <ul>
- <li>DSM-User as member of admin group: unrestricted test of all module functions -> session: DSM </li>
- <li>SVS-User as Manager or observer: adjusted privilege profile -> session: SurveillanceStation </li>
- </ul>
- <br>
-
- Using the <a href="#SSCamattr">Attribute</a> "session" can be selected, if the session should be established to DSM or the SVS instead. <br>
- 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>
-
- 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>
- 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>
-
- The following list shows the minimum rights what the particular module function needs. <br><br>
- <ul>
- <table>
- <colgroup> <col width=20%> <col width=80%> </colgroup>
- <tr><td><li>set ... on </td><td> session: ServeillanceStation - observer with enhanced privilege "manual recording" </li></td></tr>
- <tr><td><li>set ... off </td><td> session: ServeillanceStation - observer with enhanced privilege "manual recording" </li></td></tr>
- <tr><td><li>set ... snap </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>set ... disable </td><td> session: ServeillanceStation - manager </li></td></tr>
- <tr><td><li>set ... enable </td><td> session: ServeillanceStation - manager </li></td></tr>
- <tr><td><li>set ... expmode </td><td> session: ServeillanceStation - manager </li></td></tr>
- <tr><td><li>set ... extevent </td><td> session: DSM - user as member of admin-group </li></td></tr>
- <tr><td><li>set ... goPreset </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
- <tr><td><li>set ... homeMode </td><td> ssession: ServeillanceStation - observer with privilege Home Mode switch </li></td></tr>
- <tr><td><li>set ... motdetsc </td><td> session: ServeillanceStation - manager </li></td></tr>
- <tr><td><li>set ... runPatrol </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
- <tr><td><li>set ... goAbsPTZ </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
- <tr><td><li>set ... move </td><td> session: ServeillanceStation - observer with privilege objective control of camera </li></td></tr>
- <tr><td><li>set ... runView </td><td> session: ServeillanceStation - observer with privilege liveview of camera </li></td></tr>
- <tr><td><li>set ... snapGallery </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>set ... stopView </td><td> - </li></td></tr>
- <tr><td><li>set ... credentials </td><td> - </li></td></tr>
- <tr><td><li>get ... caminfo[all] </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>get ... eventlist </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>get ... listLog </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>get ... scanVirgin </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>get ... svsinfo </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>get ... snapfileinfo </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>get ... snapinfo </td><td> session: ServeillanceStation - observer </li></td></tr>
- <tr><td><li>get ... stmUrlPath </td><td> session: ServeillanceStation - observer </li></td></tr>
- </table>
- </ul>
- <br><br>
-
- <a name="SSCam_HTTPTimeout"></a>
- <b>HTTP-Timeout Settings</b><br><br>
-
- All functions of SSCam use HTTP-calls to SVS Web API. <br>
- 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>
-
- </ul>
- <br><br><br>
-
-
- <a name="SSCamset"></a>
- <b>Set </b>
- <ul>
- <br>
- The specified set-commands are available for CAM/SVS-devices or only valid for CAM-devices or rather for SVS-Devices.
- They can be selected in the drop-down-menu of the particular device. <br><br>
-
- <ul>
- <li><b> set <name> credentials <username> <password> </b> (valid for CAM/SVS)</li> <br>
-
- set username / password combination for access the Synology Surveillance Station.
- See <a href="#SSCam_Credentials">Credentials</a><br> for further informations.
-
- <br><br>
- </ul>
-
- <ul>
- <li><b> set <name> createSnapGallery </b> (valid for CAM)</li> <br>
-
- A snapshot gallery will be created as a permanent (weblink)Device. The device will be provided in room "SnapGallery".
- With the "snapGallery..."-<a href="#SSCamattr">attributes</a> respectively the weblink-device specific attributes (which was created)
- you are able to manipulate the properties of the new snapshot gallery device. <br>
- <br><br>
- </ul>
-
- <ul>
- <li><b> set <name> [enable|disable] </b> (valid for CAM)</li> <br>
-
- For <b>deactivating / activating</b> a list of cameras or all cameras by Regex-expression, subsequent two
- examples using "at":
- <pre>
- define a13 at 21:46 set CamCP1,CamFL,CamHE1,CamTER disable (enable)
- define a14 at 21:46 set Cam.* disable (enable)
- </pre>
-
- A bit more convenient is it to use a dummy-device for enable/disable all available cameras in Surveillance Station.<br>
- At first the Dummy will be created.
- <pre>
- define allcams dummy
- attr allcams eventMap on:enable off:disable
- attr allcams room Cams
- attr allcams webCmd enable:disable
- </pre>
-
- 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".
- <pre>
- define all_cams_disable notify allcams:.*off set CamCP1,CamFL,CamHE1,CamTER disable
- attr all_cams_disable room Cams
- define all_cams_enable notify allcams:on set CamCP1,CamFL,CamHE1,CamTER enable
- attr all_cams_enable room Cams
- </pre>
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> expmode [day|night|auto] </b> (valid for CAM)</li> <br>
-
- With this command you are able to control the exposure mode and can set it to day, night or automatic mode.
- Thereby, for example, the behavior of camera LED's will be suitable controlled.
- The successful switch will be reported by the reading CamExposureMode (command "get ... caminfoall"). <br><br>
-
- <b> Note: </b><br>
- The successfully execution of this function depends on if SVS supports that functionality of the connected camera.
- Is the field for the Day/Night-mode shown greyed in SVS -> IP-camera -> optimization -> exposure mode, this function will be probably unsupported.
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> extevent [ 1-10 ] </b> (valid for SVS)</li> <br>
-
- This command triggers an external event (1-10) in SVS.
- 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.
- 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.
- Further informations can be found in the online help of the actionrule editor.
- The used user needs to be a member of the admin-group and DSM-session is needed too.
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> goAbsPTZ [ X Y | up | down | left | right ] </b> (valid for CAM)</li> <br>
-
- 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.
- The option is only available for cameras which are having the Reading "CapPTZAbs=true". The property of a camera can be requested with "get <name> caminfoall" .
- <br><br>
- Example for a control to absolute X/Y-coordinates: <br>
- <pre>
- set <name> goAbsPTZ 120 450
- </pre>
-
- In this example the camera lense moves to position X=120 und Y=450. <br>
- The valuation is:
- <pre>
- X = 0 - 640 (0 - 319 moves lense left, 321 - 640 moves lense right, 320 don't move lense)
- Y = 0 - 480 (0 - 239 moves lense down, 241 - 480 moves lense up, 240 don't move lense)
- </pre>
- The lense can be moved in smallest steps to very large steps into the desired direction.
- If necessary the procedure has to be repeated to bring the lense into the desired position. <br><br>
- If the motion should be done with the largest possible increment the following command can be used for simplification:
- <pre>
- set <name> goAbsPTZ up [down|left|right]
- </pre>
- In this case the lense will be moved with largest possible increment into the given absolute position.
- Also in this case the procedure has to be repeated to bring the lense into the desired position if necessary.
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> goPreset <Preset> </b> (valid for CAM)</li> <br>
-
- Using this command you can move PTZ-cameras to a predefined position. <br>
- 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.
- The Presets will be read ito FHEM with command "get <name> caminfoall" (happens automatically when FHEM restarts). The import process can be repeated regular by camera polling.
- 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.
- <br><br>
-
- Here it is an example of a PTZ-control depended on IR-motiondetector event:
-
- <pre>
- 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
- </pre>
-
- Operating Mode: <br>
-
- 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.
- 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>
- When the recording starts 3 snapshots with an interval of 5 seconds will be taken as well. <br>
- After a time of 30 seconds in position "Wandschrank" the camera moves back to postion "Home". <br><br>
-
- An extract of the log illustrates the process:
-
- <pre>
- 2016.02.04 15:02:14 2: CamFL - Camera Flur_Vorderhaus has moved to position "Wandschrank"
- 2016.02.04 15:02:24 2: CamFL - Camera Flur_Vorderhaus Recording with Recordtime 5s started
- 2016.02.04 15:02:29 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
- 2016.02.04 15:02:30 2: CamFL - Camera Flur_Vorderhaus Recording stopped
- 2016.02.04 15:02:34 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
- 2016.02.04 15:02:39 2: CamFL - Snapshot of Camera Flur_Vorderhaus has been done successfully
- 2016.02.04 15:02:44 2: CamFL - Camera Flur_Vorderhaus has moved to position "Home"
- </pre>
- </ul>
- <br><br>
- <ul>
- <li><b> set <name> homeMode [on|off] </b> (valid for SVS)</li> <br>
-
- Switch the HomeMode of the Surveillance Station on or off.
- 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>.
- <br><br>
- </ul>
-
- <ul>
- <li><b> set <name> motdetsc [camera|SVS|disable] </b> (valid for CAM)</li> <br>
-
- The command "motdetsc" (stands for "motion detection source") switchover the motion detection to the desired mode.
- If motion detection will be done by camera / SVS without any parameters, the original camera motion detection settings are kept.
- The successful execution of that opreration one can retrace by the state in SVS -> IP-camera -> event detection -> motion. <br><br>
-
- For the motion detection further parameter can be specified. The available options for motion detection by SVS are "sensitivity" and "threshold". <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=50%> <col width=50%> </colgroup>
- <tr><td>set <name> motdetsc SVS [sensitivity] [threshold] </td><td># command pattern </td></tr>
- <tr><td>set <name> motdetsc SVS 91 30 </td><td># set the sensitivity to 91 and threshold to 30 </td></tr>
- <tr><td>set <name> motdetsc SVS 0 40 </td><td># keep the old value of sensitivity, set threshold to 40 </td></tr>
- <tr><td>set <name> motdetsc SVS 15 </td><td># set the sensitivity to 15, threshold keep unchanged </td></tr>
- </table>
- </ul>
- <br><br>
-
- If the motion detection is used by camera, there are the options "sensitivity", "object size", "percentage for release" available. <br><br>
-
- <ul>
- <table>
- <colgroup> <col width=50%> <col width=50%> </colgroup>
- <tr><td>set <name> motdetsc camera [sensitivity] [threshold] [percentage] </td><td># command pattern </td></tr>
- <tr><td>set <name> motdetsc camera 89 0 20 </td><td># set the sensitivity to 89, percentage to 20 </td></tr>
- <tr><td>set <name> motdetsc camera 0 40 10 </td><td># keep old value for sensitivity, set threshold to 40, percentage to 10 </td></tr>
- <tr><td>set <name> motdetsc camera 30 </td><td># set the sensitivity to 30, other values keep unchanged </td></tr>
- </table>
- </ul>
- <br><br>
-
- 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).
- The numerical values are between 1 - 99 (except special case "0"). <br><br>
-
- 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
- SVS -> edit camera -> motion detection. Further informations please read in SVS online help. <br><br>
-
- With the command "get <name> caminfoall" the <a href="#SSCamreadings">Reading</a> "CamMotDetSc" also will be updated which documents the current setup of motion detection.
- 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>
-
- Example:
- <pre>
- CamMotDetSc SVS, sensitivity: 76, threshold: 55
- </pre>
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> move [ right | up | down | left | dir_X ] [Sekunden] </b> (valid for CAM up to SVS version 7.1)</li>
- <b> set <name> move [ right | upright | up | upleft | left | downleft | down | downright ] [Sekunden] </b> (valid for CAM and SVS Version 7.2 and above) <br><br>
-
- 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
- "dir_X". The grain size of graduation depends on properties of the camera and can be identified by the Reading "CapPTZDirections". <br><br>
- The radian measure of 360 degrees will be devided by the value of "CapPTZDirections" and describes the move drections starting with "0=right" counterclockwise.
- 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
- the appropriate directions between. The possible moving directions of cameras with "CapPTZDirections = 32" are correspondingly divided into smaller sections. <br><br>
- In opposite to the "set <name> goAbsPTZ"-command starts "set <name> move" a continuous move until a stop-command will be received.
- 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>
-
- Examples: <br>
-
- <pre>
- set <name> move up 0.5 : moves PTZ 0,5 Sek. (plus processing time) to the top
- set <name> move dir_1 1.5 : moves PTZ 1,5 Sek. (plus processing time) to top-right
- set <name> move dir_20 0.7 : moves PTZ 1,5 Sek. (plus processing time) to left-bottom ("CapPTZDirections = 32)"
- </pre>
- </ul>
- <br><br>
-
- <ul>
- <li><b>set <name> [on|off] </b> (valid for CAM)</li> <br>
-
- The command "set <name> on" starts a recording. The default recording time takes 15 seconds. It can be changed by the <a href="#SSCamattr">attribute</a> "rectime" individualy.
- With the <a href="#SSCamattr">attribute</a> (respectively the default value) provided recording time can be overwritten once by "set <name> on [rectime]".
- The recording will be stopped after processing time "rectime"automatically.<br>
- A special case is the start using "set <name> on 0" respectively the attribute value "rectime = 0". In that case a endless-recording will be started. One have to stop this recording
- by command "set <name> off" explicitely.<br>
- The recording behavior can be impacted with <a href="#SSCamattr">attribute</a> "recextend" furthermore as explained as follows.<br><br>
- <b>Attribute "recextend = 0" or not set (default):</b><br><br>
- <ul>
- <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.
- A hint will be logged in case of verboselevel = 3. </li>
- </ul>
- <br>
- <b>Attribute "recextend = 1" is set:</b><br><br>
- <ul>
- <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
- 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.
- Therefore a running recording will be extended until no start command will be get. </li>
- <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
- don't set the <a href="#SSCamattr">attribute</a> "recextend" in case of endless-recordings. </li>
- </ul>
- <br>
-
- Examples for simple <b>Start/Stop a Recording</b>: <br><br>
- <table>
- <colgroup> <col width=20%> <col width=80%> </colgroup>
- <tr><td>set <name> on [rectime] </td><td>starts a recording of camera <name>, stops automatically after [rectime] (default 15s or defined by <a href="#SSCamattr">attribute</a>) </td></tr>
- <tr><td>set <name> off </td><td>stops the recording of camera <name></td></tr>
- </table>
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> optimizeParams [mirror:<value>] [flip:<value>] [rotate:<value>] [ntp:<value>]</b> (gilt fĂźr CAM)</li> <br>
-
- Set one or several properties of the camera. The video can be mirrored (mirror), turned upside down (flip) or
- rotated (rotate). Specified properties must be supported by the camera type. With "ntp" you can set a time server the camera
- use for time synchronization. <br><br>
-
- <value> can be for: <br>
- <ul>
- <li> <b>mirror, flip, rotate: </b> true | false </li>
- <li> <b>ntp: </b> the name or the IP-address of time server </li>
- </ul>
- <br><br>
-
- <b>Examples:</b> <br>
- <code> set <name> optimizeParams mirror:true flip:true ntp:time.windows.com </code><br>
- # The video will be mirrored, turned upside down and the time server is set to "time.windows.com".<br>
- <code> set <name> optimizeParams ntp:Surveillance%20Station </code><br>
- # The Surveillance Station is set as time server. (NTP-service has to be activated in DSM) <br>
- <code> set <name> optimizeParams mirror:true flip:false rotate:true </code><br>
- # The video will be mirrored and rotated round 90 degrees. <br>
-
- <br><br>
- </ul>
-
- <ul>
- <li><b> set <name> runPatrol <Patrolname> </b> (valid for CAM)</li> <br>
-
- This commans starts a predefined patrol (tour) of a PTZ-camera. <br>
- 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 -> PTZ-control -> patrol.
- The patrol tours will be read with command "get <name> caminfoall" which is be executed automatically when FHEM restarts.
- 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
- if the user change it in the IP-camera setup itself.
- Further informations for creating patrols you can get in the online-help of Surveillance Station.
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> runView [live_fw | live_link | live_open [<room>] | lastrec_fw | lastrec_open [<room>] | lastsnap_fw] </b> (valid for CAM)</li> <br>
-
- With "live_fw, live_link, live_open" a livestream (mjpeg-stream) of a camera will be started, either as embedded image
- or as a generated link. <br>
- The option "live_open" starts a new browser window. If the optional <room> was set, the window will only be
- started if the specified room is currently opend in a browser session. <br><br>
-
- The command <b>"set <name> runView lastsnap_fw"</b> shows the last snapshot of the camera embedded in room- or detailview. <br><br>
-
- Access to the last recording of a camera can be done using "lastrec_fw" respectively "lastrec_open".
- The recording will be opened in iFrame. So there are some control elements available, e.g. to increase/descrease
- reproduce speed. <br>
-
- The kind of windows in FHEMWEB can be affected by HTML-tags in <a href="#SSCamattr">attribute</a> "htmlattr".
- <br><br>
-
- <b>Examples:</b><br>
- <pre>
- attr <name> htmlattr width="500" height="375"
- attr <name> htmlattr width="700",height="525",top="200",left="300"
- </pre>
-
- The command <b>"set <name> runView live_open"</b> starts the stream immediately in a new browser window (longpoll=1
- must be set for WEB).
- A browser window will be initiated to open for every FHEM session which is active. If you want to change this behavior,
- you can use command <b>"set <name> runView live_open <room>"</b>. It initiates open a browser window in that
- FHEM session which has just opend the room <room>.
-
- The settings of <a href="#SSCamattr">attribute</a> "livestreamprefix" overwrites the data for protocol, servername and
- port in <a href="#SSCamreadings">reading</a> "LiveStreamUrl".
- By "livestreamprefix" the LivestreamURL (is shown if <a href="#SSCamattr">attribute</a> "showStmInfoFull" is set) can
- be modified and used for distribution and external access to SVS livestream. <br><br>
-
- <b>Example:</b><br>
- <pre>
- attr <name> livestreamprefix https://<Servername>:<Port>
- </pre>
-
- The livestream can be stopped again by command <b>"set <name> stopView"</b>.
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> snap </b> (valid for CAM)</li> <br>
-
- A snapshot can be triggered with:
- <pre>
- set <name> snap
- </pre>
- Subsequent some Examples for <b>taking snapshots</b>: <br><br>
-
- If a serial of snapshots should be released, it can be done using the following notify command.
- For the example a serial of snapshots are to be triggerd if the recording of a camera starts. <br>
- 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.
- <pre>
- define he1_snap_3 notify CamHE1:Record.*on define h3 at +*{3}00:00:02 set CamHE1 snap
- </pre>
- Release of 2 Snapshots of camera "CamHE1" at intervals of 6 seconds after the motion sensor "MelderHE1" has sent an event, <br>
- can be done e.g. with following notify-command:
- <pre>
- define he1_snap_2 notify MelderHE1:on.* define h2 at +*{2}00:00:06 set CamHE1 snap
- </pre>
- 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>
- </ul>
- <br><br>
-
- <ul>
- <li><b> set <name> snapGallery [1-10] </b> (valid for CAM)</li> <br>
-
- The command is only available if the attribute "snapGalleryBoost=1" is set. <br>
- It creates an output of the last [x] snapshots as well as "get ... snapGallery". But differing from "get" with
- <a href="#SSCamattr">attribute</a> "snapGalleryBoost=1" no popup will be created. The snapshot gallery will be depicted as
- an browserpage instead. All further functions and attributes are appropriate the <a href="#SSCamget">"get <name> snapGallery"</a>
- command. <br>
- If you want create a snapgallery output by triggering, e.g. with an "at" or "notify", you should use the
- <a href="#SSCamget">"get <name> snapGallery"</a> command instead of "set".
- </ul>
- <br><br>
-
- </ul>
- <br>
- <a name="SSCamget"></a>
- <b>Get</b>
- <ul>
- <br>
- With SSCam the properties of SVS and defined Cameras could be retrieved. <br>
- The specified get-commands are available for CAM/SVS-devices or only valid for CAM-devices or rather for SVS-Devices.
- They can be selected in the drop-down-menu of the particular device. <br><br>
- <ul>
- <li><b> get <name> caminfoall </b> (valid for CAM/SVS)</li>
- <b> get <name> caminfo </b> (valid for CAM) <br><br>
-
- Dependend of the type of camera (e.g. Fix- or PTZ-Camera) the available properties are retrieved and provided as Readings.<br>
- For example the Reading "Availability" will be set to "disconnected" if the camera would be disconnected from Synology
- Surveillance Station and can't be used for further processing like creating events. <br>
- "getcaminfo" retrieves a subset of "getcaminfoall".
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> eventlist </b> (valid for CAM)</li> <br>
-
- The <a href="#SSCamreadings">Reading</a> "CamEventNum" and "CamLastRecord" will be refreshed which containes the total number
- of in SVS registered camera events and the path/name of the last recording.
- This command will be implicit executed when "get <name> caminfoall" is running. <br>
- The <a href="#SSCamattr">attribute</a> "videofolderMap" replaces the content of reading "VideoFolder". You can use it for
- example if you have mounted the videofolder of SVS under another name or path and want to access by your local pc.
- </ul>
- <br><br>
- <ul>
- <li><b> get <name> homeModeState </b> (valid for SVS)</li> <br>
-
- HomeMode-state of the Surveillance Station will be retrieved.
- </ul>
- <br><br>
- <ul>
- <li><b> get <name> listLog [severity:<Loglevel>] [limit:<Number of lines>] [match:<Searchstring>] </b> (valid for SVS)</li> <br>
-
- Fetches the Surveillance Station Log from Synology server. Without any further options the whole log will be retrieved. <br>
- You can specify all or any of the following options: <br><br>
-
- <ul>
- <li> <Loglevel> - Information, Warning or Error. Only datasets having this severity are retrieved (default: all) </li>
- <li> <Number of lines> - the specified number of lines (newest) of the log are retrieved (default: all) </li>
- <li> <Searchstring> - only log entries containing the searchstring are retrieved (Note: no Regex possible, the searchstring will be given into the call to SVS) </li>
- </ul>
- <br>
-
- <b>Examples</b> <br>
- <ul>
- <code>get <name> listLog severity:Error limit:5 </code> <br>
- Reports the last 5 Log entries with severity "Error" <br>
- <code>get <name> listLog severity:Information match:Carport </code> <br>
- Reports all Log entries with severity "Information" and containing the string "Carport" <br>
- <code>get <name> listLog severity:Warning </code> <br>
- Reports all Log entries with severity "Warning" <br><br>
- </ul>
-
-
- If the polling of SVS is activated by setting the <a href="#SSCamattr">attribute</a> "pollcaminfoall", the <a href="#SSCamreadings">reading</a>
- "LastLogEntry" will be created. <br>
- In the protocol-setup of the SVS you can adjust what data you want to log. For further informations please have a look at
- <a href="https://www.synology.com/en-uk/knowledgebase/Surveillance/help/SurveillanceStation/log_advanced">Synology Online-Help</a>.
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> scanVirgin </b> (valid for CAM/SVS)</li> <br>
-
- This command is similar to get caminfoall, informations relating to SVS and the camera will be retrieved.
- In difference to caminfoall in either case a new session ID will be generated (do a new login), the camera ID will be
- new identified and all necessary API-parameters will be new investigated.
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> snapGallery [1-10] </b> (valid for CAM)</li> <br>
-
- A popup with the last [x] snapshots will be created. If the <a href="#SSCamattr">attribute</a> "snapGalleryBoost" is set,
- the last snapshots (default 3) are requested by polling and they will be stored in the FHEM-servers main memory.
- This method is helpful to speed up the output especially in case of full size images, but it can be possible
- that NOT the newest snapshots are be shown if they have not be initialized by the SSCAm-module itself. <br>
- The function can also be triggered, e.g. by an "at" or "notify". In that case the snapshotgallery will be displayed on all
- connected FHEMWEB instances as a popup. <br><br>
-
- To control this function behavior there are further <a href="#SSCamattr">attributes</a>: <br><br>
-
- <ul>
- <li>snapGalleryBoost </li>
- <li>snapGalleryColumns </li>
- <li>snapGalleryHtmlAttr </li>
- <li>snapGalleryNumber </li>
- <li>snapGallerySize </li>
- </ul> <br>
- available.
- </ul> <br>
-
- <ul>
- <b>Note:</b><br>
- Depended from quantity and resolution (quality) of the snapshot images adequate CPU and/or main memory
- ressources are needed.
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> snapfileinfo </b> (valid for CAM)</li> <br>
-
- The filename of the last snapshot will be retrieved. This command will be executed with <b>"get <name> snap"</b>
- automatically.
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> snapinfo </b> (valid for CAM)</li> <br>
-
- Informations about snapshots will be retrieved. Heplful if snapshots are not triggerd by SSCam, but by motion detection of the camera or surveillance
- station instead.
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> stmUrlPath </b> (valid for CAM)</li> <br>
-
- 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
- to send it and run by your own application like a browser (see example).
- 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
- appropriate livestream without session id. Is the attribute "livestreamprefix" (usage: "http(s)://<hostname><port>) used, the servername / port will be replaced if necessary.
- The strUrlPath function will be included automatically if polling is used.
- <br><br>
-
- Example to create an http-call to a livestream using StmKey: <br>
-
- <pre>
- http(s)://<hostname><port>/webapi/entry.cgi?api=SYNO.SurveillanceStation.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=5&StmKey="31fd87279976d89bb98409728cced890"
- </pre>
-
- cameraId (Internal CAMID) and StmKey has to be replaced by valid values. <br><br>
-
- <b>Note:</b> <br>
-
- If you use the stream-call from external and replace hostname / port with valid values and open your router ip ports, please
- make shure that no unauthorized person could get this sensible data !
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> storedCredentials </b> (valid for CAM/SVS)</li> <br>
-
- Shows the stored login credentials in a popup as plain text.
- </ul>
- <br><br>
-
- <ul>
- <li><b> get <name> svsinfo </b> (valid for CAM/SVS)</li> <br>
-
- Determines common informations about the installed SVS-version and other properties. <br>
- </ul>
- <br><br>
-
-
- <b>Polling of Camera/SVS-Properties</b><br><br>
- <ul>
- Retrieval of Camera-Properties can be done automatically if the attribute "pollcaminfoall" will be set to a value > 10. <br>
- As default that attribute "pollcaminfoall" isn't be set and the automatic polling isn't be active. <br>
- The value of that attribute determines the interval of property-retrieval in seconds. If that attribute isn't be set or < 10 the automatic polling won't be started <br>
- respectively stopped when the value was set to > 10 before. <br><br>
- The attribute "pollcaminfoall" is monitored by a watchdog-timer. Changes of the attribute-value will be checked every 90 seconds and transact corresponding. <br>
- 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>
- 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>
- will be actived due to analysis purposes. <br><br>
- If FHEM will be restarted, the first data retrieval will be done within 60 seconds after start. <br><br>
- The state of automatic polling will be displayed by reading "PollState": <br><br>
-
- <ul>
- <li><b> PollState = Active </b> - automatic polling will be executed with interval correspondig value of attribute "pollcaminfoall" </li>
- <li><b> PollState = Inactive </b> - automatic polling won't be executed </li>
- </ul>
- <br>
-
- The readings are described <a href="#SSCamreadings">here</a>. <br><br>
- <b>Notes:</b> <br><br>
- If polling is used, the interval should be adjusted only as short as needed due to the detected camera values are predominantly static. <br>
- A feasible guide value for attribute "pollcaminfoall" could be between 600 - 1800 (s). <br>
- Per polling call and camera approximately 10 - 20 Http-calls will are stepped against Surveillance Station. <br>
- 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>
- Considering a safety margin, in that example you shouldn't set the polling interval lower than 160 seconds. <br><br>
- 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>
- and thereby caused potential source of errors during request Synology Surveillance Station. <br>
- A marginal difference between the polling intervals of the defined cameras, e.g. 1 second, can already be faced as
- sufficient value. <br><br>
- </ul>
- </ul>
- <a name="SSCaminternals"></a>
- <b>Internals</b> <br><br>
- <ul>
- The meaning of used Internals is depicted in following list: <br><br>
- <ul>
- <li><b>CAMID</b> - the ID of camera defined in SVS, the value will be retrieved automatically on the basis of SVS-cameraname </li>
- <li><b>CAMNAME</b> - the name of the camera in SVS </li>
- <li><b>CREDENTIALS</b> - the value is "Set" if Credentials are set </li>
- <li><b>NAME</b> - the cameraname in FHEM </li>
- <li><b>MODEL</b> - distinction between camera device (CAM) and Surveillance Station device (SVS) </li>
- <li><b>OPMODE</b> - the last executed operation of the module </li>
- <li><b>SERVERADDR</b> - IP-Address of SVS Host </li>
- <li><b>SERVERPORT</b> - SVS-Port </li>
- <br><br>
- </ul>
- </ul>
- <a name="SSCamattr"></a>
- <b>Attributes</b>
- <br><br>
-
- <ul>
- <ul>
- <li><b>debugactivetoken</b><br>
- if set the state of active token will be logged - only for debugging, don't use it in normal operation ! </li><br>
-
- <li><b>disable</b><br>
- deactivates the module (device definition) </li><br>
-
- <li><b>httptimeout</b><br>
- Timeout-Value of HTTP-Calls to Synology Surveillance Station, Default: 4 seconds (if httptimeout = "0"
- or not set) </li><br>
-
- <li><b>htmlattr</b><br>
- additional specifications to inline oictures to manipulate the behavior of stream, e.g. size of the image. </li><br>
-
- <ul>
- <b>Example:</b><br>
- attr <name> htmlattr width="500" height="325" top="200" left="300"
- </ul>
- <br>
-
- <li><b>livestreamprefix</b><br>
- overwrites the specifications of protocol, servername and port for further use of the livestream address, e.g.
- as an link to external use. It has to be specified as "http(s)://<servername>:<port>" </li><br>
- <li><b>loginRetries</b><br>
- set the amount of login-repetitions in case of failure (default = 1) </li><br>
-
- <li><b>noQuotesForSID</b><br>
- this attribute may be helpfull in some cases to avoid errormessage "402 - permission denied" and makes login
- possible. </li><br>
-
- <li><b>pollcaminfoall</b><br>
- Interval of automatic polling the Camera properties (if < 10: no polling, if > 10: polling with interval) </li><br>
- <li><b>pollnologging</b><br>
- "0" resp. not set = Logging device polling active (default), "1" = Logging device polling inactive</li><br>
-
- <li><b>rectime</b><br>
- determines the recordtime when a recording starts. If rectime = 0 an endless recording will be started. If
- it isn't defined, the default recordtime of 15s is activated </li><br>
-
- <li><b>recextend</b><br>
- "rectime" of a started recording will be set new. Thereby the recording time of the running recording will be
- extended </li><br>
-
- <li><b>session</b><br>
- selection of login-Session. Not set or set to "DSM" -> session will be established to DSM (Sdefault).
- "SurveillanceStation" -> session will be established to SVS </li><br>
-
- <li><b>simu_SVSversion</b><br>
- simulates another SVS version. (only a lower version than the installed one is possible !) </li><br>
-
- <li><b>snapGalleryBoost</b><br>
- If set, the last snapshots (default 3) will be retrieved by Polling, will be stored in the FHEM-servers main memory
- and can be displayed by the "set/get ... snapGallery" command. <br>
- This mode is helpful if many or full size images shall be displayed.
- If the attribute is set, you can't specify arguments in addition to the "set/get ... snapGallery" command.
- (see also attribut "snapGalleryNumber") </li><br>
-
- <li><b>snapGalleryColumns</b><br>
- The number of snapshots which shall appear in one row of the gallery popup (default 3). </li><br>
-
- <li><b>snapGalleryHtmlAttr</b><br>
- the image parameter can be controlled by this attribute. <br>
- If the attribute isn't set, the value of attribute "htmlattr" will be used. <br>
- If "htmlattr" is also not set, default parameters are used instead (width="500" height="325"). <br><br>
-
- <ul>
- <b>Example:</b><br>
- attr <name> snapGalleryHtmlAttr width="325" height="225"
- </ul>
- <br>
- </li>
-
- <li><b>snapGalleryNumber</b><br>
- The number of snapshots to retrieve (default 3). </li><br>
-
- <li><b>snapGallerySize</b><br>
- By this attribute the quality of the snapshot images can be controlled (default "Icon"). <br>
- If mode "Full" is set, the images are retrieved with their original available resolution. That requires more ressources
- and may slow down the display. By setting attribute "snapGalleryBoost=1" the display may accelerated, because in that case
- the images will be retrieved by continuous polling and need only bring to display. </li><br>
-
- <li><b>showStmInfoFull</b><br>
- additional stream informations like LiveStreamUrl, StmKeyUnicst, StmKeymjpegHttp will be created </li><br>
-
- <li><b>showPassInLog</b><br>
- if set the used password will be shown in logfile with verbose 4. (default = 0) </li><br>
-
- <li><b>videofolderMap</b><br>
- replaces the content of reading "VideoFolder", Usage if e.g. folders are mountet with different names than original
- (SVS) </li><br>
-
- <li><b>verbose</b></li><br>
-
- <ul>
- Different Verbose-Level are supported.<br>
- Those are in detail:
-
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td> 0 </td><td>- Start/Stop-Event will be logged </td></tr>
- <tr><td> 1 </td><td>- Error messages will be logged </td></tr>
- <tr><td> 2 </td><td>- messages according to important events were logged </td></tr>
- <tr><td> 3 </td><td>- sended commands will be logged </td></tr>
- <tr><td> 4 </td><td>- sended and received informations will be logged </td></tr>
- <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>
- </table>
- </ul>
- <br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
-
- </ul>
- </ul>
- <br><br>
-
- <a name="SSCamreadings"></a>
- <b>Readings</b>
- <ul>
- <br>
- Using the polling mechanism or retrieval by "get"-call readings are provieded, The meaning of the readings are listed in subsequent table: <br>
- The transfered Readings can be deversified dependend on the type of camera.<br><br>
- <ul>
- <table>
- <colgroup> <col width=5%> <col width=95%> </colgroup>
- <tr><td><li>Availability</li> </td><td>- Availability of Camera (disabled, enabled, disconnected, other) </td></tr>
- <tr><td><li>CamEventNum</li> </td><td>- delivers the total number of in SVS registered events of the camera </td></tr>
- <tr><td><li>CamExposureControl</li> </td><td>- indicating type of exposure control </td></tr>
- <tr><td><li>CamExposureMode</li> </td><td>- current exposure mode (Day, Night, Auto, Schedule, Unknown) </td></tr>
- <tr><td><li>CamForceEnableMulticast</li> </td><td>- Is the camera forced to enable multicast. </td></tr>
- <tr><td><li>CamIP</li> </td><td>- IP-Address of Camera </td></tr>
- <tr><td><li>CamLastRec</li> </td><td>- Path / name of the last recording </td></tr>
- <tr><td><li>CamLastRecTime</li> </td><td>- date / starttime / endtime of the last recording </td></tr>
- <tr><td><li>CamLiveMode</li> </td><td>- Source of Live-View (DS, Camera) </td></tr>
- <tr><td><li>CamModel</li> </td><td>- Model of camera </td></tr>
- <tr><td><li>CamMotDetSc</li> </td><td>- state of motion detection source (disabled, by camera, by SVS) and their parameter </td></tr>
- <tr><td><li>CamNTPServer</li> </td><td>- set time server </td></tr>
- <tr><td><li>CamPort</li> </td><td>- IP-Port of Camera </td></tr>
- <tr><td><li>CamPreRecTime</li> </td><td>- Duration of Pre-Recording (in seconds) adjusted in SVS </td></tr>
- <tr><td><li>CamRecShare</li> </td><td>- shared folder on disk station for recordings </td></tr>
- <tr><td><li>CamRecVolume</li> </td><td>- Volume on disk station for recordings </td></tr>
- <tr><td><li>CamVendor</li> </td><td>- Identifier of camera producer </td></tr>
- <tr><td><li>CamVideoFlip</li> </td><td>- Is the video flip </td></tr>
- <tr><td><li>CamVideoMirror</li> </td><td>- Is the video mirror </td></tr>
- <tr><td><li>CamVideoRotate</li> </td><td>- Is the video rotate </td></tr>
- <tr><td><li>CapAudioOut</li> </td><td>- Capability to Audio Out over Surveillance Station (false/true) </td></tr>
- <tr><td><li>CapChangeSpeed</li> </td><td>- Capability to various motion speed </td></tr>
- <tr><td><li>CapPTZAbs</li> </td><td>- Capability to perform absolute PTZ action </td></tr>
- <tr><td><li>CapPTZAutoFocus</li> </td><td>- Capability to perform auto focus action </td></tr>
- <tr><td><li>CapPTZDirections</li> </td><td>- the PTZ directions that camera support </td></tr>
- <tr><td><li>CapPTZFocus</li> </td><td>- mode of support for focus action </td></tr>
- <tr><td><li>CapPTZHome</li> </td><td>- Capability to perform home action </td></tr>
- <tr><td><li>CapPTZIris</li> </td><td>- mode of support for iris action </td></tr>
- <tr><td><li>CapPTZPan</li> </td><td>- Capability to perform pan action </td></tr>
- <tr><td><li>CapPTZTilt</li> </td><td>- mode of support for tilt action </td></tr>
- <tr><td><li>CapPTZZoom</li> </td><td>- Capability to perform zoom action </td></tr>
- <tr><td><li>DeviceType</li> </td><td>- device type (Camera, Video_Server, PTZ, Fisheye) </td></tr>
- <tr><td><li>Error</li> </td><td>- message text of last error </td></tr>
- <tr><td><li>Errorcode</li> </td><td>- error code of last error </td></tr>
- <tr><td><li>HomeModeState</li> </td><td>- HomeMode-state (SVS-version 8.1.0 and above) </td></tr>
- <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>
- <tr><td><li>LastSnapFilename</li> </td><td>- the filename of the last snapshot </td></tr>
- <tr><td><li>LastSnapId</li> </td><td>- the ID of the last snapshot </td></tr>
- <tr><td><li>LastSnapTime</li> </td><td>- timestamp of the last snapshot </td></tr>
- <tr><td><li>LastUpdateTime</li> </td><td>- date / time the last update of readings by "caminfoall" </td></tr>
- <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>
- <tr><td><li>Patrols</li> </td><td>- in Synology Surveillance Station predefined patrols (at PTZ-Cameras) </td></tr>
- <tr><td><li>PollState</li> </td><td>- shows the state of automatic polling </td></tr>
- <tr><td><li>Presets</li> </td><td>- in Synology Surveillance Station predefined Presets (at PTZ-Cameras) </td></tr>
- <tr><td><li>Record</li> </td><td>- if recording is running = Start, if no recording is running = Stop </td></tr>
- <tr><td><li>StmKey</li> </td><td>- current streamkey. it can be used to open livestreams without session id </td></tr>
- <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>
- <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>
- <tr><td><li>SVScustomPortHttp</li> </td><td>- Customized port of Surveillance Station (HTTP) (to get with "svsinfo") </td></tr>
- <tr><td><li>SVScustomPortHttps</li> </td><td>- Customized port of Surveillance Station (HTTPS) (to get with "svsinfo") </td></tr>
- <tr><td><li>SVSlicenseNumber</li> </td><td>- The total number of installed licenses (to get with "svsinfo") </td></tr>
- <tr><td><li>SVSuserPriv</li> </td><td>- The effective rights of the user used for log in (to get with "svsinfo") </td></tr>
- <tr><td><li>SVSversion</li> </td><td>- package version of the installed Surveillance Station (to get with "svsinfo") </td></tr>
- <tr><td><li>UsedSpaceMB</li> </td><td>- used disk space of recordings by Camera </td></tr>
- <tr><td><li>VideoFolder</li> </td><td>- Path to the recorded video </td></tr>
- </table>
- </ul>
- <br><br>
- </ul>
- </ul>
- <p><a name="STACKABLE"></a>
- <h3>STACKABLE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#STACKABLE'>DE</a>]</div>
- <ul>
- This module is a more generic version of the STACKABLE_CC module, and is used
- for stacked IO devices like the Busware SCC. It works by adding/removing a
- prefix (default is *) to the command, and redirecting the output to the
- module, which is using it.
- <a name="STACKABLEdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> STACKABLE <baseDevice></code> <br>
- <br>
- <baseDevice> is the name of the unterlying device.<br>
- Example:
- <ul><code>
- define CUL_1 CUL /dev/ttyAMA0@38400<br>
- attr CUL_1 rfmode SlowRF<br><br>
- define CUL_1_SCC STACKABLE CUL1<br>
- define CUL_2 CUL FHEM:DEVIO:CUL_1_SCC:9600 0000<br>
- attr CUL_2 rfmode HomeMatic<br><br>
- define CUL_2_SCC STACKABLE CUL2<br>
- define CUL_3 ZWCUL FHEM:DEVIO:CUL_2_SCC:9600 12345678 01<br>
- </code></ul>
- <b>Note:</b>If you rename the base CUL or a STACKABLE, which is a base for
- another one, the definition of the next one has to be adjusted, and FHEM
- has to be restarted.
- </ul>
- <a name="STACKABLEset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="STACKABLEget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="STACKABLEattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="#writePrefix">writePrefix</a><br>
- The prefix used when writing data, default is *.
- "readPrefix" is hardcoded to *.
- </li><br>
- <li><a name="#binary">binary</a><br>
- If set to true, read data is converted to binary from hex before offering
- it to the client IO device (e.g. TCM). Default is 0 (off).
- </li><br>
- </ul>
- </ul>
- <p><a name="STACKABLE_CC"></a>
- <h3>STACKABLE_CC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#STACKABLE_CC'>DE</a>]</div>
- <ul>
- This module handles the stackable CC1101 devices for the Raspberry PI from
- busware.de. You can attach a lot of CUL-Type devices to a single RPi this way.
- The first device is defined as a CUL, the rest of them as STACKABLE_CC.
- <br><br>
- <a name="STACKABLE_CCdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> STACKABLE_CC <Base-Device-Name></code> <br>
- <br>
- <Base-Device-Name> is the name of the device, which this device is
- attached on, the first one has to be defined as a CUL device<br>
- Example:
- <ul><code>
- define SCC0 CUL /dev/ttyAMA0@38400<br>
- attr SCC0 rfmode SlowRF<br>
- define SCC1 STACKABLE_CC SCC0<br>
- attr SCC1 rfmode HomeMatic<br>
- define SCC2 STACKABLE_CC SCC1<br>
- attr SCC2 rfmode Max<br>
- </code></ul>
- <b>Important:</b>
- <ul>
- <li>The rfmode has to be specified explicitely (valid for the STACKABLE_CC
- types only, not for the first, which is defined as a CUL).</li>
- <li>In case of SlowRF, the FHTID has to be specified explicitely with the
- command "set SCCX raw T01HHHH". Again, this is valid for the STACKABLE_CC
- types only.</li>
- <li>If you rename the base CUL or a STACKABLE_CC, which is a base for
- another one, the define of the next one has to be adjusted, and FHEM has to be
- restarted.</li>
- </ul>
- </ul>
- <a name="STACKABLE_CCset"></a>
- <b>Set</b> <ul>Same as for the <a href="#CULset">CUL</a>.</ul><br>
- <a name="STACKABLE_CCget"></a>
- <b>Get</b> <ul>Same as for the <a href="#CULget">CUL</a>.</ul><br>
- <a name="STACKABLE_CCattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a></li><br>
- <li><a href="#ignore">ignore</a></li><br>
- The rest of the attributes is the same as for the <a href="#CULattr">CUL</a>.
- </ul>
- </ul>
- <p><a name="STOCKQUOTES"></a>
- <h3>STOCKQUOTES</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#STOCKQUOTES'>DE</a>]</div>
- (en | <a href="commandref_DE.html#STOCKQUOTES">de</a>)
- <ul>
- <a name="STOCKQUOTES"></a>
- Fetching actual stock quotes from various sources<br>
- <b>Preliminary</b><br>
- Perl module Finance::Quote must be installed:<br>
- <code>cpan install Finance::Quote</code> or <code>sudo apt-get install libfinance-quote-perl</code><br><br>
-
- <b>Define</b>
- <ul>
- <code>define Depot STOCKQUOTES</code><br><br>
- </ul>
- <a name="STOCKQUOTESset"></a>
- <b>Set</b>
- <ul>
- <Symbol> depends on source. May also an WKN.<br><br>
- <li><code>set <name> buy <Symbol> <Amount> <Value of amount></code><br>
- Add a stock exchange security. If stock exchange security already exists, new values will be added to old values.<br><br>
- </li>
- <li><code>set <name> sell <Symbol> <Amount> <Value of amount></code><br>
- Remove a stock exchange security (or an part of it).<br><br>
- </li>
- <li><code>set <name> add <Symbol></code><br>
- Watch only<br><br>
- </li>
- <li><code>set <name> remove <Symbol></code><br>
- Remove watched stock exchange security.<br><br>
- </li>
- <li><code>set <name> clearReadings</code><br>
- Clears all readings.<br><br>
- </li>
- <li><code>set <name> update</code><br>
- Refresh all readings.<br><br>
- </li>
- </ul>
-
- <a name="STOCKQUOTESget"></a>
- <b>Get</b>
- <ul>
- <li><code>get <name> sources</code><br>
- Lists all avaiable data sources.<br><br>
- </li>
- <li><code>get <name> currency <Symbol></code><br>
- Get currency of stock exchange securities<br><br>
- </li>
- </ul>
- <a name="STOCKQUOTESattr"></a>
- <b>Attributes</b>
- <ul>
- <li>currency<br>
- All stock exchange securities will shown in this currency.<br>
- Default: EUR<br><br>
- </li>
- <li>defaultSource<br>
- Default source for stock exchange securities values.<br>
- Default: europe, valid values: from <code>get <name> sources</code><br><br>
- </li>
- <li>queryTimeout<br>
- Fetching timeout in seconds.<br>
- Standard: 120, valid values: Number<br><br>
- </li>
- <li>pollInterval<br>
- Refresh interval in seconds.<br>
- Standard: 300, valid values: Number<br><br>
- </li>
- <li>sources<br>
- An individual data source can be set for every single stock exchange securities.<br>
- Data sources can be fetched with: <code>get <name> sources</code>.<br>
- Format: <Symbol>:<Source>[,<Symbol>:<Source>...]<br>
- Example: <code>A0M16S:vwd,532669:unionfunds,849104:unionfunds</code><br>
- Stock exchange securities not listed in sources will be updated from defaultSource.<br><br>
- </li>
- <li>stocks<br>
- Will be created/modified via buy/sell/add/remove<br>
- Contains stock exchange securities informations in format: <Symbol>:<Anzahl>:<Einstandswert>[,<Symbol>:<Anzahl>:<Einstandswert>...]<br><br>
- </li>
- </ul><br>
- </ul>
- <p><a name="STV"></a>
- <h3>STV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#STV'>DE</a>]</div>
- <ul><p>
- This module supports Samsung TV devices.<br>
- LEXXBXX (B Series) use port 52235 <br>
- LEXXCXX (C|D Series) use port 55000 <br>
- </p>
- <b>Define</b><br>
- <code>define <name> STV <host>]</code><br>
- <p>
- Example:<br>
- define Television1 STV 192.168.178.20 <br> or
- define Television2 STV 192.168.178.20 52235 <br>
- define Television2 STV 192.168.178.20 55000 <br>
- </p>
- <b>Set</b><br>
- set <name> <value> <nummber><br>where value is one of:<br><br>
- <ul>
- <li><code>mute</code> </li>
- <li><code>volume </code> </li>
- <li><code>call</code> </li>
- <li><code>sms </code> </li>
- <li><code>date </code> </li>
- </ul>
- <br>Example:<br>
- set <name> mute <br>
- set <name> volume 20 <br>
- set <name> call Peter 012345678 Phone 87654321 <br><br>
-
- <b>Get</b><br>
- <ul>N/A</ul><br>
- </ul>
-
- <p><a name="SUNRISE_EL"></a>
- <h3>SUNRISE_EL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SUNRISE_EL'>DE</a>]</div>
- <ul>
- This module is used to define the functions<pre>
- sunrise, sunset,
- sunrise_rel, sunset_rel
- sunrise_abs, sunset_abs
- isday</pre>
- perl functions, to be used in <a href="#at">at</a> or FS20 on-till commands.
- <br>
- First you should set the longitude and latitude global attributes to the
- exact longitude and latitude values (see e.g. maps.google.com for the exact
- values, which should be in the form of a floating point value). The default
- value is Frankfurt am Main, Germany.
- <br><br>
- The default altitude ($defaultaltit in SUNRISE_EL.pm) defines the
- sunrise/sunset for Civil twilight (i.e. one can no longer read outside
- without artificial illumination), which differs from sunrise/sunset times
- found on different websites. See perldoc "DateTime::Event::Sunrise" for
- alternatives. <br><br>
- sunrise()/sunset() returns the absolute time of the next sunrise/sunset,
- adding 24 hours if the next event is tomorrow, to use it in the timespec of
- an at device or for the on-till command for FS20 devices.<br>
- sunrise_rel()/sunset_rel() returns the relative time to the next
- sunrise/sunset. <br>
- sunrise_abs()/sunset_abs() return the absolute time of the corresponding
- event today (no 24 hours added).<br>
- sunrise_abs_dat()/sunset_abs_dat() return the absolute time of the
- corresponding event to a given date(no 24 hours added).<br>
- All functions take up to three arguments:<br>
- <ul>
- <li>The first specifies an offset (in seconds), which will be added to the
- event.</li>
- <li>The second and third specify min and max values (format: "HH:MM").</li>
- </ul>
- <br>
- isday() can be used in some notify or at commands to check if the sun is up
- or down. isday() ignores the seconds parameter, but respects min and max.
- If min < max, than the day starts not before min, and ends not after max.
- If min > max, than the day starts not after max, and ends not before min.
- <br><br>
- Optionally, for all functions you can set first argument which defines a
- horizon value which then is used instead of the $defaultaltit in
- SUNRISE_EL.pm.<br> Possible values are: "REAL", "CIVIL", "NAUTIC",
- "ASTRONOMIC" or a positive or negative number preceded by "HORIZON="<br> REAL
- is 0, CIVIL is -6, NAUTIC is -12, ASTRONOMIC is -18 degrees above
- horizon.<br><br>
- Examples:<br>
- <ul>
- <PRE>
- # When sun is 6 degrees below horizon - same as sunrise();
- sunrise("CIVIL");
- # When sun is 3 degrees below horizon (between real and civil sunset)
- sunset("HORIZON=-3");
- # When sun is 1 degree above horizon
- sunset("HORIZON=1");
- # Switch lamp1 on at real sunset, not before 18:00 and not after 21:00
- define a15 at *{sunset("REAL",0,"18:00","21:00")} set lamp1 on
- </PRE>
- </ul>
-
- The functions sunrise_abs_dat()/sunset_abs_dat() need as a very first
- parameter the date(format epoch: time()) for which the events should be
- calculated.
- <br><br>
- Examples:
- <br>
- <ul>
- <PRE>
- # to calculate the sunrise of today + 7 days
- my $date = time() + 7*86400;
- sunrise_abs_dat($date);
-
- # to calculate the sunrise of today + 7 days 6 degrees below horizon
- my $date = time() + 7*86400;
- sunrise_abs_dat($date, "CIVIL");
- </ul>
- </PRE>
-
- <b>Define</b> <ul>N/A</ul><br>
- <b>Set</b> <ul>N/A</ul><br>
- <b>Get</b> <ul>N/A</ul><br>
- <b>Attributes</b><br>
- <ul>
- <a name="latitude"></a>
- <li>latitude<br>
- If set, this latitude is used to calculate sunset/sunrise<br>
- Notation need to be in decimal format (for example Berlin = 52.666)
- As default Frankfurt/Main, Germany (50.112) is used.
- </li><br>
- <a name="longitude"></a>
- <li>longitude<br>
- If set, this longitude is used to calculate sunset/sunrise<br>
- Notation need to be in decimal format (for example Berlin = 13.400)
- As default Frankfurt/Main, Germany (8.686) is used.
- </li><br>
- <a name="altitude"></a>
- <li>altitude<br>
- Used by other modules.
- </li><br>
- Note: these are global attributes, e.g.<br>
- <ul>
- attr global latitude 50.112<br>
- attr global longitude 8.686<br>
- </ul>
- </ul><br>
- </ul>
- <p><a name="SVG"></a>
- <h3>SVG</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SVG'>DE</a>]</div>
- <ul>
- <a name="SVGlinkdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SVG
- <logDevice>:<gplotfile>:<logfile></code>
- <br><br>
- This is the Plotting/Charting device of FHEMWEB
- Examples:
- <ul>
- <code>define MyPlot SVG inlog:temp4hum4:CURRENT</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>Normally you won't define an SVG device manually, as
- FHEMWEB makes it easy for you, just plot a logfile (see <a
- href="#logtype">logtype</a>) and click on "Create SVG instance".
- Specifying CURRENT as a logfilename will always access the current
- logfile, even if its name changes regularly.</li>
- <li>For historic reasons this module uses a Gnuplot file description
- to store different attributes. Some special commands (beginning with
- #FileLog or #DbLog) are used additionally, and not all gnuplot
- attribtues are implemented.</li>
- </ul>
- </ul>
- <a name="SVGset"></a>
- <b>Set</b>
- <ul>
- <li>copyGplotFile<br>
- Copy the currently specified gplot file to a new file, which is named
- after the SVG device, existing files will be overwritten.
- This operation is needed in order to use the plot editor (see below)
- without affecting other SVG instances using the same gplot file.
- Creating the SVG instance from the FileLog detail menu will also
- create a unique gplot file, in this case this operation is not needed.
- </li>
- </ul><br>
- <a name="SVGget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="SVGattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#endPlotNow">endPlotNow</a></li><br>
- <li><a href="#endPlotToday">endPlotToday</a></li><br>
- <a name="captionLeft"></a>
- <li>captionLeft<br>
- Show the legend on the left side (deprecated, will be autoconverted to
- captionPos)
- </li><br>
- <a name="captionPos"></a>
- <li>captionPos<br>
- right - Show the legend on the right side (default)<br>
- left - Show the legend on the left side<br>
- auto - Show the legend labels on the left or on the right side depending
- on the axis it belongs to<br>
- </li><br>
- <a name="fixedrange"></a>
- <li>fixedrange [offset]<br>
- Contains two time specs in the form YYYY-MM-DD separated by a space.
- In plotmode gnuplot-scroll(-svg) or SVG the given time-range will be
- used, and no scrolling for this SVG will be possible. Needed e.g. for
- looking at last-years data without scrolling.<br><br> If the value is
- one of hour, day, <N>days, week, month, year then set the zoom
- level for this SVG independently of the user specified zoom-level. This
- is useful for pages with multiple plots: one of the plots is best
- viewed in with the default (day) zoom, the other one with a week
- zoom.<br>
- If given, the optional integer parameter offset refers to a different
- period (e.g. last year: fixedrange year -1, 2 days ago: fixedrange day
- -2).
- </li><br>
- <a name="fixedoffset"></a>
- <li>fixedoffset <nDays><br>
- Set an fixed offset (in days) for the plot.
- </li><br>
- <a name="label"></a>
- <li>label<br>
- Double-Colon separated list of values. The values will be used to replace
- <L#> type of strings in the .gplot file, with # beginning at 1
- (<L1>, <L2>, etc.). Each value will be evaluated as a perl
- expression, so you have access e.g. to the Value functions.<br><br>
- If the plotmode is gnuplot-scroll(-svg) or SVG, you can also use the min,
- max, mindate, maxdate, avg, cnt, sum, firstval, firstdate, currval (last
- value) and currdate (last date) values of the individual curves, by
- accessing the corresponding values from the data hash, see the example
- below:<br>
- <ul>
- <li>Fixed text for the right and left axis:<br>
- <ul>
- <li>Fhem config:<br>
- attr wl_1 label "Temperature"::"Humidity"</li>
- <li>.gplot file entry:<br>
- set ylabel <L1><br>
- set y2label <L2></li>
- </ul></li>
- <li>Title with maximum and current values of the 1st curve (FileLog)
- <ul>
- <li>Fhem config:<br>
- attr wl_1 label "Max $data{max1}, Current $data{currval1}"</li>
- <li>.gplot file entry:<br>
- set title <L1><br></li>
- </ul></li>
- </ul>
- The value minAll and maxAll (representing the minimum/maximum over all
- values) is also available from the data hash.
- <br>Deprecated, see plotReplace.
- </li><br>
- <li><a href="#nrAxis">nrAxis</a></li><br>
- <a name="plotfunction"></a>
- <li>plotfunction<br>
- Space value separated list of values. The value will be used to replace
- <SPEC#> type of strings in the .gplot file, with # beginning at 1
- (<SPEC1>, <SPEC2>, etc.) in the #FileLog or #DbLog directive.
- With this attribute you can use the same .gplot file for multiple devices
- with the same logdevice.
- <ul><b>Example:</b><br>
- <li>#FileLog <SPEC1><br>
- with: attr <SVGdevice> plotfunction "4:IR\x3a:0:"<br>
- instead of<br>
- #FileLog 4:IR\x3a:0:
- </li>
- <li>#DbLog <SPEC1><br>
- with: attr <SVGdevice> plotfunction
- "Garage_Raumtemp:temperature::"<br> instead of<br>
- #DbLog Garage_Raumtemp:temperature::
- </li>
- </ul>
- Deprecated, see plotReplace.
- </li><br>
- <li><a href="#plotmode">plotmode</a></li><br>
- <a name="plotReplace"></a>
- <li>plotReplace<br>
- space separated list of key=value pairs. value may contain spaces if
- enclosed in "" or {}. value will be evaluated as a perl expression, if it
- is enclosed in {}.
- <br>
- In the .gplot file <key> is replaced with the corresponding value,
- the evaluation of {} takes place <i>after</i> the input file is
- processed, so $data{min1} etc can be used.
- <br>
- %key% will be repaced <i>before</i> the input file is processed, this
- expression can be used to replace parameters for the input processing.
- </li><br>
- <li><a href="#plotsize">plotsize</a></li><br>
- <li><a href="#plotWeekStartDay">plotWeekStartDay</a></li><br>
- <a name="startDate"></a>
- <li>startDate<br>
- Set the start date for the plot. Used for demo installations.
- </li><br>
- <a name="title"></a>
- <li>title<br>
- A special form of label (see above), which replaces the string <TL>
- in the .gplot file. It defaults to the filename of the logfile.
- <br>Deprecated, see plotReplace.
- </li><br>
- </ul>
- <br>
- <a name="plotEditor"></a>
- <b>Plot-Editor</b>
- <br>
- This editor is visible on the detail screen of the SVG instance.
- Most features are obvious here, up to some exceptions:
- <ul>
- <li>if you want to omit the title for a Diagram label, enter notitle in the
- input field.</li>
- <li>if you want to specify a fixed value (not taken from a column) if a
- string found (e.g. 1 if the FS20 switch is on and 0 if it is off), then
- you have to specify the Tics first, and write the .gplot file, before you
- can select this value from the dropdown.<br>
- Example:
- <ul>
- Enter in the Tics field: ("On" 1, "Off" 0)<br>
- Write .gplot file<br>
- Select "1" from the column dropdown (note the double quote!) for the
- regexp switch.on, and "0" for the regexp switch.off.<br>
- Write .gplot file again<br>
- </ul></li>
- <li>If the range is of the form {...}, then it will be evaluated with perl.
- The result is a string, and must have the form [min:max]
- </li>
- </ul>
- The visibility of the ploteditor can be configured with the FHEMWEB attribute
- <a href="#ploteditor">ploteditor</a>.
- <br>
- </ul>
- <p><a name="SWAP"></a>
- <h3>SWAP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SWAP'>DE</a>]</div>
- <ul>
- The SWAP protocoll is used by panStamps (<a href="http://www.panstamp.com">panstamp.com</a>).<br><br>
- This is a generic module that will handle all SWAP devices with known device description files via
- a <a href="#panStamp">panStick</a> as the IODevice.<br><br>
- All communication is done on the SWAP register level. FHEM readings are created for all user registers
- and userReadings are created to map low level SWAP registers to 'human readable' format with the
- mapping from the device descriprion files.<br><br>
- For higher level features like "on,off,on-for-timer,..." specialized modules have to be used.<br><br>
- Messages for devices in power-down-state are queued and send when the device enters SYNC state.
- This typicaly happens during device startup after a reset.
- <br><br>
- Notes:
- <ul>
- <li> This module requires XML::Simple.</li>
- <li>Devices with the default address FF will be changed to the first free address in the range F0-FE.</li>
- <li>For power-down devices the default transmit interval of FFFF will be changed to 0384 (900 seconds).</li>
- </ul>
- <br>
- <br>
- <a name="SWAPDefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SWAP <ID></code> <br>
- <br>
- The ID is a 2 digit hex number to identify the moth in the panStamp network.
- </ul>
- <br>
- <a name="SWAP_Set"></a>
- <b>Set</b>
- <ul>
- <li>regGet <reg><br>
- request status message for register id <reg>.
- for system registers the register name can be used instead if the two digit register id in hex.
- </li><br>
- <li>regSet <reg> <data><br>
- write <data> to register id <reg>.
- for system registers the register name can be used instead if the twi digit register id in hex.
- </li><br>
- <li>regSet <reg>.<ep> <data><br>
- write <data> to endpoint <ep> of register <reg>. will not work if no reading for register <reg> is available as all nibbles that are not part of endpoint <ep> will be filled from this reading.
- </li><br>
- <li>statusRequest<br>
- request transmision of all registers.
- </li><br>
- <li>readDeviceXML<br>
- reload the device description xml file.
- </li><br>
- <li>clearUnconfirmed<br>
- clears the list of unconfirmed messages.
- </li><br>
- <li>flash [<productCode>|<firmwareFile>]<br>
- will initiate an ota firmware update. only possible for panStamp NRG devices.<br>
- no params -> will use the <code>SWAP_<current productCode>.hex</code> file from the FHEM/firmware directory.<br>
- <productCode> -> will use the <code>SWAP_<productCode>.hex</code> file from the FHEM/firmware directory.<br>
- <firmwareFile> -> will use <firmwareFile> as the absolute file name of the hex file.<br>
- </li><br>
- </ul>
- <a name="SWAP_Get"></a>
- <b>Get</b>
- <ul>
- <li>regList<br>
- list all non-system registers of this device.
- </li><br>
- <li>regListAll<br>
- list all registers of this device.
- </li><br>
- <li>listUnconfirmed<br>
- list all unconfirmed messages.
- </li><br>
- <li>products<br>
- dumps all known devices.
- </li><br>
- <li>deviceXML<br>
- dumps the device xml data.
- </li><br>
- </ul>
- <a name="SWAP_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>createUnknownReadings<br>
- Create readings for unknown registers, i.e. registers not defined in the device xml file.
- </li><br>
- <li>ProductCode<br>
- ProductCode of the device. used to read the register configuration from the device definition file.
- hast to be set manualy for devices that are in sleep mode during definition.
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="SWAP_0000002200000003"></a>
- <h3>SWAP_0000002200000003</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SWAP_0000002200000003'>DE</a>]</div>
- <ul>
- Module for the justme version of the panstamp rgb driver board with ir (sketch product code 0000002200000003).
- <br><br>
- 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.
- <br><br>
- 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.
- <br><br>
- SWAP register 0E will configure the power on state of the board: off, configured color, last color before power down.
- <br><br>
- <a name="SWAP_0000002200000003_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SWAP_0000002200000003 <ID> 0000002200000003</code> <br>
- <br>
- </ul>
- <br>
- <a name="SWAP_0000002200000003_Set"></a>
- <b>Set </b>
- all SWAP set commands and:
- <ul>
- <li>on<br>
- </li>
- <li>on-for-timer <time><br>
- </li>
- <li>off<br>
- </li>
- <li>toggle<br>
- </li><br>
- <li>rgb <RRGGBB><br>
- set the led color
- </li><br>
- <li>dimUP<br>
- </li>
- <li>dimDown<br>
- </li><br>
- <li>setIR # <code><br>
- </li>
- <li>learnIR #<br>
- </li>
- <li>storeIR # <code> <command><br>
- </li><br>
- <li>getIR # | all<br>
- read content of IR regisgter # or all IR registers
- </li><br>
- <li>setFade <RRGGBB> <time><br>
- stores color and time in fede register #
- </li><br>
- <li>startFade <#1> <#2><br>
- starts an endless fading loop over all fading registers [#1..#2]
- </li><br>
- <li>getFade # | all<br>
- read content of fade regisgter # or all fade regisgters
- </li><br>
- <li><a href="#setExtensions"> set extensions</a> are supported.</li>
- </ul><br>
- <a name="SWAP_0000002200000003_Get"></a>
- <b>Get</b>
- all SWAP get commands and:
- <ul>
- <li>rgb<br>
- returns the current led color
- </li><br>
- <li>listIR<br>
- list all IR registers of this device. use getIR first.
- </li><br>
- <li>listFade<br>
- list all fade registers. use getFade first.
- </li><br>
- </ul><br>
- <a name="SWAP_0000002200000003_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>color-icon<br>
- 1 -> use lamp color as icon color and 100% shape as icon shape<br>
- 2 -> use lamp color scaled to full brightness as icon color and dim state as icon shape</li>
- <li>ProductCode<br>
- must be 0000002200000003</li><br>
- </ul><br>
- </ul>
- <p><a name="SWAP_0000002200000008"></a>
- <h3>SWAP_0000002200000008</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SWAP_0000002200000008'>DE</a>]</div>
- <ul>
- Module for the justme version of the panstamp indoor multi sensor board (sketch product code 0000002200000008).
- <br><br>
- <a name="SWAP_0000002200000008_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SWAP_0000002200000008 <ID> 0000002200000008</code> <br>
- <br>
- </ul>
- <br>
- <a name="SWAP_0000002200000008_Set"></a>
- <b>Set </b>
- all SWAP set commands and:
- <ul>
- <li>desired <value><br>
- sets the desired temperature to <value></li>
- <li>text <text><br>
- displays text</li>
- </ul><br>
- <a name="SWAP_0000002200000008_Get"></a>
- <b>Get</b>
- all SWAP get commands and:
- <ul>
- </ul><br>
- <a name="SWAP_0000002200000008_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>ProductCode<br>
- must be 0000002200000008</li><br>
- </ul><br>
- </ul>
- <p><!-- ================================ -->
- <a name="SYSMON"></a>
- <h3>SYSMON</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SYSMON'>DE</a>]</div>
- (en | <a href="commandref_DE.html#SYSMON">de</a>)
- <ul>
- This module provides statistics about the system running FHEM server. Furthermore, remote systems can be accessed (Telnet). Only Linux-based systems are supported.
- Some informations are hardware specific and are not available on every platform.
- So far, this module has been tested on the following systems:
- Raspberry Pi (Debian Wheezy), BeagleBone Black, FritzBox 7390, WR703N under OpenWrt, CubieTruck and some others.
- <br><br>
- For more information on a FritzBox check other moduls: <a href="#FRITZBOX">FRITZBOX</a> and <a href="#FB_CALLMONITOR">FB_CALLMONITOR</a>.
- <br>
- <i>The modul uses the Perl modul 'Net::Telnet' for remote access. Please make sure that this module is installed.</i>
- <br><br>
- <b>Define</b>
- <br><br>
- <code>define <name> SYSMON [MODE[:[USER@]HOST][:PORT]] [<M1>[ <M2>[ <M3>[ <M4>]]]]</code><br>
- <br>
- 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>
- If one (or more) of the multiplier is set to zero, the corresponding readings is deactivated.
- <br>
- <br>
- The parameters are responsible for updating the readings according to the following scheme:
- <ul>
- <li>M1: (Default: 1)<br>
- cpu_freq, cpu_temp, cpu_temp_avg, loadavg, stat_cpu, stat_cpu_diff, stat_cpu_percent, stat_cpu_text, power readings<br><br>
- </li>
- <li>M2: (Default: M1)<br>
- ram, swap<br>
- </li>
- <li>M3: (Default: M1)<br>
- eth0, eth0_diff, wlan0, wlan0_diff<br><br>
- </li>
- <li>M4: (Default: 10*M1)<br>
- Filesystem informations<br><br>
- </li>
- <li>The following parameters are always updated with the base interval (regardless of the Mx-parameter):<br>
- fhemuptime, fhemuptime_text, idletime, idletime_text, uptime, uptime_text, starttime, starttime_text<br><br>
- </li>
- </ul>
- 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 <password>'. For MODE parameter are 'telnet', 'ssh' and 'local' only allowed. 'local' does not require any other parameters and can also be omitted.
- <br>
- For SSH login with password, 'sshpass' must be installed (note: not recommended! Use public key authentication instead).
- For SSH login to work, a manual SSH connection to the remote machine from the FHEM-Acount may need to be done once
- (under whose rights FHEM runs) the fingerprint must be confirmed.
- <br>
- <br>
- <b>Readings:</b>
- <br><br>
- <ul>
- <li>cpu_core_count<br>
- CPU core count
- </li>
- <li>cpu_model_name<br>
- CPU model name
- </li>
- <li>cpu_bogomips<br>
- CPU Speed: BogoMIPS
- </li>
- <li>cpu_freq (and cpu1_freq for dual core systems)<br>
- CPU frequency
- </li>
- <br>
- <li>cpu_temp<br>
- CPU temperature
- </li>
- <br>
- <li>cpu_temp_avg<br>
- Average of the CPU temperature, formed over the last 4 values.
- </li>
- <br>
- <li>fhemuptime<br>
- Time (in seconds) since the start of FHEM server.
- </li>
- <br>
- <li>fhemuptime_text<br>
- Time since the start of the FHEM server: human-readable output (text representation).
- </li>
- <br>
- <li>fhemstarttime<br>
- Start time (in seconds since 1.1.1970 1:00:00) of FHEM server.
- </li>
- <br>
- <li>fhemstarttime_text<br>
- Start time of the FHEM server: human-readable output (text representation).
- </li>
- <br>
- <li>idletime<br>
- Time spent by the system since the start in the idle mode (period of inactivity).
- </li>
- <br>
- <li>idletime_text<br>
- The inactivity time of the system since system start in human readable form.
- </li>
- <br>
- <li>loadavg<br>
- System load (load average): 1 minute, 5 minutes and 15 minutes.
- </li>
- <br>
- <li>ram<br>
- memory usage.
- </li>
- <br>
- <li>swap<br>
- swap usage.
- </li>
- <br>
- <li>uptime<br>
- System uptime.
- </li>
- <br>
- <li>uptime_text<br>
- System uptime (human readable).
- </li>
- <br>
- <li>starttime<br>
- System starttime.
- </li>
- <br>
- <li>starttime_text<br>
- System starttime (human readable).
- </li>
- <br>
- <li>Network statistics<br>
- Statistics for the specified network interface about the data volumes transferred and the difference since the previous measurement.
- <br>
- Examples:<br>
- Amount of the transmitted data via interface eth0.<br>
- <code>eth0: RX: 940.58 MB, TX: 736.19 MB, Total: 1676.77 MB</code><br>
- Change of the amount of the transferred data in relation to the previous call (for eth0).<br>
- <code>eth0_diff: RX: 0.66 MB, TX: 0.06 MB, Total: 0.72 MB</code><br>
- IP and IP v6 adresses
- <code>eth0_ip 192.168.0.15</code><br>
- <code>eth0_ip6 fe85::49:4ff:fe85:f885/64</code><br>
- </li>
- <br>
- <li>Network Speed (if avialable)<br>
- speed of the network connection.
- <br>
- Examples:<br>
- <code>eth0_speed 100</code><br>
- </li>
- <br>
- <li>File system information<br>
- Usage of the desired file systems.<br>
- Example:<br>
- <code>fs_root: Total: 7340 MB, Used: 3573 MB, 52 %, Available: 3425 MB at /</code>
- </li>
- <br>
- <li>CPU utilization<br>
- Information about the utilization of CPUs.<br>
- Example:<br>
- <code>stat_cpu: 10145283 0 2187286 90586051 542691 69393 400342</code><br>
- <code>stat_cpu_diff: 2151 0 1239 2522 10 3 761</code><br>
- <code>stat_cpu_percent: 4.82 0.00 1.81 93.11 0.05 0.00 0.20</code><br>
- <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>
- </li>
- <br>
- <li>user defined<br>
- These readings provide output of commands, which are passed to the operating system or delivered by user defined functions.
- </li>
- <br>
- <b>FritzBox specific Readings</b>
- <li>wlan_state<br>
- WLAN state: on/off
- </li>
- <br>
- <li>wlan_guest_state<br>
- GuestWLAN state: on/off
- </li>
- <br>
- <li>internet_ip<br>
- current IP-Adresse
- </li>
- <br>
- <li>internet_state<br>
- state of the Internet connection: connected/disconnected
- </li>
- <br>
- <li>night_time_ctrl<br>
- state night time control (do not disturb): on/off
- </li>
- <br>
- <li>num_new_messages<br>
- Number of new Voice Mail messages
- </li>
- <br>
- <li>fw_version_info<br>
- Information on the installed firmware version: <VersionNum> <creation date> <time>
- </li>
- <br>
- <b>DSL Informations (FritzBox)</b>
- <li>dsl_rate<br>
- Information about the down und up stream rate
- </li>
- <br>
- <li>dsl_synctime<br>
- sync time with DSLAM
- </li>
- <br>
- <li>dsl_crc_15<br>
- number of uncorrectable errors (CRC) for the last 15 minutes
- </li>
- <br>
- <li>dsl_fec_15<br>
- number of correctable errors (FEC) for the last 15 minutes
- </li>
- <br>
- <b>Power Supply Readings</b>
- <li>power_ac_stat<br>
- status information to the AC socket: online (0|1), present (0|1), voltage, current<br>
- Example:<br>
- <code>power_ac_stat: 1 1 4.807 264</code><br>
- </li>
- <br>
- <li>power_ac_text<br>
- human readable status information to the AC socket<br>
- Example:<br>
- <code>power_ac_text ac: present / online, voltage: 4.807 V, current: 264 mA</code><br>
- </li>
- <br>
- <li>power_usb_stat<br>
- status information to the USB socket
- </li>
- <br>
- <li>power_usb_text<br>
- human readable status information to the USB socket
- </li>
- <br>
- <li>power_battery_stat<br>
- status information to the battery (if installed): online (0|1), present (0|1), voltage, current, actual capacity<br>
- Example:<br>
- <code>power_battery_stat: 1 1 4.807 264 100</code><br>
- </li>
- <br>
- <li>power_battery_text<br>
- human readable status information to the battery (if installed)
- </li>
- <br>
- <li>power_battery_info<br>
- human readable additional information to the battery (if installed): technology, capacity, status, health, total capacity<br>
- Example:<br>
- <code>power_battery_info: battery info: Li-Ion , capacity: 100 %, status: Full , health: Good , total capacity: 2100 mAh</code><br>
- 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>
- </li>
- <br>
- <li>cpuX_freq_stat<br>
- Frequency statistics for CPU X: minimum, maximum and average values<br>
- Example:<br>
- <code>cpu0_freq_stat: 100 1000 900</code><br>
- </li>
- <br>
- <li>cpuX_idle_stat<br>
- Idle statistik for CPU X: minimum, maximum and average values<br>
- Example:<br>
- <code>cpu0_freq_stat: 23.76 94.74 90.75</code><br>
- </li>
- <br>
- <li>cpu[X]_temp_stat<br>
- Temperature statistik for CPU: minimum, maximum and average values<br>
- Example:<br>
- <code>cpu_temp_stat: 41.00 42.50 42.00</code><br>
- </li>
- <br>
- <li>ram_used_stat<br>
- RAM usage statistics: minimum, maximum and average values<br>
- Example:<br>
- <code>ram_used_stat: 267.55 1267.75 855.00</code><br>
- </li>
- <br>
- <li>swap_used_stat<br>
- SWAP usage statistics: minimum, maximum and average values<br>
- Example:<br>
- <code>swap_used_stat: 0 1024.00 250.00</code><br>
- </li>
- <br>
- <br>
- </ul>
- <br>
- <b>Get:</b><br><br>
- <ul>
- <li>interval_base<br>
- Lists the specified polling intervalls.
- </li>
- <br>
- <li>interval_multipliers<br>
- Displays update intervals.
- </li>
- <br>
- <li>list<br>
- Lists all readings.
- </li>
- <br>
- <li>update<br>
- Refreshs all readings.
- </li>
- <br>
- <li>version<br>
- Displays the version of SYSMON module.
- </li>
- <br>
- <li>list_lan_devices<br>
- Displays known LAN Devices (FritzBox only).
- </li>
- <br>
- </ul>
- <br>
- <b>Set:</b><br><br>
- <ul>
- <li>interval_multipliers<br>
- Defines update intervals (as in the definition of the device).
- </li>
- <br>
- <li>clean<br>
- Clears user-definable Readings. After an update (manual or automatic) new readings are generated.<br>
- </li>
- <br>
- <li>clear <reading name><br>
- 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>
- </li>
- <br>
- <li>password <Passwort><br>
- Specify the password for remote access (usually only necessary once).
- </li>
- <br>
- </ul>
- <br>
- <b>Attributes:</b><br><br>
- <ul>
- <li>filesystems <reading name>[:<mountpoint>[:<comment>]],...<br>
- Specifies the file system to be monitored (a comma-separated list). <br>
- 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>
- Examples: <br>
- <code>/boot,/,/media/usb1</code><br>
- <code>fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick</code><br>
- </li>
- <br>
- <li>network-interfaces <name>[:<interface>[:<comment>]],...<br>
- 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>
- Example <code>ethernet:eth0:Ethernet,wlan:wlan0:WiFi</code><br>
- </li>
- <br>
- <li>user-defined <readingsName>:<Interval_Minutes>:<Comment>:<Cmd>,...<br>
- This comma-separated list defines user defined Readings with the following data: Reading name, refresh interval (in minutes), a Comment, and operating system command.
- <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)..
- <br>All parameter parts are required!
- <br>It is important that the specified commands are executed quickly, because at this time the entire FHEM server is blocked!<br>
- 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>
- Example: Display of package updates for the operating system:<br>
- cron-Job:<br>
- <code> sudo apt-get update 2>/dev/null >/dev/null</code>
- <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 > /opt/fhem/data/updatestatus.txt</code>
- <br>
- <code>uder-defined</code> attribute<br><code>sys_updates:1440:System Aktualisierungen:cat /opt/fhem/data/updatestatus.txt</code><br>
- the number of available updates is daily recorded as 'sys_updates'.
- </li>
- <br>
- <li>user-fn <fn_name>:<interval_minutes>:<reading_name1>:<reading_name2>...[:<reading_nameX>], ...<br>
- List of perl user subroutines.<br>
- As <fn_name> can be used either the name of a Perl subroutine or a Perl expression.
- The perl function gets the device hash as parameter and must provide an array of values.
- These values are taken according to the parameter <reading_nameX> in Readings.<br>
- A Perl expression must be enclosed in curly braces and can use the following parameters: $ HASH (device hash) and $ NAME (device name).
- Return is expected analogous to a Perl subroutine.<br>
- 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.
- </li>
- <br>
- <li>disable<br>
- Possible values: 0 and 1. '1' means that the update is stopped.
- </li>
- <br>
- <li>telnet-prompt-regx, telnet-login-prompt-regx<br>
- RegExp to detect login and command line prompt. (Only for access via Telnet.)
- </li>
- <br>
- <li>exclude<br>
- Allows to suppress reading certain information. <br>
- supported values: user-defined (s. user-defined und user-fn), cpucount, uptime, fhemuptime,
- loadavg, cputemp, cpufreq, cpuinfo, diskstat, cpustat, ramswap, filesystem, network,
- fbwlan, fbnightctrl, fbnewmessages, fbdecttemp, fbversion, fbdsl, powerinfo
- </li>
- <br>
- </ul>
- <br>
- <b>Plots:</b><br><br>
- <ul>
- predefined gplot files:<br>
- <ul>
- FileLog versions:<br>
- <code>
- SM_RAM.gplot<br>
- SM_CPUTemp.gplot<br>
- SM_FS_root.gplot<br>
- SM_FS_usb1.gplot<br>
- SM_Load.gplot<br>
- SM_Network_eth0.gplot<br>
- SM_Network_eth0t.gplot<br>
- SM_Network_wlan0.gplot<br>
- SM_CPUStat.gplot<br>
- SM_CPUStatSum.gplot<br>
- SM_CPUStatTotal.gplot<br>
- SM_power_ac.gplot<br>
- SM_power_usb.gplot<br>
- SM_power_battery.gplot<br>
- </code>
- DbLog versions:<br>
- <code>
- SM_DB_all.gplot<br>
- SM_DB_CPUFreq.gplot<br>
- SM_DB_CPUTemp.gplot<br>
- SM_DB_Load.gplot<br>
- SM_DB_Network_eth0.gplot<br>
- SM_DB_RAM.gplot<br>
- </code>
- </ul>
- </ul>
- <br>
- <b>HTML output method (see Weblink): SYSMON_ShowValuesHTML(<SYSMON-Instance>[,<Liste>])</b><br><br>
- <ul>
- The module provides a function that returns selected Readings as HTML.<br>
- As a parameter the name of the defined SYSMON device is expected.<br>
- It can also Reading Group, Clone dummy or other modules be used. Their readings are simple used for display. <br>
- The second parameter is optional and specifies a list of readings to be displayed in the format <code><ReadingName>[:<Comment>[:<Postfix>[:<FormatString>]]]</code>.<br>
- <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).
- If FormatString is specified, the output is formatted with sprintf (s. sprintf in Perl documentation).<br>
- If no <code>Comment</code> is specified, an internally predefined description is used.<br>
- If no list specified, a predefined selection is used (all values are displayed).<br><br>
- <code>define sysv1 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon')}</code><br>
- <code>define sysv2 weblink htmlCode {SYSMON_ShowValuesHTML('sysmon', ('date:Datum', 'cpu_temp:CPU Temperatur: °C:%.1f'', 'cpu_freq:CPU Frequenz: MHz'))}</code>
- </ul>
- <br>
- <b>Text output method (see Weblink): SYSMON_ShowValuesHTMLTitled(<SYSMON-Instance>[,<Title>,<Liste>])</b><br><br>
- <ul>
- According to SYSMON_ShowValuesHTML, but with a Title text above. If no title provided, device alias will be used (if any)<br>
- </ul>
- <br>
- <b>Text output method (see Weblink): SYSMON_ShowValuesText(<SYSMON-Instance>[,<Liste>])</b><br><br>
- <ul>
- According to SYSMON_ShowValuesHTML, but formatted as plain text.<br>
- </ul>
- <br>
- <b>Text output method (see Weblink): SYSMON_ShowValuesTextTitled(<SYSMON-Instance>[,<Title>,<Liste>])</b><br><br>
- <ul>
- According to SYSMON_ShowValuesHTMLTitled, but formatted as plain text.<br>
- </ul>
- <br>
- <b>Reading values with perl: SYSMON_getValues(<name>[, <array of desired keys>])</b><br><br>
- <ul>
- Returns a hash ref with desired values. If no array is passed, all values are returned.<br>
- {(SYSMON_getValues("sysmon"))->{'cpu_temp'}}<br>
- {(SYSMON_getValues("sysmon",("cpu_freq","cpu_temp")))->{"cpu_temp"}}<br>
- {join(" ", values (SYSMON_getValues("sysmon")))}<br>
- {join(" ", values (SYSMON_getValues("sysmon",("cpu_freq","cpu_temp"))))}<br>
- </ul>
- <br>
- <b>Examples:</b><br><br>
- <ul>
- <code>
- # Modul-Definition<br>
- define sysmon SYSMON 1 1 1 10<br>
- #attr sysmon event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,^~ /.*usb.*,~ /$<br>
- attr sysmon event-on-update-reading cpu_temp,cpu_temp_avg,cpu_freq,eth0_diff,loadavg,ram,fs_.*,stat_cpu_percent<br>
- attr sysmon filesystems fs_boot:/boot,fs_root:/:Root,fs_usb1:/media/usb1:USB-Stick<br>
- attr sysmon network-interfaces eth0:eth0:Ethernet,wlan0:wlan0:WiFi<br>
- attr sysmon group RPi<br>
- attr sysmon room 9.03_Tech<br>
- <br>
- # Log<br>
- define FileLog_sysmon FileLog ./log/sysmon-%Y-%m.log sysmon<br>
- attr FileLog_sysmon group RPi<br>
- attr FileLog_sysmon logtype SM_CPUTemp:Plot,text<br>
- attr FileLog_sysmon room 9.03_Tech<br>
- <br>
- # Visualisierung: CPU-Temperatur<br>
- define wl_sysmon_temp SVG FileLog_sysmon:SM_CPUTemp:CURRENT<br>
- attr wl_sysmon_temp group RPi<br>
- attr wl_sysmon_temp label "CPU Temperatur: Min $data{min2}, Max $data{max2}, Last $data{currval2}"<br>
- attr wl_sysmon_temp room 9.03_Tech<br>
- <br>
- # Visualisierung: Netzwerk-Datenübertragung für eth0<br>
- define wl_sysmon_eth0 SVG FileLog_sysmon:SM_Network_eth0:CURRENT<br>
- attr wl_sysmon_eth0 group RPi<br>
- attr wl_sysmon_eth0 label "Netzwerk-Traffic eth0: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
- attr wl_sysmon_eth0 room 9.03_Tech<br>
- <br>
- # Visualisierung: Netzwerk-Datenübertragung für wlan0<br>
- define wl_sysmon_wlan0 SVG FileLog_sysmon:SM_Network_wlan0:CURRENT<br>
- attr wl_sysmon_wlan0 group RPi<br>
- attr wl_sysmon_wlan0 label "Netzwerk-Traffic wlan0: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
- attr wl_sysmon_wlan0 room 9.03_Tech<br>
- <br>
- # Visualisierung: CPU-Auslastung (load average)<br>
- define wl_sysmon_load SVG FileLog_sysmon:SM_Load:CURRENT<br>
- attr wl_sysmon_load group RPi<br>
- attr wl_sysmon_load label "Load Min: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"<br>
- attr wl_sysmon_load room 9.03_Tech<br>
- <br>
- # Visualisierung: RAM-Nutzung<br>
- define wl_sysmon_ram SVG FileLog_sysmon:SM_RAM:CURRENT<br>
- attr wl_sysmon_ram group RPi<br>
- attr wl_sysmon_ram label "RAM-Nutzung Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
- attr wl_sysmon_ram room 9.03_Tech<br>
- <br>
- # Visualisierung: Dateisystem: Root-Partition<br>
- define wl_sysmon_fs_root SVG FileLog_sysmon:SM_FS_root:CURRENT<br>
- attr wl_sysmon_fs_root group RPi<br>
- attr wl_sysmon_fs_root label "Root Partition Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
- attr wl_sysmon_fs_root room 9.03_Tech<br>
- <br>
- # Visualisierung: Dateisystem: USB-Stick<br>
- define wl_sysmon_fs_usb1 SVG FileLog_sysmon:SM_FS_usb1:CURRENT<br>
- attr wl_sysmon_fs_usb1 group RPi<br>
- attr wl_sysmon_fs_usb1 label "USB1 Total: $data{max1}, Min: $data{min2}, Max: $data{max2}, Aktuell: $data{currval2}"<br>
- attr wl_sysmon_fs_usb1 room 9.03_Tech<br>
- <br>
- # Anzeige der Readings zum Einbinden in ein 'Raum'.<br>
- define SysValues weblink htmlCode {SYSMON_ShowValuesHTML('sysmon')}<br>
- attr SysValues group RPi<br>
- attr SysValues room 9.03_Tech<br>
- <br>
- # Anzeige CPU Auslasung<br>
- define wl_sysmon_cpustat SVG FileLog_sysmon:SM_CPUStat:CURRENT<br>
- 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>
- attr wl_sysmon_cpustat group RPi<br>
- attr wl_sysmon_cpustat room 9.99_Test<br>
- attr wl_sysmon_cpustat plotsize 840,420<br>
- define wl_sysmon_cpustat_s SVG FileLog_sysmon:SM_CPUStatSum:CURRENT<br>
- 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>
- attr wl_sysmon_cpustat_s group RPi<br>
- attr wl_sysmon_cpustat_s room 9.99_Test<br>
- attr wl_sysmon_cpustat_s plotsize 840,420<br>
- define wl_sysmon_cpustatT SVG FileLog_sysmon:SM_CPUStatTotal:CURRENT<br>
- attr wl_sysmon_cpustatT label "CPU-Auslastung"<br>
- attr wl_sysmon_cpustatT group RPi<br>
- attr wl_sysmon_cpustatT plotsize 840,420<br>
- attr wl_sysmon_cpustatT room 9.99_Test<br>
- <br>
- # Anzeige Stromversorgung AC<br>
- define wl_sysmon_power_ac SVG FileLog_sysmon:SM_power_ac:CURRENT<br>
- attr wl_sysmon_power_ac label "Stromversorgung (ac) Spannung: $data{min1} - $data{max1} V, Strom: $data{min2} - $data{max2} mA"<br>
- attr wl_sysmon_power_ac room Technik<br>
- attr wl_sysmon_power_ac group system<br>
- # Anzeige Stromversorgung Battery<br>
- define wl_sysmon_power_bat SVG FileLog_sysmon:SM_power_battery:CURRENT<br>
- attr wl_sysmon_power_bat label "Stromversorgung (bat) Spannung: $data{min1} - $data{max1} V, Strom: $data{min2} - $data{max2} mA"<br>
- attr wl_sysmon_power_bat room Technik<br>
- attr wl_sysmon_power_bat group system<br>
- </code>
- </ul>
- </ul>
- <!-- ================================ -->
- <p><a name="SYSSTAT"></a>
- <h3>SYSSTAT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SYSSTAT'>DE</a>]</div>
- <ul>
- Provides system statistics for the host FHEM runs on or a remote Linux system that is reachable by preconfigured passwordless ssh access.<br><br>
- Notes:
- <ul>
- <li>This module needs <code>Sys::Statistics::Linux</code> on Linux.<br>
- It can be installed with '<code>cpan install Sys::Statistics::Linux</code>'<br>
- or on debian with '<code>apt-get install libsys-statistics-linux-perl</code>'</li>
- <li>To monitor a target by snmp <code>Net::SNMP</code> hast to be installed.<br></li>
- <li>To plot the load values the following code can be used:
- <PRE>
- define sysstatlog FileLog /usr/local/FHEM/var/log/sysstat-%Y-%m.log sysstat
- attr sysstatlog nrarchive 1
- define svg_sysstat SVG sysstatlog:sysstat:CURRENT
- attr wl_sysstat label "Load Min: $data{min1}, Max: $data{max1}, Aktuell: $data{currval1}"
- attr wl_sysstat room System
- </PRE></li>
- <li>to match the root filesystem (mount point '/') in diskusage plots use
- '<code>#FileLog 4:/\x3a:0:</code>' or '<code>#FileLog 4:\s..\s:0:</code>'
- and <b>not</b> '<code>#FileLog 4:/:0:</code>' as the later will match all mount points</li>.
- </ul>
- <a name="SYSSTAT_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SYSSTAT [<interval> [<interval_fs>] [<host>]]</code><br>
- <br>
- Defines a SYSSTAT device.<br><br>
- The load is updated every <interval> seconds. The default and minimum is 60.<br><br>
- The diskusage is updated every <interval_fs> seconds. The default is <interval>*60 and the minimum is 60.
- <interval_fs> is only aproximated and works best if <interval_fs> is an integral multiple of <interval>.<br><br>
- If <host> is given it has to be accessible by ssh without the need for a password.
- Examples:
- <ul>
- <code>define sysstat SYSSTAT</code><br>
- <code>define sysstat SYSSTAT 300</code><br>
- <code>define sysstat SYSSTAT 60 600</code><br>
- </ul>
- </ul><br>
- <a name="SYSSTAT_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>load<br>
- the 1 minute load average (for windows targets monitored by snmp aproximated value</li>
- <li>state<br>
- the 1, 5 and 15 minute load averages (or windows targets monitored by snmp the per cpu utilization)</li>
- <li>user,system,idle,iowait<br>
- respective percentage of systemutilization (linux targets only)</li>
- <li><mountpoint><br>
- free bytes for <mountpoint></li>
- </ul><br>
- <a name="SYSSTAT_Get"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <value></code>
- <br><br>
- where <code>value</code> is one of<br><br>
- <li>filesystems<br>
- Lists the filesystems that can be monitored.</li>
- </ul><br>
- <a name="SYSSTAT_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>disable<br>
- keep timers running but disable collection of statistics.</li>
- <li>filesystems<br>
- List of comma separated filesystems (not mountpoints) that should be monitored.<br>
- Examples:
- <ul>
- <code>attr sysstat filesystems /dev/md0,/dev/md2</code><br>
- <code>attr sysstat filesystems /dev/.*</code><br>
- <code>attr sysstat filesystems 1,3,5</code><br>
- </ul></li></lu>
- <li>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM...</li>
- <li>mibs<br>
- space separated list of <mib>:<reding> pairs that sould be polled.</li>
- <li>showpercent<br>
- If set the usage is shown in percent. If not set the remaining free space in bytes is shown.</li>
- <li>snmp<br>
- 1 -> use snmp to monitor load, uptime and filesystems (including physical and virtual memory)</li>
- <li>stat<br>
- 1 -> monitor user,system,idle and iowait percentage of system utilization (available only for linux targets)</li>
- <li>raspberrytemperature<br>
- If set and > 0 the raspberry pi on chip termal sensor is read.<br>
- If set to 2 a geometric average over the last 4 values is created.</li>
- <li>synologytemperature<br>
- If set and > 0 the main temperaure of a synology diskstation is read. requires snmp.<br>
- If set to 2 a geometric average over the last 4 values is created.</li>
- <li>raspberrycpufreq<br>
- If set and > 0 the raspberry pi on chip termal sensor is read.</li>
- <li>uptime<br>
- If set and > 0 the system uptime is read.<br>
- If set to 2 the uptime is displayed in seconds.</li>
- <li>useregex<br>
- If set the entries of the filesystems list are treated as regex.</li>
- <li>ssh_user<br>
- The username for ssh remote access.</li>
- <li>snmpVersion</li>
- <li>snmpCommunity</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- <p><a name="SingleFileLog"></a>
- <h3>SingleFileLog</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SingleFileLog'>DE</a>]</div>
- <ul>
- <br>
- <a name="SingleFileLogdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SingleFileLog <filename> <regexp>
- </code>
- <br><br>
- For each event or devicename:event matching the <regexp> create a
- new file <filename><br>
- <code><filename></code> may contain %-wildcards of the
- POSIX strftime function of the underlying OS (see your strftime manual),
- additionally %Q is replaced with a sequential number unique to the
- SingleFileLog device. The file content is based on the template attribute,
- see below.<br>
- If the filename is enclosed in {} then it is evaluated as a perl expression,
- which can be used to use a global path different from %L.
- </ul>
- <br>
- <a name="SingleFileLogset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="SingleFileLogget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="SingleFileLogattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#addStateEvent">addStateEvent</a></li><br>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li><br>
- <li><a href="#dosLineEnding">dosLineEnding</a><br>
- Create the file with the line-terminator used on Windows systems (\r\n).
- </li><br>
- <li><a name="#numberFormat">numberFormat</a><br>
- If a word in the event looks like a number, then it is reformatted using
- the numberFormat, and $EVTNUMx is set (analogue to $EVTPARx). Default is
- %1.6E, see the printf manual for details.
- </li><br>
- <li><a name="#readySuffy">readySuffix</a><br>
- The file specified in the definition will be created with the suffix .tmp
- and after the file is closed, will be renamed to the value of this
- attribute. Default is .rdy, specify none to remove the suffix completely.
- </li><br>
- <li><a name="#syncAfterWrite">syncAfterWrite</a><br>
- Force the operating system to write the contents to the disc if set to 1.
- Note: this can slow down the writing, and may shorten the life of SSDs.
- Defalt is 0 (off)
- </li><br>
- <li><a name="#template">template</a><br>
- This attribute specifies the content of the file. Following variables
- are replaced before writing the file:
- <ul>
- <li>$EVENT - the complete event</li>
- <li>$EVTPART0 $EVTPART1 ... - the event broken into single words</li>
- <li>$EVTNUM0 $EVTNUM1 ... - reformatted as numbers, see numberFormat
- above</li>
- <li>$NAME - the name of the device generating the event</li>
- <li>$time - the current time, formatted as YYYY-MM-DD HH:MM:SS</li>
- <li>$time14 - the current time, formatted as YYYYMMDDHHMMSS</li>
- <li>$time16 - the current time, formatted as YYYYMMDDHHMMSSCC,
- where CC is the hundredth second</li>
- </ul>
- If the template is enclosed in {} than it will be evaluated as a perl
- expression, and its result is written to the file.<br>
- Default is $time $NAME $EVENT\n
- </li><br>
- <li><a name="#writeInBackground">writeInBackground</a><br>
- if set (to 1), the writing will occur in a background process to avoid
- blocking FHEM. Default is 0.
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="Siro"></a>
- <h3>Siro protocol</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Siro'>DE</a>]</div>
- <ul>
-
- <br> A <a href="#SIGNALduino">SIGNALduino</a> device (must be defined first).<br>
-
- <br>
- 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>
- <br>
- <br>
-
- <a name="Sirodefine"></a>
- <br>
- <b>Define</b>
- <br>
- <ul>
- <code>define< name> Siro <id><channel> </code>
- <br>
- <br>
- 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).
- A unique ID must be specified, the channel (channel) must also be specified.
- An autocreate (if enabled) automatically creates the device with the ID of the remote control and the channel.
- <br><br>
- Examples:<br><br>
- <ul>
- <code>define Siro1 Siro AB00FC1</code><br> Creates a Siro-device called Siro1 with the ID: AB00FC and Channel: 1<br>
- </ul>
- </ul>
- <br>
- <a name="Siroset"></a>
- <b>Set </b><br>
- <ul>
- <code>set <name> <value> [<position>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- on
- off
- stop
- pos (0...100)
- prog
- fav
- </pre>
-
- Examples:<br><br>
- <ul>
- <code>set Siro1 on</code><br>
- <code>set Siro1 off</code><br>
- <code>set Siro1 position 50</code><br>
- <code>set Siro1 fav</code><br>
- <code>set Siro1 stop</code><br>
- <code>set Siro1 set_favorite</code><br>
- </ul>
- <br>
- <ul>
- set Siro1 on moves the roller blind up completely (0%)<br>
- set Siro1 off moves the roller blind down completely (100%)<br>
- set Siro1 stop stops the current movement of the roller blind<br>
- set Siro1 position 45 moves the roller blind to the specified position (45%)<br>
- set Siro1 45 moves the roller blind to the specified position (45%)<br>
- set Siro1 fav moves the blind to the hardware-programmed favourite middle position<br>
- set Siro1 prog corresponds to the "P2" button on the remote control, the module is set to programming mode (3 min).<br>
- set Siro1 set_favorite programs the current roll position as hardware middle position. The attribute time_down_to_favorite is recalculated and set. <br>
- </ul>
- <br>
- Notes:<br><br>
- <ul>
- <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.
- </li>
- </ul>
- </ul>
- <br>
- <b>Get</b>
- <ul>N/A</ul><br>
- <a name="Siroattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <a name="IODev"></a>
- <li>IODev<br>
- The IODev must contain the physical device for sending and receiving the signals. Currently a SIGNALduino or SIGNALesp is supported.
- Without the specification of the "Transmit and receive module" "IODev", a function is not possible.
- </li><br>
- <a name="channel"></a>
- <li>channel (since V1.09 no longer available)<br>
- contains the channel used by the module for sending and receiving.
- This is already set when the device is created.
- </li><br>
- <a name="channel_send_mode_1 "></a>
- <li>channel_send_mode_1 <br>
- contains the channel that is used by the module in "operation_mode 1" to send.
- This attribute is not used in "operation_mode 0"
- </li><br>
-
- <a name="operation_mode"></a>
- <li>operation_mode<br>
- Mode 0<br><br>
- 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.
- <br><br>Mode 1<br><br>
- 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>
- Instructions for configuring the motor will follow.
- </li><br>
- <a name="time_down_to_favorite"></a>
- <li>time_down_to_favorite<br>
- 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.
- Without this attribute, the module is not fully functional.</li><br>
- <a name="time_to_close"></a>
- <li>time_to_close<br>
- contains the movement time in seconds required by the blind from 0% position to 100% position. This time must be measured and entered manually.
- Without this attribute, the module is not fully functional.</li><br>
- <a name="time_to_open"></a>
- <li>time_to_open<br>
- contains the movement time in seconds required by the blind from 100% position to 0% position. This time must be measured and entered manually.
- Without this attribute, the module is not fully functional.</li><br>
- <a name="prog_fav_sequence"></a>
- <li>prog_fav_sequence<br>
- contains the command sequence for programming the hardware favorite position</li><br>
-
- <a name="debug_mode [0:1]"></a>
- <li>debug_mode [0:1]<br>
- 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>
-
- <a name="Info"></a>
- <li>Info<br>
- 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>
- </ul>
- </ul>
- <p><a name="SmartMeterP1"></a>
- <h3>SmartMeterP1</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SmartMeterP1'>DE</a>]</div>
- <ul>
- <table>
- <tr><td>
- The SmartMeterP1 is a module which can interpret the data received from
- a Smart Meter used to keep track of electricity and gas usage.<br><br>
- Currently it can proces P1 protocol DSMR 4.0. Probably also others but
- not tested.<br>
- Tested with a Landys+Gyr E350 and a Iskra - ME382.<br><br>
- Note: This module may require the <code>Device::SerialPort</code> or
- <code>Win32::SerialPort</code> module if you attach the device via USB
- and the OS sets strange default parameters for serial devices.<br><br>
- </td><td>
- <img src="Landis-Gyr-E350-meter.jpg"/>
- </td></tr>
- </table>
- <a name="SmartMeterP1define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> SmartMeterP1 <device></code> <br>
- <br>
- USB-connected device (P1 USB-Serial cable):<br><ul>
- <device> specifies the serial port to read the incoming data from.
- The name of the serial-device depends on your distribution, under
- linux the ftdi-sio kernel module is responsible, and usually a
- /dev/ttyUSB0 device will be created.<br><br>
- You can specify a baudrate of 115200, e.g.: /dev/ttyUSB0@115200<br><br>
- For the Landys+Gyr E350 use: define SmartMeterP1 SmartMeterP1 /dev/ttyUSB0@115200<BR>
- For the Iskra - ME382 use: define SmartMeterP1 SmartMeterP1 /dev/p1usb@9600,7,E,1<BR><BR>
- </ul>
- <br>
- If the device is called none, then no device will be opened, so you
- can experiment without hardware attached.<br>
- </ul>
- <br>
- <a name="SmartMeterP1attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="write2db">write2db</a><br>
- If you would like to store your read data into a mysql database you can activate
- it with this setting. Allowed values are:<BR>
- 0 - Do not write to datbase (default)<BR>
- 1 - Write to database<BR><BR>
- If you want to write to a database you need to specify also the following attributes:<BR><BR>
- <code>dbHost<BR>
- dbName<BR>
- dbPassword<BR>
- dbPort<BR>
- dbUpdateInterval<BR>
- dbUser</code>
- <BR><BR>
- And create a table in your database called 'smartmeter with the following syntax:<BR>
- <code>CREATE TABLE `smartmeter` (
- `date` datetime NOT NULL,
- `obis_ref` varchar(45) COLLATE utf8_bin NOT NULL,
- `value` float DEFAULT NULL,
- `unit` varchar(45) COLLATE utf8_bin DEFAULT NULL,
- PRIMARY KEY (`date`,`obis_ref`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin</code>
- </li><br>
- <li><a name="dbHost">dbHost</a><br>
- The hostname or ip address of the MySQL server.
- </li><br>
- <li><a name="dbPort">dbPort</a><br>
- The TCP port the MySQL server is listening on. Default is 3306.
- </li><br>
- <li><a name="dbName">dbName</a><br>
- The name of the dabase to use.
- </li><br>
- <li><a name="dbUsername">dbUsername</a><br>
- The name of the MySQL use which has read and write access to the database
- and table 'smartmeter'.
- </li><br>
- <li><a name="dbPassword">dbPassword</a><br>
- Password of the MySQL user.
- </li><br>
- <li><a name="dbUpdateInterval">dbUpdateInterval</a><br>
- How often should the measured value be written to the database.<BR>
- This value is in minutes.<BR><BR>
- So when a new value is read from the smartmeter the time will be checked
- to the time of the last value written to the database. If the difference is
- bigger than this interval the value will be written to the database.<BR><BR>
- With this value you can control how much and how fast data is written into your database.
- </li><br>
- <li><a name="removeUnitSeparator">removeUnitSeparator</a><br>
- When set to true it will replace the unit asterisk separator by a space character.
- So 00900.701*m3 becomes 00900.701 m3
- </li><br>
- <li><a name="removeLeadingZero">removeLeadingZero</a><br>
- When set to true it will remove all leading zeros in a value.
- So 00900.701 m3 becomes 900.701 m3 and <BR>
- 0000.123 kWh becomes 0.123 kWh
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="SmartPi"></a>
- <h3>SmartPi</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#SmartPi'>DE</a>]</div>
- <ul>
- <a name="SmartPireadings"></a>
- <b>Readings</b>
- <ul>
- <li>phaseX_Current - Current [A] (available for phase 1,2,3, neutral conductor)</li>
- <li>phaseX_Voltage - Voltage [V] (available for phase 1,2,3)</li>
- <li>phaseX_Power - Power [W] (available for phase 1,2,3)</li>
- <li>phaseX_Cosphi - cos � (available for phase 1,2,3 � it is important to measure the voltage)</li>
- <li>phaseX_Frequency - Frequency [Hz] (available for phase 1,2,3)</li>
- </ul>
- <a name="SmartPiget"></a>
- <b>get</b>
- <ul>
- <li>phaseX Y - get new Y (Voltage or Current or so)data about phaseX</li>
- </ul>
- <a name="SmartPiattribut"></a>
- <b>get</b>
- <ul>
- <li>disable - disables the device</li>
- <li>disabledForIntervals - disable device for interval time (13:00-18:30 or 13:00-18:30 22:00-23:00)</li>
- <li>interval - interval in seconds for statusRequest</li>
- <li></li>
- </ul>
- </ul>
- <p><a name="Snapcast"></a>
- <h3>Snapcast</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Snapcast'>DE</a>]</div>
- <ul>
- <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.
- 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
- 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
- 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
- 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.
- 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.
- <br><br>
- <a name="Snapcastdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Snapcast [<ip> <port>]</code>
- <br><br>
- Example: <code>define MySnap Snapcast 127.0.0.1 1705</code>
- <br><br>
- 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.
- <br><br><br>
- <code>define <name> Snapcast client <server> <clientid></code>
- <br><br>
- Example: <code>define MySnapClient Snapcast client MySnap aabbccddeeff</code>
- <br><br>
- 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,
- 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
- </ul>
- <br>
- <a name="Snapcastset"></a>
- <b>Set</b><br>
- <ul>
- For a Server module: <code>set <name> <function> <client> <value></code>
- <br><br>
- For a Client module: <code>set <name> <function> <value></code>
- <br><br>
- Options:
- <ul>
- <li><i>update</i><br>
- Perform a full update of the Snapcast Status including streams and servers. Only needed if something is not working. Server module only</li>
- <li><i>volume</i><br>
- 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.
- Client can be given as "all", in that case all clients are changed at once (only for server module)<br>
- 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.
- The step size can be defined in the attribute <em>volumeStepSize</em><br>
- The step size can be defined smaller for the lower volume range, so that finetuning is possible in this area.
- See the description of the attributes <em>volumeStepSizeSmall</em> and <em>volumeStepThreshold</em>
- Setting a volume bigger than 0 also unmutes the client, if muted.</li>
- <li><i>mute</i><br>
- Mute or unmute by giving "true" or "false" as value. If no argument given, toggle between muted and unmuted.</li>
- <li><i>latency</i><br>
- Change the Latency Setting of the client</li>
- <li><i>name</i><br>
- Change the Name of the client</li>
- <li><i>stream</i><br>
- 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.
- By using next as value, you can cycle through the avaialble streams</li>
- </ul>
- </ul>
- <br><br>
- <a name="Snapcastattr"></a>
- <b>Attributes</b>
- <ul>
- 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.
- <li>streamnext<br>
- 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.
- </li>
- <li>volumeStepSize<br>
- Default: 5. Set this to define, how far the volume is changed when using up/down volume commands.
- </li>
- <li>volumeStepThreshold<br>
- Default: 7. When the volume is below this threshold, then the volumeStepSizeSmall setting is used for volume steps, rather than the normal volumeStepSize.
- </li>
- <li>volumeStepSizeSmall<br>
- 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.
- </li>
- <li>constraintDummy<br>
- 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.
- </li>
- <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.
- 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.
- <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>
- <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.
- </ul>
- </ul>
- <p><a name="Spotify"></a>
- <h3>Spotify</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Spotify'>DE</a>]</div>
- <ul>
- The <i>Spotify</i> module enables you to control your Spotify (Connect) playback.<br>
- 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>
- 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>
- 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>
- 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>
- <br>
- <a name="Spotify_define"></a>
- <p><b>Define</b></p>
- <ul>
- <code>define <name> Spotify <client_id> <client_secret> [ <redirect_url> ]</code><br>
- </ul>
- <br>
- <ul>
- Example: <code>define Spotify Spotify f88e5f5c2911152d914391592e717738 301b6d1a245e4fe01c2f8b4efd250756</code><br>
- </ul>
- <br>
- 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>
- 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>
- As soon as you obtained the code call <code>set <name> code <code></code> - your state should change to connected and you are ready to go.<br>
- <br>
- <a name="Spotify_set"></a>
- <p><b>set <required> [ <optional> ]</b></p>
- Without a target device given, the active device (or default device if <i>alwaysStartOnDefaultDevice</i> is enabled) will be used.<br>
- You can also use the name of the target device instead of the id if it does not contain spaces - where it states <i><device_id / device_name></i> spaces are allowed.<br>
- If no default device is defined and none is active, it will use the first available device.<br>
- You can get a spotify uri by pressing the share button in the spotify (desktop) app on a track/playlist/album.<br><br>
- <ul>
- <li>
- <i>findArtistByName</i><br>
- finds an artist using its name and returns the result to the readings
- </li>
- <li>
- <i>findTrackByName</i><br>
- finds a track using its name and returns the result to the readings
- </li>
- <li>
- <i>pause</i><br>
- pause the current playback
- </li>
- <li>
- <i>playArtistByName <artist_name> [ <device_id> ]</i><br>
- plays an artist using its name (uses search)
- </li>
- <li>
- <i>playContextByURI <context_uri> [ <nr_of_start_track> ] [ <device_id / device_name> ]</i><br>
- plays a context (playlist, album or artist) using a Spotify URI
- </li>
- <li>
- <i>playPlaylistByName <playlist_name> [ <device_id> ]</i><br>
- plays any playlist by providing a name (uses search)
- </li>
- <li>
- <i>playRandomTrackFromPlaylistByURI <playlist_uri> [ <limit> ] [ <device_id / device_name> ]</i><br>
- plays a random track from a playlist (only considering the first <i><limit></i> songs)
- </li>
- <li>
- <i>playSavedTracks [ <nr_of_start_track> ] [ <device_id / device_name> ]</i><br>
- plays the saved tracks (beginning with track <i><nr_of_start_track></i>)
- </li>
- <li>
- <i>playTrackByName <track_name> [ <device_id> ]</i><br>
- finds a song by its name and plays it
- </li>
- <li>
- <i>playTrackByURI <track_uri> [ <device_id / device_name> ]</i><br>
- plays a track using a track uri
- </li>
- <li>
- <i>repeat <track,context,off></i><br>
- sets the repeat mode: either <i>one</i>, <i>all</i> (meaning playlist or album) or <i>off</i>
- </li>
- <li>
- <i>resume [ <device_id / device_name> ]</i><br>
- resumes playback (on a device)
- </li>
- <li>
- <i>seekToPosition <position></i><br>
- seeks to the position <i><position></i> (in seconds, supported formats: 01:20, 80, 00:20, 20)
- </li>
- <li>
- <i>shuffle <off,on></i><br>
- sets the shuffle mode: either <i>on</i> or <i>off</i>
- </li>
- <li>
- <i>skipToNext</i><br>
- skips to the next track
- </li>
- <li>
- <i>skipToPrevious</i><br>
- skips to the previous track
- </li>
- <li>
- <i>togglePlayback</i><br>
- toggles the playback (resumes if paused, pauses if playing)
- </li>
- <li>
- <i>transferPlayback [ <device_id> ]</i><br>
- transfers the current playback to the specified device (or the next inactive device if not specified)
- </li>
- <li>
- <i>update</i><br>
- updates playback and devices
- </li>
- <li>
- <i>volume <volume> [ <device_id> ]</i><br>
- sets the volume
- </li>
- <li>
- <i>volumeDown [ <step> ] [ <device_id / device_name> ]</i><br>
- decreases the volume by <i>step</i> (if not set it uses <i>volumeStep</i>)
- </li>
- <li>
- <i>volumeFade <volume> [ <duration> <step> ] [ <device_id> ]</i><br>
- fades the volume
- </li>
- <li>
- <i>volumeDown [ <step> ] [ <device_id / device_name> ]</i><br>
- increases the volume by <i>step</i> (if not set it uses <i>volumeStep</i>)
- </li>
- </ul>
- <br>
- <a name="Spotify_get"></a>
- <p><b>Get</b></p>
- <ul>
- N/A
- </ul>
- <br>
- <a name="Spotify_attr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <i>alwaysStartOnDefaultDevice</i><br>
- always start new playback on the default device<br>
- default: 0
- </li>
- <li>
- <i>defaultPlaybackDeviceID</i><br>
- the prefered device by its id or device name<br>
- </li>
- <li>
- <i>disable</i><br>
- disables the device<br>
- default: 0
- </li>
- <li>
- <i>updateInterval</i><br>
- the interval to update your playback status while no music is running (in seconds)<br>
- default: 300
- </li>
- <li>
- <i>updateIntervalWhilePlaying</i><br>
- the interval to update your playback status while music is running (in seconds)<br>
- default: 10
- </li>
- <li>
- <i>volumeStep</i><br>
- the value by which the volume is in-/decreased by default (in percent)<br>
- default: 5
- </li>
- </ul>
- </ul>
- <p><a name="TBot_List"></a>
- <h3>TBot_List</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TBot_List'>DE</a>]</div>
- <ul>
- This module connects for allowing inline keyboard interactions between a telegramBot and PostMe lists.
-
- <br><br>
- <a name="TBot_Listdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TBot_List <PostMe device> <listname> </code>
- <br><br>
- Defines a TBot_List device, which will allow interaction between the telegrambot and the postme device
- <br><br>
- Example: <code>define testtbotlist TBot_List testposteme testlist</code><br>
- <br><br>
- 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>
- <br>
- </ul>
- <br><br>
-
- <a name="TBot_Listset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <what> [<value>]</code>
- <br>
- where <what> / <value> is one of
- <br><br>
- <li><code>start <telegrambot name> [ <peerid> ]</code><br>Initiate a new dialog for the given peer (or the last peer sending a message on the given telegrambot)
- </li>
- <li><code>end <telegrambot name> <peerid></code><br>Finalize a new dialog for the given peer on the given telegrambot
- </li>
-
- </ul>
- <br><br>
- <a name="TBot_Listget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <what> [<value>]</code>
- <br>
- where <what> / <value> is one of
- <br><br>
- <li><code>queryAnswer <telegrambot name> <peerid> <queryData> </code><br>Get the queryAnswer for the given query data in the dialog (will be called internally by the telegramBot on receiving querydata)
- </li>
-
- <li><code>textList</code><br>Returns a multiline string containing the list elements or <Leer>
- </li>
-
- <li><code>list</code><br>Returns a multiline string containing the list elements or an empty String
- </li>
-
- </ul>
- <br><br>
- <a name="TBot_Listattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li><code>telegramBots <list of telegramBot names separated by space></code><br>This attribute takes the names of telegram bots, that are monitored by this Tbot_List device
- </li>
- <li><code>optionDouble <1 or 0></code><br>Specify if the list shall be done in two columns (double=1) or in a single column (double=0 or not set).
- </li>
-
- <li><code>allowedPeers <list of peer ids></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).
- </li>
- <li><code>handleUnsolicited <1 or 0></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.
- </li>
-
- <li><code>confirmDelete <1 or 0></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.
- </li>
-
- <li><code>deleteOnly <1 or 0></code><br>If set to 1 the bot will only allow deletion of entries or the complete list (no new entries or entry text can be changed - neither sorting or similar will be possible). Default is 0 (all changes allowed).
- </li>
-
- </ul>
- <br><br>
- <a name="TBot_Listreadings"></a>
- <b>Readings</b>
-
- <ul>
- <li>currently none</li>
-
- <br>
-
- </ul>
- <br><br>
- </ul>
- <p><a name="TCM"></a>
- <h3>TCM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TCM'>DE</a>]</div>
- <ul>
- The TCM module serves an USB or TCP/IP connected TCM 120 or TCM 310x, TCM 410J
- EnOcean Transceiver module. These are mostly packaged together with a serial to USB
- chip and an antenna, e.g. the BSC BOR contains the TCM 120, the <a
- href="http://www.enocean.com/de/enocean_module/usb-300-oem/">USB 300</a> from
- EnOcean and the EUL from busware contains a TCM 310. See also the datasheet
- available from <a href="http://www.enocean.com">www.enocean.com</a>.
- <br>
- As the TCM 120 and the TCM 310, TCM 410J speak completely different protocols, this
- module implements 2 drivers in one. It is the "physical" part for the <a
- href="#EnOcean">EnOcean</a> module.<br><br>
- Please note that EnOcean repeaters also send Fhem data telegrams again. Use
- <code>attr <name> <a href="#blockSenderID">blockSenderID</a> own</code>
- to block receiving telegrams with TCM SenderIDs.<br>
- The address range used by your transceiver module, can be found in the
- parameters BaseID and LastID.
- <br><br>
- The transceiver moduls do not always support all commands. The supported range
- of commands depends on the hardware and the firmware version. A firmware update
- is usually not provided.
- <br><br>
- The TCM module enables also a wired connection to Eltako actuators over the
- Eltako RS485 bus in the switchboard or distribution box via Eltako FGW14 RS232-RS485
- gateway modules. These actuators are linked to an associated wireless antenna module
- (FAM14) on the bus. The FAM14 device frequently polls the actuator status of all
- associated devices if the FAM14 operating mode rotary switch is on position 4.
- Therefore, actuator states can be retrieved more reliable, even after any fhem downtime,
- when switch events or actuator confirmations could not have been tracked during the
- downtime. As all actuators are polled approx. every 1-2 seconds, it should be avoided to
- use event-on-update-reading. Use instead either event-on-change-reading or
- event-min-interval.
- The Eltako bus uses the EnOcean Serial Protocol version 2 (ESP2). For this reason,
- a FGW14 can be configured as a ESP2. The attribute <a href="#TCM_comType">comType</a>
- must be set to RS485.<br><br>
- <a name="TCMdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TCM [ESP2|ESP3] <device></code> <br>
- <br>
- First you have to specify the type of the EnOcean Transceiver Chip, i.e
- either ESP2 for the TCM 120 or ESP3 for the TCM 310x, TCM 410J, USB 300, USB400J.<br><br>
- <code>device</code> can take the same parameters (@baudrate, @directio,
- TCP/IP, none) like the <a href="#CULdefine">CUL</a>, but you probably have
- to specify the baudrate: the TCM 120 should be opened with 9600 Baud, the
- TCM 310 with 57600 baud. For Eltako FGW14 devices, type has to be set to 120 and
- the baudrate has to be set to 57600 baud if the FGW14 operating mode
- rotary switch is on position 6.<br><br>
- Example:
- <ul><code>
- define BscBor TCM ESP2 /dev/ttyACM0@9600<br>
- define FGW14 TCM ESP2 /dev/ttyS3@57600<br>
- define TCM310 TCM ESP3 /dev/ttyACM0@57600<br>
- define TCM310 TCM ESP3 COM1@57600 (Windows)<br>
- </code></ul>
- </ul>
- <br>
- <a name="TCMset"></a>
- <b>Set</b><br>
- <ul><b>ESP2 (TCM 120)</b><br>
- <li>baseID [FF800000 ... FFFFFF80]<br>
- Set the BaseID.<br>
- Note: The firmware executes this command only up to then times to prevent misuse.</li>
- <li>modem_off<br>
- Deactivates TCM modem functionality</li>
- <li>modem_on [0000 ... FFFF]<br>
- Activates TCM modem functionality and sets the modem ID</li>
- <li>teach <t/s><br>
- Set Fhem in learning mode, see <a href="#TCM_learningMode">learningMode</a>.<br>
- The command is always required for UTE and to teach-in bidirectional actuators
- e. g. EEP 4BS (RORG A5-20-XX),
- see <a href="#EnOcean_teach-in">Teach-In / Teach-Out</a>.</li>
- <li>reset<br>
- Reset the device</li>
- <li>sensitivity [00|01]<br>
- Set the TCM radio sensitivity: low = 00, high = 01</li>
- <li>sleep<br>
- Enter the energy saving mode</li>
- <li>wake<br>
- Wakes up from sleep mode</li>
- <br>
- For details see the TCM 120 User Manual available from <a href="http://www.enocean.com">www.enocean.com</a>.
- <br><br>
- </ul>
- <ul><b>ESP3 (TCM 310x, TCM 410J, USB 300, USB400J)</b><br>
- <li>baseID [FF800000 ... FFFFFF80]<br>
- Set the BaseID.<br>
- Note: The firmware executes this command only up to then times to prevent misuse.</li>
- <li>baudrate [00|01|02|03]<br>
- Modifies the baud rate of the EnOcean device.<br>
- baudrate = 00: 56700 baud (default)<br>
- baudrate = 01: 115200 baud<br>
- baudrate = 02: 230400 baud<br>
- baudrate = 03: 460800 baud</li>
- <li>bist<br>
- Perform Flash BIST operation (Built-in-self-test).</li>
- <li>filterAdd <FilterType><FilterValue><FilterKind><br>
- Add filter to filter list. Description of the filter parameters and examples, see
- <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
- <li>filterDel <FilterType><FilterValue><br>
- Del filter from filter list. Description of the filter parameters, see
- <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
- <li>filterDelAll<br>
- Del all filter from filter list.</li>
- <li>filterEnable <FilterON/OFF><FilterOperator><br>
- Enable/Disable all supplied filters. Description of the filter parameters, see
- <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
- <li>init<br>
- Initialize serial communication and transceiver configuration</li>
- <li>maturity [00|01]<br>
- Waiting till end of maturity time before received radio telegrams will transmit:
- radio telegrams are send immediately = 00, after the maturity time is elapsed = 01</li>
- <li>mode [00|01]<br>
- mode = 00: Compatible mode - ERP1 - gateway uses Packet Type 1 to transmit and receive radio telegrams<br>
- mode = 01: Advanced mode - ERP2 - gateway uses Packet Type 10 to transmit and receive radio telegrams
- (for FSK products with advanced protocol)</li>
- <li>smartAckLearn <t/s><br>
- Set Fhem in Smart Ack learning mode.<br>
- The post master fuctionality must be activated using the command <code>smartAckMailboxMax</code> in advance.<br>
- The simple learnmode is supported, see <a href="#TCM_smartAckLearnMode">smartAckLearnMode</a><br>
- A device, which is then also put in this state is to paired with
- Fhem. Bidirectional learn in for 4BS, UTE and Generic Profiles are supported.<br>
- <code>t/s</code> is the time for the learning period.</li>
- <li>smartAckMailboxMax 0..20<br>
- Enable the post master fuctionality and set amount of mailboxes available, 0 = disable post master functionality.
- Maximum 28 mailboxes can be created. This upper limit is for each firmware restricted and may be smaller.</li>
- <li>teach <t/s><br>
- 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>
- The command is always required for STE, GB, UTE and to teach-in bidirectional actuators
- e. g. EEP 4BS (RORG A5-20-XX)</li>
- <li>reset<br>
- Reset the device</li>
- <li>repeater [0000|0101|0102]<br>
- Set Repeater Level: off = 0000, 1 = 0101, 2 = 0102.</li>
- <li>sleep <t/10 ms> (Range: 00000000 ... 00FFFFFF)<br>
- Enter the energy saving mode</li>
- <li>subtel [00|01]<br>
- Transmitting additional subtelegram info: Enable = 01, Disable = 00</li>
- <br>
- For details see the EnOcean Serial Protocol 3 (ESP3) available from
- <a href="http://www.enocean.com">www.enocean.com</a>.
- <br><br>
- </ul>
- <a name="TCMget"></a>
- <b>Get</b><br>
- <ul><b>TCM 120</b><br>
- <li>baseID<br>
- Get the BaseID. You need this command in order to control EnOcean devices,
- see the <a href="#EnOceandefine">EnOcean</a> paragraph.
- </li>
- <li>modem_status<br>
- Requests the current modem status.</li>
- <li>sensitivity<br>
- Get the TCM radio sensitivity, low = 00, high = 01</li>
- <li>version<br>
- Read the device SW version / HW version, chip-ID, etc.</li>
- <br>
- For details see the TCM 120 User Manual available from <a href="http://www.enocean.com">www.enocean.com</a>.
- <br><br>
- </ul>
- <ul><b>TCM 310</b><br>
- <li>baseID<br>
- Get the BaseID. You need this command in order to control EnOcean devices,
- see the <a href="#EnOceandefine">EnOcean</a> paragraph.</li>
- <li>filter<br>
- Get supplied filters. Description of the filter parameters, see
- <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
- <li>freqencyInfo<br>
- Reads Frequency and protocol of the Device, see
- <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
- <li>numSecureDev<br>
- Read number of teached in secure devices.</li>
- <li>repeater<br>
- Read Repeater Level: off = 0000, 1 = 0101, 2 = 0102.</li>
- <li>smartAckLearnMode<br>
- Get current smart ack learn mode<br>
- Enable: 00|01 = off|on<br>
- Extended: 00|01|02 = simple|advance|advanceSelectRep</li>
- <li>smartAckLearnedClients<br>
- Get information about the learned smart ack clients</li>
- <li>stepCode<br>
- Reads Hardware Step code and Revision of the Device, see
- <a href="https://www.enocean.com/esp">EnOcean Serial Protocol 3 (ESP3)</a></li>
- <li>version<br>
- Read the device SW version / HW version, chip-ID, etc.</li>
- <br>
- For details see the EnOcean Serial Protocol 3 (ESP3) available from
- <a href="http://www.enocean.com">www.enocean.com</a>.
- <br><br>
- </ul>
- <a name="TCMattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="TCM_blockSenderID">blockSenderID</a> <own|no>,
- [blockSenderID] = own is default.<br>
- Block receiving telegrams with a TCM SenderID sent by repeaters.
- </li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a name="TCM_baseID">baseID</a> <FF800000 ... FFFFFF80>,
- [baseID] = <none> is default.<br>
- Set Transceiver baseID and override automatic allocation. Use this attribute only if the IODev does not allow automatic allocation.
- </li>
- <li><a name="TCM_fingerprint">fingerprint</a> <off|on>,
- [fingerprint] = off is default.<br>
- Activate the fingerprint function. The fingerprint function eliminates multiple identical data telegrams received via different TCM modules.<br>
- The function must be activated for each TCM module.
- </li>
- <li><a name="TCM_comModeUTE">comModeUTE</a> <auto|biDir|uniDir>,
- [comModeUTE] = auto is default.<br>
- Presetting the communication method of actuators that be taught using the UTE teach-in. The automatic selection of the
- communication method should only be overwrite manually, if this is explicitly required in the operating instructions of
- the actuator. The parameters should then be immediately re-set to "auto".
- </li>
- <li><a name="TCM_comType">comType</a> <TCM|RS485>,
- [comType] = TCM is default.<br>
- Type of communication device
- </li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a name="TCM_learningMode">learningMode</a> <always|demand|nearfield>,
- [learningMode] = demand is default.<br>
- Learning method for automatic setup of EnOcean devices:<br>
- [learningMode] = always: Teach-In/Teach-Out telegrams always accepted, with the exception of bidirectional devices<br>
- [learningMode] = demand: Teach-In/Teach-Out telegrams accepted if Fhem is in learning mode, see also <code>set <IODev> teach <t/s></code><br>
- [learningMode] = nearfield: Teach-In/Teach-Out telegrams accepted if Fhem is in learning mode and the signal strength RSSI >= -60 dBm.<be>
- </li>
- <li><a name="TCM_sendInterval">sendInterval</a> <0 ... 250><br>
- ESP2: [sendInterval] = 100 ms is default.<br>
- ESP3: [sendInterval] = 0 ms is default.<br>
- Smallest interval between two sending telegrams
- </li>
- <li><a name="TCM_smartAckLearnMode">smartAckLearnMode</a> <simple|advance|advanceSelectRep><br>
- select Smart Ack learn mode; only simple supported by Fhem
- </li>
- <li><a name="TCM_smartAckMailboxMax">smartAckMailboxMax</a> <0 ... 28><br>
- Amount of mailboxes available, 0 = disable post master functionality.
- Maximum 28 mailboxes can be created. This upper limit is for each firmware restricted and may be smaller.
- </li>
- <li><a href="#verbose">verbose</a></li>
- <br><br>
- </ul>
- <a name="TCMevents"></a>
- <b>Generated events</b>
- <ul>
- <li>baseID <transceiver response></li>
- <li>maturity 00|01</li>
- <li>modem_status <transceiver response></li>
- <li>numSecureDev <transceiver response></li>
- <li>repeater 0000|0101|0102</li>
- <li>sensitivity 00|01</li>
- <li>version <transceiver response></li>
- <li>state: opend|initialized</li>
- <br><br>
- </ul>
- </ul>
- <p><a name="TEK603"></a>
- <h3>TEK603</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TEK603'>DE</a>]</div>
- <ul>
- The TEK603 is a fhem module for the Tekelek TEK603 Eco Monitor a liquid level monitor designed for residential and small commercial applications.
- It works in conjunction with a TEK653 Sonic transmitter mounted on the top of the tank.
- <br /><br /><br />
- <b>Prerequisites</b><br>
- The module requires the perl module Digest::CRC<br />
- On a debian based system the module can be installed with<br />
- <code>
- sudo apt-get install libdigest-crc-perl<br />
- </code>
- <br /><br />
- <a name="TEK603_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TEK603 /dev/ttyUSBx</code><br />
- <br />
- Defines an TEK603 Eco Monitor device connected to USB.<br /><br />
- Examples:
- <ul>
- <code>define OelTank TEK603 /dev/ttyUSB0</code><br />
- </ul>
- </ul><br />
- <a name="TEK603_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>Time<br />
- TEK603 internal Time</li>
- <li>Temperature<br />
- Sensor Temperature</li>
- <li>Ullage<br />
- Sensor Measured Ullage</li>
- <li>RemainingUsableLevel<br />
- This is the usable level, with deductions due to the sensor offset and outlet height. (Liters)</li>
- <li>RemainingUsablePercent<br />
- This is the usable level in percent (calculated from RemainingUsableLevel and TotalUsableCapacity)</li>
- <li>TotalUsableCapacity<br />
- This is the usable volume, with deductions due to the sensor offset and outlet height. (Liters)</li>
- </ul><br />
- </ul><br />
- <p><a name="THINKINGCLEANER" id="THINKINGCLEANER"></a>
- <h3>THINKINGCLEANER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#THINKINGCLEANER'>DE</a>]</div>
- <ul>
- This module provides support for <a href="http://www.thinkingcleaner.com/">ThinkingCleaner</a> hardware add-on module for Roomba cleaning robots.
- <br><br>
- <a name="THINKINGCLEANERdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> THINKINGCLEANER <IP-ADRESS or HOSTNAME></code>
- <br><br>
- Example:
- <ul><br>
- <code>define Robby THINKINGCLEANER 192.168.0.35</code><br>
- </ul>
- <br>
- </ul>
- <br><br>
- <a name="THINKINGCLEANERset"></a>
- <b>Set</b>
- <ul>
- <li>cleaningDelay - sets cleaning delay in minutes when using on-delayed cleaning</li>
- <li>damageProtection - turns damage protection on or off while sending remotrControl commands (on/off)</li>
- <li>dock - Send Roomba back to it's docking station</li>
- <li>locate - Play sound to help finding Roomba</li>
- <li>off - Stop/pause cleaning</li>
- <li>on - Start cleaning</li>
- <li>on-delayed - Delayed start for cleaning according to cleaningDelay</li>
- <li>on-max - Start cleaning with max setting</li>
- <li>on-spot - Start spot cleaning</li>
- <li>power - Turn Roomba on or off (on/off)</li>
- <li>remoteControl - Send remote control commands</li>
- <li>scheduleAdd - Add new cleaning schedule</li>
- <li>scheduleDel - Delete existing cleaning schedule</li>
- <li>scheduleMod - Modify existing cleaning schedule</li>
- <li>statusRequest - Update device readings</li>
- <li>toggle - Toogle between on and off</li>
- <li>undock - Let Roomba leave it's docking station</li>
- <li>vacuumDrive - Enable or disable vaccuming during remoteControl commands (on/off)</li>
- </ul>
- <br><br>
- <a name="THINKINGCLEANERattr"></a>
- <b>Attributes</b>
- <ul>
- <li>pollInterval - Set regular polling interval in minutes (defaults to 45s)</li>
- <li>pollMultiplierCleaning - Change interval multiplier used during cleaning (defaults to 0.5)</li>
- <li>pollMultiplierWebhook - Change interval multiplier used during standby and webhook being enabled (defaults to 2)</li>
- <li>webhookFWinstance - Set FHEMWEB instance for incoming webhook events used by Roomba (mandatory for webhook)</li>
- <li>webhookHttpHostname - Set HTTP Hostname or IP address for incoming webhook events used by Roomba (mandatory for webhook)</li>
- <li>webhookPort - Use different port instead of what defined FHEMWEB instance uses (optional)</li>
- </ul>
- <br><br>
- </ul>
- <p><a name="THRESHOLD"></a>
- <h3>THRESHOLD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#THRESHOLD'>DE</a>]</div>
- <ul>
- Diverse controls can be realized by means of the module by evaluation of sensor data.
- 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.
- A typical application is the simulation of a thermostat or humidistat.<br>
- <br>
- With one or more such modules, complex systems can be implemented for heating, cooling, ventilation, dehumidification or shading.
- 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.
- This leads to quickly create and clear controls, without having to necessarily go into the Perl matter.<br>
- Some application examples are at the end of the module description.<br>
- <br>
- According to the definition of a module type THRESHOLD eg:<br>
- <br>
- <code>define <name> THRESHOLD <sensor> <actor></code><br>
- <br>
- It is controlled by setting a desired value with:<br>
- <br>
- <code>set <name> desired <value></code><br>
- <br>
- The module begins with the control system only when a desired value is set!<br>
- <br>
- The specification of the desired value may also come from another sensor. This control may take place by the comparison of two sensors.<br>
- <br>
- Likewise, any wall thermostats can be used (eg, HM, MAX, FHT) for the definition of the reference temperature.<br>
- <br>
- The switching behavior can also be influenced by another sensor or sensor group.<br>
- <br>
- The combination of multiple THRESHOLD modules together is possible, see examples below.<br>
- <br>
- </ul>
- <a name="THRESHOLDdefine"></a>
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> THRESHOLD <sensor>:<reading>:<hysteresis>:<target_value>:<offset> AND|OR <sensor2>:<reading2>:<state> <actor>|<cmd1_gt>|<cmd2_lt>|<cmd_default_index>|<state_cmd1_gt>:<state_cmd2_lt>|<state_format></code><br>
- <br>
- <br>
- <li><b>sensor</b><br>
- a defined sensor in FHEM
- </li>
- <br>
- <li><b>reading</b> (optional)<br>
- reading of the sensor, which includes a value in decimal<br>
- default value: temperature
- </li>
- <br>
- <li><b>hysteresis</b> (optional)<br>
- Hysteresis, this provides the threshold_min = desired_value - hysteresis<br>
- default value: 1 at temperature, 10 at huminity
- </li>
- <br>
- <li><b>target_value</b> (optional)<br>
- number: Initial value, if no value is specified, it must be set with "set desired value".<br>
- else:<sensorname>:<reading>, an additional sensor can be specified, which sets the target value dynamically.<br>
- default value: no value
- </li>
- <br>
- <li><b>offset</b> (optional)<br>
- Offset to desired value<br>
- This results:<br>
- threshold_max = desired_value + offset and threshold_min = desired_value - hysteresis + offset<br>
- Defaultwert: 0<br>
- </li>
- <br>
- <br>
- <li><b>AND|OR</b> (optional)<br>
- logical operator with an optional second sensor<br>
- </li>
- <br>
- <li><b>sensor2</b> (optional, nur in Verbindung mit AND oder OR)<br>
- the second sensor
- </li>
- <br>
- <li><b>reading2</b> (optional)<br>
- reading of the second sensor<br>
- default value: state
- </li>
- <br>
- <li><b>state</b> (optional)<br>
- state of the second sensor<br>
- default value: open
- </li><br>
- <br>
- <li><b>actor</b> (optional)<br>
- actor device defined in FHEM
- </li>
- <br>
- <li><b>cmd1_gt</b> (optional)<br>
- 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>
- default value: set actor off, if actor defined
- </li>
- <br>
- <li><b>cmd2_lt</b> (optional)<br>
- 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>
- default value: set actor on, if actor defined
- </li>
- <br>
- <li><b>cmd_default_index</b> (optional)<br>
- Index of command that is executed after setting the desired value until the desired value or threshold_min value is reached.<br>
- 0 - no command<br>
- 1 - cmd1_gt<br>
- 2 - cmd2_lt<br>
- default value: 2, if actor defined, else 0<br>
- </li>
- <br>
- <li><b>state_cmd1_gt</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
- 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.
- <br>
- default value: none
- </li>
- <br>
- <li><b>state_cmd2_lt</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
- 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.
- <br>
- default value: none
- </li>
- <br>
- <li><b>state_format</b> (optional, is defined as an attribute at the same time and can be changed there)<br>
- Format of the state output: arbitrary text with placeholders.<br>
- Possible placeholders:<br>
- _m: mode<br>
- _dv: desired_value<br>
- _s1v: sensor_value<br>
- _s2s: sensor2_state<br>
- _sc: state_cmd<br>
- Default value: _m _dv _sc, _sc when state_cmd1_gt and state_cmd2_lt set without actor.<br><br>
- </li>
- <br>
- <b><u>Examples:</u></b><br>
- <br>
- Example for heating:<br>
- <br>
- It is heated up to the desired value of 20. If the value below the threshold_min value of 19 (20-1)
- the heating is switched on again.<br>
- <br>
- <code>define thermostat THRESHOLD temp_sens heating</code><br>
- <br>
- <code>set thermostat desired 20</code><br>
- <br>
- <br>
- Example for heating with window contact:<br>
- <br>
- <code>define thermostat THRESHOLD temp_sens OR win_sens heating</code><br>
- <br>
- <br>
- Example for heating with multiple window contacts:<br>
- <br>
- <code>define W_ALL structure W_type W1 W2 W3 ....</code><br>
- <code>attr W_ALL clientstate_behavior relative</code><br>
- <code>attr W_ALL clientstate_priority open closed</code><br>
- <br>
- then: <br>
- <br>
- <code>define thermostat THRESHOLD S1 OR W_ALL heating</code><br>
- <br>
- <br>
- More examples for dehumidification, air conditioning, watering:<br>
- <br>
- <code>define hygrostat THRESHOLD hym_sens:humidity dehydrator|set @ on|set @ off|1</code><br>
- <code>define hygrostat THRESHOLD hym_sens:humidity AND Sensor2:state:close dehydrator|set @ on|set @ off|1</code><br>
- <code>define thermostat THRESHOLD temp_sens:temperature:1 aircon|set @ on|set @ off|1</code><br>
- <code>define thermostat THRESHOLD temp_sens AND Sensor2:state:close aircon|set @ on|set @ off|1</code><br>
- <code>define hygrostat THRESHOLD hym_sens:humidity:20 watering|set @ off|set @ on|2</code><br>
- <br>
- <br>
- It can also FHEM/perl command chains are specified:<br>
- <br>
- Examples:<br>
- <br>
- <code>define thermostat THRESHOLD sensor |set Switch1 on;;set Switch2 on|set Switch1 off;;set Switch2 off|1</code><br>
- <code>define thermostat THRESHOLD sensor alarm|{Log 2,"value is exceeded"}|set @ on;;set Switch2 on</code><br>
- <code>define thermostat THRESHOLD sensor ||{Log 2,"value is reached"}|</code><br>
- <br>
- <br>
- Examples of the reference input by another sensor:<br>
- <br>
- 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>
- <br>
- <code>define TH_water_circulation THRESHOLD return_w:temperature:4:water_storage:temperature:-5 circualtion_pump</code><br>
- <br>
- Control of heating by a wall thermostat with acquisition the desired and actual temperature from the wall thermostat:<br>
- <br>
- <code>define TH_heating THRESHOLD WT:measured-temp:1:WT:desired-temp heating</code><br>
- <br>
- <code>set TH_heating desired 17</code> overrides the desired-values from the wall thermostat until called <code>set TH_heating external</code><br>
- <br>
- <br>
- Examples of customized state output:<br>
- <br>
- <code>define thermostat THRESHOLD sensor aircon|set @ on|set @ off|2|on:off</code><br>
- <br>
- <br>
- Example of state output (eg for state evaluation in other modules) without executing code:<br>
- <br>
- <code>define thermostat THRESHOLD sensor:temperature:0:30</code><br>
- <br>
- by reason of default values��:<br>
- <br>
- <code>define thermostat THRESHOLD sensor:temperature:0:30||||off:on|_sc</code><br>
- <br>
- <br>
- Example of combining several THRESHOLD modules together:<br>
- <br>
- It should be heated when the room temperature drops below 21 degrees and the outside temperature is below 15 degrees:<br>
- <br>
- <code>define TH_outdoor THRESHOLD outdoor:temperature:0:15</code><br>
- <code>define TH_room THRESHOLD indoor OR TH_outdoor:state:off heating</code><br>
- <code>set TH_room desired 21</code><br>
- <br>
- <br>
- An example of time-dependent heating in combination with DOIF module:<br>
- <br>
- <code>define TH_room THRESHOLD T_living_room heating</code><br>
- <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>
- <br>
- <br>
- Examples of customized state output:<br>
- <br>
- State output: <mode> <state_cmd> <desired_value> <sensor_value><br>
- <br>
- <code>define TH_living_room THRESHOLD T_living_room heating|set @ off|set @ on|2|off:on|_m _sc _dv _s1v</code><br>
- <br>
- or<br>
- <br>
- <code>define TH_living_room THRESHOLD T_living_room heating</code><br>
- <code>attr TH_living_room state_cmd1_gt off</code><br>
- <code>attr TH_living_room state_cmd2_lt on</code><br>
- <code>attr TH_living_room state_format _m _sc _dv _s1v</code><br>
- <br>
- </ul>
- <a name="THRESHOLDset"></a>
- <b>Set </b>
- <ul>
- <li> <code>set <name> desired <value><br></code>
- Set the desired value. If no desired value is set, the module is not active.
- </li>
- <br>
- <li><code>set <name> deactivated <command><br></code>
- Module is disabled.<br>
- <command> is optional. It can be "cmd1_gt" or "cmd2_lt" passed in order to achieve a defined state before disabling the module.
- </li>
- <br>
- <li> <code>set <name> active <value><br></code>
- 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".
- </li>
- <br>
- <li><code>set <name> externel<br></code>
- Module is activated, reference input comes from the target sensor, if a sensor has been defined under target_value.<br>
- </li>
- <br>
- <li> <code>set <name> hysteresis <value><br></code>
- Set hysteresis value.
- </li>
- <br>
- <li><code>set <name> offset <value><br></code>
- Set offset value.<br>
- Defaultwert: 0
- </li>
- <br>
- <li><code>set <name> cmd1_gt</code><br>
- Executes the command defined in cmd1_gt.<br>
- </li>
- <br>
- <li><code>set <name> cmd2_lt</code><br>
- Executes the command defined in cmd2_lt.<br>
- </li>
- </ul>
- <br>
- <a name="THRESHOLDget"></a>
- <b>Get </b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="THRESHOLDattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- <li>state_cmd1_gt</li>
- <li>state_cmd2_lt</li>
- <li>state_format</li>
- <li>number_format</li>
- The specified format is used in the state for formatting desired_value (_dv) and Sensor_value (_s1v) using the sprintf function.<br>
- The default value is "% .1f" to one decimal place. Other formatting, see Formatting in the sprintf function in the Perldokumentation.<br>
- If the attribute is deleted, numbers are not formatted in the state.<br>
- <li>target_func</li>
- Here, a Perl expression used to calculate a target value from a value of the external sensor.<br>
- The sensor value is given as "_tv" in the expression.<br>
- Example:<br>
- <code>attr TH_heating target_func -0.578*_tv+33.56</code><br>
- <li>setOnDeactivated</li>
- Command to be executed before deactivating. Possible values: cmd1_gt, cmd2_lt<br>
- <li>desiredActivate</li>
- 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>
- </ul>
- <br>
-
- <p><a name="THZ"></a>
- <h3>THZ</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#THZ'>DE</a>]</div>
- <ul>
- 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>
- 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>
- Tested on a LWZ404 (with serial speed 115200) with Firmware 5.39. <br>
- Tested on fritzbox, nas-qnap, raspi and macos.<br>
- Implemented: read of status parameters and read/write of configuration parameters.
- A complete description can be found in the 00_THZ wiki http://www.fhemwiki.de/wiki/Tecalor_THZ_Heatpump
- <br><br>
- <a name="THZdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> THZ <device></code> <br>
- <br>
- <code>device</code> can take the same parameters (@baudrate, @directio,
- TCP/IP, none) like the <a href="#CULdefine">CUL</a>, e.g 57600 baud or 115200.<br>
- Example:
- direct connection
- <ul><code>
- define Mytecalor THZ /dev/ttyUSB0@115200<br>
- </code></ul>
- or network connection (like via ser2net)<br>
- <ul><code>
- define Myremotetecalor THZ 192.168.0.244:2323
- </code></ul>
- <br>
- <ul><code>
- define Mythz THZ /dev/ttyUSB0@115200 <br>
- define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz <br>
- attr Mythz event-min-interval s.*:4800 <br>
- attr Mythz event-on-change-reading .* <br>
- attr Mythz interval_sDHW 400 <br>
- attr Mythz interval_sElectrDHWDay 2400 <br>
- attr Mythz interval_sElectrDHWTotal 43200 <br>
- attr Mythz interval_sGlobal 400 <br>
- attr Mythz interval_sHC1 400 <br>
- attr Mythz interval_sHeatDHWDay 2400 <br>
- attr Mythz interval_sHeatDHWTotal 43200 <br>
- attr Mythz interval_sHeatRecoveredDay 2400 <br>
- attr Mythz interval_sHeatRecoveredTotal 43200 <br>
- attr Mythz interval_sHistory 86400 <br>
- attr Mythz interval_sLast10errors 86400 <br>
- attr Mythz room pompa <br>
- attr FileLog_Mythz room pompa <br>
- </code></ul>
- <br>
- If the attributes interval_XXXX are not defined (or 0 seconds), their internal polling is disabled.
- <br>
- This module is starting to support older firmware 2.06 or newer firmware 5.39; the following attribute adapts decoding <br>
- <br>
- <ul><code>
- attr Mythz firmware 2.06 <br>
- </code></ul>
- <br>
- <br>
- <ul><code>
- attr Mythz firmware 5.39 <br>
- </code></ul>
- <br>
- If no attribute firmware is set, it is assumed your firmware is compatible with 4.39.
- <br>
- A backup function has been implemented
- <ul><code>
- get Mythz zBackupParameters implemented
- </code></ul>
- The command saves all pXXX in a backupfile with a special text format.
- All (or some) parameters can be easily restored with one copy&paste from the backupfile in a telnet fhem session.
- </ul>
- <br>
- </ul>
-
- <p><a name="TPLinkHS110"></a>
- <h3>TPLinkHS110</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TPLinkHS110'>DE</a>]</div>
- <ul>
- <br>
- <a name="TPLinkHS110"></a>
- <b>Define</b>
- <code>define <name> TPLinkHS110 <ip/hostname></code><br>
- <br>
- Defines a TP-Link HS100 or HS110 wifi-controlled switchable power outlet.<br>
- The difference between HS100 and HS110 is, that the HS110 provides realtime measurments of<br>
- power, current and voltage.<br>
- This module automatically detects the modul defined and adapts the readings accordingly.<br>
- <br><br>
- This module does not implement all functions of the HS100/110.<br>
- Currently, all parameters relevant for running the outlet under FHEM are processed.<br>
- Writeable are only "On", "Off" and the nightmode (On/Off) (Nightmode: the LEDs of the outlet are switched off).<br>
- Further programming of the outlet should be done by TPLinks app "Kasa", which funtionality is partly redundant<br>
- with FHEMs core functions.
- <p>
- <b>Attributs</b>
- <ul>
- <li><b>interval</b>: The interval in seconds, after which FHEM will update the current measurements. Default: 300s</li>
- An update of the measurements is done on each switch (On/Off) as well.
- <p>
- <li><b>timeout</b>: Timeout in seconds used while communicationg with the outlet. Default: 1s</li>
- <i>Warning:</i>: the timeout of 1s is chosen fairly aggressive. It could lead to errors, if the outlet is not answerings the requests
- within this timeout.<br>
- Please consider, that raising the timeout could mean blocking the whole FHEM during the timeout!
- <p>
- <li><b>disable</b>: The execution of the module is suspended. Default: no.</li>
- <i>Warning: if your outlet is not on or not connected to the wifi network, consider disabling this module
- by the attribute "disable". Otherwise the cyclic update of the outlets measurments will lead to blockings in FHEM.</i>
- </ul>
- <p>
- <b>Requirements</b>
- <ul>
- This module uses the follwing perl-modules:<br><br>
- <li> Perl Module: IO::Socket::INET </li>
- <li> Perl Module: IO::Socket::Timeout </li>
- </ul>
- </ul>
- <p><a name="TRAFFIC"></a>
- <h3>TRAFFIC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TRAFFIC'>DE</a>]</div>
- <ul>
- <u><b>TRAFFIC - google maps directions module</b></u>
- <br>
- <br>
- This FHEM module collects and displays data obtained via the google maps directions api<br>
- requirements:<br>
- perl JSON module<br>
- perl LWP::SIMPLE module<br>
- perl MIME::Base64 module<br>
- Google maps API key<br>
- <br>
- <b>Features:</b>
- <br>
- <ul>
- <li>get distance between start and end location</li>
- <li>get travel time for route</li>
- <li>get travel time in traffic for route</li>
- <li>define additional waypoints</li>
- <li>calculate delay between travel-time and travel-time-in-traffic</li>
- <li>choose default language</li>
- <li>disable the device</li>
- <li>5 log levels</li>
- <li>get outputs in seconds / meter (raw_data)</li>
- <li>state of google maps returned in error reading (i.e. The provided API key is invalid)</li>
- <li>customize update interval (default 3600 seconds)</li>
- <li>calculate ETA with localtime and delay</li>
- <li>configure the output readings with attribute outputReadings, text, min sec</li>
- <li>configure the state-reading </li>
- <li>optionally display the same route in return</li>
- <li>one-time-burst, specify the amount and interval between updates</li>
- <li>different Travel Modes (driving, walking, bicycling and transit)</li>
- <li>flexible update schedule</li>
- <li>integrated Map to visualize configured route or embed to external GUI</li>
- </ul>
- <br>
- <br>
- <a name="TRAFFICdefine"></a>
- <b>Define:</b>
- <ul><br>
- <code>define <name> TRAFFIC <YOUR-API-KEY> [UPDATE-INTERVAL]</code>
- <br><br>
- example:<br>
- <code>define muc2berlin TRAFFIC ABCDEFGHIJKLMNOPQRSTVWYZ 600</code><br>
- </ul>
- <br>
- <br>
- <b>Attributes:</b>
- <ul>
- <li>"start_address" - Street, zipcode City <b>(mandatory)</b></li>
- <li>"end_address" - Street, zipcode City <b>(mandatory)</b></li>
- <li>"raw_data" - 0:1</li>
- <li>"alternatives" - 0:1, include alternative routes into readings and Map</li>
- <li>"language" - de, en etc.</li>
- <li>"waypoints" - Lat, Long coordinates, separated by | </li>
- <li>"returnWaypoints" - Lat, Long coordinates, separated by | </li>
- <li>"disable" - 0:1</li>
- <li>"stateReading" - name the reading which will be used in device state</li>
- <li>"outputReadings" - define what kind of readings you want to get: text, min, sec, average</li>
- <li>"updateSchedule" - define a flexible update schedule, syntax <starthour>-<endhour> [<day>] <seconds> , 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>
- <li>"travelMode" - default: driving, options walking, bicycling or transit </li>
- <li>"GoogleMapsStyle" - choose your colors from: default,silver,dark,night</li>
- <li>"GoogleMapsSize" - Map size in pixel, <width>,<height></li>
- <li>"GoogleMapsCenter" - Lat, Long coordinates of your map center, spearated by ,</li>
- <li>"GoogleMapsZoom" - sets your map zoom level</li>
- <li>"GoogleMapsStroke" - customize your map poly-strokes in color, weight and opacity <br> <hex-color-code>,[stroke-weight],[stroke-opacity],<hex-color-code-of-return>,[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>
- <li>"GoogleMapsTrafficLayer" - enable the basic Google Maps Traffic Layer</li>
- <li>"GoogleMapsDisableUI" - hide the map controls</li>
- </ul>
- <br>
- <br>
-
- <a name="TRAFFICreadings"></a>
- <b>Readings:</b>
- <ul>
- <li>alternatives</li>
- <li>delay</li>
- <li>delay_min</li>
- <li>distance</li>
- <li>duration</li>
- <li>duration_in_traffic</li>
- <li>duration_in_traffic_min</li>
- <li>duration_min</li>
- <li>error_message</li>
- <li>eta</li>
- <li>state</li>
- <li>summary</li>
- </ul>
- <br><br>
- <a name="TRAFFICset"></a>
- <b>Set</b>
- <ul>
- <li>update [burst-update-count] [burst-update-interval] - update readings manually</li>
- </ul>
- <br><br>
- </ul>
- <p><a name="TRX"></a>
- <h3>TRX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TRX'>DE</a>]</div>
- <ul>
- <table>
- This module is for the <a href="http://www.rfxcom.com">RFXCOM</a> RFXtrx433 USB based 433 Mhz RF transmitters.
- 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,
- AB600, Duewi, DomiaLite, COCO) and others. <br>
- Currently the following parser modules are implemented: <br>
- <ul>
- <li> 46_TRX_WEATHER.pm (see device <a href="#TRX">TRX</a>): Process messages Oregon Scientific weather sensors.
- See <a href="http://www.rfxcom.com/oregon.htm">http://www.rfxcom.com/oregon.htm</a> for a list of
- Oregon Scientific weather sensors that could be received by the RFXtrx433 tranmitter.
- 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>
- </li>
- <li> 46_TRX_SECURITY.pm (see device <a href="#TRX_SECURITY">TRX_SECURITY</a>): Receive X10, KD101 and Visonic security sensors.</li>
- <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:
- KlikAanKlikUit, NEXA, CHACON, HomeEasy UK.</li>
- </ul>
- <br>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module
- if the devices is connected via USB or a serial port.
- <br><br>
- <a name="TRXdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TRX <device> [noinit] </code><br>
- </ul>
- <br>
- USB-connected:<br><ul>
- <device> specifies the USB port to communicate with the RFXtrx433 receiver.
- Normally on Linux the device will be named /dev/ttyUSBx, where x is a number.
- For example /dev/ttyUSB0. Please note that RFXtrx433 normally operates at 38400 baud. You may specify the baudrate used after the @ char.<br>
- <br>
- Example: <br>
- <code>define RFXTRXUSB TRX /dev/ttyUSB0@38400</code>
- <br>
- </ul>
- <br>
- Network-connected devices:
- <br><ul>
- <device> specifies the host:port of the device. E.g.
- 192.168.1.5:10001
- </ul>
- <ul>
- noninit is optional and issues that the RFXtrx433 device should not be
- initialized. This is useful if you share a RFXtrx433 device via LAN. It is
- also useful for testing to simulate a RFXtrx433 receiver via netcat or via
- FHEM2FHEM.
- <br>
- <br>
- Example: <br>
- <code>define RFXTRXTCP TRX 192.168.1.5:10001</code>
- <br>
- <code>define RFXTRXTCP2 TRX 192.168.1.121:10001 noinit</code>
- <br>
- </ul>
- <br>
- </table>
- <a name="TRXattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li>longids<br>
- 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>
- Default is to use no long IDs.
- <br><br>
- Examples:<PRE>
- # Do not use any long IDs for any devices (this is default):
- attr RFXCOMUSB longids 0
- # Use long IDs for all devices:
- attr RFXCOMUSB longids 1
- # Use longids for BTHR918N devices.
- # Will generate devices names like BTHR918N_f3.
- attr RFXTRXUSB longids BTHR918N
- # Use longids for TX3_T and TX3_H devices.
- # Will generate devices names like TX3_T_07, TX3_T_01 ,TX3_H_07.
- attr RFXTRXUSB longids TX3_T,TX3_H</PRE>
- </li><br>
- <li>rssi<br>
- 1: enable RSSI logging, 0: disable RSSI logging<br>
- Default is no RSSI logging.
- <br><br>
- Examples:<PRE>
- # Do log rssi values (this is default):
- attr RFXCOMUSB rssi 0
- # Enable rssi logging for devices:
- attr RFXCOMUSB rssi 1
- </li><br>
- </ul>
- <br>
- </ul>
- <p><a name="TRX_ELSE"></a>
- <h3>TRX_ELSE</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TRX_ELSE'>DE</a>]</div>
- <ul>
- 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.
- See <a href="#TRX">TRX</a>.
- <br>
- <a name="TRX_SECURITYdefine"></a>
- <br>
- <b>Define</b>
- <ul>
- <code>define <name> TRX_ELSE <hextype></code> <br>
- <br>
- <code><hextype></code>
- <ul>
- specifies the hexvalue (00 - ff) of the type received by the RFXtrx433 transceiver. <br>
- </ul>
- <br>
- Example: <br>
- <code>define TRX_UNKNOWN_9A TRX_ELSE 9A</code>
- <br>
- </ul>
- <br>
- </ul>
- <p><a name="TRX_LIGHT"></a>
- <h3>TRX_LIGHT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TRX_LIGHT'>DE</a>]</div>
- <ul>
- 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:
- KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. <br> You need to define an RFXtrx433 transceiver receiver first.
- See <a href="#TRX">TRX</a>.
- <br><br>
- <a name="TRX_LIGHTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TRX_LIGHT <type> <deviceid> <devicelog> [<deviceid2> <devicelog2>] </code> <br>
- <code>define <name> TRX_LIGHT PT2262 <deviceid> <devicelog> <commandcodes></code> <br>
- <br>
- <code><type></code>
- <ul>
- specifies the type of the device: <br>
- Lighting devices:
- <ul>
- <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>
- <li> <code>X10</code> (All other x10 devices. Report [off|on|dim|bright|all_off|all_on] on both deviceids.)</li>
- <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>
- <li> <code>AB400D</code> (ELRO AB400D devices. Report [off|on].)</li>
- <li> <code>WAVEMAN</code> (Waveman devices. Report [off|on].)</li>
- <li> <code>EMW200</code> (Chacon EMW200 devices. Report [off|on|all_off|all_on].)</li>
- <li> <code>IMPULS</code> (IMPULS devices. Report [off|on].)</li>
- <li> <code>RISINGSUN</code> (RisingSun devices. Report [off|on].)</li>
- <li> <code>PHILIPS_SBC</code> (Philips SBC devices. Send [off|on|all_off|all_on].)</li>
- <li> <code>ENER010</code> (Energenie ENER010 devices. deviceid: [A-P][1-4]. Send [off|on|all_off|all_on].)</li>
- <li> <code>ENER5</code> (Energenie 5-gang devices. deviceid: [A-P][1-10]. Send [off|on].)</li>
- <li> <code>COCO_GDR2</code> (ECOCO GDR2-2000R devices. deviceid: [A-D][1-4]. Send [off|on].)</li>
- <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 <NUM>|all_off|all_on|all_level <NUM>].)</li>
- <li> <code>HOMEEASY</code> (HomeEasy EU devices. Report [off|on|level|all_off|all_on|all_level].)</li>
- <li> <code>ANSLUT</code> (Anslut devices. Report [off|on|level|all_off|all_on|all_level].)</li>
- <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>
- <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>
- <li> <code>EMW100</code> (EMW100 devices. Commands ["off", "on", "learn"].)</li>
- <li> <code>BBSB</code> (BBSB devices. Commands ["off", "on", "all_off", "all_on"].)</li>
- <li> <code>MDREMOTE</code> (MDREMOTE LED dimmer devices. Commands ["power", "light", "bright", "dim", "100", "50", "25", "mode+", "speed-", "speed+", "mode-"].)</li>
- <li> <code>RSL2</code> (Conrad RSL2 devices. Commands ["off", "on", "all_off", "all_on"].)</li>
- <li> <code>LIVOLO</code> (Livolo devices. Commands ["all_off", "on_off", "dim+", "dim-"].)</li>
- <li> <code>TRC02</code> (RGB TRC02 devices. Commands ["off", "on", "bright", "dim", "vivid", "pale", "color"].)</li>
- <li> <code>BLYSS</code> (Blyss devices. deviceid: [A-P][1-5]. Commands ["off", "on", "all_off", "all_on"].)</li>
- <li> <code>BYRONSX</code> (Byron SX chime devices. deviceid: 00-FF. Commands [ "tubular3_1", "solo1", "bigben1", "tubular2_1", "tubular2_2", "solo2", "tubular3_2"].)</li>
- <li> <code>SELECTPLUS</code> (SELECTPLUS] chime devices. deviceid: 0000-FFFF. Commands [ "ring"].)</li>
- <li> <code>SIEMENS_SF01</code> (Siemens SF01 devices. deviceid: 000000-007FFF. Commands [ "timer", "-", "learn", "+", "confirm", "light", "on", "off" ].)</li>
- <li> <code>HARRISON</code> (Harrison curtain devices. deviceid: 00-FF. Commands [ "open", "close", "stop", "program" ].)</li>
- <li> <code>ROLLER_TROL</code> (Roller Trol blind devices. deviceid: 00000100-00FFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_limit" ].)</li>
- <li> <code>HASTA_OLD</code> (Hasta old blind devices. deviceid: 00000100-00FFFF0F. Commands [ "open", "close", "stop", "confirm_pair", "set_limit" ].)</li>
- <li> <code>AOK_RF01</code> (A-OK RF01 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair" ].)</li>
- <li> <code>AOK_AC114</code> (A-OK AC114 blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "open", "close", "stop", "confirm_pair" ].)</li>
- <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>
- <li> <code>MEDIA_MOUNT</code> (Media Mount blind devices. deviceid: 00000100-FFFFFF0F. Commands [ "down", "up", "stop" ].)</li>
- <li> <code>DC106</code> (DC/RMF/Yooda blind devices. deviceid: 00000100-FFFFFFF0. Commands [ "open", "close", "stop", "confirm" ].)</li>
- <li> <code>FOREST</code> (Forest blind devices. deviceid: 00000100-FFFFFFF0. Commands [ "open", "close", "stop", "confirm_pair" ].)</li>
- <li> <code>RFY</code> (Somfy RTS devices. deviceid: 000001-0FFFFF, unicode: 01-04 (00 = allunits). Commands [ "up", "down", "stop", "program" ].)</li>
- <li> <code>RFY_ext</code> (Somfy RTS devices. deviceid: 000001-0FFFFF, unicode: 00-0F. Commands [ "up", "down", "stop", "program" ].)</li>
- </ul>
- </ul>
- <br>
- <code><deviceid></code>
- <ul>
- specifies the first device id of the device. <br>
- A lighting device normally has a house code A..P followed by a unitcode 1..16 (example "B1").<br>
- For AC, HomeEasy EU and ANSLUT it is a 10 Character-Hex-String for the deviceid, consisting of <br>
- - unid-id: 8-Char-Hex: 00000001 to 03FFFFFF<br>
- - unit-code: 2-Char-Hex: 01 to 10 <br>
- For LIGHTWAVERF, EMW100, BBSB, MDREMOTE, RSL2, LIVOLO and TRC02 it is a 8 Character-Hex-String for the deviceid, consisting of <br>
- - unid-id: 8-Char-Hex: 000001 to FFFFFF<br>
- - unit-code: 2-Char-Hex: 01 to 10 <br>
- For RFY and RFY-ext it is a 8 Character-Hex-String for the deviceid, consisting of <br>
- - unid-id: 8-Char-Hex: 000001 to FFFFFF<br>
- - unit-code: 2-Char-Hex: 01 to 04 for RFY (00 for all units) and 00 to 0F for RFY_ext <br>
- </ul>
- <br>
- <code><devicelog></code>
- <ul>
- 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.
- </ul>
- <br>
- <code><deviceid2></code>
- <ul>
- 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.
- </ul>
- <br>
- <code><devicelog2></code>
- <ul>
- is optional for the name used for the Reading of <code><deviceid2></code>.If you use "none" then no addional Reading is reported. Just the state is used to report the change.
- </ul>
- <br>
- <code><commandcodes></code>
- <ul>
- 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>'.
- </ul>
- <br>
- Example: <br>
- <code>define motion_sensor2 TRX_LIGHT MS14A A1 motion A2 light</code>
- <br>
- <code>define Steckdose TRX_LIGHT ARC G2 light</code>
- <br>
- <code>define light TRX_LIGHT AC 0101010101 light</code>
- <br>
- </ul>
- <br>
- <a name="TRX_LIGHTset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<levelnum>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- off
- on
- dim # only for X10, KOPPLA
- bright # only for X10, KOPPLA
- all_off # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
- all_on # only for X10, ARC, EMW200, AC, HOMEEASY, ANSLUT
- chime # only for ARC
- level <levelnum> # only AC, HOMEEASY, ANSLUT: set level to <levelnum> (range: 0=0% to 15=100%)
- on-till # Special, see the note
- on-for-timer # Special, see the note
- ring # Byron MP001,SelectPlus, RFU, Envivo
- </pre>
- Example: <br>
- <code>set Steckdose on</code>
- <br>
- <br>
- Notes:
- <ul>
- <li><code>on-till</code> requires an absolute time in the "at" format
- (HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
- returns a time specification).
- If the current time is greater than the specified time, then the
- command is ignored, else an "on" command is generated, and for the
- given "till-time" an off command is scheduleld via the at command.
- </li>
- <li><code>on-for-timer</code> requires a relative time in the "at" format
- (HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
- returns a time specification).
- </li>
- </ul>
- </ul><br>
- <a name="TRX_LIGHTget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="TRX_LIGHTattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- <p><a name="TRX_SECURITY"></a>
- <h3>TRX_SECURITY</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TRX_SECURITY'>DE</a>]</div>
- <ul>
- 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>.
- <br><br>
- <a name="TRX_SECURITYdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TRX_SECURITY <type> <deviceid> <devicelog> [<deviceid2> <devicelog2>] </code> <br>
- <br>
- <code><type></code>
- <ul>
- specifies one of the following security devices:
- <ul>
- <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>
- <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>
- <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>
- <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>
- <li> <code>KR18</code> (X10 security remote control. Report the Reading "Security" with values [Arm|Disarm], "ButtonA" and "ButtonB" with values [on|off] )</li>
- <li> <code>KD101</code> (KD101 smoke sensor. Report the Reading "smoke" with values [normal|alert])</li>
- <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>
- <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>
- </ul>
- </ul>
- <br>
- <code><deviceid></code>
- <ul>
- 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.
- </ul>
- <br>
- <code><devicelog></code>
- <ul>
- 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.
- </ul>
- <br>
- <code><deviceid2></code>
- <ul>
- 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.
- </ul>
- <br>
- <code><devicelog2></code>
- <ul>
- is optional for the name used for the Reading of <code><deviceid2></code>. If you use "none" then no additional Reading is reported. Just the state is used to report the change.
- </ul>
- <br>
- Example: <br>
- <code>define livingroom_window TRX_SECURITY ds10a 72cd Window</code>
- <br>
- <code>define motion_sensor1 TRX_SECURITY ms10a 55c6 motion</code>
- <br>
- <code>define smoke_sensor1 TRX_SECURITY sd90 54d3 Smoke 54d3 Smoketest</code>
- <br>
- </ul>
- <br>
- <a name="TRX_SECURITYset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> </code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- alert # only for KD101
- pair # only for KD101
- </pre>
- Example: <br>
- <code>set TRX_KD101_a5ca00 alert</code>
- <br>
- </ul><br>
- <a name="TRX_SECURITYget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="TRX_SECURITYattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- <p><a name="TRX_WEATHER"></a>
- <h3>TRX_WEATHER</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TRX_WEATHER'>DE</a>]</div>
- <ul>
- 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
- Oregon Scientific weather sensors that could be received by the RFXtrx433 tranmitter. You need to define a RFXtrx433 receiver first. See
- See <a href="#TRX">TRX</a>.
- <br><br>
- <a name="TRX_WEATHERdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TRX_WEATHER <deviceid></code> <br>
- <br>
- <code><deviceid></code>
- <ul>
- 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>
- "THR128" (for THR128/138, THC138),<br>
- "THGR132N" (for THC238/268,THN132,THWR288,THRN122,THN122,AW129/131),<br>
- "THWR800", <br>
- "RTHN318", <br>
- "TX3_T" (for LaCrosse TX3, TX4, TX17),<br>
- "THGR228N" (for THGN122/123, THGN132, THGR122/228/238/268),<br>
- "THGR810",<br>
- "RTGR328",<br>
- "THGR328",<br>
- "WTGR800_T" (for temperature of WTGR800),<br>
- "THGR918" (for THGR918, THGRN228, THGN500),<br>
- "TFATS34C" (for TFA TS34C),<br>
- "BTHR918",<br>
- "BTHR918N (for BTHR918N, BTHR968),<br>
- "RGR918" (for RGR126/682/918),<br>
- "PCR800",<br>
- "TFA_RAIN" (for TFA rain sensor),<br>
- "WTGR800_A" (for wind sensor of WTGR800),<br>
- "WGR800" (for wind sensor of WGR800),<br>
- "WGR918" (for wind sensor of STR918 and WGR918),<br>
- "TFA_WIND" (for TFA wind sensor),<br>
- "BWR101" (for Oregon Scientific BWR101),<br>
- "GR101" (for Oregon Scientific GR101)
- "TLX7506" (for Digimax TLX7506),<br>
- "TH10" (for Digimax with short format),<br>
- </ul>
- <br>
- Example: <br>
- <ul>
- <code>define Tempsensor TRX_WEATHER TX3_T</code><br>
- <code>define Tempsensor3 TRX_WEATHER THR128_3</code><br>
- <code>define Windsensor TRX_WEATHER WGR918_A</code><br>
- <code>define Regensensor TRX_WEATHER RGR918</code><br>
- </ul>
- </ul>
- <br><br>
- <ul>
- <code>define <name> TRX_WEATHER <deviceid> [<scale_current> <scale_total> <add_total>]</code> <br>
- <br>
- <code><deviceid></code>
- <ul>
- 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>
- "CM160" (for OWL CM119 or CM160),<br>
- "CM180" (for OWL CM180),<br><br>
- "CM180i"(for OWL CM180i),<br><br>
- </ul>
- The following Readings are generated:<br>
- <ul>
- <code>"energy_current:"</code>:
- <ul>
- Only for CM160 and CM180: current usage in Watt. If <scale_current> is defined the result is: <code>energy_current * <scale_current></code>.
- </ul>
- <code>"energy_chx:"</code>:
- <ul>
- Only for CM180i (where chx is ch1, ch2 or ch3): current usage in Ampere. If <scale_current> is defined the result is: <code>energy_chx * <scale_current></code>.
- </ul>
- <code>"energy_total:"</code>:
- <ul>
- current usage in kWh. If scale_total and add_total is defined the result is: <code>energy_total * <scale_total> + <add_total></code>.
- </ul>
- <br>
- </ul>
- Example: <br>
- <ul>
- <code>define Tempsensor TRX_WEATHER CM160_1401</code><br>
- <code>define Tempsensor TRX_WEATHER CM180_1401 1 1 0</code><br>
- <code>define Tempsensor TRX_WEATHER CM180_1401 0.9 0.9 -1000</code><br>
- </ul>
- </ul>
- <br>
- <a name="TRX_WEATHERset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="TRX_WEATHERget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="TRX_WEATHERattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="TUL"></a>
- <h3>TUL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TUL'>DE</a>]</div>
- <ul>
- <table>
- <tr><td>
- The TUL module is the representation of a EIB / KNX connector in FHEM.
- <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>
- 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
- 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.
- </td><td>
- <img src="IMG_0483.jpg" width="100%" height="100%"/>
- </td></tr>
- </table>
- <a name="TULdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TUL <device> <physical address></code> <br>
- <br>
- TUL usb stick / TPUART serial devices:<br><ul>
- <device> 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
- /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
- product=0x204b</ul>In this case the device is most probably /dev/ttyUSB0.<br><br>
- You can also specify a baudrate if the device name contains the @ character, e.g.: /dev/ttyACM0@19200<br><br>
- Note: For TUL usb stick the baudrate 19200 is needed and this is the default when no baudrate is given.
- <br><br>
- Example:<br>
- <code>define tul TUL tul:/dev/ttyACM0 1.1.249</code>
- </ul>
-
- EIBD:<br><ul>
- <device> 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.
- <br><br>
- Example:<br>
- <code>define tul TUL eibd:localhost 1.1.249</code>
- <code>define tul TUL knxd:192.168.178.1 1.1.248</code>
- </ul>
- <br>
- If the device is called none, then no device will be opened, so you can experiment without hardware attached.<br>
- The physical address is used as the source address of telegrams sent to EIB network.
- </ul>
- <br>
- <a name="TULattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li><br>
- <li><a href="#attrdummy">dummy</a></li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <li><a href="#verbose">verbose</a></li><br>
- <li><a href="#useEIB">useEIB</a></li><br>
- <ul>
- 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.
- </ul>
- </ul>
- <br>
- </ul>
- <p><a name="Talk2Fhem"></a>
- <h3>Talk2Fhem</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Talk2Fhem'>DE</a>]</div>
- <ul>
- The module <i>Talk2Fhem</i> is a connection between natural language and FHEM commands.
- The configuration is carried out conveniently via the FHEM web frontend.<br>
- For a more detailed description and further examples see <a href="http://wiki.fhem.de/wiki/Modul_Talk2Fhem">Talk2Fhem Wiki</a>.
- <br><br>
- <a name="Talk2Fhemdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Talk2Fhem</code>
- <br><br>
- Example: <code>define talk Talk2Fhem</code>
- <br><br>
- The actual configuration should first be done on the FHEM side.
- <br><br>
- The individual language phrases are configured line by line. A configuration
- always starts by the regular expression, followed by at least one space or tab
- from an equal sign. <br>
- The command part begins after the equals sign with a space, tab, or newline. <br> <br>
- <code><regexp> = <command></code>
- <br><br>
- <b>Short refernce:</b>
- <br>
- <code><RegExpPart> [&& [?!]<RegExpPart_n>] = [ <FHEM command> | { <Perl code> } | (<option> => '<wert>' , ... ) ]</code>
- <br><br>
- Example: <code>helo world = {Log 1, Helo World}</code>
- <br><br>
- Everything after a hashtag '#' is ignored until the end of the line.
- <br><br>
- <regexp>
- <ul>Regular expression describing the text at which the command should be executed</ul>
- <br><br>
- <command>
- <ul>
- The executive part. The following formats are allowed:
- <li>FHEM Command</li>
- <li>{Perlcode}</li>
- <li>(<option> => '<value>' , ... )</li>
- <ul>
- <br><i><option></i><br>
- <li><b>cmd</b><br>FHEM command as above</li>
- <li><b>offset</b><br>Integer value in seconds that is added at the time</li>
- <li><b>answer</b><br>Perl code whose return is written in the Reading answer</li>
- </ul>
- </ul>
- <br>
- Bracket transfer:
- <ul>
- Brackets set in the regular expression can be transferred to the command section with $1, $2, [...], $n and
- be modified. The following modification options are available here.
- <li>$n <br>Get the word straight without change.</li>
- <li>$n{<type> => <value>}<br>
- Types are:<br>
- true, false, integer, empty, else<br>
- true, false, integer, float, numeral, /<regexp>/, word, empty, else<br>
- <b>true</b> corresponds to: ja|1|true|wahr|ein|eins.*|auf.*|..?ffnen|an.*|rauf.*|hoch.*|laut.*|hell.*<br>
- <b>false</b> corresponds to: nein|0|false|falsch|aus.*|null|zu.*|schlie..?en|runter.*|ab.*|leise.*|dunk.*<br>
- <b>integer</b> Word is an integer<br>
- <b>float</b> Word is a float number<br>
- <b>numeral</b> Word is numeral or an integer<br>
- <b>/<regexp>/</b> Word is matching <regexp><br>
- <b>word</b> Word contains 4 or more letters<br>
- <b>empty</b> Word Contains an empty string<br>
- <b>else</b> If none of the cases apply<br>
- If a <type> is identified for $n the <value> is beeing used.
- Example: <code>light (\S*) = set light $1{true => on,false => off}</code>
- </li>
- <li>$n[<list>]<br>
- Comma separated list: [value1,value2,...,[else,value], [empty,value]] or [@modwordlist]<br>
- If $n is a number, the word at that position in <list> is selected.<br><br>
- If $n is a text, it searches for a list in its parenthesis in the <regexp> part. (a|b|c) or (@keywordlist)
- In this list, $n is searched for and successively positioned in <list> chosen for $n.
- <br>Example: <code>light .* (kitchen|corridor|bad) (\S*) on = set $1[dev_a,dev_b,dev_c] $2{true => on,false => off}</code>
- </li>
- <li>$n@<br>The word is adopted as it is written in the list in the <regexp>-part.</li>
- </ul>
- <br>
- Environment variables::
- <ul>
- There are a number of variables that can be accessed in the <command>-part.
- <li><b>$&</b> Contains all found words </li>
- <li><b>!$&</b> Contains the rest that was not included by RegExp</li>
- <li><b>$DATE</b> Contains the time and date text of the voice </li>
- <li><b>$AGAIN</b> Contains the word again if it is a command again</li>
- <li><b>$TIME</b> Contains the found time.</li>
- <li><b>$NAME</b> Contains the devicename.</li>
- <li><b>$IF</b> Contains the text of the detected T2F_if configuration.</li>
- <li><b>$0</b> Contains the text of the detected T2F_origin regexp.</li>
- </ul>
- </ul>
- <br>
-
- <a name="Talk2Fhemset"></a>
- <b>Set</b><br>
- <ul>
- <code>set <name> [!]<text></code>
- <br><br>
- The text is sent to the module via the <i>set</i> command.
- See <a href="http://fhem.de/commandref.html#set">commandref#set</a> for more help.
- <li>cleartimers</li> Removes the pending time-related commands
- <li>cleartriggers</li> Removes the pending event-related commands
- </ul>
- <br>
- <a name="Talk2Fhemget"></a>
- <b>Get</b><br>
- <code>get <name> <option></code>
- <br><br>
- Information can be read from the module via <i>get</i>.
- Â Â Â Â Â Â Â Â See <a href="http://fhem.de/commandref.html#get">commandref#get</a> for more information on "get". <br><br>
- <option>
- <ul>
- <li><i>@keywordlist</i> <i>@modwordlist</i><br>
- Compare the two lists word by word.</li>
- <li><i>keylistno</i><br>
- A list of the configured "keyword" lists. For easier positioning of "modword" lists </li>
- <li><i>log</i><br>
- Shows the log entries of the last command </li>
- <li><i>modificationtypes</i><br>
- Shows the regexp of the modificationtypes. </li>
- <li><i>standardfilter</i><br>
- Load the standartfilter and print it in the Attribute T2F_filter if its empty </li>
- <li><i>version</i><br>
- The module version</li>
- </ul>
- <br>
- <a name="Talk2Fhemreadings"></a>
- <b>Readings</b>
- <ul>
- <li><i>set</i><br>
- Contains the last text sent via "set".
- </li>
- <li><i>cmds</i><br>
- Contains the last executed command. Is also set with disable = 1.
- </li>
- <li><i>answer</i><br>
- Contains the response text of the last command.
- </li>
- <li><i>err</i><br>
- Contains the last error message. <br>
- "No match" match with no RegExp. <br>
- "Error on Command" see FHEM log.
- </li>
- <li><i>response</i><br>
- Got the response of the fhem Command.
- </li>
- <li><i>origin</i><br>
- Contains the found string of the RegExp defined in the attribute T2F_origin.
- </li>
- <li><i>status</i><br>
- Got the status of the request.
- response, disabled, err, answers, done
- </li>
- <li><i>ifs</i><br>
- Contains the conditions at which the command will be executed.
- </li>
- <li><i>notifies</i><br>
- Contains a list of the devices that are relevant for the currently waiting conditional commands. There is an internal notify on these devices.
- </li>
- </ul>
- <br>
-
- <a name="Talk2Fhemattr"></a>
- <b>Attribute</b>
- <ul>
- <code>attr <name> <attribute> <value></code>
- <br><br>
- See <a href="http://fhem.de/commandref.html#attr">commandref#attr</a> for more information about the attributes.
- <br><br>
- Attributes:
- <ul>
- <li><i>T2F_keywordlist</i> <name> = <list><br>
- A comma-separated list of keywords such as: rooms, names, colors, etc ... <br>
- In other words, things named with a natural name. </li>
- <li><i>T2F_modwordlist</i> <name> = <list><br>
- A comma seperated list of substitution words used for the keywords.
- For example: device names in FHEM <br> </li>
- <li><i>T2F_if</i><br>
- A collection of event-driven configurations. The syntax is that of the definition. Command part is an IF condition. <br>
- z.B.: (when|if) .*?door = [door] eq "open"
- </li>
- <li><i>T2F_filter</i><br>
- Comma-separated list of RegExp generally removed. <br>
- Standard: \bplease\b,\balso\b
- </li>
- <li><i>T2F_origin</i><br>
- A RegExp which is generally removed and whose output can be accessed via $0. <br>
- Can be used for user mapping.</li>
- <li><i>T2F_language</i>DE|EN<br>
- The used language can be set via the global attribute "language". Or overwritten with this attribute.
- </li>
- <li><i>T2F_disableumlautescaping</i> <0|1><br>
- Disable convertimg umlauts to "\S\S?"</li>
- <li><i>disable</i> <0|1><br>
- Can be used for test purposes. If the attribute is set to 1, the FHEM command is not executed
- but written in reading cmds.
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="TechemHKV"></a>
- <h3>TechemHKV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TechemHKV'>DE</a>]</div>
- <ul>
- This module reads the transmission of techem data meter for heating device.
- <br><br>
- It will display
- <ul>
- <li>meter data for current billing period</li>
- <li>meter data for previous billing period including date of request</li>
- <li>both temperature sensors (if supported by data meter)</li>
- </ul>
- <br>
- It will require a CUL in WMBUS_T mode, although the CUL may temporary set into that mode.
- The module keeps track of the CUL rfmode.
- <br>
- <br>
- <a name="TechemHKV_Define"></a>
- <b>Define</b>
- <br>
- <code>define <name> TechemHKV <4|8 digit ID> [<speaking name>]</code>
- <ul>
- <li>ID: 4 digit ID displayed at techem or 8 digit as printed on bill</li>
- <li>speaking name: (optional) human readable identification</li>
- </ul>
- <br>
- <a name="TechemHKV_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>current_period: meter data for current billing period
- <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>
- </li>
- <li>previous_period: meter data for last billing period
- <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>
- </li>
- <li>temp1: ambient temperature</li>
- <li>temp2: heater surface temperature</li>
- <br>
- </ul>
- <a name="TechemHKV_Internals"></a>
- <b>Internals</b>
- <ul>
- <li>friendly: human readable identification of meter as specified by define</li>
- <li>longID: 8 digit id of meter</li>
- <br>
- </ul>
- </ul>
- <p><a name="TechemWZ"></a>
- <h3>TechemWZ</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TechemWZ'>DE</a>]</div>
- <ul>
- This module reads the transmission of techem volume data meter. Currently supported device:
- <p>
- <ul>
- <li>Messkapsel-Wasserzähler radio 3 (cold, warm water)</li>
- <li>Messkapsel-Wärmemengenzähler compact V (heating energy)</li>
- </ul>
- <br>
- It will display
- <ul>
- <li>meter data for current billing period</li>
- <li>meter data for previous billing period including date of request</li>
- <li>cumulative meter data</li>
- </ul>
- <br>
- It will require a CUL in WMBUS_T mode, although the CUL may temporary set into that mode.
- The module keeps track of the CUL rfmode.
- <br>
- <br>
- <a name="TechemWZ_preliminary"></a>
- <b>preliminary</b>
- <p>
- Techem volume data meter does not transmit their printed meter ID. Instead they transmit the ID of the build in radio module.
- <p>
- Therefore a <b>"list-mode"</b> is available which collects all Techem meter device in range to help you find out the right one.
- That "list-mode" will be activated by defining a TechemWZ device with id "00000000". Let it run for a while and do a "get <name> list".
- 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.
- <br>
- <br>
- <a name="TechemWZ_Define"></a>
- <b>Define</b>
- <br>
- <code>define <name> TechemWZ <8 digit ID> [<speaking name>]</code>
- <ul>
- <li>ID: 8 digit ID (see list mode above)</li>
- <li>speaking name: (optional) human readable identification</li>
- </ul>
- <br>
- <a name="TechemWZ_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>current_period: meter data for current billing period
- <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>
- </li>
- <li>previous_period: meter data for last billing period
- <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>
- </li>
- <li>meter: cumulative meter data.
- <br><i>The same data that will be shown at the Techem (mechanical) display</i></br>
- </li>
- <br>
- </ul>
- <a name="TechemWZ_Get"></a>
- <b>Get</b>
- <ul>
- <li>list: print a list of available (received) Techem device with their ID and meter data
- <br><i><u>only available if device ID is "00000000" (list-mode)</u></i></br>
- </li>
- <br>
- </ul>
- <a name="TechemWZ_Internals"></a>
- <b>Internals</b>
- <ul>
- <li>friendly: human readable identification of meter as specified by define</li>
- <br>
- </ul>
- </ul>
- <p><a name="TelegramBot"></a>
- <h3>TelegramBot</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TelegramBot'>DE</a>]</div>
- <ul>
- 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).
- So FHEM can use telegram for notifications of states or alerts, general informations and actions can be triggered.
- <br>
- <br>
- 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.
- <br>
- Telegram Bots are different from normal telegram accounts, without being connected to a phone number. Instead bots need to be registered through the
- <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.
- <br><br>
- Bots also differ in other aspects from normal telegram accounts. Here some examples:
- <ul>
- <li>Bots can not initiate connections to arbitrary users, instead users need to first initiate the communication with the bot.</li>
- <li>Bots have a different privacy setting then normal users (see <a href=https://core.telegram.org/bots#privacy-mode>Privacy mode</a>) </li>
- <li>Bots support commands and specialized keyboards for the interaction </li>
- </ul>
-
- <br><br>
- Note:
- <ul>
- <li>This module requires the perl JSON module.<br>
- 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>
- <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>
- <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>
- </ul>
- <br><br>
- The TelegramBot module allows receiving of messages from any peer (telegram user) and can send messages to known users.
- 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
- 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 #.
- All other names will be considered as full names of contacts. Here any spaces in the name need to be replaced by underscores (_).
- Each contact is considered a triple of contact id, full name (spaces replaced by underscores) and username or groupname prefixed by @ respectively #.
- The three parts are separated by a colon (:).
- <br>
- Contacts are collected automatically during communication by new users contacting the bot or users mentioned in messages.
- <br><br>
- Updates and messages are received via long poll of the GetUpdates message. This message currently supports a maximum of 20 sec long poll.
- 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!
- <br>
- Beside pure text messages also media messages can be sent and received. This includes audio, video, images, documents, locations and venues.
- <br><br>
- <a name="TelegramBotdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TelegramBot <token> </code>
- <br><br>
- Defines a TelegramBot device using the specified token perceived from botfather
- <br>
- Example:
- <ul>
- <code>define teleBot TelegramBot 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code><br>
- </ul>
- <br>
- </ul>
- <br><br>
- <a name="TelegramBotset"></a>
- <b>Set</b>
- <ul>
- <li><code>message|msg|_msg|send [ @<peer1> ... @<peerN> ] [ (<keyrow1>) ... (<keyrowN>) ] <text></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>
- 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>
- 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>
- Examples:<br>
- <dl>
- <dt><code>set aTelegramBotDevice message @@someusername a message to be sent</code></dt>
- <dd> to send to a peer having someusername as username (not first and last name) in telegram <br> </dd>
- <dt><code>set aTelegramBotDevice message (yes) (may be) are you there?</code></dt>
- <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>
- <dt><code>set aTelegramBotDevice message @@someusername (yes) (may be) are you there?</code></dt>
- <dd> to send the message from above with reply keyboard to a peer having someusername as username <br> </dd>
- <dt><code>set aTelegramBotDevice message (yes|no) (may be) are you there?</code></dt>
- <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>
- <dt><code>set aTelegramBotDevice message @@someusername @1234567 a message to be sent to multiple receipients</code></dt>
- <dd> to send to a peer having someusername as username (not first and last name) in telegram <br> </dd>
- <dt><code>set aTelegramBotDevice message @Ralf_Mustermann another message</code></dt>
- <dd> to send to a peer with Ralf as firstname and Mustermann as last name in telegram <br></dd>
- <dt><code>set aTelegramBotDevice message @#justchatting Hello</code></dt>
- <dd> to send the message "Hello" to a chat with the name "justchatting" <br></dd>
- <dt><code>set aTelegramBotDevice message @1234567 Bye</code></dt>
- <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>
- <dl>
- </li>
-
- <li><code>silentmsg, silentImage, silentInline ...</code><br>Sends the given message silently (with disabled_notifications) to the recipients. Syntax and parameters are the same as in the corresponding send/message command.
- </li>
-
- <li><code>msgForceReply [ @<peer1> ... @<peerN> ] <text></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.
- </li>
- <li><code>reply <msgid> [ @<peer1> ] <text></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.
- </li>
- <li><code>msgEdit <msgid> [ @<peer1> ] <text></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.
- </li>
- <li><code>msgDelete <msgid> [ @<peer1> ] </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>)
- </li>
- <li><code>favoritesMenu [ @<peer> ] </code><br>send the favorites menu to the corresponding peer if defined</code>
- </li>
- <li><code>cmdSend|cmdSendSilent [ @<peer1> ... @<peerN> ] <fhem command></code><br>Executes the given fhem command and then sends the result to the given peers or the default peer (cmdSendSilent does the same as silent message).<br>
- Example: The following command would sent the resulting SVG picture to the default peer: <br>
- <code>set tbot cmdSend { plotAsPng('SVG_FileLog_Aussen') }</code>
- </li>
- <li><code>queryInline [ @<peer1> ... @<peerN> ] (<keyrow1>) ... (<keyrowN>) <text></code><br>Sends the given message to the recipient(s) with an inline keyboard allowing direct response <br>
- 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!
- REMARK: inline queries are only accepted from contacts/peers that are authorized (i.e. as for executing commands, see cmdKeyword and cmdRestrictedPeer !)
- </li>
- <li><code>queryEditInline <msgid> [ @<peer> ] (<keyrow1>) ... (<keyrowN>) <text></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>
- With this method interactive inline dialogs are possible, since the edit of message or inline keyboard can be done multiple times.
- </li>
-
- <li><code>queryAnswer <queryid> [ <text> ] </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
- </li>
- <li><code>sendImage|image [ @<peer1> ... @<peerN>] <file> [<caption>]</code><br>Sends a photo to the given peer(s) or if ommitted to the default peer.
- File is specifying a filename and path to the image file to be send.
- Local paths should be given local to the root directory of fhem (the directory of fhem.pl e.g. /opt/fhem).
- Filenames with special characters (especially spaces) need to be given with url escaping (i.e. spaces need to be replaced by %20).
- 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.
- </li>
- <li><code>sendMedia|sendDocument [ @<peer1> ... @<peerN>] <file></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.
- </li>
- <li><code>sendVoice [ @<peer1> ... @<peerN>] <file></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.
- </li>
-
- <li><code>silentImage ...</code><br>Sends the given image silently (with disabled_notifications) to the recipients. Syntax and parameters are the same as in the sendImage command.
- </li>
-
- <br>
- <li><code>sendLocation [ @<peer1> ... @<peerN>] <latitude> <longitude></code><br>Sends a location as pair of coordinates latitude and longitude as floating point numbers
- <br>Example: <code>set aTelegramBotDevice sendLocation @@someusername 51.163375 10.447683</code> will send the coordinates of the geographical center of Germany as location.
- </li>
- <br>
- <li><code>replaceContacts <text></code><br>Set the contacts newly from a string. Multiple contacts can be separated by a space.
- Each contact needs to be specified as a triple of contact id, full name and user name as explained above. </li>
- <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,
- internal contact handling, queue of send items and polling <br>
- ATTENTION: Messages that might be queued on the telegram server side (especially commands) might be then worked off afterwards immedately.
- If in doubt it is recommened to temporarily deactivate (delete) the cmdKeyword attribute before resetting.</li>
- <br>
- <li><code>token <apitoken></code><br>Specify a new APItoken to be stored for this bot
- </li>
- </ul>
- <br><br>
- <a name="TelegramBotget"></a>
- <b>Get</b>
- <ul>
- <li><code>urlForFile <fileid></code><br>Get a URL for a file id that was returned in a message
- </li>
- <li><code>update </code><br>Execute a single update (instead of automatic polling) - manual polling
- </li>
- <li><code>peerId <peer></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 '@'
- </li>
- </ul>
- <br><br>
- <a name="TelegramBotattr"></a>
- <b>Attributes</b>
- <br><br>
- <ul>
- <li><code>defaultPeer <name></code><br>Specify contact id, user name or full name of the default peer to be used for sending messages. </li>
- <li><code>defaultPeerCopy <1 (default) or 0></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.
- </li>
- <li><code>parseModeSend <0_None or 1_Markdown or 2_HTML or 3_Inmsg ></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).
- </li>
-
- <li><code>webPagePreview <1 or 0></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
- </li>
-
-
-
- <br>
- <li><code>cmdKeyword <keyword></code><br>Specify a specific text that needs to be sent to make the rest of the message being executed as a command.
- 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
- (see also cmdTriggerOnly).<br>
- NOTE: It is advised to set cmdRestrictedPeer for restricting access to this feature!<br>
- 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>
- send to the bot would execute the command <code>attr telegram room IM</code> and set a device called telegram into room IM.
- 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>).
- <br>
- 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 !).
- </li>
- <li><code>cmdSentCommands <keyword></code><br>Specify a specific text that will trigger sending the last commands back to the sender<br>
- Example: If this attribute is set to a value of <code>last cmd</code> a message of <code>last cmd</code>
- woud lead to a reply with the list of the last sent fhem commands will be sent back.<br>
- Please also consider cmdRestrictedPeer for restricting access to this feature!<br>
- </li>
- <br>
- <li><code>cmdFavorites <keyword></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>).
- <br>
- NOTE: It is advised to set cmdRestrictedPeer for restricting access to this feature!<br>
- 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 <n></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.
- </li>
- <li><code>favorites <list of commands></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>
- <br>
- 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.
- <br>
- 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
- <br>
- <br>
- Example: Assuming cmdFavorites is set to a value of <code>favorite</code> and this attribute is set to a value of
- <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>
- <ul>
- <li>Then a message "favorite1" to the bot would execute the command <code>get lights status</code></li>
- <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>
- <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>
- <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>
- </ul>
- <br>
- Favorite commands can also be prefixed with a question mark ('?') to enable a confirmation being requested before executing the command.
- <br>
- Examples: <code>get lights status; /light=?set lights on; /dark=set lights off; ?set heater;</code> <br>
- <br>
- <br>
- 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.
- <br>
- Examples: <code>get lights status; /light=!set lights on; /dark=set lights off; !set heater;</code> <br>
- <br>
- The question mark needs to be before the exclamation mark if both are given.
- <br>
- <br>
- 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.
- <br>
- <br>
- Favorite commands can also include multiple fhem commands being execute using ;; as a separator
- <br>
- Example: <code>get lights status; /blink=set lights on;; sleep 3;; set lights off; set heater;</code> <br>
- <br>
- 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
- </li>
- <li><code>favorites2Col <1 or 0></code><br>Show favorites in 2 columns keyboard (instead of 1 column - default)
- </li>
- <li><code>favoritesInline <1 or 0></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)
- </li>
- <br>
- <li><code>cmdRestrictedPeer <peer(s)></code><br>Restrict the execution of commands only to messages sent from the given peername or multiple peernames
- (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.
- A message with the cmd and sender is sent to the default peer in case of another peer trying to sent messages<br>
- NOTE: It is recommended to use only peer ids for this restriction to reduce spoofing risk!
- </li>
- <li><code>cmdRespondChat <1 or 0></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>
- Note: Group chats also need to be allowed as restricted Peer in cmdRestrictedPeer if this is set.
- </li>
- <li><code>allowUnknownContacts <1 or 0></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).
- </li>
- <li><code>saveStateOnContactChange <1 or 0></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).
- </li>
- <li><code>cmdReturnEmptyResult <1 or 0></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.
- </li>
- <li><code>allowedCommands <list of command></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_<TelegrambotDeviceName> and not on the telegramBotDevice! This allowed device is created and modified automatically.<br>
- <b>ATTENTION: This is not a hardened secure blocking of command execution, there might be ways to break the restriction!</b>
- </li>
- <li><code>cmdTriggerOnly <0 or 1></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).
- 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>
- Note: This is deprecated and will be removed in one of the next releases
- </li>
- <li><code>queryAnswerText <text></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>
- Note: A value of "0" in the attribute or as result of the evaluation will result in no text being sent with the answer.
- <br>
- Note: If the peer sending the button is not authorized an answer is always sent without any text.
- </li>
- <br>
- <li><code>pollingTimeout <number></code><br>Used to specify the timeout for long polling of updates. A value of 0 is switching off any long poll.
- 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>.
- </li>
- <li><code>pollingVerbose <0_None 1_Digest 2_Log></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>
- <li><code>disable <0 or 1></code><br>Used to disable the polling if set to 1 (default is 0).
- </li>
-
- <br>
- <li><code>cmdTimeout <number></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.
- </li>
- <br>
- <li><code>maxFileSize <number of bytes></code><br>Maximum file size in bytes for transfer of files (images). If not set the internal limit is specified as 10MB (10485760B).
- </li>
- <li><code>filenameUrlEscape <0 or 1></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).
- </li>
- <li><code>maxReturnSize <number of chars></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.
- </li>
- <li><code>maxRetries <0,1,2,3,4,5></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.
- </li>
- <br>
- <li><code>textResponseConfirm <TelegramBot FHEM : $peer\n Bestätigung \n></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.
- </li>
- <li><code>textResponseFavorites <TelegramBot FHEM : $peer\n Favoriten \n></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.
- </li>
- <li><code>textResponseCommands <TelegramBot FHEM : $peer\n Letzte Befehle \n></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.
- </li>
- <li><code>textResponseResult <TelegramBot FHEM : $peer\n Befehl:$cmd:\n Ergebnis:\n$result\n></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.
- </li>
- <li><code>textResponseUnauthorized <UNAUTHORIZED: TelegramBot FHEM request from user :$peer\n Msg: $msg></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.
- </li>
- <li><code>utf8Special <0 or 1></code><br>Specify if utf8 encodings will be resolved before sending to avoid issues with timeout on HTTP send (experimental ! / default is off).
- </li>
-
- </ul>
- <br><br>
-
- <a name="TelegramBotreadings"></a>
- <b>Readings</b>
- <br><br>
- <ul>
- <li>Contacts <text><br>The current list of contacts known to the telegram bot.
- Each contact is specified as a triple in the same form as described above. Multiple contacts separated by a space. </li>
- <br>
- <li>msgId <text><br>The id of the last received message is stored in this reading.
- For secret chats a value of -1 will be given, since the msgIds of secret messages are not part of the consecutive numbering</li>
- <li>msgPeer <text><br>The sender name of the last received message (either full name or if not available @username)</li>
- <li>msgPeerId <text><br>The sender id of the last received message</li>
- <li>msgChat <text><br>The name of the Chat in which the last message was received (might be the peer if no group involved)</li>
- <li>msgChatId <ID><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>
- <li>msgText <text><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>
- <li>msgFileId <fileid><br>The last received message file_id (Audio, Photo, Video, Voice or other Document) is stored in this reading.</li>
- <li>msgReplyMsgId <text><br>Contains the message id of the original message, that this message was a reply to</li>
-
- <br>
- <li>prevMsgId <text><br>The id of the SECOND last received message is stored in this reading</li>
- <li>prevMsgPeer <text><br>The sender name of the SECOND last received message (either full name or if not available @username)</li>
- <li>prevMsgPeerId <text><br>The sender id of the SECOND last received message</li>
- <li>prevMsgText <text><br>The SECOND last received message text is stored in this reading</li>
- <li>prevMsgFileId <fileid><br>The SECOND last received file id is stored in this reading</li>
- <br><b>Note: All prev... Readings are not triggering events</b><br>
- <br>
- <li>sentMsgId <text><br>The id of the last sent message is stored in this reading, if not succesful the id is empty</li>
- <li>sentMsgResult <text><br>The result of the send process for the last message is contained in this reading - SUCCESS if succesful</li>
- <br>
- <li>StoredCommands <text><br>A list of the last commands executed through TelegramBot. Maximum 10 commands are stored.</li>
- <br>
- <li>PollingErrCount <number><br>Show the number of polling errors during the last day. The number is reset at the beginning of the next day.</li>
- <li>PollingLastError <number><br>Last error message that occured during a polling update call</li>
-
- <br>
- <li>callbackID <id> / callbackPeerId <peer id> / callbackPeer <peer><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>
- </ul>
- <br><br>
-
- <a name="TelegramBotexamples"></a>
- <b>Examples</b>
- <br><br>
- <ul>
- <li>Send a telegram message if fhem has been newly started
- <p>
- <code>define notify_fhem_reload notify global:INITIALIZED set <telegrambot> message fhem started - just now </code>
- </p>
- </li>
- <br>
- <li>A command, that will retrieve an SVG plot and send this as a message back (can be also defined as a favorite).
- <p>
- Send the following message as a command to the bot <code>ok fhem { plotAsPng('SVG_FileLog_Aussen') }</code>
- <br>assuming <code>ok fhem</code> is the command keyword)
- </p> (
-
- 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>
- Remark: Example requires librsvg installed
- </li>
- <br>
- <li>Allow telegram bot commands to be used<br>
- If the keywords for commands are starting with a slash (/), the corresponding commands can be also defined with the
- <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
- <p>
- <code>History-Show a history of the last 10 executed commands</code>
- </p>
- When typing a slash, then the text above will immediately show up in the client.
- </li>
- </ul>
- </ul>
- <p><a name="TellStick"></a>
- <h3>TellStick</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TellStick'>DE</a>]</div>
- <ul>
- <br>
- <a name="TellStickdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TellStick </path/to/tdtool></code>
- <br><br>
- Defines a path to the program "tdtool", which is used to control a (locally attached)
- "Telldus TellStick [Duo]" USB device. A TellStick controls a wide range of 433 MHz
- devices, like the widely available switchable power outlets from InterTechno.<br><br>
- To keep things simple, FHEM interfaces with the telldus-core suite (available
- for Linux, Windows, Mac OSX) via the supplied tool, "tdtool". This FHEM module
- will initially use "tdtool --list" to receive a list of configured devices, then let
- autocreate (if enabled) create them as <a href="#SIS_PMS">SIS_PMS</a> devices.<br></br>
- <i>Please make sure</i> that the user running FHEM under ("fhem" in a standard setup on
- Linux) has the <i>r/w-right to access the stick's device</i> ("/dev/tellstick"
- in telldus-core version 2.0) — if the state of your devices do not change when
- modified im FHEM, access rights problems are the most probable cause
- (<code>chmod o+rw /dev/tellstick</code> should fix that; you may want to automate it
- via udev or adding the fhem user to the proper group ;))<br></br>
- This module has only been tested with the 2.0 branch of teldus-core because of a known bug
- in 2.1, <a href="http://www.telldus.com/forum/viewtopic.php?f=15&t=1645"> preventing
- version 2.1 working properly with some TellSticks</a> and/or "tdtool" application; FTR, the
- "Batch: 8" version a was granted usage of for writing this module was impacted by it ...
- To actually control any power sockets, you need to define a <a href="#SIS_PMS">SIS_PMS</a>
- device — TellStick.pm uses SIS_PMS devices ("socket" is te:ll:st:ck:01, "socketnr"
- is the ID of the device in "tdtool"), as as of now only on/off switching is supported and
- this was the easiest implementation path. SIS_PMS is supported by <a href="http://sites.google.com/site/andfhem/">andFHEM</a>, the Android
- frontend, so this make some sense. (Furthermore, I don't own dimmable devices and they are
- actually not really cheap; >15 EUR/socket compared to the 15 EUR for 5 switch-only, non-self
- learning socket adapters from Intertechno at your local home improvement store.)
- <br><br>
- Example:
- <ul>
- <code>define TStick TellStick /usr/bin/tdtool</code><br>
- <code>define Deckenfluter SIS_PMS te:ll:st:ck:01 2</code><br>
- </ul>
- <br>
- </ul>
- <a name="TellStickset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="TellStickget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="TellStickattr"></a>
- <b>Attributes</b>
- <ul>
- <li>none <!--<a href="#model">model</a> (TellStick)--></li>
- </ul>
- <br>
- </ul>
- <p><a name="TeslaPowerwall2AC"></a>
- <h3>Tesla Powerwall 2 AC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TeslaPowerwall2AC'>DE</a>]</div>
- <ul>
- <u><b>TeslaPowerwall2AC - Retrieves data from a Tesla Powerwall 2AC System</b></u>
- <br>
- With this module it is possible to read the data from a Tesla Powerwall 2AC and to set it as reading.
- <br><br>
- <a name="TeslaPowerwall2ACdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> TeslaPowerwall2AC <HOST></code>
- <br><br>
- Example:
- <ul><br>
- <code>define myPowerWall TeslaPowerwall2AC 192.168.1.34</code><br>
- </ul>
- <br>
- This statement creates a Device with the name myPowerWall and the Host IP 192.168.1.34.<br>
- After the device has been created, the current data of Powerwall is automatically read from the device.
- </ul>
- <br><br>
- <a name="TeslaPowerwall2ACreadings"></a>
- <b>Readings</b>
- <ul>
- <li>actionQueue - information about the entries in the action queue</li>
- <li>aggregates-* - readings of the /api/meters/aggregates response</li>
- <li>batteryLevel - battery level in percent</li>
- <li>batteryPower - battery capacity in kWh</li>
- <li>powerwalls-* - readings of the /api/powerwalls response</li>
- <li>registration-* - readings of the /api/customer/registration response</li>
- <li>siteinfo-* - readings of the /api/site_info response</li>
- <li>sitemaster-* - readings of the /api/sitemaster response</li>
- <li>state - information about internel modul processes</li>
- <li>status-* - readings of the /api/status response</li>
- <li>statussoe-* - readings of the /api/system_status/soe response</li>
- </ul>
- <a name="TeslaPowerwall2ACget"></a>
- <b>get</b>
- <ul>
- <li>aggregates - fetch data from url path /api/meters/aggregates</li>
- <li>powerwalls - fetch data from url path /api/powerwalls</li>
- <li>registration - fetch data from url path /api/customer/registration</li>
- <li>siteinfo - fetch data from url path /api/site_info</li>
- <li>sitemaster - fetch data from url path /api/sitemaster</li>
- <li>status - fetch data from url path /api/status</li>
- <li>statussoe - fetch data from url path /api/system_status/soe</li>
- </ul>
- <a name="TeslaPowerwall2ACattribute"></a>
- <b>Attribute</b>
- <ul>
- <li>interval - interval in seconds for automatically fetch data (default 300)</li>
- </ul>
- </ul>
- <p><a name="Text2Speech"></a>
- <h3>Text2Speech</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Text2Speech'>DE</a>]</div>
- <ul>
- <br>
- <a name="Text2Speechdefine"></a>
- <b>Define</b>
- <ul>
- <b>Local : </b><code>define <name> Text2Speech <alsadevice></code><br>
- <b>Remote: </b><code>define <name> Text2Speech <host>[:<portnr>][:SSL] [portpassword]</code>
- <p>
- This module converts any text into speech with serveral possible providers. The Device can be defined as locally
- or remote device.
- </p>
-
- <li>
- <b>Local Device</b><br>
- <ul>
- The output will be send to any connected audiodevice. For example external speakers connected per jack
- or with bluetooth speakers - connected per bluetooth dongle. Its important to install mplayer.<br>
- <code>apt-get install mplayer</code><br>
- The given alsadevice has to be configured in <code>/etc/asound.conf</code>
- <p>
- <b>Special AlsaDevice: </b><i>default</i><br>
- The internal mplayer command will be without any audio directive if the given alsadevice is <i>default</i>.
- In this case mplayer is using the standard audiodevice.
- </p>
- <p>
- <b>Example:</b><br>
- <code>define MyTTS Text2Speech hw=0.0</code><br>
- <code>define MyTTS Text2Speech default</code>
- </p>
- </ul>
- </li>
- <li>
- <b>Remote Device</b><br>
- <ul>
- This module can configured as remote-device for client-server Environments. The Client has to be configured
- as local device.<br>
- Notice: the Name of the locally instance has to be the same!
- <ul>
- <li>Host: setting up IP-adress</li>
- <li>PortNr: setting up TelnetPort of FHEM; default: 7072</li>
- <li>SSL: setting up if connect over SSL; default: no SSL</li>
- <li>PortPassword: setting up the configured target telnet passwort</li>
- </ul>
- <p>
- <b>Example:</b><br>
- <code>define MyTTS Text2Speech 192.168.178.10:7072 fhempasswd</code>
- <code>define MyTTS Text2Speech 192.168.178.10</code>
- </p>
- 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.
- </ul>
- </li>
- <li>
- <b>Server Device</b>
- <ul>
- 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>.
- Its recommend, to use the attribute <i>TTS_useMP3Wrap</i>. Otherwise only the last audiobrick will be shown is reading <i>lastFilename</i>.
- </ul>
- </li>
- </ul>
- </ul>
- <a name="Text2Speechset"></a>
- <b>Set</b>
- <ul>
- <li><b>tts</b>:<br>
- 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.
- The files must save under the directory of given <i>TTS_FileTemplateDir</i>.
- Please note: The text doesn´t have any colons itself.
- </li>
- <li><b>volume</b>:<br>
- Setting up the volume audio response.<br>
- Notice: Only available in locally instances!
- </li>
- </ul><br>
- <a name="Text2Speechget"></a>
- <b>Get</b>
- <ul>N/A</ul><br>
- <a name="Text2Speechattr"></a>
- <b>Attributes</b>
- <ul>
- <li>TTS_Delemiter<br>
- optional: By using the google engine, its not possible to convert more than 100 characters in a single audio brick.
- With a delemiter the audio brick will be split at this character. A delemiter must be a single character.!<br>
- By default, ech audio brick will be split at sentence end. Is a single sentence longer than 100 characters,
- the sentence will be split additionally at comma, semicolon and the word <i>and</i>.<br>
- Notice: Only available in locally instances with Google engine!
- </li>
- <li>TTS_Ressource<br>
- optional: Selection of the Translator Engine<br>
- Notice: Only available in locally instances!
- <ul>
- <li>Google<br>
- Using the Google Engine. It´s nessessary to have internet access. This engine is the recommend engine
- because the quality is fantastic. This engine is using by default.
- </li>
- <li>VoiceRSS<br>
- Using the VoiceRSS Engine. Its a free engine till 350 requests per day. If you need more, you have to pay.
- It´s nessessary to have internet access. This engine is the 2nd recommend engine
- because the quality is also fantastic. To use this engine you need an APIKey (see TTS_APIKey)
- </li>
- <li>ESpeak<br>
- Using the ESpeak Engine. Installation Espeak and lame is required.<br>
- <code>apt-get install espeak lame</code>
- </li>
- <li>SVOX-pico<br>
- Using the SVOX-Pico TTS-Engine (from the AOSP).<br>
- Installation of the engine and <code>lame</code> is required:<br>
- <code>sudo apt-get install libttspico-utils lame</code><br><br>
- On ARM/Raspbian the package <code>libttspico-utils</code>,<br>
- 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>
- <code>sudo apt-get install libpopt-dev lame</code><br>
- <code>cd /tmp</code><br>
- <code>wget http://www.dr-bischoff.de/raspi/pico2wave.deb</code><br>
- <code>sudo dpkg --install pico2wave.deb</code>
- </li>
- </ul>
- </li>
- <li>TTS_APIKey<br>
- An APIKey its needed if you want to use VoiceRSS. You have to register at the following page:<br>
- http://www.voicerss.org/registration.aspx <br>
- After this, you will get your personal APIKey.
- </li>
- <li>TTS_User<br>
- Actual without any usage. Needed in case if a TTS Engine need an username and an apikey for each request.
- </li>
- <li>TTS_CacheFileDir<br>
- optional: The downloaded Goole audio bricks are saved in this folder for reusing.
- No automatically implemented deleting are available.<br>
- Default: <i>cache/</i><br>
- Notice: Only available in locally instances!
- </li>
- <li>TTS_UseMP3Wrap<br>
- optional: To become a liquid audio response its recommend to use the tool mp3wrap.
- Each downloaded audio bricks are concatinated to a single audio file to play with mplayer.<br>
- Installtion of the mp3wrap source is required.<br>
- <code>apt-get install mp3wrap</code><br>
- Notice: Only available in locally instances!
- </li>
- <li>TTS_MplayerCall<br>
- optional: Setting up the Mplayer system call. The following example is default.<br>
- Example: <code>sudo /usr/bin/mplayer</code>
- </li>
- <li>TTS_SentenceAppendix<br>
- Optional: Definition of one mp3-file to append each time of audio response.<br>
- Using of Mp3Wrap is required. The audio bricks has to be downloaded before into CacheFileDir.
- Example: <code>silence.mp3</code>
- </li>
- <li>TTS_FileMapping<br>
- Definition of mp3files with a custom templatedefinition. Separated by space.
- All templatedefinitions can used in audiobricks by <i>tts</i>.
- The definition must begin and end with e colon.
- The mp3files must saved in the given directory by <i>TTS_FIleTemplateDir</i>.<br>
- <code>attr myTTS TTS_FileMapping ring:ringtone.mp3 beep:MyBeep.mp3</code><br>
- <code>set MyTTS tts Attention: This is my ringtone :ring: Its loud?</code>
- </li>
- <li>TTS_FileTemplateDir<br>
- Directory to save all mp3-files are defined in <i>TTS_FileMapping</i> und <i>TTS_SentenceAppendix</i><br>
- Optional, Default: <code>cache/templates</code>
- </li>
- <li>TTS_noStatisticsLog<br>
- If set to <b>1</b>, it prevents logging statistics to DbLog Devices, default is <b>0</b><br>
- But please notice: this looging is important to able to delete longer unused cachefiles. If you disable this
- please take care to cleanup your cachedirectory by yourself.
- </li>
- <li>TTS_speakAsFastAsPossible<br>
- Trying to get an speach as fast as possible. In case of not present audiobricks, you can hear a short break.
- The audiobrick will be download at this time. In case of an presentation of all audiobricks at local cache,
- this attribute has no impact.<br>
- Attribute only valid in case of an local or server instance.
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a href="#disable">disable</a><br>
- If this attribute is activated, the soundoutput will be disabled.<br>
- Possible values: 0 => not disabled , 1 => disabled<br>
- Default Value is 0 (not disabled)<br><br>
- </li>
- <li><a href="#verbose">verbose</a><br>
- <b>4:</b> each step will be logged<br>
- <b>5:</b> Additionally the individual debug informations from mplayer and mp3wrap will be logged
- </li>
- </ul><br>
- <a name="Text2SpeechExamples"></a>
- <b>Beispiele</b>
- <ul>
- <code>define MyTTS Text2Speech hw=0.0</code><br>
- <code>set MyTTS tts Die Alarmanlage ist bereit.</code><br>
- <code>set MyTTS tts :beep.mp3:</code><br>
- <code>set MyTTS tts :mytemplates/alarm.mp3:Die Alarmanlage ist bereit.:ring.mp3:</code><br>
- </ul>
- <p><a name="TrashCal"></a>
- <h3>TrashCal</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#TrashCal'>DE</a>]</div>
- <ul>
- Note: this module needs the HTTP::Request,HTML::Parser and LWP::UserAgent perl modules.
- <br>
- At this moment only city "Magdeburg" is supported at this site:<br>
- <i>http://sab.metageneric.de/app/sab_i_tp/index.php</i>
- <br><br>
- <a name="TrashCal define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> TrashCal <type> </code>
- <br><br>
- Defines a new instanze of Trashcalendar. At this time the <type> is not used
- <br>
- Examples:
- <ul>
- <code>define MyTrashCal TrashCal Restabfall</code><br>
- </ul>
- </ul>
- <br>
- <a name="TrashCalset"></a>
- <b>Set</b>
- <ul>N/A</ul><br>
- <a name="TrashCalget"></a>
- <b>Get</b>
- <ul>N/A</ul><br>
- <a name="TrashCalattr"></a>
- <b>Attributes</b>
- <ul>
- <li>TrashCal_Link<br>
- setting up the URL to grab the Trashcalendar
- <br>Example:
- <ul>
- <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>
- <br>
- </ul>
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a href="#disable">disable</a><br>
- If this attribute is activated, the module will be disabled.<br>
- Possible values: 0 => not disabled , 1 => disabled<br>
- Default Value is 0 (not disabled)<br><br>
- </li>
- <li><a href="#verbose">verbose</a><br>
- <b>4:</b> each major step will be logged<br>
- <b>5:</b> Additionally some minor steps will be logged
- </li>
- </ul>
- </ul>
- <p><a name="Twilight"></a>
- <h3>Twilight</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Twilight'>DE</a>]</div>
- <ul>
- <br>
- <a name="Twilightdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Twilight <latitude> <longitude> [<indoor_horizon> [<Weather_Position>]]</code><br>
- <br>
- Defines a virtual device for Twilight calculations <br><br>
- <b>latitude, longitude</b>
- <br>
- 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.
- <br><br>
- <b>indoor_horizon</b>
- <br>
- 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.
- indoor_horizon 0 means indoor values are the same as real values. indoor_horizon > 0 means earlier indoor sunset resp. later indoor sunrise.
- <br><br>
- <b>Weather_Position</b>
- <br>
- 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
- <br><br>
- A Twilight device periodically calculates the times of different twilight phases throughout the day.
- It calculates a virtual "light" element, that gives an indicator about the amount of the current daylight.
- 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.
- The light calculated spans between 0 and 6, where the values mean the following:
- <br><br>
- <b>light</b>
- <br>
- <code>0 - total night, sun is at least -18 degree below horizon</code><br>
- <code>1 - astronomical twilight, sun is between -12 and -18 degree below horizon</code><br>
- <code>2 - nautical twilight, sun is between -6 and -12 degree below horizon</code><br>
- <code>3 - civil twilight, sun is between 0 and -6 degree below horizon</code><br>
- <code>4 - indoor twilight, sun is between the indoor_horizon and 0 degree below horizon (not used if indoor_horizon=0)</code><br>
- <code>5 - weather twilight, sun is between indoor_horizon and a virtual weather horizon (the weather horizon depends on weather conditions (optional)</code><br>
- <code>6 - maximum daylight</code><br>
- <br>
- <b>Azimut, Elevation, Twilight</b>
- <br>
- 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.
- <br><br>
- 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
- control of any lamp during the sunrise/sunset phase. The value ist betwenn 0% and 100% when the elevation is between -12° and 6°.
- <br><br>
- 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
- below -18°. In more northern countries(norway ...) the sun may not go below 0°.
- <br><br>
- Any control depending on the value of Twilight must
- consider these aspects.
- <br><br>
- Example:
- <pre>
- define myTwilight Twilight 49.962529 10.324845 3 676757
- </pre>
- </ul>
- <br>
- <a name="Twilightset"></a>
- <b>Set </b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="Twilightget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <reading></code><br><br>
- <table>
- <tr><td><b>light</b></td><td>the current virtual daylight value</td></tr>
- <tr><td><b>nextEvent</b></td><td>the name of the next event</td></tr>
- <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>
- <tr><td><b>sr_astro</b></td><td>time of astronomical sunrise</td></tr>
- <tr><td><b>sr_naut</b></td><td>time of nautical sunrise</td></tr>
- <tr><td><b>sr_civil</b></td><td>time of civil sunrise</td></tr>
- <tr><td><b>sr</b></td><td>time of sunrise</td></tr>
- <tr><td><b>sr_indoor</b></td><td>time of indoor sunrise</td></tr>
- <tr><td><b>sr_weather</b></td><td>time of weather sunrise</td></tr>
- <tr><td><b>ss_weather</b></td><td>time of weather sunset</td></tr>
- <tr><td><b>ss_indoor</b></td><td>time of indoor sunset</td></tr>
- <tr><td><b>ss</b></td><td>time of sunset</td></tr>
- <tr><td><b>ss_civil</b></td><td>time of civil sunset</td></tr>
- <tr><td><b>ss_nautic</b></td><td>time of nautic sunset</td></tr>
- <tr><td><b>ss_astro</b></td><td>time of astro sunset</td></tr>
- <tr><td><b>azimuth</b></td><td>the current azimuth of the sun 0° ist north 180° is south</td></tr>
- <tr><td><b>compasspoint</b></td><td>a textual representation of the compass point</td></tr>
- <tr><td><b>elevation</b></td><td>the elevaltion of the sun</td></tr>
- <tr><td><b>twilight</b></td><td>a percetal value of a new (twi)light value: (elevation+12)/18 * 100) </td></tr>
- <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
- is always a little bit darker than by fair weather</td></tr>
- <tr><td><b>condition</b></td><td>the yahoo condition weather code</td></tr>
- <tr><td><b>condition_txt</b></td><td>the yahoo condition weather code as textual representation</td></tr>
- <tr><td><b>horizon</b></td><td>value auf the actual horizon 0°, -6°, -12°, -18°</td></tr>
- </table>
- </ul>
- <br>
- <a name="Twilightattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><b>useExtWeather <device>:<reading></b></li>
- use data from other devices to calculate <b>twilight_weather</b>.<br/>
- 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/>
- 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/>
- </ul>
- <br>
- <a name="Twilightfunc"></a>
- <b>Functions</b>
- <ul>
- <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>
- <table>
- <tr><td><b>$twilight</b></td><td>name of the twilight instance</td></tr>
- <tr><td><b>$reading</b></td><td>name of the reading to use example: ss_astro, ss_weather ...</td></tr>
- <tr><td><b>$min</b></td><td>parameter min time - optional</td></tr>
- <tr><td><b>$max</b></td><td>parameter max time - optional</td></tr>
- </table>
- </ul>
- <br>
- Example:
- <pre>
- define BlindDown at *{twilight("myTwilight","sr_indoor","7:30","9:00")} set xxxx position 100
- # xxxx is a defined blind
- </pre>
- </ul>
- <p><a name="UNIRoll"></a>
- <h3>UNIRoll</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#UNIRoll'>DE</a>]</div>
- <ul>
- The protocol is used by the Lott UNIROLL R-23700 reciever. The radio
- (868.35 MHz) messages are either received through an <a href="#FHZ">FHZ</a>
- or an <a href="#CUL">CUL</a> device, so this must be defined first.
- Recieving sender messages is not integrated jet.
- The CUL has to allow working with zero synchbits at the beginning of a raw-message.
- This is possible with culfw 1.49 or higher.
- <br><br>
- <a name="UNIRolldefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> UNIRoll <devicegroup> <deviceaddress> </code>
- <br><br>
- The values of devicegroup address (similar to the housecode) and device address (button)
- has to be defined as hexadecimal value.
- There is no master or group code integrated.
- <br>
- <ul>
- <li><code><devicecode></code> is a 4 digit hex number,
- corresponding to the housecode address.</li>
- <li><code><channel></code> is a 1 digit hex number,
- corresponding to a button of the transmitter.</li>
- </ul>
- <br>
- Example:
- <ul>
- <code>define roll UNIRoll 7777 0</code><br>
- </ul>
- </ul>
- <br>
- <a name="UNIRollset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<time>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- up
- stop
- down
- pos (The attribute useRolloPos has to be set to 1 to use this.)
- [<time>] in seconds for up, down or pos
- </pre>
- Examples:
- <ul>
- <code>set roll up</code><br>
- <code>set roll up 10</code><br>
- <code>set roll1,roll2,roll3 up</code><br>
- <code>set roll1-roll3 up</code><br>
- </ul>
- <br></ul>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="UNIRollattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="IODev"></a>
- <li>IODev<br>
- Set the IO or physical device which should be used for sending signals
- for this "logical" device. An example for the physical device is an FHZ
- or a CUL. The device will not work without this entry.</li><br>
- <a name="eventMap"></a>
- <li>eventMap<br>
- Replace event names and set arguments. The value of this attribute
- consists of a list of space separated values, each value is a colon
- separated pair. The first part specifies the "old" value, the second
- the new/desired value. If the first character is slash(/) or komma(,)
- then split not by space but by this character, enabling to embed spaces.<br><br>
- Examples:<ul><code>
- attr device eventMap up:open down:closed<br>
- set device open
- </code></ul>
- </li><br>
- <li><a href="#showtime">showtime</a></li><br>
- <a name="sendStopBeforeCmd"></a>
- <li>sendStopBeforeCmd <value><br>
- Before any up/down-command a stop-command will be sent to stop a random
- operation. This might cause failure in some situations. This attribute
- can be used to switch off the stop-command by setting it to these values.<br><br>
- where <code>value</code> is one of:<br>
- <pre>
- 1 - send always stop (default)
- 0 - send no stop
- 2 - send stop only before up
- 3 - send stop only before down
- </pre></li>
- <a name="useRolloPos"></a>
- <li>useRolloPos <value><br>
- The position of each device can be stored. By this it is possible to move from
- any position to any other position. As this feature is software-based, a
- manual operation will not be recognized. To set the device into a definite
- state, a up or down command will reset the counter for the position.<br><br>
- where <code>value</code> is one of:<br>
- <pre>
- 1 - RolloPos will be used
- 0 - RolloPos is not used (default)
- </pre><br>
- These attributes will be created automatical if useRolloPos is set to 1.
- They will not be deleted, if the value is set to 0 or the attribut is deleted.
- <pre>
- rMin - Time in seconds for the topmost position
- rMax - Time in seconds until the device is fully closed
- rPos - This is an internal value and must not be changed!
- </pre></li>
- <a name="model"></a>
- <li>model<br>
- The model attribute denotes the model type of the device.
- The attributes will (currently) not be used by the fhem.pl directly.
- It can be used by e.g. external programs or web interfaces to
- distinguish classes of devices and send the appropriate commands.
- The spelling of the model names are as quoted on the printed
- documentation which comes which each device. This name is used
- without blanks in all lower-case letters. Valid characters should be
- <code>a-z 0-9</code> and <code>-</code> (dash),
- other characters should be ommited. Here is a list of "official"
- devices:<br><br>
- <b>Receiver/Actor</b>: there is only one reciever: R_23700
- </li><br>
- </ul>
- <br>
- </ul>
- <a name="USBWX"></a>
- <h3>USBWX</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#USBWX'>DE</a>]</div>
- <ul>
- The USBWX module interprets the messages received by the ELV <a
- href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">USB-WDE1</a>
- weather receiver. This receiver is compaptible with the following ELV sensors:
- KS200/KS300, S300IA, S300TH, ASH2200, PS50. It also known to work with Conrad
- weather sensors KS555, S555TH and ASH555.<br> This module was tested with ELV
- S300TH, ELV ASH2200, ELV KS300, Conrad S555TH and Conrad KS555. <br> Readings
- and STATE of temperature/humidity sensors are compatible with the CUL_WS
- module. For KS300/KS555 sensors STATE is compatible with the KS300 module. The
- module is integrated into autocreate to generate the appropriate filelogs and
- weblinks automatically.
- <br><br>
- Note: this module requires the Device::SerialPort or Win32::SerialPort module
- if the devices is connected via USB or a serial port.
- <br><br>
- <a name="USBWXdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> USBWX <serial device></code>
- <br>
- <br>Defines USB-WDE1 attached via usb.<br>
- <br>
- <code>define <name> USBWX <code> [corr1...corr4]</code> <br>
- <br>
- <code> is the code which must be set on the sensor. Valid values
- are 1 through 8. <br> 9 is used as the sensor id of the ks300 sensor.<br>
- corr1..corr4 are up to 4 numerical correction factors, which will be added
- to the respective value to calibrate the device. Note: rain-values will be
- multiplied and not added to the correction factor.
- <br>
- <br>
- Example:<pre>
- define USBWDE1 USBWX /dev/ttyUSB0
- define USBWX_1 USBWX 1
- define USBWX_livingroom USBWX 2
- define USBWX_ks300 USBWX 9
- </pre>
- </ul>
- <a name="USBWXset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="USBWXget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="USBWXattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="USF1000"></a>
- <h3>USF1000</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#USF1000'>DE</a>]</div>
- <ul>
- Fhem can receive your tank's fill level from the USF1000S device
- through a <a href="#FHZ">FHZ</a> device, so one must be defined first.
- The state contains the fill level in % (lower case v in the device state)
- and the current volume in liters (upper case V in the device state).
- Measured distance to the liquid's surface, fill level, volume and warnings
- (Test mode, Battery low) are available. Due to the design of the USF1000S
- protocol, you can have only one USF1000S in range of your FHZ as these
- devices cannot be distinguished.<br>
- <br>
- <a name="USF1000Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> USF1000 <geometry></code>
- <br><br>
- <code><geometry></code> determines the form of the tank and the
- position of the sensor. The following geometries are currently
- supported:<br><br>
- <ul>
- <li><code>cub <length> <width> <height> <offset></code></li>
- <li><code>cylv <diameter> <height> <offset></code></li>
- </ul>
- <br>
- <code>cub</code> stands for a cuboid whose base is <length> × <width>.
- <code>cylv</code> stands for a vertical cylinder whose diameter is <diameter>.
- <height> is the distance of the surface of the liquid from the ground
- if the tank is full. <offset> is the distance of the sensor relative to
- the surface of the liquid. All quantities are expressed in meters.<br>
- <br>
- Example:<br>
- <ul>
- <code>define MyTank USF1000 cylv 2 1 0.3</code>: a cylindrical water tank with
- 2 meters diameter. The water stands 1 meter high if the tank is full. The
- sensor is fixed 1,3 meters above ground.<br>
- </ul>
- </ul>
- <br>
- <a name="USF1000set"></a>
- <b>Set </b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="USF1000get"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="USF1000attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a></li><br>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#model">model</a> (usf1000s)</li>
- <li><a href="#ignore">ignore</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="UWZ"></a>
- <h3>UWZ</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#UWZ'>DE</a>]</div>
- <ul>
- <a name="UWZdefine"></a>
- This modul extracts thunderstorm warnings from <a href="http://www.unwetterzentrale.de">www.unwetterzentrale.de</a>.
- <br/>
- Therefore the same interface is used as the Android App <a href="http://www.alertspro.com">Alerts Pro</a> does.
- A maximum of 10 thunderstorm warnings will be served.
- Additional the module provides a few functions to create HTML-Templates which can be used with weblink.
- <br>
- <i>The following Perl-Modules are used within this module: HTTP::Request, LWP::UserAgent, JSON, Encode::Guess und HTML::Parse</i>.
- <br/><br/>
- <b>Define</b>
- <ul>
- <br>
- <code>define <Name> UWZ [CountryCode] [AreaID] [INTERVAL]</code>
- <br><br><br>
- Example:
- <br>
- <code>
- define Unwetterzentrale UWZ UK 08357 1800<br>
- attr Unwetterzentrale download 1<br>
- attr Unwetterzentrale humanreadable 1<br>
- attr Unwetterzentrale maps eastofengland unitedkingdom<br><br>
- define UnwetterDetails weblink htmlCode {UWZAsHtml("Unwetterzentrale")}<br>
- define UnwetterMapE_UK weblink htmlCode {UWZAsHtmlKarteLand("Unwetterzentrale","eastofengland")}<br>
- define UnwetterLite weblink htmlCode {UWZAsHtmlLite("Unwetterzentrale")}
- define UnwetterMovie weblink htmlCode {UWZAsHtmlMovie("Unwetterzentrale","clouds-precipitation-uk")}
- </code>
- <br>
- <li><code>[CountryCode]</code>
- <br>
- Possible values: DE, AT, CH, UK, ...<br/>
- (for other countries than germany use SEARCH for CountryCode to start device in search mode)
- </li><br>
- <li><code>[AreaID]</code>
- <br>
- For Germany you can use the postalcode, other countries use SEARCH for CountryCode to start device in search mode.
- <br>
- </li><br>
- <li><code>[INTERVAL]</code>
- <br>
- 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.
- <br>
- </li><br>
- <br><br><br>
- Example Search-Mode:
- <br>
- <code>
- define Unwetterzentrale UWZ SEARCH<br>
- </code>
- <br>
- now get the AreaID for your location (example shows london):
- <br>
- <code>
- get Unwetterzentrale SearchAreaID London<br>
- </code>
- <br>
- now redefine your device with the outputted CountryCode and AreaID.
- <br>
- <br>
- </ul>
- <br>
- <a name="UWZget"></a>
- <b>Get</b>
- <ul>
- <br>
- <li><code>get <name> soil-frost</code>
- <br>
- give info about current soil frost (active|inactive).
- </li><br>
- <li><code>get <name> extremfrost</code>
- <br>
- give info about current frost (active|inactive).
- </li><br>
- <li><code>get <name> thunderstorm</code>
- <br>
- give info about current thunderstorm (active|inactive).
- </li><br>
- <li><code>get <name> glaze</code>
- <br>
- give info about current glaze (active|inactive).
- </li><br>
- <li><code>get <name> glazed-rain</code>
- <br>
- give info about current freezing rain (active|inactive).
- </li><br>
- <li><code>get <name> hail</code>
- <br>
- give info about current hail (active|inactive).
- </li><br>
- <li><code>get <name> heat</code>
- <br>
- give info about current heat (active|inactive).
- </li><br>
- <li><code>get <name> rain</code>
- <br>
- give info about current rain (active|inactive).
- </li><br>
- <li><code>get <name> snow</code>
- <br>
- give info about current snow (active|inactive).
- </li><br>
- <li><code>get <name> storm</code>
- <br>
- give info about current storm (active|inactive).
- </li><br>
- <li><code>get <name> forest-fire</code>
- <br>
- give info about current forest fire (active|inactive).
- </li><br>
- </ul>
-
- <br>
- <b>Get (Search-Mode)</b>
- <ul>
- <br>
- <li><code>get <name> SearchAreaID <city></code>
- <br>
- Get AreaID coresponnding to entered location.
- </li><br>
- </ul>
-
- <br>
- <a name="UWZset"></a>
- <b>Set</b>
- <ul>
- <br>
- <li><code>set <name> update</code>
- <br>
- Executes an imediate update of thunderstorm warnings.
- </li><br>
- </ul>
-
- <br>
- <a name="UWZattr"></a>
- <b>Attributes</b>
- <ul>
- <br>
- <li><code>download</code>
- <br>
- Download maps during update (0|1).
- <br>
- </li>
- <li><code>savepath</code>
- <br>
- Define where to store the map png files (default: /tmp/).
- <br>
- </li>
- <li><code>maps</code>
- <br>
- Define the maps to download space seperated. For possible values see <code>UWZAsHtmlKarteLand</code>.
- <br>
- </li>
- <li><code>humanreadable</code>
- <br>
- 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).
- <br>
- </li>
- <li><code>lang</code>
- <br>
- Overwrite requested language for short and long warn text. (de|en|it|fr|es|..).
- <br>
- </li>
- <li><code>sort_readings_by</code>
- <br>
- define how readings will be sortet (start|severity|creation).
- <br>
- </li>
- <li><code>htmlsequence</code>
- <br>
- define warn order of html output (ascending|descending).
- <br>
- </li>
- <li><code>htmltitle</code>
- <br>
- title / header for the html ouput
- <br>
- </li>
- <li><code>htmltitleclass</code>
- <br>
- css-Class of title / header for the html ouput
- <br>
- </li>
- <li><code>localiconbase</code>
- <br>
- define baseurl to host your own thunderstorm warn pics (filetype is png).
- <br>
- </li>
- <li><code>intervalAtWarnLevel</code>
- <br>
- define the interval per warnLevel. Example: 2=1800,3=900,4=300
- <br>
- </li>
- <br>
- </ul>
- <br>
- <a name="UWZreading"></a>
- <b>Readings</b>
- <ul>
- <br>
- <li><b>Warn_</b><i>0|1|2|3...|9</i><b>_...</b> - active warnings</li>
- <li><b>WarnCount</b> - warnings count</li>
- <li><b>WarnUWZLevel</b> - total warn level </li>
- <li><b>WarnUWZLevel_Color</b> - total warn level color</li>
- <li><b>WarnUWZLevel_Str</b> - total warn level string</li>
- <li><b>Warn_</b><i>0</i><b>_AltitudeMin</b> - minimum altitude for warning </li>
- <li><b>Warn_</b><i>0</i><b>_AltitudeMax</b> - maximum altitude for warning </li>
- <li><b>Warn_</b><i>0</i><b>_EventID</b> - warning EventID </li>
- <li><b>Warn_</b><i>0</i><b>_Creation</b> - warning creation </li>
- <li><b>Warn_</b><i>0</i><b>_Creation_Date</b> - warning creation datum </li>
- <li><b>Warn_</b><i>0</i><b>_Creation_Time</b> - warning creation time </li>
- <li><b>currentIntervalMode</b> - default/warn, Interval is read from INTERVAL or INTERVALWARN Internal</li>
- <li><b>Warn_</b><i>0</i><b>_Start</b> - begin of warnperiod</li>
- <li><b>Warn_</b><i>0</i><b>_Start_Date</b> - start date of warnperiod</li>
- <li><b>Warn_</b><i>0</i><b>_Start_Time</b> - start time of warnperiod</li>
- <li><b>Warn_</b><i>0</i><b>_End</b> - end of warnperiod</li>
- <li><b>Warn_</b><i>0</i><b>_End_Date</b> - end date of warnperiod</li>
- <li><b>Warn_</b><i>0</i><b>_End_Time</b> - end time of warnperiod</li>
- <li><b>Warn_</b><i>0</i><b>_Severity</b> - Severity of thunderstorm (0 no thunderstorm, 4, 7, 11, .. heavy thunderstorm)</li>
- <li><b>Warn_</b><i>0</i><b>_Hail</b> - warning contains hail</li>
- <li><b>Warn_</b><i>0</i><b>_Type</b> - kind of thunderstorm</li>
- <li><b>Warn_</b><i>0</i><b>_Type_Str</b> - kind of thunderstorm (text)</li>
- <ul>
- <li><b>1</b> - unknown</li>
- <li><b>2</b> - storm</li>
- <li><b>3</b> - snow</li>
- <li><b>4</b> - rain</li>
- <li><b>5</b> - frost</li>
- <li><b>6</b> - forest fire</li>
- <li><b>7</b> - thunderstorm</li>
- <li><b>8</b> - glaze</li>
- <li><b>9</b> - heat</li>
- <li><b>10</b> - freezing rain</li>
- <li><b>11</b> - soil frost</li>
- </ul>
- <li><b>Warn_</b><i>0</i><b>_uwzLevel</b> - Severity of thunderstorm (0-5)</li>
- <li><b>Warn_</b><i>0</i><b>_uwzLevel_Str</b> - Severity of thunderstorm (text)</li>
- <li><b>Warn_</b><i>0</i><b>_levelName</b> - Level Warn Name</li>
- <li><b>Warn_</b><i>0</i><b>_ShortText</b> - short warn text</li>
- <li><b>Warn_</b><i>0</i><b>_LongText</b> - detailed warn text</li>
- <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>
- </ul>
- <br>
- <a name="UWZweblinks"></a>
- <b>Weblinks</b>
- <ul>
- <br>
- 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.
- <br><br><br>
- Example:
- <br>
- <li><code>define UnwetterDetailiert weblink htmlCode {UWZAsHtml("Unwetterzentrale")}</code></li>
- <br>
- <li><code>define UnwetterLite weblink htmlCode {UWZAsHtmlLite("Unwetterzentrale")}</code></li>
- <br>
- <li><code>define UnwetterFloorplan weblink htmlCode {UWZAsHtmlFP("Unwetterzentrale")}</code></li>
- <br>
- <li><code>define UnwetterKarteLand weblink htmlCode {UWZAsHtmlKarteLand("Unwetterzentrale","Bayern")}</code></li>
- <ul>
- <li>The second parameter should be one of:
- <ul>
- <li>europa</li>
- <br/>
- <li>deutschland</li>
- <li>deutschland-small</li>
- <li>niedersachsen</li>
- <li>bremen</li>
- <li>bayern</li>
- <li>schleswig-holstein</li>
- <li>hamburg</li>
- <li>mecklenburg-vorpommern</li>
- <li>sachsen</li>
- <li>sachsen-anhalt</li>
- <li>nordrhein-westfalen</li>
- <li>thueringen</li>
- <li>rheinland-pfalz</li>
- <li>saarland</li>
- <li>baden-wuerttemberg</li>
- <li>hessen</li>
- <li>brandenburg</li>
- <li>berlin</li>
- <br/>
- <li>oesterreich</li>
- <li>burgenland</li>
- <li>kaernten</li>
- <li>niederoesterreich</li>
- <li>oberoesterreich</li>
- <li>salzburg</li>
- <li>steiermark</li>
- <li>tirol</li>
- <li>vorarlberg</li>
- <li>wien</li>
- <br/>
- <li>schweiz</li>
- <li>aargau</li>
- <li>appenzell_ausserrhoden</li>
- <li>appenzell_innerrhoden</li>
- <li>basel_landschaft</li>
- <li>basel_stadt</li>
- <li>bern</li>
- <li>fribourg</li>
- <li>geneve</li>
- <li>glarus</li>
- <li>graubuenden</li>
- <li>jura</li>
- <li>luzern</li>
- <li>neuchatel</li>
- <li>nidwalden</li>
- <li>obwalden</li>
- <li>schaffhausen</li>
- <li>schwyz</li>
- <li>solothurn</li>
- <li>stgallen</li>
- <li>ticino</li>
- <li>thurgau</li>
- <li>uri</li>
- <li>waadt</li>
- <li>wallis</li>
- <li>zug</li>
- <li>zuerich</li>
- <br/>
- <li>liechtenstein</li>
- <br/>
- <li>belgique</li>
- <br/>
- <li>denmark</li>
- <br/>
- <li>finnland</li>
- <br/>
- <li>france</li>
- <br/>
- <li>letzebuerg</li>
- <br/>
- <li>nederland</li>
- <br/>
- <li>norwegen</li>
- <br/>
- <li>portugal</li>
- <br/>
- <li>sverige</li>
- <br/>
- <li>espana</li>
- <br/>
- <li>unitedkingdom</li>
- <li>eastofengland</li>
- <li>eastmidlands</li>
- <li>london</li>
- <li>northeastengland</li>
- <li>northernireland</li>
- <li>northwestengland</li>
- <li>scotland</li>
- <li>southeastengland</li>
- <li>southwestengland</li>
- <li>wales</li>
- <li>westmidlands</li>
- <li>yorkshireandthehumber</li>
- <br/>
- <li>isobaren1</li>
- <li>isobaren2</li>
- <li>isobaren3</li>
- </ul>
- </li>
- </ul>
- <li><code>define UnwetterKarteMovie weblink htmlCode {UWZAsHtmlMovie("Unwetterzentrale","currents")}</code></li>
- <ul>
- <li>The second parameter should be one of:
- <ul>
- <li>niederschlag-wolken</li>
- <li>stroemung</li>
- <li>temperatur</li>
- <br/>
- <li>niederschlag-wolken-de</li>
- <li>stroemung-de</li>
- <br/>
- <li>niederschlag-wolken-ch</li>
- <li>stroemung-ch</li>
- <br/>
- <li>niederschlag-wolken-at</li>
- <li>stroemung-at</li>
- <br/>
- <li>niederschlag-wolken-uk</li>
- <li>stroemung-uk</li>
- <br/>
- </ul>
- </li>
- </ul>
- <br/><br/>
- </ul>
- <br>
-
- </ul>
- <p><a name="UbiquitiMP"></a>
- <h3>UbiquitiMP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#UbiquitiMP'>DE</a>]</div>
- <ul>
- FHEM module for the Ubiquiti mFi mPower modules<br>
- 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>
- FHEM Forum : http://forum.fhem.de/index.php/topic,35722.0.html
- <a name="UbiquitiMPdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> UbiquitiMP <IP or FQDN></code><br>
- example :<br>
- define myUbi UbiquitiMP 192.168.0.100<br>
- define myUbi UbiquitiMP myhost.mynet.net<br>
- Perl Net::Telnet and JSON module are required. On a Raspberry you can install them with :<br>
- sudo apt-get install libjson-perl<br>
- sudo apt-get install libnet-telnet-perl
- </ul>
- <br>
- <a name="UbiquitiMPset"></a>
- <b>Set </b>
- <ul>
- <li>Outx on / off (force) -> turns Port x on or off</li>
- <li>Outx toggle -> toggle port </li>
- <li>Outx lock / unlock -> protects port to switch port on/off</li>
- <li>Outx reset -> reset power counter for this port</li>
- <li>Outx enable / disable -> power counting for this port</li>
- </ul>
- <a name="UbiquitiMPget"></a>
- <b>Get</b>
- <ul>
- <li>status -> returns the status of all Outs</li>
- <li>info -> returns some internal informations of the device</li>
- <li>reboot -> reboot the device</li><br>
- </ul>
- <a name="UbiquitiMPattr"></a>
- <b>Attributes</b>
- <ul>
- <li>ignoreList -> list of ignored ports<br> e.g. attr name ignoreList 456<br>ignores all values of ports 4,5 & 6<br></li>
- <li>groupPorts -> space separeted list to group ports so you can use them like a single device<br>
- e.g. attr name groupPorts TV=12 Media=4,5,6 (GroupName=Port numbers in the group)<br>
- set name TV on or set name Media toggle </li>
- <li>ledconnect -> led color since fhem connect</li>
- <li>subDevices -> use a single sub devices for each out port<br>
- (default 1 for the 3 and 6 port mPower, default 0 for the mPower mini) requires 98_UbiquitiOut.pm</li>
- <li>interval -> polling interval in seconds, set to 0 to disable polling (default 300)</li>
- <li>timeout -> seconds to wait for a answer from the Power Module (default 5 seconds)</li>
- <li>user -> defined user on the Power Module (default ubnt)</li>
- <li>password -> password for user (default ubnt)</li>
- </ul>
- <br>
- </ul>
- <p><a name="UbiquitiOut"></a>
- <h3>UbiquitiOut</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#UbiquitiOut'>DE</a>]</div>
- <ul>
- <table><tr><td>
- sub device for the UbiquitiMP or InfratekPM modul
- </td></tr></table>
- <a name="UbiquitiOutdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> UbiquitiOut <UbiquitiMP device> <Out #></code>
- </ul>
- <a name="UbiquitiOutset"></a>
- <b>Set </b>
- <ul><a href="#setExtensions">set Extensions</a>
- </ul>
- </ul>
- <p><a name="Unifi"></a>
- <h3>Unifi</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Unifi'>DE</a>]</div>
- <ul>
- Unifi is the FHEM module for the Ubiquiti Networks (UBNT) - Unifi Controller.<br>
- <br>
- 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>
- 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>
- 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>
- <br>
- Or you can use the other readings or set and get features to control your unifi-controller, accesspoints and wlan-clients.
- <br>
- <h4>Prerequisites</h4>
- <ul>
- The Perl module JSON is required. <br>
- On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
- Via CPAN: <code>cpan install JSON</code>
- </ul>
- <h4>Define</h4>
- <ul>
- <code>define <name> Unifi <ip> <port> <username> <password> [<interval> [<siteID> [<version>]]]</code>
- <br><br>
- <br>
- <name>:
- <ul>
- <code>The FHEM device name for the device.</code><br>
- </ul>
- <ip>:
- <ul>
- <code>The ip of your unifi-controller.</code><br>
- </ul>
- <port>:
- <ul>
- <code>The port of your unifi-controller. Normally it's 8443 or 443.</code><br>
- </ul>
- <username>:
- <ul>
- <code>The Username to log on.</code><br>
- </ul>
- <password>:
- <ul>
- <code>The password to log on.</code><br>
- </ul>
- [<interval>]:
- <ul>
- <code>(optional without <siteID> and <version>)<br>
- Interval to fetch the information from the unifi-api. <br>
- default: 30 seconds</code><br>
- </ul>
- [<siteID>]:
- <ul>
- <code>(optional without <version>)<br>
- You can find the site-ID by selecting the site in the UniFi web interface.<br>
- e.g. https://192.168.12.13:8443/manage/s/foobar the siteId you must use is: foobar.<br>
- default: default</code><br>
- </ul>
- [<version>]:
- <ul>
- <code>(optional if you use unifi v4)<br>
- Unifi-controller version. <br>
- Version must be specified if version is not 4. At the moment version 3 and 4 are supported.<br>
- default: 4</code><br>
- </ul> <br>
- </ul>
- <h4>Examples</h4>
- <ul>
- <code>define my_unifi_controller Unifi 192.168.1.15 443 admin secret</code><br>
- <br>
- Or with optional parameters <interval>, <siteID> and <version>:<br>
- <code>define my_unifi_controller Unifi 192.168.1.15 443 admin secret 30 default 3</code><br>
- </ul>
- <h4>Set</h4>
- <ul>
- <code>Note: Some setters are not available if controller is not connected, or no data is available for them.</code><br>
- <br>
- <li><code>set <name> update</code><br>
- Makes immediately a manual update. </li>
- <br>
- <li><code>set <name> updateClient <mac></code><br>
- Makes immediately a manual update of the client specified by MAC-Adress. </li>
- <br>
- <li><code>set <name> clear <readings|clientData|voucherCache|all></code><br>
- Clears the readings, clientData, voucherCache or all. </li>
- <br>
- <li><code>set <name> archiveAlerts</code><br>
- Archive all unarchived Alerts. </li>
- <br>
- <li><code>set <name> disconnectClient <all|user_id|controllerAlias|hostname|devAlias></code><br>
- Disconnect one ore all clients. </li>
- <br>
- <li><code>set <name> restartAP <all|_id|name|ip></code><br>
- Restart one ore all accesspoints. </li>
- <br>
- <li><code>set <name> setLocateAP <all|_id|name|ip></code><br>
- Start 'locate' on one or all accesspoints. </li>
- <br>
- <li><code>set <name> unsetLocateAP <all|_id|name|ip></code><br>
- Stop 'locate' on one or all accesspoints. </li>
- <li><code>set <name> poeMode <name|mac|id> <port> <off|auto|passive|passthrough|restart></code><br>
- Set PoE mode for <port>. </li>
- <li><code>set <name> blockClient <clientname></code><br>
- Block the <clientname></li>
- <li><code>set <name> unblockClient <clientname></code><br>
- Unblocks the <clientname></li>
- <li><code>set <name> disableWLAN <ssid></code><br>
- Disables WLAN with <ssid></li>
- <li><code>set <name> enableWLAN <ssid></code><br>
- Enables WLAN with <ssid></li>
- <li><code>set <name> switchSiteLEDs <on|off></code><br>
- Enables or disables the Status-LED settings of the site.</li>
- <li><code>set <name> createVoucher <expire> <n> <quota> <note></code><br>
- Creates <n> vouchers that expires after <expire> minutes, are usable <quota>-times with a <note>no spaces in note allowed</li>
- </ul>
- <h4>Get</h4>
- <ul>
- <code>Note: Some getters are not available if no data is available for them.</code><br>
- <br>
- <li><code>get <name> clientData <all|user_id|controllerAlias|hostname|devAlias></code><br>
- Show more details about clients.</li>
- <br>
- <li><code>get <name> events</code><br>
- Show events in specified 'eventPeriod'.</li>
- <br>
- <li><code>get <name> unarchivedAlerts</code><br>
- Show all unarchived Alerts.</li>
- <li><code>get <name> poeState [name|mac|id]</code><br>
- Show port PoE state.</li>
- <li><code>get <name> voucher [note]</code><br>
- Show next voucher-code with specified note. If <note> is used in voucherCache the voucher will be marked as delivered</li>
- <li><code>get <name> voucherList [all|note]</code><br>
- Show list of vouchers (all or with specified note only).</li>
- <li><code>get <name> showAccount</code><br>
- Show decrypted user and passwort.</li>
- </ul>
- <h4>Attributes</h4>
- <ul>
- <li>attr devAlias<br>
- Can be used to rename device names in the format <code><user_id|controllerAlias|hostname>:Aliasname.</code><br>
- Separate using blank to rename multiple devices.<br>
- Example (user_id):<code> attr unifi devAlias 5537d138e4b033c1832c5c84:iPhone-Claudiu</code><br>
- Example (controllerAlias):<code> attr unifi devAlias iPhoneControllerAlias:iPhone-Claudiu</code><br>
- Example (hostname):<code> attr unifi devAlias iphone:iPhone-Claudiu</code><br></li>
- <br>
- <li>attr eventPeriod <1...168><br>
- Can be used to configure the time-period (hours) of fetched events from controller.<br>
- <code>default: 24</code></li>
- <br>
- <li>attr disable <1|0><br>
- With this attribute you can disable the whole module. <br>
- If set to 1 the module will be stopped and no updates are performed.<br>
- If set to 0 the automatic updating will performed.</li>
- <br>
- <li>attr ignoreWiredClients <1|0><br>
- With this attribute you can disable readings for wired clients. <br>
- If set to 1 readings for wired clients are not generated.<br>
- If set to 0 or not defined, readings for wired clients will be generated.</li>
- <br>
- <li>attr ignoreWirelessClients <1|0><br>
- With this attribute you can disable readings for wireless clients. <br>
- If set to 1 readings for wireless clients are not generated.<br>
- If set to 0 or not defined, readings for wireless clients will be generated.</li>
- <br>
- <li>attr <a href="#verbose">verbose</a> 5<br>
- This attribute will help you if something does not work as espected.</li>
- <br>
- <li>attr httpLoglevel <1,2,3,4,5><br>
- Can be used to debug the HttpUtils-Module. Set it smaller or equal as your 'global verbose level'.<br>
- <code>default: 5</code></li>
- <br>
- <li>attr deprecatedClientNames <0,1><br>
- Client-names in reading-names, reading-values and drop-down-lists can be set in two ways. Both ways generate the client-name in follwing order: 1. Attribute devAlias; 2. client-alias in Unifi;3. hostname;4. internal unifi-id.<br>
- 1: Deprecated. Valid characters for unifi-client-alias or hostname are [a-z][A-Z][0-9][-][.]<br>
- 0: All invalid characters are replaced by using makeReadingName() in fhem.pl.<br>
- <code>default: 1 (if module is defined and/or attribute is not set)</code></li>
- <br>
- <li>attr voucherCache <expire n quota note, ...><br>
- Define voucher-cache(s). Comma separeted list of four parameters that are separated by spaces; no spaces in note!.<br>
- By calling <code>get voucher <note></code> the delivery-time of the voucher will be saved in the cache.
- The voucher with the oldest delivery-time will be returned by <code>get voucher <note></code>.
- If the voucher is not used for 2 hours, the delivery-time in the cache will be deleted.<br>
- <code>e.g.: 120 2 1 2h,180 5 2 3h</code> defines two caches.<br>
- The first cache has a min size of 2 vouchers. The vouchers expire after 120 minutes and can be used one-time.<br>
- The second cache has a min size of 5 vouchers. The vouchers expire after 180 minutes and can be used two-times.</li>
- <br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <h4>Readings</h4>
- <ul>
- Note: All readings generate events. You can control this with <a href="#readingFnAttributes">these global attributes</a>.
- <li>Each client has 7 readings for connection-state, SNR, uptime, last_seen-time, connected-AP, essid and hostname.</li>
- <li>Each AP has 3 readings for state (can be 'ok' or 'error'), essid's and count of connected-clients.</li>
- <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>
- <li>The Unifi-device reading 'state' represents the connection-state to the unifi-controller (can be 'connected', 'disconnected', 'initialized' and 'disabled').</li>
- <li>Each voucher-cache has a reading with the next free voucher code.</li>
- </ul>
- <br>
- </ul>
- <p><a name="UnifiVideo"></a>
- <h3>UnifiVideo</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#UnifiVideo'>DE</a>]</div>
- <ul>
- Module to integrate UnifiVideo devices with FHEM.<br><br>
- define <name> UnifiVideo <ip> [<apiKey>] <br><br>
- Notes:
- <ul>
- <li>JSON has to be installed on the FHEM host.</li>
- <li>create nvr api key: admin->my account->api access</li>
- <li><code>define <name> webLink htmlCode {UnifiVideo_2html('<nvr>','<cam>[,<cam2>,..]'[,<width>])}</code></li>
- </ul><br>
- <a name="UnifiVideo_Set"></a>
- <b>Set</b>
- <ul>
- <li>snapshot cam=<cam> width=<width> fileName=<fileName><br>
- takes a snapshot from <cam> with optional <width> and stores it with the optional <fileName><br>
- <cam> can be the number of the cammera, its id or a regex that is matched against the name.
- </li>
- <li>reconnect<br>
- </li>
- </ul>
- <a name="UnifiVideo_Get"></a>
- <b>Get</b>
- <ul>
- <li>apiKey<br>
- shows the configured apiKey.</li>
- </ul>
- <a name="UnifiVideo_Attr"></a>
- <b>Attr</b>
- <ul>
- <li>filePath<br>
- path to store the snapshot images to. default: .../www/snapshots
- </li>
- <li>apiKey<br>
- apiKey to use for nvr access
- </li>
- <li>ssh_user<br>
- ssh user for nvr logfile access. used to fhem events after motion detection.
- </li>
- </ul>
- </ul><br>
- <p><a name="UpsPico"></a>
- <h3>UpsPico</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#UpsPico'>DE</a>]</div>
- <ul>
- <table>
- <tr>
- <td>
- 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>
- 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>
- For details to the Information contained in the register, please consult the internal register specification published in the latest manual. (See below)<BR>
- <BR>
- <u>References:</u><BR>
- <a href="http://www.pimodulescart.com/shop/item.aspx?itemid=29">UPS PIco HV3.0A Stack Plus</a><BR>
- <a href="http://www.forum.pimodules.com/viewforum.php?f=25">UPS PIco HV3.0A : Internal Register Specification, Manuals and Firmware Updates</a><BR>
- <BR>
- </td>
- </tr>
- </table>
-
- <table>
- <tr><td><a name="UpsPicodefine"></a><b>Define</b></td></tr>
- </table>
- <table><tr><td><ul><code>define <name> UpsPico <IPv4-address> <Username> <Password></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><name></code> : </td><td>The name of the device. Recommendation: "myUpsPico".</td></tr>
- <tr><td><code><IPv4-address></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>
- <tr><td><code><GatewayPassword></code> : </td><td>The username of the remote Raspberry Pi.</td></tr>
- <tr><td><code><PrivatePassword></code> : </td><td>The password of the remote Raspberry Pi.</td></tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="UpsPicoSet"></a><b>Set</b></td></tr>
- <tr><td>
- <ul>
- The set function is able to change a value which is marked as writeable.<BR>
- 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.
- </ul>
- </td></tr>
- </table>
- <table><tr><td><ul><code>set <name> <register> <value></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><name></code> : </td><td>The name of the defined UpsPico device<BR></td></tr>
- <tr><td><code><register></code> : </td><td>The name of the register which value shall be set. E.g.: "<code>/Status/key</code>"<BR></td></tr>
- <tr><td><code><value></code> : </td><td>A valid value for this register.<BR></td></tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="UpsPicoGet"></a><b>Get</b></td></tr>
- <tr><td>
- <ul>
- The get function is able to obtain a value of a register.<BR>
- It returns only the value but not the unit or the range or list of allowed values possible.<BR>
- </ul>
- </td></tr>
- </table>
- <table><tr><td><ul><code>get <name> <register></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><name></code> : </td><td>The name of the defined UpsPico device<BR></td></tr>
- <tr><td><code><register></code> : </td><td>The name of the register which value shall be obtained. E.g.: "<code>/Status/key</code>"<BR></td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="UpsPicoAttr"></a><b>Attributes</b></td></tr>
- <tr><td>
- <ul>
- <BR>
- 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>
- </ul>
- </td></tr>
- </table>
- <table>
- <td>
- <ul><ul>
- <tr>
- <td>
- <BR>
- <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>
- The default value is 300s.<BR>
- </ul></td></tr>
- </td>
- </tr>
- </ul></ul>
- <ul><ul>
- <tr>
- <td>
- <BR>
- <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>
- The attribute must be re-activated for every single set-command.<BR>
- The default value is 0 = deactivated<BR>
- </ul></td></tr>
- </td>
- </tr>
- </ul></ul>
- <ul><ul>
- <tr>
- <td>
- <BR>
- <tr><td><ul><li><code>Port</code> : </li></td><td>The port number for the SSH access on the remote system.<BR>
- The default value is 22 = Standard SSH port<BR>
- </ul></td></tr>
- </td>
- </tr>
- </ul></ul>
- <ul><ul>
- <tr>
- <td>
- <BR>
- <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>
- The default value is 0 = Plain Text Credentials<BR>
- </ul></td></tr>
- </td>
- </tr>
- </ul></ul>
- <ul><ul>
- <tr>
- <td>
- <BR>
- <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>
- It makes no sense to log this reading.<BR>
- The default exclusion from logging is "/Status/pico_is_running" <BR>
- </ul></td></tr>
- </td>
- </tr>
- </ul></ul>
- <ul><ul>
- <tr>
- <td>
- <BR>
- <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>
- The default value is ".*" = Apply to all readings.<BR>
- </ul></td></tr>
- </td>
- </tr>
- </ul></ul>
- <ul><ul>
- <tr>
- <td>
- <BR>
- <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>
- The default value is "UpsPIco".<BR>
- </ul></td></tr>
- </td>
- </tr>
- </ul></ul>
- </td>
- </table>
- </ul>
- <p><a name="Utils"></a>
- <h3>Utils</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Utils'>DE</a>]</div>
- <ul>
- This is a collection of functions that can be used module-independant
- in all your own development<br/>
- </br>
- <b>Defined functions</b><br/><br/>
- <ul>
- <li><b>abstime2rel("HH:MM:SS")</b><br>tells you the difference as HH:MM:SS
- between now and the argument</li><br/>
- <li><b>ltrim("string")</b><br>returns string without leading
- spaces</li><br/>
- <li><b>max(str1, str2, ...)</b><br>returns the highest value from a given
- list (sorted alphanumeric)</li><br/>
- <li><b>maxNum(num1, num2, ...)</b><br>returns the highest value from a
- given list (sorted numeric)</li><br/>
- <li><b>min(str1, str2, ...)</b><br>returns the lowest value from a given
- list (sorted alphanumeric)</li><br/>
- <li><b>minNum(num1, num2, ...)</b><br>returns the lowest value from a given
- list (sorted numeric)</li><br/>
- <li><b>rtrim("string")</b><br>returns string without trailing
- spaces</li><br/>
- <li><b>time_str2num("YYYY-MM-DD HH:MM:SS")</b><br>convert a time string to
- number of seconds since 1970</li><br/>
- <li><b>trim("string")</b><br>returns string without leading and without
- trailing spaces</li><br/>
- <li><b>UntoggleDirect("deviceName")</b><br>For devices paired directly,
- converts state 'toggle' into 'on' or 'off'</li><br/>
- <li><b>UntoggleIndirect()</b><br>For devices paired indirectly, switches
- the target device 'on' or 'off', also when a 'toggle' was sent from the
- source device</li><br/>
- <li><b>defInfo("devspec", "internal")</b><br>return an array with the
- internal values of all devices found with devspec, e.g.
- defInfo("TYPE=SVG", "GPLOTFILE").</li><br/>
- <li><b>SVG_time_to_sec("YYYY-MM-DD_HH:MM:SS")</b><br>converts the argument
- to the number of seconds since 1970. Optimized for repeated use of similar
- timestamps.</li></br>
- <li><b>fhemNc("host:port", "textToSend", waitForReturn)</b><br>
- sends textToSend to host:port, and if waitForReturn is set, then read
- the answer (wait up to 5 seconds) and return it. Intended as small
- nc replacement.
- </li></br>
- <li><b>round(value, digits)</b><br>
- round <value> to given digits behind comma
- </li></br>
- <li><b>getUniqueId()</b><br>
- return the FHEM uniqueID used by the fheminfo command. Uses the
- getKeyValue / setKeyValue functions.
- </li></br>
- <li><b>setKeyValue(keyName, value)</b><br>
- store the value in the file $modpath/FHEM/FhemUtils/uniqueID (the name is
- used for backward compatibility), or in the database, if using configDB.
- value may not contain newlines, and only one value per key is stored.
- The file/database entry will be written immediately, no explicit save is
- required. If the value is undef, the entry will be deleted.
- Returns an error-string or undef.
- </li></br>
- <li><b>getKeyValue(keyName)</b><br>
- return ($error, $value), stored previously by setKeyValue.
- $error is set if there was an error. Both are undef, if there is no
- value yet for this key.
- </li></br>
- </ul>
- </ul>
- <p><a name="VBUSDEV"></a>
- <h3>VBUSDEV</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#VBUSDEV'>DE</a>]</div>
- <ul>
- RESOL-Adapter (USB oder LAN) Info:<br>
- <a href="http://www.resol.de/">http://www.resol.de/</a><br><br>
-
- Information <a href="http://hobbyelektronik.org/w/index.php/VBus-Decoder"> http://hobbyelektronik.org/w/index.php/VBus-Decoder/</a>
- or github <a href="https://github.com/pejonp/vbus"> https://github.com/pejonp/vbus </a><br><br><br>
- <br />
- <a name="VBUSDEV_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> VBUSDEV <id> [<interval>]</code><br />
- <br />
- Connects to various RESOL VBus devices<br />
- Examples:
- <ul>
- <code>define VBUSDEV_7321 VBUSDEV 7321 </code><br />
- </ul>
- </ul><br />
- <a name="VBUSDEV_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>The readings are dependant of the model of the VBUS device.</li><br />
- </ul><br />
- </ul><br />
- <p><a name="VBUSIF"></a>
- <h3>VBUSIF</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#VBUSIF'>DE</a>]</div>
- <ul>
- This module connects to the RESOL VBUS LAN or Serial Port adapter.
- It serves as the "physical" counterpart to the <a href="#VBUSDevice">VBUSDevice</a>
- devices.
- <br /><br />
- <a name="VBUSIF_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> VBUS <device></code>
- <br />
- <br />
- <device> is a <host>:<port> combination, where
- <host> is the address of the RESOL LAN Adapter and <port> 7053.
- <br />
- Please note: the password of RESOL Device must be unchanged at <host>
- <br />
- Examples:
- <ul>
- <code>define vbus VBUSIF 192.168.1.69:7053</code>
- </ul>
- <ul>
- <code>define vbus VBUSIF /dev/ttyS0</code>
- </ul>
- </ul>
- <br />
- </ul>
- <p><a name="VCONTROL"></a>
- <h3>VCONTROL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#VCONTROL'>DE</a>]</div>
- <ul>
- VCONTROL is a fhem-Modul to control and read information from a VIESSMANN heating via Optolink-adapter.<br><br>
-
- An Optolink-Adapter is necessary (USB or LAN), you will find information here:<br>
- <a href="http://openv.wikispaces.com/">http://openv.wikispaces.com/</a><br><br>
-
- Additionaly you need to know Memory-Adresses for the div. heating types (e.g. V200KW1, VScotHO1, VPlusHO1 ....),<br>
- that will be read by the module to get the measurements or to set the actual state.<br>
- 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>
-
- <a name="VCONTROLdefine"><b>Define</b></a>
- <ul>
- <code>define <name> VCONTROL <serial-device/LAN-Device:port> <configfile> [<intervall>] </code><br>
- <br>
- <li><b><serial-device/LAN-Device:port></b><br>
- USB Port (e.g. com4, /dev/ttyUSB3) or TCPIP:portnumber<br>
- </li>
- <li><b><intervall></b><br>
- Poll Intervall in seconds (default 180)<br>
- </li>
-
- <li><b><configfile></b><br>
- path to the configuration file, containing the memory addresses<br>
- </li>
- <br>
- Example:<br><br>
-
- serial device com4, every 3 minutes will be polled, configuration file name is 99_VCONTROL.cfg, existing in the fhem root directory<br><br>
- Windows:<br>
- define Heizung VCONTROL com4 99_VCONTROL.cfg 180<br><br>
-
- Linux:<br>
- define Heizung VCONTROL /dev/ttyUSB3 99_VCONTROL.cfg 180<br>
- </ul>
- <br><br>
- <a name="VCONTROLset"><b>Set</b></a>
- <ul>
- These commands will be configured in the configuartion file.
- </ul>
- <br><br>
- <a name="VCONTROLget"><b>Get</b></a>
- <ul>
- get <name> CONFIG<br><br>
- reload the module specific configfile<br><br>
- More commands will be configured in the configuration file.
- </ul>
- <br><br>
- <a name="VCONTROLparameter"><b>configfile</b></a>
- <ul>
- 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>
- The lines of the configuration file can have the following structure:<br><br>
- <li>lines beginning with "#" are comments!<br></li>
- <li>Polling Commands (POLL) to read values.<br></li>
- <li>Set Commands (SET) to set values.<br></li>
- <br>
- <b>Polling Commands have the following structure:<br><br></b>
- POLL, ADDRESSE, PARSEMETHODE, DIVISOR, READING-NAME, KUMULATION<br><br>
-
- <ul>
- <li><b>POLL</b><br>
- is fix POLL<br>
- </li>
- <br>
- <li><b>ADDRESSE</b><br>
- Memory Address leading to the value, the will be read in the memory on the heating.<br>
- It is subdivided in 3 parts:<br>
- <ul>
- <li> Beginning is fix 01F7 (defines a reading command)</li>
- <li> followed by actuak address<br></li>
- <li> followed by number of Bytes to be read.<br></li>
- </ul>
- </li>
- <br>
- <li><b>PARSEMETHODE</b><br>
- Method how to parse the read bytes.<br>
- methods so far:<br>
- <ul>
- <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>
- <li>1ByteS :<br> Read value is 1 Byte with algebraic sign (wenn Spalte Divisor state ist -> nur 0 / 1 also off / on)<br></li>
- <li>2ByteS :<br> Read value is 2 Byte with algebraic sign<br></li>
- <li>2ByteU :<br> Read value is 2 Byte without algebraic sign<br></li>
- <li>2BytePercent :<br> Read value is 2 Byte in percent<br></li>
- <li>4Byte :<br> Read value is 4 Byte<br></li>
- <li>mode :<br> Read value is the actual operating status<br></li>
- <li>timer :<br> Read value is an 8 Byte timer value<br></li>
- <li>date :<br> Read value is an 8 Byte timestamp<br></li>
- POLL Commands unsing the method timer will not be polled permanent, they have to be read by a GET Commando explicitly.<br>
- GET <devicename> TIMER<br>
- </ul>
- </li>
- <br>
- <li><b>DIVISOR</b><br>
- If the parsed value is multiplied by a factor, you can configure a divisor.<br>
- Additionally for values, that just deliver 0 or 1, you can configure state in this column.<br>
- This will force the reading to off and on, instead of 0 and 1.<br>
- </li>
- <br>
- <li><b>READING-NAME</b><br>
- The read and parsed value will be stored in a reading with this name in the device.
- </li>
- <br>
- <li><b>KUMULATION</b><br>
- Accumulated Day values will be automatically stored for polling commands with the value day in the column KUMULATION.<br>
- Futhermore there will be stored the values of the last day in additional readings after 00:00.<br>
- So you have the chance to plot daily values.<br>
- The reading names will be supplemented by DayStart, Today and LastDay!<br>
- </li>
-
- <br>
- Examples:<br><br>
- <code>POLL, 01F7080402, 2ByteS, 10 , Temp-WarmWater-Actual , -<br></code>
- <code>POLL, 01F7088A02, 2ByteU, 1 , BurnerStarts , day<br></code>
- </ul>
- <br><br>
- <b>Set Commands have the following structure:<br><br></b>
- SET,SETCMD, ADRESSE, CONVMETHODE, NEXT_CMD or DAY for timer<br><br>
-
- <ul>
- <li><b>SET</b><br>
- is fix SET<br>
- </li>
- <br>
- <li><b>SETCMD</b><br>
- SETCMD are commands that will be used in FHEM to set a value of a device<br>
- set <devicename> <setcmd><br>
- e.g. SET <devicename> WW to set the actual operational status to Warm Water processing<br>
- </li>
- <br>
-
- <li><b>ADDRESSE</b><br>
- Memory Address where the value has to be written in the memory of the heating.<br>
- It is subdivided in 4 parts:<br>
- <ul>
- <li> Beginning is fix 01F4 (defines a writing command)</li>
- <li> followed by actual address<br></li>
- <li> followed by number of data-bytes to be written<br></li>
- <li> followed by the data-bytes themselves<br></li>
- </ul>
- <br>
- There are two Address versions:<br>
- <li>Version 1: Value to be set is fix, e.g. Spar Mode on is fix 01<br></li>
- <li>Version 2: Value has to be passed, e.g. warm water temperature<br></li>
- </li>
- <br>
- <li><b>CONVMETHODE</b><br>
- Method how to convert the value with Version 2 in Bytes.<br>
- For Version 1 you can use - here.<br>
- Methods so far:<br>
- <ul>
- <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>
- <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>
- <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>
- <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>
- <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>
- 8 times of day comma separeted. (ON1,OFF1,ON2,OFF2,ON3,OFF3,ON4,OFF4)<br>
- no time needed ha to be specified with -- .<br>
- Minutes of the times are just allowed to thi values: 00,10,20,30,40 or 50<br>
- Example: 06:10,12:00,16:00,23:00,--,--,--,--</li>
- <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>
- format specified is DD.MM.YYYY_HH:MM:SS<br>
- Example: 21.03.2014_21:35:00</li>
- </ul>
- </li>
- <br>
- <li><b>NEXT_CMD or DAY</b><br>
- This column has three functions:
- <ul>
- <li> If this columns is configured with a name of another SETCMD, it will be processed directly afterwards.<br>
- Example: after setting Spar Mode on (S-ON), you have to set Party Mode off (P-OFF) <br></li>
- <li> Using a CONVMETHODE 1ByteU or 1ByteS or 2ByteS or 2ByteU , you can use the column as an multiplicator,<br>
- which will be multiplied to the value in the SET command<br>
- Example: <code>SET, TEMPNHK1 , 01F4200002 , 2ByteU , 10</code>
- With <code>SET DEVICE TEMPNHK1 21</code> 210 will be send to the heating.
- </li>
- <li>Using timer as CONVMETHODE, so it has to be specified a week day in this columns.<br>
- possible values: MO DI MI DO FR SA SO<br></li>
- </li>
- <br>
- </ul>
- Examples:<br><br>
- <code>SET, WW , 01F423010100, state , -<br></code>
- <code>SET, S-ON , 01F423020101, state_spar , P-OFF<br></code>
- <code>SET, WWTEMP , 01F4630001 , 1ByteU , -<br></code>
- <code>SET, TIMER_2_MO, 01F4200008 , timer , MO<br></code>
- </ul>
- </ul>
- <br>
- <a name="VCONTROLreadings"><b>Readings</b></a>
- <ul>The values read will be stored in readings, that will be configured as described above.</ul>
- </ul>
- <p><a name="VIERA"></a>
- <h3>VIERA</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#VIERA'>DE</a>]</div>
- <ul>
- <a name="VIERAdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> VIERA <host> [<interval>]</code>
- <br><br>
- This module controls Panasonic TV device over ethernet. It's possible to
- power down the tv, change volume or mute/unmute the TV. Also this modul is simulating
- the remote control and you are able to send different command buttons actions of remote control.
- The module is tested with Panasonic plasma TV tx-p50vt30e
- <br><br>
- Defining a VIERA device will schedule an internal task (interval can be set
- with optional parameter <interval> in seconds, if not set, the value is 30
- seconds), which periodically reads the status of volume and mute status and triggers
- notify/filelog commands.
- <br><br>
- <b>Notes:</b><br>
- <ul>Activate volume remotecontrol by DLNA: Menu -> Setup -> Network Setup -> Network Link Settings -> DLNA RemoteVolume -> On</ul>
- <br>
- Example:
- <ul><code>
- define myTV1 VIERA 192.168.178.20<br><br>
- define myTV1 VIERA 192.168.178.20 60 #with custom interval of 60 seconds
- </code></ul>
- </ul>
- <br>
- <a name="VIERAset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <command> [<value>]</code>
- <br><br>
- Currently, the following commands are defined.
- <ul>
- <code>
- off<br>
- mute [on|off]<br>
- volume [0-100]<br>
- volumeUp<br>
- volumeDown<br>
- channel [1-9999]<br>
- channelUp<br>
- channelDown<br>
- statusRequest<br>
- remoteControl <command><br>
- input [hdmi1|hdmi2|hdmi3|hdmi4|sdCard|tv]<br>
- </code>
- </ul>
- </ul>
- <ul>
- <br>
- <u>Remote control (depending on your model, maybe)</u><br>
- For this application the following commands are available:<br>
- <ul><code>
- 3D => 3D button<br>
- BLUE => Blue<br>
- CANCEL => Cancel / Exit<br>
- CHG_INPUT => AV<br>
- CH_DOWN => Channel down<br>
- CH_UP => Channel up<br>
- D0 => Digit 0<br>
- D1 => Digit 1<br>
- D2 => Digit 2<br>
- D3 => Digit 3<br>
- D4 => Digit 4<br>
- D5 => Digit 5<br>
- D6 => Digit 6<br>
- D7 => Digit 7<br>
- D8 => Digit 8<br>
- D9 => Digit 9<br>
- DISP_MODE => Display mode / Aspect ratio<br>
- DOWN => Control DOWN<br>
- ENTER => Control Center click / enter<br>
- EPG => Guide / EPG<br>
- FF => Fast forward<br>
- GREEN => Green<br>
- HOLD => TTV hold / image freeze<br>
- INDEX => TTV index<br>
- INFO => Info<br>
- INTERNET => VIERA connect<br>
- LEFT => Control LEFT<br>
- MENU => Menu<br>
- MUTE => Mute<br>
- PAUSE => Pause<br>
- PLAY => Play<br>
- POWER => Power off<br>
- P_NR => P-NR (Noise reduction)<br>
- REC => Record<br>
- RED => Red<br>
- RETURN => Return<br>
- REW => Rewind<br>
- RIGHT => Control RIGHT<br>
- R_TUNE => Seems to do the same as INFO<br>
- SD_CARD => SD-card<br>
- SKIP_NEXT => Skip next<br>
- SKIP_PREV => Skip previous<br>
- STOP => Stop<br>
- STTL => STTL / Subtitles<br>
- SUBMENU => Option<br>
- TEXT => Text / TTV<br>
- TV => TV<br>
- UP => Control UP<br>
- VIERA_LINK => VIERA link<br>
- VOLDOWN => Volume down<br>
- VOLUP => Volume up<br>
- VTOOLS => VIERA tools<br>
- YELLOW => Yellow<br>
- </code></ul>
-
- <br>
- Example:<br>
- <ul><code>
- set <name> mute on<br>
- set <name> volume 20<br>
- set <name> remoteControl CH_DOWN<br>
- </code></ul>
- </ul>
- <br>
- <a name="VIERAget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <what></code>
- <br><br>
- Currently, the following commands are defined and return the current state of the TV.
- <ul><code>
- mute<br>
- volume<br>
- power<br>
- presence<br>
- </code></ul>
- </ul>
-
- <br>
- <a name="VIERAattr"></a>
- <b>Attributes</b>
- <ul>blocking [0|1]</ul>
-
- <br>
- <a name="VIERAevents"></a>
- <b>Generated events:</b>
- <ul>
- <li>volume</li>
- <li>mute</li>
- <li>presence</li>
- <li>power</li>
- <li>state</li>
- </ul>
- </ul>
- <p><a name="Vallox"></a>
- <h3>Vallox</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Vallox'>DE</a>]</div>
- <div>
- <ul>
- Vallox is a manufacturer for ventilation devices.
- <br>
- 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.
- <br>
- More Info on the particular <a href="http://www.fhemwiki.de/wiki/Vallox">page of FHEM-Wiki</a> (in German).
- <br>
-
- <br>
-
- <a name="Valloxdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Vallox <RS485-Device[@baud]> [BusVersion]</code><br>
- If the baudrate is omitted, it is set to 9600 (default Vallox baudrate).<br>
- The BusVersion can be set to 1 for older systems. (Default: 2).<br>
- <br>
- Example: <code>define Ventilation Vallox /dev/ttyUSB1</code>
- </ul>
- <br>
-
- <a name="Valloxset"></a>
- <b>Set</b>
- <ul>
- <li><code>FanSpeed < 1-8 ></code>
- <br>
- Allows to set the fan speed (1 = lowest; 8 = highest).<br>
- </li><br>
- <li><code>BasicHumidityLevel < 0-100 ></code>
- <br>
- Allows to set the basic humidity level in percentage.<br>
- </li><br>
- <li><code>HeatRecoveryCellBypassSetpointTemperature < 0-20 ></code>
- <br>
- Allows to set the heat recovery cell bypass setpoint temperature.<br>
- </li><br>
- <li><code>raw < HexValue ></code><br>
- HexValue is two 2-digit hex number to identify the type and value of setting.
- </li><br>
- <br>
- Example to set the fan speed to 3:<br>
- <code>set Ventilation raw 2907</code><br>
- or:<br>
- <code>set Ventilation FanSpeed 3</code>
- </ul>
- <br>
-
- <a name="Valloxget"></a>
- <b>Get</b>
- <ul>
- <li><code>reading < readingname ></code>
- <br>
- Allows to get any predefined reading.<br>
- </li><br>
- <li><code>raw < HexValue ></code><br>
- HexValue is a 2-digit hex number to identify the requested reading.
- </li><br>
- </ul>
- <br>
-
- <a name="Valloxattr"></a>
- <b>Attributes</b>
- <ul><li><code>ValloxIDDomain < HexValue ></code>
- <br>
- HexValue is a 2-digit hex number to identify the "address" of the bus domain. (01 by default).
- </li><br>
- <li><code>ValloxIDCentral < HexValue ></code>
- <br>
- HexValue is a 2-digit hex number to identify the "address" of the central ventilation unit. (11 by default).<br>
- In a normal installation ventilation units in the scope 11 to 19 and are addressed with 10 for broadcast-messages.
- </li><br>
- <li><code>ValloxIDFHEM < HexValue ></code>
- <br>
- HexValue is a 2-digit hex number to identify the "address" of this system as a virtual control terminal. (2F by default)<br>
- In a normal installation control terminals are in the scope 21 to 29 and are addressed with 20 for broadcast-messages.<br>
- The address must be unique.<br>
- The "panel address" 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>
- The physical control terminal is usually 21.
- </li><br>
- <li><code>ValloxBufferDebug < 0/1 ></code>
- <br>
- When 1, modul creates an Internal which fills with the raw Hex-Data from the bus. DEBUG ONLY! (0 by default).
- </li><br>
- <li><code>ValloxForceBroadcast < 0/1 ></code>
- <br>
- 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).
- </li><br>
- <li><code>ValloxProcessOwnCommands < 0/1 ></code>
- <br>
- 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).
- </li><br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- </ul>
- </div>
- <p><a name="VantagePro2"></a>
- <h3>VantagePro2</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#VantagePro2'>DE</a>]</div>
- <ul>
- Note: this module needs the Net::Telnet perl module.
- <br><br>
- <a name="VantagePro2define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> <ip-address> <port> <delay></code>
- <br><br>
- Defines a Davis VantagePro2 weatherstation attached on transparent ethernet/usb|serial server accessable by telnet.<br><br>
- Examples:
- <ul>
- <code>define AUSSEN.wetterstation VantagePro2 192.168.8.127 4999 60</code><br>
- <code>
- fhem> list AUSSEN.wetterstation<br>
- Internals:<br>
- DEF 192.168.8.127 4999 60<br>
- Host 192.168.8.127<br>
- NAME AUSSEN.wetterstation<br>
- NR 5<br>
- Port 4999<br>
- 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>
- TYPE VantagePro2<br>
- Readings:<br>
- 2010-08-04 10:15:17 10 min. average windspeed 1.61 (km/h)<br>
- 2010-08-04 10:15:17 UV 4.1 (UV/Index)<br>
- 2010-08-04 10:15:17 barometer 76.27 (Millimeters)<br>
- 2010-08-04 10:15:17 barometer trend Steady<br>
- 2010-08-04 10:15:17 day rain 0 (mm/day)<br>
- 2010-08-04 10:15:17 humidity inside 45 (%)<br>
- 2010-08-04 10:15:17 humidity outside 55 (%)<br>
- 2010-08-04 10:15:17 month rain 41 (mm/month)<br>
- 2010-08-04 10:15:17 rainrate 0.00 (mm/h)<br>
- 2010-08-04 10:15:17 solar 770 (Watt/m^2)<br>
- 2010-08-04 10:15:17 temperature-inside 26.50 (Celsius)<br>
- 2010-08-04 10:15:17 temperature-outside 22.78 (Celsius)<br>
- 2010-08-04 10:15:17 wind direction 257 (Degrees)<br>
- 2010-08-04 10:15:17 windspeed 1.61 (km/h)<br>
- 2010-08-04 10:15:17 year rain 241 (mm/year)<br>
- Attributes:<br>
- delay 60<br>
- </code><br>
- </ul>
- </ul>
- </ul>
- <p><a name="Verkehrsinfo"></a>
- <h3>Verkehrsinfo</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Verkehrsinfo'>DE</a>]</div>
- <ul>
- <i>Verkehrsinfo</i> can read trafficinformation from various source.
- <br><br>
- <ul>
- <li>Verkehrsinfo.de</li>
- For receiving the traffic informationen, following website https://www.verkehrsinfo.de/httpsmobil will be called on.<br>
- There you can select streets or federal states. Afterwards the URL will be committed as a parameter.
- <br><br>
- <li>Hessenschau.de</li>
- Here is no configuration necessary, the URL http://hessenschau.de/verkehr/index.html will be used as a parameter.
- <br><br>
- <li>RadioSAW.de</li>
- Here is no configuration necessary, the keyword radiosaw will be used as a parameter.
- </ul>
- <br><br>
-
- <b>Requirement:</b>
- <ul><br>
- For this module, following perl-modules are required:<br>
- <li>HTML::TreeBuilder::XPath<br>
- <code>sudo apt-get install libxml-treebuilder-perl libhtml-treebuilder-xpath-perl</code>
- </li>
- </ul>
- <br><br>
-
- <a name="Verkehrsinfodefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Verkehrsinfo <url> <interval></code>
- <br><br>
- example: <code>define A8 Verkehrsinfo https://www.verkehrsinfo.de/httpsmobil/index.php?c=staulist&street=A8&lat=&lon= 3600 </code>
- <br><br>
- Options:
- <ul>
- <li><i>url</i><br>
- URL regarding the traffic information</li>
- <li><i>interval</i><br>
- How often the data will be updated in seconds</li>
- </ul>
- </ul>
- <br>
-
- <a name="Verkehrsinfoset"></a>
- <b>Set</b><br>
- <ul>
- <code>set <name> <option></code>
- <br><br>
- Options:
- <ul>
- <li><i>update</i><br>
- update will be executed right away</li>
- </ul>
- </ul>
- <br>
-
- <a name="Verkehrsinfoget"></a>
- <b>Get</b><br>
- <ul>
- <code>get <name> <option></code>
- <br><br>
- Options:
- <ul>
- <li><i>info</i><br>
- output currently traffic information</li>
- </ul>
- </ul>
- <br>
-
- <a name="Verkehrsinfoattr"></a>
- <b>Attributes</b><br>
- <ul>
- <code>attr <name> <option> <value></code>
- <br><br>
- Options:
- <ul>
- <li><i>filter_exclude</i><br>
- This is an exclusion filter. Traffic information containing these words, will not be displayed.<br>
- The filter supports regular expressions. Attention: regex control character, for example brackets have to be masked with a backslash "\".<br>
- Multiple searching keywords can be seperated with the pipe "|".<br><br></li>
- <li><i>filter_include</i><br>
- This is an inclusion filter. Traffic information containing these words, will be displayed.<br>
- The filter supports regular expressions. Attention: regex control character, for example brackets have to be masked with a backslash "\".<br>
- Multiple searching keywords can be seperated with the pipe "|".<br><br></li>
- <li>Hint: Both filters can be used at the same time, or optional just one.<br>
- 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>
- <li><i>orderby</i><br>
- Messages will be sorted by relevance by reference to the string.<br>
- The sort supports regular expressions.<br>
- Multiple searching keywords can be seperated with the pipe "|".<br><br></li>
- <li><i>msg_format [ road | head | both ]</i> (only Verkehrsinfo.de and RadioSAW.de)<br>
- Using this parameter you can format the output, regarding streets, direction or both.<br><br></li>
- <li><i><a href="#readingFnAttributes">readingFnAttributes</a></i><br><br></li>
- </ul>
- </ul>
- <br>
-
- <a name="Verkehrsinforeading"></a>
- <b>Readings</b>
- <ul>
- <br>
- <li><b>e_</b><i>0|1|2|3...|9</i><b>_...</b> - aktiv message</li>
- <li><b>count</b> - number of aktiv messages</li>
- <li><b>e_</b><i>0</i><b>_road</b> - street</li>
- <li><b>e_</b><i>0</i><b>_head</b> - direction</li>
- <li><b>e_</b><i>0</i><b>_msg</b> - message</li>
- </ul>
- <br>
-
- <a name="Verkehrsinfofunktion"></a>
- <b>Funktion</b>
- <ul>
- <code>Verkehrsinfo_GetData(<devicename>)</code>
- <br><br>
- The function can be accessed anywhere in FHEM.
- The output of this function is the same as get <name> info and the string can be used for further forwarding.
- <br><br>
- example: <code>my $result = Verkehrsinfo_GetData('A8')</code>
- </ul>
- <br>
- </ul>
- <p><a name="VolumeLink"></a>
- <h3>VolumeLink</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#VolumeLink'>DE</a>]</div>
- <ul>
- VolumeLink links the volume-level & mute-state from a physical device (e.g. a Philips-TV) with the volume & mute control of a fhem device (e.g. a SONOS-Playbar, Onkyo, Yamaha or Denon Receiver, etc.).
- <br><br>
- <h4>Define</h4>
- <ul>
- <code>define <name> VolumeLink <interval> <url> <ampDevice> [<timeout> [<httpErrorLoglevel> [<httpLoglevel>]]]</code>
- <br><br>
- <br>
- <interval>:
- <ul>
- <code>interval to fetch current volume & mute level from physical-device.</code><br>
- </ul>
- <url>:
- <ul>
- <code>url to fetch volume & mute level, see Example below. (Example applies to many Philips TV's)</code><br>
- </ul>
- <ampDevice>:
- <ul>
- <code>the target fhem-device.</code><br>
- </ul>
- [<timeout>]:
- <ul>
- <code>optional: timeout of a http-get. default: 0.5 seconds</code><br>
- </ul>
- [<httpErrorLoglevel>]:
- <ul>
- <code>optional: loglevel of http-errors. default: 4</code><br>
- </ul>
- [<httpLoglevel>]:
- <ul>
- <code>optional: loglevel of http-messages. default: 5</code><br>
- </ul>
- </ul>
- <br>
- <h4>Example</h4>
- <ul>
- <code>define tvVolume_LivingRoom VolumeLink 0.2 http://192.168.1.156:1925/5/audio/volume Sonos_LivingRoom</code><br>
- <code>set tvVolume_LivingRoom on</code><br>
- <br>
- Note:<br>
- - This example will work out of the box with many Philips TV's and a SONOS-Playbar as fhem-device.<br>
- - Pre 2014 Philips TV's use another protocoll, which can be accessed on http://<ip>/1/audio/volume
- </ul>
- <br>
- <h4>Set</h4>
- <ul>
- <code>set <name> <on|off></code><br>
- <br>
- Set on or off, to start or to stop.
- </ul>
- <br>
- <h4>Get</h4> <ul>N/A</ul><br>
- <h4>Attributes</h4>
- <ul>
- Note:<br>
- - All Attributes takes effect immediately.<br>
- - The default value of volumeRegexPattern & muteRegexPattern applies to many Philips-TV's, otherwise it must be configured.<br>
- - The default values of amp* applies to a SONOS-Playbar, otherwise it must be configured.<br>
- - If you don't receive a result from url, or the lastHttpErrorMessage shows every time 'timed out', try setting attribute 'httpNoShutdown' to 0.<br>
- <br>
- <li>disable <1|0><br>
- With this attribute you can disable the whole module. <br>
- 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>
- If set to 0 you can start the module again with: set <name> on.</li>
- <li>httpNoShutdown <1|0><br>
- If set to 0 VolumeLink will tell the http-server to explicit close the connection.<br>
- <i>Default: 1</i>
- </li>
- <li>ampInputReading <value><br>
- Name of the Input-Reading on amplifier-device<br>
- To disable the InputCheck if your amplifier-device does not support this, set this attribute to 0.<br>
- <i>Default (which applies to SONOS-Player's): currentTitle</i></li>
- <li>ampInputReadingVal <RegEx><br>
- RegEx for the Reading value of the corresponding Input-Channel on amplifier-device<br>
- <i>Default (which applies to a SONOS-Playbar's SPDIF-Input and if no Input is selected): SPDIF-Wiedergabe|^$</i></li>
- <li>ampVolumeReading <value><br>
- Name of the Volume-Reading on amplifier-device<br>
- <i>Default: Volume</i></li>
- <li>ampVolumeCommand <value><br>
- Command to set the volume on amplifier device<br>
- <i>Default: Volume</i></li>
- <li>ampMuteReading <value><br>
- Name of the Mute-Reading on amplifier-device<br>
- <i>Default: Mute</i></li>
- <li>ampMuteReadingOnVal <value><br>
- Reading value if muted<br>
- <i>Default: 1</i></li>
- <li>ampMuteReadingOffVal <value><br>
- Reading value if not muted<br>
- <i>Default: 0</i></li>
- <li>ampMuteCommand <value><br>
- Command to mute the amplifier device<br>
- <i>Default: Mute</i></li>
- <li>volumeRegexPattern <RegEx><br>
- RegEx which is applied to url return data. Must return a number for volume-level. <br>
- <i>Default (which applies to many Phlips-TV's): current":\s*(\d+)</i></li>
- <li>muteRegexPattern <RegEx><br>
- RegEx which is applied to url return data. Must return true, false, 1 or 0 as mute-state. <br>
- <i>Default (which applies to many Phlips-TV's): muted":\s*(\w+|\d+)</i></li>
- </ul><br>
- <h4>Readings</h4>
- <ul>
- Note: All VolumeLink Readings except of 'state' does not generate events!<br>
- <br>
- <li>lastHttpError<br>
- The last HTTP-Error will be recorded in this reading.<br>
- Define httpErrorLoglevel, httpLoglevel or attribute <a href="#verbose">verbose</a> for more information.<br>
- Note: Attr <a href="#verbose">verbose</a> will not output all HTTP-Messages, define httpLoglevel for this.</li>
- <li>mute<br>
- The current mute-state fetched from physical device.</li>
- <li>volume<br>
- The current volume-level fetched from physical device.</li>
- <li>state<br>
- on if VolumeLink is running, off if VolumeLink is stopped.</li>
- </ul>
- <br>
- </ul>
- <p><a name="WEBCOUNT"></a>
- <h3>WEBCOUNT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WEBCOUNT'>DE</a>]</div>
- <ul>
- Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
- <br><br>
- <a name="WEBCOUNTdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> WEBCOUNT <ip-address> <port> <delay></code>
- <br><br>
- Defines an WEBCOUNT device (Box with 6 count pulses, www.wut.de) via ip address. The device is pooled (delay interval).<br><br>
- Examples:
- <ul>
- <code>define pump WEBCOUNT 192.168.8.200 1 60</code><br>
- </ul>
- </ul>
- <br>
- </ul>
- <p><a name="WEBIO"></a>
- <h3>WEBIO</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WEBIO'>DE</a>]</div>
- <ul>
- Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
- <br><br>
- <a name="WEBIOdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> WEBIO <ip-address> <port> <delay></code>
- <br><br>
- 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>
- Examples:
- <ul>
- <code>define pumpspeed WEBIO 192.168.8.200 1 60</code><br>
- </ul>
- </ul>
- <br>
- <a name="WEBIOset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- 0.00 - 10.00
- </pre>
- Examples:
- <ul>
- <code>set pumpspeed 6.75</code><br>
- </ul>
- <br>
- </ul>
- </ul>
- <p><a name="WEBIO_12DIGITAL"></a>
- <h3>WEBIO_12DIGITAL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WEBIO_12DIGITAL'>DE</a>]</div>
- <ul>
- Note: this module needs the HTTP::Request and LWP::UserAgent perl modules.
- <br><br>
- <a name="WEBIO_12DIGITALdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> WEBIO_12DIGITAL <ip-address> <outputport> <delay></code>
- <br><br>
- 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>
- Examples:
- <ul>
- <code>define motor1 WEBIO_12DIGITAL 192.168.8.200 1 60</code><br>
- </ul>
- </ul>
- <br>
- <a name="WEBIO_12DIGITALset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- on off
- </pre>
- Examples:
- <ul>
- <code>set motor1 on</code><br>
- </ul>
- <br>
- </ul>
- </ul>
- <p><a name="WINCONNECT"></a>
- <h3>WINCONNECT</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WINCONNECT'>DE</a>]</div>
- <ul>
- This module controls a Windows PC.
- <br><br>
-
- <ul>
- <a name="WINCONNECTdefine" id="WINCONNECTdefine"></a> <b>Define</b>
- <ul>
- <code>define <name> WINCONNECT <ip-address-or-hostname> [<poll-interval>]</code><br>
- <br>
- Defining an WINCONNECT device will schedule an internal task (interval can be set with optional parameter <poll-interval> in seconds, if not set, the value is 45 seconds), which periodically reads the status of the device and triggers notify/filelog commands.<br>
- <br>
- Example:<br>
- <ul>
- <code>define Buero.PC WINCONNECT 192.168.0.10<br>
- <br>
- # With custom interval of 60 seconds<br>
- define Buero.PC WINCONNECT 192.168.0.10 60<br></code>
- </ul>
- </ul>
- </ul>
-
- <br><br>
- More information on <a target="_blank" href="https://wiki.fhem.de/wiki/WINCONNECT">FHEM Wiki</a>.<br/>
- <br>
- </ul>
- <p><a name="WMBUS"></a>
- <h3>WMBUS - Wireless M-Bus</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WMBUS'>DE</a>]</div>
- <ul>
- This module supports Wireless M-Bus meters for e.g. water, heat, gas or electricity.
- Wireless M-Bus is a standard protocol supported by various manufacturers.
-
- It uses the 868 MHz band for radio transmissions.
- 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.
- <br>
- WMBus uses two different radio protocols, T-Mode and S-Mode. The receiver must be configured to use the same protocol as the sender.
- In case of a CUL this can be done by setting <a href="#rfmode">rfmode</a> to WMBus_T or WMBus_S respectively.
- <br>
- WMBus devices send data periodically depending on their configuration. It can take days between individual messages or they might be sent
- every minute.
- <br>
- WMBus messages can be optionally encrypted. In that case the matching AESkey must be specified with attr AESkey. Otherwise the decryption
- will fail and no relevant data will be available.
- <br><br>
- <b>Prerequisites</b><br>
- This module requires the perl modules Crypt::CBC, Digest::CRC and Crypt::OpenSSL::AES (AES only if encrypted messages should be processed).<br>
- On a debian based system these can be installed with<br>
- <code>
- sudo apt-get install libcrypt-cbc-perl libdigest-crc-perl libssl-dev<br>
- sudo cpan -i Crypt::OpenSSL::AES
- </code>
- <br><br>
- <a name="WMBUSdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> WMBUS [<manufacturer id> <identification number> <version> <type> [<MessageEncoding>]]|<bHexCode></code> <br>
- <br>
- 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.
- <br>
- For a manual definition there are two ways.
- <ul>
- <li>
- 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.
- The WMBUS module extracts all relevant information from such a message.
- </li>
- <li>
- Explictly specify the information that uniquely identifies a WMBus device. <br>
- The manufacturer code, which is is a three letter shortcut of the manufacturer name. See
- <a href="http://dlms.com/organization/flagmanufacturesids/index.html">dlms.com</a> for a list of registered ids.<br>
- The identification number is the serial no of the meter.<br>
- version is the version code of the meter<br>
- type is the type of the meter, e.g. water or electricity encoded as a number.<br>
- MessageEncoding is either CUL or AMB, depending on which kind of IODev is used.
- </li>
- <br>
- </ul>
- </ul>
- <br>
- <a name="WMBUSset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="WMBUSget"></a>
- <b>Get</b> <ul>N/A</ul><br>
-
- <a name="WMBUSattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a><br>
- Set the IO or physical device which should be used for receiving signals
- for this "logical" device. An example for the physical device is a CUL.
- </li><br>
- <li>AESKey<br>
- A 16 byte AES-Key in hexadecimal digits. Used to decrypt messages from meters which have encryption enabled.
- </li><br>
- <li>
- <a href="#ignore">ignore</a>
- </li><br>
- <li>rawmsg_as_reading<br>
- 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.
- </li>
- </ul>
- <br>
- <a name="WMBUSreadings"></a>
- <b>Readings</b><br>
- <ul>
- Meters can send a lot of different information depending on their type. An electricity meter will send other data than a water meter.
- 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.
- <br><br>
- The readings are generated in blocks starting with block 1. A meter can send several data blocks.
- Each block has at least a type, a value and a unit, e.g. for an electricity meter it might look like<br>
- <ul>
- <code>1_type VIF_ENERGY_WATT</code><br>
- <code>1_unit Wh</code><br>
- <code>1_value 2948787</code><br>
- </ul>
- <br>
- There is also a fixed set of readings.
- <ul>
- <li><code>is_encrypted</code> is 1 if the received message is encrypted.</li>
- <li><code>decryption_ok</code> is 1 if a message has either been successfully decrypted or if it is unencrypted.</li>
- <li><code>state</code> contains the state of the meter and may contain error message like battery low. Normally it contains 'no error'.</li>
- <li><code>battery</code> contains ok or low.</li>
- </ul>
- For some well known devices specific readings like the energy consumption in kWh created.
- </ul>
-
-
- </ul>
- <p><a name="WOL"></a>
- <h3>WOL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WOL'>DE</a>]</div>
- Defines a WOL device via its MAC and IP address.<br><br>
- 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.
- So, for example a Buffalo NAS can be kept awake.
- <ul>
- <a name="WOLdefine"></a>
- <h4>Define</h4>
- <ul>
- <code><b><font size="+1">define <name> WOL <MAC> <IP> [<mode> [<repeat>]]</font></b></code>
- <br><br>
- <dl>
- <dt><b>MAC</b></dt>
- <dd>MAC-Adress of the host</dd>
- <dt><b>IP</b></dt>
- <dd>IP-Adress of the host (or broadcast address of the local network if IP of the host is unknown)</dd>
- <dt><b>mode <i>[EW|UDP]</i></b></dt>
- <dd>EW: wakeup by <i>usr/bin/ether-wake</i> </dd>
- <dd>UDP: wakeup by an implementation like <i>Net::Wake(CPAN)</i></dd>
- </dl>
- <br><br>
- <b><font size="+1">Examples</font></b>:
- <ul>
- <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 switching only one time</code><br>
- <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 EW by ether-wake(linux command)</code><br>
- <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 BOTH by both methods</code><br>
- <code>define computer1 WOL 72:11:AC:4D:37:13 192.168.0.24 UDP 200 in repeat mode<i><b>usr/bin/ether-wake</b></i> in repeatmode</code><br>
- </ul>
- <br><br>
- <b><font size="+1">Notes</font></b>:
- <ul>
- Not every hardware is able to wake up other devices by default. Oftenly firewalls filter magic packets. Switch them first off.
- You may need a packet sniffer to check some malfunktion.
- With this module you get two methods to do the job: see the mode parameter.
- </ul>
- </ul>
- <a name="WOLset"></a>
- <h4>Set </h4>
- <ul>
- <code><b><font size="+1">set <name> <value></font></b></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- <b>refresh</b> # checks(by ping) whether the device is currently running
- <b>on</b> # sends a magic packet to the defined MAC address
- <b>off</b> # stops sending magic packets and sends the <b>shutdownCmd</b>(see attributes)
- </pre>
- <b><font size="+1">Examples</font></b>:
- <ul>
- <code>set computer1 on</code><br>
- <code>set computer1 off</code><br>
- <code>set computer1 refresh</code><br>
- </ul>
- </ul>
- <a name="WOLattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><code>attr <name> sysCmd <string></code>
- <br>Custom command executed to wakeup a remote machine, i.e. <code>/usr/bin/ether-wake or /usr/bin/wakeonlan</code></li>
- <li><code>attr <name> shutdownCmd <command></code>
- <br>Custom command executed to shutdown a remote machine. You can use <command>, like you use it in at, notify or Watchdog</li>
- <br><br>
- Examples:
- <PRE>
- attr wol shutdownCmd set lamp on # fhem command
- attr wol shutdownCmd { Log 1, "Teatime" } # Perl command
- attr wol shutdownCmd "/bin/echo "Teatime" > /dev/console" # shell command
- </PRE>
- <li><code>attr <name> interval <seconds></code></a>
- <br>defines the time between two checks by a <i>ping</i> if state of <name> is <i>on</i>. By using 0 as parameter for interval you can switch off checking the device.</li>
- <li><code>attr <name> useUdpBroadcast <broardcastAdress></code>
- <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.
- 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>
- </ul>
- </ul>
- <p><a name="WS2000"></a>
- <h3>WS2000</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WS2000'>DE</a>]</div>
- <ul>
- <br>
- <a name="WS2000define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> WS2000 <device_to_connect></code>
- <br><br>
- Define a WS2000 series raw receiver device sold by ELV. Details see <a
- href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=6724">here</a>.
- Unlike 86_FS10.pm it will handle the complete device communication itself
- and doesnt require an external program. For this reason you can now use
- this also on windows.
- <br>
- This Device will be usually connect to a serial port, but you can also
- define a raw network redirector like lantronix XPORT(TM).
- <br>Note: Currently this device does not support a "set" function
- <br><br>
- Attributes:
- <ul>
- <li><code>rain</code>: factor for calculating amount of rain in ml/count</li>
- <li><code>altitude</code>: height in meters to calculate pressure for NN (not used yet)</li>
- </ul>
- <br>
- Example:
- <ul>
- <code>define WS2000 WS2000 /dev/ttyS0</code><br>
- </ul>
- <ul>
- <code>define WS2000 WS2000 xport:10001</code><br>
- </ul>
- <ul>
- <code>attr WS2000 rain 366</code> : use factor 366 ml/count for rain sensor S2000R<br>
- </ul>
- <br>
- </ul>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="WS2000get"></a>
- <b>Get</b>
- <ul>
- <code>get <name> list</code>
- <br>
- Gets the last reading of all received sensord
- <br><br>
- <code>get <name> [TH0..TH7, T0..T7, I0..I7, R0..R7, W0..W7, L0..L7, P0..P7,LAST,RAW]</code><br>
- get the last reading for the name sensor, <br>
- <code>LAST</code>: Last received Sensor
- <br><br>
- <code>RAW</code>: original Data from interface
- <br><br>
- </ul>
- <a name="WS2000attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> (ws2000)</li>
- <li><a href="#loglevel">loglevel</a></li>
- <li>rain</li>
- <li>altitude</li>
- </ul>
- <br>
- </ul>
- <p><a name="WS300"></a>
- <h3>WS300</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WS300'>DE</a>]</div>
- <ul>
- <br>
- <a name="WS300define"></a>
- <b>Define</b>
- <ul>
- <code>define WS300Device WS300 <serial device></code><br>
- or<br>
- <code>define <devname> WS300 [0-9]</code><br>
- <br>
- The first line is mandatory if you have a WS300 device: it defines the
- input device with its USB port. The name of this device is fixed and must
- be WS300Device. It must be the first defined WS300 device.<br>
- For each additional device (with number 0 to 9) you have to define another
- WS300 device, with an arbitrary name. The WS300 device which reports the
- readings will be defined with the port number 9, an optional KS300 with the
- port number 8.<br><br>
- Examples:
- <pre>
- define WS300Device WS300 /dev/ttyUSB1
- define ash2200.1 WS300 0
- define ks300 WS300 8
- define ws300 WS300 9
- </pre>
- </ul>
- <br>
- <a name="WS300set"></a>
- <b>Set </b>
- <ul>
- <code>set WS300Device <interval(min.)> <height(m)> <rainvalume(ml)></code>
- <br><br>
- Set some WS300 configuration parameters.
- </ul>
- <a name="WS300get"></a>
- <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="WS300attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#model">model</a> (ws300)</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="WS3600"></a>
- <h3>WS3600</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WS3600'>DE</a>]</div>
- <ul>
- Defines a weather station, which is queried by means of an external
- program. That program is executed by FHEM and is expected to deliver the
- data at stdout in the format of a WS3600 series weather station (details
- see below).<br>
- <br>
- <a name="WS3600define"></a> <b>Define</b>
- <ul>
- <code>define <name> WS3600 "<wsreaderprog>
- [<options>]" [<interval>]</code> <br>
- <br>
- <ul>
- <dl>
- <dt><wsreaderprog></dt>
- <dd>full path to the executable which queries the weatherstation
- (for WS3600 series fetch3600 should be used)</dd>
- <dt><options></dt>
- <dd>options for <wsreaderprog>, if necessary</dd>
- <dt><interval></dt>
- <dd>this optional parameter is the time between subsequent calls to
- <wsreaderprog>. It defaults to 60s.</dd>
- </dl>
- </ul>
- <br>
- Supported Stations are:<br>
- <ul>
- <li>WS3600 series weather station (Europe Supplies, technotrade, etc;
- refer to <a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS3600">Wetterstationen.info</a>
- (german) for details on this model) with fetch3600 from the
- toolchain <a href="https://sourceforge.net/projects/open3600/">open3600</a>).
- Fetch3600 delivers the current readings line by line as
- reading-value-pairs. These are read periodically and translated into
- more readable names for FHEM by the module WS3600.pm. </li>
- <li><a href="http://wiki.wetterstationen.info/index.php?title=LaCrosse_WS2300">WS2300</a>
- with toolchain <a href="http://www.lavrsen.dk/twiki/bin/view/Open2300/WebHome">open2300</a>,
- because it is rather similar to the WS3600.</li>
- <li><a href="http://wiki.wetterstationen.info/index.php?title=WS1080">WS1080</a>
- (and other stations which come with the EasyWeather windows
- application) with <a href="https://github.com/ajauberg/fowsr/">fowsr</a>
- (version 2.0 or above)</li>
- </ul>
- <br>
- Currently, it is expected that the WS is attached to the local computer
- and <wsreaderprog> is run locally. Basically the executable called
- needs to supply on stdout an output similar to what fetch3600 returns;
- how to implement a "networked setup" is left as an excercise to the
- reader. <br>
- For the records, this is an output of fetch3600:<br>
- <div>
- <pre>Date 14-Nov-2009
- Time 10:50:22
- Ti 22.8
- Timin 20.8
- Timax 27.9
- TTimin 10:27
- DTimin 15-10-2009
- TTimax 23:31
- DTimax 20-08-2009
- To 14.2
- Tomin -0.4
- Tomax 35.6
- TTomin 07:03
- DTomin 15-10-2009
- TTomax 16:52
- DTomax 20-08-2009
- DP 9.2
- DPmin -2.2
- DPmax 20.3
- TDPmin 07:03
- DDPmin 15-10-2009
- TDPmax 11:58
- DDPmax 20-08-2009
- RHi 48
- RHimin 32
- RHimax 57
- TRHimin 17:03
- DRHimin 21-10-2009
- TRHimax 22:24
- DRHimax 07-10-2009
- RHo 72
- RHomin 27
- RHomax 96
- TRHomin 16:41
- DRHomin 20-08-2009
- TRHomax 06:28
- DRHomax 02-11-2009
- WS 0.0
- DIRtext WSW
- DIR0 247.5
- DIR1 247.5
- DIR2 247.5
- DIR3 247.5
- DIR4 247.5
- DIR5 247.5
- WC 14.2
- WCmin -0.4
- WCmax 35.6
- TWCmin 07:03
- DWCmin 15-10-2009
- TWCmax 16:52
- DWCmax 20-08-2009
- WSmin 0.0
- WSmax 25.6
- TWSmin 10:44
- DWSmin 14-11-2009
- TWSmax 19:08
- DWSmax 24-09-2009
- R1h 0.00
- R1hmax 24.34
- TR1hmax 22:34
- DR1hmax 07-10-2009
- R24h 0.00
- R24hmax 55.42
- TR24hmax 07:11
- DR24hmax 08-10-2009
- R1w 29.00
- R1wmax 95.83
- TR1wmax 00:00
- DR1wmax 12-10-2009
- R1m 117.58
- R1mmax 117.58
- TR1mmax 00:00
- DR1mmax 01-11-2009
- Rtot 3028.70
- TRtot 03:29
- DRtot 18-09-2005
- RP 992.200
- AP 995.900
- RPmin 970.300
- RPmax 1020.000
- TRPmin 05:25
- DRPmin 04-11-2009
- TRPmax 09:19
- DRPmax 11-09-2009
- Tendency Falling
- Forecast Cloudy</pre>
- </div>
- The following extensions are also supported now:<br>
- <div>
- <pre>IL 0.0
- UV 8
- Forecast Rain at times, worse later
- ZCode U</pre>
- </div>
- There is no expectation on the readings received from the fetch3600
- binary; so, in essence, if you have a similar setup (unsupported,
- attached weather station and a means to get it's reading into an output
- similar to above's), you <em>should be able</em> to use WS3600.pm with
- a custom written script to interface FHEM with your station as well.
- WS3600.pm <em>only recognizes the above readings</em> (and translates
- these into, e. g., <code>Temp-inside</code> for <code>Ti</code> for
- use within FHEM), other lines are silently dropped on the floor. Note:
- To step down the number of readings date and time records will now be
- merged to one reading containing date and time. This now also allows
- records with merged date / time values delivered from
- <wsreaderprog> - detected by prefix <code>DT</code> (e.g. <code>Date</code>
- + <code>Time</code> --> <code>DTime</code>, <code>DRPmin</code> +
- <code>TRPmin</code> --> <code>DTRPmin</code> and so on). <br>
- fetch3600 is available as binary for the Windows OS as well, <em>but
- operation under that OS isn't tested yet.</em> <br>
- <br>
- Examples:
- <ul>
- <code>define myWS3600 W3600 /usr/local/bin/fetch360</code><br>
- <code>define myWS1080 W3600 "/usr/local/bin/fowsr -c" 300</code><br>
- </ul>
- <br>
- </ul>
- <a name="WS3600set"></a> <b>Set</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="WS3600get"></a> <b>Get</b>
- <ul>
- N/A
- </ul>
- <br>
- <a name="WS3600attr"></a> <b>Attributes</b>
- <ul>
- <li><a href="#model">model</a> WS3600, WS2300,
- WS1080, WS3080 (not used for anything, yet)</li>
- </ul>
- <br>
- </ul>
- <p><a name="WUup"></a>
- <h3>WUup</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WUup'>DE</a>]</div>
- <ul>
- <a name="WUupdefine"></a>
- <b>Define</b>
- <ul>
- <br/>
- <code>define <name> WUup <stationId> <password></code>
- <br/><br/>
- This module provides connection to
- <a href="https://www.wunderground.com">www.wunderground.com</a></br>
- to send data from your own weather station.<br/>
- </ul>
- <br/><br/>
- <a name="WUupset"></a>
- <b>Set-Commands</b><br/>
- <ul>
- <li><b>update</b> - send data to Weather Underground</li>
- </ul>
- <br/><br/>
- <a name="WUupget"></a>
- <b>Get-Commands</b><br/>
- <ul>
- <br/>
- - not implemented -<br/>
- </ul>
- <br/><br/>
- <a name="WUupattr"></a>
- <b>Attributes</b><br/><br/>
- <ul>
- <li><b><a href="#readingFnAttributes">readingFnAttributes</a></b></li>
- <li><b>interval</b> - Interval (seconds) to send data to
- www.wunderground.com.
- Will be adjusted to 300 (which is the default) if set to a value lower than 3.<br />
- If lower than 300, RapidFire mode will be used.</li>
- <li><b>disable</b> - disables the module</li>
- <li><b><a href="#disabledForIntervals">disabledForIntervals</a></b></li>
- <li><b>unit_windspeed</b> - change the units of your windspeed readings (m/s or km/h)</li>
- <li><b>wu....</b> - Attribute name corresponding to
- <a href="http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol">parameter name from api.</a>
- Each of these attributes contains information about weather data to be sent
- in format <code>sensorName:readingName</code><br/>
- Example: <code>attr WUup wutempf outside:temperature</code> will
- define the attribute wutempf and <br/>
- reading "temperature" from device "outside" will be sent to
- network as parameter "tempf" (which indicates current temperature)
- <br/>
- Units get converted to angloamerican system automatically
- (°C -> °F; km/h(m/s) -> mph; mm -> in; hPa -> inHg)<br/><br/>
- <u>The following information is supported:</u>
- <ul>
- <li>winddir - [0-360 instantaneous wind direction]</li>
- <li>windspeedmph - [mph instantaneous wind speed]</li>
- <li>windgustmph - [mph current wind gust, using software specific time period]</li>
- <li>windgustdir - [0-360 using software specific time period]</li>
- <li>windspdmph_avg2m - [mph 2 minute average wind speed mph]</li>
- <li>winddir_avg2m - [0-360 2 minute average wind direction]</li>
- <li>windgustmph_10m - [mph past 10 minutes wind gust mph]</li>
- <li>windgustdir_10m - [0-360 past 10 minutes wind gust direction]</li>
- <li>humidity - [% outdoor humidity 0-100%]</li>
- <li>dewptf- [F outdoor dewpoint F]</li>
- <li>tempf - [F outdoor temperature]</li>
- <li>rainin - [rain inches over the past hour)] -- the accumulated rainfall in the past 60 min</li>
- <li>dailyrainin - [rain inches so far today in local time]</li>
- <li>baromin - [barometric pressure inches]</li>
- <li>soiltempf - [F soil temperature]</li>
- <li>soilmoisture - [%]</li>
- <li>solarradiation - [W/m²]</li>
- <li>UV - [index]</li>
- </ul>
- </li>
- </ul>
- <br/><br/>
- <b>Readings/Events:</b>
- <br/><br/>
- <ul>
- <li><b>data</b> - data string transmitted to www.wunderground.com</li>
- <li><b>response</b> - response string received from server</li>
- </ul>
- <br/><br/>
- <b>Notes</b><br/><br/>
- <ul>
- <li>Find complete api description
- <a href="http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol">here</a></li>
- <li>Have fun!</li><br/>
- </ul>
- </ul>
- <p><a name="WWO"></a>
- <h3>WWO</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WWO'>DE</a>]</div>
- <ul>
- <br>
- <a name="WWOdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> WWO <location> <apikey></code><br>
- <br>
- Defines a virtual device for WWO forecasts.<br><br>
- A WWO device periodically gathers current and forecast weather conditions
- from worldweatheronline.com (the free api version)<br>
- You need to signup at <a href="http://developer.worldweatheronline.com">http://developer.worldweatheronline.com</a> to get an apikey)<br><br>
- The parameter <code>location</code> is the WOEID (WHERE-ON-EARTH-ID), go to
- <a href="http://www.worldweatheronline.com">http://www.worldweatheronline.com</a> to find it out for your valid location.<br><br>
- The natural language in which the forecast information appears is english.
- <br><br>
-
- The interval is set to update the values every hour.
- <br><br>
- Examples:
- <pre>
- define MyWeather WWO Berlin,Germany
- </pre>
-
- The module provides one additional function <code>WWOAsHtml</code>. The function return the HTML code for a
- vertically arranged weather forecast.
- <br><br>
-
- Example:
- <pre>
- define MyWeatherWeblink weblink htmlCode { WWOAsHtml("MyWeather") }
- </pre>
-
- </ul>
- <br>
- <a name="Weatherset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> update</code><br><br>
- Forces the retrieval of the weather data. The next automatic retrieval is scheduled to occur
- <code>interval</code> seconds later.<br><br>
- </ul>
- <br>
- <a name="Weatherget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <reading></code><br><br>
- Valid readings and their meaning (? can be one of 0, 1, 2, 3, 4, 5 and stands
- for today, tomorrow, etc. - with 'fc?_' or without! - without is meaning 'current condition'):<br>
- <table>
- <tr><td>cloudcover</td><td>cloudcover in percent</td></tr>
- <tr><td>current_date_time</td><td>last update of forecast on server</td></tr>
- <tr><td>fc?_date</td><td>date of the forecast condition - not valid without 'fc?'</td></tr>
- <tr><td>fc?_icon</td><td>name of the forecasticon</td></tr>
- <tr><td>fc?_precipMM</td><td>preciption for day</td></tr>
- <tr><td>fc?_tempMaxC</td><td>forecasted daily high in degrees centigrade</td></tr>
- <tr><td>fc?_tempMaxF</td><td>forecasted daily high in degrees fahrenheit</td></tr>
- <tr><td>fc?_tempMinC</td><td>forecasted daily low in degrees centigrade</td></tr>
- <tr><td>fc?_tempMinF</td><td>forecasted daily low in degrees fahrenheit</td></tr>
- <tr><td>fc?_weatherCode</td><td>weathercode</td></tr>
- <tr><td>fc?_weatherDesc</td><td>short weather desciption</td></tr>
- <tr><td>fc?_weatherIconUrl</td><td>full url to the weathericonfile</td></tr>
- <tr><td>fc?_winddir16Point</td><td>winddirection with 16 points</td></tr>
- <tr><td>fc?_winddirDegree</td><td>windirection in degrees</td></tr>
- <tr><td>fc?_winddirection</td><td>winddirection</td></tr>
- <tr><td>fc?_windspeedKmph</td><td>windspeed in km/h</td></tr>
- <tr><td>fc?_windspeedMiles</td><td>windspeed in miles/h</td></tr>
- <tr><td>humidity</td><td>current humidity in %</td></tr>
- <tr><td>localObsDateTime</td><td>local time of observation</td></tr>
- <tr><td>observation_time</td><td>time of observation</td></tr>
- <tr><td>pressure</td><td>air pressure in hPa</td></tr>
- <tr><td>query</td><td>returns the queried location</td></tr>
- <tr><td>temperature</td><td>current temperature in degrees centigrade</td></tr>
- <tr><td>visibility</td><td>current visibilit in km</td></tr>
- </table>
- </ul>
- <br>
- <a name="Weatherattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="WaterCalculator"></a>
- <h3>WaterCalculator</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WaterCalculator'>DE</a>]</div>
- <ul>
- <table>
- <tr>
- <td>
- The WaterCalculator Module calculates the water consumption and costs of one or more water meters.<BR>
- 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>
- <BR>
- <BR>
- <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>
- <BR>
- 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>
- <BR>
- The WaterCalculator module provides several current, historical, statistical values around with respect to one or more water meter and creates respective readings.<BR>
- <BR>
- To avoid waiting for max. 12 months to have realistic values, the readings <BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterDay1st</code>,<BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterMonth1st</code>,<BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterYear1st</code> and<BR>
- <code><DestinationDevice>_<SourceCounterReading>_CounterMeter1st</code><BR>
- must be corrected with real values by using the <code>setreading</code> - command.<BR>
- 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>
- <BR>
- Intervalls smaller than 10s will be discarded to avoid peaks due to fhem blockages (e.g. DbLog - reducelog).
- <BR>
- </td>
- </tr>
- </table>
-
- <table><tr><td><a name="WaterCalculatorDefine"></a><b>Define</b></td></tr></table>
- <table><tr><td><ul><code>define <name> WaterCalculator <regex></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><name></code> : </td><td>The name of the calculation device. (E.g.: "myWaterCalculator")</td></tr>
- <tr><td><code><regex></code> : </td><td>A valid regular expression (also known as regex or regexp) of the event where the counter can be found</td></tr>
- </table>
- </ul></ul>
- <table><tr><td><ul>Example: <code>define myWaterCalculator WaterCalculator myWaterCounter:countersA.*</code></ul></td></tr></table>
- <BR>
- <table>
- <tr><td><a name="WaterCalculatorSet"></a><b>Set</b></td></tr>
- <tr><td>
- <ul>
- The set - function sets individual values for example to correct values after power loss etc.<BR>
- The set - function works only for readings which have been stored in the CalculatorDevice.<BR>
- The Readings being stored in the Counter - Device need to be changed individially with the <code>set</code> - command.<BR>
- </ul>
- </td></tr>
- </table>
- <BR>
- <table>
- <tr><td><a name="WaterCalculatorGet"></a><b>Get</b></td></tr>
- <tr><td>
- <ul>
- The get - function just returns the individual value of the reading.<BR>
- The get - function works only for readings which have been stored in the CalculatorDevice.<BR>
- The Readings being stored in the Counter - Device need to be read individially with <code>get</code> - command.<BR>
- </ul>
- </td></tr>
- </table>
- <BR>
- <table>
- <tr><td><a name="WaterCalculatorAttr"></a><b>Attributes</b></td></tr>
- <tr><td>
- <ul>
- If the below mentioned attributes have not been pre-defined completly beforehand, the program will create the WaterCalculator specific attributes with default values.<BR>
- In addition the global attributes e.g. <a href="#room">room</a> can be used.<BR>
- </ul>
- </td></tr>
- </table>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value is provided by your local water supplier and is shown on your water bill.<BR>
- For UK and US users it may known under "standing charge". Please make sure it is based on one year!<BR>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>Currency</code> : </li></td><td> One of the pre-defined list of currency symbols [€,£,$].<BR>
- The default value is €<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 0 = enabled.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The value for this offset will be calculated as follows W<sub>Offset</sub> = W<sub>Mechanical</sub> - W<sub>Module</sub><BR>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>WaterCubicPerCounts</code> : </li></td><td> A valid float number of water consumption in qm per counting ticks.<BR>
- 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>
- The default value is 1 (= the counter is already providing qm)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>WaterPricePerCubic</code> : </li></td><td> A valid float number for water Consumption price in the chosen currency per qm.<BR>
- <FONT COLOR="#FF0000">The sewage water cost needs to be taken into account.</FONT>
- The value is provided by your local water supplier and is shown on your water bill.<BR>
- The default value is 2.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 0.00<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 5 (May)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The CalculatorDevice is the device which has been created with this module.<BR>
- The CounterDevice is the Device which is reading the mechanical Water-meter.<BR>
- The default value is CalculatorDevice - Therefore the readings will be written into this device.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>WFRUnit</code> : </li></td><td> One value of the pre-defined list: l/min (liter/minute), m³/min (cubicmeter/minute), m³/h (cubicmeter/hour).<BR>
- It defines which unit shall be used and devides the water flow rate accordingly.<BR>
- The default value is l/min (liter/minute).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="WaterCalculatorReadings"></a><b>Readings</b></td></tr>
- <tr><td>
- <ul>
- As soon the device has been able to read at least 2 times the counter, it automatically will create a set of readings:<BR>
- The placeholder <code><DestinationDevice></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>
- The placeholder <code><SourceCounterReading></code> is the reading based on the defined regular expression where the counting ticks are coming from.<BR>
- </ul>
- </td></tr>
- </table>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterCurrent</code> : </li></td><td>Current indicated total water consumption as shown on mechanical water meter. Correct Offset-attribute if not identical.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterDay1st</code> : </li></td><td>The first meter reading after midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterDayLast</code> : </li></td><td>The last meter reading of the previous day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterMonth1st</code> : </li></td><td>The first meter reading after midnight of the first day of the month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterMonthLast</code> : </li></td><td>The last meter reading of the previous month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterMeterLast</code> : </li></td><td>The last meter reading of the previous meter reading year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterYear1st</code> : </li></td><td>The first meter reading after midnight of the first day of the year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_CounterYearLast</code> : </li></td><td>The last meter reading of the previous year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionCostDayLast</code> : </li></td><td>Consumption costs of the last day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionCostMeterLast</code> : </li></td><td>Consumption costs in the chosen currency of the last water meter period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionCostMonthLast</code> : </li></td><td>Consumption costs in the chosen currency of the last month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionCostYearLast</code> : </li></td><td>Consumption costs of the last calendar year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionCostDay</code> : </li></td><td>Consumption costs in the chosen currency since the beginning of the current day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionCostMonth</code> : </li></td><td>Consumption costs in the chosen currency since the beginning of the current month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionCostYear</code> : </li></td><td>Consumption costs in the chosen currency since the beginning of the current year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionDay</code> : </li></td><td>Consumption in qm since the beginning of the current day (midnight).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionDayLast</code> : </li></td><td>Total Consumption in qm of the last day.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionMeterLast</code> : </li></td><td>Total Consumption in qm of the last Water-meter reading period.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionMonth</code> : </li></td><td>Consumption in qm since the beginning of the current month (midnight of the first).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionMonthLast</code> : </li></td><td>Total Consumption in qm of the last month.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionYear</code> : </li></td><td>Consumption in qm since the beginning of the current year (midnight of the first).<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_ConsumptionYearLast</code> : </li></td><td>Total Consumption in qm of the last calendar year.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_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>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_MonthMeterReading</code> : </li></td><td>Number of month since last meter reading. The month when the reading occured is the first month = 1.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_WFRCurrent</code> : </li></td><td>Current water flow rate. (water flow rate based on current and previous measurement.)<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_WFRDayAver</code> : </li></td><td>Average water flow rate since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_WFRDayMax</code> : </li></td><td>Maximum water flow rate peak since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code><DestinationDevice>_<SourceCounterReading>_WFRDayMin</code> : </li></td><td>Minimum water flow rate peak since midnight.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- </ul>
- <p><a name="Weather"></a>
- <h3>Weather</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Weather'>DE</a>]</div>
- <ul>
- You need the JSON perl module. Use <code>apt-get install libjson-perl</code> on Debian and derivatives.<br><br>
- <a name="Weatherdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> Weather <location> [<interval> [<language>]]</code><br>
- <br>
- Defines a virtual device for weather forecasts.<br><br>
-
- A Weather device periodically gathers current and forecast weather conditions
- from the Yahoo Weather API.<br><br>
- The parameter <code>location</code> is the WOEID (WHERE-ON-EARTH-ID), go to
- <a href="http://weather.yahoo.com">http://weather.yahoo.com</a> to find it out for your location.<br><br>
- The optional parameter <code>interval</code> is the time between subsequent updates
- in seconds. It defaults to 3600 (1 hour).<br><br>
- The optional language parameter may be one of
- <code>de</code>,
- <code>en</code>,
- <code>pl</code>,
- <code>fr</code>,
- <code>nl</code>,
- It determines the natural language in which the forecast information appears.
- It defaults to <code>en</code>. If you want to set the language you also have to set the interval.<br><br>
- Examples:
- <pre>
- define MyWeather Weather 673513
- define Forecast Weather 673513 1800
- </pre>
-
- The module provides four additional functions <code>WeatherAsHtml</code>, <code>WeatherAsHtmlV</code>, <code>WeatherAsHtmlH</code> and
- <code>WeatherAsHtmlD</code>. The former two functions are identical: they return the HTML code for a
- vertically arranged weather forecast. The third function returns the HTML code for a horizontally arranged weather forecast. The
- 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>
- Example:
- <pre>
- define MyWeatherWeblink weblink htmlCode { WeatherAsHtmlH("MyWeather") }
- </pre>
-
- </ul>
- <br>
- <a name="Weatherset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> update</code><br><br>
- Forces the retrieval of the weather data. The next automatic retrieval is scheduled to occur
- <code>interval</code> seconds later.<br><br>
- </ul>
- <br>
- <a name="Weatherget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <reading></code><br><br>
- Valid readings and their meaning (? can be one of 1, 2, 3, 4, 5 and stands
- for today, tomorrow, etc.):<br>
- <table>
- <tr><td>city</td><td>name of town returned for location</td></tr>
- <tr><td>code</td><td>current condition code</td></tr>
- <tr><td>condition</td><td>current condition</td></tr>
- <tr><td>current_date_time</td><td>last update of forecast on server</td></tr>
- <tr><td>fc?_code</td><td>forecast condition code</td></tr>
- <tr><td>fc?_condition</td><td>forecast condition</td></tr>
- <tr><td>fc?_day_of_week</td><td>day of week for day +?</td></tr>
- <tr><td>fc?_high_c</td><td>forecasted daily high in degrees centigrade</td></tr>
- <tr><td>fc?_icon</td><td>forecast icon</td></tr>
- <tr><td>fc?_low_c</td><td>forecasted daily low in degrees centigrade</td></tr>
- <tr><td>humidity</td><td>current humidity in %</td></tr>
- <tr><td>icon</td><td>relative path for current icon</td></tr>
- <tr><td>pressure</td><td>air pressure in hPa</td></tr>
- <tr><td>pressure_trend</td><td>air pressure trend (0= steady, 1= rising, 2= falling)</td></tr>
- <tr><td>pressure_trend_txt</td><td>textual representation of air pressure trend</td></tr>
- <tr><td>pressure_trend_sym</td><td>symbolic representation of air pressure trend</td></tr>
- <tr><td>temperature</td><td>current temperature in degrees centigrade</td></tr>
- <tr><td>temp_c</td><td>current temperature in degrees centigrade</td></tr>
- <tr><td>temp_f</td><td>current temperature in degrees Fahrenheit</td></tr>
- <tr><td>visibility</td><td>visibility in km</td></tr>
- <tr><td>wind</td><td>wind speed in km/h</td></tr>
- <tr><td>wind_chill</td><td>wind chill in degrees centigrade</td></tr>
- <tr><td>wind_condition</td><td>wind direction and speed</td></tr>
- <tr><td>wind_direction</td><td>direction wind comes from in degrees (0 = north wind)</td></tr>
- <tr><td>wind_speed</td><td>same as wind</td></tr>
- </table>
- <br>
- The following readings help to identify whether a workaround has kicked in to avoid the retrieval of
- stale data from the remote server:
- <table>
- <tr><td>pubDate</td><td>publication time of forecast for current set of readings</td></tr>
- <tr><td>pubDateRemote</td><td>publication time of forecast as seen on remote server</td></tr>
- <tr><td>validity</td><td>stale, if publication time as seen on remote server is before that of current set of readings</td></tr>
- </table>
- </ul>
- <br>
- <a name="Weatherattr"></a>
- <b>Attributes</b>
- <ul>
- <li>disable: disables the retrieval of weather data - the timer runs according to schedule,
- though no data is requested from the API.</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="WeekdayTimer"></a>
- <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
- <h3>WeekdayTimer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WeekdayTimer'>DE</a>]</div>
- <ul>
- <br>
- <a name="weekdayTimer_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> WeekdayTimer <device> [<language>] [<u>weekdays</u>] <profile> <command>|<condition></code>
- <br><br>
- to set a weekly profile for <device><br><br>
- You can define different switchingtimes for every day.<br>
- The new parameter is sent to the <device> automatically with <br><br>
- <code>set <device> <para></code><br><br>
- If you have defined a <condition> and this condition is false if the switchingtime has reached, no command will executed.<br>
- An other case is to define an own perl command with <command>.
- <p>
- The following parameter are defined:
- <ul><b>device</b><br>
- The device to switch at the given time.
- </ul>
- <p>
- <ul><b>language</b><br>
- Specifies the language used for definition and profiles.
- de,en,fr are possible. The parameter is optional.
- </ul>
- <p>
- <ul><b>weekdays</b><br>
- Specifies the days for all timer in the <b>WeekdayTimer</b>.
- The parameter is optional. For details see the weekdays part in profile.
- </ul>
- <p>
- <ul><b>profile</b><br>
- Define the weekly profile. All timings are separated by space. A switchingtime is defined
- by the following example: <br><br>
- <ul><b>[<weekdays>|]<time>|<parameter></b></ul><br>
- <u>weekdays:</u> optional, if not set every day of the week is used.<br>
- Otherwise you can define a day with its number or its shortname.<br>
- <ul>
- <li>0,su sunday</li>
- <li>1,mo monday</li>
- <li>2,tu tuesday</li>
- <li>3,we wednesday</li>
- <li>4 ...</li>
- <li>7,$we weekend ($we)</li>
- <li>8,!$we weekday (!$we)</li>
- </ul><br>
- 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>
- <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>
- <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>
- </ul>
- <p>
- <ul><b>command</b><br>
- If no condition is set, all the rest is interpreted as a command. Perl-code is setting up
- by the well-known Block with {}.<br>
- Note: if a command is defined only this command is executed. In case of executing
- a "set desired-temp" command, you must define the hole commandpart explicitly by yourself.<br>
- <!----------------------------------------------------------------------------- -->
- <!-- -------------------------------------------------------------------------- -->
- The following parameter are replaced:<br>
- <ol>
- <li>$NAME => the device to switch</li>
- <li>$EVENT => the new temperature</li>
- </ol>
- </ul>
- <p>
- <ul><b>condition</b><br>
- if a condition is defined you must declare this with () and a valid perl-code.<br>
- The return value must be boolean.<br>
- The parameters $NAME and $EVENT will be interpreted.
- </ul>
- <p>
- <b>Examples:</b>
- <ul>
- <code>define shutter WeekdayTimer bath 12345|05:20|up 12345|20:30|down</code><br>
- Mo-Fr are setting the shutter at 05:20 to <b>up</b>, and at 20:30 <b>down</b>.<p>
- <code>define heatingBath WeekdayTimer bath 07:00|16 Mo,Tu,Th-Fr|16:00|18.5 20:00|eco
- {fhem("set dummy on"); fhem("set $NAME desired-temp $EVENT");}</code><br>
- At the given times and weekdays only(!) the command will be executed.<p>
- <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>
- The dimmer is only set to dimXX% if the dummy variable WeAreThere is "yes"(not a real live example).<p>
- If you want to have set all WeekdayTimer their current value (after a temperature lowering phase holidays)
- you can call the function <b>WeekdayTimer_SetParm("WD-device")</b> or <b>WeekdayTimer_SetAllParms()</b>.<br>
- This call can be automatically coupled to a dummy by a notify:<br>
- <code>define dummyNotify notify Dummy:. * {WeekdayTimer_SetAllTemps()}</code>
- <br><p>
- Some definitions without comment:
- <code>
- <pre>
- define wd Weekdaytimer device de 7|23:35|25 34|23:30|22 23:30|16 23:15|22 8|23:45|16
- define wd Weekdaytimer device de fr,$we|23:35|25 34|23:30|22 23:30|16 23:15|22 12|23:45|16
- define wd Weekdaytimer device de 20:35|25 34|14:30|22 21:30|16 21:15|22 12|23:00|16
- define wd Weekdaytimer device de mo-so, $we|{sunrise_abs_dat($date)}|on mo-so, $we|{sunset_abs_dat($date)}|off
- define wd Weekdaytimer device de mo-so,!$we|{sunrise_abs_dat($date)}|aus mo-so,!$we|{sunset_abs_dat($date)}|aus
- define wd Weekdaytimer device de {sunrise_abs_dat($date)}|19 {sunset_abs_dat($date)}|21
- define wd Weekdaytimer device de 22:35|25 23:00|16
- </code></pre>
- The daylist can be given globaly for the whole Weekdaytimer:<p>
- <code><pre>
- define wd Weekdaytimer device de !$we 09:00|19 (function("Ein"))
- define wd Weekdaytimer device de $we 09:00|19 (function("Ein"))
- define wd Weekdaytimer device de 78 09:00|19 (function("exit"))
- define wd Weekdaytimer device de 57 09:00|19 (function("exit"))
- define wd Weekdaytimer device de fr,$we 09:00|19 (function("exit"))
- </code></pre>
- </ul>
- </ul>
- <a name="WeekdayTimerset"></a>
- <b>Set</b>
- <code><b><font size="+1">set <name> <value></font></b></code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- <b>disable</b> # disables the Weekday_Timer
- <b>enable</b> # enables the Weekday_Timer
- </pre>
- <b><font size="+1">Examples</font></b>:
- <ul>
- <code>set wd disable</code><br>
- <code>set wd enable</code><br>
- </ul>
- </ul>
- <a name="WeekdayTimerget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="WeekdayTimerLogattr"></a>
- <b>Attributes</b>
- <ul>
- <li>delayedExecutionCond <br>
- 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.
- <br><br>
- <b>Example:</b>
- <pre>
- attr wd delayedExecutionCond isDelayed("$HEATING_CONTROL","$WEEKDAYTIMER","$TIME","$NAME","$EVENT")
- </pre>
- the parameter $WEEKDAYTIMER(timer name) $TIME $NAME(device name) $EVENT are replaced at runtime by the correct value.
- <br><br>
- <b>Example of a function:</b>
- <pre>
- sub isDelayed($$$$$) {
- my($hc, $wdt, $tim, $nam, $event ) = @_;
- my $theSunIsStillshining = ...
- return ($tim eq "16:30" && $theSunIsStillshining) ;
- }
- </pre>
- </li>
- <li>switchInThePast<br>
- 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.
- Heatings are always switched in the past.
- </li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#loglevel">loglevel</a></li>
- <li><a href="#event-on-update-reading">event-on-update-reading</a></li>
- <li><a href="#event-on-change-reading">event-on-change-reading</a></li>
- <li><a href="#stateFormat">stateFormat</a></li>
- </ul><br>
- <p><a name="WifiLight"></a>
- <h3>WifiLight</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#WifiLight'>DE</a>]</div>
- <ul>
- <p>The module controls a large number of different "no name" LED types and provide a consistent interface.</p>
- <p>Following types will be supported:</p>
- <!-- <table rules="all" cellpadding="6" style="border:solid 1px;"> -->
- <table>
- <thead align="left">
- <tr>
- <th>
- type / bridge
- </th>
- <th>
- type
- </th>
- <th>
- note
- </th>
- <th>
- define signature
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- Milight RGB first generation
- </td>
- <td>
- E27, stripe controller
- </td>
- <td>
- *(1,2,a,C)
- </td>
- <td>
- RGB bridge-V2|3
- </td>
- </tr>
- <tr>
- <td>
- Milight RGBW1 first generation
- </td>
- <td>
- RGBW stripe controller
- </td>
- <td>
- *(1,2,a)
- </td>
- <td>
- RGBW1 bridge-V2|3
- </td>
- </tr>
- <tr>
- <td>
- Milight Dual White
- </td>
- <td>
- E14, E27, GU10, stripe controller, Downlight
- </td>
- <td>
- *(1,2,b,W,nK)
- </td>
- <td>
- White bridge-V2|3
- </td>
- </tr>
- <tr>
- <td>
- Milight RGBW2 second generation
- </td>
- <td>
- E14, E27, GU10, stripe controller, Downlight
- </td>
- <td>
- *(2,b,CW,S20)
- </td>
- <td>
- RGBW2 bridge-V3
- </td>
- </tr>
- <tr>
- <td>
- LW12 first generation (SSID LEDNet...)
- </td>
- <td>
- RGB stripe controller
- </td>
- <td>
-
- </td>
- <td>
- RGB LW12
- </td>
- </tr>
- <tr>
- <td>
- LW12HX (SSID HX...)
- </td>
- <td>
- RGB stripe controller
- </td>
- <td>
-
- </td>
- <td>
- RGB LW12HX
- </td>
- </tr>
- <tr>
- <td>
- LW12FC (SSID FC...)
- </td>
- <td>
- RGB stripe controller
- </td>
- <td>
-
- </td>
- <td>
- RGB LW12FC
- </td>
- </tr>
- <tr>
- <td>
- LD316 in RGB mode
- </td>
- <td>
- E27
- </td>
- <td>
-
- </td>
- <td>
- RGB LD316
- </td>
- </tr>
- <tr>
- <td>
- LD316 in RGBW mode
- </td>
- <td>
- E27
- </td>
- <td>
- *(S20)
- </td>
- <td>
- RGBW LD316
- </td>
- </tr>
- <tr>
- <td>
- LD316A in RGBW mode
- </td>
- <td>
- E27
- </td>
- <td>
- *(S20)
- </td>
- <td>
- RGBW LD316A
- </td>
- </tr>
- <tr>
- <td>
- LD382 in RGB mode
- </td>
- <td>
- RGB stripe controller
- </td>
- <td>
-
- </td>
- <td>
- RGB LD382
- </td>
- </tr>
- <tr>
- <td>
- LD382 in RGBW mode
- </td>
- <td>
- RGBW stripe controller
- </td>
- <td>
-
- </td>
- <td>
- RGBW LD382
- </td>
- </tr>
- <tr>
- <td>
- LD382A (FW 1.0.6+) in RGB mode
- </td>
- <td>
- RGB stripe controller
- </td>
- <td>
-
- </td>
- <td>
- RGB LD382
- </td>
- </tr>
- <tr>
- <td>
- LD382A (FW 1.0.6+) in RGBW mode
- </td>
- <td>
- RGBW stripe controller
- </td>
- <td>
-
- </td>
- <td>
- RGBW LD382
- </td>
- </tr>
- <tr>
- <td>
- SENGLED
- </td>
- <td>
- E27 bulb with build-in WLAN repeater
- </td>
- <td>
-
- </td>
- <td>
- White Sengled
- </td>
- </tr>
- <tr>
- <td>
- SUNRICHER with RGBW
- </td>
- <td>
- Controller
- </td>
- <td>
- *(!!!)
- </td>
- <td>
- RGBW Sunricher
- </td>
- </tr>
- </tbody>
- </table>
- <p>
- <small>
- (1) milght brigbe V2, V3, V4<br />
- (2) milight bridge V3, V4<br />
- (a) one group per bridge<br />
- (b) four independent group per bridge<br />
- (nK) no color temp support (Kelvin)<br />
- (C) pure color<br />
- (W) pure white<br />
- (CW) pure Color or pure white<br />
- (S20) Saturation <20: switch to pure white channel<br />
- (!!!) EXPERIMENTAL<br />
- </p>
- </small>
- <p>
- <table>
- <tr>
- <td>
- <p><b>Color</b></p>
- <p>Colors can be specified in RGB or HSV color space.</p>
- <p>Color in <a name="WifiLight_Farbraum_HSV"><b>color space "HSV"</b></a> are completely and generally more intuitive than RGB.</p>
- <p><b>H</b> (HUE: 0..360) are the basic color in a color wheel.
- <ul>
- <li>Red is at 0 °</li>
- <li>Green at 120 °</li>
- <li> Blue at 240 °</li>
- </ul>
- </p>
- <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>
- <p><b>V</b> (Value: 0..100) indicates the brightness. A value of 50 states that "half brightness".</p>
- </td>
- <td>
- <a name="WifiLight_Farbkreis">
- <svg style="width:450px; height:320px;" viewBox="-100 -30 500 320">
- <linearGradient id="linearColors1" x1="0" y1="0" x2="1" y2="1">
- <stop offset="0%" stop-color="#FF0000"></stop>
- <stop offset="100%" stop-color="#FFFF00"></stop>
- </linearGradient>
- <linearGradient id="linearColors2" x1="0.5" y1="0" x2="0.5" y2="1">
- <stop offset="0%" stop-color="#FFFF00"></stop>
- <stop offset="100%" stop-color="#00FF00"></stop>
- </linearGradient>
- <linearGradient id="linearColors3" x1="1" y1="0" x2="0" y2="1">
- <stop offset="0%" stop-color="#00FF00"></stop>
- <stop offset="100%" stop-color="#00FFFF"></stop>
- </linearGradient>
- <linearGradient id="linearColors4" x1="1" y1="1" x2="0" y2="0">
- <stop offset="0%" stop-color="#00FFFF"></stop>
- <stop offset="100%" stop-color="#0000FF"></stop>
- </linearGradient>
- <linearGradient id="linearColors5" x1="0.5" y1="1" x2="0.5" y2="0">
- <stop offset="0%" stop-color="#0000FF"></stop>
- <stop offset="100%" stop-color="#FF00FF"></stop>
- </linearGradient>
- <linearGradient id="linearColors6" x1="0" y1="1" x2="1" y2="0">
- <stop offset="0%" stop-color="#FF00FF"></stop>
- <stop offset="100%" stop-color="#FF0000"></stop>
- </linearGradient>
- <linearGradient id="linearColors7" x1="152" y1="130" x2="152" y2="35" gradientUnits="userSpaceOnUse">
- <stop offset="0.2" stop-color="#FFFFFF"></stop>
- <stop offset="1" stop-color="#FF0000"></stop>
- </linearGradient>
- <linearGradient id="linearColors8" x1="152" y1="130" x2="230" y2="190" gradientUnits="userSpaceOnUse">
- <stop offset="0.2" stop-color="#FFFFFF"></stop>
- <stop offset="1" stop-color="#00FF00"></stop>
- </linearGradient>
- <linearGradient id="linearColors9" x1="152" y1="130" x2="70" y2="190" gradientUnits="userSpaceOnUse">
- <stop offset="0.2" stop-color="#FFFFFF"></stop>
- <stop offset="1" stop-color="#0000FF"></stop>
- </linearGradient>
- <marker id="markerArrow" markerWidth="13" markerHeight="13" refX="2" refY="6" orient="auto">
- <path d="M2,2 L2,11 L10,6 L2,2" style="fill:grey;" />
- </marker>
- <path d="M150 10 a120 120 0 0 1 103.9230 60" fill="none" stroke="url(#linearColors1)" stroke-width="20" />
- <path d="M253.9230 70 a120 120 0 0 1 0 120" fill="none" stroke="url(#linearColors2)" stroke-width="20" />
- <path d="M253.9230 190 a120 120 0 0 1 -103.9230 60" fill="none" stroke="url(#linearColors3)" stroke-width="20" />
- <path d="M150 250 a120 120 0 0 1 -103.9230 -60" fill="none" stroke="url(#linearColors4)" stroke-width="20" />
- <path d="M46.077 190 a120 120 0 0 1 0 -120" fill="none" stroke="url(#linearColors5)" stroke-width="20" />
- <path d="M46.077 70 a120 120 0 0 1 103.9230 -60" fill="none" stroke="url(#linearColors6)" stroke-width="20" />
- <path d="M150,50 C250,50 250,180 180,200" fill="none" stroke="grey" stroke-width="2" marker-end="url(#markerArrow)" />
- <text class="Label" x="126" y="208">HUE</text>
- <line x1="152" y1="130" x2="152" y2="35" stroke="url(#linearColors7)" stroke-width="4" />
- <line x1="136" y1="120" x2="136" y2="45" stroke="grey" stroke-width="2" marker-end="url(#markerArrow)" />
- <text class="Label" x="96" y="96">SAT</text>
- <line x1="152" y1="130" x2="230" y2="190" stroke="url(#linearColors8)" stroke-width="4" />
- <line x1="152" y1="130" x2="70" y2="190" stroke="url(#linearColors9)" stroke-width="4" />
- <text x="120" y="-10">0° (Red)</text>
- <text x="270" y="60">60° (Yellow)</text>
- <text x="270" y="220">120° (Green)</text>
- <text x="110" y="285">180° (Cyan)</text>
- <text x="-60" y="220">240° (Blue)</text>
- <text x="-90" y="60">300° (Magenta)</text>
- </svg>
- </a>
- </td>
- </tr>
- </table>
- </p>
- <p>
- <b>Color: HSV compared to RGB</b>
- <p>
- Normally, a color may be expressed in the HSV color space as well as in RGB color space.
- <p>
- Colors in the HSV color space usually seem more understandable.
- To move a Green in the HSV color space a little more toward CYAN, simply increase the HUE value (angle) slightly.
- In RGB color space, the same task is less intuitive to achieve by increasing blue.
- <p>
- Differences become clear in Transitions however.
- In order to dim BLUE up the HSV Transitions 240,100,0 -> 240,100,100 would be used.
- To slowly dim RED (brightness 0) to BLUE the Transition in the HSV color space is 0,100,0 -> 240,100,100.
- In RGB color space (# 000000 -> # 0000FF) can not distinguish between the two versions.
- Here (correctly, but probably differently than intended) would appear in both cases, a white (brightness 0) as an initial value.
- </p>
- <p><b>Define</b></p>
- <ul>
- <li>
- <p><code>define <name> WifiLight <LED type> <bridgetype>:<IP|FQDN></code></p>
- <p>
- <i><u>example</u></i>
- <ul>
- <p>
- <i>defines a milight RGBW2 (bulb or LED stripe controller) on a milight bridge version 3 or 4.
- The LED is allocated to a maximum of 4 groups available per bridge in order of definition:</i>
- <br/>
- <code>define wz.licht.decke WifiLight RGBW2 bridge-V3:192.168.178.142</code>
- </ul>
- <ul>
- <p>
- <i>defines a LD382A Controller with RGBW stripe:</i>
- <br/>
- <code>define wz.licht.decke WifiLight RGBW LD382A:192.168.178.142</code>
- </ul>
- <ul>
- <p>
- <i>defines a LD382A Controller with RGB stripe:</i>
- <br/>
- <code>define wz.licht.decke WifiLight RGB LD382A:192.168.178.142</code>
- </ul>
- <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>
- </ul>
- </li>
- <p><b>Set</b></p>
- <ul>
- <li>
- <p><code>set <name> <b>on</b> [ramp]</code></p>
- <p>Turns on the device. It is either chosen 100% White or the color defined by the attribute "default color".
- <p>Advanced options:
- <ul>
- <li>ramp</li>
- </ul>
- </p>
- </li>
- <li>
- <p><code>set <name> <b>off</b> [ramp]</code></p>
- <p>Turns of the device.
- <p>Advanced options:
- <ul>
- <li>ramp</li>
- </ul>
- </p>
- </li>
- <li>
- <p><code>set <name> <b>dimup</b></code></p>
- <p>Increases the brightness by a fixed amount. The attribute "dimStep" or the default "7" is applied.<br />
- This command is useful to increase particularly the brightness by a wall switch or a remote control.
- <p>Advanced options:
- <ul>
- <li>none</li>
- </ul>
- </p>
- </li>
- <li>
- <p><code>set <name> <b>dimdown</b></code></p>
- <p>Decreases the brightness by a fixed amount. The attribute "dimStep" or the default "7" is applied.<br />
- This command is useful to reduce particularly the brightness by a wall switch or a remote control.
- <p>Advanced options:
- <ul>
- <li>none</li>
- </ul>
- </p>
- </li>
- <li>
- <p><code>set <name> <b>dim</b> level [ramp] [q]</code></p>
- <p>Sets the brightness to the specified level (0..100).
- This command also maintains the preset color even with "dim 0" (off) and then "dim xx" (turned on) at.
- Therefore, it represents an alternative form to "off" / "on". The latter would always choose the "default color".
- <p>Advanced options:
- <ul>
- <li>ramp</li>
- </ul>
- </p>
- <p>Flags:
- <ul>
- <li>q</li>
- </ul>
- </p>
- </li>
- <li>
- <p><code>set <name> <b>HSV</b> H,S,V [ramp] [s|l|q] [event]</code></p>
- <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.
- <ul><i>For example, sets a saturated blue with half brightness:</i><br /><code>set wz.licht.decke HSV 240,100,50</code></ul>
- <p>Advanced options:
- <ul>
- <li>ramp</li>
- </ul>
- </p>
- <p>Flags:
- <ul>
- <li>s l q event</li>
- </ul>
- </p>
- </li>
- <li>
- <p><code>set <name> <b>RGB</b> RRGGBB [ramp] [l|s|q] [event]</code></p>
- <p>Sets the color in the RGB color space.
- <p>Advanced options:
- <ul>
- <li>ramp</li>
- </ul>
- </p>
- <p>Flags:
- <ul>
- <li>s l q event</li>
- </ul>
- </p>
- </ul>
- </li>
- <p><b>Meaning of Flags</b></p>
- Certain commands (set) can be marked with special flags.
- <p>
- <ul>
- <li>ramp:
- <ul>
- 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.
- </ul>
- </li>
- <li>s:
- <ul>
- (short, default). A smooth transition to another color is carried out in the <a href="#WifiLight_Farbkreis">"color wheel"</a> on the shortest path.
- A transition from red to green lead by the shortest route through yellow.
- </ul>
- </li>
- <li>l:
- <ul>
- (long). A smooth transition to another color is carried out in the <a href="#WifiLight_Farbkreis">"color wheel"</a> on the "long" way.
- A transition from red to green then leads across magenta, blue, and cyan.
- </ul>
- </li>
- <li>q:
- <ul>
- (queue). Commands with this flag are cached in an internal queue and will not run before the currently running soft transitions have been processed.
- Commands without the flag will be processed immediately. In this case all running transitions are stopped immediately and the queue will be cleared.
- </ul>
- </li>
- <li>event:
- <ul>
- designator ([A-Za-z_0-9])
- <p>
- WifiLight creates, when using this flag, during transitions to another color messages (events) in the form:
- <p>
- <code>WifiLight <NAME> programm: <EVENT> <XX></code>.
- <p>
- <EVENT> is the designator as specified in the flag.<br/>
- <XX> is the progress (percentage) of the transition.<br/>
- <p>
- 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.
- To these events can then be reacted within a notify or DOIF to (for example):
- <ul>
- <li>increase the volume of a radio when a lamp is turned on in the morning slowly</li>
- <li>A color transition can be restarted in a notify if it is complete (loop it, even complex transitions)</li>
- <li>Other light sources can be synchronized by individually created color transitions.</li>
- </ul>
- </ul>
- </li>
- </ul>
- <p><b><a name="WifiLight_Farbkalibrierung"></a>color calibration</b></p>
- WifiLight supports two different types of color calibrations:
- <ul>
- <p>
- <b>Correction of saturated colors</b>
- <p>
- background:
- <p>
- YELLOW, for example, is defined as a mixture of red and green light in equal parts.
- Depending on the LED and control used the green channel may be much more luminous.
- 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.
- 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.
- Instead GREEN would be generated with yellow tinge, perhaps corresponding to an estimated color angle of 80 °.
- The required correction for yellow would therefore minus 20° (60° target - 80° result = -20° correction).
- YELLOW may have to be corrected as to -20 °. Possible values per correction point are +/- 29 °.
- <p>
- procedure:
- <p>
- The correction of the full color is controlled by the attribute "color cast".
- Here 6 (comma separated) values are specified in the range from -29 to 29.
- These values are in accordance with the angle correction for red (0 °), yellow (60 °), green (120 °), cyan (180 °), blue (240 °) and magenta (300 °).
- First, the deviation of the mixed colors (60 ° / 180 ° / 300 °) should be determined as in the above example, and stored in the attribute.
- Following the primary colors (0 ° / 120 ° / 240 °) should be corrected so that the smooth transitions between adjacent pure colors appear as linear as possible.
- This process may need to be repeated iteratively multiple times until the result is harmonious.
- <p>
- <b>White Balance</b>
- <p>
- background:
- <p>
- Some bulbs produce white light by mixing the RGB channels (for example, LW12).
- Depending on the light intensity of the RGB channels of the LED strips used, the result is different.
- One or two colors dominate.
- In addition, there are various types of white light.
- Cold light has a higher proportion of blue.
- In Central Europe mostly warm white light is used for light sources.
- This has a high red and low blue component.
- <p>
- WifiLight offers the possibility for mixed RGB white to adapt the composition.
- The adjustment is carried out via the attribute "white point".
- 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.
- <p>
- procedure:
- <p>
- A value of "1,1,1" sets all the three channels to 100% each.
- 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%.
- Before doing a white balance correction the adjusment of the saturated color should be completed.
- </ul>
- <p><b>Attribute</b></p>
- <ul>
- <li>
- <code>attr <name> <b>colorCast</b> <R,Y,G,C,B,M></code>
- <p>
- <a href="#WifiLight_Farbkalibrierung">color calibration</a> of saturated colors.
- R(ed), Y(ellow), G(reen), C(yan), B(lue), M(agenta) in the range of +/- 29 (degrees)
- </li>
- <li>
- <code>attr <name> <b>defaultColor</b> <H,S,V></code>
- <p>
- Specify the light color in HSV which is selected at "on". Default is white.
- </li>
- <li>
- <code>attr <name> <b>defaultRamp</b> <0 bis X></code>
- <p>
- Time in seconds. If this attribute is set, a smooth transition is always implicitly generated if no ramp in the set is indicated.
- </li>
- <li>
- <code>attr <name> <b>dimStep</b> <0 bis 100></code>
- <p>
- Value by which the brightness at dim up and dim-down is changed. Default is "7"
- </li>
- <li>
- <code>attr <name> <b>gamma</b> <X.X></code>
- <p>
- The human eye perceives brightness changes very differently to (logarithmic).
- 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.
- Therefore, a logarithmic correction of brightness increase of lamps is necessary so that the increase is found to be uniform.
- Some controllers perform this correction internally.
- In other cases it is necessary to store this correction in the module.
- A gamma value of 1.0 (default) results in a linear output values.
- Values less than 1.0 lead to a logarithmic correction.
- </li>
- <li>
- <code>attr <name> <b>whitePoint</b> <R,G,B></code>
- <p>
- <a href="#WifiLight_Farbkalibrierung">color calibration</a> for mixed RGB white light.
- </li>
- <li>
- <code>attr <name> <b><a href="#readingFnAttributes">readingFnAttributes</a></b></code>
- </li>
- </ul>
- <p><b>Colored device-icon for FhemWeb</b>
- <ul>
- <p>
- To activate a colored icon for <a href="#FHEMWEB">FhemWeb</a> the following attribute must be set:
- <p>
- <li>
- <code>attr <name> <b>devStateIcon</b> {Color_devStateIcon(ReadingsVal($name,"RGB","000000"))}</code>
- </li>
- </ul>
- <p><b>Colorpicker for FhemWeb</b>
- <ul>
- <p>
- In order for the Color Picker can be used in <a href="#FHEMWEB">FhemWeb</a> following attributes need to be set:
- <p>
- <li>
- <code>attr <name> <b>webCmd</b> RGB</code>
- </li>
- <li>
- <code>attr <name> <b>widgetOverride</b> RGB:colorpicker,RGB</code>
- </li>
- </ul>
- </ul>
- <p><a name="Wunderground" id="Wunderground"></a>
- <h3>Wunderground</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#Wunderground'>DE</a>]</div>
- <ul>
- This module gets weather data and forecast from <a href="http://www.wunderground.com/">Weather Underground</a> weather service.
- <br><br>
- <a name="Wundergrounddefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> Wunderground <api-key> <query></code>
- <br><br>
- Example:
- <ul><br>
- <code>
- define WUweather Wunderground d123ab11bb2c3456 EDDF<br>
- define WUweather Wunderground d123ab11bb2c3456 pws:IBAYERNM70<br>
- define WUweather Wunderground d123ab11bb2c3456 Germany/Berlin<br>
- </code><br>
- </ul>
- <br>
- </ul>
- <br><br>
- <a name="Wundergroundset"></a>
- <b>Set</b>
- <ul>
- <li>update - refresh data</li>
- </ul>
- <br><br>
- <a name="Wundergroundattr"></a>
- <b>Attributes</b>
- <ul>
- <li>pollInterval - Set regular polling interval in seconds (default=300)</li>
- <li>wu_bestfct - Use Weather Undergrond Best Forecast for forecast (default=1)</li>
- <li>wu_features - One or more of the data features to be fetched (default=astronomy,conditions,forecast)</li>
- <li>wu_lang - Returns the API response in the specified language (default=en)</li>
- <li>wu_pws - Use personal weather stations for conditions (default=1)</li>
- </ul>
- <br><br>
- </ul>
- <p><a name="X10"></a>
- <h3>X10</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#X10'>DE</a>]</div>
- <ul>
- <a name="X10define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> X10 <model> <housecode>
- <unitcode></code>
- <br><br>
- Defines an X10 device via its model, housecode and unitcode.<br><br>
- Notes:
- <ul>
- <li><code><model></code> is one of
- <ul>
- <li><code>lm12</code>: lamp module, dimmable</li>
- <li><code>lm15</code>: lamp module, not dimmable</li>
- <li><code>am12</code>: appliance module, not dimmable</li>
- <li><code>tm12</code>: tranceiver module, not dimmable. Its
- unitcode is 1.</li>
- </ul>
- Model determines whether a dim command is reasonable to be sent
- or not.</li>
- <li><code><housecode></code> ranges from A to P.</li>
- <li><code><unitcode></code> ranges from 1 to 16.</li>
- </ul>
- <br>
- Examples:
- <ul>
- <code>define lamp1 X10 lm12 N 10</code><br>
- <code>define pump X10 am12 B 7</code><br>
- <code>define lamp2 X10 lm15 N 11</code><br>
- </ul>
- </ul>
- <br>
- <a name="X10set"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <value> [<argument>]</code>
- <br><br>
- where <code>value</code> is one of:<br>
- <pre>
- dimdown # requires argument, see the note
- dimup # requires argument, see the note
- off
- on
- on-till # Special, see the note
- on-for-timer # Special, see the note
- </pre>
- Examples:
- <ul>
- <code>set lamp1 dimup 10</code><br>
- <code>set lamp1,lamp2 off</code><br>
- <code>set pump off</code><br>
- <code>set lamp2 on-till 19:59</code><br>
- <code>set lamp2 on-for-timer 00:02:30</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li>Only switching and dimming are supported by now.</li>
- <li>Dimming is valid only for a dimmable device as specified by
- the <code>model</code> argument in its <code>define</code>
- statement.</li>
- <li>An X10 device has 210 discrete brightness levels. If you use a
- X10 sender, e.g. a remote control or a wall switch to dim, a
- brightness step is 100%/210.</li>
- <li><code>dimdown</code> and <code>dimup</code> take a number in the
- range from 0 to 22 as argument. It is assumed that argument 1 is
- a 1% brightness change (microdim) and arguments 2 to 22 are
- 10%..100% brightness changes. The meaning of argument 0 is
- unclear.</li>
- <li>This currently leads to some confusion in the logs as the
- <code>dimdown</code> and <code>dimup</code> codes are logged with
- different meaning of the arguments depending on whether the commands
- were sent from the PC or from a remote control or a wall switch.</li>
- <li><code>dimdown</code> and <code>dimup</code> from on and off states may
- have unexpected results. This seems to be a feature of the X10
- devices.</li>
- <li><code>on-till</code> requires an absolute time in the "at" format
- (HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
- returns a time specification).
- If the current time is greater than the specified time, then the
- command is ignored, else an "on" command is generated, and for the
- given "till-time" an off command is scheduleld via the at command.
- </li>
- <li><code>on-for-timer</code> requires a relative time in the "at" format
- (HH:MM:SS, HH:MM) or { <perl code> }, where the perl code
- returns a time specification).
- </li>
- </ul>
- </ul>
- <br>
- <a name="X10get"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="X10attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#attrdummy">dummy</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#model">model</a> (lm12,lm15,am12,tm13)</li>
- <li><a href="#IODev">IODev</a></li><br>
- <li><a href="#eventMap">eventMap</a></li><br>
- </ul>
- <br>
- </ul>
- <p><a name="XBMC"></a>
- <h3>XBMC</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#XBMC'>DE</a>]</div>
- <ul>
- <a name="XBMCdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> XBMC <ip[:port]> <http|tcp> [<username>] [<password>]</code>
- <br><br>
- 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>
-
- <b>Prerequisites</b>
- <ul>
- <li>Requires XBMC "Frodo" 12.0.</li>
- <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>
- <li>The Perl module JSON is required. <br>
- On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
- Via CPAN: <code>cpan install JSON</code>
- To get it working on a Fritzbox the JSON module has to be installed manually.</li>
- </ul>
- 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
- for TCP. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC>here</a>.<br><br>
-
- 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.
- See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br><br>
- Example:<br><br>
- <ul>
- <code>
- define htpc XBMC 192.168.0.10 tcp
- <br><br>
- define htpc XBMC 192.168.0.10:9000 tcp # With custom port
- <br><br>
- define htpc XBMC 192.168.0.10 http # Use HTTP instead of TCP - Note: to receive events use TCP!
- <br><br>
- define htpc XBMC 192.168.0.10 http xbmc passwd # Use HTTP with credentials - Note: to receive events use TCP!
- </code>
- </ul><br><br>
-
- Remote control:<br>
- 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
- following commands:<br><br>
- <ul>
- <code>
- define <rc_name> remotecontrol #adds the remote control
- <br><br>
- set <rc_name> layout XBMC_RClayout #sets the layout for the remote control
- <br><br>
- set <rc_name> makenotify <XBMC_device> #links the buttons to the actions
- </code>
- </ul><br><br>
-
- Known issues:<br>
- XBMC sometimes creates events twices. For example the Player.OnPlay event is created twice if play a song. Unfortunately this
- is a issue of XBMC. The fix of this bug is included in future version of XBMC (> 12.2).
-
- </ul>
-
- <a name="XBMCset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <command> [<parameter>]</code>
- <br><br>
- This module supports the following commands:<br>
-
- Player related commands:<br>
- <ul>
- <li><b>play [<all|audio|video|picture>]</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>
- <li><b>pause [<all|audio|video|picture>]</b> - pauses the playback</li>
- <li><b>playpause [<all|audio|video|picture>]</b> - toggles between play and pause for the given player</li>
- <li><b>stop [<all|audio|video|picture>]</b> - stop the playback</li>
- <li><b>next [<all|audio|video|picture>]</b> - jump to the next track</li>
- <li><b>prev [<all|audio|video|picture>]</b> - jump to the previous track or the beginning of the current track.</li>
- <li><b>goto <position> [<audio|video|picture>]</b> - Goes to the <position> in the playlist. <position> has to be a number.</li>
- <li><b>shuffle [<toggle|on|off>] [<audio|video|picture>]</b> - Enables/Disables shuffle mode. Without furhter parameters the shuffle mode is toggled.</li>
- <li><b>repeat <one|all|off> [<audio|video|picture>]</b> - Sets the repeat mode.</li>
- <li><b>open <URI></b> - Plays the resource located at the URI (can be a url or a file)</li>
- <li><b>opendir <path></b> - Plays the content of the directory</li>
- <li><b>openmovieid <path></b> - Plays a movie by id</li>
- <li><b>openepisodeid <path></b> - Plays an episode by id</li>
- <li><b>openchannelid <path></b> - Switches to channel by id</li>
- <li><b>addon <addonid> <parametername> <parametervalue></b> - Executes addon with one Parameter, for example set xbmc addon script.json-cec command activate</li>
- <li><b>seek <hh:mm:ss></b> - seek to the specified time</li>
- </ul>
- <br>Input related commands:<br>
- <ul>
- <li><b>back</b> - Back-button</li>
- <li><b>down</b> - Down-button</li>
- <li><b>up</b> - Up-button</li>
- <li><b>left</b> - Left-button</li>
- <li><b>right</b> - Right-button</li>
- <li><b>home</b> - Home-button</li>
- <li><b>select</b> - Select-button</li>
- <li><b>info</b> - Info-button</li>
- <li><b>showosd</b> - Opens the OSD (On Screen Display)</li>
- <li><b>showcodec</b> - Shows Codec information</li>
- <li><b>exec <action></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>
- <li><b>send <text></b> - Sends <text> as input to XBMC</li>
- <li><b>jsonraw</b> - Sends raw JSON data to XBMC</li>
- </ul>
- <br>Libary related commands:<br>
- <ul>
- <li><b>videolibrary clean</b> - Removes non-existing files from the video libary</li>
- <li><b>videolibrary scan</b> - Scan for new video files</li>
- <li><b>audiolibrary clean</b> - Removes non-existing files from the audio libary</li>
- <li><b>audiolibrary scan</b> - Scan for new audio files</li>
- </ul>
- <br>Application related commands:<br>
- <ul>
- <li><b>mute [<0|1>]</b> - 1 for mute; 0 for unmute; by default the mute status will be toggled</li>
- <li><b>volume <n></b> - sets the volume to <n>. <n> must be a number between 0 and 100</li>
- <li><b>volumeDown <n></b> - volume down</li>
- <li><b>volumeUp <n></b> - volume up</li>
- <li><b>quit</b> - closes XBMC</li>
- <li><b>off</b> - depending on the value of the attribute "offMode" XBMC will be closed (see quit) or the system will be shut down, put into hibernation or stand by. Default is quit.</li>
- </ul>
- <br>System related commands:<br>
- <ul>
- <li><b>eject</b> - will eject the optical drive</li>
- <li><b>shutdown</b> - the XBMC host will be shut down</li>
- <li><b>suspend</b> - the XBMC host will be put into stand by</li>
- <li><b>hibernate</b> - the XBMC host will be put into hibernation</li>
- <li><b>reboot</b> - the XBMC host will be rebooted</li>
- <li><b>connect</b> - try to connect to the XBMC host immediately</li>
- </ul>
- </ul>
- <br><br>
- <u>Messaging</u>
- <ul>
- To show messages on XBMC (little message PopUp at the bottom right egde of the screen) you can use the following commands:<br>
- <code>set <XBMC_device> msg <title> <msg> [<duration>] [<icon>]</code><br>
- 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
- 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
- of multiple words.
- </ul>
- <br>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li><b>audiolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
- <li><b>currentAlbum</b> - album of the current song/musicvideo</li>
- <li><b>currentArtist</b> - artist of the current song/musicvideo</li>
- <li><b>currentMedia</b> - file/URL of the media item being played</li>
- <li><b>currentTitle</b> - title of the current media item</li>
- <li><b>currentTrack</b> - track of the current song/musicvideo</li>
- <li><b>episode</b> - episode number</li>
- <li><b>episodeid</b> - id of the episode in the video library</li>
- <li><b>fullscreen</b> - indicates if XBMC runs in fullscreen mode (on/off)</li>
- <li><b>label</b> - label of the current media item</li>
- <li><b>movieid</b> - id of the movie in the video library</li>
- <li><b>musicvideoid</b> - id of the musicvideo in the video library</li>
- <li><b>mute</b> - indicates if XBMC is muted (on/off)</li>
- <li><b>name</b> - software name (e.g. XBMC)</li>
- <li><b>originaltitle</b> - original title of the movie being played</li>
- <li><b>partymode</b> - indicates if XBMC runs in party mode (on/off) (not available for Plex)</li>
- <li><b>playlist</b> - Possible values: add, clear, remove</li>
- <li><b>playStatus</b> - Indicates the player status: playing, paused, stopped</li>
- <li><b>repeat</b> - current repeat mode (one/all/off)</li>
- <li><b>season</b> - season of the current episode</li>
- <li><b>showtitle</b> - title of the show being played</li>
- <li><b>shuffle</b> - indicates if the playback is shuffled (on/off)</li>
- <li><b>skin</b> - current skin of XBMC</li>
- <li><b>songid</b> - id of the song in the music library</li>
- <li><b>system</b> - Possible values: lowbattery, quit, restart, sleep, wake</li>
- <li><b>time</b> - current position in the playing media item (only updated on play/pause)</li>
- <li><b>totaltime</b> - total run time of the current media item</li>
- <li><b>type</b> - type of the media item. Possible values: episode, movie, song, musicvideo, picture, unknown</li>
- <li><b>version</b> - version of XBMC</li>
- <li><b>videolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
- <li><b>volume</b> - value between 0 and 100 stating the current volume setting</li>
- <li><b>year</b> - year of the movie being played</li>
- <li><b>3dfile</b> - is a 3D movie according to filename</li>
- <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>
- </ul>
- <br><br>
- <u>Remarks on the events</u><br><br>
- <ul>
- The event <b>playStatus = playing</b> indicates a playback of a media item. Depending on the event <b>type</b> different events are generated:
- <ul>
- <li><b>type = song</b> generated events are: <b>album, artist, file, title</b> and <b>track</b></li>
- <li><b>type = musicvideo</b> generated events are: <b>album, artist, file</b> and <b>title</b></li>
- <li><b>type = episode</b> generated events are: <b>episode, file, season, showtitle,</b> and <b>title</b></li>
- <li><b>type = movie</b> generated events are: <b>originaltitle, file, title,</b> and <b>year</b></li>
- <li><b>type = picture</b> generated events are: <b>file</b></li>
- <li><b>type = unknown</b> generated events are: <b>file</b></li>
- </ul>
- </ul>
- <br><br>
- <a name="XBMCattr"></a>
- <b>Attributes</b>
- <ul>
- <li>compatibilityMode<br>
- This module can also be used to control Plex, since the JSON Api is mostly the same, but there are some differences.
- If you want to control Plex set the attribute <i>compatibilityMode</i> to <i>plex</i>.</li>
- <li>offMode<br>
- 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),
- <i>suspend</i> (puts system into stand by), and <i>shutdown</i> (shuts down the system). Default value is <i>quit</i></li>
- <li>fork<br>
- If XBMC does not run all the time it used to be the case that FHEM blocks because it cannot reach XBMC (only happened
- if TCP was used). If you encounter problems like FHEM not responding for a few seconds then you should set <code>attr <XBMC_device> fork enable</code>
- which will move the search for XBMC into a separate process.</li>
- <li>updateInterval<br>
- 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>
- <li>disable<br>
- Disables the device. All connections will be closed immediately.</li>
- </ul>
- </ul>
- <p><a name="XiaomiBTLESens"></a>
- <h3>Xiaomi BTLE Sensor</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#XiaomiBTLESens'>DE</a>]</div>
- <ul>
- <u><b>XiaomiBTLESens - Retrieves data from a Xiaomi BTLE Sensor</b></u>
- <br>
- With this module it is possible to read the data from a sensor and to set it as reading.</br>
- Gatttool and hcitool is required to use this modul. (apt-get install bluez)
- <br><br>
- <a name="XiaomiBTLESensdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> XiaomiBTLESens <BT-MAC></code>
- <br><br>
- Example:
- <ul><br>
- <code>define Weihnachtskaktus XiaomiBTLESens C4:7C:8D:62:42:6F</code><br>
- </ul>
- <br>
- This statement creates a XiaomiBTLESens with the name Weihnachtskaktus and the Bluetooth Mac C4:7C:8D:62:42:6F.<br>
- After the device has been created, the current data of the Xiaomi BTLE Sensor is automatically read from the device.
- </ul>
- <br><br>
- <a name="XiaomiBTLESensreadings"></a>
- <b>Readings</b>
- <ul>
- <li>state - Status of the flower sensor or error message if any errors.</li>
- <li>battery - current battery state dependent on batteryLevel.</li>
- <li>batteryLevel - current battery level in percent.</li>
- <li>fertility - Values for the fertilizer content</li>
- <li>firmware - current device firmware</li>
- <li>lux - current light intensity</li>
- <li>moisture - current moisture content</li>
- <li>temperature - current temperature</li>
- </ul>
- <br><br>
- <a name="XiaomiBTLESensset"></a>
- <b>Set</b>
- <ul>
- <li>devicename - set a devicename</li>
- <br>
- </ul>
- <br><br>
- <a name="XiaomiBTLESensget"></a>
- <b>Get</b>
- <ul>
- <li>sensorData - retrieves the current data of the Xiaomi sensor</li>
- <li>devicename - fetch devicename</li>
- <li>firmware - fetch firmware</li>
- <br>
- </ul>
- <br><br>
- <a name="XiaomiBTLESensattribut"></a>
- <b>Attributes</b>
- <ul>
- <li>disable - disables the device</li>
- <li>disabledForIntervals - disable device for interval time (13:00-18:30 or 13:00-18:30 22:00-23:00)</li>
- <li>interval - interval in seconds for statusRequest</li>
- <li>minFertility - min fertility value for low warn event</li>
- <li>maxFertility - max fertility value for High warn event</li>
- <li>minMoisture - min moisture value for low warn event</li>
- <li>maxMoisture - max moisture value for High warn event</li>
- <li>minTemp - min temperature value for low warn event</li>
- <li>maxTemp - max temperature value for high warn event</li>
- <li>minlux - min lux value for low warn event</li>
- <li>maxlux - max lux value for high warn event
- <br>
- Event Example for min/max Value's: 2017-03-16 11:08:05 XiaomiBTLESens Dracaena minMoisture low<br>
- Event Example for min/max Value's: 2017-03-16 11:08:06 XiaomiBTLESens Dracaena maxTemp high</li>
- <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>
- <li>batteryFirmwareAge - how old can the reading befor fetch new data</li>
- <li>blockingCallLoglevel - Blocking.pm Loglevel for BlockingCall Logoutput</li>
- </ul>
- </ul>
- <p><a name="XiaomiDevice"></a>
- <h3>XiaomiDevice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#XiaomiDevice'>DE</a>]</div>
- <ul>
- This modul connects to the Xiaomi Vacuum and Air Purifier.<br/>
- <br/><br/>
- <b>Define</b>
- <ul>
- <code>define <name> XiaomiDevice <ip> [<token>] </code>
- <br>
- Example: <code>define vacuum XiaomiDevice 192.168.178.123 12345678901234567890123456789012</code><br>
- Example: <code>define airpurifier XiaomiDevice 192.168.178.123</code>
- <br>
- <li><code>ip</code>
- <br>
- Local IP of the device
- </li><br>
- <li><code>token</code>
- <br>
- Token of the device (mandatory for VacuumCleaner)
- </li><br>
- </ul>
- <br>
- <b>Get</b>
- <ul>
- <li><code>data</code>
- <br>
- Manually trigger data update
- </li><br>
- <li><code>settings</code>
- <br>
- Manually read settings
- </li><br>
- <li><code>clean_summary</code>
- <br>
- Manually read clean summary data
- </li><br>
- </ul>
- <br>
- <b>Set</b>
- <ul>
- <li><code>reconnect</code>
- <br>
- Reconnect the device
- </li><br>
- <li><code>wifi_setup </code><ssid> <password> <uid>
- <br>
- WiFi setup: SSID, PASSWORD and Xiaomi User ID are needed for MiHome use
- </li><br>
- <li><code>start</code> <i>(VacuumCleaner)</i>
- <br>
- Start cleaning
- </li><br>
- <li><code>spot</code> <i>(VacuumCleaner)</i>
- <br>
- Start spot cleaning
- </li><br>
- <li><code>pause</code> <i>(VacuumCleaner)</i>
- <br>
- Pause cleaning
- </li><br>
- <li><code>stop</code> <i>(VacuumCleaner)</i>
- <br>
- Stop cleaning
- </li><br>
- <li><code>charge</code> <i>(VacuumCleaner)</i>
- <br>
- Return to dock
- </li><br>
- <li><code>locate</code> <i>(VacuumCleaner)</i>
- <br>
- Locate the vacuum cleaner
- </li><br>
- <li><code>fan_power</code> [1..100] <i>(VacuumCleaner)</i>
- <br>
- Set suction power. (Quiet=38, Balanced=60, Turbo=77, Full Speed=90)
- </li><br>
- <li><code>remotecontrol </code> start/stop <i>(VacuumCleaner)</i>
- <br>
- Start or stop remote control mode
- </li><br>
- <li><code>move</code> direction velocity [time] <i>(VacuumCleaner)</i>
- <br>
- Move the vacuum in remotecontrol mode<br>
- direction: -100..100<br>
- velocity: 0..100<br>
- time: time in ms (default=1000)
- </li><br>
- <li><code>reset_consumable</code> filter/mainbrush/sidebrush/sensors <i>(VacuumCleaner)</i>
- <br>
- Reset the consumables
- </li><br>
- <li><code>timer</code> hh:mm days <i>(VacuumCleaner)</i>
- <br>
- Set a new timer
- </li><br>
- <li><code>timerN</code> on/off/delete <i>(VacuumCleaner)</i>
- <br>
- Enable, disable or delete an existing timer
- </li><br>
- <li><code>timerN_time</code> hh:mm <i>(VacuumCleaner)</i>
- <br>
- Change the time for an existing timer
- </li><br>
- <li><code>timerN_days</code> days <i>(VacuumCleaner)</i>
- <br>
- Change the days for an existing timer
- </li><br>
- <li><code>dnd_enabled</code> <i>(VacuumCleaner)</i>
- <br>
- Enable/disable DND mode
- </li><br>
- <li><code>dnd_start</code> hh:mm <i>(VacuumCleaner)</i>
- <br>
- Set DND start time
- </li><br>
- <li><code>dnd_end</code> hh:mm <i>(VacuumCleaner)</i>
- <br>
- Set DND end time
- </li><br>
- <li><code>on / off</code> <i>(AirPurifier)</i>
- <br>
- Turn the device on or off
- </li><br>
- <li><code>mode</code> <i>(AirPurifier)</i>
- <br>
- Set the device mode (auto,silent,favorite)
- </li><br>
- <li><code>favorite</code> <i>(AirPurifier)</i>
- <br>
- Set the speed for favorite mode (0..16)
- </li><br>
- <li><code>preset</code> <i>(AirPurifier)</i>
- <br>
- Set a preset from attribute preset ('mode auto')
- </li><br>
- <li><code>buzzer</code> <i>(AirPurifier)</i>
- <br>
- Set the buzzer (on,off)
- </li><br>
- <li><code>led</code> <i>(AirPurifier)</i>
- <br>
- Set the LED (bright,dim,off)
- </li><br>
- <li><code>child_lock</code> <i>(AirPurifier)</i>
- <br>
- Set the child lock (on,off)
- </li><br>
- <li><code>turbo</code> <i>(AirPurifier)</i>
- <br>
- Set the turbo mode (on,off)
- </li><br>
- <li><code>limit_hum</code> <i>(Humidifier)</i>
- <br>
- Set the target humidity (30..90%)
- </li><br>
- </ul>
- <br>
- <b>Readings</b>
- <ul>
- <li><code>state</code> <i>(VacuumCleaner)</i>
- <br>
- Current state<br/>
- </li><br>
- <li><code>fan_power</code> <i>(VacuumCleaner)</i>
- <br>
- Fan power in %<br/>
- </li><br>
- <li><code>error_code</code> <i>(VacuumCleaner)</i>
- <br>
- Error code<br/>
- </li><br>
- <li><code>consumables_X</code> <i>(VacuumCleaner)</i>
- <br>
- Consumables time remaining in %<br/>
- </li><br>
- <li><code>dnd</code> <i>(VacuumCleaner)</i>
- <br>
- Current DND mode state<br/>
- </li><br>
- <li><code>X_clean_area</code> <i>(VacuumCleaner)</i>
- <br>
- Area cleaned in m²<br/>
- </li><br>
- <li><code>X_clean_time</code> <i>(VacuumCleaner)</i>
- <br>
- Time cleaned in h<br/>
- </li><br>
- <li><code>total_cleans</code> <i>(VacuumCleaner)</i>
- <br>
- Total number of cleaning cycles<br/>
- </li><br>
- <li><code>serial_number</code> <i>(VacuumCleaner)</i>
- <br>
- Serial number of the vacuum<br/>
- </li><br>
- <li><code>timerN_X</code> <i>(VacuumCleaner)</i>
- <br>
- Timer details<br/>
- </li><br>
- <li><code>pm25</code> <i>(AirPurifier)</i>
- <br>
- PM2.5 value in Âľg/mÂł<br/>
- </li><br>
- <li><code>pm25_average</code> <i>(AirPurifier)</i>
- <br>
- Average PM2.5 value in Âľg/mÂł<br/>
- </li><br>
- <li><code>temperature</code> <i>(AirPurifier)</i>
- <br>
- Temperature in �C<br/>
- </li><br>
- <li><code>humidity</code> <i>(AirPurifier)</i>
- <br>
- Humidity in %<br/>
- </li><br>
- <li><code>speed</code> <i>(AirPurifier)</i>
- <br>
- Fan speed in rpm<br/>
- </li><br>
- <li><code>usage</code> <i>(AirPurifier)</i>
- <br>
- Usage time in h<br/>
- </li><br>
- <li><code>volume</code> <i>(AirPurifier)</i>
- <br>
- Total air volume in mÂł<br/>
- </li><br>
- <li><code>filter</code> <i>(AirPurifier)</i>
- <br>
- Filter life in %<br/>
- </li><br>
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li><code>subType</code>
- <br>
- VacuumCleaner / AirPurifier / SmartFan / Humidifier
- </li><br>
- <li><code>disable</code>
- <br>
- Disables the module
- </li><br>
- <li><code>intervalData</code>
- <br>
- Interval for data update (min 60 sec)
- </li><br>
- <li><code>intervalSettings</code>
- <br>
- Interval for settings update (min 300 sec)
- </li><br>
- <li><code>preset</code> <i>(AirPurifier)</i>
- <br>
- Custom preset for dynamic mode changes (defaults to 'mode auto')
- </li><br>
- </ul>
- </ul>
- <p><a name="XiaomiFlowerSens"></a>
- <h3>Xiaomi Flower Monitor</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#XiaomiFlowerSens'>DE</a>]</div>
- <ul>
- <u><b>XiaomiFlowerSens - Retrieves data from a Xiaomi Flower Monitor</b></u>
- <br>
- With this module it is possible to read the data from a sensor and to set it as reading.</br>
- Gatttool and hcitool is required to use this modul. (apt-get install bluez)
- <br><br>
- <a name="XiaomiFlowerSensdefine"></a>
- <b>Define</b>
- <ul><br>
- <code>define <name> XiaomiFlowerSens <BT-MAC></code>
- <br><br>
- Example:
- <ul><br>
- <code>define Weihnachtskaktus XiaomiFlowerSens C4:7C:8D:62:42:6F</code><br>
- </ul>
- <br>
- This statement creates a XiaomiFlowerSens with the name Weihnachtskaktus and the Bluetooth Mac C4:7C:8D:62:42:6F.<br>
- After the device has been created, the current data of the Xiaomi Flower Monitor is automatically read from the device.
- </ul>
- <br><br>
- <a name="XiaomiFlowerSensreadings"></a>
- <b>Readings</b>
- <ul>
- <li>state - Status of the flower sensor or error message if any errors.</li>
- <li>battery - current battery state dependent on batteryLevel.</li>
- <li>batteryLevel - current battery level in percent.</li>
- <li>fertility - Values for the fertilizer content</li>
- <li>firmware - current device firmware</li>
- <li>lux - current light intensity</li>
- <li>moisture - current moisture content</li>
- <li>temperature - current temperature</li>
- </ul>
- <br><br>
- <a name="XiaomiFlowerSensset"></a>
- <b>Set</b>
- <ul>
- <li>clearFirmwareReading - clear firmware reading for new begin.</li>
- <br>
- </ul>
- <br><br>
- <a name="XiaomiFlowerSensget"></a>
- <b>Get</b>
- <ul>
- <li>statusRequest - retrieves the current state of the Xiaomi Flower Monitor.</li>
- <br>
- </ul>
- <br><br>
- <a name="XiaomiFlowerSensattribut"></a>
- <b>Attributes</b>
- <ul>
- <li>disable - disables the device</li>
- <li>disabledForIntervals - disable device for interval time (13:00-18:30 or 13:00-18:30 22:00-23:00)</li>
- <li>interval - interval in seconds for statusRequest</li>
- <li>minFertility - min fertility value for low warn event</li>
- <li>maxFertility - max fertility value for High warn event</li>
- <li>minMoisture - min moisture value for low warn event</li>
- <li>maxMoisture - max moisture value for High warn event</li>
- <li>minTemp - min temperature value for low warn event</li>
- <li>maxTemp - max temperature value for high warn event</li>
- <li>minlux - min lux value for low warn event</li>
- <li>maxlux - max lux value for high warn event
- <br>
- Event Example for min/max Value's: 2017-03-16 11:08:05 XiaomiFlowerSens Dracaena minMoisture low<br>
- Event Example for min/max Value's: 2017-03-16 11:08:06 XiaomiFlowerSens Dracaena maxTemp high</li>
- <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>
- <li>batteryFirmwareAge - how old can the reading befor fetch new data</li>
- <li>blockingCallLoglevel - Blocking.pm Loglevel for BlockingCall Logoutput</li>
- </ul>
- </ul>
- <p><a name="XmlList"></a>
- <h3>xmllist</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#XmlList'>DE</a>]</div>
- <ul>
- <code>xmllist [devspec]</code>
- <br><br>
- Returns an XML tree of device definitions. <a href="#devspec">devspec</a> is
- optional, and restricts the list of devices if specified.
- <br><br>
- Example:
- <code>
- <ul>
- fhem> xmllist<br>
- <FHZINFO><br>
- <ul>
- <internal_LIST><br>
- <ul>
- <internal name="global" state="internal" sets="" attrs="room configfile logfile ..."><br>
- <ul>
- <INT key="DEF" value="<no definition>"/><br>
- <INT key="NR" value="0"/><br>
- <INT key="STATE" value="internal"/><br>
- </ul>
- [...]<br>
- </ul>
- </ul>
- </ul></code>
- </ul>
- <p> <a name="YAAHM"></a>
- <h3>YAAHM</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#YAAHM'>DE</a>]</div>
- <ul>
- <p> Yet Another Auto Home Module to set up a cyclic processing of commands (daily, weekly, monthly, yearly profile)</p>
- <a name="YAAHMusage"></a>
- <h4>Usage</h4>
- See <a href="http://www.fhemwiki.de/wiki/Modul_YAAHM">German Wiki page</a>
- <br/>
- <a name="YAAHMdefine"></a>
- <h4>Define</h4>
- <p>
- <code>define <name> YAAHM</code>
- <br />Defines the YAAHM system. </p>
- <a name="YAAHMset"></a>
- Notes: <ul>
- <li>This module uses the global attribute <code>language</code> to determine its output data<br/>
- (default: EN=english). For German output set <code>attr global language DE</code>.</li>
- <li>This module needs the JSON package</li>
- </ul>
- <h4>Set</h4>
- <ul>
- <li><a name="yaahm_time">
- <code>set <name> time <timeevent></code></a><br/>
- Set the current house time (event), i.e. one of several values:
- <ul>
- <li>(after|before) midnight | [before|after] sunrise | [before|after] sunset are calculated from astronomical data (±offset).
- These values vary from day to day, only the offset can be specified in the daily profile. </li>
- <li>morning | noon | afternoon | evening | night are fixed time events specified in the daily profile.
- The time phase between events morning and night is called <i>daytime</i>, the
- time phase between events night and morning is called <i>nighttime</i></li>
- <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>
- </ul>
- 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>.
- </li>
- <li><a name="yaahm_manualnext"></a>
- <code>set <name> manualnext <timernumber> <time></code><br/>
- <code>set <name> manualnext <timername> <time></code><br/>
- For the weekly timer identified by its number (starting at 0) or its name, set the next ring time manually. The time specification <time>must be in the format hh:mm, or "off", or "default".
- <ul>
- <li>If the time specification <time> 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.</li>
- <li>If the time specification is "off", the next pending waketime will be ignored.</li>
- <li>If the time specification id "default", the manual waketime is removed and the value from the weekly schedule will be used.</li>
- </ul>
- </li>
- <li><a name="yaahm_mode">
- <code>set <name> mode normal | party | absence | donotdisturb</code>
- </a>
- <br />Set the current house mode, i.e. one of several values:
- <ul>
- <li>normal - normal daily and weekly time profiles apply</li>
- <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>
- <li>absence - can be used in the timeHelper function to suppress certain actions. Valid until manual mode change</li>
- <li>donotodisturb - can be used in the timeHelper function to suppress certain actions. Valid until manual mode change</li>
- </ul>
- 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.
- The actual changes to certain devices are made by an external <a href="#yaahm_modehelper">modeHelper function</a>.
- </li>
- <li><a name="yaahm_state">
- <code>set <name> state unsecured | secured | protected | guarded</code>
- </a>
- <br/>Set house (security) state, i.e. one of several values:
- <ul>
- <li> unsecured - Example: doors etc.
- </li>
- <li> secured - Example: doors etc. are locked, windows may not be open
- </li>
- <li> protected - Example: doors etc. are locked, windows may not be open, alarm system is armed
- </li>
- <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
- </li>
- </ul>
- 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.
- 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
- for a particular house (security) state can be checked automatically, see the attribute <a href="#yaahm_statedevices">stateDevices</a>
- </li>
- <li><a name="yaahm_checkstate">
- <code>set <name> checkstate 0|5|10</code>
- </a>
- <br/>Check the house (security) state for each of the devices defined in the stateDevices attribute in 0, 5 or 10 seconds from now</li>
- <li><a name="yaahm_correctstate">
- <code>set <name> correctstate</code>
- </a>
- <br/>Try to correct the house (security) state, by issueing a FHEM command <i>set <device> <targetstate></i>
- for each of the devices defined in the stateDevices attribute and not in the proper state for the given house (security) state</li>
- <li><a name="yaahm_createweekly">
- <code>set <name> createWeekly <string></code>
- </a>
- <br/>Create a new weekly profile <string></li>
- <li><a name="yaahm_deleteweekly">
- <code>set <name> deleteWeekly <string></code>
- </a>
- <br/>Delete the weekly profile <string></li>
- <li><a name="yaahm_initialize">
- <code>set <name> initialize</code>
- </a>
- <br/>Restart the internal timers</li>
- <li><a name="yaahm_lock">
- <code>set <name> locked|unlocked</code>
- </a>
- <br />Set the lockstate of the yaahm module to <i>locked</i> (i.e., yaahm setups
- may not be changed) resp. <i>unlocked</i> (i.e., yaahm setups may be changed>)</li>
- <li><a name="yaahm_save">
- <code>set <name> save|restore</code>
- </a>
- <br />Manually save/restore the complete profile data to/from the external file YAAHMFILE (save done automatically at each timer start, restore at FHEM start)</li>
- </ul>
- <a name="YAAHMget"></a>
- <h4>Get</h4>
- <ul>
- <li><a name="yaahm_next"></a>
- <code>get <name> next <timernumber></code><br/>
- <code>get <name> next <timername></code><br/>
- 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>
- <li><a name="yaahm_saynext"></a>
- <code>get <name> sayNext <timernumber></code><br/>
- <code>get <name> sayNext <timername></code><br/>
- 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>
- <li><a name="yaahm_version"></a>
- <code>get <name> version</code>
- <br />Display the version of the module</li>
- <li><a name="yaahm_template"></a>
- <code>get <name> template</code>
- <br />Return an (empty) perl subroutine for the helper functions</li>
- </ul>
- <a name="YAAHMattr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="yaahm_linkname"><code>attr <name> linkname
- <string></code></a>
- <br />Name for yaahm web link, default:
- Profile</li>
- <li><a name="yaahm_hiddenroom"><code>attr <name> hiddenroom
- <string></code></a>
- <br />Room name for hidden yaahm room (containing only the YAAHM device), default:
- ProfileRoom</li>
- <li><a name="yaahm_lockstate"><code>attr <name> lockstate
- locked|unlocked</code></a>
- <br /><i>locked</i> means that yaahm setups may not be changed, <i>unlocked</i>
- means that yaahm setups may be changed</li>
- <li><a name="yaahm_simulation"><code>attr <name> simulation
- 0|1</code></a>
- <br />a value of 1 means that commands issued directly on the device as "set ... " will not be executed, but only simulated. Does <i>not</i> prevent the button
- click commands from the interactive web page to be executed.</li>
- <li><a name="yaahm_noicons"><code>attr <name> noicons
- 0|1</code></a>
- <br />when set to 1, animated icons are suppressed</li>
- <li><a name="yaahm_modecolor"><code>attr <name> modecolor[0|1|2|3] <i>color</i></code></a>
- <br />four color specifications to signal the modes normal (default <span style="color:#53f3c7">#53f3c7</span>),
- party (default <span style="color:#8bfa56">#8bfa56</span>), absence (default <span style="color:#ff9458">#ff9458</span>),
- donotodisturb (default <span style="color:#fd5777">#fd5777</span>), </li>
- <li><a name="yaahm_statecolor"><code>attr <name> statecolor[0|1|2|3] <i>color</i></code></a>
- <br />four color specifications to signal the states unsecured (default <span style="color:#53f3c7">#53f3c7</span>),
- secured (default <span style="color:#ff9458">#ff9458</span>),
- protected (default <span style="color:#f554e2">#f554e2</span>) and guarded (default <span style="color:#fd5777">#fd5777</span>)</li>
- <li><a name="yaahm_timehelper"><code>attr <name> timeHelper <name of perl program></code></a>
- <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>
- <li><a name="yaahm_modehelper"><code>attr <name> modeHelper <name of perl program></code></a>
- <br />name of a perl function that is called at every change of the house mode</li>
- <li><a name="yaahm_modeauto"><code>attr <name> modeAuto 0|1</code></a>
- <br />If this attribute is set to 1, the house mode changes automatically at certain time events.
- <ul>
- <li>On time (event) <i>sleep</i> or <i>morning</i>, <i>party</i> mode will be reset to <i>normal</i> mode.</li>
- <li>On time (event) <i>wakeup</i>, <i>absence</i> mode will be reset to <i>normal</i> mode.</li>
- <li>On <i>any</i> time (event), <i>donotdisturb</i> mode will be reset to <i>normal</i> mode.</li>
- </ul>
- </li>
- <li><a name="yaahm_statedevices"><code>attr <name> stateDevices (<device>:<state-unsecured>:<state-secured>:<state-protected>:<state-guarded>,)*</code></a>
- <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
- for its proper state, and a <i>stateWarning</i> function will be called if it is not in the proper state.</li>
- <li><a name="yaahm_stateinterval"><code>attr <name> stateInterval <integer></code></a>
- <br />interval in minutes for checking all <i>stateDevices</i> for their proper state according of the house (security) state. Default 60 minutes.</li>
- <li><a name="yaahm_statewarning"><code>attr <name> stateWarning <name of perl program></code></a>
- <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>
- <li><a name="yaahm_statehelper"><code>attr <name> stateHelper <name of perl program></code></a>
- <br />name of a perl function that is called as <i>stateHelper('event')</i> at every change of the house (security) state</li>
- <li><a name="yaahm_stateauto"><code>attr <name> stateAuto 0|1</code></a>
- <br />If this attribute is set to 1, the house state changes automatically if certain modes are set or at certain time events
- <ul>
- <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>
- <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>
- </ul>
- </li>
- <li><a name="yaahm_holidaydevices"><code>attr <name> <comma-separated list of devices> </code></a>
- <br />list of devices that provide holiday information. The devices may be
- <a href="#holiday">holiday devices</a> or <a href="#Calendar">Calendar devices</a></li>
- <li><a name="yaahm_vacationdevices"><code>attr <comma-separated list of devices> </code></a>
- <br />list of devices that provide vacation information. The devices may be
- <a href="#holiday">holiday devices</a> or <a href="#Calendar">Calendar devices</a></li>
- <li><a name="yaahm_specialdevices"><code>attr <comma-separated list of devices> </code></a>
- <br />list of devices that provide special date information (like e.g. garbage collection). The devices may be
- <a href="#holiday">holiday devices</a> or <a href="#Calendar">Calendar devices</a></li>
- </ul>
- </ul>
- <p><a name="YAMAHA_AVR"></a>
- <h3>YAMAHA_AVR</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#YAMAHA_AVR'>DE</a>]</div>
- <ul>
- <a name="YAMAHA_AVR_define"></a>
- <b>Define</b>
- <ul>
- <code>
- define <name> YAMAHA_AVR <ip-address> [<zone>] [<status_interval>]
- <br><br>
- define <name> YAMAHA_AVR <ip-address> [<zone>] [<off_status_interval>] [<on_status_interval>]
- </code>
- <br><br>
- This module controls AV receiver from Yamaha via network connection. You are able
- to power your AV reveiver on and off, query it's power state,
- select the input (HDMI, AV, AirPlay, internet radio, Tuner, ...), select the volume
- or mute/unmute the volume.<br><br>
- Defining a YAMAHA_AVR device will schedule an internal task (interval can be set
- with optional parameter <status_interval> in seconds, if not set, the value is 30
- seconds), which periodically reads the status of the AV receiver (power state, selected
- input, volume and mute status) and triggers notify/filelog commands.
- <br><br>
- Different status update intervals depending on the power state can be given also.
- If two intervals are given in the define statement, the first interval statement stands for the status update
- interval in seconds in case the device is off, absent or any other non-normal state. The second
- interval statement is used when the device is on.
-
- Example:<br><br>
- <ul><code>
- define AV_Receiver YAMAHA_AVR 192.168.0.10
- <br><br>
- # With custom status interval of 60 seconds<br>
- define AV_Receiver YAMAHA_AVR 192.168.0.10 mainzone 60
- <br><br>
- # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
- define AV_Receiver YAMAHA_AVR 192.168.0.10 mainzone 60 10
- </code></ul>
-
- </ul>
- <br><br>
- <b>Zone Selection</b><br>
- <ul>
- If your receiver supports zone selection (e.g. RX-V671, RX-V673,... and the AVANTAGE series)
- you can select the zone which should be controlled. The RX-V3xx and RX-V4xx series for example
- just have a "Main Zone" (which is the whole receiver itself). In general you have the following
- possibilities for the parameter <zone> (depending on your receiver model).<br><br>
- <ul>
- <li><b>mainzone</b> - this is the main zone (standard)</li>
- <li><b>zone2</b> - The second zone (Zone 2)</li>
- <li><b>zone3</b> - The third zone (Zone 3)</li>
- <li><b>zone4</b> - The fourth zone (Zone 4)</li>
- </ul>
- <br>
- Depending on your receiver model you have not all inputs available on these different zones.
- The module just offers the real available inputs.
- <br><br>
- Example:
- <br><br>
- <ul><code>
- define AV_Receiver YAMAHA_AVR 192.168.0.10 # If no zone is specified, the "Main Zone" will be used.<br>
- attr AV_Receiver YAMAHA_AVR room Livingroom<br>
- <br>
- # Define the second zone<br>
- define AV_Receiver_Zone2 YAMAHA_AVR 192.168.0.10 zone2<br>
- attr AV_Receiver_Zone2 room Bedroom
- </code></ul><br><br>
- For each Zone you will need an own YAMAHA_AVR device, which can be assigned to a different room.
- Each zone can be controlled separatly from all other available zones.
- <br><br>
- </ul>
-
- <a name="YAMAHA_AVR_set"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <command> [<parameter>]</code>
- <br><br>
- Currently, the following commands are defined; the available inputs are depending on the used receiver.
- The module only offers the real available inputs and scenes. The following input commands are just an example and can differ.
- <br><br>
- <ul>
- <li><b>on</b> - powers on the device</li>
- <li><b>off</b> - shuts down the device </li>
- <li><b>input</b> hdm1,hdmX,... - selects the input channel (only the real available inputs were given)</li>
- <li><b>scene</b> scene1,sceneX - select the scene</li>
- <li><b>volume</b> 0...100 [direct] - 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>
- <li><b>volumeStraight</b> -80...15 [direct] - 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>
- <li><b>volumeUp</b> [0-100] [direct] - 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>
- <li><b>volumeDown</b> [0-100] [direct] - 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>
- <li><b>hdmiOut1</b> on|off - controls the HDMI output 1</li>
- <li><b>hdmiOut2</b> on|off - controls the HDMI output 2</li>
- <li><b>mute</b> on|off|toggle - activates volume mute</li>
- <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) - set bass tone level in decibel</li>
- <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) - set treble tone level in decibel</li>
- <li><b>dsp</b> hallinmunich,hallinvienna,... - sets the DSP mode to the given preset</li>
- <li><b>enhancer</b> on|off - controls the internal sound enhancer</li>
- <li><b>3dCinemaDsp</b> auto|off - controls the CINEMA DSP 3D mode</li>
- <li><b>adaptiveDrc</b> auto|off - controls the Adaptive DRC</li>
- <li><b>partyMode</b> on|off - 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>
- <li><b>navigateListMenu</b> [item1]/[item2]/.../[itemN] - 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>
- <li><b>tunerFrequency</b> [frequency] [AM|FM] - 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>
- <li><b>preset</b> 1...40 - selects a saved preset of the currently selected input.</li>
- <li><b>presetUp</b> - selects the next preset of the currently selected input.</li>
- <li><b>presetDown</b> - selects the previous preset of the currently selected input.</li>
- <li><b>straight</b> on|off - bypasses the internal codec converter and plays the original sound codec</li>
- <li><b>direct</b> on|off - bypasses all internal sound enhancement features and plays the sound straight directly</li>
- <li><b>sleep</b> off,30min,60min,...,last - activates the internal sleep timer</li>
- <li><b>shuffle</b> on,off - activates the shuffle mode on the current input</li>
- <li><b>surroundDecoder</b> dolbypl,... - set the surround decoder. Only the available decoders were given if the device supports the configuration of the surround decoder.</li>
- <li><b>extraBass</b> off,auto - controls the extra bass. Only available if supported by the device.</li>
- <li><b>ypaoVolume</b> off,auto - controls the YPAO volume. Only available if supported by the device.</li>
- <li><b>displayBrightness</b> -4...0 - controls brightness reduction of the front display. Only available if supported by the device.</li>
- <li><b>repeat</b> one,all,off - activates the repeat mode on the current input for one or all titles</li>
- <li><b>pause</b> - pause playback on current input</li>
- <li><b>play</b> - start playback on current input</li>
- <li><b>stop</b> - stop playback on current input</li>
- <li><b>skip</b> reverse,forward - skip track on current input</li>
- <li><b>statusRequest</b> - requests the current status of the device</li>
- <li><b>remoteControl</b> up,down,... - sends remote control commands as listed below</li>
- </ul>
- </ul><br><br>
- <u>Remote control (not in all zones available, depending on your model)</u><br><br>
- <ul>
- <u>Cursor Selection:</u><br><br>
- <ul><code>
- remoteControl up<br>
- remoteControl down<br>
- remoteControl left<br>
- remoteControl right<br>
- remoteControl enter<br>
- remoteControl return<br>
- </code></ul><br><br>
- <u>Menu Selection:</u><br><br>
- <ul><code>
- remoteControl setup<br>
- remoteControl option<br>
- remoteControl display<br>
- </code></ul><br><br>
-
- <u>Tuner Control:</u><br><br>
- <ul><code>
- remoteControl tunerPresetUp<br>
- remoteControl tunerPresetDown<br>
- </code></ul><br><br>
- The button names are the same as on your remote control.
- </ul>
- <br>
- <a name="YAMAHA_AVR_MenuNavigation"></a>
- <u>Automatic Menu Navigation (only for menu based inputs like Net Radio, Server, USB, ...)</u><br><br>
- <ul>
- For menu based inputs you have to select a specific item out of a complex menu structure to start playing music.
- 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.
- <br><br>
- To automate such a complex menu navigation, you can use the set command "navigateListMenu".
- As Parameter you give a menu path of the desired item you want to select.
- YAMAHA_AVR will go through the menu and selects all menu items given as parameter from left to right.
- All menu items are separated by a forward slash (/).
- <br><br>
- So here are some examples:
- Receiver's current input is "netradio":<br><br>
- <ul>
- <code>
- set <name> navigateListMenu Countries/Australia/All Stations/1Radio.FM<br>
- set <name> navigateListMenu Bookmarks/Favorites/1LIVE</code>
- </ul><br>
- If you want to turn on your receiver and immediatly select a specific internet radio you may use:<br><br>
- <ul>
- <code>
- set <name> on ; set <name> volume 20 direct ; set <name> input netradio ; set <name> navigateListMenu Bookmarks/Favorites/1LIVE<br><br>
- # for regular execution to a specific time using the <a href="#at">at</a> module<br>
- define turn_on_Radio_morning at *08:00 set <name> on ; set <name> volume 20 direct ; set <name> input netradio ; set <name> navigateListMenu Countries/Australia/All Stations/1Radio.FM<br><br>
- define turn_on_Radio_evening at *17:00 set <name> on ; set <name> volume 20 direct ; set <name> input netradio ; set <name> navigateListMenu Bookmarks/Favorites/1LIVE</code>
- </ul>
- <br>
- Receiver's current input is "server" (network DLNA shares):<br><br>
- <ul>
- <code>
- set <name> navigateListMenu NAS/Music/Sort By Artist/Alicia Keys/Songs in A Minor/Fallin
- </code>
- </ul>
- <br>
- The exact menu structure depends on your own configuration and network devices who provide content.
- 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:
- <br><br>
- <ul>
- Your real menu path you want to select looks like this: <code> <i><b>Bookmarks</b></i> => <i><b>Favorites</b></i> => <i><b>foo:BAR 70's-90's [[HITS]]</b></i></code><br><br>
- 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.
- 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>
- <code>
- set <name> navigateListMenu Bookmarks/Favorites/foo:BAR
- </code>
- <br><br>
- This works, even without giving the full item name (<i><code>foo:BAR 70's-90's [[HITS]]</code></i>).
- </ul>
- <br>
- This also allows you to pare down long item names to shorter versions.
- The shorter version must be still unique enough to identify the right item.
- The first item in the list (from top to bottom), that contains the given keyword, will be selected.
-
- <br><br>
- </ul>
- <a name="YAMAHA_AVR_get"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <reading></code>
- <br><br>
- Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
- <br><br>
- </ul>
- <a name="YAMAHA_AVR_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a name="YAMAHA_AVR_request-timeout">request-timeout</a></li>
- Optional attribute change the response timeout in seconds for all queries to the receiver.
- <br><br>
- Possible values: 1-5 seconds. Default value is 4 seconds.
- <br><br>
- <li><a name="YAMAHA_AVR_disable">disable</a></li>
- Optional attribute to disable the internal cyclic status update of the receiver. Manual status updates via statusRequest command is still possible.
- <br><br>
- Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.
- <br><br>
- <li><a name="YAMAHA_AVR_volume-smooth-change">volume-smooth-change</a></li>
- Optional attribute to activate a smooth volume change.
- <br><br>
- Possible values: 0 => off , 1 => on
- <br><br>
- <li><a name="YAMAHA_AVR_volume-smooth-steps">volume-smooth-steps</a></li>
- Optional attribute to define the number of volume changes between the
- current and the desired volume. Default value is 5 steps
- <br><br>
- <li><a name="YAMAHA_AVR_volume-steps">volumeSteps</a></li>
- Optional attribute to define the default increasing and decreasing level for the volumeUp and volumeDown set command. Default value is 5%
- <br><br>
- <li><a name="YAMAHA_AVR_volume-max">volumeMax</a></li>
- Optional attribute to set an upper limit in percentage for volume changes.
- If the user tries to change the volume to a higher level than configured with this attribute, the volume will not exceed this limit.
- <br><br>
- Possible values: 0-100%. Default value is 100% (no limitation)<br><br>
- </ul>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li><b>3dCinemaDsp</b> - The status of the CINEMA DSP 3D mode (can be "auto" or "off")</li>
- <li><b>adaptiveDrc</b> - The status of the Adaptive DRC (can be "auto" or "off")</li>
- <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>
- <li><b>direct</b> - indicates if all sound enhancement features are bypassed or not ("on" => all features are bypassed, "off" => sound enhancement features are used).</li>
- <li><b>dsp</b> - The current selected DSP mode for sound output</li>
- <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>
- <li><b>enhancer</b> - The status of the internal sound enhancer (can be "on" or "off")</li>
- <li><b>extraBass</b> - The status of the extra bass (can be "auto" or "off", only available if supported by the device)</li>
- <li><b>input</b> - The selected input source according to the FHEM input commands</li>
- <li><b>inputName</b> - The input description as seen on the receiver display</li>
- <li><b>hdmiOut1</b> - The status of the HDMI output 1 (can be "on" or "off")</li>
- <li><b>hdmiOut2</b> - The status of the HDMI output 2 (can be "on" or "off")</li>
- <li><b>mute</b> - Reports the mute status of the receiver or zone (can be "on" or "off")</li>
- <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>
- <li><b>power</b> - Reports the power status of the receiver or zone (can be "on" or "off")</li>
- <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>
- <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>
- <li><b>sleep</b> - indicates if the internal sleep timer is activated or not.</li>
- <li><b>straight</b> - indicates if the internal sound codec converter is bypassed or not (can be "on" or "off")</li>
- <li><b>state</b> - Reports the current power state and an absence of the device (can be "on", "off" or "absent")</li>
- <li><b>surroundDecoder</b> - Reports the selected surround decoder in case of "Surround Decoder" is used as active DSP</li>
- <li><b>tunerFrequency</b> - the current tuner frequency in kHz (AM band) or MHz (FM band)</li>
- <li><b>tunerFrequencyBand</b> - the current tuner band (AM or FM)</li>
- <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>
- <li><b>volume</b> - Reports the current volume level of the receiver or zone in percentage values (between 0 and 100 %)</li>
- <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>
- <li><b>ypaoVolume</b> - The status of the YPAO valume (can be "auto" or "off", only available if supported by the device)</li>
- <br><u>Input dependent Readings/Events:</u><br><br>
- <li><b>currentChannel</b> - Number of the input channel (SIRIUS only)</li>
- <li><b>currentStation</b> - Station name of the current radio station (available only on TUNER, HD RADIO, NET RADIO or PANDORA)</li>
- <li><b>currentStationFrequency</b> - The tuner frequency of the current station (only available on Tuner or HD Radio)</li>
- <li><b>currentAlbum</b> - Album name of the current song</li>
- <li><b>currentArtist</b> - Artist name of the current song</li>
- <li><b>currentTitle</b> - Title of the current song</li>
- <li><b>playStatus</b> - indicates if the input plays music or not</li>
- <li><b>shuffle</b> - indicates the shuffle status for the current input</li>
- <li><b>repeat</b> - indicates the repeat status for the current input</li>
- </ul>
- <br>
- <b>Implementator's note</b><br>
- <ul>
- 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.
- </ul>
- <br>
- </ul>
- <p><a name="YAMAHA_BD"></a>
- <h3>YAMAHA_BD</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#YAMAHA_BD'>DE</a>]</div>
- <ul>
- <a name="YAMAHA_BDdefine"></a>
- <b>Define</b>
- <ul>
- <code>
- define <name> YAMAHA_BD <ip-address> [<status_interval>]
- <br><br>
- define <name> YAMAHA_BD <ip-address> [<off_status_interval>] [<on_status_interval>]
- </code>
- <br><br>
- This module controls Blu-Ray players from Yamaha via network connection. You are able
- to switch your player on and off, query it's power state,
- control the playback, open and close the tray and send all remote control commands.<br><br>
- Defining a YAMAHA_BD device will schedule an internal task (interval can be set
- with optional parameter <status_interval> in seconds, if not set, the value is 30
- seconds), which periodically reads the status of the player (power state, current disc, tray status,...)
- and triggers notify/filelog commands.
- <br><br>
- Different status update intervals depending on the power state can be given also.
- If two intervals are given to the define statement, the first interval statement represents the status update
- interval in seconds in case the device is off, absent or any other non-normal state. The second
- interval statement is used when the device is on.
- Example:<br><br>
- <ul><code>
- define BD_Player YAMAHA_BD 192.168.0.10
- <br><br>
- # With custom status interval of 60 seconds<br>
- define BD_Player YAMAHA_BD 192.168.0.10 60
- <br><br>
- # With custom "off"-interval of 60 seconds and "on"-interval of 10 seconds<br>
- define BD_Player YAMAHA_BD 192.168.0.10 60 10
- </code></ul>
- </ul>
- <br><br>
- <a name="YAMAHA_BDset"></a>
- <b>Set </b>
- <ul>
- <code>set <name> <command> [<parameter>]</code>
- <br><br>
- Currently, the following commands are defined.
- <br><br>
- <ul>
- <li><b>on</b> - powers on the device</li>
- <li><b>off</b> - shuts down the device </li>
- <li><b>tray</b> open,close - open or close the disc tray</li>
- <li><b>statusRequest</b> - requests the current status of the device</li>
- <li><b>remoteControl</b> up,down,... - sends remote control commands as listed in the following chapter</li>
- </ul><br>
- <u>Playback control commands</u>
- <ul>
- <li><b>play</b> - start playing the current media</li>
- <li><b>pause</b> - pause the current media playback</li>
- <li><b>stop</b> - stop the current media playback</li>
- <li><b>skip</b> forward,reverse - skip the current track or chapter</li>
- <li><b>fast</b> forward,reverse - fast forward or reverse playback</li>
- <li><b>slow</b> forward,reverse - slow forward or reverse playback</li>
- <li><b>trickPlay</b> normal,repeatChapter,repeatTitle,... - controls the Trick-Play features</li>
- </ul>
- </ul><br><br>
- <u>Remote control</u><br><br>
- <ul>
- The following commands are available:<br><br>
- <u>Number Buttons (0-9):</u><br><br>
- <ul><code>
- remoteControl 0<br>
- remoteControl 1<br>
- remoteControl 2<br>
- ...<br>
- remoteControl 9<br>
- </code></ul><br><br>
- <u>Cursor Selection:</u><br><br>
- <ul><code>
- remoteControl up<br>
- remoteControl down<br>
- remoteControl left<br>
- remoteControl right<br>
- remoteControl enter<br>
- remoteControl return<br>
- </code></ul><br><br>
- <u>Menu Selection:</u><br><br>
- <ul><code>
- remoteControl OSDonScreen<br>
- remoteControl OSDstatus<br>
- remoteControl popupMenu<br>
- remoteControl topMenu<br>
- remoteControl setup<br>
- remoteControl home<br>
- remoteControl clear<br>
- </code></ul><br><br>
- <u>Color Buttons:</u><br><br>
- <ul><code>
- remoteControl red<br>
- remoteControl green<br>
- remoteControl yellow<br>
- remoteControl blue<br>
- </code></ul><br><br>
- <u>Play Control Buttons:</u><br><br>
- <ul><code>
- remoteControl program<br>
- remoteControl search<br>
- remoteControl repeat<br>
- remoteControl repeat-AB<br>
- remoteControl subtitle<br>
- remoteControl audio<br>
- remoteControl angle<br>
- remoteControl pictureInPicture<br>
- remoteControl secondAudio<br>
- remoteControl secondVideo<br>
- </code></ul><br><br>
- The button names are the same as on your remote control.<br><br>
- </ul>
- <a name="YAMAHA_BDget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <reading></code>
- <br><br>
- Currently, the get command only returns the reading values. For a specific list of possible values, see section "Generated Readings/Events".
- <br><br>
- </ul>
- <a name="YAMAHA_BDattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li><br>
- <li><a name="disable">disable</a></li>
- Optional attribute to disable the internal cyclic status update of the player. Manual status updates via statusRequest command is still possible.
- <br><br>
- Possible values: 0 => perform cyclic status update, 1 => don't perform cyclic status updates.<br><br>
- <li><a name="request-timeout">request-timeout</a></li>
- Optional attribute change the response timeout in seconds for all queries to the player.
- <br><br>
- Possible values: 1-5 seconds. Default value is 4 seconds.<br><br>
- </ul>
- <b>Generated Readings/Events:</b><br>
- <ul>
- <li><b>input</b> - The current playback source (e.g. "DISC", "USB", "Network", "YouTube", ...)</li>
- <li><b>discType</b> - The current type of disc, which is inserted (e.g. "No Disc", "CD", "DVD", "BD", ...)</li>
- <li><b>contentType</b> - The current type of content, which is played (e.g. "audio", "video", "photo" or "no contents")</li>
- <li><b>error</b> - indicates an hardware error of the player (can be "none", "fan error" or "usb overcurrent")</li>
- <li><b>power</b> - Reports the power status of the player or zone (can be "on" or "off")</li>
- <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>
- <li><b>trayStatus</b> - The disc tray status (can be "open" or "close")</li>
- <li><b>trickPlay</b> - The current trickPlay mode</li>
- <li><b>state</b> - Reports the current power state and an absence of the device (can be "on", "off" or "absent")</li>
- <br><br><u>Input dependent Readings/Events:</u><br>
- <li><b>currentChapter</b> - Number of the current DVD/BD Chapter (only at DVD/BD's)</li>
- <li><b>currentMedia</b> - Name of the current file (only at USB)</li>
- <li><b>currentTrack</b> - Number of the current CD-Audio title (only at CD-Audio)</li>
- <li><b>currentTitle</b> - Number of the current title (only at DVD/BD's)</li>
- <li><b>playTimeCurrent</b> - current timecode of played media</li>
- <li><b>playTimeTotal</b> - the total time of the current movie (only at DVD/BD's)</li>
- <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>
- <li><b>totalTracks</b> - The number of total tracks on inserted CD-Audio</li>
- </ul>
- <br>
- <b>Implementator's note</b><br>
- <ul>
- <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>
- <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>
- </ul>
- <br>
- </ul>
- <p><a name="YAMAHA_NP"></a>
- <h3>YAMAHA_NP</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#YAMAHA_NP'>DE</a>]</div>
- <ul>
- <a name="YAMAHA_NPdefine"></a>
- <b>Define</b>
- <br><br>
- <ul>
- <code>
- define <name> YAMAHA_NP <ip–address> [<status_interval>]
- </code>
- <br><br>Alternatively with different two off/on interval definitions (default is 30 seconds).<br><br>
- <code>
- define <name> YAMAHA_NP <ip–address> [<off_status_interval>] [<on_status_interval>]
- </code>
- <br><br>This FHEM module controls a Yamaha Network Player (such as MCR–N560, MCR–N560D, CRX–N560, CRX–N560D, CD–N500 or NP–S2000) connected to local network.
- <br>Devices implementing the communication protocol of the Yamaha Network Player App for i*S and Andr*id might also work.
- <br><br>
- Example:<br>
- <ul><br>
- <code>
- define NP_Player YAMAHA_NP 192.168.0.15<br>
- attr NP_player webCmd input:selectStream:volume<br><br>
- # With custom status interval of 60 seconds<br>
- define NP_Player YAMAHA_NP 192.168.0.15 <b>60</b><br>
- attr NP_player webCmd input:selectStream:volume<br><br>
- # With custom "off"–interval of 60 seconds and "on"–interval of 10 seconds<br>
- define NP_Player YAMAHA_NP 192.168.0.15 <b>60 10</b><br>
- attr NP_player webCmd input:selectStream:volume
- </code>
- </ul>
- </ul>
- <br>
- <a name="YAMAHA_NPset"></a>
- <b>Set</b>
- <ul><br>
- <code>
- set <name> <command> [<parameter>]
- </code>
- <br>
- <br>
- <i>Note: Commands and parameters are case–sensitive. The module provides available inputs depending on the connected device. Commands are context–sensitive depending on the current input or action.</i><br>
- <ul>
- <br>
- <u>Available commands:</u><br><br>
- <li><b>CDTray</b> – open/close the CD tray.</li>
- <li><b>clockUpdate</b> – updates the system clock with current time. The local time information is taken from the FHEM server.</li>
- <li><b>dimmer</b> < 1..3 > – Sets the display brightness.</li>
- <li><b>directPlay</b> < input:Stream Level 1,Stream Level 2,... > – allows direct stream selection e.g. CD:1, DAB:1, netradio:Bookmarks,SWR3 (case–sensitive)</li>
- <li><b>favoriteDefine</b> < name:input[,Stream Level 1,Stream Level 2,...] > – defines and stores a favorite stream e.g. CoolSong:CD,1 (predefined favorites are the available inputs)</li>
- <li><b>favoriteDelete</b> < name > – deletes a favorite stream</li>
- <li><b>favoritePlay</b> < name > – plays a favorite stream</li>
- <li><b>input</b> [<parameter>] – selects the input channel. The inputs are read dynamically from the device. Available inputs can be set (e.g. cd, tuner, aux1, aux2, ...).</li>
- <li><b>mute</b> [on|off] – activates/deactivates muting</li>
- <li><b>off</b> – shuts down the device </li>
- <li><b>on</b> – powers on the device</li>
- <li><b>player [<parameter>] </b> – sets player related commands</li>
- <ul>
- <li><b>play</b> – play</li>
- <li><b>stop</b> – stop</li>
- <li><b>pause</b> – pause</li>
- <li><b>next</b> – next item</li>
- <li><b>prev</b> – previous item</li>
- </ul>
- <li><b>playMode [<parameter>] </b> – sets player mode shuffle or repeat</li>
- <ul>
- <li><b>shuffleAll</b> – Set shuffle mode</li>
- <li><b>shuffleOff</b> – Remove shuffle mode</li>
- <li><b>repeatOff</b> – Set repeat mode Off</li>
- <li><b>repeatOne</b> – Set repeat mode One</li>
- <li><b>repeatAll</b> – Set repeat mode All</li>
- </ul>
- <li><b>selectStream</b> – direct context–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>
- <li><b>sleep</b> [off|30min|60min|90min|120min] – activates the internal sleep timer</li>
- <li><b>standbyMode</b> [eco|normal] – set the standby mode</li>
- <li><b>statusRequest [<parameter>] </b> – requests the current status of the device</li>
- <ul>
- <li><b>basicStatus</b> – requests the basic status such as volume input etc.</li>
- <li><b>playerStatus</b> – requests the player status such as play status, song info, artist info etc.</li>
- <li><b>standbyMode</b> – requests the standby mode information</li>
- <li><b>systemConfig</b> – requests the system configuration</li>
- <li><b>tunerStatus</b> – requests the tuner status such as FM frequency, preset number, DAB information etc.</li>
- <li><b>timerStatus</b> – requests device's internal wake–up timer status</li>
- <li><b>networkInfo</b> – requests device's network related information such as IP, Gateway, MAC address etc.</li>
- </ul>
- <li><b>timerSet</b> – configures the timer according to timerHour, timerMinute, timerRepeat, timerVolume attributes that must be set before. This command does not switch on the timer. → 'timer on'.)</li>
- <li><b>timer</b> [on|off] – sets device's internal wake–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>
- <li><b>tunerFMFrequency</b> [87.50 ... 108.00] – 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>
- <li><b>volume</b> [0...100] – set the volume level in %</li>
- <li><b>volumeStraight</b> [<VOL_MIN>...<VOL_MAX>] – set the volume as used and displayed in the device. <VOL_MIN> and <VOL_MAX> are read and set from the device automatically.</li>
- <li><b>volumeUp</b> [<VOL_MIN>...<VOL_MAX>] – increases the volume by one device's absolute step. <VOL_MIN> and <VOL_MAX> are read and set from the device automatically.</li>
- <li><b>volumeDown</b> [<VOL_MIN>...<VOL_MAX>] – increases the volume by one device's absolute step. <VOL_MIN> and <VOL_MAX> are read and set from the device automatically.</li>
- </ul>
- </ul>
- <br>
- <a name="YAMAHA_NPget"></a>
- <b>Get</b>
- <ul>
- <code>
- get <name> <reading>
- </code>
- <br><br>
- The 'get' command returns reading values. Readings are context–sensitive depending on the current input or action taken.<br><br>
- </ul>
- <a name="YAMAHA_NPattr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <ul>
- <li><b>.DABList</b> – (internal) attribute used for DAB preset storage.</li>
- <li><b>.favoriteList</b> – (internal) attribute used for favorites storage.</li>
- <li><b>autoUpdatePlayerReadings</b> – optional attribute for auto refresh of player related readings (default is 1).</li>
- <li><b>autoUpdatePlayerlistReadings</b> – 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>
- <li><b>autoUpdateTunerReadings</b> – optional attribute for auto refresh of tuner related readings (default is 1).</li>
- <li><b>directPlaySleepNetradio</b> – 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>
- <li><b>directPlaySleepServer</b> – 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>
- <li><b>disable</b> – optional attribute to disable the internal cyclic status update of the NP. Manual status updates via statusRequest command is still possible. Possible values: 0 → perform cyclic status update, 1 → don't perform cyclic status updates (default is 1).</li>
- <li><b>do_not_notify</b></li>
- <li><b>maxPlayerListItems</b> – optional attribute to limit the max number of player list items (default is 999).</li>
- <li><b>readingFnAttributes</b></li><br>
- <li><b>requestTimeout</b> – optional attribute change the response timeout in seconds for all queries to the receiver. Possible values: 1...5 seconds (default value is 4).</li>
- <li><b>searchAttempts</b> – 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>
- <li><b>smoothVolumeChange</b> – optional attribute for smooth volume change (significantly more Ethernet traffic is generated during volume change if set to 1) (default is 1).</li>
- <li><b>timerHour</b> [0...23] – sets hour of device's internal wake–up timer</li>
- <li><b>timerMinute</b> [0...59] – sets minutes of device's internal wake–up timer</li>
- <li><b>timerRepeat</b> [once|every] – sets repetition mode of device's internal wake–up timer</li>
- <li><b>timerVolume</b> [<VOL_MIN>...<VOL_MAX>] – sets volume of device's internal wake–up timer.</li>
- <br>
- </ul>
- </ul>
- <b>Readings</b><br>
- <ul>
- <ul>
- <br><u>General readings:</u><br><br>
- <li><b>deviceInfo</b> – Reports device specific grouped information such as uuid, ip address, etc.</li>
- <li><b>favoriteList</b> – Reports stored favorites</li>
- <li><b>reading [reading]</b> – Reports readings values</li>
- <ul><br>
- <li>.volumeStraightMax – device specific maximum volume</li>
- <li>.volumeStraightMin – device specific minimum volume</li>
- <li>.volumeStraightStep – device specific volume in/decrement step</li>
- <li>audioSource – 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>
- <li>directPlay – status of directPlay command</li>
- <li>input – currently selected input</li>
- <li>mute – mute status on/off</li>
- <li>power – current device status on/off</li>
- <li>presence – presence status of the device (present|absent)</li>
- <li>selectStream – status of the selectStream command</li>
- <li>sleep – sleep timer value (off|30 min|60 min|90 min|120 min)</li>
- <li>standbyMode – status of the standby mode (normal|eco)</li>
- <li>state – current state information (on|off)</li>
- <li>volume – relative volume (0...100)</li>
- <li>volumeStraight – device specific absolute volume [<VOL_MIN>...<VOL_MAX>]</li>
- </ul>
- <br><u>Player related readings:</u><br><br>
- <li><b>playerAlbumArtFormat</b> – Reports the album art format (if available) of the currently played audio</li>
- <li><b>playerAlbumArtID</b> – Reports the album art ID (if available) of the currently played audio</li>
- <li><b>playerAlbumArtURL</b> – Reports the album art url (if available) of the currently played audio. The URL points to the network player</li>
- <li><b>playerDeviceType</b> – Reports the device type (ipod|msc)</li>
- <li><b>playerIpodMode</b> – Reports the Ipod Mode (normal|off)</li>
- <li><b>playerAlbum</b> – Reports the album (if available) of the currently played audio</li>
- <li><b>playerArtist</b> – Reports the artist (if available) of the currently played audio</li>
- <li><b>playerSong</b> – Reports the song name (if available) of the currently played audio</li>
- <li><b>playerPlayTime</b> – Reports the play time of the currently played audio (HH:MM:SS)</li>
- <li><b>playerTrackNb</b> – Reports the track number of the currently played audio</li>
- <li><b>playerPlaybackInfo</b> – Reports current player state (play|stop|pause)</li>
- <li><b>playerRepeat</b> – Reports the Repeat Mode (one|all|off)</li>
- <li><b>playerShuffle</b> – Reports the Shuffle Mode (on|off)</li>
- <li><b>playerTotalTracks</b> – Reports the total number of tracks for playing</li>
-
- <br><u>Player list (menu) related readings:</u><br><br>
- <li>listItem_XXX – 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>
- <li>lvlX_ – Reports the hierarchical directory tree level.</li>
- <br><u>Tuner related readings:</u><br><br>
- <li>listItem_XXX – Reports the stored presets.</li>
- <li>tunerBand – Reports the tuner band (DAB|FM)</li>
- <br>
- <li>DAB</li>
- <ul><li>tunerDABStation – (DAB|DAB+), Channel: (value), Ensemble: (name)</li></ul>
- <ul><li>tunerDABSignal – (Frequency), (Signal quality), (Bitrate), (Mono|Stereo)</li></ul>
- <ul><li>tunerInfo1 – DAB program service</li></ul>
- <ul><li>tunerPreset – (Preset number DAB Frequency Station) or '–' if not stored as preset</li></ul>
- <ul><li>tunerStation – DAB Station Name</li></ul>
- <br>
- <li>FM</li>
- <ul><li>tunerFrequency – FM frequency</li></ul>
- <ul><li>tunerInfo1 – FM station name</li></ul>
- <ul><li>tunerInfo2_A – Additional RDS information A</li></ul>
- <ul><li>tunerInfo2_A – Additional RDS information B</li></ul>
- <ul><li>tunerPreset – (Preset number FM Frequency Station) or '–' if not stored as preset</li></ul>
- <br><u>Timer related readings:</u><br><br>
- <li>timer – current timer status (on|off)</li>
- <li>timerRepeat – timer repeat mode (once|every)</li>
- <li>timerStartTime – timer start time HH:MM</li>
- <li>timerVolume – timer volume [<VOL_MIN>...<VOL_MAX>]</li>
- </ul>
- </ul>
- </ul>
- <p><a name="ZWCUL"></a>
- <h3>ZWCUL</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ZWCUL'>DE</a>]</div>
- <ul>
- This module serves a CUL in ZWave mode (starting from culfw version 1.66),
- which is attached via USB or TCP/IP, and enables the use of ZWave devices
- (see also the <a href="#ZWave">ZWave</a> module).
- <br><br>
- <a name="ZWCULdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ZWCUL <device> <homeId>
- <ctrlId></code>
- <br>
- <br>
- Since the DevIo module is used to open the device, you can also use devices
- connected via TCP/IP. See <a href="#CULdefine">this</a> paragraph on device
- naming details.
- <br>
- Example:
- <ul>
- <code>define ZWCUL_1 ZWCUL /dev/cu.usbmodemfa141@9600 12345678 01</code><br>
- </ul>
- If the homeId is set to 00000000, then culfw will enter monitor mode, i.e. no
- acks for received messages will be sent, and no homeId filtering will be done.
- </ul>
- <br>
- <a name="ZWCULset"></a>
- <b>Set</b>
- <ul>
- <li>reopen<br>
- First close and then open the device. Used for debugging purposes.
- </li>
- <li>led [on|off|blink]<br>
- Set the LED on the CUL.
- </li>
- <li>raw<br>
- send a raw string to culfw
- </li>
- <li>addNode [on|onSec|off]<br>
- Activate (or deactivate) inclusion mode. The CUL will switch to dataRate
- 9600 until terminating this mode with off, or a node is included. If onSec
- is specified, the ZWCUL networkKey ist set, and the device supports the
- SECURITY class, then a secure inclusion is attempted. </li>
- <li>addNodeId <decimalNodeId><br>
- Activate inclusion mode, and assign decimalNodeId to the next node.
- To deactivate this mode, use addNode off. Note: addNode won't work for a
- FHEM2FHEM:RAW attached ZWCUL, use addNodeId instead</li>
- <li>removeNode [onNw|on|off]<br>
- Activate (or deactivate) exclusion mode. Like with addNode, the CUL will
- switch temporarily to dataRate 9600, potentially missing some packets sent
- on higher dataRates. Note: the corresponding fhem device have to be
- deleted manually.</li>
- </ul>
- <br>
- <a name="ZWCULget"></a>
- <b>Get</b>
- <ul>
- <li>homeId<br>
- return the homeId and the ctrlId of the controller.</li>
- <li>nodeInfo<br>
- return node specific information. Needed by developers only.</li>
- <li>raw<br>
- Send raw data to the controller.</li>
- </ul>
- <br>
- <a name="ZWCULattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="dataRate">dataRate</a> [40k|100k|9600]<br>
- specify the data rate.
- </li>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#model">model</a></li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#networkKey">networkKey</a></li>
- <li><a name="intruderMode">intruderMode</a><br>
- In monitor mode (see above) events are not dispatched to the ZWave module
- per default. Setting this attribute will allow to get decoded messages,
- and to send commands to devices not included by this controller.
- </li>
- <li>verbose<br>
- If the verbose attribute of this device (not global!) is set to 5 or
- higher, then detailed logging of the RF message will be done.
- </li>
- </ul>
- <br>
- <a name="ZWCULevents"></a>
- <b>Generated events: TODO</b>
- </ul>
- <p><a name="ZWDongle"></a>
- <h3>ZWDongle</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ZWDongle'>DE</a>]</div>
- <ul>
- This module serves a ZWave dongle, which is attached via USB or TCP/IP, and
- enables the use of ZWave devices (see also the <a href="#ZWave">ZWave</a>
- module). It was tested wit a Goodway WD6001, but since the protocol is
- standardized, it should work with other devices too. A notable exception is
- the USB device from Merten.
- <br><br>
- <a name="ZWDongledefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ZWDongle <device></code>
- <br>
- <br>
- Upon initial connection the module will get the homeId of the attached
- device. Since the DevIo module is used to open the device, you can also use
- devices connected via TCP/IP. See <a href="#CULdefine">this</a> paragraph on
- device naming details.
- <br>
- Example:
- <ul>
- <code>define zwdongle_1 ZWDongle /dev/cu.PL2303-000014FA@115200</code><br>
- </ul>
- </ul>
- <br>
- <a name="ZWDongleset"></a>
- <b>Set</b>
- <ul>
- <li>addNode on|onNw|onSec|onNwSec|off<br>
- Activate (or deactivate) inclusion mode. The controller (i.e. the dongle)
- will accept inclusion (i.e. pairing/learning) requests only while in this
- mode. After activating inclusion mode usually you have to press a switch
- three times within 1.5 seconds on the node to be included into the network
- of the controller. If autocreate is active, a fhem device will be created
- after inclusion. "on" activates standard inclusion. "onNw" activates network
- wide inclusion (only SDK 4.5-4.9, SDK 6.x and above).<br>
- If onSec/onNwSec is specified, the ZWDongle networkKey ist set, and the
- device supports the SECURITY class, then a secure inclusion is attempted.
- </li>
- <li>backupCreate 16k|32k|64k|128k|256k<br>
- read out the NVRAM of the ZWDongle, and store it in a file called
- <ZWDongle_Name>.bin in the modpath folder. Since the size of the
- NVRAM is currently unknown to FHEM, you have to specify the size. The
- ZWave.me ZME_UZB1 Stick seems to have 256k of NVRAM. Note: writing the file
- takes some time, usually about 10s for each 64k (and significantly longer
- on Windows), and FHEM is blocked during this time.
- </li>
- <li>backupRestore<br>
- Restore the file created by backupCreate. Restoring the file takes about
- the same time as saving it, and FHEM is blocked during this time.
- Note / Important: this function is not yet tested for older devices using
- the MEMORY functions.
- </li>
- <li>controllerChange on|stop|stopFailed<br>
- Add a controller to the current network and transfer role as primary to it.
- Invoking controller is converted to secondary.<br>
- stop: stop controllerChange<br>
- stopFailed: stop controllerChange and report an error
- </li>
- <li>createNewPrimary on|stop|stopFailed<br>
- Add a controller to the current network as a replacement for an old
- primary. Command can be invoked only by a secondary configured as basic
- SUC<br>
- stop: stop createNewPrimary<br>
- stopFailed: stop createNewPrimary and report an error
- </li>
- <li>createNode <device><br>
- createNodeSec <device><br>
- Request the class information for the specified node, and create
- a FHEM device upon reception of the answer. Used to create FHEM devices for
- nodes included with another software or if the fhem.cfg got lost. For the
- node id see the get nodeList command below. Note: the node must be "alive",
- i.e. for battery based devices you have to press the "wakeup" button 1-2
- seconds before entering this command in FHEM.<br>
- <device> is either device name or decimal nodeId.<br>
- createNodeSec assumes a secure inclusion, see the comments for "addNode
- onSec" for details.
- </li>
- <li>factoryReset yes<br>
- Reset controller to default state.
- Erase all node and routing infos, assign a new random homeId.
- To control a device it must be re-included and re-configured.<br>
- !Use this with care AND only if You know what You do!<br>
- Note: the corresponding FHEM devices have to be deleted manually.
- </li>
- <li>learnMode on|onNw|disable<br>
- Add or remove controller to/from an other network.
- Assign a homeId, nodeId and receive/store nodeList and routing infos.
- </li>
- <li>removeFailedNode <device><br>
- Remove non-responding node -that must be on the failed node list-
- from the routing table in controller. Instead, always use removeNode if
- possible. Note: the corresponding FHEM device have to be deleted
- manually.<br>
- <device> is either device name or decimal nodeId.
- </li>
- <li>removeNode onNw|on|off<br>
- Activate (or deactivate) exclusion mode. "on" activates standard exclusion.
- "onNw" activates network wide exclusion (only SDK 4.5-4.9, SDK 6.x and
- above). Note: the corresponding FHEM device have to be deleted
- manually.
- </li>
- <li>reopen<br>
- First close and then open the device. Used for debugging purposes.
- </li>
- <li>replaceFailedNode <device><br>
- Replace a non-responding node with a new one. The non-responding node
- must be on the failed node list.<br>
- <device> is either device name or decimal nodeId.
- </li>
- <li>routeFor <device> <hop1> <hop2> <hop3>
- <hop4> <speed><br>
- set priority routing for <device>. <device> and <hopN> are
- either device name or decimal nodeId or 0 for unused.<br>
- <speed>: 1=9,6kbps; 2=40kbps; 3=100kbps
- </li>
- <li>sendNIF <device><br>
- Send NIF to the specified <device>.
- <device> is either device name or decimal nodeId.
- </li>
- <li>sucNodeId <decimal nodeId> <sucState>
- <capabilities><br>
- Configure a controller node to be a SUC/SIS or not.<br>
- <nodeId>: decimal nodeId to be SUC/SIS<br>
- <sucState>: 0 = deactivate; 1 = activate<br>
- <capabilities>: 0 = basic SUC; 1 = SIS
- </li>
- <li>sucRequestUpdate <decimal nodeId of SUC/SIS><br>
- Request network updates from SUC/SIS. Primary do not need it.
- </li>
- <li>sucSendNodeId <decimal nodeId><br>
- Send SUC/SIS nodeId to the specified decimal controller nodeId.
- </li>
- </ul>
- <br>
- <a name="ZWDongleget"></a>
- <b>Get</b>
- <ul>
- <li>homeId<br>
- return the six hex-digit homeId of the controller.
- </li>
-
- <li>backgroundRSSI<br>
- query the measured RSSI on the Z-Wave network
- </li>
- <li>caps, ctrlCaps, version<br>
- return different controller specific information. Needed by developers
- only.
- </li>
- <li>isFailedNode <device><br>
- return if a node is stored in the failed node list. <device> is
- either device name or decimal nodeId.
- </li>
- <li>neighborList [excludeDead] [onlyRep] <device><br>
- return neighborList of the <device>.<br>
- <device> is either device name or decimal nodeId.<br>
- With onlyRep the result will include only nodes with repeater
- functionality.
- </li>
- <li>nodeInfo <device><br>
- return node specific information. <device> is either device name or
- decimal nodeId.
- </li>
- <li>nodeList<br>
- return the list of included nodenames or UNKNOWN_id (decimal id), if there
- is no corresponding device in FHEM. Can be used to recreate FHEM-nodes with
- the createNode command.
- </li>
- <li>random <N><br>
- request <N> random bytes from the controller.
- </li>
- <li>raw <hex><br>
- Send raw data <hex> to the controller. Developer only.
- </li>
- <li>routeFor <device><br>
- request priority routing for <device>. <device> is either
- device name or decimal nodeId.</li>
- <li>sucNodeId<br>
- return the currently registered decimal SUC nodeId.
- </li>
- </ul>
- <br>
- <a name="ZWDongleattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#model">model</a></li>
- <li><a href="#disable">disable</a></li>
- <li><a name="helpSites">helpSites</a><br>
- Comma separated list of Help Sites to get device pictures from or to
- show a link to in the detailed window. Valid values are pepper
- and alliance.
- </li>
- <li><a name="homeId">homeId</a><br>
- Stores the homeId of the dongle. Is a workaround for some buggy dongles,
- wich sometimes report a wrong/nonexisten homeId (Forum #35126)</li>
- <li><a name="networkKey">networkKey</a><br>
- Needed for secure inclusion, hex string with length of 32
- </li>
- <li><a name="neighborListPos">neighborListPos</a><br>
- Used by the "Show neighbor map" function in the FHEMWEB ZWDongle detail
- screen to store the position of the box.
- </li>
- <li><a name="neighborListFmt">neighborListFmt</a><br>
- Used by the "Show neighbor map" function in the FHEMWEB ZWDongle detail
- screen. The value is a perl hash, specifiying the values for the keys
- txt, img and title. In the value each word is replaced by the
- corresponding Internal, Reading or Attribute of the device, if there is
- one to replace. Default is
- <ul><code>
- { txt=>"NAME", img=>"IMAGE", title=>"Time to ack: timeToAck" }
- </code></ul>
- </li>
- <li><a name="showSetInState">showSetInState</a><br>
- If the attribute is set to 1, and a user issues a set command to a ZWave
- device, then the state of the ZWave device will be changed to
- set_<cmd> first, and after the ACK from the device is received, to
- <cmd>. E.g.: Issuing the command on changes the state first to
- set_on, and after the device ack is received, to on. This is analoguos
- to the CUL_HM module. Default for this attribute is 0.
- </li>
-
- </ul>
- <br>
- <a name="ZWDongleevents"></a>
- <b>Generated events:</b>
- <ul>
- <br><b>General</b>
- <li>UNDEFINED ZWave_${type6}_$id ZWave $homeId $id $classes</li>
- <li>ZW_APPLICATION_UPDATE addDone $nodeId</li>
- <li>ZW_APPLICATION_UPDATE deleteDone $nodeId</li>
- <li>ZW_APPLICATION_UPDATE sudId $nodeId</li>
- <br><b>addNode</b>
- <li>ZW_ADD_NODE_TO_NETWORK [learnReady|nodeFound|slave|controller|
- done|failed]</li>
- <br><b>controllerChange</b>
- <li>ZW_CONTROLLER_CHANGE [learnReady|nodeFound|controller|done|failed]</li>
- <br><b>createNewPrimary</b>
- <li>ZW_CREATE_NEW_PRIMARY [learnReady|nodeFound|controller|done|failed]</li>
- <br><b>factoryReset</b>
- <li>ZW_SET_DEFAULT [done]</li>
- <br><b>learnMode</b>
- <li>ZW_SET_LEARN_MODE [started|done|failed|deleted]</li>
- <br><b>neighborUpdate</b>
- <li>ZW_REQUEST_NODE_NEIGHBOR_UPDATE [started|done|failed]</li>
- <br><b>removeFailedNode</b>
- <li>ZW_REMOVE_FAILED_NODE_ID
- [failedNodeRemoveStarted|notPrimaryController|noCallbackFunction|
- failedNodeNotFound|failedNodeRemoveProcessBusy|
- failedNodeRemoveFail|nodeOk|nodeRemoved|nodeNotRemoved]</li>
- <br><b>removeNode</b>
- <li>ZW_REMOVE_NODE_FROM_NETWORK
- [learnReady|nodeFound|slave|controller|done|failed]</li>
- <br><b>replaceFailedNode</b>
- <li>ZW_REPLACE_FAILED_NODE
- [failedNodeRemoveStarted|notPrimaryController|noCallbackFunction|
- failedNodeNotFound|failedNodeRemoveProcessBusy|
- failedNodeRemoveFail|nodeOk|failedNodeReplace|
- failedNodeReplaceDone|failedNodeRemoveFailed]</li>
- <br><b>routeFor</b>
- <li>ZW_SET_PRIORITY_ROUTE node $nodeId result $nr</li>
- <br><b>sucNetworkUpdate</b>
- <li>ZW_REQUEST_NETWORK_UPDATE [started|selfOrNoSUC|done|abort|wait|diabled|
- overflow]</li>
- <br><b>sucNodeId</b>
- <li>ZW_SET_SUC_NODE_ID [ok|failed|callbackSucceeded|callbackFailed]</li>
- <br><b>sucRouteAdd</b>
- <li>ZW_ASSIGN_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
- transmitNoAck|transmitFail|transmitNotIdle|
- transmitNoRoute]</li>
- <br><b>sucRouteDel</b>
- <li>ZW_DELETE_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
- transmitNoAck|transmitFail|transmitNotIdle|
- transmitNoRoute]</li>
- <br><b>sucSendNodeId</b>
- <li>ZW_SEND_SUC_ID [started|alreadyActive|transmitOk|
- transmitNoAck|transmitFail|transmitNotIdle|
- transmitNoRoute]</li>
- </ul>
- </ul>
- <p><a name="ZWave"></a>
- <h3>ZWave</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ZWave'>DE</a>]</div>
- <ul>
- This module is used to control ZWave devices via FHEM, see <a
- href="http://www.z-wave.com">www.z-wave.com</a> for details for this device
- family. The full specification of ZWave command classes can be found here:
- <a href="http://zwavepublic.com/specifications"
- title="website with the full specification of ZWave command classes">
- http://zwavepublic.com/specifications</a>.
- This module is a client of the <a href="#ZWDongle">ZWDongle</a>
- module, which is directly attached to the controller via USB or TCP/IP. To
- use the SECURITY features, the Crypt-Rijndael perl module is needed.
- <br><br>
- <a name="ZWavedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> ZWave <homeId> <id> [classes]</code>
- <br>
- <br>
- <homeId> is the homeId of the controller node, and id is the id of the
- slave node in the network of this controller.<br>
- classes is a hex-list of ZWave device classes. This argument is usually
- specified by autocreate when creating a device. If you wish to manually
- create a device, use the classes attribute instead, see below for details.
- Defining a ZWave device the first time is usually done by autocreate.
- <br>
- Example:
- <ul>
- <code>define lamp ZWave 00ce2074 9</code><br>
- <code>attr lamp classes SWITCH_BINARY BASIC MANUFACTURER_SPECIFIC VERSION
- SWITCH_ALL ASSOCIATION METER CONFIGURATION ALARM</code><br>
- </ul>
- </ul>
- <br>
- Note: the sets/gets/generated events of a given node depend on the classes
- supported by this node. If a node supports 3 classes, then the union of
- these sets/gets/events will be available for this node.<br>
- Commands for battery operated nodes will be queued internally, and sent when
- the node sends a message. Answers to get commands appear then as events, the
- corresponding readings will be updated.
- <br><br>
- <a name="ZWaveset"></a>
- <b>Set</b>
- <ul>
- <br>
- <b>Notes</b>:
- <ul>
- <li>devices with on/off functionality support the <a
- href="#setExtensions"> set extensions</a>.</li>
- <li>A set command does not automatically update the corresponding reading,
- you have to execute a get for this purpose. This can be automatically
- done via a notify, although this is not recommended in all cases.</li>
- </ul>
- <br><br><b>All</b>
- <li>neighborUpdate<br>
- Requests controller to update its routing table which is based on
- slave's neighbor list. The update may take significant time to complete.
- With the event "done" or "failed" ZWDongle will notify the end of the
- update process. To read node's neighbor list see neighborList get
- below.</li>
- <li>returnRouteAdd <decimal nodeId><br>
- Assign up to 4 static return routes to the routing/enhanced slave to
- allow direct communication to <decimal nodeId>. (experts only)</li>
- <li>returnRouteDel<br>
- Delete all static return routes. (experts only)</li>
- <li>sucRouteAdd<br>
- Inform the routing/enhanced slave of the presence of a SUC/SIS. Assign
- up to 4 static return routes to SUC/SIS.</li>
- <li>sucRouteDel<br>
- Delete static return routes to SUC/SIS node.</li>
- <br><br><b>Class ALARM</b>
- <li>alarmnotification <alarmType> (on|off)<br>
- Enable (on) or disable (off) the sending of unsolicited reports for
- the alarm type <alarmType>. A list of supported alarm types of the
- device can be obtained with the alarmTypeSupported command. The
- name of the alarm type is case insensitive. Sending of an unsolicited
- notification only works for associated nodes, broadcasting is not
- allowed, so associations have to be set up. This command is
- specified in version 2.</li>
- <li> Note:<br>
- The name of the class ALARM was renamed to NOTIFICATION in
- version 3 of the Zwave specification. Due to backward compatibility
- reasons the class will be always referenced as ALARM in FHEM,
- regardless of the version.</li>
- <br><br><b>Class ASSOCIATION</b>
- <li>associationAdd groupId nodeId ...<br>
- Add the specified list of nodeIds to the association group groupId.<br> Note:
- upon creating a FHEM-device for the first time FHEM will automatically add
- the controller to the first association group of the node corresponding to
- the FHEM device, i.e it issues a "set name associationAdd 1
- controllerNodeId"</li>
- <li>associationDel groupId nodeId ...<br>
- Remove the specified list of nodeIds from the association group groupId.</li>
- <br><br><b>Class BASIC</b>
- <li>basicValue value<br>
- Send value (0-255) to this device. The interpretation is device dependent,
- e.g. for a SWITCH_BINARY device 0 is off and anything else is on.</li>
- <li>basicValue value<br>
- Alias for basicValue, to make mapping from the incoming events easier.
- </li>
- <br><br><b>Class BARRIER_OPERATOR</b>
- <li>barrierClose<br>
- start closing the barrier.</li>
- <li>barrierOpen<br>
- start opening the barrier.
- </li>
- <br><br><b>Class BASIC_WINDOW_COVERING</b>
- <li>coveringClose<br>
- Starts closing the window cover. Moving stops if blinds are fully closed or
- a coveringStop command was issued.
- </li>
- <li>coveringOpen<br>
- Starts opening the window cover. Moving stops if blinds are fully open or
- a coveringStop command was issued.
- </li>
- <li>coveringStop<br>
- Stop moving the window cover. Blinds are partially open (closed).
- </li>
- <br><br><b>Class CLIMATE_CONTROL_SCHEDULE</b>
- <li>ccs [mon|tue|wed|thu|fri|sat|sun] HH:MM tempDiff HH:MM tempDiff ...<br>
- set the climate control schedule for the given day.<br>
- Up to 9 pairs of HH:MM tempDiff may be specified.<br>
- HH:MM must occur in increasing order.
- tempDiff is relative to the setpoint temperature, and may be between -12
- and 12, with one decimal point, measured in Kelvin (or Centigrade).<br>
- If only a weekday is specified without any time and tempDiff, then the
- complete schedule for the specified day is removed and marked as unused.
- </li>
- <li>ccsOverride (no|temporary|permanent) (frost|energy|$tempOffset) <br>
- set the override state<br>
- no: switch the override off<br>
- temporary: override the current schedule only<br>
- permanent: override all schedules<br>
- frost/energy: set override mode to frost protection or energy saving<br>
- $tempOffset: the temperature setback (offset to setpoint) in 1/10 degrees
- range from -12.8 to 12.0, values will be limited to this range.
- </li>
- <br><br><b>Class CLOCK</b>
- <li>clock<br>
- set the clock to the current date/time (no argument required)
- </li>
- <br><br><b>Class COLOR_CONTROL</b>
- <li>rgb<br>
- Set the color of the device as a 6 digit RGB Value (RRGGBB), each color is
- specified with a value from 00 to ff.</li>
- <li>wcrgb<br>
- Used for sending warm white, cold white, red, green and blue values
- to device. Values must be decimal (0 - 255) and separated by blanks.
- <ul>
- set <name> wcrgb 0 255 0 0 0 (setting full cold white)<br>
- </ul>
- </li>
- <br><br><b>Class CONFIGURATION</b>
- <li>configByte cfgAddress 8bitValue<br>
- configWord cfgAddress 16bitValue<br>
- configLong cfgAddress 32bitValue<br>
- Send a configuration value for the parameter cfgAddress. cfgAddress and
- value are node specific.<br>
- Note: if the model is set (see MANUFACTURER_SPECIFIC get), then more
- specific config commands are available.</li>
- <li>configDefault cfgAddress<br>
- Reset the configuration parameter for the cfgAddress parameter to its
- default value. See the device documentation to determine this value.</li>
- <br><br><b>Class DOOR_LOCK, V2</b>
- <li>doorLockOperation DOOR_LOCK_MODE<br>
- Set the operation mode of the door lock.<br>
- DOOR_LOCK_MODE:<br>
- open = Door unsecured<br>
- close = Door secured<br>
- 00 = Door unsecured<br>
- 01 = Door unsecured with timeout<br>
- 10 = Door unsecured for inside door handles<br>
- 11 = Door unsecured for inside door handles with timeout<br>
- 20 = Door unsecured for outside door handles<br>
- 21 = Door unsecured for outside door handles with timeout<br>
- FF = Door secured<br>
- Note: open/close can be used as an alias for 00/FF.
- </li>
- <li>doorLockConfiguration operationType outsidehandles
- insidehandles timeoutSeconds<br>
- Set the configuration for the door lock.<br>
- operationType: [constant|timed]<br>
- outsidehandle/insidehandle: 4-bit binary field for handle 1-4,
- bit=0:handle disabled, bit=1:handle enabled, highest bit is for
- handle 4, lowest bit for handle 1. Example 0110 0001
- = outside handles 3 and 2 are active, inside handle 1 is active<br>
- timeoutSeconds: time out for timed operation (in seconds) [1-15239].
- </li>
- <br><br><b>Class INDICATOR</b>
- <li>indicatorOn<br>
- switch the indicator on</li>
- <li>indicatorOff<br>
- switch the indicator off</li>
- <li>indicatorDim value<br>
- takes values from 1 to 99.
- If the indicator does not support dimming, it is interpreted as on.</li>
- <br><br><b>Class MANUFACTURER_PROPRIETARY</b>
- <br>Fibaro FGR(M)-222 only:
- <li>positionBlinds<br>
- drive blinds to position %</li>
- <li>positionSlat<br>
- drive slat to position %</li>
- <br>D-Link DCH-Z510, Philio PSE02, Zipato Indoor Siren only:<br>
- switch alarm on with selected sound (to stop use: set <device> off)
- <li>alarmEmergencyOn</li>
- <li>alarmFireOn</li>
- <li>alarmAmbulanceOn</li>
- <li>alarmPoliceOn</li>
- <li>alarmDoorchimeOn</li>
- <li>alarmBeepOn</li>
- <br><br><b>Class METER</b>
- <li>meterReset<br>
- Reset all accumulated meter values.<br>
- Note: see meterSupported command and its output to detect if resetting the
- value is supported by the device.<br>
- The command will reset ALL accumulated values, it is not possible to
- choose a single value.</li>
- <br><br><b>Class MULTI_CHANNEL</b>
- <li>mcCreateAll<br>
- Create a FHEM device for all channels. This command is executed after
- inclusion of a new device.
- </li>
- <br><br><b>Class MULTI_CHANNEL_ASSOCIATION</b>
- <li>mcaAdd groupId node1 node2 ... 0 node1 endPoint1 node2 endPoint2 ...<br>
- Add a list of node or node:endpoint associations. The latter can be used to
- create channels on remotes. E.g. to configure the button 1,2,... on the
- zwave.me remote, use:
- <ul>
- set remote mcaAdd 2 0 1 2<br>
- set remote mcaAdd 3 0 1 3<br>
- ....
- </ul>
- For each button a separate FHEM device will be generated.
- </li>
- <li>mcaDel groupId node1 node2 ... 0 node1 endPoint1 node2 endPoint2 ...<br>
- delete node or node:endpoint associations.
- Special cases: just specifying the groupId will delete everything for this
- groupId. Specifying 0 for groupId will delete all associations.
- </li>
- <br><br><b>Class NETWORK_SCHEDULE (SCHEDULE), V1</b>
- <li>schedule ID USER_ID YEAR-MONTH-DAY WDAY ACTIVE_ID DURATION_TYPE
- HOUR:MINUTE DURATION NUM_REPORTS CMD ... CMD<br>
- Set a schedule for a user. Due to lack of documentation,
- details for some parameters are not available. Command Class is
- used together with class USER_CODE.<br>
- <ul>
- ID: id of schedule, refer to maximum number of supported schedules
- reported by the scheduleSupported command.<br>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- YEAR-MONTH-DAY: start of schedule in the format yyyy-mm-dd.<br>
- WDAY: weekday, 1=Monday, 7=Sunday.<br>
- ACTIVE_ID: unknown parameter.<br>
- DURATION_TYPE: unknown parameter.<br>
- HOUR:MINUTE: start of schedule in the format hh:mm.<br>
- DURATION: unknown parameter.<br>
- NUM_REPORTS: number of reports to follow, must be 0.<br>
- CMD: command(s) (as hexcode sequence) that the schedule executes,
- see report of scheduleSupported command for supported command
- class and mask. A list of space separated commands can be
- specified.<br>
- </ul>
- </li>
- <li>scheduleRemove ID<br>
- Remove the schedule with the id ID</li>
- <li>scheduleState ID STATE<br>
- Set the STATE of the schedule with the id ID. Description for
- parameter STATE is not available.</li>
- <br><br><b>Class NODE_NAMING</b>
- <li>name NAME<br>
- Store NAME in the EEPROM. Note: only ASCII is supported.</li>
- <li>location LOCATION<br>
- Store LOCATION in the EEPROM. Note: only ASCII is supported.</li>
- <br><br><b>Class POWERLEVEL</b>
- <li>Class is only used in an installation or test situation</li>
- <li>powerlevel level timeout/s<br>
- set powerlevel to level [0-9] for timeout/s [1-255].<br>
- level 0=normal, level 1=-1dBm, .., level 9=-9dBm.</li>
- <li>powerlevelTest nodeId level frames <br>
- send number of frames [1-65535] to nodeId with level [0-9].</li>
- <br><br><b>Class PROTECTION</b>
- <li>protectionOff<br>
- device is unprotected</li>
- <li>protectionOn<br>
- device is protected</li>
- <li>protectionSeq<br>
- device can be operated, if a certain sequence is keyed.</li>
- <li>protectionBytes LocalProtectionByte RFProtectionByte<br>
- for commandclass PROTECTION V2 - see devicemanual for supported
- protectionmodes</li>
- <br><br><b>Class SCENE_ACTIVATION</b>
- <li>sceneConfig<br>
- activate settings for a specific scene.
- Parameters are: sceneId, dimmingDuration (0..255)
- </li>
- <br><br><b>Class SCENE_ACTUATOR_CONF</b>
- <li>sceneConfig<br>
- set configuration for a specific scene.
- Parameters are: sceneId, dimmingDuration, finalValue (0..255)
- </li>
- <br><br><b>Class SCENE_CONTROLLER_CONF</b>
- <li>groupConfig<br>
- set configuration for a specific scene.
- Parameters are: groupId, sceneId, dimmingDuration.
- </li>
- <br><br><b>Class SCHEDULE_ENTRY_LOCK, V1, V2, V3</b>
- <li>scheduleEntryLockSet USER_ID ENABLED<br>
- enables or disables schedules for a specified user ID (V1)<br>
- <ul>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- ENABLED: 0=disabled, 1=enabled<br>
- </ul>
- </li>
- <li>scheduleEntryLockAllSet ENABLED<br>
- enables or disables schedules for all users (V1)<br>
- <ul>
- ENABLED: 0=disabled, 1=enabled<br>
- </ul>
- </li>
- <li>scheduleEntryLockWeekDaySet ACTION USER_ID SCHEDULE_ID WEEKDAY
- STARTTIME ENDTIME<br>
- erase or set a week day schedule for a specified user ID (V1)<br>
- <ul>
- ACTION: 0=erase schedule slot, 1=modify the schedule slot for the
- user<br>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- SCHEDULE_ID: schedule slot id (from 1 up to number of supported
- schedule slots)<br>
- WEEKDAY: day of week, choose one of:
- "sun","mon","tue","wed","thu","fri","sat"<br>
- STARTTIME: time of schedule start, in the format HH:MM
- (leading 0 is mandatory)<br>
- ENDTIME: time of schedule end in the format HH:MM
- (leading 0 is mandatory)<br>
- </ul>
- </li>
- <li>scheduleEntryLockYearDaySet ACTION USER_ID SCHEDULE_ID
- STARTDATE STARTTIME ENDDATE ENDTIME<br>
- erase or set a year day schedule for a specified user ID (V1)<br>
- <ul>
- ACTION: 0=erase schedule slot, 1=modify the schedule slot for the
- user<br>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- SCHEDULE_ID: schedule slot id (from 1 up to number of supported
- schedule slots)<br>
- STARTDATE: date of schedule start in the format YYYY-MM-DD<br>
- STARTTIME: time of schedule start in the format HH:MM
- (leading 0 is mandatory)<br>
- ENDDATE: date of schedule end in the format YYYY-MM-DD<br>
- ENDTIME: time of schedule end in the format HH:MM
- (leading 0 is mandatory)<br>
- </ul>
- </li>
- <li>scheduleEntryLockTimeOffsetSet TZO DST<br>
- set the TZO and DST (V2)<br>
- <ul>
- TZO: current local time zone offset in the format (+|-)HH:MM
- (sign and leading 0 is mandatory)<br>
- DST: daylight saving time offset in the format (+|-)[[m]m]m
- (sign is mandatory, minutes: 0 to 127, 1-3 digits)<br>
- </ul>
- </li>
- <li>scheduleEntryLockDailyRepeatingSet ACTION USER_ID SCHEDULE_ID
- WEEKDAYS STARTTIME DURATION<br>
- set a daily repeating schedule for the specified user (V3)<br>
- <ul>
- ACTION: 0=erase schedule slot, 1=modify the schedule slot for the
- user<br>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- SCHEDULE_ID: schedule slot id (from 1 up to number of supported
- schedule slots)<br>
- WEEKDAYS: concatenated string of weekdays (choose from:
- "sun","mon","tue","wed","thu","fri","sat");
- e.g. "montuewedfri" or "satsun", unused days can be
- specified as "..."<br>
- STARTTIME: time of schedule start in the format HH:MM
- (leading 0 is mandatory)<br>
- DURATION: duration of schedule in the format HH:MM
- (leading 0 is mandatory)<br>
- </ul>
- </li>
- <br><br><b>Class SWITCH_ALL</b>
- <li>swaIncludeNone<br>
- the device does not react to swaOn and swaOff commands</li>
- <li>swaIncludeOff<br>
- the device reacts to the swaOff command
- but does not react to the swaOn command</li>
- <li>swaIncludeOn<br>
- the device reacts to the swaOn command
- but does not react to the swaOff command</li>
- <li>swaIncludeOnOff<br>
- the device reacts to the swaOn and swaOff commands</li>
- <li>swaOn<br>
- sends the all on command to the device</li>
- <li>swaOff<br>
- sends the all off command to the device.</li>
- <br><br><b>Class SWITCH_BINARY</b>
- <li>on<br>
- switch the device on</li>
- <li>off<br>
- switch the device off</li>
- <br><br><b>Class SWITCH_MULTILEVEL</b>
- <li>on, off<br>
- the same as for SWITCH_BINARY.</li>
- <li>dim value<br>
- dim/jump to the requested value (0..100)</li>
- <li>dimWithDuration value duration<br>
- dim to the requested value (0..100) in duration time. If duration is
- less than 128, then it is interpreted as seconds, if it is between 128 and
- 254, then as duration-128 minutes. Note: this command works only with
- devices supporting version 2 of the SWITCH_MULTILEVEL class, which you can
- verify with get versionClassAll</li>
- <li>stop<br>
- stop dimming/operation</li>
- <br><br><b>Class THERMOSTAT_FAN_MODE</b>
- <li>fanAutoLow</li>
- <li>fanLow</li>
- <li>fanAutoMedium</li>
- <li>fanMedium</li>
- <li>fanAutoHigh</li>
- <li>fanHigh<br>
- set the fan mode.</li>
- <br><br><b>Class THERMOSTAT_MODE</b>
- <li>tmOff</li>
- <li>tmHeating</li>
- <li>tmCooling</li>
- <li>tmAuto</li>
- <li>tmFan</li>
- <li>V2:</li>
- <li>tmEnergySaveHeating</li>
- <li>V3:</li>
- <li>tmFullPower</li>
- <li>tmManual<br>
- set the thermostat mode.</li>
- <br><br><b>Class THERMOSTAT_SETPOINT</b>
- <li>setpointHeating value<br>
- set the thermostat to heat to the given value.
- The value is an integer and read as celsius.<br>
- See thermostatSetpointSet for a more enhanced method.
- </li>
- <li>setpointCooling value<br>
- set the thermostat to cool down to the given value.
- The value is an integer and read as celsius.<br>
- See thermostatSetpointSet for a more enhanced method.
- </li>
- <li>thermostatSetpointSet TEMP [SCALE [TYPE [PREC [SIZE]]]]<br>
- set the setpoint of the thermostat to the given value.<br>
- <ul>
- TEMP: setpoint temperature value, by default the value is used
- with 1 decimal, see PREC<br>
- SCALE: (optional) scale of temperature; [cC]=celsius,
- [fF]=fahrenheit, defaults to celsius<br>
- TYPE: (optional) setpoint type; [1, 15], defaults to 1=heating<br>
- <ul>
- 1=heating,
- 2=cooling,
- 7=furnance,
- 8=dryAir,
- 9=moistAir,
- 10=autoChangeover,
- 11=energySaveHeating,
- 12=energySaveCooling,
- 13=awayHeating,
- 14=awayCooling,
- 15=fullPower
- </ul>
- PREC: (optional) number of decimals to be used, [1-7], defaults
- to 1<br>
- SIZE: (optional) number of bytes used, [1, 2, 4], defaults to 2<br>
- Note: optional parameters can be ommitted and are used with there
- default values. If you need or want to specify an optional
- parameter, ALL parameters in front of this parameter need
- to be also specified!<br>
- Note: the number of decimals (defined by PREC) and the number of
- bytes (defined by SIZE) used for the setpoint influence the usable
- range for the temperature. Some device do not support all possible
- values/combinations for PREC/SIZE.<br>
- <ul>
- 1 byte: 0 decimals [-128, 127], 1 decimal [-12.8, 12.7], ...<br>
- 2 byte: 0 decimals [-32768, 32767], 1 decimal [-3276.8, 3276.7],
- ...<br>
- 4 byte: 0 decimals [-2147483648, 2147483647], ...<br>
- </ul>
- </ul>
- </li>
- <li>desired-temp value<br>
- same as thermostatSetpoint, used to make life easier for helper-modules
- </li>
- <br><br><b>Class TIME, V2</b>
- <li>timeOffset TZO DST_Offset DST_START DST_END<br>
- Set the time offset for the internal clock of the device.<br>
- TZO: Offset of time zone to UTC in format [+|-]hh:mm.<br>
- DST_OFFSET: Offset for daylight saving time (DST) in minutes
- in the format [+|-]mm.<br>
- DST_START / DST_END: Start and end of daylight saving time in the
- format MM-DD_HH:00.<br>
- Note: Sign for both offsets must be specified!<br>
- Note: Minutes for DST_START and DST_END must be specified as "00"!
- </li>
- <br><br><b>Class TIME_PARAMETERS, V1</b>
- <li>timeParametersGet<br>
- The device request time parameters. Right now the user should define a
- notify with a "set timeParameters" command.
- </li>
- <li>timeParameters DATE TIME<br>
- Set the time (UTC) to the internal clock of the device.<br>
- DATE: Date in format YYYY-MM-DD.<br>
- TIME: Time (UTC) in the format hh:mm:ss.<br>
- Note: Time zone offset to UTC must be set with command class TIME.
- </li>
- <br><br><b>Class USER_CODE</b>
- <li>userCode id status code</br>
- set code and status for the id n. n ist starting at 1, status is 0 for
- available (deleted) and 1 for set (occupied). code is a hexadecimal string.
- </li>
- <br><br><b>Class WAKE_UP</b>
- <li>wakeupInterval value nodeId<br>
- Set the wakeup interval of battery operated devices to the given value in
- seconds. Upon wakeup the device sends a wakeup notification to nodeId.</li>
- <li>wakeupNoMoreInformation<br>
- put a battery driven device into sleep mode. </li>
- </ul>
- <br>
- <a name="ZWaveget"></a>
- <b>Get</b>
- <ul>
- <br><br><b>All</b>
- <li>neighborList<br>
- returns the list of neighbors. Provides insights to actual network
- topology. List includes dead links and non-routing neighbors.
- Since this information is stored in the dongle, the information will be
- returned directly even for WAKE_UP devices.</li>
- <br><br><b>Class ALARM</b>
- <li>alarm <alarmId><br>
- return the value for the (decimal) alarmId. The value is device
- specific. This command is specified in version 1 and should only
- be used with old devices that only support version 1.</li>
- <li>alarmWithType <alarmType><br>
- return the event for the specified alarm type. This command is
- specified in version 2.
- </li>
- <li>alarmWithTypeEvent <alarmType> <eventnumber><br>
- return the event details for the specified alarm type and
- eventnumber. This command is specified in version 3. The eventnumber
- is specific for each alarm type, a list of the supported
- eventnumbers can be obtained by the "alarmEventSupported" command,
- refer also to the documentation of the device.
- </li>
- <li>alarmTypeSupported<br>
- Returns a list of the supported alarm types of the device which are
- used as parameters in the "alarmWithType" and "alarmWithTypeEvent"
- commands. This command is specified in version 2.</li>
- <li>alarmEventSupported <alarmType><br>
- Returns a list of the supported events for the specified alarm type.
- The number of the events can be used as parameter in the
- "alarmWithTypeEvent" command. This command is specified in
- version 3.</li>
- <br><br><b>Class ASSOCIATION</b>
- <li>association groupId<br>
- return the list of nodeIds in the association group groupId in the form:<br>
- assocGroup_X:Max Y, Nodes id,id...
- </li>
- <li>associationGroups<br>
- return the number of association groups<br>
- </li>
- <li>associationAll<br>
- request association info for all possible groups.</li>
- <br><br><b>Class ASSOCIATION_GRP_INFO</b>
- <li>associationGroupName groupId<br>
- return the name of association groups
- </li>
- <li>associationGroupCmdList groupId<br>
- return Command Classes and Commands that will be sent to associated
- devices in this group<br>
- </li>
- <br><br><b>Class BARRIER_OPERATOR</b>
- <li>barrierState<br>
- request state of the barrier.
- </li>
- <br><br><b>Class BASIC</b>
- <li>basicStatus<br>
- return the status of the node as basicReport:XY. The value (XY) depends on
- the node, e.g. a SWITCH_BINARY device reports 00 for off and FF (255) for on.
- Devices with version 2 (or greater) can return two additional values, the
- 'target value' and 'duration'. The 'duration' is reported in seconds,
- as "unknown duration" (value 0xFE = 253) or as "255 (reserved value)"
- (value 0xFF = 255).
- </li>
- <br><br><b>Class BATTERY</b>
- <li>battery<br>
- return the charge of the battery in %, as battery:value % or battery:low
- </li>
- <br><br><b>CLASS DOOR_LOCK_LOGGING, V1 (deprecated)</b>
- <li>doorLockLoggingRecordsSupported<br>
- Gives back the number of records that can be stored by the device.
- </li>
- <li>doorLockLoggingRecord n<br>
- Requests and reports the logging record number n.<br>
- You will get a reading with the requested record number, the record status,
- the event type, user identifier, user's code length and the timestamp of
- the event in the form of yyyy-mm-dd hh:mm:ss. Although the request does
- report the user code, the user typed in, it is dropped for security
- reasons, so it does not get logged in clear text.<br>
- If the report could not get parsed correctly, it does report the raw
- message.<br>
- The event types can be looked up in the "Software Design Specification -
- Z-Wave Application Command Class Specification" at page 150 from SIGMA
- DESIGNS in the version of 2017-07-10.</li>
- <br><br><b>Class CLIMATE_CONTROL_SCHEDULE</b>
- <li>ccsOverride<br>
- request the climate control schedule override report
- </li>
- <li>ccs [mon|tue|wed|thu|fri|sat|sun]<br>
- request the climate control schedule for the given day.
- </li>
- <li>ccsAll<br>
- request the climate control schedule for all days. (runs in background)
- </li>
- <br><br><b>Class CLOCK</b>
- <li>clock<br>
- request the clock data
- </li>
- <br><br><b>Class COLOR_CONTROL</b>
- <li>ccCapability<br>
- return capabilities.</li>
- <li>ccStatus channelId<br>
- return status of channel ChannelId.
- </li>
- <br><br><b>Class CONFIGURATION</b>
- <li>config cfgAddress<br>
- return the value of the configuration parameter cfgAddress. The value is
- device specific.<br>
- Note: if the model is set (see MANUFACTURER_SPECIFIC get), then more
- specific config commands are available.
- </li>
- <li>configAll<br>
- If the model of a device is set, and configuration descriptions are
- available from the database for this device, then request the value of all
- known configuration parameters.</li>
- <br><br><b>Class DOOR_LOCK, V2</b>
- <li>doorLockConfiguration<br>
- Request the configuration report from the door lock.
- </li>
- <li>doorLockOperation<br>
- Request the operconfiguration report from the door lock.
- </li>
- <br><br><b>Class HRV_STATUS</b>
- <li>hrvStatus<br>
- report the current status (temperature, etc.)
- </li>
- <li>hrvStatusSupported<br>
- report the supported status fields as a bitfield.
- </li>
- <br><br><b>Class INDICATOR</b>
- <li>indicatorStatus<br>
- return the indicator status of the node, as indState:on, indState:off or
- indState:dim value.
- </li>
- <br><br><b>Class MANUFACTURER_PROPRIETARY</b>
- <li>position<br>
- Fibaro FGRM-222 only: return the blinds position and slat angle.
- </li>
- <br><br><b>Class MANUFACTURER_SPECIFIC</b>
- <li>model<br>
- return the manufacturer specific id (16bit),
- the product type (16bit)
- and the product specific id (16bit).<br>
- Note: if the openzwave xml files are installed, then return the name of the
- manufacturer and of the product. This call is also necessary to decode more
- model specific configuration commands and parameters.
- </li>
- <br><br><b>Class METER</b>
- <li>meter scale<br>
- return the meter report for the requested scale.<br>
- Note: protocol V1 does not support the scale parameter, the parameter
- will be ignored and the default scale will be returned.<br>
- For protocol V2 and higher, scale is supported and depends on the
- type of the meter (energy, gas or water).<br>
- The device may not support all scales, see the meterSupported
- command and its output. If the scale parameter is omitted, the
- default unit will be reported.<br>
- Example: For an electric meter, meter 0 will report energy in kWh,
- meter 2 will report power in W and meter 6 will report current in A
- (if these scales are supported).<br>
- </li>
- <li>meterSupported<br>
- request the type of the meter, the supported scales and the
- capability to reset the accumulated value.<br>
- Note: The output contains the decimal numbers of the supported
- scales that can be used as parameter for the meter command.
- </li>
- <br><br><b>Class MULTI_CHANNEL</b>
- <li>mcEndpoints<br>
- return the list of endpoints available, e.g.:<br>
- mcEndpoints: total 2, identical
- </li>
- <li>mcCapability chid<br>
- return the classes supported by the endpoint/channel chid. If the channel
- does not exist, create a FHEM node for it. Example:<br>
- mcCapability_02:SWITCH_BINARY<br>
- <b>Note:</b> This is the best way to create the secondary nodes of a
- MULTI_CHANNEL device. The device is only created for channel 2 or greater.
- </li>
- <br><br><b>Class MULTI_CHANNEL_ASSOCIATION</b>
- <li>mca groupid<br>
- return the associations for the groupid. for the syntax of the returned
- data see the mcaAdd command above.</li>
- <li>mcaAll<br>
- request association info for all possible groupids.
- </li>
- <br><br><b>Class NETWORK_SCHEDULE (SCHEDULE), V1</b>
- <li>scheduleSupported<br>
- Request the supported features, e.g. number of supported schedules.
- Due to the lack of documentation, details for some fields in the
- report are not available.</li>
- <li>schedule ID<br>
- Request the details for the schedule with the id ID. Due to the
- lack of documentation, details for some fields in the report are
- not available.</li>
- <li>scheduleState<br>
- Request the details for the schedule state. Due to the lack of
- documentation, details for some fields in the report are not
- available.</li>
- <br><br><b>Class NODE_NAMING</b>
- <li>name<br>
- Get the name from the EEPROM. Note: only ASCII is supported.</li>
- <li>location<br>
- Get the location from the EEPROM. Note: only ASCII is supported.</li>
- <br><br><b>Class POWERLEVEL</b>
- <li>powerlevel<br>
- Get the current powerlevel and remaining time in this level.</li>
- <li>powerlevelTest<br>
- Get the result of last powerlevelTest.</li>
- <br><br><b>Class PROTECTION</b>
- <li>protection<br>
- returns the protection state. It can be on, off or seq.</li>
- <br><br><b>Class SCENE_ACTUATOR_CONF</b>
- <li>sceneConfig<br>
- returns the settings for a given scene. Parameter is sceneId
- </li>
- <br><br><b>Class SCENE_CONTROLLER_CONF</b>
- <li>groupConfig<br>
- returns the settings for a given group. Parameter is groupId
- </li>
- <br><br><b>Class SCHEDULE_ENTRY_LOCK, V1, V2, V3</b>
- <li>scheduleEntryLockTypeSupported<br>
- returns the number of available slots for week day and year day
- schedules (V1), in V3 the number of available slots for the daily
- repeating schedule is reported additionally
- </li>
- <li>scheduleEntryLockWeekDay USER_ID SCHEDULE_ID<br>
- returns the specified week day schedule for the specified user
- (day of week, start time, end time) (V1)<br>
- <ul>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- SCHEDULE_ID: schedule slot id (from 1 up to number of supported
- schedule slots)<br>
- </ul>
- </li>
- <li>scheduleEntryLockYearDay USER_ID SCHEDULE_ID<br>
- returns the specified year day schedule for the specified user
- (start date, start time, end date, end time) (V1)<br>
- <ul>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- SCHEDULE_ID: schedule slot id (from 1 up to number of supported
- schedule slots)<br>
- </ul>
- </li>
- <li>scheduleEntryLockDailyRepeating USER_ID SCHEDULE_ID<br>
- returns the specified daily schedule for the specified user
- (weekdays, start date, duration) (V3)<br>
- <ul>
- USER_ID: id of user, starting from 1 up to the number of supported
- users, refer also to the USER_CODE class description.<br>
- SCHEDULE_ID: schedule slot id (from 1 up to number of supported
- schedule slots)<br>
- </ul>
- </li>
- <li>scheduleEntryLockTimeOffset<br>
- returns the time zone offset TZO and the daylight saving time
- offset (V2)
- </li>
- <br><br><b>Class SECURITY</b>
- <li>secSupportedReport<br>
- (internaly used to) request the command classes that are supported
- with SECURITY
- </li>
- <li>Notes:<br>
- This class needs the installation of the perl module Crypt::Rijndael and
- a defined networkkey in the attributes of the ZWDongle device<br>
- Currently a secure inclusion can only be started from the command input
- with "set <ZWDongle_device_name> addNode [onSec|onNwSec]"<br>
- These commands are only described here for completeness of the
- documentation, but are not intended for manual usage. These commands
- will be removed from the interface in future version.</li>
- <br><br><b>Class SENSOR_ALARM</b>
- <li>alarm alarmType<br>
- return the nodes alarm status of the requested alarmType. 00 = GENERIC,
- 01 = SMOKE, 02 = CO, 03 = CO2, 04 = HEAT, 05 = WATER, 255 = returns the
- nodes first supported alarm type.
- </li>
- <br><br><b>Class SENSOR_BINARY</b>
- <li>sbStatus<br>
- return the status of the node.
- </li>
- <br><br><b>Class SENSOR_MULTILEVEL</b>
- <li>smStatus<br>
- request data from the node (temperature/humidity/etc)
- </li>
- <br><br><b>Class SWITCH_ALL</b>
- <li>swaInclude<br>
- return the switch-all mode of the node.
- </li>
- <br><br><b>Class SWITCH_BINARY</b>
- <li>swbStatus<br>
- return the status of the node, as state:on or state:off.
- </li>
- <br><br><b>Class SWITCH_MULTILEVEL</b>
- <li>swmStatus<br>
- return the status of the node, as state:on, state:off or state:dim value.
- </li>
- <br><br><b>Class THERMOSTAT_FAN_MODE</b>
- <li>fanMode<br>
- request the mode
- </li>
- <br><br><b>Class THERMOSTAT_FAN_STATE</b>
- <li>fanMode<br>
- request the state
- </li>
- <br><br><b>Class THERMOSTAT_MODE</b>
- <li>thermostatMode<br>
- request the mode
- </li>
-
- <br><br><b>Class THERMOSTAT_OPERATING_STATE</b>
- <li>thermostatOperatingState<br>
- request the operating state
- </li>
- <br><br><b>Class THERMOSTAT_SETPOINT</b>
- <li>setpoint [TYPE]<br>
- request the setpoint<br>
- TYPE: (optional) setpoint type; [1, 15], defaults to 1=heating<br>
- <ul>
- 1=heating,
- 2=cooling,
- 7=furnance,
- 8=dryAir,
- 9=moistAir,
- 10=autoChangeover,
- 11=energySaveHeating,
- 12=energySaveCooling,
- 13=awayHeating,
- 14=awayCooling,
- 15=fullPower
- </ul>
- </li>
- <li>thermostatSetpointSupported<br>
- requests the list of supported setpoint types
- </li>
- <br><br><b>Class TIME, V2</b>
- <li>time<br>
- Request the (local) time from the internal clock of the device.
- </li>
- <li>date<br>
- Request the (local) date from the internal clock of the device.
- </li>
- <li>timeOffset<br>
- Request the report for the time offset and DST settings from the
- internal clock of the device.
- </li>
- <br><br><b>Class TIME_PARAMETERS, V1</b>
- <li>time<br>
- Request the date and time (UTC) from the internal clock of the device.
- </li>
- <br><br><b>Class USER_CODE</b>
- <li>userCode n</br>
- request status and code for the id n
- </li>
- <br><br><b>Class VERSION</b>
- <li>version<br>
- return the version information of this node in the form:<br>
- Lib A Prot x.y App a.b
- </li>
- <li>versionClass classId or className<br>
- return the supported command version for the requested class
- </li>
- <li>versionClassAll<br>
- executes "get devicename versionClass class" for each class from the
- classes attribute in the background without generating events, and sets the
- vclasses attribute at the end.
- </li>
- <br><br><b>Class WAKE_UP</b>
- <li>wakeupInterval<br>
- return the wakeup interval in seconds, in the form<br>
- wakeupReport:interval seconds target id
- </li>
- <li>wakeupIntervalCapabilities (V2 only)<br>
- return the wake up interval capabilities in seconds, in the form<br>
- wakeupIntervalCapabilitiesReport:min seconds max seconds default seconds
- step seconds
- </li>
- <br><br><b>Class ZWAVEPLUS_INFO</b>
- <li>zwavePlusInfo<br>
- request the zwavePlusInfo
- </li>
- </ul>
- <br>
- <a name="ZWaveattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#IODev">IODev</a></li>
- <li><a name="WNMI_delay">WNMI_delay</a><br>
- This attribute sets the time delay between the last message sent to an
- WakeUp device and the sending of the WNMI Message
- (WakeUpNoMoreInformation) that will set the device to sleep mode. Value
- is in seconds, subseconds my be specified. Values outside of 0.2-5.0 are
- probably harmful.
- </li>
- <li><a name="classes">classes</a><br>
- This attribute is needed by the ZWave module, as the list of the possible
- set/get commands depends on it. It contains a space separated list of
- class names (capital letters).
- </li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a href="#dummy">dummy</a></li>
- <li><a href="#do_not_notify">do_not_notify</a></li>
- <li><a href="#dummy">dummy</a></li>
- <li><a name="eventForRaw">eventForRaw</a><br>
- Generate an an additional event for the RAW message. Can be used if
- someone fears that critical notifies won't work, if FHEM changes the event
- text after an update. </li>
- <li><a name="extendedAlarmReadings">extendedAlarmReadings</a><br>
- Some devices support more than one alarm type, this attribute
- selects which type of reading is used for the reports of the ALARM
- (or NOTIFICATION) class:<br>
- A value of "0" selects a combined, single reading ("alarm") for
- all alarm types of the device. Subsequent reports of different
- alarm types will overwrite each other. This is the default setting
- and the former behavior.<br>
- A value of "1" selects separate alarm readings for each alarm type
- of the device. The readings are named "alarm_<alarmtype>.
- This can also be selected if only one alarmtype is supported by
- the device. This reading also contains the status of the
- alarm notification. For compatibility reasons this is currently
- not supported with the combined reading.<br>
- A value of "2" selects both of the above and creates the combined and
- the seperate readings at the same time, this should only be used
- if really needed as duplicate events are generated.
- </li>
- <li><a href="#ignore">ignore</a></li>
- <li><a name="ignoreDupMsg">ignoreDupMsg</a><br>
- Experimental: if set (to 1), ignore duplicate wakeup messages, or
- multiple responses to a single get due to missing lowlevel ACK.
- </li>
- <li><a href="#neighborListPos">neighborListPos</a></li>
- <li><a name="noExplorerFrames">noExplorerFrames</a><br>
- turn off the use of Explorer Frames
- </li>
- <li><a name="noWakeupForApplicationUpdate">noWakeupForApplicationUpdate</a>
- <br>
- some devices (notable the Aeotec Multisensor 6) are only awake after an
- APPLICATION UPDATE telegram for a very short time. If this attribute is
- set (recommended for the Aeotec Multisensor 6), the WakeUp-Stack is not
- processed after receiving such a message.
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li><a name="secure_classes">secure_classes</a><br>
- This attribute is the result of the "set DEVICE secSupportedReport"
- command. It contains a space seperated list of the the command classes
- that are supported with SECURITY.
- </li>
- <li><a href="#showtime">showtime</a></li>
- <li><a name="vclasses">vclasses</a><br>
- This is the result of the "get DEVICE versionClassAll" command, and
- contains the version information for each of the supported classes.
- </li>
- <li><a name="useCRC16">useCRC16</a><br>
- Experimental: if a device supports CRC_16_ENCAP, then add CRC16 to the
- command. Note: this is not available to SECURITY ENABLED devices, as
- security has its own CRC.
- </li>
- <li><a name="useMultiCmd">useMultiCmd</a><br>
- Experimental: if a device supports MULTI_CMD and WAKE_UP, then pack
- multiple get messages on the SendStack into a single MULTI_CMD to save
- radio transmissions.
- </li>
- <li><a name="zwaveRoute">zwaveRoute</a><br>
- space separated list of (ZWave) device names. They will be used in the
- given order to route messages from the controller to this device. Specify
- them in the order from the controller to the device. Do not specify the
- controller and the device itself, only the routers inbetween. Used only
- if the IODev is a ZWCUL device. </li>
- </ul>
- <br>
- <a name="ZWaveevents"></a>
- <b>Generated events:</b>
- <ul>
- <br><b>neighborUpdate</b>
- <li>ZW_REQUEST_NODE_NEIGHBOR_UPDATE [started|done|failed]</li>
- <br><b>returnRouteAdd</b>
- <li>ZW_ASSIGN_RETURN_ROUTE [started|alreadyActive|transmitOk|
- transmitNoAck|transmitFail|transmitNotIdle|
- transmitNoRoute]</li>
- <br><b>returnRouteDel</b>
- <li>ZW_DELETE_RETURN_ROUTE [started|alreadyActive|transmitOk|
- transmitNoAck|transmitFail|transmitNotIdle|
- transmitNoRoute]</li>
- <br><b>sucRouteAdd</b>
- <li>ZW_ASSIGN_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
- transmitNoAck|transmitFail|transmitNotIdle|
- transmitNoRoute]</li>
- <br><b>sucRouteDel</b>
- <li>ZW_DELETE_SUC_RETURN_ROUTE [started|alreadyActive|transmitOk|
- transmitNoAck|transmitFail|transmitNotIdle|
- transmitNoRoute]</li>
- <br><b>Class ALARM</b>
- <li>Note:<br>
- Depending on the setting of the attribute "extendedAlarmReadings"
- the generated events differ slightly. With a value of "0" or "2" a
- combined reading for all alarm types of the device with the name
- "alarm" will be used. With a value of "1" or "2" separate readings
- for each supported alarm type will be generated with names
- "alarm_<alarmType>.</li>
- <li>Devices with class version 1 support: alarm_type_X:level Y</li>
- <li>For higher class versions more detailed events with 100+ different
- strings in the form alarm:<string>
- (or alarm_<alarmType>:<string>) are generated.<br>
- For the combined reading, the name of the alarm type is part of
- the reading event, for separate readings it is part of the
- reading name.<br>
- If a cleared event can be identified, the string "Event cleared:"
- is reported before the event details.<br>
- The seperate readings also contain the status of the
- alarm / notification. For compatibility reasons this is currently
- not supported with the combined reading. </li>
- <br><b>Class APPLICATION_STATUS</b>
- <li>applicationStatus: [cmdRejected]</li>
- <li>applicationBusy: [tryAgainLater|tryAgainInWaitTimeSeconds|
- RequestQueued|unknownStatusCode] $waitTime</li>
- <br><br><b>Class ASSOCIATION</b>
- <li>assocGroup_X:Max Y Nodes A,B,...</li>
- <li>assocGroups:X</li>
- <br><br><b>Class ASSOCIATION_GRP_INFO</b>
- <li>assocGroupName_X:name</li>
- <li>assocGroupCmdList_X:Class1:Cmd1 Class2:Cmd ...</li>
- <br><br><b>Class BARRIER_OPERATOR</b>
- <li>barrierState:[ closed | [%] | closing | stopped | opening | open ]</li>
- <br><br><b>Class BASIC</b>
- <li>basicReport:X (for version 1), basicReport:X target y duration z
- (for version 2 or greater)</li>
- <li>basicGet:request</li>
- <li>basicSet:X</li>
- <br><br><b>Class BASIC_WINDOW_COVERING</b>
- <li>covering:[open|close|stop]</li>
- <br><br><b>Class BATTERY</b>
- <li>battery:chargelevel %</li>
- <br><br><b>Class CENTRAL_SCENE</b>
- <li>cSceneSet:X</li>
- <li>cSceneDim:X</li>
- <li>cSceneDimEnd:X</li>
- <li>cSceneDouble:X</li>
- <li>cSceneMultiple_N:X<br>where N is 3, 4 or 5 (multiple presses)</li>
- <br><br><b>Class CLIMATE_CONTROL_SCHEDULE</b>
- <li>ccsOverride:[no|temporary|permanent],
- [frost protection|energy saving|unused]</li>
- <li>ccsChanged:<number></li>
- <li>ccs_[mon|tue|wed|thu|fri|sat|sun]:HH:MM temp HH:MM temp...</li>
- <br><br><b>Class CLOCK</b>
- <li>clock:get</li>
- <li>clock:[mon|tue|wed|thu|fri|sat|sun] HH:MM</li>
- <br><br><b>Class COLOR_CONTROL</b>
- <li>ccCapability:XY</li>
- <li>ccStatus_X:Y</li>
- <br><br><b>Class CONFIGURATION</b>
- <li>config_X:Y<br>
- Note: if the model is set (see MANUFACTURER_SPECIFIC get), then more
- specific config messages are available.</li>
- <br><br><b>Class DEVICE_RESET_LOCALLY</b>
- <li>deviceResetLocally:yes<br></li>
- <br><br><b>Class DOOR_LOCK, V2</b>
- <li>doorLockConfiguration: mode: [constant|timed] outsideHandles:
- $outside_mode(4 bit field) insideHandles: $inside_mode(4 bit field)
- timeoutSeconds: [not_supported|$seconds]</li>
- <li>doorLockOperation: mode: $mode outsideHandles:
- $outside_mode(4 bit field) insideHandles: $inside_mode(4 bit field)
- door: [open|closed] bolt: [locked|unlocked] latch: [open|closed]
- timeoutSeconds: [not_supported|$time]<br>
- $mode = [unsecured|unsecured_withTimeout|unsecured_inside|
- unsecured_inside_withTimeout|unsecured_outside|
- unsecured_outside_withTimeout|secured</li>
- <br><br><b>Class HAIL</b>
- <li>hail:01<br></li>
- <br><br><b>Class HRV_STATUS</b>
- <li>outdoorTemperature: %0.1f C</li>
- <li>supplyAirTemperature: %0.1f C</li>
- <li>exhaustAirTemperature: %0.1f C</li>
- <li>dischargeAirTemperature: %0.1f C</li>
- <li>indoorTemperature: %0.1f C</li>
- <li>indoorHumidity: %s %</li>
- <li>remainingFilterLife: %s %</li>
- <li>supportedStatus: <list of supported stati></li>
- <br><br><b>Class INDICATOR</b>
- <li>indState:[on|off|dim value]</li>
- <br><br><b>Class MANUFACTURER_PROPRIETARY</b>
- <li>Fibaro FGRM-222 with ReportsType Fibar CC only:</li>
- <li>position:Blind [%] Slat [%]<br>
- (VenetianBlindMode)</li>
- <li>position:[%]<br>
- (RollerBlindMode)</li>
- <br><br><b>Class MANUFACTURER_SPECIFIC</b>
- <li>modelId:hexValue hexValue hexValue</li>
- <li>model:manufacturerName productName</li>
- <li>modelConfig:configLocation</li>
- <br><br><b>Class METER</b>
- <li>energy:val [kWh|kVAh|pulseCount|powerFactor]</li>
- <li>gas:val [m3|feet3|pulseCount]</li>
- <li>water:val [m3|feet3|USgallons|pulseCount]</li>
- <li>power:val W</li>
- <li>voltage:val V</li>
- <li>current:val A</li>
- <li>meterSupported:type:[meter_type] scales:[list of supported scales]
- resetable:[yes|no]</li>
- <br><br><b>Class MULTI_CHANNEL</b>
- <li>endpoints:total X $dynamic $identical</li>
- <li>mcCapability_X:class1 class2 ...</li>
- <br><br><b>Class NETWORK_SCHEDULE (SCHEDULE), V1</b>
- <li>schedule_<id>: ID: $schedule_id userID: $user_id sYear:
- $starting_year sMonth: $starting_month activeID: $active_id
- sDay: $starting_day sWeekDay: $starting_weekday sHour:
- $starting_hour durationType: $duration_type sMinute:
- $starting_minute duration: $duration numReportsToFollow:
- $number_of_reports_to_follow numCmds: $number_of_commands
- cmdLen: $length_of_command cmd: $commandsequence(hex)</li>
- <li>scheduleSupported: num: $number_of_supported_schedules
- startTimeSupport: $start_time_support(6 bit field) fallbackSupport:
- $fallback_support enableDisableSupport: $ena_dis_support
- numCCs: $number_of_supported_command_classes
- overrideTypes: $override_types(7 bit field) overrideSupport:
- $override_support</li>
- <li>scheduleSupportedCC: CC_<x>: $number_of_command_class
- CCname_<x>: $name_of_command_class]CCmask_<x>:
- $mask_for_command(2 bit)</li>
- <br><br><b>Class NODE_NAMING</b>
- <li>name:NAME</li>
- <li>location:LOCATION</li>
- <br><br><b>Class POWERLEVEL</b>
- <li>powerlvl:current x remain y<br>
- NOTE: "current 0 remain 0" means normal mode without timeout</li>
- <li>powerlvlTest:node x status y frameAck z<br>
- NOTE: status 0=failed, 1=success (at least one ACK), 2=in progress</li>
- <br><br><b>Class PROTECTION</b>
- <li>protection:[on|off|seq]</li>
- <br><br><b>Class SCENE_ACTIVATION</b>
- <li>scene_Id:level finalValue</li>
- <br><br><b>Class SCENE_ACTUATOR_CONF</b>
- <li>scene_Id:level dimmingDuration finalValue</li>
- <br><br><b>Class SCENE_CONTROLLER_CONF</b>
- <li>group_Id:scene dimmingDuration</li>
- <br><br><b>Class SCHEDULE_ENTRY_LOCK</b>
- <li>scheduleEntryLockEntryTypeSupported:WeekDaySlots: $value
- YearDaySlots: $value</li>
- <li>weekDaySchedule_$userId:userID: $value slotID: $value $weekday
- $starthour:$startminute $endhour:$endminute</li>
- <li>yearDaySchedule_$userId:userID: $value slotID: $value
- start: $year-$month-$day $hour:$minute
- end: $year-$month-$day $hour:$minute</li>
- <li>scheduleEntryLockDailyRepeating_$userId:userID: $value $weekdays
- $hour:$minute $durationhour:$durationminute<br>
- Note: $weekdays is a concatenated string with weekdaynames
- ("sun","mon","tue","wed","thu","fri","sat") where inactive
- weekdays are represented by "...", e.g. montue...wedfri</li>
- <li>scheduleEntryLockTimeOffset:TZO: $sign$hour:$minute DST:
- $sign$minutes</li>
- <br><br><b>Class SECURITY</b>
- <li>none<br>
- Note: the class security should work transparent to the sytem and is not
- intended to generate events</li>
- <br><br><b>Class SENSOR_ALARM</b>
- <li>alarm_type_X:level Y node $nodeID seconds $seconds</li>
- <br><br><b>Class SENSOR_BINARY</b>
- <li>SENSORY_BINARY V1:</li>
- <li>state:open</li>
- <li>state:closed</li>
- <li>SENSORY_BINARY V2:</li>
- <li>unknown:[off|on]</li>
- <li>generalPurpose:[off|on]</li>
- <li>smoke:[off|on]</li>
- <li>CO:[off|on]</li>
- <li>CO2:[off|on]</li>
- <li>heat:[off|on]</li>
- <li>water:[off|on]</li>
- <li>freeze:[off|on]</li>
- <li>tamper:[off|on]</li>
- <li>aux:[off|on]</li>
- <li>doorWindow:[off|on]</li>
- <li>tilt:[off|on]</li>
- <li>motion:[off|on]</li>
- <li>glassBreak:[off|on]</li>
- <br><br><b>Class SENSOR_MULTILEVEL</b>
- <li>temperature $val [C|F]</li>
- <li>generalPurpose $val %</li>
- <li>luminance $val [%|Lux]</li>
- <li>power $val [W|Btu/h]</li>
- <li>humidity $val %</li>
- <li>velocity $val [m/s|mph]</li>
- <li>direction $val</li>
- <li>atmosphericPressure $val [kPa|inchHg]</li>
- <li>barometricPressure $val [kPa|inchHg]</li>
- <li>solarRadiation $val W/m2</li>
- <li>dewpoint $val [C|F]</li>
- <li>rain $val [mm/h|in/h]</li>
- <li>tideLevel $val [m|feet]</li>
- <li>weight $val [kg|pound]</li>
- <li>voltage $val [V|mV]</li>
- <li>current $val [A|mA]</li>
- <li>CO2-level $val ppm</li>
- <li>airFlow $val [m3/h|cfm]</li>
- <li>tankCapacity $val [l|cbm|usgal]</li>
- <li>distance $val [m|cm|feet]</li>
- <li>anglePosition $val [%|relN|relS]</li>
- <li>rotation $val [rpm|Hz]</li>
- <li>waterTemperature $val [C|F]</li>
- <li>soilTemperature $val [C|F]</li>
- <li>seismicIntensity $val [mercalli|EU macroseismic|liedu|shindo]</li>
- <li>seismicMagnitude $val [local|moment|surface wave|body wave]</li>
- <li>ultraviolet $val [UV]</li>
- <li>electricalResistivity $val [ohm]</li>
- <li>electricalConductivity $val [siemens/m]</li>
- <li>loudness $val [dB|dBA]</li>
- <li>moisture $val [%|content|k ohms|water activity]</li>
- <li>frequency $val [Hz|kHz]</li>
- <li>time $val [seconds]</li>
- <li>targetTemperature $val [C|F]</li>
- <li>particulateMatter $val [mol/m3|micro-g/m3]</li>
- <li>formaldehydeLevel $val [mol/m3]</li>
- <li>radonConcentration $val [bq/m3|pCi/L]</li>
- <li>methaneDensity $val [mol/m3]</li>
- <li>volatileOrganicCompound $val [mol/m3]</li>
- <li>carbonMonoxide $val [mol/m3]</li>
- <li>soilHumidity $val [%]</li>
- <li>soilReactivity $val [pH]</li>
- <li>soilSalinity $val [mol/m3]</li>
- <li>heartRate $val [Bpm]</li>
- <li>bloodPressure $val [Systolic mmHg|Diastolic mmHg]</li>
- <li>muscleMass $val [Kg]</li>
- <li>fatMass $val [Kg]</li>
- <li>boneMass $val [Kg]</li>
- <li>totalBodyWater $val [Kg]</li>
- <li>basicMetabolicRate $val [J]</li>
- <li>bodyMassIndex $val [BMI]</li>
- <br><br><b>Class SWITCH_ALL</b>
- <li>swa:[ none | on | off | on off ]</li>
- <br><br><b>Class SWITCH_BINARY</b>
- <li>state:on</li>
- <li>state:off</li>
- <li>state:setOn</li>
- <li>state:setOff</li>
- <br><br><b>Class SWITCH_MULTILEVEL</b>
- <li>state:on</li>
- <li>state:off</li>
- <li>state:setOn</li>
- <li>state:setOff</li>
- <li>state:dim value</li>
- <li>state:swmBeginUp</li>
- <li>state:swmBeginDown</li>
- <li>state:swm [ Decrement | Increment ] [ Up | Down ]
- Start: $sl Duration: $dur Step: $step</li>
- <li>state:swmEnd</li>
- <br><br><b>Class THERMOSTAT_FAN_MODE</b>
- <li>fanMode:[ fanAutoLow | fanLow | fanAutoHigh | fanHigh | fanAutoMedium |
- fanMedium ]
- </li>
- <br><br><b>Class THERMOSTAT_FAN_STATE</b>
- <li>fanState:[ off | low | high | medium | circulation | humidityCirc |
- fanrightLeftCirc | upDownCirc | quietCirc ]</li>
- <br><br><b>Class THERMOSTAT_MODE</b>
- <li>thermostatMode:[ off | cooling | heating | fanOnly | auto |
- energySaveHeating | manual | setTmOff | setTmHeating |
- setTmEnergySaveHeating | setTmManual ]</li>
-
- <br><br><b>Class THERMOSTAT_OPERATING_STATE</b>
- <li>thermostatOperatingState:[ idle | heating | cooling | fanOnly |
- pendingHeat | pendingCooling | ventEconomizer | auxHeating |
- 2ndStageHeating | 2ndStageCooling | 2ndStageAuxHeat |
- 3rdStageAuxHeat ]</li>
- <br><br><b>Class THERMOSTAT_SETPOINT</b>
- <li>setpointTemp:$temp $scale $type<br>
- <ul>
- $temp: setpoint temperature with number of decimals as reported
- by the device<br>
- $scale: [C|F]; C=Celsius scale, F=Fahrenheit scale<br>
- $type: setpoint type, one of:<br>
- <ul>
- heating,
- cooling,
- furnance,
- dryAir,
- moistAir,
- autoChangeover,
- energySaveHeating,
- energySaveCooling,
- awayHeating,
- awayCooling,
- fullPower
- </ul>
- </ul>
- </li>
- <br><br><b>Class TIME, V2</b>
- <li>time:$time RTC: [failed|working]</li>
- <li>date:$date</li>
- <li>timeOffset: UTC-Offset: $utco DST-Offset(minutes): $dsto DST-Start:
- $start DST-End: $end</li>
- <br><br><b>Class TIME_PARAMETERS, V1</b>
- <li>timeParameters: date: $date time(UTC): $time</li>
- <br><br><b>Class USER_CODE</b>
- <li>userCode:id x status y code z</li>
- <br><br><b>Class VERSION</b>
- <li>V1:</li>
- <li>version:Lib A Prot x.y App a.b</li>
- <li>V2:</li>
- <li>version:Lib A Prot x.y App a.b HW B FWCounter C FW c.d</li>
- <li>V1 and V2:</li>
- <li>versionClass_$classId:$version</li>
- <br><br><b>Class WAKE_UP</b>
- <li>wakeup:notification</li>
- <li>wakeupReport:interval:X target:Y</li>
- <li>wakeupIntervalCapabilitiesReport:min W max X default Y step Z</li>
- <br><br><b>Class ZWAVEPLUS_INFO</b>
- <li>zwavePlusInfo:version: V role: W node: X installerIcon: Y userIcon: Z</li>
- </ul>
- </ul>
- <p><a name="alarmclock"></a>
- <h3>alarmclock</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#alarmclock'>DE</a>]</div>
- <ul>
- Fhem Modul to set up a Alarmclock
- <br><br>
- <a name="alarmclock_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> alarmclock</code>
- <br>
- Example: <code>define Wecker alarmclock</code>
- <br>
- </ul>
- <br>
-
- <a name="alarmclock_Set"></a>
- <b>Set</b><br>
- <ul>
- <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>
- Sets a alarm time for each day.
- </li>
- <li><b>AlarmTime_Weekdays</b> HH:MM<br>
- Sets the same alarm time for each working day.
- </li>
- <li><b>AlarmTime_Weekend</b> HH:MM<br>
- Sets the same alarm time for Saturday and Sunday.
- </li>
- <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>
- Sets the alarm time of the respective day to off.
- </li>
- <li><b>stop</b> (Alarm)<br>
- Stops a running alarm.
- </li>
- <li><b>save</b> (Weekprofile_1|Weekprofile_2|Weekprofile_3|Weekprofile_4|Weekprofile_5)<br>
- Save alarm times in a profile.
- </li>
- <li><b>load</b> (Weekprofile_1|Weekprofile_2|Weekprofile_3|Weekprofile_4|Weekprofile_5)<br>
- Load alarm times from profile.
- </li>
- <li><b>skip</b> (NextAlarm|None)<br>
- Skips the next alarm.
- </li>
- <li><b>disable</b> (1|0|)<br>
- Deactivated/Activated the alarmclock.
- </li>
- </ul>
- <br>
- <br>
-
- <a name="alarmclock_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li><b>AlarmRoutine</b> <br>
- A list separated by semicolon (;) which Fhem should run at the alarm time.<br>
- Example: attr <name> AlarmRoutine set Licht on;set Radio on
- </li>
- <li><b>AlarmRoutineOff</b> <br>
- A list separated by semicolon (;) which Fhem should execute to terminate the alarm.<br>
- Example: attr <name> AlarmRoutineOff set Licht off;set Radio off
- </li>
- <li><b>EventForAlarmOff</b> <br>
- Fhem-event to end the alarm.<br>
- There are 2 possibilities:<br>
- 1.Trigger on state.<br>
- <devicename>:<state> Example: attr <name> EventForAlarmOff Taster:off <br>
- 2.Trigger on reading. <br>
- <devicename>:<readingname>: <value> Example: attr <name> EventForAlarmOff Taster:cSceneSet: on <br>
- </li>
- <li><b>EventForSnooze</b> <br>
- Fhem-event to interrupt the alarm.<br>
- The syntax is identical to EventForAlarmOff.<br>
- Example: attr <name> EventForSnooze Taster:cSceneSet: off <br>
- </li>
- <li><b>SnoozeRoutine</b> <br>
- A list separated by semicolon (;) which Fhem operate to interrupt the running alarm.<br>
- Example: attr <name> SnoozeRoutine set Licht off;set Radio off
- </li>
- <li><b>SnoozeTimeInSec</b> <br>
- Time in seconds how long the alarm should be interrupted.<br>
- Example: attr <name> SnoozeTimeInSec 240 <br>
- </li>
- <li><b>PreAlarmRoutine</b> <br>
- A list separated by semicolon (;) which Fhem operate at the pre-alarm.<br>
- Example: attr <name> PreAlarmRoutine set Licht dim 30;set Radio on
- </li>
- <li><b>PreAlarmTimeInSec</b> <br>
- Time in seconds between the alarm and the pre-alarm.<br>
- Example: attr <name> PreAlarmTimeInSec 300<br>
- In the example, the PreAlarmRoutine is executed 5 minutes before the regular alarm.
- </li>
- <li><b>HardAlarmRoutine</b> <br>
- A list separated by semicolon (;) which is to be executed to force the awakening.<br>
- Example: attr <name> HardAlarmRoutine set Sonos_Schlafzimmer Volume 40;set Licht dim 90
- </li>
- <li><b>HardAlarmTimeInSec</b> <br>
- Here you can specify in seconds how long the alarm can "run" until HardAlarmRoutine is started.<br>
- Example: attr <name> HardAlarmTimeInSec 300
- </li>
- <li><b>OffRoutine</b> <br>
- A list separated by semicolon (;) which Fhem operate at the OffDefaultTime.<br>
- Example: attr <name> OffRoutine set rr_Florian home;set Heizung on
- </li>
- <li><b>OffDefaultTime</b> <br>
- Default time for the OffRoutine.<br>
- Example: attr <name> OffDefaultTime 07:30
- </li>
- <li><b>MaxAlarmDurationInSec</b> <br>
- Duration in seconds to stop automatically the running alarm.<br>
- Example: attr <name> MaxAlarmDurationInSec 120
- </li>
- <li><b>RepRoutine</b> <br>
- A list separated by semicolon (;) which is to be repeated.<br>
- Example: attr <name> RepRoutine1 set Licht_Schlafzimmer dim 1
- </li>
- <li><b>RepRoutineWaitInSec</b> <br>
- Time in seconds between the repetitions from RepRoutine.<br>
- Example: attr <name> RepRoutine1WaitInSec 20
- </li>
- <li><b>RepRoutineRepeats</b> <br>
- Number of repetitions of RepRoutine.<br>
- Example: attr <name> RepRoutine1Repeats 15
- </li>
- <li><b>RepRoutineMode(Alarm|PreAlarm|off)</b> <br>
- Alarm:Reproutine is started with the alarm.<br>
- PreAlarm:Reproutine is started with the pre-alarm.<br>
- off:Reproutine is deactivated.
- </li>
- <li><b>RepRoutineStop(Snooze|off)</b> <br>
- Snooze:Reproutine is stopped with snooze.<br>
- off:Reproutine is not stopped with snooze.
- </li>
- <li><b>HolidayDevice</b> <br>
- Name of the holiday device.<br>
- There are 3 possibilities:<br>
- 1.holiday device from typ holiday or Calendar.<br>
- <devicename><br>
- Example: attr <name> HolidayDevice Feiertage <br>
- 2.On state of a device.For example a dummy <br>
- <devicename>:<value> <br>
- Example: attr <name> HolidayDevice MyDummy:Holiday <br>
- Here the AlarmTime 8_Holiday takes effect when the state of the dummy has the value Holiday <br>
- 3.On a reading of a device. <br>
- <devicename>:<readingname>:<value><br>
- Example: attr <name> HolidayDevice MyDummy:Today:Holiday <br>
- </li>
- <li><b>HolidayCheck</b> <br>
- 0 disables monitoring the holiday device<br>
- 1 activates monitoring
- </li>
- <li><b>HolidayDays</b> <br>
- List of days on which the alarmtime 8_Holiday may take effect<br>
- Example: attr <name> HolidayDays 1|2|3|4|5 <br>
- Default: 1|2|3|4|5|6|7
- </li>
- <li><b>VacationDevice</b> <br>
- Name of the vacation device.<br>
- There are 3 possibilities:<br>
- 1.vacation device from typ holiday or Calendar.<br>
- <devicename> <br>
- Example: attr <name> VacationDevice Ferien <br>
- 2.On state of a device.For example a dummy <br>
- <devicename>:<value> <br>
- Example: attr <name> VacationDevice MyDummy:Vacation <br>
- Here the AlarmTime 9_Vacation takes effect when the state of the dummy has the value Vacation <br>
- 3.On a reading of a device. <br>
- <devicename>:<readingname>:<value> <br>
- Example: attr <name> VacationDevice MyDummy:Today:Vacation <br>
- </li>
- <li><b>VacationCheck</b> <br>
- 0 disables monitoring the vacation device<br>
- 1 activates monitoring
- </li>
- <li><b>VacationDays</b> <br>
- List of days on which the alarmtime 9_Vacation may take effect<br>
- Example: attr <name> VacationDays 1|2|3|4|5 <br>
- Default: 1|2|3|4|5|6|7
- </li>
- <li><b>PresenceDevice</b> <br>
- Name of the presence device.<br>
- There are 3 possibilities:<br>
- 1.presence device from Typ presence.<br>
- <devicename> <br>
- Example: attr <name> PresenceDevice Presence <br>
- Alarmclock cancel alarm when state is absent <br>
- 2.On state of a device.For example a dummy <br>
- <devicename>:<value> <br>
- Example: attr <name> PresenceDevice MyDummy:absent <br>
- Here the Alarmclock cancel alarm when the state of the dummy has the value absent <br>
- 3.On a reading of a device. <br>
- <devicename>:<readingname>:<value> <br>
- Example: attr <name> PresenceDevice MyDummy:user:notathome <br>
- </li>
- <li><b>PresenceCheck</b> <br>
- 0 disables monitoring the presence device<br>
- 1 activates monitoring
- </li>
- <li><b>WeekprofileName</b> <br>
- Optional list with name for storing the week profiles<br>
- Example: attr <name> WeekprofileName MyWeek1,MyWeek2,MyWeek3 <br>
- </li>
- <li><b>disable</b> <br>
- 1 disables all alarms<br>
- 0 activates this again
- </li>
- </ul>
- </ul>
- <p><a name="alexa"></a>
- <h3>alexa</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#alexa'>DE</a>]</div>
- <ul>
- Module to control the integration of Amazon Alexa devices with FHEM.<br><br>
- Notes:
- <ul>
- <li>JSON has to be installed on the FHEM host.</li>
- </ul>
- <a name="alexa_Set"></a>
- <b>Set</b>
- <ul>
- <li>reload [name]<br>
- Reloads the device <code>name</code> or all devices in alexa-fhem. Subsequently you have to start a device discovery
- for the home automation skill in the amazon alexa app.</li>
- </ul>
- <a name="alexa_Get"></a>
- <b>Get</b>
- <ul>
- <li>customSlotTypes<br>
- Instructs alexa-fhem to write the device specific Custom Slot Types for the Interaction Model
- configuration to the alexa-fhem console and if possible to the requesting fhem frontend.</li>
- <li>interactionModel<br>
- Get Intent Schema, non device specific Custom Slot Types and Sample Utterances for the Interaction Model
- configuration.</li>
- <li>skillId<br>
- shows the configured skillId.</li>
- </ul>
- <a name="alexa_Attr"></a>
- <b>Attr</b>
- <ul>
- <li>alexaName<br>
- The name to use for a device with alexa.</li>
- <li>alexaRoom<br>
- The room name to use for a device with alexa.</li>
- <li>articles<br>
- defaults to: der,die,das,den</li>
- <li>prepositions<br>
- defaults to: in,im,in der</li>
- <li>alexaMapping<br>
- maps spoken commands to intents for certain characteristics.</li>
- <li>alexaTypes<br>
- 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>
- <li>echoRooms<br>
- maps echo devices to default rooms.</li>
- <li>fhemIntents<br>
- maps spoken commands directed to fhem as a whole (i.e. not to specific devices) to events from the alexa device.</li>
- <li>alexaConfirmationLevel<br>
- </li>
- <li>alexaStatusLevel<br>
- </li>
- <li>skillId<br>
- skillId to use for automatic interaction model upload (not yet finished !!!)
- </li>
- Note: changes to attributes of the alexa device will automatically trigger a reconfiguration of
- alxea-fhem and there is no need to restart the service.
- </ul>
- </ul><br>
- <p><a name="allergy"></a>
- <h3>allergy</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#allergy'>DE</a>]</div>
- <ul>
- This modul provides allergy forecast data for Germany.<br/>
- It requires the Perl module XML::Simple to be installed
- <br/><br/>
- <b>Define</b>
- <ul>
- <code>define <name> allergy <zipcode></code>
- <br>
- Example: <code>define allergydata allergy 12345</code>
- <br>
- <li><code>zipcode</code>
- <br>
- German zipcode
- </li><br>
- </ul>
- <br>
- <b>Get</b>
- <ul>
- <li><code>data</code>
- <br>
- Manually trigger data update
- </li><br>
- </ul>
- <br>
- <b>Readings</b>
- <ul>
- <li><code>city</code>
- <br>
- Name of the city the forecast is read for
- </li><br>
- <li><code>fc<i>n</i>_total</code>
- <br>
- Daily maximum levels for all allergens that are not being ignored due to <i>ignoreList</i><br/>
- </li><br>
- <li><code>fc<i>n</i>_day_of_week</code>
- <br>
- Weekday, can be localized through <i>weekdaysFormat</i><br/>
- </li><br>
- <li><code>fc<i>n</i>_<i>allergen</i></code>
- <br>
- Daily levels for all allergens that are not being ignored due to <i>ignoreList</i>
- </li><br>
- </ul>
- <br>
- <b>Attributes</b>
- <ul>
- <li><code>ignoreList</code>
- <br>
- Comma-separated list of allergen names that are to be ignored during updates and for cumulated day levels calculation
- </li><br>
- <li><code>updateEmpty</code>
- <br>
- Also update (and keep) level readings for inactive allergens that are otherwise removed
- </li><br>
- <li><code>updateIgnored</code>
- <br>
- Also update (and keep) level readings for ignored allergens that are otherwise removed
- </li><br>
- <li><code>levelsFormat</code>
- <br>
- Localize levels by adding them comma separated (default: -,low,moderate,high,extreme)
- </li><br>
- <li><code>weekdaysFormat</code>
- <br>
- Localize Weekdays by adding them comma separated (default: Sun,Mon,Tue,Wed,Thu,Fr,Sat)
- </li><br>
- </ul>
- </ul>
- <p><a name="allowed"></a>
- <h3>allowed</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#allowed'>DE</a>]</div>
- <ul>
- <br>
- <a name="alloweddefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> allowed <deviceList></code>
- <br><br>
- Authorize execution of commands and modification of devices based on the
- frontend used and/or authenticate users.<br><br>
- If there are multiple instances defined which are valid for a given
- frontend device, then all authorizations must succeed. For authentication
- it is sufficient when one of the instances succeeds. The checks are
- executed in alphabetical order of the allowed instance names.<br><br>
- <b>Note:</b> this module should work as intended, but no guarantee
- can be given that there is no way to circumvent it.<br><br>
- Examples:
- <ul><code>
- define allowedWEB allowed<br>
- attr allowedWEB validFor WEB,WEBphone,WEBtablet<br>
- attr allowedWEB basicAuth { "$user:$password" eq "admin:secret" }<br>
- attr allowedWEB allowedCommands set,get<br><br>
- define allowedTelnet allowed<br>
- attr allowedTelnet validFor telnetPort<br>
- attr allowedTelnet password secret<br>
- </code></ul>
- <br>
- </ul>
- <a name="allowedset"></a>
- <b>Set</b>
- <ul>
- <li>basicAuth <username> <password></li>
- <li>password <password></li>
- <li>globalpassword <password><br>
- these commands set the corresponding attribute, by computing an SHA256
- hash from the arguments and a salt. Note: the perl module Device::SHA is
- needed.
- </li>
- </ul><br>
- <a name="allowedget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="allowedattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li><br>
- <a name="allowedCommands"></a>
- <li>allowedCommands<br>
- A comma separated list of commands allowed from the matching frontend
- (see validFor).<br>
- If set to an empty list <code>, (i.e. comma only)</code>
- then no comands are allowed. If set to <code>get,set</code>, then only
- a "regular" usage is allowed via set and get, but changing any
- configuration is forbidden.<br>
- </li><br>
- <a name="allowedDevices"></a>
- <li>allowedDevices<br>
- A comma separated list of device names which can be manipulated via the
- matching frontend (see validFor).
- </li><br>
- <a name="basicAuth"></a>
- <li>basicAuth, basicAuthMsg<br>
- request a username/password authentication for FHEMWEB access.
- It can be a base64 encoded string of user:password, an SHA256 hash
- (which should be set via the corresponding set command) or a perl
- expression if enclosed in {}, where $user and $password are set, and
- which returns true if accepted or false if not. Examples:
- <ul><code>
- attr allowed basicAuth ZmhlbXVzZXI6c2VjcmV0<br>
- attr allowed basicAuth SHA256:F87740B5:q8dHeiClaPLaWVsR/rqkzcBhw/JvvwVi4bEwKmJc/Is<br>
- attr allowed basicAuth {"$user:$password" eq "fhemuser:secret"}<br>
- </code></ul>
- If basicAuthMsg is set, it will be displayed in the popup window when
- requesting the username/password. Note: not all browsers support this
- feature.<br>
- </li><br>
- <a name="basicAuthExpiry"></a>
- <li>basicAuthExpiry<br>
- allow the basicAuth to be kept valid for a given number of days.
- So username/password as specified in basicAuth are only requested
- after a certain period.
- This is achieved by sending a cookie to the browser that will expire
- after the given period.
- Only valid if basicAuth is set.
- </li><br>
- <a name="password"></a>
- <li>password<br>
- Specify a password for telnet instances, which has to be entered as the
- very first string after the connection is established. The same rules
- apply as for basicAuth, with the expception that there is no user to be
- specified.<br>
- Note: if this attribute is set, you have to specify a password as the
- first argument when using fhem.pl in client mode:
- <ul>
- perl fhem.pl localhost:7072 secret "set lamp on"
- </ul>
- </li><br>
- <a name="globalpassword"></a>
- <li>globalpassword<br>
- Just like the attribute password, but a password will only required for
- non-local connections.
- </li><br>
- <a name="validFor"></a>
- <li>validFor<br>
- A comma separated list of frontend names. Currently supported frontends
- are all devices connected through the FHEM TCP/IP library, e.g. telnet
- and FHEMWEB. The allowed instance is only active, if this attribute is
- set.
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="apptime"></a>
- <h3>apptime</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#apptime'>DE</a>]</div>
- <div style="padding-left: 2ex;">
- <h4><code>apptime</code></h4>
- <p>
- apptime provides information about application procedure execution time.
- It is designed to identify long running jobs causing latency as well as
- general high <abbr>CPU</abbr> usage jobs.
- </p>
- <p>
- No information about <abbr>FHEM</abbr> kernel times and delays will be provided.
- </p>
- <p>
- Once started, apptime monitors tasks. User may reset counter during operation.
- apptime adds about 1% <abbr>CPU</abbr> load in average to <abbr>FHEM</abbr>.
- </p>
- <p>
- In order to remove apptime, <kbd>shutdown restart</kbd> is necessary.
- </p>
- <p>
- <strong>Features</strong>
- </P>
- <dl>
- <dt><code><kbd>apptime</kbd></code></dt>
- <dd>
- <p>
- <kbd>apptime</kbd> is started with the its first call and continously monitor operations.<br>
- To unload apptime, <kbd>shutdown restart</kbd> is necessary.<br> </li>
- </p>
- </dd>
- <dt><code><kbd>apptime clear</code></dt>
- <dd>
- <p>
- Reset all counter and start from zero.
- </p>
- </dd>
- <dt><code><kbd>apptime pause</code></dt>
- <dd>
- <p>
- Suspend accumulation of data. Data is not cleared.
- </p>
- </dd>
- <dt><code><kbd>apptime cont</code></dt>
- <dd>
- <p>
- Continue data collection after pause.
- </p>
- </dd>
- <dt><code><kbd>apptime [count|function|average|clear|max|name|total] [all]</kbd></code></dt>
- <dd>
- <p>
- Display a table sorted by the field selected.
- </p>
- <p>
- <strong><kbd>all</kbd></strong> will display the complete table while by default only the top lines are printed.<
- </p>
- </dd>
- </dl>
- <p>
- <strong>Columns:</strong>
- </p>
- <dl>
- <dt><strong>name</strong></dt>
- <dd>
- <p>
- Name of the entity executing the procedure.
- </p>
- <p>
- If it is a function called by InternalTimer the name starts with <var>tmr-</var>.
- By then it gives the name of the function to be called.
- </p>
- </dd>
- <dt><strong>function</strong><dt>
- <dd>
- <p>
- Procedure name which was executed.
- </p>
- <p>
- If it is an <var>InternalTimer</var> call it gives its calling parameter.
- </p>
- </dd>
- <dt><strong>max</strong></dt>
- <dd>
- <p>
- Longest duration measured for this procedure in <abbr>ms</abbr>.
- </p>
- </dd>
- <dt><strong>count</strong></dt>
- <dd>
- <p>
- Number of calls for this procedure.
- </p>
- </dt>
- <dt><strong>total</strong></dt>
- <dd>
- <p>
- Accumulated duration of this procedure over all calls monitored.
- </p>
- </dd>
- <dt><strong>average</strong></dt>
- <dd>
- <p>
- Average time a call of this procedure takes.
- </p>
- </dd>
- <dt><strong>maxDly</strong></dt>
- <dd>
- <p>
- Maximum delay of a timer call to its schedules time.
- This column is not relevant for non-timer calls.
- </p>
- </dd>
- <dt><strong>param Max call</strong></dt>
- <dd>
- <p>
- Gives the parameter of the call with the longest duration.
- </p>
- </dd>
- </dl>
- </div>
- <p><a name="archetype"></a>
- <h3>archetype</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#archetype'>DE</a>]</div>
- ( en | <a href="commandref_DE.html#archetype">de</a> )
- <div>
- <ul>
- With an archetype, attributes are transferred to inheritors, other devices.
- The inheritors can be defined according to a given pattern in the archetype
- and for relations, a certain group of devices.<br>
- <br>
- Notes:
- <ul>
- <li>
- <code>$name</code><br>
- name of the inheritor
- </li><br>
- <li>
- <code>$room</code><br>
- room of the inheritor
- </li><br>
- <li>
- <code>$relation</code><br>
- name of the relation
- </li><br>
- <li>
- <code>$SELF</code><br>
- name of the archetype
- </li>
- </ul>
- <br>
- <a name="archetypecommand"></a>
- <b>Commands</b>
- <ul>
- <code>clean [check]</code><br>
- Defines all inheritors for all relations und inheritance all inheritors
- with the attributes specified under the attribute attribute.<br>
- If the "check" parameter is specified, all outstanding attributes and
- inheritors are displayed.
- </ul>
- <br>
- <a name="archetypedefine"></a>
- <b>Define</b>
- <ul>
- <code>
- define <name> archetype [<devspec>] [<devspec>] [...]
- </code><br>
- In the <devspec> are described all the inheritors for this
- archetype. Care should be taken to ensure that each inheritor is
- associated with only one archetype.<br>
- If no <devspec> is specified, this is set with "defined_by=$SELF".
- This devspec is also always checked, even if it is not specified.<br>
- See the section on
- <a href="#devspec">device specification</a>
- for details of the <devspec>.<br>
- <br>
- <code>define <name> archetype derive attributes</code><br>
- If the DEF specifies "derive attributes" it is a special archetype. It
- derives attributes based on a pattern.<br>
- The pattern is described with the actual_. + Attributes.<br>
- All devices with all the mandatory attributes of a pattern are listed as
- inheritors.
- </ul>
- <br>
- <a name="archetypeset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>addToAttrList <attribute></code><br>
- The command is only possible for an archetype with DEF
- "derive attributes".<br>
- Add an entry to the userattr of the global device so that it is
- available to all of the devices.<br>
- This can be useful to derive the alias according to a pattern.
- </li>
- <br>
- <li>
- <code>define inheritors</code><br>
- Defines an inheritor for all relations according to the pattern:<br>
- <ul>
- <code>
- define <metaNAME> <actualTYPE> [<metaDEF>]
- </code>
- </ul>
- When an inheritor Is defined, it is initialized with the commands
- specified under the initialize attribute, and the archetype assign the
- defined_by attribute to the value $ SELF.<br>
- The relations, metaNAME, actualTYPE, and metaDEF are described in
- the attributes.
- </li>
- <br>
- <li>
- <code>derive attributes</code><br>
- This command is only possible for an archetype with DEF
- "derive attributes".<br>
- Derives all attributes specified under the attributes attribute for all
- inheritors.
- </li>
- <br>
- <li>
- <code>inheritance</code><br>
- Inheritance all attributes specified under the attributes attribute for
- all inheritors.
- </li>
- <br>
- <li>
- <code>initialize inheritors</code><br>
- Executes all commands specified under the attributes initialize for all
- inheritors.
- </li>
- <br>
- <li>
- <code>raw <command></code><br>
- Executes the command for all inheritors.
- </li>
- </ul>
- <br>
- <a name="archetypeget"></a>
- <b>Get</b>
- <ul>
- <li>
- <code>inheritors</code><br>
- Displays all inheritors.
- </li>
- <br>
- <li>
- <code>relations</code><br>
- Displays all relations.
- </li>
- <br>
- <li>
- <code>pending attributes</code><br>
- Displays all outstanding attributes specified under the attributes
- attributes for all inheritors, which do not match the attributes of the
- archetype.
- </li>
- <br>
- <li>
- <code>pending inheritors</code><br>
- Displays all outstanding inheritors, which should be defined on the
- basis of the relations
- </li>
- </ul>
- <br>
- <a name="archetypeattr"></a>
- <b>Attribute</b>
- <ul>
- Notes:<br>
- All attributes that can be inherited can be pre-modified with a modifier.
- <ul>
- <li>
- <code>attr archetype <attribute> undef:<...></code><br>
- If <code>undef:</code> preceded, the attribute is inherited only if
- the inheritors does not already have this attribute.
- </li><br>
- <li>
- <code>
- attr archetype <attribute>
- least[(<seperator>)]:<...>
- </code><br>
- If a list is inherited, it can be specified that these elements
- should be at least present, by prepending the
- <code>least[(<seperator>)]:</code>.<br>
- If no separator is specified, the space is used as separator.
- </li>
- </ul>
- <br>
- <li>
- <code>actual_<attribute> <value></code><br>
- <value> can be specified as <text> or {perl code}.<br>
- If the attribute <attribute> becomes inheritance the return
- value of the attribute actual_<attribute> is replacing the value
- of the attribute.<br>
- The archetype with DEF "derive attributes" can be used to define
- patterns.<br>
- Example:
- <code>
- actual_alias %captionRoom|room%: %description%[ %index%][%suffix%]
- </code><br>
- All terms enclosed in% are attributes. An order can be achieved by |.
- If an expression is included in [] it is optional.<br>
- The captionRoom, description, index, and suffix expressions are added
- by addToAttrList.<br>
- </li>
- <br>
- <li>
- <code>actualTYPE <TYPE></code><br>
- Sets the TYPE of the inheritor. The default value is dummy.
- </li>
- <br>
- <li>
- <code>attributes <attribute> [<attribute>] [...]</code><br>
- Space-separated list of attributes to be inherited.
- </li>
- <br>
- <li>
- <code>
- attributesExclude <attribute> [<attribute>] [...]
- </code><br>
- A space-separated list of attributes that are not inherited to these
- inheritors.
- </li>
- <br>
- <li>
- <code>autocreate 0</code><br>
- The archetype does not automatically inherit attributes to new devices,
- and inheritors are not created automatically for new relations.<br>
- The default value is 1.
- </li>
- <br>
- <li>
- <code>defined_by <...></code><br>
- Auxiliary attribute to recognize by which archetype the inheritor was
- defined.
- </li>
- <br>
- <li>
- <code>delteAttributes 1</code><br>
- If an attribute is deleted in the archetype, it is also deleted for all
- inheritors.<br>
- The default value is 0.
- </li>
- <br>
- <li>
- <code>disable 1</code><br>
- No attributes are inherited and no inheritors are defined.
- </li>
- <br>
- <li>
- <code>initialize <initialize></code><br>
- <initialize> can be specified as <text> or {perl code}.<br>
- The <text> or the return of {perl code} must be a list of FHEM
- commands separated by a semicolon (;). These are used to initialize the
- inheritors when they are defined.
- </li>
- <br>
- <li>
- <code>metaDEF <metaDEF></code><br>
- <metaDEF> can be specified as <text> or {perl code} and
- describes the structure of the DEF for the inheritors.
- </li>
- <br>
- <li>
- <code>metaNAME <metaNAME></code><br>
- <metaNAME> can be specified as <text> or {perl code} and
- describes the structure of the name for the inheritors.
- </li>
- <br>
- <li>
- <code><a href="#readingList">readingList</a></code>
- </li>
- <br>
- <li>
- <code>relations <devspec> [<devspec>] [...]</code><br>
- The relations describes all the relations that exist for this
- archetype.<br>
- See the section on
- <a href="#devspec">device specification</a>
- for details of the <devspec>.
- </li>
- <br>
- <li>
- <code><a href="#setList">setList</a></code>
- </li>
- <br>
- <li>
- <code>splitRooms 1</code><br>
- Returns every room seperatly for each relation in $room.
- </li>
- <br>
- </ul>
- <br>
- <a name="archetypeexamples"></a>
- <b>Examples</b>
- <ul>
- <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
- <u>The following sample codes can be imported via "Raw definition".</u>
- </a>
- <br>
- <br>
- <li>
- <b>
- All plots should be moved to the group "history":
- </b>
- <ul>
- <pre>defmod SVG_archetype archetype TYPE=SVG
- attr SVG_archetype group verlaufsdiagramm
- attr SVG_archetype attributes group</pre>
- </ul>
- </li>
- <li>
- <b>
- In addition, a weblink should be created for all plots:
- </b>
- <ul>
- <pre>defmod SVG_link_archetype archetype
- attr SVG_link_archetype relations TYPE=SVG
- attr SVG_link_archetype actualTYPE weblink
- attr SVG_link_archetype metaNAME $relation\_link
- attr SVG_link_archetype metaDEF link ?detail=$relation
- attr SVG_link_archetype initialize attr $name room $room;;
- attr SVG_link_archetype group verlaufsdiagramm
- attr SVG_link_archetype attributes group</pre>
- </ul>
- </li>
- </ul>
- </ul>
- </div>
- <p><a name="at"></a>
- <h3>at</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#at'>DE</a>]</div>
- <ul>
- Start an arbitrary FHEM command at a later time.<br>
- <br>
- <a name="atdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> at [<timespec>|<datespec>]
- <command></code><br>
- <br>
- <code><timespec></code> format: [+][*{N}]<timedet><br>
- <ul>
- The optional <code>+</code> indicates that the specification is
- <i>relative</i>(i.e. it will be added to the current time).<br>
- The optional <code>*</code> indicates that the command should be
- executed <i>repeatedly</i>.<br>
- The optional <code>{N}</code> after the * indicates,that the command
- should be repeated <i>N-times</i> only.<br>
- <timespec> is either HH:MM, HH:MM:SS or {perlfunc()}. perlfunc must
- return a string in timedet format. Note: {perlfunc()} may not contain
- any spaces or tabs.<br>
- <datespec> is either ISO8601 (YYYY-MM-DDTHH:MM:SS) or number of
- seconds since 1970.
- </ul>
- <br>
- Examples:
- <PRE>
- # absolute ones:
- define a1 at 17:00:00 set lamp on # fhem command
- define a2 at 17:00:00 { Log 1, "Teatime" } # Perl command
- define a3 at 17:00:00 "/bin/echo "Teatime" > /dev/console" # shell command
- define a4 at *17:00:00 set lamp on # every day
- # relative ones
- define a5 at +00:00:10 set lamp on # switch on in 10 seconds
- define a6 at +00:00:02 set lamp on-for-timer 1 # Blink once in 2 seconds
- define a7 at +*{3}00:00:02 set lamp on-for-timer 1 # Blink 3 times
- # Blink 3 times if the piri sends a command
- define n1 notify piri:on.* define a8 at +*{3}00:00:02 set lamp on-for-timer 1
- # Switch the lamp on from sunset to 11 PM
- define a9 at +*{sunset_rel()} set lamp on
- define a10 at *23:00:00 set lamp off
- # More elegant version, works for sunset > 23:00 too
- define a11 at +*{sunset_rel()} set lamp on-till 23:00
- # Only do this on weekend
- define a12 at +*{sunset_rel()} { fhem("set lamp on-till 23:00") if($we) }
- # Switch lamp1 and lamp2 on from 7:00 till 10 minutes after sunrise
- define a13 at *07:00 set lamp1,lamp2 on-till {sunrise(+600)}
- # Switch the lamp off 2 minutes after sunrise each day
- define a14 at *{sunrise(+120)} set lamp on
- # Switch lamp1 on at sunset, not before 18:00 and not after 21:00
- define a15 at *{sunset(0,"18:00","21:00")} set lamp1 on
- </PRE>
- Notes:<br>
- <ul>
- <li>if no <code>*</code> is specified, then a command will be executed
- only once, and then the <code>at</code> entry will be deleted. In
- this case the command will be saved to the statefile (as it
- considered volatile, i.e. entered by cronjob) and not to the
- configfile (see the <a href="#save">save</a> command.)
- </li>
- <li>if the current time is greater than the time specified, then the
- command will be executed tomorrow.</li>
- <li>For even more complex date handling you either have to call fhem from
- cron or filter the date in a perl expression, see the last example and
- the section <a href="#perl">Perl special</a>.
- </li>
- </ul>
- <br>
- </ul>
- <a name="atset"></a>
- <b>Set</b>
- <ul>
- <a name="modifyTimeSpec"></a>
- <li>modifyTimeSpec <timespec><br>
- Change the execution time. Note: the N-times repetition is ignored.
- It is intended to be used in combination with
- <a href="#webCmd">webCmd</a>, for an easier modification from the room
- overview in FHEMWEB.</li>
- <li>inactive<br>
- Inactivates the current device. Note the slight difference to the
- disable attribute: using set inactive the state is automatically saved
- to the statefile on shutdown, there is no explicit save necesary.<br>
- This command is intended to be used by scripts to temporarily
- deactivate the at.<br>
- The concurrent setting of the disable attribute is not recommended.
- </li>
- <li>active<br>
- Activates the current device (see inactive).</li>
- <li>execNow<br>
- Execute the command associated with the at. The execution of a relative
- at is not affected by this command.</li>
- </ul><br>
- <a name="atget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="atattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="alignTime"></a>
- <li>alignTime<br>
- Applies only to relative at definitions: adjust the time of the next
- command execution so, that it will also be executed at the desired
- alignTime. The argument is a timespec, see above for the
- definition.<br>
- Example:<br>
- <ul>
- # Make sure that it chimes when the new hour begins<br>
- define at2 at +*01:00 set Chime on-for-timer 1<br>
- attr at2 alignTime 00:00<br>
- </ul>
- </li><br>
- <a name="computeAfterInit"></a>
- <li>computeAfterInit<br>
- If perlfunc() in the timespec relies on some other/dummy readings, then
- it will return a wrong time upon FHEM start, as the at define is
- processed before the readings are known. If computeAfterInit is set,
- FHEM will recompute timespec after the initialization is finished.
- </li><br>
- <a name="disable"></a>
- <li>disable<br>
- Can be applied to at/watchdog/notify/FileLog devices.<br>
- Disables the corresponding at/notify or FileLog device. Note:
- If applied to an <a href="#at">at</a>, the command will not be executed,
- but the next time will be computed.</li><br>
- <a name="disabledForIntervals"></a>
- <li>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM...<br>
- Space separated list of HH:MM or D@HH:MM tupels. If the current time is
- between the two time specifications, the current device is disabled.
- Instead of HH:MM you can also specify HH or HH:MM:SS. D is the day of
- the week, with 0 indicating Sunday and 3 indicating Wednesday. To
- specify an interval spawning midnight, you have to specify two
- intervals, e.g.:
- <ul>
- 23:00-24:00 00:00-01:00
- </ul>
- If parts of the attribute value are enclosed in {}, they are evaluated:
- <ul>
- {sunset_abs()}-24 {sunrise_abs()}-08
- </ul>
- </li><br>
- <a name="skip_next"></a>
- <li>skip_next<br>
- Used for at commands: skip the execution of the command the next
- time.</li><br>
- <li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="autocreate"></a>
- <h3>autocreate</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#autocreate'>DE</a>]</div>
- <ul>
- Automatically create not yet defined FHEM devices upon reception of a message
- generated by this device. Note: devices which are polled (like the EMEM/EMWZ
- accessed through the EM1010PC) will NOT be automatically created.
- <br>
- <a name="autocreatedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> autocreate</code><br>
- <br>
- <ul>
- By defining an instance, the global attribute <a href=
- "#autoload_undefined_devices">autoload_undefined_devices</a>
- is set, so that modules for unknnown devices are automatically loaded.
- The autocreate module intercepts the UNDEFINED event generated by each
- module, creates a device and optionally also FileLog and SVG
- entries.<br>
- <b>Note 1:</b> devices will be created with a unique name, which contains
- the type and a unique id for this type. When <a href="#rename">renaming
- </a> the device, the automatically created filelog and SVG devices
- will also be renamed.<br>
- <b>Note 2:</b> you can disable the automatic creation by setting the
- <a href="#disable">disable</a> attribute, in this case only the rename
- hook is active, and you can use the <a href="#createlog">createlog</a>
- command to add FileLog and SVG to an already defined device.
- <b>Note 3:</b> It makes no sense to create more than one instance of this
- module.
- </ul>
- <br>
- Example:<PRE>
- define autocreate autocreate
- attr autocreate autosave
- attr autocreate device_room %TYPE
- attr autocreate filelog test2/log/%NAME-%Y.log
- attr autocreate weblink
- attr autocreate weblink_room Plots
- </PRE>
- </ul>
- <a name="autocreateset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="autocreateget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="autocreateattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="autosave"></a>
- <li>autosave<br>
- After creating a device, automatically save the config file with the
- command <a href="#save">save</a> command. Default is 1 (i.e. on), set
- it to 0 to switch it off.<br>
- <b>Note</b>: this attribute is deprecated, use the global autosave
- attribute instead.
- </li><br>
- <a name="device_room"></a>
- <li>device_room<br>
- "Put" the newly created device in this room. The name can contain the
- wildcards %TYPE and %NAME, see the example above.</li><br>
- <a name="filelogattr"></a>
- <li>filelog<br>
- Create a filelog associated with the device. The filename can contain
- the wildcards %TYPE and %NAME, see the example above. The filelog will
- be "put" in the same room as the device.</li><br>
- <a name="weblinkattr"></a>
- <li>weblink<br>
- Create an SVG associated with the device/filelog.</li><br>
- <a name="weblink_room"></a>
- <li>weblink_room<br>
- "Put" the newly created SVG in this room. The name can contain the
- wildcards %TYPE and %NAME, see the example above.</li><br>
- <li><a href="#disable">disable</a></li>
- <br>
- <a name="ignoreTypes"></a>
- <li>ignoreTypes<br>
- This is a regexp, to ignore certain devices, e.g. the neighbours FHT.
- You can specify more than one, with usual regexp syntax, e.g.<br>
- attr autocreate ignoreTypes (CUL_HOERMANN.*|FHT_1234|CUL_WS_7)<br>
- The word "Types" is somehow misleading, as it actually checks the
- generated device name.<br>
- <b>Note</b>: starting with featurelevel 5.9 the regexp is automatically
- extended with ^ and $, so that it must match the whole name (same
- procedure as in notify and FileLog).
- </li><br>
- <a name="autocreateThreshold"></a>
- <li>autocreateThreshold<br>
- A list of <type>:<count>:<interval> triplets. A new
- device is only created if there have been at least <code>count</code>
- events of TYPE <code>type</code> in the last <code>interval</code>
- seconds.<br> <code>attr autocreateThreshold
- LaCrosse:2:30,EMT7110:2:60</code>
- </li>
- </ul>
- <br>
- <a name="createlog"></a>
- <b>createlog</b>
- <ul>
- Use this command to manually add a FileLog and an SVG to an existing
- device.
- This command is part of the autocreate module.
- </ul>
- <br>
- <a name="usb"></a>
- <b>usb</b>
- <ul>
- Usage:
- <ul><code>
- usb scan<br>
- usb create<br>
- </code></ul>
- This command will scan the /dev directory for attached USB devices, and
- will try to identify them. With the argument scan you'll get back a list
- of FHEM commands to execute, with the argument create there will be no
- feedback, and the devices will be created instead.<br><br>
- Note that switching a CUL to HomeMatic mode is still has to be done
- manually.<br><br>
- On Linux it will also check with the lsusb command, if unflashed CULs are
- attached. If this is the case, it will call CULflash with the appropriate
- parameters (or display the CULflash command if scan is specified). The
- usb command will only flash one device per call.<br><br>
- This command is part of the autocreate module.
- </ul>
- </ul>
- <br>
- <p><a name="average"></a>
- <h3>average</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#average'>DE</a>]</div>
- <ul>
- Compute additional average, minimum and maximum values for current day and
- month.
- <br>
- <a name="averagedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> average <regexp></code><br>
- <br>
- <ul>
- The syntax for <regexp> is the same as the
- regexp for <a href="#notify">notify</a>.<br>
- If it matches, and the event is of the form "eventname number", then this
- module computes the daily and monthly average, maximum and minimum values
- and sums depending on attribute settings and generates events of the form
- <ul>
- <device> <eventname>_avg_day: <computed_average>
- </ul>
- <ul>
- <device> <eventname>_min_day: <minimum day value>
- </ul>
- <ul>
- <device> <eventname>_max_day: <maximum day value>
- </ul>
- <ul>
- <device> <eventname>_cum_day: <sum of the values during the day>
- </ul>
- and
- <ul>
- <device> <eventname>_avg_month: <computed_average>
- </ul>
- <ul>
- <device> <eventname>_min_month: <minimum month value>
- </ul>
- <ul>
- <device> <eventname>_max_month: <maximum month value>
- </ul>
- <ul>
- <device> <eventname>_cum_month: <sum of the values during the month>
- </ul>
- at the beginning of the next day or month respectively depending on attributes defined.<br>
- The current average, minimum, maximum and the cumulated values are stored
- in the device readings depending on attributes defined.
- </ul>
- <br>
- Example:<PRE>
- # Compute the average, minimum and maximum for the temperature events of
- # the ws1 device
- define avg_temp_ws1 average ws1:temperature.*
- # Compute the average, minimum and maximum for each temperature event
- define avg_temp_ws1 average .*:temperature.*
- # Compute the average, minimum and maximum for all temperature and humidity events
- # Events:
- # ws1 temperature: 22.3
- # ws1 humidity: 67.4
- define avg_temp_ws1 average .*:(temperature|humidity).*
- # Compute the same from a combined event. Note: we need two average
- # definitions here, each of them defining the name with the first
- # paranthesis, and the value with the second.
- #
- # Event: ws1 T: 52.3 H: 67.4
- define avg_temp_ws1_t average ws1:(T):.([-\d\.]+).*
- define avg_temp_ws1_h average ws1:.*(H):.([-\d\.]+).*
- </PRE>
- </ul>
- <a name="averageset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="averageget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="averageattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li>computeMethod</li>
- defines how values are added up for the average calculation. This
- attribute can be set to integral or counter.
- The integral mode is meant for measuring continuous values like
- temperature, counter is meant for adding up values, e.g. from a
- feeding unit. In the first case, the time between the events plays an
- important role, in the second case not. Default is integral.
- <li>nominmax</li>
- don't compute min and max values. Default is 0 (compute min & max).
- <li>noaverage</li>
- don't compute average values. Default is 0 (compute avarage).
- </ul>
- <a name="averageevents"></a>
- <b>Generated events:</b>
- <ul>
- <li><eventname>_avg_day: $avg_day</li>
- <li><eventname>_avg_month: $avg_month</li>
- <li><eventname>_cum_day: $cum_day (only if cumtype is set to raw)</li>
- <li><eventname>_cum_month: $cum_month (only if cumtype is set to raw)</li>
- <li><eventname>_min_day: $min_day</li>
- <li><eventname>_min_month: $min_month</li>
- <li><eventname>_max_day: $max_day</li>
- <li><eventname>_max_month: $max_month</li>
- </ul>
- </ul>
- <p><a name="backup"></a>
- <h3>backup</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#backup'>DE</a>]</div>
- <ul>
- <code>backup</code><br>
- <br>
- The complete FHEM directory (containing the modules), the WebInterface
- pgm2 (if installed) and the config-file will be saved into a .tar.gz
- file by default. The file is stored with a timestamp in the
- <a href="#modpath">modpath</a>/backup directory or to a directory
- specified by the global attribute <a href="#backupdir">backupdir</a>.<br>
- Note: tar and gzip must be installed to use this feature.
- <br>
- <br>
- If you need to call tar with support for symlinks, you could set the
- global attribute <a href="#backupsymlink">backupsymlink</a> to everything
- else as "no".
- <br>
- <br>
- You could pass the backup to your own command / script by using the
- global attribute <a href="#backupcmd">backupcmd</a>.
- <br>
- <br>
- </ul>
- <p><a name="cloneDummy"></a>
- <h3>cloneDummy</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#cloneDummy'>DE</a>]</div>
- <ul>This module provides a cloneDummy which will receive readings from any other device sending data
- to fhem.<br>
- E.g. may be used in an FHEM2FHEM environment. Duplicate source events which may occur within the
- time given by the global attribute <a href="#dupTimeout">dupTimeout</a>, will be suppressed in order
- to avoid overhead. The value of this attribute is to be changed with great care, as it affects other
- parts of FHEM, too.<br>
- the order of precedence for STATE is following:
- <ul><li>if there is no parameter preset then state of cloneDummy (initialized,active)</li>
- <li>if addStateEvent is set then the "state" of cloned Device is set
- (no "state" from cloneDummy)</li>
- <li>if the optional reading is set in define, then value of the optional reading.
- (this will overstrike the previous two lines)</li>
- <li>if stateFormat set ass attr, it will dominate all previous lines</li>
- </ul>
- <br><a name="cloneDummydefine"></a>
- <b>Define</b>
- <ul><code>define <cloneDevice> cloneDummy <sourceDevice> [reading]</code><br>
- <br>Example:<br>
- <br>
- <ul><code>define clone_OWX_26_09FF26010000 cloneDummy OWX_26_09FF26010000</code>
- </ul>
- <br>Optional parameter [reading] will be written to STATE if provided.<br>
- <br>Example:<br>
- <br>
- <ul><code>define clone_OWX_26_09FF26010000 cloneDummy OWX_26_09FF26010000 temperature</code>
- </ul>
- <br>
- </ul>
- <a name="cloneDummyset"></a>
- <b>Set</b>
- <ul>N/A
- </ul>
- <br>
- <a name="cloneDummyget"></a>
- <b>Get</b>
- <ul>N/A
- </ul>
- <br>
- <a name="cloneDummyattr"></a>
- <b>Attributes</b>
- <ul><li>addStateEvent
- <br>When paremeter in Modul is set to 1 the originalstate of the original Device will be STATE
- (Momentarily not possible in Connection with FHEM2FHEM)</li>
- <br>
- <li>cloneIgnore
- <br>- comma separated list of readingnames that will NOT be generated.<br>
- Useful to prevent truncated readingnames coming from state events.</li>
- <br>
- <li>deleteBeforeUpdate<br>
- If set to 1, all readings will be deleted befor update.</li>
- <br>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- <b>Important: You MUST use different names for cloneDevice and sourceDevice!</b><br>
- </ul>
- <p><a name="cmdalias"></a>
- <h3>cmdalias</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#cmdalias'>DE</a>]</div>
- <ul>
- create new FHEM commands or replace internal ones.
- <br><br>
- <a name="cmdaliasdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> cmdalias <cmd_to_be_replaced or new_cmd>
- [parameter] AS <existing_cmd></code><br>
- <br>
- parameter is optional and is a regexp which must match the command
- entered.
- If it matches, then the specified <existing_command> will be
- executed, which is a FHEM command (see <a href="#command">FHEM command
- types</a> for details). Like in <a href="#notify">notify</a>, $EVENT or
- $EVTPART may be used, in this case representing the
- command arguments as whole or the unique words entered.<br>
- </ul>
- Notes:<ul>
- <li>recursion is not allowed.</li>
- <li>if there are multiple definitions, they are checked/executed in
- alphabetically sorted <name> oder.</li>
- </ul>
- Examples:
- <ul><code>
- define s1 cmdalias shutdown update AS save;;shutdown<br>
- define s2 cmdalias set lamp .* AS { Log 1, "$EVENT";; fhem("set $EVENT") }
- </code></ul>
- <a name="cmdaliasattr"></a>
- <b>Attribute</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- </ul>
- </ul>
- <p><a name="configDB"></a>
- <h3>configDB</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#configDB'>DE</a>]</div>
- <ul>
- <a href="https://forum.fhem.de/index.php?board=46.0">Link to FHEM forum</a><br/><br/>
- This is the core backend library for configuration from SQL database.<br/>
- See <a href="#configdb">configdb command documentation</a> for detailed info.<br/>
- </ul>
- <p><a name="configdb"></a>
- <h3>configdb</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#configdb'>DE</a>]</div>
- <ul>
- <a href="https://forum.fhem.de/index.php?board=46.0">Link to FHEM forum</a><br/><br/>
- Starting with version 5079, fhem can be used with a configuration database instead of a plain text file (e.g. fhem.cfg).<br/>
- This offers the possibility to completely waive all cfg-files, "include"-problems and so on.<br/>
- Furthermore, configDB offers a versioning of several configuration together with the possibility to restore a former configuration.<br/>
- Access to database is provided via perl's database interface DBI.<br/>
- <br/>
- <b>Interaction with other modules</b><br/>
- <ul><br/>
- Currently the fhem modules<br/>
- <br/>
- <li>02_RSS.pm</li>
- <li>55_InfoPanel.pm</li>
- <li>91_eventTypes</li>
- <li>93_DbLog.pm</li>
- <li>95_holiday.pm</li>
- <li>98_SVG.pm</li>
- <br/>
- will use configDB to read their configuration data from database<br/>
- instead of formerly used configuration files inside the filesystem.<br/>
- <br/>
- This requires you to import your configuration files from filesystem into database.<br/>
- <br/>
- Example:<br/>
- <code>configdb fileimport FHEM/nrw.holiday</code><br/>
- <code>configdb fileimport FHEM/myrss.layout</code><br/>
- <code>configdb fileimport www/gplot/xyz.gplot</code><br/>
- <br/>
- <b>This does not affect the definitons of your holiday or RSS entities.</b><br/>
- <br/>
- <b>During migration all external configfiles used in current configuration<br/>
- will be imported aufmatically.</b><br>
- <br/>
- Each fileimport into database will overwrite the file if it already exists in database.<br/>
- <br/>
- </ul><br/>
- <br/>
- <b>Prerequisits / Installation</b><br/>
- <ul><br/>
- <li>Please install perl package Text::Diff if not already installed on your system.</li><br/>
- <li>You must have access to a SQL database. Supported database types are SQLITE, MYSQL and POSTGRESQL.</li><br/>
- <li>The corresponding DBD module must be available in your perl environment,<br/>
- e.g. sqlite3 running on a Debian systems requires package libdbd-sqlite3-perl</li><br/>
- <li>Create an empty database, e.g. with sqlite3:<br/>
- <pre>
- mba:fhem udo$ sqlite3 configDB.db
- SQLite version 3.7.13 2012-07-17 17:46:21
- Enter ".help" for instructions
- Enter SQL statements terminated with a ";"
- sqlite> pragma auto_vacuum=2;
- sqlite> .quit
- mba:fhem udo$
- </pre></li>
- <li>The database tables will be created automatically.</li><br/>
- <li>Create a configuration file containing the connection string to access database.<br/>
- <br/>
- <b>IMPORTANT:</b>
- <ul><br/>
- <li>This file <b>must</b> be named "configDB.conf"</li>
- <li>This file <b>must</b> be located in the same directory containing fhem.pl and configDB.pm, e.g. /opt/fhem</li>
- </ul>
- <br/>
- <pre>
- ## for MySQL
- ################################################################
- #%dbconfig= (
- # connection => "mysql:database=configDB;host=db;port=3306",
- # user => "fhemuser",
- # password => "fhempassword",
- #);
- ################################################################
- #
- ## for PostgreSQL
- ################################################################
- #%dbconfig= (
- # connection => "Pg:database=configDB;host=localhost",
- # user => "fhemuser",
- # password => "fhempassword"
- #);
- ################################################################
- #
- ## for SQLite (username and password stay empty for SQLite)
- ################################################################
- #%dbconfig= (
- # connection => "SQLite:dbname=/opt/fhem/configDB.db",
- # user => "",
- # password => ""
- #);
- ################################################################
- </pre></li><br/>
- </ul>
- <b>Start with a complete new "fresh" fhem Installation</b><br/>
- <ul><br/>
- It's easy... simply start fhem by issuing following command:<br/><br/>
- <ul><code>perl fhem.pl configDB</code></ul><br/>
- <b>configDB</b> is a keyword which is recognized by fhem to use database for configuration.<br/>
- <br/>
- <b>That's all.</b> Everything (save, rereadcfg etc) should work as usual.
- </ul>
- <br/>
- <b>or:</b><br/>
- <br/>
- <b>Migrate your existing fhem configuration into the database</b><br/>
- <ul><br/>
- It's easy, too... <br/>
- <br/>
- <li>start your fhem the last time with fhem.cfg<br/><br/>
- <ul><code>perl fhem.pl fhem.cfg</code></ul></li><br/>
- <br/>
- <li>transfer your existing configuration into the database<br/><br/>
- <ul>enter<br/><br/><code>configdb migrate</code><br/>
- <br/>
- into frontend's command line</ul><br/></br>
- Be patient! Migration can take some time, especially on mini-systems like RaspberryPi or Beaglebone.<br/>
- Completed migration will be indicated by showing database statistics.<br/>
- Your original configfile will not be touched or modified by this step.</li><br/>
- <li>shutdown fhem</li><br/>
- <li>restart fhem with keyword configDB<br/><br/>
- <ul><code>perl fhem.pl configDB</code></ul></li><br/>
- <b>configDB</b> is a keyword which is recognized by fhem to use database for configuration.<br/>
- <br/>
- <b>That's all.</b> Everything (save, rereadcfg etc) should work as usual.
- </ul>
- <br/><br/>
- <b>Additional functions provided</b><br/>
- <ul><br/>
- A new command <code>configdb</code> is propagated to fhem.<br/>
- This command can be used with different parameters.<br/>
- <br/>
- <li><code>configdb attr [attribute] [value]</code></li><br/>
- Provides the possibility to pass attributes to backend and frontend.<br/>
- <br/>
- <code> configdb attr private 1</code> - set the attribute named 'private' to value 1.<br/>
- <br/>
- <code> configdb attr private</code> - delete the attribute named 'private'<br/>
- <br/>
- <code> configdb attr</code> - show all defined attributes.<br/>
- <br/>
- <ul>Supported attributes:</ul>
- <br/>
- <ul><b>deleteimported</b> if set to 1 files will always be deleted from filesystem after import to database.<br/></ul><br/>
- <ul><b>maxversions</b> set the maximum number of configurations stored in database. <br/>
- The oldest version will be dropped in a "save config" if it would exceed this number.</ul><br/>
- <ul><b>private</b> if set to 1 the user and password info will not be shown in 'configdb info' output.</ul><br/>
- <ul><b>useCache</b> (experimental!) if set to 1 fileread from database will be cached.</ul><br/>
- <br/>
- <li><code>configdb diff <device> <version></code></li><br/>
- Compare configuration dataset for device <device>
- from current version 0 with version <version><br/>
- Example for valid request:<br/>
- <br/>
- <code>configdb diff telnetPort 1</code><br/>
- <br/>
- will show a result like this:
- <pre>
- compare device: telnetPort in current version 0 (left) to version: 1 (right)
- +--+--------------------------------------+--+--------------------------------------+
- | 1|define telnetPort telnet 7072 global | 1|define telnetPort telnet 7072 global |
- * 2|attr telnetPort room telnet * | |
- +--+--------------------------------------+--+--------------------------------------+</pre>
- <b>Special: configdb diff all current</b><br/>
- <br/>
- Will show a diff table containing all changes between saved version 0<br/>
- and UNSAVED version from memory (currently running installation).<br/>
- <br/>
- <li><code>configdb dump [unzipped]</code></li><br/>
- Create a gzipped dump file from from database.<br/>
- If optional parameter 'unzipped' provided, dump file will be written unzipped.<br/>
- <br/>
- <br/>
- <li><code>configdb filedelete <Filename></code></li><br/>
- Delete file from database.<br/>
- <br/>
- <br/>
- <li><code>configdb fileexport <targetFilename>|all</code></li><br/>
- Exports specified file (or all files) from database into filesystem.<br/>
- Example:<br/>
- <br/>
- <code>configdb fileexport FHEM/99_myUtils.pm</code><br/>
- <br/>
- <br/>
- <li><code>configdb fileimport <sourceFilename></code></li><br/>
- Imports specified text file from from filesystem into database.<br/>
- Example:<br/>
- <br/>
- <code>configdb fileimport FHEM/99_myUtils.pm</code><br/>
- <br/>
- <br/>
- <li><code>configdb filelist</code></li><br/>
- Show a list with all filenames stored in database.<br/>
- <br/>
- <br/>
- <li><code>configdb filemove <sourceFilename></code></li><br/>
- Imports specified fhem file from from filesystem into database and<br/>
- deletes the file from local filesystem afterwards.<br/>
- Example:<br/>
- <br/>
- <code>configdb filemove FHEM/99_myUtils.pm</code><br/>
- <br/>
- <br/>
- <li><code>configdb fileshow <Filename></code></li><br/>
- Show content of specified file stored in database.<br/>
- <br/>
- <br/>
- <li><code>configdb info</code></li><br/>
- Returns some database statistics<br/>
- <pre>
- --------------------------------------------------------------------------------
- configDB Database Information
- --------------------------------------------------------------------------------
- dbconn: SQLite:dbname=/opt/fhem/configDB.db
- dbuser:
- dbpass:
- dbtype: SQLITE
- --------------------------------------------------------------------------------
- fhemconfig: 7707 entries
- Ver 0 saved: Sat Mar 1 11:37:00 2014 def: 293 attr: 1248
- Ver 1 saved: Fri Feb 28 23:55:13 2014 def: 293 attr: 1248
- Ver 2 saved: Fri Feb 28 23:49:01 2014 def: 293 attr: 1248
- Ver 3 saved: Fri Feb 28 22:24:40 2014 def: 293 attr: 1247
- Ver 4 saved: Fri Feb 28 22:14:03 2014 def: 293 attr: 1246
- --------------------------------------------------------------------------------
- fhemstate: 1890 entries saved: Sat Mar 1 12:05:00 2014
- --------------------------------------------------------------------------------
- </pre>
- Ver 0 always indicates the currently running configuration.<br/>
- <br/>
- <li><code>configdb list [device] [version]</code></li><br/>
- Search for device named [device] in configuration version [version]<br/>
- in database archive.<br/>
- Default value for [device] = % to show all devices.<br/>
- Default value for [version] = 0 to show devices from current version.<br/>
- Examples for valid requests:<br/>
- <br/>
- <code>get configDB list</code><br/>
- <code>get configDB list global</code><br/>
- <code>get configDB list '' 1</code><br/>
- <code>get configDB list global 1</code><br/>
- <br/>
- <li><code>configdb recover <version></code></li><br/>
- Restores an older version from database archive.<br/>
- <code>configdb recover 3</code> will <b>copy</b> version #3 from database
- to version #0.<br/>
- Original version #0 will be lost.<br/><br/>
- <b>Important!</b><br/>
- The restored version will <b>NOT</b> be activated automatically!<br/>
- You must do a <code>rereadcfg</code> or - even better - <code>shutdown restart</code> yourself.<br/>
- <br/>
- <li><code>configdb reorg [keep]</code></li><br/>
- Deletes all stored versions with version number higher than [keep].<br/>
- Default value for optional parameter keep = 3.<br/>
- This function can be used to create a nightly running job for<br/>
- database reorganisation when called from an at-Definition.<br/>
- <br/>
- <li><code>configdb search <searchTerm> [searchVersion]</code></li><br/>
- Search for specified searchTerm in any given version (default=0)<br/>
- <pre>
- Example:
- configdb search %2286BC%
- Result:
- search result for: %2286BC% in version: 0
- --------------------------------------------------------------------------------
- define az_RT CUL_HM 2286BC
- define az_RT_Clima CUL_HM 2286BC04
- define az_RT_Climate CUL_HM 2286BC02
- define az_RT_ClimaTeam CUL_HM 2286BC05
- define az_RT_remote CUL_HM 2286BC06
- define az_RT_Weather CUL_HM 2286BC01
- define az_RT_WindowRec CUL_HM 2286BC03
- attr Melder_FAl peerIDs 00000000,2286BC03,
- attr Melder_FAr peerIDs 00000000,2286BC03,
- </pre>
- <br/>
- <li><code>configdb uuid</code></li><br/>
- Returns a uuid that can be used for own purposes.<br/>
- <br/>
- </ul>
- <br/>
- <br/>
- <b>Author's notes</b><br/>
- <br/>
- <ul>
- <li>You can find two template files for datebase and configfile (sqlite only!) for easy installation.<br/>
- Just copy them to your fhem installation directory (/opt/fhem) and have fun.</li>
- <br/>
- <li>The frontend option "Edit files"->"config file" will be removed when running configDB.</li>
- <br/>
- <li>Please be patient when issuing a "save" command
- (either manually or by clicking on "save config").<br/>
- This will take some moments, due to writing version informations.<br/>
- Finishing the save-process will be indicated by a corresponding message in frontend.</li>
- <br/>
- <li>There still will be some more (planned) development to this extension,
- especially regarding some perfomance issues.</li>
- <br/>
- <li>Have fun!</li>
- </ul>
- </ul>
- <p><a name="copy"></a>
- <h3>copy</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#copy'>DE</a>]</div>
- <ul>
- <code>copy <orig name> <copy name> [<type dependent arguments>]</code><br>
- <br>
- Create a copy of device <orig name> with the name <copy name>.<br>
- If <type dependent arguments> are given they will replace the DEF of <orig name> for the creation of <copy name>.
- </ul>
- <p><a name="count"></a>
- <h3>count</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#count'>DE</a>]</div>
- <ul>
- <code>count [devspec]</code>
- <br><br>
- Count devices specified by devspec.<br/>
- If no devspec given, count will return number of totally defined devices.<br/>
- </ul>
- <p><a name="dash_dhcp"></a>
- <h3>dash_dhcp</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#dash_dhcp'>DE</a>]</div>
- <ul>
- Module to integrate amazon dash buttons into FHEM;.<br><br>
- The module can listen direclty to dhcp broadcast messages or listen to redirected openwrt dhcp log messages.
- Notes:
- <ul>
- <li>if listening for dhcp messages the module has to run as root or you have to redirect port 67 with
- <ul><code>iptables -A PREROUTING -t nat -i eth0 -p udp --dport 67 -j REDIRECT --to-port 6767</code></ul>
- or
- <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>
- and use the port attribute to configure the redirected port.</li>
- <li>to make iptables rules permanent see for example: https://www.thomas-krenn.com/de/wiki/Iptables_Firewall_Regeln_dauerhaft_speichern</li>
- </ul>
- <a name="dash_dhcp_Attr"></a>
- <b>Attr</b>
- <ul>
- <li>devAlias<br>
- space separated list of <mac>:<alias> pairs.</li>
- <li>allowed<br>
- comma separated list of allowed mac adresses</li>
- <li>port<br>
- the listen port. defaults to 67 for root and 6767 for other users.</li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- </ul><br>
- </ul><br>
- <p><a name="deletefile"></a>
- <h3>deletefile</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#deletefile'>DE</a>]</div>
- <ul>
- <code>deletefile <filename></code><br/>
- <br/>Delete a file in filesystem.<br/>
- <br/>
- <li>File must be listed in "Edit files"</li>
- <li>File fhem.cfg must not be deleted.</li>
- <li>Wildcards are not evaluated.</li>
- </ul>
- <p><a name="dewpoint"></a>
- <h3>dewpoint</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#dewpoint'>DE</a>]</div>
- <ul>
- Dewpoint calculations. Offers three different ways to use dewpoint: <br>
- <ul>
- <li><b>dewpoint</b><br>
- Compute additional event dewpoint from a sensor offering temperature and humidity.</li>
- <li><b>fan</b><br>
- Generate a event to turn a fan on if the outside air has less water than the inside.</li>
- <li><b>alarm</b><br>
- Generate a mold alarm if a reference temperature is lower that the current dewpoint.</li>
- <br>
- </ul>
- <a name="dewpointdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> dewpoint dewpoint <devicename-regex> [<temp_name> <hum_name> <new_name>]</code><br>
- <br>
- <ul>
- Calculates dewpoint for device <devicename-regex> from temperature and humidity
- and write it to a new reading named dewpoint.
- If optional <temp_name>, <hum_name> and <new_name> is specified
- then read temperature from reading <temp_name>, humidity from reading <hum_name>
- and write the calculated dewpoint to reading <new_name>.<br>
- If <temp_name> is T then use temperature from state T: H:, add <new_name> to the state.
- </ul>
- <br>
- Example:<PRE>
- # Compute the dewpoint for the temperature/humidity
- # events of the temp1 device and generate reading dewpoint.
- define dew_temp1 dewpoint dewpoint temp1
- define dew_temp1 dewpoint dewpoint temp1 temperature humidity dewpoint
- # Compute the dewpoint for the temperature/humidity
- # events of all devices offering temperature and humidity
- # and generate reading dewpoint.
- define dew_all dewpoint dewpoint .*
- define dew_all dewpoint dewpoint .* temperature humidity dewpoint
- # Compute the dewpoint for the temperature/humidity
- # events of the device Aussen_1 offering temperature and humidity
- # and insert is into STATE.
- define dew_state dewpoint dewpoint Aussen_1 T H D
- # Compute the dewpoint for the temperature/humidity
- # events of all devices offering temperature and humidity
- # and insert the result into the STATE.
- # Example STATE: "T: 10 H: 62.5" will change to
- # "T: 10 H: 62.5 D: 3.2"
- define dew_state dewpoint dewpoint .* T H D
- </PRE>
- </ul>
- <ul>
- <code>define <name> dewpoint fan <devicename-regex> <devicename-outside> <min-temp> [<diff_temp>]</code><br>
- <br>
- <ul>
- May be used to turn an fan on or off if the outside air has less water.
- <ul>
- <li>
- Generate event "fan: on" if (dewpoint of <devicename-outside>) + <diff_temp> is lower
- than dewpoint of <devicename> and temperature of <devicename-outside> is >= min-temp
- and reading "fan" was not already "on". The event will be generated for <devicename>. Parameter <diff-temp> is optional</li>
- <li>Generate event "fan: off": else and if reading "fan" was not already "off".</li>
- </ul>
- </ul>
- <br>
- Example:<PRE>
- # Generate event "fan: on" when dewpoint of Aussen_1 is first
- # time lower than basement_tempsensor and outside temperature is >= 0
- # and change it to "fan: off" is this condition changes.
- # Set a switch on/off (fan_switch) depending on the state.
- define dew_fan1 dewpoint fan basement_tempsensor Aussen_1 0
- define dew_fan1_on notify basement_tempsensor.*fan:.*on set fan_switch on
- define dew_fan1_off notify basement_tempsensor.*fan:.*off set fan_switch off
- </PRE>
- </ul>
- <ul>
- <code>define <name> dewpoint alarm <devicename-regex> <devicename-reference> <diff-temp></code><br>
- <br>
- <ul>
- Generate a mold alarm if a reference temperature is lower that the current dewpoint.
- <ul>
- <li>
- Generate reading/event "alarm: on" if temperature of <devicename-reference> - <diff-temp> is lower
- than dewpoint of <devicename> and reading "alarm" was not already "on". The event will be generated for <devicename>.</li>
- <li>Generate reading/event "alarm: off" if temperature of <devicename-reference> - <diff-temp> is higher than dewpoint of <devicename> and reading "alarm" was not already "off".</li>
- </ul>
- </ul>
- <br>
- Example:<PRE>
- # Using a wall temperature sensor (wallsensor) and a temp/hum sensor
- # (roomsensor) to alarm if the temperature of the wall is lower than
- # the dewpoint of the air. In this case the water of the air will
- # condense on the wall because the wall is cold.
- # Set a switch on (alarm_siren) if alarm is on using notify.
- define dew_alarm1 dewpoint alarm roomsensor wallsensor 0
- define roomsensor_alarm_on notify roomsensor.*alarm:.*on set alarm_siren on
- define roomsensor_alarm_off notify roomsensor.*alarm:.*off set alarm_siren off
- # If you do not have a temperature sensor in/on the wall, you may also
- # compare the rooms dewpoint to the temperature of the same or another
- # inside sensor. Alarm is temperature is 5 degrees colder than the
- # inside dewpointinside.
- define dev_alarm2 dewpoint alarm roomsensor roomsensor 5
- </PRE>
- </ul>
- <a name="dewpointset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="dewpointget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="dewpointattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li>absFeuchte</li><br>
- <ul>
- AbsFeuchte also becomes by the absolute humidity set the attribute into the Readings of all things.
- One can by these show information also in the status.
- Example: (<Adapter> = the FHEM name of the adapter this one you must change)
- <PRE>
- stateFormat:
- {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))}
- </PRE>
- </ul>
- <li>max_timediff<br>
- 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>
- If not set default is 1 second.
- <br><br>
- Examples:<PRE>
- # allow maximum time difference of 60 seconds
- define dew_all dewpoint dewpoint .*
- attr dew_all max_timediff 60
- </li><br>
- </ul>
- </ul>
- <p><a name="dummy"></a>
- <h3>dummy</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#dummy'>DE</a>]</div>
- <ul>
- Define a dummy. A dummy can take via <a href="#set">set</a> any values.
- Used for programming.
- <br><br>
- <a name="dummydefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> dummy</code>
- <br><br>
- Example:
- <ul>
- <code>define myvar dummy</code><br>
- <code>set myvar 7</code><br>
- </ul>
- </ul>
- <br>
- <a name="dummyset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> <value></code><br>
- Set any value.
- </ul>
- <br>
- <a name="dummyget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="dummyattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a name="readingList">readingList</a><br>
- Space separated list of readings, which will be set, if the first
- argument of the set command matches one of them.</li>
- <li><a name="setList">setList</a><br>
- Space separated list of commands, which will be returned upon "set name
- ?", so the FHEMWEB frontend can construct a dropdown and offer on/off
- switches. Example: attr dummyName setList on off </li>
- <li><a name="useSetExtensions">useSetExtensions</a><br>
- If set, and setList contains on and off, then the
- <a href="#setExtensions">set extensions</a> are supported.
- In this case no arbitrary set commands are accepted, only the setList and
- the set exensions commands.</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="eventTypes"></a>
- <h3>eventTypes</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#eventTypes'>DE</a>]</div>
- <ul>
- <br>
- <a name="eventTypesdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> eventTypes <filename></code>
- <br><br>
- Collect event types for all devices. This service is used by frontends,
- e.g. notify and FileLog, to assist you in selecting the correct events.
- The filename is used to store the collected events before shutdown.<br>
- More than one instance of eventTypes should not be necessary.
- Examples:
- <ul>
- <code>define et eventTypes log/eventTypes.txt</code><br>
- </ul>
- <br>
- </ul>
- <br>
- <a name="eventTypesset"></a>
- <b>Set</b>
- <ul>
- <li>flush<br>
- used to write all collected event types into datafile.
- </li>
- <br/>
- <li>clear<br>
- used to clear the internal table containing all collected event types.
- </li>
- </ul>
- <br>
- <a name="eventTypesget"></a>
- <b>Get</b>
- <ul>
- <li>list [devicename]<br>
- return the list of collected event types for all devices or for
- devicename if specified.
- </li>
- </ul>
- <br>
- <a name="eventTypesattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <a name="ignoreList"></a>
- <li>ignoreList<br>
- Comma separated device names to ignore whe collecting the events.
- E.g. ECMD-Devices are used to post RAW data as events.
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="expandJSON"></a>
- <h3>expandJSON</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#expandJSON'>DE</a>]</div>
- <ul>
- <p>Expand a JSON string from a reading into individual readings</p>
- <ul>
- <li>Requirement: perl module JSON<br>
- Use "cpan install JSON" or operating system's package manager to install
- Perl JSON Modul. Depending on your os the required package is named:
- libjson-perl or perl-JSON.
- </li>
- </ul><br>
-
- <a name="expandJSONdefine"></a>
- <b>Define</b><br><br>
-
- <ul>
- <code>define <name> expandJSON <source_regex>
- [<target_regex>]</code><br><br>
- <li>
- <a name=""><name></a><br>
- A name of your choice.</li><br>
- <li>
- <a name=""><source_regex></a><br>
- Regexp that must match your devices, readings and values that contain
- the JSON strings. Regexp syntax is the same as used by notify and must not
- contain spaces.<br>
- </li><br>
-
- <li>
- <a name=""><target_regex></a><br>
- Optional: This regexp is used to determine whether the target reading is
- converted or not at all. If not set then all readings will be used. If set
- then only matching readings will be used. Regexp syntax is the same as
- used by notify and must not contain spaces.<br>
- </li><br>
- <li>
- Examples:<br>
- <br>
- <u>Source reading:</u><br>
- <code>
- device:{.*} #state without attribute addStateEvent<br>
- device:state:.{.*} #state with attribute addStateEvent<br>
- device:reading:.{.*}<br>
- Sonoff.*:ENERGY.*:.{.*}<br>
- .*wifiIOT.*:.*sensor.*:.{.*}<br>
- (?i)dev.*:(sensor1|sensor2|teleme.*):.{.*}<br>
- (devX:{.*}|devY.*:jsonY:.{.*Wifi.*{.*SSID.*}.*})
- </code><br>
- <br>
- <u>Target reading:</u><br>
- <code>.*power.*</code><br>
- <code>(Power|Current|Voltage|.*day)</code><br><br>
- <u>Complete definitions:</u><br>
- <code>define ej1 expandJSON device:sourceReading:.{.*} targetReading
- </code><br>
- <code>define ej2 expandJSON Sonoff.*:ENERGY.*:.{.*} (Power|.*day)
- </code><br>
- <code>define ej3 expandJSON (?i).*_sensordev_.*:.*:.{.*}
- </code><br><br>
-
- </li><br>
- </ul>
- <a name="expandJSONset"></a>
- <b>Set</b><br><br>
- <ul>
- N/A<br><br>
- </ul>
-
- <a name="expandJSONget"></a>
- <b>Get</b><br><br>
- <ul>
- N/A<br><br>
- </ul>
-
- <a name="expandJSON_attr"></a>
- <b>Attributes</b><br><br>
- <ul>
- <li><a name="expandJSON_attr_addReadingsPrefix">addReadingsPrefix</a><br>
- Add source reading as prefix to new generated readings. Useful if you have
- more than one reading with a JSON string that should be converted.
- </li><br>
- <li><a name="expandJSON_attr_disable">disable</a><br>
- Used to disable this device.
- </li><br>
-
- <li><a name="expandJSON_attr_do_not_notify">do_not_notify</a><br>
- Do not generate events for converted readings at all. Think twice before
- using this attribute. In most cases, it is more appropriate to use
- event-on-change-reading in target devices.
- </li><br>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a href="#addStateEvent">addStateEvent</a></li>
- </ul>
- </ul>
- <p><a name="fakeRoku"></a>
- <h3>fakeRoku</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#fakeRoku'>DE</a>]</div>
- <ul>
- This module allows you to add a 'fake' roku player device to a harmony hub based remote and to receive and
- process configured key presses in FHEM.
- <br><br>
- Notes:
- <ul>
- <li>XML::Simple is needed.</li>
- <li>IO::Socket::Multicast is needed.</li>
- <li>The following 12 functions are available and can be used:
- <ul>
- <li>InstantReplay</li>
- <li>Home</li>
- <li>Info</li>
- <li>Search</li>
- <li>Back</li>
- <li>FastForward = Fwd</li>
- <li>Rewind = Rev</li>
- <li>Select</li>
- <li>DirectionUp</li>
- <li>DirectionRight</li>
- <li>DirectionLeft</li>
- <li>DirectionDown</li>
- </ul></li>
- </ul>
- <br><br>
- <a name="fakeRoku_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> fakeRoku</code>
- <br><br>
- </ul>
- <a name="fakeRoku_Set"></a>
- <b>Set</b>
- <ul>none
- </ul><br>
- <a name="fakeRoku_Get"></a>
- <b>Get</b>
- <ul>none
- </ul><br>
- <a name="fakeRoku_Attr"></a>
- <b>Attr</b>
- <ul>
- <li>favourites<br>
- comma separated list of names to use as apps/channels/favourites. the list can be reloaded on the harmony with edit->reset.</li>
- <li>fhemIP<br>
- overwrites autodetected local ip used in advertising</li>
- <li>httpPort</li>
- <li>reusePort<br>
- not set -> set ReusePort on multicast socket if SO_REUSEPORT flag ist known. should work in most cases.<br>
- 0 -> don't set ReusePort on multicast socket<br>
- 1 -> set ReusePort on multicast socket</li>
- <li>serial</li>
- </ul>
- </ul><br>
- <p><a name="fhemdebug"></a>
- <h3>fhemdebug</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#fhemdebug'>DE</a>]</div>
- <ul>
- <code>fhemdebug {enable|disable|status|}</code><br>
- <br>
- <ul>
- <li>enable/disable/status<br>
- fhemdebug produces debug information in the FHEM Log to help localize
- certain error messages. Currently following errors are examined:
- <ul>
- - Error: >...< has no TYPE, but following keys: >...<<br>
- </ul>
- As it frequently examines internal data-structures, it uses a lot of CPU,
- it is not recommended to enable it all the time. A FHEM restart after
- disabling it is not necessary.<br>
- </li>
- <li>memusage [regexp] [nr]<br>
- Dump the name of the first nr datastructures with the largest memory
- footprint. Filter the names by regexp, if specified.<br>
- <b>Notes</b>:
- <ul>
- <li>this function depends on the Devel::Size module, so this must be
- installed first.</li>
- <li>The used function Devel::Size::size may crash perl (and FHEM) for
- functions and some other data structures. memusage tries to avoid to
- call it for such data structures, but as the problem is not identified,
- it may crash your currently running instance. It works for me, but make
- sure you saved your fhem.cfg before calling it.</li>
- <li>To avoid the crash, the size of same data is not computed, so the
- size reported is probably inaccurate, it should only be used as a hint.
- </li>
- </ul>
- </li>
- </ul>
- </ul>
- <p><a name="fheminfo"></a>
- <h3>fheminfo</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#fheminfo'>DE</a>]</div>
- <ul>
- <code>fheminfo [send]</code>
- <br>
- <br>
- fheminfo displays information about the system and FHEM definitions.
- <br>
- <br>
- The optional parameter <code>send</code> transmitts the collected data
- to a central server in order to support the development of FHEM. <br/>
- The submitted data is processed graphically. The results can be viewed
- on <a href="https://fhem.de/stats/statistics.html">http://fhem.de/stats/statistics.html</a>.<br/>
- The IP address will not be stored in database, only used for region determination during send.
- <br>
- <br>
- Features:<br>
- <ul>
- <li>ConfigType (configDB|configFILE)</li>
- <li>SVN rev number</li>
- <li>Operating System Information</li>
- <li>Installed Perl version</li>
- <li>Defined modules</li>
- <li>Defined models per module</li>
- </ul>
- <br>
- <a name="fheminfoattr"></a>
- <b>Attributes</b>
- <br>
- <br>
- The following attributes are used only in conjunction with the
- <code>send</code> parameter. They are set on <code>attr global</code>.
- <br>
- <br>
- <ul>
- <li>sendStatistics<br>
- This attribute is used in conjunction with the <code>update</code> command.
- <br>
- <code>onUpdate</code>: transfer of data on every update (recommended setting).
- <br>
- <code>manually</code>: manually transfer of data via the <code>fheminfo send</code> command.
- <br>
- <code>never</code>: prevents transmission of data at anytime.
- </li>
- <br>
- </ul>
- </ul>
- <p><a name="freezemon"></a>
- <h3>freezemon</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#freezemon'>DE</a>]</div>
- <div>
- <ul>
- FREEZEMON monitors - similar to PERFMON possible freezes, however FREEZEMON is a real module, hence it has:<br><br>
- <ul>
- <li>Readings - which might be logged for easier analysis</li>
- <li>Attributes - to influence the behaviour of the module</li>
- <li>additional functionality - which tries to identify the device causing the freeze</li>
- </ul>
- It's recommended to deactivate PERFMON once FREEZEMON is active. They anyways detect the same freezes thus everything would be duplicated.<br><br>
- <b>Please note!</b> FREEZEMON just does an educated guess, which device could have caused the freeze based on timers that were supposed to run. There might be a lot of other factors (internal or external) causing freezes. FREEZEMON doesn't replace a more detailed analysis. The module just tries to give you some hints what could be optimized.<br><br>
- <a name="freezemonDefine"></a>
- <b>Define</b>
- <ul>
- FREEZEMON will be defined without Parameters.
- <br><br>
- <code>define <devicename> freezemon</code><br><br>
- With that freezemon is active (and you should see a message in the log) <br><br>
- </ul>
- <a name="freezemonSet"></a>
- <b>Set</b>
- <ul>
- <ul>
- <li>inactive: disables the device (similar to attribute "disable", however without the need to save</li>
- <li>active: reactivates the device after it was set inactive</li>
- <li>clear: clears all readings (including the list of the last 20 freezes.)</li>
- </ul>
- </ul>
- <a name="freezemonGet"></a>
- <b>Get</b>
- <ul>
- <ul>
- <li>freeze: returns the last 20 (in compact view, like in state) - This is for a quick overview. For detailed analysis the data should be logged.</li>
- <li>log: provides direct access to the logfiles written when fm_logFile is active</li>
- </ul>
- </ul>
-
- <a name="freezemonReadings"></a>
- <b>Readings</b>
- <ul>
- <ul>
- <li>freezeTime: Duration of the freeze</li>
- <li>freezeDevice: List of functions(Devices) that possibly caused the freeze</li>
- <li>fcDay: cumulated no. of freezes per day</li>
- <li>ftDay: cumulated duration of freezes per day</li>
- <li>fcDayLast: stores cumulated no. of freezes of the last day (for daily plots)</li>
- <li>fcDayLast: stores cumulated duration of freezes of the last day (for daily plots)</li>
- <li>state: s:<startTime> e:<endTime> f:<Duration> d:<Devices></li>;
- </ul>
- </ul>
- <a name="freezemonAttributes"></a>
- <b>Attributes</b>
- <ul>
- <ul>
- <li>fm_extDetail: provides in some cases extended details for recognized freezes. In some cases it was reported that FHEM crashes, so please be careful.</li>
- <li>fm_freezeThreshold: Value in seconds (Default: 1) - Only freezes longer than fm_freezeThreshold will be considered as a freeze</li>
- <li>fm_forceApptime: When FREEZEMON is active, apptime will automatically be started (if not yet active)</li>
- <li>fm_ignoreDev: list of comma separated Device names. If all devices possibly causing a freeze are in the list, the freeze will be ignored (not logged)</li>
- <li>fm_ignoreMode: takes the values off,single or all. If you have added devices to fm_ignoreDev then ignoreMode acts as follows: <br>
- all: A freeze will only be ignored, if all devices probably causing the freeze are part of the ignore list. This might result in more freezes being logged than expected.<br>
- single: A freeze will be ignored as soon as one device possibly causing the freeze is listed in the ignore list. With this setting you might miss freezes.<br>
- off: All freezes will be logged.<br>
- If the attribute is not set, while the ignore list is maintained, mode "all" will be used.</li>
- <li>fm_log: dynamic loglevel, takes a string like 10:1 5:2 1:3 , which means: freezes > 10 seconds will be logged with loglevel 1 , >5 seconds with loglevel 2 etc...</li>
- <li>fm_logFile: takes a valid file name (like e.g. ./log/freeze-%Y%m%d-%H%M%S.log). If set, logs messages of loglevel 5 (even if global loglevel is < 5) before a freeze in separate file.</li>
- <li>fm_logExtraSeconds: defines how much seconds before the freeze are logged (if fm_logFile is set)</li>
- <li>fm_logKeep: A number that defines how many logFiles should be kept. If set all logfiles except the latest n freezemon logfiles will be deleted regularly.</li>
- <li>fm_whitelistSub: Comma-separated list of subroutines that you're sure that don't cause a freeze. Whitelisted Subs do not appear in the "possibly caused by" list. Typically you would list subroutines here that frequently appear in the "possibly caused by" list, but you're really sure they are NOT the issue. Note: The subroutine is the initial part (before the devicename in brackets) in freezemon log messages. </li>
- <li>disable: activate/deactivate freeze detection</li>
- </ul>
- </ul>
- </ul>
- </div>
- <p><a name="harmony"></a>
- <h3>harmony</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#harmony'>DE</a>]</div>
- <ul>
- Defines a device to integrate a Logitech Harmony Hub based remote control into fhem.<br><br>
- It is possible to: start and stop activities, send ir commands to devices, send keyboard input by bluetooth and
- smart keyboard usb dongles.<br><br>
- You probably want to use it in conjunction with the <a href="#fakeRoku">fakeRoku</a> module.<br><br>
- Notes:
- <ul>
- <li>JSON has to be installed on the FHEM host.</li>
- <li>For hubs with firmware version 3.x.y <username> and <password> are not required as no authentication
- with the logitech myharmony server is needed for the full functionality of this module.</li>
- <li>For hubs with firmware version 4.x.y <username> and <password> are required for device level control.
- Activit level control is (currently) still possible without authentication.</li>
- <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>
- </ul><br>
- <a name="harmony_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> harmony [<username> <password>] <ip></code><br>
- <br>
- Defines a harmony device.<br><br>
- Examples:
- <ul>
- <code>define hub harmony 10.0.1.4</code><br>
- </ul>
- </ul><br>
- <a name="harmony_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>currentActivity<br>
- the name of the currently selected activity.</li>
- <li>previousActivity<br>
- the name of the previous selected activity. does not trigger an event.</li>
- <li>newVersion<br>
- will be set if a new firmware version is avaliable.</li>
- </ul><br>
- <a name="harmony_Internals"></a>
- <b>Internals</b>
- <ul>
- <li>currentActivityID<br>
- the id of the currently selected activity.</li>
- <li>previousActivityID<br>
- the id of the previous selected activity.</li>
- <li>sleeptimer<br>
- timeout for sleeptimer if any is set.</li>
- </ul><br>
- <a name="harmony_Set"></a>
- <b>Set</b>
- <ul>
- <li>activity <id>|<name> [<channel>]<br>
- switch to this activit and optionally switch to <channel></li>
- <li>channel <channel><br>
- switch to <channel> in the current activity</li>
- <li>command [<id>|<name>] <command> [duration=<duration>]<br>
- send the given ir command for the current activity or for the given device</li>
- <li>getConfig<br>
- request the configuration from the hub</li>
- <li>getCurrentActivity<br>
- request the current activity from the hub</li>
- <li>off<br>
- switch current activity off</li>
- <li>reconnect [all]<br>
- close connection to the hub and reconnect, if <code>all</code> is given also reconnect to the logitech server</li>
- <li>sleeptimer [<timeout>]<br>
- <timeout> -> timeout in minutes<br>
- -1 -> timer off<br>
- default -> 60 minutes</li>
- <li>sync<br>
- syncs the hub to the myHarmony config</li>
- <li>hidDevice [<id>|<name>]<br>
- sets the target device for keyboard commands, if no device is given -> set the target to the
- default device for the current activity.</li>
- <li>text <text><br>
- sends <text> by bluetooth/smart keaboard dongle. a-z ,A-Z ,0-9, \n, \e, \t and space are currently possible</li>
- <li>cursor <direction><br>
- moves the cursor by bluetooth/smart keaboard dongle. <direction> can be one of: up, down, left, right, pageUp, pageDown, home, end.</li>
- <li>special <key><br>
- sends special key by bluetooth/smart keaboard dongle. <key> can be one of: previousTrack, nextTrack, stop, playPause, volumeUp, volumeDown, mute.</li>
- <li>autocreate [<id>|<name>]<br>
- creates a fhem device for a single/all device(s) in the harmony hub. if activities are startet the state
- of these devices will be updatet with the power state defined in these activites.</li>
- <li>update<br>
- triggers a firmware update. only available if a new firmware is available.</li>
- <li>inactive<br>
- inactivates the current device. note the slight difference to the
- disable attribute: using set inactive the state is automatically saved
- to the statefile on shutdown, there is no explicit save necesary.<br>
- this command is intended to be used by scripts to temporarily
- deactivate the harmony device.<br>
- the concurrent setting of the disable attribute is not recommended.</li>
- <li>active<br>
- activates the current device (see inactive).</li>
- </ul>
- The command, hidDevice, text, cursor and special commmands are also available for the autocreated devices. The <id>|<name> paramter hast to be omitted.<br><br>
- <a name="harmony_Get"></a>
- <b>Get</b>
- <ul>
- <li>activites [<param>]<br>
- lists all activities<br>
- parm = power -> list power state for each device in activity</li>
- <li>devices [<param>]<br>
- lists all devices</li>
- <li>commands [<id>|<name>]<br>
- lists the commands for the specified activity or for all activities</li>
- <li>deviceCommands [<id>|<name>]<br>
- lists the commands for the specified device or for all devices</li>
- <li>activityDetail [<id>|<name>]</li>
- <li>deviceDetail [<id>|<name>]</li>
- <li>configDetail</li>
- <li>currentActivity<br>
- returns the current activity name</li>
- <li>showAccount<br>
- display obfuscated user and password in cleartext</li>
- </ul>
- The commands commmand is also available for the autocreated devices. The <id>|<name> paramter hast to be omitted.<br><br>
- <a name="harmony_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>disable<br>
- 1 -> disconnect from the hub</li>
- </ul>
- </ul>
- <p><a name="help"></a>
- <h3>?, help</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#help'>DE</a>]</div>
- <ul>
- <code>? [<moduleName|deviceName>] [<language>]</code><br/>
- <code>help [<moduleName|deviceName>] [<language>]</code><br/>
- <br/>
- <ul>
- <li>Returns a list of available commands, when called without a
- moduleName/deviceName.</li>
- <li>Returns a module dependent helptext, same as in commandref.</li>
- <li>language will be determined in following order:
- <ul>
- <li>valid parameter <language> given</li>
- <li>global attribute language</li>
- <li>nothing founde: return english</li>
- </ul>
- </li>
- </ul>
- </ul>
- <p><a name="holiday"></a>
- <h3>holiday</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#holiday'>DE</a>]</div>
- <ul>
- <a name="holidaydefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> holiday</code>
- <br><br>
- Define a set of holidays. The module will try to open the file
- <name>.holiday in the <a href="#modpath">modpath</a>/FHEM directory
- first, then in the modpath/FHEM/holiday directory, the latter containing a
- set of predefined files. This list of available holiday files will be shown
- if an error occurs at the time of the definition, e.g. if you type "define
- help holiday"<br>
- If entries in the holiday file match the current day, then the STATE of
- this holiday instance displayed in the <a href="#list">list</a> command
- will be set to the corresponding values, else the state is set to the text
- none. Most probably you'll want to query this value in some perl script:
- see Value() in the <a href="#perl">perl</a> section or the global attribute
- <a href="#holiday2we"> holiday2we</a>.<br> The file will be reread once
- every night, to compute the value for the current day, and by each get
- command (see below).<br>
- <br>
- Holiday file definition:<br>
- The file may contain comments (beginning with #) or empty lines.
- Significant lines begin with a number (type) and contain some space
- separated words, depending on the type. The different types are:<br>
- <ul>
- <li>1<br>
- Exact date. Arguments: <MM-DD> <holiday-name><br>
- Exampe: 1 12-24 Christmas
- </li>
- <li>2<br>
- Easter-dependent date. Arguments: <day-offset>
- <holiday-name>.
- The offset is counted from Easter-Sunday.
- <br>
- Exampe: 2 1 Easter-Monday<br>
- Sidenote: You can check the easter date with:
- fhem> { join("-", western_easter(2011)) }
- </li>
- <li>3<br>
- Month dependent date. Arguments: <nth> <weekday>
- <month <holiday-name>.<br>
- Examples:<br>
- <ul>
- 3 1 Mon 05 First Monday In May<br>
- 3 2 Mon 05 Second Monday In May<br>
- 3 -1 Mon 05 Last Monday In May<br>
- 3 0 Mon 05 Each Monday In May<br>
- </ul>
- </li>
- <li>4<br>
- Interval. Arguments: <MM-DD> <MM-DD> <holiday-name>
- .<br>
- Note: An interval cannot contain the year-end.
- Example:<br>
- <ul>
- 4 06-01 06-30 Summer holiday<br>
- 4 12-20 01-10 Winter holiday # DOES NOT WORK.
- Use the following 2 lines instead:<br>
- 4 12-20 12-31 Winter holiday<br>
- 4 01-01 01-10 Winter holiday<br>
- </ul>
- </li>
- <li>5<br>
- Date relative, weekday fixed holiday. Arguments: <nth>
- <weekday> <month> <day> < holiday-name><br>
- Note that while +0 or -0 as offsets are not forbidden, their behaviour
- is undefined in the sense that it might change without notice.<br>
- Examples:<br>
- <ul>
- 5 -1 Wed 11 23 Buss und Bettag (first Wednesday before Nov, 23rd)<br>
- 5 1 Mon 01 31 First Monday after Jan, 31st (1st Monday in February)<br>
- </ul>
- </li>
- </ul>
- </ul>
- <br>
- <a name="holidayset"></a>
- <b>Set</b>
- <ul>
- <li>createPrivateCopy<br>
- <ul>
- if the holiday file is opened from the FHEM/holiday directory (which is
- refreshed by FHEM-update), then it is readonly, and should not be
- modified. With createPrivateCopy the file will be copied to the FHEM
- directory, where it can be modified.
- </ul></li>
- <li>deletePrivateCopy<br>
- <ul>
- delete the private copy, see createPrivateCopy above
- </ul></li>
- <li>reload<br>
- <ul>
- set the state, tomorrow and yesterday readings. Useful after manually
- editing the file.
- </ul></li>
- </ul><br>
- <a name="holidayget"></a>
- <b>Get</b>
- <ul>
- <code>get <name> <MM-DD></code><br>
- <code>get <name> yesterday</code><br>
- <code>get <name> today</code><br>
- <code>get <name> tomorrow</code><br>
- <code>get <name> days <offset></code><br>
- <br><br>
- Return the holiday name of the specified date or the text none.
- <br><br>
- </ul>
- <br>
- <a name="holidayattr"></a>
- <b>Attributes</b><ul>N/A</ul><br>
- </ul>
- <p><a name="km200"></a>
- <h3>KM200</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#km200'>DE</a>]</div>
- <ul>
- <table>
- <tr>
- <td>
- 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>
- 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
- er/EasyControl-4848514.html"> EasyControl</a>.<BR>
- Furthermore it allows the maintenance companies to access the central heating control system to read and change settings.<BR>
- The km200 fhem-module enables read/write access to these parameters.<BR>
- <BR>
- 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>
- <BR>
- <b><u>Remark:</u></b><BR>
- 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>
- You should configure (or leave) your internet router with the respective settings.<BR>
- 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>
- <BR>
- As soon the module has been defined within the fhem.cfg, the module is trying to obtain all known/possible services. <BR>
- 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>
- This two different set of values can be bound to an individual polling interval. Refer to <a href="#KM200Attr">Attributes</a><BR>
- <BR>
- </td>
- </tr>
- </table>
-
- <table>
- <tr><td><a name="KM200define"></a><b>Define</b></td></tr>
- </table>
- <table><tr><td><ul><code>define <name> km200 <IPv4-address> <GatewayPassword> <PrivatePassword></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><name></code> : </td><td>The name of the device. Recommendation: "myKm200".</td></tr>
- <tr><td><code><IPv4-address></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>
- <tr><td><code><GatewayPassword></code> : </td><td>The gateway password which is provided on the type sign of the KMxxx.</td></tr>
- <tr><td><code><PrivatePassword></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>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="KM200Set"></a><b>Set</b></td></tr>
- <tr><td>
- <ul>
- The set function is able to change a value of a service which has the "writeable" - tag within the KMxxx service structure.<BR>
- Most of those values have an additional list of allowed values which are the only ones to be set.<BR>
- Other floatable type values can be changed only within their range of minimum and maximum value.<BR>
- </ul>
- </td></tr>
- </table>
- <table><tr><td><ul><code>set <service> <value></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr><td><code><service></code> : </td><td>The name of the service which value shall be set. E.g.: "<code>/heatingCircuits/hc1/operationMode</code>"<BR></td></tr>
- <tr><td><code><value></code> : </td><td>A valid value for this service.<BR></td></tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="KM200Get"></a><b>Get</b></td></tr>
- <tr><td>
- <ul>
- The get function is able to obtain a value of a service within the KMxxx service structure.<BR>
- The additional list of allowed values or their range of minimum and maximum value will not be handed back.<BR>
- </ul>
- </td></tr>
- </table>
- <table><tr><td><ul><code>get <service> <option></code></ul></td></tr></table>
- <ul><ul>
- <table>
- <tr>
- <td><code><service></code> : </td><td>The name of the service which value shall be obtained. E.g.: "<code>/heatingCircuits/hc1/operationMode</code>"<BR>
- It returns only the value but not the unit or the range or list of allowed values possible.<BR>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td><code><option></code> : </td><td>The optional Argument for the result of the get-command e.g.: "<code>json</code>"<BR>
- The following options are available:<BR>
- json - Returns the raw json-answer from the KMxxx as string.
- </td>
- </tr>
- </table>
- </ul></ul>
- <BR>
- <table>
- <tr><td><a name="KM200Attr"></a><b>Attributes</b></td></tr>
- <tr><td>
- <ul>
- 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>
- </ul>
- </td></tr>
- </table>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 300s.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default and minimum value is 5s.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The list can be filled with the name of the top - hierarchy service, which means everything below that service will also be ignored.<BR>
- The default value (empty) therefore nothing will be ignored.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <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>
- The default value is 100 = 100ms = 0,1s.<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- <ul><ul>
- <table>
- <tr>
- <td>
- <tr><td><li><code>disable</code> : </li></td><td>Stops the device from further pollings and deletes the existing readings.<BR>
- The default value is 0 = activated<BR>
- </td></tr>
- </td>
- </tr>
- </table>
- </ul></ul>
- </ul>
- <p><a name="logProxy"></a>
- <h3>logProxy</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#logProxy'>DE</a>]</div>
- <ul>
- Allows the manipulation of data to be plotted in an SVG device:
- <ul>
- <li>addition of horizontal lines at fixed values</li>
- <li>addition of horizontal lines at dynamic values eg: min, max or average values of another plot </li>
- <li>addition of vertical lines at fixed or dynamic times between two fixed or dynamic y values</li>
- <li>addition of calculated data like week profiles of HeatingControll devices or heating thermostats</li>
- <li>merge plot data from different sources. eg. different FileLog devices</li>
- <li>horizontaly shifting a (merged) plot to align average or statistic data to the correct day,week and month</li>
- </ul>
- <br>
- <a name="logProxy_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> logProxy</code><br>
- <br>
- Only one logProxy device can be defined and is needed.<br><br>
- Example:
- <ul>
- <code>define myProxy logProxy</code><br>
- </ul>
- </ul><br>
- <a name="logProxy_Set"></a>
- <b>Set</b>
- <ul>
- </ul><br>
- <a name="logProxy_Get"></a>
- <b>Get</b>
- <ul>
- see <a href="#FileLogget">FileLog</a> and <a href="#DbLogget">DbLog</a>
- </ul><br>
- <a name="logProxy_Attr"></a>
- <b>Attributes</b>
- <ul>
- </ul><br>
- <br>
- <b>#logProxy <column_spec></b><br>
- where <column_spec> can be one or more of the following:
- <ul>
- <li>FileLog:<log device>[,<options>]:<column_spec><br></li>
- <li>DbLog:<log device>[,<options>]:<column_spec><br></li><br>
- options is a comma separated list of zero or more of:<br>
- <ul>
- <li>clip<br>
- clip the plot data to the plot window</li>
- <li>extend=<value><br>
- extend the query range to the log device by <value> seconds (or <value> months if <value> ends in m).
- also activates cliping.</li>
- <li>interpolate<br>
- perform a linear interpolation to the values in the extended range to get the values at the plot boundary. only usefull
- if plotfunction is lines.</li>
- <li>offset=<value><br>
- shift plot by <value> seconds (or <value> months if <value> ends in m).
- allows alignment of values calculated by average or statsitics module to the correct day, week or month. </li>
- <li>predict[=<value>]<br>
- no value -> extend the last plot value to now.<br>
- value -> extend the last plot value by <value> but maximal to now.<br></li>
- <li>postFn='<myPostFn>'<br>
- myPostFn is the name of a postprocessing function that is called after all processing of the data by logProxy
- has been done. it is called with two arguments: the devspec line from the gplot file and a reference to a data
- array containing the points of the plot. each point is an array with three components: the point in time in seconds,
- the value at this point and the point in time in string form. the return value must return a reference to an array
- of the same format. the third component of each point can be omittet and is not evaluated.<br></li>
- <li>scale2reading=<scaleHashRef><br>
- Use zoom step dependent reading names. <br>
- The reading name to be used is the result of a lookup with the current zoom step into <code>scaleHashRef</code>.
- The keys can be from the following list: year, month, week, day, qday, hour<br>
- Example:
- <ul>
- <code>#logProxy DbLog:dbLog,scale2reading={year=>'temperature_avg_day',month=>'temperature_avg_day'}:s300ht_1:temperature::</code><br>
- </ul><br>
- <br></li>
- </ul>
- <li>ConstX:<time>,<y>[,<y2>]<br>
- Will draw a vertical line (or point) at <time> between <y> to <y2>.<br>
- Everything after the : is evaluated as a perl expression that hast to return one time string and one or two y values.<br>
- Examples:
- <ul>
- <code>#logProxy ConstX:$data{currdate1},$data{currval1}</code><br>
- <code>#logProxy ConstX:$data{mindate1},$data{min1},$data{avg1}</code><br>
- <code>#logProxy ConstX:$data{maxdate1},$data{max1},$data{avg1}</code><br>
- <code>#logProxy ConstX:logProxy_shiftTime($from,60*60*2),$data{min1},$data{max1}</code><br>
- </ul></li><br>
- <li>ConstY:<value>[,<from>[,<to>]]<br>
- Will draw a horizontal line at <value>, optional only between the from and to times.<br>
- Everything after the : is evaluated as a perl expression that hast to return one value and optionaly one or two time strings.<br>
- Examples:
- <ul>
- <code>#logProxy ConstY:0</code><br>
- <code>#logProxy ConstY:1234+15+myFunc(123)</code><br>
- <code>#logProxy ConstY:$data{avg1}</code><br>
- <code>#logProxy ConstY:$data{avg2},$from,$to</code><br>
- <code>#logProxy ConstY:$data{avg2},logProxy_shiftTime($from,60*60*12),logProxy_shiftTime($from,-60*60*12)</code>
- </ul></li><br>
- <li>Polar:[<options>]:<values><br>
- Will draw a polar/spiderweb diagram with the given values. <values> has to evaluate to a perl array.<br>
- If <values> contains numbers these values are plottet and the last value will be connected to the first.<br>
- If <values> contains strings these strings are used as labels for the segments.<br>
- The axis are drawn automaticaly if the values are strings or if no values are given but the segments option is set.<br>
- 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>
- The following example will plot the temperature and desiredTemperature values of all devices named MAX.*:
- <ul>
- <code>set xtics ()</code><br>
- <code>set ytics ()</code><br>
- <code>set y2tics ()</code><br>
- <code>set xrange [-40:40]</code><br>
- <code>set yrange [-40:40]</code><br><br>
- <code>#logProxy Polar::{[map{ReadingsVal($_,"temperature",0)}devspec2array("MAX.*")]}</code><br>
- <code>#logProxy Polar::{[map{ReadingsVal($_,"desiredTemperature",0)}devspec2array("MAX.*")]}</code><br>
- <code>#logProxy Polar::{[map{ReadingsVal($_,"temperature",0)}devspec2array("MAX.*")]}</code><br>
- <code>#logProxy Polar::{[devspec2array("MAX.*")]}</code><br><br>
- <code>plot "<IN>" using 1:2 axes x1y1 title 'Ist' ls l0 lw 1 with lines,\</code><br>
- <code>plot "<IN>" using 1:2 axes x1y1 title 'Soll' ls l1fill lw 1 with lines,\</code><br>
- <code>plot "<IN>" using 1:2 axes x1y1 notitle ls l0 lw 1 with points,\</code><br>
- <code>plot "<IN>" using 1:2 axes x1y1 notitle ls l2 lw 1 with lines,\</code><br>
- </ul><br>
- options is a comma separated list of zero or more of:<br>
- <ul>
- <li>axis<br>
- force to draw the axis</li>
- <li>noaxis<br>
- disable to draw the axis</li>
- <li>range=<value><br>
- the range to use for the radial axis</li>
- <li>segments=<value><br>
- the number of circle/spiderweb segments to use for the plot</li>
- <li>isolines=<value><br>
- a | separated list of values for which an isoline shoud be drawn. defaults to 10|20|30.</li>
- </ul>
- </li><br>
- <li>Func:<perl expression><br>
- Specifies a perl expression that returns the data to be plotted and its min, max and last value. It can not contain
- space or : characters. The data has to be
- one string of newline separated entries of the form: <code>yyyy-mm-dd_hh:mm:ss value</code><br>Example:
- <ul>
- <code>#logProxy Func:logProxy_WeekProfile2Plot("HCB",$from,$to)</code><br>
- <code>#logProxy Func:logProxy_WeekProfile2Plot("myHeatingControll",$from,$to,"(\\d)*\$")</code><br>
- <code>#logProxy Func:logProxy_Func2Plot($from,$to,'{logProxy_hms2dec(sunrise_abs_dat($sec))}')</code><br>
- <code>#logProxy Func:logProxy_Func2Plot($from,$to,'{logProxy_hms2dec(sunset_abs_dat($sec))}')</code><br>
- </ul><br>
- Notes:<ul>
- <li>logProxy_WeekProfile2Plot is a sample implementation of a function that will plot the week profile
- of a Heating_Control, WeekdyTimer, HomeMatic or MAX Thermostat device can be found in the 98_logProxy.pm module file.</li>
- <li>logProxy_Func2Plot($from,$to,$func) is a sample implementation of a function that will evaluate the given
- function (3rd parameter) for a zoom factor dependent number of times. the current time is given in $sec.
- the step width can be given in an optional 4th parameter. either as a number or as an hash with the keys from
- the following list: hour,qday,day,week,month,year and the values representing the step with for the zoom level.</li>
- <li>logProxy_xy2Plot(\@xyArray) is a sample implementation of a function that will accept a ref to an array
- of xy-cordinate pairs as the data to be plotted.</li>
- <li>logProxy_xyFile2Plot($filename,$column,$regex) is a sample implementation of a function that will accept a filename,
- a column number and a regular expression. The requested column in all lines in the file that match the regular expression
- needs to be in the format x,y to indicate the xy-cordinate pairs as the data to be plotted.</li>
- <li>logProxy_values2Plot(\@xyArray) is a sample implementation of a function that will accept a ref to an array
- of date-y-cordinate pairs as the data to be plotted.</li>
- <li>The perl expressions have access to $from and $to for the begining and end of the plot range and also to the
- SVG specials min, max, avg, cnt, sum, currval (last value) and currdate (last date) values of the individual curves
- already plotted are available as $data{<special-n>}.<br>
- <li>logProxy_Range2Zoom($seconds) can be used to get the approximate zoom step for a plot range of $seconds.</li>
- <li>SVG_time_to_sec($timestamp) can be used to convert the timestamp strings to epoch times for calculation.</li>
- </ul>
- </li><br>
- </li><br>
- </ul>
- Please see also the column_spec paragraphs of FileLog, DbLog and SVG.<br>
- <br>
- NOTE: spaces are not allowed inside the colums_specs.<br>
- <br>
- To use any of the logProxy features with an existing plot the associated SVG file hast to be changed to use the logProxy
- device and the .gplot file has to be changed in the following way:<br>
- All existing #FileLog and #Dblog lines have to be changed to #logProxy lines and<br>the column_spec of these line has to
- be prepended by <code>FileLog:<log device>:</code> or <code>DbLog:<log device>:</code> respectively.<br>
- Examples:
- <ul>
- <code>#DbLog <myDevice>:<myReading></code></br>
- <code>#FileLog 4:<SPEC1>:power\x3a::</code><br>
- <code>#FileLog 4:<SPEC1>:consumption\x3a::</code><br><br>
- will become:<br><br>
- <code>#logProxy DbLog:<myDb>:<myDevice>:<myReading></code></br>
- <code>#logProxy FileLog:FileLog_<SPEC1>:4:<SPEC1>.power\x3a::</code><br>
- <code>#logProxy FileLog:FileLog_<SPEC1>:4:<SPEC1>.consumption\x3a::</code><br>
- </ul>
- </ul>
- <p><a name="mailcheck"></a>
- <h3>mailcheck</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#mailcheck'>DE</a>]</div>
- <ul>
- Watches a mailbox with imap idle and for each new mail triggers an event with the subject of this mail.<br><br>
- This can be used to send mails *to* FHEM and react to them from a notify. Application scenarios are for example
- a geofencing apps on mobile phones, networked devices that inform about warning or failure conditions by e-mail or
- (with a little logic in FHEM) the absence of regular status messages from such devices and so on.<br><br>
- Notes:
- <ul>
- <li>Mail::IMAPClient and IO::Socket::SSL and IO::Socket::INET hast to be installed on the FHEM host.</li>
- <li>Probably only works reliably if no other mail programm is marking messages as read at the same time.</li>
- <li>If you experience a hanging system caused by regular forced disconnects of your internet provider you
- can disable and enable the mailcheck instance with an <a href="#at">at</a>.</li>
- <li>If MIME::Parser is installed non ascii subjects will be docoded to utf-8</li>
- <li>If MIME::Parser and Mail::GnuPG are installed gpg signatures can be checked and mails from unknown senders can be ignored.</li>
- </ul><br>
- <a name="mailcheck_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> mailcheck <host> <user> <password> [<folder>]</code><br>
- <br>
- <user> and <password> 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.
- <br>
- Defines a mailcheck device.<br><br>
- Examples:
- <ul>
- <code>define mailcheck mailcheck imap.mail.me.com x.y@me.com myPassword</code><br>
- <code>define mailcheck mailcheck imap.mail.me.com {"x.y@me.com"} {myPasswordOfAccount($USER)}</code><br>
- </ul>
- </ul><br>
- <a name="mailcheck_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>Subject<br>
- the subject of the last mail received</li>
- <li>From<br>
- the mail address of the last sender</li>
- </ul><br>
- <a name="mailcheck_Set"></a>
- <b>Set</b>
- <ul>
- <li>inactive<br>
- temporarily deactivates the device</li>
- <li>active<br>
- reenables the device</li>
- </ul><br>
- <a name="mailcheck_Get"></a>
- <b>Get</b>
- <ul>
- <li>update<br>
- trigger an update</li>
- <li>folders<br>
- list available folders</li>
- </ul><br>
- <a name="mailcheck_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>delete_message<br>
- 1 -> delete message after Subject reading is created</li>
- <li>interval<br>
- the interval in seconds used to trigger an update on the connection.
- if idle is supported the defailt is 600, without idle support the default is 60. the minimum is 60.</li>
- <li>nossl<br>
- 1 -> don't use ssl.</li><br>
- <li>disable<br>
- 1 -> disconnect and stop polling</li>
- <li>debug<br>
- 1 -> enables debug output. default target is stdout.</li>
- <li>logfile<br>
- set the target for debug messages if debug is enabled.</li>
- <li>accept_from<br>
- comma separated list of gpg keys that will be accepted for signed messages. Mail::GnuPG and MIME::Parser have to be installed</li>
- </ul>
- </ul>
- <p><a name="monitoring"></a>
- <h3>monitoring</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#monitoring'>DE</a>]</div>
- ( en | <a href="commandref_DE.html#monitoring"><u>de</u></a> )
- <div>
- <ul>
- Each monitoring has a warning and an error list, which are stored
- as readings. <br>
- When a defined add-event occurs, the device is set to the warning
- list after a predefined time.<br>
- After a further predefined time, the device is deleted from the
- warning list and set to the error list.<br>
- If a defined remove-event occurs, the device is deleted from both
- lists and still running timers are canceled.<br>
- This makes it easy to create group messages and send them
- formatted by two attributes.<br>
- <br>
- The following applications are possible and are described
- <a href="#monitoringexamples"><u>below</u></a>:<br>
- <ul>
- <li>opened windows</li>
- <li>battery warnings</li>
- <li>activity monitor</li>
- <li>
- regular maintenance (for example changing the table water
- filter or cleaning rooms)
- </li>
- <li>
- operating hours dependent maintenance (for example clean the
- Beamer filter)
- </li>
- </ul>
- <br>
- The monitor does not send a message by itself, a notify or DOIF is
- necessary, which responds to the event "<monitoring-name> error
- add: <name>" and then sends the return value of "get
- <monitoring-name> default".
- <br>
- <br>
- <a name="monitoringdefine"></a>
- <b>Define</b>
- <ul>
- <code>
- define <name> monitoring <add-event> [<remove-event>]
- </code>
- <br>
- The syntax for <add-event> and <remove-event> is the
- same as the pattern for <a href="#notify">notify</a>
- (device-name or device-name:event).<br>
- If only an <add-event> is defined, the device is deleted from
- both lists as it occurs and the timers for warning and error are
- started.<br>
- </ul>
- <br>
- <a name="monitoringset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>active</code><br>
- Two things will happen:<br>
- 1. Restores pending timers, or sets the devices immediately to the
- corresponding list if the time is in the past.<br>
- 2. Executes the commands specified under the "setActiveFunc" attribute.
- </li>
- <li>
- <code>clear (warning|error|all)</code><br>
- Removes all devices from the specified list and aborts timers for this
- list. With "all", all devices are removed from both lists and all
- running timers are aborted.
- </li>
- <li>
- <code>errorAdd <name></code><br>
- Add <name> to the error list.
- </li>
- <li>
- <code>errorRemove <name></code><br>
- Removes <name> from the error list.
- </li>
- <li>
- <code>inactive</code><br>
- Inactivates the current device. Note the slight difference to the
- disable attribute: using set inactive the state is automatically saved
- to the statefile on shutdown, there is no explicit save necesary.
- </li>
- <li>
- <code>warningAdd <name></code><br>
- Add <name> to the warning list.
- </li>
- <li>
- <code>warningRemove <name></code><br>
- Removes <name> from the warning list.
- </li>
- </ul>
- <br>
- <a name="monitoringget"></a>
- <b>Get</b>
- <ul>
- <li>
- <code>all</code><br>
- Returns the error and warning list, separated by a blank line.<br>
- The formatting can be set with the attributes "errorReturn" and
- "warningReturn".
- </li>
- <li>
- <code>default</code><br>
- The "default" value can be set in the attribute "getDefault" and is
- intended to leave the configuration for the return value in the
- monitoring device. If nothing is specified "all" is used.
- </li>
- <li>
- <code>error</code><br>
- Returns the error list.<br>
- The formatting can be set with the attribute "errorReturn".
- </li>
- <li>
- <code>warning</code><br>
- Returns the warning list.<br>
- The formatting can be set with the attribute "warningReturn".
- </li>
- </ul>
- <br>
- <a name="monitoringreadings"></a>
- <b>Readings</b><br>
- <ul>
- <li>
- <code>error</code><br>
- Comma-separated list of devices.
- </li>
- <li>
- <code>errorAdd_<name></code><br>
- Displays the time when the device will be set to the error list.
- </li>
- <li>
- <code>state</code><br>
- Displays the status (active, inactive, or disabled). In "active" it
- displays which device added to which list or was removed from which
- list.
- </li>
- <li>
- <code>warning</code><br>
- Comma-separated list of devices.
- </li>
- <li>
- <code>warningAdd_<name></code><br>
- Displays the time when the device will be set to the warning list.
- </li>
- </ul>
- <br>
- <a name="monitoringattr"></a>
- <b>Attribute</b>
- <ul>
- <li>
- <a href="#addStateEvent">
- <u><code>addStateEvent</code></u>
- </a>
- </li>
- <li>
- <code>blacklist</code><br>
- Space-separated list of devspecs which will be ignored.<br>
- If the attribute is set all devices which are specified by the devspecs
- are removed from both lists.
- </li>
- <li>
- <code>disable (1|0)</code><br>
- 1: Disables the monitoring.<br>
- Â Â Â Â Â Â Â Â 0: see "set active"
- </li>
- <li>
- <a href="#disabledForIntervals">
- <u><code>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM ...</code></u>
- </a>
- </li>
- <li>
- <code>errorFuncAdd {<perl code>}</code><br>
- The following variables are available in this function:
- <br>
- <ul>
- <li>
- <code>$name</code><br>
- Name of the event triggering device
- </li>
- <li>
- <code>$event</code><br>
- Includes the complete event, e.g.
- <code>measured-temp: 21.7 (Celsius)</code>
- </li>
- <li>
- <code>$addMatch</code><br>
- Has the value 1 if the add-event is true
- </li>
- <li>
- <code>$removeMatch</code><br>
- Has the value 1 if the remove-event is true
- </li>
- <li>
- <code>$SELF</code><br>
- Name of the monitoring
- </li>
- </ul>
- If the function returns a 1, the device is set to the error list after
- the wait time.<br>
- If the attribute is not set, it will be checked for
- <code>$addMatch</code>.
- </li>
- <li>
- <code>errorFuncRemove {<perl code>}</code><br>
- This function provides the same variables as for "errorFuncAdd".<br>
- If the function returns a 1, the device is removed from the error list
- and still running timers are canceled.<br>
- If the attribute is not set, it will be checked for
- <code>$removeMatch</code> if there is a
- <code><remove-event></code> in the DEF, otherwise it will be
- checked for <code>errorFuncAdd</code>.
- </li>
- <li>
- <code>errorWait <perl code></code><br>
- Wait until the device is set to the error list.
- </li>
- <li>
- <code>errorReturn {<perl code>}</code><br>
- The following variables are available in this attribute:
- <ul>
- <li>
- <code>@errors</code><br>
- Array with all devices on the error list.
- </li>
- <li>
- <code>@warnings</code><br>
- Array with all devices on the warning list.
- </li>
- <li>
- <code>$SELF</code><br>
- Name of the monitoring
- </li>
- </ul>
- With this attribute the output created with "get <name> error"
- can be formatted.
- </li>
- <li>
- <code>getDefault (all|error|warning)</code><br>
- This attribute can be used to specify which list(s) are / are returned
- by "get <name> default". If the attribute is not set, "all" will
- be used.
- </li>
- <li>
- <code>setActiveFunc <Anweisung></code><br>
- The statement is one of the FHEM command types and is executed when you
- define the monitoring or "set active".<br>
- For a battery message <code>"trigger battery=low battery: low"</code>
- can be useful.
- </li>
- <li>
- <code>warningFuncAdd {<perl code>}</code><br>
- Like errorFuncAdd, just for the warning list.
- </li>
- <li>
- <code>warningFuncRemove {<perl code>}</code><br>
- Like errorFuncRemove, just for the warning list.
- </li>
- <li>
- <code>warningWait <perl code></code><br>
- Like errorWait, just for the warning list.
- </li>
- <li>
- <code>warningReturn {<perl code>}</code><br>
- Like errorReturn, just for the warning list.
- </li>
- <li>
- <code>whitelist {<perl code>}</code><br>
- Space-separated list of devspecs which are allowed.<br>
- If the attribute is set all devices which are not specified by the
- devspecs are removed from both lists.
- </li>
- <li>
- <a href="#readingFnAttributes">
- <u><code>readingFnAttributes</code></u>
- </a>
- </li>
- </ul>
- <br>
- <a name="monitoringexamples"></a>
- <b>Examples</b>
- <ul>
- <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
- <u>The following sample codes can be imported via "Raw definition".</u>
- </a>
- <br><br>
- <li>
- <b>
- Global, flexible opened windows/doors message
- <a href="https://forum.fhem.de/index.php/topic,36504">
- <u>(similar to those described in the forum)</u>
- </a>
- </b>
- <br>
- <pre>defmod Fenster_monitoring monitoring .*:(open|tilted) .*:closed
- attr Fenster_monitoring errorReturn {return unless(@errors);;\
- $_ = AttrVal($_, "alias", $_) foreach(@errors);;\
- return("Das Fenster \"$errors[0]\" ist schon länger geöffnet.") if(int(@errors) == 1);;\
- @errors = sort {lc($a) cmp lc($b)} @errors;;\
- return(join("\n - ", "Die folgenden ".@errors." Fenster sind schon länger geöffnet:", @errors))\
- }
- attr Fenster_monitoring errorWait {AttrVal($name, "winOpenTimer", 60*10)}
- attr Fenster_monitoring warningReturn {return unless(@warnings);;\
- $_ = AttrVal($_, "alias", $_) foreach(@warnings);;\
- return("Das Fenster \"$warnings[0]\" ist seit kurzem geöffnet.") if(int(@warnings) == 1);;\
- @warnings = sort {lc($a) cmp lc($b)} @warnings;;\
- return(join("\n - ", "Die folgenden ".@warnings." Fenster sind seit kurzem geöffnet:", @warnings))\
- }</pre>
- As soon as a device triggers an "open" or "tilded" event, the device is
- set to the warning list and a timer is started after which the device
- is moved from the warning to the error list. The waiting time can be
- set for each device via userattr "winOpenTimer". The default value is
- 10 minutes.<br>
- As soon as a device triggers a "closed" event, the device is deleted
- from both lists and still running timers are stopped.
- </li>
- <br>
- <li>
- <b>Battery monitoring</b><br>
- <pre>defmod Batterie_monitoring monitoring .*:battery:.low .*:battery:.ok
- attr Batterie_monitoring errorReturn {return unless(@errors);;\
- $_ = AttrVal($_, "alias", $_) foreach(@errors);;\
- return("Bei dem Gerät \"$errors[0]\" muss die Batterie gewechselt werden.") if(int(@errors) == 1);;\
- @errors = sort {lc($a) cmp lc($b)} @errors;;\
- return(join("\n - ", "Die folgenden ".@errors." Geräten muss die Batterie gewechselt werden:", @errors))\
- }
- attr Batterie_monitoring errorWait 60*60*24*14
- attr Batterie_monitoring warningReturn {return unless(@warnings);;\
- $_ = AttrVal($_, "alias", $_) foreach(@warnings);;\
- return("Bei dem Gerät \"$warnings[0]\" muss die Batterie demnächst gewechselt werden.") if(int(@warnings) == 1);;\
- @warnings = sort {lc($a) cmp lc($b)} @warnings;;\
- return(join("\n - ", "Die folgenden ".@warnings." Geräten muss die Batterie demnächst gewechselt werden:", @warnings))\
- }</pre>
- As soon as a device triggers a "battery: low" event, the device is set
- to the warning list and a timer is started after which the device is
- moved from the warning to the error list. The waiting time is set to 14
- days.<br>
- As soon as a device triggers a "battery: ok" event, the device is
- deleted from both lists and still running timers are stopped.
- </li>
- <br>
- <li>
- <b>Activity Monitor</b><br>
- <pre>defmod Activity_monitoring monitoring .*:.*
- attr Activity_monitoring errorReturn {return unless(@errors);;\
- $_ = AttrVal($_, "alias", $_) foreach(@errors);;\
- return("Das Gerät \"$errors[0]\" hat sich seit mehr als 24 Stunden nicht mehr gemeldet.") if(int(@errors) == 1);;\
- @errors = sort {lc($a) cmp lc($b)} @errors;;\
- return(join("\n - ", "Die folgenden ".@errors." Geräten haben sich seit mehr als 24 Stunden nicht mehr gemeldet:", @errors))\
- }
- attr Activity_monitoring errorWait 60*60*24
- attr Activity_monitoring warningReturn {return unless(@warnings);;\
- $_ = AttrVal($_, "alias", $_) foreach(@warnings);;\
- return("Das Gerät \"$warnings[0]\" hat sich seit mehr als 12 Stunden nicht mehr gemeldet.") if(int(@warnings) == 1);;\
- @warnings = sort {lc($a) cmp lc($b)} @warnings;;\
- return(join("\n - ", "Die folgenden ".@warnings." Geräten haben sich seit mehr als 12 Stunden nicht mehr gemeldet:", @warnings))\
- }
- attr Activity_monitoring warningWait 60*60*12</pre>
- Devices are not monitored until they have triggered at least one event.
- If the device does not trigger another event in 12 hours, it will be
- set to the warning list. If the device does not trigger another event
- within 24 hours, it will be moved from the warning list to the error
- list.
- </li>
- <br>
- <li>
- <b>Regular maintenance (for example changing the table water filter)</b>
- <br>
- <pre>defmod Wasserfilter_monitoring monitoring Wasserfilter_DashButton:.*:.short
- attr Wasserfilter_monitoring errorReturn {return unless(@errors);;\
- return "Der Wasserfilter muss gewechselt werden.";;\
- }
- attr Wasserfilter_monitoring errorWait 60*60*24*30
- attr Wasserfilter_monitoring warningReturn {return unless(@warnings);;\
- return "Der Wasserfilter muss demnächst gewechselt werden.";;\
- }
- attr Wasserfilter_monitoring warningWait 60*60*24*25</pre>
- A <a href="#dash_dhcp"><u>DashButton</u></a> is used to tell FHEM that
- the water filter has been changed.<br>
- After 30 days, the DashButton is set to the error list.
- </li>
- <br>
- <li>
- <b>Regular maintenance (for example cleaning rooms)</b>
- <br>
- <pre>defmod putzen_DashButton dash_dhcp
- 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
- attr putzen_DashButton devAlias ac-63-be-2e-19-af:Badezimmer\
- ac-63-be-49-23-48:KĂźche\
- ac-63-be-49-5e-fd:Schlafzimmer\
- 50-f5-da-93-2b-ee:Arbeitszimmer\
- ac-63-be-b2-07-78:Wohnzimmer
- attr putzen_DashButton event-min-interval .*:5
- attr putzen_DashButton port 6767
- attr putzen_DashButton userReadings state {return (split(":", @{$hash->{CHANGED}}[0]))[0];;}
- attr putzen_DashButton widgetOverride allowed:textField-long devAlias:textField-long
- defmod putzen_monitoring monitoring putzen_DashButton:.*:.short
- attr putzen_monitoring errorFuncAdd {$event =~ m/^(.+):/;;\
- $name = $1;;\
- return 1;;\
- }
- attr putzen_monitoring errorReturn {return unless(@errors);;\
- return("Der Raum \"$errors[0]\" muss wieder geputzt werden.") if(int(@errors) == 1);;\
- return(join("\n - ", "Die folgenden Räume mßssen wieder geputzt werden:", @errors))\
- }
- attr putzen_monitoring errorWait 60*60*24*7</pre>
- Several <a href="#dash_dhcp"><u>DashButton</u></a> are used to inform
- FHEM that the rooms have been cleaned.<br>
- After 7 days, the room is set to the error list.<br>
- However, the room name is not the device name but the readings name and
- is changed in the <code>errorFuncAdd</code> attribute.
- </li>
- <br>
- <li>
- <b>
- Operating hours dependent maintenance
- (for example, clean the Beamer filter)
- </b>
- <br>
- <pre>defmod BeamerFilter_monitoring monitoring Beamer_HourCounter:pulseTimeOverall BeamerFilter_DashButton:.*:.short
- attr BeamerFilter_monitoring userattr errorInterval
- attr BeamerFilter_monitoring errorFuncAdd {return 1\
- if(ReadingsVal($name, "pulseTimeOverall", 0) >= \
- ReadingsVal($name, "pulseTimeService", 0)\
- + (AttrVal($SELF, "errorInterval", 0))\
- && $addMatch\
- );;\
- return;;\
- }
- attr BeamerFilter_monitoring errorFuncRemove {return unless($removeMatch);;\
- fhem(\
- "setreading $name pulseTimeService "\
- .ReadingsVal($name, "pulseTimeOverall", 0)\
- );;\
- return 1;;\
- }
- attr BeamerFilter_monitoring errorInterval 60*60*200
- attr BeamerFilter_monitoring errorReturn {return unless(@errors);;\
- return "Der Filter vom Beamer muss gereinigt werden.";;\
- }
- attr BeamerFilter_monitoring warningFuncAdd {return}
- attr BeamerFilter_monitoring warningFuncRemove {return}</pre>
- An <a href="#HourCounter"><u>HourCounter</u></a> is used to record the
- operating hours of a beamer and a
- <a href="#dash_dhcp"><u>DashButton</u></a> to tell FHEM that the filter
- has been cleaned.<br>
- If the filter has not been cleaned for more than 200 hours, the device
- is set to the error list.<br>
- If cleaning is acknowledged with the DashButton, the device is removed
- from the error list and the current operating hours are stored in the
- HourCounter device.
- </li>
- </ul>
- </ul>
- </div>
- <p> <p>
- <a name="msgConfig" id="msgConfig"></a>
- </p>
- <h3>
- msgConfig
- </h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#msgConfig'>DE</a>]</div>
- <ul>
- Provides global settings and tools for FHEM command <a href="#MSG">msg</a>.<br>
- A device named globalMsg will be created automatically when using msg-command for the first time and no msgConfig device could be found.<br>
- The device name can be renamed and reconfigured afterwards if desired.<br>
- <br>
- <a name="msgConfigdefine" id="msgConfigdefine"></a> <b>Define</b>
- <ul>
- <code>define <name> msgConfig</code><br>
- </ul><br>
- <br>
- <a name="msgConfigset" id="msgConfigset"></a> <b>Set</b>
- <ul>
- <ul>
- <li>
- <b>addLocation</b> <Location Name> <br>
- 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.
- </li>
- <li>
- <b>cleanReadings</b> [<device and/or regex>] <br>
- 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.*".
- </li>
- <li>
- <b>createResidentsDev</b> <de|en> <br>
- 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>
- 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>
- 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.
- </li>
- <li>
- <b>createSwitcherDev</b> <de|en> <br>
- Creates a pre-configured Dummy device named HouseAnn and updates globalMsg attribute msgSwitcherDev to refer to it.
- </li>
- </ul>
- </ul>
- </ul>
- <p><a name="msgDialog"></a>
- <h3>msgDialog</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#msgDialog'>DE</a>]</div>
- <ul>
- With msgDialog you can define dialogs for instant messages via TelegramBot, Jabber and yowsup (WhatsApp).<br>
- The communication uses the msg command. Therefore, a device of type msgConfig must be defined first.<br>
- 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>
- <br>
- Prerequisites:
- <ul>
- The Perl module "JSON" is required.<br>
- Under Debian (based) system, this can be installed using
- <code>"apt-get install libjson-perl"</code>.
- </ul>
- <br>
- <a name="msgDialogdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> msgDialog <JSON></code><br>
- Because of the complexity, it is easiest to define an empty dialog first.
- <code>define <name> msgDialog {}</code>
- Then edit the DEF in the detail view.
- <PRE>
- {
- "<TRIGGER>": {
- "match": "<regex>",
- "setOnly": (true|false),
- "commands": "(fhem command|{perl code})",
- "message": [
- "{perl code}",
- "text"
- ],
- "<NEXT TRIGGER 1>": {
- ...
- },
- "<NEXT TRIGGER 2>": {
- ...
- }
- }
- }
- </PRE>
- <li>
- <code>TRIGGER</code><br>
- Can be any text. The device checks whether the incoming message equals it. If so, the dialogue will be continued at this point.
- </li>
- <br>
- <li>
- <code>match</code><br>
- If you do not want to allow only one message, you can specify a regex. The regex must apply to the whole incoming message.
- </li>
- <br>
- <li>
- <code>setOnly</code><br>
- Can be optionally set to true or false. In both cases, the TRIGGER will
- not be returned at "get <name> trigger".<br>
- If setOnly is set to true, the dialog at this point cannot be triggered
- by incoming messages, but only by using "get <name> say
- TRIGGER".<br>
- This can be used to initiate a dialog from FHEM.
- </li>
- <br>
- <li>
- <code>commands</code><br>
- Can contain a single or multiple commands:
- <PRE>
- "commands": "single command"
- "commands": [
- "command 1",
- "command 2",
- "{perl command}"
- ]
- </PRE>
- </li>
- <li>
- <code>message</code><br>
- Can contain a single or multiple text that is connected by a line break:
- <PRE>
- "message": "text"
- "message": [
- "text 1",
- "text 2",
- "{return from perl command}"
- ]
- </PRE>
- </li>
- For multi-level dialogs, this structure is specified nested.<br>
- <br>
- Variables and placeholders defined under the attribute evalSpecials are
- evaluated.<br>
- Variables:
- <li>
- <code>$SELF</code><br>
- name of the msgDialog
- </li>
- <br>
- <li>
- <code>$message</code><br>
- received message
- </li>
- <br>
- <li>
- <code>$recipient</code><br>
- Name of the dialog partner
- </li>
- </ul>
- <br>
- <a name="msgDialogset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>reset</code><br>
- Resets the dialog for all users.
- </li>
- <br>
- <li>
- <code>
- say [@<recipient1>[,<recipient2>,...]]
- <TRIGGER>[|<NEXT TRIGGER>|...]
- </code><br>
- The dialog is continued for all specified recipients at the specified
- position.<br>
- If no recipients are specified, the dialog is continued for all
- recipients specified under the allowed attribute.
- </li>
- <br>
- <li>
- <code>updateAllowed</code><br>
- Updates the selection for the allowed attribute.
- </li>
- </ul>
- <br>
- <a name="msgDialogget"></a>
- <b>Get</b>
- <ul>
- <li>
- <code>trigger</code><br>
- Lists all TRIGGERs of the first level where setOnly is not specified.
- </li>
- </ul>
- <br>
- <a name="msgDialogattr"></a>
- <b>Attribute</b>
- <ul>
- <li>
- <code>allowed</code><br>
- List with all RESIDENTS and ROOMMATE that are authorized for this dialog.
- </li>
- <br>
- <li>
- <code>disable 1</code><br>
- Dialog is deactivated.
- </li>
- <br>
- <li>
- <a href="#disabledForIntervals">
- <u><code>disabledForIntervals HH:MM-HH:MM HH:MM-HH-MM ...</code></u>
- </a>
- </li>
- <br>
- <li>
- <code>evalSpecials key1=value1 key2=value2 ...</code><br>
- Space Separate list of name=value pairs.<br>
- Value may contain spaces if included in "" or {}.<br>
- Value is evaluated as a perl expression if it is included in {}.<br>
- In the DEF, %Name% strings are replaced by the corresponding value.<br>
- This attribute is available as "msgDialog_evalSpecials" in the msgConfig
- device.<br>
- If the same name was defined in the msgConfig and msgDialog, the value
- from msgDialog is used.
- </li>
- <br>
- <li>
- <code>msgCommand <command></code><br>
- Command used to send a message.<br>
- The default is
- <code>"msg push \@$recipients $message"</code>.<br>
- This attribute is available as "msgDialog_msgCommand" in the msgConfig device.
- </li>
- </ul>
- <br>
- <a name="msgDialogreadings"></a>
- <b>Reading</b>
- <ul>
- <li>
- <code>$recipient_history</code><br>
- | separated list of TRIGGERS to save the current state of the dialog.<br>
- A readings is created for each dialog partner. When the dialog is
- finished, the reading will be cleared.
- </li>
- </ul>
- <br>
- <a name="msgDialogTelegramBot"></a>
- <b>Notes for use with TelegramBot:</b>
- <ul>
- It may be necessary to set the attribute "utf8specials" to 1 in the
- TelegramBot, for messages with special characters to be sent.<br>
- <br>
- The msg command supports the TelegramBot_MTYPE. The default is message. The
- queryInline value can be used to create an inline keyboard.
- </ul>
- <br>
- <a name="msgDialogJabber"></a>
- <b>Notes for use with Jabber:</b>
- <ul>
- The msg command supports the TelegramBot_MTYPE. The default is empty. The
- value otr can be used to send an OTR message.
- </ul>
- <br>
- <a name="msgDialogyowsub"></a>
- <b>Notes for use with yowsub (WhatsApp):</b>
- <ul>
- No experiences so far.
- </ul>
- <br>
- <a name="msgDialogexamples"></a>
- <b>Examples:</b>
- <ul>
- <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
- <u>
- The following example codes can be imported by "Raw defnition".
- </u>
- </a>
- <br>
- <br>
- All examples are designed for communication via the TelegramBot. When using
- Jabber or yowsup, they may need to be adjusted.<br>
- It is assumed that the msgConfig device contains the evalSpecials "me" with
- a name which is used to call the bot.<br>
- <br>
- <b>Meta dialog for listing all authorized dialogs:</b>
- <ul>
- <PRE>
- defmod meta_Dialog msgDialog {\
- "%me%": {\
- "match": "\/?(start|%me%)",\
- "commands": "deletereading TYPE=msgDialog $recipient_history",\
- "message": [\
- "{return('(' . join(') (', sort(split('\n', fhem('get TYPE=msgDialog:FILTER=NAME!=$SELF:FILTER=allowed=.*($recipient|everyone).* trigger'))), 'abbrechen') . ') ')}",\
- "Ich kann folgendes für dich tun:"\
- ]\
- },\
- "zurück": {\
- "commands": "set $recipient_history=.+|.+ say @$recipient {(ReadingsVal($DEV, '$recipient_history', '') =~ m/(.+)\\|.+$/;; return $2 ? $2 : $1;;)}"\
- },\
- "abbrechen": {\
- "match": "\/?abbrechen",\
- "commands": "deletereading TYPE=msgDialog $recipient_history",\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Dialog abgebrochen."\
- ]\
- },\
- "beenden": {\
- "match": "\/?beenden",\
- "commands": "deletereading TYPE=msgDialog $recipient_history",\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Dialog beendet."\
- ]\
- }\
- }
- attr meta_Dialog allowed everyone
- </PRE>
- </ul>
- <b>Request of current fuel prices</b>
- <ul>
- <PRE>
- defmod Tankstelle_Dialog msgDialog {\
- "Tankstelle": {\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Die Krafstoffpreise der betragen aktuell folgende Werte:",\
- "",\
- "AIVA",\
- "",\
- "[%AIVA%:Diesel] �/l Diesel",\
- "[%AIVA%:Super] �/l Super",\
- "[%AIVA%:E10] �/l E10",\
- "[%AIVA%:Autogas] �/l Autogas"\
- ]\
- }\
- }
- attr Tankstelle_Dialog evalSpecials AIVA=AIVA_petrolStation
- </PRE>
- </ul>
- <b>Programming of the washing machine</b>
- <ul>
- <PRE>
- defmod Waschmaschine_Dialog msgDialog { "Waschmaschine": {\
- "message": [\
- "{return('(Zeitprogramm stoppen) ') if(ReadingsVal('%controlUnit%', 'controlMode', '') eq 'auto')}",\
- "{return('(programmieren) ') if(ReadingsVal('%actor%', 'state', '') ne 'on')}",\
- "{return('(einschalten) ') if(ReadingsVal('%actor%', 'state', '') ne 'on')}",\
- "(Verlaufsdiagramm) ",\
- "(abbrechen) ",\
- "{return('Waschmaschine: ' . (ReadingsVal('%actor%', 'state', '') eq 'on' ? 'eingeschaltet' : 'ausgeschaltet'))}",\
- "{return('Modus: ' . (ReadingsVal('%controlUnit%', 'controlMode', '') eq 'auto' ? 'Automatik' : 'Manuell (' . ReadingsVal('%controlUnit%', 'time', '') . ')'))}"\
- ],\
- "Zeitprogramm stoppen": {\
- "commands": "set %controlUnit% controlMode manual",\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Das Zeitprogramm wurde gestoppt."\
- ]\
- },\
- "programmieren": {\
- "message": [\
- "(bestätigen|zurück|abbrechen) ",\
- "( 00:00 | 00:15 | 00:30 | 00:45 ) ",\
- "( 01:00 | 01:15 | 01:30 | 01:45 ) ",\
- "( 02:00 | 02:15 | 02:30 | 02:45 ) ",\
- "( 03:00 | 03:15 | 03:30 | 03:45 ) ",\
- "( 04:00 | 04:15 | 04:30 | 04:45 ) ",\
- "( 05:00 | 05:15 | 05:30 | 05:45 ) ",\
- "( 06:00 | 06:15 | 06:30 | 06:45 ) ",\
- "( 07:00 | 07:15 | 07:30 | 07:45 ) ",\
- "( 08:00 | 08:15 | 08:30 | 08:45 ) ",\
- "( 09:00 | 09:15 | 09:30 | 09:45 ) ",\
- "( 10:00 | 10:15 | 10:30 | 10:45 ) ",\
- "( 11:00 | 11:15 | 11:30 | 11:45 ) ",\
- "( 12:00 | 12:15 | 12:30 | 12:45 ) ",\
- "( 13:00 | 13:15 | 13:30 | 13:45 ) ",\
- "( 14:00 | 14:15 | 14:30 | 14:45 ) ",\
- "( 15:00 | 15:15 | 15:30 | 15:45 ) ",\
- "( 16:00 | 16:15 | 16:30 | 16:45 ) ",\
- "( 17:00 | 17:15 | 17:30 | 17:45 ) ",\
- "( 18:00 | 18:15 | 18:30 | 18:45 ) ",\
- "( 19:00 | 19:15 | 19:30 | 19:45 ) ",\
- "( 20:00 | 20:15 | 20:30 | 20:45 ) ",\
- "( 21:00 | 21:15 | 21:30 | 21:45 ) ",\
- "( 22:00 | 22:15 | 22:30 | 22:45 ) ",\
- "( 23:00 | 23:15 | 23:30 | 23:45 ) ",\
- "Wann soll die Wäsche fertig sein?",\
- "Bitte Uhrzeit in HH:MM angeben.",\
- "Aktuell ist [%controlUnit%:time] Uhr eingestellt."\
- ],\
- "Uhrzeit": {\
- "match": " ?([0-1][0-9]|2[0-3]):[0-5][0-9] ?",\
- "commands": [\
- "set %controlUnit% time $message",\
- "set $SELF say @$recipient Waschmaschine|programmieren|bestätigen"\
- ]\
- },\
- "bestätigen": {\
- "commands": "set %controlUnit% controlMode auto",\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Das Zeitprogramm wurde eingestellt.",\
- "Die Wäsche wird voraussichtlich um [%controlUnit%:time] Uhr fertig sein.",\
- "Bitte die Waschmaschine vorbereiten."\
- ]\
- }\
- },\
- "einschalten": {\
- "commands": [\
- "set %controlUnit% controlMode manual",\
- "set %actor% on"\
- ]\
- },\
- "Verlaufsdiagramm": {\
- "commands": "set %TelegramBot% cmdSend {plotAsPng('%plot%')}",\
- "message": "TelegramBot_MTYPE=queryInline (%me%) $message"\
- }\
- },\
- "auto": {\
- "setOnly": true,\
- "commands": [\
- "set %actor% on",\
- "set %controlUnit% controlMode manual"\
- ],\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Die Wachmaschine wurde automatisch eingeschaltet."\
- ]\
- },\
- "manual": {\
- "setOnly": true,\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Die Wachmaschine wurde manuell eingeschaltet."\
- ]\
- },\
- "done": {\
- "setOnly": true,\
- "commands": "set %actor% off",\
- "message": [\
- "TelegramBot_MTYPE=queryInline (%me%) ",\
- "Die Wachmaschine ist fertig."\
- ]\
- }\
- }
- attr Waschmaschine_Dialog evalSpecials actor=HM_2C10D8_Sw\
- controlUnit=Waschkeller_washer_controlUnit\
- plot=Waschkeller_washer_SVG
- </PRE>
- </ul>
- </ul>
- </ul>
- <p><a name="netatmo"></a>
- <h3>netatmo</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#netatmo'>DE</a>]</div>
- <ul>
- FHEM module for netatmo weather stations, thermostats and cameras.<br><br>
- Notes:
- <ul>
- <li>JSON has to be installed on the FHEM host.</li>
- <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>
- </ul><br>
- <a name="netatmo_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> netatmo [ACCOUNT] <username> <password> <client_id> <client_secret></code><br>
- <code>define <name> netatmo <device></code><br>
- <br>
- Defines a netatmo device.<br><br>
- If a netatmo device of the account type is created all fhem devices for the netatmo devices are automaticaly created
- (if autocreate is not disabled).
- <br>
- Examples:
- <ul>
- <code>define netatmo netatmo ACCOUNT abc@test.com myPassword 2134123412399119d4123134 AkqcOIHqrasfdaLKcYgZasd987123asd</code><br>
- <code>define netatmo netatmo 2f:13:2b:93:12:31</code><br>
- <code>define netatmo netatmo MODULE 2f:13:2b:93:12:31 f1:32:b9:31:23:11</code><br>
- <code>define netatmo netatmo HOME 1234567890abcdef12345678</code><br>
- <code>define netatmo netatmo CAMERA 1234567890abcdef12345678 70:ee:12:34:56:78</code><br>
- <code>define netatmo netatmo PERSON 1234567890abcdef12345678 01234567-89ab-cdef-0123-456789abcdef</code><br>
- </ul>
- </ul><br>
- <a name="netatmo_Webhook"></a>
- <b>Webhook</b><br>
- <ul>
- <code>define netatmo netatmo WEBHOOK</code><br><br>
- Set your URL in attribute webhookURL, events from cameras will be received insantly
- </ul><br>
- <a name="netatmo_Readings"></a>
- <b>Readings</b>
- <ul>
- </ul><br>
- <a name="netatmo_Set"></a>
- <b>Set</b>
- <ul>
- <li>autocreate<br>
- Create fhem devices for all netatmo weather devices.</li>
- <li>autocreate_homes<br>
- Create fhem devices for all netatmo homes, cameras and persons.</li>
- <li>autocreate_thermostats<br>
- Create fhem devices for all netatmo relays and thermostats.</li>
- <li>autocreate_homecoachs<br>
- Create fhem devices for all netatmo homecoachs.</li>
- </ul><br>
- <a name="netatmo_Get"></a>
- <b>Get</b><br />
- ACCOUNT
- <ul>
- <li>devices<br>
- list the netatmo weather devices for this account</li>
- <li>home<br>
- list the netatmo home devices for this account</li>
- <li>update<br>
- trigger a global update for dashboard data</li>
- <li>public [<address>] <args><br>
- no arguments -> get all public stations in a radius of 0.025° around global fhem latitude/longitude<br>
- <rad> -> get all public stations in a radius of <rad>° around global fhem latitude/longitude<br>
- <lat> <lon> [<rad>] -> get all public stations in a radius of 0.025° or <rad>° around <lat>/<lon><br>
- <lat1> <lon1> <lat2> <lon2> -> get all public stations in the area of <lat1> <lon2> <lat2> <lon2><br>
- if <address> 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>
- <lat> <lon> values can also be entered as a single coordinates parameter <lat>,<lon><br></li>
- </ul><br>
- DEVICE/MODULE
- <ul>
- <li>update<br>
- update the device readings</li>
- <li>updateAll<br>
- update the device readings after deleting all current readings</li>
- </ul><br>
- HOME
- <ul>
- <li>update<br>
- update the home events and all camera and person readings</li>
- </ul><br>
- CAMERA
- <ul>
- <li>ping<br>
- ping the camera and get the local command url</li>
- <li>live/_local<br>
- get the playlist for live video (internet or local network)</li>
- <li>video/_local <video_id><br>
- get the playlist for a video id (internet or local network)</li>
- </ul><br>
- PRESENCE
- <ul>
- <li>config<br>
- read the camera config</li>
- <li>timelapse<br>
- get the link for a timelapse video (local network)</li>
- </ul><br>
- PERSON
- <ul>
- <li>update<br>
- n/a</li>
- </ul><br>
- <a name="netatmo_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval<br>
- the interval in seconds used to check for new values.</li>
- <li>disable<br>
- 1 -> stop polling</li>
- <li>addresslimit<br>
- maximum number of addresses to resolve in public station searches (ACCOUNT - default: 10)</li>
- <li>setpoint_duration<br>
- setpoint duration in minutes (THERMOSTAT - default: 60)</li>
- <li>videoquality<br>
- video quality for playlists (HOME - default: medium)</li>
- <li>webhookURL<br>
- webhook URL - can include basic auth and ports: http://user:pass@your.url:8080/fhem/netatmo (WEBHOOK)</li>
- <li>webhookPoll<br>
- poll home after event from webhook (WEBHOOK - default: 0)</li>
- <li>ignored_device_ids<br>
- ids of devices/persons ignored on autocrate (ACCOUNT - comma separated)</li>
- </ul>
- </ul>
- <p><a name="notice"></a>
- <h3>notice</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#notice'>DE</a>]</div>
- <ul>
- <code>notice [confirm [value]|list [<keyword>]|reset [yes]|view <id> [noheader|[de|en]]]</code><br>
- <br>
- View and confirmation of system messages.
- <br>
- <br>
- During an update or a system start from FHEM sometimes it is necessary to
- inform the user about important changes or additions. It may be necessary
- to confirm a system message by the user.
- <br>
- <br>
- By entering the command '<code>notice</code>' a list of all messages is displayed.
- Are messages available in different languages, they are ordered by language.
- <br>
- Example:
- <blockquote><code><pre>
- fhem> notice
- ==> Language: de
- ID Published Expired Confirmed Description
- advice-20130128-002 actually never not needed kurze beschreibung
- update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
- ==> Language: en
- ID Published Expired Confirmed Description
- advice-20130128-001 actually never no short description
- advice-20130128-002 actually never not needed short description
- update-20130128-001 actually never no short description
- update-20130128-002 31.01.2013 01.02.2013 no short description
- </pre></code></blockquote>
- By entering '<code>notice list <keyword></code>' the output of the list contains only
- available messages that starts with '<code><keyword></code>'.
- <br>
- Example:
- <blockquote><code><pre>
- fhem> notice list update
- ==> Language: de
- ID Published Expired Confirmed Description
- update-20130128-002 31.01.2013 01.02.2013 no kurze beschreibung
- ==> Language: en
- ID Published Expired Confirmed Description
- update-20130128-001 actually never no short description
- update-20130128-002 31.01.2013 01.02.2013 no short description
- </pre></code></blockquote>
- To display a single message, enter the command '<code>notice view <id></code>' where <code>id</code>
- is the Identifier of the message. You can use the optional parameter <code>noheader</code>
- or the language codes <code>de</code> or <code>en</code> to display the message
- without the header informations or in your prefered language if available.
- <br>
- Example:
- <blockquote><code><pre>
- fhem> notice view advice-20130128-002 de
- ID : advice-20130128-002
- From : M. Fischer
- Date : 28.01.2013
- Expire : 0
- Title : kurze beschreibung
- ### Start of Text
- test-advice
- dies ist ein test
- 001
- ### End of Text
- </pre></code></blockquote>
- If it is necessary to confirm a message, this is be done by entering '<code>notice confirm <id> [value]</code>'.
- The optional argument <code>value</code> will also be stored with the confirmation.
- <br>
- Example:
- <blockquote><code><pre>
- fhem> notice confirm update-20130128-001 foo:bar
- update-20130128-001 confirmed on 2013-01-29 20:58:57: foo:bar
- </pre></code></blockquote>
- Sometimes it is necessary to reset all confirmations. This is be done by entering
- '<code>notice reset</code>'.
- <br>
- Example:
- <blockquote><code><pre>
- fhem> notice reset
- This command delete all confirmations.
- If you really want to do this, call 'notice reset yes'
- </pre></code></blockquote>
- <br>
- <strong>For developers only:</strong>
- <br>
- <br>
- <code>notice [condition <id>|get <keyword> <value>|position <id>]</code><br>
- <br>
- <br>
- These arguments are normally not needed by any user.
- <br>
- <br>
- A message may optionally contains one or more code snippets. The argument <code>condition</code> supplies the determined
- 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>.
- It is possible to define your own rules for a condition, like <code>!empty</code> or <code>>>5</code> and so on. An example
- of a condition is shown in the below example message file.
- Example:
- <blockquote><code><pre>
- fhem> notice condition update-20130127-001
- configfile:./fhem.cfg|sendStatistics:never:!empty
- </pre></code></blockquote>
- The argument <code>get</code>, followed by a <code>keyword</code> and a number from 0 to 8, returns a
- comma seperated list of message ids.
- The possible outputs are:
- <ul>
- <li><code>0 returns a list of all messages.</code></li>
- <li><code>1 returns a list of unconfirmed messages.</code></li>
- <li><code>2 returns a list of messages that are not expired.</code></li>
- <li><code>3 returns a list of messages that are not expired and unconfirmed.</code></li>
- <li><code>4 returns a list of published messages.</code></li>
- <li><code>5 returns a list of unconfirmed and published messages.</code></li>
- <li><code>6 returns a list of published messages that are not expired.</code></li>
- <li><code>7 returns a list of published, unconfirmed and not expired messages.</code></li>
- <li><code>8 returns a list of confirmed messages.</code></li>
- </ul>
- Example:
- <blockquote><code><pre>
- fhem> notice get all 2
- advice-20130128-001,advice-20130128-002,update-20130128-001,update-20130128-002
- </pre></code></blockquote>
- The argument <code>position</code> followed by an <code><id></code> returns the view position of a message if defined.
- <br>
- Example:
- <blockquote><code><pre>
- fhem> notice position update-20130128-001
- before
- </pre></code></blockquote>
- Example of a message file:
- <blockquote><code><pre>
- # FROM: M. Fischer
- # DATE: 28.01.2013
- # CONFIRM: 1
- # PUBLISH: 31.01.2013
- # EXPIRE: 01.02.2013
- # KEY_1: sendStatistics
- # VAL_1: AttrVal("global","sendStatistics",undef);
- # CON_1: !empty
- # KEY_2: configfile
- # VAL_2: AttrVal("global","configfile",undef);
- # POSITION: top
- # TITLE_DE: kurze beschreibung
- # NOTICE_DE
- Hinweis:
- dies ist ein test
- # TITLE_EN: short description
- # NOTICE_EN
- Advice:
- this is a test
- </pre></code></blockquote>
- The keywords '<code>FROM, DATE, CONFIRM, PUBLISH, EXPIRE, TITLE_DE, TITLE_EN, NOTICE_DE, NOTICE_EN</code>' are fixed.
- It is possible to add any key:value string to these files. Also it is possible to set only one or both keywords of
- '<code>TITLE_DE, TITLE_EN</code>' and '<code>NOTICE_DE, NOTICE_EN</code>'.
- </ul>
- <p><a name="notify"></a>
- <h3>notify</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#notify'>DE</a>]</div>
- <ul>
- <br>
- <a name="notifydefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> notify <pattern> <command></code>
- <br><br>
- Execute a command when received an event for the <a
- href="#define">definition</a> <code><pattern></code>. If
- <command> is enclosed in {}, then it is a perl expression, if it is
- enclosed in "", then it is a shell command, else it is a "plain" fhem.pl
- command (chain). See the <a href="#trigger">trigger</a> command for
- testing it.
- Examples:
- <ul>
- <code>define b3lampV1 notify btn3 set lamp $EVENT</code><br>
- <code>define b3lampV2 notify btn3 { fhem "set lamp $EVENT" }</code><br>
- <code>define b3lampV3 notify btn3 "/usr/local/bin/setlamp "$EVENT""</code><br>
- <code>define b3lampV3 notify btn3 set lamp1 $EVENT;;set lamp2 $EVENT</code><br>
- <code>define wzMessLg notify wz:measured.* "/usr/local/bin/logfht $NAME "$EVENT""</code><br>
- <code>define LogUndef notify global:UNDEFINED.* "send-me-mail.sh "$EVENT""</code><br>
- </ul>
- <br>
- Notes:
- <ul>
- <li><code><pattern></code> is either the name of the triggering
- device, or <code>devicename:event</code>.</li>
- <li><code><pattern></code> must completely (!)
- match either the device name, or the compound of the device name and
- the event. To identify the events use the inform command from the
- telnet prompt or the "Event Monitor" link in the browser
- (FHEMWEB), and wait for the event to be printed. See also the
- eventTypes device.</li>
- <li>in the command section you can access the event:
- <ul>
- <li>The variable $EVENT will contain the complete event, e.g.
- <code>measured-temp: 21.7 (Celsius)</code></li>
- <li>$EVTPART0,$EVTPART1,$EVTPART2,etc contain the space separated event
- parts (e.g. <code>$EVTPART0="measured-temp:", $EVTPART1="21.7",
- $EVTPART2="(Celsius)"</code>. This data is available as a local
- variable in perl, as environment variable for shell scripts, and will
- be textually replaced for FHEM commands.</li>
- <li>$NAME and $TYPE contain the name and type of the device triggering
- the event, e.g. myFht and FHT</li>
- </ul></li>
- <li>Note: the following is deprecated and will be removed in a future
- release. It is only active for featurelevel up to 5.6.
- The described replacement is attempted if none of the above
- variables ($NAME/$EVENT/etc) found in the command.
- <ul>
- <li>The character <code>%</code> will be replaced with the received
- event, e.g. with <code>on</code> or <code>off</code> or
- <code>measured-temp: 21.7 (Celsius)</code><br> It is advisable to put
- the <code>%</code> into double quotes, else the shell may get a syntax
- error.</li>
- <li>The character @ will be replaced with the device
- name.</li>
- <li>To use % or @ in the text itself, use the double mode (%% or
- @@).</li>
- <li>Instead of % and @, the parameters %EVENT (same as %), %NAME (same
- as @) and %TYPE (contains the device type,
- e.g. FHT) can be used. The space separated event "parts"
- are available as %EVTPART0, %EVTPART1, etc. A single %
- looses its special meaning if any of these parameters appears in the
- definition.</li>
- </ul></li>
- <li>Following special events will be generated for the device "global"
- <ul>
- <li>INITIALIZED after initialization is finished.</li>
- <li>REREADCFG after the configuration is reread.</li>
- <li>SAVE before the configuration is saved.</li>
- <li>SHUTDOWN before FHEM is shut down.</li>
- <li>DEFINED <devname> after a device is defined.</li>
- <li>DELETED <devname> after a device was deleted.</li>
- <li>RENAMED <old> <new> after a device was renamed.</li>
- <li>UNDEFINED <defspec> upon reception of a message for an
- undefined device.</li>
- </ul></li>
- <li>Notify can be used to store macros for manual execution. Use the <a
- href="#trigger">trigger</a> command to execute the macro.
- E.g.<br>
- <code>fhem> define MyMacro notify MyMacro { Log 1, "Hello"}</code><br>
- <code>fhem> trigger MyMacro</code><br>
- </li>
- </ul>
- </ul>
- <br>
- <a name="notifyset"></a>
- <b>Set </b>
- <ul>
- <li>addRegexpPart <device> <regexp><br>
- add a regexp part, which is constructed as device:regexp. The parts
- are separated by |. Note: as the regexp parts are resorted, manually
- constructed regexps may become invalid. </li>
- <li>removeRegexpPart <re><br>
- remove a regexp part. Note: as the regexp parts are resorted, manually
- constructed regexps may become invalid.<br>
- The inconsistency in addRegexpPart/removeRegexPart arguments originates
- from the reusage of javascript functions.</li>
- <li>inactive<br>
- Inactivates the current device. Note the slight difference to the
- disable attribute: using set inactive the state is automatically saved
- to the statefile on shutdown, there is no explicit save necesary.<br>
- This command is intended to be used by scripts to temporarily
- deactivate the notify.<br>
- The concurrent setting of the disable attribute is not recommended.</li>
- <li>active<br>
- Activates the current device (see inactive).</li>
- </ul>
- <br>
- <a name="notifyget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="notifyattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <a name="addStateEvent"></a>
- <li>addStateEvent<br>
- The event associated with the state Reading is special, as the "state: "
- string is stripped, i.e $EVENT is not "state: on" but just "on". In some
- circumstances it is desireable to get the event without "state: "
- stripped. In such a case the addStateEvent attribute should be set to 1
- (default is 0, i.e. strip the "state: " string).<br>
- Note 1: you have to set this attribute for the event "receiver", i.e.
- notify, FileLog, etc.<br>
- Note 2: this attribute will only work for events generated by devices
- supporting the <a href="#readingFnAttributes">readingFnAttributes</a>.
- </li>
- <a name="forwardReturnValue"></a>
- <li>forwardReturnValue<br>
- Forward the return value of the executed command to the caller,
- default is disabled (0). If enabled (1), then e.g. a set command which
- triggers this notify will also return this value. This can cause e.g
- FHEMWEB to display this value, when clicking "on" or "off", which is
- often not intended.</li>
- <a name="ignoreRegexp"></a>
- <li>ignoreRegexp regexp<br>
- It is hard to create a regexp which is _not_ matching something, this
- attribute helps in this case, as the event is ignored if matches the
- argument. The syntax is the same as for the original regexp.
- </li>
- <a name="readLog"></a>
- <li>readLog<br>
- Execute the notify for messages appearing in the FHEM Log. The device
- in this case is set to the notify itself, e.g. checking for the startup
- message looks like:
- <ul><code>
- define n notify n:.*Server.started.* { Log 1, "Really" }<br>
- attr n readLog
- </code></ul>
- </li>
- <a name="perlSyntaxCheck"></a>
- <li>perlSyntaxCheck<br>
- by setting the <b>global</b> attribute perlSyntaxCheck, a syntax check
- will be executed upon definition or modification, if the command is
- perl and FHEM is already started.
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="panStamp"></a>
- <h3>panStamp</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#panStamp'>DE</a>]</div>
- <ul>
- The panStamp is a family of RF devices sold by <a href="http://www.panstamp.com">panstamp.com</a>.
- It is possible to attach more than one device in order to get better
- reception, fhem will filter out duplicate messages.<br><br>
- This module provides the IODevice for the <a href="#SWAP">SWAP</a> modules that implement the SWAP protocoll
- to communicate with the individual moths in a panStamp network.<br><br>
- Note: currently only panSticks are know to work. The panStamp shield for a Rasperry Pi is untested.
- <br><br>
- 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.
- <br><br>
- <a name="panStamp_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> panStamp <device> [<address> [<channel> [<syncword>]]]</code> <br>
- <br>
- USB-connected devices:<br><ul>
- <device> specifies the serial port to communicate with the panStamp.
- The name of the serial-device depends on your distribution, under
- linux the cdc_acm kernel module is responsible, and usually a
- /dev/ttyACM0 device will be created. If your distribution does not have a
- cdc_acm module, you can force usbserial to handle the panStamp by the
- following command:<ul>modprobe usbserial vendor=0x0403
- product=0x6001</ul>In this case the device is most probably
- /dev/ttyUSB0.<br><br>
- You can also specify a baudrate if the device name contains the @
- character, e.g.: /dev/ttyACM0@38400<br><br>
- If the baudrate is "directio" (e.g.: /dev/ttyACM0@directio), then the
- perl module Device::SerialPort is not needed, and fhem opens the device
- with simple file io. This might work if the operating system uses sane
- defaults for the serial parameters, e.g. some Linux distributions and
- OSX. <br><br>
- </ul>
- <br>
- The address is a 2 digit hex number to identify the moth in the panStamp network. The default is 01.<br>
- The channel is a 2 digit hex number to define the channel. the default is 00.<br>
- The syncword is a 4 digit hex number to identify the panStamp network. The default is B547.<br><br>
- Uppon initialization a broadcast message is send to the panStamp network to try to
- autodetect and autocreate all listening SWAP devices (i.e. all devices not in power down mode).
- </ul>
- <br>
- <a name="panStamp_Set"></a>
- <b>Set</b>
- <ul>
- <li>raw data<br>
- send raw data to the panStamp to be transmitted over the RF link.
- </li><br>
- </ul>
- <a name="panStamp_Get"></a>
- <b>Get</b>
- <ul>
- </ul>
- <a name="panStamp_Attr"></a>
- <b>Attributes</b>
- <ul>
- </ul>
- <br>
- </ul>
- <p><a name="pilight"></a>
- <h3>pilight</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight'>DE</a>]</div>
- <ul>
- <a name="pilight_define"></a>
- <h4>Define</h4>
- <ul>
- <code>define <name> pilight <protocol></code>
- <br/>
- <br/>
- 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>
- 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/>
- Example:
- <ul>
- <code>define Weihnachtsbaum pilight kaku_switch</code><br>
- <code>attr Weihnachtsbaum housecode 12323578</code><br>
- <code>attr Weihnachtsbaum unitcode 0</code><br>
- </ul>
- <br/>
- 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.
- <br/>
- <b>This version is written for pilight 6.0. If you run a prior version, please set the following attribute:</b>
- <code> attr Weihnachtsbaum useOldVersion 1</code>
- </ul>
- <a name="pilight_Attr"></a>
- <h4>Attributes</h4>
- <ul>
- <li><a name="protocol"><code>attr <name> protocol <string></code></a>
- <br />Protocol used in pilight, e.g. "kaku_switch"</li>
- <li><a name="housecode"><code>attr <name> housecode <string></code></a>
- <br />Housecode used in pilight (for protocol kaku*, clarus_switch, rev1_switch, rev2_switch, rev3_switch, quigg_switch, quigg_gt1000, quigg_gt7000)</li>
- <li><a name="systemcode"><code>attr <name> systemcode <string></code></a>
- <br />Systemcode of your switch (for protocol elso, elro_he, elro_hc, silvercrest, impuls, rsl366, pollin, mumbi, brennenstuhl, intertechno_old)</li>
- <li><a name="unitcode"><code>attr <name> unitcode <string></code></a>
- <br />Unit code/device code used in pilight (all protocols)</li>
- <li><a name="rawCodeOn/rawCodeOff"><code>attr <name> rawCode <string></code></a>
- <br />Raw code to send on/off-command with protocol "raw"</li>
- <li><a name="remote_ip"><code>attr <name> remote_ip <string></code></a>
- <br />Remote IP of you pilight server (127.0.0.1 is default)</li>
- <li><a name="remote_port"><code>attr <name> remote_port <string></code></a>
- <br />Remote port of you pilight server (5000 is default)</li>
- <li><a name="rawCodeOn"><code>attr <name> rawCodeOn <string></code></a>
- <br />Raw command to send to switch device ON (only used with protocol 'raw')</li>
- <li><a name="rawCodeOff"><code>attr <name> rawCodeOff <string></code></a>
- <br />Raw command to send to switch device OFF (only used with protocol 'raw')</li>
- </ul>
- </ul>
- <p><a name="pilight_contact"></a>
- <h3>pilight_contact</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight_contact'>DE</a>]</div>
- <ul>
- pilight_contact represents a contact sensor receiving data from pilight<br>
- You have to define the base device pilight_ctrl first.<br>
- Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
- <br>
- <a name="pilight_contact_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> pilight_contact protocol id [unit]</code>
- <br><br>
- Example:
- <ul>
- <code>define myctrl pilight_contact arctech_contact 12836682 1</code><br>
- </ul>
- </ul>
- <br>
- <a name="pilight_contact_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- state<br>
- present the current state (open|closed)
- </li>
- </ul>
- </ul>
- <p><a name="pilight_ctrl"></a>
- <h3>pilight_ctrl</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight_ctrl'>DE</a>]</div>
- <ul>
- pilight_ctrl is the base device for the communication (sending and receiving) with the pilight-daemon.<br>
- You have to define client devices e.q. pilight_switch for switches.<br>
- Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br><br>
- 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>
- Currently supported: <br>
- <ul>
- <li>Switches:</li>
- <li>Dimmers:</li>
- <li>Temperature and humitity sensors</li>
- </ul>
-
- <br><br>
- <a name="pilight_ctrl_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> pilight_ctrl ip:port [api]</code>
- ip:port is the IP address and port of the pilight-daemon<br>
- api specifies the pilight api version - default 6.0<br>
- <br>
- Example:
- <ul>
- <code>define myctrl pilight_ctrl localhost:5000 5.0</code><br>
- <code>define myctrl pilight_ctrl 192.168.1.1:5000</code><br>
- </ul>
- </ul>
- <br>
- <a name="pilight_ctrl_set"></a>
- <p><b>Set</b></p>
- <ul>
- <li><b>reset</b> Reset the connection to the pilight daemon</li>
- <li><b>disconnect</b>Diconnect from pilight daemon and do not reconnect automatically</li>
- </ul>
- <br>
- <a name="pilight_ctrl_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- rcv_raw<br>
- The last complete received message in json format.
- </li>
- </ul>
- <br>
- <a name="pilight_ctrl_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="ignoreProtocol">ignoreProtocol</a><br>
- Comma separated list of protocol:id combinations to ignore.<br>
- protocol:* ignores the complete protocol.<br>
- * All incomming messages will be ignored. Only protocol id combinations from defined submodules will be accepted<br>
- Example:
- <li><code>ignoreProtocol tfa:0</code></li>
- <li><code>ignoreProtocol tfa:*</code></li>
- <li><code>ignoreProtocol *</code></li>
- </li>
- <li><a name="brands">brands</a><br>
- Comma separated list of <search>:<replace> combinations to rename protocol names. <br>
- pilight uses different protocol names for the same protocol e.q. arctech_switch and kaku_switch<br>
- Example: <code>brands archtech:kaku</code>
- </li>
- <li><a name="ContactAsSwitch">ContactAsSwitch</a><br>
- Comma separated list of ids which correspond to a contact but will be interpreted as switch. <br>
- In this case opened will be interpreted as on and closed as off.<br>
- Example: <code>ContactAsSwitch 12345</code>
- </li>
- <li><a name="SendTimeout">SendTimeout</a><br>
- Timeout [s] for aborting sending commands (non blocking) - default 1s
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="pilight_dimmer"></a>
- <h3>pilight_dimmer</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight_dimmer'>DE</a>]</div>
- <ul>
- pilight_dimmer represents a dimmmer controled with\from pilight<br>
- You have to define the base device pilight_ctrl first.<br>
- Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
- Supported dimmers: <a href="http://wiki.pilight.org/doku.php/protocols#dimmers">http://wiki.pilight.org/doku.php/protocols#dimmers</a><br>
- <br>
- It is possible to add the screen feature to a dimmer. So you can change the dimlevel by set 'up' or 'down'.<br>
- If you push up or down on the remote control the dimlevel will be changed by dimlevel_step.<br>
- Further it is possible to define a simulated dimmer with a screen and switch protocol. See example three.<br>
- 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>
- <br>
- <a name="pilight_dimmer_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> pilight_dimmer protocol id unit [protocol]</code>
- <br>The second protocol is optional. With it you can add the pilight screen feature (up|down)
- Example:
- <ul>
- <code>define myctrl pilight_dimmer kaku_dimmer 13483668 0</code><br>
- <code>define myctrl pilight_dimmer kaku_dimmer 13483668 0 kaku_screen</code> - Dimmer with screen feature<br>
- <code>define myctrl pilight_dimmer quigg_screen 1 0 quigg_gt7000</code> - Simulated dimmer with screen feature<br>
- </ul>
- </ul>
- <br>
- <a name="pilight_dimmer_set"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <b>on</b>
- </li>
- <li>
- <b>off</b>
- </li>
- <li>
- <b>up</b> only if defined with screen protocol
- </li>
- <li>
- <b>down</b> only if defined with screen protocol
- </li>
- <li>
- <b>dimlevel</b>
- </li>
- <li>
- <a href="#setExtensions">set extensions</a> are supported<br>
- </li>
- </ul>
- <br>
- <a name="pilight_dimmer_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- state<br>
- state of the dimmer on or off
- </li>
- <li>
- dimlevel<br>
- dimlevel of the dimmer
- </li>
- </ul>
- <br>
- <a name="pilight_dimmer_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="dimlevel_max_device">dimlevel_max_device</a><br>
- Maximum of the dimlevel of the device - default 15<br>
- Have to be less or equal than dimlevel_max<br>
- </li>
- <li><a name="dimlevel_max">dimlevel_max</a><br>
- Maximum of the dimlevel in FHEM - default dimlevel_max_device<br>
- </li>
- <li><a name="dimlevel_step">dimlevel_step</a><br>
- Step of the dimlevel - default 1<br>
- </li>
- <li><a name="dimlevel_on">dimlevel_on</a><br>
- Change dimlevel to value if on set - default no changing<br>
- Could be a numeric value or dimlevel_max<br>
- </li>
- <li><a name="dimlevel_off">dimlevel_off</a><br>
- Change dimlevel to value if off set - default no changing<br>
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="pilight_raw"></a>
- <h3>pilight_raw</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight_raw'>DE</a>]</div>
- <ul>
- With pilight_raw it si possible to send raw codes<br>
- You have to define the base device pilight_ctrl first.<br>
- <br>
- <a name="pilight_raw_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> pilight_raw</code>
- </ul>
- <br>
- <a name="pilight_raw_set"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <b>on</b>
- Send 'onCode' as raw code
- </li>
- <li>
- <b>off</b>
- Send 'offCode' as raw code
- </li>
- <li>
- <b>code <value></b>
- Send <value> as raw code
- </li>
- <li>
- <a href="#setExtensions">set extensions</a> are supported<br>
- </li>
- </ul>
- <br>
- <a name="pilight_raw_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- state<br>
- state on or off
- </li>
- </ul>
- <br>
- <a name="pilight_raw_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="onCode">onCode</a><br>
- raw code for state on
- </li>
- <li><a name="offCode">onCode</a><br>
- raw code for state off
- </li>
- <li>
- sendCount<br>
- How many times the command is send. Default: 1
- </li>
- </ul>
- </ul>
- <p><a name="pilight_smoke"></a>
- <h3>pilight_smoke</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight_smoke'>DE</a>]</div>
- <ul>
- pilight_smoke represents a smoke sensor receiving data from pilight<br>
- You have to define the base device pilight_ctrl first.<br>
- Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
- <br>
- <a name="pilight_smoke_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> pilight_smoke protocol id</code>
- <br><br>
- Example:
- <ul>
- <code>define myctrl pilight_smoke secudo_smoke_sensor 0</code><br>
- </ul>
- </ul>
- <br>
- <a name="pilight_smoke_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- state<br>
- present the current state (alarm|none)
- </li>
- </ul>
- <br>
- <a name="pilight_smoke_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="resetTime">resetTime</a><br>
- Time [sec] to reset the state to none.
- </li>
- </ul>
- </ul>
- <p><a name="pilight_switch"></a>
- <h3>pilight_switch</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight_switch'>DE</a>]</div>
- <ul>
- pilight_switch represents a switch controled with\from pilight<br>
- You have to define the base device pilight_ctrl first.<br>
- Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
- Supported switches: <a href="http://wiki.pilight.org/doku.php/protocols#switches">http://wiki.pilight.org/doku.php/protocols#switches</a><br>
- <br>
- <a name="pilight_switch_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> pilight_switch protocol id unit</code>
- <br><br>
- Example:
- <ul>
- <code>define myctrl pilight_switch kaku_switch_old 0 0</code><br>
- </ul>
- </ul>
- <br>
- <a name="pilight_switch_set"></a>
- <p><b>Set</b></p>
- <ul>
- <li>
- <b>on</b>
- </li>
- <li>
- <b>off</b>
- </li>
- <li>
- <a href="#setExtensions">set extensions</a> are supported<br>
- </li>
- </ul>
- <br>
- <a name="pilight_switch_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- state<br>
- state of the switch on or off
- </li>
- </ul>
- <a name="pilight_switch_attr"></a>
- <b>Attributs</b>
- <ul>
- <li>
- IODev<br>
- </li>
- <li>
- sendCount<br>
- How many times the command is send. Default: 1
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="pilight_temp"></a>
- <h3>pilight_temp</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#pilight_temp'>DE</a>]</div>
- <ul>
- pilight_temp represents a temperature and humidity sensor receiving data from pilight<br>
- You have to define the base device pilight_ctrl first.<br>
- Further information to pilight: <a href="http://www.pilight.org/">http://www.pilight.org/</a><br>
- Supported Sensors: <a href="http://wiki.pilight.org/doku.php/protocols#switches">http://wiki.pilight.org/doku.php/protocols#weather_stations</a><br>
- <br>
- <a name="pilight_temp_define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> pilight_temp protocol id</code>
- <br><br>
- Example:
- <ul>
- <code>define myctrl pilight_temp alecto_wsd17 100</code><br>
- </ul>
- </ul>
- <br>
- <a name="pilight_temp_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- state<br>
- present the current temperature
- </li>
- <li>
- temperature<br>
- present the current temperature
- </li>
- <li>
- humidity<br>
- present the current humidity (if sensor support it)
- </li>
- <li>
- battery<br>
- present the battery state of the senor (if sensor support it)
- </li>
- <li>
- pressure<br>
- present the pressure state of the senor (if sensor support it)
- </li>
- <li>
- windavg<br>
- present the average wind speed state of the senor (if sensor support it)
- </li>
- <li>
- winddir<br>
- present the wind direction state of the senor (if sensor support it)
- </li>
- <li>
- windgust<br>
- present the wind gust state of the senor (if sensor support it)
- </li>
- </ul>
- <br>
- <a name="pilight_temp_attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="corrTemp">corrTemp</a><br>
- A factor (e.q. 0.1) to correct the temperture value. Default: 1
- temperature = corrTemp * piligt_temp + offsetTemp
- </li>
- <li><a name="offsetTemp">offsetTemp</a><br>
- An offset for temperature value. Default: 0
- temperature = corrTemp * piligt_temp + offsetTemp
- </li>
- <li><a name="corrHumidity">corrHumidity</a><br>
- A factor (e.q. 0.1) to correct the humidity value. Default: 1
- humidity = corrHumidity * piligt_humidity + offsetHumidity
- </li>
- <li><a name="offsetHumidity">offsetHumidity</a><br>
- An offset for humidity value. Default: 0
- humidity = corrHumidity * piligt_humidity + offsetHumidity
- </li>
- </ul>
- </ul>
- <p><a name="ping"></a>
- <h3>ping</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#ping'>DE</a>]</div>
- <ul>
- <p>This module provides a simple "ping" function for testing the state of a remote network device.</p>
- <p>It allows for alerts to be triggered when devices cannot be reached using a notify function.</p>
- <a name="ping_define"></a>
- <p><b>Define</b></p>
- <ul>
- <p><code>define <name> ping <host/ip> <mode> <timeout></code></p>
- <p>Specifies the ping device.<br/>
- <host/ip> is the hostname or IP address of the Bridge.</p>
- <p>Specifies ping mode.<br/>
- <mode> One of: tcp|udp|icmp. Read the perl docs for more detail: http://perldoc.perl.org/Net/Ping.html</p>
- <p>Timeout.<br/>
- <timeout> is the maximum time to wait for each ping.</p>
- </ul>
- <a name="ping_readings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>
- <b>state</b><br/>
- [Initialized|ok|unreachable]: Shows reachable status check every 10 (checkInterval) seconds.
- </li>
- </ul>
- <a name="ping_attr"></a>
- <p><b>Attributes</b></p>
- <ul>
- <li>
- <b>checkInterval</b><br/>
- Default: 10s. Time after the bridge connection is re-checked.
- </li>
- <li>
- <b>minFailCount</b><br/>
- Default: 1. Number of failures before reporting "unreachable".
- </li>
- </ul>
- </ul>
- <p><a name="plex"></a>
- <h3>plex</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#plex'>DE</a>]</div>
- <ul>
- This module allows you to control and receive events from plex.<br><br>
- <br><br>
- Notes:
- <ul>
- <li>IO::Socket::Multicast is needed to use server and client autodiscovery.</li>
- <li>As far as possible alle get and set commands are non-blocking.
- Any output is displayed asynchronous and is using fhemweb popup windows.</li>
- </ul>
- <br><br>
- <a name="plex_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> plex [<server>]</code>
- <br><br>
- </ul>
- <a name="plex_Set"></a>
- <b>Set</b>
- <ul>
- <li>play [<server> [<item>]]<br>
- </li>
- <li>resume [<server>] <item>]<br>
- </li>
- <li>pause [<type>]</li>
- <li>stop [<type>]</li>
- <li>skipNext [<type>]</li>
- <li>skipPrevious [<type>]</li>
- <li>stepBack [<type>]</li>
- <li>stepForward [<type>]</li>
- <li>seekTo <value> [<type>]</li>
- <li>volume <value> [<type>]</li>
- <li>shuffle 0|1 [<type>]</li>
- <li>repeat 0|1|2 [<type>]</li>
- <li>mirror [<server>] <item><br>
- show preplay screen for <item></li>
- <li>home</li>
- <li>music</li>
- <li>showAccount<br>
- display obfuscated user and password in cleartext</li>
- <li>playlistCreate [<server>] <name></li>
- <li>playlistAdd [<server>] <key> <keys></li>
- <li>playlistRemove [<server>] <key> <keys></li>
- <li>unwatched [[<server>] <items>]</li>
- <li>watched [[<server>] <items>]</li>
- <li>autocreate <machineIdentifier><br>
- create device for remote/shared server</li>
- </ul><br>
- <a name="plex_Get"></a>
- <b>Get</b>
- <ul>
- <li>[<server>] ls [<path>]<br>
- browse the media library. eg:<br><br>
- <b><code>get <plex> ls</code></b>
- <pre> Plex Library
- key type title
- 1 artist Musik
- 2 ...</pre><br>
- <b><code>get <plex> ls /1</code></b>
- <pre> Musik
- key type title
- all All Artists
- albums By Album
- collection By Collection
- decade By Decade
- folder By Folder
- genre By Genre
- year By Year
- recentlyAdded Recently Added
- search?type=9 Search Albums...
- search?type=8 Search Artists...
- search?type=10 Search Tracks...</pre><br>
- <b><code>get <plex> ls /1/albums</code></b>
- <pre> Musik ; By Album
- key type title
- /library/metadata/133999/children album ...
- /library/metadata/134207/children album ...
- /library/metadata/168437/children album ...
- /library/metadata/82906/children album ...
- ...</pre><br>
- <b><code>get <plex> ls /library/metadata/133999/children</code></b>
- <pre> ...</pre><br>
- <br>if used from fhemweb album art can be displayed and keys and other items are klickable.<br><br>
- </li>
- <li>[<server>] search <keywords><br>
- search the media library for items that match <keywords></li>
- <li>[<server>] onDeck<br>
- list the global onDeck items</li>
- <li>[<server>] recentlyAdded<br>
- list the global recentlyAdded items</li>
- <li>[<server>] detail <key><br>
- show detail information for media item <key></li>
- <li>[<server>] playlists<br>
- list playlists</li>
- <li>[<server>] m3u [album]<br>
- creates an album playlist in m3u format. can be used with other players like sonos.</li>
- <li>[<server>] pls [album]<br>
- creates an album playlist in pls format. can be used with other players like sonos.</li>
- <li>clients<br>
- list the known clients</li>
- <li>servers<br>
- list the known servers</li>
- <li>pin<br>
- get a pin for authentication at <a href="https://plex.tv/pin">https://plex.tv/pin</a></li>
- </ul><br>
- <a name="plex_Attr"></a>
- <b>Attr</b>
- <ul>
- <li>httpPort</li>
- <li>ignoredClients</li>
- <li>ignoredServers</li>
- <li>removeUnusedReadings</li>
- <li>user</li>
- <li>password<br>
- user and password of a myPlex account. required if plex home is used. both are stored obfuscated</li>
- </ul>
- </ul><br>
- <p><a name="powerMap"></a>
- <h3>powerMap</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#powerMap'>DE</a>]</div>
- (en | <a href="commandref_DE.html#powerMap">de</a>)
- <div>
- <ul>
- powerMap will help to determine current power consumption and calculates
- energy consumption either when power changes or within regular interval.<br>
- These new values may be used to collect energy consumption for devices w/o
- power meter (e.g. fridge, lighting or FHEM server) and for further processing
- using module <a href="#ElectricityCalculator">ElectricityCalculator</a>.
- <br>
- <a name="powerMapdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> powerMap</code><br>
- You may only define one single instance of powerMap.
- </ul><br>
- <a name="powerMapset"></a>
- <b>Set</b>
- <ul>
- <li>
- <code>assign <a href="#devspec"><devspec></a></code><br>
- Adds pre-defined powerMap attributes to one or more devices
- for further customization.
- </li>
- </ul><br>
- <a name="powerMapget"></a>
- <b>Get</b>
- <ul>
- <li>
- <code>devices</code><br>
- Lists all devices having set an attribute named 'powerMap'.
- </li>
- </ul><br>
- <a name="powerMapreadings"></a>
- <b>Readings</b><br>
- <ul>
- Device specific readings:
- <ul>
- <li>
- <code>pM_energy</code><br>
- A counter for consumed energy in Wh.<br>
- Hint: In order to have the calculation working, attribute
- <code>timestamp-on-change-reading</code> may not be set for
- reading pM_energy!
- </li><br>
- <li>
- <code>pM_energy_begin</code><br>
- Unix timestamp when collection started and device started to consume
- energy for the very first time.
- </li><br>
- <li>
- <code>pM_consumption</code><br>
- Current power consumption of device in W.
- </li>
- </ul><br>
- </ul>
- <a name="powerMapattr"></a>
- <b>Attribute</b>
- <ul>
- <li>
- <code>disable 1</code><br>
- No readings will be created or calculated by this module.
- </li><br>
- <li>
- <code>powerMap_eventChainWarnOnly <1></code><br>
- When set, event chain will NOT be repaired automatically if readings
- were found to be required for powerMap but their events are currently
- suppressed because they are either missing from attributes event-on-change-reading
- or event-on-update-reading. Instead, manual intervention is required.
- </li><br>
- <li>
- <code>powerMap_interval <seconds></code><br>
- Interval in seconds to calculate energy.<br>
- Default value is 900 seconds.
- </li><br>
- <li>
- <code>powerMap_noEnergy 1</code><br>
- No energy consumption will be calculated for that device.
- </li><br>
- <li>
- <code>powerMap_noPower 1</code><br>
- No power consumption will be determined for that device and
- consequently no energy consumption at all.
- </li><br>
- <li>
- <code>powerMap_rname_E</code><br>
- Sets reading name for energy consumption.<br>
- Default value is 'pM_energy'.
- </li><br>
- <li>
- <code>powerMap_rname_P</code><br>
- Sets reading name for power consumption.<br>
- Default value is 'pM_consumption'.
- </li><br>
- <li>
- <code>powerMap<pre>
- {
- '<reading>' => {
- '<value>' => <power>,
- '<value>' => <power>,
- ...
- },
- '<reading>' {
- '<value>' => <power>,
- '<value>' => <power>,
- ...
- },
- ...
- }</pre>
- </code> (device specific)<br>
- A Hash containing event(=reading) names and possible values of it. Each value can be assigned a
- corresponding power consumption.<br>
- For devices with dimming capability intemediate values will be linearly interpolated. For this
- to work two separate numbers will be sufficient.<br>
- <br>
- Text values will automatically get any numbers extracted from it and be used for interpolation.
- (example: dim50% will automatically be interpreted as 50).<br>
- In addition "off" and "on" will be translated to 0 and 100 respectively.<br>
- If the value cannot be interpreted in any way, 0 power consumption will be assumed.<br>
- Explicitly set definitions in powerMap attribute always get precedence.<br>
- <br>
- In case several power values need to be summarized, the name of other readings may be added after
- number value, separated by comma. The current status of that reading will then be considered for
- total power calculcation. To consider all readings powerMap knows, just add an *.<br>
- <br>
- Example for FS20 socket:
- <ul>
- <code><pre>
- 'state' => {
- '0' => 0,
- '100' => 60,
- },
- </pre></code><br>
- </ul><br>
- Example for HUE white light bulb:
- <ul>
- <code><pre>
- 'pct' => {
- '0' => 0.4,
- '10' => 1.2,
- '20' => 1.7,
- '30' => 1.9,
- '40' => 2.3,
- '50' => 2.7,
- '60' => 3.4,
- '70' => 4.7,
- '80' => 5.9,
- '90' => 7.5,
- '100' => 9.2,
- },
- 'state' => {
- 'unreachable' => 0,
- '*' => 'pct',
- },
- </pre></code><br>
- </ul>
- </li>
- </ul>
- </ul>
- </div>
- <p><a name="rain"></a>
- <h3>rain</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#rain'>DE</a>]</div>
- <ul>
- Rain calculations. Offers different values from a rain sensor. <br>
- <a name="raindefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> rain <devicename-regex> [<rain_name> <israining_name> <new_name>]</code><br>
- <br>
- <ul>
- Calculates rain values for device <devicename-regex> from incremental rain-value and israining-state
- and write it to some new readings named rain_calc_???????.
- If optional <rain_name>, <israining_name> and <new_name> is specified
- then read rain from reading <rain_name>, israining from reading <israining_name>
- and write the calculated rain to reading <new_name>.
- </ul>
-
- The following values are generated:
- <ul>
- <li>rain_calc_all --> all values in one line</li>
- <li>rain_calc_d_curr --> liter rain at the current day (from 7:30 local time)</li>
- <li>rain_calc_d_last --> liter rain of 24h before 7:30 local time</li>
- <li>rain_calc_d_start --> first incremental rain value from the rain device after 7:30 local time</li>
- <li>rain_calc_h_curr --> liter rain at the current hour (from XX:30)</li>
- <li>rain_calc_h_last --> liter rain of 1 hour before the last XX:30 time</li>
- <li>rain_calc_h_start --> first incremental rain value from the rain device after last XX:30</li>
- <li>rain_calc_now_diff --> fallen rain in liter since last value from rain device</li>
- <li>rain_calc_now_rate --> fallen rain in liter/hour since last value from rain device</li>
-
- </ul>
- <br>
- Example:<PRE>
- # Compute the rain for the rain/israining
- # events of the ks300 device and generate reading rain_calc.
- define rain_ks300 rain ks300
- </PRE>
- </ul>
- <a name="rainset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="rainget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="rainattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li>DontUseIsRaining 0/1
- <br>
- Don't use the devicevalue IsRaining, if set to 1
- </li>
- <li>DayChangeTime HHMM
- <br>
- Change the default (day)time of the 'set value to zero' time (use the timecode as four digits!)
- <br>
- The minutevalue is used to set the (hour)time of the 'set value to zero' time
- </li>
-
- <li>CorrectionValue 1
- <br>
- 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.
- </li>
- <br>
- </ul>
- </ul>
- <p><a name="readingsChange"></a>
- <h3>readingsChange</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#readingsChange'>DE</a>]</div>
- <ul>
- <br>
- <a name="readingsChangedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> readingsChange <device> <readingName>
- <toReplace> <replaceWith>"</code>
- <br><br>
- Change the content of a reading if it changes, with the perl string
- substitute mechanism. Note: As some modules rely on the known format of
- some readings, changing such readings may cause these modules to stop
- working.
- <br><br>
- <device>, <readingName> and <toReplace> are regular
- expressions, and are not allowed to contain whitespace.
- If replaceWith is enclosed in {}, then the content will be executed as a
- perl expression for each match.<br>
- Notes:<ul>
- <li>after a Reading is set by a module, first the event-* attributes are
- evaluated, then userReadings, then stateFormat, then the
- readingsChange definitions (in alphabetical order), and after this the
- notifies, FileLogs, etc. again in alphabetical order.</li>
- <li>if stateFormat for the matched device is set, then it will be
- executed multiple times: once before the readingsChange, and once for
- every matching readingsChange.</li>
- </ul>
- <br><br>
- Examples:
- <ul><code>
- # shorten the reading power 0.5 W previous: 0 delta_time: 300<br>
- # to just power 0.5 W<br>
- define pShort readingsChange pm power (.*W).* $1<br>
- <br>
- # format each decimal number in the power reading to 2 decimal places<br>
- define p2dec readingsChange pm power (\d+\.\d+) {sprintf("%0.2f", $1)}
- </code></ul>
- </ul>
- <br>
- <a name="readingsChangeset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="readingsChangeget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="readingsChangeattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a href="#addStateEvent">addStateEvent</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="readingsGroup"></a>
- <h3>readingsGroup</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#readingsGroup'>DE</a>]</div>
- <ul>
- Displays a collection of readings from on or more devices.
- <br><br>
- <a name="readingsGroup_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> readingsGroup <device>[:regex] [<device-2>[:regex-2]] ... [<device-n>[:regex-n]]</code><br>
- <br>
- Notes:
- <ul>
- <li><device> can be of the form INTERNAL=VALUE where INTERNAL is the name of an internal value and VALUE is a regex.</li>
- <li><device> can be of the form ATTRIBUTE&VALUE where ATTRIBUTE is the name of an attribute and VALUE is a regex.</li>
- <li><device> can be of the form <STRING> or <{perl}> where STRING or the string returned by perl is
- inserted as a line in the readings list. skipped if STRING is undef.</li>
- <li><device> can be a devspec (see <a href="#devspec">devspec</a>) with at least one FILTER expression.</li>
- <li>If regex is a comma separatet list the reading values will be shown on a single line.</li>
- <li>If regex starts with a '+' it will be matched against the internal values of the device instead of the readings.</li>
- <li>If regex starts with a '?' it will be matched against the attributes of the device instead of the readings.</li>
- <li>If regex starts with a '!' the display of the value will be forced even if no reading with this name is available.</li>
- <li>If regex starts with a '$' the calculation with value columns and rows is possible.</li>
- <li>The following <a href="#set">"set magic"</a> prefixes and suffixes can be used with regex:
- <ul>
- <li>You can use an i:, r: or a: prefix instead of + and ? analogue to the devspec filtering.</li>
- <li>The suffix :d retrieves the first number.</li>
- <li>The suffix :i retrieves the integer part of the first number.</li>
- <li>The suffix :r<n> retrieves the first number and rounds it to <n> decimal places. If <n> is missing, then rounds it to one decimal place.</li>
- <li>The suffix :t returns the timestamp (works only for readings).</li>
- <li>The suffix :sec returns the number of seconds since the reading was set. probably not realy usefull with readingsGroups.</li>
- </ul></li>
- <li>regex can be of the form <regex>@device to use readings from a different device.<br>
- if the device name part starts with a '!' the display will be foreced.
- use in conjunction with ! in front of the reading name.</li>
- <li>regex can be of the form <regex>@{perl} to use readings from a different device.</li>
- <li>regex can be of the form <STRING> or <{perl}[@readings]> where STRING or the string returned by perl is
- inserted as a reading or:
- <ul><li>the item will be skipped if STRING is undef</li>
- <li>if STRING is br a new line will be started</li>
- <li>if STRING is hr a horizontal line will be inserted</li>
- <li>if STRING is tfoot the table footer is started</li>
- <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
- as the command to be executed if the icon is clicked. also see the commands attribute.</li></ul>
- if readings is given the perl expression will be reevaluated during longpoll updates.</li>
- <li>If the first regex is '@<index>' it gives the index of the following regex by which the readings
- are to be grouped. if capture groups are used they can be refferenced by #<number>. eg:<br><ul>
- <code><IP-Adress><Hostname><MAC><Vendor><br>
- nmap:@2,<#1>,(.*)_hostname,#1_macAddress,#1_macVendor</code></ul></li>
- <li>For internal values and attributes longpoll update is not possible. Refresh the page to update the values.</li>
- <li>the <{perl}> expression is limited to expressions without a space. it is best just to call a small sub
- in 99_myUtils.pm instead of having a compex expression in the define.</li>
- </ul><br>
- Examples:
- <ul>
- <code>
- define batteries readingsGroup .*:battery</code><br>
- <br>
- <code>define temperatures readingsGroup s300th.*:temperature</code><br>
- <code>define temperatures readingsGroup TYPE=CUL_WS:temperature</code><br>
- <br>
- <code>define culRSSI readingsGroup cul_RSSI=.*:+cul_RSSI</code><br>
- <br>
- <code>define heizung readingsGroup t1:temperature t2:temperature t3:temperature<br>
- attr heizung notime 1<br>
- attr heizung mapping {'t1.temperature' => 'Vorlauf', 't2.temperature' => 'R&uuml;cklauf', 't3.temperature' => 'Zirkulation'}<br>
- attr heizung style style="font-size:20px"<br>
- <br>
- define systemStatus readingsGroup sysstat<br>
- attr systemStatus notime 1<br>
- attr systemStatus nostate 1<br>
- attr systemStatus mapping {'load' => 'Systemauslastung', 'temperature' => 'Systemtemperatur in &deg;C'}<br>
- <br>
- define Verbrauch readingsGroup TYPE=PCA301:state,power,consumption<br>
- attr Verbrauch mapping %ALIAS<br>
- attr Verbrauch nameStyle style="font-weight:bold"<br>
- attr Verbrauch style style="font-size:20px"<br>
- attr Verbrauch valueFormat {power => "%.1f W", consumption => "%.2f kWh"}<br>
- attr Verbrauch valueIcon { state => '%devStateIcon' }<br>
- attr Verbrauch valueStyle {($READING eq "power" && $VALUE > 150)?'style="color:red"':'style="color:green"'}<br>
- <br>
- define rg_battery readingsGroup TYPE=LaCrosse:[Bb]attery<br>
- attr rg_battery alias Batteriestatus<br>
- attr rg_battery commands { "battery.low" => "set %DEVICE replaceBatteryForSec 60" }<br>
- attr rg_battery valueIcon {'battery.ok' => 'batterie', 'battery.low' => 'batterie@red'}<br>
- <br>
- 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>
- attr rgMediaPlayer commands { "playStatus.paused" => "set %DEVICE play", "playStatus.playing" => "set %DEVICE pause" }<br>
- attr rgMediaPlayer mapping <br>
- attr rgMediaPlayer notime 1<br>
- attr rgMediaPlayer valueFormat { "volume" => "Volume: %i" }<br>
- #attr rgMediaPlayer valueIcon { "playStatus.paused" => "rc_PLAY", "playStatus.playing" => "rc_PAUSE" }<br>
- </code><br>
- </ul>
- </ul><br>
- <a name="readingsGroup_Set"></a>
- <b>Set</b>
- <ul>
- <li>hide<br>
- will hide all visible instances of this readingsGroup</li>
- <li>show<br>
- will show all visible instances of this readingsGroup</li>
- <li>toggle<br>
- will toggle the hidden/shown state of all visible instances of this readingsGroup</li>
- <li>toggle2<br>
- will toggle the expanded/collapsed state of all visible instances of this readingsGroup</li>
- </ul><br>
- <a name="readingsGroup_Get"></a>
- <b>Get</b>
- <ul>
- </ul><br>
- <a name="readingsGroup_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>alwaysTrigger<br>
- 1 -> alwaysTrigger update events. even if not visible.<br>
- 2 -> trigger events for calculated values.</li><br>
- <li>disable<br>
- 1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.<br>
- 2 -> also disable html table creation<br>
- 3 -> also disable html creation completely</li><br>
- <li>sortDevices<br>
- 1 -> sort the device lines alphabetically. use the first of sortby or alias or name that is defined for each device.</li>
- <li>noheading<br>
- If set to 1 the readings table will have no heading.</li><br>
- <li>nolinks<br>
- Disables the html links from the heading and the reading names.</li><br>
- <li>nostate<br>
- If set to 1 the state reading is excluded.</li><br>
- <li>nonames<br>
- If set to 1 the reading name / row title is not displayed.</li><br>
- <li>notime<br>
- If set to 1 the reading timestamp is not displayed.</li><br>
- <li>mapping<br>
- Can be a simple string or a perl expression enclosed in {} that returns a hash that maps reading names
- to the displayed name. The keys can be either the name of the reading or <device>.<reading> or
- <reading>.<value> or <device>.<reading>.<value>.
- %DEVICE, %ALIAS, %ROOM, %GROUP, %ROW and %READING are replaced by the device name, device alias, room attribute,
- group attribute and reading name respectively. You can also prefix these keywords with $ instead of %. Examples:<br>
- <code>attr temperatures mapping $DEVICE-$READING</code><br>
- <code>attr temperatures mapping {temperature => "%DEVICE Temperatur"}</code>
- </li><br>
- <li>separator<br>
- The separator to use between the device alias and the reading name if no mapping is given. Defaults to ':'
- a space can be enteread as <code>&nbsp;</code></li><br>
- <li>setList<br>
- Space separated list of commands, which will be returned upon "set name ?",
- so the FHEMWEB frontend can construct a dropdown and offer on/off switches.
- set commands not in this list will be rejected.</li><br>
- <li>setFn<br>
- perl expresion that will be executed for the commands from the setList.
- has access to $CMD and $ARGS.</li><br>
- <li>style<br>
- Specify an HTML style for the readings table, e.g.:<br>
- <code>attr temperatures style style="font-size:20px"</code></li><br>
- <li>cellStyle<br>
- Specify an HTML style for a cell of the readings table. regular rows and colums are counted starting with 1,
- the row headings are column number 0. perl code has access to $ROW and $COLUMN. keys for hash lookup can be
- r:#, c:# or r:#,c:# , e.g.:<br>
- <code>attr temperatures cellStyle { "c:0" => 'style="text-align:right"' }</code></li><br>
- <li>nameStyle<br>
- Specify an HTML style for the reading names, e.g.:<br>
- <code>attr temperatures nameStyle style="font-weight:bold"</code></li><br>
- <li>valueStyle<br>
- Specify an HTML style for the reading values, e.g.:<br>
- <code>attr temperatures valueStyle style="text-align:right"</code></li><br>
- <li>valueColumn<br>
- Specify the minimum column in which a reading should appear. <br>
- <code>attr temperatures valueColumn { temperature => 2 }</code></li><br>
- <li>valueColumns<br>
- Specify an HTML colspan for the reading values, e.g.:<br>
- <code>attr wzReceiverRG valueColumns { eventdescription => 'colspan="4"' }</code></li><br>
- <li>valueFormat<br>
- Specify an sprintf style format string used to display the reading values. If the format string is undef
- this reading will be skipped. Can be given as a string, a perl expression returning a hash or a perl
- expression returning a string, e.g.:<br>
- <code>attr temperatures valueFormat %.1f °C</code><br>
- <code>attr temperatures valueFormat { temperature => "%.1f °C", humidity => "%i %" }</code><br>
- <code>attr temperatures valueFormat { ($READING eq 'temperature')?"%.1f °C":undef }</code></li><br>
- <li>valuePrefix<br>
- text to be prepended to the reading value</li><br>
- <li>valueSuffix<br>
- text to be appended after the reading value<br>
- <code>attr temperatures valueFormat { temperature => "%.1f", humidity => "%i" }</code><br>
- <code>attr temperatures valueSuffix { temperature => "°C", humidity => " %" }</code></li><br>
- <li>nameIcon<br>
- Specify the icon to be used instead of the reading name. Can be a simple string or a perl expression enclosed
- in {} that returns a hash that maps reading names to the icon name. e.g.:<br>
- <code>attr devices nameIcon $DEVICE</code></li><br>
- <li>valueIcon<br>
- Specify an icon to be used instead of the reading value. Can be a simple string or a perl expression enclosed
- in {} that returns a hash that maps reading value to the icon name. e.g.:<br>
- <code>attr devices valueIcon $VALUE</code><br>
- <code>attr devices valueIcon {state => '%VALUE'}</code><br>
- <code>attr devices valueIcon {state => '%devStateIcon'}</code><br>
- <code>attr rgMediaPlayer valueIcon { "playStatus.paused" => "rc_PLAY", "playStatus.playing" => "rc_PAUSE" }</code></li><br>
- <li>commands<br>
- Can be used in to different ways:
- <ul>
- <li>To make a reading or icon clickable by directly specifying the command that should be executed. eg.:<br>
- <code>attr rgMediaPlayer commands { "playStatus.paused" => "set %DEVICE play", "playStatus.playing" => "set %DEVICE pause" }</code></li>
- <li>Or if the mapped command is of the form <command>:[<modifier>] then the normal <a href="#FHEMWEB">FHEMWEB</a>
- webCmd widget for <modifier> will be used for this command. if <modifier> is omitted then the FHEMWEB lookup mechanism for <command> will be used. eg:<br>
- <code>attr rgMediaPlayer commands { volume => "volume:slider,0,1,100" }</code><br>
- <code>attr lights commands { pct => "pct:", dim => "dim:" }</code></li>
- <li>commands can be used for attribtues. eg:<br>
- <code>attr <rg> commands { disable => "disable:" }</code></li>
- </ul></li><br>
- <li>visibility<br>
- 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>
- <ul>
- hidden -> default state is hidden but can be expanded<br>
- hideable -> default state is visible but can be hidden<br><br>
- </ul>
- if set to collapsed or collapsible readingsGroup will recognise the specials <->,<+> and <+-> as the first elements of
- 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.
- <ul>
- - -> line will be visible in expanded state<br>
- + -> line will be visible in collapsed state<br>
- +- -> line will be visible in both states<br>
- <br>
- collapsed -> default state is collapsed but can be expanded<br>
- collapsible -> default state is visible but can be collapsed </li>
- </ul>
- <li>headerRows<br>
- </li>
- <li>sortColumn<br>
- > 0 -> automatically sort the table by this column after page loading
- 0 -> do not sort automatically but allow sorting of the table by clicking on a column header
- < 0 -> automatically sort the table in reverse by this column after page loading
- </li>
- <br><li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
- </ul><br>
- For the hash version of all mapping attributes it is possible to give a default value
- with <code>{ '' => <default> }</code>.<br><br>
- The style attributes can also contain a perl expression enclosed in {} that returns the style
- string to use. For nameStyle and valueStyle The perl code can use $DEVICE,$READING,$VALUE and $NUM, e.g.:<br>
- <ul>
- <code>attr batteries valueStyle {($VALUE ne "ok")?'style="color:red"':'style="color:green"'}</code><br>
- <code>attr temperatures valueStyle {($DEVICE =~ m/aussen/)?'style="color:green"':'style="color:red"'}</code>
- </ul><br>
- Note: Only valueStyle, valueFomat, valueIcon and <{...}@reading> are evaluated during longpoll updates
- and valueStyle has to return a non empty style for every possible value. All other perl expressions are
- evaluated only once during html creation and will not reflect value updates with longpoll.
- Refresh the page to update the dynamic style. For nameStyle the color attribut is not working at the moment,
- the font-... and background attributes do work.<br><br>
- Calculation: to be written...<br>
- eg: <code>define rg readingsGroup .*:temperature rg:$avg</code><br>
- please see a description <a href="http://www.fhemwiki.de/wiki/ReadingsGroup#Berechnungen">in the wiki</a>
- </ul>
- <p><a name="readingsHistory"></a>
- <h3>readingsHistory</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#readingsHistory'>DE</a>]</div>
- <ul>
- Displays a history of readings from on or more devices.
- <br><br>
- <a name="readingsHistory_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> readingsHistory [<device>[:regex] [<device-2>[:regex-2] ... [<device-n>[:regex-n]]]]</code><br>
- <br>
- Notes:
- <ul>
- <li><device> can be of the form INTERNAL=VALUE where INTERNAL is the name of an internal value and VALUE is a regex.</li>
- <li>If regex is a comma separatet list it will be used as an enumeration of allowed readings.</li>
- <li>if no device/reading argument is given only lines with 'set <device> add ...' are displayed.</li>
- </ul><br>
- Examples:
- <ul>
- </ul>
- </ul><br>
- <a name="readingsHistory_Set"></a>
- <b>Set</b>
- <ul>
- <li>add ...<br>
- directly add text as new line to history.</li>
- <li>clear<br>
- clear the history.</li>
- </ul><br>
- <a name="readingsHistory_Get"></a>
- <b>Get</b>
- <ul>
- <li>history<br>
- list history</li>
- </ul><br>
- <a name="readingsHistory_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>alwaysTrigger<br>
- 1 -> alwaysTrigger update events. even if not visible.</li>
- <li>disable<br>
- 1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.<br>
- 2 -> also disable html table creation<br>
- 3 -> also disable html creation completely</li>
- <li>noheading<br>
- If set to 1 the readings table will have no heading.</li>
- <li>nolinks<br>
- Disables the html links from the heading and the reading names.</li>
- <li>notime<br>
- If set to 1 the reading timestamp is not displayed.</li>
- <li>mapping<br>
- Can be a simple string or a perl expression enclosed in {} that returns a hash that maps device names
- to the displayed name. The keys can be either the name of the reading or <device>.<reading>.
- %DEVICE, %ALIAS, %ROOM and %GROUP are replaced by the device name, device alias, room attribute and
- group attribute respectively. You can also prefix these keywords with $ instead of %.
- </li>
- <li>style<br>
- Specify an HTML style for the readings table, e.g.:<br>
- <code>attr history style style="font-size:20px"</code></li>
- <li>timestampFormat<br>
- POSIX strftime compatible string for used as the timestamp for each line.
- </li>
- <li>valueFormat<br>
- Specify an sprintf style format string used to display the reading values. If the format string is undef
- this reading will be skipped. Can be given as a string, a perl expression returning a hash or a perl
- expression returning a string, e.g.:<br>
- <code>attr history valueFormat %.1f °C</code><br>
- <code>attr history valueFormat { temperature => "%.1f °C", humidity => "%.1f %" }</code><br>
- <code>attr history valueFormat { ($READING eq 'temperature')?"%.1f °C":undef }</code></li>
- <li>rows<br>
- Number of history rows to show.</li>
- </ul>
- </ul>
- <p><a name="readingsProxy"></a>
- <h3>readingsProxy</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#readingsProxy'>DE</a>]</div>
- <ul>
- Makes (a subset of) a reading from one device available as a new device.<br>
- This can be used to map channels from 1-Wire, EnOcean or SWAP devices to independend devices that
- can have state,icons and webCmd different from the parent device and can be used in a floorplan.
- <br><br>
- <a name="readingsProxy_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> readingsProxy <device>:<reading></code><br>
- <br>
- Examples:
- <ul>
- <code>define myProxy readingsProxy myDS2406:latch.A</code><br>
- </ul>
- </ul><br>
- <a name="readingsProxy_Set"></a>
- <b>Set</b>
- <ul>
- </ul><br>
- <a name="readingsProxy_Get"></a>
- <b>Get</b>
- <ul>
- </ul><br>
- <a name="readingsProxy_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>disable<br>
- 1 -> disable notify processing. Notice: this also disables rename and delete handling.</li>
- <li>getList<br>
- Space separated list of commands, which will be returned upon "get name ?",
- so the FHEMWEB frontend can construct a dropdown.
- %PARENT% will result in the complete list of commands from the parent device.
- get commands not in this list will be rejected.</li>
- <li>setList<br>
- Space separated list of commands, which will be returned upon "set name ?",
- so the FHEMWEB frontend can construct a dropdown and offer on/off switches.
- %PARENT% will result in the complete list of commands from the parent device.
- set commands not in this list will be rejected.
- Example: attr proxyName setList on off</li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- <li>getFn<br>
- perl expresion that will return the get command forwarded to the parent device.
- has access to $DEVICE, $READING, $CMD and $ARGS.<br>
- undef -> do nothing<br>
- "" -> pass through<br>
- (<value>,1) -> directly return <value>, don't call parent getFn<br>
- everything else -> use this instead</li>
- <li>setFn<br>
- perl expresion that will return the set command forwarded to the parent device.
- has access to $CMD, $DEVICE, $READING and $ARGS.<br>
- undef -> do nothing<br>
- "" -> pass through<br>
- everything else -> use this instead<br>
- Examples:<br>
- <code>attr myProxy setFn {($CMD eq "on")?"off":"on"}</code>
- </li>
- <li>valueFn<br>
- perl expresion that will return the value that sould be used as state.
- has access to $LASTCMD, $DEVICE, $READING and $VALUE.<br>
- undef -> do nothing<br>
- "" -> pass through<br>
- everything else -> use this instead<br>
- Examples:<br>
- <code>attr myProxy valueFn {($VALUE == 0)?"off":"on"}</code>
- </li>
- <br><li><a href="#perlSyntaxCheck">perlSyntaxCheck</a></li>
- </ul><br>
- </ul>
- <p><a name="remotecontrol"></a>
- <h3>remotecontrol</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#remotecontrol'>DE</a>]</div>
- <ul>
- Displays a graphical remote control. Buttons (=icons) can be chosen and arranged. Predefined layouts are available for e.g. Samsung-TV or iTunes.
- 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>
- <a name="remotecontroldefine"></a><br>
- <b>Define</b>
- <ul>
- <code>define <rc-name> remotecontrol</code><br><br>
- Typical steps to implement a remotecontrol:<br>
- <table>
- <tr><td><code>define rc1 remotecontrol</code></td><td><code># defines a "blank" remotecontrol</code></td></tr>
- <tr><td><code>get rc1 layout</code></td><td><code># displays all available predefined layouts</code></td></tr>
- <tr><td><code>set rc1 layout samsung</code></td><td><code># assigns keys for a SamsungTV</code></td></tr>
- <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>
- <tr><td><b>Note:</b> keys can be changed at any time, it is not necessary to redefine the weblink</td></tr>
- <tr><td><code>attr rc1 row15 VOLUP,VOLDOWN</code></td></tr>
- </table>
- </ul>
- <a name="remotecontrolset"></a><br>
- <b>Set</b>
- <ul>
- <li><code>set <rc-name> layout [delete|<layoutname>]</code><br>
- <code>layout delete</code> deletes all rowXX-attributes<br>
- <code>layout <layoutname></code> assigns a predefined layout to rowXX-attributes</li>
- <li><code>set <rc-name> makeweblink [<name>]</code><br>
- creates a weblink to display the graphical remotecontrol. Default-name is weblink_<rc-name> .</li>
- <li><code>set <rc-name> makenotify <executingDevice></code><br>
- creates a notify to trigger <executingDevice> every time a button has been pressed. name is notify_<rc-name> .</li>
- </ul>
-
- <a name="remotecontrolget"></a><br>
- <b>Get</b>
- <ul>
- <code>get <rc-name> [htmlcode|layout]</code><br>
- <li><code>htmlcode</code> displays htmlcode for the remotecontrol on fhem-page</li>
- <li><code>layout</code> shows which predefined layouts ae available</li>
- </ul>
-
- <a name="remotecontrolattr"></a><br>
- <b>Attributes</b>
- <ul>
- <li><a href="#loglevel">loglevel</a></li>
- <li><a name="rc_iconpath">rc_iconpath</a><br>
- path for icons, default is "icons" . The attribute-value will be used for all icon-files except .svg .</li>
- <li><a name="rc_iconprefix">rc_iconprefix</a><br>
- prefix for icon-files, default is "" . The attribute-value will be used for all icon-files except .svg .</li>
- <li>Note: Icon-names (button-image-file-names) will be composed as <code>fhem/<rc_iconpath>/<rc_iconprefix><command|image></code><br>
- For .svg -icons, the access sequence is according to the FHEMWEB-attribute iconPath, default is openautomation:fhemSVG:default .</li>
- <li><a name="rc_devStateIcon">rc_devStateIcon</a><br>
- 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>
- <br>
- <li><a href="#rowXX">rowXX</a><br>
- <code>attr <rc-name> rowXX <command>[:<image>][,<command>[:<image>]][,...]</code><br>
- Comma-separated list of buttons/images per row. Any number of buttons can be placed in one row. For each button, use</li>
- <ul>
- <li><code><command></code> is the command that will trigger the event after a buttonclick. Case sensitive.</li>
- <li><code><image></code> is the filename of the image</li><br>
- <li>Per button for the remotecontrol, use</li>
- <li><code><command></code> where an icon with the name <rc_iconprefix><command> is displayed<br>
- Example:<br>
- <code>attr rc1 rc_iconprefix black_btn_ # used for ALL icons on remotecontrol rc1</code><br>
- <code>attr rc1 row00 VOLUP </code><br>
- icon is <code>black_btn_VOLUP</code>, a buttonclick creates the event <code>VOLUP</code>
- </li>
- or
- <li><code><command>:<image></code> where an icon with the name <code><rc_iconprefix><image></code> is displayed<br>
- Example: <br>
- <code>row00=LOUDER:VOLUP</code><br>
- icon is <code>black_btn_VOLUP</code>, a buttonclick creates the event <code>LOUDER</code>
- <br>
- Examples:<br>
- <code>attr rc1 row00 1,2,3,TV,HDMI</code><br>
- <code>attr rc2 row00 play:PLAY,pause:PAUSE,louder:VOLUP,quieter:VOLDOWN</code><br>
- </li>
- <li><b>Hint:</b> use :blank for a blank space, use e.g. :blank,:blank,:blank for a blank row</li>
- </ul>
- </ul>
- </ul>
- <p><a name="restore"></a>
- <h3>restore</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#restore'>DE</a>]</div>
- <ul>
- <code>restore list [<filename|directory>]<br>
- restore [<filename|directory>]<br>
- restore -a [<filename|directory>]</code>
- <br><br>
- Restore the files saved previously by the update command. Check the available
- files with the list argument. See also the update command and its restoreDirs
- attribute. After a restore normally a "shutdown restart" is necessary.<br>
- If the -a option is specified, the configuration files are also restored.
- </ul>
- <p><a name="rssFeed"></a>
- <h3>rssFeed</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#rssFeed'>DE</a>]</div>
- <ul>
- This device helps to extract data from an rss feed specified by the
- url given in the DEF section. Trhe results will be extracted to
- several corresponding readings. Also the headlines of the news
- elements will be extracted to a special "ticker"-string that could
- be retrieved via GET or a special function.
- The data will be updated automatically after the given interval.
- <br/><br/>
- <a name="rssFeeddefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> rssFeed <url> [interval]</code>
- <br/><br/>
- <ul>
- url = url of the rss feed
- </ul>
- <ul>
- interval = actualization interval in seconds
- <br/>
- Minimum for this value is 600 and maximum is 86400
- </ul>
- <br/>
- Example:
- <ul>
- <code>define rssGEA rssFeed http://www.gea.de/rss?cat=Region%20Reutlingen&main=true 3600</code>
- <br/><br/>
- The example will retrieve the data from the rss feed every hour
- </ul>
- </ul>
- <br/>
- <a name="rssFeedset"></a>
- <b>Set</b>
- <ul>
- <code>set <name> update</code><br/>
- retrieving the data from feed and updateing readings data
- </ul>
- <br/>
- <a name="rssFeedget"></a>
- <b>Get</b><br/>
- <ul>
- <code>get <name> ticker</code><br/>
- getting the headlines from the feed with specified formatting
- (also see attributes)
- </ul>
- <br/>
- <a name="rssFeedattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a name="disabled">disable</a><br/>
- This attribute can be used to disable the entier feed device (1)
- or to activate it again (0 or attribute missing).
- If the device is disabled all readings will be removed, except
- the state reading which will then be set to "disabled".
- Data will no longer be automatically retrieved from the url.
- The ticker data contains only one line indicating the disabled
- ticker device. (s.a. attribute rfDisabledText).
- <br/>
- </li>
- <li><a name="rfDisabledText">rfDisabledText</a><br/>
- The text in this attribute will be returnde by GET ticker when the
- device is disabled (s.a. attribute disable).
- If this attribute is not specified a default text is returned.<br/>
- Example: <code>attr <name> rfDisabledText This feed is disabled</code>
- </li>
- <li><a name="rfTickerChars">rfTickerChars</a><br/>
- Specifies a string which will surround each headline in the ticker data.<br/>
- Example: <code>attr <name> rfTickerChars +++</code>
- <br/>
- Result: <code>+++ This is a sample headline +++</code>
- <br/>
- These characters are also used for "marquee"-ticker data.
- <br>
- </li>
- <li><a name="rfMaxLines">rfMaxLines</a><br/>
- Defines the maximum number of news items that will be extracted from the
- feed. If there are less items in the feed then specified by this attribute
- then only that few items are extracted.
- If this attribute is missing a default of 10 will be assumed.<br/>
- Example: <code>attr <name> rfMaxLines 15</code>
- <br/>
- </li>
- <li><a name="rfDisplayTickerReadings">rfDisplayTickerReadings</a><br/>
- If this attribute is set then there will be two additional readings
- containing the ticker data for "toast"-Tickers (same as rssFeedGetTicker())
- and one containing the ticker data for "marquee"-tickers on a single line.
- </li>
- <li><a name="rfEncode">rfEncode</a><br/>
- Defines an encoding which will be used for any text extracted from the
- feed that will be applied before setting the readings. Therefore the
- encode method of the Perl-core module Encode is used.
- If the attribute is missng then no encoding will be performed.
- Sometimes this is necessary when feeds contain wide characters that
- could sometimes lead to malfunction in FHEMWEB.
- Also the headlines data returned by rssFeedFunctions and get ticker
- are encoded using this method.<br/>
- This will be set to utf8 by default on first define
- <br/>
- </li>
- <li><a name="rfReadings">rfReadings</a><br/>
- This attribute defines the readings that will be created from the extracted
- data. It is a comma separated list of the following values:
- <ul>
- <li>title = title section<br/>
- extract the title section of the feed and each news item to a
- corresponding reading<br/>
- </li>
- <li>description = description section<br/>
- extract the description section of the feed and each news item
- to a corresponding reading
- <br/>
- </li>
- <li>encodedContent = content:encoded section<br/>
- if present this contains a more detailed description
- <br/>
- </li>
- <li>pubDate = Publication time of feed and of each news item will
- be extracted to a corresponding reading.
- <br/>
- </li>
- <li>link = link url to the feed or to the full article of a
- single news items in the feed.
- <br/>
- </li>
- <li>buildDate = time of the last feed actulization by the feed
- vendor.
- <br/>
- </li>
- <li>imageURl = url of a probably available image of a news item
- <br/>
- </li>
- <li>imageTitle = image title of a probably available news item
- image.
- <br/>
- </li>
- </ul>
- If this attribute is missing "title,description,pubDate" will be assumed
- as default value. When the device is defined for the first time the
- attribute will be automatically created with the default value.
- <br/>
- </li>
- <li><a name="rfCustomTextPrepFn">rfCustomTextPrepFn</a><br>
- Can specify a funtion located for example in 99_myUtils.pm
- This function will be uses for further modification of extracted
- feed data before setting it to the readings or the ticker list.
- The function will receive an id for the text type and the text itself.
- It must then return the modified Text.
- <br/>
- Possible text type ids are (s.a. rfReadings)<br>
- <ul>
- <li>feedTitle</li>
- <li>feedDescription</li>
- <li>imageTitle</li>
- <li>desctiption</li>
- <li>encodedContent</li>
- </ul>
- <br/>
- Example for 99_myUtils.pm:
- <pre>
- #Text preparation for rssFeedDevices
- sub rssFeedPrep($$)
- {
- my($texttype,$text) = @_;
- #Cut the lenght of description texts to max 50 characters
- my $tLn=length $text;
- $text=substr($text,0,47).'...' if ($tLn >50 && ($texttype=~/description/));
- #filter Probably errorneous HASH(xxxxxx) from any texts
- return ' ' if ($text=~/HASH\(.*\)/);
- #set a custom feed title reading
- return 'My Special Title' if ($texttype =~/feedTitle/);
- #returning modified text
- return $text;
- }
- </pre>
- and then set the attribute to that function:<br/>
- <code>attr <rssFeedDevice> rfCustomTextPrepFn rssFeedPrep</code>
- <br/>
-
-
-
- </li>
- <li>
- <a name="rfReadings">rfAllReadingsEvents</a><br/>
- If this attribute is set to 1 all Readings that are created or updated
- will generate appropriate events (depending on event-on-... attributes).
- By default no events are created for most Readings, especially not for
- the feed data Readings
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br/>
- <a name="rssFeedfunctions"></a>
- <b>Functions</b>
- <ul>
- <li>rssFeedGetTicker<br/>
- This function will returned the foratted headlines as a single string.
- Each headline will be separated by a new line character.
- The result of this function can for example be used in InfoPanel as
- ticker data.
- The function takes the name of a rssFeed device as single parameter.
- The result is the same as from <code>get ticker</code> as it uses this function too.
- Syntax: <code> rssFeedGetTicker(<rssFeedDevice>)</code><br/>
- </li>
- </ul><br/>
- <a name="rssFeedreadings"></a>
- <b>Readings</b>
- <ul>
- Depending on the attribute rfReadings a bunch of readings is created
- from the extracted news feed data.
- Some of the readings ar prefixed to tell to which part of the feed the
- data belongs to.
- </ul>
- <ul>
- <br/>
- <li><code>Nxx_</code><br/>
- readings with that prefix correspond to the news items in the feed.
- <code>xx</code> index of the news item
- <br/>
- Example showing the readings of a single news item<br/>
- <ul>
- <code> N00_title </code><br/>
- <code> N00_descripton </code><br/>
- <code> N00_pubDate </code><br/>
- </ul>
- </li>
- <li><code>f_</code><br/>
- redings with that prefix correspond to the feed itself.
- <br/>
- Example of feed-readings:
- <ul>
- <code> f_title </code><br/>
- <code> f_descripton </code><br/>
- <code> f_buildDate </code><br/>
- </ul>
- </li>
- <li><code>preparedLines</code><br/>
- This readings contains the number of new items that were extracted
- in the last update of the feed data.
- </li>
- <li>
- <code>tickerToast</code><br/>
- This reading contains the same data that is returned by the rssFeedGetTicker()
- funciton (if attribute rfDisplayTickerReadings is set)
- <br>
- Example: <code>+++ Headline 1 +++ \n +++ Headline 2 +++ \n +++ Headline 3 +++ </code>
- </li>
- <li>
- <code>tickerMarquee</code><br/>
- This reading contains the ticker data on a single line for "marquee" style
- tickers (if attribute rfDisplayTickerReadings is set)
- <br>
- Example: <code>Headline 1 +++ Hadline 2 +++ Headline 3 +++</code>
- </li>
- <li><code>gzippedFeed</code><br/>
- Sometimes RSS-Feed data is delivered gzipped. This is automatically
- recognized by the module. So if the received data was originally
- gzipped this reading is set to 1 otherwise it is set to 0
- </li>
- <li><code>state</code><br/>
- The state reading contains the timestamp of the last automatic or manual
- update of the device data from the feed, as long as the device is not
- disabled.
- If the device is disabled state contains "disabled".
- When the device is defined then the start of cyclic updates is retarded
- for about 10 seconds. During that time state is set to "defined"
- </li>
- </ul><br/>
-
- </ul>
- <p><a name="sequence"></a>
- <h3>sequence</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#sequence'>DE</a>]</div>
- <ul>
- <br>
- <a name="sequencedefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> sequence <re1> <timeout1>
- <re2> [<timeout2> <re3> ...]</code>
- <br><br>
- A sequence is used to allow to trigger events for a certain combination of
- button presses on a remote. E.g. to switch on a lamp when pressing the
- Btn1:on, then Btn2:off and at last Btn1:on one after the other you could
- define the following:<br>
- <br>
- <ul>
- <code>
- define lampseq sequence Btn1:on 0.5 Btn2:off 0.5 Btn1:on<br>
- define lampon notify lampseq:trigger set lamp on
- </code>
- </ul>
- <br>
- Subsequent patterns can be specified without device name as
- <code>:<re2></code>. This will reuse the device name which triggered
- the previous sequence step:
- <br>
- <ul>
- <code>
- define lampseq sequence Btn.:on 0.5 :off<br>
- </code>
- </ul>
- <br>
- You can specify timeout as <code><delay>:<timeout></code>,
- where "delay" sets time during which the next event shall not be received,
- otherwise the sequence will be aborted. This can be used to capture press
- and hold of a button. Example:<br>
- <ul>
- <code>
- define lampseq sequence Btn1:on 2:3 Btn1:off<br>
- </code>
- </ul>
- sequence will be triggerred if Btn1 is pressed for 2 to 5 seconds.
- </ul>
- <br>
- <a name="sequenceset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="sequenceget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="sequenceattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#showtime">showtime</a></li>
- <li><a href="#triggerPartial">triggerPartial</a><br>
- if set (to 1), and not all the events of a sequence are received, then a
- partial_X event is generated by the sequence. Example:<br><code><ul>
- fhem> define seq sequence d1:on 1 d1:on 1 d1:on<br>
- fhem> attr seq triggerPartial<br>
- fhem> set d1 on;; sleep 0.5;; set d1 on<br>
- </ul></code>
- generates the event seq partial_2. This can be used to assign different
- tasks for a single button, depending on the number of times it is
- pressed.
- </li><br>
- <li><a href="#reportEvents">reportEvents</a><br>
- if set (to 1), report the events (space separated) after the
- "trigger" or "partial_X" keyword. This way one can create more general
- sequences, and create different notifies to react:<br>
- <ul><code>
- define seq sequence remote:btn.* remote:btn.*<br>
- attr seq reportEvents<br>
- define n_b1b2 notify seq:trigger.remote:btn1.remote:btn2 set lamp1 on<br>
- define n_b2b1 notify seq:trigger.remote:btn2.remote:btn1 set lamp1 off<br>
- </code></ul>
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="siri"></a>
- <h3>siri</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#siri'>DE</a>]</div>
- <ul>
- Module to control the FHEM/Siri integration.<br><br>
- Notes:
- <ul>
- <li><br>
- </li>
- </ul>
- <a name="siri_Attr"></a>
- <b>Attr</b>
- <ul>
- <li>siriName<br>
- The name to use for a device with siri.</li>
- </ul>
- </ul><br>
- <p><a name="speedtest"></a>
- <h3>speedtest</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#speedtest'>DE</a>]</div>
- <ul>
- Provides internet speed data via <a href="https://github.com/sivel/speedtest-cli">speedtest-cli</a>.<br><br>
- Notes:
- <ul>
- <li>speedtest-cli hast to be installed on the FHEM host.</li>
- </ul>
- <a name="speedtest_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> speedtest [<interval> [<server>]]</code><br>
- <br>
- Defines a speedtest device.<br><br>
- The data is updated every <interval> seconds. The default is 3600 and the minimum is 1800.<br><br>
- <server> gives the speedtest sever id. the list of all servers is available with <PRE>speedtest-cli --list</PRE>.
- Examples:
- <ul>
- <code>define speedtest speedtest</code><br>
- <code>define speedtest speedtest 3600 2760</code><br>
- </ul>
- </ul><br>
- <a name="speedtest_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>ping</li>
- <li>download</li>
- <li>upload</li>
- </ul><br>
- <a name="speedtest_Set"></a>
- <b>Set</b>
- <ul>
- <li>statusRequest<br>
- manualy start a test. this works even if the device is set to disable.</li>
- </ul>
- <a name="speedtest_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>path<br>
- The path to the speedtest binary.</li>
- <li>checks-till-disable<br>
- 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>
- <li>disable<br>
- set to 1 to disable the test.</li>
- </ul>
- </ul>
- <p>=item helper
- =item summary Calculates for statistical values and adds them to the devices.
- =item summary_DE Berechnet statistische Werte und fügt sie dem Gerät hinzu.
- <a name="statistics"></a>
- <h3>statistics</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#statistics'>DE</a>]</div>
- <div>
- <ul>
- This modul calculates for certain readings of given devices statistical values and adds them to the devices.
- <br>
- For detail instructions, look at and please maintain the <a href="http://www.fhemwiki.de/wiki/statistics"><b>FHEM-Wiki</b></a>.
- <br>
- Until now statistics for the following readings are automatically built:
- <ul>
- <br>
- <li><b>Min|Avg|Max</b> Minimum, average and maximum of instantaneous values:
- <br>
- over a period of day, month and year:
- <br>
- <i>brightness, current, energy_current, humidity, luminosity, temperature, voltage</i>
- <br>
- over a period of hour, day, month and year:
- <br>
- <i>wind, wind_speed, windSpeed</i>
- </li><br>
- <li><b>Tendency</b> over 1h, 2h, 3h und 6h: <i>pressure</i>
- </li><br>
- <li><b>Delta</b> between start and end values - over a period of hour, day, month and year:
- <br>
- <i>count, energy, energy_total, power, total, rain, rain_rate, rain_total</i>
- </li><br>
- <li><b>Duration</b> (and counter) of the states (on, off, open, closed...) over a period of day, month and year:
- <br>
- <i>lightsensor, lock, motion, Window, window, state (if no other reading is recognized)</i>
- </li><br>
- </ul>
- Further readings can be added via the <a href="#statisticsattr">attributes</a> <code>deltaReadings, durationReadings, minAvgMaxReadings, tendencyReadings</code>.
- This allows also to assign a reading to another statistic type.
- <br>
- <br>
-
- <b>Define</b>
- <ul>
- <br>
- <code>define <name> statistics <deviceNameRegExp> [Prefix]</code>
- <br>
- Example: <code>define Statistik statistics Sensor_.*|Wettersensor</code>
- <br>
- <li><code><DeviceNameRegExp></code>
- <br>
- Regular expression of device names. <b>!!! Not the device readings !!!</b>
- </li><br>
- <li><code>[Prefix]</code>
- <br>
- Optional. Prefix set is place before statistical data. Default is <i>stat</i>
- </li><br>
- </ul>
- <br>
- <b>Set</b>
- <ul>
- <br>
- <li><code>resetStatistics <All|DeviceName></code>
- <br>
- Resets the statistic values of the selected device.
- </li><br>
- <li><code>doStatistics</code>
- <br>
- Calculates the current statistic values of all monitored devices.
- </li><br>
- </ul>
- <br>
- <b>Get</b>
- <ul>not implemented yet
- </ul>
- <br>
- <a name="statisticsattr"></a>
- <b>Attributes</b>
- <ul>
- <br>
- <li><code>dayChangeTime <time></code>
- <br>
- Time of day change. Default is 00:00. For weather data the day change can be set e.g. to 06:50.
- </li><br>
- <li><code>deltaReadings <readings></code>
- <br>
- Comma separated list of reading names for which a delta statistic shall be calculated.
- </li><br>
- <li><code>durationPeriodHour < 1 | 0 ></code>
- <br>
- If set to 1, then duration readings will get hourly statistics too.
- </li><br>
- <li><code>durationReadings <readings></code>
- <br>
- Comma separated list of reading names for which a duration statistic shall be calculated.
- </li><br>
- <li><code>excludedReadings <DeviceRegExp:ReadingNameRegExp></code>
- <br>
- Regular expression of the readings that shall be excluded from the statistics.<br>
- The reading have to be entered in the form <i>deviceName:readingName</i>.
- <br>
- E.g. <code>FritzDect:current|Sensor_.*:humidity</code>
- <br>
- </li><br>
-
- <li><code>ignoreDefaultAssignments <code>< 0 | 1 ></code></code>
- <br>
- Ignores the default assignments of readings to a statistic type (see above).<br>
- So, only the readings that are listed in the specific attributes are evaluated.
- <br>
- </li><br>
-
- <li><code>minAvgMaxReadings <readings></code>
- <br>
- Comma separated list of reading names for which a min/average/max statistic shall be calculated.
- </li><br>
- <li><code>periodChangePreset <seconds></code>
- <br>
- Preponed start of the calculation of periodical data. Default is 5 second before each full hour.
- <br>
- Allows thus the correct timely assignment within plots. Should be adapted to the CPU speed or load of the server.
- <br>
- </li><br>
- <li><code>singularReadings <DeviceRegExp:ReadingRegExp>:statTypes:period</code>
- <ul>
- <li>statTypes: Min|Avg|Max|Delta|<i>DurationState</i>|<span style="color:blue;">Tendency</span></li>
- <li>period: Hour|Day|Month|Year|<span style="color:blue;">1h|2h|3h|6h</span></li>
- </ul>
- <br>
- 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.
- <dt>Example:</dt>
- <dd>
- <code>Wettersensor:rain:Delta:(Hour|Day)|(FritzDect:(current|power):(Avg|Max|Delta):(Hour|Day)</code>
- <br>
- <code>Badfenster:Window:(Open|Open_Count):Month</code>
- </dd>
- </li><br>
- <li><code>specialDeltaPeriods <Device:Reading:Period:count1:count2:...></code>
- <br>
- Creates for the given delta reading additional singular readings of the given numbers of a period (Hour, Day, Month)
- <br>
- 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).
- <br>
- <dt>Example:</dt>
- <dd>
- <code>attr Statistik specialDeltaPeriods Wettersensor:rain:Hour:06:72:96</code>
- <br>
- This will create 3 additional readings for the rain of the last 6, 72 and 96 hours.
- <br>
- <code>attr Statistik specialDeltaPeriods Wettersensor:rain:Hour:48,Wettersensor:rain:Day:30,EZaehler:energy:Month:6:12</code>
- <br>
- 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.
- </dd>
- </li><br>
- <li><code>specialDeltaPeriodHours</code>
- <br>
- depreciated
- </li><br>
- <li><code>tendencyReadings <readings></code>
- <br>
- Comma separated list of reading names for which a tendendy statistic shall be calculated.
- </li><br>
- </ul>
- </ul>
- </div>
- <p><a name="structure"></a>
- <h3>structure</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#structure'>DE</a>]</div>
- <ul>
- <br>
- <a name="structuredefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> structure <struct_type> <dev1> <dev2> ...</code>
- <br><br>
- The structure device is used to organize/structure devices in order to
- set groups of them at once (e.g. switching everything off in a house).<br>
- The list of attached devices can be modified through the addstruct /
- delstruct commands. Each attached device will get the attribute
- <struct_type>=<name><br> when it is added to the list, and the
- attribute will be deleted if the device is deleted from the structure.
- <br>
- The structure devices can also be added to a structure, e.g. you can have
- a building consisting of levels which consists of rooms of devices.
- <br>
- Example:<br>
- <ul>
- <li>define kitchen structure room lamp1 lamp2</li>
- <li>addstruct kitchen TYPE=FS20</li>
- <li>delstruct kitchen lamp1</li>
- <li>define house structure building kitchen living</li>
- <li>set house off</li>
- </ul>
- <br>
- </ul>
- <br>
- <a name="structureset"></a>
- <b>Set</b>
- <ul>
- <li>saveStructState <readingName><br>
- The state reading of all members is stored comma separated in the
- specified readingName.
- </li><br>
- <li>restoreStructState <readingName><br>
- The state of all members will be restored from readingName by calling
- "set memberName storedStateValue".
- </li><br>
- Every other set command is propagated to the attached devices. Exception:
- if an
- attached device has an attribute structexclude, and the attribute value
- matches (as a regexp) the name of the current structure.<br>
- If the set is of the form <code>set <structure>
- [FILTER=<filter>] <type-specific></code> then
- :FILTER=<filter> will be appended to the device name in the
- propagated set for the attached devices like this: <code>set
- <devN>:FILTER=<filter> <type-specific></code><br>
- If the last set parameter is "reverse", then execute the set commands in
- the reverse order.
- </ul>
- <br>
- <a name="structureget"></a>
- <b>Get</b>
- <ul>
- get is not supported through a structure device.
- </ul>
- <br>
- <a name="structureattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="async_delay"></a>
- <li>async_delay<br>
- If this attribute is defined, unfiltered set commands will not be
- executed in the clients immediately. Instead, they are added to a queue
- to be executed later. The set command returns immediately, whereas the
- clients will be set timer-driven, one at a time. The delay between two
- timercalls is given by the value of async_delay (in seconds) and may be
- 0 for fastest possible execution. This way, excessive delays often
- known from large structures, can be broken down in smaller junks.
- </li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <a name="clientstate_behavior"></a>
- <li>clientstate_behavior<br>
- The backward propagated status change from the devices to this structure
- works in two different ways.
- <ul>
- <li>absolute<br>
- The structure status will changed to the common device status of all
- defined devices to this structure if all devices are identical.
- Otherwise the structure status is "undefined".
- </li>
- <li>relative<br>
- See below for clientstate_priority.
- </li>
- <li>relativeKnown<br>
- Like relative, but do not trigger on events not described in
- clientstate_priority. Needed e.g. for HomeMatic devices.
- </li>
- <li>last<br>
- The structure state corresponds to the state of the device last changed.
- </li>
- </ul>
- </li>
- <a name="clientstate_priority"></a>
- <li>clientstate_priority<br>
- If clientstate_behavior is set to relative, then you have to set the
- attribute "clientstate_priority" with all states of the defined devices
- to this structure in descending order. Each group is delemited by
- space or /. Each entry of one group is delimited by "pipe". The status
- represented by the structure is the first entry of each group.
- Example:<br>
- <ul>
- <li>attr kitchen clientstate_behavior relative</li>
- <li>attr kitchen clientstate_priority An|On|on Aus|Off|off</li>
- <li>attr house clientstate_priority Any_On|An All_Off|Aus</li>
- </ul>
- In this example the status of kitchen is either on or off. The status
- of house is either Any_on or All_off.
- </li>
- <li><struct_type>_map<br>
- With this attribute, which has to specified for the structure-
- <b>member</b>, you can redefine the value reported by a specific
- structure-member for the structure value. The attribute has three
- variants:
- <ul>
- <li>readingName<br>
- take the value from readingName instead of state.
- </li>
- <li>oldVal:newVal<br>
- if the state reading matches oldVal, then replace it with newVal
- </li>
- <li>readingName:oldVal:newVal<br>
- if readingName matches oldVal, then replace it with newVal
- </li>
- </ul>
- Example:
- <ul>
- <li>define door OWSWITCH <ROMID></li>
- <li>define lamp1 dummy</li>
- <li>attr lamp1 cmdlist on off</li>
- <li>define kitchen structure struct_kitchen lamp1 door</li>
- <li>attr kitchen clientstate_priority An|on OK|Aus|off</li>
- <li>attr lamp1 struct_kitchen_map on:An off:Aus</li>
- <li>attr door struct_kitchen_map A:open:on A:closed:off</li>
- <li>attr door2 struct_kitchen_map A</li>
- </ul>
- </li>
- <a name="evaluateSetResult"></a>
- <li>evaluateSetResult<br>
- if a set command sets the state of the structure members to something
- different from the set command (like set statusRequest), then you have to
- set this attribute to 1 in order to enable the structure instance to
- compute the new status.
- </li>
- <a name="structexclude"></a>
- <li>structexclude<br>
- exclude the device from set/notify or attribute operations. For the set
- and notify the value of structexclude must match the structure name,
- for the attr/deleteattr commands ist must match the combination of
- structure_name:attribute_name. Examples:<br>
- <ul>
- <code>
- define kitchen structure room lamp1 lamp2<br>
- attr lamp1 structexclude kitchen<br>
- attr lamp1 structexclude kitchen:stateFormat<br>
- </code>
- </ul>
- </li>
- <li><a href="#readingFnAttributes">readingFnAttributes</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="tahoma"></a>
- <h3>tahoma</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#tahoma'>DE</a>]</div>
- <ul>
- The module realizes the communication with io-homecontrol® Devices e.g. from Somfy® or Velux®<br>
- A registered TaHoma® Connect gateway from Overkiz® sold by Somfy® which is continously connected to the internet is necessary for the module.<br>
- <br><br>
- Notes:
- <ul>
- <li>JSON has to be installed on the FHEM host.</li>
- <li>on problems refer also the fhem forum <a href="https://forum.fhem.de/index.php/topic,28045.0.html">IO-Homecontrol Devices über Tahoma Box einbinden</a></li>
- </ul><br>
- <a name="tahoma_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> tahoma ACCOUNT <username> <password></code><br>
- <code>define <name> tahoma DEVICE <DeviceURL></code><br>
- <code>define <name> tahoma PLACE <oid></code><br>
- <code>define <name> tahoma SCENE <oid></code><br>
- <code>define <name> tahoma GROUP <tahoma_device1>,<tahoma_device2>,<tahoma_device3></code><br>
- <br>
- <br>
- A definition is only necessary for a tahoma device:<br>
- <code>define <name> tahoma ACCOUNT <username> <password></code><br>
- <b>If a tahoma device of the type ACCOUNT is created, all other devices acessable by the tahoma gateway are automaticaly created!</b><br>
- If the account is valid, the setup will be read from the server.<br>
- All registrated devices are automatically created with name tahoma_12345 (device number 12345 is used from setup)<br>
- All defined rooms will be are automatically created.<br>
- Also all defined scenes will be automatically created.<br>
- Groups of devices can be manually added to send out one group command for all attached devices<br>
- <br>
- <br>
- <b>global Attributes for ACCOUNT:</b>
- <ul>
- If autocreate is disabled, no devices, places and scenes will be created automatically:<br>
- <code>attr autocreate disable</code><br>
- </ul>
- <br>
- <b>local Attributes for ACCOUNT:</b>
- <ul>
- Normally, the web commands will be send asynchron, and this can be forced to wait of the result by blocking=1<br>
- <code>attr tahoma1 blocking 1</code><br>
- </ul>
- <ul>
- Normally, the login data is stored encrypted after the first start, but this functionality can be disabled by cryptLoginData=0<br>
- <code>attr tahoma1 cryptLoginData 0</code><br>
- </ul>
- <br>
- <b>local Attributes for DEVICE:</b>
- <ul>
- If the closure value 0..100 should be 100..0, the level can be inverted:<br>
- <code>attr tahoma_23234545 levelInvert 1</code><br>
- </ul>
- <br>
- <b>local Attributes for PLACE:</b>
- <ul>
- The commands in a room will only affect the devices in the room with inClass=RollerShutter.<br>
- This can be extend or changed by setting the placeClasses attribut:<br>
- <code>attr tahoma_abc12345 placeClasses RollerShutter ExteriorScreen Window</code><br>
- </ul>
- <br>
- <b>Examples:</b>
- <ul>
- <code>define tahoma1 tahoma ACCOUNT abc@test.com myPassword</code><br>
- <code>attr tahoma1 blocking 0</code><br>
- <code>attr tahoma1 room tahoma</code><br>
- <br>
- <br>Automatic created device e.g.:<br>
- <code>define tahoma_23234545 tahoma DEVICE io://0234-5678-9012/23234545</code><br>
- <code>attr tahoma_23234545 IODev tahoma1</code><br>
- <code>attr tahoma_23234545 alias RollerShutter Badezimmer</code><br>
- <code>attr tahoma_23234545 room tahoma</code><br>
- <code>attr tahoma_23234545 webCmd dim</code><br>
- <br>
- <br>Automatic created place e.g.:<br>
- <code>define tahoma_abc12345 tahoma PLACE abc12345-0a23-0b45-0c67-d5e6f7a1b2c3</code><br>
- <code>attr tahoma_abc12345 IODev tahoma1</code><br>
- <code>attr tahoma_abc12345 alias room Wohnzimmer</code><br>
- <code>attr tahoma_abc12345 room tahoma</code><br>
- <br>
- <br>Automatic created scene e.g.:<br>
- <code>define tahoma_4ef30a23 tahoma SCENE 4ef30a23-0b45-0c67-d5e6-f7a1b2c32e3f</code><br>
- <code>attr tahoma_4ef30a23 IODev tahoma1</code><br>
- <code>attr tahoma_4ef30a23 alias scene Rolladen Südfenster zu</code><br>
- <code>attr tahoma_4ef30a23 room tahoma</code><br>
- <br>
- <br>manual created group e.g.:<br>
- <code>define tahoma_group1 tahoma GROUP tahoma_23234545,tahoma_23234546,tahoma_23234547</code><br>
- <code>attr tahoma_group1 IODev tahoma1</code><br>
- <code>attr tahoma_group1 alias Gruppe Rolladen Westen</code><br>
- <code>attr tahoma_group1 room tahoma</code><br>
- </ul>
- </ul><br>
- </ul>
- <p><a name="telnet"></a>
- <h3>telnet</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#telnet'>DE</a>]</div>
- <ul>
- <br>
- <a name="telnetdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> telnet <portNumber>
- [global|hostname]</code><br>
- or<br>
- <code>define <name> telnet <servername>:<portNumber></code>
- <br><br>
- First form, <b>server</b> mode:<br>
- Listen on the TCP/IP port <code><portNumber></code> for incoming
- connections. If the second parameter is <b>not</b> specified,
- the server will only listen to localhost connections. If the second
- parameter is global, telnet will listen on all interfaces, else it wil try
- to resolve the parameter as a hostname, and listen only on this interface.
- <br>
- To use IPV6, specify the portNumber as IPV6:<number>, in this
- case the perl module IO::Socket:INET6 will be requested.
- On Linux you may have to install it with cpan -i IO::Socket::INET6 or
- apt-get libio-socket-inet6-perl; OSX and the FritzBox-7390 perl already has
- this module.<br>
- Examples:
- <ul>
- <code>define tPort telnet 7072 global</code><br>
- <code>attr tPort SSL</code><br>
- <code>attr allowed_tPort allowed</code><br>
- <code>attr allowed_tPort validFor tPort</code><br>
- <code>attr allowed_tPort globalpassword mySecret</code><br>
- </ul>
- Note: The old global attribute port is automatically converted to a
- telnet instance with the name telnetPort. The global allowfrom attibute is
- lost in this conversion.
- <br><br>
- Second form, <b>client</b> mode:<br>
- Connect to the specified server port, and execute commands received from
- there just like in server mode. This can be used to connect to a fhem
- instance sitting behind a firewall, when installing exceptions in the
- firewall is not desired or possible. Note: this client mode supprts SSL,
- but not IPV6.<br>
- Example:
- <ul>
- Start tcptee first on publicly reachable host outside the firewall.<ul>
- perl contrib/tcptee.pl --bidi 3000</ul>
- Configure fhem inside the firewall:<ul>
- define tClient telnet <tcptee_host>:3000</ul>
- Connect to the fhem from outside of the firewall:<ul>
- telnet <tcptee_host> 3000</ul>
- </ul>
- </ul>
- <br>
- <a name="telnetset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="telnetget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="telnetattr"></a>
- <b>Attributes:</b>
- <ul>
- <a name="prompt"></a>
- <li>prompt<br>
- Sets the string for the telnet prompt, the default is fhem>
- </li><br>
- <a name="SSL"></a>
- <li>SSL<br>
- Enable SSL encryption of the connection, see the description <a
- href="#HTTPS">here</a> on generating the needed SSL certificates. To
- connect to such a port use one of the following commands:
- <ul>
- socat openssl:fhemhost:fhemport,verify=0 readline<br>
- ncat --ssl fhemhost fhemport<br>
- openssl s_client -connect fhemhost:fhemport<br>
- </ul>
- </li><br>
- <a name="allowfrom"></a>
- <li>allowfrom<br>
- Regexp of allowed ip-addresses or hostnames. If set, only connections
- from these addresses are allowed.<br>
- NOTE: if this attribute is not defined and there is no valid allowed
- device defined for the telnet/FHEMWEB instance and the client tries to
- connect from a non-local net, then the connection is refused. Following
- is considered a local net:<br>
- <ul>
- IPV4: 127/8, 10/8, 192.168/16, 172.16/10, 169.254/16<br>
- IPV6: ::1, fe80/10<br>
- </ul>
- </li><br>
- <a name="connectTimeout"></a>
- <li>connectTimeout<br>
- Wait at maximum this many seconds for the connection to be established.
- Default is 2.
- </li><br>
- <a name="connectInterval"></a>
- <li>connectInterval<br>
- After closing a connection, or if a connection cannot be estblished,
- try to connect again after this many seconds. Default is 60.
- </li><br>
- <a name="encoding"></a>
- <li>encoding<br>
- Sets the encoding for the data send to the client. Possible values are
- latin1 and utf8. Default is utf8.
- </li><br>
- <li>sslVersion<br>
- See the global attribute sslVersion.
- </li><br>
- </ul>
- </ul>
- <p><a name="template"></a>
- <h3>template</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#template'>DE</a>]</div>
- <ul>
- <code>template [use|show] <filename> [<param1>=<value1> [<param2>=<value2> [...]]]</code>
- <br><br>
- Includes a file with parameter substitution, i.e. read the file and process every line as a FHEM command.
- For any given parameter/value pair <code><param>=<value></code> on the command line,
- a literal <code>%<param>%</code> in the file is replaced by <value> before executing the command.<br><br>
- This can be used to to code recurring definitions of one or several devices only once and use it many times.
- <code>template show ..</code> shows what would be done, including a parameter listing, while
- <code>template use ...</code> actually does the job. The word <code>use</code> can be omitted.<br><br>
-
- <b>Example</b><br><br>
-
- File <i>H.templ</i>:<br><br>
- <code>
- define %name% FHT %fhtcode%<br>
- attr %name% IODev CUN<br>
- attr %name% alias %alias%<br>
- attr %name% group %group%<br>
- attr %name% icon icoTempHeizung.png<br>
- attr %name% room %room%,Anlagen/Heizungen<br>
- <br>
- define watchdog.%name% watchdog %name% 00:15:00 SAME set %name% report2 255<br>
- attr watchdog.%name% group %group%<br>
- attr watchdog.%name% room Control/Heizungen<br>
- <br>
- define %name%.log FileLog /opt/fhem/log/%name%-%Y%m.log %name%:.*<br>
- attr %name%.log group %group%<br>
- attr %name%.log icon icoLog.png<br>
- attr %name%.log logtype fht<br>
- attr %name%.log room Control/Heizungen<br>
- <br>
- define %name%.weblink SVG %name%.log:%name%:CURRENT<br>
- 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>
- attr %name%.weblink room %room%<br>
- attr %name%.weblink alias %alias%<br>
- </code><br><br>
-
- Configuration:<br><br>
-
- <code>te H.templ name=3.dz.hzg fhtcode=3f4a alias=Dachzimmerheizung group=Heizung room=Dachzimmer</code><br><br>
-
- Please note that although %Y% in the FileLog definition looks like a parameter, it is not substituted since no parameter
- Y is given on the command line. You get detailed information at verbosity level 5 when you run the command.
-
- </ul>
- <p><a name="update"></a>
- <h3>update</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#update'>DE</a>]</div>
- <ul>
- <code>update [<fileName>|all|check|force]
- [http://.../controlfile]</code>
- <br>or<br>
- <code>update [add source|delete source|list|reset]</code>
- <br>
- <br>
- Update the FHEM installation. Technically this means update will download
- the controlfile(s) first, compare it to the local version of the file in the
- moddir/FHEM directory, and download each file where the attributes (timestamp
- and filelength) are different. Upon completion it triggers the global:UPDATE
- event.
- <br>
- With the commands add/delete/list/reset you can manage the list of
- controlfiles, e.g. for thirdparty packages.
- Notes:
- <ul>
- <li>The contrib directory will not be updated.</li>
- <li>The files are automatically transferred from the source repository
- (SVN) to the web site once a day, at 7:45 CET / CEST.</li>
- <li>The all argument is default.</li>
- <li>The force argument will disregard the local file.</li>
- <li>The check argument will only display the files it would download, and
- the last section of the CHANGED file.</li>
- <li>Specifying a filename will only download matching files (regexp).</li>
- </ul>
- See also the restore command.<br>
- <br>
- Examples:<br>
- <ul>
- <li>update check</li>
- <li>update</li>
- <li>update force</li>
- <li>update check http://fhem.de/fhemupdate/controls_fhem.txt</li>
- </ul>
- <a name="updateattr"></a>
- <br>
- <b>Attributes</b> (use attr global ...)
- <ul>
- <a name="updateInBackground"></a>
- <li>updateInBackground<br>
- If this attribute is set (to 1), the update will be executed in a
- background process. The return message is communicated via events, and
- in telnet the inform command is activated, in FHEMWEB the Event
- Monitor. Default is set. Set it to 0 to switch it off.
- </li><br>
- <a name="updateNoFileCheck"></a>
- <li>updateNoFileCheck<br>
- If set, the command won't compare the local file size with the expected
- size. This attribute was introduced to satisfy some experienced FHEM
- user, its default value is 0.
- </li><br>
- <a name="backup_before_update"></a>
- <li>backup_before_update<br>
- If this attribute is set, an update will back up your complete
- installation via the <a href="#backup">backup</a> command. The default
- is not set as update relies on the restore feature (see below).<br>
- Example:<br>
- <ul>
- attr global backup_before_update
- </ul>
- </li><br>
- <a name="exclude_from_update"></a>
- <li>exclude_from_update<br>
- Contains a space separated list of fileNames (regexps) which will be
- excluded by an update. The special value commandref will disable calling
- commandref_join at the end, i.e commandref.html will be out of date.
- The module-only documentation is not affected and is up-to-date.<br>
- Example:<br>
- <ul>
- attr global exclude_from_update 21_OWTEMP.pm FS20.off.png
- </ul>
- The regexp is checked against the filename and the source:filename
- combination. To exclude the updates for FILE.pm from fhem.de, as you are
- updating it from another source, specify fhem.de.*:FILE.pm
- </li><br>
- <li><a href="#restoreDirs">restoreDirs</a></li><br>
- </ul>
- </ul>
- <p><a name="uptime"></a>
- <h3>uptime</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#uptime'>DE</a>]</div>
- <ul>
- <code>uptime [raw]</code><br/>
- <br/>
- uptime shows FHEM uptime since last FHEM (re-)start.<br/>
- if called with optional parameter "raw" only seconds will be shown,<br/>
- without any fomatting.<br/>
- </ul>
- <p><a name="version"></a>
- <h3>version</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#version'>DE</a>]</div>
- <ul>
- <code>version [<filter>|revision] [noheader]</code>
- <br><br>
- List the version of fhem.pl and all loaded modules. The optional parameter
- can be used to filter the ouput. The special filter value "revision" shows
- only the latest revision number since the last update.<br><br>
- The optional flag <code>noheader</code> disables the output of the header lines (Latest Revision, File, Rev, Last Change).
- <br><br>
- When issued via FHEMWEB command line, all executed JavaScript files with their corresponding version will be listed additionally.
- <br><br>
- Example output of <code>version</code>:
- <ul>
- <code><br>
- Latest Revision: 10814<br><br>
- File Rev Last Change<br><br>
- fhem.pl 10769 2016-02-08 12:11:51Z rudolfkoenig<br>
- 90_at.pm 10048 2015-11-29 14:51:40Z rudolfkoenig<br>
- 98_autocreate.pm 10165 2015-12-13 11:14:15Z rudolfkoenig<br>
- 00_CUL.pm 10146 2015-12-10 10:17:42Z rudolfkoenig<br>
- 10_CUL_HM.pm 10411 2016-01-08 15:18:17Z martinp876<br>
- ...
- </code>
- </ul>
- <br>
- Example output of <code>version fhem.pl</code>:
- <ul>
- <code><br>
- File Rev Last Change<br><br>
- fhem.pl 10397 2016-01-07 08:36:49Z rudolfkoenig<br>
- </code>
- </ul>
- <br>
- Example output of <code>version fhem.pl noheader</code>:
- <ul>
- <code><br>
- fhem.pl 10397 2016-01-07 08:36:49Z rudolfkoenig<br>
- </code>
- </ul>
- </ul>
- <p><a name="watchdog"></a>
- <h3>watchdog</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#watchdog'>DE</a>]</div>
- <ul>
- <br>
- <a name="watchdogdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> watchdog <regexp1> <timespec> <regexp2> <command></code><br>
- <br>
- Start an arbitrary FHEM command if after <timespec> receiving an
- event matching <regexp1> no event matching <regexp2> is
- received.<br>
- The syntax for <regexp1> and <regexp2> is the same as the
- regexp for <a href="#notify">notify</a>.<br>
- <timespec> is HH:MM[:SS]<br>
- <command> is a usual fhem command like used in the <a
- href="#at">at</a> or <a href="#notify">notify</a>
- <br><br>
- Examples:
- <code><ul>
- # Request data from the FHT80 _once_ if we do not receive any message for<br>
- # 15 Minutes.<br>
- define w watchdog FHT80 00:15:00 SAME set FHT80 date<br>
- # Request data from the FHT80 _each_ time we do not receive any message for
- <br>
- # 15 Minutes, i.e. reactivate the watchdog after it triggered. Might be<br>
- # dangerous, as it can trigger in a loop.<br>
- define w watchdog FHT80 00:15:00 SAME set FHT80 date;; trigger w .<br>
- # Shout once if the HMS100-FIT is not alive<br>
- define w watchdog HMS100-FIT 01:00:00 SAME "alarm-fit.sh"<br>
- # Send mail if the window is left open<br>
- define w watchdog contact1:open 00:15 contact1:closed
- "mail_me close window1"<br>
- attr w regexp1WontReactivate<br>
- </ul></code>
- Notes:<br>
- <ul>
- <li>if <regexp1> is . (dot), then activate the watchdog at
- definition time. Else it will be activated when the first matching
- event is received.</li>
- <li><regexp1> resets the timer of a running watchdog, to avoid it
- use the regexp1WontReactivate attribute.</li>
- <li>if <regexp2> is SAME, then it will be the same as the first
- regexp, and it will be reactivated, when it is received.
- </li>
- <li>trigger <watchdogname> . will activate the trigger if its state
- is defined, and set it into state defined if its state is active
- (Next:...) or triggered. You always have to reactivate the watchdog
- with this command once it has triggered (unless you restart
- fhem)</li>
- <li>a generic watchdog (one watchdog responsible for more devices) is
- currently not possible.</li>
- <li>with modify all parameters are optional, and will not be changed if
- not specified.</li>
- </ul>
- <br>
- </ul>
- <a name="watchdogset"></a>
- <b>Set </b>
- <ul>
- <li>inactive<br>
- Inactivates the current device. Note the slight difference to the
- disable attribute: using set inactive the state is automatically saved
- to the statefile on shutdown, there is no explicit save necesary.<br>
- This command is intended to be used by scripts to temporarily
- deactivate the notify.<br>
- The concurrent setting of the disable attribute is not recommended.</li>
- <li>active<br>
- Activates the current device (see inactive).</li>
- </ul>
- <br>
- <a name="watchdogget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="watchdogattr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- <li><a name="regexp1WontReactivate">regexp1WontReactivate</a><br>
- When a watchdog is active, a second event matching regexp1 will
- normally reset the timeout. Set this attribute to prevents this.</li>
- <li><a href="#execOnReactivate">execOnActivate</a>
- If set, its value will be executed as a FHEM command when the watchdog is
- reactivated (after triggering) by receiving an event matching regexp1.
- </li>
- <li><a href="#autoRestart">autoRestart</a>
- When the watchdog has triggered it will be automatically re-set to state
- defined again (waiting for regexp1) if this attribute is set to 1.
- </li>
- </ul>
- <br>
- </ul>
- <p><a name="weblink"></a>
- <h3>weblink</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#weblink'>DE</a>]</div>
- <ul>
- <a name="weblinkdefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> weblink [link|image|iframe|htmlCode|cmdList]
- <argument></code>
- <br><br>
- This is a placeholder device used with FHEMWEB to be able to add user
- defined links.
- Examples:
- <ul>
- <code>
- define homepage weblink link http://fhem.de<br>
- define webcam_picture weblink image http://w.x.y.z/current.jpg<br>
- define interactive_webcam weblink iframe http://w.x.y.z/webcam.cgi<br>
- define hr weblink htmlCode <hr><br>
- define w_Frlink weblink htmlCode { WeatherAsHtml("w_Frankfurt") }<br>
- define systemCommands weblink cmdList
- pair:Pair:set+cul2+hmPairForSec+60
- restart:Restart:shutdown+restart
- update:UpdateCheck:update+check
- </code>
- </ul>
- <br>
- Notes:
- <ul>
- <li>For cmdList <argument> consists of a list of space
- separated icon:label:cmd triples.</li>
- </ul>
- </ul>
- <a name="weblinkset"></a>
- <b>Set</b> <ul>N/A</ul><br>
- <a name="weblinkget"></a>
- <b>Get</b> <ul>N/A</ul><br>
- <a name="weblinkattr"></a>
- <b>Attributes</b>
- <ul>
- <a name="htmlattr"></a>
- <li>htmlattr<br>
- HTML attributes to be used for link, image and iframe type of links.
- E.g.:<br>
- <ul>
- <code>
- define yw weblink iframe http://weather.yahooapis.com/forecastrss?w=650272&u=c<br>
- attr yw htmlattr width="480" height="560"<br>
- </code>
- </ul></li>
- <a name="nodetaillink"></a>
- <li>nodetaillink<br>
- Show no detail link for the types image and iframe.
- </li>
- <li><a href="#disable">disable</a></li>
- <li><a href="#disabledForIntervals">disabledForIntervals</a></li>
- </ul>
- <br>
- </ul>
- <p><a name="weekprofile"></a>
- <h3>weekprofile</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#weekprofile'>DE</a>]</div>
- <ul>
- With this module you can manage and edit different weekprofiles. You can send the profiles to different devices.<br>
- Currently the following devices will by supported:<br>
- <li>MAX</li>
- <li>other weekprofile modules</li>
- <li>Homatic channel _Clima or _Climate</li>
-
- In the normal case the module is assoziated with a master device.
- So a profile 'master' will be created automatically. This profile corrensponds to the current active
- profile on the master device.
- You can also use this module without a master device. In this case a default profile will be created.
- <br>
- An other use case is the usage of categories 'Topics'.
- To enable the feature the attribute 'useTopics' have to be set.
- Topics are e.q. winter, summer, holidays, party, and so on.
- A topic consists of different week profiles. Normally one profile for each thermostat.
- The connection between the thermostats and the profile is an user attribute 'weekprofile' without the topic name.
- With 'restore_topic' the defined profile in the attribute will be transfered to the thermostat.
- So it is possible to change the topic easily and all thermostats will be updated with the correndponding profile.
- <br><br>
- <b>Attention:</b>
- To transfer a profile to a device it needs a lot of Credits.
- This is not taken into account from this module. So it could be happend that the profile in the module
- and on the device are not equal until the whole profile is transfered completly.
- <br>
- If the maste device is Homatic HM-TC-IT-WM-W-EU then only the first profile (R_P1_...) will be used!
- <br>
- <b>For this module libjson-perl have to be installed</b>
- <br><br>
- <b>Events:</b><br>
- Currently the following event will be created:<br>
- <li>PROFILE_TRANSFERED: if a profile or a part of a profile (changes) is send to a device</li>
- <li>PROFILES_SAVED: the profile are stored in the config file (also if there are no changes)</li>
- <a name="weekprofiledefine"></a>
- <b>Define</b>
- <ul>
- <code>define <name> weekprofile [master device]</code><br>
- <br>
- Activate the module with or without an assoziated master device. The master device is an optional parameter.
- With a master device a spezial profile 'master' will be created.<br>
- Special master' profile handling:<br>
- <li>Can't be deleted</li>
- <li>Will be automatically transfered to the master device if it was modified</li>
- <li>Will not be saved</li>
- <br>
- Without a master device a 'default' profile will be created
- </ul>
-
- <a name="weekprofileset"></a>
- <b>Set</b>
- <ul>
- <li>profile_data<br>
- <code>set <name> profile_data <profilename> <json data> </code><br>
- The profile 'profilename' will be changed. The data have to be in json format.
- </li>
- <li>send_to_device<br>
- <code>set <name> send_to_device <profilename> [devices] </code><br>
- The profile 'profilename' will be transfered to one or more the devices. Without the parameter device the profile
- will be transferd to the master device. 'devices' is a comma seperated list of device names
- </li>
- <li>copy_profile<br>
- <code>set <name> copy_profile <source> <destination> </code><br>
- Copy from source to destination. The destination will be overwritten
- </li>
- <li>remove_profile<br>
- <code>set <name> remove_profile <profilename> </code><br>
- Delete profile 'profilename'.
- </li>
- <li>reference_profile<br>
- <code>set <name> reference_profile <source> <destination> </code><br>
- Create a reference from destination to source. The destination will be overwritten if it exits.
- </li>
- <li>restore_topic<br>
- <code>set <name> restore_topic <topic></code><br>
- All weekprofiles from the topic will be transfered to the correcponding devices.
- Therefore a user attribute 'weekprofile' with the weekprofile name <b>without the topic name</b> have to exist in the device.
- </li>
- <li>reread_master<br>
- Refresh (reread) the master profile from the master device.
- </li>
- </ul>
-
- <a name="weekprofileget"></a>
- <b>Get</b>
- <ul>
- <li>profile_data<br>
- <code>get <name> profile_data <profilename> </code><br>
- Get the profile data from 'profilename' in json-Format
- </li>
- <li>profile_names<br>
- <code>set <name> profile_names [topicname]</code><br>
- Get a comma seperated list of weekprofile profile names from the topic 'topicname'
- If topicname is not set, 'default' will be used
- If topicname is '*', all weekprofile profile names are returned.
- </li>
- <li>profile_references [name]<br>
- If name is '*', a comma seperated list of all references in the following syntax
- <code>ref_topic:ref_profile>dest_topic:dest_profile</code>
- are returned
- If name is 'topicname:profilename', '0' or the reference name is returned.
- </li>
- <li>topic_names<br>
- Return a comma seperated list of topic names.
- </li>
- </ul>
-
- <a name="weekprofilereadings"></a>
- <p><b>Readings</b></p>
- <ul>
- <li>active_topic<br>
- Active\last restored topic name
- </li>
- <li>profile_count<br>
- Count of all profiles including references.
- </li>
- </ul>
-
- <a name="weekprofileattr"></a>
- <b>Attributes</b>
- <ul>
- <li>widgetTranslations<br>
- Comma seperated list of texts translations <german>:<translation>
- <code>attr name widgetTranslations Abbrechen:Cancel,Speichern:Save</code>
- </li>
- <li>widgetWeekdays<br>
- Comma seperated list of week days starting at Monday
- <code>attr name widgetWeekdays Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday</code>
- </li>
- <li>widgetEditOnNewPage<br>
- Editing the profile on a new html page if it is set to '1'
- </li>
- <li>widgetEditDaysInRow<br>
- Count of visible days in on row during Edit. Default 2.<br>
- </li>
- <li>configFile<br>
- Path and filename of the configuration file where the profiles will be stored
- Default: ./log/weekprofile-<name>.cfg
- </li>
- <li>icon<br>
- icon for edit<br>
- Default: edit_settings
- </li>
- <li>useTopics<br>
- Enable topics.<br>
- Default: 0
- </li>
- <li>tempON<br>
- Temperature for 'on'. e.g. 30
- </li>
- <li>tempOFF<br>
- Temperature for 'off'. e.g. 4
- </li>
- </ul>
-
- </ul>
- <p><a name="withings"></a>
- <h3>withings</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#withings'>DE</a>]</div>
- <ul>
- FHEM module for Withings devices.<br><br>
- Notes:
- <ul>
- <li>JSON and Digest::SHA have to be installed on the FHEM host.</li>
- </ul><br>
- <a name="withings_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> withings ACCOUNT <login@email> <password></code><br>
- <code>define <name> withings <device></code><br>
- <br>
- Defines a withings device.<br><br>
- If a withings device of the account type is created all fhem devices for users and devices are automaticaly created.
- <br>
- Examples:
- <ul>
- <code>define withings withings ACCOUNT abc@test.com myPassword</code><br>
- </ul>
- </ul><br>
- <a name="withings_Readings"></a>
- <b>Readings</b>
- <ul>
- <li>height</li>
- <li>weight</li>
- <li>fatFreeMass</li>
- <li>muscleRatio</li>
- <li>fatMassWeight</li>
- <li>fatRatio</li>
- <li>boneMassWeight</li>
- <li>boneRatio</li>
- <li>hydration</li>
- <li>diastolicBloodPressure</li>
- <li>systolicBloodPressure</li>
- <li>heartPulse</li>
- <li>pulseWave</li>
- <li>spo2</li>
- <li>bodyTemperature</li>
- <li>skinTemperature</li>
- <li>temperature</li>
- <li>dailySteps</li>
- <li>dailyDistance</li>
- <li>dailyElevation</li>
- <li>dailyDescent</li>
- <li>dailyDurationLight</li>
- <li>dailyDurationModerate</li>
- <li>dailyDurationIntense</li>
- <li>dailyCaloriesActive</li>
- <li>dailyCaloriesPassive</li>
- <li>sleepDurationAwake</li>
- <li>sleepDurationLight</li>
- <li>sleepDurationDeep</li>
- <li>sleepDurationREM</li>
- <li>wakeupCount</li>
- <li>co2</li>
- <li>temperature</li>
- <li>light</li>
- <li>noise</li>
- <li>voc</li>
- <li>battery</li>
- <li>batteryLevel</li>
- </ul><br>
- <a name="withings_Get"></a>
- <b>Get</b>
- <ul>
- <li>update<br>
- trigger an update</li>
- </ul><br>
- <a name="withings_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>interval<br>
- the interval in seconds used to check for new values.</li>
- <li>disable<br>
- 1 -> stop polling</li>
- </ul>
- </ul>
- <p><a name="xs1Bridge"></a>
- <h3>xs1Bridge</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#xs1Bridge'>DE</a>]</div>
- <ul>
- With this module you can read out the device xs1 from EZcontrol. There will be actors | Sensors | Timer | Information read from xs1 and written in readings. With each read only readings are created or updated, which are also defined and active in xs1. Actor | Sensor or timer definitions which are deactivated in xs1 are NOT read.
- <br><br>
- The module was developed based on the firmware version v4-Beta of the xs1. There may be errors due to different adjustments within the manufacturer's firmware.<br>
- Testet firmware: v4.0.0.5326 (Beta) @me | v3.0.0.4493 @ForumUser<br><br>
- <a name="xs1Bridge_define"></a>
- <b>Define</b><br>
- <ul>
- <code>define <NAME> xs1Bridge <IP></code>
- <br><br>
- The module can not create without the IP of the xs1. If the IP can not be reached during module definition, the Define process is aborted.
- <ul>
- <li><code><IP></code> is IP address in the local network.</li>
- </ul><br>
- example:
- <ul>
- define EZcontrol_xs1 xs1Bridge 192.168.1.45
- </ul>
- </ul><br>
- <b>Set</b>
- <ul>N/A</ul><br>
- <b>Get</b><br>
- <ul>N/A</ul><br>
- <a name="xs1_attr"></a>
- <b>Attributes</b>
- <ul>
- <li>debug (0,1)<br>
- This brings the module into a very detailed debug output in the logfile. Program parts can be checked and errors checked.<br>
- (Default, debug 0)
- </li><br>
- <li>disable (0,1)<br>
- This function deactivates the interval. With disable 1 no readings are updated.<br>
- (Default, disable 0)
- </li><br>
- <li>interval (30,60,180,360)<br>
- This is the interval in seconds at which readings are read from xs1<br>
- <i>For actuators, only different states are updated in the set interval.</i><br>
- <i>Sensors are always updated in intervals, regardless of the status.</i><br>
- (Default, interval 60)
- </li><br>
- <li>update_only_difference (0,1)<br>
- The actuators defined in xs1 are only updated when the value changes.<br>
- (Default, update_only_difference 0)</li><br>
- <li>view_Device_name (0,1)<br>
- The actor names defined in xs1 are read as Reading.<br>
- (Default, view_Device_name 0)<br>
- </li><br>
- <li>view_Device_function (0,1)<br>
- The actuator functions defined in xs1 are read out as Reading.<br>
- (Default, view_Device_function 0)<br>
- </li><br>
- <li>xs1_control (0,1)<br>
- Option to control the xs1. After activating this, the xs1Dev module creates each actuator and sensor in FHEM.<br>
- (Default, xs1_control 0)<br>
- </li><br><br>
- </ul>
- <b>explanation:</b>
- <ul>
- <li>various Readings:</li>
- <ul>
- <li>Aktor_(01-64)</li> defined actuator in the device<br>
- <li>Aktor_(01-64)_name</li> defined actor name in the device<br>
- <li>Aktor_(01-64)_function(1-4)</li> defined actuator function in the device<br>
- <li>Sensor_(01-64)</li> defined sensor in the device<br>
- <li>Sensor_(01-64)_name</li> defined sensor name in the device<br>
- <li>Timer_(01-128)</li> defined timer in the device<br>
- <li>xs1_bootloader</li> version of bootloader<br>
- <li>xs1_dhcp</li> DHCP on/off<br>
- <li>xs1_features</li> purchased feature when buying (A = send | B = receive | C = Skripte/Makros | D = Media Access)<br>
- <li>xs1_firmware</li> firmware number<br>
- <li>xs1_start</li> device start<br>
- </ul><br>
- <li>The message "<code>... Can't connect ...</code>" or "<code>ERROR: empty answer received</code>" in the system logfile says that there was no query for a short time.<br>
- (This can happen more often with DLAN.)<br><br></li>
- <li>If the device has not been connected after 5 connection attempts, the module will switch on < disable > !</li><br>
- <li>Create logfile automatically after define | scheme: <code>define FileLog_xs1Bridge FileLog ./log/xs1Bridge-%Y-%m.log <name></code><br>
- The following values ��are recorded in logfile: Timer | xs1-status information</li>
- </ul>
- </ul>
- <p><a name="xs1Dev"></a>
- <h3>xs1Dev</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#xs1Dev'>DE</a>]</div>
- <ul>
- This module works with the xs1Bridge module. (The <code>xs1_control</code> attribute in the xs1Bridge module must be set to 1!) <br>
- It communicates with this and creates all actuators of the xs1 as a device in FHEM. So you can control the actuators of the xs1 from the FHEM. <br><br>
- The module was developed based on the firmware version v4-Beta of the xs1. There may be errors due to different adjustments within the manufacturer's firmware.
- <br><br>
- <a name="xs1Dev_define"></a>
- <b>Define</b><br>
- <ul>
- <code>define <name> xs1Dev <Typ> <ID> IODev=<NAME></code>
- <br><br>
- It is not possible to create the module without specifying type and ID of xs1.
- <ul>
- <li><code><ID></code> is internal id in xs1.</li>
- </ul>
- <ul>
- <li><code><Typ></code> is the abbreviation A for actuators or S for sensors.</li>
- </ul><br>
- example:
- <ul>
- define xs1Dev_Aktor_02 xs1Dev A 02 IODev=ezControl
- </ul>
- </ul><br>
- <b>Set</b>
- <ul><code>set <name> <value> </code></ul><br>
- in which <code>value</code> one of the following values:<br>
- <ul><code>
- dim06% dim12% dim18% dim25% dim31% dim37% dim43% dim50% dim56% dim62% dim68% dim75% dim81% dim87% dim93% dim100%<br>
- dimdown<br>
- dimup<br>
- dimupdown<br>
- off<br>
- off-for-timer<br>
- on<br>
- on-for-timer<br>
- </code></ul><br>
- <b>Get</b><br>
- <ul>N/A</ul><br>
- <a name="xs1_attr"></a>
- <b>Attributes</b>
- <ul>
- <li>debug (0,1)<br>
- This brings the module into a very detailed debug output in the logfile. Thus, program parts can be controlled and errors can be checked.<br>
- (Default, debug 0)
- </li>
- <li>useSetExtensions (0,1)<br>
- Toggles the SetExtensions on or off.<br>
- (Default, useSetExtensions 0)
- </li>
- </ul><br>
- <b>Explanation:</b>
- <ul>
- <li>abstract Internals:</li>
- <ul>
- xs1_function(1-4): defined function in the device<br>
- xs1_name: defined name in the device<br>
- xs1_typ: defined type in the device<br>
- </ul><br>
-
- <li>The following xs1 device types are already integrated: dimmer | shutter | switch | timerswitch</li>
- </ul>
- </ul>
- <p><a name="xxLG7000"></a>
- <h3>xxLG7000</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#xxLG7000'>DE</a>]</div>
- <ul>
- <br>
- <a name="xxLG7000define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> xxLG7000 <serial-device></code>
- <br><br>
- Defines a serial link to a TV set of LG's xxLG70yy (e. g. 47LG7000) series
- and similar TV sets from <a href="http://www.lge.com/">LG</a>. As of January 2010, the following TV sets should
- be compatible:<br><br>
- <ul>
- <li><code>xxLG7000</code>, e. g. 47LG7000 (tested)</li>
- <li><code>xxPG7000</code>, e. g. 50PG7000 (same Manual as 47LG7000 ;))</li>
- <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>
- <li><code>PQ3000/6000 series</code> (see PS3000)</li>
- <li><code>LU4000/5000 series</code> (<i>not LU7000</i>; see PS3000)</li>
- <li><code>LH2000/3000/4000/5000 series</code> (see PS3000)</li>
- <li><code>SL9500/9000/8000 series</code> (see PS3000)</li>
- </ul><br>
- These TV sets feature a serial connector which can officially be used to control
- the TV set (see your Onwer's Manual, there's an Appendix labelled "External Control
- Device setup", referening to cabling and command set). The xxLG7000 module is
- the FHEM module to actually utilize this. (BTW, those TVs run Linux internally ;))<br><br>
- To exercise control over your TV set, use the <a href="#LGTV">LGTV</a> module and
- bind it ("attr <LGTV-name> IODev <xxLG7000-name>") to xxLG7000.<br><br>
- Examples:
- <ul>
- <code>define myLG7k xxLG7000 /dev/ttyUSB1</code><br>
- </ul>
- <br>
- </ul>
- <a name="xxLG7000set"></a>
- <b>Set </b>
- <ul> Not used, nothing to set directly. </ul>
- <a name="xxLG7000get"></a>
- <b>Get</b>
- <ul> Not used, nothing to get directly. </ul>
- <a name="xxLG7000attr"></a>
- <b>Attributes</b>
- <ul>
- <li><a href="#loglevel">loglevel</a></li>
- <li>SetID (1, 2, ...; see your TV's Owner's Manual how to set it. Defaults to 1 if unset.)</li>
- </ul>
- <br>
- </ul>
- <p><a name="yowsup"></a>
- <h3>yowsup</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#yowsup'>DE</a>]</div>
- <ul>
- Module to interface to the yowsup library to send and recive WhatsApp messages.<br><br>
- Notes:
- <ul>
- <li>Probably only works on linux/unix systems.</li>
- </ul><br>
- <a name="yowsup_Define"></a>
- <b>Define</b>
- <ul>
- <code>define <name> yowsup</code><br>
- <br>
- Defines a yowsup device.<br><br>
- Examples:
- <ul>
- <code>define WhatsApp yowsup</code><br>
- </ul>
- </ul><br>
- <a name="yowsup_Set"></a>
- <b>Set</b>
- <ul>
- <li>image [<number>] <path> [<text>]<br>
- sends an image with optional text. <number> has to be given if sending via master device.</li>
- <li>send [<numner>] <text><br>
- sends <text>. <number> has to be given if sending via master device.</li>
- </ul><br>
- <a name="yowsup_Attr"></a>
- <b>Attributes</b>
- <ul>
- <li>cmd<br>
- complette commandline to start the yowsup cli client<br>
- eg: attr WhatsApp cmd /opt/local/bin/yowsup-cli demos -c /root/config.yowsup --yowsup</li>
- <li>home<br>
- set $HOME for the started yowsup process<br>
- PWD -> set to $PWD<br>
- anything else -> use as $HOME</li>
- <li>nickname<br>
- nickname that will be send as sender</li>
- <li>acceptFrom<br>
- comma separated list of contacts (numbers) from which messages will be accepted</li>
- <li>commandPrefix<br>
- not set -> don't accept commands<br>
- 0 -> don't accept commands<br>
- 1 -> allow commands, every message is interpreted as a fhem command<br>
- anything else -> if the message starts with this prefix then everything after the prefix is taken as the command</li>
- <li>allowedCommands<br>
- A comma separated list of commands that are allowed from this contact.<br>
- If set to an empty list <code>, (i.e. comma only)</code> no commands are accepted.<br>
- <b>Note: </b>allowedCommands should work as intended, but no guarantee
- can be given that there is no way to circumvent it.</li>
- </ul>
- </ul>
- <p><a name="perl"></a>
- <h3>Perl specials</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#perl'>DE</a>]</div>
- If you want to automate some tasks via FHEM, then you'll probably use <a
- href="#at">at</a> or <a href="#notify">notify</a>. For more complex tasks
- you'll use either a shell-script or a perl "oneliner" as the at/notify
- argument. This chapter gives some tips in using the perl oneliners.<br><br>
- <li>To test the following perl oneliners, type them on the telnet prompt (or
- FHEMWEB text input) by enclosing it in {}, one line at once. The last line
- will only write something in the logfile, the output of the other lines is
- directly visible.
- <ul>
- { "Hello" }<br>
- { 1+3*4 }<br>
- { `ls /etc` }<br>
- { Log 1, "Hello" }<br>
- </ul>
- <br>
- <li>
- Perl expressions are separated by ;, in FHEM oneliners they have to
- escaped with ;;<br>
- <ul>
- { my $a = 1+1;; Log 1, "Hello $a" }
- </ul>
- <br>
- <li>To use FHEM commands from the perl expression, use the function fhem(),
- which takes a string argument, this string will be evaluated as a FHEM
- command:<br>
- <ul>
- { fhem "set light on" }<br>
- define n1 notify piri:on { fhem "set light on" }
- </ul>
- Note: if this function returns a value, it will also be logged into the
- global FHEM log. Use 1 as a second argument to disable this logging, this
- makes sense when obtainig some values via FHEM "get...".
- <br>
- <br>
- <li>Notify can be used to store macros for manual execution. Use the <a
- href="#trigger">trigger</a> command to execute the macro:<br>
- <ul>
- define MyMacro notify MyMacro { Log 1, "Hello"}<br>
- trigger MyMacro<br>
- define MacroWithArg notify MyMacro { Log 1, "Hello %"}<br>
- trigger MyMacro MyArg<br>
- </ul>
- <br>
- <li>To make date and time handling easier, the variables $sec, $min, $hour,
- $mday, $month, $year, $wday, $yday, $isdst are available in the perl
- oneliners (see also perldoc -f localtime). Exceptions: $month is in the
- range of 1 to 12, and $year is corrected by 1900 (as I would expect).
- Additionally the variable $hms contains the time in the HH:MM:SS format and
- $today the current date in YYYY-MM-DD format.
- <br>
- Additionally the variabe $we is 1 if it is weekend (i.e $wday == 0 or
- $wday == 6), and 0 otherwise. If the <a href="#holiday2we">holida2we</a>
- global attribute is set, $we is 1 for holidays too.<br>
- <ul>
- define n2 notify piri:on { if($hour > 18 || $hour < 5) {
- fhem "set light on" } }<br>
- define roll_en *07:45:00 { fhem "trigger SwitchAllRoll on" if(!$we) }<br>
- define roll_en *08:30:00 { fhem "trigger SwitchAllRoll on" if($we) }<br>
- </ul>
- <br>
- <li>
- The following helper functions are defined in 99_Util.pm (which will
- be loaded automatically, as every module with prefix 99):
- <ul>
- <li>min(a,b), max(a,b)</li>
- <li>time_str2num("YYYY-MM-DD HH:MM:SS") returns a numerical value,
- which makes computation of time differences easier</li>
- <li>abstime2rel("HH:MM:SS") converts an absolute time to a relative one
- </li>
- </ul>
- </li>
- <li>
- To access the device states/attributes, use the following functions:
- <br>
- <ul>
- <li>Value(<devicename>)<br>
- returns the state of the device (the string you see in paranthesis in
- the output of the list command).
- </li><br>
- <li>OldValue(<devicename>)
- <li>OldTimestamp(<devicename>)<br>
- returns the old value/timestamp of the device.
- </li><br>
- <li>
- ReadingsVal(<devicename>,<reading>,<defaultvalue>)<br>
- Return the reading (the value in the Readings section of "list device")
- </li><br>
- <li>
- ReadingsNum(<devicename>,<reading>,
- <defaultvalue>,<round>)<br>
- Return the first number from a reading value.
- Round id to <round> devimal places (optional parameter).
- </li><br>
- <li>ReadingsTimestamp(<devicename>,<reading>,<
- defaultvalue>)<br>
- returns the timestamp of the reading.
- </li><br>
- <li>ReadingsAge(<devicename>,<reading>,<defaultvalue>)
- <br>
- returns the age of the reading in seconds.
- </li><br>
- <li>
- OldReadingsVal(<devicename>,<reading>,
- <defaultvalue>)<br>
- OldReadingsNum(<devicename>,<reading>,
- <defaultvalue>,<round>)<br>
- OldReadingsTimestamp(<devicename>,<
- reading>,<defaultvalue>)<br>
- OldReadingsAge(<devicename>,<reading>,
- <defaultvalue>)<br>
- similar to the above functions, but used to access the previous values.
- see: <a href="#oldreadings">oldreadings</a>
- </li><br>
- <li>
- AttrVal(<devicename>,<attribute>,<defaultvalue>)<br>
- Return the attribute of the device
- <br><br>
- { Value("wz") }<br>
- { OldValue("wz") }<br>
- { time_str2num(OldTimestamp("wz")) }<br>
- { ReadingsVal("wz", "measured-temp", "20")+0 }<br>
- { ReadingsTimestamp("wz", "measured-temp", 0)}<br>
- { AttrVal("wz", "room", "none") }<br>
- </li><br>
- <li>
- AttrNum(<devicename>,<attribute>,
- <defaultvalue>,<round>)<br>
- Return the first number from an attribute value.
- Round id to <round> devimal places (optional parameter).
- </li><br>
- <li>
- InternalVal(<devicename>,<property>,<defaultvalue>)
- <br>
- Return the internal value (the value in the Internals section of "list
- device").
- </li><br>
- <li>
- InternalNum(<devicename>,<property>,
- <defaultvalue>,<round>)<br>
- Return the first number from an internal value.
- Round id to <round> devimal places (optional parameter).
- </li><br>
- </ul>
- <li>
- By using the 99_SUNRISE_EL.pm module, you have access to the following
- functions: <br>
- <ul>
- sunset($offset, $min, $max)<br>
- sunrise($offset, $min, $max)<br>
- isday()<br>
- </ul>
- offset is in seconds, and the format of min/max is "HH:MM" or "HH:MM:SS".
- isday returns 1 if the sun is visible, and 0 else.
- </li>
- <br>
- <br>
- <!-- perl end - diese Zeile nicht entfernen! -->
- <a name="gnuplot-syntax"></a>
- <h3>gnuplot file syntax</h3>
- <div class='langLinks'>[EN <a href='commandref_DE.html#gnuplot-syntax'>DE</a>]</div>
- The .gplot files are also used by the <a href="#FHEMWEB">FHEMWEB</a>/SVG module
- when the <a href="#plotmode">plotmode</a> attribute is set to SVG. In this case
- only a subset of the .gnuplot attributes are used, and some lines have special
- meanings: the difference will be explained in this chapter. See also <a
- href="http://wiki.fhem.de/wiki/Creating_Plots">this</a> FHEM Wiki entry on
- creating logs.<br>
- Following is a minimal .gplot definition (valid only for plotmode SVG):<br>
- <pre>
- set terminal size <SIZE>
- #FileLog 4:::
- plot title 'Temperature' with lines
- </pre>
- The .gnuplot file consists of 3 parts:
- <ul>
- <li>set commands<br>
- Following sets are recognized:
- <ul>
- <li>terminal, only the size parameter.<br>
- This is usually set to <SIZE>, which is replaced by the <a
- href="#plotsize">plotsize</a> attribute of the FHEMWEB or weblink
- instance.</li>
- <li>title<br>
- Usually set to <TL> which is replace by the weblink <a
- href="#title">title</a> attribute, or to <Lx>, which is replaced
- by the weblink <a href="#label">label</a> attribute.</li>
- <li>ylabel,y2label<br>
- Left and right labels, printed vertically. Are also subject to label
- replacement.</li>
- <li>yrange,y2range<br>
- Specify the range of the left and right axis. Examples:<br>
- <ul>
- set yrange [-0.1:1.1]<br>
- set y2range [0:]<br>
- </ul>
- </li>
- <li>ytics,y2tics<br>
- the label for the left/right axis tics. Examples:<br>
- <ul>
- set ytics ("on" 0, "off" 1)<br>
- set y2tics<br>
- </ul>
- </li>
- </ul>
- </li>
- <br>
- <li>#FileLog entries<br>
- Each line from the plot section must have one corresponding #FileLog
- line. For the syntax see the column_spec paragraph of the <a
- href="#FileLogget">Filelog get</a> description.
- Note that for SVG plots the first column of the input file always has to
- be in the standard fhem timestamp format (YYYY-MM-DD_HH:MM:SS)
- </li>
- <br>
- <li>plot entries<br>
- There is always one plot command with comma separated argument-blocks.
- Each argument-block represents one line, and has its own parameters.
- Following parameters are recognized:
- <ul>
- <li>axes x1y1 / x1y2<br>
- tells the program to assign the current line to one of the two axes
- (left or right).
- </li>
- <li>title<br>
- Caption of the line. Whan clicking on this title, a small javascript
- program will change the title to the min/max and last values of the plot,
- will enable copying this line or pasting an already copied one (the
- existing scale of the plot wont'be changed, only the pasted line will
- be scaled), and other lines of the plot will temporarily be hidden.
- </li>
- <li>with <linetype><br>
- Specify the line type. Following types are recognized: points,
- steps, fsteps, histeps and lines. Everything unknown will be mapped to
- the type lines.
- SVG special: cubic and quadratic, are mapped to the SVG path types C,
- and Q respectively.
- </li>
- <li>ls <linestyle><br>
- The linestyle defaults to l0 for the first line, l1 for the second, and
- so on. It is defined in the svg_style.css file. There are two sets
- defined here: l0-l8 and l0fill-l6fill. The second set must be specified
- explicitly. If the name of the linestyle contains the word fill, then
- plots of the lineytype "lines" will have an additional starting and
- ending segment, so that filling is done correctly.<br>
- See the SVG spec for details of this CSS file.
- Note: if you plan to use this attribute, you have to specify it for all
- the lines (attribute-blocks) in the plot command.
- </li>
- <li>lw <linewidth><br>
- Sets the stroke-width style of the line. This attribute is deprecated,
- the corresponding feature of the CSS file / (attribute ls) should be
- used instead.
- </li>
- </ul>
- </ul>
- </li>
- </div> <!-- right -->
- </body>
- </html>
|