Skip to content

Instantly share code, notes, and snippets.

@ItKindaWorks
ItKindaWorks / subscriber_influxdb.py
Last active October 29, 2019 20:49
mqtt subscriber script to insert mqtt data into influxdb
#!/usr/bin/env python3
import paho.mqtt.client as mqtt
import datetime
import time
from influxdb import InfluxDBClient
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
client.subscribe("/home/#")
@ItKindaWorks
ItKindaWorks / installGrafanaInflux.sh
Last active July 18, 2021 23:59
installer script to install grafana and influxdb for ubuntu 18.04
#install tools needed for influx installation
sudo apt-get install -y curl net-tools openssh-server python-pip
pip install paho-mqtt
pip install influxdb
echo
echo "Setting up InfluxDB for installation..."
echo
sleep 5
#add influx to list of allowed software
#
#irrigationScript.py
#ItKindaWorks 2018
#github.com/ItKindaWorks
#
import sys
import paho.mqtt.client as mqtt
from weatherbit.api import Api
@ItKindaWorks
ItKindaWorks / dustSensorDemo.ino
Created July 19, 2018 00:49
Demo code for using a waveshare/sharp dust sensor with an ESP8266
/*
dustSensorDemo.ino
Copyright (c) 2018 ItKindaWorks All right reserved.
github.com/ItKindaWorks
dustSensorDemo.ino is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@ItKindaWorks
ItKindaWorks / serialRelayTest.ino
Created July 2, 2018 16:29
A simple Arduino program for controlling an LC Tech serial relay board
/*
serialRelayTest.ino
*/
byte relON[] = {0xA0, 0x01, 0x01, 0xA2}; //Hex command to send to serial for open relay
byte relOFF[] = {0xA0, 0x01, 0x00, 0xA1}; //Hex command to send to serial for close relay
void setup(void){
Serial.begin(9600);
@ItKindaWorks
ItKindaWorks / moistureSense.ino
Last active January 3, 2023 18:13
A small ESP8266 Arduino program for using getting averaged data from a moisture sensor and sending it via mqtt
/*
moistureSense.ino
Copyright (c) 2018 ItKindaWorks All right reserved.
github.com/ItKindaWorks
moistureSense.ino is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@ItKindaWorks
ItKindaWorks / _smokeAlert.ino
Last active September 27, 2022 16:30
An ESP8266 script to send a push notification when started up notifying the user that a fire alarm has been set off. Video link here: https://youtu.be/48rV7RkM_2U
/*
smokeAlert.ino
Copyright (c) 2018 ItKindaWorks All right reserved.
github.com/ItKindaWorks
smokeAlert.ino is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@ItKindaWorks
ItKindaWorks / RouterBooter.ino
Last active January 29, 2022 17:23
An ESP8266 based Arduino program for connecting to and automatically rebooting a router when it loses an internet connection
/*
configAndStatusAPDemo.ino
Copyright (c) 2017 ItKindaWorks All right reserved.
github.com/ItKindaWorks
This file is part of ESPHelper
ESPHelper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@ItKindaWorks
ItKindaWorks / ESPHelperWebStatusConfigLED.ino
Last active January 3, 2019 04:19
A demo program for ESPHelper showing off some new features (filesystem config storage & webserver config/status pager)
/*
ESPHelperWebStatusConfigLED.ino
Copyright (c) 2017 ItKindaWorks All right reserved.
github.com/ItKindaWorks
This file is part of ESPHelper
ESPHelper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@ItKindaWorks
ItKindaWorks / powerMon.fzz
Last active February 20, 2023 14:56
A simple arduino and ESP8266 program to read and average 2 current transformers and a voltage transformer for monitoring whole house power usage.