https://tasmota.github.io/docs/DS18x20/
Arp request every 60 secs.
SetOption41 60
Check every 60
TelePeriod 60
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
const https = require("https"); | |
const querystring = require('querystring'); | |
const badRequest = 'There was an issue with the form submission. Please call us or try again later.'; | |
/** | |
* Entrypoint of Lambda function | |
*/ | |
exports.handler = async (event) => { |
#include <WS2812FX.h> | |
#define LED_COUNT 50 | |
#define LED_PIN D5 | |
WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); | |
void setup() { | |
ws2812fx.init(); | |
ws2812fx.setBrightness(70); |
https://tasmota.github.io/docs/DS18x20/
Arp request every 60 secs.
SetOption41 60
Check every 60
TelePeriod 60
Rule1 on power1#state=1 do backlog RuleTimer2 30; counter1 +1 endon on Rules#Timer=2 do power1 off endon | |
Rule1 on | |
Timer1 {"Enable":1,"Time":"4:00","Window":15,"Days":"SMTWTFS","Repeat":1,"Output":1,"Action":1} | |
Timers on | |
Timezone -8 | |
PowerOnState 0 |
// I've used a lot of libs including the popular ones for dotnet such as NAudio but all seem to be overly complicated or not cross platform. | |
// 1. install ffplay on your platform. for Windows `choco install ffplay`. Debian `apt install ffmpeg`. | |
// 2. install nuget pkg `CliWrap` | |
// 3. send your audio stream to the method. | |
public static async Task PlayAsync(Stream stream, CancellationToken cancellationToken) | |
{ | |
var result = await Cli.Wrap("ffplay") | |
.WithStandardInputPipe(PipeSource.FromStream(stream)) | |
.WithArguments($"-autoexit -nodisp -hide_banner -loglevel error -fs -") |
setInterval(function() { | |
// Define the parameters | |
var vpv = 18; // The solar panel's output voltage | |
var ipv = 2; // The solar panel's output current | |
var vbat = 14.8; // The battery's voltage (4-series lithium polymer battery) | |
var ibat = 0; // The battery's current | |
var vmax = 20; // The maximum power voltage of the solar panel | |
var imax = 2.5; // The maximum power current of the solar panel | |
var max_vbat = 16.8; // Maximum voltage of the 4-series lithium polymer battery | |
var min_vbat = 12.0; // Minimum voltage of the 4-series lithium polymer battery |
const GPS = require("gps"); | |
const { SerialPort, ReadlineParser } = require('serialport') | |
const gps = new GPS; | |
// Use a `\r\n` as a line terminator | |
const parser = new ReadlineParser({ | |
delimiter: '\n', | |
}) | |
const port = new SerialPort({ |
import shutil | |
import wmi | |
import os | |
from time import strftime, localtime | |
def copy(device_id): | |
""" Copy all files in camera directory to users directoy for human processing | |
""" | |
# bug only works for Windows | |
src = os.path.join(device_id, "\\", "DCIM", "100MSDCF") |
public static async Task RecordAsync(Stream stream, string microphone, CancellationToken cancellationToken, Action<double> detectedSilenceCallback = null) | |
{ | |
// do this to get audio device with a mic | |
// ffmpeg -list_devices true -f dshow -i dummy | |
// pick one then add it to the audio device | |
// ffmpeg -f dshow -i audio="Microphone (HD Pro Webcam C920)" -ar 16000 output.wav | |
using var gracefulCts = new CancellationTokenSource(); | |
try | |
{ | |
// ffmpeg -f dshow -i audio="Microphone Array (Intel® Smart Sound Technology for Digital Microphones)" -ar 16000 -preset ultrafast -tune zerolatency -b 900k -f mpegts udp://127.0.0.1:9876 |