[{"data":1,"prerenderedAt":666},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":203,"content-\u002F2023\u002F01\u002F18\u002Fraspberry-pi-home-assistant-kiosk\u002F":204},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":181},"Home Assistant",{"category":181},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":181},{"category":181},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},191,{"id":205,"title":206,"body":207,"category":181,"date":653,"description":213,"embedImage":654,"extension":655,"image":654,"intro":656,"meta":657,"navigation":310,"path":658,"seo":659,"series":654,"sitemap":660,"stem":661,"tags":662,"__hash__":665},"content\u002F2023\u002F01\u002F18\u002Fraspberry-pi-home-assistant-kiosk.md","Raspberry Pi - Home Assistant Kiosk",{"type":208,"value":209,"toc":646},"minimark",[210,214,219,233,238,242,251,254,257,265,268,273,281,286,462,465,468,478,482,616,618,630,634,642],[211,212,213],"p",{},"I wanted to set up a simple kiosk dashboard in home assistant and make it available via a pi with the pi 7\" touchscreen.",[215,216,218],"h2",{"id":217},"kiosk-dashboard","Kiosk Dashboard",[211,220,221,222,232],{},"To set up the actual dashboard I simply followed this tutorial from ",[223,224,231],"a",{"href":225,"rel":226,"target":230},"https:\u002F\u002Fwww.youtube.com\u002F@SmartHomeJunkie",[227,228,229],"nofollow","noopener","noreferer","_blank","Smart Home Junkie"," for the config then changed out the view\u002Fsub-view contents with the controls and displays I wanted:",[234,235],"youtube",{"id":236,"title":237},"G3lT4zgjER8","Kiosk Mode in Home Assistant – How To – The Right Way! - Smart Home Junkie",[215,239,241],{"id":240},"pi-setup","Pi Setup",[211,243,244,245,250],{},"Initial setup was just a simple Raspbian 64 bit SD card - basically just using ",[223,246,249],{"href":247,"rel":248,"target":230},"https:\u002F\u002Fwww.raspberrypi.com\u002Fdocumentation\u002Fcomputers\u002Fgetting-started.html",[227,228,229],"Raspberry Pi Imager"," but choosing 64 bit and enabling SSH.",[211,252,253],{},"I didn't bother with WiFi - this will be powered by PoE - so it will have an ethernet connection.",[211,255,256],{},"Right now - to save on fiddling with the screen board's use of the power pins on the 40 pin connecter and also because I find the fan on the PoE hat distracting - I'm using a simple PoE splitter.",[211,258,259,260],{},"Connect the 7\" screen - ",[223,261,264],{"href":262,"rel":263,"target":230},"https:\u002F\u002Fthepihut.com\u002Fblogs\u002Fraspberry-pi-tutorials\u002Fraspberry-pi-7-touch-screen-assembly-guide",[227,228,229],"e.g. The PiHut has an assembly guide",[211,266,267],{},"Boot and login.",[269,270,272],"h3",{"id":271},"kiosk-setup","Kiosk setup",[211,274,275,276],{},"For this - I followed ",[223,277,280],{"href":278,"rel":279,"target":230},"https:\u002F\u002Fwww.raspberrypi.com\u002Ftutorials\u002Fhow-to-use-a-raspberry-pi-in-kiosk-mode\u002F",[227,228,229],"this guide from raspberry",[282,283,285],"h4",{"id":284},"the-kiosksh-script","The kiosk.sh script",[287,288,293],"pre",{"className":289,"code":290,"language":291,"meta":292,"style":292},"language-shell shiki shiki-themes github-dark","#!\u002Fbin\u002Fbash\n\nxset s noblank\nxset s off\nxset -dpms\n\nunclutter -idle 0.5 -root &\n\nsed -i 's\u002F\"exited_cleanly\":false\u002F\"exited_cleanly\":true\u002F' \u002Fhome\u002Fadmin\u002F.config\u002Fchromium\u002FDefault\u002FPreferences\nsed -i 's\u002F\"exit_type\":\"Crashed\"\u002F\"exit_type\":\"Normal\"\u002F' \u002Fhome\u002Fadmin\u002F.config\u002Fchromium\u002FDefault\u002FPreferences\n\n\u002Fusr\u002Fbin\u002Fchromium-browser --noerrdialogs --disable-infobars --kiosk --force-dark-mode &\n\nwhile true; do\n    sleep 10\ndone\n","shell","",[294,295,296,305,312,326,336,345,350,369,374,389,401,406,426,431,447,456],"code",{"__ignoreMap":292},[297,298,301],"span",{"class":299,"line":300},"line",1,[297,302,304],{"class":303},"sAwPA","#!\u002Fbin\u002Fbash\n",[297,306,308],{"class":299,"line":307},2,[297,309,311],{"emptyLinePlaceholder":310},true,"\n",[297,313,315,319,323],{"class":299,"line":314},3,[297,316,318],{"class":317},"svObZ","xset",[297,320,322],{"class":321},"sU2Wk"," s",[297,324,325],{"class":321}," noblank\n",[297,327,329,331,333],{"class":299,"line":328},4,[297,330,318],{"class":317},[297,332,322],{"class":321},[297,334,335],{"class":321}," off\n",[297,337,339,341],{"class":299,"line":338},5,[297,340,318],{"class":317},[297,342,344],{"class":343},"sDLfK"," -dpms\n",[297,346,348],{"class":299,"line":347},6,[297,349,311],{"emptyLinePlaceholder":310},[297,351,353,356,359,362,365],{"class":299,"line":352},7,[297,354,355],{"class":317},"unclutter",[297,357,358],{"class":343}," -idle",[297,360,361],{"class":343}," 0.5",[297,363,364],{"class":343}," -root",[297,366,368],{"class":367},"s95oV"," &\n",[297,370,372],{"class":299,"line":371},8,[297,373,311],{"emptyLinePlaceholder":310},[297,375,377,380,383,386],{"class":299,"line":376},9,[297,378,379],{"class":317},"sed",[297,381,382],{"class":343}," -i",[297,384,385],{"class":321}," 's\u002F\"exited_cleanly\":false\u002F\"exited_cleanly\":true\u002F'",[297,387,388],{"class":321}," \u002Fhome\u002Fadmin\u002F.config\u002Fchromium\u002FDefault\u002FPreferences\n",[297,390,392,394,396,399],{"class":299,"line":391},10,[297,393,379],{"class":317},[297,395,382],{"class":343},[297,397,398],{"class":321}," 's\u002F\"exit_type\":\"Crashed\"\u002F\"exit_type\":\"Normal\"\u002F'",[297,400,388],{"class":321},[297,402,404],{"class":299,"line":403},11,[297,405,311],{"emptyLinePlaceholder":310},[297,407,409,412,415,418,421,424],{"class":299,"line":408},12,[297,410,411],{"class":317},"\u002Fusr\u002Fbin\u002Fchromium-browser",[297,413,414],{"class":343}," --noerrdialogs",[297,416,417],{"class":343}," --disable-infobars",[297,419,420],{"class":343}," --kiosk",[297,422,423],{"class":343}," --force-dark-mode",[297,425,368],{"class":367},[297,427,429],{"class":299,"line":428},13,[297,430,311],{"emptyLinePlaceholder":310},[297,432,434,438,441,444],{"class":299,"line":433},14,[297,435,437],{"class":436},"snl16","while",[297,439,440],{"class":321}," true",[297,442,443],{"class":367},"; ",[297,445,446],{"class":436},"do\n",[297,448,450,453],{"class":299,"line":449},15,[297,451,452],{"class":317},"    sleep",[297,454,455],{"class":343}," 10\n",[297,457,459],{"class":299,"line":458},16,[297,460,461],{"class":436},"done\n",[211,463,464],{},"Changes:",[211,466,467],{},"I don't want to switch between tabs.",[469,470,471,475],"ul",{},[472,473,474],"li",{},"no xdotool call - no tab switching. However - you do need the loop - without it the service starts then terminates and chromium shuts down again. Whether this is expected or not - I have no idea - but leaving this empty sleep loop in works fine.",[472,476,477],{},"force dark mode - the dashboard is less glaring that way.",[282,479,481],{"id":480},"the-service","The service",[287,483,487],{"className":484,"code":485,"language":486,"meta":292,"style":292},"language-ini shiki shiki-themes github-dark","[Unit]\nDescription=Chromium Kiosk\nWants=graphical.target\nAfter=graphical.target\n\n[Service]\nExecStartPre=\u002Fbin\u002Fsleep 20\nEnvironment=DISPLAY=:0.0\nEnvironment=XAUTHORITY=\u002Fhome\u002Fadmin\u002F.Xauthority\nType=simple\nExecStart=\u002Fbin\u002Fbash \u002Fhome\u002Fadmin\u002Fkiosk.sh\nRestart=on-abort\nUser=admin\nGroup=admin\n\n[Install]\nWantedBy=graphical.target\n","ini",[294,488,489,494,502,510,517,521,526,534,548,560,568,576,584,592,599,603,608],{"__ignoreMap":292},[297,490,491],{"class":299,"line":300},[297,492,493],{"class":317},"[Unit]\n",[297,495,496,499],{"class":299,"line":307},[297,497,498],{"class":436},"Description",[297,500,501],{"class":367},"=Chromium Kiosk\n",[297,503,504,507],{"class":299,"line":314},[297,505,506],{"class":436},"Wants",[297,508,509],{"class":367},"=graphical.target\n",[297,511,512,515],{"class":299,"line":328},[297,513,514],{"class":436},"After",[297,516,509],{"class":367},[297,518,519],{"class":299,"line":338},[297,520,311],{"emptyLinePlaceholder":310},[297,522,523],{"class":299,"line":347},[297,524,525],{"class":317},"[Service]\n",[297,527,528,531],{"class":299,"line":352},[297,529,530],{"class":436},"ExecStartPre",[297,532,533],{"class":367},"=\u002Fbin\u002Fsleep 20\n",[297,535,536,539,542,545],{"class":299,"line":371},[297,537,538],{"class":436},"Environment",[297,540,541],{"class":367},"=",[297,543,544],{"class":436},"DISPLAY",[297,546,547],{"class":367},"=:0.0\n",[297,549,550,552,554,557],{"class":299,"line":376},[297,551,538],{"class":436},[297,553,541],{"class":367},[297,555,556],{"class":436},"XAUTHORITY",[297,558,559],{"class":367},"=\u002Fhome\u002Fadmin\u002F.Xauthority\n",[297,561,562,565],{"class":299,"line":391},[297,563,564],{"class":436},"Type",[297,566,567],{"class":367},"=simple\n",[297,569,570,573],{"class":299,"line":403},[297,571,572],{"class":436},"ExecStart",[297,574,575],{"class":367},"=\u002Fbin\u002Fbash \u002Fhome\u002Fadmin\u002Fkiosk.sh\n",[297,577,578,581],{"class":299,"line":408},[297,579,580],{"class":436},"Restart",[297,582,583],{"class":367},"=on-abort\n",[297,585,586,589],{"class":299,"line":428},[297,587,588],{"class":436},"User",[297,590,591],{"class":367},"=admin\n",[297,593,594,597],{"class":299,"line":433},[297,595,596],{"class":436},"Group",[297,598,591],{"class":367},[297,600,601],{"class":299,"line":449},[297,602,311],{"emptyLinePlaceholder":310},[297,604,605],{"class":299,"line":458},[297,606,607],{"class":317},"[Install]\n",[297,609,611,614],{"class":299,"line":610},17,[297,612,613],{"class":436},"WantedBy",[297,615,509],{"class":367},[211,617,464],{},[469,619,620,623],{},[472,621,622],{},"admin instead of pi as username",[472,624,625,626,629],{},"add the ExecStartPre to sleep at the start so that the X desktop had time to load. This may not be needed when it gets updated from the 3B to a 4B pi. You could see the error in ",[294,627,628],{},"service kiosk status"," output",[269,631,633],{"id":632},"todo","ToDo",[469,635,636,639],{},[472,637,638],{},"Dim or disable the screen between midnight and 5am or similar. Should wake up on touch though. Not had time to look at this yet.",[472,640,641],{},"Some sort of box for it",[643,644,645],"style",{},"html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":292,"searchDepth":307,"depth":307,"links":647},[648,649],{"id":217,"depth":307,"text":218},{"id":240,"depth":307,"text":241,"children":650},[651,652],{"id":271,"depth":314,"text":272},{"id":632,"depth":314,"text":633},"2023-01-18 21:19 +0100",null,"md","Setup of a simple pi + touch screen home assistant kiosk",{},"\u002F2023\u002F01\u002F18\u002Fraspberry-pi-home-assistant-kiosk",{"title":206,"description":213},{"loc":658},"2023\u002F01\u002F18\u002Fraspberry-pi-home-assistant-kiosk",[663,664],"raspberry pi","home assistant","FvvxLjRAGnIHtyn7XubSfm3NvPc3DPhsKvn7xcXz6Cw",1775293005909]