berne
Junior Member

Posts: 85
|
Post by berne on May 7, 2022 12:50:56 GMT -8
My last update didn't post. Commented out 'import updateWeb' and SkyWeather2.py seems to be running, but I haven't checked whether I now have weather underground and Weather stem working.
|
|
|
Post by SDL on May 7, 2022 12:53:24 GMT -8
Fixed now with 27.6. Forgot to add a few files to the repository.
BP
|
|
berne
Junior Member

Posts: 85
|
Post by berne on May 7, 2022 13:21:06 GMT -8
Ok redid git pull but also had to 'sudo pip3 install SafecastPy', uncommented 'import updateWeb' and is working, so far.
|
|
|
Post by SDL on May 7, 2022 15:41:35 GMT -8
Fixed README.md
|
|
berne
Junior Member

Posts: 85
|
Post by berne on May 8, 2022 7:01:42 GMT -8
Might be advisable to provide some help with 'git pull'. When it didn't work for me I had to Google the error to find 'git reset --hard', but that looses any changes the user made to the code. May be a link to a good github tutorial for those of us who aren't github experts? Just a thought.
|
|
|
Post by SDL on May 9, 2022 12:33:19 GMT -8
Lots of GitHub tutorials out there. I'll look around for a good one on git pull.
In the case of it losing your changes, sometimes you have to do a hand merge. Bleh!
BP
|
|
Sopwith
Junior Member

"If it works out of the box - what fun is that?"
Posts: 69
Raspberry Pi: Yes
Other Device: Pico Pi
|
Post by Sopwith on May 9, 2022 14:26:40 GMT -8
I am trying to keep my SkyWeather2 install script and documentation current. Version 027.6 is causing me all sorts of trouble with the databases.
For the script to work correctly, it needs to install all the required software, dependencies, and build the databases correctly. This is done from scratch.
There are 5 .sql scripts in this software release. SkyWeather2.sql WeatherSenseWireless.sql updateWeatherSenseWireless.sql 27.2.DataBaseUpdate.sql 27.3.DataBaseUpdate.sql
SkyWeather2.sql <-- This scrip executes correctly.
CREATE DATABASE IF NOT EXISTS SkyWeather2; USE SkyWeather2;
+-----------------------+ | Tables_in_SkyWeather2 | +-----------------------+ | IndoorTHSensors | | PowerSystem | | SystemLog | | WeatherData | +-----------------------+
It creates the four above tables.
WeatherSenseWireless.sql <-- This script fails.
$sudo mysql -u root -p SkyWeather2 < WeatherSenseWireless.sql
This command fails because the alter table commands below refer to tables that don't exist in the SkyWeather2 database.
------------------------------------------------------------------------------------------------------------------------ alter table AQI433MHZ change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(); alter table Generic change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(); alter table IndoorTHSensors change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(); alter table SolarMax433MHZ change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(); alter table TB433MHZ change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(); alter table WeatherData change column `TimeStamp` `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(); ------------------------------------------------------------------------------------------------------------------------
Tables AQI433MHZ, Generic, SolarMax433MHZ, and TB433MHZ do not exist.
Also - on line 31, the script begins to create tables without creating/using the WeatherSenseWireless database.
------------------------------------------------------------------------------------------------------------------------ -- -- Database: `WeatherSenseWireless` --
-- --------------------------------------------------------
-- -- Table structure for table `AS433MHZ` --
CREATE TABLE IF NOT EXISTS `AS433MHZ` ( `ID` int(11) NOT NULL AUTO_INCREMENT, ------------------------------------------------------------------------------------------------------------------------
updateWeatherSenseWireless.sql <-- This script also fails because of the same alter table commands.
It is obvious you do not use these scripts to build the databases in your SDCard. Without working SQL scripts to create the databases, I am out of business here. It would not be wise for me to hack these scripts because I do not have access/knowledge of the correct database schemas.
Sopwith
|
|
|
Post by SDL on May 10, 2022 12:22:22 GMT -8
Sopwith,
We did use these scripts to build our databases on our SDCard. However, I'm thinking we are looking at a test escape here.
Did you build these from scratch? With no database on the system at all? I'm thinking that might be it. We updated the DB on the SDCard, and did not build it from scratch.
BP
|
|
Sopwith
Junior Member

"If it works out of the box - what fun is that?"
Posts: 69
Raspberry Pi: Yes
Other Device: Pico Pi
|
Post by Sopwith on May 10, 2022 12:51:12 GMT -8
Yes - I am building the databases from scratch. I have never purchased an SDCard. As a reminder, I created a bash script that installs all of the SkyWeather2 software and dependencies from scratch. This allows anyone who purchases a SkyWeather2 device without the software SDCard to create a Pi SDCard, then run the script to be up and running. forum.switchdoc.com/thread/1596/skyweather2-installation-guide. I try to keep this current because many users appreciate it. So there is no update going on here. It is always a scratch build. Sopwith
|
|
|
Post by SDL on May 11, 2022 14:08:41 GMT -8
Sopwith,
Thanks for the information.
Now I can figure it out.
BP
|
|