{"id":2198,"date":"2023-08-21T18:54:33","date_gmt":"2023-08-21T17:54:33","guid":{"rendered":"https:\/\/lesmrdtrucs.mataf35400.fr\/?page_id=2198"},"modified":"2023-09-18T15:52:58","modified_gmt":"2023-09-18T14:52:58","slug":"dashboard-sur-pi-zero","status":"publish","type":"page","link":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/dashboard-sur-pi-zero\/","title":{"rendered":"Dashboard sur pi z\u00e9ro"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2198\" class=\"elementor elementor-2198\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f1d9f2d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f1d9f2d\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2a35063\" data-id=\"2a35063\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5c707b8 elementor-widget elementor-widget-text-editor\" data-id=\"5c707b8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h3>Id\u00e9es en vrac, \u00e0 ajuster:<\/h3>\n<ul>\n<li>Charger une image <strong>BUSTER<\/strong> avec desktop (apparemment, Bullseye ne permet pas l&rsquo;explorateur web Chromium sur pi z\u00e9ro).<\/li>\n<li>Changer la r\u00e9solution pour l&rsquo;\u00e9cran TFT.<\/li>\n<li>Faire les updates &amp; upgrades.<br><em><span style=\"color: #0000ff;\">sudo apt update -y<\/span><\/em><br><em><span style=\"color: #0000ff;\">sudo apt full-upgrade -y<\/span><\/em><\/li>\n<li>Installer Appache (serveur web).<br><em><span style=\"color: #0000ff;\">apt-get install apache2<\/span><\/em>\n<ul>\n<li>Pour m\u00e9mo:\n<ul>\n<li>D\u00e9marrer le serveur: <span style=\"color: #0000ff;\"><em>\/etc\/init.d\/apache2 start<\/em><\/span><\/li>\n<li>Arr\u00eater le serveur: <span style=\"color: #0000ff;\"><em>\/etc\/init.d\/apache2 stop<\/em><\/span><\/li>\n<li>Red\u00e9marrer le serveur: <span style=\"color: #0000ff;\"><em>\/etc\/init.d\/apache2 restart<\/em><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>S&rsquo;approprier les droits sur les fichiers.<br><em><span style=\"color: #0000ff;\">sudo chown -R pi:pi \/DossierDesFichiersDuServeur<\/span><\/em> (changement de propri\u00e9taire)<br><em><span style=\"color: #0000ff;\">sudo chmod -R 755 \/DossierDesFichiersDuServeur<\/span><\/em> (changement des permissions)<br><span style=\"color: #0000ff;\"><em>sudo chmod +x FichierARendreEx\u00e9cutable<\/em><\/span> (\u00e9x\u00e9cutabilisation d&rsquo;un fichier)<\/li>\n<li>Installer Chromium.<br><span style=\"color: #0000ff;\"><em>sudo apt-get install chromium-browser -y <\/em><span style=\"color: #333333;\">(l&rsquo;explorateur web)<\/span><\/span><\/li>\n<li>Configurer Chromium.<br><em><span style=\"color: #0000ff;\">cd .config<\/span><\/em><br><em><span style=\"color: #0000ff;\">sudo mkdir -p lxsession\/LXDE-pi<\/span><\/em><br><em><span style=\"color: #0000ff;\">sudo nano lxsession\/LXDE-pi\/autostart<\/span><\/em><em><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><\/span><\/em>\n<p>&nbsp;&nbsp;&nbsp; <span style=\"color: #0000ff;\"><em>@lxpanel &#8211;profile LXDE-pi<\/em><\/span><br><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; @pcmanfm &#8211;desktop &#8211;profile LXDE-pi<\/em><\/span><br><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; point-rpi<\/em><\/span><\/p>\n<p><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; @xset s off<\/em><\/span><br><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; @xset -dpms<\/em><\/span><br><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; @xset s noblank<\/em><\/span><\/p>\n<p><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; sed -i &lsquo;s\/\u00a0\u00bbexited_cleanly\u00a0\u00bb:false\/\u00a0\u00bbexited_cleanly\u00a0\u00bb:true\/&rsquo; \/home\/$USER\/.config\/chromium\/Default\/Preferences<\/em><\/span><br><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; sed -i &lsquo;s\/\u00a0\u00bbexit_type\u00a0\u00bb:\u00a0\u00bbCrashed\u00a0\u00bb\/\u00a0\u00bbexit_type\u00a0\u00bb:\u00a0\u00bbNormal\u00a0\u00bb\/&rsquo; \/home\/$USER\/.config\/chromium\/Default\/Preferences<\/em><\/span><\/p>\n<p><em>&nbsp;<\/em><\/p>\n<p><em>&nbsp;&nbsp;&nbsp; # lance le programme python qui envoie \u00e0 ThingSpeak les donn\u00e9es tu thermom\u00e8tre p\u00e9riodiquement<br>&nbsp;&nbsp;&nbsp; # ce programme doit avoir \u00e9t\u00e9 rendu ex\u00e9cutable<br><\/em><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; @python \/home\/pi\/PiHomeDashScreen\/DonneesThingSpeak.py<\/em><\/span><\/p>\n<p><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; # permet d&rsquo;ouvrir chromium normalement pour le r\u00e9gler<\/em><\/span><br><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; #@chromium-browser<\/em><\/span><\/p>\n<p><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; @chromium-browser &#8211;incognito &#8211;noerrdialogs &#8211;disable-infobars &#8211;kiosk http:\/\/127.0.0.1:80\/<\/em><\/span><\/p>\n<p><span style=\"color: #0000ff;\"><em>&nbsp;&nbsp;&nbsp; unclutter -idle 0.5 -root &amp;<\/em><\/span><\/p>\n<p><em><span style=\"color: #0000ff;\">&nbsp;<\/span><\/em><\/p>\n<\/li>\n<li>Option Arr\u00eat\/Marche de l&rsquo;\u00e9cran \u00e0 certaines heures.\n<ul>\n<li>Cr\u00e9er une t\u00e2che programm\u00e9e<br><em><span style=\"color: #0000ff;\">sudo crontab -e<\/span><\/em><br><em><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp; 0 1 * * * vcgencmd display_power 0 # met le moniteur en veille \u00e0 1h00 du matin<\/span><\/em><br><em><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp; 0 6 * * * vcgencmd display_power 1 # r\u00e9veille le moniteur \u00e0 6h00 du matin<\/span><\/em><\/li>\n<\/ul>\n<\/li>\n<li>Option retournement de l&rsquo;\u00e9cran \u00e0 180\u00b0\n<ul>\n<li>Modifier \/boot\/config.txt pour l&rsquo;affichage<br><em><span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp; sudo nano \/boot\/config.txt<\/span><\/em><br>&nbsp;&nbsp;&nbsp; ajouter <em><span style=\"color: #0000ff;\">display_rotate=2<\/span><\/em> \u00e0 la fin du fichier<\/li>\n<li>Modifier \/usr\/share\/X11\/xorg.conf.d\/40-libinput.conf<br>&nbsp;&nbsp;&nbsp; <em><span style=\"color: #0000ff;\">sudo nano\/usr\/share\/X11\/xorg.conf.d\/40-libinput.conf<\/span><\/em><br>&nbsp;&nbsp;&nbsp; ajouter <em><span style=\"color: #0000ff;\">Option \u00ab\u00a0TransformationMatrix\u00a0\u00bb \u00ab\u00a0-1 0 1 0 -1 1 0 0 1\u00a0\u00bb<\/span><\/em> \u00e0 la fin de la section concernant le touchscreen<\/li>\n<\/ul>\n<\/li>\n<li>Option Affichage des donn\u00e9es d&rsquo;un thermom\u00e8tre physique (genre DHT22).<br>Apr\u00e8s plein d&rsquo;essais, la seule fa\u00e7on que j&rsquo;ai trouv\u00e9e pour le faire est de se servir d&rsquo;un serveur sur le net pour les donn\u00e9es.\n<ul>\n<li>Cr\u00e9er un compte sur ThingSpeak (<em><span style=\"color: #0000ff;\">https:\/\/thingspeak.com\/<\/span><\/em>)<\/li>\n<li>Y cr\u00e9er un canal de donn\u00e9es<\/li>\n<li>Y envoyer p\u00e9riodiquement les mesures du thermom\u00e8tre (programme python <span style=\"color: #0000ff;\"><em>DonneesThingSpeak.py<\/em><\/span>)<\/li>\n<li>Les r\u00e9cup\u00e9rer p\u00e9riodiquement sur le dashboard (dans le <em><span style=\"color: #0000ff;\">index.php<\/span><\/em>)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Id\u00e9es en vrac, \u00e0 ajuster: Charger une image BUSTER avec desktop (apparemment, Bullseye ne permet pas l&rsquo;explorateur web Chromium sur pi z\u00e9ro). Changer la r\u00e9solution pour l&rsquo;\u00e9cran TFT. Faire les updates &amp; upgrades.sudo apt update -ysudo apt full-upgrade -y Installer Appache (serveur web).apt-get install apache2 Pour m\u00e9mo: D\u00e9marrer le serveur: \/etc\/init.d\/apache2 start Arr\u00eater le serveur: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","footnotes":""},"class_list":["post-2198","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/2198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/comments?post=2198"}],"version-history":[{"count":43,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/2198\/revisions"}],"predecessor-version":[{"id":2351,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/2198\/revisions\/2351"}],"wp:attachment":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/media?parent=2198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}