Git Product home page Git Product logo

sdl_pi_smartgarden3's Introduction

SmartGarden3
SwitchDoc Labs
June 2022

Version 058 - June 20, 2022 - Fixed reboot of extender - restore valve state on reboot
Version 057 - March 28, 2022 - Fixed Type in SG3Configure.py
Version 056 - March 10, 2022 - Fixed Merge Error in scanBluetooth.py
Version 055 - February 27, 2022 - Minor bug fixes and removal of unused code
Version 054 - February 25, 2022 - Added scanAndFixExtenders.py utility for when IP numbers change due to Access Point reset
Version 053 - February 11, 2022 - Added Hydoponics pH Meter and 24 Hour averages
Version 052 - January 31, 2022 - Fixed Bluetooth
Version 051 - January 30, 2022 - Initial Released Version

To see what is happening on the MQTT channels:
mosquitto_sub -d -t SGS/#

To Install Yourself: (Note: This is a complicated install. For beginners and advanced beginners, you are better off buying a configured SD Card from shop.switchdoc.com)
This is a Python3 program. All libraries need to be in python3.

Installation

  1. Install MariaDB on Raspberry Pi

  2. Read in the SmartGarden3.sql file into the database sudo mysql -u root < SmartGarden3.sql

  3. Install python apscheduler

sudo pip3 install apscheduler

  1. Install dash libraries (there are a bunch of them).

sudo pip3 install dash
sudo pip3 install dash-bootstrap-components
sudo pip3 install plotly

  1. Install remi libraries

sudo pip3 install remi

  1. Install SG3 git clone github.com/switchdoclabs/SDL_Pi_SmartGarden3

Depending on your system, you may have other missing files. See the information printed out when your SG3.py software starts and install the missing librarys.

Note: Why don't we supply exact installation procedures? The reason is is they are different for every distribution on the Raspberry Pi and developers are continuously changing them.

From our customer frenchi, he has summarized installation instructions:

I just followed the instructions from Raspberry using the Raspberry Pi imager App -- it reformats the SD Card which simply allow the Pi4 to reload its boot sw.

After sudo apt-get -y update && apt-get -u dist-upgrade

Note I placed all the SDL software in a directory called SwitchDoc :-)

- sudo apt-get clean
- sudo apt-get autoremove
- sudo apt-get install build-essential python3 python3-pip python3-dev python3-smbus git python3-apscheduler
- sudo apt-get install pigpio python3-pigpio i2c-tools
- sudo apt-get install mariadb-server
- sudo apt-get install mosquitto mosquitto-clients
- sudo apt-get install python-imaging-tk libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5sudo mysql_secure_installation
- sudo apt-get install scons swig
- sudo raspi-config to enable I2C
- sudo i2cdetect -y 1
- sudo pip3 install --upgrade setuptools pip
- sudo pip3 install setuptools --upgrade
- sudo pip3 install i2cdevice
- sudo pip3 install apscheduler adafruit-blinka picamera
- sudo pip3 install mysqlclient paho-mqtt pillow
- sudo pip3 install dash dash-bootstrap-components plotly remi pandas dash_daq
-
- mkdir SwitchDoc
- cd SwitcDoc
- git clone github.com/adafruit/Adafruit_Python_GPIO.git
- cd Adafruit_Python_GPIO
- sudo python3 setup.py install
- cd ~/SwitchDoc
- git clone github.com/switchdoclabs/SDL_Pi_8PixelStrip.git
- cd SDL_Pi_8PixelStrip
- scons
- cd python
- sudo python3 ./setup.py build
- sudo python3 ./setup.py install
- git clone github.com/switchdoclabs/SDL_Pi_SmartGarden3
- cd ~/SwitchDoc
- cd SDL_Pi_SmartGarden3
- sudo mysql -u root < SmartGarden3.sql
- sudo python3 SG3Configure.py
- sudo python3 SG3.py

sdl_pi_smartgarden3's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sdl_pi_smartgarden3's Issues

Plotly Error on Dash app

When running the index.py. The status page gives an error in the command line and the page does not render

begin= 2022-03-27 10:27:05
pathname= /status_page
previousPathname= /hydroponics_page
i= ['url.pathname']
TRIGGER(S): ['url.pathname']
[2022-03-27 10:27:05,410] ERROR in app: Exception on /_dash-update-component [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/usr/local/lib/python3.7/dist-packages/dash/dash.py", line 1344, in dispatch
response.set_data(func(*args, outputs_list=outputs_list))
File "/usr/local/lib/python3.7/dist-packages/dash/_callback.py", line 151, in add_context
output_value = func(*func_args, **func_kwargs) # %% callback invoked %%
File "index.py", line 154, in display_page
myLayout = status_page.StatusPage()
File "/home/pi/SwitchDoc/SDL_Pi_SmartGarden3/dash_app/status_page.py", line 808, in StatusPage
no_gutters=True,
File "/usr/local/lib/python3.7/dist-packages/dash/development/base_component.py", line 425, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/dash_bootstrap_components/_components/Row.py", line 76, in init
super(Row, self).init(children=children, **args)
File "/usr/local/lib/python3.7/dist-packages/dash/development/base_component.py", line 138, in init
", ".join(sorted(self._prop_names))
TypeError: The dash_bootstrap_components.Row component (version 1.0.3) received an unexpected keyword argument: no_gutters
Allowed arguments: align, children, className, class_name, id, justify, key, loading_state, style

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.