Git Product home page Git Product logo

wxboardtomqtt's Introduction

Customization based on SwitcDoc Labs GroveWeatherPi components.

Objective: Simplify and published near realtime weather sensor data via MQTT.

Instructions:

  1. Follow the original SwithcDoc instructions (below) and enable the components you are using in config.py
  2. Add your MQTT broker IP and credentials in wxmqtt.py
  3. Start with: sudo python wxmqtt.py

Test by using a MQTT client like MQTT Explorer https://github.com/thomasnordquist/MQTT-Explorer.git

Message queues are:

wx/totalRain" wx/currentWindSpeed" wx/currentWindGust" wx/currentWindDirection" wx/currentWindDirectionVoltage"

To do: Move MQTT Broker setup to config.py Add more sensors Add MQTT LWT


Weather Board Libraries and Example for Raspberry Pi

Supports SwitchDoc Labs WeatherRack / Argent Data / Sparkfun

Version 1.8

August 22, 2016: Added support for WXLink - Wireless connection to WeatherRack and AM2315

August 4, 2016: Fix for OLED Present under Lightning Conditions

SwitchDocLabs Documentation for the Weather Board under products on:

http://www.switchdoc.com/

Support for all 7 I2C devices supported by the Weather Board

New Support for the SwitchDoc Labs Grove OLED Board
New Support for the ThunderBoard Lighting Detector
New Support for SwitchDoc SunAirPlus Solar Power Controller Board


Other installations required for AM2315 support:

sudo apt-get install python-pip
sudo apt-get install libi2c-dev
sudo pip install tentacle_pi


Other installations required for SD1306 OLED support: sudo apt-get update

sudo apt-get install python-imaging python-smbus

sudo apt-get install build-essential python-dev python-pip
sudo pip install RPi.GPIO

Finally, on the Raspberry Pi install the Python Imaging Library and smbus library by executing:

sudo apt-get install python-imaging python-smbus

Now to download and install the SSD1306 python library code and examples, execute the following commands:

sudo apt-get install git
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install


Setup for the WeatherBoard.py file

Modify this section of code to support your configuration:

# set to true if you are building the Weather Board project with Lightning Sensor
config.Lightning_Mode = False
# set to true if you are building the Solar Powered Weather Board
config.SolarPower_Mode = False

All other devices are detected automatically.


Example Execution

sudo python WeatherBoard.py


Programming Note

If you attach an AM2315 to the WXLink Transmitter, then the program will assume that is the AM2315 you want for outside temperature and humidity. These values will overwrite the AM2315 connected to the local Raspberry Pi or Weather Board.

wxboardtomqtt's People

Contributors

pgregg88 avatar switchdoclabs avatar

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.