Coder Social home page Coder Social logo

kizniche / mycodo Goto Github PK

View Code? Open in Web Editor NEW
2.9K 123.0 492.0 110.1 MB

An environmental monitoring and regulation system

Home Page: http://kylegabriel.com/projects/

License: GNU General Public License v3.0

CSS 0.34% JavaScript 1.14% C 0.14% Shell 1.33% Python 63.52% HTML 33.50% Mako 0.01% Dockerfile 0.02%
raspberry-pi sensors regulation monitoring environment relay pid python automation grow

mycodo's Introduction

Mycodo

Environmental Regulation System

Latest version: 8.15.13

Mycodo is open source software for the Raspberry Pi that couples inputs and outputs in interesting ways to sense and manipulate the environment.

Build Status Codacy Badge Translation Badge DOI

Prerequisites: Debian-based Linux operating system (apt).

Recommended: Single board computer (SBC) with General-Purpose Input-Output (GPIO) pins.

Install Command:

curl -L https://kizniche.github.io/Mycodo/install | bash

See the Install Mycodo section for more details.

Documentation

Mycodo Manual

Mycodo API (Version: v1)

Mycodo Wiki

Mycodo Custom Module Repository

Discussion

Mycodo Issues (Bug Reports/Feature Requests)

Mycodo Forum

Mycodo Discord

Bug in the Mycodo Software

If you believe there is a bug in the Mycodo software, first search through the github Issues and see if your issue has already recently been discussed or resolved. If your issue is novel or significantly more recent than a similar one, you should create a New Issue. When creating a new issue, make sure to read all information in the issue template and follow the instructions. Replace the template text with the information being requested (e.g. "step 1" under "Steps to Reproduce the issue" should be replaced with the actual steps to reproduce the issue). The more information you provide, the easier it is to reproduce and diagnose the issue. If the issue is not able to reproduced because not enough information is provided, it may delay or prevent solving the issue.

I have always made Mycodo free and I don't intend on changing that. However, if you find Mycodo useful and would like to support its continued development, please consider becoming a sponsor at github.com/sponsors/kizniche or donate at kylegabriel.com/donate.

  • Inputs that record measurements from sensors, GPIO pin states, analog-to-digital converters, and more (or create your own Custom Inputs). See all Supported Inputs.
  • Outputs that perform actions such as switching GPIO pins high/low, generating PWM signals, executing shell scripts and Python code, and more (or create your own Custom Outputs). See all Supported Outputs.
  • Functions that perform tasks, such as coupling Inputs and Outputs in interesting ways, such as PID, Conditional, Trigger, to name a few (or create your own Custom Functions). See all Supported Functions.
  • Web Interface for securely accessing Mycodo using a web browser on your local network or anywhere in the world with an internet connection, to view and configure the system, which includes several light and dark themes.
  • Dashboards that display configurable widgets, including interactive live and historical graphs, gauges, output state indicators, measurements, and more (or create your own Custom Widgets). See all Supported Widgets.
  • Alert Notifications to send emails when measurements reach or exceed user-specified thresholds, important for knowing immediately when issues arise.
  • Setpoint Tracking for changing a PID controller setpoint over time, for use with things like terrariums, reflow ovens, thermal cyclers, sous-vide cooking, and more.
  • Notes to record events, alerts, and other important points in time, which can be overlaid on graphs to visualize events with your measurement data.
  • Cameras for remote live streaming, image capture, and time-lapse photography.
  • Energy Usage Measurement for calculating and tracking power consumption and cost over time.
  • Upgrade System to easily upgrade the Mycodo system to the latest release to get the newest features or restore to a previously-backed up version.
  • Translations that enable the web interface to be presented in different Languages.
https://kylegabriel.com/projects/wp-content/uploads/sites/3/2020/06/Screenshot_2020-04-25-hydra-Default-Dashboard-Mycodo-8-4-0-dashboard_2.png

Figure: Automated Hydroponic System Build


Originally developed to cultivate edible mushrooms, Mycodo has evolved to do much more. Here are a few things that have been done with Mycodo:

Projects by Kyle Gabriel (core developer)

Featured Projects

https://kylegabriel.com/projects/wp-content/uploads/sites/3/2021/09/MushroomCultivation_512x288.jpg https://kylegabriel.com/projects/wp-content/uploads/sites/3/2020/07/VID_PROJ_HYDRO_512x288.jpg

