|
Post by justin on Aug 19, 2018 7:10:14 GMT -8
When my GroveWeatherPi boots up initially I'm getting "Use mysql: not present". And I'm not sure how to make it show "present"?
To give some background I installed mysql (I actually installed mariadb- which from what I read is the newer version that is supposed to be a drop-in replacement for mysql) as well as phpmyadmin. When i tried to run the command from your github readme file ( sudo mysql -u root -p GroveWeatherPi< GroveWeatherPi.sql ) it returned "bash: GroveWeatherPi.sql: No such file or directory".
So I instead imported the .sql file using phpmyadmin. When i log onto phpmyadmin it shows GroveWeatherPi. When i click on it it shows Powersystem, systemlog, and weatherdata. When i click on weatherdata it shows the the data table header (ID, Timestamp, as3935LightingCount, etc....) but there is no data being populated under the headers while I have the GroveWeatherPi running in the background. So i know I have the .sql file successfully imported into phpmyadmin but it is not showing any of the sensors data. It also still shows Use mysql: not present at boot-up.
So my question is what am i missing? How do I get the GroveWeatherPi to show Use mysql: present?
|
|
|
Post by SDL on Aug 19, 2018 9:09:00 GMT -8
Check on the config.h (or conflocal.py - copy the config.py to conflocal.py to make your changes - then software updates don't screw with your changes) and change the following to true.
#MySQL Logging and Password Information
enable_MySQL_Logging = False MySQL_Password = "password"
BP
|
|
|
Post by justin on Aug 20, 2018 3:04:25 GMT -8
As you suggeated, I copied the config.py file to a new file created called conflocal.py. Inside the file I changed enable_MYSQL_LOGGING = TRUE
However, after making the changes when the system starts up it now shows Usemysql: present, which is good, but it follows up right after with a new error. I have copied and pasted the new error below. I'm not sure if this is a result of changing the files or something new altogether.
pi@raspberrypi:~ $ cd SDL_Pi_GroveWeatherPi pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $ sudo python GroveWeatherPi.py
GroveWeatherPi Solar Powered Weather Station Version 3.02 - SwitchDoc Labs
Program Started at:2018-08-19 22:55:06
---------------------- I2C Mux - TCA9545: Present BMP280: Present DS3231: Present HDC1080: Not Present HTU21DF: Not Present AM2315: Present ADS1015: Not Present ADS1115: Present AS3935: Not Present OLED: Not Present SunAirPlus: Not Present Sunlight Sensor: Not Present WXLink: Not Present
UseMySQL: Present Check WLAN: Present WeatherUnderground: Not Present ---------------------- Error 1045: Access denied for user 'root'@'localhost' (using password: YES) Traceback (most recent call last): File "GroveWeatherPi.py", line 1749, in <module> pclogging.log(pclogging.INFO, __name__, "GroveWeatherPi Startup Version 3.02") File "/home/pi/SDL_Pi_GroveWeatherPi/pclogging.py", line 70, in log cur.close() UnboundLocalError: local variable 'cur' referenced before assignment pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $
|
|
|
Post by SDL on Aug 20, 2018 12:58:45 GMT -8
You don't have the correct password in the conflocal.py for mySQL.
BP
|
|