Python and SQLAlchemy error -pymysql.err.OperationalError(2006, “MySQL server has gone away …

After sitting for a few minutes and then attempting to reconnect to your database through the application (read, add, delete, or update functions) you receive the error: pymysql.err.OperationalError) (2006, “MySQL server has gone away (BrokenPipeError(32, ‘Broken pipe’) Insert the following app.config[‘SQLALCHEMY_ENGINE_OPTIONS’] = {“pool_pre_ping”: True, “pool_recycle”: 300,} https://medium.com/@heyjcmc/controlling-the-flask-sqlalchemy-engine-a0f8fae15b47   Insert the following into app.py, just after … Read more Python and SQLAlchemy error -pymysql.err.OperationalError(2006, “MySQL server has gone away …

WordPress permissions errors

Recursively change group ownership of the wp-content folder, keeping your ownership of the folder: chown YOURUSERNAME:www-data -R /var/www/html/wp-content/* Note: YOURUSERNAME is the Linux user you created in step E.   Recursively enable write permissions for the group on wp-content subfolders and also for files in the folder and subfolders: cd /var/www/html/wp-content find . -type d -exec … Read more WordPress permissions errors

AM2302 (DTH22) on Adafruit Feather HUZZAH reporting via Wi-Fi (step 4)

Next we’ll connect the Feather to Wi-Fi and report the temperature and humidity data to a cloud MySQL database server through a web page. Using the MAC address for the Feather you found in step 2, register the Feather on Devicenet. Paste the is sketch and make necessary edits (indicated with //TODO): // https://github.com/openhomeautomation/esp8266-cloud/blob/master/cloud_data_logger/cloud_data_logger.ino // … Read more AM2302 (DTH22) on Adafruit Feather HUZZAH reporting via Wi-Fi (step 4)

Categories IoT

Testing AM2302 (DTH22) on Adafruit Feather HUZZAH (step 3)

For this, I purchased: solderless breadboard (3 pack) – $9.99 eachhttps://www.amazon.com/gp/product/B01EV6LJ7G Adafruit AM2302 temperature & humidity sensor – $15 eachhttps://www.adafruit.com/product/393   Connect the AM2302 sensor to the Feather using the breadboard: Download the DHT-sensor-library from Adafruit’s Github Unzip and place the folder in On a PC:   /Program Files (x86)/Arduino/libraries/DHT-sensor-master-library On a Mac:   /Documents/Arduino/libraries/DHT-sensor-master-library Sketch –> … Read more Testing AM2302 (DTH22) on Adafruit Feather HUZZAH (step 3)

Categories IoT

Get the MAC address of an Adafruit Feather Huzzah Arduino board (step 2)

Create a new sketch with the following code and upload it: #include “ESP8266WiFi.h” void setup(){ Serial.begin(115200); delay(500); Serial.println(); Serial.print(“MAC: “); Serial.println(WiFi.macAddress()); } void loop(){} Open the serial monitor (magnifying glass). Press the reset button on your Feather. You should then see the MAC address associate with the wireless Ethernet radio on your Feather appear in … Read more Get the MAC address of an Adafruit Feather Huzzah Arduino board (step 2)

Categories IoT

Connecting to an Arduino Feather Huzzah and Testing (step 1)

For this project I purchased an Arduino Feather Huzzah Adafruit 2821 Feather HUZZAH with ESP8266 Wi-Fihttps://www.adafruit.com/product/2821 Mac installation: Following the instructions on the Feather Huzzah page, I downloaded the latest Arduino IDE:Arduino IDE.Next, I downloaded and installed the Legacy CP2104 USB driver for my Mac from here.   Windows installation: I downloaded the Windows installer (.exe) … Read more Connecting to an Arduino Feather Huzzah and Testing (step 1)

Categories IoT