Projects by Others

  • Maintaining aquatic systems (e.g. fish, hydroponic, aquaponic)
  • Maintaining terrarium, herpetarium, and vivarium environments
  • Incubating young animals and eggs
  • Aging cheese
  • Dry-aging, curing, and smoking meat (Link 1 (Archive), Link 2 (Archive))
  • Fermenting beer, food, and tobacco
  • Controlling reflow ovens
  • Culturing microorganisms
  • Treating agricultural waste water (Archive, Publication)
  • ...and more

Let me know how you use Mycodo and I may include it on this list.

Visit the Screenshots page of the Wiki.

Prerequisites

Required:

  • Debian-based operating system
  • An active internet connection

Recommended:

Mycodo has been tested to work with Raspberry Pi OS 12 (Bookworm release), Lite and Desktop, 32-bit and 64-bit.

Install Command

Once you have the Raspberry Pi booted, log in and run the following command in a terminal to initiate the Mycodo install to /opt/Mycodo:

curl -L https://kizniche.github.io/Mycodo/install | bash

Install Notes

Make sure the install script finishes without errors. A log of the output will be created at /opt/Mycodo/install/setup.log.

If the install is successful, the web user interface should be accessible by navigating a web browser to https://127.0.0.1/, replacing 127.0.0.1 with the IP address of the computer you installed on. Upon your first visit, you will be prompted to create an admin user before being redirected to the login page. Once logged in, check that the time is correct at the top left of the page. Incorrect time can cause a number of issues with measurement storage and retrieval in a time-series database. Also ensure the host name and version number at the top left of the page is green, indicating the daemon is running. If it's red, it indicates the daemon is inactive or unresponsive. Last, ensure any java-blocking plugins of your browser are disabled for all parts of the web interface to function properly.

If you receive an error during the install that you believe is preventing your system from operating, please create an issue with the install log attached. If you would first like to attempt to diagnose the issue yourself, see Diagnosing Issues.

A minimal set of anonymous usage statistics are collected to help improve development. No identifying information is saved from the information that is collected and it is only used to improve Mycodo. No one other than the development team will have access to this information and it will never be sold. The data collected is mainly what and how many features are used, and other similar information. The data that's collected can be viewed from the 'View collected statistics' link in the Settings -> General page. There is an opt out option on the General Settings page if you want to turn this functionality off.

Measurement Database

Mycodo currently supports InfluxDB as the time-series database used to store measurements. Both versions 1.x (for 32-bit systems) and 2.x (for 64-bit systems) are supported. During the install, you will be prompted to install 1.x, 2.x, or none (if you wish to set up your own, either locally or remotely). The settings for the database can be reconfigured after install.

Docker

