|
Post by doxidad on Jan 15, 2018 5:17:51 GMT -8
Just to confirm the observation. My thunderboard is not seen on my Raspberry Pi Zero W running GroveWeatherPi or the thunderboard test program.
I moved it to a Pi 3 and it is recognized. Was hoping to use the pi zero. Oh well.
I seem to have 3 different variants of the Pi Zero. I can test on the other 2 to see if this is a Pi Zero problem or just specific to the Pi Zero W.
I'll post the results when I get a chance to test them.
|
|
|
Post by doxidad on Jan 13, 2018 16:57:58 GMT -8
The directions did not have you install the wrong software - sorry if I confused the issue.
It is still called mysql in the distributions. The later versions are now called MariaDB inside even though they are packages as mysql and the the database daemon is still called mysqld.
The big difference is when you installed it - it ass a newer version and you were never asked to supply a initial password for root. Which I am assuming is your problem.
Here is the image running on one of my RPis notice it is mysqld
534 ? Ssl 41:33 /usr/sbin/mysqld
If I get into the database with the mysql command notice that the sign on says MariaDB
pi@wpi ~ $ sudo mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 4449 Server version: 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
So, you installed the right software but the root password was not setup in the installation like the previous versions.
I'm sorry for the confusion. Just trying to help. You might try the info in the link I gave to set the root password - all of the commands will work.
|
|
|
Post by doxidad on Jan 13, 2018 4:19:09 GMT -8
I bet you have the newer version of mysql - now called mariaDB. The mysql installation used to prompt you to enter a password that you want to use for root the newer one doesn't. Note root for the raspberryPi is NOT the same root for mysql. Mysql has its own root (lets call it the database administrator). I ran into the same problem a while back and I have been using mysql for way over 10 years. The solution is to follow the steps that are spelled out in the wiki (its ubuntu but that is really debian linux just like raspbian that is on the Pi). So look at this an see if it helps. It's a number of steps. Not sure why the maintainers of this product did this other than it is now owned/subsidized/whatever by Oracle who never makes things easy (or cheap!). help.ubuntu.com/community/MysqlPasswordReset
|
|
|
Post by doxidad on Jan 12, 2018 17:14:39 GMT -8
Grove Weathering.sql is just a script that creates the database and tables. Did you install mysql and then run the sql script to create the database?
|
|
|
Post by doxidad on Dec 28, 2017 10:16:46 GMT -8
Just for a point of reference - I made the changes above (commenting out) and I still get the errors. I would assume this timing (Pi being used, number of devices being polled, etc.) with Ibrutti's setup that clears up the problem. I do agree that this is thread related.
I'm not entirely familiar with the python environment to understand how it accomplishes threading and what APIs are available for threading control (and don't have the time right now to delve into it!).
Happy New Year to all!
TR
|
|
|
Post by doxidad on Nov 29, 2017 9:21:27 GMT -8
Try running this script. If I remember correctly, this is how I set up the root password. sudo mysql_secure_installation I'm not sure where it is located right now but if it is in your path it should be found. If not use find and search for it. It will prompt you to enter your root password. If I remember correctly there isn't on set. It will then prompt you for a new password. See mariadb.com/kb/en/library/mysql_secure_installation/ for more info. Hope this will helps you out. TR
|
|
|
Post by doxidad on Oct 3, 2017 16:39:42 GMT -8
It seems like it happens at 2 spots - the one above and here (there may be more...)
SunAirPlus Currents / Voltage ----------------- LIPO_Battery Bus Voltage: 4.18 V LIPO_Battery Shunt Voltage: 0.00 mV LIPO_Battery Load Voltage: 4.18 V LIPO_Battery Current 1: 0.00 mA Battery Power 1: 0.00 W
[Errno 121] Remote I/O error File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/home/pi/SDL_Pi_GroveWeatherPi/GroveWeatherPi.py", line 1399, in sampleAndDisplay busvoltage2 = sunAirPlus.getBusVoltage_V(SOLAR_CELL_CHANNEL) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 152, in getBusVoltage_V value = self._getBusVoltage_raw(channel) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 134, in _getBusVoltage_raw value = self._read_register_little_endian(INA3221_REG_BUSVOLTAGE_1+(channel -1) *2) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 111, in _read_register_little_endian result = self._bus.read_word_data(self._addr,register) & 0xFFFF
Tick! The time is: 2017-10-03 17:27:40.153310 ----------------- Local WeatherRack Weather Sensors Sampling -----------------
|
|
|
Post by doxidad on Oct 3, 2017 13:47:28 GMT -8
Here is a snippit from my log file. This may not be the same as the OP's problem
----------------- SunAirPlus Sampling ----------------- trying database before query query=INSERT INTO WeatherData(TimeStamp,as3935LightningCount, as3935LastInterrupt, as3935LastDistance, as3935LastStatus, currentWindSpeed, currentW indGust, totalRain, bmp180Temperature, bmp180Pressure, bmp180Altitude, bmp180SeaLevel, outsideTemperature, outsideHumidity, currentWindDirection , currentWindDirectionVoltage, insideTemperature, insideHumidity) VALUES(UTC_TIMESTAMP(), 0.000, 0.000, 0.000, "", 0.000, 0.001, 0.000, 0, 0.000, 0 .000, 0.000, 22.100, 48.200, 0.000, 0.000, 22.764, 50.195) trying database rain in past 60 minute= 0.0 before query query=INSERT INTO PowerSystem(TimeStamp, batteryVoltage, batteryCurrent, solarVoltage, solarCurrent, loadVoltage, loadCurrent, batteryPower, solarP ower, loadPower, batteryCharge) VALUES (UTC_TIMESTAMP (), 4.176, 0.000, 3.392, -0.000, 5.136, 170.400, 0.000, -0.000, 0.875, 98.936) ----------------- Weather Sampling ----------------- ----------------- [Errno 121] Remote I/O error File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/home/pi/SDL_Pi_GroveWeatherPi/GroveWeatherPi.py", line 1057, in sampleSunAirPlus shuntvoltage1 = sunAirPlus.getShuntVoltage_mV(LIPO_BATTERY_CHANNEL) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 159, in getShuntVoltage_mV value = self._getShuntVoltage_raw(channel) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 142, in _getShuntVoltage_raw value = self._read_register_little_endian(INA3221_REG_SHUNTVOLTAGE_1+(channel -1) *2) File "./SDL_Pi_INA3221/SDL_Pi_INA3221.py", line 111, in _read_register_little_endian result = self._bus.read_word_data(self._addr,register) & 0xFFFF
----------------- ----------------- DS3231 Real Time Clock ----------------- Raspberry Pi= 2017-10-03 17:18:41 DS3231= 2017-10-03 17:18:41 DS3231 Temperature= 24.00 C ----------------- ----------------- BMP280 Barometer ----------------- Temperature = 23.48 C Pressure = 99.69 KPa Altitude = 136.93 m Sealevel Pressure = 103.38 KPa -----------------
|
|
|
Post by doxidad on Sept 29, 2017 7:00:17 GMT -8
Just as a side - I have these errors also. They don't seem to happen in a regular pattern but rather random. They always happen in the INA code. BTW I am using a Sun Control board.
|
|
|
Post by doxidad on Sept 23, 2017 11:42:24 GMT -8
I have found a bug in GroveWeatherPi.py code. If you attach a HDC1080 it is recognized OK. When it is read it works fine and stores the values internally and prints them out. The problem is the next section that checks the logical to see if a HTU21D is present - which it isn't so the else on the if sets the 2 values of the temperature and humidity to 0. These zeros are reported in the DB instead of the real readings from the HDC. Quick fix is to either remove the code for the HTU or comment out the else part of the conditional. A more elegant solution can be added that checks to see if one or the other sensor is present and if neither then set the temp and humidity to zeros.
|
|
|
Post by doxidad on Aug 21, 2017 16:22:01 GMT -8
Ok, I received the RX board back from you - I assume you didn't find anything wrong with it. It still doesn't work properly for me. I spent a lot of time searching for similar problems and finally found something that looks like might be the cause. Please see this link: www.bountysource.com/issues/46353276-smbus-read_i2c_block_data-fails-on-latest-kernelIt looks like one of the kernel updates broke the read_i2c_block_data()function and only that function. The way they talk in the above link it looks like there is a problem with the I2C protocol and that function. Since RaspberryPi.Org just released a new version of Raspbian last week called Stretch, I downloaded it and made a new system. The RX read_i2c_block_data now works. I appreciate the time spent on replies, looking at the board and returning it. For reference - old kernel: Linux rpi5 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux new kernel: Linux rpi6 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l If anyone else turns up with this problem, there is at least one answer on why it may be happening. Thanks again TR
|
|
|
Post by doxidad on Aug 1, 2017 16:13:37 GMT -8
Hi.
I had a little time and things like this drive me nuts so I tried a few things.
Reflashed the RX code - same thing - can see it but not read it.
I tried the RX board on another PI without the pigrover directly connected to the pi SDA/SDCL +/gnd pins. Same thing - can see it but not read it
I tried an AM2315 on the original pi w/pigrover. Works fine. So. Assumption is the RX board is toast.
Oh well.
Thanks for your help. TR
|
|
|
Post by doxidad on Aug 1, 2017 15:26:12 GMT -8
Thanks - Same code. I'll reflash it and let you know if it works. Also, want to try and talk to another sensor just to make sure the Rpi or pigrover is toasted somehow. Probably have news tomorrow.
Thanks
|
|
|
Post by doxidad on Aug 1, 2017 12:20:34 GMT -8
Hi, Thank you for the response. I put a variable to grab the err on the exception. The error is [Errno 121] Remote I/O error.
This board is not receiving anything when I run this test. The TX half is shutoff. The RX does receive data from the TX when it is active, but it acts the same whether receiving data or not. I did display the received data via the serial port when the TX is active so it does receive - I just can't read it.
So any suggestions where to look or what might be a solution is appreciated.
Thanks TR
|
|
|
Post by doxidad on Jul 31, 2017 8:44:45 GMT -8
I am having problems reading the RX board.
I have the RX board connected to a pi through a pigrover (i2c<->i2c connectors). If I run i2cdetect I can see the board a 08 like expected. If I run the read test program that is supplied in the documentation, the read always fails.
Am I missing something somewhere?
Do you have any suggestions on how to troubleshoot this problem? thx
|
|