Git Product home page Git Product logo

sdl_pi_weathersense's Introduction

SwitchDoc Labs WeatherSense Open Source Protocol Monitor

For webupdate

pip install SafecastPy

Program monitors the SwitchDoc Labs SDR on Pi for all WeatherSense instruments and records to database

And publishes to MQTT topic "weathersense/#"

Version V018 February 2,2022 - Debug command removed
Version V017 December 10,2022 - WeatherRack3 Added
Version V016 April 30,2022 - local updateWeb Logic Added
Version V015 April 16,2022 - WR2 Light update and database
Version V014 April 11,2022 - Added fixSkyCamRemote.py for setting MQTT addresses
Version V013 March 23,2022 - Added Radiation Detector Support

Before starting V008 or greater, do:
sudo pip3 install python-aqi
sudo pip3 install ffmpeg


if you are updating from an older database version do the following:
sudo mysql -u root -p WeatherSenseWireless < updateWeatherSenseWireless.sql
sudo mysql -u root -p WeatherSenseWireless < update018WeatherSenseWireless.sql

Version V012 August 23,2021 - Check for Database existance
Version V011 August 22,2021 - TimeLapse Error Fix
Version V010 August 21,2021 - Lightning Formatting
Version V009 August 13,2021 - Fix for TimeLapse date sorting
Version V008 August 2,2021 - Fix for AQI Values from Solar AQI
Version V007 August 2,2021 - Fix for Timelapse display
Version V006 August 1,2021 - Added SkyCam Solar support and Timelapses
Version V005 June 9,2021 - Fixed Lightning Typos
Version V004 June 2021 - Finished AfterShock Support. Y Axis labels.
Version V003 April 2021 - Added AfterShock Support. Fixed timestamps

--------------------
config.py contains all the support information
Supports:

  • WeatherSense WeatherRack2
  • WeatherSense Indoor T/H Sensor
  • WeatherSense Lightning Detector
  • WeatherSense Air Quality Index
  • SolarMAX2 Solar Panel System
  • AfterShock Earthquake Detector System
  • WeatherSense SkyCam
  • WeatherSense Radiation Detector

Supporting in the future:

  • WeatherSense Generic

Previous Versions:

Version V002 March 2021 - Added Power calculations <BR Version V001 February 2021

As always, we recommend using the 32GB SDL SDCard with all the software installed.

https://shop.switchdoc.com/products/16gb-sd-card-with-stretch-smart-garden-system-groveweatherpi

Installation:

You need to have the following SDL libraries installed:

cd
git clone https://github.com/switchdoclabs/rtl_433

Follow the install instructions.

And you need to install mariadb:
https://pimylifeup.com/raspberry-pi-mysql/

and

sudo apt-get install python3-dev libmysqlclient-dev
sudo pip3 install mysqlclient

Next:

sudo mysql -u root -p < WeatherSenseWireless.sql

Now to run:

cd
cd SDL_Pi_WeatherSenseWireless
sudo python3 WeatherSenseMonitor.py

and in a different windwow

cd SDL_Pi_WeatherSenseWireless
cd dash_app
sudo python3 index.py 

Then you can access the web pages on your Pi by:

http://localhost:8050/

Or on any computer in your local network:

http://:8050/

Use "hostname -I" to your your Raspberry Pi IP Number.

Example: http://192.168.1.32:8050/

sdl_pi_weathersense's People

Stargazers

S Milliken avatar AFLawrence avatar  avatar Roland Klingesberger avatar Dylan Tredger avatar Philip Cutler avatar  avatar

Watchers

SwitchDoc Labs avatar  avatar

sdl_pi_weathersense's Issues

Broken SQL file

Looks like commit ad2a1c5 broke WeatherSenseWireless.sql

Also the step in the README.md for using that file is missing the mysql from the command.

Weather page of dash shows incorrect temperature(s)

The temperature numbers on the Weather tab of the dash do not change when English_Metric = 1 in config.py is changed, even though the Displayed units (°C and °F) do change. It appears the outside Sensor (FT020TAIO) always displays Fahrenheit, and the inside sensor always Celsius.

In line 111 of SDL_Pi_WeatherSense.py the temp is read and converted to Fahrenheit, and that's what is stored in the DB:

wTemp = (wTemp - 400) / 10.0

In SDL_Pi_WeatherSense.py, the OutdoorTemperature and IndoorTemperature seem to be processed in opposite ways:

SDL_Pi_WeatherSense.py - Line 127

# convert temperature reading to Celsius but why?    
# OutdoorTemperature = round(((wTemp - 32.0) / (9.0 / 5.0)), 2)    
OutdoorTemperature = round(wTemp, 2)

SDL_Pi_WeatherSense.py - Line 236

IndoorTemperature = round(((var["temperature_F"] - 32.0) / (9.0 / 5.0)), 2)    
#IndoorTemperature = var["temperature_F"]

The dash problem seems to be that, when the temperature is read from the DB in dash_app/weather_page.py, the CTUnits function either converts the temp to Fahrenheit, or leaves as-is if the config is set to metric—but the default stored in the db for OutdoorTemperature is actually Fahrenheit.

dash_app/weather_page.py#L92

def CTUnits(temperature):    
    English_Metric = config.English_Metric

    if English_Metric:  # english units 
        temperature = (9.0 / 5.0 * temperature) + 32.0
    return temperature

Also, it's a bit confusing to call the config setting english_metric in this case, since England uses celsius...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.