Docker support is experimental, but if you want to try it, read the docker README.md. There is also a Docker Issue (#637) on github for those that wish to help with development.

The latest API documentation can be found here: API Information and API Endpoint Documentation.

A proportional–integral–derivative (PID) controller is a control loop feedback mechanism used throughout industry for controlling systems. It efficiently brings a measurable condition, such as temperature, to a desired state (setpoint). A well-tuned PID controller can raise to a setpoint quickly, have minimal overshoot, and maintain the setpoint with little oscillation.

PID Animation

Mycodo

The top graph visualizes the regulation of temperature. The red line is the desired temperature (setpoint) that has been configured to change over the course of each day. The blue line is the actual recorded temperature. The green vertical bars represent how long a heater has been activated for every 20-second period. This regulation was achieved with minimal tuning, and already displays a very minimal deviation from the setpoint (±0.5° Celsius). Further tuning would reduce this variability further.

See the PID Controller and PID Tuning sections of the manual for more information.

All supported Inputs, Outputs, and other devices can be found under the Supported Devices section of the manual.

Mycodo supports importing custom Input, Output, Function, Action, and Widget modules. you can find more information about each in the manual under Custom Inputs, Custom Outputs, Custom Functions, Custom Actions, and Custom Widgets.

If you would like to add to the list of supported Inputs, Outputs, Functions, Actions, and Widgets, submit a pull request with the module you created or start a New Issue.

Additionally, I have another github repository devoted to custom modules that do not necessarily fit with the built-in set and are not included by default with Mycodo, but can be imported. These can be found at kizniche/Mycodo-custom.

Thanks for using and supporting Mycodo, however depending where you found this documentation, you may not have the latest version or it may have been altered, if not obtained through an official distribution site. You should be able to find the latest version on github.

https://github.com/kizniche/Mycodo

https://KyleGabriel.com

https://RadicalDIY.com

See License.txt

Mycodo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Mycodo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A full copy of the GNU General Public License can be found at http://www.gnu.org/licenses/gpl-3.0.en.html

This software includes third party open source software components. Please see individual files for license information, if applicable.

Mycodo has been translated to several languages. Weblate is now used so anyone can contribute to translations. However, due to an increasing number of new languages being added and not translated, only languages that are at least 50% complete will be included in Mycodo as a translation option.

Translation Table

The install script will prompt you to select a language. This will be the set language when you first open the web user interface. You may change this at a later time on the settings page at [Gear Icon] -> Configure -> General -> Language.

If you would like to contribute to the translations, you can do so at http://translate.kylegabriel.com. Please read How To Contribute to Language Translations in Mycodo for more information.

Mycodo is made possible, in part, by the many fine open source libraries, below.

mycodo's People

Contributors

agricola-access avatar ancientgate avatar cabalist avatar david-oconnor avatar deargle avatar enstain-tm avatar etiology avatar gfzdw avatar hannahkiekens avatar huntj88 avatar jcass77 avatar joe2824 avatar kizniche avatar knyazsh avatar kyleluiten avatar maecki-maecki avatar mattimatti avatar mingwandroid avatar mrgnr avatar nick-vazquez avatar not5 avatar pkrahmer avatar ppetru avatar ramazansancar avatar rbultman avatar running-codebase avatar slashie avatar theoi-meteoroi avatar ziqueyuutaka avatar zsole2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mycodo's Issues

Add Notes/Journal entries Section

Wouldn't it be awesome to be abble to write some notes anytime to keep log of anything :

  • Grow journal
  • PID settings/tuning
  • personal notes and comments
    Very important to have automatic time stamps affected when writing the notes/

Add checks for spaces in relay/sensor values

Since the update to the new logging method and history feature, if a value that is printed from the Data tab has a space in it, it will offset the columns and the data columns will not align properly with the name columns. This can be alleviated by not having spaces in values. Therefore, relay/sensor text values need to have spaces forbidden. A warning should be issued if a new value with a space is detected, "Error: Values cannot contain spaces. Please resubmit without spaces."

What does this code do?

Hello!

I am just curious about the code here:

conditional_co2_id = [[[0 for k in xrange(10)] for j in xrange(len(conditional_co2_number_conditional))] for i in xrange(len(conditional_co2_number_sensor))]

on my system it seems to produce an array of zeroes. Something like this:

where
conditional_t_number_conditional has a length of 10 and
conditional_t_number_sensor has a length of 4

[[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],
 [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],
 [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],
 [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]]

Could you help me understand this code?

int and time.time() and precision

Out of curiosity why is time cast as an int in your code?

Examples:

roughly L2009 in mycodo.py

while last_ht_reading > int(time.time()):
        time.sleep(0.25)

or

roughly L2038 in mycodo.py

last_ht_reading = int(time.time()) + 2

time.time() returns a float normally and python will add and compare ints and floats without issue.

It produce inexact results in timers as well.

Consider time.time() is 1448345968.99. Converted to an int that is 1448345968. It takes one time.sleep(0.25) to become 1448345969.

Now consider time.time() is 1448345968.01. Again converted to an int that is 1448345968. But it takes 4 time.sleep(0.25) to become 1448345969.

Your readings from the sensors could take ± .75 seconds here. Floats would alleviate the precision issue.

Just curious. :)

Update from v3.5.89 to current - daemon will not start

Trying to update Mycodo from v3.5.89 to current (to add the fix for timers and triggers). The daemon shuts down fine and the update finishes without issue (at least according to logs). But the daemon will not start back up... not from the web interface (which shows up with the daemon off and the last log entry is the update switching off the daemon) and not from the command line (via "sudo service mycodo start"). I tried restarting the Pi as well, but the daemon will not start back up. I've tried a few times now and the same thing happens every time.

(I meant to say before that this software is great. Thank you so much for making and maintaining it, and also for your fast responses.)

Owner individualisation of mycodo

If I have multiples Raspb.pi with mycodo on each / multiples setup / multi chambers : it'll be great to be abble to personalise a bit to know immediatly on which one you are.
Perhaps a functionnality to upload a banniere with fixed valors that'll appear in see-through the header (please find example in attached picture)
mycodo_trough01
I used 50% opacity.
Perhaps a small logo at right but I'm totally aware when you add sensors with logs ticked they 'll need this place !

favicon for easy searching in browser tabs

Few times I run with my eyes more than usually to find Mycodo tab in browser. I can try to make favicon for the project. May be you have an ideas about graphics?

p.s. What Mycodo means? I think first part 'Myco' shortcut from mycology, but the last 'do' I don't understand?

test image:
apple-touch-icon-144x144

Fix relay logging limitation

