<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF[
	<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
	<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
	<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
	<!ENTITY swivt 'http://semantic-mediawiki.org/swivt/1.0#'>
	<!ENTITY wiki 'http://https://wikifab.hatlab.fr/Special:URIResolver/'>
	<!ENTITY category 'http://https://wikifab.hatlab.fr/Special:URIResolver/Category-3A'>
	<!ENTITY property 'http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3A'>
	<!ENTITY wikiurl 'https://wikifab.hatlab.fr/'>
]>

<rdf:RDF
	xmlns:rdf="&rdf;"
	xmlns:rdfs="&rdfs;"
	xmlns:owl ="&owl;"
	xmlns:swivt="&swivt;"
	xmlns:wiki="&wiki;"
	xmlns:category="&category;"
	xmlns:property="&property;">

	<owl:Ontology rdf:about="https://wikifab.hatlab.fr/Special:ExportRDF/Alarme_intrusion_avec_notification_Discord">
		<swivt:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2026-04-29T02:56:29+02:00</swivt:creationDate>
		<owl:imports rdf:resource="http://semantic-mediawiki.org/swivt/1.0"/>
	</owl:Ontology>
	<swivt:Subject rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Alarme_intrusion_avec_notification_Discord">
		<rdf:type rdf:resource="http://https://wikifab.hatlab.fr/Special:URIResolver/Category-3ATutoriels"/>
		<rdfs:label>Alarme intrusion avec notification Discord</rdfs:label>
		<rdfs:isDefinedBy rdf:resource="https://wikifab.hatlab.fr/Special:ExportRDF/Alarme_intrusion_avec_notification_Discord"/>
		<swivt:page rdf:resource="https://wikifab.hatlab.fr/Alarme_intrusion_avec_notification_Discord"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">0</swivt:wikiNamespace>
		<swivt:wikiPageContentLanguage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">fr</swivt:wikiPageContentLanguage>
		<property:Area rdf:resource="&wiki;-C3-89lectronique"/>
		<property:Area rdf:resource="&wiki;Maison"/>
		<property:Complete rdf:resource="&wiki;Cochez_cette_case_si_vous_consid-C3-A9rez_ce_tutoriel_termin-C3-A9"/>
		<property:Cost rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5</property:Cost>
		<property:Currency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">EUR (€)</property:Currency>
		<property:Description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Permet de créer une alarme pour détecter les intrusion en recevant une notification sur la messagerie Discord</property:Description>
		<property:Difficulty rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Difficile</property:Difficulty>
		<property:Duration rdf:datatype="http://www.w3.org/2001/XMLSchema#double">30</property:Duration>
		<property:Duration-2Dtype rdf:datatype="http://www.w3.org/2001/XMLSchema#string">minute(s)</property:Duration-2Dtype>
		<property:Introduction rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Créer une alarme avec notification Discord , créer un bot discord et obtenir son token, paramètre du bot Discord, l'ajouter a un serveur Discord 

'''Déjà avoir un compte Discord'''

Il est aussi possible de connecter l'alarme à un compte Télégram, Whatsapp ou de lui faire envoyer des SMS GSM.</property:Introduction>
		<property:Licences rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Attribution (CC BY)</property:Licences>
		<property:Material rdf:datatype="http://www.w3.org/2001/XMLSchema#string">* un nodeMcu esp8266 , 
