Source: Step-by-Step Guide to Eliminating Slow FTP Speeds (2022 Update) — RapidSeedbox
Engineering and technology notes
Issue: can’t login when reverse proxy is activated – Grafana / Configuration
Add-On Configuration | Home Assistant Developer Docs
Source: Add-On Configuration | Home Assistant Developer Docs
tcp – iptables/haproxy limit packets per second
iptables -A INPUT -p tcp --dport 1234 -m state --state NEW -j ACCEPT
iptables -I INPUT -p tcp --dport 1234 -m hashlimit --hashlimit-mode srcip,srcport --hashlimit-name HASHNAME --hashlimit-htable-max 5000 --hashlimit-htable-expire 10000 --hashlimit-above 5/sec -j DROP
Source: tcp – iptables/haproxy limit packets per second – Server Fault
Shell Command
This integration can expose regular shell commands as services. Services can be called from a script or in automation. Shell commands aren’t allowed for a camel-case naming, please use lowercase naming only and separate the names with underscores.
Source: Shell Command – Home Assistant
Help needed – Cron job not working with HA OS – Configuration
Instead of Cron jobs you could schedule it directly into HA using automation and shell commands. I have tons of these that I use for various purposes and doing it in HA has the added benefit of being able to set conditions on which scripts to execute and when. For example, here is what I use to truncate my log every hour:
shell_commands.yaml:
shell_rotate_log: '/config/logreset.sh'
automation:
alias: 'Schedule: Clear Logs Each Hour' description: '' trigger: - platform: time_pattern hours: /1 minutes: '59' condition: [] action: - service: shell_command.shell_rotate_log data: {} mode: single
Source: Help needed – Cron job not working with HA OS – Configuration – Home Assistant Community
ESP32 Serial.read to slow
Repair Corrupt Video Files using FFmpeg
If it’s a corrupt MP4 video:
ffmpeg -i input.mp4 -c copy output.mp4
https://www.stellarinfo.com/blog/repair-corrupt-videos-using-ffmpeg/
LibSSH-ESP32
Serial.find() – Arduino Reference
Source: Serial.find() – Arduino Reference
arduino-examples/SerialEvent.ino at main · arduino/arduino-examples · GitHub
/* | |
Serial Event example | |
When new serial data arrives, this sketch adds it to a String. | |
When a newline is received, the loop prints the string and clears it. | |
A good test for this is to try it with a GPS receiver that sends out | |
NMEA 0183 sentences. | |
NOTE: The serialEvent() feature is not available on the Leonardo, Micro, or | |
other ATmega32U4 based boards. | |
created 9 May 2011 | |
by Tom Igoe | |
This example code is in the public domain. | |
https://www.arduino.cc/en/Tutorial/BuiltInExamples/SerialEvent | |
*/ | |
String inputString = ““; // a String to hold incoming data | |
bool stringComplete = false; // whether the string is complete | |
void setup() { | |
// initialize serial: | |
Serial.begin(9600); | |
// reserve 200 bytes for the inputString: | |
inputString.reserve(200); | |
} | |
void loop() { | |
// print the string when a newline arrives: | |
if (stringComplete) { | |
Serial.println(inputString); | |
// clear the string: | |
inputString = ““; | |
stringComplete = false; | |
} | |
} | |
/* | |
SerialEvent occurs whenever a new data comes in the hardware serial RX. This | |
routine is run between each time loop() runs, so using delay inside loop can | |
delay response. Multiple bytes of data may be available. | |
*/ | |
void serialEvent() { | |
while (Serial.available()) { | |
// get the new byte: | |
char inChar = (char)Serial.read(); | |
// add it to the inputString: | |
inputString += inChar; | |
// if the incoming character is a newline, set a flag so the main loop can | |
// do something about it: | |
if (inChar == ‘\n‘) { | |
stringComplete = true; | |
} | |
} | |
} |
Source: arduino-examples/SerialEvent.ino at main · arduino/arduino-examples · GitHub
Fatal Errors – ESP32 – — ESP-IDF Programming Guide latest documentation
Source: Fatal Errors – ESP32 – — ESP-IDF Programming Guide latest documentation