Update the relay on duration logging format to remove the current 8-relay limitation. Although the software supports an infinite number of relays, any over 8 will break the system in unforeseen ways.

Current logging format:
Year Mo Day Hour Min Sec R1SecOn R2SecOn R3SecOn R4SecOn R5SecOn R6SecOn R7SecOn R8SecOn Sensor
2015 09 07 07 15 29 0 -144.25 0 0 0 0 0 0 0

The negative relay duration in the example is valid, as this is derived from a negative PID output, and all numbers are eventually converted to their absolute value. This format was used to distinguish that this relay was used to decrease an environmental condition (rather than increase it). Furthermore, the most recent Mycodo update, which allows for the user to select any number of relays to be graphed, either positive or negative, renders this format unnecessary.

Proposed new logging format:
Year Mo Day Hour Min Sec GPIO-Pin SecOn

AM2315 Sensor Support

I have been using the AM2302 sensor on my projects for some time and it has proven very rugged, reliable and easily mounted in real application. Unlike other sensors, it works via i2c with a static address, so multiple sensors would require an i2c multiplexer. Those are widely available with drivers, but they almost all work the same way. It would be great if Mycodo would support these sensors.

Enhancement (small screen / terminal support)

2015_09_02_frut chamber
I have a small TFT screen, connected to the Pi
the objectif is to be able to see mycodo/gaphs and at same time you can look throuh the glass inside the fruting chamber.

this base screeen no tactlie , just cheap TFT is only 7''
and the webpage won't fit ! I tryed to reduce the wepage size in chromium with CTRL + +
but all became too small/tight
Ideal, I think, would be to have some graph from terminal directly
I'm sure this is easy to read the sensors log file in real time to show a graph in a terminal window

Warn when PID Regulate and Up/Down Relay incorrectly set

If Both is selected, Up Relay and Down Relay needs to be set.
If Up is selected, Up Relay needs to be set
if Down is selected, Down Relay needs to be set

A warning should be given if any of these are incorrect and the PID is attempted to be turned on.

The restore log is moved as a part of the backup restore process

Therefore, when one restores a backup and attempts to view the log with the "Restore Log" button, it will print the restore log from the backup and not of the status of the current restore. The status of the current restore will be found in the the system backup that was made as a part of the restore process.

It also appears part of the restore status will be sent to the restore log of the new backup and part to the restore log of the restored backup.

Add time/date timers

Turn relay x [on/off] at xx:xx for x seconds (0 to remain on/off)

[selection] repeat x times
[selection] repeat every x [seconds] thereafter)

Ability to hide thumbnails

Thumbnails in the notes section currently are not true "thumbnails" but merely scaled versions of the full-resolution image. Since this can be a big bandwidth hog, the option to show note thumbnails should be included in the settings.

Min PID relay duration not operating correctly

The min duration is supposed to limit the relay minimum on duration. If the PID output is below this value, the relay is suppose not turn on at all. The current operation is if the PID value is positive and below the minimum duration, the relay will turn on for the minimum duration.

Confusion about 'sensor'

Hello again!

I have a question about one of the most used variables in mycodo.py. sensor is used all over the place and I believe it is an int and the address of a sensor. But I am not sure.

I see that when it is used in logging it tends to have 1 added to it. This makes me think that internally the sensors are numbered 0-7 but in the log you refer to them as 1-8.

Could you clarify what this variable is used for in mycodo.py?

different width of relay and temperature parts in sensor tab

