{"id":1213,"date":"2021-01-04T13:43:53","date_gmt":"2021-01-04T11:43:53","guid":{"rendered":"http:\/\/jeedom.sigalou-domotique.fr\/?p=1213"},"modified":"2024-04-21T13:13:53","modified_gmt":"2024-04-21T11:13:53","slug":"activer-desactiver-wifi-de-mon-reseau-avec-jeedom","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom","title":{"rendered":"Enable\/Disable WIFI from my network with Jeedom"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6aea5809e7b9d\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6aea5809e7b9d\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Objectif\" >Objective<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Important_Ce_tuto_est_en_deux_parties\" >Important: This tutorial is in two parts<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Materiel_logiciels\" >Hardware, software<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Creation_dun_profil_dans_Safe_Access\" >Creating a profile in Safe Access<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#1ere_partie_Explication_complete_a_vertu_pedagogique_pas_a_pas\" >Part 1: Complete explanation with pedagogical virtue, step by step<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Envoyer_des_ordres_au_Syno\" >Send orders to Syno<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Trouver_les_commandes_a_envoyer_au_routeur\" >Find the commands to send to the router<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Ajout_dune_commande_a_Jeedom\" >Adding an order to Jeedom<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Utilisation_de_ces_commandes_%C2%AB_Action_%C2%BB\" >Use of these \"Action\" commands<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Recuperer_des_infos_du_Syno\" >Recover information from Syno<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Trouver_les_commandes_a_envoyer_au_routeur-2\" >Find the commands to send to the router<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Utiliser_linfo_dans_Jeedom\" >Using the info in Jeedom<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Ameliorer_le_Widget_v1\" >Improve Widget (v1)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Ameliorer_le_Widget_v2\" >Improve Widget (v2)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Fusionner_Wifi_Cmd_et_le_Wifi_Info_en_Wifi\" >Merge Wifi Cmd and Wifi Info into Wifi<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Bonus_Actualisation_de_letat_du_Wifi\" >Bonus: Updating the state of Wi-Fi<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#2eme_partie_Importation_direct_dun_modele_de_Device\" >Part 2: Direct import of a device model<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Importer_un_modele_dequipement\" >Import a model of equipment<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Objectif\"><\/span>Objective<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>Use Jeedom commands to enable or disable Wi-Fi on my network and more specifically Wi-Fi access on a profile (my daughter\u2019s profile).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1305\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/Wifi.gif\" alt=\"\" width=\"246\" height=\"145\"><\/p>\n<p><!--more--><\/p>\n<h1><span class=\"ez-toc-section\" id=\"Important_Ce_tuto_est_en_deux_parties\"><\/span>Important: This tutorial is in two parts<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>Depending on what you want to do and\/or understand about the use of Synology APIs and how the Synology-API plugin works, you have two options:<\/p>\n<ul>\n<li>Either you read the <strong>Part I<\/strong> that explains to you, step by step in the most pedagogical way possible what you do<\/li>\n<li>Either you read directly the <strong>Part 2<\/strong> who will provide you, turnkey the tile of your equipment, with the commands and information already programmed<\/li>\n<\/ul>\n\n\n\n<h2><span class=\"ez-toc-section\" id=\"Materiel_logiciels\"><\/span>Hardware, software<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>To activate wifi on a profile, you need a Synology router (I use an RT2600ac) and install the Safe Access application (free)<\/li>\n<\/ul>\n<table style=\"width: 100%; border-collapse: collapse; border-style: hidden;\">\n<tbody>\n<tr>\n<td style=\"width: 50%; text-align: center;\"><iframe style=\"width: 120px; height: 240px;\" src=\"\/\/ws-eu.amazon-adsystem.com\/widgets\/q?ServiceVersion=20070822&amp;OneJS=1&amp;Operation=GetAdHtml&amp;MarketPlace=FR&amp;source=ss&amp;ref=as_ss_li_til&amp;ad_type=product_link&amp;tracking_id=sigalou-21&amp;language=fr_FR&amp;marketplace=amazon&amp;region=FR&amp;placement=B01N5MPTG1&amp;asins=B01N5MPTG1&amp;linkId=6aa37635820ab0dd01d24cf82d1c146e&amp;show_border=true&amp;link_opens_in_new_window=true\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\"><\/iframe><\/td>\n<td style=\"width: 50%;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1214\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/safe-access-synology.png\" alt=\"\" width=\"283\" height=\"154\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>On the Jeedom side, you need the Jeedom-Synology link called <a href=\"http:\/\/jeedom.sigalou-domotique.fr\/plugin-synology-api-documentation\"><span style=\"text-decoration: underline;\">Synology-API<\/span><\/a><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1215\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/synologyapi_icon-266x300.png\" alt=\"\" width=\"146\" height=\"165\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/synologyapi_icon-266x300.png 266w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/synologyapi_icon.png 309w\" sizes=\"auto, (max-width: 146px) 100vw, 146px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Creation_dun_profil_dans_Safe_Access\"><\/span>Creating a profile in Safe Access<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Safe Access is an intelligent and particularly efficient management developed by Synology and it integrates SRM, the operating system of its routers, since version 1.2.<\/p>\n<p>This application allows you to create a profile per family member, then assign to each one his equipment (tablets, phone, computer \u2026). Internet timetables, types of websites authorised or prohibited are then defined for each person. One can even define a \u201cquota\u201d of internet time \u2026<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1223\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/safe_access-300x180.jpg\" alt=\"\" width=\"462\" height=\"277\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/safe_access-300x180.jpg 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/safe_access.jpg 600w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/p>\n<p>And in this profile management, we can pause (= cut internet) or resume (= internet access activated), it is these two states that will be treated here.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1216\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/pause.png\" alt=\"\" width=\"184\" height=\"26\"> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1217\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/reprendre.png\" alt=\"\" width=\"114\" height=\"26\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1218\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecransafeaccess-275x300.png\" alt=\"\" width=\"485\" height=\"529\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecransafeaccess-275x300.png 275w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecransafeaccess.png 421w\" sizes=\"auto, (max-width: 485px) 100vw, 485px\" \/><\/p>\n<h1><span class=\"ez-toc-section\" id=\"1ere_partie_Explication_complete_a_vertu_pedagogique_pas_a_pas\"><\/span>Part 1: Complete explanation with pedagogical virtue, step by step<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<h2><span class=\"ez-toc-section\" id=\"Envoyer_des_ordres_au_Syno\"><\/span>Send orders to Syno<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Trouver_les_commandes_a_envoyer_au_routeur\"><\/span>Find the commands to send to the router<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Synology-API is a great tool for dialogue between Jeedom and Synology equipment (Router or NAS), but you still have to have the API that you need to use to send these commands.<\/p>\n<p>To date, Synology has not documented its APIs (not the ones we are interested in), so we must try to find the API that will have to be used as well as the method to be applied to it and possibly the parameters to be sent with the API.<\/p>\n<p>The SRM interface (for routers) and the DSM interface (for Diskstation NAS) interact with the equipment thanks to this API, so we have to look at the command sent by the browser when we click on a button to have the command sent.<\/p>\n<p>I did this tutorial with FireFox, but all browsers are equipped with similar tools.<\/p>\n<p>Log in to your router and press F12 to have the console, open the Network tab. You should have the screen below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1225\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau-300x150.jpg\" alt=\"\" width=\"598\" height=\"299\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau-300x150.jpg 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau-600x300.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau-1024x512.jpg 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau-768x384.jpg 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau-1536x768.jpg 1536w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau.jpg 1542w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/p>\n<p>On the right are the dialogues between your browser and your router.<\/p>\n<p>At this stage, the manip consists of:<\/p>\n<ul>\n<li>Launch Safe access and have the button on the screen <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1216\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/pause.png\" alt=\"\" width=\"184\" height=\"26\"><\/li>\n<li>Purge the right screen (with the small basket)<\/li>\n<li>Click on <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1216\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/pause.png\" alt=\"\" width=\"184\" height=\"26\"><\/li>\n<li>Pause the query display to avoid being polluted by too many lines<\/li>\n<li>Click on the right on the line that corresponds to the command that has just appeared<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1227\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau2-300x151.jpg\" alt=\"\" width=\"616\" height=\"310\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau2-300x151.jpg 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau2-600x303.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau2.jpg 714w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/p>\n<p>To identify the correct query if there are multiple lines, open the \u2018Query\u2019 tab on the right and look at the method used. If it is Set, it is probably a request to the server.<\/p>\n<p>At this point, we have all the necessary information to create our order on Jeedom.<\/p>\n<p>Here is what should be noted:<\/p>\n<ul>\n<li>Name of API: <strong>SYNO.SafeAccess.AccessControl.ConfigGroup<\/strong><\/li>\n<li>Method to be used: <strong>set<\/strong><\/li>\n<\/ul>\n<p>And two parameters:<\/p>\n<ul>\n<li><strong>config_group _id=3<\/strong> (this corresponds to the id of the profile I want to use, so my daughter\u2019s profile in my example)<\/li>\n<li><strong>pause=true<\/strong> (meaning pause)<\/li>\n<\/ul>\n<p>The same manipulation can be done to fetch the command that corresponds to the button <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1217\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/reprendre.png\" alt=\"\" width=\"114\" height=\"26\"> but you have understood, only the pause parameter will change and this will give <strong>pause=false<\/strong>.<\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"Ajout_dune_commande_a_Jeedom\"><\/span>Adding an order to Jeedom<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To send an order from the Syno, you must add an action command in the Synology-API plugin.<\/p>\n<ul>\n<li>Launch Synology-API and click on the + to launch the wizard<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1232\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/assistant.png\" alt=\"\" width=\"148\" height=\"133\"><\/p>\n<ul>\n<li>In <strong>API to use<\/strong>, select <strong>SafeAccess.AccessControl.ConfigGroup, <\/strong>Note that the SYNO. at the beginning of the name is deleted.<\/li>\n<li>In <strong>Method to be used<\/strong>, select <strong>Set<\/strong><\/li>\n<li>In other settings, add <strong>&amp;config _group _id=3&amp;pause=true <\/strong>Be careful not to forget the &amp; at the beginning.<\/li>\n<li>click Launch Query.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1233\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau3-300x93.png\" alt=\"\" width=\"571\" height=\"177\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau3-300x93.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau3.png 574w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<p>The assistant replied:\u00a0<span style=\"color: #000000;\"><span style=\"color: #8fc935;\">Request sent and executed successfully!<\/span><\/span>\u00a0This is because it worked and Syno replied that the request was executed.<\/p>\n<p>Just below, the wizard proposes to save this command to be able to reuse it directly or via a scenario. Fill in the form and validate the addition of the order<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1236\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau4-300x83.png\" alt=\"\" width=\"557\" height=\"154\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau4-300x83.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau4-600x165.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau4-768x212.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau4.png 874w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/p>\n<p>You can save the second command to restore Wifi. In this example, I have a \u2018WiFi\u2019 command group that has two commands, one to cut and one to restore the connection.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1239\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau5.png\" alt=\"\" width=\"141\" height=\"207\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1240\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau6-300x123.png\" alt=\"\" width=\"300\" height=\"123\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau6-300x123.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/ecranreseau6.png 325w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Utilisation_de_ces_commandes_%C2%AB_Action_%C2%BB\"><\/span>Use of these \"Action\" commands<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Like all Jeedom action commands, these commands can be used in all your scenarios or screens.<\/p>\n<p>Note that they are executed correctly immediately, even if your SRM or DSM interface does not update instantly.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Recuperer_des_infos_du_Syno\"><\/span>Recover information from Syno<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Trouver_les_commandes_a_envoyer_au_routeur-2\"><\/span>Find the commands to send to the router<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>On the principle of previous queries, the Syno can be questioned for information. To respect the Jeedom language, we will refer to these queries as \"info commands\".<\/p>\n<p>Continuing the current example, we will question the Syno to find out whether the profile \u2018My daughter\u2019, i.e. ID3 in Pause mode, is activated or not.<\/p>\n<p>The manipulation to find this information is identical to the previous explanation, it is necessary to \u2018track\u2019 the requests that appear at the time when Safe Access is opened, that is when the interface questions the server to retrieve this information.<\/p>\n<p>I give you the answer right away, you have to use:<\/p>\n<ul>\n<li>API: <strong>SafeAccess.AccessControle.ConfigGroup<\/strong><\/li>\n<li>Method to be used: <strong>Get<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1254\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info1-300x67.png\" alt=\"\" width=\"300\" height=\"67\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info1-300x67.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info1.png 446w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>This request returns the following reply:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1255\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info2-266x300.png\" alt=\"\" width=\"266\" height=\"300\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info2-266x300.png 266w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info2.png 403w\" sizes=\"auto, (max-width: 266px) 100vw, 266px\" \/><\/p>\n<ul>\n<li>The Id2 corresponds to my entire Lan and the Id3 corresponds to the \u2018My daughter\u2019 profile.<\/li>\n<li>The \"pause\" field will answer <em>false<\/em> when the internet is activated and <em>true<\/em> When the internet is shut down.<\/li>\n<li>I tick the penultimate box and click on Save<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1256\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info3.png\" alt=\"\" width=\"207\" height=\"75\"><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Utiliser_linfo_dans_Jeedom\"><\/span>Using the info in Jeedom<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Once added, the info command is added to the API list<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1259\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info4.png\" alt=\"\" width=\"130\" height=\"168\"><\/p>\n<p>I rename our two orders to make it simpler<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1260\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info5.png\" alt=\"\" width=\"262\" height=\"172\"><\/p>\n<p>On the Dashboard, my two widgets are not bad<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1261\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info7.png\" alt=\"\" width=\"247\" height=\"150\"><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Ameliorer_le_Widget_v1\"><\/span>Improve Widget (v1)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The information that tells us whether Wi-Fi is enabled or not is not a boolean, but a string <em>false<\/em> or <em>true<\/em>, it will be necessary to hack a Jeedom widget for this, here is what I propose to create a Widget:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1264\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info12-300x117.png\" alt=\"\" width=\"577\" height=\"225\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info12-300x117.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info12-600x234.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info12-1024x399.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info12-768x299.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/info12.png 1290w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/p>\n<p>I chose to do two tests:<\/p>\n<ul>\n<li>value# != \"true\" which displays icon maison-man337 icon_green<\/li>\n<li>value# == \"true\" which displays icon jeedomapp-lock-ferme icon_red<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Ameliorer_le_Widget_v2\"><\/span>Improve Widget (v2)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>I left the previous paragraph because it has a pedagogical virtue to explain widgets but since then I have integrated the Wifi widget into the plugin.<\/p>\n<p>Simply choose the Synologyapi\/WifiOnOff widget from the info command, which gives the status of Wi-Fi:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1343\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/conseillersecurite10.png\" alt=\"\" width=\"644\" height=\"236\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/conseillersecurite10.png 644w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/conseillersecurite10-600x220.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/conseillersecurite10-300x110.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Fusionner_Wifi_Cmd_et_le_Wifi_Info_en_Wifi\"><\/span>Merge Wifi Cmd and Wifi Info into Wifi<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It would have been possible to create a Virtual to merge the device that contains the commands (Wifi Cmd) and the device that contains the feedback (Wifi Info). But the plugin is able to merge two devices to have on the same device Jeedom commands and info.<\/p>\n<p>All you need to do is follow the fusion wizard<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1288\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/fusionner.png\" alt=\"\" width=\"130\" height=\"87\"><\/p>\n<p>The device thus created contains two commands and an info:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1289\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/fusionner2-300x24.png\" alt=\"\" width=\"575\" height=\"46\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/fusionner2-300x24.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/fusionner2.png 565w\" sizes=\"auto, (max-width: 575px) 100vw, 575px\" \/><\/p>\n<p>And here are the results according to the state of Wifi<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1291\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/wifi2.png\" alt=\"\" width=\"232\" height=\"132\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1290\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/wifi1.png\" alt=\"\" width=\"232\" height=\"132\"><\/p>\n<p>Both buttons work and the icon shows the status of the connection.<\/p>\n<p>&nbsp;<\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"Bonus_Actualisation_de_letat_du_Wifi\"><\/span>Bonus: Updating the state of Wi-Fi<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The green or red icon indicating the status of the wifi can be updated in several ways:<\/p>\n<ul>\n<li>Either automatic by a cron, every minute for example<\/li>\n<li>Either manually by clicking on the top right of the tile, it launches a \"refresh\"<\/li>\n<li>Or automatically following a change of status<\/li>\n<\/ul>\n<p>The last option will be detailed here.<\/p>\n<p>Just ask Jeedom to launch a \"refresh\" after each press of one of the control buttons.<\/p>\n<p>To achieve this, click on the small icon that symbolizes a gear of each command.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1296\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions.png\" alt=\"\" width=\"150\" height=\"31\"><\/p>\n<p>In the configuration tab, click on <strong>Add<\/strong> on this block:<\/p>\n<p><span style=\"color: #000000;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1297\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions2-300x47.png\" alt=\"\" width=\"562\" height=\"88\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions2-300x47.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions2.png 455w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/span><\/p>\n<p>Then pick up the Refresh command for the Wifi equipment<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1298\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions3-300x40.png\" alt=\"\" width=\"563\" height=\"75\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions3-300x40.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions3-600x80.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions3-768x102.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions3.png 780w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1299\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions4-300x57.png\" alt=\"\" width=\"521\" height=\"99\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions4-300x57.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions4-600x114.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/boutonsoptions4.png 618w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>Do this for both orders (WiFi Cup and Wi-Fi Recovery)<\/p>\n<p>&nbsp;<\/p>\n\n\n\n<h1><span class=\"ez-toc-section\" id=\"2eme_partie_Importation_direct_dun_modele_de_Device\"><\/span>Part 2: Direct import of a device model<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>If you do not have the soul of a computer scientist and do not want to understand what you are doing, use the second part directly, which gives you the device model.<\/p>\n<p>You will thus directly have the commands and information that will be preprogrammed, even the widgets are included thus offering you a clean and usable tile immediately.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Importer_un_modele_dequipement\"><\/span>Import a model of equipment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Synology-API plugin has integrated an import feature, you just have to click on the button <strong>Import a Model<\/strong>, just under the name of the relevant Synology equipment:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1357\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/importer.png\" alt=\"\" width=\"136\" height=\"28\" \/><\/p>\n<p>For this \"WiFi\" device, here is the JSON file to import<\/p>\n<ul>\n<li><a href=\"http:\/\/jeedom.sigalou-domotique.fr\/documentssigalou\/Wifi.json\" target=\"_blank\" rel=\"noopener\">http:\/\/jeedom.sigalou-domotique.fr\/documentssigalou\/Wifi.json<\/a><\/li>\n<li>or in zip format: <a href=\"http:\/\/jeedom.sigalou-domotique.fr\/documentssigalou\/Wifi.zip\">http:\/\/jeedom.sigalou-domotique.fr\/documentssigalou\/Wifi.zip<\/a><\/li>\n<\/ul>\n<p>Once the widget is imported, it is up and running.<\/p>\n<p><em>Note that in the template provided, the group ID is 2, if you have another ID, it will have to be changed.<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1291\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/wifi2.png\" alt=\"\" width=\"232\" height=\"132\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1290\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/01\/wifi1.png\" alt=\"\" width=\"232\" height=\"132\" \/><\/p>\n<p>In order for the widget to be updated, it must be added <a href=\"https:\/\/www.sigalou-domotique.fr\/en\/activer-desactiver-wifi-de-mon-reseau-avec-jeedom\/#Bonus_Actualisation_de_letat_du_Wifi\">the bonus of the 1st part, follow this link<\/a> to add the refresh after each press of the buttons<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>Objective To use Jeedom commands to activate or deactivate the Wi-Fi on my network and more specifically the Wi-Fi access of a profile (my daughter\u2019s).<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14],"tags":[106],"class_list":["post-1213","post","type-post","status-publish","format-standard","hentry","category-domotique","tag-wifi"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/comments?post=1213"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/1213\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}