* un capteur de mouvement [https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/overview  PIR] ou bien [https://blog.squix.org/2016/05/esp8266-peripherals-mini-pir-motion-sensor.html HW-740]</property:Material>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Brancher l'alarme sur un chargeur USB et l'orienter le capteur vers la pièce à surveiller.

Elle s'active après 2 minutes.

Normalement si quelqu'un bouge devant la led s'allume et le message arrive sur discord.

C'est tout !</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Cliquer sur le bot

Dans l'onglet Installation cocher Guild Install

Dans, l'onglet Install link, sélectionner Discord Provided Link 

En bas, dans l'onglet SCOPES :  ajouter bot, puis dans l'onglet  PERMISSION :  ajouter les permissions voulus (dans ce cas ''send message'')

Au dessus, exécuter l'url en générée et l'ajouter au serveur (laisser les valeurs déjà indiquées)</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Connecter l'alimentation du PIR sur 5V(vin) et sur la masse(gnd) .

Connecter la pin signal sur la pin GPIO choisie (D7 dans mon cas)</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Copier et décompresser le code qui est là: https://wikifab.hatlab.fr/Fichier:Alarme_simple_ano.zip

Editer le code avec les valeurs notées plus haut:

* Mettre le channel-id à la place de ''mon-channel-id'' dans la ligne: 
''const char* serverName = "https://discordapp.com/api/channels/mon-channel-id/messages";''

* Mettre le token à la place de ''mon-token'' dans la ligne : 
''http.addHeader("Authorization", "Bot mon-token");''

* Mettre les info de connexion au wifi dans la ligne:    
''WiFiMulti.addAP("nom_du_wifi",       "clef-du-wifi");''


Compiler avec l'Arduino IDE et envoyer le code à la carte NodeMCU.</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Créer un bot Discord (une App) sur le [https://discord.com/developers/applications?new_application=true site officiel de Discord développeur]

Donner un nom (exemple: "appalarme")</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Pour avoir le token aller dans la page développeur https://discord.com/developers/applications , dans l'App, dans les paramètres du bot :

*Aller dans Bot 

*Faire Reset Token, le copier et '''le garder précieusement'''

Pour avoir l'ID du channel(salon) :

Dans le serveur où a été ajouté le bot, sélectionner ou créer un salon text où recevoir la notification. Laisser les valeurs déjà remplies.

Copier et enregistrer la dernière partie de l'url comme en gras dans l'exemple:

exemple:&lt;u&gt;https://discord.com/channels/id_de_la_categorie/'''id_du_channel'''&lt;/u&gt;</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Si le channel est privé, il faut autoriser le Bot.

Aller dans Permissions.

Ajouter le bot.</property:Step_Content>
		<property:Step_Content rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Tout d'abord il faut creer un serveur Discord 
https://discord.com/app

Appuyer sur "+" dans la colonne à gauche.

Passer la question sur le type de serveur

Donner un nom, exemple "serveuralarme".</property:Step_Content>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Channel privé ?</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Creer le bot Discord</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Creer un serveur Discord</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Obtenir le token du bot et l'ID</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Parametrer le bot</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Schéma de connexion</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Telecharger et modifier le code INO</property:Step_Title>
		<property:Step_Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Utiliser</property:Step_Title>
		<property:Tags rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Arduino</property:Tags>
		<property:Tags rdf:datatype="http://www.w3.org/2001/XMLSchema#string">alarme</property:Tags>
		<property:Tags rdf:datatype="http://www.w3.org/2001/XMLSchema#string">discord</property:Tags>
		<property:Tools rdf:datatype="http://www.w3.org/2001/XMLSchema#string">* Fer à souder
* PC avec Arduino IDE</property:Tools>
		<property:Type rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Création</property:Type>
		<swivt:wikiPageModificationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2025-02-08T14:51:29Z</swivt:wikiPageModificationDate>
		<property:Modification_date-23aux rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2460715.1190857</property:Modification_date-23aux>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Alarme intrusion avec notification Discord</swivt:wikiPageSortKey>
	</swivt:Subject>
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#creationDate" />
	<owl:Class rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Category-3ATutoriels" />
	<owl:ObjectProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#page" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiNamespace" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageContentLanguage" />
	<owl:ObjectProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AArea" />
	<owl:ObjectProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AComplete" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ACost" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ACurrency" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ADescription" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ADifficulty" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ADuration" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ADuration-2Dtype" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AIntroduction" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ALicences" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AMaterial" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AStep_Content" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AStep_Title" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ATags" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3ATools" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AType" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageModificationDate" />
	<owl:DatatypeProperty rdf:about="http://https://wikifab.hatlab.fr/Special:URIResolver/Property-3AModification_date-23aux" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageSortKey" />
	<!-- Created by Semantic MediaWiki, https://www.semantic-mediawiki.org/ -->
</rdf:RDF>