Relay and temperature blocks in sensor tab in case of css .sensor-parent{float: left and width: auto} are different width, and if I`m not wrong, removing float will solve this situation.
And if it so, then in css table.relays{display: table; margin-right: auto; margin-left: auto; width: 100%;} will solve the last part of positioning.

Networking multiple Mycodo daemons

Monitoring is key to any good regulatory system, with redundancy often used to accomplish this. This may be useful for remote operation or where great liability is involved (e.g. keeping things alive, preventing damage of expensive materials, ensuring safety, etc.).

The main use of networking would be to add the ability to monitor the status of a running Mycodo daemon on another device and to respond if there is an issue (e.g. daemon crash, linux kernel panic, corrupt filesystem causing instability, disconnect from the network, loss of regulation, etc.).

Initial features would be the ability to notify by email, power cycle the affected Pi with the use of a normally-closed (NC) relay, or take control of the regulation relays to recover the system from a loss of regulation. Additionally, If the host (monitoring system) experiences an issue, the slave (monitored system) could power-cycle the host.

A point-to-point connection would provide the best security, such as a single ethernet cable (TCP/IP) or serial (Tx/Rx). With a dedicated connection, there are fewer additional points of failure (such as routers, switches, and wireless APs, although these could still be used).

If successful, this feature could potentially lead to more advanced features such as improving graph generation performance or other processes by splitting processing tasks (cluster).

Add minimum relay on time for PID controller

There is already a "maximum on time" (titled Up Max and Down Max, for each relay of the PID), that the on time for a relay will not exceed. There needs to be a complementary minimum on time that if the PID does not exceed, the relay does not turn on.

Modularize sensor/device code

This is an effort to reduce the bloat of mycodo.py and allow fewer requirements for its use, based on what is being used by it (modules). I can foresee, with many supported sensors/devices, Mycodo getting unmanageable and requiring the installation of extraneous software that will never be utilized by some users.

For instance, functions related to reading the AM2315 temperature/humidity sensor would all be in AM2315.py and the TCA9548A multiplexer in TCA9548A.py. They would only be loaded if that sensor/device is in use. That way software will not need to be installed if the device is not used, such as symbus- only used by the TCA9548A.

I'm struggling to find the best way to do this. Often, when I take on big tasks such as rewriting my code for better operability/modularity/readability, my first choice of a method is not necessarily the best course (but seldom is it the worst choice).

Cannot generate custom graph before 6 months from present

To get commit 572dfeb working, I had to temporarily make custom graph generation only work for the past 6 months. It should be an easy fix once I look at that part of the code, but for now everything else works from this major overhaul of the custom graph generation.

Essentially, the custom graph generation was handled in PHP. It is now handled by the Python function that generates the preset graphs on the Graph Tab.

Odd trigger behavior / things not logging / timer problems

I'm trying to set up a makeshift timer for light. So what I did was set turn on relay 1 (normal lights) for 64800 seconds (18 hours). Then I set up a trigger so that when relay 1 turns off, relay 4 (night light) is supposed to turn on for 21600 seconds (6 hours). And another trigger so that when relay 4 turns off, relay 1 is supposed to turn on for 64800 seconds again... so that it does a cycle.

So relay 1 works fine and turns off, turning relay 4 on... but after that, it stops triggering the cycle. Relay 4 turns off, but doesn't write to the log and doesn't trigger relay 1 to turn back on. If I start the cycle from the relay 4 starting point, it does the same thing, except that it logs 4 turning off and turns on relay 1, but doesn't turn relay 1 off, write 1 turning off to the log, or trigger relay 4 turning on.

I'm not sure what the best way to do this is. I would love a time based trigger; so I could put "Turn on relay 1 at 8:00am for ___ hours" or "Turn on relay 1 at ___ and off at ___" would be even better.

HTsensor PID issue

After yesterday update:
{
Database version 11, v3.5.76
v3.5.76: Add minimum relay on duration for PID controllers
}
my HT-HUM PID is broken. The P and I constants were deleted, and no new values is saved, either.
I don't see any obvious in the code though.

Can't update after fresh install

@boomstick8x I'm starting this (and deleting the other posts) because it was off-topic for that thread (and there's a lot of chat, so I don't want who is subscribed to that issue to keep getting notified).

Is there an error of any kind?

Ability to link relays ([de]activation of a relay will [de]activate another)

Feature request: When one relay is activated, one or more other relays are activated. This permits the PID controller or a conditional statement could activate more than one relay.

Consider the following simple relay configuration to illustrate the utility:

Relay 1 (Fan), GPIO 10, Link Relay 2 (when Relay 1 turns on, Relay 2 does also)
Relay 2 (Heater), GPIO 15

Relay 3 (Fan), GPIO 10, Link Relay 4 (when Relay 3 turns on, Relay 4 does also)
Relay 4 (Cooler), GPIO 20

Notice that the same GPIO can be set for multiple relays, which can produce a number of conflicts.

What if the same GPIO is trying to be turned on for different durations?
How do the threaded functions to turn on the relays communicate with each other and select the longest duration?

Lock relay/sensor log while generating graph

Rarely, the generation of a graph will coincide with a relay or sensor log being written. This can result in the log not being able to be read and the graph generating without any data as input, causing the graph to be empty.

The relay or sensor log needs to be locked by mycodoGraph.py while the log is being read/parsed.

Add more user groups

Groups currently only include guest and admin.
Guest: Can only view (but cannot view database contents)
Admin: Can perform any operation (only group that can add/delete users)

Potential additions:
Monitor: Guest privileges + ability to generate graphs + turn camera on/off
Editor: Monitor privileges + ability to edit relay/sensor/PID configurations

Any others that would be useful?

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.