https://github.com/lostsh/hen-temp
Node MCU based IoT Hen Temperature & Humidity remote monitor
https://github.com/lostsh/hen-temp
animals arduino chicken dht11 environment humidity humidity-monitoring humidity-sensor iot node-mcu pets temperature temperature-monitoring temperature-sensor
Last synced: 7 months ago
JSON representation
Node MCU based IoT Hen Temperature & Humidity remote monitor
- Host: GitHub
- URL: https://github.com/lostsh/hen-temp
- Owner: lostsh
- License: other
- Created: 2021-01-22T10:29:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-27T15:38:19.000Z (over 4 years ago)
- Last Synced: 2025-03-09T11:09:05.690Z (7 months ago)
- Topics: animals, arduino, chicken, dht11, environment, humidity, humidity-monitoring, humidity-sensor, iot, node-mcu, pets, temperature, temperature-monitoring, temperature-sensor
- Language: JavaScript
- Homepage: https://lostsh.github.io/hen-temp/
- Size: 331 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Hen Project
## Site web
Affiche simplement les donées contenues dans le fichier `data.csv` avec un sympatique script `js`## NodeMCU
Récupère les donées atmosphériques, et les envoie periodiquement sur github via une requette http## Action
**Pour récuperer les donées, ici j'utilise directement github Actions, avec un tache qui reçoie les requettes par une requette HTTP**Création d'un workflow github pour récuperer les requettes :
- Créer un Token
- Créer un workflow, par exemple celui ci :
```yml
name: Manual workflow# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'Person to greet'
# Default value if no value is explicitly provided
default: 'World'
# Input has to be provided for the workflow to run
required: true# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
greet:
# The type of runner that the job will run on
runs-on: ubuntu-latest# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Send greeting
run: echo "Hello ${{ github.event.inputs.name }}"
- name: Print Hello
run: echo Hello world
```- Envoyer une requette `HTTP` pour faire tourner la tache :
- Remplacez:
- le [token] par votre token personnel
- `lostsh` -> votre nom d'utilisateur
- `node-time` -> le nom de votre repos
- `manual.yml` -> le nom du fichier yml de votre tache
```bash
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token [token]" \
https://api.github.com/repos/lostsh/node-time/actions/workflows/manual.yml/dispatches \
-d '{"ref":"master", "inputs":{"name":"OMG IT WORKS"}}'
```### Pour envoyer une requette
Pour envoyer une requette a la github Action qui se trouve chez github api, le programme embarqué nécécite un fichier `secret.h` placé dans le même dossier que `nodemcu.ino` contenant, le *token* ainsi que les informations relatives au wifi.Contenu du fichier :
```c
#define TOKEN "40XXXXXXXXXX1c20dfbaaaXXXXXXXXXXhdd7XXXX"#ifndef STASSID
#define STASSID "[nom de votre wifi]"
#define STAPSK "[mot de passe de votre wifi]"
#endif
```