This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "TLx493D_inc.hpp" | |
| #include <SimpleKalmanFilter.h> | |
| #include <OneButton.h> | |
| #include <Adafruit_NeoPixel.h> | |
| // How many internal neopixels do we have? some boards have more than one! | |
| #define NUMPIXELS 1 | |
| Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| npm init --yes; | |
| npm i express typescript ts-node dotenv; | |
| npm i -D typescript @types/express @types/node concurrently nodemon; | |
| npm i --save-dev @types/express; | |
| tsc --init; | |
| mkdir configs controllers middlewares models routes services utils; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Importer les bibliothèques | |
| #include <OneWire.h> | |
| #include <DallasTemperature.h> | |
| #include <ESP8266WiFi.h> | |
| #include <ESP8266HTTPClient.h> | |
| #include <ArduinoJson.h> | |
| #define ONE_WIRE_BUS 4 | |
| // Initialisation de oneWire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir /home/pi/image-cam | |
| sudo chgrp motion /home/pi/image-cam | |
| chmod g+rwx /home/pi/image-cam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| daemon on | |
| stream_localhost off | |
| target_dir /home/pi/image-cam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let promise1 = new Promise((resolve, reject) => | |
| resolve('Success!'); | |
| //reject('error'); | |
| ); | |
| promise1.then(res => | |
| alert(result); | |
| }, function (err) { | |
| alert(err); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GET https://url-home-assistant/api/states |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sensor: | |
| - platform: influxdb | |
| host: localhost | |
| username: username | |
| password: pass | |
| queries: | |
| - name: 'Salon' | |
| unit_of_measurement: °C | |
| value_template: '{{ value | round(1) }}' | |
| group_function: last |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sensors: | |
| - platform: rest | |
| resource: http://<Adresse_IP>/api/<username</sensors/7 | |
| value_template: '{{ value_json.state.lightlevel }}' | |
| unit_of_measurement: Lux | |
| name: 'Lumière couloir' | |
| - platform: rest | |
| resource: http://<Adresse_IP>/api/<username>/sensors/5 | |
| value_template: '{{ value_json.state.temperature | float / 100 }}' | |
| unit_of_measurement: °C |
NewerOlder