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
#!/usr/bin/python3 | |
# coding: utf-8 | |
# Python script to read the CPU temperature and send the results to | |
# a Domoticz server. Meant to be executed by cron at regular intervals. | |
# | |
# | |
# Requires: Python 3 | |
# | |
# Version: 2.1 |
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 | |
# | |
# Bash script to create or delete a VLAN in Linux | |
# Tested in Linux 5.15.0-107 x86_64 | |
# | |
# Must be root to execute | |
# | |
# Reference: archlinux VLAN @ https://wiki.archlinux.org/title/VLAN | |
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
#!/usr/bin/bash | |
# Obtain WAN IP address with DNS Query | |
# List of command line parameters for the host command | |
# | |
NameServers=("-4 myip.opendns.com resolver1.opendns.com" | |
"-c ch -t txt -4 whoami.Cloudflare 1.1.1.1" | |
"-t txt o-o.myaddr.l.google.com ns1.google.com" | |
"-4 whoami.akamai.net ns1-1.akamaitech.net") |
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
#!/usr/bin/bash | |
# List of "What is my IP?" type of Web sites to test | |
# | |
MyIpSites=("ifconfig.me/ip | |
v4.ident.me | |
api.ipify.org | |
ipinfo.io/ip | |
ipecho.net/plain | |
myip.dnsomatic.com |
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
#!/usr/bin/python3 | |
# coding: utf-8 | |
# List of "What is my IP?" type of Web sites to test | |
# | |
MyIpSites = ['ifconfig.me/ip', | |
'v4.ident.me', | |
'api.ipify.org', | |
'ipinfo.io/ip', | |
'ipecho.net/plain', |
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
/* | |
How to convert microseconds to 32 bit fraction of a second. This | |
calculation is needed when converting a struct timeval to an | |
NTP 64 bit timestamp. | |
Four methods are tested with four ESP32 processors. Here | |
uint32_t y_us is the microseconds input | |
uint32_t x is the 32 bit fraction of a second ouput |
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
// ESP8266 - Forget Wi-Fi credentials (network SSID and passkey) | |
// Both | |
// WiFi.disconnect(true); or (false) // as per https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/station-class.html#disconnect | |
// WiFi.begin("0","0"); // as per https://github.com/espressif/arduino-esp32/issues/400#issuecomment-411076993 | |
// did not forget Wi-Fi credentials. | |
// Erasing the station configuration as shown below works. | |
// | |
// Tested with platformio/platform-espressif8266 version 4.1.0 based on | |
// esp8266/Arduino Release 3.1.0 (NONOS SDK 3.0.5) | |
// |
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
/* | |
internet_watchdog.ino | |
Continuous testing with an ESP8266 that the Internet is reachable through a Wi-Fi router. | |
Uses AsyncPing by akaJes @ https://github.com/akaJes/AsyncPing and is based on its example | |
ping_interval.ino sketch. | |
April 10, 2020 Michel Deslierres <https://sigmdel.ca/michel> |